Problems with the States module

Problems with the States module

I just finished working on my first MNodes project.
This is the additive drone generator DroneZone, which I uploaded to the hub in version 0.9 beta for anyone who is interested in such an instrument.
This project is quite large and complex and I learned a lot working with MNodes and really appreciated it as a powerful development platform.

Of all the things that I have noticed as hindrances when working with MNodes, I would like to briefly describe a few here; maybe someone has a solution.

If I had one wish for developer Mario Nieto, it would be a states module that only stores the value properties of controls and nothing else!

  • In this way, at least rudimentary patch management could be implemented in an MNodes project.
  • The current patch management in DroneZone is based on the States module and I have to say that this was by far the biggest difficulty for me in the entire (not exactly small) project.
  • Because States saves (almost) all properties, I always have problems after adding or changing elements. As soon as a different snapshot is selected via States, this often leads to changes in properties in these elements.
  • Of course, I realize that the original idea behind this module was precisely to be able to switch between two states of the application, including the layout elements.
  • But in my experience so far, this becomes a serious problem as a project evolves as soon as controls are added or changed while snapshots have already been taken. When switching an existing snapshot, properties are often changed back again. Very problematic.
  • For example, B. Texts in text widgets changed, which fortunately is usually immediately noticeable. But I find it very problematic, for example: B. that the property property in the appearance changer is also changed by states. This often leads to problems that are not easily recognized.
  • I also find it strange that the selected index is not saved in combo boxes. Therefore, I had to remove all combo boxes from the GUI and replace them with other controls, which sometimes leads to unnecessarily complicated operation (e.g. selecting LFO shapes or filter types).
  • The problem I have with the Line Shape module is that the Reduce property is often increased to 15 when retrieving a snapshot (whether locked or not), which results in the line being shortened in the GUI. I observed this particularly frequently in the panes of modules; It seems to work better in the front panel. Therefore, DroneZone does not contain a single line; it’s all just rectangles because it works with them :smiling_face:
  • I once observed that a patch cable connection disappeared after loading a snapshot via States!!! However, I cannot reliably understand this at the moment.
  • As a “safe” workaround, I have resorted to calling up all previous snapshots with each corresponding change to check their effects, or deleting them all and re-entering them. Both are very complicated and actually not practical.

Off-topic, but still noticeable:

  • Tooltips for GUI elements in a module’s panel (not the front panel) appear outside the boundaries of the control itself; they effectively follow the mouse cursor. Consequently, I am currently not using tooltips (unfortunately).

My point:

I consider it essential for a user of an instrument or effect to be able to save control settings as a patch.

Based on my comments above, I believe the “States” module is only partially suitable for this purpose. However, to the best of my knowledge, there is currently no other way to save patches in an MNodes project.

In my opinion, all the patch management issues I described could be resolved by a modified “States” module—specifically one that saves only those control values ​​that change when the control is operated (usually the “Value” property).

  • It would also be important to ensure that the indices of combo boxes and toggle buttons are saved.
  • A property’s “lock” function should reliably exclude the corresponding control from such saving operations.
  • I also consider it particularly important that saved user patches remain intact after an update. Currently, they are lost during updates, which users certainly won’t appreciate.
  • Advanced patch management features would be a great addition. At the moment, there is only the list provided by the “States” module, which cannot even be sorted (though that is a topic for further discussion).

Despite all this criticism, I would like to express my deep respect for Mario Nieto’s work.

I am quite familiar with several systems that take a similar approach, so I can say from experience that—despite the difficulties I’ve mentioned—MNodes has the potential to become a serious development platform for audio tools. I already thought his other plugins were excellent, but MNodes could well cause some concern for companies like Native Instruments or UVI :smiling_face:

What do you all think?

Is anyone familiar with similar issues, or perhaps have a solution?

Best regards, dr.rom

i think personally that a states that does not rely on the inspector to say what it does and doesnt save would be great i was thinking just a list with all the control names their values you want to include

currently you can save on levels but that presents its own problems and is very complex on a patch like yours

and yeah i do feel the same about where mnodes could go however i also think it is not ready to be that just jet but its growing and i do see mario as a person who wants to build a great tool that can be that

plugin companies imo should be ashamed of the insane prices they ask for very easy to make things so yeah i dont think they like mario very much :slight_smile:

edit: i think being able to separate a saved state in folders is also important so you can also make catagories

more edit: also merging user states with yours on a update for this reason alone you would need a user catagory already

:partying_face:

Personally i would just to like to have some type of object of data collector where i add all the parameters and being able to save it and load a specific XML file from a path that i would prefer and not an default state file.

