heading-ears-mmp/iamyou-radio/eqpan~.pd
2024-10-15 12:46:39 +09:00

25 lines
838 B
Text

#N canvas 1 91 594 362 10;
#X obj 79 196 expr~ if($v1 < -45 \, -45 \, if($v1 > 45 \, 45 \, $v1))
;
#X obj 79 173 inlet~;
#X obj 18 173 inlet~;
#X obj 18 320 outlet~;
#X obj 249 320 outlet~;
#X obj 79 219 expr~ $v1*0.0174533;
#X obj 18 278 expr~ $v1*0.707107*(cos($v2)-sin($v2)) \; $v1*0.707107*(cos($v2)+sin($v2))
\;;
#X text 212 15 vanilla version of [pan~];
#X text 212 115 https://github.com/MetaluNet/moonlib/blob/externals/moonlib/panvol~.c
;
#X text 212 35 f = f < -45 ? -45 : f \; f = f > 45 ? 45 : f \; angle
= f * RADCONST \; x->right = ROOT2DIV2 * (cos(angle) + sin(angle))
\; x->left = ROOT2DIV2 * (cos(angle) - sin(angle)) \;;
#X text 245 230 NOTE: RADCONST & ROOT2DIV2 is lower resolution than
original.;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 2 0 6 0;
#X connect 5 0 6 1;
#X connect 6 0 3 0;
#X connect 6 1 4 0;