Interface ISamplerModuleHandle
Sampler can play and record audio files. Supported file formats: WAV (PCM, uncompressed), AIFF (PCM, uncompressed), XI, OGG (Vorbis), MP3, FLAC, JPEG, RAW.
public interface ISamplerModuleHandle : ITypedModuleHandle, IGenericSynthModuleHandle
- Inherited Members
Methods
GetAttack(ValueScalingMode)
Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 9 'Attack'
int GetAttack(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetEnvelopeInterpolation()
Original name: 3 'Envelope interpolation'
SamplerEnvelopeInterpolation GetEnvelopeInterpolation()
Returns
GetPanning(ValueScalingMode)
Value range: displayed: -128 to 128, real: 0 to 256 Original name: 1 'Panning'
int GetPanning(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetPolyphony(ValueScalingMode)
Original name: 4 'Polyphony'
int GetPolyphony(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetRecThreshold(ValueScalingMode)
Value range: displayed: 0 to 10000, real: 0 to 10000 Original name: 5 'Rec threshold'
int GetRecThreshold(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetRecord()
Original name: 7 'Record'
SamplerRecordState GetRecord()
Returns
GetRelease(ValueScalingMode)
Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 10 'Release'
int GetRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetReverse()
Original name: 8 'Reverse'
Toggle GetReverse()
Returns
GetSampleInterpolation()
Original name: 2 'Sample interpolation'
SamplerInterpolation GetSampleInterpolation()
Returns
GetTickLengthNorm128(ValueScalingMode)
Value range: displayed: 0 to 2048, real: 0 to 2048 Original name: 6 'Tick length (norm=128)'
int GetTickLengthNorm128(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
GetVolume(ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 Original name: 0 'Volume'
int GetVolume(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueScalingModeValueScalingMode
Returns
- int
LoadSample(byte[], int?)
Load a sample (xi, wav, aiff) to a Sampler module from memory.
void LoadSample(byte[] data, int? sampleSlot = null)
Parameters
databyte[]Byte array with sample data.
sampleSlotint?Sample slot number (-1 for auto/all slots).
Remarks
Set sampleSlot to null to apply the sample to all sample slots.
Exceptions
- SunVoxException
Thrown when the operation fails.
- ArgumentNullException
Thrown if
datais null.
LoadSample(string, int?)
Load a sample (xi, wav, aiff) to a Sampler module from file.
void LoadSample(string path, int? sampleSlot = null)
Parameters
pathstringFile path (relative or absolute).
sampleSlotint?Sample slot number (-1 for auto/all slots).
Remarks
Set sampleSlot to null to apply the sample to all sample slots.
Exceptions
- SunVoxException
Thrown when the operation fails.
- ArgumentNullException
Thrown if
pathis null.
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 32768) to column range (0 to 0x8000). Out of range values are clamped.
PatternEvent MakeAttackEvent(int value)
Parameters
valueint
Returns
MakeEnvelopeInterpolationEvent(SamplerEnvelopeInterpolation)
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 MakeEnvelopeInterpolationEvent(SamplerEnvelopeInterpolation value)
Parameters
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.
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.
PatternEvent MakePolyphonyEvent(int value)
Parameters
valueint
Returns
MakeRecThresholdEvent(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 10000) to column range (0 to 0x8000). Out of range values are clamped.
PatternEvent MakeRecThresholdEvent(int value)
Parameters
valueint
Returns
MakeRecordEvent(SamplerRecordState)
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 MakeRecordEvent(SamplerRecordState value)
Parameters
valueSamplerRecordState
Returns
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 32768) to column range (0 to 0x8000). Out of range values are clamped.
PatternEvent MakeReleaseEvent(int value)
Parameters
valueint
Returns
MakeReverseEvent(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 MakeReverseEvent(Toggle value)
Parameters
valueToggle
Returns
MakeSampleInterpolationEvent(SamplerInterpolation)
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 MakeSampleInterpolationEvent(SamplerInterpolation value)
Parameters
valueSamplerInterpolation
Returns
MakeTickLengthNorm128Event(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 2048) to column range (0 to 0x8000). Out of range values are clamped.
PatternEvent MakeTickLengthNorm128Event(int value)
Parameters
valueint
Returns
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 512) to column range (0 to 0x8000). Out of range values are clamped.
PatternEvent MakeVolumeEvent(int value)
Parameters
valueint
Returns
SetAttack(int, ValueScalingMode)
Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 9 '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
valueintvalueScalingModeValueScalingMode
SetEnvelopeInterpolation(SamplerEnvelopeInterpolation)
Original name: 3 'Envelope interpolation' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetEnvelopeInterpolation(SamplerEnvelopeInterpolation value)
Parameters
SetPanning(int, ValueScalingMode)
Value range: displayed: -128 to 128, real: 0 to 256 Original name: 1 '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
valueintvalueScalingModeValueScalingMode
SetPolyphony(int, ValueScalingMode)
Original name: 4 '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
valueintvalueScalingModeValueScalingMode
SetRecThreshold(int, ValueScalingMode)
Value range: displayed: 0 to 10000, real: 0 to 10000 Original name: 5 'Rec threshold' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetRecThreshold(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetRecord(SamplerRecordState)
Original name: 7 'Record' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetRecord(SamplerRecordState value)
Parameters
valueSamplerRecordState
SetRelease(int, ValueScalingMode)
Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 10 '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
valueintvalueScalingModeValueScalingMode
SetReverse(Toggle)
Original name: 8 'Reverse' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetReverse(Toggle value)
Parameters
valueToggle
SetSampleInterpolation(SamplerInterpolation)
Original name: 2 'Sample interpolation' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetSampleInterpolation(SamplerInterpolation value)
Parameters
valueSamplerInterpolation
SetTickLengthNorm128(int, ValueScalingMode)
Value range: displayed: 0 to 2048, real: 0 to 2048 Original name: 6 'Tick length (norm=128)' Note: equivalent SendEvent(int, PatternEvent) will be used internally, which may introduce latency. It will also be affected by the event timestamp set.
void SetTickLengthNorm128(int value, ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)
Parameters
valueintvalueScalingModeValueScalingMode
SetVolume(int, ValueScalingMode)
Value range: displayed: 0 to 512, real: 0 to 512 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
valueintvalueScalingModeValueScalingMode