Table of Contents

Struct AnalogGeneratorModuleHandle

Namespace
SunSharp.Modules
Assembly
SunSharp.dll

Generator with 32 double alias-free oscillators, 12/24dB filters, envelopes, and smooth change of parameters. The sound quality of this module is better at a sample rate of 44100Hz.

public readonly struct AnalogGeneratorModuleHandle : IAnalogGeneratorModuleHandle, ITypedModuleHandle, IGenericSynthModuleHandle
Implements

Constructors

AnalogGeneratorModuleHandle(SynthModuleHandle)

public AnalogGeneratorModuleHandle(SynthModuleHandle moduleHandle)

Parameters

moduleHandle SynthModuleHandle

Properties

Id

Gets the ID of the synthesizer module.

public int Id { get; }

Property Value

int

ModuleHandle

public SynthModuleHandle ModuleHandle { get; }

Property Value

SynthModuleHandle

Slot

Gets the slot associated with this instance.

public ISlot Slot { get; }

Property Value

ISlot

Methods

AssertCorrectHandleType()

Throws an exception if the underlying module is not of the correct type.

public void AssertCorrectHandleType()

Exceptions

IncorrectSynthHandleTypeException

Thrown if the underlying module is not of the correct type.

ConnectInput(SynthModuleHandle)

Connect the input of this module to the output of another module.

public void ConnectInput(SynthModuleHandle targetModule)

Parameters

targetModule SynthModuleHandle

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

ConnectOutput(SynthModuleHandle)

Connect the output of this module to the input of another module.

public void ConnectOutput(SynthModuleHandle targetModule)

Parameters

targetModule SynthModuleHandle

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

DisconnectInput(SynthModuleHandle)

Disconnect the input of this module from the output of another module.

public void DisconnectInput(SynthModuleHandle targetModule)

Parameters

targetModule SynthModuleHandle

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

DisconnectOutput(SynthModuleHandle)

Disconnect the output of this module from the input of another module.

public void DisconnectOutput(SynthModuleHandle targetModule)

Parameters

targetModule SynthModuleHandle

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

GetAttack(ValueScalingMode)

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

public int GetAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetColor()

Get the module color.

public (byte, byte, byte) GetColor()

Returns

(byte R, byte G, byte B)

RGB color tuple (r, g, b).

Remarks

GetDutyCycle(ValueScalingMode)

Value range: displayed: 0 to 1024, real: 0 to 1024 Original name: 7 'Duty cycle'

