Deluge Firmware 1.3.0
Build date: 2026.09.26
Loading...
Searching...
No Matches
engine.h
1/*
2 * Copyright © 2015-2024 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 "EngineMkI.h"
21#include "definitions_cxx.hpp"
22#include "dx7note.h"
23#include <gsl/gsl>
24
25class DxEngine {
26public:
27 DxEngine() = default;
28#define EXP2_LG_N_SAMPLES 10
29#define EXP2_N_SAMPLES (1 << EXP2_LG_N_SAMPLES)
30 int32_t exp2tab[EXP2_N_SAMPLES << 1];
31
32#define TANH_LG_N_SAMPLES 10
33#define TANH_N_SAMPLES (1 << TANH_LG_N_SAMPLES)
34 int32_t tanhtab[TANH_N_SAMPLES << 1];
35
36// Use twice as much RAM for the LUT but avoid a little computation
37#define SIN_DELTA
38
39#define SIN_LG_N_SAMPLES 10
40#define SIN_N_SAMPLES (1 << SIN_LG_N_SAMPLES)
41#ifdef SIN_DELTA
42 int32_t sintab[SIN_N_SAMPLES << 1];
43#else
44 int32_t sintab[SIN_N_SAMPLES + 1];
45#endif
46
47#define FREQ_LG_N_SAMPLES 10
48#define FREQ_N_SAMPLES (1 << FREQ_LG_N_SAMPLES)
49 int32_t freq_lut[FREQ_N_SAMPLES + 1];
50
51 EngineMkI engineMkI;
52 FmCore engineModern;
53
54 static gsl::owner<DxVoice*> solicitDxVoice();
55 static void dxVoiceUnassigned(gsl::owner<DxVoice*> dxVoice);
56 DxPatch* newPatch();
57};
58
59extern DxEngine* dxEngine;
60
61DxEngine* getDxEngine();
Definition engine.h:25
Definition dx7note.h:38
Definition EngineMkI.h:24
Definition fm_core.h:52