On Sat, Jun 20, 2015 at 6:06 AM, Ingo <ingo@miamiwave.com> wrote:Hi there!
I'd like to use an Arduino Micro (or Nano) as a MIDI interface connecting
the MIDI ports to the digital pins "0" and "1" (TX/RX) and receiving the
MIDI data via USB in Pd.
It does not matter in which format it comes into Pd (i.e. it doesn't have to
show up as a MIDI port - like MIDI over USB).
1) Does anybody know if there is an existing arduino software for this?
No but all you need to do is
if (Serial.available()) Serial1.write(Serial.read());
if (Serial1.available()) Serial.write(Serial1.read());
in your main loop, where Serial1 is the TTL serial and Serial is USB.
2) Does anybody know if there are limitations on some or even all arduinos
using the serial (digatal 0/1) ports and USB port at the same time?
Only the micro (or Leonardo or Mega) will work for this as the TTL serial is separate from the USB. The TTL serial port on pins 0 and 1 shoud be set to 31250 baud. Arduinos that use the Atmega168 or 328 use the same serial port for TTL and USB so there will be conflicts if you try to do both at the same time. And software serial is probably too slow to receive at 31250 baud although it can work to send MIDI that way.Teensy2.0 (http://www.pjrc.com/teensy/index.html) will also work for this and can also (I believe) be set up as a USB MIDI device.Martin
_______________________________________________
Pd-list@lists.iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list