MNodes needs patch management!

Hello Mario Nieto, hello MNodes users and developers,

Please excuse the somewhat provocative headline of this post.
Please view it as an expression of the urgency this topic holds for me, rather than an act of presumption!

I also want to emphasize how impressed I am by the scope and speed of MNodes’ development (I am quite familiar with the world of software development and have a rough idea of ​​the effort and skill that have gone into this system).
There are now a great many modules available, quite a few of which are so powerful that they regularly spark ideas for interesting instruments or effects I could create with them.

However, this is where I keep running into the same problem:
I have spent the last few days—actually, weeks by now—working intensively with MNodes. I developed “DroneZone,” a synthesizer specialized in drone sounds (available for download via the Hub), and in the process, I gained a lot of practical experience with this development platform.

DroneZone is not a small project. It boasts numerous functions and, consequently, a large number of controls.
But what DroneZone lacks is a practical way for users to save the sounds they create as patches.

I integrated a rudimentary save function based on the State- module.
However, after working extensively on this, I have come to the conclusion that this module is essentially unsuitable for this task.
Of course, I realize it wasn’t designed for that purpose; yet, it is the only option available when you want to save something.
By the way: the module doesn’t even operate reliably. I’ve created two separate requests for this in the relevant forum category:

and

In another post on this topic, I drew an analogy to a word processor that boasts powerful text-editing features but doesn’t allow the user to save their work.
What would users say about a system like that?
Probably something along the lines of: “It’s great what you can do with it. But if I have to start from scratch for every text and can’t reopen the documents I’ve created, it’s just too much of a hassle—I’d rather not bother…”

That analogy reflects my current view of MNodes.
I consider it a very powerful development tool, and it’s a lot of fun building interesting tools with it.
However, when I look at an MNodes project from the perspective of a developer wanting to create standalone audio applications, the question of patch management immediately comes to mind.
It has long been a given that users can save their own creations in practically any audio tool - whether it’s an instrument or an effect (think Arturia, u-he, GForce, NI, and basically everyone else).

For the time being (:wink:), an approach like the one Cherry Audio uses would be enough for me.
There, a patch is saved by specifying a name and a category (e.g., Pads, Leads, etc.; if the category doesn’t exist yet, it’s created automatically).
Patches are then selected via an advanced combo box that allows for a two-step selection process: the category on the left and a list of the corresponding patches on the right. I find the ability to mark a patch as a favorite really useful!

To put it in a nutshell: I am certain that many developers share my view on this matter. While it is fantastic to have such a vast array of powerful building blocks at one’s disposal in a system like MNodes, how useful is it really if, in the end, you cannot create software that meets users’ current minimum expectations for an audio tool?
I fear that for a developer aiming to create production-ready software, the lack of patch management - despite all the advantages MNodes offers - is a nack-breaker.
And MNodes aspires to be a genuine development platform, doesn’t it, Mario? :hugs:

To anyone who has read this far (brave :+1:): Don’t get me wrong!
I genuinely consider MNodes the best development environment for audio tools that I know of (and I know quite a few). That is precisely why I take the trouble to write such lengthy posts.
However, there is a gap here that, in my opinion, needs to be closed quickly. I consider this far more important than the next “killer feature” module.

So, what do you all think?

All the best, dr.rom

Hi,

I think a group of file based nodes would help out to get more control over what we want to store and read.

Like have a fixed root folder, not going up to prevent people trying to break into another folder. only down towards it’s children’s folders/files.

Having the ability to read the directory, create/delete a directory, open/save/delete a file and we could access a list, able to sort a list, search a list.

Files opened or stored can only be XML files.

But while i am saying this, it sounds verry easy but there is so much to figure out how to store this in a node with labels or identifiers and be able to read from them or collect the data. i think this will also conclude into a lot of send/receive wires where you have to make events to collect the data from all the nodes. Would also be a lot of work, but then.. i am willing to do that for having a good preset system.

For now the states is a bit of a hand out that will help you to store something but you never can turn this into a nice preset folder browsing/searching system right now.

Not meaning to be disrespectful because for me the states is never been about preset storage, more a way to morph between states. But i love to see something that makes it able to read/store XML files for any reason, if it’s presets, configuration, manuals/help and so.

Just to define exactly what you want to load, which nodes you want read from/write to even as this would be more labor intensive since you have to connect the paths yourself instead of globally managed.

But this is just my point of view on this.

i think my points of view are already known in the various posts you linked and i agree this is a missing link and also the biggest one (i consider sidechain to be another big one, one i suspect will be added very soon)

and as danny also stated the states node started out as a result of morph node and does not fit the purpose of a full fledged preset manager

Hi Danny,

I didn’t go into any technical aspects in my post because I wasn’t sure if that would be of interest to the developer or other readers.

However, since you have clearly given this topic a lot of thought, I’d like to take the opportunity to outline some of my own considerations here.

You have a very robust and pragmatic approach regarding file-based storage for MNode patches.

