Synthesizer class
An instance of the SoundFont synthesizer. Note: that this class does not provide thread safety. If you want to send notes and render the waveform in separate threads, you must ensure that the methods will not be called simultaneously.
- Available extensions
Constructors
-
Synthesizer({required SoundFont soundFont, required int sampleRate, required int blockSize, required int maximumPolyphony, required int minimumVoiceDuration, required double masterVolume, required Map<
int, Preset> presetLookup, required Preset defaultPreset, required List<double> blockLeft, required List<double> blockRight, required double inverseBlockSize, required int blockRead, required bool enableReverbAndChorus, required Reverb? reverb, required List<double> ? reverbInput, required List<double> ? reverbOutputLeft, required List<double> ? reverbOutputRight, required Chorus? chorus, required List<double> ? chorusInputLeft, required List<double> ? chorusInputRight, required List<double> ? chorusOutputLeft, required List<double> ? chorusOutputRight}) - Synthesizer.load(SoundFont soundFont, SynthesizerSettings settings)
-
factory
- Synthesizer.loadByteData(ByteData data, [SynthesizerSettings? settings])
-
factory
- Synthesizer.loadPath(String soundFontPath, [SynthesizerSettings? settings])
-
factory
Properties
- blockSize → int
-
final
-
channels
↔ List<
Channel> -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- masterVolume ↔ double
-
getter/setter pair
- maximumPolyphony → int
-
final
- minimumVoiceDuration → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sampleRate → int
-
final
- soundFont → SoundFont
-
final
Methods
-
activeVoiceCount(
) → int -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
noteOff(
{required int channel, required int key}) → void -
noteOffAll(
{int? channel, bool immediate = false}) → void - Stops all the notes. immediate: stop immediately without the release sound.
-
noteOn(
{required int channel, required int key, required int velocity}) → void -
processMidiMessage(
{required int channel, required int command, required int data1, required int data2}) → void -
render(
List< double> left, List<double> right) → void -
reset(
) → void - Resets the synthesizer.
-
resetAllControllers(
{int? channel}) → void -
selectPreset(
{required int channel, required int preset}) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- channelCount → const int
- percussionChannel → const int