Compiled Network Fixed Channel Count?
-
@Stuart-Cochrane Make a separate thread
-
@David-Healey Yes that is the case - the optimization possibilities that come from assuming a fixed channel were too tempting.
IIRC Faust also assumes some kind of known channel set, no?
-
@Christoph-Hart Would it be possible to make it still work with fewer channels without sacrificing optimisation? For my framework I want to support projects from 2 to 16 channels but I don't want to maintain that many versions of each effect. If I could just make a 16 channel version that would be good.
-
@David-Healey what's the effect? just a mixer?
If you use it in different projects we might solve this by allowing FixChannelAmount to be a preprocessor, then it can pull in the actual channel count from the project it compiles the DLL too? So if Project A needs 6 channels, but Project B needs 16, you can just enter
NUM_PLUGIN_CHANNELS(or whatever preprocessor you define) and it should cleanly pass that through to the C++ code generator. -
@Christoph-Hart said in Compiled Network Fixed Channel Count?:
what's the effect? just a mixer?
I have my multi-channel simple gain thingy and a couple of filters (until the stock filter is fixed anyway).
I'd prefer to stay clear of scriptnode but I have some releases upcoming and it seems like the best way to get around the current issues I'm having.
@Christoph-Hart said in Compiled Network Fixed Channel Count?:
If you use it in different projects we might solve this by allowing FixChannelAmount to be a preprocessor
I don't think that will work because my projects are all expansions for Rhapsody, so the count will be fixed at the player level.
-
@David-Healey but with rhapsody you cannot pull in compiled effects anyway unless you embed them in the player binary - that's the one hard restriction that comes with the full player expansion system.
-
@Christoph-Hart My plan is to embed them in the binary since I need them in almost every project
-
@David-Healey ah ok. BTW are you sure you need to compile them? If you're just using a simple multi channel DSP network with multiple gain modules in a container.multi container, then the DSP overhead is negligible - definitely lower than the old scripting approach.
-
@Christoph-Hart said in Compiled Network Fixed Channel Count?:
definitely lower than the old scripting approach.
In that case no I probably don't need to compile them, so that solves it :)
-
@Christoph-Hart Hmm I just realised I have the same problem, when I bring in my dsp xml that's setup for 16 channels into a project with only 6 it reds everything out and tells me there aren't enough channels.
So I remove the extra ones but then I'm left with another file to maintain in my framework so it doesn't really make the situation any easier. If it was just one effect it wouldn't be an issue but this seems like it will be the same for any scriptnode effect I want to use with Rhapsody.
Or will it still work but just show the angry red box?
-
U ustk referenced this topic
-
@David-Healey nope, won't work.
What if you actually create the network dynamically?
// define this somewhere in your interface script global NUM_CHANNELS = 8; // Put this code in a Script FX that is set to use the number of channels const var dsp = Engine.createDspNetwork("mixer"); const var mixer = dsp.get("mixer"); const var multi = dsp.createAndAdd("container.multi", "multi", "mixer"); for(i = 0; i < (NUM_CHANNELS/2); i++) { // create a gain module var g = dsp.createAndAdd("core.gain", "gain" + (i+1), multi); // fetch the gain parameter var dst = g.getOrCreateParameter("Gain"); // create a root parameter var src = mixer.getOrCreateParameter({ "ID": "Gain" + (i+1), "mode": "Decibel" }); // connect the two dst.addConnectionFrom({ID: "mixer", "ParameterId": "Gain" + (i+1)}); // copy the range to the source parameter // (make the warning icon disappear...) src.setRangeFromObject(dst.getRangeObject()); } -
@Christoph-Hart Ahh that's an idea, I haven't explored that side of scripting. I could pull the number of channels from the master container's routing matrix.