Scriptnode cpu ?
-
Is it normal for the Scriptnode to be so CPU hungry or is the Hise cpu meter inaccurate as it does not match the task manager one ?
Is it expected that one would export as cpp and incorporate like that or will it take less when exported as VST ?
I am working on an ensemble fx , and just the modulation(no delays) with no samplers or instruments loaded is about 3-4 % on my CPU on the HISE cpu meter and 0.7 in Task manager.
-
it's been a while since i've exported anything with scriptnode but iirc it's much lower once it's a binary, my most complicated stuff was running at 7% in HISE and less than 1% in ableton
your milage may vary :)
-
I'm definitely finding plugins that make use of Scriptnode to be very CPU hungry, both within HISE and when exported as VST/AU.
Especially when using the 'transient designer' and the 'delay_a' nodes.Is there a special way to export/compile fx plugins that use Scriptnode for optimal performance, or are we doomed to eternal CPU hell?
-
Sorry I'm changing my answer lol lately my scriptnode trees are using up to 30% CPU in HISE and 8-10% in Ableton.
Exporting them to meta nodes doesn't seem to affect it.
-
I know it's a shame that Scriptnode has a tendency to eat up CPU.
The concept is great though!
Please let me know if you come up with any work arounds. -
Just found this
@Christoph-Hart said in Trying to create a random pitch detune effect in HISE:
Also be aware that scriptnode patches which use frame-based processing are supposed to be compiled into a C++ module for production builds - if you compile it to C++ that particular patch shouldn't take more than 0.5% - even in the HISE CPU meter.
I'm not using frame-based, but how do we "compile to C++"? Does that just mean exporting the project to a binary? Or is this to do with meta nodes or something?
Any scriptnode gurus out there? @ustk
-
What are you doing that eats up 30% CPU? You can send me a screenshot of the full patch per PM if you want to keep your magic private :)
Again: scriptnode is being heavily rewritten at the moment and there are a few occassions where the CPU usage was excessively high, which is now more optimised (IIRC a modulation connection caused an UI update per sample which was unnecessary). However using a scriptnode patch in the compiled plugin is not advised because there are limits what a interpreted DSP graph can achieve regarding performance.
In order to get a reasonable performance from scriptnode you need to create a C++ node from it - this is where the real magic of scriptnode comes in as it allows you to transform the DSP algorithm that you've designed within scriptnode into a fully optimisable C++ class. I did that for some of the effects in PercX and there is no difference regarding performance to the ones that I've handwritten in C++.
Unfortunately the code generator is broken in the current scriptnode branch (it did work before I started the rewrite, but now it's in a nimbus state until I get this overly massive rewrite done).
-
Ah also that entire custom node location thing will be removed. You will just export all the scriptnode patches as a dedicated .dll that will be loaded by HISE for each project during development and when you export your final plugin it will be embedded into the code (so you donβt have to drag another dll around).
-
@Christoph-Hart said in Scriptnode cpu ?:
it's in a nimbus state until I get this overly massive rewrite done).
And you receive an overly massive encouragement for the titan work this represents!
Really happy to see all those commit notifications every day! :)The new node exporting system seems to be easier than the actual export, and I can't complain!
-
@Christoph-Hart said in Scriptnode cpu ?:
What are you doing that eats up 30% CPU? You can send me a screenshot of the full patch per PM if you want to keep your magic private :)
Nothing too crazy, I'm okay with showing some snippets if it helps other people learn (although I'm probably doing it wrong since it's using so much CPU).
These are 2 of 3 node trees for this one Exciter plugin, I've already read the threads about Transient Shaper node using a bit of CPU, but the other plugins (FET Compressor, Saturator, Basic EQ) all have around 9% in ableton. I can't run more than 2-3 copies of each before my audio hangs.
However using a scriptnode patch in the compiled plugin is not advised because there are limits what a interpreted DSP graph can achieve regarding performance.
In order to get a reasonable performance from scriptnode you need to create a C++ node from it
Unfortunately the code generator is broken in the current scriptnode branch (it did work before I started the rewrite, but now it's in a nimbus state until I get this overly massive rewrite done).
Damn that's tragic, thanks for explaining though :) Do you have a rough eta for us? I really do appreciate all the work you're doing.
-
I'm stupid, I didn't expect the oversampling nodes to have that much impact, I'll have to lower them to 4x...
I wonder what the ideal middle-ground is for anti-aliasing and performance. I assume 16x will have diminishing returns for aliased frequencies.
-
@Christoph-Hart Dear Christoph
Could you point Me to a version of scrptnode that the export To Cpp Still Works?@ustk And you said that it was workong Before you start to dosome changes.
Thank You
-
@iamlamprey Mate, in what version you did export Nodes to Custom cpp?
Do they increase the Cpu usage? -
@Natan I haven't done it, I exported them to meta nodes, which don't affect CPU and are also being deprecated.
-
@iamlamprey In The Latest Version, I Succesfully Exported To Cpp Meta Node.
They Work In Hise, But In Exported Plugin, They Get Muted, Or Do'nt DO Anything To The Input Signal, Kinda Bypassed Or Not Integrated :( -
@Natan What kind of node setup are you using? I brought mine down by a significant amount by adding a button that disables oversampling nodes.
For simple stuff like compression/filters/dry-wet chains and saturation, you should be able to bring the CPU usage down to reasonable and competitive amounts, not sure about more modulation-based stuff though.
-
@iamlamprey It's That Flanger, Yo Can Find It In The Forum
It Just Have A Oscillator, And 2 Delays, Nothing Crazy
But It Makes Some Artifacts, Which Will Get Disapper With Only Using Oversampling,
And It Causes CPU Spikes In Other hand -
@Natan I built a flanger (well I gave it a go) and posted here somewhere, it only uses 2x oversampling...maybe try it..I never exported it or compiled it so it might be a dud..in HISE on my system its using about 2% CPU
HiseSnippet 2002.3oc6b0sTaaDEVByBXCISZmjI4ROY5EjYR8HIafvzoSH7WJSAhGLIo2wrHs.6frjpzZ9oc5SSuuyzmh7Hza6iPeCZO6tRVqLFv3DL1TwM38r+nu867ydNFsTOz2lDE4GpoWb2yCHZ5yfZbtG6nUNBS8z1XUPN5.Wr2gjPskOO.GEQbzz0K7Vd25EGWS7y+75kwvfrIohzz9fO0lrIsIkkJs9R+H00ccrCYWZSkQWaoMr88Vw20uE.kBHCs.r8w3CIai4CaLjl9Dq4PY9gMXXFIRSe7k8cNuwQ9m5IG+GnQz8cI7FlZMfERJdceWGNh4R0V4HpqS8jsbjllNpdJATPR.OFsE0g1VdJQ7HQGkSmgJenO1UAOSU3YzyvSSAciKQG.BemVtXVVjwUGwcP88xfrM7XDuHJ6bU00cJb+JTcJy9nti2w5BdAE0sMdiU9O.s1AGPrYofcbz5+zsulVW+hbWITC6PZ.Cd9bfTBstzOzLCbjiQS+OPkKWdMuCodjJ1gD.aqFErMgcpe3wy973o97W7ckOnkmMmzKGDRBvgjc8q6hOe1Hby.WxNv7dY48c8sOtA8WHunzuVpXoeqj5jDvbY9Hl09HrmGwM5hCi6K6wB8cm0qUy8Igur7IX2Voq2EbmKb4rnp6bWTh632hQ8NbKLKjdF3QucqlMfnH1jUhQGHSeLM9TEsM3s41TMHdNhF+K7Sbml715wcZlzoFeyP7Xf7XFUnxh+L7IYb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Kty7Cy5wCy5rpMQNBUyyQ3ylVMuHstXNs9kH0KqDlsnbDAD7wcDLXZ4wb7dFdNfqaLs9XWr7kY3XYCmL0n2VEvkmTJz6BZ+5TQXRFZMO79tIuLV2NEnMEWaYzE80ZmEDRhh3INxYMsdYmYNRty5wL+scI3vrFlyH84k8j60eCNi5Zpkn1nasDVCa0RLQlWXpzZEpNTUKQd0CCOUOvmjUO+5ibmW5P07RGtsxwct7bb+BSqHD1woqrJW9nOqNN5aMG.zp3wbAy0Wkat9EnjrZK1kRxpdutjrp22JIK8kI6daEYSIqHyLujragRx5mFueiUwLLemEeMjT3Cc8UImPsIRythfYXzwL+fLWssmH6bZzGwmPDWtSAVehn8A9gMK+VBTFEu1DyK8Nd9os+yd8NdFzy2wy2Yy.HraH1KJvOhXptxczmkZeqRXs7xNbonLihu8VG1dJi6QKkHTcjKUG6kYwf1YVos3Wrrjl+8qktzMHvtw4co00ob8Jq2xMhHLtMUmXpXKUw+.NzAzK1YtviE54aY3M35tNQ90c85tsgFW4sMLy8zrXBFaP42nr0fXMtfmo.ieM3Jd.tkKKQZVWqs787CNx2ilQouCgEROTbEBSwdW2Pugw3u4Rsk73k1g.gliTb29lk1j5AQq2RlxQ+vEl8NWbU5qmgjvsLOdP46GWS4B+u7ZJ26dnPHyQGM8SQPXbqxB0c46d88f3FMOHdFMw1g96YKuH37.FSIj.6aOw+UGJh1h2tro1Ioe0bFZMgic1y1NoXztOGq9XNU6i4TqOlyb8wbluOlyB8wbd0UNG9I9uoEyuoz9GDTeMQxm55sqiQuf1+Ax+JVoB
-
@Natan Could you try this again? Or did this not work out?
-
@iamlamprey It Has Its Own CPU Usage Story, It Removes The Artifacts,
And Another Wierd Issue With This, It'll Add Around +5 dB :/ To The FX Plugins Output.