sc3nb.sc_objects.score
Module for creating SuperCollider OSC files that can be used for non-realtime synthesis
SuperCollider Guide - Non-Realtime Synthesis
Module Contents
Class List
Content
- class sc3nb.sc_objects.score.Score[source]
Overview:
Load a OSC file into a dict.
Write this score as binary OSC file for NRT synthesis.
Write an OSC file from the messages and wri
- classmethod load_file(path: Union[str, bytes, os.PathLike]) Dict[float, List[sc3nb.osc.osc_communication.OSCMessage]][source]
Load a OSC file into a dict.
- Parameters:
- pathUnion[str, bytes, os.PathLike]
Path of the OSC file.
- Returns:
- Dict[float, List[OSCMessage]]
dict with time tag as keys and lists of OSCMessages as values.
- classmethod write_file(messages: Dict[float, List[sc3nb.osc.osc_communication.OSCMessage]], path: Union[str, bytes, os.PathLike], tempo: float = 1)[source]
Write this score as binary OSC file for NRT synthesis.
- Parameters:
- messagesDict[float, List[OSCMessage]]
Dict with times as key and lists of OSC messages as values
- pathUnion[str, bytes, os.PathLike]
output path for the binary OSC file
- tempofloat
Times will be multiplied by 1/tempo
- classmethod record_nrt(messages: Dict[float, List[sc3nb.osc.osc_communication.OSCMessage]], osc_path: str, out_file: str, in_file: Optional[str] = None, sample_rate: int = 44100, header_format: str = 'AIFF', sample_format: str = 'int16', options: Optional[sc3nb.sc_objects.server.ServerOptions] = None)[source]
Write an OSC file from the messages and wri
- Parameters:
- messagesDict[float, List[OSCMessage]]
Dict with times as key and lists of OSC messages as values.
- osc_pathstr
Path of the binary OSC file.
- out_filestr
Path of the resulting sound file.
- in_fileOptional[str], optional
Path of input soundfile, by default None.
- sample_rateint, optional
sample rate for synthesis, by default 44100.
- header_formatstr, optional
header format of the output file, by default “AIFF”.
- sample_formatstr, optional
sample format of the output file, by default “int16”.
- optionsOptional[ServerOptions], optional
instance of server options to specify server options, by default None
- Returns:
- subprocess.CompletedProcess
Completed scsynth non-realtime process.