![]() |
Deluge Firmware 1.3.0
Build date: 2026.11.28
|
How a note's parameter locks (note_locks.h) get from the sequencer to the Voice that plays the note. More...
Classes | |
| class | FileReader |
| Reads a row's two attributes, which arrive one at a time. More... | |
| struct | LiveEdit |
| class | LiveEdits |
| The live-edit slots: one per clip-view edit pad press (kEditPadPressBufferSize), indexed like editPadPresses. More... | |
| class | LockSet |
| struct | NoteRef |
| What something that plays a note later (an arpeggiator) remembers of its locks. More... | |
| struct | Pending |
| class | PendingScope |
| Makes one note's locks pending for as long as it's in scope, then puts back what was pending before. More... | |
| class | Pool |
| The lock sets of every Note in one Song (or of the notes on the clipboard). Sets are only ever added. More... | |
Functions | |
| void | writeToFile (Serializer &writer, NoteVector ¬es, const Pool &pool) |
| Writes both attributes for a row's notes - or nothing, if none of them has locks. | |
| LockSet | currentLocks (const Pool &pool, NoteRef note) |
| bool | isLockableParam (int32_t param) |
| bool | locksSustain (const LockSet &locks) |
| template<typename... Params> | |
| constexpr uint64_t | paramMask (Params... params) |
| A bit per param, as LockSet::mask() has them. | |
Variables | |
| LiveEdits | liveEdits |
| Pending | pending |
| constexpr int32_t | kMaxLocksPerNote = 8 |
| Max locks on one note. | |
How a note's parameter locks (note_locks.h) get from the sequencer to the Voice that plays the note.
Parameter locks in the song file: two noteRow attributes, written after the row's note data. lockParams="lpfFrequency,volume" - the locked params' file names, in "column" order noteLocks="0x..." - per locked note: pos (8 hex), number of locks (2 hex), then per lock: column (2 hex) and value (8 hex, the param's preset value) Firmware that doesn't know these attributes skips them and plays the notes unlocked.
Per-note parameter locks ("p-locks").
A lock overrides one of a Sound's local (per-voice) patched params for the voice that one note plays: the lock value replaces the knob / automation ("preset") value, and patch cables still modulate on top of it, exactly as they would on the knob value.
Storage: a Note holds a 16-bit index (Note::lockSet, in what used to be padding, so Notes stay 24 bytes) into its Song's Pool. 0 means no locks. A pool entry is an immutable, deduplicated LockSet. Because entries are never mutated or freed while the Song lives, every way a Note gets duplicated - NoteVector clones, undo snapshots, clip cloning, note splitting, struct copies - just copies the index and stays valid. Editing a lock interns a new set and repoints the note - once per edit gesture (see note_lock_playback.h's LiveEdit), adding at most one small entry. Entries are reclaimed only when the Song is deleted and by a save / load (the song file only stores sets that notes reference); during a session the pool only grows, capped at 65534 sets.
Indices are only meaningful within the Song (or clipboard) pool they came from. Anything that carries notes between pools (the note clipboard) re-interns: to.intern(from.get(index)).
The locks a note plays with right now: what's pending if it is the pending note, else its committed set with its held pad's live edits on top. For keeping with a note that has to wait for its voice.
| bool deluge::note_locks::isLockableParam | ( | int32_t | param | ) |
True if param can be locked: a local patched param (deluge::modulation::params::Local, below FIRST_GLOBAL), i.e. one with a per-voice final value.
| bool deluge::note_locks::locksSustain | ( | const LockSet & | locks | ) |
True if locks lock envelope 1's sustain above its minimum. Such a note sustains even on a sound whose own envelope doesn't, so it gets a note tail (and a note-off) there regardless: the clip view lets you set its length and draws its tail, and the sequencer ends it there.