retrieving time attribute as a message

Nov 4, 2011 at 12:53pm

retrieving time attribute as a message

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

#59801
Nov 14, 2011 at 3:37pm

no clue?
aa

#215209
Nov 14, 2011 at 7:48pm

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

#215210
Nov 15, 2011 at 10:30pm

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

best,
Tim

#215211
Nov 15, 2011 at 11:11pm

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

#215212

You must be logged in to reply to this topic.