Solved: audio glitches running Kontakt 5 from vst~ in max 6
Background:
I've been running Kontakt 5 in a vst~, triggering 12 separate sample banks, with 12 separate outputs, and processing with fft stuff afterward.
It would start off sounding fine, but over 5-10 minutes, artifacts would start showing up more and more until there was nothing but crackling, and eventually just silence. DSP monitor was showing 100% usage of CPU.
After looking for similar problems in the forums, I split it into 2 separate top-level patches each running vst~ with kontakt so the work could be shared across cores, but it still happened. I messed around with the vector size, etc but still no improvement. was it a memory leak? something to do with floating points?
I noticed that the voice count was slowly creeping up to ~100 in each sample bank.
I looked at what I was sending to kontakt carefully and found that one of the processes that occasionally triggered a chord didn't send corresponding note-offs, and they were building up, eating up all the ram(?)... I added a [makenote] object to automatically send note offs and it's running fine now.
just putting this here in case someone searches the forums after making the same mistake.