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.
    • J
      johnmike @Christoph Hart
      last edited by

      @Christoph-Hart here's a vid with time stretching the loops all in 1 sampler...numquarters at 0
      https://www.dropbox.com/scl/fi/55825x1sgxeqm743uvjqm/Timestrectching-1.mov?rlkey=gucjhshwrifahs630dda12zmv&dl=0

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

        @Christoph-Hart and here's a vid with the kicks moved to a different sampler...numQ's at 0,4,8 just playing around with it...but as you can see they slowly drift out of time with the click...

        Dropbox - File Deleted - Simplify your life

        favicon

        (www.dropbox.com)

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

          sorry for terrible audio it's coming from the built in mic...but should be loud enough to hear what's going on

          1 Reply Last reply Reply Quote 0
          • B
            BWSounds
            last edited by

            The Timestretching/Pitchshifting is nice, but causes a cpu spike on my set up... is this happening to anyone else?

            Only asking so I can know how to proceed with the project im working on.
            thx

            S 1 Reply Last reply Reply Quote 0
            • S
              Sawer @BWSounds
              last edited by

              @BWSounds Same here... Cpu spikes to 60% sometimes. Only tried on FL studio tho. Have not tried on mac yet.

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

                @Sawer if you're using the SkipLatency parameter then yes, there will be spikes when you start voices, otherwise the CPU usage is high but not unreasonably high.

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

                  Hi! I have a problem with the timestretching. I have updated my HISE version(3.6.0) but the functions Sampler.getTimestretchOptions();
                  Sampler0.setTimestretchOptions(obj);
                  Sampler0.setTimestretchRatio(0.7);

                  are throwing this error message:
                  Interface:! Ui_samples.js (13): function not found {SW50ZXJmYWNlfFVpX3NhbXBsZXMuanN8NDM2fDEzfDQ3}
                  Could someone help me to solve this problem? Thank you

                  // Get sampler
                  var Sampler0 = Synth.getChildSynth("Sampler0");
                  
                  // fetch the current state
                  var obj = Sampler0.getTimestretchOptions();
                  
                  // print out all properties
                  Console.print(trace(obj));
                  
                  // Apply your changed
                  obj.SkipLatency = true;
                  obj.Tonality = 2.0;
                  
                  // Update the options
                  Sampler0.setTimestretchOptions(obj);
                  
                  //Set ratio
                  Sampler0.setTimestretchRatio(0.7);
                  
                  d.healeyD 1 Reply Last reply Reply Quote 0
                  • d.healeyD
                    d.healey @Lumi283
                    last edited by d.healey

                    @Lumi283 The time stretch functions are part of the Sampler class, your reference is of the ChildSynth type. You either need to use Synth.getSampler() instead or use Sampler0.asSampler...

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

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      Lumi283 @d.healey
                      last edited by

                      @d-healey Thank you it's working!
                      Now when i want to channge the tonality nothing happens.... But the tonality was changed in the JSON.
                      Interface: {

                      //Script
                      var SamplerX = Synth.getSampler("Sampler0");
                      var obj = SamplerX.getTimestretchOptions();
                      
                      obj.SkipLatency = false;
                      obj.Tonality = 6.0;
                      
                      SamplerX.setTimestretchOptions(obj);
                      
                      Console.print(trace(obj));
                      
                      //Console
                      Interface: {
                        "Tonality": 6.0,
                        "SkipLatency": 0,
                        "Mode": "VoiceStart",
                        "NumQuarters": 0.0,
                        "PreferredEngine": ""
                      }
                      

                      Any idea ?

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

                        @Lumi283 tonality is between 0 and 1.

                        L J 2 Replies Last reply Reply Quote 0
                        • L
                          Lumi283 @Christoph Hart
                          last edited by

                          @Christoph-Hart
                          Okay, I understand, and what values correspond to semitones?

                          d.healeyD 1 Reply Last reply Reply Quote 0
                          • J
                            johnmike @Christoph Hart
                            last edited by

                            @Christoph-Hart any luck with time stretching across multiple samplers? or is it something im doing wrong?

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

                              @johnmike I‘m on vacation at the moment so I can‘t check stuff with actual audio but I‘ll take a look when I get back.

                              ulrikU J 2 Replies Last reply Reply Quote 0
                              • d.healeyD
                                d.healey @Lumi283
                                last edited by

                                @Lumi283 Try dividing 1 by 12 (if it's linear, I haven't tested it).

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

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

                                  @Christoph-Hart said in Timestretching/Pitchshifting:

                                  @johnmike I‘m on vacation at the moment

                                  What, do you also take time off sometimes, how will we manage?

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

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

                                    @Christoph-Hart definitely enjoy your vacay! I can wait lol...was just wondering...sorry to bother! thanks for all you do!

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

                                      @johnmike I just tested and it seems to work fine (I notice that if I set the tempo too high it loops back to a slower tempo which is weird, but that could be a Linux thing).

                                      Here's a video I made
                                      https://e.pcloud.link/publink/show?code=XZlUk2ZWBrmKoz56wb9iQHR1DbWaFkrDBYk

                                      Here's the audio file I'm using in the video
                                      https://e.pcloud.link/publink/show?code=XZtUk2ZePJ9aI3hKympkKub2n0EU8IESwA7

                                      I left numQuarters at 0

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

                                      J 1 Reply Last reply Reply Quote 0
                                      • J
                                        johnmike @d.healey
                                        last edited by johnmike

                                        @d-healey seems like you are using the same loop in both samplers correct? I was looking on my phone so everything was small…are the on the same key as well? What about on different keys with different loops that are different lengths/different BPMs? That’s my situation

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

                                          @johnmike I didn't try that. I'll give it a go now

                                          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

                                            @johnmike Still appears to work

                                            Share Anything with pCloud

                                            With pCloud's unique Download Link feature you can share files with everyone. Click to download. Join pCloud.com and get up to 20GB FREE cloud storage.

                                            favicon

                                            pCloud (e.pcloud.link)

                                            Here's the second file: https://e.pcloud.link/publink/show?code=XZxGk2ZLwkpbCMFaJmA0LLPL0NOQF8KSH1y

                                            In the video the file on the left (sampler 1) is 120BPM, the one on the right is 100BPM. Also note that the BPM values I set in the settings panel are out by 10BPM (this is a bug on Linux, so 90BPM in the settings panel is actually 100BPM).

                                            I mapped the samples to different keys in different samples. NumQuarters still set to 0.

                                            At 100BPM the sample on the right plays back at normal speed and the one on the left is slowed. When I set the tempo to 120BPM the one on the left plays at normal speed and the one on the right is sped up.

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

                                            J 3 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            10

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts