diff options
-rw-r--r-- | abs/mtx_atan2-help.pd | 34 | ||||
-rw-r--r-- | abs/mtx_atan2.pd | 146 | ||||
-rw-r--r-- | src/mtx_max2.c | 4 |
3 files changed, 124 insertions, 60 deletions
diff --git a/abs/mtx_atan2-help.pd b/abs/mtx_atan2-help.pd index 979849e..5f70403 100644 --- a/abs/mtx_atan2-help.pd +++ b/abs/mtx_atan2-help.pd @@ -1,10 +1,30 @@ #N canvas 579 0 622 300 10; -#X msg 166 52 matrix 1 4 1 1 -1 -1; -#X msg 325 53 matrix 1 4 1 -1 -1 1; -#X obj 166 90 mtx_atan2; -#X obj 166 125 mtx_print; +#X obj 164 270 mtx_print; #X text 368 248 Franz Zotter 2007; #X text 133 15 arcus tangent with range from -pi...+pi; -#X connect 0 0 2 0; -#X connect 1 0 2 1; -#X connect 2 0 3 0; +#X obj 164 108 t a a; +#X obj 194 129 mtx_print y; +#X obj 383 111 t a a; +#X obj 413 132 mtx_print x; +#X obj 164 237 mtx_* 0; +#X obj 334 200 atan; +#X msg 334 181 1; +#X msg 334 219 45 \$1; +#X obj 334 239 /; +#X obj 334 161 loadbang; +#X obj 164 182 mtx_atan2; +#X msg 383 52 matrix 1 8 1 1 0 -1 -1 -1 0 1; +#X msg 164 52 matrix 1 8 0 1 1 1 0 -1 -1 -1; +#X connect 3 0 13 0; +#X connect 3 1 4 0; +#X connect 5 0 13 1; +#X connect 5 1 6 0; +#X connect 7 0 0 0; +#X connect 8 0 10 0; +#X connect 9 0 8 0; +#X connect 10 0 11 0; +#X connect 11 0 7 1; +#X connect 12 0 9 0; +#X connect 13 0 7 0; +#X connect 14 0 5 0; +#X connect 15 0 3 0; diff --git a/abs/mtx_atan2.pd b/abs/mtx_atan2.pd index db4e84b..4976fcf 100644 --- a/abs/mtx_atan2.pd +++ b/abs/mtx_atan2.pd @@ -1,52 +1,96 @@ -#N canvas 0 0 450 316 10; -#X obj 106 145 mtx_atan; -#X obj 172 208 mtx_* 1; -#X obj 304 126 atan; -#X msg 304 106 1; -#X obj 304 86 loadbang; -#X obj 304 147 * 4; -#X obj 100 259 mtx_+; -#X obj 107 25 inlet mtx_im/y; -#X obj 227 26 inlet mtx_re/x; -#X obj 107 123 mtx_./; -#X obj 271 172 mtx_== 0; -#X obj 227 57 t a a a; -#X obj 271 194 mtx_find; -#X msg 77 169 0; -#X obj 100 238 mtx_fill; -#X obj 106 169 t b a; -#X obj 100 285 outlet; -#X text 229 272 Franz Zotter 2007; -#X obj 107 70 t a a; -#X obj 172 107 mtx_< 0; -#X obj 172 132 mtx_&&; -#X obj 172 178 mtx_+; -#X obj 172 155 mtx_* -2; -#X obj 249 86 mtx_< 0; -#X connect 0 0 15 0; +#N canvas 0 0 977 625 10; +#X obj 142 6 inlet mtx_im/y; +#X obj 432 7 inlet mtx_re/x; +#X obj 295 558 outlet; +#X text 598 442 Franz Zotter 2007; +#X obj 360 427 atan2; +#X obj 182 46 mtx_size; +#X obj 416 409 mtx; +#X obj 244 46 mtx_size; +#X obj 182 79 ==; +#X obj 182 100 &&; +#X obj 211 80 ==; +#X obj 142 131 spigot; +#X obj 195 132 sel 0; +#X obj 195 173 print mtx_atan2; +#X msg 195 152 matrix dimensions do not match!; +#X obj 142 231 f; +#X obj 142 209 t b b; +#X msg 184 209 0; +#X obj 142 46 t b a; +#X obj 360 407 mtx; +#X obj 169 231 until; +#X obj 209 231 f; +#X obj 236 231 + 1; +#X obj 236 250 t b f; +#X obj 330 314 pack; +#X obj 236 293 f; +#X obj 236 271 t b b; +#X msg 278 271 0; +#X obj 263 293 until; +#X obj 303 293 f; +#X obj 330 293 + 1; +#X msg 360 360 element \$1 \$2; +#X obj 360 385 t a a; +#X obj 295 534 mtx; +#X msg 311 513 size \$1 \$2; +#X obj 311 493 pack; +#X obj 330 335 t l l; +#X obj 295 450 pack f f f; +#X msg 295 471 element \$1 \$2 \$3; +#X obj 112 184 t b b; +#X connect 0 0 18 0; #X connect 1 0 6 1; -#X connect 2 0 5 0; -#X connect 3 0 2 0; -#X connect 4 0 3 0; -#X connect 5 0 1 1; -#X connect 6 0 16 0; -#X connect 7 0 18 0; -#X connect 8 0 11 0; -#X connect 9 0 0 0; -#X connect 10 0 12 0; -#X connect 11 0 9 1; -#X connect 11 1 23 0; -#X connect 11 2 10 0; -#X connect 12 0 14 2; -#X connect 13 0 14 0; -#X connect 14 0 6 0; -#X connect 15 0 13 0; -#X connect 15 1 14 1; -#X connect 18 0 9 0; -#X connect 18 1 19 0; -#X connect 19 0 20 0; -#X connect 20 0 22 0; -#X connect 21 0 1 0; -#X connect 22 0 21 0; -#X connect 23 0 20 1; -#X connect 23 0 21 1; +#X connect 1 0 7 0; +#X connect 4 0 37 2; +#X connect 5 0 8 0; +#X connect 5 0 25 1; +#X connect 5 0 35 0; +#X connect 5 1 10 0; +#X connect 5 1 15 1; +#X connect 5 1 35 1; +#X connect 6 0 4 1; +#X connect 7 0 8 1; +#X connect 7 1 10 1; +#X connect 8 0 9 0; +#X connect 9 0 11 1; +#X connect 9 0 12 0; +#X connect 10 0 9 1; +#X connect 11 0 39 0; +#X connect 12 0 14 0; +#X connect 14 0 13 0; +#X connect 15 0 20 0; +#X connect 16 0 15 0; +#X connect 16 1 17 0; +#X connect 17 0 21 1; +#X connect 18 0 11 0; +#X connect 18 1 5 0; +#X connect 18 1 19 1; +#X connect 19 0 4 0; +#X connect 20 0 21 0; +#X connect 21 0 22 0; +#X connect 22 0 21 1; +#X connect 22 0 23 0; +#X connect 23 0 26 0; +#X connect 23 1 24 1; +#X connect 24 0 36 0; +#X connect 25 0 28 0; +#X connect 26 0 25 0; +#X connect 26 1 27 0; +#X connect 27 0 29 1; +#X connect 28 0 29 0; +#X connect 29 0 30 0; +#X connect 30 0 29 1; +#X connect 30 0 24 0; +#X connect 31 0 32 0; +#X connect 32 0 19 0; +#X connect 32 1 6 0; +#X connect 33 0 2 0; +#X connect 34 0 33 0; +#X connect 35 0 34 0; +#X connect 36 0 37 0; +#X connect 36 1 31 0; +#X connect 37 0 38 0; +#X connect 38 0 33 0; +#X connect 39 0 33 0; +#X connect 39 1 16 0; diff --git a/src/mtx_max2.c b/src/mtx_max2.c index 6e1c044..3ad68bf 100644 --- a/src/mtx_max2.c +++ b/src/mtx_max2.c @@ -36,7 +36,7 @@ static void mtx_max2scalar_matrix(t_mtx_binscalar *x, t_symbol *s, int argc, t_a while(n--){ buf->a_type = A_FLOAT; - buf++->a_w.w_float = (atom_getfloat(ap)<offset)?:offset:atom_getfloat(ap); + buf++->a_w.w_float = (atom_getfloat(ap)<offset)?offset:atom_getfloat(ap); ap++; } outlet_anything(x->x_obj.ob_outlet, gensym("matrix"), argc, x->m.atombuffer); @@ -51,7 +51,7 @@ static void mtx_max2scalar_list(t_mtx_binscalar *x, t_symbol *s, int argc, t_ato while(n--){ m->a_type = A_FLOAT; - (m++)->a_w.w_float = (atom_getfloat(argv)<offset)?:offset:atom_getfloat(argv); + (m++)->a_w.w_float = (atom_getfloat(argv)<offset)?offset:atom_getfloat(argv); argv++; } outlet_list(x->x_obj.ob_outlet, gensym("list"), argc, x->m.atombuffer); |