Hi,
I'd like to use a signal [atan2~] in a Pd without externals nor [expr~] (i.e. inn RjDj). Does anyone have a purepd implementation of it or maybe a pointer to some math/trigonometric identity/ln-substituion formula for atan2?
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Here's one I use (atached)
cheers Miller
On Tue, Jul 28, 2009 at 10:45:09AM +0200, Frank Barknecht wrote:
Hi,
I'd like to use a signal [atan2~] in a Pd without externals nor [expr~] (i.e. inn RjDj). Does anyone have a purepd implementation of it or maybe a pointer to some math/trigonometric identity/ln-substituion formula for atan2?
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Hallo Miller,
ah, thanks a lot. I've now discovered this in your LAC workshop patches, too, which is cool, as I was intending to use atan2 for complex waveshaping like you do in your guitar patch anyway. :)
Frank
Miller Puckette hat gesagt: // Miller Puckette wrote:
Here's one I use (atached)
cheers Miller
On Tue, Jul 28, 2009 at 10:45:09AM +0200, Frank Barknecht wrote:
Hi,
I'd like to use a signal [atan2~] in a Pd without externals nor [expr~] (i.e. inn RjDj). Does anyone have a purepd implementation of it or maybe a pointer to some math/trigonometric identity/ln-substituion formula for atan2?
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
#N canvas 35 0 513 730 10; #X obj 34 36 inlet~; #X obj 84 36 inlet~; #X obj 327 338 *~ 1e+20; #X obj 327 362 clip~ -1 1; #X obj 127 395 *~; #X obj 261 686 outlet~; #X obj 133 85 *~; #X obj 162 85 *~; #X obj 133 108 +~; #X obj 166 137 q8_rsqrt~; #X obj 150 162 *~; #X obj 180 161 *~; #X obj 150 184 *~; #X obj 149 209 *~ -0.5; #X obj 177 187 *~ 1.5; #X obj 149 230 +~; #X text 181 229 inverse modulus to 16 bit precision; #X text 236 136 inverse modulus to 8 bit precision; #X obj 132 275 *~; #X obj 33 275 *~; #X text 160 275 modulus to 16 bit precision; #X obj 83 277 *~; #X obj 400 332 outlet~; #X obj 456 332 outlet~; #X text 404 285 unit complex; #X text 404 299 number out; #X text 37 15 real; #X text 84 13 imaginary; #X obj 238 336 *~ 1e+20; #X obj 238 360 clip~ -1 1; #X obj 80 393 *~; #X obj 94 425 -~; #X obj 60 455 *~; #X obj 33 455 *~; #X text 6 457 d^3; #X obj 62 493 -~; #X obj 79 547 +~; #X text 19 494 d^3-d; #X obj 224 594 *~; #X obj 239 560 *~; #X obj 290 594 *~ 2; #X text 131 411 to 1st quadrant; #X text 128 445 (-1 to 1); #X text 120 430 d = imag-real; #X text 327 594 unfold twice; #X obj 262 642 *~ 0.125; #X obj 133 343 outlet~; #X text 334 653 normalize to (-1 , 1); #X obj 263 594 -~; #X obj 262 619 -~; #X obj 262 664 +~ 0.5; #X obj 62 517 *~ 0.11; #X text 126 502 fudge to; #X text 126 515 approximate; #X text 125 529 4/pi*arcsin(d/2); #X text 135 359 r out; #X text 318 679 theta/(2pi); #X text 319 694 out; #X connect 0 0 6 0; #X connect 0 0 6 1; #X connect 0 0 19 0; #X connect 1 0 7 0; #X connect 1 0 7 1; #X connect 1 0 21 0; #X connect 2 0 3 0; #X connect 3 0 4 1; #X connect 3 0 39 1; #X connect 3 0 40 0; #X connect 4 0 31 0; #X connect 6 0 8 0; #X connect 7 0 8 1; #X connect 8 0 10 0; #X connect 8 0 18 0; #X connect 8 0 9 0; #X connect 9 0 10 1; #X connect 9 0 11 0; #X connect 9 0 11 1; #X connect 9 0 14 0; #X connect 10 0 12 0; #X connect 11 0 12 1; #X connect 12 0 13 0; #X connect 13 0 15 0; #X connect 14 0 15 1; #X connect 15 0 18 1; #X connect 15 0 19 1; #X connect 15 0 21 1; #X connect 18 0 46 0; #X connect 19 0 22 0; #X connect 19 0 30 0; #X connect 19 0 28 0; #X connect 21 0 2 0; #X connect 21 0 4 0; #X connect 21 0 23 0; #X connect 28 0 29 0; #X connect 29 0 30 1; #X connect 29 0 39 0; #X connect 30 0 31 1; #X connect 31 0 32 1; #X connect 31 0 33 0; #X connect 31 0 32 0; #X connect 31 0 35 1; #X connect 31 0 36 1; #X connect 32 0 33 1; #X connect 33 0 35 0; #X connect 35 0 51 0; #X connect 36 0 38 0; #X connect 38 0 48 0; #X connect 39 0 38 1; #X connect 39 0 48 1; #X connect 40 0 49 1; #X connect 45 0 50 0; #X connect 48 0 49 0; #X connect 49 0 45 0; #X connect 50 0 5 0; #X connect 51 0 36 0;
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
I fancy mine is faster (but never checked :)
Miller
On Fri, Aug 07, 2009 at 02:01:15PM -0400, Mathieu Bouchard wrote:
On Tue, 28 Jul 2009, Miller Puckette wrote:
Here's one I use (atached)
so, why wouldn't you use atan2 from <math.h> ?
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - t?l:+1.514.383.3801, Montr?al, Qu?bec
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
There are two approximations here: http://www.dspguru.com/comp.dsp/tricks/alg/fxdatan2.htm
a rough implementation is attached. I haven't listened to these yet though, so not sure how they sound.
Nick
Hi,
I'd like to use a signal [atan2~] in a Pd without externals nor [expr~] (i.e. inn RjDj). Does anyone have a purepd implementation of it or maybe a pointer to some math/trigonometric identity/ln-substituion formula for atan2?
Ciao
Frank Barknecht Do You RjDj.me? _ ______footils.org__
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list