Re: [LAU] live performance, midi program change from the keyboard

From: Renato Budinich <rennabh@email-addr-hidden>
Date: Fri Feb 11 2011 - 10:51:39 EET

On Thu, Feb 10, 2011 at 5:56 PM, Alessandro Preziosi
<lsnpreziosi@email-addr-hiddenwrote:

> i need to do something relatively simple, but i cant figure out how to do
> it, or what software i need...
> basically i have to play a certain song where i need to switch between
> different sounds (say, a piano at the beginning using qsyinth and then a
> synth created with zynaddsubfx). I want to be able to switch between one
> setup to the other quickly, possibly using the program change from my
> keyboard. How do i do that???
>
> On my keyboard i can create different programs, each using different sounds
> (patches) and switch between them with the click of a button. I want to use
> that, but I want to generate the sounds with my computer.
> I think I need a way to 'map' midi channels to different programs or midi
> patches to specific programs (like, when i select piano on the keyboard
> (patch0, bank0) it uses qsynth, and when i select a synth it uses
> zynaddusbfx).
> Any ideas?
>
> Thank you very much,
>
> Alessandro Preziosi
>
>
>

It probably is an overkill for your problem, but I did this small
supercollider program; basically it makes an Alsa midi client to which you
send program changes and it changes through jack connections created by
jack_snapshot. So to use it you would create a jack_snapshot for each
synth/set of connections, save them and put the in "files" variable

Hope it works since I haven't time to test it now and it's been a while
since I've used it... also I remember for some strange reason if I gave it
many program changes rapidly one after the other it would clog the cpu

ah yes, once you have supercollider installed you could simply run it from
command line with "sclang jack-switcher.sc"

HTH,
renato

jack-switcher.sc:
(
//var midichan, files = "jsfiles".getenv.split($ );
var midichan, files;
files = ["/home/renato/Audio/1.snp","/home/renato/Audio/2.snp"]; //these
have to be files obtained through "jack_snapshot save 1.snp"

//Starts MIDI client
MIDIClient.init;
MIDIIn.program = {arg src, chan, prog;

                [src,chan,prog].postln;

                ("jack_snapshot restore
"++files[prog.min(files.size)]).unixCmd;
                };

)

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Fri Feb 11 12:15:01 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 11 2011 - 12:15:01 EET