How do I get midi messages from Arduino into a MIDI program, like Traktor?

247 views
Skip to first unread message

Michael Shiloh

unread,
Jan 29, 2011, 8:27:05 PM1/29/11
to phasor...@googlegroups.com

Although I'm pretty comfortable with Arduino, I'm not very plugged in to
the MIDI music control scene, although I understand the underlying
technology.

Note that the word MIDI here refers only to the protocol. There is no
MIDI plug: it's MIDI over USB.

One of my students wants to build a MIDI input device for Traktor, which
is a music manipulation program. The MIDI input is not a keyboard or
other musical instrument, but rather a generic set of knobs and sliders
that can be mapped to certain Traktor functions.

I suspect this same mechanism is used by a wide range of music and other
programs, so that arbitrary control surfaces can be used to control
various functionality. (I think I've heard of a video editor working the
same way.)

My student, Trevor, wants to use Arduino to build his control surface.

I can handle the Arduino/sensor/USB side of things, but I'm mystified as
to how to make it appear as a MIDI input to Traktor.

Trevor showed me how you add new inputs (controllers) to Traktor, and
there is a pulldown menu for manufacturer and model.

I guess that when you buy an off-the-shelf MIDI control surface, it
comes with a driver that makes it appear to be a MIDI device, which the
application software can then attach to.

These means that for any DIY device like Arduino, we must provide the
equivalent of this driver, that speaks the right protocol and convinces
applications like Traktor that it is a legitimate MIDI device.

I'm sure that this software exists, and that it's free, but I have no
idea what it's called, or where to find it, or, if I can write it, what
I should make it do.

Any advice?

Pi Boer

unread,
Jan 30, 2011, 2:45:10 PM1/30/11
to phasor...@googlegroups.com

> I guess that when you buy an off-the-shelf MIDI control surface, it
> comes with a driver that makes it appear to be a MIDI device, which
> the
> application software can then attach to.
some controllers use their own drivers, some use the operating
system's built-in USB MIDI driver, so it's plug-and-play

> These means that for any DIY device like Arduino, we must provide the
> equivalent of this driver, that speaks the right protocol and
> convinces
> applications like Traktor that it is a legitimate MIDI device.

by default, the arduino is going to output serial data. This would,
indeed have to be converted into MIDI by software. PD is free, and you
could build a patch (or even find one someone else has built) to
create MIDI. Processing is also free, and could probably work to make
a serial to MIDI converter. Ditto SuperCollider. Max/MSP can also
handle this task, but Max is not free.

I searched "arduino midi" on google and found these:

http://arduino.cc/en/Tutorial/Midi
http://www.arduino.cc/playground/Main/MIDILibrary
Probably exactly what you want:
http://itp.nyu.edu/physcomp/Labs/MIDIOutput

I got all this just through google. I haven't worked with the arduino,
but I do like to keep an eye on it!

You could also save yourself the hassle of programming (if you
consider programming a hassle) and focus on building, rather than
messing with protocols, and get a Livid Brain:
http://www.lividinstruments.com/hardware_builder.php
which is a USB MIDI Class compliant device that will send and receive
MIDI and power over USB on OS X, Windows, and Linux.
(full disclosure - I'm a partner in Livid, so this is an advertisement
for my business :) However, now that you have a personal connection, a
special educational or phasor~ member discount could likely be applied)

Peter.

Michael Shiloh

unread,
Jan 30, 2011, 3:02:56 PM1/30/11
to phasor...@googlegroups.com
Thanks for your replies! Comments below:

On 01/30/2011 11:45 AM, Pi Boer wrote:
>
>> I guess that when you buy an off-the-shelf MIDI control surface, it
>> comes with a driver that makes it appear to be a MIDI device, which the
>> application software can then attach to.
> some controllers use their own drivers, some use the operating system's
> built-in USB MIDI driver, so it's plug-and-play


Very helpful. This means that a fully DIY solution such as Arduino can
work without a new driver, by using "the operating system's built-in USB
MIDI driver"


>


