[PlanetCCRMA]Re: /dev/midi and pd

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Thu Feb 10 21:29:02 2005


On Thu, 2005-02-10 at 19:33, Kevin Ernste wrote:
> Hi -
> 
> Relating to the last part of Jon's initial post on this thread (the
> posibility of alsa-seq support in PD), it seems that the alsa-seq
> patch he mentioned sems to have made it upstream to 0.38-2.
> 
> I downloaded the 0.38-2 tarball from Miller's page the other day,
> built it ("./configure --enable-alsa --enable-jack --enable-setuid",
> make) and ran it without installing and PD shows up as an ALSA-aware
> midi device (Qjackctl sees it and allows routing to/from other MIDI
> apps).  Needless to say, this is very promising.

Very much so. Miller was around for a lecture/concert a few weeks ago
and I mentioned that alsa seq support would be very very nice, maybe he
was listening :-)

> Are there any plans for 0.38 to get into Planet or is it still
> considered unstable?

I have not really tried it yet. Did you do any testing? I could do a
release in the "planetedge" repository. I'd be reluctant to release it
before the quarter is over here at CCRMA, it is heavily used and I'd not
like to destabilize it....

-- Fernando

> On Thu, 10 Feb 2005 19:20:13 -0800 (PST), Fernando Lopez-Lezcano
> <nando@ccrma.stanford.edu> wrote:
> > On Thu, 2005-02-10 at 18:14, Jon B wrote:
> > > > > Yes, I just found that.  So I tried it, but it doesn't work, because
> > > > > my midiC_D_ files have changed names.
> > > > >
> > > > > > There is a way to tell udev to recreate devices automatically on boot
> > > > > > (it's on the fc3 release notes). Copy the devices from /dev/ to
> > > > > > /etc/udev/devices/. Again, would be better to alter the creation rules
> > > > > > or really find the bug :-)
> > >
> > > It seems like I should be figuring out how to change the creation rules...
> > >
> > > > In reality those files should not be links, they should be normal device
> > > > files (made with mknod). This is what I get on an old rh9 machine:
> > > >
> > > > > ls -l /dev/midi*
> > > > crw-------    1 nando    root      35,   0 Jan 30  2003 /dev/midi0
> > > > crw-------    1 nando    root      14,   2 Jan 30  2003 /dev/midi00
> > > > crw-------    1 nando    root      14,  18 Jan 30  2003 /dev/midi01
> > > > crw-------    1 nando    root      14,  34 Jan 30  2003 /dev/midi02
> > > > crw-------    1 nando    root      14,  50 Jan 30  2003 /dev/midi03
> > > > crw-------    1 nando    root      35,   1 Jan 30  2003 /dev/midi1
> > > > crw-------    1 nando    root      35,   2 Jan 30  2003 /dev/midi2
> > > > crw-------    1 nando    root      35,   3 Jan 30  2003 /dev/midi3
> > >
> > > I see this:
> > >
> > > 1. Find the major device number by typing 'cat /proc/devices'. Look
> > > for the device called "ir", and note its number (it will probably be
> > > 254 or 253).
> > > 2. As root, create a character device called '/dev/ir' with that major
> > > number, using the 'mknod' program.
> > 
> > The "major" number is the first number in the entries above, that is,
> > for /dev/midi0 the major of the device is 35, the minor number is 0.
> > 
> > > But are these placed in /dev/ or /etc/udev/devices/ ?  And will they
> > > always be the same numbers?
> > 
> > Yes, these should always be the same numbers.
> > >From what I've read you can create them in /dev to use them, if you want
> > them recreated on boot put them in /etc/udev/devices/
> > 
> > >  Can't this be done automatically somehow?
> > 
> > Yes, I still have to read up, that would involve adding rules so that
> > udev automatically creates the devices on demand. Most probably I could
> > add this to the alsa-driver package in a future release (until this is
> > fixed in fcx).
> > 
> > > These are mine:
> > >
> > > crw-------  1 omegatron root  14, 34 Feb  9 23:50 /dev/snd/midi2
> > > crw-------  1 omegatron root 116, 72 Feb  9 23:50 /dev/snd/midiC2D0
> > > crw-------  1 omegatron root 116, 73 Feb  9 23:50 /dev/snd/midiC2D1
> > > crw-------  1 omegatron root 116, 74 Feb  9 23:50 /dev/snd/midiC2D2
> > > crw-------  1 omegatron root 116, 75 Feb  9 23:50 /dev/snd/midiC2D3
> > >
> > > but pd is looking for /dev/midi*.  Is there any way to make pd look in
> > > the other directory?  That might be easier...
> > 
> > Well, they are different things. "/dev/midi*" are the OSS midi devices,
> > "/dev/snd/midi*" are the ALSA midi devices. When running ALSA (as we
> > are) the OSS part is handled through emulation modules. Anyway, both
> > devices are not the same thing, although maybe things will work if you
> > point one to the other.
> > 
> > Besides this bug (missing devices in the standard udev configuration in
> > fc3 - I have to check in redhat's bugzilla to see if this has been
> > reported before), the _real_ solution would be for pd to use the alsa
> > sequencer interface to midi devices, instead of the oss raw interface.
> > 
> > > But then I still have to worry about plugging in a USB device after
> > > boot or before boot and having the order different...  Argh.
> > 
> > -- Fernando
> > 
> > 
> > _______________________________________________
> > PlanetCCRMA mailing list
> > PlanetCCRMA@ccrma.stanford.edu
> > http://ccrma-mail.stanford.edu/mailman/listinfo/planetccrma
> >