Hello Friends,
I recently bought a USB-to-MIDI cable for an audio project.
I uploaded a few basic example sketches off the web, in an attempt simply to get an output from the board to FL Studio. Unfortunately, I don't seem to be getting a correct output. As seen in attached image, FL recognises the USB cable as an interface, and even senses some kind of signal (Note C0, 64 Velocity - NOT the note I'm trying to output).
I'm also attached the basic circuit I'm using. I'm using a MIDI Jack Input on the breadboard. (220ohm resistor, and I'm definitely using the correct pins, in case the schematic looks off)
Any suggestions or corrections for simply getting a MIDI output from my board to FL through the USB-MIDI cable?
For reference, I just used the MIDI tutorial code;
void setup() {
- // Set MIDI baud rate:*
- Serial.begin(31250);*
}
void loop() { - // play notes from F#-0 (0x1E) to F#-5 (0x5A):*
- for (int note = 0x1E; note < 0x5A; note ++) {*
- //Note on channel 1 (0x90), some note value (note), middle velocity (0x45):*
- noteOn(0x90, note, 0x45);*
- delay(100);*
- //Note on channel 1 (0x90), some note value (note), silent velocity (0x00):*
- noteOn(0x90, note, 0x00);*
- delay(100);*
- }*
}
// plays a MIDI note. Doesn't check to see that cmd is greater than 127, or that
// data values are less than 127:
void noteOn(int cmd, int pitch, int velocity) { - Serial.write(cmd);*
- Serial.write(pitch);*
- Serial.write(velocity);*
}
I'm aware I'm only using one resistor where the guide suggests two, but I've found others have gotten away with using just one on the 5V wire... I imagine the problem isn't being caused by that.
Any help is appreciated