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.