HISE Logo Forum
    • Categories
    • Register
    • Login

    Timestretching/Pitchshifting

    Scheduled Pinned Locked Moved General Questions
    125 Posts 14 Posters 11.5k 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.
    • MikeBM
      MikeB @d.healey
      last edited by

      @d-healey Isn't Rubberband free for the time being under GNU General Public License - as long as no commercial applications are created?

      "One hour of trial and error can save 10 minutes of reading the manual."
      "It's easier to hit the developer with feature requests than to spend 10 minutes reading the manual. :-)))"
      HISE Develop - Mac Pro 5.1, OS X 10.14.6, Projucer 6.02, Xcode 10.3

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

        @MikeB GPL doesn't prevent commercial releases, only proprietary releases whether you charge a price or not.

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

        1 Reply Last reply Reply Quote 0
        • S
          Soundavid @MikeB
          last edited by

          @MikeB There is a Simple Pitch Shift in the Faust Libraries, is called Transpose I think.

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

            Alright, I think the timestretching is ready for testing so anyone that wants to check it out should pull the feature/time_stretching branch.

            Link Preview Image
            GitHub - christophhart/HISE at feature_timestretch

            The open source framework for sample based instruments - GitHub - christophhart/HISE at feature_timestretch

            favicon

            GitHub (github.com)

            There's a simple core.stretch_player node that can pitch / stretch a single audio file and the sampler module has a timestretching parameter that can be set to different modes.

            It's highly experimental and you might experience glitches with different samplerates / buffer sizes, but feel free to play around and let me know how it works / sounds for you.

            d.healeyD ulrikU 2 Replies Last reply Reply Quote 4
            • d.healeyD
              d.healey @Christoph Hart
              last edited by d.healey

              @Christoph-Hart Yippeee! Will give this a go very soon. Did you manage to optimize the FFT stuff?

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

              Christoph HartC 1 Reply Last reply Reply Quote 0
              • Christoph HartC
                Christoph Hart @d.healey
                last edited by

                @d-healey yes I swapped the fft with the juce wrapper which uses IPP / vdsp / FFTW. However the performance on my Windows system was already pretty good (about 2% per voice).

                I‘m curious how the sound quality holds up against the alternatives - in my tests it‘s pretty good.

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

                  I'm getting some errors, I'll post some below. They are all in the same file, pixman-arm-neon-asm.h.

                  In file included from ../../../../../HISE/hi_sampler/sampler/components/SamplerSettings.cpp:20,
                                   from ../../../../../HISE/hi_sampler/hi_sampler.cpp:56,
                                   from ../../JuceLibraryCode/include_hi_sampler.cpp:9:
                  ../../../../../HISE/hi_rlottie/src/vector/pixman/pixman-arm-neon-asm.h:214:27: error: stray ‘#’ in program
                    214 |     mov     TMP1, VX, asr #16
                        |                           ^
                  ../../../../../HISE/hi_rlottie/src/vector/pixman/pixman-arm-neon-asm.h:218:42: error: stray ‘#’ in program
                    218 |     add     TMP1, mem_operand, TMP1, asl #1
                        |                                          ^
                  ../../../../../HISE/hi_rlottie/src/vector/pixman/pixman-arm-neon-asm.h:219:27: error: stray ‘#’ in program
                  

                  Huh actually it's really weird because that file hasn't changed since you added it...

                  Oh I get it, it's something to do with the include in SamplerSettings, but I don't know what...

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

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

                    Meh I commented out the line and it compiled just fine.

                    I'm using FFTW, the time stretching sounds really good. With a guitar loop I'm getting a little bit of what I'd call a bassy humming sound when it's stretched but with a percussive loop there are no issues.

                    Here's some of the loops I'm testing with - https://e.pcloud.link/publink/show?code=XZji1BZ3qTkeAWhYWkoVhYP2yNmVpaFRtIy

                    The bug where HISE's internal BPM is off by 10 is still there. When the project is compiled though it's fine.

                    Is it possible to go down to 25%? I know it won't be as "pleasant" but can be useful for more sound design stuff.

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

                    Christoph HartC 1 Reply Last reply Reply Quote 0
                    • Christoph HartC
                      Christoph Hart @d.healey
                      last edited by

                      @d-healey haha, I'm using a new tool within VisualStudio (Resharper C++) and I think I've pressed a wrong shortcut and it inserted this completely idiotic include statement. I also got the compilation errors but I thought it was a glitch so I removed the file locally...

                      I can't reproduce the BPM issue - is this Linux only?

                      And yes the timestretching algorithm can cope with extreme ratios (and it even starts to randomize the phase outside of the 0.5...2.0 range to get a PaulStretch-like sound. I've just added this limitation arbitrarily so I don't have to deal with buffers that get too big...

                      d.healeyD A 2 Replies Last reply Reply Quote 0
                      • d.healeyD
                        d.healey @Christoph Hart
                        last edited by

                        @Christoph-Hart Yeah it could be a Linux thing, I haven't tested on other systems.

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

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

                          @Christoph-Hart Very cool! Where can we poke around to lower the limit? And is there a way to reach the stretch ratio of the Sampler module via scripting ?

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

                            And is there a way to reach the stretch ratio of the Sampler module via scripting ?

                            Sure:

                            Sampler.setTimestretchRatio(newRatio);
                            
                            Christoph HartC 1 Reply Last reply Reply Quote 3
                            • Christoph HartC
                              Christoph Hart @Christoph Hart
                              last edited by

                              I've updated the docs to include a chapter about how it works:

                              Link Preview Image
                              HISE | Docs

                              favicon

                              (docs.hise.audio)

                              d.healeyD A 2 Replies Last reply Reply Quote 3
                              • d.healeyD
                                d.healey @Christoph Hart
                                last edited by

                                @Lindon Need to update your VI thread :)

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

                                LindonL 1 Reply Last reply Reply Quote 0
                                • ulrikU
                                  ulrik @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Much appreciated Christoph! 🍺

                                  Hise Develop branch
                                  MacOs 15.3.1, Xcode 16.2
                                  http://musikboden.se

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

                                    @Christoph-Hart Nice! Is getTimestretchOptions() not implemented yet?

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

                                      @audiolyf I can see it in the repo - https://github.com/christophhart/HISE/commit/3c8711f0713f445d197fa6b7d8f9e4819de114f6#diff-92b4316aaf5f04995603daa0550fbbb9156f53dbb5061d9608eacb18fb356d73

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

                                      A 1 Reply Last reply Reply Quote 0
                                      • L
                                        Lumi283
                                        last edited by

                                        Thank you Christoph Hart for this feature. My project was stuck, but now the problem is solved! Don't you think @d-healey that it would be interesting to offer a tutorial on your YouTube channel to explain how to properly implement time stretching? It could help more than one person.
                                        Thanks,
                                        Remi Dufeu

                                        d.healeyD 1 Reply Last reply Reply Quote 3
                                        • A
                                          audiolyf @d.healey
                                          last edited by

                                          @d-healey Pulled the branch yesterday and everything else is there but I'm getting function not found both with getSampler and getChildSynth

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

                                            @audiolyf Maybe you pulled before Christoph added it?

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

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

                                            12

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts