Deluge Firmware 1.3.0
Build date: 2025.04.16
Loading...
Searching...
No Matches
lookuptables.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 "gui/l10n/strings.h"
21#include "model/iterance/iterance.h"
22#include <array>
23#include <cstdint>
24
25extern const uint16_t centAdjustTableSmall[];
26extern const uint16_t decayTableSmall4[];
27extern const uint16_t decayTableSmall8[];
28extern const uint16_t expTableSmall[];
29extern const int16_t tanHSmall[];
30extern const int16_t tanH2d[][129];
31extern const int16_t hanningWindow[];
32
33extern const int16_t sineWaveSmall[];
34
35extern const int16_t triangleWaveAntiAliasing1[];
36extern const int16_t triangleWaveAntiAliasing3[];
37extern const int16_t triangleWaveAntiAliasing5[];
38extern const int16_t triangleWaveAntiAliasing7[];
39extern const int16_t triangleWaveAntiAliasing9[];
40extern const int16_t triangleWaveAntiAliasing15[];
41extern const int16_t triangleWaveAntiAliasing21[];
42extern const int16_t triangleWaveAntiAliasing31[];
43
44extern const int16_t sawWave1[];
45extern const int16_t sawWave3[];
46extern const int16_t sawWave5[];
47extern const int16_t sawWave7[];
48extern const int16_t sawWave9[];
49extern const int16_t sawWave13[];
50extern const int16_t sawWave19[];
51extern const int16_t sawWave27[];
52extern const int16_t sawWave39[];
53extern const int16_t sawWave53[];
54extern const int16_t sawWave76[];
55extern const int16_t sawWave109[];
56extern const int16_t sawWave153[];
57extern const int16_t sawWave215[];
58
59extern const int16_t squareWave1[];
60extern const int16_t squareWave3[];
61extern const int16_t squareWave5[];
62extern const int16_t squareWave7[];
63extern const int16_t squareWave9[];
64extern const int16_t squareWave13[];
65extern const int16_t squareWave19[];
66extern const int16_t squareWave27[];
67extern const int16_t squareWave39[];
68extern const int16_t squareWave53[];
69extern const int16_t squareWave76[];
70extern const int16_t squareWave109[];
71extern const int16_t squareWave153[];
72extern const int16_t squareWave215[];
73
74extern const int16_t mysterySynthASaw_153[];
75extern const int16_t mysterySynthASaw_215[];
76extern const int16_t mysterySynthASaw_305[];
77extern const int16_t mysterySynthASaw_431[];
78extern const int16_t mysterySynthASaw_609[];
79extern const int16_t mysterySynthASaw_861[];
80extern const int16_t mysterySynthASaw_1217[];
81extern const int16_t mysterySynthASaw_1722[];
82
83extern const int16_t mysterySynthBSaw_1[];
84extern const int16_t mysterySynthBSaw_3[];
85extern const int16_t mysterySynthBSaw_5[];
86extern const int16_t mysterySynthBSaw_7[];
87extern const int16_t mysterySynthBSaw_9[];
88extern const int16_t mysterySynthBSaw_13[];
89extern const int16_t mysterySynthBSaw_19[];
90extern const int16_t mysterySynthBSaw_27[];
91extern const int16_t mysterySynthBSaw_39[];
92extern const int16_t mysterySynthBSaw_53[];
93extern const int16_t mysterySynthBSaw_76[];
94extern const int16_t mysterySynthBSaw_109[];
95
96extern const int16_t analogSquare_1[];
97extern const int16_t analogSquare_3[];
98extern const int16_t analogSquare_5[];
99extern const int16_t analogSquare_7[];
100extern const int16_t analogSquare_9[];
101extern const int16_t analogSquare_13[];
102extern const int16_t analogSquare_19[];
103extern const int16_t analogSquare_27[];
104extern const int16_t analogSquare_39[];
105extern const int16_t analogSquare_53[];
106extern const int16_t analogSquare_76[];
107extern const int16_t analogSquare_109[];
108extern const int16_t analogSquare_153[];
109extern const int16_t analogSquare_215[];
110extern const int16_t analogSquare_305[];
111extern const int16_t analogSquare_431[];
112extern const int16_t analogSquare_609[];
113extern const int16_t analogSquare_861[];
114extern const int16_t analogSquare_1217[];
115extern const int16_t analogSquare_1722[];
116
117// Begins at E (4 semitones above C). So that this octave contains the largest values (phase increments) possible
118// without going over 22.05kHz (2147483648), even when shifted up a semitone (via osc-cents and unison combined)
119extern const int32_t noteFrequencyTable[12];
120extern const int32_t noteIntervalTable[12];
121extern const int32_t timeStretchAdjustTable[193];
122extern const int32_t attackRateTable[51];
123extern const int32_t releaseRateTable[51];
124extern const int32_t releaseRateTable64[65];
125extern const int32_t tanTable[65];
126extern const int16_t oldResonanceCompensation[];
127
128#define NUM_PRESET_REVERBS 3
129const uint8_t presetReverbRoomSize[NUM_PRESET_REVERBS] = {16, 30, 44};
130const uint8_t presetReverbDamping[NUM_PRESET_REVERBS] = {29, 36, 45};
131extern deluge::l10n::String presetReverbNames[NUM_PRESET_REVERBS];
132
133extern const uint8_t noteCodeToNoteLetter[];
134extern const bool noteCodeIsSharp[];
135
136extern const std::array<Iterance, 35> iterancePresets;
137
138#define MAX_CHORD_TYPES 9
139#define MAX_CHORD_NOTES 4
140extern uint8_t chordTypeSemitoneOffsets[MAX_CHORD_TYPES][MAX_CHORD_NOTES];
141extern uint8_t chordTypeNoteCount[MAX_CHORD_TYPES];
142extern const std::array<deluge::l10n::String, MAX_CHORD_TYPES> chordNames;