RNBO Codebox Operator Functions
Hi, I'm trying to use codebox inside RNBO to parse a list and format some numbers to be sent to a midiout to output midi notes. In the RNBO codebox help file, under the "MIDI" tab, there is an example that uses
// midiparse is a stateful operator
@state midiparser = new midiparse();
// we process the next message and assign it
let parsed : list = midiparser.next(in1);
I see that the midiparser operator that is created in the first line calls a funcion "next(in1)".
Is there a list of all the functions supported by the operators in Codebox? The reference docs for midiformat and midiparse only specifies input and output.
In my case I need to use a "midiformat" operator, but I can't find the list of member functions for any of the codebox operators. I imagine there's a "format" or "pack" function that I'd need, but I don't know where to look.
I'm gonna hunt for solutions in the source code, but it would be nice to see these functions included in the docs for quick reference. (Unless I missed it anywhere!)
@rnasound, if you look inside of the RNBO package's source/operators folder, you will find the source for the midiformat and midiparse operators which should be of help for what you're looking to do. We'll work on advanced codebox useage documentation over time, but in the meantime, the operator source code will be the most helpful. It also will provide some examples of value for codebox in general (even though an operator definition is a little different than the lighterweight expression behavior of codebox).
On Mac, the bundled RNBO package is located at /Applications/Max.app/Contents/Resources/C74/packages/RNBO.
@rnasound just a quick heads up that we have extended the Codebox Operator docs with the RNBO v1.0.2 release.
With that also the docs for midiformat and midiparse should be more conclusive.
@FLORIAN DEMMER
since RNBO v1.0.2 a codebox with the lines
@state parser = new midiparse();
let midistate = parser.next(in1);
does not compile anymore when a [midiin] object is connected. it use to work fine.... :(
is there a way to solve/workaround this in my code or do I have to wait for a Cycling74 bug fix?
here's an example patch
Update:
@Ben Bracken just replied with a solution to this problem here: https://cycling74.com/forums/rnbo-1-0-2-codebox-copile-bug-how-can-i-downgrade