HISE Logo Forum
    • Categories
    • Register
    • Login

    A follow up on the custom tables...

    Scheduled Pinned Locked Moved General Questions
    7 Posts 3 Posters 36 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.
    • ustkU
      ustk
      last edited by

      Didn't want to pollute more @DanH thread https://forum.hise.audio/topic/13831/stock-table-upgrade

      @griffinboy BTW, how do write your LUT from the curve?
      since y AND x are determined by the curve's dynamic, x might not be an integer for writing the LUT

      In my case I use a Newton-Raphson loop in order to find an integer for x, and so it's corresponding y value...

      How do you handle this?

      Hise made me an F5 dude, browser just suffers...

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

        @ustk

        I resample it into discrete sample values.
        It's the same idea as wavetable synthesis oscillators, or a sampler. We end up with a waveform shape sampled to the amount of samples we want.

        You'll incur aliasing if you don't take measures against that.

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

          @griffinboy Nice! I'll have a check on this to see how I can adapt...

          Hise made me an F5 dude, browser just suffers...

          griffinboyG ustkU 2 Replies Last reply Reply Quote 0
          • griffinboyG
            griffinboy @ustk
            last edited by griffinboy

            @ustk

            For getting started, just using linear interpolation will be usable.

            When you take in your table, sample it to a table of like, 2048 or 4096 samples using linear interpolation. And then you can read it using linear interp too for different speed playback.

            It will be aliased, but for use cases like slow modulations, it doesn't matter terribly. Like, if its an LFO, it won't be unusable with alias.

            For antialiasing, it's a complex ordeal.
            See this paper:
            http://www.mp3-tech.org/programmer/docs/resampler.pdf

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

              @ustk That being said my curve is made for a waveshaper (not modulation). Meaning that the worst case scenario is to get point that aren't absolutely perfect but unnoticeable to the hear... The reading of the LUT is still interpolated of course. So in the end the mouse precision when dragging a node on the interface is far more approximative.

              What I don't like though in the NR algorithm is the extra computation it requires...

              Hise made me an F5 dude, browser just suffers...

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

                @ustk

                Ah yeah you'll be fine linearly interpolating the waveshaper curve. The one thing to watch out for maybe is cases where you want discontinuities. Linterp will very slightly smooth those, you may want logic to preserve jumps. Like you said, the actual drawing of the curve by the user is of limited fidelity / accuracy, and that's the real limit.

                I'm doing all sorts of interpretation in mine to assume intent from the user.

                1 Reply Last reply Reply Quote 1
                • Oli UllmannO
                  Oli Ullmann
                  last edited by

                  I just saw this new thread... :-)
                  Here's some info for you that I noticed recently:
                  If you use the content callback of a table as follows:

                  Table.setContentCallback(tableCallback);
                  
                  inline function tableCallback(i)
                  {
                  	// Your code
                  }
                  

                  i returns the index of the point that you control from outside, for example from a panel or a slider.
                  This was very useful for my use case.

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

                  18

                  Online

                  2.0k

                  Users

                  12.8k

                  Topics

                  111.4k

                  Posts