Cabbage Logo
Back to Cabbage Site

Soundfiler selection adjustable from Csound?

Greetings fellow Cabbage users,

I am hoping for some advice regarding the soundfiler widget. After making highlighted selections of portions of the waveform using the mouse, I am storing their start and length data for later recall. When I recall one of these selections later (by pressing a button), I would like this to be reflected in the GUI.

In other words, I want to send control data from Csound to the two soundfiler channels that correspond to the start and the length of the highlighted selection of waveform, and to have the GUI reflect those changes. Is this possible?

Thanks!

I’m not sure if the soundfiler selection can be set other than by the mouse. For displays and indications, I tend to use an overlaid translucent image, which looks the same and offers other advantages.

<Cabbage>
form caption("Untitled") size(700, 200), guiMode("queue"), pluginId("def1")
soundfiler bounds(0,0,700,200), channel("start", "length"), file("01.wav")
image bounds(0,0,20,200), colour(100,100,100,100), channel("overlay")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
</CsOptions>
<CsInstruments>
0dbfs = 1

instr 1
cabbageSet k(1), "overlay", "bounds", 100,0,80,200
endin

</CsInstruments>
<CsScore>
i 1 0 z
</CsScore>
</CsoundSynthesizer>

That works - much appreciated!