Re: Getting started with midish

From: Alexandre Ratchov <alex_at_caoua.org>
Date: Sun Aug 30 2009 - 22:32:55 CEST
On Sun, Aug 30, 2009 at 11:51:05AM -0700, Bob van der Poel wrote:
> Thanks, Julien, for taking time to reply. Unfortunately ... no joy :)
> 
> 
> > 1. midish and rmidish
> >  It's a kind of server thing. midish is the server and rmidish is the
> > frontend.
> >
> 
> Okay. I think I understand that. So, if I'm writing a script I'll use
> midish, etc.
>

yeah, both midish and rmidish do the same thing. The only
difference is that rmidish has a slightly nicer interface
(prompt, command completion, history); it's a simple wrapper
around the midish binary using readline.
 
> Just noticed that smfrec/play are scripts as well ... unfortunately, I can't
> seem to either to work. Just tired smfplay and get the unhelpful (to me)
> output:
> 
>  bob$ smfplay -d/dev/midi stranger.mid
> track_check: xpc {0 9} 0 ffff: duplicated
> track_check: noff {0 9} 52 64: bogus
> alsa_open: couldn't parse alsa port
> press ^C to stop playback
> 
> But, no output.
> 

oh, the -d option corresponds to the device, it should be:

	smfplay -d 16:0 stranger.mid

assuming ``16:0'' your midi input. The -d option argument is
passed to the ``dnew'' function, so it has the same format.

> >
> > 2.  What sound-system do you have. If it's not ALSA, you'd want the old
> > device type. If it is ALSA, you can do this:
> >
> 
> Yes, I've got ALSA. And it works for midi playback just fine. I have a
> M-Audio 24/96 card running an external synth. ALSA aconnect, etc. tells me
> that the port is 16:0
> 
> bob$ aplaymidi -l
>  Port    Client name                      Port name
>  14:0    Midi Through                     Midi Through Port-0
>  16:0    M Audio Audiophile 24/96         M Audio Audiophile 24/96 MIDI
> 
> and I have edited /etc/midishrc to reflect this:
> 
> bob$ less /etc/midishrc
> #
> # midi devices config
> #
> #dnew 0 "/dev/rmidi4" rw
> #dnew 1 "/dev/rmidi3" rw
> #
> #
> dnew 0 "16:0" rw
> dnew 1 "16:0" rw
> 
> I just added the dnew 1 line, but it makes no difference

you need only one device, you should drop the second line.
If you were having two devices (eg. one for input, and one
four output) you would need two lines.

Note that your ~/.midishrc is not processed from smfplay and
smfrec scripts (midish invoked with the -b option).

> >
> > 3. Recording MIDI files. Best use rmidish. It can playback and recrod at
> > the same time. rmidish will record to midish's own format.
> 
> 
> Okay. I guess I can write my own version of smfrec to do this. But, I have
> to get the package working first. I really have no idea ... and the entire
> midish is way to much to learn just now.
>

AFAIU, the problems comes from the device names format used
by ``dnew''. The documentation is not clear about the device
names:

 - on Linux ``device names'' mean ALSA sequencer ports,
   (eg. ``16:0'')

 - on other OSes they are files (eg. ``/dev/rmidi3'')

HTH

-- Alexandre
Received on Sun, 30 Aug 2009 22:32:55 +0200

This archive was generated by hypermail 2.1.8 : Wed Nov 08 2017 - 16:32:21 CET