Midi and FreeBSD

Hans Petter Selasky hselasky at c2i.net
Sat Feb 19 17:47:42 UTC 2011


On Saturday 19 February 2011 18:22:33 Zahemszky Gábor wrote:
> Hi!
> 
> > > If I buy a "MIDI-USB" communication cable to connect it to my
> 
> (*)
> 

Hi,

> > > PC, will it possible to use it? 

Most USB MIDI cables use the same protocol. Should be compatible with USB MIDI 
spec. v 1.0. Good sign: Works on Mac and no drivers requires.

> > > Do I need to buy a special cable
> > > (made-by-XYZ), are there any specific drivers, or programs, with
> > > what I can play with it. I've seen eg OpenBSD's midish CLI program,
> > > but it isn't ported to FreeBSD (yet).
> > > 
> > > (I use FreeBSD8 on both i386 and Amd64.)
> > 
> > Hi,
> > 
> > Yes, there exists plenty of USB MIDI software for FreeBSD, but not
> > all is in ports. The USB MIDI solution in FreeBSD is part of
> > snd_uaudio. Do you see any devices like /dev/umidiX.Y ?
> 
> As I've written in my first mail (*), I haven't got the USB-MIDI cable
> yet (as I don't know, do I have to buy some specific, or any of them
> will be good.)
> 
> So if I understand you correctly, after buying that cable, I
> only have to "kldload snd_uaudio", connect the drum-machine to the
> PC with that cable, and I'll see (OK, I have to) /dev/umidiX.Y
> devices? 

Depending on how many ports your device has, you'll see /dev/umidi0.{0..15}

> It'll be great. (I think one of the umidi device - eg.
> umidi0.0 - will be the MIDI-OUT/PASSTHROUGH and the other - umidi0.1
> will be MIDI-IN?) 

umidi0.0 is read+write. RAW MIDI.

> Or if not, are there any documentation about it as I
> hadn't find it in man snd_uaudio. By the way, nowhere in "man -k midi".
> Does this snd_uaudio driver will give us the original
> Linux-like /dev/sequencer OSS-device? 

No, this device does not exist for USB MIDI adapters. You'll need to use a 
program called jack_umidi, which convert the /dev/umidiX.Y instance into a 
TCP-based jack instance, which is a more popular choice.

> Or how can I use these /dev/umidi
> devices?

Loopback:
dd if=/dev/umidi0.0 of=/dev/umidi0.0 bs=1

Read+write like any other file.

> 
> And where are those "plenty of MIDI software"? (I hope, I can
> download and install them by hand, but of course, I'd like better them
> from ports.)

Currently what I use is:

/usr/ports/audio/{rosegarden,zynaddsubfx,fluidsynth,jack-keyboard,jack}

zynaddsubfx and fluidsynth should be compiled from GIT/SVN. I have some 
patches for these software packages to improve usability. fluidsynth is most 
suitable for drums.

Then there is libumidi20, midipp (depends on QT4.x from ports) and the 
recently added jack_umidi:

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/libumidi20

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/midipp

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/jack_umidi

And I also have some scripts to set the correct permissions on the MIDI-
adapters as you plug them.

--HPS


More information about the freebsd-multimedia mailing list