public int GetDutyCycle(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetExists()

Check if a module exists.

public bool GetExists()

Returns

bool

true if module exists.

Remarks

GetExponentialEnvelope()

Original name: 6 'Exponential envelope'

public Toggle GetExponentialEnvelope()

Returns

Toggle

GetFilter()

Original name: 9 'Filter'

public AnalogGeneratorFilterType GetFilter()

Returns

AnalogGeneratorFilterType

GetFilterAttack(ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 13 'F.attack'

public int GetFilterAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetFilterEnvelope()

Original name: 15 'F.envelope'

public AnalogGeneratorEnvelopeMode GetFilterEnvelope()

Returns

AnalogGeneratorEnvelopeMode

GetFilterExponentialFrequency()

Original name: 12 'F.exponential freq'

public Toggle GetFilterExponentialFrequency()

Returns

Toggle

GetFilterFrequency(ValueScalingMode)

Value range: displayed: 0 to 14000, real: 0 to 14000 Original name: 10 'F.freq'

public int GetFilterFrequency(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetFilterRelease(ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 Original name: 14 'F.release'

public int GetFilterRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetFilterResonance(ValueScalingMode)

Value range: displayed: 0 to 1530, real: 0 to 1530 Original name: 11 'F.resonance'

public int GetFilterResonance(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetFineTune()

Get the module fine tune and relative note values.

public FineTunePair GetFineTune()

Returns

FineTunePair

Fine tune pair containing fine tune value and relative note.

Remarks

GetFlags()

Get the module flags.

public ModuleFlags GetFlags()

Returns

ModuleFlags

Module flags indicating existence, type, state, and connections.

Remarks

GetInputModules()

Get the array of input modules connected to this module.

public SynthModuleHandle[] GetInputModules()

Returns

SynthModuleHandle[]

Array of connected input module numbers.

Remarks

GetInputs()

Get the array of input module numbers connected to this module.

public int[] GetInputs()

Returns

int[]

Array of connected input module numbers.

Remarks

GetMode()

Quality mode of the module.
Original name: 17 'Mode'

public Quality GetMode()

Returns

Quality

GetModuleType()

Returns the module type. If the module does not exist, returns null. If the module type is unknown (due to library mismatch or otherwise), returns Unknown.

public SynthModuleType? GetModuleType()

Returns

SynthModuleType?

GetName()

Get the module name.

public string? GetName()

Returns

string

Module name, or null if unavailable.

Remarks

GetNoise(ValueScalingMode)

Amount of white noise added to the signal.
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 18 'Noise'

public int GetNoise(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetOutputModules()

Gets the array of output modules connected to this module.

public SynthModuleHandle[] GetOutputModules()

Returns

SynthModuleHandle[]

Array of connected output module numbers.

Remarks

GetOutputs()

Get the array of output module numbers connected from this module.

public int[] GetOutputs()

Returns

int[]

Array of connected output module numbers.

Remarks

GetPanning(ValueScalingMode)

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

public int GetPanning(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetPolyphony(ValueScalingMode)

Original name: 16 'Polyphony'

public int GetPolyphony(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetPosition()

Get the module position on the canvas.

public (int, int) GetPosition()

Returns

(int x, int y)

Tuple containing X and Y coordinates.

Remarks

GetRelease(ValueScalingMode)

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

public int GetRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetSecondaryOscillatorMode()

Original name: 20 'Osc2 mode'

public AnalogGeneratorSecondaryOscillatorMode GetSecondaryOscillatorMode()

Returns

AnalogGeneratorSecondaryOscillatorMode

GetSecondaryOscillatorPhase(ValueScalingMode)

Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 21 'Osc2 phase'

public int GetSecondaryOscillatorPhase(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetSecondaryOscillatorPitch(ValueScalingMode)

Pitch deviation of the additional oscillator (off in the zero position). One semitone = 64.
Value range: displayed: -1000 to 1000, real: 0 to 2000 Original name: 8 'Osc2'

public int GetSecondaryOscillatorPitch(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetSecondaryOscillatorVolume(ValueScalingMode)

Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 19 'Osc2 volume'

public int GetSecondaryOscillatorVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetSustain()

Original name: 5 'Sustain'

public Toggle GetSustain()

Returns

Toggle

GetVolume(ValueScalingMode)

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

public int GetVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetWaveform()

Original name: 1 'Waveform'

public AnalogGeneratorWaveform GetWaveform()

Returns

AnalogGeneratorWaveform

IsCorrectHandleType()

Determines whether the underlying module is of the correct type.

public bool IsCorrectHandleType()

Returns

bool

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 256) to column range (0 to 0x8000). Out of range values are clamped.

public 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 1024) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeDutyCycleEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeEvent(Note, byte?, byte?, Effect, ushort)

Creates a new generic pattern event with optional parameters for flexible event construction.

public PatternEvent MakeEvent(Note note = default, byte? velocity = null, byte? controller = null, Effect effect = Effect.None, ushort value = 0)

Parameters

note Note
Note value. Allows for explicit note commands.
velocity byte?
Note velocity. Returns null when default velocity is used. Automatically handles the +1 offset used in raw data.
controller byte?
Controller identifier (0-based). Returns null when no controller is specified. Module controllers: 0-126 (raw data: 1-127). MIDI controllers: 127+ (raw data: 0x80+). Automatically handles the +1 offset used in raw data.
effect Effect
Pattern event effect code.
value ushort
Parameter value for controller or effect (16-bit unsigned integer).

Range: 0-32768 (0x8000) for controllers, 0-65535 (0xFFFF) for effects.

For pitch commands: 0x0000 = highest pitch, 0x7800 = C0, 0x100 = one semitone.

Returns

PatternEvent

A new PatternEvent with the specified fields.

Remarks

This method provides maximum flexibility for creating events. For common scenarios, consider using specific factory methods like NoteEvent(Note, int?, byte?), ControllerEvent(int, byte, ushort), etc.

MakeExponentialEnvelopeEvent(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.

public PatternEvent MakeExponentialEnvelopeEvent(Toggle value)

Parameters

value Toggle

Returns

PatternEvent

MakeFilterAttackEvent(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.

public PatternEvent MakeFilterAttackEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeFilterEnvelopeEvent(AnalogGeneratorEnvelopeMode)

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.

public PatternEvent MakeFilterEnvelopeEvent(AnalogGeneratorEnvelopeMode value)

Parameters

value AnalogGeneratorEnvelopeMode

Returns

PatternEvent

MakeFilterEvent(AnalogGeneratorFilterType)

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.

public PatternEvent MakeFilterEvent(AnalogGeneratorFilterType value)

Parameters

value AnalogGeneratorFilterType

Returns

PatternEvent

MakeFilterExponentialFrequencyEvent(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.

public PatternEvent MakeFilterExponentialFrequencyEvent(Toggle value)

Parameters

value Toggle

Returns

PatternEvent

MakeFilterFrequencyEvent(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 14000) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeFilterFrequencyEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeFilterReleaseEvent(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.

public PatternEvent MakeFilterReleaseEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeFilterResonanceEvent(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 1530) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeFilterResonanceEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeModeEvent(Quality)

Quality mode of the module.

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.

public PatternEvent MakeModeEvent(Quality value)

Parameters

value Quality

Returns

PatternEvent

MakeNoiseEvent(int)

Amount of white noise added to the signal.

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.

public PatternEvent MakeNoiseEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeNoteEvent(Note, byte?)

Creates a note event that triggers a note on the specified module.

public PatternEvent MakeNoteEvent(Note note, byte? velocity = null)

Parameters

note Note
Note value. Allows for explicit note commands.
velocity byte?
Note velocity. Returns null when default velocity is used. Automatically handles the +1 offset used in raw data.

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.

public 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.

public 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 256) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeReleaseEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeSecondaryOscillatorModeEvent(AnalogGeneratorSecondaryOscillatorMode)

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.

public PatternEvent MakeSecondaryOscillatorModeEvent(AnalogGeneratorSecondaryOscillatorMode value)

Parameters

value AnalogGeneratorSecondaryOscillatorMode

Returns

PatternEvent

MakeSecondaryOscillatorPhaseEvent(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 32768) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeSecondaryOscillatorPhaseEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeSecondaryOscillatorPitchEvent(int)

Pitch deviation of the additional oscillator (off in the zero position). One semitone = 64.

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 (-1000 to 1000) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeSecondaryOscillatorPitchEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeSecondaryOscillatorVolumeEvent(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 32768) to column range (0 to 0x8000). Out of range values are clamped.

public PatternEvent MakeSecondaryOscillatorVolumeEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeSetControllerValueEvent(byte, ushort)

Creates a controller event that changes a module parameter.

public PatternEvent MakeSetControllerValueEvent(byte controllerId, ushort value)

Parameters

controllerId byte
value ushort
Parameter value for controller or effect (16-bit unsigned integer).

Range: 0-32768 (0x8000) for controllers, 0-65535 (0xFFFF) for effects.

For pitch commands: 0x0000 = highest pitch, 0x7800 = C0, 0x100 = one semitone.

Returns

PatternEvent

Remarks

For better type safety and readability, consider using typed module handles and extension methods.

MakeSetFrequencyEvent(double, byte?)

Creates a Set Pitch event by converting a frequency in Hz to the appropriate pitch value.

public PatternEvent MakeSetFrequencyEvent(double frequency, byte? velocity = null)

Parameters

frequency double

Frequency in Hz (e.g., 440.0 for A4).

velocity byte?

Velocity value (0-128). Use null for default velocity.

Returns

PatternEvent

A new PatternEvent with the calculated pitch value.

Examples

// Set pitch to A4 (440 Hz)
var a440 = PatternEvent.SetFrequencyEvent(0, 440.0, 100);
// Set pitch to middle C (261.63 Hz)
var c4 = PatternEvent.SetFrequencyEvent(0, 261.63);

MakeSetPitchEvent(ushort, byte?)

Creates a Set Pitch event with exact pitch value for microtonal or pitch-bend effects.

public PatternEvent MakeSetPitchEvent(ushort pitch, byte? velocity = null)

Parameters

pitch ushort

Pitch value where 0x0000 = highest pitch, 0x7800 = C0 (lowest), 0x100 = one semitone.

velocity byte?

Velocity value (0-128). Use null for default velocity.

Returns

PatternEvent

A new PatternEvent configured as a set pitch event.

Examples

// Set pitch to middle C (C4 = 0x3C00)
var middleC = PatternEvent.SetPitchEvent(0, 0x3C00);
// Set pitch to A4 (440Hz reference = 0x4500)
var a440 = PatternEvent.SetPitchEvent(0, 0x4500, 100);

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.

public 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.

public PatternEvent MakeVolumeEvent(int value)

Parameters

value int

Returns

PatternEvent

MakeWaveformEvent(AnalogGeneratorWaveform)

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.

public PatternEvent MakeWaveformEvent(AnalogGeneratorWaveform value)

Parameters

value AnalogGeneratorWaveform

Returns

PatternEvent

ReadCurveSynth(float[])

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

Read from curve 0 of AnalogGenerator.

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

Parameters

buffer float[]

Returns

int

ReadScope(AudioChannel, short[])

Read module scope view, and write it to a buffer.

public int ReadScope(AudioChannel channel, short[] buffer)

Parameters

channel AudioChannel

Audio channel.

buffer short[]

Buffer to receive scope data.

Returns

int

Number of samples successfully read.

Remarks

Exceptions

ArgumentNullException

Thrown if buffer is null.

SetAttack(int, ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 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.

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

Parameters

value int
valueScalingMode ValueScalingMode

SetColor(byte, byte, byte)

Set the module color.

public void SetColor(byte r, byte g, byte b)

Parameters

r byte

Red component (0 to 255).

g byte

Green component (0 to 255).

b byte

Blue component (0 to 255).

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

SetDutyCycle(int, ValueScalingMode)

Value range: displayed: 0 to 1024, real: 0 to 1024 Original name: 7 '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.

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

Parameters

value int
valueScalingMode ValueScalingMode

SetExponentialEnvelope(Toggle)

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

public void SetExponentialEnvelope(Toggle value)

Parameters

value Toggle

SetFilter(AnalogGeneratorFilterType)

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

public void SetFilter(AnalogGeneratorFilterType value)

Parameters

value AnalogGeneratorFilterType

SetFilterAttack(int, ValueScalingMode)

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

public void SetFilterAttack(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetFilterEnvelope(AnalogGeneratorEnvelopeMode)

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

public void SetFilterEnvelope(AnalogGeneratorEnvelopeMode value)

Parameters

value AnalogGeneratorEnvelopeMode

SetFilterExponentialFrequency(Toggle)

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

public void SetFilterExponentialFrequency(Toggle value)

Parameters

value Toggle

SetFilterFrequency(int, ValueScalingMode)

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

public void SetFilterFrequency(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetFilterRelease(int, ValueScalingMode)

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

public void SetFilterRelease(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetFilterResonance(int, ValueScalingMode)

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

public void SetFilterResonance(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetFineTune(FineTunePair)

Sets the fine tune for the module.

public void SetFineTune(FineTunePair fineTune)

Parameters

fineTune FineTunePair

SetMode(Quality)

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

public void SetMode(Quality value)

Parameters

value Quality

SetName(string)

Set the module name.

public void SetName(string name)

Parameters

name string

New module name.

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

ArgumentNullException

Thrown if name is null.

SetNoise(int, ValueScalingMode)

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

public void SetNoise(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

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.

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

Parameters

value int
valueScalingMode ValueScalingMode

SetPolyphony(int, ValueScalingMode)

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

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

Parameters

value int
valueScalingMode ValueScalingMode

SetPosition(int, int)

Set the module position.

public void SetPosition(int x, int y)

Parameters

x int

X coordinate (center: 512, working area: 0 to 1024).

y int

Y coordinate (center: 512, working area: 0 to 1024).

Remarks

Exceptions

SunVoxException

Thrown when the operation fails.

SetRelease(int, ValueScalingMode)

Value range: displayed: 0 to 256, real: 0 to 256 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.

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

Parameters

value int
valueScalingMode ValueScalingMode

SetSecondaryOscillatorMode(AnalogGeneratorSecondaryOscillatorMode)

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

public void SetSecondaryOscillatorMode(AnalogGeneratorSecondaryOscillatorMode value)

Parameters

value AnalogGeneratorSecondaryOscillatorMode

SetSecondaryOscillatorPhase(int, ValueScalingMode)

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

public void SetSecondaryOscillatorPhase(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetSecondaryOscillatorPitch(int, ValueScalingMode)

Pitch deviation of the additional oscillator (off in the zero position). One semitone = 64.
Value range: displayed: -1000 to 1000, real: 0 to 2000 Original name: 8 'Osc2' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.

public void SetSecondaryOscillatorPitch(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetSecondaryOscillatorVolume(int, ValueScalingMode)

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

public void SetSecondaryOscillatorVolume(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

value int
valueScalingMode ValueScalingMode

SetSustain(Toggle)

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

public 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.

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

Parameters

value int
valueScalingMode ValueScalingMode

SetWaveform(AnalogGeneratorWaveform)

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.

public void SetWaveform(AnalogGeneratorWaveform value)

Parameters

value AnalogGeneratorWaveform

WriteCurveSynth(float[])

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

Write to curve 0 of AnalogGenerator.

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

Parameters

buffer float[]

Returns

int

Operators

implicit operator SynthModuleHandle(AnalogGeneratorModuleHandle)

public static implicit operator SynthModuleHandle(AnalogGeneratorModuleHandle handle)

Parameters

handle AnalogGeneratorModuleHandle

Returns

SynthModuleHandle