Dynamically Change and Toggle Frame/Block Processing for a Network
-
I don't see a way to do this at the moment. We can wrap a chain into framex_block, and click to bypass it, but we can't link that bypass to a parameter.
Also, if we now want to go to block-based processing, what's the solution here? Wrap the framex-wrapped node into blockx?
There's also no way to dynamically switch between either the two or the block sizes.
Can we get a node that, like the dynamic oversampling node, has a parameter which we can link to, that has block sizes from 1 to 256?
-
I don't see a way to do this at the moment. We can wrap a chain into framex_block, and click to bypass it, but we can't link that bypass to a parameter.
I don't see a point of this. Either your algorithm absolutely needs frame based processing or it sounds like crap (then there's no point deactivating it) or it works with a block based processing, then the frame processor is overkill - also note that any frame based processing will always be a high contender for compilation where the C++ optimizer will squeeze out the last CPU cycle.
Toggling the processing on / off in the scriptnode network has the sole purpose of A/Bing the difference to evaluate the necessity of frame based processing.
Can we get a node that, like the dynamic oversampling node, has a parameter which we can link to, that has block sizes from 1 to 256?
Yes that is a far more realistic use case and it was on my list at some point. There's already the
fix_blockx
node which you can change dynamically, but it involves black magic fuckery aka grabbing the script reference to the node and set a static property.HiseSnippet 1280.3ocuW80SibCD2afEZ16ZONop9rUdJHgxk.bbmzopBDfqQs.QDNz8FxwqShEdsWY6bPZER8w90oey52f1wq2jcCfnPTaSdIi87mey3Y9YmtZEkYLJMJn54SRYnfWF1ahzNp8HBWh5b.J3Ug6M1pFxjLMwxhQ6OIkXLvOBBV5iNkBptLJ6ye9C6SDDIkUrDBcghSY+LOgaKVs6t+DWHNhDyNmmTR6s2sCUIaqDpw.fVJrIJkPuhLjcBwoVkPTvJGFysJcOKfECny9p3I8FotV50+Btg2WvbBsP8.G4WF0dDWD2cZxZPnfk6Vj5K4S8uM7XdLe15Ekf0x1.WXQ4ZPPkGCRsdFPJnDjV1CoWG1ip4o1hcb34EgcjVld.AJ0kghWWTk+nRXaEngz1HgbE6HMHLyh5sdayMva0b8ODE8l2f+jggsi3F7dc6fSX1QpXrUgGpI8wD7A85hkL60J8U3AZUBlHU1QLMNQEOVvhfiKiE+EhFGaRweO9P4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ZwjYO7uZ3wNY78txEttCdX9kT57t5dFt4hZ3VKpgaunF91E0vcVTCe2hZ36+mMz8+lb+8wDOwGBcb2CyZBCBNTR.N8rdczeC3iRevF
I wouldn't recommend doing this as an "official solution" though, the way of the dynamic oversample is much better, so I would need to change that node and make the block size available as automatable parameter.
-
@Christoph-Hart The idea is to offer low quality/draft, basic and ultra (which would only be interesting for some synths that get run through a truckload of distortion pedals) processing quality.
Along with the relatively new isNonRealtime method for the transport, we can then change or let the user set the type of processing for realtime vs offline usage.
You can find this type of setting in most of the popular softsynths, including some FX like reverb etc.
-
@aaronventure In that case I would recommend duplicating the network and compile two different versions, one with a frame processor, and one without, then swap the effect based on the quality setting.
If you want to reduce the redundancy of maintaining to almost identical DSP networks, you can implement the processing in a node and then just create another network where you wrap that network into a frame processor, then compile that as "high_quality" version.
-
@Christoph-Hart Huh it doesn't even need compilation, I can just plonk the project.network node and use the crossfade switcher for the three instances, but that makes any iterations super annoying, especially if you do it with multiple networks, then across multiple projects.
It's definitely doable, it's just unnecessarily hacky compared to the oversampling way which is super clean.
Increasing oversampling to 2x on a block8 network will double the resolution, right? For a final 48k output, the changes will now be every 4 samples instead of 8?
-
it's just unnecessarily hacky compared to the oversampling way which is super clean.
Yes, but the frame processing takes a completely different code path and it's just not a factor, so it's not easily comparable.
Increasing oversampling to 2x on a block8 network will double the resolution, right? For a final 48k output, the changes will now be every 4 samples instead of 8?
Depends on the order of the containers:
-
@Christoph-Hart said in Dynamically Change and Toggle Frame/Block Processing for a Network:
Yes, but the frame processing takes a completely different code path and it's just not a factor, so it's not easily comparable.
I understand that. So it depends on how you have done in the back whether it can be
if (par = 1) //frame else // blockx
and whether that's easy to implement.
-
@aaronventure hmm yeah actually now that you've dumbed it down like this I can put this logic into the
fix_blockx
node for the special case that you set the block size parameter to 1. -
@Christoph-Hart Alright, I've added a new container with this functionality:
https://docs.hise.audio/scriptnode/list/container/dynamic_blocksize.html
-
@Christoph-Hart perfect, and great docs too. Thanks!