Generator class final
A generator for waveforms and noise.
Properties
- availableFloatCount → int
-
Gets the number of available frames in the generator's buffer.
no setter
- engine → Engine
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isGenerating → bool
-
no setter
- isInit → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- volume ↔ double
-
getter/setter pair
Methods
-
dispose(
) → void - Disposes of the generator resources.
-
getBuffer(
int floatsToRead) → Float32List - Reads generated data.
-
init(
{SoundFormat format = SoundFormat.f32, int channels = 1, int sampleRate = 44100, double bufferLenS = 5}) → Future< void> - Initializes the generator.
-
initEngine(
[int periodMs = 10]) → Future - Initializes the generator's engine.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setNoise(
{GeneratorNoiseType type = GeneratorNoiseType.white, int seed = 0, double amplitude = 0.5}) → void - Sets the noise type, seed, and amplitude.
-
setPulsewave(
{double frequency = 440.0, double amplitude = 0.5, double dutyCycle = 0.5}) → void - Sets the pulse wave frequency, amplitude, and duty cycle.
-
setWaveform(
{GeneratorWaveformType type = GeneratorWaveformType.sine, double frequency = 440.0, double amplitude = 0.5}) → void - Sets the waveform type, frequency, and amplitude.
-
start(
) → void - Starts the generator.
-
stop(
) → void - Stops the generator.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited