Cabbage Logo
Back to Cabbage Site

Soundfiler doesn't display all WAV audio waveforms

Found some odd behavior here. Soundfiler displays most wav-files, but some, it refuses to display.

<Cabbage>
form caption("Stretch") size(600, 500), guiMode("queue"), pluginId("1287"), colour (0,100,0)
soundfiler bounds(110, 52, 300, 200), channel("filer1"), colour(188, 188, 188), tableBackgroundColour(62, 71, 86), showScrubber(0)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
ksmps = 32
nchnls = 2
0dbfs = 1

instr 1
    gSfile cabbageGet "LAST_FILE_DROPPED"

    if (changed(gSfile) == 1) then
        cabbageSet 1, "filer1", sprintfk("file(%s)", gSfile)
    endif
endin
</CsInstruments>
<CsScore>
f0 z

i1 0 z
</CsScore>
</CsoundSynthesizer>

Thanks, things are pretty hectic here at the minute. I’m desperately trying to find the time to get to all of these issues.

Both of these files display fine for me with this instrument. I have no proper audio device, and windows is stuck at 48kHz, I wonder if it might be a sampling rate issue? What SR are you using?

You’re right, it does work when I downloaded them. I think it’s the path:

D:\Sound Library\Rast Sound\RS_BIT FIELD\Samples\Loops (WAV)

Right, can you try removing the (WAV) from the folder name to see if that helps?

Bingo. It’s the closing parenthesis symbol ) that produces this. The opening parenthesis however works fine :thinking:

I would never encourage people to use punctuations marks in folder names. I can try to recreate the folder structure and see why it actually fails.

I think some of the symbols might be natural to use when organizing an audio library. I’ve seen different naming conventions with sound design and game audio, similar to case styles in coding.

Yes, I realise it’s a valid path. The problem is that Cabbage parses identifier arguments based on parenthesis. So when you do it this way you’re sending the following to Cabbage:

file("D:\Sound Library\Rast Sound\RS_BIT FIELD\Samples\Loops (WAV)

the actual filename is dropped because it appears after the closing bracket. The get around this issue, you should do this:

instr 1
    gSfile cabbageGet "LAST_FILE_DROPPED"
    if (changed(gSfile) == 1) then
        cabbageSet 1, "filer1", "file", gSfile
    endif
endin
1 Like