populate coll with symbols and spaces?

brendan mccloskey's icon

Hi
I cobbled a patch together in response to a recent post, and would be interested to see if anyone with experience of [sprintf] and [regexp] etc would be able to suggest how to insert any text into a coll. In other languages I would just say:

print ("Val = ");
println (val, DEC);

etc

but I'm afraid the above mentioned Max objects are still a mystery to me (no solid programming background). The attached patch collects peak values and frequencies from a number stream and packs them to a coll - I'd just like to insert some text/symbols too.

Max Patch
Copy patch and select New From Clipboard in Max.

Brendan

Zachary Seldess's icon

Hi Brendan,

Here it is with sprintf:

best,
Zachary

Max Patch
Copy patch and select New From Clipboard in Max.

brendan mccloskey's icon

Hi Zachary
perfect, and thanks for the 'tidyness' of the [t b b 1 0]; I always forget this extremely useful little obejct whenever I patch in a hurry.

Thanks
Brendan

brendan mccloskey's icon

Did a quick google for the C version printf; I'm a little clearer now on [sprintf], %f, %s; but what exactly does %d and %ld mean or signify?

Ta ta
Brendan

edit
ignore me......I guess d=decimal

Brendan