Can the MPESynthesiser play two voices for one note?

Can the MPESynthesiser play two voices for one note? For example if I want layered sounds, can I start two voices from one noteOn? It looks like I could just override noteAdded and find two free voices. Would there be a downside to doing this? Seems like it would make monophonic synths not work, but I could write my own voice stealing algorithm to steal the correct voice for each layer.

Also, could CriticalSection voicesLock; be protected instead of private to make it easier to override noteAdded?

Can’t see anything wrong with this approach but I’ve never tried such a thing. I’ve also moved the voicesLock into the protected section - it will appear on develop in a few moments.

1 Like

I still don’t see it. Am I missing something?

Also while you are at it, could you do the same for the lock in MPEInstrument? Thanks.

It’s this commit on develop.

Yup, that change will also appear on develop in a few moments.

1 Like

Thanks. It looks like I was checking a forked JUCE repository on Github.

All fine now.