elkpy.AudioRoutingController#

class elkpy.audioroutingcontroller.AudioRoutingController(address: str = 'localhost:51051', sushi_proto_def: str = '/usr/share/sushi/sushi_rpc.proto')[source]#

Bases: object

A class to control audio routing in Sushi via gRPC. It manages audio input and output connections between different tracks in sushi and how they connect to external inputs and outputs.

Attributes:

_stub (AudioRoutingControllerStub): connection stub to the gRPC audio routing interface in sushi

connect_input_channel_to_track(track: int, track_channel: int, engine_channel: int) None[source]#

Connects an input channel to a track

Parameters:

track (int): The index of the track to connect to track_channel (int): The index of the channel on the track to connect engine_channel (int): The index of the channel on the engine to connect

connect_output_channel_from_track(track: int, track_channel: int, engine_channel: int) None[source]#

Connects an output channel from a track

Parameters:

track (int): The index of the track to connect to track_channel (int): The index of the channel on the track to connect engine_channel (int): The index of the channel on the engine to connect

disconnect_all_inputs_from_track(track_id: int) None[source]#

Disconnects all inputs from a track

Parameters:

track_id (int): a track ID for which all inputs will be disconnected

disconnect_all_outputs_from_track(track_id: int) None[source]#

Disconnects all outputs from a track

Parameters:

track_id (int): a track ID for which all inputs will be disconnected

disconnect_input(track: int, track_channel: int, engine_channel: int) None[source]#

Disconnects an input from a track

Parameters:

track (int): The index of the track to disconnect to track_channel (int): The index of the channel on the track to disconnect engine_channel (int): The index of the channel on the engine to disconnect

disconnect_output(track: int, track_channel: int, engine_channel: int) None[source]#

Disconnects an output from a track

Parameters:

track (int): The index of the track to disconnect to track_channel (int): The index of the channel on the track to disconnect engine_channel (int): The index of the channel on the engine to disconnect

get_all_input_connections() List[AudioConnection][source]#

Gets a list of all input connections.

Returns:

List[info_types.AudioConnection]: a list of AudioConnection objects.

get_all_output_connections() List[AudioConnection][source]#

Gets a list of all output connections.

Returns:

List[info_types.AudioConnection]: a list of AudioConnection objects.

get_input_connections_for_track(track_id: int) List[AudioConnection][source]#

Gets a list of input connections for a specific track.

Parameters:

track_id (int): The id of the track to get the input connections from

Returns:

List[info_types.AudioConnection]: a list of AudioConnection objects.

get_output_connections_for_track(track_id: int) List[AudioConnection][source]#

Gets a list of output connections for a specific track.

Parameters:

track_id (int): The id of the track to get the output connections from

Returns:

List[info_types.AudioConnection]: a list of AudioConnection objects.