Hello, I want to show values on the screen and I use the pure-data-message.
“screenLine1 1: GrainLength $1ms”…
On the screen I get:
- GrainLength 129.93847ms
Sometime I have so many digits, that the physical unit „ms“ is not anymore displayed, because the value is too long.
How can I format the value, to have only one digit after the separator.
Here’s a useful list of stuff List of objects | Pure Data
int turns values into integer. So multiply value by 10, int object, divide by 10 will get you one decimal place (or something like that). Then send to screen.
You can also check the
[makefilename] object which is useful for formatting things other than filenames. (To get only one digit after the decimal point you can use a format string such as
use [int] , that will remove decimals.
Thank you, this is very useful. The functions name is a little misleading, but it works.