|
From: Michael S. <ms...@ve...> - 2005-06-27 18:14:49
|
Edwin, Is it possible to send CoreMidi events with a future timestamp? If so, you could do simple scheduling that way. It's been a long time since I breifly looked at CoreMIDI, so I could easily be wrong. Cheers, Michael Stauffer mi...@ci... www.circular-logic.com >-----Original Message----- >From: mid...@li... >[mailto:mid...@li...]On Behalf Of Edwin >Vane >Sent: Monday, June 27, 2005 9:01 AM >To: MidiShare Devel >Subject: Re: [midishare-devel] Soft-synth on Mac OS X > > >On Mon, Jun 27, 2005 at 09:48:16AM +0200, St?phane Letz wrote: >> >> >I was hoping somebody close to midishare internals could quickly >> >answer >> >this question for me instead of me searching through the >code. What is >> >used as the software synth in Mac OS X in MidiShare? Is it the >> >QuickTime >> >synth or CoreMidi? >> >> The MidiShare driver msQTDriver still uses the QTMA >architecture, but >> we did not see hight latencies as you seems to have. >> How do you measure this 100ms latency value? > >Through some simple user trials. I had a small animation of a bouncing >ball and used QTMA to play some percussive sound at the exact >millesecond the ball hit the plane (using the SMPTE midi time codes). I >made a series of trials with the 'music' track offset from the video >from about 300ms too early through 300ms too late. I just asked if the >percussive sounds came before or after the ball bounce. Some statistics >centered the latency around 100ms. > >Unless I was doing something wrong (although I did try very hard to make >it work), the latency is pretty obvious when you play a quicktime movie >that has a QTMA soundtrack alongside a video track. > >> >Via my experiments with QTMA in QuickTime (before I >> >discovered QTMA was deprecatd), I discovered that QTMA in >QuickTime is >> >quite laggy (about 100ms in experiments). I ended up writing a new >> >media >> >handler that uses CoreMidi instead. However, when trying to play >> >QuickTime movies with my new handler, playback can sound ever so >> >slightly 'uneven' since movie players usually tell media players to >> >play >> >every 20 ms or so. >> >> Do you mean you're playing a MIDIFile with your new handler? > >Sort of. I came up with a new format for internal storage. QuickTime >plays midi files by first converting them into QTMA info which is stored >in tracks. My version of 'QTMA' is much more like midi (and pretty >simple) since all I care about is passing events eventually to CoreMidi >to play. So in theory, it's possible for my media handler to play >standard midi files, I would just need to write a converter (like an >Import Component). > >My problem is that my media handler is pretty simple and just plays all >events that have occurred since the last time events were played up >until the current point in time. Since the polling interval from your >typical movie player is about 20ms, sometimes you get some detectable >unevenness in the music (seeing as though our aural acuity is only a >couple of milliseconds and I'm dealing with repetitive music). >I was hoping for a simple solution to do basic >scheduling to eliminate the unevenness. > >Edwin V > > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >_______________________________________________ >midishare-devel mailing list >mid...@li... >https://lists.sourceforge.net/lists/listinfo/midishare-devel |