Hey guys, I’m trying to timewarp using Diskin2 opcode but I ran into an issue. The speed and pitch seem to change together and I want to control them independently. Does anyone have an idea of how to do this? Here’s my code.
form caption("Untitled") size(400, 300), guiMode("queue") pluginId("def1") rslider bounds(296, 162, 100, 100), channel("gain"), range(0, 1, 1, 1, .01), text("Gain"), trackerColour("lime"), outlineColour(0, 0, 0, 50), textColour("black") rslider bounds(146, 162, 100, 100), channel("speed"), range(-10, 50, 1, 1, 0.01), text("Speed"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)bundle(“long.wav”)
-odac ; activate real-time audio outputsr = 44100
ksmps = 32
nchnls = 1
instr 1 ; play audio from disk
kSpeed cabbageGetValue “speed” ; playback speed
iSkip init 0 ; inskip into file (in seconds)
iLoop init 1 ; looping switch (0=off 1=on)
iformat init 0
isize init 0
; read audio from disk using diskin2 opcode
a1, a2 diskin2 “long.wav”, kSpeed, iSkip, iLoop, iformat, isize
out a1, a2 ; send audio to outputs
endin
r1000
i 1 0 450
e