Audio Helm  1.0
Live audio synthesis, sequencing and sampling for Unity
AudioHelm.HelmController Class Reference

Switch to Manual

An interface to a Helm native synthesizer instance(s). All native synth settings can be changed through this class. More...

Inheritance diagram for AudioHelm.HelmController:
AudioHelm.NoteHandler

Public Member Functions

void LoadPatch (HelmPatch patch)
 Loads a synthesizer patch at runtime. More...
 
float GetParameterAtIndex (int index)
 Gets the parameter value at index in the parameter list. More...
 
void SetParameterAtIndex (int index, float newValue)
 Sets the parameter at index in the parameter list to the given value. More...
 
void UpdateAllParameters ()
 Passes along all parameter values to native code. More...
 
void UpdateParameter (int index)
 Passes along parameter value to native code. More...
 
HelmParameter AddEmptyParameter ()
 Adds an empty parameter placement. More...
 
HelmParameter AddParameter (Param parameter)
 Adds a new parameter to this controller. More...
 
int RemoveParameter (HelmParameter parameter)
 Removes the given parameter from the parameter control list. More...
 
float GetParameterValue (Param parameter)
 Gets a Helm synthesizer parameter's percent value of the valid range. e.g. When getting a transpose value, getting the value returns the number of semitones. More...
 
void SetParameterValue (Param parameter, float newValue)
 Changes a Helm synthesizer parameter value. e.g. Lower the pitch of the oscillator by setting the transpose to -12 semitones. More...
 
float GetParameterValue (CommonParam parameter)
 Gets a Helm synthesizer parameter's percent value of the valid range. e.g. When getting a transpose value, getting the value returns the number of semitones. More...
 
void SetParameterValue (CommonParam parameter, float newValue)
 Changes a Helm synthesizer parameter value. e.g. Lower the pitch of the oscillator by setting the transpose to -12 semitones. More...
 
float GetParameterPercent (Param parameter)
 Gets a Helm synthesizer parameter's percent value of the valid range. e.g. If the percent of a parameter is set to 1.0, it's at its max setting. More...
 
void SetParameterPercent (Param parameter, float newPercent)
 Changes a Helm synthesizer parameter by percent of the valid range. e.g. Set the volume to the highest setting by setting the Volume to 1.0. More...
 
float GetParameterPercent (CommonParam parameter)
 Gets a Helm synthesizer parameter's percent value of the valid range. e.g. If the percent of a parameter is set to 1.0, it's at its max setting. More...
 
void SetParameterPercent (CommonParam parameter, float newPercent)
 Changes a Helm synthesizer parameter by percent of the valid range. e.g. Set any parameter to the highest setting by setting the percent to 1.0. More...
 
void SetPolyphony (int numVoices)
 Sets the polyphony (number of voices) of the synthesizer. Lower the polyphony to keep the DSP usage down. More...
 
void AllNotesOff ()
 Triggers note off events for all notes currently on in the referenced Helm instance(s). More...
 
bool IsNoteOn (int note)
 Checks if a note is currently on. More...
 
Dictionary< int, int > GetPressedNotes ()
 Gets a Dictionary of all the currently pressed notes. More...
 
void NoteOn (int note, float velocity, float length)
 Triggers a note on event for the Helm instance(s) this points to. After length amount of seconds, will automatically trigger a note off event. More...
 
void NoteOn (int note, float velocity=1.0f)
 Triggers a note on event for the Helm instance(s) this points to. You must trigger a note off event later for this note by calling NoteOff. More...
 
void NoteOff (int note)
 Triggers a note off event for the Helm instance(s) this points to. More...
 
void SetPitchWheel (float wheelValue)
 Sets the pitch wheel value for the synth. The pitch wheel bends the pitch of the synthesizer up or down. More...
 
void SetModWheel (float wheelValue)
 Sets the modulation wheel value for the synth. The modulation wheel may change how the synth sounds depending on the patch. More...
 
void SetAftertouch (int note, float aftertouchValue)
 Sets the aftertouch for a given note. The aftertouch may change how the given note sounds depending on the patch. More...
 

Public Attributes

const float UPDATE_WAIT = 0.04f
 
const int MAX_PARAMETERS = 16
 
