[linux-audio-user] Sofsynths & ALSA MIDI Questions

NiXO Beee nixobeee at hanginggarden.dyndns.org
Sun May 15 00:14:16 EDT 2005


> > > Here is my problem :
> > > -jack_fst's plugins respond to after touch in a strange way : they
> > > change presets according to pressure. I recorded some midi to check
> > > what was going on, and Muse and Rosegarden as well are recording plain
> > > vanilla after touch, so I do not understand what's going on...
>
> you are seeing a bug in jack_fst.
> i did not have a midi keyboard when i developed it, and used vkeybd
> which does not do aftertouch.
>
> look in vsti.c and SND_SEQ_EVENT_CHANPRESS:
> either find the correct midi code for chanpress or uncomment it
> if you find the correct on mail it to me.
>
> and i send you xfst.

I uncommented the debug output printf for channel pressure.
When running jack_fst from a terminal here is what it prints out while using 
after touch :
chanpress: 0 0 0
chanpress: 1 0 0
chanpress: 2 0 0
chanpress: 3 0 0
chanpress: 0 0 11
chanpress: 1 0 11
chanpress: 2 0 11
chanpress: 3 0 11
chanpress: 0 0 62
chanpress: 1 0 62
chanpress: 2 0 62
chanpress: 3 0 62
<snip...>
chanpress: 0 0 127
chanpress: 1 0 127
chanpress: 2 0 127

For memory :
printf("chanpress: %d %d 
%d\n",event->data.control.channel,event->data.control.param,event->data.control.value);

I also ran accross this very neat MIDI specifications :
http://www.borg.com/~jglatt/tech/midispec.htm

It pointed out a difference between aftertouch and channel pressure I wasn't 
aware of.
I did a little test and recorded a few notes both in rosegarden and muse, then 
had a look in the event list.
I was a bit confused at start since the event list in Rosegarden lists a serie 
of 'channel pressure' events (It seems the same controller is sent wether I 
play a single note or a whole chord, so I guess my keyboard is 
pressure-monophonic -> same pressure sent for the whole chord).
In muse, the event list shows a serie of 'ChAT' events proposing the same 
values. I imagine 'ChAT' stands for Channel AfterTouch, but as the values are 
sent only once for the whole channel, it is really 'Channel Pressure' and not 
'Aftertouch'.

Well, here are the figures :

Status 	0xD0 to 0xDF where the low nibble is the MIDI channel. 
Data	One data byte follows the Status. It is the pressure amount, a value from
	0 to 127 (where 127 is the most pressure). 
See :	http://www.borg.com/~jglatt/tech/midispec/pressure.htm
and :	http://www.srm.com/qtma/davidsmidispec.html

I tried to mess with the midi message sent in the vsti.c, but I only succeded 
in stopping the ch pressure being sent correctly to the plug in... (midi 
learn function does not learn anything).

For now, I changed the controller sent by the keyboard (in the keyboard midi 
setup I mean) to something valid.


Hope this helps !
If not, well, I learnt some neat MIDI stuff along the readings :)

-- 
[ NiX=O Beee ]
--
C'est dans la marine qu'il y a le plus de cocus.
Marcel Pagnol.


More information about the linux-audio-user mailing list