Several fixes.

master
Holger Wirtz 6 years ago
parent 392e86f25c
commit 8b27d56c54
  1. 10
      MicroMDAEPiano.ino

@ -120,7 +120,6 @@ elapsedMillis cpu_mem_millis;
enum MDA_EP_PARAM { DECAY, RELEASE, HARDNESS, TREBLE, PAN_TREM, LFO_RATE, VELOCITY_SENSE, STEREO, MAX_POLY, TUNE, DETUNE, OVERDRIVE }; enum MDA_EP_PARAM { DECAY, RELEASE, HARDNESS, TREBLE, PAN_TREM, LFO_RATE, VELOCITY_SENSE, STEREO, MAX_POLY, TUNE, DETUNE, OVERDRIVE };
//************************************************************************************************* //*************************************************************************************************
//* SETUP FUNCTION //* SETUP FUNCTION
//************************************************************************************************* //*************************************************************************************************
@ -226,7 +225,7 @@ void setup()
Serial.print(F("AUDIO_BLOCK_SAMPLES=")); Serial.print(F("AUDIO_BLOCK_SAMPLES="));
Serial.print(AUDIO_BLOCK_SAMPLES); Serial.print(AUDIO_BLOCK_SAMPLES);
Serial.print(F(" (Time per block=")); Serial.print(F(" (Time per block="));
Serial.print(1000000 / (SAMPLE_RATE / AUDIO_BLOCK_SAMPLES)); Serial.print(audio_block_time_us);
Serial.println(F("ms)")); Serial.println(F("ms)"));
ep->setParameter(DECAY, 0.5); ep->setParameter(DECAY, 0.5);
@ -247,7 +246,7 @@ void setup()
mixer_r.gain(1, 0.3); mixer_r.gain(1, 0.3);
mixer_l.gain(1, 0.3); mixer_l.gain(1, 0.3);
AudioNoInterrupts(); AudioInterrupts();
Serial.println(F("<setup end>")); Serial.println(F("<setup end>"));
#if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC) #if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC)
@ -322,6 +321,7 @@ void loop()
midi_serial.read(); midi_serial.read();
#endif #endif
#ifdef MIDI_DEVICE_USB_HOST #ifdef MIDI_DEVICE_USB_HOST
usb_host.Task();
midi_usb.read(); midi_usb.read();
#endif #endif
#ifdef MIDI_DEVICE_USB #ifdef MIDI_DEVICE_USB
@ -566,6 +566,7 @@ void handleControlChange_MIDI_DEVICE_USB(byte inChannel, byte inData1, byte inDa
void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
{ {
Serial.println("NON");
if (checkMidiChannel(inChannel)) if (checkMidiChannel(inChannel))
{ {
ep->noteOn(inNumber, inVelocity); ep->noteOn(inNumber, inVelocity);
@ -574,6 +575,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity) void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity)
{ {
Serial.println("NOFF");
if (checkMidiChannel(inChannel)) if (checkMidiChannel(inChannel))
{ {
ep->noteOn(inNumber, 0); ep->noteOn(inNumber, 0);
@ -591,7 +593,7 @@ void handleControlChange(byte inChannel, byte inData1, byte inData2)
bool checkMidiChannel(byte inChannel) bool checkMidiChannel(byte inChannel)
{ {
// check for MIDI channel // check for MIDI channel
if (inChannel == MIDI_CHANNEL_OMNI) if (midi_channel == MIDI_CHANNEL_OMNI)
{ {
return (true); return (true);
} }

Loading…
Cancel
Save