(mathematical) help for a 4 channel mixer

chapelier fou's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Hi !
i am working on a patch to move a sound source on 4 speakers using a lcd. The basic concept works, but i'm not happy with the result : being in a corner makes only 1 speaker play (that's what i want), but in the center, the volume is pretty low. I think some maths (log, exp, or something like this ?) would easily solve the problem.
If anyone has the chance to have a look... Thanks !
louis

chapelier fou's icon

as a side question, is there a way to ignore the mouse position when it goes outside the lcd ?

Gregory Taylor's icon

Have a look at the lcd help file, specifically the tab marked "mousing." You may find some useful hints there.

Roman Thilenius's icon

first question:
square root

second question:
control a gate by clipping the coords.
i would use if:

[if $i1>=0 && $i1=0 && $i2
|
[gate]

Richard Garrett's icon

A good way to do equal-power panning in MSP is to use a [buffer~] containing a square root or a cosine curve as a look up table.

Take a look at the MSP spatialisation examples in the Extras/ Examples Overview menu option. I think pan4s and the quad-spatialiser would be useful to you.

Richard

chapelier fou's icon

Damn, the quad-spatialiser seems to be just ready-made.
Just need to get used to it.
Thank you !