fix(voice): Trigger legato keys on held-stack depth, CC123 allNotesOff clears mono stack, voice-param edits rebuild from decoded PCM (no re-decode), mono sizes 1 shifter ring
This commit is contained in:
+13
-1
@@ -568,6 +568,14 @@ public:
|
||||
// the older tail to ring — matches hardware behavior). No-op if none match.
|
||||
void noteOff(int note);
|
||||
|
||||
// PANIC / MIDI All-Notes-Off (CC 123). Clears the MONO held stack and releases EVERY
|
||||
// active voice: Gate voices enter their release tail; Trigger one-shots ignore release
|
||||
// by design and play through their bounded play length (they can never be stuck). This
|
||||
// is the mono stack's ONLY reset path — a phantom entry left by a lost note-off would
|
||||
// otherwise be resurrected by the next fallback and sustain forever with no key held.
|
||||
// RT-safe (no allocation, bounded by maxVoices); callable from the audio thread.
|
||||
void allNotesOff();
|
||||
|
||||
// REAL-TIME render (S4): sums all active voices into the caller-provided buffer
|
||||
// `out[0..frameCount)`, ADDING to whatever is there (the caller clears or mixes —
|
||||
// this never touches memory it does not own and NEVER allocates). This is the
|
||||
@@ -619,7 +627,8 @@ private:
|
||||
struct HeldNote { std::uint8_t note; std::uint8_t velocity; };
|
||||
|
||||
// Mono note-on: push to the stack and take the voice over (legato retune on a same-sample
|
||||
// takeover, else a fresh start). Returns 0 (the mono voice) or kNoVoice for out-of-zone.
|
||||
// takeover, else a fresh start). Returns 0 (the mono voice) or kNoVoice for out-of-zone
|
||||
// or out-of-range (note outside [0,127] — rejected BEFORE the stack, which stores uint8).
|
||||
// The S16 Preserve cap is NOT applied in mono — a single voice runs at most one shifter,
|
||||
// inherently within any cap; applying it would wrongly drop a Preserve->Preserve takeover.
|
||||
std::size_t monoNoteOn(int note, int velocity);
|
||||
@@ -671,6 +680,9 @@ public:
|
||||
// Release the preview IF `note` is the one sounding (a stale off for a replaced note is a
|
||||
// no-op). Gate zones enter release; Trigger zones ignore note-off and play through.
|
||||
void noteOff(int note);
|
||||
// PANIC peer of VoiceEngine::allNotesOff: release the ringing preview UNCONDITIONALLY,
|
||||
// whatever note it is on. Gate enters release; Trigger plays through (bounded). RT-safe.
|
||||
void releaseAll();
|
||||
|
||||
bool active() const { return voice_.active(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user