Max/MSP - is it possible for the patch to "write" to a Comment (or other text object) while a patch is running?
I'm sure the answer is yes, as Max can do almost everything, if you know how. Well, being a beginner, that knowledge doesn't
come until after 1000s of hours of use.
I was thinking that a useful feature for a patch would be to save values (or alpha text) of interesting (things that look or sound good) settings so that
they can be read as a reference for later use.
Initially, I thought of a Comment object, but it looks like that can only change in edit mode. The comment object is cumbersome though, it can't be resized and there are no inputs. It isn't designed for what I'm trying to do.
How would I write numeric/text values to an object while a patch is running?
The idea is to save interesting values to a chart/table that can be easily seen while the patch is running (not offline in a file).
Yes- I'm sure the NodeJS thing can create a webpage, but I don't think learning javascipt (and all of its issues), are needed to do this.
Learning Max is enough for a lifetime.
Thanks
At first, comment object got an input (if it doesn't, check attributes in inspector, there is one to make the input visible or not)
Then sending any kind of message prepended by "set" to a comment object will change its content.
But I guess you maye required something else if the main goal storing recall lists on the fly, for instance.
Thinking about a couple of objects for that :
coll
dict. Objects family (can store recall and much more and there is a dict.view which is basically a ui to view dictionaries' content)
Maybe that could be enough for your needs.
Still not sure about the global context of your needs.
Keep us posted
today it even works with the comment object, and if would not, you could script a new comment object with new content.
other objects which can have dynamic text are lcd, jit.gl.text, some more.
for only a few different things umenu in label mode is also usable.
Have you tried the textedit object?
Here is a screenshot of an incomplete patch that is just an example of what I'm trying to do.
At the bottom of the patcher is a button. When the patcher is running I click the button, I want to save the values of the 3 number boxes at the top left of the patcher, to "some object" under the
SAVED VALUES comment.
To the right of the patcher, I have a simple text editor containing 3 "sets" of saved values, where 1 "set" are the 3 values from the number boxes at the top left of the patcher. (I typed these into the text editor manually, because I don't know how to save "favorite settings" to an object within the patcher itself.)
In other words, if I click the SAVE VALUES button 3 times, 3 sets of
of desired (favorite) values would be saved.
Lets assume each "set" of values produces some desired effect to the patch (whether visual or audible), and that I want to use these values at some point in the future in order to reproduce that sound.
Ideally, these sets of desired values should be:
Saved as part of the patcher (not in a separate file)
Easily visible within the patch. (not hidden or in another window)
It would also be desirable for me to manually
add some notes as if I had a freeform text field.
I hope this explains what I am trying to accomplish.
@julien bayle
I did get the "set" in a msg box to send data to a comment, but
I may want to "append" several sets of values to the comment (or other object),
and save those saves values with the patcher.
Perhaps that can be done, I'll need to look into this a bit more.
comment accepts append message which is first thing that jumps
into one's eyes if one takes effort to read help file.
but it can only display something, not output,
which makes it unusable for your case.
There are quite some objects that can embed stored items together with patcher,
which again works ONLY when one also saves the patcher,
and is unusable concept in standalone app, without external file.
You can look into coll, preset/pattrstorage, dict, textedit, jit.cellblock ... and so on.
you only need to create logic that stores your values into selected slot
and recall it using whatever means.
[chooser] is another object that you can use to accumulate, display and manipulate a dynamic list of values. It also allows you to select and output values from the list later by clicking or double-clicking on them.
But you need to read to help file to understand how these objects work. For example, many of them don't just accept messages directly - you often have to give the messages index numbers or use (insert) or (append) to push them into the object.
Which, at first glance, can seem confusing when you end up using objects like [prepend append]!
Can chooser items be post edited?
I don’t think so, or has that changed recently ?
Which would be a good improvement
for such lists of releated numbers one might even consider a cellblock with a linked coll.
>>into one's eyes if one takes effort to read help file.
"SOURCEAUDIO" - as mentioned previously, I am very new to Max
Much of the help file contents for all of the objects - is meaningless at this point.
@Cappy2112
Much of the help file contents for all of the objects - is meaningless at this point.
Bear in mind that the Help windows are actually just normal patcher windows. You can therefore click on the controls, messages and other elements to see exactly what the Help file examples are doing. You can also hover over the connection cords to see what messages are being sent from one element of the Help examples to another.
There are also tabs across the top of many Help files that include other examples, and occasionally there are subpatchers (indicated as a [p xxxnamexxx] object) that you have to double-click to open. The help file for [thispatcher] includes both methods, for example.
If you are new to Max and struggling a bit with some of the concepts, it is well worth spending a bit of time going through some of the tutorials in the Reference section under the Help menu. Click on the House icon and then the Max dropdown on the lefthand edge of the Reference book to find the list of tutorials.
@SourceAudio:
Can chooser items be post edited?
I don’t think so, or has that changed recently ?
Which would be a good improvement
Not directly inside the [chooser] object itself, but you can click on an item to export it, edit it externally, and then put the edited version back into the [chooser]:
Here's a slightly more sophisticated example that will perform external editing of any entry clicked on with the mouse:
I think that chooser is a bit complicated to work with for this purpose.
Maybe if one uses doubleclick to recall,
click to make ready for editing in external objects ?
Strangely, I can't get double-clicking [chooser] entries to output anything in a normal patch window but it works fine in a Standalone!
maybe check attributes ?
try to follow this as idea, I am sure it makes no efficient construct,
but just as example to show how complicated it would be to deal with storing 3 values
compared to coll or jit.cellblock
@Cappy2112
Here is what I think you could do, complete with annotations that I hope will help you to understand how it works:
You will see that it has similarities to SourceAudio's example. The only thing that I've noticed is that in Windows, double-clicking [chooser] entries doesn't generate output from outlets 3 and 4 in a normal patcher as it should and yet it works if the patch is built into a standalone! Clearly, this is a bug in the Windows version as SourceAudio can do this on his Mac. I've used a BANG to invoke replacement of edited values instead.
Here is the patch in a form that you can load into Max. Click the blue button to copy the patch to the clipboard and then select File -> New From Clipboard in Max to open it:
@Andy Maskell
I am going through a series of tutorials on YouTube (Andrew Robinson's tutorials), which I find very helpful.
That is what let me to this post- about "saving interesting values" to a notepad (of sorts).
Thanks for your patch above, will look into that.
my chrystal ball suggested that we soon release a book about chooser for beginners.
allow me to go into reverse. you can also use messageboxes or numberboxes like so:
first choose the place where to store, then press the button. deleting and recalling will also be quite simple.
we also have not yet mentioned the [preset] object. (if you want visualisation, too, you can combine preset with messageboxes or any other display method.)