>> These means that for any DIY device like Arduino, we must provide the
>> equivalent of this driver, that speaks the right protocol and convinces
>> applications like Traktor that it is a legitimate MIDI device.
> by default, the arduino is going to output serial data. This would,
> indeed have to be converted into MIDI by software. PD is free, and you
> could build a patch (or even find one someone else has built) to create
> MIDI. Processing is also free, and could probably work to make a serial
> to MIDI converter. Ditto SuperCollider. Max/MSP can also handle this
> task, but Max is not free.

Yup. Very familiar with all of these. We can certainly use PD as glue,
but would like to avoid doing so, if possible.

>
> I searched "arduino midi" on google and found these:
>
> http://arduino.cc/en/Tutorial/Midi
> http://www.arduino.cc/playground/Main/MIDILibrary
> Probably exactly what you want:
> http://itp.nyu.edu/physcomp/Labs/MIDIOutput
>
> I got all this just through google. I haven't worked with the arduino,
> but I do like to keep an eye on it!

None of these explained to me (sufficiently) how they get around the
driver issue, which you just did (above).


>
> You could also save yourself the hassle of programming (if you consider
> programming a hassle) and focus on building, rather than messing with
> protocols, and get a Livid Brain:
> http://www.lividinstruments.com/hardware_builder.php
> which is a USB MIDI Class compliant device that will send and receive
> MIDI and power over USB on OS X, Windows, and Linux.
> (full disclosure - I'm a partner in Livid, so this is an advertisement
> for my business :) However, now that you have a personal connection, a
> special educational or phasor~ member discount could likely be applied)


Aha! In fact my student started at the Livid site, but since he's (a) on
a severe budget and (b) wants to experiment with a couple of simple
switches and sliders before he goes full-bore, we started pursuing the
Arduino alternative.

He thinks that pretty soon he'll buy the Ohm64 Wood, which is a
beautiful device. My student will be thrilled to hear the possibility of
an educational/phasor~ discount.

How does Livid handle the driver? Do you deliver one, or do you use the
built-in? If you deliver one, is it only for Mac and/or PC, or do you
support Linux as well? My student doesn't use Linux, but I do.

Thank you very much! You've been very helpful.

Pi Boer

unread,
Jan 30, 2011, 4:46:17 PM1/30/11
to phasor...@googlegroups.com
> How does Livid handle the driver? Do you deliver one, or do you use
> the built-in? If you deliver one, is it only for Mac and/or PC, or
> do you support Linux as well? My student doesn't use Linux, but I do.
We depend on the class compliant MIDI driver from the OS, so, no, we
don't ship a driver. I've seen it function on linux, but I don't have
a linux box to do full testing. I really really doubt it would be a
problem.

The drawback to this driver is that the Windows version of USB MIDI
driver is...lame. On OS X I can use any of our controllers on any open
MIDI software apps, for example, split a controller so the left half
works in, say, Max/MSP, and the other half could be used in Live.
On Windows, only one MIDI application can use a device that depends on
the USB MIDI drivers at a time - for example if you open a MIDI
sequencer and use the Ohm64 to control it, then open a video mixing
app and try to use the Ohm64, it will say that the device/port is
busy. However, to be clear, you can use multiple USB MIDI controllers
in different applications simultaneously, just not one device for
multiple applications. There are workarounds, but I won't bore you
with those. This is the case on all Windows OSes that I've observed.
We don't currently have the resources to make our own drivers for
Windows, so we (and our users) just have to deal with it.

> Thank you very much! You've been very helpful.

Cool!

Peter

Gian Pablo Villamil

unread,
Jan 30, 2011, 7:58:48 PM1/30/11
to phasor...@googlegroups.com
Actually, there is a pretty good workaround on Windows - you can install any of a number of virtual MIDI drivers, like MIDI Yoke or LoopBe or rtpMIDI, and then use MIDI-OX to route physical inputs to the virtual inputs.

So you could have Ableton taking input from virtual MIDI #1 and Resolume taking input from virtual MIDI #2, and in MIDI-OX you could connect the physical device to both of those at the same time. In fact, MIDI-Yoke ports can be opened by more than one application at once, so you could just route (in MIDI-OX) your physical device to a virtual MIDI port, and have that port open by multiple applications at once.
Reply all
Reply to author
Forward
0 new messages