# Transient shaper algorithm

**URL:** <https://forum.cabbageaudio.com/t/transient-shaper-algorithm/3631>\
**Category:** Csound Noobs\
**Created:** [22 March 2023 08:56 UTC](https://forum.cabbageaudio.com/t/transient-shaper-algorithm/3631 "2023-03-22T08:56:13Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![nymano](https://forum.cabbageaudio.com/user_avatar/forum.cabbageaudio.com/nymano/32/4711_2.png) [@nymano](https://forum.cabbageaudio.com/u/nymano)\
**Post date:** [22 March 2023 20:28 UTC](https://forum.cabbageaudio.com/t/transient-shaper-algorithm/3631/11 "2023-03-22T20:28:00Z")

</div>

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](https://forum-next.cabbageaudio.com/t/continuous-display-of-audio-data/1585/2)

---

_[View the full topic](https://forum.cabbageaudio.com/t/transient-shaper-algorithm/3631)._
