noteOffAll method
Stops all the notes. immediate: stop immediately without the release sound.
Implementation
void noteOffAll({int? channel, bool immediate = false}) {
if (immediate) {
for (Voice voice in _voices) {
if (channel == null || voice.channel() == channel) {
voice.kill();
}
}
} else {
for (Voice voice in _voices) {
if (channel == null || voice.channel() == channel) {
voice.end();
}
}
}
}