Holger Wirtz 9 months ago
parent a4bc2b1844
commit 0426342dde
  1. 29
      MicroDexed.ino
  2. 10
      config.h
  3. 0
      delay
  4. 4
      midi_devices.hpp
  5. 10
      third-party/effect_modulated_delay/src/library.properties

@ -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("<setup end>"));
#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) {
;
}

@ -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

@ -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

@ -0,0 +1,10 @@
name=effect_modulated_delay
version=1.0
author=Holger Wirtz
maintainer=<wirtz@parasitstudio.de>
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
Loading…
Cancel
Save