scamp_extensions.playback.supercollider.sc_playback_implementation.add_sc_extensions
- scamp_extensions.playback.supercollider.sc_playback_implementation.add_sc_extensions()[source]
Adds several new functions to the
ScampInstrument
class, as well as to theEnsemble
(and thereforeSession
).New instance methods of ScampInstrument:
add_supercollider_playback(self, synth_def: str)
: takes a string containing a SuperCollider SynthDef, and adds aSCPlaybackImplementation
to this instrument that uses that SynthDef to synthesize sound. (This starts up instances of sclang and scsynth in the background.)remove_supercollider_playback(self)
: removes the (most recently added)SCPlaybackImplementation
from this instrument’s playback_implementations.New instance methods of Ensemble / Session:
new_supercollider_part(self, name: str, synth_def: str)
: Similarly to any of the other “new_part” methods, this adds and returns a newly created ScampInstrument that uses anSCPlaybackImplementation
based on the given synth def string.get_sclang_instance(self)
: Returns the instance ofSCLangInstance
that this ensemble is using for supercollider playback (or creates one if none is running).start_recording_sc_output(self, path, num_channels=2)
: Tells SuperCollider to start recording the playback to and audio file at the given path, using the specified number of channels.stop_recording_sc_output(self)
: Stops recording SuperCollider playback to an audio file.