Transient shaper algorithm

I have a sketchy implementation haha

Here it is:

<Cabbage>
form caption("Test") size(500, 400), pluginId("envf"), guiRefresh(16), guiMode("queue")
soundfiler bounds(4, 200, 200, 100), tableNumber(1)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-d -n
</CsOptions>
<CsInstruments>
; sr is set by host
ksmps  =  64
nchnls =  2
0dbfs  =  1

gilen = 131072
gicps = sr/gilen
gitab ftgen 1, 0, gilen, 10, 1

instr 1
    ;a1,a2 ins
    a1,a2  diskin2 "samples/loop.wav",1,0,1
    aenvtest follow2 a1, 0.001, 0.001
    
    aphs phasor gicps
    andx = aphs * gilen
    
	tablew aenvtest, andx, gitab  
    aosc table aphs, gitab, 1

    outs a1, a2
endin

</CsInstruments>

<CsScore>
f0 z
i 1 0 [60 * 60 * 24 * 7]
</CsScore>

</CsoundSynthesizer>

There are a few issues:

  • The soundfiler is only updated when I stop the Cabbage plugin. I’d like to “stream” the result in the soundfiler instead
  • I’m not sure using a phasor is useful, but I can’t find anything else in the documentation

I will have to dig more!

edit: it looks like you already answered a similar question here Continuous display of audio data