Using the flooper2 opcode, i have this sample that i like.
But, sometimes i’d like, while flooper2 is looping, to add some silence (so: zeroes) at the end of the sample before it loops. That will add some space in the repetitions.
It would be great if this was possible at k rate, but first i was investigating at i rate.
ilen is not being used? But is the idea to set the table to be larger than the number of samples in the waveform? If you put this into a UDO and read from the table using any one of the table reading opcodes, it would be quite simple.
Thanks, Rory, your solution is not exactly what i need, but it helps me thinking.
What i need is an ftable number or name for flooper2 to read. And sometimes i want this ftable to be bigger and then filled with zeroes.
I’d like to ponder on this some more, because the output now is aSig and not an itable. For sure the same technique can be applied, but this area is definitely not my forte…if i can’t wrap my head around it in a few days, i’d like to ask you once to the rescue…
This is a diy solution, I just added some zeros after the file length. You can adjust the silence length at your pleasure by changing isilence variable.
instr Tbl
Sound = "pm_test.wav" //name of your file here
ifileLen_smpls = filelen(Sound)*sr
isilence = sr*1.5 //1.5 secs of silence
itabLen = ifileLen_smpls+isilence
itbl ftgen 0,0,itabLen,1,Sound,0,0,0
;adding silence
ksmpl = ifileLen_smpls+1
while ksmpl<itabLen do
tablew 0,ksmpl,itbl
ksmpl += 1
od
aIdx = phasor(1/p3)
aSig = table3:a(aIdx,itbl,1)
outs aSig, aSig