Hi,
I am a newb. I want to print a bunch of different levels (eg vol, mod, etc) from iterations of the same abstraction, each with its own creation arg, so that I can save the whole lot as a message that can be used a preset in a separate file. The levels are stored in floats, then when I press the 'print' bang, all those floats are output to different 'print' objects, each specifying the object in question (for example, the mod level on the fifth iteration will say '5mod: 2.5'). This gets saved along with all other data points in a message box that is then received by the same object (eg 'r $1mod:' , which for the fifth iteration will be received as 5mod:). This works great, except each time I want to create a new preset, I press print and then I have to add the semicolon to each individual message in the long chain. It gets tiresome. I'm wondering if there's some easier way where the 'print' could show the following: '5mod: 2.5;'
You can't just type 'print $1mod ;' because it then outputs the following: '5mod /;: 2.5'. It seems like 'print' always keeps the float last. Idk what the '/' means in this context.
This is all some preset-saving hack I came up with and surely there is also a better way to do this in general which I ought to learn. So far it's worked for me. But I keep building bigger things that require more semicolons to save presets and I get tired. For example, a 16 step sequencer, with a lot of different data for each beat iteration. So help on this question would be much appreciated!
Thanks!!
-
append ';' to a float
-
@wmullaney Yes, you probably should use [text] to save your presets.
But anyway....... you can add a semicolon to a message by sending the message [addsemi( into the message.
You can also add the semicolon after the float by prepending "add" to the "2.5"
I.e........
[2.5(
[add $1(
.... gives.....
[2.5;(
David.
-
@wmullaney I also think that using [text] is the best option for presets.
Here is a preset system for abstractions: preset-system.zip
It uses $0 as a second argument, so the abstractions can communicate with the main patch using its $0-value.
-
Here a version where the abstractions handle the presets all by themselves, using [savestate].: preset-system2.zip
This doesn't use the first argument anymore.
But i think the approach using one centralized [text] is more flexible.