• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
MIDI events / note jitter / remoteIO buffer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MIDI events / note jitter / remoteIO buffer


  • Subject: MIDI events / note jitter / remoteIO buffer
  • From: Gregory Wieber <email@hidden>
  • Date: Wed, 29 Dec 2010 12:23:27 -0800

Hello,

I have accurately calculated the latency of my application -- let's say it's roughly .025 seconds.  I am queuing midi events during my render callback, and then sending these events out.  The events have accurate time stamps, which take the latency of my app into account.  

The issue that I'm having is that when I record these MIDI events into a program like Logic,  I can measure a jitter in the notes that is equal to the latency of the app.  That is,  a lot of notes are off by .025 seconds.  

My ability to comprehend the situation is hitting a bit of a wall, mainly because the concept of time is harder for me to grasp when the size of the buffer and latency come into play.  My guess is that some of the midi events fall too close to the 'edge' of the buffer, and therefore are late because an entire buffer needs to be sent along before that midi event ever gets sent.  This doesn't make total sense to me though, because although there's an inherent latency to the buffer system, when one buffer is done playing the next is ready (otherwise you'd hear gaps in the audio --eg, the audible tones my app makes).  So,  why am I getting time-gaps in my midi?

Is there a way to avoid this 'note jitter' somehow?  

Creating a music sequencer by counting the timestamps in render callbacks seemed to be the recommended approach,  but now I'm wondering if it would be better to create a separate real-time thread. I'm resistant, because I have a lot of code invested in my current approach, and I've read that there are accuracy issues with the thread approach as well, and I might already be getting the most accuracy I'm going to get...

best,

Greg


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: MIDI events / note jitter / remoteIO buffer
      • From: Gregory Wieber <email@hidden>
  • Prev by Date: Re: Latency
  • Next by Date: 3d mixer on iPhone
  • Previous by thread: Support live resize of AU window for all hosts?
  • Next by thread: Re: MIDI events / note jitter / remoteIO buffer
  • Index(es):
    • Date
    • Thread