elkpy.AudioGraphController#
- class elkpy.audiographcontroller.AudioGraphController(address='localhost:51051', sushi_proto_def='/usr/share/sushi/sushi_rpc.proto')[source]#
Bases:
object
A class to control the audio graph in sushi via gRPC. It has functions to create, move, delete and get info about audio graph object like tracks and processors.
- Attributes:
_stub (AudioGraphControllerStub): Connection stubs to the gRPC audio graph interface implemented in sushi.
- create_multibus_track(name: str, buses: int) None [source]#
Create a new multibus track in sushi.
- Parameters:
name (str): The name of the new track. buses (int): The number of audio buses in the new track.
- create_post_track(name: str) None [source]#
Create a new post track in sushi.
- Parameters:
name (str): The name of the new track.
- create_pre_track(name: str) None [source]#
Create a new pre track in sushi.
- Parameters:
name (str): The name of the new track.
- create_processor_on_track(name: str, uid: str, path: str, processor_type: PluginType, track_id: int, before_processor: int, add_to_back: bool) None [source]#
Create a new processor on an existing track.
- Parameters:
name (str): The name to assign the processor. Must be unique. uid (str): The uid of an internal sushi processor or the URI of an LV2 processor. Not applicable for vst2 or vst3. path (str): The path to the processor library. Only for vst2 or vst3 processors. processor_type (info_type.PluginType): The type of processor to create. track_id (int): The id of the track to add the processor to. before_processor (int): Which existing processor to create the new processor in front of. add_to_back (bool): Set to true to add the processor to the back of the processing chain on the track.
- create_track(name: str, channels: int) None [source]#
Create a new track in sushi.
- Parameters:
name (str): The name of the new track. channels (int): The number of channels to assign the new track.
- delete_processor_from_track(processor: int, track: int) None [source]#
Delete an existing processor from a track.
- Parameters:
processor (int): The id of the processor to delete. track (int): The id of the track that contains the processor.
- delete_track(track_id: int) None [source]#
Delet a track.
- Parameters:
track_id (int): The id of the track to delete.
- get_all_processors() List[ProcessorInfo] [source]#
Gets a list of all available processors.
- Returns:
List[info_types.ProcessorInfo]: A list with the info of all the available processors.
- get_all_tracks() List[TrackInfo] [source]#
Gets a list of all available tracks.
- Returns:
List[info_types.TrackInfo]: A list with the info of all the available tracks.
- get_processor_bypass_state(processor_identifier: int) bool [source]#
Get the bypass state of the specified processor.
- Parameters:
processor_identifier (int): The id of processor to get the bypass state from.
- Returns:
bool: The bypass state of the processor matching the id.
- get_processor_id(processor_name: str) int [source]#
Get the id of a processor from its name.
- Parameters:
processor_name (str): The name of the processor to get the id from.
- Returns:
int: The id of the processor matching the name.
- get_processor_info(processor_identifier: int) ProcessorInfo [source]#
Get the info of a processor from its id.
- Parameters:
track_identifier (int): The id of the processor to get the info from.
- Returns:
info_types.ProcessorInfo: The info of the processor matching the id.
- get_processor_state(processor_identifier: int) ProcessorState [source]#
Get the full state of the specified processor.
- Parameters:
processor_identifier (int): The id of processor to get the full state from.
- Returns:
ProcessorState: An object describing the full the processor matching the id.
- get_track_id(track_name: str) int [source]#
Get the id of a track from its name.
- Parameters:
track_name (str): The name of the track.
- Returns:
int: The id of the track matching the name.
- get_track_info(track_identifier: int) TrackInfo [source]#
Get the info of a track from its id.
- Parameters:
track_identifier (int): The id of the track to get the info from.
- Returns:
info_types.TrackInfo: The info of the track matching the id.
- get_track_processors(track_identifier: int) List[ProcessorInfo] [source]#
Get a list of processors assigned on the specified track.
- Parameters:
track_identifier (int): The id of the track to get the processor list from.
- Returns:
List[info_types.ProcessorInfo]: A list of the info of the processors assigned to the track matching the id.
- move_processor_on_track(processor: int, source_track: int, destination_track: int, before_processor: int, add_to_back: bool) None [source]#
Move an existing processor.
- Parameters:
processor (int): The id of the processor to move. source_track (int): The id of the track to move the processor from. destination_track (int): The id of the track to move the processor to. before_processor (int): The id of another processor to move this processor in front of. add_to_back (bool): Set to true to add the processor to the back of the processing chain on the track.
- set_processor_bypass_state(processor_identifier: int, bypass_state: bool) None [source]#
Set the bypass state of the specified processor.
- Parameters:
processor_identifier (int): The id of the processor to set the bypass state of. bypass_sate (bool): The bypass state of the processor matching the id.
- set_processor_state(processor_identifier: int, state: ProcessorState) None [source]#
Set the full or partial state of the specified processor from an existing state object.
- Parameters:
state (info_types.ProcessorState): a state object either populated manually or received from a call to get_processor_state.