Hi @niXX that's a very interesting and clever use of our libraries!
I'll be glad to help you with the technical aspect, it might be useful for other sound designers out there. I guess your need for optimization is coming from the need to perform in real-time. The latency problems are usually system-based, meaning that we have to see the whole setup as one system to troubleshoot and optimize.
after reading about the Sensory Percussion system and without knowing your specific setup, I'm guessing this is the signal flow:
- Drum part is hit
- Sensor peeks signal
- Signal enters the brain (or whatever each company calls the sensor manager)
- Signal is sent to the Sensory Percussion software instrument (hosted on computer - standalone or inside DAW)
- Software instrument analyzes the signal
- Software instrument guesses/derives the part that was hit
- Software instrument triggers the sample
- Software instrument processes the sample with effects loaded on preset
- Software instrument outputs to host (OS or DAW+OS)
- Host outputs to soundcard
- We hear the drum part
Sections of such a pipeline that add most to latency are: 5, 6, 8, and 10 (I excluded 7 because modern hard drives are not an issue for latency on sample playback when it comes to small sample packs like drums anymore).
Sections 5, 6, 7, and 8 can be optimized only if the Sensory Percussion manufacturer allowed for end-user controls, so you'll have to search any relevant documentation or knowledge base articles and online discussions.
Sections 9 and 10 are where most people get things wrong and where it matters most, because those are the sections that need a lot of testing but when you get it right, everything else you hook to the system will play well from the start.
For starters, I'm guessing you're on Windows - you're in luck because this is the operating system of choice here at SoundFellas, and this is the OS we have most experience with.
I would suggest you check out a great utility for optimizing OS scheduling for audio-critical work, Process Lasso (https://bitsum.com/download-process-lasso/).
There is also a great deal of information about this solution in a REAPER forum thread here: https://forums.cockos.com/showthread.php?p=2747470
Process Lasso is not a one-button solution, but after carefully setting it we were able to achieve a huge speed gain and much less processing load even in our older computers here at SoundFellas. I'm sure you can start with that and then we can proceed with the next step, which is how to optimize the host DAW. Here we use REAPER because it's audio engine is optimized to the core and offers a lot of options on how to optimize every aspect of it's operation and plugin interoperability. If you choose to use the Sensory Percussion instrument as a standalone, then we'll have to talk about how to optimize the specific application using Process Lasso and its latency-related internal settings if they are offered to the end-user.
I hope that helped for starters, let us know how that goes!