<div dir="ltr"><div>The teensy2.0 is 5V so it should work fine. (The Teensy3.1s are 3.3V but can handle 5V so they could work if you use 50ohm resistors on the outputs instead of 220 to get 5mA, but that's not strictly correct according to the MIDI spec, which says 5V.) <br><br></div>Martin<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 20, 2015 at 1:10 PM, Ingo <span dir="ltr"><<a href="mailto:ingo@miamiwave.com" target="_blank">ingo@miamiwave.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, Martin and Paul!<br>
<br>
The Teensy is great but seems to need some extra electronics since it is<br>
operating at 3.3V in order to get a reliable MIDI In/Out with 5V (according<br>
to a friend who is also working on something like this).<br>
The Arduinos with 5V should be easier. Of course for more complex stuff the<br>
Teensy with 3 serial ports has a lot more power.<br>
<br>
I kind of suspected the Nano (or the older Arduinos) not to work - good to<br>
know now!<br>
<br>
Ingo<br>
<br>
________________________________________<br>
Von: Paul Batchelor [mailto:<a href="mailto:ralphbluecoat@gmail.com">ralphbluecoat@gmail.com</a>]<br>
Gesendet: Samstag, 20. Juni 2015 17:39<br>
An: Martin Peach<br>
Cc: Ingo; <a href="mailto:pd-list@lists.iem.at">pd-list@lists.iem.at</a><br>
Betreff: Re: [PD] Arduiano (Micro or Nano) as MIDI interface?<br>
<div class="HOEnZb"><div class="h5"><br>
I would definitely consider the Teensy unless there are specific reasons for<br>
the Arduino. The newest version has MIDI support built into and it is<br>
compatible with Arduino sketches. <br>
<br>
On Sat, Jun 20, 2015 at 11:11 AM, Martin Peach <<a href="mailto:chakekatzil@gmail.com">chakekatzil@gmail.com</a>><br>
wrote:<br>
On Sat, Jun 20, 2015 at 6:06 AM, Ingo <<a href="mailto:ingo@miamiwave.com">ingo@miamiwave.com</a>> wrote:<br>
Hi there!<br>
<br>
I'd like to use an Arduino Micro (or Nano) as a MIDI interface connecting<br>
the MIDI ports to the digital pins "0" and "1" (TX/RX) and receiving the<br>
MIDI data via USB in Pd.<br>
It does not matter in which format it comes into Pd (i.e. it doesn't have to<br>
show up as a MIDI port - like MIDI over USB).<br>
<br>
1) Does anybody know if there is an existing arduino software for this?<br>
<br>
No but all you need to do is<br>
  if (Serial.available()) Serial1.write(Serial.read());<br>
  if (Serial1.available()) Serial.write(Serial1.read());<br>
in your main loop, where Serial1 is the TTL serial and Serial is USB.<br>
<br>
 <br>
2) Does anybody know if there are limitations on some or even all arduinos<br>
using the serial (digatal 0/1) ports and USB port at the same time?<br>
<br>
Only the micro (or Leonardo or Mega) will work for this as the TTL serial is<br>
separate from the USB. The TTL serial port on pins 0 and 1 shoud be set to<br>
31250 baud. Arduinos that use the Atmega168 or 328 use the same serial port<br>
for TTL and USB so there will be conflicts if you try to do both at the same<br>
time. And software serial is probably too slow to receive at 31250 baud<br>
although it can work to send MIDI that way. <br>
Teensy2.0 (<a href="http://www.pjrc.com/teensy/index.html" rel="noreferrer" target="_blank">http://www.pjrc.com/teensy/index.html</a>) will also work for this<br>
and can also (I believe) be set up as a USB MIDI device.<br>
<br>
Martin<br>
<br>
_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -><br>
<a href="http://lists.puredata.info/listinfo/pd-list" rel="noreferrer" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br>
<br>
</div></div></blockquote></div><br></div>