Hello Mario Nieto, hello MNodes users and developers,
This is my second post regarding the States module.
You can find the first one here: Problems with the States module
In my previous post, I already discussed the problems that arise when trying to use the States module to create a way to save user patches.
Unfortunately, the situation in this area hasn’t improved for me with version v1.0.9 either.
MNodes still crashes whenever I close the program or load a different project if I have integrated a States module into a subgraph or another module.
The crash is so severe that it drags the DAW (Ableton Live 12) down with it.
Furthermore, the values of combo boxes, toggle buttons, and often radio groups are still not being saved. These are persistent controls, after all, and their values ought to be preserved.
For instance, I nearly gave up in frustration while trying to develop a small step sequencer—modeled after classic analog hardware-based on the Riff Generator in a test project.
I eventually quit because the States module flatly refused to save the settings for the controls used to toggle individual steps on and off. I tried using toggle buttons (the obvious choice), but radio groups didn’t save the state either.
However, the main reason I’m writing this is a different - and, in my view, far more significant - issue:
I happened to notice that the States module also alters the properties of If-modules.
I have to admit, I wasn’t expecting that. I first noticed this while troubleshooting an elusive error - one of those nasty bugs where things work sometimes but not others.
I then realized that it obviously depends (yet again) on the saved state.
Upon closer inspection, I discovered that switching states was altering the operators within certain If-modules. An “==” suddenly turned into an “!=”!!!
In the course of ongoing development, I had occasionally modified parts of the execution logic (as one does).
The fact that the States-module reverts the operator settings of those If-modules to their previous values is a major concern for me.
How should this be handled?
In my opinion, operators within flow-control modules should never be stored in a way that allows other modules to modify them.
If we draw a parallel to conventional programming languages, modules like If correspond to the constructs used to control a program’s execution flow.
They are, in effect, integral parts of the program itself.
It would be impossible to create a reliable program in any language if user input could alter the conditions of If-constructs.
The entire program logic -and thus the software’s semantics - must remain immutable regardless of the data involved (and I am not aware of any programming language where such a thing is even possible).
Master data, transaction data - all of which can and should be modifiable by the program based on requirements. But the program logic? Never!
Of course, I am aware that the States-module is designed to collect, save, and restore virtually all properties of all modules - including If-modules.
I also know that these properties can be locked in the inspector (although I’m not sure if that actually solves the problem reliably). Aside from the fact that you would have to do this for every single If-block - since all properties are reset whenever you copy them (which is very annoying!) - this remains a significant conceptual flaw. While the States feature can modify the operators and operands of an If-module, it cannot alter the wiring.
Consequently, this approach is bound to lead to errors that are difficult to track down.
What is the solution? Deleting and recreating all states after every change to an If-module? That certainly can’t be the answer!
In short: Any module used to build the execution logic in an MNodes project should be off-limits to the States-module!
I hope you understand the reasoning behind my criticism here.
I hope I’ve made it clear that, despite the fantastic possibilities MNodes offers developers, there is a vulnerability here affecting a fundamental aspect of the system - one that, in my experience, makes working with it incredibly difficult.
Thanks for reading! ![]()
All the best, dr.rom
