![]() |
Deluge Firmware 1.3.0
Build date: 2026.11.28
|
#include <voice_note_locks.h>


Public Member Functions | |
| bool | takePending () |
| bool | giveSustain (Sound &sound, ParamManagerForTimeline *paramManager) const |
| bool | sourceEverActive (ModelStackWithSoundFlags *modelStack, int32_t s) const |
| bool | sourceActiveCurrently (Sound &sound, int32_t s, ParamManagerForTimeline *paramManager) const |
| Sound::isSourceActiveCurrently, with a lock on the source's volume in place of its knob value. | |
| bool | oscSyncCurrently (Sound &sound, ParamManagerForTimeline *paramManager) const |
| Sound::renderingOscillatorSyncCurrently, with a lock on osc B's volume in place of its knob value. | |
| bool | modulatorActive (Sound &sound, int32_t m, ParamManagerForTimeline *paramManager) const |
| The FM modulator's volume is above -inf, from a lock if there is one, else its knob value. | |
| bool | noiseEverActive (ParamManager *paramManager) const |
| The noise volume is ever above -inf, from its knob / automation or a lock. | |
| Public Member Functions inherited from deluge::note_locks::LockSet | |
| int32_t | size () const |
| bool | empty () const |
| bool | full () const |
| std::span< const uint8_t > | params () const |
| std::span< const int32_t > | values () const |
| uint64_t | mask () const |
| Bit p set if param p is locked. | |
| bool | has (int32_t param) const |
| bool | hasAnyOf (uint64_t paramMask) const |
| std::optional< int32_t > | get (int32_t param) const |
| The locked value of param, if it's locked. | |
| bool | set (int32_t param, int32_t value) |
| bool | remove (int32_t param) |
| False if param wasn't locked. | |
| bool | merge (const LockSet &other) |
| Sets each of other's locks, on top of these. False if any of them didn't fit. | |
| void | clear () |
| bool | operator== (const LockSet &other) const |
Static Public Member Functions | |
| static bool | pendingTurnsOnASource (Sound &sound) |
Public Attributes | |
| uint16_t | liveEditTag {0} |
| note_locks::LiveEdit::tag of the held pad whose uncommitted lock edits this voice was started with, else 0 | |
Static Public Attributes | |
| static constexpr uint64_t | kPan = deluge::note_locks::paramMask(deluge::modulation::params::LOCAL_PAN) |
| static constexpr uint64_t | kStereo |
| Sound::renderingVoicesInStereo only looks for stereo samples in the sources the knob values have on. | |
| static constexpr uint64_t | kLPF |
| static constexpr uint64_t | kHPF |
Private Member Functions | |
| bool | volumeLocked (int32_t param) const |
| bool | giveSustainLocked (Sound &sound, ParamManagerForTimeline *paramManager) const |
| bool | sourceEverActiveLocked (ModelStackWithSoundFlags *modelStack, int32_t s) const |
| bool | sourceActiveCurrentlyLocked (Sound &sound, int32_t s) const |
| bool | oscSyncCurrentlyLocked (Sound &sound) const |
| bool | modulatorActiveLocked (Sound &sound, int32_t m) const |
| bool | noiseEverActiveLocked () const |
Static Private Attributes | |
| static constexpr uint64_t | kEnvelope0Tail |
| static constexpr uint64_t | kOscBVolume |
| static constexpr uint64_t | kSourceVolumes |
| static constexpr uint64_t | kNoiseVolume |
The parameter locks of the note a Voice is playing: its own copy, taken at note-on (pool entries can move while the voice sounds). The Voice's patcher reads them in place of the locked params' knob values.
Sound's checks of whether a source / modulator / noise / osc sync / filter is on, or whether envelope 1 sustains, look at the knob values. A lock replaces the knob value for its note, so a Voice asks the versions here instead. Each is the Sound's own answer unless a lock is involved.
|
inlinenodiscard |
The locks give envelope 1 a sustain (they lock one of its sustain / decay / release, and with those values it sustains). Lets a note-off through on a sound whose own values have no tails.
|
staticnodiscard |
The note about to start (note_locks::pending) locks a source's or the noise's volume up from -inf, so it sounds even if the Sound's knob values have everything off
|
inlinenodiscard |
Sound::isSourceActiveEver (through the model stack's cache), or a lock turns the source's volume up. "Ever" stays true for a source the sound has on and a lock turns off: that only skips its rendering.
| bool VoiceNoteLocks::takePending | ( | ) |
Takes over the locks - or lack of them - of the note being started (note_locks::pending). True if this voice had or now has any, i.e. unless nothing changed.
|
inlinenodiscardprivate |
has(), for a volume param: they're all below 32, so this only reads the low word of the mask and skips a 64-bit variable shift - it's checked per voice per render
|
staticconstexprprivate |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexprprivate |
|
staticconstexpr |
Sound::renderingVoicesInStereo only looks for stereo samples in the sources the knob values have on.