I rather spend some time to define which nodes received specific value’s from a selected XML file then having a global state store everything.

That’s my wish.

What do you all think?

For the specific subjects i agree a lot, but personally i am trying to keep away from the states for now. That does not mean i am giving it up but i am not going to implement it in my project for now unless i am having a foolproof system.

The whole state method i guess only will work on a final project. my brain is saying like, if the userstate file has:

<node id="1740">
<state gain="0.800000011920929" gainDb="-1.938200116157532" unit="0">
</node>

What happens if i don’t use this node anymore, and after 10 updates this node ID come backs being a different node. is it going to mess things up, what prevents that?

There are some IF’s for me.. making me unsure..

Hello, and thanks for the feedback.

So, I’m not the only one who finds the States module a bit “sketchy.”
Unfortunately, I don’t know of any alternative way to save a user patch within MNodes at the moment.
Personally, I consider this functionality essential; otherwise, it’s a bit like having a convenient word processor where you can create texts effectively but can’t save them. That might be acceptable for short notes, but certainly not for more extensive texts.
My point is that, beyond a certain number of controls, every user will surely want to save a successful configuration as a patch, and users will expect such functionality from the developer of an application—whether it’s an effect or an instrument. That’s only natural…

@OctaFuzZ
Saving at the module level doesn’t work very well for me either.
In DronZone, I originally integrated a custom patch management system for the individual voices and the effects section. Since these sections feature an extensive set of controls, I thought it would be a good idea to let users create templates for them—something that would have greatly simplified patch creation. I used States modules for this, intended to save data only at the level of the specific modules involved. Unfortunately, I experienced frequent crashes whenever I closed MNodes or switched presets. In the plugin version, these crashes even took my DAW down with them (Ableton Live 12). So, I removed the whole saving mechanism and stuck with the single global saving method (better than nothing…).
By the way, I still can’t manage to lock controls via the Inspector so that they aren’t overwritten by States. I also can’t seem to get the value of a combo box to save properly (which is why filters and LFO cycles in DroneZone are selected via a knob :face_with_diagonal_mouth:).
OctaFuzZ, I really like your ideas regarding patch management features; I’m totally on board with that!

@Danny
I think your idea of ​​a configurable data-collection object is excellent. I believe that would be a great solution. It wouldn’t really matter to me whether the data is saved in XML, JSON, or just CSV, but the ability to create multiple datasets at a user-selected location (which could then be swapped out) is a really appealing feature :slight_smile:
You mentioned that you avoid the States module (I can understand why). I took a look at your ds_Trinus project. It’s a really beautiful poly-synth with a very elaborate GUI (wow!) and interesting multi-oscillators. There are a lot of controls on that GUI, too. Don’t you find yourself missing a functional patch management system there?

Thanks for your opinions and ideas.

Best regards, dr.rom

Don’t you find yourself missing a functional patch management system there?

Yeah, big time. you know as a lot of VST instruments have a complete browser for preset types and then underneath a group of presets. to import and export them. That’s something i would like to build in.

Now my options are limited. Oh i could use the Latch node, making huge memory blocks for each patch and store/read from them, building a sort of database. I know i can do that but that’s a huge effort and time consuming. never the less, still thinking of it to really go for that.

Because such a collection of nodes, i can make “Modules” and make a user to add/remove them. but well, i have to think about that one.. my brain is thinking, imagining.

You mentioned that you avoid the States module (I can understand why)

Recently, and that i think was fixed (MNode updates are coming in quickly all the time) and even i lose track sometimes about my reports, and the there after situations. But i had some issues with the states.. send/receive wire names where also stored as a state. for a short moment it completely destroyed my project. or, well. i had to rename 100+ of them back to there original names while i was building a theme system. Luckily i had a backup.

I spend a lot of time in MNode, i think i am already 600 hours in. well not all the time with MNode, sometimes rendering my knobs with blender for MNode and so. so yeah, States is for me just something to watch out for, be carefully taken in consideration how to implement.

For now it’s that, what’s the next issue around the corner :slight_smile:

But i am fine with that, i am a Moderator, Beta tester.. i try to always pinpoint out what the problem is and report back with even video’s about it.

But i think states is a great functionality to have. people can morph between them so that gives a whole new dimension for a plugin. but i am not feeling it as “save my preset” system.

Thanks for your opinions and ideas.

I am verry pleased that you are on this forum, you explain a lot.. sharing your experiences and people like you are good to have on this forum. :oncoming_fist:

this yeah probably the only way around that is to use the control names given in the project and that would also mean you need to follow a script on how to do it right (give everything a proper name) as i would expect from any system really i think there is no easy solution here its complex however it goes