• 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
latency of MusicDeviceMIDIEvent and sampler device on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

latency of MusicDeviceMIDIEvent and sampler device on iOS


  • Subject: latency of MusicDeviceMIDIEvent and sampler device on iOS
  • From: Hamish Moffatt <email@hidden>
  • Date: Mon, 17 Mar 2014 19:01:11 +1100
  • Organization: Rising Software Australia Pty Ltd

Hi,

I'm playing MIDI out through the AUSampler device. I've got a few samplers, a mixer and a RemoteIO output in an AUGraph, and I'm sending note on and note off (etc) events to it at the right time with MusicDeviceMIDIEvent. Because we're using the same code on OSX as well as Windows we're doing our own timing, MIDI sequencing etc rather than using higher level audio frameworks to do it.

Now this works except I'm getting some variable latency from when I call MusicDeviceMIDIEvent until I actually hear the sound. For example we're just playing a metronome, with a regular note on event every 120ms, but sometimes the actual audio is 30ms late. The next event is back on time though.

I'm sure we're calling MusicDeviceMIDIEvent accurately, timing it using mach_wait_until() and mach_absolute_time().

I don't hear any issues at all running the same code on the Mac.

So is there some other way I should be timing this? I'm guessing yes given the sample number parameter on the MusicDeviceMIDIEvent call, but I'm not sure. Or something else I should be doing to fix this?


Thanks

Hamish
_______________________________________________
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: latency of MusicDeviceMIDIEvent and sampler device on iOS
      • From: Paul Davis <email@hidden>
  • Prev by Date: coreaudiod rights
  • Next by Date: Re: latency of MusicDeviceMIDIEvent and sampler device on iOS
  • Previous by thread: coreaudiod rights
  • Next by thread: Re: latency of MusicDeviceMIDIEvent and sampler device on iOS
  • Index(es):
    • Date
    • Thread