Deluge Firmware 1.3.0
Build date: 2026.11.22
Loading...
Searching...
No Matches
deferred_note_ons.h
1/*
2 * Copyright © 2026 Synthstrom Audible Limited
3 *
4 * This file is part of The Synthstrom Audible Deluge Firmware.
5 *
6 * The Synthstrom Audible Deluge Firmware is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software Foundation,
8 * either version 3 of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
11 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * See the GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along with this program.
15 * If not, see <https://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#include <cstdint>
21
22class InstrumentClip;
24class NoteRow;
25class Sound;
26struct PendingNoteOn;
27
51namespace DeferredNoteOns {
52
54struct VoiceStart {
55 int32_t noteCodePreArp;
56 int32_t noteCodePostArp;
57 int32_t velocity;
58 int16_t const* mpeValues;
59 uint32_t sampleSyncLength;
60 int32_t ticksLate;
61 uint32_t samplesLate;
62 int32_t fromMIDIChannel;
64};
65
68void startVoice(ModelStackWithSoundFlags* modelStack, Sound& sound, VoiceStart const& start);
69
72bool tryDefer(InstrumentClip* clip, PendingNoteOn const& note);
73
75void sendWhatCanStart();
76
78void forgetNoteRow(NoteRow const* noteRow);
79
81void forgetClip(InstrumentClip const* clip);
82
84void forgetNoteOff(Sound const* sound, int32_t noteCodePostArp);
85
87void forgetSound(Sound const* sound);
88
90void forgetSequenced();
91
92} // namespace DeferredNoteOns
Definition instrument_clip.h:48
Definition model_stack.h:282
Definition note_row.h:99
Definition sound.h:78
Definition deferred_note_ons.cpp:35
void forgetSequenced()
Playback stopped: sequenced notes still waiting mustn't start (voice starts from auditioning or MIDI ...
Definition deferred_note_ons.cpp:376
void forgetClip(InstrumentClip const *clip)
The Clip is going away.
Definition deferred_note_ons.cpp:358
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.
Definition deferred_note_ons.cpp:372
void startVoice(ModelStackWithSoundFlags *modelStack, Sound &sound, VoiceStart const &start)
Definition deferred_note_ons.cpp:288
void forgetNoteOff(Sound const *sound, int32_t noteCodePostArp)
A note-off for this post-arpeggiator note code (or all notes) reached the Sound.
Definition deferred_note_ons.cpp:362
void sendWhatCanStart()
Start what can start in this render. Call once per render, after the song tick and before rendering.
Definition deferred_note_ons.cpp:336
void forgetNoteRow(NoteRow const *noteRow)
The NoteRow's sequenced note is being stopped, or the NoteRow is going away.
Definition deferred_note_ons.cpp:354
bool tryDefer(InstrumentClip *clip, PendingNoteOn const &note)
Definition deferred_note_ons.cpp:311
A voice start that a Sound has decided on: the arguments of Sound::noteOnPostArpeggiator().
Definition deferred_note_ons.h:54
bool invertReversed
The arpeggiator's reverse flip for this note, see Sound::invertReversed.
Definition deferred_note_ons.h:63
Definition note_row.h:72