What I want to achieve
For example, I have a sequence of length 12.0 (beats) and I want to play once the range 4.0-8.0 (Not including any note that starts at 8.0)
Solution 1 - Using Callback
I have tried
- I use
seq.setTime(4.0)
seq.play()
- adding a
AKCallbackInstrument
, and add a note at the desired range end (position: 8.0
) - In the callback, I can
seq.stop()
- But the actually stop is occurring at something like 4.082635.
- I can already hear the note that starts at 4.0
Awkward solutions
- I might be able to MUTE all notes which are not in my range...
- I can set the callback note to
position: 7.9
(-:
Solution 2 - Using Loop
I found this post which says this is problematic
Solution 3
A robust solution would be to create a new AKAppleSequencer
, and copy to it all the notes in the desired range.
but that's an overkill, isn't it?