int channel = 0
 Specifies which Helm instance(s) to control. Every Helm instance in any AudioMixerGroup matching this channel number is controlled by this class. More...
 
List< HelmParametersynthParameters = new List<HelmParameter>()
 List of current parameters you can view, change and animate in the Inspector view. More...
 

Protected Attributes

float synthParamValue0 = 0.0f
 

Detailed Description

Switch to Manual

An interface to a Helm native synthesizer instance(s). All native synth settings can be changed through this class.

Member Function Documentation

◆ AddEmptyParameter()

HelmParameter AudioHelm.HelmController.AddEmptyParameter ( )

Adds an empty parameter placement.

Returns
The create synth parameter object.

◆ AddParameter()

HelmParameter AudioHelm.HelmController.AddParameter ( Param  parameter)

Adds a new parameter to this controller.

Returns
The create synth parameter object.

◆ AllNotesOff()

void AudioHelm.HelmController.AllNotesOff ( )

Triggers note off events for all notes currently on in the referenced Helm instance(s).

Implements AudioHelm.NoteHandler.

◆ GetParameterAtIndex()

float AudioHelm.HelmController.GetParameterAtIndex ( int  index)

Gets the parameter value at index in the parameter list.

Parameters
indexThe index of the parameter to get.
Returns
The value of the parameter.

◆ GetParameterPercent() [1/2]

float AudioHelm.HelmController.GetParameterPercent ( Param  parameter)

Gets a Helm synthesizer parameter's percent value of the valid range. e.g. If the percent of a parameter is set to 1.0, it's at its max setting.

Parameters
parameterThe parameter to get the value percent of.
Returns
The current percent value of the parameter passed in.

◆ GetParameterPercent() [2/2]

float AudioHelm.HelmController.GetParameterPercent ( CommonParam  parameter)

Gets a Helm synthesizer parameter's percent value of the valid range. e.g. If the percent of a parameter is set to 1.0, it's at its max setting.

Parameters
parameterThe parameter to get the value percent of.
Returns
The current percent value of the parameter passed in.

◆ GetParameterValue() [1/2]

float AudioHelm.HelmController.GetParameterValue ( Param  parameter)

Gets a Helm synthesizer parameter's percent value of the valid range. e.g. When getting a transpose value, getting the value returns the number of semitones.

Parameters
parameterThe parameter to get the value of.
Returns
The current value of the parameter passed in.

◆ GetParameterValue() [2/2]

float AudioHelm.HelmController.GetParameterValue ( CommonParam  parameter)

Gets a Helm synthesizer parameter's percent value of the valid range. e.g. When getting a transpose value, getting the value returns the number of semitones.

Parameters
parameterThe parameter to get the value of.
Returns
The current value of the parameter passed in.

◆ GetPressedNotes()

Dictionary<int, int> AudioHelm.HelmController.GetPressedNotes ( )

Gets a Dictionary of all the currently pressed notes.

Returns
The pressed notes where the key is the MIDI number and the value is the number of active note on events.

◆ IsNoteOn()

bool AudioHelm.HelmController.IsNoteOn ( int  note)

Checks if a note is currently on.

Returns
true, if note is currently on (held down), false otherwise.
Parameters
noteNote.

◆ LoadPatch()

void AudioHelm.HelmController.LoadPatch ( HelmPatch  patch)

Loads a synthesizer patch at runtime.

Parameters
patchReference to the patch object.

◆ NoteOff()

void AudioHelm.HelmController.NoteOff ( int  note)

Triggers a note off event for the Helm instance(s) this points to.

Parameters
noteThe MIDI keyboard note to turn off. [0, 127]

Implements AudioHelm.NoteHandler.

◆ NoteOn() [1/2]

void AudioHelm.HelmController.NoteOn ( int  note,
float  velocity,
float  length 
)

Triggers a note on event for the Helm instance(s) this points to. After length amount of seconds, will automatically trigger a note off event.

Parameters
noteThe MIDI keyboard note to play. [0, 127]
velocityHow hard you hit the key. [0.0, 1.0]
lengthThe time in seconds the note should play for.

◆ NoteOn() [2/2]

void AudioHelm.HelmController.NoteOn ( int  note,
float  velocity = 1.0f 
)

