Gabor Timing

From ftm

An important issue for Gabor is to guarantee (over) sample precise timing (synchronization) at least between the Gabor externals, while integrating into the timing of its host environment.

Gabor Scheduling in Max/MSP

Gabor doesn't really have its own scheduler yet (it entirely relies on Max' high-priority scheduling), but it uses its own virtual timing that is generated and interpreted correctly only by the Gabor externals and may appear jittery in the standard Max/MSP externals.

The externals gbr.fire~, gbr.slice~ and gbr.psy are sources of Gabor events and timing. The gbr.timer~ can display this timing correctly and especially gbr.ola~ uses the Gabor timing to precisely sync the Gabor events (i.e. matrices) with the Max signal processing world (MSP).

The following patch tries to make this clear:

#P window setfont "Sans Serif" 18.;
#P user umenu 143 490 528 196680 3 64 518 0;
#X add Gabor seems to jitter when you use timer;
#X add the Gabor timer interpretes also the standard Max timing;
#X add qmetro jitters for everybody;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 43 175 67 196617 startwindow;
#P window setfont "Sans Serif" 18.;
#P user umenu 264 44 100 196683 1 64 72 1;
#X add Gabor fire;
#X add metro;
#X add qmetro;
#P window setfont "Sans Serif" 9.;
#P newex 179 154 39 196617 * 100.;
#P toggle 366 134 15 0;
#P toggle 273 133 15 0;
#P toggle 179 133 15 0;
#P button 366 214 15 0;
#P newex 366 112 31 196617 == 2;
#P newex 366 178 63 196617 qmetro 100;
#P button 273 213 15 0;
#P button 179 213 15 0;
#P flonum 396 453 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 396 361 48 196617 cpuclock;
#P newex 396 417 43 196617 - 0.;
#P newex 396 390 43 196617 t f f;
#P newex 273 111 31 196617 == 1;
#P flonum 219 453 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#N gbr.timer~ --> 0;
#T _ #ftm version 2 4;
#T _ #scope begin;
#T _ #absargs $0_ $1_ $2_ $3_ $4_ $5_ $6_ $7_ $8_ $9_;
#P newobj 219 361 59 196617 gbr.timer~;
#P flonum 313 453 56 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 313 361 35 196617 timer;
#P newex 260 293 132 196617 b 3;
#P newex 273 177 58 196617 metro 100;
#P newex 179 111 39 196617 == 0;
#P user ezdac~ 43 202 87 235 0;
#P window linecount 2;
#N gbr.fire~ @unit ms --> 0;
#T _ #scope end;
#P newobj 179 177 54 196617 gbr.fire~ @unit ms;
#P window linecount 1;
#P comment 369 53 100 196617 choose timing source;
#P fasten 24 0 25 0 61 96;
#P fasten 24 0 26 0 138 106;
#P connect 24 0 3 0;
#P connect 24 0 10 0;
#P connect 24 0 18 0;
#P connect 25 0 2 0;
#P connect 3 0 20 0;
#P connect 23 0 1 0;
#P connect 20 0 23 0;
#P connect 5 1 6 0;
#P connect 5 1 6 1;
#P connect 18 0 22 0;
#P connect 10 0 21 0;
#P connect 19 0 5 0;
#P connect 22 0 17 0;
#P connect 21 0 4 0;
#P connect 17 0 19 0;
#P connect 16 0 5 0;
#P connect 4 0 16 0;
#P connect 15 0 5 0;
#P connect 1 0 15 0;
#P connect 12 0 14 0;
#P connect 5 2 13 0;
#P connect 5 0 8 0;
#P connect 13 0 11 0;
#P connect 11 0 12 1;
#P connect 11 1 12 0;
#P connect 8 0 9 0;
#P connect 6 0 7 0;
#P window clipboard copycount 27;