On 30/11/16 18:04, Hanspeter Portner wrote:
On 30.11.2016 18:32, Bill Purvis wrote:
Anyone on the list know how to persuade an
Arduino to look like a MIDI device?
I've got it generating MIDI signals via a MIDI breakout unit, but want to
connect direct
to my PC using the USB. I've got it sending what appear to be valid MIDI messages to
/dev/ttyUSB1, but qjackctl doesn't see it as a midi device so it can't connect
it.
Any useful information would be welcome.
Arduino by default enumerates its USB
port as a virtual serial line (that's why
your device is named /dev/tty*). In order to automatically enumerate its USB
port as MIDI, you need a board with a processor that features an on-chip USB
controller so it can be reprogrammed to also enumerate as USB MIDI [1].
Alternatively, for Arduinos without on-chip USB, you can simply send your MIDI
via the virtual serial line and run a ttyMIDI daemon on your receiving host
which will mediate between serial line and ALSA MIDI [2].
[1]
https://www.arduino.cc/en/Reference/MIDIUSB
[2]
https://launchpad.net/ttymidi Thanks, Hanspeter! Two useful links there.
I tried searching on the arduino forum, but got fed up after seven pages
of completely
unrelated messages.
ttymidi looks really useful, and works with my current code. I haven't
plucked up
courage to try MIDIUSB as it messes with the setting of the USB
bootloader and
I haven't figured out how I'd get out of it if it then decides to refuse
further
uploads. Maybe it's OK, but I'll postpone that for now. I can always run
several
copies of ttymidi when I get round to adding further complications to
the project.
Bill
--
+----------------------------------------+
| Bill Purvis |
| email: bill(a)billp.org |
+----------------------------------------+