(I did see one other post sort of related)
From bits of tutorials, and some guesses, I have cobbled together a simple drum sampler plugin. It seems to work pretty successfully. I do have some questions about best practices.
- I started with 15 drum samples (most useful GM drums).
- I converted the samples into BinaryData.
- I load each drum sample data into an individual SamplerSound.
- For each SamplerSound I create a unique SamplerVoice.
- In Processor::processBlock() I process all the MIDI messages and control the SamplerVoices directly. Each SamplerVoice is controlled by one MIDI note. (They are basically independent except for hi-hat chokes.) Then for all SamplerVoices I renderNextBlock().
The Synthesiser class seemed to get in my way, trying to (as I understand) find free voices to assign new notes. So I removed it from the middle.
Is this “correct”, or is there a better/more elegant way to get the job done?
