|
|
|
/*
|
|
|
|
MicroDexed
|
|
|
|
|
|
|
|
MicroDexed is a port of the Dexed sound engine
|
|
|
|
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6/4.x/4.x with audio shield.
|
|
|
|
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
|
|
|
|
|
|
|
|
(c)2018-2023 H. Wirtz <wirtz@parasitstudio.de>
|
|
|
|
(c)2021-2022 H. Wirtz <wirtz@parasitstudio.de>, M. Koslowski <positionhigh@gmx.de>
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software Foundation,
|
|
|
|
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*************************************************
|
|
|
|
MIDI note values
|
|
|
|
*************************************************/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#define MIDI_C0 12
|
|
|
|
#define MIDI_CIS0 13
|
|
|
|
#define MIDI_D0 14
|
|
|
|
#define MIDI_DIS0 15
|
|
|
|
#define MIDI_E0 16
|
|
|
|
#define MIDI_F0 17
|
|
|
|
#define MIDI_FIS0 18
|
|
|
|
#define MIDI_G0 19
|
|
|
|
#define MIDI_GIS0 20
|
|
|
|
#define MIDI_A0 21
|
|
|
|
#define MIDI_AIS0 22
|
|
|
|
#define MIDI_B0 23
|
|
|
|
#define MIDI_C1 24
|
|
|
|
#define MIDI_CIS1 25
|
|
|
|
#define MIDI_D1 26
|
|
|
|
#define MIDI_DIS1 27
|
|
|
|
#define MIDI_E1 28
|
|
|
|
#define MIDI_F1 29
|
|
|
|
#define MIDI_FIS1 30
|
|
|
|
#define MIDI_G1 31
|
|
|
|
#define MIDI_GIS1 32
|
|
|
|
#define MIDI_A1 33
|
|
|
|
#define MIDI_AIS1 34
|
|
|
|
#define MIDI_B1 35
|
|
|
|
#define MIDI_C2 36
|
|
|
|
#define MIDI_CIS2 37
|
|
|
|
#define MIDI_D2 38
|
|
|
|
#define MIDI_DIS2 39
|
|
|
|
#define MIDI_E2 40
|
|
|
|
#define MIDI_F2 41
|
|
|
|
#define MIDI_FIS2 42
|
|
|
|
#define MIDI_G2 43
|
|
|
|
#define MIDI_GIS2 44
|
|
|
|
#define MIDI_A2 45
|
|
|
|
#define MIDI_AIS2 46
|
|
|
|
#define MIDI_B2 47
|
|
|
|
#define MIDI_C3 48
|
|
|
|
#define MIDI_CIS3 49
|
|
|
|
#define MIDI_D3 50
|
|
|
|
#define MIDI_DIS3 51
|
|
|
|
#define MIDI_E3 52
|
|
|
|
#define MIDI_F3 53
|
|
|
|
#define MIDI_FIS3 54
|
|
|
|
#define MIDI_G3 55
|
|
|
|
#define MIDI_GIS3 56
|
|
|
|
#define MIDI_A3 57
|
|
|
|
#define MIDI_AIS3 58
|
|
|
|
#define MIDI_B3 59
|
|
|
|
#define MIDI_C4 60
|
|
|
|
#define MIDI_CIS4 61
|
|
|
|
#define MIDI_D4 62
|
|
|
|
#define MIDI_DIS4 63
|
|
|
|
#define MIDI_E4 64
|
|
|
|
#define MIDI_F4 65
|
|
|
|
#define MIDI_FIS4 66
|
|
|
|
#define MIDI_G4 67
|
|
|
|
#define MIDI_GIS4 68
|
|
|
|
#define MIDI_A4 69
|
|
|
|
#define MIDI_AIS4 70
|
|
|
|
#define MIDI_B4 71
|
|
|
|
#define MIDI_C5 72
|
|
|
|
#define MIDI_CIS5 73
|
|
|
|
#define MIDI_D5 74
|
|
|
|
#define MIDI_DIS5 75
|
|
|
|
#define MIDI_E5 76
|
|
|
|
#define MIDI_F5 77
|
|
|
|
#define MIDI_FIS5 78
|
|
|
|
#define MIDI_G5 79
|
|
|
|
#define MIDI_GIS5 80
|
|
|
|
#define MIDI_A5 81
|
|
|
|
#define MIDI_AIS5 82
|
|
|
|
#define MIDI_B5 83
|
|
|
|
#define MIDI_C6 84
|
|
|
|
#define MIDI_CIS6 85
|
|
|
|
#define MIDI_D6 86
|
|
|
|
#define MIDI_DIS6 87
|
|
|
|
#define MIDI_E6 88
|
|
|
|
#define MIDI_F6 89
|
|
|
|
#define MIDI_FIS6 90
|
|
|
|
#define MIDI_G6 91
|
|
|
|
#define MIDI_GIS6 92
|
|
|
|
#define MIDI_A6 93
|
|
|
|
#define MIDI_AIS6 94
|
|
|
|
#define MIDI_B6 95
|
|
|
|
#define MIDI_C7 96
|
|
|
|
#define MIDI_CIS7 97
|
|
|
|
#define MIDI_D7 98
|
|
|
|
#define MIDI_DIS7 99
|
|
|
|
#define MIDI_E7 100
|
|
|
|
#define MIDI_F7 101
|
|
|
|
#define MIDI_FIS7 102
|
|
|
|
#define MIDI_G7 103
|
|
|
|
#define MIDI_GIS7 104
|
|
|
|
#define MIDI_A7 105
|
|
|
|
#define MIDI_AIS7 106
|
|
|
|
#define MIDI_B7 107
|
|
|
|
#define MIDI_C8 108
|