First of all, I'm really thankful for this great forum. I just downloaded Pure Data three weeks ago and it's really blowing my mind with what is possible. I've been learning so much from you guys but I couldn't find an answer to this question.
I need to convert a number that represents seconds (ex:246) into an easily human readable symbol like "4:06."
I've got almost everything already built in the attached patch but I'm stuck at one tricky step. It seems so simple...
If the number of seconds is less than ten, the output becomes a one digit number. This is fine but it looks weird to display 4:6 instead of 4:06. I want this app to be useable and understandable to the average itunes user and the timestamp needs to look "normal."
Here's a text rendition of the bit that's causing problems.
number atom: 4
|
|
[t b f]
| \
| \
[0( \
| \
| \
[pack f f]
|
|
[l2s]
|
|
[print]
print: symbol 0 4
i get an output with a space between the numbers...
I need this: symbol 04
Thanks again for all your help and I really hope this problem can be solved.
PS: The attached patch translates seconds into timestamp and for my app I'll next create a little system for reversing back out to recreate the seconds number from the timestamp.
Maybe this little patch would come in handy for others? I would like to next add hours so I can have timestamps that look like this: 4:34:04.
how about an object called [seconds2timestamp] and corresponding [timestamp2seconds]?
Thanks again!