I’m sending midi events via midi files that correspond to these events (single notes). The problem is that with looped midi instruments, I need the note to play for an arbitrary length of time. Is there any way to pass in a midi file corresponding to a note, and have the note loop continuously? The problem is I can loop the channel, but that just loops the sound from start to end, not the sustained region.
I already tried using just a single ‘Note On’ message with no corresponding ‘Note Off’ message, but that file did not play. I also tried setting the ‘Note Off’ time index to a very high value (very long midi note), but that caused the Sound buffer to cache the PCM data for the entire duration of the note, which caused a low memory crash.
In addition, I’m able to set loop points in the Sound object, so that playSound doesn’t always loop from beginning to end. If I’m able to crossfade the end of the loop point to the beginning somehow, then my problem will be solved. I’m still trying to figure out how.
Thanks in advance,
- phlee asked 7 years ago
- You must login to post comments