I think the identChannels are not set properly in the widget array anymore. Had it working now on a single soundfiler.
Texteditor cursor colour
Oh, that could be the case. Give me a second. Are you using the latest version or the one from yesterday?
p.s. I also know what the convert function go messed up. I add two new identifiers yesterday and forgot to add lowercase versions to check against.
Iām using 2.5.27
This is working for me here. So is the widget array csd in the Misc examples.
<Cabbage>
form size(500, 300), caption("Untitled")
soundfiler bounds(10, 34, 300, 200), file("DutchLadyTalking.aif"), widgetArray("waveform", 2)
button bounds(352, 47, 80, 40), channel("switch")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d
</CsOptions>
<CsInstruments>
nchnls = 2
0dbfs = 1
instr SwitchWaveSecure
String sprintf "visible(%d)",0
Soundfiler sprintf "waveform_ident%d", p5
chnset String, Soundfiler
String sprintf "visible(%d)",1
Soundfiler sprintf "waveform_ident%d", p4
chnset String, Soundfiler
endin
instr 1 ;set file for second soundfiler object
chnset "file(\"pianoMood.wav\")", "waveform_ident2"
endin
instr 2
kSwitch chnget "switch"
if changed:k(kSwitch) == 1 then
if kSwitch == 1 then
event "i", "SwitchWaveSecure", 0, 0.1, 1, 2
else
event "i", "SwitchWaveSecure", 0, 0.1, 2, 1
endif
endif
endin
</CsInstruments>
<CsScore>
i1 0 .1
i2 1 z
</CsScore>
</CsoundSynthesizer>
Hmm. Itās hard to pinpoint this. Just declared my soundfilers individually and it works even though the code it doesnāt look very elegant. But that doesnāt bother me as long as it works again.
It wasnāt just visible() that didnāt work, but also sampleRange() and file(), basically all identifiers.
The zooming in only to the beginning of the soundfiler is back though.
Seems like now I have to have the scrubber somewhat inside the sample. Declaring a negative value to it used to solve this problem.
Thanks, Iāll take a look later. More camelCase teething issues I imagineā¦
Iām not going to get a chance to look into this today. Iāll add it to my todo list. I hope it doesnāt cost you much time.
No worries! I just added some lines as a workaround setting the scrubber at the end of a sample after loading it onto a soundfiler. I donāt need the scrubber, had to build my own. Donāt remember why.
There was an issue with the showScrubber()
identifier, itās fixed now. Would you mind trying the latest build when you get a chance? Youāll see the commit tag relating to showScrubber()
.
Oh, I didnāt even know that identifier. Iāll have a look later. For now I just added some lines that put the scrubber at the end of a sample/ >1sec on shorter samples after loading it into the soundfiler. That just works for now.
At the time Iām more concerned about loading a whole bunch of soundfilers / functiontables from the JSON data / getStateValue Data on init in plugin mode for recall, which is a bit painful. But once I solved this Iāll get back to this one.
Those get/set state value opcodes are very new and relatively untested. It seems that you are once more youāre the guinea pig for testing!
It seems like I can recall numbers/k-variables very reliably and apply them to their according parameters. Even the strings are recalled, had a letter missing once at the end though once. My hassle is more around loading the recalled filepaths into soundfilers and function tables.
Itās a bit weird with the get/set state value stuff on strings. First of all they only get saved if I put the string again in double quotes, but thatās actually not a problem.
The problem is that once I have stored strings with certain identifiers/keynames like āfilepath(1)ā and close and reopen my DAW session, I canāt overwrite those anymore. What ever I do then, they always get recalled to the strings that I stored when I set them before I closed my session the first time.
That problem doesnāt occur on storing numbers. They always recall the last store I made and that is not due to the DAW just recalling the settings of my sliders, as my sliders have arrays behind them to recall different settings on different samples.
Apart from that, strings get sometimes randomly cut short on recall. Couldnāt identify a pattern there yet.
Btw, should I put this into a separate thread that has the topic?
Yeah, or maybe add it to the original get/set state thread? It would be great if you can produce a simple .csd that will let me see the problem in action.