Timestretch tempo sync, Num Quarters question
-
@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.
-
@VirtualVirgin I don't think that would work because the loop is still only going to be 2 bars.
-
@d-healey But isn't the whole thing getting timestrethced?
-
@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?
-
@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.
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.
Another Producer (anotherproducer.com)
-
Here's the chart @ 160bpm...
so the quarter note length @ 140bpm just needs to be calculated to match the note length @160bpm.
-
@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.
-
@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!
-
@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.
-
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); }