0
0

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,
Phil

  • You must to post comments
0
0

Follow up: I am now loading soundbanks manually, where loop points are set automatically, so this question is no longer an issue.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.