diff --git a/MicroDexed.ino b/MicroDexed.ino index 48894d8..faf8ab3 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -386,11 +386,8 @@ void setup() { setup_debug_message(); #endif #if defined(MIDI_DEVICE_USB_HOST_SERIAL) - display.clear(); - display.setCursor(0, 0); - display.print(F("WAIT FOR USBHOST")); display.setCursor(0, 1); - display.print(F("DEVICE")); + display.print(F("WAIT FOR USBHOST")); Serial.println(F("Waiting for MIDI devices on USB-Host...")); #endif @@ -684,8 +681,6 @@ void setup() { Serial.println(F("")); #endif - //ep_modchorus.set_bypass(true); - strlcpy(configuration.performance.name, "INIT Perf", sizeof(configuration.performance.name)); LCDML.OTHER_jumpToFunc(UI_func_voice_select); } @@ -805,7 +800,7 @@ void loop() { /****************************************************************************** MIDI HELPER ******************************************************************************/ -bool checkMidiChannel(byte inChannel, uint8_t instance_id) { +bool checkMidiChannel(uint8_t inChannel, uint8_t instance_id) { // check for MIDI channel if (configuration.dexed[instance_id].midi_channel == MIDI_CHANNEL_OMNI) { return (true); @@ -843,7 +838,7 @@ void init_MIDI_send_CC(void) { /****************************************************************************** MIDI MESSAGE HANDLER ******************************************************************************/ -void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) { +void handleNoteOn(uint8_t inChannel, uint8_t inNumber, uint8_t inVelocity) { // // MIDI learn mode // @@ -988,7 +983,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) { #endif } -void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity) { +void handleNoteOff(uint8_t inChannel, uint8_t inNumber, uint8_t inVelocity) { // // MIDI learn mode // @@ -1039,7 +1034,7 @@ void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity) { } } -void handleControlChange(byte inChannel, byte inCtrl, byte inValue) { +void handleControlChange(uint8_t inChannel, uint8_t inCtrl, uint8_t inValue) { inCtrl = constrain(inCtrl, 0, 127); inValue = constrain(inValue, 0, 127); @@ -1247,7 +1242,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue) { } } -void handleAfterTouch(byte inChannel, byte inPressure) { +void handleAfterTouch(uint8_t inChannel, uint8_t inPressure) { for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { if (checkMidiChannel(inChannel, instance_id)) { MicroDexed[instance_id]->setAftertouch(inPressure); @@ -1256,7 +1251,7 @@ void handleAfterTouch(byte inChannel, byte inPressure) { } } -void handlePitchBend(byte inChannel, int inPitch) { +void handlePitchBend(uint8_t inChannel, int inPitch) { for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { if (checkMidiChannel(inChannel, instance_id)) { MicroDexed[instance_id]->setPitchbend(uint16_t(inPitch)); @@ -1264,7 +1259,7 @@ void handlePitchBend(byte inChannel, int inPitch) { } } -void handleProgramChange(byte inChannel, byte inProgram) { +void handleProgramChange(uint8_t inChannel, uint8_t inProgram) { for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { if (checkMidiChannel(inChannel, instance_id)) { configuration.dexed[instance_id].voice = constrain(inProgram, 0, MAX_VOICES - 1); @@ -1326,7 +1321,7 @@ void handleSystemExclusive(byte* sysex, unsigned int len) { switch (sysex_return) { case -1: #ifdef DEBUG - Serial.println(F("E: SysEx end status byte not detected.")); + Serial.println(F("E: SysEx end status uint8_t not detected.")); #endif break; case -2: @@ -1591,15 +1586,15 @@ void handleSystemExclusive(byte* sysex, unsigned int len) { } } -void handleTimeCodeQuarterFrame(byte data) { +void handleTimeCodeQuarterFrame(uint8_t data) { ; } -void handleAfterTouchPoly(byte inChannel, byte inNumber, byte inVelocity) { +void handleAfterTouchPoly(uint8_t inChannel, uint8_t inNumber, uint8_t inVelocity) { ; } -void handleSongSelect(byte inSong) { +void handleSongSelect(uint8_t inSong) { ; } diff --git a/UI.hpp b/UI.hpp index 43b1567..f33cef7 100644 --- a/UI.hpp +++ b/UI.hpp @@ -6438,8 +6438,8 @@ void display_bar_float(const char* title, float value, float factor, int32_t min display.setCursor(LCD_cols - size, 1); display_float(value * factor, size_number, size_fraction, zeros, false, sign); // does not work with "Smallest code" optimizer /* char s[LCD_cols + 1]; - snprintf_P(s, sizeof(s), PSTR("%+1.1f"), value * factor); // not so good solution, but works with optimizer - display.print(s); */ + snprintf_P(s, sizeof(s), PSTR("%+1.1f"), value * factor); // not so good solution, but works with optimizer + display.print(s); */ // Bar display.setCursor(0, 1); @@ -6490,8 +6490,8 @@ void display_meter_float(const char* title, float value, float factor, float off display.setCursor(LCD_cols - size, 1); display_float((value + offset) * factor, size_number, size_fraction, zeros, false, sign); // does not work with "Smallest code" optimizer /* char s[LCD_cols + 1]; - snprintf_P(s, sizeof(s), PSTR("%+1.1f"), (value + offset) * factor); // not so good solution, but works with optimizer - display.print(s); */ + snprintf_P(s, sizeof(s), PSTR("%+1.1f"), (value + offset) * factor); // not so good solution, but works with optimizer + display.print(s); */ // Bar display.setCursor(0, 1); diff --git a/config.h b/config.h index 3cd89f5..eabbe24 100644 --- a/config.h +++ b/config.h @@ -60,7 +60,7 @@ // // Information about memory layout, etc.: https://www.pjrc.com/store/teensy41.html -#define VERSION "1.2.10" +#define VERSION "1.2.11" //************************************************************************************************* //* DEVICE SETTINGS @@ -71,8 +71,8 @@ //************************************************************************************************* #define MIDI_DEVICE_DIN Serial1 #define MIDI_DEVICE_USB 1 -//#define MIDI_DEVICE_USB_HOST 1 -#define MIDI_DEVICE_USB_HOST_SERIAL 1 +#define MIDI_DEVICE_USB_HOST 1 +//#define MIDI_DEVICE_USB_HOST_SERIAL 1 #ifdef MIDI_DEVICE_USB_HOST_SERIAL #define NUM_HUBS_MIDI_DEVICE_USB_HOST_SERIAL 4 // 0..4 - needed, if you want to connect a USB-HUB with up to 4 devices to the USB-HOST port @@ -132,7 +132,8 @@ // CHORUS parameters #define MOD_DELAY_SAMPLE_BUFFER int32_t(TIME_MS2SAMPLES(15.0)) // 15.0 ms delay buffer. #define MOD_WAVEFORM WAVEFORM_TRIANGLE // WAVEFORM_SINE WAVEFORM_TRIANGLE WAVEFORM_SAWTOOTH WAVEFORM_SAWTOOTH_REVERSE -#define MOD_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT +//#define MOD_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT +#define MOD_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT #define MOD_FILTER_CUTOFF_HZ 2000 // SGTL5000 @@ -146,6 +147,7 @@ #define USE_DELAY_8M 1 #if defined(USE_DELAY_8M) #define DELAY_MAX_TIME 9990 +#define MOD_FILTER_OUTPUT_TIME 9990 #else #define DELAY_MAX_TIME 500 #endif @@ -158,7 +160,7 @@ #ifdef USE_DELAY_8M #define AUDIO_MEM 36 + 14 // Delay in EXTMEM #else -#define AUDIO_MEM 36 + 14 + SAMPLE_RATE* NUM_DEXED* DELAY_MAX_TIME / 128000 // Delay in AUDIO_MEM +#define AUDIO_MEM 36 + 14 + SAMPLE_RATE * NUM_DEXED * DELAY_MAX_TIME / 128000 // Delay in AUDIO_MEM #endif #ifdef TEENSY_AUDIO_BOARD diff --git a/delay b/delay new file mode 100644 index 0000000..e69de29 diff --git a/midi_devices.hpp b/midi_devices.hpp index 06cf6cd..d7f0454 100644 --- a/midi_devices.hpp +++ b/midi_devices.hpp @@ -1090,11 +1090,8 @@ FLASHMEM void setup_midi_devices(void) { #endif #ifdef MIDI_DEVICE_USB_HOST_SERIAL - Serial.println("1"); usb_host.begin(); - Serial.println("2"); userial.begin(USB_HOST_SERIAL_BAUD, USB_HOST_SERIAL_FORMAT); - Serial.println("3"); usbhost_midi_serial.setHandleNoteOn(handleNoteOn_MIDI_DEVICE_USB_HOST_SERIAL); usbhost_midi_serial.setHandleNoteOff(handleNoteOff_MIDI_DEVICE_USB_HOST_SERIAL); usbhost_midi_serial.setHandleControlChange(handleControlChange_MIDI_DEVICE_USB_HOST_SERIAL); @@ -1114,7 +1111,6 @@ FLASHMEM void setup_midi_devices(void) { usbhost_midi_serial.setHandleActiveSensing(handleActiveSensing_MIDI_DEVICE_USB_HOST_SERIAL); usbhost_midi_serial.setHandleSystemReset(handleSystemReset_MIDI_DEVICE_USB_HOST_SERIAL); //usbhost_midi_serial.setHandleRealTimeSystem(handleRealTimeSystem_MIDI_DEVICE_USB_HOST_SERIAL); - Serial.println("4"); usbhost_midi_serial.begin(DEFAULT_MIDI_CHANNEL); #ifdef DEBUG diff --git a/third-party/effect_modulated_delay/src/library.properties b/third-party/effect_modulated_delay/src/library.properties new file mode 100644 index 0000000..e729b65 --- /dev/null +++ b/third-party/effect_modulated_delay/src/library.properties @@ -0,0 +1,10 @@ +name=effect_modulated_delay +version=1.0 +author=Holger Wirtz +maintainer= +sentence=Delayline with input for modulation on index (simple linear interpolation) +paragraph= +category=Audio +url=https://codeberg.org/dcoredump/effect_modulated_delay +architectures=teensy,avr +license=GPL3