
SequenceTrack Events: 9, Track Length: 4.11 beats SequenceTrack Events: 3, Track Length: 0.00 beatsĠ.000: Time Sig:4/4, 24 clks/qtr, 8 32nds/clk This is how the MusicPlayer sees your file (using the function CAShow(nameOfYourSequence)) Sequence = 1, Type = beats Fwiw - without the stop/start player calls, it also works but transient notes will still sound so it is less of a clean jump. Or perhaps I misunderstood the issue you described.
Key signature change aria maestosa code#
Are you confident that notes in the sequence are at the times you think they are? Or something else going on?Ī quick test with the code below (error checking removed) stops + restarts fine. I haven't noticed any problem with starting/stopping/restarting a sequence at t0. I have to wait until the sequence is completely played before I can play it again. No joy, iOS knows I want to play the same file twice and forbids it. So I've gone to the extreme of creating two MusicSequence from the same MIDI file and switching from one to the other. If I change the MusicSequence however, the new MusicSequence plays fine. If (MusicPlayerStart(musicPlayer) != noErr) If (MusicPlayerSetPlayRateScalar(musicPlayer, 1.0) != noErr) If (MusicPlayerSetTime(musicPlayer, (MusicTimeStamp)0.0) != noErr) If (MusicPlayerSetSequence(musicPlayer, musicSequence) != noErr) If (MusicPlayerStop(musicPlayer) != noErr) If (MusicPlayerIsPlaying(musicPlayer, &isPlaying) != noErr) I have tried this also (and many other combinations of the same type): Boolean isPlaying = NO I don't get any error, but making this call stops the playback altogether, instead of (as is said in the documentation) continuing playing from the new position. To do that I naturally call: if (MusicPlayerSetTime(musicPlayer, (MusicTimeStamp)0.0) != noErr) I have everything setup, it works, everything's peachy, except when I want to start over the sequence from the start during the playback. I'm using CoreAudio on iOS 5 to play MIDI files.
