Changing $1 to $x using flonum/number

Jan 3, 2012 at 2:06pm

Changing $1 to $x using flonum/number

– Pasted Max Patch, click to expand. –

This may not be the best implementation of what I’m trying to do, and there may be a very simple way to do it, but…

The message box needs to change, so from “line $1″ to “line $x”, whatever x may be. It works up to $10, but anything above 10 is formatted as “/$xx”. That slash causes the rest of the patcher not to work.

Is there any way to do this?

#60987
Jan 3, 2012 at 7:01pm

When using #n or $n, Max will only substitute the first 9 items.

– Pasted Max Patch, click to expand. –
#219714
Jan 3, 2012 at 7:03pm

So what are you trying to do?

#219715
Jan 4, 2012 at 1:55am

messagebox-free version:

20, 30, 40
[list line 0] [list line 0] [list line 0]

or for list input:

20 30 40
[unpack 0 0 0]
[pak line 0] [pak line 0] [pak line 0]

-110

#219716
Jan 4, 2012 at 8:31am

Cheers for the help!

“line $1″ was appearing to reference a single word within a textedit box, so I was trying to step through the words to trigger off midi/samples.

Taking the advice that this is a stupid way of doing it (“When using #n or $n, Max will only substitute the first 9 items”), I’ve copied some code from elsewhere, which literally chooses the entire line, then broken it down to words and letters by using zl.slice and listfunnel.

That seems like a much more elegant solution.

#219717

You must be logged in to reply to this topic.