HISE Logo Forum
    • Categories
    • Register
    • Login

    Any way to recreate the ShapeFX curve module in Scriptnode?

    Scheduled Pinned Locked Moved General Questions
    5 Posts 3 Posters 85 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.
    • DanHD
      DanH
      last edited by

      Or just have a waveshaper where you can edit the waveshape with a table? I don't want the other various modes, just the curve function.

      DHPlugins / DC Breaks | Artist / Producer / DJ / Developer
      https://dhplugins.com/ | https://dcbreaks.com/
      London, UK

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @DanH
        last edited by ustk

        @DanH You'll need to interpolate in a lookup table, that is populated with the curve.
        So basically an array that reflects the curve's shape, with enough data points for a smooth interpolation.

        I have tried to go down this road, but when the centre of the curve moves (so around the "0 signal" area), it obviously introduces an offset that makes horrible pops and cracks (because you are basically saying "when there's no signal, introduce a constant value...).
        I haven't found an efficient way to prevent this from happening. Of course the first thing that comes to mind is just using a HPF set to let say 5 or 10Hz, but it's not enough for a clean result.

        This makes it particularly hard for an asymmetrical waveshaper.
        I am still waiting to find a good solution for it to sound natural... @griffinboy?

        Can't help pressing F5 in the forum...

        griffinboyG 1 Reply Last reply Reply Quote 0
        • griffinboyG
          griffinboy @ustk
          last edited by

          @ustk

          C++ or snex is the only way I'd do it.
          Waveshapers are about mapping raw samples to other values. It's inherently low level dsp since you are manipulating each sample. Simple low level, but lowlevel nonetheless.

          for dc offset, there are a few filter designs that are suited particularly to removing it. You can find source code online for them.

          LUT waveshapers are something I've done lots in c++
          I use python to prototype them and generate a fat array. Then yeah, linear interp between data points, as well as making sure to clip the input so that it can't go over the edges of the waveshaper.

          ustkU 1 Reply Last reply Reply Quote 1
          • ustkU
            ustk @griffinboy
            last edited by ustk

            @griffinboy said in Any way to recreate the ShapeFX curve module in Scriptnode?:

            C++ or snex is the only way I'd do it.

            Absolutely, I've done it in C++ (unless there's a way with a network, frame node, and table? but I guess that wouldn't be efficient...)

            for dc offset, there are a few filter designs that are suited particularly to removing it. You can find source code online for them.

            Yeah I tried to run my own filters but still it wasn't clean... You have a particular design in mind? I'll make some more research...
            Clipping is important I agree

            Populating the LUT following the curve is kinda tricky as well. Depending how the curve has been made... he Hise table is way too basic, and it's not easy to get an algorithmic bezier. I have run my own curve from which I get the points in a way I am not proud of... => going along the path intersecting with a line... In the end I'd like to run a real bezier curve to get precise points from the equation.

            Can't help pressing F5 in the forum...

            griffinboyG 1 Reply Last reply Reply Quote 0
            • griffinboyG
              griffinboy @ustk
              last edited by griffinboy

              @ustk

              python, julia or matlab is your friend.
              There are many scientific libraries for LUT generation, which can do curve fitting and other clever thingies.

              I have an entire custom app built in python that can reverse engineer waveshapers from any linear shaper vst. I've reverse engineered many algorithms automatically using this tool.

              BTW, use JuceVectorizedMath if using c++
              You can do multiply add operations on a whole buffer. Efficient.

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

              45

              Online

              1.7k

              Users

              11.7k

              Topics

              101.8k

              Posts