[linux-audio-user] Developers: how to sync PCM to Midi?

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-user] Developers: how to sync PCM to Midi?
From: Denis de Leeuw Duarte (den_ddld_AT_hotmail.com)
Date: Fri Jul 11 2003 - 13:17:29 EEST


Hello folks,

I'm writing a realtime audio tool and I'd like to pick your brains on the
following: say my app is rendering some sound and a midi event comes in, at
what point in time should the resulting effect occur in the rendered audio
stream?

The obvious solution would be to measure world/system time at the moment
playback is started in my application. If a midi event then comes in, I can
subtract this start time from the midi event time. I am however afraid that
my timing will then drift each time an underrun occurs. I'm pretty sure
applications like terminatorx, sweep and a host of others solved this
problem before me so if anybody knows the answer to this, please let me
know!

Regards,

Denis

p.s. I use JACK for audio output but the solution really should be
independent of this.

---------------
www.cyozlab.com

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Fri Jul 11 2003 - 13:28:21 EEST