That said, I would like to raise a few points for consideration in this context:

  • I assume MNodes utilizes a modern container-based multitasking/multithreading architecture.
  • I also assume the software was developed within a framework (I suspect it’s JUCE).
  • This means the actual application runs within the framework and its corresponding containers, creating a layer of encapsulation from the operating environment.
  • If MNodes is used as a plugin, the entire application container runs inside yet another container provided by the DAW for plugins. This results in further isolation from the environment.
  • Finally, at the end of the chain, there is the operating system, which performs the actual read/write operations at the file level. For this to work, the application requires specific permissions within the OS (which is by no means a given, as this creates a significant vulnerability for malware and exploits).
  • Consequently, a read or write access request for a file on disk would have to be initiated by the application → pass through the framework containers → traverse the DAW’s plugin container → have the DAW forward the request to the host operating system → and the OS would then have to be willing to execute it in the first place.
  • Furthermore, it is worth noting that file system access always represents a bottleneck in an application. Such access is thousands of times slower than accessing a cache or heap within RAM.
  • In a modern application, performance relies heavily on intelligent multithreading—that is, the parallel execution of various program tasks. This only works if the threads communicate seamlessly with one another. Otherwise, all active threads would be forced to wait for a single slow thread whenever it performs a disk access operation. This would almost certainly drag down the performance of the entire application.
  • I am not familiar with the specific framework used for MNodes, but the process described above is more or less standard across modern software architectures.
  • If I understand you correctly, your approach involves creating an XML file on disk for each patch and mapping the patch categorization to a folder structure.
  • This is where the aforementioned problems would become significant issues; simply building the GUI component to list the patches would require a disk access operation for every single patch. Then there is the issue of access rights if the application needs to navigate through folder structures (try doing that on Linux, or on a properly configured Windows or macOS system… :open_mouth:).

Of course, this is all very technical stuff and doesn’t change your fundamental concept, which I think is excellent.

However, I would suggest an implementation along these lines:

  • When the patch management function is invoked, a recursive for-each-loop traverses the application’s entire DOM (the hierarchical structure organizing the application’s individual objects - usually a tree or graph structure).
  • Whenever the algorithm encounters a persistence component (i.e., a control element holding a value), it appends that specific persistent value - and nothing else - to a dynamic data structure (such as a JSON object) in the form of a tuple (a value pair consisting of the object ID and the persistence value).
  • Storing the object ID ensures that, when such a patch is loaded, the values ​​always end up in the correct control. This is crucial when an application is being further developed and controls are added or deleted. If a simple list of values ​​were used instead, incorrect assignments would occur whenever the object structure changed.
  • In principle, the same recursive algorithm could be used to load a patch, except that the corresponding persistence values ​​are transferred into the objects rather than being read out.
  • This would therefore be the equivalent of your XML files.
  • If one were to add an attribute to this data structure - which contains all of a patch’s values - that specifies the patch category (Pad, Lead, Bass, etc.), then this would correspond to the folder-based organization you envisioned. Furthermore, additional features (such as patch ratings) would simply be another attribute within that data structure :hugs: .
  • And all of this remains entirely under the application’s control, avoiding costly disk access operations.
  • The individual patch data structures could be stored in a file-based database. Such functionality is often built into frameworks anyway. If not, there are excellent alternatives like SQLite or MongoDB that don’t require a dedicated database server.
  • This would reduce the entire process to a single disk access. By employing a smart caching algorithm, the number of actual physical access operations could be reduced even further.

I suspect the States-module operates based on this very principle.
Achieving this kind of functionality might actually require only a relatively minor modification.
Of course, you’d need a suitably enhanced GUI element. But looking at the GUI components of other modules, I imagine that would be a trivial task for the developer :slight_smile:

Oh man, that was a lot of text; if Mario Neito reads this, he might just laugh because it’s so trivial.
But hey, we’re just enthusiastic users :grinning_face_with_smiling_eyes:
And the only reason I’m taking the trouble to write all this down is that you’re clearly someone who likes to think things through to the end. I like that!

With that in mind, I hope our ideas find their way into MNodes soon; in my opinion, that would represent a significant step forward for the system.

Btw. Before I forget: regarding my other post about the issue with the States module interacting with the IF modules I ran into a problem where I couldn’t upload the crash report files for Mario Nieto.

You tried to help me out with that very quickly. Unfortunately, it still isn’t working; I think the forum software has a grudge against me (I guess I need to write shorter posts :face_with_hand_over_mouth:).
But since I haven’t heard anything further from Mario, I assume he’s managing fine without the reports.
In any case, thank you for your prompt assistance.

All the best and see you soon… dr.rom

Hi dr.rom,

You always make me smile, no offence intended. reading changelogs of Mario takes a coffee or two i am now considering to have lunch now while i am traversing your message :slight_smile:

But i am fine with that, at least you get into it a bit deeper. good to reflect thoughts and ideas.

