HISE Logo Forum
    • Categories
    • Register
    • Login

    Timestretch tempo sync, Num Quarters question

    Scheduled Pinned Locked Moved General Questions
    timestretchtempo sync
    15 Posts 3 Posters 225 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.
    • VirtualVirginV
      VirtualVirgin @d.healey
      last edited by VirtualVirgin

      @d-healey Can you edit your release tail to end on a specific beat (add space)? If so, maybe you could calculate the total beats from that.

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

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

        @VirtualVirgin I don't think that would work because the loop is still only going to be 2 bars.

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

        VirtualVirginV 1 Reply Last reply Reply Quote 0
        • VirtualVirginV
          VirtualVirgin @d.healey
          last edited by

          @d-healey But isn't the whole thing getting timestrethced?

          You can listen to my orchestral mockups here:
          https://www.virtualvirgin.net/

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

            @VirtualVirgin Yes, but each sample is a different length - higher notes have a shorter tail than lower notes. So putting in the total length won't work even if it is right for one sample - which I just tested and it doesn't work, the stretch ratio is completely wrong.

            @Christoph-Hart Any input on this?

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

            ChazroxC 1 Reply Last reply Reply Quote 0
            • ChazroxC
              Chazrox @d.healey
              last edited by

              @d-healey Would it be hard to impliment warping points based on transients marked by the user? Thats how its done in Abelton live. The algorithm I assume is using the math between those markers to calculate timestretching.

              idk f this helps but this is what I use to get some math out of it when im working...

              this is the beat increments in /ms @140 bpm.

              Im surrre with this math you should be able to come up with something. I've seen you guys do some crazy stuff.

              My guess is the match per beat in between bars (in /ms) needs to be stretched to target tempo (in /ms).

              Im not a coder at all and I could be speaking redundantly but this is my thought process as a music producer.

              Link Preview Image
              Delay & Reverb Time Calculator

              With the Delay & Reverb Time Calculator, you can improve your songs by tuning your delay and reverb effects to the BPM of your song to clean up your mixes.

              favicon

              Another Producer (anotherproducer.com)

              Screenshot 2025-02-01 at 3.09.15 PM.png

              ChazroxC d.healeyD 2 Replies Last reply Reply Quote 0
              • ChazroxC
                Chazrox @Chazrox
                last edited by

                Here's the chart @ 160bpm...

                so the quarter note length @ 140bpm just needs to be calculated to match the note length @160bpm.

                Screenshot 2025-02-01 at 3.13.33 PM.png

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

                  @Chazrox said in Timestretch tempo sync, Num Quarters question:

                  Would it be hard to impliment warping points based on transients marked by the user?

                  Probably very hard - no idea - but not necessary for this issue. My samples were recorded to a fixed 140bpm click, it doesn't vary.

                  I just had an idea though. I could forget about the tempo sync mode and use the time variant mode myself and do my own calculation of the pitch ratio - worth a try anyway.

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

                  ChazroxC 1 Reply Last reply Reply Quote 0
                  • ChazroxC
                    Chazrox @d.healey
                    last edited by

                    @d-healey well besides making a new feature in HISE, this is pretty much what I mean. These values are what you need. I've seen you guys do similar calculations before. I believe you can do it!

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

                      @Chazrox said in Timestretch tempo sync, Num Quarters question:

                      These values are what you need.

                      I don't see how they are applicable in this situation.

                      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

                        Ok here's the solution - well it doesn't answer my question but it gets the job done.

                        const var Sampler1 = Synth.getSampler("Sampler1");
                        
                        const th = Engine.createTransportHandler();
                        
                        th.setOnTempoChange(true, updateTimeStretchRatio);
                        
                        // fetch the current state
                        const var obj = Sampler1.getTimestretchOptions();
                        
                        // Apply your changes
                        obj.SkipLatency = true;
                        
                        // Update the options
                        Sampler1.setTimestretchOptions(obj);
                        
                        inline function updateTimeStretchRatio(newTempo)
                        {
                        	local ratio = newTempo / 140;
                        	Sampler1.setTimestretchRatio(ratio);			 
                        }
                        
                        

                        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

                        27

                        Online

                        1.7k

                        Users

                        11.9k

                        Topics

                        103.6k

                        Posts