Triggers a note on event for the Helm instance(s) this points to. You must trigger a note off event later for this note by calling NoteOff.

Parameters
noteThe MIDI keyboard note to play. [0, 127]
velocityHow hard you hit the key. [0.0, 1.0]

Implements AudioHelm.NoteHandler.

◆ RemoveParameter()

int AudioHelm.HelmController.RemoveParameter ( HelmParameter  parameter)

Removes the given parameter from the parameter control list.

Returns
The index where the parameter was.

◆ SetAftertouch()

void AudioHelm.HelmController.SetAftertouch ( int  note,
float  aftertouchValue 
)

Sets the aftertouch for a given note. The aftertouch may change how the given note sounds depending on the patch.

Parameters
noteThe note to change the aftertouch value on.
aftertouchValueThe new aftertouch value.

◆ SetModWheel()

void AudioHelm.HelmController.SetModWheel ( float  wheelValue)

Sets the modulation wheel value for the synth. The modulation wheel may change how the synth sounds depending on the patch.

Parameters
wheelValueThe new wheel value. [0.0, 1.0]

◆ SetParameterAtIndex()

void AudioHelm.HelmController.SetParameterAtIndex ( int  index,
float  newValue 
)

Sets the parameter at index in the parameter list to the given value.

Parameters
indexThe index of the parameter to change.
newValueThe value to change the parameter to.

◆ SetParameterPercent() [1/2]

void AudioHelm.HelmController.SetParameterPercent ( Param  parameter,
float  newPercent 
)

Changes a Helm synthesizer parameter by percent of the valid range. e.g. Set the volume to the highest setting by setting the Volume to 1.0.

Parameters
parameterThe parameter to be changed.
newPercentThe percent of range of values to use. 0.0 for lowest, 1.0 for highest.

◆ SetParameterPercent() [2/2]

void AudioHelm.HelmController.SetParameterPercent ( CommonParam  parameter,
float  newPercent 
)

Changes a Helm synthesizer parameter by percent of the valid range. e.g. Set any parameter to the highest setting by setting the percent to 1.0.

Parameters
parameterThe parameter to be changed.
newPercentThe percent of range of values to use. 0.0 for lowest, 1.0 for highest.

◆ SetParameterValue() [1/2]

void AudioHelm.HelmController.SetParameterValue ( Param  parameter,
float  newValue 
)

Changes a Helm synthesizer parameter value. e.g. Lower the pitch of the oscillator by setting the transpose to -12 semitones.

Parameters
parameterThe parameter to be changed.
newValueThe value to change the parameter to.

◆ SetParameterValue() [2/2]

void AudioHelm.HelmController.SetParameterValue ( CommonParam  parameter,
float  newValue 
)

Changes a Helm synthesizer parameter value. e.g. Lower the pitch of the oscillator by setting the transpose to -12 semitones.

Parameters
parameterThe parameter to be changed.
newValueThe value to change the parameter to.

◆ SetPitchWheel()

void AudioHelm.HelmController.SetPitchWheel ( float  wheelValue)

Sets the pitch wheel value for the synth. The pitch wheel bends the pitch of the synthesizer up or down.

Parameters
wheelValueThe new wheel value. [-1.0, 1.0]

◆ SetPolyphony()

void AudioHelm.HelmController.SetPolyphony ( int  numVoices)

Sets the polyphony (number of voices) of the synthesizer. Lower the polyphony to keep the DSP usage down.

Parameters
numVoicesThe

◆ UpdateAllParameters()

void AudioHelm.HelmController.UpdateAllParameters ( )

Passes along all parameter values to native code.

◆ UpdateParameter()

void AudioHelm.HelmController.UpdateParameter ( int  index)

Passes along parameter value to native code.

Parameters
indexThe index of the parameter to update.

Member Data Documentation

◆ channel

int AudioHelm.HelmController.channel = 0

Specifies which Helm instance(s) to control. Every Helm instance in any AudioMixerGroup matching this channel number is controlled by this class.

◆ synthParameters

List<HelmParameter> AudioHelm.HelmController.synthParameters = new List<HelmParameter>()

List of current parameters you can view, change and animate in the Inspector view.


The documentation for this class was generated from the following file: