|
|
@ -45,12 +45,16 @@ |
|
|
|
//* DEVICE SETTINGS
|
|
|
|
//* DEVICE SETTINGS
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
// MIDI
|
|
|
|
//*************************************************************************************************
|
|
|
|
|
|
|
|
//* MIDI HARDWARE SETTINGS
|
|
|
|
|
|
|
|
//*************************************************************************************************
|
|
|
|
//#define MIDI_DEVICE_DIN Serial1
|
|
|
|
//#define MIDI_DEVICE_DIN Serial1
|
|
|
|
#define MIDI_DEVICE_USB 1 |
|
|
|
#define MIDI_DEVICE_USB 1 |
|
|
|
#define MIDI_DEVICE_USB_HOST 1 |
|
|
|
#define MIDI_DEVICE_USB_HOST 1 |
|
|
|
|
|
|
|
|
|
|
|
// AUDIO
|
|
|
|
//*************************************************************************************************
|
|
|
|
|
|
|
|
//* AUDIO HARDWARE SETTINGS
|
|
|
|
|
|
|
|
//*************************************************************************************************
|
|
|
|
// If nothing is defined Teensy internal DAC is used as audio output device!
|
|
|
|
// If nothing is defined Teensy internal DAC is used as audio output device!
|
|
|
|
// Left and right channel audio signal is presented on pins A21 and A22.
|
|
|
|
// Left and right channel audio signal is presented on pins A21 and A22.
|
|
|
|
#define AUDIO_DEVICE_USB |
|
|
|
#define AUDIO_DEVICE_USB |
|
|
@ -62,9 +66,8 @@ |
|
|
|
#define PT8211_AUDIO |
|
|
|
#define PT8211_AUDIO |
|
|
|
|
|
|
|
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
//* MIDI SETTINGS
|
|
|
|
//* MIDI SOFTWARE SETTINGS
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI |
|
|
|
#define DEFAULT_MIDI_CHANNEL MIDI_CHANNEL_OMNI |
|
|
|
#define MIDI_MERGE_THRU 1 |
|
|
|
#define MIDI_MERGE_THRU 1 |
|
|
|
#define SYSEXBANK_DEFAULT 0 |
|
|
|
#define SYSEXBANK_DEFAULT 0 |
|
|
@ -83,7 +86,7 @@ |
|
|
|
//#define USE_REVERB 1
|
|
|
|
//#define USE_REVERB 1
|
|
|
|
|
|
|
|
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
//* AUDIO SETTINGS
|
|
|
|
//* AUDIO SOFTWARE SETTINGS
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
// https://rechneronline.de/funktionsgraphen/
|
|
|
|
// https://rechneronline.de/funktionsgraphen/
|
|
|
|
#ifndef TEENSY_AUDIO_BOARD |
|
|
|
#ifndef TEENSY_AUDIO_BOARD |
|
|
@ -142,7 +145,6 @@ |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#define CONTROL_RATE_MS 50 |
|
|
|
#define CONTROL_RATE_MS 50 |
|
|
|
|
|
|
|
|
|
|
|
#define BACK_FROM_VOLUME_MS 1000 |
|
|
|
#define BACK_FROM_VOLUME_MS 1000 |
|
|
|
|
|
|
|
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
@ -157,7 +159,6 @@ |
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
//* HARDWARE SETTINGS
|
|
|
|
//* HARDWARE SETTINGS
|
|
|
|
//*************************************************************************************************
|
|
|
|
//*************************************************************************************************
|
|
|
|
|
|
|
|
|
|
|
|
#if defined(__IMXRT1062__) //Teensy-4.0
|
|
|
|
#if defined(__IMXRT1062__) //Teensy-4.0
|
|
|
|
#define TEENSY4 |
|
|
|
#define TEENSY4 |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -249,9 +250,8 @@ |
|
|
|
|
|
|
|
|
|
|
|
// Some optimizations
|
|
|
|
// Some optimizations
|
|
|
|
#define USE_TEENSY_DSP 1 |
|
|
|
#define USE_TEENSY_DSP 1 |
|
|
|
#define SUM_UP_AS_INT 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* HELPER MACROS */ |
|
|
|
// HELPER MACROS
|
|
|
|
#define TIME_MS2SAMPLES(x) floor(uint32_t(x) * AUDIO_SAMPLE_RATE / 1000) |
|
|
|
#define TIME_MS2SAMPLES(x) floor(uint32_t(x) * AUDIO_SAMPLE_RATE / 1000) |
|
|
|
#define SAMPLES2TIME_MS(x) float(uint32_t(x) * 1000 / AUDIO_SAMPLE_RATE) |
|
|
|
#define SAMPLES2TIME_MS(x) float(uint32_t(x) * 1000 / AUDIO_SAMPLE_RATE) |
|
|
|
// Modulated delay options
|
|
|
|
// Modulated delay options
|
|
|
@ -368,12 +368,6 @@ struct config_t { |
|
|
|
uint8_t engine; |
|
|
|
uint8_t engine; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// struct for smoothing value changes
|
|
|
|
|
|
|
|
struct value_change_t { |
|
|
|
|
|
|
|
float diff; |
|
|
|
|
|
|
|
uint16_t steps; |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inline float mapfloat(float val, float in_min, float in_max, float out_min, float out_max) |
|
|
|
inline float mapfloat(float val, float in_min, float in_max, float out_min, float out_max) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; |
|
|
|
return (val - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; |
|
|
|