• 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
AUTimePitch with the MusicPlayer/AUGraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AUTimePitch with the MusicPlayer/AUGraph


  • Subject: AUTimePitch with the MusicPlayer/AUGraph
  • From: Brian Whitman <email@hidden>
  • Date: Sun, 16 Apr 2006 20:05:43 -0400

The canonical example I've been experimenting with is:

ScheduledSoundPlayer0 -> AUTimePitch0 -> matrixMixer -> output

I wrap this graph in a MusicPlayer so I can schedule AU parameters using MusicTrackNewParameterEvent. The BPM of the MusicPlayer is 60.

I have a set of ABLs wrapped into ScheduledSoundSlices, each a second long. I schedule these events to happen using mTimeStamps (frames), which I convert from clock time by multiplying by my sample rate.

I schedule slices to play in order every second... the first 44100 frame-long slice at frame 0, the 2nd 44100 frame-long slice starting at 44100. If I play this with a time stretch rate of 1.0, it plays "normally," every slice after another.

But I then schedule the time stretch rate at time 0s to be 2.0--- twice as fast.

Expected result is that I hear the slices individually at double speed, with a half second of silence in between each slice. The second slice should still play at my requested mTimeStamp -- 44100 frames in.

The actual result is that the AUGraph "speeds up"-- at MusicPlayer time 1.0s, the AUGraph will have read 2.0s worth of samples. My second frame plays right after the first, at mTimeStamp 22050. I really just hear the slices one right after another, playing twice as fast. This screws up the MusicPlayer's "clock" connecting to the AUGraph-- I can no longer schedule events at the right position if I don't know what the AUGraph time is. I'm not sure if this is a bug or a bad implementation on my part.

(This is especially confusing in the ancillary case of having another ScheduledSoundPlayer and AUTimePitch format converter in the graph:

ScheduledSoundPlayer0 -> AUTimePitch0 -> matrixMixer -> output
ScheduledSoundPlayer1 -> AUTimePitch1 -> ^

Anytime I schedule a time stretch rate on either unit, the other player (whose time stretch rate now differs) will stop playing, most likely connected to the problem above. Is having two separate tmpt units supported in a graph?)

-Brian










_______________________________________________ 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: AUTimePitch with the MusicPlayer/AUGraph
      • From: Brian Whitman <email@hidden>
  • Prev by Date: Is the documentation for SDK 1.4.3 available without installation?
  • Next by Date: AU state & MaximumFramesPerSlice
  • Previous by thread: Re: Is the documentation for SDK 1.4.3 available without installation?
  • Next by thread: Re: AUTimePitch with the MusicPlayer/AUGraph
  • Index(es):
    • Date
    • Thread