[PD] Arduiano (Micro or Nano) as MIDI interface?

Martin Peach chakekatzil at gmail.com
Sat Jun 20 17:11:15 CEST 2015


On Sat, Jun 20, 2015 at 6:06 AM, Ingo <ingo at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20150620/aabec4eb/attachment.html>


More information about the Pd-list mailing list