Struct FmModuleHandle
Frequency Modulation (FM) Synthesizer. Each voice of polyphony includes two operators with ADSR envelopes: 1) C (carrier) - base sine wave generator; 2) M (modulator) - sine wave that changes the frequency of the first operator. The sound quality of this module is better at a sample rate of 44100Hz.
public readonly struct FmModuleHandle : IFmModuleHandle, ITypedModuleHandle, IGenericSynthModuleHandle
- Implements
Constructors
FmModuleHandle(SynthModuleHandle)
public FmModuleHandle(SynthModuleHandle moduleHandle)
Parameters
moduleHandleSynthModuleHandle
Properties
Id
Gets the ID of the synthesizer module.
public int Id { get; }
Property Value
- int
ModuleHandle
public SynthModuleHandle ModuleHandle { get; }
Property Value
Slot
Gets the slot associated with this instance.
public ISlot Slot { get; }
Property Value
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
targetModuleSynthModuleHandle
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_connect_module(int, int, int).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
targetModuleSynthModuleHandle
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_connect_module(int, int, int).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
targetModuleSynthModuleHandle
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_connect_module(int, int, int).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
targetModuleSynthModuleHandle
Remarks
Requires LockSlot(int) / UnlockSlot(int).
Calls sv_connect_module(int, int, int).Exceptions
- SunVoxException
Thrown when the operation fails.
GetCarrierAttack(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 6 'C.Attack'
public int GetCarrierAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetCarrierDecay(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 7 'C.Decay'
public int GetCarrierDecay(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetCarrierFrequencyRatio(ValueScalingMode)
Value range: displayed: 0 to 16, real: 0 to 16 Original name: 3 'C.Freq ratio'
public int GetCarrierFrequencyRatio(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetCarrierRelease(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 9 'C.Release'
public int GetCarrierRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetCarrierSustain(ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 8 'C.Sustain'
public int GetCarrierSustain(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetCarrierVolume(ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 0 'C.Volume'
public int GetCarrierVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
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
GetExists()
Check if a module exists.
public bool GetExists()
Returns
- bool
true if module exists.
Remarks
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()
Original name: 16 'Mode'
public Quality GetMode()
Returns
GetModulatorAttack(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 10 'M.Attack'
public int GetModulatorAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorDecay(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 11 'M.Decay'
public int GetModulatorDecay(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorFrequencyRatio(ValueScalingMode)
Value range: displayed: 0 to 16, real: 0 to 16 Original name: 4 'M.Freq ratio'
public int GetModulatorFrequencyRatio(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorRelease(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 13 'M.Release'
public int GetModulatorRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorScalingPerKey(ValueScalingMode)
Value range: displayed: 0 to 4, real: 0 to 4 Original name: 14 'M.Scaling per key'
public int GetModulatorScalingPerKey(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorSelfModulation(ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 5 'M.Self-modulation'
public int GetModulatorSelfModulation(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorSustain(ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 12 'M.Sustain'
public int GetModulatorSustain(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetModulatorVolume(ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 1 'M.Volume'
public int GetModulatorVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
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
GetName()
Get the module name.
public string? GetName()
Returns
- string
Module name, or null if unavailable.
Remarks
Calls sv_get_module_name(int, 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
valueScalingModeValueScalingMode
Returns
- int
GetPolyphony(ValueScalingMode)
Original name: 15 'Polyphony'
public int GetPolyphony(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
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
Calls sv_get_module_xy(int, int).
IsCorrectHandleType()
Determines whether the underlying module is of the correct type.
public bool IsCorrectHandleType()
Returns
- bool
MakeCarrierAttackEvent(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.
public PatternEvent MakeCarrierAttackEvent(int value)
Parameters
valueint
Returns
MakeCarrierDecayEvent(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.
public PatternEvent MakeCarrierDecayEvent(int value)
Parameters
valueint
Returns
MakeCarrierFrequencyRatioEvent(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 16) to column range (0 to 0x8000). Out of range values are clamped.
public PatternEvent MakeCarrierFrequencyRatioEvent(int value)
Parameters
valueint
Returns
MakeCarrierReleaseEvent(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.
public PatternEvent MakeCarrierReleaseEvent(int value)
Parameters
valueint
Returns
MakeCarrierSustainEvent(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 MakeCarrierSustainEvent(int value)
Parameters
valueint
Returns
MakeCarrierVolumeEvent(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 MakeCarrierVolumeEvent(int value)
Parameters
valueint
Returns
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
noteNoteNote value. Allows for explicit note commands. velocitybyte?Note velocity. Returns null when default velocity is used. Automatically handles the +1 offset used in raw data. controllerbyte?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. effectEffectPattern event effect code. valueushortParameter 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.
MakeModeEvent(Quality)
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
valueQuality
Returns
MakeModulatorAttackEvent(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.
public PatternEvent MakeModulatorAttackEvent(int value)
Parameters
valueint
Returns
MakeModulatorDecayEvent(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.
public PatternEvent MakeModulatorDecayEvent(int value)
Parameters
valueint
Returns
MakeModulatorFrequencyRatioEvent(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 16) to column range (0 to 0x8000). Out of range values are clamped.
public PatternEvent MakeModulatorFrequencyRatioEvent(int value)
Parameters
valueint
Returns
MakeModulatorReleaseEvent(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.
public PatternEvent MakeModulatorReleaseEvent(int value)
Parameters
valueint
Returns
MakeModulatorScalingPerKeyEvent(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 4) to column range (0 to 0x8000). Out of range values are clamped.
public PatternEvent MakeModulatorScalingPerKeyEvent(int value)
Parameters
valueint
Returns
MakeModulatorSelfModulationEvent(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 MakeModulatorSelfModulationEvent(int value)
Parameters
valueint
Returns
MakeModulatorSustainEvent(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 MakeModulatorSustainEvent(int value)
Parameters
valueint
Returns
MakeModulatorVolumeEvent(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 MakeModulatorVolumeEvent(int value)
Parameters
valueint
Returns
MakeNoteEvent(Note, byte?)
Creates a note event that triggers a note on the specified module.
public PatternEvent MakeNoteEvent(Note note, byte? velocity = null)
Parameters
noteNoteNote value. Allows for explicit note commands. velocitybyte?Note velocity. Returns null when default velocity is used. Automatically handles the +1 offset used in raw data.
Returns
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
valueint
Returns
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
valueint
Returns
MakeSetControllerValueEvent(byte, ushort)
Creates a controller event that changes a module parameter.
public PatternEvent MakeSetControllerValueEvent(byte controllerId, ushort value)
Parameters
controllerIdbytevalueushortParameter 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
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
frequencydoubleFrequency in Hz (e.g., 440.0 for A4).
velocitybyte?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
pitchushortPitch value where 0x0000 = highest pitch, 0x7800 = C0 (lowest), 0x100 = one semitone.
velocitybyte?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);
ReadScope(AudioChannel, short[])
Read module scope view, and write it to a buffer.
public int ReadScope(AudioChannel channel, short[] buffer)
Parameters
channelAudioChannelAudio channel.
buffershort[]Buffer to receive scope data.
Returns
- int
Number of samples successfully read.
Remarks
Exceptions
- ArgumentNullException
Thrown if
bufferis null.
SetCarrierAttack(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 6 'C.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 SetCarrierAttack(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetCarrierDecay(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 7 'C.Decay' 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 SetCarrierDecay(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetCarrierFrequencyRatio(int, ValueScalingMode)
Value range: displayed: 0 to 16, real: 0 to 16 Original name: 3 'C.Freq ratio' 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 SetCarrierFrequencyRatio(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetCarrierRelease(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 9 'C.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 SetCarrierRelease(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetCarrierSustain(int, ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 8 'C.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 SetCarrierSustain(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetCarrierVolume(int, ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 0 'C.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 SetCarrierVolume(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetColor(byte, byte, byte)
Set the module color.
public void SetColor(byte r, byte g, byte b)
Parameters
rbyteRed component (0 to 255).
gbyteGreen component (0 to 255).
bbyteBlue component (0 to 255).
Remarks
Exceptions
- SunVoxException
Thrown when the operation fails.
SetFineTune(FineTunePair)
Sets the fine tune for the module.
public void SetFineTune(FineTunePair fineTune)
Parameters
fineTuneFineTunePair
SetMode(Quality)
Original name: 16 '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
valueQuality
SetModulatorAttack(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 10 'M.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 SetModulatorAttack(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorDecay(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 11 'M.Decay' 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 SetModulatorDecay(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorFrequencyRatio(int, ValueScalingMode)
Value range: displayed: 0 to 16, real: 0 to 16 Original name: 4 'M.Freq ratio' 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 SetModulatorFrequencyRatio(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorRelease(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 13 'M.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 SetModulatorRelease(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorScalingPerKey(int, ValueScalingMode)
Value range: displayed: 0 to 4, real: 0 to 4 Original name: 14 'M.Scaling per key' 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 SetModulatorScalingPerKey(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorSelfModulation(int, ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 5 'M.Self-modulation' 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 SetModulatorSelfModulation(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorSustain(int, ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 12 'M.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 SetModulatorSustain(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetModulatorVolume(int, ValueScalingMode)
Value range: displayed: 0 to 256, real: 0 to 256 Original name: 1 'M.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 SetModulatorVolume(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetName(string)
Set the module name.
public void SetName(string name)
Parameters
namestringNew module name.
Remarks
Exceptions
- SunVoxException
Thrown when the operation fails.
- ArgumentNullException
Thrown if
nameis null.
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
valueintvalueScalingModeValueScalingMode
SetPolyphony(int, ValueScalingMode)
Original name: 15 '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
valueintvalueScalingModeValueScalingMode
SetPosition(int, int)
Set the module position.
public void SetPosition(int x, int y)
Parameters
xintX coordinate (center: 512, working area: 0 to 1024).
yintY coordinate (center: 512, working area: 0 to 1024).
Remarks
Exceptions
- SunVoxException
Thrown when the operation fails.
Operators
implicit operator SynthModuleHandle(FmModuleHandle)
public static implicit operator SynthModuleHandle(FmModuleHandle handle)
Parameters
handleFmModuleHandle