rorywalsh/cabbage

Warning: The current pluginId("") (Line:1) is not valid.

Closed this issue · 2 comments

When starting a new VCV Rack project, there is a warning in the console:

Warning: The current pluginId("") (Line:1) is not valid. A form pluginId() must be an alphanumeric string of 4 characters.

While line 1 actually contains only <cabbage>, line 2 contains usage of pluginid("def1") (all lowercase). However, there doesn't seem to be any camel-case plugin1("") use in the default .csd file (below). How can I fix or suppress this particular warning?

Default .csd file contents
<Cabbage>
form caption("CabbageModule") size(100, 380), colour(255, 255, 255), pluginid("def1")
screw bounds(5, 10, 15, 15)
screw bounds(80, 10, 15, 15)
screw bounds(5, 360, 15, 15)
screw bounds(80, 360, 15, 15)

cvinput bounds(34, 60, 30, 30), channel("cvInput1")
label bounds(0, 90, 100, 12), fontColour(0,0,0) text("Input")
cvoutput bounds(34, 300, 30, 30), channel("cvOutput1")
label bounds(0, 330, 100, 12), fontColour(0,0,0) text("Output")
rslider bounds(0, 150, 100, 100), channel("gain"), text("Gain"), textColour(0, 0, 0, 255), range(0, 1, 0, 1, 0.01)
light bounds(45, 250, 10, 10), channel("light1")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
ksmps = 32
nchnls = 2
0dbfs = 1


instr 1
    kLightBrightness init 0
    aInput chnget "cvInput1"
    printk2 chnget:k("gain")
    aOut = aInput*chnget:k("gain")
    chnset aOut, "cvOutput1"
    
    if metro(2) == 1 then
        kLightBrightness = kLightBrightness == 0 ? .8 : 0
        chnset kLightBrightness, "light1"
    endif
    
    
endin

</CsInstruments>
<CsScore>
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7] 
</CsScore>
</CsoundSynthesizer>

Cabbage moved to camelCase, but CabbageRack still supports lower case. I guess we should update CabbageRack so that it also uses camelCase?

I've updated the relevant CabbageRack support identifiers to camelCase. You'll need to build from source to grab the changes. I've also update the Cabbage source so that pluginId() is also the correct case when creating a new Rack module .csd