pull/4/head
Holger Wirtz 7 years ago
parent 13b46f987d
commit 92475f873c
  1. 12
      MicroDexed.ino

@ -32,7 +32,7 @@ void setup()
Serial.println(F("MicroDexed")); Serial.println(F("MicroDexed"));
MIDI.begin(MIDI_CHANNEL_OMNI); MIDI.begin(MIDI_CHANNEL_OMNI);
#ifdef TEENSY #ifdef TEENSY
// Audio connections require memory to work. For more // Audio connections require memory to work. For more
// detailed information, see the MemoryAndCpuUsage example // detailed information, see the MemoryAndCpuUsage example
@ -56,18 +56,18 @@ void loop()
audio_buffer = queue1.getBuffer(); audio_buffer = queue1.getBuffer();
#endif #endif
//memset(buf, 0, 128);
// process midi->audio // process midi->audio
while(MIDI.read()) while (MIDI.read())
{ {
dexed->ProcessMidiMessage((byte)MIDI.getType(),(byte)MIDI.getData1(),(byte)MIDI.getData2()); dexed->ProcessMidiMessage(MIDI.getType(), MIDI.getData1(), MIDI.getData2());
} }
dexed->GetSamples(audio_buffer); dexed->GetSamples(audio_buffer);
#ifdef TEENSY #ifdef TEENSY
// play the current buffer // play the current buffer
while(!queue1.available());
queue1.playBuffer(); queue1.playBuffer();
#endif #endif
} }

Loading…
Cancel
Save