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.
__init__(address='localhost:51051', sushi_proto_def='/usr/share/sushi/sushi_rpc.proto')[source]

The constructor for the AudioGraphController class setting up the gRPC connection with sushi.

Parameters:
address (str): ‘ip-addres:port’ The ip-addres and port at which to connect to sushi. sushi_proto_def (str): path to .proto file with SUSHI’s gRPC services definition
create_multibus_track(name: str, output_busses: int, input_busses: int) → None[source]

Create a new multibus track in sushi.

Parameters:
name (str): The name of the new track. output_busses (int): The number of output busses to assign the new track. input_busses (int): The number of input busses to assign the new track.
create_processor_on_track(name: str, uid: str, path: str, processor_type: elkpy.sushi_info_types.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[elkpy.sushi_info_types.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[elkpy.sushi_info_types.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) → elkpy.sushi_info_types.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_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) → elkpy.sushi_info_types.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[elkpy.sushi_info_types.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.