SCREEN_WIDTH and SCREEN_HEIGHT macros not passed to csound
Closed this issue · 1 comments
tgrey1 commented
The macros are available in the cabbage section, but don't appear to get passed on to csound. User created macros are being passed properly.
Just opening for tracking, discussed on the forums here:
https://forum.cabbageaudio.com/t/screen-width-and-screen-height-not-passed-to-csound/2112
Here's a minimal example:
<Cabbage>
form size(200, 200), caption("Macro test"), pluginid("mcro"), colour(0,0,0,255)
#define TEST test message
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d
</CsOptions>
<CsInstruments>
nchnls = 2
0dbfs = 1
instr 1
Smsg = sprintf(" !!! TEST : %s\n", "$TEST")
prints Smsg
Smsg = sprintf(" !!! SCREEN_WIDTH : %s\n", "$SCREEN_WIDTH")
prints Smsg
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>
rorywalsh commented
I've added these as reserved channels:
<Cabbage>
form size(200, 200), caption("Macro test"), pluginId("mcro"), colour(0,0,0,255)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -m0d
</CsOptions>
<CsInstruments>
nchnls = 2
0dbfs = 1
instr 1
Smsg = sprintf(" !!! SCREEN_WIDTH : %i\n", chnget:i("SCREEN_WIDTH"))
prints Smsg
Smsg = sprintf(" !!! SCREEN_HEIGHT : %i\n", chnget:i("SCREEN_HEIGHT"))
prints Smsg
endin
</CsInstruments>
<CsScore>
i1 0 z
</CsScore>
</CsoundSynthesizer>