Here's my patch that adds position control to the engine. MIDI controllers and GUI widgets can simply set scratch2_position to the desired position they'd like to go to, and a PID controller in RateControl will control the rate of the deck such that it quickly approaches the position.
Using my patch, hold down the right mouse button on the waveform to enable scratching on it.
Right now its pure rate control, so there are many discontinuities in the rate values. This leads to a 'popping' sound when moving the waveform slowly. I think the right thing to do to fix this is to add second-order control -- make the PID controller control the deck acceleration only instead of velocity. This should smooth out discontinuities, but may make the scratching less responsive.
Right now only proportional and differential control on the PID controller are used.
Another WTF, you should only load 44.1KHz tracks to test this out. There are some dumb constants that I haven't adjusted for different track sample rates yet.
Here's my patch that adds position control to the engine. MIDI controllers and GUI widgets can simply set scratch2_position to the desired position they'd like to go to, and a PID controller in RateControl will control the rate of the deck such that it quickly approaches the position.
Using my patch, hold down the right mouse button on the waveform to enable scratching on it.
Right now its pure rate control, so there are many discontinuities in the rate values. This leads to a 'popping' sound when moving the waveform slowly. I think the right thing to do to fix this is to add second-order control -- make the PID controller control the deck acceleration only instead of velocity. This should smooth out discontinuities, but may make the scratching less responsive.
Right now only proportional and differential control on the PID controller are used.
Another WTF, you should only load 44.1KHz tracks to test this out. There are some dumb constants that I haven't adjusted for different track sample rates yet.