Forums > Max For Live

how do i put a variable in a message in m4l

June 2, 2011 | 8:05 pm

For instance, I have:

path live_set tracks 0 devices 0 chains 0

And i want to get all chains, devices…

Could i SET a variable that I iter over, and then use:

path live_set tracks $1 devices $2 chains $3

Cheers,

N


June 3, 2011 | 8:47 am

The [sprintf] object is best suited for this. Try instantiating it like this: [sprintf path live_set tracks %ld devices %ld chains %ld].


June 3, 2011 | 1:49 pm

Personally I’m using the [pak] object for this: [pak path live_set tracks 0 devices 0 chains 0].

Advantage: it delivers output when input is received on any inlet.


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