how do i put a variable in a message in m4l

Jun 2, 2011 at 8:05pm

how do i put a variable in a message in m4l

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

#57410
Jun 3, 2011 at 8:47am

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

#205722
Jun 3, 2011 at 1:49pm

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.

#205723

You must be logged in to reply to this topic.