Simple timer display

pauleary's icon

Hey all. I've been trying to create a basic timer display that displays
minutes and seconds but I'm not having much luck. I can create a
timer pretty easily that counts up in seconds, but a value of 145.6
for seconds is not as useful as 2.42min. I'm sure this involves some
pretty basic math that is beyond me.

Thanks for any help!

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

Here is my basic patch.

laonikoss's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Check out the [% ] and [round] objects and that should get you there.

LSka's icon
Max Patch
Copy patch and select New From Clipboard in Max.

[clocker] and [translate] may help you too.

pauleary's icon

Thanks. This is turning out to be such a pain in the $@#^. laonikoss, your patch doesn't work as it rounds up when it reaches
30 seconds. Trying to find a better way. As of now, I have a complicated and ugly clock that I put together using a jitter window.
But it still looks bad as it doesn't display .04 for four seconds for example, only .4

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

Any more suggestions would be helpful.

ak's icon
Max Patch
Copy patch and select New From Clipboard in Max.

.4 -> .04

Lance Ford Jones's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's a suite of routines I use for this type of translation.

laonikoss's icon
Max Patch
Copy patch and select New From Clipboard in Max.

pauleary: sorry, my bad. here's one with the leading zeroes, just a bit of tweaking:

EDIT: @Lance Ford Jones: hey, that's brilliant! mine's a bit redundant now.. never thought to do it this way, very solid! :)

Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I'm just assuming that everyone is supplying /% and sprint solutions. Here's another one: