Bug 188

Summary: LV2-plugin creates 32 outputs in ardour3 (current svn)
Product: LinuxSampler Reporter: gabbe.nord
Component: otherAssignee: Christian Schoenebeck <cuse>
Status: CLOSED INVALID    
Severity: normal CC: andreas56, vicsto
Priority: P5    
Version: SVN Trunk   
Hardware: PC   
OS: Linux   

Description gabbe.nord 2012-08-26 15:59:11 CEST
When adding the LV2-plugin to a3 (current svn only tested) 32 outputs on the channel is created automatically, where only 2 should be created.

Screenshot attatched, although uncertain of it's value for the bug-report.
Comment 1 Andreas Persson 2012-09-09 08:11:18 CEST
This is a feature not a bug... The plugin has 32 output channels (16 stereo pairs) so you can, if you want, route different instruments in LS to different outputs and thus use different effects on them.

There is a small bug in Ardour however. When you insert the LS LV2 plugin, Ardour assumes that the plugin output is 32 channel surround audio and inserts a surround panner. As we don't want a panner, but instead want to route the 32 channels independently to different buses, we need to disable the panner. The bug is that the panner is not shown until the song is closed and reopened.

So, to use the LS LV2 plugin in Ardour, you load it to a MIDI track and then save your session. Close the session and open it again. Then, in the mixer, right click on the blue circle shaped panner and choose "Bypass". On the button under the level meter, you probably want to choose "In". Click on the "*33*" at the bottom of the channel strip and choose the "Ardour Busses" tab to be able to route the LS output to different busses.

In the Fantasia gui you send the output of a sampler channel to two specific output channels by clicking on the sampler channel's Options button and then on the "CR" button.
Comment 2 Victor 2013-08-07 01:54:38 CEST
(In reply to comment #1)
> This is a feature not a bug... The plugin has 32 output channels (16 stereo
> pairs) so you can, if you want, route different instruments in LS to different
> outputs and thus use different effects on them.
> 
> There is a small bug in Ardour however. When you insert the LS LV2 plugin,
> Ardour assumes that the plugin output is 32 channel surround audio and inserts
> a surround panner. As we don't want a panner, but instead want to route the 32
> channels independently to different buses, we need to disable the panner. The
> bug is that the panner is not shown until the song is closed and reopened.
> 
> So, to use the LS LV2 plugin in Ardour, you load it to a MIDI track and then
> save your session. Close the session and open it again. Then, in the mixer,
> right click on the blue circle shaped panner and choose "Bypass". On the button
> under the level meter, you probably want to choose "In". Click on the "*33*" at
> the bottom of the channel strip and choose the "Ardour Busses" tab to be able
> to route the LS output to different busses.
> 
> In the Fantasia gui you send the output of a sampler channel to two specific
> output channels by clicking on the sampler channel's Options button and then on
> the "CR" button.

Sorry to reopen this discussion, but I really tried to use the plugin like you describe and I just can't seem to make sense of this workflow.

If you want to play several instruments, you usually put them on different midi tracks. However, if you add an LS plugin on each track, it adds 32 channels every time. Four instruments -> 128 channels... It can't be the intended way to use it (is it)?

As an alternative, I tried collecting the output of the different instrument tracks on a single track holding one LS plugin. But then the setup is really complicated: various midi tracks --> midi track with LS plugin --> various buses to control each instrument... It's probably more straightforward to use LS as a standalone server.

From the way you closed the bug I sense that I may have missed something. But I've been really trying hard and I can't see the "feature" side the 32 default channels.
For the moment, I'm using a patch which has circulated on Ardour users mailing list to revert the plugin to stereo (http://lists.ardour.org/pipermail/ardour-users-ardour.org/2013-January/012572.html). But please consider giving more explanations of the intended workflow with different midi tracks (or reverting to a stereo default).
Comment 3 Andreas Persson 2013-08-18 11:11:13 CEST
(In reply to comment #2)
> If you want to play several instruments, you usually put them on different midi
> tracks. However, if you add an LS plugin on each track, it adds 32 channels
> every time. Four instruments -> 128 channels... It can't be the intended way to
> use it (is it)?

No. It's inefficient (for both memory and cpu) to use a separate LS plugin instance for just one midi channel (even if you use the 2 channel patch you found). It's better to create a single track with the LS plugin, and then add up to 16 midi tracks without a plugin. Route the outputs of the midi tracks to the LS track.

The LS audio outputs can then be routed to separate audio buses in Ardour if you want to have different effects on different instruments. 

Note that it's important to select "bypass" on the surround panner in the LS track. I also choose "in" under the meter in the track so the wide 32 channel meter isn't shown.

> As an alternative, I tried collecting the output of the different instrument
> tracks on a single track holding one LS plugin. But then the setup is really
> complicated: various midi tracks --> midi track with LS plugin --> various
> buses to control each instrument... It's probably more straightforward to use
> LS as a standalone server.

I don't think it's that complicated. You'll get two tracks per instrument instead of one. Ardour is missing a feature that Reaper for example has: when you add an instrument with multiple audio outputs, the audio buses are created automatically for you.

> From the way you closed the bug I sense that I may have missed something. But
> I've been really trying hard and I can't see the "feature" side the 32 default
> channels.

The 32 channel feature isn't some novel idea I come up with. Other sampler plugins like Kontakt and SampleTank behave similarly. Actually, the LS VST plugin originally only had 2 channels, but 32 channels were soon requested in the forums.
Comment 4 Victor 2013-08-18 11:33:09 CEST
Ok. Thanks for your kind explanation. The inteded workflow is more clear for me now. I'll give it another try tonight.