chrisdswift
Member
Hi,
I have been building the wonderful MicroDexed project from Holger Wirtz (see: https://discourse.zynthian.org/t/microdexed-dx7-to-go/1989/93). I have 3 Teensy 4.0 boards plus the compatible audio shields. All 3 were uploaded but only 2 of the units function - not a sound. I checked the midi input with Midi-Ox and discovered that only a small number of midi note on and note off messages are accepted by the usb/midi interface before it stops receiving any more. I then loaded a very simple sketch (below) to test the usb/midi function in and it always hangs after 3 pairs of note on/note off messages. I have tested serial in/out using the serial monitor and that works fine at 9600 baud. One other thing to note is that this particular teensy did not have the default led flashing sketch loaded but when I loaded it myself it worked fine. Is it broken?
The midi test code is here:-
#include <MIDI.h>
// Simple tutorial on how to receive and send MIDI messages.
// Here, when receiving any message on channel 4, the Arduino
// will blink a led and play back a note for 1 second.
MIDI_CREATE_DEFAULT_INSTANCE();
static const unsigned ledPin = 13; // LED pin on Arduino Uno
void setup()
{
pinMode(ledPin, OUTPUT);
MIDI.begin(1); // Launch MIDI and listen to channel 4
}
void loop()
{
if (MIDI.read()) // If we have received a message
{
digitalWrite(ledPin, HIGH);
//MIDI.sendNoteOn(42, 127, 1); // Send a Note (pitch 42, velo 127 on channel 1)
delay(1000); // Wait for a second
//MIDI.sendNoteOff(42, 0, 1); // Stop the note
digitalWrite(ledPin, LOW);
}
}
Can anyone help?
Chris Swift
I have been building the wonderful MicroDexed project from Holger Wirtz (see: https://discourse.zynthian.org/t/microdexed-dx7-to-go/1989/93). I have 3 Teensy 4.0 boards plus the compatible audio shields. All 3 were uploaded but only 2 of the units function - not a sound. I checked the midi input with Midi-Ox and discovered that only a small number of midi note on and note off messages are accepted by the usb/midi interface before it stops receiving any more. I then loaded a very simple sketch (below) to test the usb/midi function in and it always hangs after 3 pairs of note on/note off messages. I have tested serial in/out using the serial monitor and that works fine at 9600 baud. One other thing to note is that this particular teensy did not have the default led flashing sketch loaded but when I loaded it myself it worked fine. Is it broken?
The midi test code is here:-
#include <MIDI.h>
// Simple tutorial on how to receive and send MIDI messages.
// Here, when receiving any message on channel 4, the Arduino
// will blink a led and play back a note for 1 second.
MIDI_CREATE_DEFAULT_INSTANCE();
static const unsigned ledPin = 13; // LED pin on Arduino Uno
void setup()
{
pinMode(ledPin, OUTPUT);
MIDI.begin(1); // Launch MIDI and listen to channel 4
}
void loop()
{
if (MIDI.read()) // If we have received a message
{
digitalWrite(ledPin, HIGH);
//MIDI.sendNoteOn(42, 127, 1); // Send a Note (pitch 42, velo 127 on channel 1)
delay(1000); // Wait for a second
//MIDI.sendNoteOff(42, 0, 1); // Stop the note
digitalWrite(ledPin, LOW);
}
}
Can anyone help?
Chris Swift