Deluge Firmware 1.3.0
Build date: 2026.11.28
Loading...
Searching...
No Matches
note.h
1/*
2 * Copyright © 2014-2023 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/iterance/iterance.h"
21#include "model/positionable.h"
22#include "model/scale/anchor_marker.h"
23#include <cstdint>
24
25class Note : public Positionable {
26public:
27 Note();
28
29 inline void setLength(int32_t newLength) { length = newLength; }
30
31 inline int32_t getLength() { return length; }
32
33 inline void setVelocity(int32_t newVelocity) { velocity = newVelocity; }
34
35 inline int32_t getVelocity() { return velocity; }
36
37 inline void setLift(int32_t newLift) { lift = newLift; }
38
39 inline int32_t getLift() { return lift; }
40
41 inline void setProbability(int32_t newProbability) { probability = newProbability; }
42
43 inline int32_t getProbability() { return probability; }
44
45 inline void setIterance(Iterance newIterance) { iterance = newIterance; }
46
47 inline Iterance getIterance() { return iterance; }
48
49 inline void setFill(int32_t newFill) { fill = newFill; }
50
51 inline int32_t getFill() { return fill; }
52
53 inline bool isDrone(int32_t effectiveLength) { return (pos == 0 && length == effectiveLength); }
54
55 inline void setLockSet(uint16_t newLockSet) { lockSet = newLockSet; }
56
57 inline uint16_t getLockSet() { return lockSet; }
58
59 // void writeToFile();
60 int32_t length;
61 uint8_t velocity;
62 uint8_t probability;
66 uint16_t lockSet;
67 Iterance iterance;
68 uint8_t fill;
70 uint8_t lift;
77
78 // Understanding the probability field: the first bit says whether it's based on a previous one.
79 // So take the rightmost 7 bits. If that's greater than kNumProbabilityValues (20),
80};
Definition anchor_marker.h:23
AnchorMarker anchorMarker
Definition note.h:76
uint16_t lockSet
Definition note.h:66
uint8_t lift
Lift is noteOff velocity.
Definition note.h:70
Definition iterance.h:26