On Dienstag, 20. April 2021 11:18:36 CEST Jan Flikweert wrote:
> Hi,
> 
> I attached two script files. The file corrincl18th.lscp is the result one
> track with the LS plugin with 16 instruments and a second track with again
> LS plugin instrument 17+18.
> 
> Kind regards,
> 
> Jan Flikweert
[snip]
> ADD CHANNEL
> SET CHANNEL MIDI_INPUT_DEVICE 14 0
> SET CHANNEL MIDI_INPUT_PORT 14 0
> SET CHANNEL MIDI_INPUT_CHANNEL 14 14
> LOAD ENGINE GIG 14
> SET CHANNEL VOLUME 14 1.0
> SET CHANNEL MIDI_INSTRUMENT_MAP 14 NONE
> SET CHANNEL AUDIO_OUTPUT_DEVICE 14 0
> LOAD INSTRUMENT NON_MODAL 'D:/Domus\x20gig/Nov2016mono/kromhoorn8.gig' 0 14
> 
> 
> ADD CHANNEL
> SET CHANNEL MIDI_INPUT_DEVICE 15 0
> SET CHANNEL MIDI_INPUT_PORT 15 0
> SET CHANNEL MIDI_INPUT_CHANNEL 15 15
> LOAD ENGINE GIG 15
> SET CHANNEL VOLUME 15 1.0
> SET CHANNEL MIDI_INSTRUMENT_MAP 15 NONE
> SET CHANNEL AUDIO_OUTPUT_DEVICE 15 0
> LOAD INSTRUMENT NON_MODAL 'D:/Domus\x20gig/Nov2016mono/Bourdon32.gig' 0 15
> 
> 
> ADD CHANNEL
> SET CHANNEL MIDI_INPUT_DEVICE 16 1

So it sets this one to MIDI channel 2 for some, unlike the other ones ...

> SET CHANNEL MIDI_INPUT_PORT 16 0
> SET CHANNEL MIDI_INPUT_CHANNEL 16 0
> LOAD ENGINE GIG 16
> SET CHANNEL VOLUME 16 1.0
> SET CHANNEL MIDI_INSTRUMENT_MAP 16 NONE
> SET CHANNEL AUDIO_OUTPUT_DEVICE 16 1
> LOAD INSTRUMENT NON_MODAL 'D:/Domus\x20gig/Nov2016mono/Gedekt8.gig' 0 16

... and sets this to a 2nd VST audio output device ...

> 
> 
> ADD CHANNEL
> SET CHANNEL MIDI_INPUT_DEVICE 17 0
> SET CHANNEL MIDI_INPUT_PORT 17 0
> SET CHANNEL MIDI_INPUT_CHANNEL 17 0
> LOAD ENGINE GIG 17
> SET CHANNEL VOLUME 17 1.0
> SET CHANNEL MIDI_INSTRUMENT_MAP 17 NONE
> SET CHANNEL AUDIO_OUTPUT_DEVICE 17 0
> LOAD INSTRUMENT NON_MODAL 'D:/Domus\x20gig/Nov2016mono/Larigot.gig' 0 17

... and the rest back to the 1sts VST audio output device.

Anyway, it's been a while that I used exactly the VST plugin and I have not 
written this particular plugin code.

The VST version of LS is a bit different than the other plugin types (AU, 
DSSI, LV2) of LS. If you look at src/hostplugins/vst/PluginVst.cpp you see 
right at the beginning of the source file that there is a hard coded amount of 
exactly 32 audio output channels for the VST plugin. So I think the idea was 
that one LS VST plugin instance can serve up to (32 / 2 = ) 16 tracks. And if 
you need more DAW tracks than that you would create a 2nd VST plugin device I 
think.

>From what I can remember there are 2 ways in Cubase to instantiate the VST 
plugin. You can either spawn it directly from a track, or rather from Cubase's 
main menu there is a menu entry "VST Devices". And I think I always created 
the LS VST plugin device in Cubase manually by the latter first and then I 
started creating tracks and assigned them to that LS VST plugin device (all 
within Cubase that is).

I remember there were discussions about this VST plugin topic before, i.e. 
somebody who raised the hard coded amount in PluginVst.cpp source file. You 
might find those discussions by searching the mailing list archive. 

You might try to ask Andreas if he can add more to this topic. For instance I 
can't remember the background why this design with exactly 32 audio channels 
was chosen, was this maybe a limitation of the VST standard or just some 
initial starting point for the LS VST plugin implementation? I simply don't 
know.

The VST plugin deserves some dedusting, but right now I don't have the time to 
test and debug the VST implementation, as I don't even have Cubase or another 
VST capable DAW app installed. But if somebody needs help on the code or 
debugging, I try to help where I can.

CU
Christian




_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to