Start MusicTrack at arbitrary times?
Start MusicTrack at arbitrary times?
- Subject: Start MusicTrack at arbitrary times?
- From: "Tod E. Kurt" <email@hidden>
- Date: Fri, 18 Jun 2004 11:05:16 -0700
Hi,
I'm building a sequencer that allows one to start/stop looping MIDI
patterns at arbitrary times while the sequencer is playing. I can
almost accomplish this using a MusicPlayer & MusicSequence with a
MusicTrack per pattern and doing the start/stop with a combination of
MusicTrack's OffsetTime and MuteStatus.
However, when setting OffsetTime to the next beat and unmuting,
sometimes the MusicTrack starts from the beginning like I want, but
more often it either stays silent for some number of beats, or just
unmutes without restarting at the beginning.
A file demonstrating this is here:
http://todbot.com/osx/musicdev/musictracktest.m
and the whole project:
http://todbot.com/osx/musicdev/musictracktest.tar.gz
The above example starts two 12-beat long MusicTracks, mutes them both
on beat 5, then attempts to re-start track 2 at beat 26. Instead, it
starts on beat 50.
Am I using MusicTrack wrong? Is this a bug? Is there a better way of
triggering MIDI patterns while others are playing?
Thanks,
-=tod
--
Tod E. Kurt
email@hidden
http://todbot.com/
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.