Forums > MaxMSP

change a lot of messages

July 10, 2013 | 6:01 am

I have a patch that I need to multiply lets say. After each message in the patch (around 50 messages), I have to add 2, 3, 4 and so on. Is there a way to do this faster than dong it manually? opening as text is not helpful as I cannot do replace all.


July 10, 2013 | 7:21 am

why can’t you do replace all ?
there is several options to help you : cmd-f, type the message you want to replace, replace each time (navigation between boxes automatic, with "next") – copy the thing with which you want to replace, select the thing to replace, shift-cmd-v – this can be done by scripting certainely (not sure how. check [universal] [thispatcher] if you need it that way). btw, if there is so much thing to replace and if you need to replace often, there must be an easier way than replacing your messages each time – with $1 $2 etc, with math operations etc…


July 10, 2013 | 7:56 am

right on; if there’s ever a need to replace a ton of one thing, then there’s an easier way of doing it than replacing each of them.

a message with "this is my message $1" can be really useful, as well as using pak/pack/join for it.


July 10, 2013 | 8:04 am

do you mean that all the messages you have are different and you still want to add a 2, 3, 4 after each message?

perhaps something like this?

<code>

– Pasted Max Patch, click to expand. –

</code>


July 10, 2013 | 9:54 am

I cannot post my patch apparently. Is it possible to get something like this "send thismessage#1" wher I can change #1 in some way?


July 10, 2013 | 9:59 am

Well here it is. Any suggestion? In the worst case I open it as text and change everything. However, something dynamic would be more interesting.


July 10, 2013 | 11:14 am

Your patch didn’t show up again..


July 10, 2013 | 11:20 am

Here is a dropbox link: https://dl.dropboxusercontent.com/u/7668067/dataunpacker.maxpat


July 10, 2013 | 11:40 am

If you are populating all of those message boxes with coll data, why not dynamically change and output the contents of the coll? Perhaps a second coll that runs parallel to the existing data source that you can edit and output as needed.


July 10, 2013 | 12:38 pm

Metamax: Could you explain with a patch. I do not really understand what you want to say. Now, about the patch: The patch receives data from either a coll (for offline operation) or in realtime (from the internet). In either case, the data are formatted as in the message box containing all the datapoints. These data have to be unpacked to be able to be sent to the next patch which combines several datapoints to make mappings.


July 10, 2013 | 12:56 pm

I tried to create an example but I couldn’t mimic the data you are receiving from yahoo. I keep getting errors when I create random values. I also have to get back to work.

What I’m saying is if you are populating the patch with data from a coll, there may be a way to update/change those values from the back end. That way, instead of trying to alter message boxes individually after they have been populated by a coll, change the values prior to the patch. If need be, repopulate a second coll with those values and send those to the patch. That way, the messages in the patch will continue to receive values in the same format. Just a thought.

btw, are you using copy compressed? The patch code you posted in dropbox is over a half a MB.. whereas a compressed copy is only 18KB…

This is the original patch that you couldn’t post:

– Pasted Max Patch, click to expand. –

Viewing 11 posts - 1 through 11 (of 11 total)