updated AnalogDelayDemo to work with Teensyduino 1.41

pull/1/head
Edmund Blackaddr 7 years ago
parent 4f528ebff7
commit e964c7df89
  1. 6
      examples/Delay/AnalogDelayDemo/AnalogDelayDemo.ino

@ -1,6 +1,7 @@
#include <MIDI.h>
#include "BAGuitar.h"
using namespace midi;
using namespace BAGuitar;
AudioInputI2S i2sIn;
@ -8,6 +9,7 @@ AudioOutputI2S i2sOut;
BAAudioControlWM8731 codec;
/// IMPORTANT /////
// YOU MUST USE TEENSYDUINO 1.41 or greater
// YOU MUST COMPILE THIS DEMO USING Serial + Midi
//#define USE_EXT // uncomment this line to use External MEM0
@ -131,7 +133,9 @@ void loop() {
channel = usbMIDI.getChannel(); // which MIDI channel, 1-16
data1 = usbMIDI.getData1(); // first data byte of message, 0-127
data2 = usbMIDI.getData2(); // second data byte of message, 0-127
if (type == 3) {
Serial.println(String("Received a MIDI message on channel ") + channel);
if (type == MidiType::ControlChange) {
// if type is 3, it's a CC MIDI Message
// Note: the Arduino MIDI library encodes channels as 1-16 instead
// of 0 to 15 as it should, so we must subtract one.

Loading…
Cancel
Save