I don't know if the list still works -- the web interface is (still) down -- but I'm going to give it a shot.
I'm having some trouble understanding how looping in the MusicPlayer is supposed to work. What I'm trying to do is loop a "region" of MIDI, say from beat 3 to beat 4, n times. For example, if I have a 1-beat region, containing a run of 4 1/16th-notes, starting on beat 3, I'd like to be able to loop that region 3 times. Judging by the name, setting loopDuration to 1 would make the most sense (say my sequence ends on beat 4), as the desired loop is 1 beat long -- i.e., from beat 3 to 4. However, that plays no loops at all. On the other hand, with loopDuration = 3, I do get the loop, but the overall duration of the loop is 3 beats. Similarly, if I try any higher number, the loop length equals the given duration. This ***seems*** intuitive, except for the fact that loopDuration = 1 does nothing at all... So, this suggests to me that, rather than looping from "loopDuration" to the end, as the docs state, it's really looping from the start of the sequence up to the loop point. Is that correct? If so, then do I need to somehow offset the track, in order to get the loop to start on the 3rd beat, and end on the next beat? Basically, what I'd like to do is wrap Apple's generally counter-intuitive implementation in another method/function that takes a startTime, loopDuration, and numberOfRepetitions. To my mind, that would be much more a reasonable/musical specification for a looping function... Can anyone help explain how looping is actually supposed to work?
Thanks in advance.
J.
------------------------------------------------------ James B. Maxwell Composer/Researcher/PhD Candidate
|