Would you have some advice on the optimization on a particular little project I just did? http://chiptunegenerator.com/
I would like it to turn the best possible, even on mobile phones. The priority here doesn’t seem to be RAM (the bank is a few Mo in PCM) nor real-time execution, it rather seems to be CPU load (almost every 16-th notes is randomized among a pool in a multi-instrument, for each “instrument”, which is pretty heavy).
What seems to be an OK setting is :
- build stereo PCM decompressed 24 kHz
- 4 buffers of 4096 samples
- mixer sample rate matches system sample rate (but I don’t fully understand if it has consequences if it’s different than the sample rate of the build settings)
- update application should be below 100ms to work correctly (which seems to by inline with 16th notes)
- I also reencoded my assets in 16-bit (there were in 32-bit float initially), it doesn’t seem to have changed anything though
Did I miss a setting that could enhance performance on low devices? At the moment, it’s OK on my phone, but the first bar is always choppy. Interestingly, after a stop, the next play is fine. I tried to let a few seconds before the first note in the event, it doesn’t change anything to it, the event doesn’t “pre-load” very well.
Moreover, I also tried to build in FADPCM, but it seems buggy! The pitch is lowered by something like a quarter-tone, and the timings seem to be shifted accordingly (there’s a “rush” at the end of each bar, before each jump). The problem occurs in local with a web server, or online, on my PC and on my phone.