Cabbage Logo
Back to Cabbage Site

Pre-release Cabbage 2 for testing - part 7

Hello,
This thread is opened in order to list the brand new cabbage 2 beta 2.0.12a (see post :Latest beta packages available here (updated links)) [many thanks for this version]

  • Text color is not taken into account for sliders (text remains grey)
  • the attached file kills cabbage (I don’t know why) and it is purely generated with the GUI ediitor
    testcbg2.csd (1.4 KB)

Just one thought : maybe harmonizing the text and colour related parameters would be useful ( fontcolor, textcolor, colour:1, colour, etc…)
Sincerely hope this helps.

textcolour is working fine for me? textcolour controls the colour of the text label, while fontcolour sets the colour of the value box text. Your .csd was crashing because you only had one channel st for the hrange widget. It takes two channels, for min and max values. I will fix the crash, although technically the code is wrong, I don’t think it should take down the entire application! [quote=“Karamel1, post:1, topic:594”]
Just one thought : maybe harmonizing the text and colour related parameters would be useful ( fontcolor, textcolor, colour:1, colour, etc…)
[/quote]

I’m all ears. But what do you mean exactly? In the early days of Cabbage there wasn’t nearly as much control over widget colours. So I ended up using identifiers I probably should have given more thought to naming correctly. As new attributes have been added I’ve introduced new identifiers. I have tried to change as little of the identifiers as possible in order to maintain some kind of backward compatibility. Everyone’s instruments should be able to look and run in future versions of Cabbage as they do in this one.

I think moving to a numbered identifier system for colour:N and fontcolour:N have led to clearer code. I’m happy to explore all options.

Thank you for clarifying the font and text colour properties.

My bad for dirty and bad code, somehow a copy paste went wrong and I remove one of the channels of the hs… and it is likely that I (and others?) will do things like that :slight_smile: . these are heavy test for a beta.

