Struct WaveTableOscillator
- Namespace
- SpessaSharp.Synthesizer.Engine.Voice
- Assembly
- SpessaSharp.dll
Plays back raw audio data at an arbitrary playback rate
public struct WaveTableOscillator
- Inherited Members
Constructors
WaveTableOscillator()
Plays back raw audio data at an arbitrary playback rate
public WaveTableOscillator()
Fields
Cursor
The current cursor of the sample.
public float Cursor
Field Value
End
End position of the sample. Exclusive.
public int End
Field Value
IsLooping
Is the loop on?
public bool IsLooping
Field Value
LoopEnd
End position of the loop. Exclusive.
public int LoopEnd
Field Value
LoopStart
Start position of the loop. Inclusive.
public int LoopStart
Field Value
PlaybackStep
Playback step (rate) for sample pitch correction.
public float PlaybackStep
Field Value
SampleData
Sample data of the voice.
public ArraySegment<float>? SampleData
Field Value
Type
The interpolation type used.
public Synthesizer.InterpolationType Type
Field Value
Methods
Process(int, float, Span<float>)
Fills the output buffer with raw sample data using a given interpolation.
public bool Process(int sampleCount, float tuningRatio, Span<float> outputBuffer)
Parameters
sampleCountintThe amount of samples to write into the buffer.
tuningRatiofloatThe tuning ratio to apply.
outputBufferSpan<float>The output buffer to write to.
Returns
ProcessHermite(int, float, Span<float>)
public bool ProcessHermite(int sampleCount, float tuningRatio, Span<float> outputBuffer)
Parameters
Returns
ProcessLinear(int, float, Span<float>)
public bool ProcessLinear(int sampleCount, float tuningRatio, Span<float> outputBuffer)
Parameters
Returns
ProcessNearest(int, float, Span<float>)
public bool ProcessNearest(int sampleCount, float tuningRatio, Span<float> outputBuffer)