elkpy.OSCController

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

Bases: object

Class to manage OSC communication features in Sushi. It can change the OSC port and enable/disable OSC output for particular parameters

__init__(address: str = 'localhost:51051', sushi_proto_def: str = '/usr/share/sushi/sushi_rpc.proto') → None[source]

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

Parameters:
address (str): IP address to Sushi in the uri form : ‘ip-addr:port’ sushi_proto_def (str): path to the .proto file with SUSHI gRPC services definitions
disable_all_output()[source]

Disable OSC output for all parameters

disable_output_for_parameter(processor_id: int, parameter_id: int) → None[source]

Disable OSC for a parameter

Parameters:
processor_id (int): The id of the processor the parameter belongs to parameter_id (int): The id of the parameter to disble OSC for
enable_all_output()[source]

Enable OSC output for all parameters

enable_output_for_parameter(processor_id: int, parameter_id: int) → None[source]

Enable OSC for a parameter

Parameters:
processor_id (int): The id of the processor the parameter belongs to parameter_id (int): The id of the parameter to enable OSC for
get_enabled_parameter_outputs() → List[str][source]

Get which parameters have OSC output enabled

Returns:
List[str]: List of names of the parameters for which OSC is enabled
get_receive_port() → int[source]

The the current port that OSC is receiving on

Returns:
int: The port number
get_send_port() → int[source]

The the current port that OSC is transmitting to

Returns:
int: The port number