Scriptnode temptation

  • Can't fight anymore the curiosity and desire to dwell into SNEX waters... Some help, advice and guidance is gratefully welcomed...

    :), cheers!

    1. Compile the SNEX workbench (tools/snex_workbench)
    2. File->New
    3. Add nodes and have fun

    The snex workbench uses a stereo effect routing as default, but you can switch to "Polyphonic Synth mode" in the tools menu, then you can build a polyphonic instrument.

  • @musictop Here's as far as I got (simple gain):

    1. add a SNEX node
    2. click the 3 dots and create a script for it
    3. click the 3 dots again and add a Parameter, call it gain. you can adjust the Min/Max and stepsize like regular sNode
    4. open the script editor (middle button)
    5. click the SNEX button on your node, it will turn green and open in the script editor:
    6. add this to "connect" a variable to the Parameter you just made
    // Set the parameters here
    	template <int P> void setParameter(double v)
    		/*We declared "gain" outside of the templates, now we connect it to our Parameter slider*/
    		if(P == 0) //The 0 value is the index of the parameter.
    			gain = (float)v; //v is the value of the parameter.
    1. now access that variable in the ProcessFrame section:
    // Process the signal as frame here
    	template <int C> void processFrame(span<float, C>& data)
    		for(auto& s: data)
    			s *= gain;

    There's way more to it that I don't understand until Christoph gets the chance to write up a best practices or something, but it works for now 🙂

  • @musictop said in Scriptnode temptation:

    Can't fight anymore the curiosity and desire to dwell into SNEX waters... Some help, advice and guidance is gratefully welcomed...

    :), cheers!

    Yes. This is something I definitely want to learn as well! But as you say, it's not that easy to get your head around. I personally find it a bit difficult to get the right information and places where to start digging! I don't mind grinding and digging myself. For example the whole OpenGL stuff... With the Youtube channel link that @Christoph-Hart has put in the docs... I mean there's sooo much that you can learn with that channel. It'll more than get you started. Absolutely mind-blowing!

    But in this case, as for someone with no C++ or AudioDSP background, I am wondering what the best resources are to get into this. @Christoph-Hart and @ustk examples that you can see in various places on the forum were already very helpful. The Audio Programmer has an expansive list of YouTube tutorials... but maybe there's an even more suitable set of resources to start getting into this. Because if you watch @d-healey Kontakt tutorials on how to write legato, you can certainly adapt it to HISE script... so... The documentation might take some time, but there must be other resources that our scriptnode geniuses on this forum would recommend?!

    Maybe even a dedicated place on the forum, where we could collect scriptnode examples for some basic principles... that could be something useful as well...

    EDIT: Certainly just getting into it and trying out stuff, connecting nodes etc. is also a big part of it I guess...

  • For dragging nodes around and going into experimental mode, you don't need too much profound DSP knowledge, but experience with modular synthesizers is definitely helpful.

    I'm currently thinking about the best way for a getting started guide, I can imagine that a video tutorial is much more suitable here than for the rest of HISE given that scriptnode is a mostly visual environment.

    Also writing custom SNEX nodes is definitely the most powerful tool in the scriptnode environment, but you should be able to come up with cool stuff without touching the SNEX nodes once - so my advice would be to start with non-SNEX stuff and then dive into this realm if you hit a limitation with the inbuilt nodes.

  • thanks a lot @Christoph-Hart and all....
    looking forward to new synth adventures 🙂

  • @iamlamprey valuable, thanks a lot!

Log in to reply