Accessing current preset Array?

For general discussion related FlowStone
Post Reply
R&R
Posts: 474
Joined: Fri Jul 15, 2022 2:28 pm
Contact:

Accessing current preset Array?

Post by R&R »

Hmmm...
Haven't looked before... until now. I can't seem to find any way to access current presets "Preset" float array data.
I see no prims nor any other way to read for example using current Ruby implemention.

That's a little bit wierd...

Thought I'd try and create a simple checksum similar to a MD5 for each preset...A small label, just as a comparison. But that's seems a no go :roll:
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Accessing current preset Array?

Post by Spogg »

The attached might help...

You can connect in the loaded preset float array and use the size of the array to find the last entry, or whatever index value you want.

Ruby… no idea but I think it’s possible.
Attachments
Float array for R&R .fsm
3.06
(543 Bytes) Downloaded 782 times
tulamide
Posts: 2714
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Accessing current preset Array?

Post by tulamide »

After some practical help from Spogg, a little background information:

The preset system is a black box by design. The manager really manages the presets, groups and file creation. A Ruby preset manager would be relatively simple, but without any way to connect it to the preset lines it will not work. (preset lines is my words for any input or output that makes use of the green "P")
"There lies the dog buried" (German saying translated literally)
R&R
Posts: 474
Joined: Fri Jul 15, 2022 2:28 pm
Contact:

Re: Accessing current preset Array?

Post by R&R »

The attached might help...

You can connect in the loaded preset float array and use the size of the array to find the last entry, or whatever index value you want.
Super! Thanks!
I'll check it out and see if I can use it somehow...
The preset system is a black box by design.
Good info tulamide... too bad, would have been practical to retrieve data directly from manager.
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Accessing current preset Array?

Post by Spogg »

I’m not sure I understand why you’d want to query the Manager directly. The Manager prim deals with the index of all the parameters stored in the preset parameter prims in the knobs etc. These are saved and loaded by specialist text to/from preset prims in the Preset Manager module and these prims mediate the actual contents of the text files or banks. As tulamide says, this data stream isn’t accessible to us.

If you have a preset parameter float array prim it will allow you to save and load float arrays in presets. When any preset is selected or loaded, the float array will appear at the output of the preset parameter prim for evaluation or whatever purpose you want. It’s often used for waveforms and graphs for example, but you could use it for anything. So you’d create a float array appropriate to your needs, save it in a preset along with the other synth parameters, and retrieve it when the preset is loaded or selected.
R&R
Posts: 474
Joined: Fri Jul 15, 2022 2:28 pm
Contact:

Re: Accessing current preset Array?

Post by R&R »

Was just looking for an aggregate of all preset data (pretty much same tables as saved textfile) to run some kind of algo on... to get a MD5 to display on a label 8-)

But I have more ideas on how I could use that kind of preset data. One being a chaos preset generator with some basic rules for generating relative values.

Of course... I could connect to all my parameters to collect every value. But, i'm soon hitting 1500+ parameters in my current plugin so. Mnjeea. Not worth it :lol: I already have work to do on it as it is now so...
User avatar
Spogg
Posts: 3368
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England
Contact:

Re: Accessing current preset Array?

Post by Spogg »

Oh I get it (I think!). You wanted to work with banks of presets rather than individual ones, right?
Other than parsing the bank text files I wouldn’t know how to go about that.
R&R
Posts: 474
Joined: Fri Jul 15, 2022 2:28 pm
Contact:

Re: Accessing current preset Array?

Post by R&R »

Oh I get it (I think!). You wanted to work with banks of presets rather than individual ones, right?
Other than parsing the bank text files I wouldn’t know how to go about that.
Precisely... 8-) Well, both cases (presets or banks) are useful actually.

I was quite unclear... and as always super-unfocused :D I rarely know what i'm doing :D

A better description of I wanted was to either create (on demand) or read the same data as in the textfiles (iow the preset bank table). Preferrably as an array.

Using actual textfiles themselves won't work in-plugin so that can be ruled out... unless the textdata could be "catched" instead of saved.

And... having to retrieve preset values from each param(eter) prim (in case of retrieving values for a single preset ) is an "amazing amount" of work :lol: Because, I guess, each preset prim has to be rigged with a little trigger schematic so as to only update output value when asked.. and then all 1500+ params routed to a single module :lol:
Post Reply