Float precision with tosymbol and textbutton

Timo's icon

Hey,

so I have the following patch and can't seem to work out how to set the precision in the output to the textbutton. As far as I understand it the textbutton object requires to tosymbol transformation, which sets the precision 4. Any ideas?

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

Thank you!

Source Audio's icon

What do You really need ?
To have more or less decimal places ?
Displayed in textbutton or at it's output ?
Dealing with float precision display has allways been tricky in max.

P.S. i remember this one using sprintf

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

Timo's icon

Hey!

Here's my complete patch.
I want the button to be able to show the fixed frequency OR the frequency range the vibrato lfo generates.
To answer your question: less decimal places. Two.

Thank you for your help!

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

Source Audio's icon

use sprintf as I posted, just set it to 2 decimal places

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

Timo's icon

That worked.

Thank you!