Several fixes.

master
Holger Wirtz 5 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 };
//*************************************************************************************************
//* SETUP FUNCTION
//*************************************************************************************************
@ -226,7 +225,7 @@ void setup()
Serial.print(F("AUDIO_BLOCK_SAMPLES="));
Serial.print(AUDIO_BLOCK_SAMPLES);
Serial.print(F(" (Time per block="));
Serial.print(1000000 / (SAMPLE_RATE / AUDIO_BLOCK_SAMPLES));
Serial.print(audio_block_time_us);
Serial.println(F("ms)"));
ep->setParameter(DECAY, 0.5);
@ -247,7 +246,7 @@ void setup()
mixer_r.gain(1, 0.3);
mixer_l.gain(1, 0.3);
AudioNoInterrupts();
AudioInterrupts();
Serial.println(F("<setup end>"));
#if defined (DEBUG) && defined (SHOW_CPU_LOAD_MSEC)
@ -322,6 +321,7 @@ void loop()
midi_serial.read();
#endif
#ifdef MIDI_DEVICE_USB_HOST
usb_host.Task();
midi_usb.read();
#endif
#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)
{
Serial.println("NON");
if (checkMidiChannel(inChannel))
{
ep->noteOn(inNumber, inVelocity);
@ -574,6 +575,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity)
void handleNoteOff(byte inChannel, byte inNumber, byte inVelocity)
{
Serial.println("NOFF");
if (checkMidiChannel(inChannel))
{
ep->noteOn(inNumber, 0);
@ -591,7 +593,7 @@ void handleControlChange(byte inChannel, byte inData1, byte inData2)
bool checkMidiChannel(byte inChannel)
{
// check for MIDI channel
if (inChannel == MIDI_CHANNEL_OMNI)
if (midi_channel == MIDI_CHANNEL_OMNI)
{
return (true);
}

Loading…
Cancel
Save