![]() |
Deluge Firmware 1.3.0
Build date: 2026.11.22
|
Classes | |
| struct | VoiceStart |
| A voice start that a Sound has decided on: the arguments of Sound::noteOnPostArpeggiator(). More... | |
Functions | |
| void | startVoice (ModelStackWithSoundFlags *modelStack, Sound &sound, VoiceStart const &start) |
| bool | tryDefer (InstrumentClip *clip, PendingNoteOn const ¬e) |
| void | sendWhatCanStart () |
| Start what can start in this render. Call once per render, after the song tick and before rendering. | |
| void | forgetNoteRow (NoteRow const *noteRow) |
| The NoteRow's sequenced note is being stopped, or the NoteRow is going away. | |
| void | forgetClip (InstrumentClip const *clip) |
| The Clip is going away. | |
| void | forgetNoteOff (Sound const *sound, int32_t noteCodePostArp) |
| A note-off for this post-arpeggiator note code (or all notes) reached the Sound. | |
| void | forgetSound (Sound const *sound) |
| Nothing queued for this Sound may start any more: all its notes are cut, choked, or it's going away. | |
| void | forgetSequenced () |
| Playback stopped: sequenced notes still waiting mustn't start (voice starts from auditioning or MIDI input stay). | |
Note-ons that can't start a voice in the current render, held until one that can.
A voice start is expensive, so voices only start while the time they take fits in the current render (AudioEngine::wouldRefuseVoiceStart()), and a big chord's notes may start over several renders. Every voice start a Sound makes goes through startVoice(): it starts now if this render still may, and otherwise it's queued here. Once per render, after the song tick and before the song renders, sendWhatCanStart() starts as many queued notes as that render may, oldest first. A queued note always starts at the start of a render, and never before a note queued earlier for the same Sound.
There are two kinds of entry:
A queued note is dropped when its note ends (note-off for that note, the NoteRow's note stopping, all-notes-off, choke) or anything it refers to goes away (Sound, Clip, NoteRow, or playback stopping for a sequenced note), so it never starts late for a note that has already finished.
| void DeferredNoteOns::startVoice | ( | ModelStackWithSoundFlags * | modelStack, |
| Sound & | sound, | ||
| VoiceStart const & | start ) |
| bool DeferredNoteOns::tryDefer | ( | InstrumentClip * | clip, |
| PendingNoteOn const & | note ) |
Called by the song tick instead of sending a sequenced note-on to its Output. Returns whether the note was queued; if not, send it as usual