[Jack-Devel] Mixing inside process callback
Hi
I am writing a Jack client ( a drum instrument using the NDK samples library )
The client is polyphonic, 42-60 voices since many drum hits need to play at the same time.
It is my understanding that all audio samples we write to the jack audio buffers must be in the -1.0 1.0 range?
How does jack deal with values outside of this range , clipping? normalize?
To stay within the -1.0 1.0 range, I need to mix all active voices. I tried multiplying all active voices by 1/n (where n is the number of voices) but it is not realistic sounding since very quiet drums will bring down the volume of louder cymbals for examples. Also if n= the total number of possible voices (active or not) a single playing voice gets way too quiet. If I use n= active voices only, the volume will shift during playback as voices become active or dead.
Is there a more realistic way to mix various voices?
Thank You
Patrick Robin
1362327081.13677_0.ltw:2,a <BAY173-W4322EDB1F91BB00361ED5BD9F90 at phx dot gbl>