HISE Logo Forum
    • Categories
    • Register
    • Login

    Scriptnode temptation

    Scheduled Pinned Locked Moved General Questions
    7 Posts 4 Posters 559 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • musictopM
      musictop
      last edited by

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

      :), cheers!

      my website: https://musictop69.wixsite.com/ilirbajri
      https://musictop69.wixsite.com/creatools
      https://musictop69.wixsite.com/orchestools

      ? ? 2 Replies Last reply Reply Quote 0
      • Christoph HartC
        Christoph Hart
        last edited by

        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.

        1 Reply Last reply Reply Quote 2
        • ?
          A Former User @musictop
          last edited by

          @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)
            fa1742f3-4526-4954-8612-b080fc637f4e-image.png
          5. click the SNEX button on your node, it will turn green and open in the script editor:
            6fc117dc-dc37-4c30-a71f-5a8fe9f00ae4-image.png
          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 :)

          musictopM 1 Reply Last reply Reply Quote 2
          • ?
            A Former User @musictop
            last edited by A Former User

            @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...

            1 Reply Last reply Reply Quote 2
            • Christoph HartC
              Christoph Hart
              last edited by

              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.

              1 Reply Last reply Reply Quote 3
              • musictopM
                musictop
                last edited by

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

                my website: https://musictop69.wixsite.com/ilirbajri
                https://musictop69.wixsite.com/creatools
                https://musictop69.wixsite.com/orchestools

                1 Reply Last reply Reply Quote 0
                • musictopM
                  musictop @A Former User
                  last edited by

                  @iamlamprey valuable, thanks a lot!

                  my website: https://musictop69.wixsite.com/ilirbajri
                  https://musictop69.wixsite.com/creatools
                  https://musictop69.wixsite.com/orchestools

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  26

                  Online

                  1.8k

                  Users

                  12.0k

                  Topics

                  104.3k

                  Posts