I'd like some pointers on midi playback performance.
I'm seeing about 20-30% cpu usage from the audio engine when playing admittedly very hefty midi files (sample)
Loading times are also very long (1.2 seconds)
Here is my code
- debugging the loading process, it seems that the
sequence.new(path)
function itself takes a full second to complete. I suppose nothing can be done about that from my side? Perhaps pdc could convert midi into a proprietary sequence format so that it can be loaded into memory without parsing? - To decrease the cpu usage, I re-encoded the instrument samples to 8-bit 22khz. They were 24-bit 44khz before (probably downsampled to 16 bit by pdc). I don't see a discernable difference in cpu usage. Is this expected?
- Does it make any sense for performance to merge tracks that have the same instrument mapped? ie. 4 drumtracks where the first has hi-hat, the second cymbals etc. Would it be beneficial to make a single track out of that? For the notes that would be playing at any given time, there would be no difference.