Is there a recommended way to do constants in VL?
When I have a simple constant (just a value) I’ve been creating a utility operation for it, eg MASS operation that just contains an iobox with a float, and calling that operation everywhere I need it.
But now I’ve got constants that are magic numbers derived from complex formulas.
-I could manually copy the results to ioboxes as per the previous method but this isn’t convenient if I want to change the parameters of the function that generated them before the next compile. Also If I publish this as a contribution I think that could be a bit confusing
-I can invoke them on create and store in a pad but I have thousands of instances of the object in question. To have a local pad version of the constant unnecessarily increases the memory footprint of each object.
-I can create inputs for the magic numbers on the operation that needs them and call them from the parent patch (or even make a special object for the magic numbers that only generates them once) but this creates a lot of visual mess for what’s pretty simple.
Is there a more convenient way?
Ideally I’d be able to turn a utility operation into a real constant that’s only calculated on compile and just referenced after that.