Time Stretch SkipLatency working?
-
I'm not experiencing any benefits of using SkipLatency.true... Not sure if it's working, doesn't seem to in a simple test but perhaps I'm doing it wrong?
Below is a snare sample unprocessed at the top, then SkipLatency true, and at the bottom false. Both true and false have the same latency and use the same cpu in HISE itself.
Snippet:
HiseSnippet 1711.3oc4Y0raabCDlx1qSjZhaRPNzKEXgPOHCD3JkeKpQgk+QN0nVVBZULJPPQB8tTRrdE4BtbchRQ.5g9Rja8QnW6s7.jGgdouA4MHcH2UZ4JKIKajDjf5CFdFN+7wYHmY35lBtKILjKP4x2dP.Ak6JVNCXxda2CSYn81AkaEKm1sp0d6eztcMm1nsFDfCCIdnb4V7gJYxkeIj9m2twVXeLykjxBgNjScI6S6SkobaV8mn996h8Hso8Mj9tU2yky1l6yi.7rnUYT.18XbWxAXkXKXgxsbMOpjKbjXIIDkaos3dCb5weFKV9Cogzi7IJhJHGvPwr2k66oPrhKZ6dTeulC22gHTNqloQgEiiB2zpN0iNheZz3Z5ErS0vLdjagrvawLvqhI7Ja.uI.obFPZoXHccKGWAMPlthBOeg0dLIQzACgcSnDKKZg2cIqs4fDL4Z8wGS1U.Diznz8KW9V1vuVc8BE91u0t8d0qYmjs26fGV.xFgR6SvBaGb+.ehnh8OXqOdrVWhTiZMUohCWu3pSPoLZkvzTk0M0I160arSMPqgPW4Md+.NCH.MSkYLkOlFrOD5YtCltxoxTLYa2gHc6YK6QrciDBPJ6PUBzvvg7i9U0lX3FRYS0Y2PoPoai.IEjsTh8BDTvF7HoM12Gn3ADgjRBg0.LEx8IqoEojTnRBJiuZhpaFD3Ovd.bAv1sGl0k3AbUBrVctGAfPwcngX3LjWwXEdTfG.UM34wnnPAJymxH1chXtJN1bVRD6IMNnwt6phKBteI2gAkaA6Q+HxpE9sB4KTnPdZG6RIbxCrxaDuWKjHOTsToJ.hytTBfKoWPi4r4CoHhn0IkqxbkJJIOWV7V1EUBTTq8LCS4eI.y7D+PxLfW4yM75fAKdVNW66WBfXlmLiiyEWUAmjn81v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x64JVT4b+E2lX95qrhgqspvk8mu80V7+M80lUHZkjtZ15GN+IXN7JV5Zu1pVkeLgWKdjDZ6Mr0iEzexA5I6RL6RsfpyWLcYEsBDNDlml3cvOIKVYXKM0hUFtHxcnof8SxeqefTtEIL8m0PM9kOzrz27HZHz4WAInMzGET1G6J3OwM9EfJrdYMG.kL8+Vh7V0Uz1S3Ee8g9LOw0MqoNkh29hp3ctnJd2Kph26hp38unJ9fKphe2YqnZLfMij79wEGQn5MqEe.LWsQG.WD8e.+KJhvB
Code:
Content.makeFrontInterface(600, 600); // TIME STRETCHING const var Sampler1 = Synth.getChildSynth("Sampler1") const var Sampler11 = Synth.getSampler("Sampler1"); const var STRETCHMODE = Content.getComponent("STRETCHMODE"); const var SkipLatency = Content.getComponent("SkipLatency"); // fetch the current state const var sobj = Sampler11.getTimestretchOptions(); // print out all properties //Console.print(trace(sobj)); // Apply your changed //sobj.Mode = "Disabled"; // Update the options inline function onSTRETCH_ONOFFControl(component, value) { if (value) { STRETCHMODE.setValue(1); STRETCHMODE.changed(); sobj.SkipLatency = true; SkipLatency.set("text", "true"); Console.print(trace(sobj)); } else { STRETCHMODE.setValue(0); STRETCHMODE.changed(); sobj.SkipLatency = false; Console.print(trace(sobj)); } }; Content.getComponent("STRETCH_ONOFF").setControlCallback(onSTRETCH_ONOFFControl); inline function onSTRETCH_ONOFF1Control(component, value) { if (value) { STRETCHMODE.setValue(1); STRETCHMODE.changed(); sobj.SkipLatency = false; SkipLatency.set("text", "false"); Console.print(trace(sobj)); } else { STRETCHMODE.setValue(0); STRETCHMODE.changed(); sobj.SkipLatency = false; Console.print(trace(sobj)); } }; Content.getComponent("STRETCH_ONOFF1").setControlCallback(onSTRETCH_ONOFF1Control); inline function onSTRETCHMODEControl(component, value) { local obj = Sampler11.getTimestretchOptions(); local modes = ["Disabled", "VoiceStart", "TimeVariant", "TempoSynced"]; obj.Mode = modes[value]; Sampler11.setTimestretchOptions(obj); }; Content.getComponent("STRETCHMODE").setControlCallback(onSTRETCHMODEControl); inline function onSTRETCH_AMOUNTControl(component, value) { Sampler11.setTimestretchRatio(value); }; Content.getComponent("STRETCH_AMOUNT").setControlCallback(onSTRETCH_AMOUNTControl);
-
@DanH friendly bump! Has anyone used the timestretching capabilities yet?
-
@Christoph-Hart here's the trace...
"Tonality": 0.0, "SkipLatency": 1, "Mode": "Disabled", "NumQuarters": 0.0, "PreferredEngine": "" }
Does it look correct? Weirdly it says "Disabled" when actually it's on, as per below:
Was really hoping to implement this into the next update...
-
@DanH I don't see anywhere in your snippet where you are changing the skip latency setting.
-
yup dave is right, you need to call
Sampler11.setTimestretchOptions(obj);
after changing each property -obj
is not a smart thing that notifies the sampler but just a plain old JSON object so changing its properties will do exactly nothing until you send it back to the sampler. -
@Christoph-Hart ah ok, gotcha!