Cabbage Logo
Back to Cabbage Site

Error message seems pointless

I’ve gotten this error a number of times, but it doesn’t make sense to me because the code functions as it should.

WARNING: x_range: perf-time code in global space, ignored

and the offending code… (the whole array is not included)

gSfms_ranges[][] = fillarray(\
    x_range(-1, 1, 0, 1, 0.001),\
    x_range(0, 10000, 1, 1, 1),\
    x_range(1, 10000, 2, 1, 1),\
    x_range(0, 5000, 0, 1, 1),\
    x_range(0, 1, 0, 1, 0.001),\
    x_range(0, 1000, 0, 1, 1)\
...
)

and x_range is defined as…

opcode x_range, S, iiiii
    iMin, iMax, iVal, iSkew, iIncr xin
    xout sprintf("range(%f, %f, %f, %f, %f)", iMin, iMax, iVal, iSkew, iIncr)
endop

Is it safe to ignore this particular instance of this error?

The following gives me no such warnings? Maybe it’s something else in the code that’s triggering the warning?

opcode x_range, S, iiiii
    iMin, iMax, iVal, iSkew, iIncr xin
    xout sprintf("range(%f, %f, %f, %f, %f)", iMin, iMax, iVal, iSkew, iIncr)
endop


gSfms_ranges[][] = fillarray(\
    x_range(-1, 1, 0, 1, 0.001),\
    x_range(0, 10000, 1, 1, 1),\
    x_range(1, 10000, 2, 1, 1),\
    x_range(0, 5000, 0, 1, 1),\
    x_range(0, 1, 0, 1, 0.001),\
    x_range(0, 1000, 0, 1, 1))    
    
instr 1    
endin

Should I post this to the Csound mailing list? It seems that there are a number of false error messages. Or maybe it’s just me! :wink:

But I’m not seeing those warnings here. Are you running things from the command line or all from within Cabbage?

Within cabbage.

Does the code I posted above trigger warning messages for you?

Yes, I get the same warning.

That’s odd. I wonder why we are seeing this differences. I’m on an M1 machine but I can’t imagine that makes any difference.

I assume you are using the version of Csound that you bundle with Cabbage. I feel like this is one issue that we all fight. Things don’t appear to perform the same way from device to device, system to system, and user to user!

Actually I’m using my own build of Csound. But it should still work the same