* rawmidi problems
@ 2002-07-05 15:53 Pedro Lopez-Cabanillas
2002-07-05 16:33 ` Maarten de Boer
2002-07-05 16:37 ` Takashi Iwai
0 siblings, 2 replies; 8+ messages in thread
From: Pedro Lopez-Cabanillas @ 2002-07-05 15:53 UTC (permalink / raw)
To: alsa-devel
Hi,
I was trying to test rawmidi on snd-usb-midi with latest patches, with no
success :(
Then, as I have an sb 128 (snd-ens1371) I tryed the alsa-lib/test/rawmidi
program with only that card module loaded.
$ ./rawmidi -i hw:0,0
Read midi in
Press ctrl-c to stop
(With a MIDI keyboard connected, no events received at all.)
$ ./rawmidi -i hw:0,0 -o hw:0,0 -t
(OK, input events sent to out, with a lot of delay)
$ ./rawmidi -o hw:0,0
Writing note on / note off
(OK)
With alsa-lib/test/seq program all tests OK.
Regards,
Pedro
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-05 15:53 rawmidi problems Pedro Lopez-Cabanillas
@ 2002-07-05 16:33 ` Maarten de Boer
2002-07-05 16:57 ` Pedro Lopez-Cabanillas
2002-07-05 16:37 ` Takashi Iwai
1 sibling, 1 reply; 8+ messages in thread
From: Maarten de Boer @ 2002-07-05 16:33 UTC (permalink / raw)
To: alsa-devel, plcl
add the flag -v to get verbose output and see what events you receive (this should be default behaviour i guess...)
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-05 15:53 rawmidi problems Pedro Lopez-Cabanillas
2002-07-05 16:33 ` Maarten de Boer
@ 2002-07-05 16:37 ` Takashi Iwai
2002-07-05 17:30 ` Pedro Lopez-Cabanillas
1 sibling, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2002-07-05 16:37 UTC (permalink / raw)
To: Pedro Lopez-Cabanillas; +Cc: alsa-devel
At Fri, 5 Jul 2002 17:53:54 +0200,
Pedro Lopez-Cabanillas wrote:
>
> Hi,
>
> I was trying to test rawmidi on snd-usb-midi with latest patches, with no
> success :(
>
> Then, as I have an sb 128 (snd-ens1371) I tryed the alsa-lib/test/rawmidi
> program with only that card module loaded.
there might be still bugs on virmidi codes.
i remember that it didn't work quite well on some conditions...
will check later.
ciao,
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-05 16:33 ` Maarten de Boer
@ 2002-07-05 16:57 ` Pedro Lopez-Cabanillas
0 siblings, 0 replies; 8+ messages in thread
From: Pedro Lopez-Cabanillas @ 2002-07-05 16:57 UTC (permalink / raw)
To: Maarten de Boer; +Cc: alsa-devel
El Vie 05 Jul 2002 18:33, Maarten de Boer escribió:
> add the flag -v to get verbose output and see what events you receive (this
> should be default behaviour i guess...)
It works! (and also with snd-usb-midi)
And I agree with you, -v option should be the default :)
$ ./rawmidi -i hw:0,0 -v
Using:
Input: device hw:0,0
Output: NONE
Read midi in
Press ctrl-c to stop
read fe
read fe
read fe
read fe
read fe
read fe
read fe
read fe
read fe
Closing
Thanks,
Pedro
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-05 16:37 ` Takashi Iwai
@ 2002-07-05 17:30 ` Pedro Lopez-Cabanillas
2002-07-08 10:40 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Lopez-Cabanillas @ 2002-07-05 17:30 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
El Vie 05 Jul 2002 18:37, Takashi Iwai escribió:
> > I was trying to test rawmidi on snd-usb-midi with latest patches, with no
> > success :(
> >
> > Then, as I have an sb 128 (snd-ens1371) I tryed the alsa-lib/test/rawmidi
> > program with only that card module loaded.
>
> there might be still bugs on virmidi codes.
> i remember that it didn't work quite well on some conditions...
>
> will check later.
It works, sorry. I forgave the -v flag on rawmidi program :) Thanks everybody.
Now I am trying to test the oss midi emulation. MIDI Output works, but no
input at all. I'm trying:
$ cat /dev/midi00 | od -x
(nothing happens, nor with /dev/snd/midiC0D0)
$ ls -l /dev/midi*
lrwxrwxrwx 1 root audio 10 dic 4 2001 /dev/midi ->
/dev/midi0
crw------- 1 plc audio 14, 2 dic 4 2001 /dev/midi0
crw------- 1 plc audio 14, 2 ago 30 2001 /dev/midi00
crw------- 1 plc audio 14, 18 ago 30 2001 /dev/midi01
crw------- 1 plc audio 14, 34 ago 30 2001 /dev/midi02
crw------- 1 plc audio 14, 50 ago 30 2001 /dev/midi03
crw------- 1 plc audio 14, 66 abr 18 20:17 /dev/midi04
Another question: I have a snd-ens1371 and two snd-usb-midi: a Roland/Edirol
UM-2 and a Midiman Midisport 2x2. These are my modules.conf settings:
alias char-major-116 snd
alias char-major-14 soundcore
options snd snd_major=116 snd_cards_limit=3
alias snd-card-0 snd-ens1371
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
# ------------- USB MIDI ------------
alias snd-card-1 snd-usb-midi
alias sound-slot-1 snd-card-1
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-8 snd-seq-oss
alias snd-card-2 snd-usb-midi
alias sound-slot-2 snd-card-2
alias sound-service-2-1 snd-seq-oss
alias sound-service-2-8 snd-seq-oss
with /dev/midi00 ouput goes to ens-1371, /dev/midi01 goes to the first usb
midi device, and /dev/midi02 goes to the second, but both usb devices have 2
inputs ans 2 outputs. Can I get all my five midi ports work with oss midi
emulation?
Thanks,
Pedro
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Bringing you mounds of caffeinated joy.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-05 17:30 ` Pedro Lopez-Cabanillas
@ 2002-07-08 10:40 ` Takashi Iwai
2002-07-08 15:41 ` Pedro Lopez-Cabanillas
0 siblings, 1 reply; 8+ messages in thread
From: Takashi Iwai @ 2002-07-08 10:40 UTC (permalink / raw)
To: Pedro Lopez-Cabanillas; +Cc: alsa-devel
At Fri, 5 Jul 2002 19:30:42 +0200,
Pedro Lopez-Cabanillas wrote:
>
> Another question: I have a snd-ens1371 and two snd-usb-midi: a Roland/Edirol
> UM-2 and a Midiman Midisport 2x2. These are my modules.conf settings:
>
> alias char-major-116 snd
> alias char-major-14 soundcore
> options snd snd_major=116 snd_cards_limit=3
> alias snd-card-0 snd-ens1371
> alias sound-slot-0 snd-card-0
> alias sound-service-0-0 snd-mixer-oss
> alias sound-service-0-1 snd-seq-oss
> alias sound-service-0-3 snd-pcm-oss
> alias sound-service-0-8 snd-seq-oss
> alias sound-service-0-12 snd-pcm-oss
> # ------------- USB MIDI ------------
> alias snd-card-1 snd-usb-midi
> alias sound-slot-1 snd-card-1
> alias sound-service-1-1 snd-seq-oss
> alias sound-service-1-8 snd-seq-oss
> alias snd-card-2 snd-usb-midi
> alias sound-slot-2 snd-card-2
> alias sound-service-2-1 snd-seq-oss
> alias sound-service-2-8 snd-seq-oss
>
> with /dev/midi00 ouput goes to ens-1371, /dev/midi01 goes to the first usb
> midi device, and /dev/midi02 goes to the second, but both usb devices have 2
> inputs ans 2 outputs. Can I get all my five midi ports work with oss midi
> emulation?
do you really need to use oss midi devices?
as long as you only reading/writing midi byte streams (i.e. no
ioctls), you can use simply alsa rawmidi devices, /dev/snd/midiCxDx,
instead of /dev/midiXX.
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-08 10:40 ` Takashi Iwai
@ 2002-07-08 15:41 ` Pedro Lopez-Cabanillas
2002-07-08 15:50 ` Takashi Iwai
0 siblings, 1 reply; 8+ messages in thread
From: Pedro Lopez-Cabanillas @ 2002-07-08 15:41 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel
El Lun 08 Jul 2002 12:40, Takashi Iwai escribió:
> At Fri, 5 Jul 2002 19:30:42 +0200,
> Pedro Lopez-Cabanillas wrote:
> > with /dev/midi00 ouput goes to ens-1371, /dev/midi01 goes to the first
> > usb midi device, and /dev/midi02 goes to the second, but both usb devices
> > have 2 inputs ans 2 outputs. Can I get all my five midi ports work with
> > oss midi emulation?
>
> do you really need to use oss midi devices?
> as long as you only reading/writing midi byte streams (i.e. no
> ioctls), you can use simply alsa rawmidi devices, /dev/snd/midiCxDx,
> instead of /dev/midiXX.
No, I agree with you. In fact, I don't need the raw midi devices at all, as
the sequencer API can do all and more.
My question was if I made a mistake or I am forgiving something, or if it is a
limitation on ALSA OSS emulation. Only trying to deeply test the new
snd-usb-midi driver. And for the fun of doing the things in several different
ways.
As an example, and only for fun, this is a bash script for cron (hourly, of
course) that plays thru raw midi devices without any special program.
Best regards,
Pedro
#!/bin/bash
#
# London Tower Big Ben tune as a simple bash script
# Copyright (C) 2002 Pedro Lopez-Cabanillas
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
tune="C 4, E 4, D 4, g 2, C 4, D 4, E 4, C 2, \
E 4, C 4, D 4, g 2, g 4, D 4, E 4, C 2,"
mididev="/dev/midi03"
tempo=80 # quarters per minute
function playnote() {
let "ms = 240000 / ($2 * $tempo)"
echo -ne '\x90' >&3
echo -ne "$1\144" >&3
sleep $ms'e-3s'
echo -ne '\x80' >&3
echo -ne "$1\000" >&3
}
function playtune() {
echo $1 | tr "cdefgabCDEFGAB" "<>@ACEGHJLMOQS" | \
while read -rd, note length; do
playnote $note $length
done
}
function playhour() {
h=`date +%l`
while [ $h -gt 0 ]; do
playnote $'\x37' 2
let "h--"
done
}
if [ -c $mididev -a -w $mididev ]; then
exec 3>$mididev
echo -ne '\xb0\x07\x7f' >&3 # volume = 127
echo -ne '\xc0\x0e' >&3 # instrument = bells
playtune "$tune"
sleep 2
playhour
exec 3<&-
else
echo "`basename $0` : invalid MIDI device ( $mididev )"
fi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: rawmidi problems
2002-07-08 15:41 ` Pedro Lopez-Cabanillas
@ 2002-07-08 15:50 ` Takashi Iwai
0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2002-07-08 15:50 UTC (permalink / raw)
To: Pedro Lopez-Cabanillas; +Cc: alsa-devel
At Mon, 8 Jul 2002 17:41:46 +0200,
Pedro Lopez-Cabanillas wrote:
>
> El Lun 08 Jul 2002 12:40, Takashi Iwai escribió:
> > At Fri, 5 Jul 2002 19:30:42 +0200,
> > Pedro Lopez-Cabanillas wrote:
> > > with /dev/midi00 ouput goes to ens-1371, /dev/midi01 goes to the first
> > > usb midi device, and /dev/midi02 goes to the second, but both usb devices
> > > have 2 inputs ans 2 outputs. Can I get all my five midi ports work with
> > > oss midi emulation?
> >
> > do you really need to use oss midi devices?
> > as long as you only reading/writing midi byte streams (i.e. no
> > ioctls), you can use simply alsa rawmidi devices, /dev/snd/midiCxDx,
> > instead of /dev/midiXX.
>
> No, I agree with you. In fact, I don't need the raw midi devices at all, as
> the sequencer API can do all and more.
>
> My question was if I made a mistake or I am forgiving something, or if it is a
> limitation on ALSA OSS emulation. Only trying to deeply test the new
> snd-usb-midi driver. And for the fun of doing the things in several different
> ways.
ok, point taken.
on OSS emulation, only up to two devices can be assigned per card.
one is assigned to /dev/midiXX and another to /dev/amidiXX.
which device is mapped can be changed via snd_midi_map and
snd_amidi_map options for snd-rawmidi module.
as default, they are specified as 0 and 1, respectively.
> As an example, and only for fun, this is a bash script for cron (hourly, of
> course) that plays thru raw midi devices without any special program.
cool :)
ciao,
Takashi
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Oh, it's good to be a geek.
http://thinkgeek.com/sf
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2002-07-08 15:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-05 15:53 rawmidi problems Pedro Lopez-Cabanillas
2002-07-05 16:33 ` Maarten de Boer
2002-07-05 16:57 ` Pedro Lopez-Cabanillas
2002-07-05 16:37 ` Takashi Iwai
2002-07-05 17:30 ` Pedro Lopez-Cabanillas
2002-07-08 10:40 ` Takashi Iwai
2002-07-08 15:41 ` Pedro Lopez-Cabanillas
2002-07-08 15:50 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.