40
40
#define LCD_ROWS 4 // Number of rows on the LCD
41
41
#define MIDI_PANIC_TIME 1500 // How long a button press to invoke the MIDI panic
42
42
#define RESET_BUTTON_TIME 5000 // How long the button has been pressed to initiate a reset
43
+ #define RX 0
44
+ #define TX 1
43
45
44
46
#define encoder0PinA 2 // The rotary encoder is attached to pins 2 and 4
45
47
#define encoder0PinB 4 // and ground of course
@@ -66,7 +68,7 @@ char* midiParameterName[] = { "Channel: ",
66
68
67
69
// The sounds I have for each MIDI channel on my sound module
68
70
char * midiChannelMessages[] = {
69
- " MIDI Babel Fish 0.82 " ,
71
+ " MIDI Babel Fish 0.83 " ,
70
72
" 01 Grand " ,
71
73
" 02 Hammond" ,
72
74
" 03 Rhodes " ,
@@ -152,6 +154,9 @@ void setup() {
152
154
digitalWrite (encoder0PinA, HIGH);
153
155
pinMode (encoder0PinB, INPUT);
154
156
digitalWrite (encoder0PinB, HIGH);
157
+ pinMode (TX, OUTPUT);
158
+ digitalWrite (RX, HIGH);
159
+ pinMode (RX, INPUT);
155
160
156
161
// Set up the rotary encoder
157
162
attachInterrupt (0 , doEncoder, CHANGE); // encoder pin on interrupt 0 (pin 2)
@@ -163,7 +168,8 @@ void setup() {
163
168
// Initiate MIDI communications, listen to all channels, turn off thru mode
164
169
MIDI.begin (MIDI_CHANNEL_OMNI);
165
170
// By default, the MIDI library sends everything THRU. We do NOT want that!
166
- MIDI.turnThruOff ();
171
+ // Either call MIDI.turnThruOff(); in your setup or
172
+ // #define COMPILE_MIDI_THRU 0 in the library's MIDI.h
167
173
168
174
// Connect MIDI status changes involving a channel to handlers
169
175
MIDI.setHandleNoteOn (HandleNoteOn);
0 commit comments