|
From: Mark K. <mar...@gm...> - 2005-02-09 01:00:09
|
Hi there, I'm trying to write a script to set up LS to do a complete Orchestra but I'm having some problems with some of the LSCP concepts. I hope this question ends up making sense. It seems hard to describe. I apologize in advance as to the length of this. It seems impossible to cut the size down and get all the info in here. I hope you'll read as it will likely make a good tutorial for others later. Since I run with a nice RME card that supports hardware mixing I want to do mixing either in Jack or hardware mixing. For this reason my approach to setting up the orchestra might be a bit different than others. I'm not sure. It seems to me that there are 3 ways to mix audio coming out of LS: a) Mixing internal to LS and then one mixed output comes out. This attaches to a single stereo alsa_pcm:playback_XX channel. All audio is already mixed. b) Separate outputs for each gig come out and attach to the same Jack alsa_pcm:playback_XX channel. In this case Jack mixes the audio channels. c) Separate outputs for each gig come out but attach to separate alsa_pcm:playback_XX channels. The audio is mixed in hardware with no CPU overhead. I prefer long term to use a combination of b & c. What I want to do is set up four mixed channels. Each instrument coming out of LS should be a separate audio stream. Mixing is handled either in Jack software, RME hardware or remotely in Pro Tools: 1 - Strings (mixed by Jack) - violins - MIDI 1 - violas - MIDI 2 - cellos - MIDI 3 2 - Brass (mixed by Jack) - trumpets - MIDI 4 - trombones - MIDI 5 - french horns - MIDI 6 3 - Wind & reed (mixed by Jack) - flutes - MIDI 7 - piccalos - MIDI 8 - clarinets - MIDI 9 - oboes - MIDI 10 - bassoons - MIDI 11 4 - Percussion (mixed by Jack) - concert snare - MIDI 12 - timphani - MIDI 13 5 - Piano (not mixed or mixed with percussion in some cases) - Grand piano - MIDI 14 (This gets extended a bit if I use my second MIDI input...) As a start this allows me to build most of an orchestra and is pretty similar to the way I work with GSt. However really getting this to work in LS to some extent eludes me, at least getting LS to be happy with all my commands. To try just the first part of this happen I've written enough to try and get 4 instruments in. (3 strings and one brass) I create 32 channels to handle 16 MIDI channels. I expect to use all these and possibly more up if LS can stand up to it: CREATE AUDIO_OUTPUT_DEVICE JACK SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=32 CREATE MIDI_INPUT_DEVICE ALSA SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0" ADD CHANNEL LOAD ENGINE gig 0 SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0 LOAD INSTRUMENT "/home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/01 VIOLINS_looped-16.gig" 0 0 SET CHANNEL VOLUME 0 0.40 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_17' SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_18' SET CHANNEL MIDI_INPUT 0 0 0 0 ADD CHANNEL LOAD ENGINE gig 1 SET CHANNEL AUDIO_OUTPUT_DEVICE 1 0 LOAD INSTRUMENT "/home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/02 VIOLAS_looped-16.gig" 0 1 SET CHANNEL VOLUME 1 0.40 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 2 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 3 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 2 JACK_BINDINGS='alsa_pcm:playback_17' SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 3 JACK_BINDINGS='alsa_pcm:playback_18' SET CHANNEL MIDI_INPUT 1 0 0 1 ADD CHANNEL LOAD ENGINE gig 2 SET CHANNEL AUDIO_OUTPUT_DEVICE 2 0 LOAD INSTRUMENT "/home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/03 CELLI_looped-16.gig" 0 2 SET CHANNEL VOLUME 2 0.40 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 4 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 5 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 4 JACK_BINDINGS='alsa_pcm:playback_17' SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 5 JACK_BINDINGS='alsa_pcm:playback_18' SET CHANNEL MIDI_INPUT 2 0 0 2 ADD CHANNEL LOAD ENGINE gig 3 SET CHANNEL AUDIO_OUTPUT_DEVICE 3 0 LOAD INSTRUMENT "/home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/23 Trumpet_looped-16.gig" 0 3 SET CHANNEL VOLUME 3 0.40 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 6 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 7 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 6 JACK_BINDINGS='alsa_pcm:playback_19' SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 7 JACK_BINDINGS='alsa_pcm:playback_20' SET CHANNEL MIDI_INPUT 3 0 0 3 However when I run this I get some weird results. (I'm choosing to leave the OK's in the listing in case someone needs them to count commands.) QUESTIONS: 1) Why does the first gig say "AUDIO_OUTPUT_ROUTING: 6,1". All the others say "AUDIO_OUTPUT_ROUTING: 0,1"? 2) What the "Err:0:Unknown command."? If I count 5 down in the script it looks like it doesn't like the "ADD CHANNEL" command. Am I counting this correctly? 3) In QJackCtl I see the first 3 instruments going to playback_17/18 and the 4th instrument going to playback_19/20. Is it doing what I need it to do? [mark@Godzilla LinuxSampler]$ cat ./LS-Orchestra-script | nc localhost 8888 OK[0] OK OK[0] OK Err:0:Unknown command. OK[0] OK OK OK OK OK ERR:0:There is no audio output device with index 1 OK OK OK Err:0:Unknown command. OK[1] OK OK OK OK OK ERR:0:There is no audio output device with index 1 OK OK OK Err:0:Unknown command. OK[2] OK OK OK OK OK ERR:0:There is no audio output device with index 1 OK OK OK OK[3] OK OK OK OK OK ERR:0:There is no audio output device with index 1 OK OK OK ENGINE_NAME: GigEngine VOLUME: 0.400 AUDIO_OUTPUT_DEVICE: 0 AUDIO_OUTPUT_CHANNELS: 2 AUDIO_OUTPUT_ROUTING: 6,1 MIDI_INPUT_DEVICE: 0 MIDI_INPUT_PORT: 0 MIDI_INPUT_CHANNEL: 0 INSTRUMENT_FILE: /home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/01 VIOLINS_looped-16.gig INSTRUMENT_NR: 0 INSTRUMENT_STATUS: 100 . ENGINE_NAME: GigEngine VOLUME: 0.400 AUDIO_OUTPUT_DEVICE: 0 AUDIO_OUTPUT_CHANNELS: 2 AUDIO_OUTPUT_ROUTING: 0,1 MIDI_INPUT_DEVICE: 0 MIDI_INPUT_PORT: 0 MIDI_INPUT_CHANNEL: 1 INSTRUMENT_FILE: /home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/02 VIOLAS_looped-16.gig INSTRUMENT_NR: 0 INSTRUMENT_STATUS: 100 . ENGINE_NAME: GigEngine VOLUME: 0.400 AUDIO_OUTPUT_DEVICE: 0 AUDIO_OUTPUT_CHANNELS: 2 AUDIO_OUTPUT_ROUTING: 0,1 MIDI_INPUT_DEVICE: 0 MIDI_INPUT_PORT: 0 MIDI_INPUT_CHANNEL: 2 INSTRUMENT_FILE: /home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/03 CELLI_looped-16.gig INSTRUMENT_NR: 0 INSTRUMENT_STATUS: 100 . ENGINE_NAME: GigEngine VOLUME: 0.400 AUDIO_OUTPUT_DEVICE: 0 AUDIO_OUTPUT_CHANNELS: 2 AUDIO_OUTPUT_ROUTING: 0,1 MIDI_INPUT_DEVICE: 0 MIDI_INPUT_PORT: 0 MIDI_INPUT_CHANNEL: 3 INSTRUMENT_FILE: /home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped Instruments/23 TRUMPET_looped-16.gig INSTRUMENT_NR: 0 INSTRUMENT_STATUS: 100 . [mark@Godzilla LinuxSampler]$ thanks! - Mark |