Forum

    • Register
    • Login
    • Search
    • Categories

    SNEX nodes - Waveshaping / Saturation / Distortion?

    General Questions
    7
    44
    1038
    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.
    • Dan Korneff
      Dan Korneff last edited by

      I'm starting to play around with SNEX in the New Layout branch. Are there any nodes available for Wave shaping, Saturation or Distortion?
      How about a Pan node?
      I've poked around, but can't seem to find any.

      Dan Korneff - Producer / Mixer / Audio Nerd

      Matt_SF 1 Reply Last reply Reply Quote 0
      • Matt_SF
        Matt_SF @Dan Korneff last edited by

        @dustbro @dustbro you can use Math.expr node to apply saturation algorithm to the signal. Or just Math.tan or Math.sin nodes.
        As for the pan, I believe there's a jdsp.panner node available.

        Develop branch
        Win10 & VS17 / Monterey & Xcode 13.2.1

        Dan Korneff 1 Reply Last reply Reply Quote 1
        • Dan Korneff
          Dan Korneff @Matt_SF last edited by

          @matt_sf Thanks for this!
          @Christoph-Hart I have some questions....
          I'm using the Math.expr node for some formulas. When the expression is quite large, the waveform disappears. Any way to make this node larger so both can be seen?
          expr.png

          I'm getting errors using some math functions in the expr node.
          Calculating Math.pow(10,4) in the script editor works, but the node says Can't Resolve Math.
          pow script.png
          pow expr.png

          Some of my equations require multiple values to modified (like Gain, freq, Q on an equalizer). Is there a way to use a script and multiple controls for input to this node?

          and finally... I have a fun dsp network that I'd like to test out, but I've been unable to export anything from the New Layout version. Any idea on when that might be sorted?

          Dan Korneff - Producer / Mixer / Audio Nerd

          d.healey Matt_SF 2 Replies Last reply Reply Quote 0
          • d.healey
            d.healey @Dan Korneff last edited by

            @dustbro said in SNEX nodes - Waveshaping / Saturation / Distortion?:

            I've been unable to export anything from the New Layout version.

            You're not the only one having this issue. Tell me more about your setup.

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            Dan Korneff 1 Reply Last reply Reply Quote 0
            • Matt_SF
              Matt_SF @Dan Korneff last edited by

              @dustbro said in SNEX nodes - Waveshaping / Saturation / Distortion?:

              Calculating Math.pow(10,4) in the script editor works, but the node says Can't Resolve Math.

              yes, says Math::pow(const int, const int) but actually requires floats

              Develop branch
              Win10 & VS17 / Monterey & Xcode 13.2.1

              Dan Korneff 1 Reply Last reply Reply Quote 1
              • Dan Korneff
                Dan Korneff @d.healey last edited by

                @d-healey It's on all of my rigs. Windows 10, Monterey, Big Sur, Linux...

                Dan Korneff - Producer / Mixer / Audio Nerd

                ustk d.healey 2 Replies Last reply Reply Quote 0
                • ustk
                  ustk @Dan Korneff last edited by

                  @dustbro You might consider moving your formula to SNEX as is might be easier to handle there. Although you lose the waveform, so having a better code area in the Math.expr is a good idea!

                  I can't help pressing F5 in the forum...

                  Dan Korneff 1 Reply Last reply Reply Quote 0
                  • d.healey
                    d.healey @Dan Korneff last edited by

                    @dustbro And what happens when you try to compile the network?

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    1 Reply Last reply Reply Quote 0
                    • Dan Korneff
                      Dan Korneff @ustk last edited by

                      @ustk said in SNEX nodes - Waveshaping / Saturation / Distortion?:

                      You might consider moving your formula to SNEX

                      I'm so confused... isn't SNEX where all of these nodes exist? Between Scriptnode, SNEX, New Layout, Chains, Nodes, Workbench, workbench plugin, Playground... I really don't know WTF is going on anymore. 🤡
                      I really need some completed docs and a proper tutorial on how all of these things are supposed to work together.

                      Dan Korneff - Producer / Mixer / Audio Nerd

                      d.healey 1 Reply Last reply Reply Quote 1
                      • d.healey
                        d.healey @Dan Korneff last edited by

                        @dustbro https://docs.hise.audio/scriptnode/manual/snex.html

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        Dan Korneff 1 Reply Last reply Reply Quote 0
                        • Dan Korneff
                          Dan Korneff @Matt_SF last edited by

                          @matt_sf said in SNEX nodes - Waveshaping / Saturation / Distortion?:

                          but actually requires floats

                          How did you figure that one out???

                          Dan Korneff - Producer / Mixer / Audio Nerd

                          Matt_SF 1 Reply Last reply Reply Quote 0
                          • Dan Korneff
                            Dan Korneff @d.healey last edited by

                            @d-healey and I use this in the playground? or workbench? Or can it be done directly in HISE?

                            Dan Korneff - Producer / Mixer / Audio Nerd

                            d.healey 1 Reply Last reply Reply Quote 0
                            • d.healey
                              d.healey @Dan Korneff last edited by

                              @dustbro said in SNEX nodes - Waveshaping / Saturation / Distortion?:

                              I've not used SNEX but the docs say to use the Playground.

                              Libre Wave - Freedom respecting instruments and effects
                              My Patreon - HISE tutorials
                              YouTube Channel - Public HISE tutorials

                              1 Reply Last reply Reply Quote 0
                              • Matt_SF
                                Matt_SF @Dan Korneff last edited by

                                @dustbro said in SNEX nodes - Waveshaping / Saturation / Distortion?:

                                @matt_sf said in SNEX nodes - Waveshaping / Saturation / Distortion?:

                                but actually requires floats

                                How did you figure that one out???

                                Just an idea : seem odd that the node said it can't resolve the math. Tried it. Worked 😄
                                But actually it also works if you write : Math.pow(int, float) ot Math.pow(float, int).... Guess the result of the Math.pow() have to be float...
                                (I really like nodes but I'm really not a DSP expert)

                                Develop branch
                                Win10 & VS17 / Monterey & Xcode 13.2.1

                                1 Reply Last reply Reply Quote 0
                                • Christoph Hart
                                  Christoph Hart last edited by

                                  Woah, system error ... information overload...

                                  I really need some completed docs and a proper tutorial on how all of these things are supposed to work together.

                                  Soon. I just want to finalize the workflow before writing the docs because I've already written it twice.

                                  So a short glossary:

                                  • Scriptnode is the entire visual graph DSP environment that is based on a script processor but replaces the process(channel) and prepare() callbacks with the processing of the graph you specify.
                                  • SNEX is a language that is a subset of C++ and HISE (not the compiled plugins) has a JIT compiler that is used in various places.
                                  • SNEX nodes are nodes inside scriptnode that dynamically compile SNEX code and run it. There are different nodes for different applications (eg. a node for oscillators, a node for timers, a node for wave shapers). The logic for these nodes is defined in a class that is loaded from a separate file.
                                  • if you have a very simple expression that fits into one line, you can use the math.expr node (or the control.expression nodes). They will also use the SNEX JIT compiler but without the overhead of the class syntax required by all other nodes.

                                  Now for your use case I would suggest the snex.shaper node, which gives you a full class and some callbacks to perform the wave shaping. You'll still get the shape display and you can add multiple custom parameters.

                                  There are in total 3 different applications which use SNEX:

                                  1. HISE itself.
                                  2. The SNEX workbench, which is a trimmed down version of HISE and focusses on scriptnode development. The only exclusive feature of the SNEX workbench is the ability to compile SNEX code into a C++ library which can be loaded by HISE (as a .dll plugin). This step is required to get anything that uses SNEX in a compiled plugin (we are compiling the plugin with a real compiler anyway so there's almost no benefit of dragging the JIT compiler around in exported projects).
                                  3. The SNEX playground. This is nothing more than a code editor with the JIT compiler attached to it and some facilities to load and run tests. I use this primarily for implementing & testing JIT compiler features but it's also a low overhead option to dive into SNEX (the language). If you click on the SNEX icon on the top left you'll get a drop down where you can load different test files and inspect what they do (they cover most of the language features).
                                  Dan Korneff 4 Replies Last reply Reply Quote 5
                                  • Dan Korneff
                                    Dan Korneff @Christoph Hart last edited by

                                    @christoph-hart Thank you for this! I'm gonna tinker and come back with more questions 💩

                                    Dan Korneff - Producer / Mixer / Audio Nerd

                                    1 Reply Last reply Reply Quote 0
                                    • Dan Korneff
                                      Dan Korneff @Christoph Hart last edited by

                                      @christoph-hart noticed that the workbench app is missing it's icon after you build.
                                      I have an icon suggestion: 😅

                                      cable-mess1-1024x768.jpg

                                      Dan Korneff - Producer / Mixer / Audio Nerd

                                      1 Reply Last reply Reply Quote 3
                                      • Dan Korneff
                                        Dan Korneff @Christoph Hart last edited by

                                        Does anyone have some wisdom to share on the delay nodes?
                                        Is there one that can be modulated in real time without artifacts?
                                        How do you sync them to Host BPM?
                                        Is there a node that has a longer delay time than 1000ms? or do I need to mod the source code?

                                        Dan Korneff - Producer / Mixer / Audio Nerd

                                        Matt_SF 1 Reply Last reply Reply Quote 0
                                        • Matt_SF
                                          Matt_SF @Dan Korneff last edited by

                                          @dustbro sending you here :

                                          Snex_node Needs to be wrapped into a compileable DSP Network

                                          We discussed the matter, but long story short : jdsp.delay and fix8.container.

                                          For the sync there is a control.tempo_sync node available

                                          Is there a node that has a longer delay time than 1000ms

                                          jdsp.delay >> right-click on the 'DelayTime' parameter and adjust the maxValue

                                          🙂

                                          Develop branch
                                          Win10 & VS17 / Monterey & Xcode 13.2.1

                                          Dan Korneff 1 Reply Last reply Reply Quote 2
                                          • Dan Korneff
                                            Dan Korneff @Matt_SF last edited by

                                            @matt_sf My hero!

                                            Dan Korneff - Producer / Mixer / Audio Nerd

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

                                            15
                                            Online

                                            1.1k
                                            Users

                                            6.8k
                                            Topics

                                            62.4k
                                            Posts