Try this:
<Cabbage> bounds(0, 0, 0, 0)
form caption("Untitled") size(400, 300), guiMode("queue") pluginId("def1")
rslider bounds(250, 188, 100, 100), channel("DryWet"), range(0, 1, 0, 1, 0.01), text("DRY/WET"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)
rslider bounds(100, 94, 100, 100), channel("TimeLeft"), range(0, 1, 0, 1, 0.01), text("Time Left"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)
rslider bounds(102, 196, 100, 100), channel("TimeRight"), range(0, 1, 0, 1, 0.001), populate("0"), text("Time Right"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)
rslider bounds(-2, 94, 100, 100), channel("FDB_Left"), range(0, 1, 0, 1, 0.01), text("FDB Left"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)
rslider bounds(0, 196, 100, 100), channel("FDB_Right"), range(0, 1, 0, 1, 0.001), populate("0"), text("FDB Right"), trackerColour(0, 255, 0, 255), outlineColour(0, 0, 0, 50), textColour(0, 0, 0, 255)
checkbox bounds(276, 8, 70, 34) text("Sync") channel("Sync") colour:1(255, 50, 45, 255) fontColour:0(0, 0, 0, 255)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
kDry cabbageGetValue "DryWet"
kTimeL, kTimeLTrig cabbageGetValue "TimeLeft"
kTimeR, kTimeRTrig cabbageGetValue "TimeRight"
kFBL chnget "FDB_Left"
kFBR chnget "FDB_Right"
kSync, kSyncTrig cabbageGetValue "Sync"
printf "Synced", kSyncTrig
if kSync == 1 then
if kSyncTrig == 1 then
cabbageSetValue "TimeRight", kTimeL
endif
cabbageSetValue "TimeRight", kTimeL, kTimeLTrig
cabbageSetValue "TimeLeft", kTimeR, kTimeRTrig
endif
iMaxTime = 8
aIn inch 1
aIn inch 2
if (kSync) == 1 then
; If sync checkbox is checked, copy TimeLeft to TimeRight and FDB_Left to FDB_Right
kTimeR = kTimeR
kFBR = kFBL
endif
aBufL delayr iMaxTime
aTapL deltapi a(kTimeL)
delayw aIn + aTapL*kFBL
aBufR delayr iMaxTime
aTapR deltapi a(kTimeR)
delayw aIn + aTapR*kFBR
/*Dry wet section*/
aDL = aTapL * kDry
aDR = aTapR * kDry
/*Final output*/
aOutL = aIn + aDL
aOutR = aIn + aDR
outs aOutL, aOutR
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>