porres / pd-else

ELSE - EL Locus Solus' Externals for Pure Data
Do What The F*ck You Want To Public License
286 stars 36 forks source link

mc routing/fade/pan/etc #1992

Open porres opened 8 months ago

porres commented 8 months ago






porres commented 8 months ago

also ambisonics

steal from https://github.com/porres/pd-cicm-tools

and HOA https://github.com/CICM/HoaLibrary-PD

porres commented 8 months ago

https://ssr.readthedocs.io/en/0.6.1/renderers.html#vbap

VBAP tries to find a loudspeaker pair between which the phantom source is located. If it finds a pair whose angle is smaller than 180º it calculates the L and R gains as

Screen Shot 2023-12-18 at 19 47 04

φ0 is half the angle between the two loudspeakers with respect to the listening position, φ is the angle between the position of the phantom source and the direction “between the loudspeakers”.

If the VBAP renderer can't find a loudspeaker pair whose angle is smaller than 180º then it uses the closest loudspeaker provided that the latter is situated within 30ª . If not, then it does not render the source.


The Ambisonics Amplitude Panning (AAP) renderer does very simple Ambisonics rendering. It does amplitude panning by simultaneously using all loudspeakers that are not subwoofers to reproduce a virtual source (contrary to the VBAP renderer which uses only two loudspeakers at a time). Note that the loudspeakers should ideally be arranged on a circle and the reference should be the center of the circle. The renderer checks for that and applies delays and amplitude corrections to all loudspeakers that are closer to the reference than the farthest. This also includes subwoofers. If you do not want close loudspeakers to be delayed, then simply specify their location in the same direction like its actual position but at a larger distance from the reference. Then the graphical illustration will not be perfectly aligned with the real setup, but the audio processing will take place as intended. Note that the AAP renderer ignores delays assigned to an individual loudspeaker in ASDF. On the other hand, it does consider weights assigned to the loudspeakers. This allows you to compensate for irregular loudspeaker placement.

porres commented 8 months ago

Ville Pulkki’s Vector-base amplitude panning (VBAP) is a quite robust and generic algorithm that works on nearly any surrounding loudspeaker layout. VBAP activates the smallest possible number of loudspeakers, which gives a directionally robust auditory event localization for virtual sound sources, but it can also cause fluctuations in width and coloration for moving sources.

Multiple-direction amplitude panning (MDAP) is a modification that increases the number of activated loudspeakers. In this way, more direction-independence is achieved at the cost of an increased perceived source width and reduced localization accuracy at off-center positions. As vector-base panning methods rely on convex hull triangulation, irregular loudspeaker layouts yielding degenerate vector bases can become a problem.

porres commented 7 months ago

vamos re-escrever mtx~ e autofades... e essas coisas de como copiar as entradas.