original: pianodano
At the risk of me sounding like a complete dummy, you're saying that the audio sample rate is not divided down to achieve the midi ticks? On a machine that can do nothing but handle numbers ? And if that is the case what is the common link tying audio and midi together?
Just to add a bit
(ok, more than a bit) to what dewdman42 said --
Typically, each MIDI port has an internal timer associated with it. Timer value '0' refers to the exact instant when the MIDI port was opened. That internal timer counts up from 0, in milliseconds, or microseconds, or some other unit depending on the MIDI port driver. There are at least two main kinds of 'system timer' -- the 1 millisecond-resolution "MM Timer" and a much-higher-resolution counter intended for use to measure things like CPU execution times for assembly code fragments (in some systems this is 'QPC', in others 'RDTSC'; some systems might have both). Dual-core systems - might have two different high-res timers, which might not be kept in sync (this screwed over some game developers big-time).
If you're lucky, all the MIDI ports will reference the same internal clock. Otherwise, they will drift over time with respect to each other.
So - what is the common link tying audio and midi together? Think about the 'clapper' used in film making, to tie audio and video together. This is the classic bit where a gofer claps the top and bottom parts of the 'clapper' board together. This combines a loud sound and a clear visual impact. Later, the production house (film or audio editor) uses this to sync up the field audio recording and the actual camera footage. Similarly -- when you click Start on a sequencer --- the sequencer checks the current free-running audio driver sample count and current free-running MIDI port timer value, and equates them to 'Sequence tick 0' (assuming you're starting from the top).
Let's say you click 'Start' at exactly 10 pm tonight EST. The wallclock time is 22:00:00 EST. The sequencer tick position is 0. The midi timer value at that instant is 33145 (assuming a millisecond count, and that the sequencer opened the port about 33 minutes ago). The audio driver sample count at that instant is 322953421 (example). Now, assume that the sequencer has previously measured the rate at which each timer (system, midi, audio) increments, relative to each other. As the sequence plays (moving ahead from tick 0) - the sequencer has to do lots of math to figure when to schedule particular MIDI events so that they happen more-or-less at the right time, relative to the audio stream. Tempo changes make this more complicated, as you can imagine. In most systems, things are directly or indirectly sync'd to the fundamental audio sample rate -- but this sync can be 'fuzzy', with adjustments being made constantly to the nominal MIDI time (MIDI port timer count value) that is guesstimated to be equivalent to a particular audio sample count value. Systems don't generally jerk around the audio playback, because this tends to produce audible glitches. Except, of course, for systems that do neat timewarping tricks with audio -- Live, for example, or Acid, or Sonar, or many others.
Bottom line: sync between MIDI and audio is totally up to the sequencer.... except that it's not, because the sequencer has to depend on accurate time values being reported by many things: the PC system clock, every MIDI driver you're using, every audio driver you're using ..... all of which may be running different timebases. It's enough to make a software developer nuts!

-- a sacrifice we're willing to make for art, of course
- Jim