[alsa-devel] [PATCH - alsa-utils 5/5] The amidicat program itself, better late than never
Sergey
sergemp at mail.ru
Wed Jul 9 01:55:18 CEST 2014
Jun 30 2014, Josh Lehan wrote:
> Signed-off-by: Josh Lehan < alsa at krellan.com >
>
> diff --git a/amidicat/amidicat.c b/amidicat/amidicat.c
This is kind of a bugreport for amidicat.
I tested amidicat. The first use case I thought was:
[remotehost]$ timidity -iA -Os -B2,8 &
[remotehost]$ nc -l -p 12345 | amidicat --port 129:0 --noread --verbose --hex
[localhost]$ vkeybd &
[localhost]$ amidicat --port 128:0 --nowrite --verbose --hex | nc remotehost 12345
But that have not worked from the beginning.
First, I noticed that "amidicat" is not listed in `aconnect -iol` output. Why?
$ timidity -iA -Os -B2,8 &
$ nc -l -p 12345 | amidicat --port 128:0 --noread --verbose --hex
Then in another terminal:
$ aconnect -iol
client 0: 'System' [type=kernel]
0 'Timer '
1 'Announce '
client 14: 'Midi Through' [type=kernel]
0 'Midi Through Port-0'
client 128: 'TiMidity' [type=user]
0 'TiMidity port 0 '
Connected From: 129:0
1 'TiMidity port 1 '
2 'TiMidity port 2 '
3 'TiMidity port 3 '
Notice the "Connected From: 129:0" line, but no "client 129". However:
$ amidicat --list
Port Client name Port name rwRW
0:0 System Timer rwR-
0:1 System Announce r-R-
14:0 Midi Through Midi Through Port-0 rwRW
128:0 TiMidity TiMidity port 0 -w-W
128:1 TiMidity TiMidity port 1 -w-W
128:2 TiMidity TiMidity port 2 -w-W
128:3 TiMidity TiMidity port 3 -w-W
129:0 amidicat amidicat -w--
130:0 amidicat amidicat rwRW
Also, it prints nothing in the following case:
$ vkeybd &
$ amidicat --port 128:0 --nowrite --verbose --hex
except initial "Connected to ALSA sequencer on port 130:0" line
which itself looks suspicious, since I asked it to connect on port 128:0.
Maybe that line could be like:
Created ALSA sequencer port 130:0
or even
Created ALSA sequencer port 130:0, connected to 128:0
However `aseqdump` works like that:
$ vkeybd &
$ aseqdump -p 128:0
Even more interesting test: run them all.
[console1]$ vkeybd &
[console1]$ aseqdump -p 128:0
press a key, as expected I see:
128:0 Note on 0, note 60, velocity 127
128:0 Note off 0, note 60, velocity 0
while `aseqdump` is still running in another terminal I start `amidicat`:
[console2]$ amidicat --port 128:0 --nowrite --verbose --hex
then press a few keys and in aseqdump terminal I see:
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
128:0 Note on 0, note 60, velocity 127
how could that be? I pressed different keys, why same "Note on"?
then I interrupt `amidicat` with Ctrl+C and instantly see:
128:0 Note on 0, note 60, velocity 127
128:0 Note off 0, note 60, velocity 0
128:0 Note on 0, note 62, velocity 127
128:0 Note off 0, note 62, velocity 0
128:0 Note on 0, note 64, velocity 127
128:0 Note off 0, note 64, velocity 0
128:0 Note on 0, note 65, velocity 127
128:0 Note off 0, note 65, velocity 0
128:0 Note on 0, note 67, velocity 127
128:0 Note off 0, note 67, velocity 0
amidicat terminal was still empty, nothing except initial "Connected to ..." line.
Expected results:
amidicat prints events from vkeybd
does not affect other apps, e.g. aseqdump
and is listed in `aconnect -iol` output
Note: I tested that on debian oldstable with alsa 1.0.23, could that be the reason?
Can you reproduce that on your system?
Thank you for an interesting tool.
--
Sergey
More information about the Alsa-devel
mailing list