Cabbage Logo
Back to Cabbage Site

Digitech PDS 1002 Repeat Hold functionality

Hey there,

Looking to cabbage-ify a really cool guitar pedal I own, the Digitech PDS 1002. It is a standard feedback delay pedal, with the exception that it has a repeat and hold feature. Based on the current delay time, you can grab and repeat the incoming segment of audio infinitely. You can do this on the Boss DD-3, DD-5, DD-series too, but the PDS 1002 lets you adjust the delay time, which also increases and decreases the pitch, it is a super cool sound. You can see it in this demo:

In terms of the repeat and hold parts, which opcodes should I look into? The repeat and hold will be turned on and off via a checkbox… Any help appreciated, thank you!

Any of the table reading/writing opcodes can do this. Each year I get my students to develop a plugin like this as part of their continual assessment. I give them this code to start off:

; Initialize the global variables. 
ksmps = 32
nchnls = 2
0dbfs = 1

;create table with space for 11 seconds..
giSample ftgen 1, 0, 524288, 7, 0, 524288, 0

;===============================================
;simple sampler UDO with ksmps set to 1
;===============================================
opcode Sampler, a, aki
setksmps 1
aSig,kTrig, iFn xin 
kIndex init 0
aOut init 0
if kTrig == 1 then
    tablew aSig, a(kIndex), iFn 
    kIndex = kIndex<ftlen(iFn) ? kIndex+1 : ftlen(iFn)-1
else
    aOut tab a(kIndex), iFn
    kIndex = kIndex<ftlen(iFn) ? kIndex+1 : 0
endif

xout aOut
endop 

;===============================================
;instrument that calls the Sampler UDO
;===============================================
instr 1
    kTime line 0, 1000, 1000
    kTrig = (kTime > 5 && kTime < 10 ? 1 : 0) 
    a1, a2 diskin2 "pianoMood.wav", 1, 0, 1
    aOutput Sampler a1, kTrig, 1
    outs aOutput, aOutput
endin

I’ll leave it with for to see if you can work out how to go about modifying it to your needs. For what it’s worth, this is what I ask of my students once I give them this code:

  1. the user should be able to start and stop recording of a sample in real time

  2. the recorded sample should start playing back as soon as the recording stops, and should only play for the length of the recording

  3. the user should be able to control the playback speed and direction of the recorded sample

  4. include a ‘random’ frequency/speed function

Let me know how you get on!

Rory,

Awesome, exactly what I was looking for. Will keep you posted on the progress here.

Cheers