Hi everyone, I'm working on a sampler and i have a really silly problem.
I simply want to mix sounds in a stereo buffer within the jack "process" function. So for each frame i sum the samples from each sound but then the values go above 1 and i get clipping. So my first thought was to divide by the number of samples playing, but it ends up with a decrease in volume. I tried to limit the values between -1 and 1 but it 's also clipping -> distortion. I looked into some sources and it seems i would actually just have to sum the samples. Can anyone help me with that ? Thanks Flo