Added compiler option USE_XFADE_DATA for choosing which sample data to use.

chorus
Holger Wirtz 6 years ago
parent 0167c9acc7
commit eb809ac6ce
  1. 5
      MicroMDAEPiano.ino
  2. 1
      config.h
  3. 7
      mdaEPiano.cpp
  4. 2
      mdaEPianoData.h
  5. 2
      mdaEPianoDataXfade.h

@ -30,8 +30,11 @@
#include <EEPROM.h>
#include <limits.h>
#include "mdaEPiano.h"
//#include "mdaEPianoData.h"
#ifdef USE_XFADE_DATA
#include "mdaEPianoDataXfade.h"
#else
#include "mdaEPianoData.h"
#endif
#if defined(USBCON)
#include <midi_UsbTransport.h>
#endif

@ -37,6 +37,7 @@
#define AUDIO_MEM 300
#define SAMPLE_RATE 44100
#define REDUCE_LOUDNESS 0
#define USE_XFADE_DATA 1
#if !defined(__MK66FX1M0__) // check for Teensy-3.6
#undef USE_ONBOARD_USB_HOST

@ -1,10 +1,13 @@
#include "config.h"
#ifdef USE_XFADE_DATA
#include "mdaEPianoDataXfade.h"
#else
#include "mdaEPianoData.h"
#endif
#include "mdaEPiano.h"
#include <stdio.h>
#include <math.h>
#include "config.h"
mdaEPiano::mdaEPiano() // mdaEPiano::mdaEPiano(audioMasterCallback audioMaster) : AudioEffectX(audioMaster, NPROGS, NPARAMS)
{

@ -1,3 +1,4 @@
#ifndef USE_XFADE_DATA
#include <Arduino.h>
const int16_t epianoData[] PROGMEM = {
@ -21123,3 +21124,4 @@ const int16_t epianoData[] PROGMEM = {
-1302,-3296,-4700,-5297,-5021,-3939,-2233,-189,1899,3696,4890,5299,4788,3436,1466,-757,-2846,-4450,-5294,-5248,
-4377,-2810,-829,1280,3190,4588,5216,4960,3821,0,1,1,0,-1,0,0,0,0
};
#endif

@ -1,3 +1,4 @@
#ifdef USE_XFADE_DATA
#include <Arduino.h>
const int16_t epianoDataXfade[] PROGMEM = {
@ -21123,3 +21124,4 @@ const int16_t epianoDataXfade[] PROGMEM = {
-1302,-3296,-4700,-5297,-5021,-3939,-2233,-189,1899,3696,4890,5299,4788,3436,1466,-757,-2846,-4450,-5294,-5248,
-4377,-2810,-829,1280,3190,4588,5216,4960,3821,0,1,1,0,-1,0,0,0,0,
};
#endif

Loading…
Cancel
Save