I also noticed that a missing coma “,’” between parenthesis (i.e. : colour:0(200 200,128,255) is creating strange behavior.
Do you think that the parser could count the number of “,” for each parameter before a closing parenthesis and tell the user is something is wrong ?

Hello Rory,

Buttons and latched()

It seems that the latched() property is broken again in the last beta. Or at least, the buttons don’t work as expected and discussed in the previous post ( Cabb2 : button update (fixed) )
Hope this helps.

Hi Rory,
Changing slider value : the slider on screen is not getting updated

The solution you provided for resetting sliders does not work anymore (at least the GUI is not update and the value is not taken into account)
see : Cabbage2 beta : Reset value of slider (resolved)

Sorry for keeping you busy :slight_smile:

radiogroup does not update after last member is triggered

Except if I make a big mistake, the following code should light each checkbox one after the other one.
However, it stops after the last checkbox is lit.

<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginID("def1")
checkbox bounds(6, 10, 8, 8) channel("checkchan") identchannel("bng1_0") colour:1(255, 255, 255, 255) corners(2) shape("circle") radiogroup(100)
checkbox bounds(16,10, 8, 8) channel("checkchan") identchannel("bng1_1") colour:1(255, 255, 255, 255) corners(2) shape("circle") radiogroup(100)
checkbox bounds(26, 10, 8, 8) channel("checkchan") identchannel("bng1_2") colour:1(255, 255, 255, 255) corners(2) shape("circle") radiogroup(100)
checkbox bounds(36, 10, 8, 8) channel("checkchan") identchannel("bng1_3") colour:1(255, 255, 255, 255) corners(2) shape("circle") radiogroup(100)

button bounds(67, 53, 80, 40) channel("button") text("Push me", "Push me")
    </Cabbage>

    <CsoundSynthesizer>

    <CsOptions>
    -n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
    </CsOptions>

    <CsInstruments>
    ; Initialize the global variables. 
    sr = 44100
    ksmps = 32
    nchnls = 2
    0dbfs = 1
    gkIndx init 0
    ;instrument will be triggered by keyboard widget
    instr 1
    kBut chnget "button"

        if kBut==1 then 
        k1 metro 	1
        if k1 ==1 then 
       		printks "%d \n",0.1,gkIndx %4
    		S2 sprintfk "bng1_%d",gkIndx %4
    		chnset "value(1)",S2 
    		gkIndx = 1 + 	gkIndx
        endif 
    endif 


    kEnv madsr .1, .2, .6, .4
    aOut vco2 p5, p4
    outs aOut*kEnv, aOut*kEnv
    endin

    </CsInstruments>
    <CsScore>
    ;causes Csound to run for about 7000 years...
    i1 0 3600
    </CsScore>
    </CsoundSynthesizer>

Thanks for this. I’m afraid that I won’t be able to take a look at this until the start of July. I’m away at the moment, and I didn’t bring any laptop with me :grimacing: what was I thinking?!?

Combobox initial value gets killed when using ftgen.

I don’t know if this is cabbage related or Csound.

Please see the attached patch

testcbg2.csd (2.1 KB)

Hello Rory,

The Preset system is not working very well : it is not possible to reload presets 9 times out of 10> Should it be related to a k-rate for reading the file ?
Also, the state of checkboxes is always sored as “0” in snapshots, whatever the real value is (0 or 1 ).

Hello Rory,

Would it be possible to add the OSC dll into next version of cabbage 2 beta ? I am trying to get over the strings / preset bugs with an OCS communication channel with python. (maybe it feels like trying to kill a fly with a bazooka… but I really wish to save and load my patches.

Thank you for your help.

Looked like I have some work to get through when I get back!

Sorry for keeping you busy :-0

I’m just getting through these now. I seem to have found a larger issue when investigating the checkboxes. Leave it with me. I’ll try to get a fix out as soon as I can.

Thank you Rory.

Today, I tried the endless encoder. The min() and the max() properties are not taken into account like it was in Cabbage 1.

Good luck !

The earlier bugs should all be fixed now, I can’t recall if I explained the final one to you by PM, but in case I didn’t, the radiogroup mechanism is something I’m taking from the underlying GUI library I use to create Cabbage, i.e., JUCE. It works on button press events. If notevent arrives it won’t update the state of the button. But there’s an easy work around (see note below):

<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginID("def1")
checkbox bounds(6, 10, 8, 8) channel("checkchan0")  colour:1(255, 255, 255, 255) corners(2) shape("circle") ;radiogroup(100)
checkbox bounds(16,10, 8, 8) channel("checkchan1") colour:1(255, 255, 255, 255) corners(2) shape("circle") ;radiogroup(100)
checkbox bounds(26, 10, 8, 8) channel("checkchan2") colour:1(255, 255, 255, 255) corners(2) shape("circle") ;radiogroup(100)
checkbox bounds(36, 10, 8, 8) channel("checkchan3") colour:1(255, 255, 255, 255) corners(2) shape("circle") ;radiogroup(100)
button bounds(67, 53, 80, 40) channel("button") text("Start", "Stop")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d --midi-key-cps=4 --midi-velocity-amp=5
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1

;instrument will be triggered by keyboard widget
instr 1
    kBut chnget "button"
    kIndex init 0
    if kBut==1 then 
        k1 metro 	1
        if k1 ==1 then 
            event "i", "ToggleButtons", 0, 0, kIndex % 4
            kIndex  += 1 
        endif 
    endif 
endin

instr ToggleButtons
    iCnt init 0
    while iCnt < 4 do
    SBut sprintf "checkchan%d", iCnt
    chnset (p4 == iCnt ? 1 : 0), SBut
    iCnt += 1
    od
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
i1 0 3600
</CsScore>
</CsoundSynthesizer> 
  • for now we must use a separate instrument to set the channels because Csound chnset only works with i-time strings. The Csound developers are going to address this soon, so in the future we should be able to do everything from a single instrument.

Once again, note that I don’t need to use the identchannel() identifier when updating the value of the button. I can use its normal channel.