Forums > MaxMSP

Getting data from a computer's clock into max

March 5, 2007 | 7:57 pm

Hello again

this is my new conundrum:

I want to get data from my computer’s clock – as in the one that tells you the time and date (in case it has other technical meanings) – into max/MSP in order to make events occur at precise times. I need total accuracy of timings over several days, and from what I understand the metro object is not totally rock-solid in this respect. Similarly, I am not getting total accuracy using a phasor~ instead of a metro – there still seems to be a few milliseconds error every few seconds, which could add up to quite a bit over a few days.

Any thoughts anyone?

thanks a lot

sam


March 5, 2007 | 8:10 pm

have u looked at the date object?

there’s also another 3rd party gregorian date object somewhere…

j


March 5, 2007 | 8:17 pm

from metro.help:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 261 277 26 196617 uzi;
#P message 220 294 38 196617 tempo;
#P comment 22 278 102 196617 see also: Tutorial 4;
#P message 220 277 38 196617 delay;
#P message 168 294 49 196617 setclock;
#P message 168 277 49 196617 cpuclock;
#P message 121 294 44 196617 counter;
#P message 121 277 44 196617 clocker;
#P hidden newex 186 320 64 196617 prepend help;
#P hidden newex 186 340 45 196617 pcontrol;
#P window linecount 4;
#P comment 48 215 344 196617 Metro takes one optional argument which
is the metronome time in milliseconds. The left inlet takes int which
starts it with a non-zero value and stops it with the value zero. The
right inlet takes int to change the metronome speed. The outlet sends
bang.;
#P hidden connect 2 0 1 0;
#P hidden connect 3 0 2 0;
#P hidden connect 4 0 2 0;
#P hidden connect 5 0 2 0;
#P hidden connect 6 0 2 0;
#P hidden connect 7 0 2 0;
#P hidden connect 10 0 2 0;
#P hidden connect 9 0 2 0;
#P window clipboard copycount 11;

or
date ?

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 270 215 53 196617 see also:;
#P message 315 233 43 196617 timer;
#P message 315 216 43 196617 clocker;
#P hidden newex 291 256 64 196617 prepend help;
#P hidden newex 291 279 45 196617 pcontrol;
#P window setfont "Sans Serif" 18.;
#P comment 15 10 106 196626 date;
#B frgb 21 56 9;
#P window setfont "Sans Serif" 9.;
#P comment 15 35 292 196617 Report date and time;
#P user panel 10 5 400 50;
#X brgb 255 247 207;
#X frgb 0 0 0;
#X border 0;
#X rounded 0;
#X shadow 0;
#X done;
#P comment 189 215 36 196617 Minute;
#P comment 227 215 38 196617 Second;
#P comment 112 216 32 196617 Year;
#P comment 76 216 24 196617 Day;
#P comment 37 216 36 196617 Month;
#P window linecount 2;
#P comment 155 230 79 196617 time (as list of three numbers);
#P comment 38 231 81 196617 date (as list of three numbers);
#P window linecount 1;
#P comment 270 197 100 196617 ticks;
#P number 270 176 89 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 227 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 191 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 155 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 155 176 82 196617 unpack 0 0 0;
#P number 112 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 76 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 40 198 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 40 176 82 196617 unpack 0 0 0;
#P newex 40 149 240 196617 date;
#B color 5;
#P newex 84 81 68 196617 metro 1000;
#P toggle 84 61 15 0;
#P comment 102 62 93 196617 Start/Stop "Clock";
#P message 40 119 33 196617 date;
#P message 84 119 34 196617 time;
#P message 128 119 36 196617 ticks;
#P button 84 101 15 0;
#P comment 156 215 28 196617 Hour;
#P window linecount 4;
#P comment 190 87 164 196617 Date reports the current date , time ,
or ticks (60th/sec since system startup) when sent the date , time
, or ticks message.;
#P hidden connect 31 0 30 0;
#P hidden connect 33 0 31 0;
#P hidden connect 32 0 31 0;
#P connect 9 2 18 0;
#P connect 14 2 17 0;
#P connect 14 1 16 0;
#P connect 14 0 15 0;
#P connect 9 1 14 0;
#P connect 10 2 13 0;
#P connect 2 0 4 0;
#P connect 8 0 2 0;
#P connect 7 0 8 0;
#P connect 10 1 12 0;
#P connect 10 0 11 0;
#P connect 9 0 10 0;
#P connect 5 0 9 0;
#P connect 4 0 9 0;
#P connect 3 0 9 0;
#P window clipboard copycount 35;

Am 05.03.2007 um 20:57 schrieb sam:

>
> Hello again
>
> this is my new conundrum:
>
> I want to get data from my computer’s clock – as in the one
> that tells you the time and date (in case it has other technical
> meanings) – into max/MSP in order to make events occur at
> precise times. I need total accuracy of timings over several days,
> and from what I understand the metro object is not totally rock-
> solid in this respect. Similarly, I am not getting total accuracy
> using a phasor~ instead of a metro – there still seems to be
> a few milliseconds error every few seconds, which could add up to
> quite a bit over a few days.
>
> Any thoughts anyone?
>
> thanks a lot
>
> sam
>
>

mit freundlichen Grüßen,

Matthias Schneider-Hollek

digital masters
c/o Musik der Jahrhunderte
Siemensstr. 13
7o469 Stuttgart

studio: xx-49-711-6o7o78o
mobil: 0178-4088162

http://www.digitalmasters.de
http://www.hollek.de
http://www.durbanpoison.info
http://www.elektrominibarklingelton.de


March 5, 2007 | 8:18 pm

You mean like manual page 131?

On 3/5/07 2:57 PM, "sam" wrote:

>
> Hello again
>
> this is my new conundrum:
>
> I want to get data from my computer’s clock – as in the one that tells
> you the time and date (in case it has other technical meanings) – into
> max/MSP in order to make events occur at precise times. I need total accuracy
> of timings over several days, and from what I understand the metro object is
> not totally rock-solid in this respect. Similarly, I am not getting total
> accuracy using a phasor~ instead of a metro – there still seems to be a
> few milliseconds error every few seconds, which could add up to quite a bit
> over a few days.
>
> Any thoughts anyone?
>
> thanks a lot
>
> sam
>
>

Cheers
Gary Lee Nelson
Oberlin College
http://www.timara.oberlin.edu/GaryLeeNelson


March 5, 2007 | 9:33 pm

your best bet for a precise clock is using a signal in max.

objects like dspstate~ or cycle~ make perfect clocks and run
stable for months if necessary.


March 5, 2007 | 10:15 pm

cpuclock might be useful? Java?

Ive been writing a Java external that uses Javas system time to make
play a playlist file from a Coll. You basically create a large
playlist with the date, time and module and message you want
triggered and it does it. It works, isnt finished, but is actively
being used. It has some lame bugs, but Im just so godamned lazy.

On Mar 5, 2007, at 4:33 PM, Roman Thilenius wrote:

>
>
> your best bet for a precise clock is using a signal in max.
>
> objects like dspstate~ or cycle~ make perfect clocks and run
> stable for months if necessary.
>
> –
> http://vst-mac.info/

v a d e //

http://www.vade.info
abstrakt.vade.info


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