Yeah i was cutting corners, in the sense that i have some programming skills so i do skip some details sometimes that are to obvious for me.

Lets hope so ( i wouldn’t expect anything else either)

Correct

Normally it should, at least that is what you could expect from a lot of frameworks with some IF here and there’s. some additional flags to be set or so.

As far as i know, these containers that are set by the DAW itself, like sharing or working in an isolated sandbox for some (i gues audio) management. But all plugins with presets are still able to access there folders on your operating system, so it’s not completely isolated.

Depends a lot of the OS, which folders are system folders and which are not. Occasionally there is software that works better if you run it in admin mode for windows. Depends also again on if you’re windows account is an administrator account i guess what could have different results.

And therefore it’s best if Mario has the intention to use a file based node system to read/write/create/delete folders and files that this is only possible in a certain root folder next to the project file and prevent tricks like backlashing to a parent folder of that root and also just store files in a format that can’t be destructive such like an XML.

The plugin itself communicate with the OS itself as far i have been reading. it’s not like “create folder” that the DAW is going to address that, it’s just the plugin giving a command to the OS.

Sure, back in the 90’s you could better make a ramdisk sometimes. But these days with an SSD, windows 11 booted up in 15 seconds you can’t see this as a bottleneck anymore. But then, it depends of what type of computer you have.

Sure, but we are talking about MNode and the capability to store presets or other items like configuration/help files. Like notepad on windows to store a txt file. MNode is not an AI agent that runs thousands of tokens every second.

It’s Juce

Yes, the most logical way to use since Mario’s project files are also stored in XML format. and XML can’t do a lot of harm, the can not be executed on there own since its a dataformat file (text based) and can’t do anything on its own.

In any worst case scenario it’s for the user to understand how there OS works and if a folder has the requirements to be accessible with the given rights for a folder for example.

I don’t know how this works with MacOS but with Linux i have done that so many times without any issues. But then MNode is not supporting Linux so that is no issue there.

For windows, MNode is installed.. it can write anywhere i want to except windows system folders that are protected. but if its’s on any drive, music/document or even the C: root folder, there are not additional rights to be given.

So it shouldn’t be given any problems on Windows.

And i think with the MacOs things have to be signed? something like that. well since MNode is running, i assume all file handling are granted with the rights of the signed app. Something like that. Since i dont know anything about MacOS i can’t make assumptions then only a wild guess.

You will need some nodes like (or combined), some are arguable depending the needs. :

  1. Root Path
  2. Join Path
  3. Parent Path
  4. Path Info
  5. Create Folder
  6. Folder Exists
  7. List Folders
  8. Delete Folder
  9. Rename Folder
  10. File Exists
  11. List Files
  12. Find Files Recursive
  13. Create File
  14. Delete File
  15. Rename File
  16. Copy File
  17. Move File
  18. Filter Files
  19. Search Files
  20. Sort Files
  21. Load XML
  22. Save XML

And then also the need to get that date in a node that contains it all, to read out from and so on. not going in to deep here, there are a lot of ways.

With XML you can do whatever you want. you can store base64 encoded data, give id & keys, labels and names.. store anything if you want to. The power of XML is that it’s always capable to add more items without the need to convert older XML data into a new one. You read the old data, write it back with the new data and all is there. it even would work backwards if an older version reads a newer version of an XML file.

Most smaller collections of data just remains in memory or in a cache. The concerns you address would fit in systems where it’s all about data management on a larger scale or on a verry old computer back from the 80’s. where i remember i had 2MB (not GB) memory, and 100mb IDE drive..

But it all depends.. is it about 1000 presets or 100.000’s. all depends of course what the requirements are but for a basic preset file browsing system, this should not bring any bottlenecks.

Sure it would.

Okay, Good to know.. Also i don’t know how to fix that then yet. i will take a dive into that admin area to see if i missed something.

Knowing how many times he already addressed the states module in changelog’s i think he is always working on it to get things work out smoother. Can’t be long, a next MNode version will arrive soon knowing his release pattern. always in X day’s.. never weeks..

You to, and it’s okay if your messages are shorter and on a specific topic because i am not able to do these kind of messages a lot, to react on. It takes a lot of time. :slight_smile: . And i am not that guy that want’s to be disrespectful, i love to take time to address some communications but in general i just don’t have the time for that.

See you soon :slight_smile:

PS: I noticed that Mario has given you trust level 2 (member) so that might have done the job. I am not able to see which level has which rights. Hope it works now with attaching files.

Hey, yes! As Danny mentioned, I’ve increased your trust level, so you should now be able to attach files, @dr.rom.

As for the other requests, I’m taking some time to look into them properly and make sure I implement them well. I’m working on it. Thanks!

@Danny

Thanks for your numerous comments on what I shared.
As I already wrote above, I’ve said everything I wanted to say on this topic for now.

That’s a lot of good food for thought; let’s see what the developer makes of it…

Have a great weekend, dr.rom