Deluge Firmware
1.3.0
Build date: 2026.11.28
Toggle main menu visibility
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
25
class
Deserializer
;
26
class
NoteVector
;
27
class
Serializer
;
28
34
35
namespace
deluge::note_locks
{
36
38
void
writeToFile
(Serializer& writer, NoteVector& notes,
const
Pool
& pool);
39
41
class
FileReader
{
42
public
:
44
void
readParams
(
Deserializer
& reader);
46
void
readLocks
(
Deserializer
& reader,
NoteVector
& notes,
Pool
& pool)
const
;
47
48
private
:
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
Deserializer
Definition
storage_manager.h:190
NoteVector
Definition
note_vector.h:27
Serializer
Definition
storage_manager.h:124
deluge::note_locks::FileReader
Reads a row's two attributes, which arrive one at a time.
Definition
note_lock_file.h:41
deluge::note_locks::FileReader::readLocks
void readLocks(Deserializer &reader, NoteVector ¬es, Pool &pool) const
The noteLocks attribute: gives notes (already read) their locks, interned in pool.
Definition
note_lock_file.cpp:107
deluge::note_locks::FileReader::readParams
void readParams(Deserializer &reader)
The lockParams attribute.
Definition
note_lock_file.cpp:88
deluge::note_locks::Pool
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
deluge::note_locks
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
deluge::note_locks::writeToFile
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.
Definition
note_lock_file.cpp:31