Deluge Firmware
1.3.0
Build date: 2026.08.22
Toggle main menu visibility
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 <cstdint>
23
24
class
Note :
public
Positionable {
25
public
:
26
Note();
27
28
inline
void
setLength(int32_t newLength) { length = newLength; }
29
30
inline
int32_t getLength() {
return
length; }
31
32
inline
void
setVelocity(int32_t newVelocity) { velocity = newVelocity; }
33
34
inline
int32_t getVelocity() {
return
velocity; }
35
36
inline
void
setLift(int32_t newLift) {
lift
= newLift; }
37
38
inline
int32_t getLift() {
return
lift
; }
39
40
inline
void
setProbability(int32_t newProbability) { probability = newProbability; }
41
42
inline
int32_t getProbability() {
return
probability; }
43
44
inline
void
setIterance(
Iterance
newIterance) { iterance = newIterance; }
45
46
inline
Iterance
getIterance() {
return
iterance; }
47
48
inline
void
setFill(int32_t newFill) { fill = newFill; }
49
50
inline
int32_t getFill() {
return
fill; }
51
52
inline
bool
isDrone(int32_t effectiveLength) {
return
(pos == 0 && length == effectiveLength); }
53
54
// void writeToFile();
55
int32_t length;
56
uint8_t velocity;
57
uint8_t probability;
58
Iterance
iterance;
59
uint8_t fill;
61
uint8_t
lift
;
62
63
// Understanding the probability field: the first bit says whether it's based on a previous one.
64
// So take the rightmost 7 bits. If that's greater than kNumProbabilityValues (20),
65
};
Note::lift
uint8_t lift
Lift is noteOff velocity.
Definition
note.h:61
Iterance
Definition
iterance.h:23