aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO53
-rw-r--r--degrees0x2d0x3emapping.pd25
-rw-r--r--help/degrees0x2d0x3emapping-help.pd24
-rw-r--r--help/mapping0x2d0x3edegrees-help.pd23
-rw-r--r--help/mapping0x2d0x3eradians-help.pd24
-rw-r--r--help/radians0x2d0x3emapping-help.pd24
-rw-r--r--mapping0x2d0x3edegrees.pd30
-rw-r--r--mapping0x2d0x3eradians.pd22
-rw-r--r--radians0x2d0x3emapping.pd26
-rw-r--r--vector.pd21
10 files changed, 262 insertions, 10 deletions
diff --git a/TODO b/TODO
index fcc0b37..131a550 100644
--- a/TODO
+++ b/TODO
@@ -13,3 +13,56 @@
- merge ds_ list objects with abstractions/footils/list-abs
+
+
+- http://www.fredrikolofsson.com/pages/code-pd.html
+ check out f0.smooth and f0.smooth2 (single/double exponential smoothing)
+
+
+-track down Golan Levin's curve algorithm page
+
+______________________________________________________________________________
+= figure out whole degree issue
+
+- should degree conversion also change rotation direction and 0 point? The
+ degrees on a compass rotate the opposite direction of radians. The 0 point
+ of a compass is due north, with radians, its right/due east.
+
+- [hid_polar] should take an argument (in degrees?) which specifies where the
+ 0 is on the circle
+
+
+=========
+smoothing algorithms
+
+
+http://www.chem.uoa.gr/applets/AppletSmooth/Appl_Smooth2.html
+
+
+http://www.nist.gov/dads/
+
+
+______________________________________________________________________________
+= mapping object ideas
+
+[hid2midi] [midi2hid]
+
+midi value + bend <-> hid
+ - use MIDI pitch and bend data for values in between MIDI notes?
+
+object for Fletcher-Munson Equal-loudness contours
+
+median average object
+
+[infinitepot] for use with a [knob] or any single axis that could be infinite.
+
+[hid_debounce]
+
+peak finder object
+
+"kalman filters"
+
+Curves!!
+
+http://www.2dcurves.com
+
diff --git a/degrees0x2d0x3emapping.pd b/degrees0x2d0x3emapping.pd
new file mode 100644
index 0000000..ee9ac47
--- /dev/null
+++ b/degrees0x2d0x3emapping.pd
@@ -0,0 +1,25 @@
+#N canvas 380 212 444 356 10;
+#X obj 88 30 inlet;
+#X obj 89 264 outlet;
+#X text 232 311 released under the GNU GPL;
+#X text 15 297 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 143 264 output range: 0 to 360 \, 0 = north/top;
+#X text 19 9 [deg2hid];
+#X text 129 28 input range: 0 to 360 \, 0 = east/right;
+#X obj 88 170 / 360;
+#X text 162 108 % is an int operation;
+#X text 169 126 this saves accuracy;
+#X obj 89 121 % 3.6e+07;
+#X obj 89 142 / 100000;
+#X obj 89 100 * 100000;
+#X obj 45 210 moses 0;
+#X obj 45 230 + 1;
+#X connect 0 0 12 0;
+#X connect 7 0 13 0;
+#X connect 10 0 11 0;
+#X connect 11 0 7 0;
+#X connect 12 0 10 0;
+#X connect 13 0 14 0;
+#X connect 13 1 1 0;
+#X connect 14 0 1 0;
diff --git a/help/degrees0x2d0x3emapping-help.pd b/help/degrees0x2d0x3emapping-help.pd
new file mode 100644
index 0000000..63b64df
--- /dev/null
+++ b/help/degrees0x2d0x3emapping-help.pd
@@ -0,0 +1,24 @@
+#N canvas 237 323 487 327 10;
+#X obj 5 2 cnv 15 450 20 empty empty [degrees2mapping] 2 11 1 18 -233017
+-66577 0;
+#X msg 422 3 pddp;
+#X text 254 269 released under the GNU GPL;
+#X text 185 228 For more info:;
+#X obj 289 226 pddp_open mapping-about;
+#X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 300 168 related objects:;
+#X obj 352 184 radians2mapping;
+#X floatatom 56 203 7 0 0 1 - - -;
+#X obj 59 103 hsl 300 15 0 360 0 0 empty empty degrees 6 7 1 10 -262131
+-1 -1 29900 0;
+#X floatatom 82 133 5 0 0 0 - - -;
+#X text 26 34 This object converts numbers from the mapping range (0
+to 1) to radians (-pi to pi) with the 0's lining up in the same place.
+;
+#X obj 296 204 mapping2degrees;
+#X obj 56 168 degrees2mapping;
+#X obj 240 184 mapping2radians;
+#X connect 9 0 10 0;
+#X connect 9 0 13 0;
+#X connect 13 0 8 0;
diff --git a/help/mapping0x2d0x3edegrees-help.pd b/help/mapping0x2d0x3edegrees-help.pd
new file mode 100644
index 0000000..51519d5
--- /dev/null
+++ b/help/mapping0x2d0x3edegrees-help.pd
@@ -0,0 +1,23 @@
+#N canvas 589 387 487 327 10;
+#X obj 5 2 cnv 15 450 20 empty empty [mapping2deg] 2 11 1 18 -233017
+-66577 0;
+#X msg 422 3 pddp;
+#X text 254 269 released under the GNU GPL;
+#X text 185 228 For more info:;
+#X obj 289 226 pddp_open mapping-about;
+#X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 300 168 related objects:;
+#X obj 240 184 radians2mapping;
+#X obj 352 184 degrees2mapping;
+#X floatatom 69 185 7 0 0 1 degrees - -;
+#X obj 72 85 hsl 128 15 0 1 0 0 empty empty mapping 6 7 1 10 -262131
+-1 -1 12700 0;
+#X floatatom 95 115 5 0 0 0 - - -;
+#X obj 69 150 mapping2degrees;
+#X text 26 34 This object converts numbers from the mapping range (0
+to 1) to degrees (0 to 360) with the 0 being north.;
+#X obj 298 205 mapping2radians;
+#X connect 10 0 11 0;
+#X connect 10 0 12 0;
+#X connect 12 0 9 0;
diff --git a/help/mapping0x2d0x3eradians-help.pd b/help/mapping0x2d0x3eradians-help.pd
new file mode 100644
index 0000000..be1012f
--- /dev/null
+++ b/help/mapping0x2d0x3eradians-help.pd
@@ -0,0 +1,24 @@
+#N canvas 633 307 475 315 10;
+#X obj 5 2 cnv 15 450 20 empty empty [mapping2radians] 2 11 1 18 -233017
+-66577 0;
+#X msg 422 3 pddp;
+#X text 254 269 released under the GNU GPL;
+#X text 185 228 For more info:;
+#X obj 289 226 pddp_open mapping-about;
+#X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 294 161 related objects:;
+#X obj 234 181 radians2mapping;
+#X obj 346 181 degrees2mapping;
+#X obj 288 200 mapping2degrees;
+#X floatatom 69 185 9 0 0 1 radians - -;
+#X obj 72 85 hsl 128 15 0 1 0 0 empty empty mapping 6 7 1 10 -262131
+-1 -1 0 0;
+#X floatatom 95 115 5 0 0 0 - - -;
+#X obj 69 150 mapping2radians;
+#X text 26 34 This object converts numbers from the mapping range (0
+to 1) to radians (-pi to pi) with the 0's lining up in the same place.
+;
+#X connect 11 0 12 0;
+#X connect 11 0 13 0;
+#X connect 13 0 10 0;
diff --git a/help/radians0x2d0x3emapping-help.pd b/help/radians0x2d0x3emapping-help.pd
new file mode 100644
index 0000000..1e8fe36
--- /dev/null
+++ b/help/radians0x2d0x3emapping-help.pd
@@ -0,0 +1,24 @@
+#N canvas 168 236 533 333 10;
+#X obj 5 2 cnv 15 450 20 empty empty [radians2mapping] 2 11 1 18 -233017 -66577
+0;
+#X msg 422 3 pddp;
+#X text 254 269 released under the GNU GPL;
+#X text 144 228 For more info:;
+#X text 40 254 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 254 186 related objects:;
+#X floatatom 69 195 5 0 0 1 mapping - -;
+#X obj 72 95 hsl 128 15 -3.14159 3.14159 0 0 empty empty radians 6
+7 1 10 -262131 -1 -1 0 0;
+#X floatatom 95 125 9 0 0 0 - - -;
+#X obj 69 160 radians2mapping;
+#X text 21 35 This object converts numbers from radians (-pi to pi)
+to the mapping range (0 to 1) with the 0's lining up in the same place.
+;
+#X obj 252 202 radians2mapping;
+#X obj 140 202 degrees2mapping;
+#X obj 365 202 mapping2degrees;
+#X obj 248 226 pddp_open mapping-about;
+#X connect 7 0 8 0;
+#X connect 7 0 9 0;
+#X connect 9 0 6 0;
diff --git a/mapping0x2d0x3edegrees.pd b/mapping0x2d0x3edegrees.pd
new file mode 100644
index 0000000..3675274
--- /dev/null
+++ b/mapping0x2d0x3edegrees.pd
@@ -0,0 +1,30 @@
+#N canvas 163 40 448 360 10;
+#X obj 88 30 inlet;
+#X obj 89 264 outlet;
+#X obj 88 56 min 1;
+#X obj 88 74 max 0;
+#X text 133 63 its a [hid] object \, so limit input range;
+#X text 232 311 released under the GNU GPL;
+#X text 15 297 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 129 28 input range: 0 to 1 \, 0 = east/right;
+#X text 143 264 output range: 0 to 360 \, 0 = north/top;
+#X obj 88 100 * 360;
+#X text 162 189 % is an int operation;
+#X text 169 207 this saves accuracy;
+#X obj 88 148 abs;
+#X obj 88 123 - 450;
+#X text 131 122 <- rotate zero to north;
+#X text 130 148 <- change direction of rotation;
+#X obj 89 202 % 3.6e+07;
+#X obj 89 223 / 100000;
+#X obj 89 181 * 100000;
+#X connect 0 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 9 0;
+#X connect 9 0 13 0;
+#X connect 12 0 18 0;
+#X connect 13 0 12 0;
+#X connect 16 0 17 0;
+#X connect 17 0 1 0;
+#X connect 18 0 16 0;
diff --git a/mapping0x2d0x3eradians.pd b/mapping0x2d0x3eradians.pd
new file mode 100644
index 0000000..bb3460b
--- /dev/null
+++ b/mapping0x2d0x3eradians.pd
@@ -0,0 +1,22 @@
+#N canvas 287 246 474 345 10;
+#X obj 15 30 inlet;
+#X obj 16 264 outlet;
+#X obj 16 198 * 6.28318;
+#X obj 15 101 moses 0.5;
+#X obj 15 56 min 1;
+#X obj 15 74 max 0;
+#X obj 74 133 - 1;
+#X text 56 28 input range: 0 to 1;
+#X text 70 264 output range: -pi to pi;
+#X text 232 311 released under the GNU GPL;
+#X text 15 297 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X text 60 63 this should be converted so it can handle out of range
+values \, using a mod and a div prolly.;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 3 1 6 0;
+#X connect 4 0 5 0;
+#X connect 5 0 3 0;
+#X connect 6 0 2 0;
diff --git a/radians0x2d0x3emapping.pd b/radians0x2d0x3emapping.pd
new file mode 100644
index 0000000..39debb1
--- /dev/null
+++ b/radians0x2d0x3emapping.pd
@@ -0,0 +1,26 @@
+#N canvas 258 110 429 400 10;
+#X obj 42 36 inlet;
+#X obj 140 297 outlet;
+#X text 19 9 [rad2hid];
+#X obj 141 234 % 628318;
+#X obj 127 167 moses 0;
+#X obj 141 255 / 628318;
+#X obj 42 96 * 100000;
+#X obj 41 167 % 628318;
+#X obj 42 136 moses -314159;
+#X obj 85 200 + 628318;
+#X text 10 66 % is an int operation \, we want floats \, so convert
+to large integers;
+#X text 225 351 released under the GNU GPL;
+#X text 8 337 (C) Copyright 2005 Hans-Christoph Steiner <hans@at.or.at>
+;
+#X connect 0 0 6 0;
+#X connect 3 0 5 0;
+#X connect 4 0 9 0;
+#X connect 4 1 3 0;
+#X connect 5 0 1 0;
+#X connect 6 0 8 0;
+#X connect 7 0 9 0;
+#X connect 8 0 7 0;
+#X connect 8 1 4 0;
+#X connect 9 0 3 0;
diff --git a/vector.pd b/vector.pd
index 528bc46..31ee92d 100644
--- a/vector.pd
+++ b/vector.pd
@@ -1,4 +1,5 @@
-#N canvas 711 171 488 431 10;
+#N canvas 711 171 496 439 10;
+#X obj 349 16 import mapping;
#X obj 30 75 inlet;
#X obj 25 300 outlet;
#X text 73 300 output range: 0 to 1;
@@ -17,15 +18,15 @@
#X text 230 319 direction;
#X text 23 318 magnatude;
#X obj 153 197 zexy/cart2pol;
-#X obj 231 267 radians2mapping;
#X obj 29 159 float;
#X obj 76 127 trigger bang float;
-#X connect 0 0 18 0;
-#X connect 4 0 19 0;
-#X connect 7 0 1 0;
-#X connect 16 0 7 0;
-#X connect 16 1 17 0;
-#X connect 17 0 3 0;
-#X connect 18 0 16 0;
+#X obj 233 267 radians->mapping;
+#X connect 1 0 18 0;
+#X connect 5 0 19 0;
+#X connect 8 0 2 0;
+#X connect 17 0 8 0;
+#X connect 17 1 20 0;
+#X connect 18 0 17 0;
#X connect 19 0 18 0;
-#X connect 19 1 16 1;
+#X connect 19 1 17 1;
+#X connect 20 0 4 0;