|
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 |
|
From: Christian S. <sch...@so...> - 2005-02-09 01:59:15
|
Es geschah am Mittwoch 09 Februar 2005 02:00 als Mark Knecht schrieb: > 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. Well, just mixing does almost mean no cpu load. Memory bandwith will come more into weight. > 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] Ouch, would you please add the "SET ECHO 1" command to the beginning of your script. That will make the output much more readable! Because that way you can directly see which answer was followed by which command. CU Christian |
|
From: Mark K. <mar...@gm...> - 2005-02-09 02:44:23
|
On Wed, 9 Feb 2005 02:44:12 +0100, Christian Schoenebeck <sch...@so...> wrote: > Es geschah am Mittwoch 09 Februar 2005 02:00 als Mark Knecht schrieb: > > 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. > > Well, just mixing does almost mean no cpu load. Memory bandwith will come more > into weight. > > > 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] > > Ouch, would you please add the "SET ECHO 1" command to the beginning of your > script. That will make the output much more readable! Because that way you > can directly see which answer was followed by which command. > > CU > Christian > Here's what I see on the first instrument. IT doesn't liek the way I'm defining what I thought was the second half of the stereo connection: [mark@Godzilla LinuxSampler]$ cat ./LS-Orchestra-script | nc localhost 8888 OK CREATE AUDIO_OUTPUT_DEVICE JACK OK[0] SET AUDIO_OUTPUT_DEVICE_PARAMETER 0 CHANNELS=32 OK CREATE MIDI_INPUT_DEVICE ALSA OK[0] SET MIDI_INPUT_PORT_PARAMETER 0 0 ALSA_SEQ_BINDINGS="64:0" OK ADD CHANNEL OK[0] LOAD ENGINE gig 0 OK SET CHANNEL AUDIO_OUTPUT_DEVICE 0 0 OK LOAD INSTRUMENT "/home/mark/Gigs/GSt30/Vienna Symphonic Library/16 Bit looped In struments/01 VIOLINS_looped-16.gig" 0 0 OK SET CHANNEL VOLUME 0 0.40 OK SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0 OK SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1 ERR:0:There is no audio output device with index 1 SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 0 JACK_BINDINGS='alsa_pcm:playback_17' OK SET AUDIO_OUTPUT_CHANNEL_PARAMETER 0 1 JACK_BINDINGS='alsa_pcm:playback_18' OK SET CHANNEL MIDI_INPUT 0 0 0 0 OK What I thought I was saying was: SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0 SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1 means Engine 0 Channel 0 hooks to output 0 Engine 0 Channel 1 hooks to output 1 I thought Channel 0 and Channel 1 were the stereo pair from the gig file and outputs 0 & 1 were the LS outputs but I think that this is not what it means and I'm confused with this example. thanks all! Cheers, Mark |
|
From: Vladimir S. <ha...@gm...> - 2005-02-09 02:19:01
|
Hi guys, > > 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. > > Well, just mixing does almost mean no cpu load. Memory bandwith will come more > into weight. In case of jack, yes. But in case of multichannel card . . . there will also be a hit on the PCI throughput. I'm assuming that DMA is transferring the data. In some cases PCI could be a significant bottleneck too . . . But . . . if it is functionally required to have multiple HW channels (if mixing is done "outside" the sampler machine on some other system) then this is what we have to do, but for purely functional reasons, not for performance reasons. Regards, Vladimir. |
|
From: Mark K. <mar...@gm...> - 2005-02-09 04:07:49
|
On Tue, 8 Feb 2005 21:18:49 -0500, Vladimir Senkov <ha...@gm...> wrote: > Hi guys, > > > > 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. > > > > Well, just mixing does almost mean no cpu load. Memory bandwith will come more > > into weight. > > In case of jack, yes. > But in case of multichannel card . . . there will also be a hit on the > PCI throughput. > I'm assuming that DMA is transferring the data. > In some cases PCI could be a significant bottleneck too . . . > But . . . if it is functionally required to have multiple HW channels > (if mixing is done "outside" the sampler machine on some other system) > then this is what we have to do, but for purely functional reasons, > not for performance reasons. > > Regards, > Vladimir. I'll give some silly background on me and mixing paranoia. In the last few years it seems that every too I use I eventually find that the submix buses are the weakest part of the structure. The submix buses are always causing the most 'hidden' distortions. I don't know why. I read in Bob Katz's book that he thought both hardware and software developers didn't pay enough attention to all the stuff that can happen there in terms of signal overloads, etc. I don't know, but I've seen it to be true in higher end tools like Pro Tools and more moderate tools also. With that in mind I know get good metering in the HDSP 9652, bth under Windows with TotalMix and under Linux with hdspmixer. If a submix bus overloads I can see it. With the current state of LS I don't believe I could. As for PCI bus bandwidth, you're correct that this method uses more bandwidth, but the card is designed to handle 26 in and 26 out so I figure I might as well try. Besides I'm only sending PCM data out in this case. (LS as a stand alone sampler.) I'm not receiving any data so the PCI requirements are cut in half just due to that reason. Just my random thoughts, Mark |
|
From: Christian S. <sch...@so...> - 2005-02-12 01:05:55
|
Es geschah am Mittwoch 09 Februar 2005 03:44 als Mark Knecht schrieb: > SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0 > OK > SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1 > ERR:0:There is no audio output device with index 1 I hope that issue is now fixed with latest CVS. Please try out. Take the last example on http://www.linuxsampler.org/documentation.html as a starting point for your script. CU Christian |
|
From: Mark K. <mar...@gm...> - 2005-02-12 18:02:15
|
On Sat, 12 Feb 2005 02:06:30 +0100, Christian Schoenebeck <sch...@so...> wrote: > Es geschah am Mittwoch 09 Februar 2005 03:44 als Mark Knecht schrieb: > > SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 0 0 > > OK > > SET CHANNEL AUDIO_OUTPUT_CHANNEL 0 1 1 > > ERR:0:There is no audio output device with index 1 > > I hope that issue is now fixed with latest CVS. Please try out. Take the last > example on http://www.linuxsampler.org/documentation.html as a starting point > for your script. > > CU > Christian > Hi Christian, Thanks for working on this. It will take me quite awhile to really check this out. Here's my status after the first hour: 1) I rebuilt the whole package from scratch. (LS, libgig and liblscp) All 3 compiled and installed correctly. 2) I've loaded a few of my single gig scripts. (Piano, Scarbee) They are working fine. Note that they all use MIDI channel 1 and go to the first two alsa_pcm:playback_1/2 pair. 3) Next I loaded my existing LS-Orchestra-script, or what there is of it. It creates 32 outputs, loads 7 gigs and does the audio hook-up to a set of PCM outputs starting at playback_17. According to QJC all the outputs are there and seem to be hooked up. Now this is where it starts getting a little more difficult. The current mapping is supposed to look like this: violins, violas and cellos: playback_17/18, MIDI 1-3 trumpets, trombones, tuba & flute: playback_19/20, MIDI 4-7 piccalo: playback_21/22, MIDI 8 When I hook up VKEYBD which generates MIDI channel 1 I do seem to get the violin audio but I'm getting it on playback_21/22. This could certainly be due to some problem in my script that I haven't understood yet. I'll keep looking. I have not yet tried with other MIDI channels but I thought I'd send this feedback early so you could see if there is some simple problem that's causing this. I am setting up an orchestra MIDI file that I have to drive this and will let you know more later. Looks like a good start. I expect whether the problem is in LS or my scripts it will be discovered very soon. Thanks much, Mark |