Table of Contents

Interface IGeneratorModuleHandle

Namespace
SunSharp.Modules
Assembly
SunSharp.dll

Basic generator of different types of periodic signal waveforms with the volume envelope. This module can receive the incoming signal and use it for the frequency modulation.

public interface IGeneratorModuleHandle : ITypedModuleHandle, IGenericSynthModuleHandle
Inherited Members

Methods

GetAttack(ValueScalingMode)

Value range: displayed: 0 to 512, real: 0 to 512 Original name: 3 'Attack'

int GetAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetDutyCycle(ValueScalingMode)

Value range: displayed: 0 to 1022, real: 0 to 1022 Original name: 9 'Duty cycle'

int GetDutyCycle(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetFreqModulationByInput(ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 8 'Freq.modulation by input'

int GetFreqModulationByInput(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetMode()

Original name: 6 'Mode'

Channels GetMode()

Returns

Channels

GetPanning(ValueScalingMode)

Value range: displayed: -128 to 128, real: 0 to 256 Original name: 2 'Panning'

int GetPanning(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetPolyphony(ValueScalingMode)

Original name: 5 'Polyphony'

int GetPolyphony(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetRelease(ValueScalingMode)

Value range: displayed: 0 to 512, real: 0 to 512 Original name: 4 'Release'

int GetRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetSustain()

Original name: 7 'Sustain'

Toggle GetSustain()

Returns

Toggle

GetVolume(ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 0 'Volume'

int GetVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetWaveform()

Original name: 1 'Waveform'

GeneratorWaveform GetWaveform()

Returns

GeneratorWaveform

MakeAttackEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (0 to 512) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakeAttackEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeDutyCycleEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (0 to 1022) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakeDutyCycleEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeFreqModulationByInputEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (0 to 256) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakeFreqModulationByInputEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeModeEvent(Channels)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is taken as is, only clamped to column value range.

PatternEvent MakeModeEvent(Channels value)

Parameters

value Channels

Returns

PatternEvent

MakePanningEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (-128 to 128) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakePanningEvent(int value)

Parameters

value int

Returns

PatternEvent

MakePolyphonyEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is taken as is, only clamped to column value range.

PatternEvent MakePolyphonyEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeReleaseEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (0 to 512) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakeReleaseEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeSustainEvent(Toggle)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is taken as is, only clamped to column value range.

PatternEvent MakeSustainEvent(Toggle value)

Parameters

value Toggle

Returns

PatternEvent

MakeVolumeEvent(int)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is mapped from displayed range (0 to 256) to column range (0 to 0x8000). Out of range values are clamped.

PatternEvent MakeVolumeEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeWaveformEvent(GeneratorWaveform)

This is a helper method to automatically handle turning target controller values into column values.

For this controller the input value is taken as is, only clamped to column value range.

PatternEvent MakeWaveformEvent(GeneratorWaveform value)

Parameters

value GeneratorWaveform

Returns

PatternEvent

ReadCurveSynth(float[])

Used for 'Drawn', 'DrawnSpline' and 'Harmonics' waveforms.

Read from curve 0 of Generator.

The curve contains 32 values in range of -1 to 1.
int ReadCurveSynth(float[] buffer)

Parameters

buffer float[]

Returns

int

SetAttack(int, ValueScalingMode)

Value range: displayed: 0 to 512, real: 0 to 512 Original name: 3 'Attack' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetAttack(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetDutyCycle(int, ValueScalingMode)

Value range: displayed: 0 to 1022, real: 0 to 1022 Original name: 9 'Duty cycle' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetDutyCycle(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetFreqModulationByInput(int, ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 8 'Freq.modulation by input' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetFreqModulationByInput(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetMode(Channels)

Original name: 6 'Mode' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetMode(Channels value)

Parameters

value Channels

SetPanning(int, ValueScalingMode)

Value range: displayed: -128 to 128, real: 0 to 256 Original name: 2 'Panning' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetPanning(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetPolyphony(int, ValueScalingMode)

Original name: 5 'Polyphony' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetPolyphony(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetRelease(int, ValueScalingMode)

Value range: displayed: 0 to 512, real: 0 to 512 Original name: 4 'Release' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetRelease(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetSustain(Toggle)

Original name: 7 'Sustain' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetSustain(Toggle value)

Parameters

value Toggle

SetVolume(int, ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 0 'Volume' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetVolume(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetWaveform(GeneratorWaveform)

Original name: 1 'Waveform' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

void SetWaveform(GeneratorWaveform value)

Parameters

value GeneratorWaveform

WriteCurveSynth(float[])

Used for 'Drawn', 'DrawnSpline' and 'Harmonics' waveforms.

Write to curve 0 of Generator.

The curve contains 32 values in range of -1 to 1.
int WriteCurveSynth(float[] buffer)

Parameters

buffer float[]

Returns

int