Class NoiseSampleProvider
This sample provider generates samples for a pseudo-random noise with pitch. The same input always results in the same output.
Implements
Inherited Members
Namespace: InsaneScatterbrain.RetroKit.Editor
Syntax
public class NoiseSampleProvider : SampleProviderBase, ISampleProvider
Properties
Name
Declaration
public override string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Overrides
Methods
GetSample(Int32, Int32)
Generates samples based on the given sample and tone indices.
Declaration
protected override float GetSample(int toneIndex, int sampleIndex)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | toneIndex | The index of the tone in a sequence. |
System.Int32 | sampleIndex | The index of the sample within a tone. |
Returns
Type | Description |
---|---|
System.Single | The sample. |
Overrides
GetSamples(Single, Single, Single, Int32)
Returns samples generated by the sample provider, based on the given pitch, duration, volume and tone index.
Declaration
public override float[] GetSamples(float pitch, float volume, float duration, int toneIndex = 0)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pitch | The pitch in Hertz. |
System.Single | volume | The volume. Where 0 is 0% and 1 is 100%. |
System.Single | duration | The length in seconds if the samples are played. |
System.Int32 | toneIndex | The index of the tone in a sequence of tones. |
Returns
Type | Description |
---|---|
System.Single[] | The samples. |