Table of Contents

Interface ISamplerModuleHandle

Namespace
SunSharp.Modules
Assembly
SunSharp.dll

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

valueScalingMode ValueScalingMode

Returns

int

GetEnvelopeInterpolation()

Original name: 3 'Envelope interpolation'

SamplerEnvelopeInterpolation GetEnvelopeInterpolation()

Returns

SamplerEnvelopeInterpolation

GetPanning(ValueScalingMode)

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

int GetPanning(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetPolyphony(ValueScalingMode)

Original name: 4 'Polyphony'

int GetPolyphony(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

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

valueScalingMode ValueScalingMode

Returns

int

GetRecord()

Original name: 7 'Record'

SamplerRecordState GetRecord()

Returns

SamplerRecordState

GetRelease(ValueScalingMode)

Value range: displayed: 0 to 32768, real: 0 to 32768 Original name: 10 'Release'

int GetRelease(ValueScalingMode valueScalingMode = ValueScalingMode.Displayed)

Parameters

valueScalingMode ValueScalingMode

Returns

int

GetReverse()

Original name: 8 'Reverse'

Toggle GetReverse()

Returns

Toggle

GetSampleInterpolation()

Original name: 2 'Sample interpolation'

SamplerInterpolation GetSampleInterpolation()

Returns

SamplerInterpolation

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

valueScalingMode ValueScalingMode

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

valueScalingMode ValueScalingMode

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

data byte[]

Byte array with sample data.

sampleSlot int?

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 data is null.

LoadSample(string, int?)

Load a sample (xi, wav, aiff) to a Sampler module from file.

void LoadSample(string path, int? sampleSlot = null)

Parameters

path string

File path (relative or absolute).

sampleSlot int?

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 path is 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

value int

Returns

PatternEvent

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

value SamplerEnvelopeInterpolation

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

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

value int

Returns

PatternEvent

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

value SamplerRecordState

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

PatternEvent MakeReleaseEvent(int value)

Parameters

value int

Returns

PatternEvent

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

value Toggle

Returns

PatternEvent

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

value SamplerInterpolation

Returns

PatternEvent

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

value int

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

PatternEvent MakeVolumeEvent(int value)

Parameters

value int

Returns

PatternEvent

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

value int
valueScalingMode ValueScalingMode

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

value SamplerEnvelopeInterpolation

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

value int
valueScalingMode ValueScalingMode

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

value int
valueScalingMode ValueScalingMode

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

value int
valueScalingMode ValueScalingMode

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

value SamplerRecordState

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

value int
valueScalingMode ValueScalingMode

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

value Toggle

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

value SamplerInterpolation

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

value int
valueScalingMode ValueScalingMode

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

value int
valueScalingMode ValueScalingMode