osc/square -> square wave audio frequency oscillatorlfo/square -> square wave low frequency oscillatorFor example, there are three (actually even more) "square" objects:Currently it's a hierarchy, to sort things in categories. The category is then also part of the name.I'd like to discuss the naming scheme of the objects.The current object library needs a clean-up, but before doing this effort I'd like to get your input on how to deal with it.
I could also add
math/square -> y=x*xMultiple varieties with exactly the same name (homonyms) but different input types can be defined, and auto-promoted when a connection is made, like "math/square" can exist for different input types.The weakness of this that it can lead to in-determinism when (multiple) feedback connections are present.
Arguments currently are just an extension of the name, like "osc/saw sync" is "osc/saw" with the addition of a sync input. It's needed to have such variations rather than including all possible additions by default to minimize screen clutter.It has already evolved over time, but there is still room for improvement:* It lacks true arguments, say adding a constant 5 should be "math/+ 5". But then I'd love to give clear feedback to the user if it is going to work as expected. "math/+ 5" is fine for both integer, fractional and audio data types, while "math/+ 5.5" does not make sense for integer data.
Adding meta-objects that have code (perhaps javascript) that emits the final object based on object arguments is an option. Possibly this code will emit multiple (homonym) objects to deal with different data types.Some sort of guiding to select arguments would be appropriate. Otherwise it becomes like command line wizardry. Typing arguments directly should be possible too, it's quick for advanced users, and easy to copy.Using anonymous arguments like in pd and max can be confusing, for example "counter 2 1 4". Key-value pair arguments like Jitter introduced in Max can get long : [jit.op @op * @val 0.5].I guess using formal key-value pairs is the best definition, and allowing to just use one parameter as argument when there is only one key defined by the meta-object is a shorthand.Or auto-associating parameters to keys based on their text, even recognizing units?I'm just dreaming now :
"lfo/square 2Hz sync""lfo/square 120bpm sync""lfo/square sync 500ms""lfo/square sync 0.5s"all completely equivalent to
"lfo/square freq=2 sync=true"So the value is auto-associated with the frequency key, because other keys do not take input that can be converted into frequency, and the "sync" key is a boolean that defaults to false, but is true when listed in the arguments.
(this object would not get a frequency parameter knob, since frequency is already specified).Can you find corner case examples where this scheme would get confusing?
* I think some objects deserve to be in the root, without category in their nameespecially some in math, like math/+ etcalso mux/mux ...
also mix/mix ...Should they still go in a category in the hierarchical object tree, but having the category as part of the name is totally redundant. But how to keep it consistent?
* adding "symlink"-like entries in the categories could help finding objects (indicated by their name in italic?) when a single object deserves to sit in multiple categories, while avoiding the impression of duplicate objects.
* Sometimes the only reason for an argument is a different range or scaling of parametersexamples: ctrl/dial bp, ctrl/dial p
this could become one object with a switchable range/scaling on parameters.Also "mix/mix 2 g" versus "mix/mix 2 sq"Currently there is no variety of mixers with bipolar gain setting, but they would be useful too.This may be a configuration option for each channel individually? I think that 'd make sense for a mixer. Object name arguments? Or a parameter setting?
Have you looked at Reaktor?, its got some quite nice ideas... and manages to keep the number of objects to a small menu. (so can be directly selected)
I think the variations are probably the main issue (for explosion of types)Reaktor tackles this in 3 waysa) variations like mix 2/mix 4you can dynamically add inlets (using the ... 'button') ... this is not always possible, just when it makes sense.
b) variations like math/+1you just have + , but you can attach a constant to an inlet ( which gives code optimisation possibilities as it knows its a constant)
c) types variations - are determined by connection, i.e. you attach an audio connection, then it changes.
I wonder if something like this would be possible, even if it had limitationse.g.- add inlets, its only needed on some objects types, so doesnt need to be implement on everything (it isn't in Reaktor)- constants, easy to implement a constant object, for many types (I think), the trick is ensuring the generated code uses a constant, so its optimised correctly
- type variations - this almost is just 'two stage' object selection, when you put an object on the canvas if it has inlet type variations, then these are shown with a 'variable' colour,then when you add a connection, this narrows down the choices of matching objects, and inlet/outlets are now colour correctly.(actually I think Reaktor will convert types, but I don't necessarily think thats a great idea)
This way you can really have objects just named Mixer + , -, so the menu is pretty small.
I know requires more intelligence in the editor, and also keeps it graphical/visual (which I think is sometimes missing in Max)perhaps not the next step, as may be a bit too much coding...but perhaps some of these are easier than others? (e.g. constant values?)