Re: [LAD] More midi related questions

From: gene heskett <gheskett@email-addr-hidden>
Date: Wed Dec 14 2011 - 15:18:37 EET

On Wednesday, December 14, 2011 06:44:58 AM Clemens Ladisch did opine:

> gene heskett wrote:
> > # aplaymidi -l
> >
> > Port Client name Port name
> > 14:0 Midi Through Midi Through Port-0
> > 16:0 SB Audigy 2 Value [SB0400] Audigy MPU-401 (UART)
> > 16:32 SB Audigy 2 Value [SB0400] Audigy MPU-401 #2
> > 17:0 Emu10k1 WaveTable Emu10k1 Port 0
> > 17:1 Emu10k1 WaveTable Emu10k1 Port 1
> > 17:2 Emu10k1 WaveTable Emu10k1 Port 2
> > 17:3 Emu10k1 WaveTable Emu10k1 Port 3
> >
> > Can I make the inference that a .mid file sent to 14:0 should find its
> > way to one of the 17:n ports?
>
> Only if you have connected the output of 14:0 to one of the 17:n ports.
>
And how is this done?

> > Java, by its scanning methods, finds a huge list of ports, but only
> > the semi-broken, internal to java, synth actually makes a noise.
>
> But does it find those sequencer ports?

This java .jar logs to the screen that launched it, an error line for every
note in a file sent, except when the internal java synth is used. Example:
13 Dec 2011 17:28:25 WARN [dwproto-0-9 ] lhandler.DWProtocolHandler:
UNKNOWN OPCODE: 252

The opcode changes but nothing else.

 
> > If I switch to amidi -l, the list is a bit shorter:
> > Dir Device Name
> > IO hw:0,0 Audigy MPU-401 (UART)
> > IO hw:0,1 Audigy MPU-401 #2
> > IO hw:0,2 Emu10k1 Synth MIDI (16 subdevices)
> > IO hw:0,3 Emu10k1 Synth MIDI (16 subdevices)
> >
> > but sending a midi file to the latter pair, while taking the normal
> > play time for the file, is also silent.
>
> How are you trying to send a midi file to a raw MIDI port?

For testing my hardware, aplaymidi -p client:port# song.mid
where
aplaymidi -p17:0 file.mid
works, and
aplaymidi -p14:0 file.mid
goes through the motions for the 29 second length of the file.mid, but
makes no sound.

amidi, otoh, returns (hw0:0) type answers and should be able to play a file
with the '-s song.mid' when the -p is one of
root@email-addr-hidden Download]# amidi -l
Dir Device Name
IO hw:0,0 Audigy MPU-401 (UART)
IO hw:0,1 Audigy MPU-401 #2
IO hw:0,2 Emu10k1 Synth MIDI (16 subdevices)
IO hw:0,3 Emu10k1 Synth MIDI (16 subdevices)
The last 2 above.

However, I have no .syx files, whatever they are, to test with. Only .mid,
some of which are 20+ years old. They originate on a 'legacy' computer (a
TRS-80 Color Computer 3 running Ultimuse3 as .ume files, but which that
machine can convert to .mid by telling it to use a file as the output
device rather than its own hardware. The output device this old machine's
sw originally used was a bitbanger port running at midi's 31250 baud speed,
but the cpu in that machine has been changed to a slightly faster Hitachi
HD63C09EP, so that port now runs at about 37,000 baud and none of my
keyboards recognize the data.

So we now have a java app that runs on a 'server' box like this linux box,
which talks to this legacy machine at 115,000 baud using that bitbanger
port, which in turn allows the old machine to even access .dsk disk image
files as virtual disk drives by using the URL of the image, or service a
telnet client with up to 15 sessions, but one of those virtual paths is
accessed on the CoCo as /MIDI, with the .jar code then sending that .mid
style data someplace on this machine that knows what to do with midi data
when it comes up the cable. The .jar has an internal synth too, and can
feed its output to the sound card, but there are huge errors in the sound
because the 20 year old stuff is not GM. The melody line is a screaming
picolo being blown with a 175 psi air nozzle, very unpleasant.

The .jar reports a very lengthy list, 69 total, of potential places it can
send this rawmidi data, one of which I believe is equ to 14:0 above, listed
as choice "#68 realtime synth" in its pulldown, and which java somehow
expands most of into the "hw0:0" through "hw0:3" style. But in testing,
only the internal java synth makes noise, and I believe the error is the
lack of coupling between the 14:0 port shown above, and one of the 4 ports
at 17:0 through 17:3, none of which show in an "ls -l /dev".

But:

[root@email-addr-hidden johnny_cash]# ls -l /dev|grep 14,
crw-rw----+ 1 root audio 14, 14 Nov 17 21:02 admmidi
crw-rw----+ 1 root audio 14, 12 Nov 17 21:02 adsp
crw-rw----+ 1 root audio 14, 13 Nov 17 21:02 amidi
crw-rw----+ 1 root audio 14, 4 Nov 17 21:02 audio
crw-rw----+ 1 root audio 14, 9 Nov 17 21:02 dmmidi
crw-rw----+ 1 root audio 14, 3 Nov 17 21:02 dsp
crw-rw----+ 1 root audio 14, 2 Nov 17 21:02 midi
crw-rw----+ 1 root audio 14, 0 Nov 17 21:02 mixer
crw-rw----+ 1 root audio 14, 1 Nov 17 21:02 sequencer
crw-rw----+ 1 root audio 14, 8 Nov 17 21:02 sequencer2

So there seems to be a missing link, but where?

/rant on because its extremely frustrating:

IMO, linux has a huge disconnect in its handling of "devices", some of
which are shown above, but howinhell does a list like the above get
converted to a "hwN:N" format, IOW how or where is the lookup translation
table so that the user can trace this stuff himself without having to
pester several mailing lists in search of a solution.

Its a 17,000 pound bull elephant in full musk in the room that is being
seemingly ignored.

One should simply be able to use the udev generated listing above and be
done with it, for everything. Somehow, I am not grokking the concept of
how this actually works. My fault? Damnedifiknow. URL's to read
welcomed.

/rant off.

And now it looks like I'll have to reboot to restore udev, playing with
"cat file.mid >/dev/one of the devices listed above" I seem to have trashed
the majority of my audio system. Sigh.... Off to reboot after nearly 27
days uptime.

> > From the lengthy output of amixer contents:
> > numid=7,iface=MIXER,name='Synth Playback Volume'
> >
> > ; type=INTEGER,access=rw---R--,values=2,min=0,max=100,step=0
> >
> > : values=72,72
> > :
> > | dBscale-min=-40.00dB,step=0.40dB,mute=1
> >
> > does mute=1 mean it is live, not off?
>
> In the dBscale line, it means that the minimum value would mute.

I see, thank you Clemens. I appreciate the help, a lot.
>
> Regards,
> Clemens

Cheers, Gene

-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene>
<KnaraKat> Bite me.
* TheOne gets some salt, then proceeds to nibble on KnaraKat a little
         bit....
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Wed Dec 14 16:15:02 2011

This archive was generated by hypermail 2.1.8 : Wed Dec 14 2011 - 16:15:02 EET