multi input for sidechain/ducking
-
I managed to compile a vst with 4 inputs, but the second stereo input doesn't pass audio through the compiled plugin.
I changed 2 lines in "hi_dsp\plugin_parameter\PluginParameterProcessor.h"
(You can edit this file without having to recompile hise)adding this to the end of line 81
.withInput("Sidechain", AudioChannelSet::stereo());
and changing line 110 from this
return (layouts.getMainInputChannels() == 2 && layouts.getMainOutputChannels() == 2);
to this
return (layouts.getMainInputChannels() == 4 && layouts.getMainOutputChannels() == 2);
Now I just need to get the extra inputs to map to inputs 3 and 4 of the master chain. Like the first two are mapped to channels 1 and 2.
I'm only trying this with fx plugin generation.
Any ideas or a pointer or anything would be much appreciated... ~help
-
Can you direct input 3 to output into input 1, and input 4 to output into input 2?
-
I am happy to report that I got it working!! 4 inputs into a compiled vst and did processing and interaction on/between both channels!! Testing some things and I'll have more to post (:
-
@giftlift That's fantastic! What additional steps did you take after changing the code as detailed in your previous comment?
-
@giftlift well done! Post a snip so we can check it out
-
Sorry its taken so long to get back, my girly is 38 weeks pregnant, so yay!
I changed a lot of stuff, and I've been going through and seeing what is necessary and what isn't, but that's taking a long time. So here is what I have so far.
I'll update this as/if I figure more things out: Naming channels, dif input/output configs n stuff like that.I'm using scriptnode standalone
only compiling fx plugins as vst3sAgain not sure if every edit is necessary but this is working right now
In "hi_core\hi\core\MainController.cpp"
change line 745 to thisconst bool isUsingMultiChannel = multiChannelBuffer.getNumChannels() > 4;
And add these two lines after line 754
FloatVectorOperations::copy(thisMultiChannelBuffer.getWritePointer(2), buffer.getReadPointer(2), numSamplesThisBlock); FloatVectorOperations::copy(thisMultiChannelBuffer.getWritePointer(3), buffer.getReadPointer(3), numSamplesThisBlock);
Then add these two lines after line 764
FloatVectorOperations::add(buffer.getWritePointer(2), thisMultiChannelBuffer.getReadPointer(2), numSamplesThisBlock); FloatVectorOperations::add(buffer.getWritePointer(3), thisMultiChannelBuffer.getReadPointer(3), numSamplesThisBlock);
And these two after 788
FloatVectorOperations::copy(multiChannelBuffer.getWritePointer(2, 0), previewBuffer.getReadPointer(2, previewBufferIndex), numToPlay); FloatVectorOperations::copy(multiChannelBuffer.getWritePointer(3, 0), previewBuffer.getReadPointer(3, previewBufferIndex), numToPlay);
Then these two after 831
FloatVectorOperations::add(buffer.getWritePointer(2), thisMultiChannelBuffer.getReadPointer(2), numSamplesThisBlock); FloatVectorOperations::add(buffer.getWritePointer(3), thisMultiChannelBuffer.getReadPointer(3), numSamplesThisBlock);
Then change line 985 to this
getMainSynthChain()->getMatrix().setNumDestinationChannels(4);
Now save that file and open "hi_core\LibConfig.h"
change line 45 to this#define HISE_NUM_PLUGIN_CHANNELS 4
Save that file and open "hi_dsp\routing.cpp"
change line 37 to thisnumSourceChannels(4),
Save that and re/compile hise
This last file you can change without having to recompile hise
Ignore the edits to this file in my previous post, just
open "hi_dsp\plugin_parameter\PluginParameterProcessor.h"
and change line 110 toreturn true;
Save that and your ready to go.
For routing the master chain is connected like this
And I've only tested this so far in scriptnode and SNEX,
make sure your node channels are set to 4.Update us if any of y'all figure out anything new
~thanks~ -
@giftlift Amazing mate. I'm gonna try this asap!! Excellent work :)
-
@SteveRiggs Is this still needed or is there now access to multiple inputs ?
-
@lalalandsynth Yes AFAIK... That explains why I couldn't make 4 channel working in scriptnode haha...
-
@ustk Sidechains are needed ;)
-
Give us sidechain pleeeease
Anybody found any workarounds yet? -
@giftlift said in multi input for sidechain/ducking:
Again not sure if every edit is necessary but this is working right now
In "hi_core\hi\core\MainController.cpp"
change line 745 to thisNot only sidechain but multiple inputs , a few daws now support multiple input plugins.
Reaper.
Ardour.
Cakewalk.
I think Ableton supports up to 8 channels, but not tested it yet. -
@lalalandsynth In VST2 or only VST3?
-
@d-healey Vst 2 is what I have tested.
-
@lalalandsynth Any developments on "sidechain" or multiple inputs ?
-
I could really use this