MIDI Time Code synchronization working
Craig Latta
craig at netjam.org
Fri Feb 24 23:15:32 UTC 2006
Hi Brad--
> How's the precision at 1ms?
It's good. When I play back a mono drumroll recording with digital
audio in one ear and synced MIDI in the other, it still sounds like mono
the whole way through. :)
> That's pretty small. You could probably increase that to 4ms or even
> 8ms and not notice a difference.
Mostly I wanted to see if Squeak could do this at maximum MIDI
full-note resolution (3 bytes per event, 31250 bits per second, 8 data
bits, 1 start bit and 1 stop bit per byte, which is 938 microseconds per
event, or about a millisecond).
I was curious to see how things degraded at lower resolutions, and
actually played around with larger gradations. I could tell the
difference on headphones, listening to direct MIDI-to-audio phase
comparisons of drumrolls, but just about everything I do in practice is
much less demanding than that. :) But this works, and the code is
simpler with a 1ms basis (since the host OS and host midi driver have
millisecond clocks); might as well not spend time doing arithmetic to
support a lower resolution.
One weird thing I noticed is that sometimes MMC messages slightly lag
the onset or cutoff of associated MTC messages. I guess I need a
hardware MIDI packet sniffer to see what's really going on (is the
weirdness in the audio recorder, the host OS, or the host MIDI driver),
but with my recorder implementation it's not a problem anyway.
-C
--
Craig Latta
improvisational musical informaticist
www.netjam.org
Smalltalkers do: [:it | All with: Class, (And love: it)]
More information about the Squeak-dev
mailing list
|