gen object compiles in Max but not in RNBO
Any idea what would cause this error when loading an RNBO patch?
the same gen object works fine in a Max/MSP patch
RNBO: parse failed peg$SyntaxError: Expected "!=", "!=p", "&&", "(", ",", ".", ";", "<<", "<=", "<=p", "<p", "=", "==", "==p", ">=", ">=p", ">>", ">p", "?", "[", "^^", "||", [\-*+/%], or [\-/+*%\^&|<>] but "d" found.
RNBO: at peg$buildStructuredError (eval at compile (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\pegjs\lib\compiler\index.js:67:29), <anonymous>:795:14)
RNBO: at Object.peg$parse [as parse] (eval at compile (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\pegjs\lib\compiler\index.js:67:29), <anonymous>:5369:13)
RNBO: at Object.parse (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\@rnbo\genexpr_js\genbo.js:1335:16)
RNBO: at gen.finalize (C:/Program Files/Cycling '74/Max 9/resources/packages/RNBO/server/node_modules/@rnbo/xam/objects/gen.js:102:18)
RNBO: at new XAMObject (C:/Program Files/Cycling '74/Max 9/resources/packages/RNBO/server/node_modules/@rnbo/xam/objects/XAMObjectAndDecorators.js:18:27)
RNBO: at new gen (C:/Program Files/Cycling '74/Max 9/resources/packages/RNBO/server/node_modules/@rnbo/xam/objects/gen.js:24:1)
RNBO: at loggedInstance (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\@rnbo\xam\index.js:39:17)
RNBO: at createObjectInternal (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\nodemodules\@rnbo\xam\index.js:778:10)
RNBO: at Object.XAMCreateObject [as createObject] (C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\@rnbo\xam\index.js:799:9)
RNBO: at C:\Program Files\Cycling '74\Max 9\resources\packages\RNBO\server\node_modules\@rnbo\xam-runner\lib\patcher.js:225:33 {
We'll need to have you supply us with an example (reduced whenever possible). This error relates to parsing the genexpr code that gen supplies to RNBO, specifically it is looking for an infix operator or separator in the generated code, but it is encountering a symbol beginning with d.
I'd look for a statement that might look something where there is a symbolic identifier or a number with a space followed by a 'd' such as the following.
x = y d;
If you aren't using codebox, then looking at the code sidebar genexpr code to see if anything matches that pattern.
I'll keep hunting but if I had such an obvious syntax error (pretty sure I don't) in one of my codeboxes, why would it compile fine under max/msp?
If you can send us a patch that compiles in Max but does not compile in RNBO we can look into it.
what is the best way to send you the code?
I opened up the gen object under max so it would compile and copied the generated code.
The only thing " d" ish is:
this declaration:
Delay delay_2(96000)
and several instances of matrix_mod_dim_1 = dim(matrix_mod);
(with different variables being assigned)
You can attach a zip file with your patch and supporting files here in the forum. Ideally strip it down as much a possible while still retaining the error. Or you can send to support here: https://cycling74.com/support/contact
Whenever possible with any report like this, please provide the patch as an example. It isn't possible for us to offer much assistance without it.