parent
ed76eaeece
commit
e8f37a99be
@ -1,9 +1,22 @@ |
||||
void setup() { |
||||
// put your setup code here, to run once:
|
||||
#include "mdaEPianoData.h" |
||||
|
||||
void setup() { |
||||
Serial.begin(38400); |
||||
delay(500); |
||||
Serial.println("START"); |
||||
Serial.println(sizeof(epianoData),DEC); |
||||
uint32_t i; |
||||
|
||||
for(i=0;i<sizeof(epianoData)/sizeof(uint16_t); i++) |
||||
{ |
||||
Serial.print(i,DEC); |
||||
Serial.print(F(" ")); |
||||
Serial.println(epianoData[i], DEC); |
||||
} |
||||
} |
||||
|
||||
void loop() { |
||||
// put your main code here, to run repeatedly:
|
||||
Serial.println("LOOP"); |
||||
delay(10000); |
||||
|
||||
} |
||||
|
@ -0,0 +1,78 @@ |
||||
/*
|
||||
MicroMDAEpiano |
||||
|
||||
MicroMDAEpiano is a port of the MDAEpiano sound engine |
||||
(http://mda.smartelectronix.com/synths.htm) for the Teensy-3.5/3.6 with audio
|
||||
shield.
|
||||
|
||||
(c)2018 H. Wirtz <wirtz@parasitstudio.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 |
||||
|
||||
*/ |
||||
|
||||
#include "midinotes.h" |
||||
|
||||
// ATTENTION! For better latency you have to redefine AUDIO_BLOCK_SAMPLES from
|
||||
// 128 to 64 in <ARDUINO-IDE-DIR>/cores/teensy3/AudioStream.h
|
||||
|
||||
// Initial values
|
||||
#define USE_ONBOARD_USB_HOST 1 |
||||
#define TEENSY_AUDIO_BOARD 1 |
||||
#define VOLUME 0.6 |
||||
#define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI |
||||
#define AUDIO_MEM 2 |
||||
#define SAMPLE_RATE 44100 |
||||
|
||||
#if !defined(__MK66FX1M0__) // check for Teensy-3.6
|
||||
#define MAX_NOTES 11 // No?
|
||||
#undef USE_ONBOARD_USB_HOST |
||||
#else |
||||
#define MAX_NOTES 16 // Yes
|
||||
#endif |
||||
|
||||
// Debug output
|
||||
#define SERIAL_SPEED 38400 |
||||
#define DEBUG 1 |
||||
#define SHOW_MIDI_EVENT 1 |
||||
#define SHOW_XRUN 1 |
||||
#define SHOW_CPU_LOAD_MSEC 5000 |
||||
|
||||
// Use these with the Teensy Audio Shield
|
||||
//#define SDCARD_CS_PIN 10
|
||||
//#define SDCARD_MOSI_PIN 7
|
||||
//#define SDCARD_SCK_PIN 14
|
||||
// Use these with the Teensy 3.5 & 3.6 SD card
|
||||
#define SDCARD_CS_PIN BUILTIN_SDCARD |
||||
#define SDCARD_MOSI_PIN 11 // not actually used
|
||||
#define SDCARD_SCK_PIN 13 // not actually used
|
||||
|
||||
// Encoder with button
|
||||
#define ENC1_PIN_A 14 |
||||
#define ENC1_PIN_B 15 |
||||
#define BUT1_PIN 16 |
||||
#define INITIAL_ENC1_VALUE 0 |
||||
|
||||
// EEPROM address
|
||||
#define EEPROM_OFFSET 0 |
||||
#define EEPROM_DATA_LENGTH 5 |
||||
|
||||
#define EEPROM_CRC32_ADDR EEPROM.length()-sizeof(uint32_t) |
||||
#define EEPROM_BANK_ADDR 0 |
||||
#define EEPROM_VOICE_ADDR 1 |
||||
#define EEPROM_MASTER_VOLUME_ADDR 2 |
||||
#define EEPROM_VOLUME_RIGHT_ADDR 3 |
||||
#define EEPROM_VOLUME_LEFT_ADDR 4 |
||||
|
@ -0,0 +1,97 @@ |
||||
/*************************************************
|
||||
* MIDI note values |
||||
*************************************************/ |
||||
|
||||
#ifndef _MIDINOTES_H |
||||
#define _MIDINOTES_H |
||||
|
||||
#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 |
||||
|
||||
#endif |
Loading…
Reference in new issue