snex :)
-
who's already dived in?
Also I noticed another little goodie...
-
Well that makes two of us ;)
-
I think I've effectively demonstrated my inability to wait patiently for things :D
// Process the signal as frame here template <int C> void processFrame(span<float, C>& data) { for(auto& s: data) { s *= .3; } }
Made a simple gain (have to wrap the Snex node in a frameX), now onto figuring out how to add parameters
-
What devilry is this?
-
@UrsBollhalder That's the thing I am working on for the last year, basically a JIT compiler that is the foundation of the new DSP framework inside HISE.
@iamlamprey You can add a parameter from the context menu next to the class selector in the node editor - this will create a .xml file with the same name as your SNEX code file with the parameter range and name. Then you have to write a
setParameterMethod
that takes that value:float gain = 0.3f; template <int P> void setParameter(double v) { if(P == 0) // this is the index of the parameter gain = (float)v; }
then use
gain
instead of your constant. Make sure you implement theprocess
method too, theprocessFrame
is only called when the node is inside aframe_x_block
. -
@Christoph-Hart How to get started with this? It seems like a good idea to invest time and energy into learning this (instead of scriptnode?!) since it'll be the future, right?
This looks like the documentation for it: https://docs.hise.audio/scriptnode/manual/snex.html
On a side-note: Totally in love with HISE... I've been at it like a maniac the last 2 months! I already own @d-healey something like a 100 beers from all the nagging.
But I am really excited about the possibilities with this tool. And an amazing community as well!
-
@UrsBollhalder The thing we all keep buggin Christoph about ;) check the scriptnode_codegen_rewrite branch and build the snex workbench app
it's still scriptnode, snex can be thought of as a "custom" node, where you can write your own algorithms and operate directly on the audio buffer, similar to JUCE
@Christoph-Hart woooh thank you :) love it so far!
-
@iamlamprey I see. So it's on a separate branch? Makes sense... I'll have a look at it! Thanks!
-
@UrsBollhalder it's a development branch so keep that in mind, i assume it will be merged when it's ready
-
@iamlamprey Sure! Where do you put a separate source code version of HISE like this branch. I am not too eager to have multiple places of the HISE source code on my hard drive... How did you set this up to not put your HISE projects in danger?
-
Use git, then you can switch branches with a click of a button (or with a command line instruction if you're as nerdy as @d-healey ...
-
yep Git is the best way
-
@UrsBollhalder said in snex :):
It seems like a good idea to invest time and energy into learning this (instead of scriptnode?!) since it'll be the future, right?
as @iamlamprey said, SNEX comes on top of scriptnode, and allows you to write custom nodes while still leveraging the workflow of a modular DSP environment, so learning scriptnode is definitely the right way.
That being said, a lot has changed since the last scriptnode iteration (mostly stuff that makes the workflow more convenient though).
-
@Christoph-Hart I see! Alright, so it's scriptnode then! 🥳 Another rabbit hole...
-
Oh yes, that is one deep rabbit hole. I'm in there myself for the last months :)
-
@iamlamprey About git: I checked it this weekend and see it up for a project. Now for HISE I am a bit lost still. SO you clone the repo to somewhere on your drive. YOu compile HISE scriptnode f.e. and if you switch to another branch like this SNEX one, you have to compile HISE again, no?
-
@UrsBollhalder Yes you have to compile every time you update or switch branches, you get used to it after a while :)
edit: luckily the projucer saves the settings and the SDKs etc are all in the same spot, you just have to re-open visualstudio or whatever IDE you're using, and recompile, nothing else changes
-
@iamlamprey So you also overwrite your compiled HISE app as well I guess? You wouldn't be able to run scriptnode HISE with the master branch repo? So it's always one version and one branch at a time?
-
@UrsBollhalder
So it's always one version and one branch at a time?
Within the git repo yes. But you could always take the binary that you've built out of the git repo.
-
Yep, I'm using scriptnode HISE and codegen workbench at the same time :)