elkpy.SushiProcessor

class elkpy.sushiprocessor.SushiProcessor(processor_name: str, controller: elkpy.sushicontroller.SushiController)[source]

Bases: object

A Class to provide control of a specific processor in sushi.

Attributes:
_name (str): The name of the processor. _controller (SushiController): The sushi controller to use. _track_id (int): The id of the track the processor is assigned to. _id (int): The id corresponding to the name of the processor. _parameters (dict): A mapping from parameter name to parameter id. _programs (dict): A mapping from program name to program id.
__init__(processor_name: str, controller: elkpy.sushicontroller.SushiController)[source]

Constructor for the sushi processor. Takes the name and the controller used to control sushi.

Parameters:
processor_name (str): The name of the processor to control. controller (SushiController): The controller to use for controlling the processor.
get_bypass_state() → bool[source]

Get the bypass state of the processor.

Returns:
bool: The bypass state of the processor.
get_parameter_value(parameter_name: str) → float[source]

Get the value of a parameter by name.

Parameters:
parameter_name (str): The name of the parameter to get the value from.
Returns:
float: The current value of the parameter.
get_parameter_values() → dict[source]

Get the current value of the parameters with their name as the key.

Returns:
dict: Dictionary with key as parameter names and value as the current parameter value.
get_parameters() → List[str][source]

Get a list of the names of the parameters available to the processor.

Returns:
List[str]: List of parameter names.
get_program() → str[source]

Get the name of the current program.

Returns (str): The name of the current program.
get_programs() → List[str][source]

Get a list of the names of the available programs.

Returns:
List[str]: The names of the available programs.
send_aftertouch(channel: int, value: float)[source]

Send a aftertouch message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. value (float): The aftertouch value of the note as a float between 0-1.
send_modulation(channel: int, value: float)[source]

Send a modulation message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. value (float): The modulation value of the note as a float between 0-1.
send_note_aftertouch(channel: int, note: int, value: float)[source]

Send a note aftertouch message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. note (int): The midi note value to send. value (float): The aftertouch value of the note as a float between 0-1.
send_note_off(channel: int, note: int, velocity: float)[source]

Send a note off message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. note (int): The midi note value to send. velocity (float): The velocity of the note as a float between 0-1.
send_note_on(channel: int, note: int, velocity: float)[source]

Send a note on message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. note (int): The midi note value to send. velocity (float): The velocity of the note as a float between 0-1.
send_pitch_bend(channel: int, value: float)[source]

Send a pitch bend message to the track containing the processor.

Parameters:
channel (int): The channel to send the message on. value (float): The pitch bend value of the note as a float between 0-1.
set_bypass_state(bypass_state: bool) → None[source]

Set the bypass state of the processor.

Parameters:
bypass_state (bool): The bypass state to set the processor to.
set_parameter_value(parameter_name: str, value: float) → None[source]

Set the value of parameter by name.

Parameters:
parameter_name (str): The name of the parameter to set the value of. value (float): The value to set the parameter to.
set_program(program_name: str) → None[source]

Set the current program of the processor with the program name

Parameters:
program_name (str): The name of the program to set the processor to.
set_program_next()[source]

Set the processor to the next program or loopback to the beginning if at the end of the program list

set_program_previous()[source]

Set the processor to the previous program or loopback to the end if at the start of the program list