HISE Logo Forum
    • Categories
    • Register
    • Login

    Scriptnode "oversample" node starting at 4x crashes in PC

    Scheduled Pinned Locked Moved Bug Reports
    51 Posts 10 Posters 3.9k 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.
    • Christoph HartC
      Christoph Hart
      last edited by

      I like the idea of a global oversampler because it might address other issues as well, however it should make sure that it doesn't use absurdely high samplerates. Running an entire plugin with 16x oversampling in 96k would be total overkill.

      What if we add a "HQ Mode", that just ensures that the internal samplerate is above a certain value? If you run HISE with 44,1k or 48k, it'll use a 2x oversampler, but if you run it in 88,2kHz or 96kHz it won't do anything?

      Then all you need would be an API call like

      Engine.setLowestSamplerate(44100.0 * 2); // or whatever
      

      and it figures out the oversampling factor required to ensure this minimum samplerate.

      1 Reply Last reply Reply Quote 4
      • Dan KorneffD
        Dan Korneff
        last edited by

        If you're feeling out the room, I'd vote for something closer to the "overkill" method ☠

        Have you seen this video:
        https://youtu.be/-jCwIsT0X8M?list=WL

        Even with an increased sample rate, there are instances (such as multiple levels of saturation) that would still require oversampling (sometimes up to 4X) to reduce aliasing. And at lower sample rates, this would put you into the 8X oversampling realm.

        We are at your mercy with the implementation, and anything is definitely better than nothing. If you're leaning towards a single "HQ" style, I'd only request that it functions at higher sample rates as well.

        Dan Korneff - Producer / Mixer / Audio Nerd

        1 Reply Last reply Reply Quote 0
        • T
          tomekslesicki
          last edited by

          I think this idea is very nice, @Christoph-Hart , it would make the system more adaptable I think and would allow the users to fit the performance to the specs of their rig, too.

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

            Alright, good things take their time, but Engine.setMinimumSampleRate() has just arrived :)

            Dan KorneffD 2 Replies Last reply Reply Quote 3
            • Dan KorneffD
              Dan Korneff
              last edited by

              giphy.gif

              Dan Korneff - Producer / Mixer / Audio Nerd

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

                @Christoph-Hart holy crap! YA YAYAYAYYA!!!

                Dan Korneff - Producer / Mixer / Audio Nerd

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

                  @Christoph-Hart said in Scriptnode "oversample" node starting at 4x crashes in PC:

                  Engine.setMinimumSampleRate()

                  Any tips on implementation yet?

                  Dan Korneff - Producer / Mixer / Audio Nerd

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

                    You could add a HQ button somewhere and do

                    if(value)
                        Engine.setMinimumSampleRate(100000);
                    else
                        Engine.setMinimumSampleRate(40000);
                    

                    in its callback. 100.000 will ensure that it's always 4x oversampled for lower samplerates and 40000 that it's never oversampled in non-HQ mode (using 48000 would cause oversampling in 44,1kHz).

                    It will fade out all voices and then reinitiliase the processing chain with the new samplerate .

                    NatanN 1 Reply Last reply Reply Quote 3
                    • T
                      tomekslesicki
                      last edited by

                      @Christoph-Hart said in Scriptnode "oversample" node starting at 4x crashes in PC:

                      if(value)
                      Engine.setMinimumSampleRate(100000);
                      else
                      Engine.setMinimumSampleRate(40000);

                      This is awesome! Is it just me or is the higher sample rate causing a volume boost? I think it was raised somewhere earlier on the forum.

                      Dan KorneffD 1 Reply Last reply Reply Quote 0
                      • d.healeyD
                        d.healey
                        last edited by

                        What is oversampling?

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

                        orangeO 1 Reply Last reply Reply Quote 0
                        • orangeO
                          orange @d.healey
                          last edited by

                          @d-healey said in Scriptnode "oversample" node starting at 4x crashes in PC:

                          What is oversampling?

                          You can think oversampling as resolution of Total Harmonic Distortion. You can prevent aliasing problem with higher oversampling rates. 7 - 8 years earlier nobody was giving a f..k to the aliasing, even didn't aware of the aliasing. But nowadays everybody is a gearslut, and everybody wants higher oversampling rates, even they don't hear any difference between x1 and x16 oversampling rates :)

                          For the aliasing; you can watch this video: https://www.youtube.com/watch?v=Ic4bVbXfdW4

                          develop Branch / XCode 13.1
                          macOS Monterey / M1 Max

                          d.healeyD 1 Reply Last reply Reply Quote 1
                          • d.healeyD
                            d.healey @orange
                            last edited by

                            @orange So I only need to use this in my plugin if I'm making an effect plugin that will do some heavy processessing of the incoming audio?

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

                            Dan KorneffD ustkU 2 Replies Last reply Reply Quote 1
                            • Dan KorneffD
                              Dan Korneff @d.healey
                              last edited by

                              @d-healey I believe this will also affect sounds generated within HISE.

                              Dan Korneff - Producer / Mixer / Audio Nerd

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

                                @dustbro said in Scriptnode "oversample" node starting at 4x crashes in PC:

                                @d-healey I believe this will also affect sounds generated within HISE.

                                Yeah I think like that too. Especially if the sound generator signal goes to filter, distortion or shaper kind of effects.

                                develop Branch / XCode 13.1
                                macOS Monterey / M1 Max

                                1 Reply Last reply Reply Quote 0
                                • d.healeyD
                                  d.healey
                                  last edited by

                                  But only if effects are used right? Not when creating a plain ol' sample library.

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

                                  ustkU 1 Reply Last reply Reply Quote 0
                                  • ustkU
                                    ustk @d.healey
                                    last edited by

                                    @d-healey You generally want to oversample when you modify the harmonic content, in fact when you add harmonics... so everything involving distortion, (saturation or shape, tape emulation, compression...)
                                    To resume quickly, the more harmonics you add, the better are the chances that they will be higher than the Nyquist freq, so they will be badly folded back to the audible range... Oversampling and better filtering prevent the high harmonics to be folded back.

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

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

                                      @d-healey There is no risk with samples, only effect with higher harmonic content.

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

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

                                        Well the risk is higher CPU usage which might get important for sample libs with high voice count.

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

                                          @tomekslesicki @Christoph-Hart I'm just encountering this now. When I enable Oversampling, I can see a physical change in the Parametric EQ Gain on my project.

                                          Dan Korneff - Producer / Mixer / Audio Nerd

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

                                            @Christoph-Hart said in Scriptnode "oversample" node starting at 4x crashes in PC:

                                            You could add a HQ button somewhere and do

                                            if(value)
                                                Engine.setMinimumSampleRate(100000);
                                            else
                                                Engine.setMinimumSampleRate(40000);
                                            

                                            in its callback. 100.000 will ensure that it's always 4x oversampled for lower samplerates and 40000 that it's never oversampled in non-HQ mode (using 48000 would cause oversampling in 44,1kHz).

                                            It will fade out all voices and then reinitiliase the processing chain with the new samplerate .

                                            Awesome :)
                                            I Just Added This To A Script Which Cause Aliasing, And Booom With This All Disapperd
                                            Thank You Christoph <3

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

                                            21

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.8k

                                            Posts