Forums > Dev

retrieving time attribute as a message

November 4, 2011 | 12:53 pm

Hi.

Is there a way to retrieve the value of a time attribute as a message – that is, in some way, doing the opposite of time_setvalue()?

Thanks!
aa


November 14, 2011 | 3:37 pm

no clue?
aa


November 14, 2011 | 7:48 pm

I would be interested too.
Especially because I have the feeling that time_setvalue() has changed with Max 6.


November 15, 2011 | 10:30 pm

You should be able to use time_getticks() and then convert the ticks to whatever format you need.

best,
Tim


November 15, 2011 | 11:11 pm

Hi Tim,

Yes that’s what I ended up using.

Just to be sure:
When scheduling permanent itm events in Max 5 I simply did something like:

atom_setfloat(&a, ticks);
time_setvalue(x->timeobj, NULL, 1, &a);

where ‘ticks’ is the time in the future I want my event to take place.

Whereas in Max 6 for it to work I have to do:

atom_setfloat(&a, ticks – itm_ticks);
time_setvalue(x->timeobj, NULL, 1, &a);

where ‘ticks’ is the time in the future I want my event to take place and
‘itm_ticks’ is the itm time now where I schedule the event.

In short:
in Max 5 I used the absolute time value,
in Max 6 I use a time value relative to the itm time.

Thanks,
Roby


Viewing 5 posts - 1 through 5 (of 5 total)