Deluge Firmware 1.3.0
Build date: 2026.11.28
Loading...
Searching...
No Matches
note_lock_file.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 "model/note/note_locks.h"
21#include "modulation/params/param.h"
22#include <array>
23#include <cstdint>
24
25class Deserializer;
26class NoteVector;
27class Serializer;
28
34
35namespace deluge::note_locks {
36
38void writeToFile(Serializer& writer, NoteVector& notes, const Pool& pool);
39
42public:
44 void readParams(Deserializer& reader);
46 void readLocks(Deserializer& reader, NoteVector& notes, Pool& pool) const;
47
48private:
49 // An unknown name (from some future firmware) still takes its column, so later columns line up; its locks are
50 // dropped
51 static constexpr uint8_t kUnknownParam = 0xFF;
52 std::array<uint8_t, deluge::modulation::params::FIRST_GLOBAL> columnParams_{};
53 int32_t numColumns_{0};
54};
55
56} // namespace deluge::note_locks
Definition storage_manager.h:190
Definition note_vector.h:27
Definition storage_manager.h:124
Reads a row's two attributes, which arrive one at a time.
Definition note_lock_file.h:41
void readLocks(Deserializer &reader, NoteVector &notes, Pool &pool) const
The noteLocks attribute: gives notes (already read) their locks, interned in pool.
Definition note_lock_file.cpp:107
void readParams(Deserializer &reader)
The lockParams attribute.
Definition note_lock_file.cpp:88
The lock sets of every Note in one Song (or of the notes on the clipboard). Sets are only ever added.
Definition note_locks.h:113
How a note's parameter locks (note_locks.h) get from the sequencer to the Voice that plays the note.
Definition note_lock_editor.h:29
void writeToFile(Serializer &writer, NoteVector &notes, const Pool &pool)
Writes both attributes for a row's notes - or nothing, if none of them has locks.
Definition note_lock_file.cpp:31