Using Rogus with MIDI Time Code


Rogus McBogus can sync its internal time (obtained by calling the time() method of OMS_app) to an external source which transmits MIDI Time Code (MTC). Rogus recognizes MTC quarter-frame messages. However, it only pays attention to certain MTC quarter-frame messages. Specifically, it uses number 0 quarter-frame messages to sync with, and it uses number 7 quarter frame messages to find out what the frame rate is. (Rogus defaults to 25 frames/second.) Otherwise, it ignores the data in MTC quarter-frame messages. Therefore, it is possible to write a very simple code fragment in Rogus which will generate mutant MTC which can be recognized by another computer running Rogus, even though it is not valid MTC. (Although Rogus should work fine with real MTC as well; it simply doesn't use all of the data.)

You can use the following function to generate mutant MTC that Rogus wil recognize:

ScheduleTime func(void*)
{
  MIDI_msg m;
  m.set(MIDI_msg::system, smsgt::mtc, 0, 0, ou_node);
  oap->write(&m);
  return 160;
}
And then just start it up with something like this:
  task_data td(func, NULL, oap->time()+160);
  schedp->insert(td);
This sends number 0 quarter-frame messages every 80 milliseconds, which depends upon the receiving Rogus using its default frame rate of 25 frames per second.
Modified 12 June 1996 pepellet@mit.edu