Cabbage Logo
Back to Cabbage Site

Soundfiler channels

Could you check the behaviour of the channels output by soundfiler when selecting part of the waveform?
The first channel (beginning location of selection in samples) seems to be working okay, but the second channel (end location) seems to always be zero. Here’s some test code (insert your own sound file):

<Cabbage>
form caption(""), size(600, 150)
soundfiler bounds(5,5,590,140), channel("beg","end"), file("ClassicalGuitar.wav"), colour("lime")
</Cabbage>

<CsoundSynthesizer>

<CsOptions>
-n -d
</CsOptions>

<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
 kbeg   chnget  "beg"
 kend   chnget  "end"
 printks   "Beg = %d \t End = %d \n", 0.25, kbeg, kend
endin

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

You’ll notice also that the beginning location channel outputs zero while making a selection. It would be nice if this could either be the current or the previous beginning location value as in usage, the zero would probably have to be filtered out in some way anyway.

Thanks Iain. I think I have this working as you would expect now. I’ll let you know when new betas are ready.

Hi @iainmccurdy Can you try one of the new betas and let me know if things are better now?

I tried:
http://cabbageaudio.com/beta/Cabbage_Thu_Mar_22_11-54-35_2018.pkg
but unfortunately the behaviour is the same as before…

That’s odd. Perhaps my automated build didn’t get the latest changes. I’m just going to build locally on my OSX machine here and see what’s up.

I’m just running off a new build now. Looks like my changes didn’t make it down the line for some reason. it’s working Ok for me locally. I’ll let you know when it’s ready. Sorry about that.

@iainmccurdy can you try the latest beta? Just uploaded.

That’s looking good now. One small point though is that the documentation isn’t accurate as it describes the second channel as ‘end position’ when it is in fact ‘length’.
Thanks for attending to this.

Good call. I’ll get that sorted now.

This explains why we were seeing different behavior with the comboboxes! Glad it’s sorted out, I was starting to think I was crazy :slight_smile: