commit 17002da8a01b3a2193a206d849e1e6d542119a27 Author: Dooho Yi Date: Fri Jul 15 00:48:34 2022 +0900 Initial commit diff --git a/iamyou-en.mmp b/iamyou-en.mmp new file mode 100644 index 0000000..50b482c --- /dev/null +++ b/iamyou-en.mmp @@ -0,0 +1 @@ +{"pdFile":"iamyou.pd","backgroundColor":[0.0,0.4,0.4,1.0],"pageCount":1,"port":54321,"isPageScrollShortEnd":false,"startPageIndex":0,"canvasType":"widePhone","gui":[{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":",","textFont":"","class":"MMPLabel","vAlign":0,"frame":[140.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lat.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[50.0,340.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lon.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"----.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[180.0,340.0,80.0,40.0]},{"highlightColor":[0.6,1.0,0.6,1.0],"borderThickness":4,"address":"/tgl.Location.En","color":[1.0,0.6,0.0,1.0],"class":"MMPToggle","frame":[270.0,10.0,40.0,40.0]},{"highlightColor":[0.0,0.4,0.4,1.0],"address":"/lcd.Compass","color":[1.0,1.0,1.0,0.0],"class":"MMPLCD","frame":[270.0,430.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Pointing Location:","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,170.0,150.0,40.0]},{"highlightColor":[0.0,1.0,0.8,1.0],"borderThickness":4,"address":"/tgl.Location.Act","color":[1.0,0.6,0.0,1.0],"class":"MMPToggle","frame":[270.0,60.0,40.0,40.0]},{"highlightColor":[0.6,1.0,0.6,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Location On/off","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,10.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Location Activity","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,60.0,80.0,40.0]},{"highlightColor":[0.0,0.8,1.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Current Location:","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,310.0,150.0,40.0]},{"highlightColor":[0.0,0.8,1.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Where Is North?","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,430.0,100.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lon.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[250.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lat.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[110.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lat.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[50.0,200.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lat.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[110.0,200.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lon.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"----.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[180.0,200.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lon.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[250.0,200.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":",","textFont":"","class":"MMPLabel","vAlign":0,"frame":[140.0,200.0,40.0,40.0]},{"highlightColor":[1.0,1.0,0.0,1.0],"address":"/btn.Set.Lat","color":[0.0,0.8,0.6,1.0],"class":"MMPButton","frame":[100.0,240.0,40.0,40.0]},{"highlightColor":[0.2,1.0,0.8,1.0],"address":"/btn.Set.Lon","color":[0.0,0.8,0.6,1.0],"class":"MMPButton","frame":[260.0,240.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.0,0.8,0.6,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Set Point Longitude","textFont":"","class":"MMPLabel","vAlign":0,"frame":[170.0,240.0,100.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.0,0.8,0.6,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"Set Point Latitude","textFont":"","class":"MMPLabel","vAlign":0,"frame":[20.0,240.0,90.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/disp.Distance","textSize":20,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"-.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,130.0,130.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/lcd.Pointer","color":[1.0,1.0,1.0,0.0],"class":"MMPLCD","frame":[50.0,10.0,130.0,130.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"distance (km)","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,110.0,120.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"let\u0027s go this way!","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,120.0,80.0,40.0]}],"isOrientationLandscape":false,"preferAndroidFontDisplayInEditor":false,"version":2.0} \ No newline at end of file diff --git a/iamyou-kr.mmp b/iamyou-kr.mmp new file mode 100644 index 0000000..66d764d --- /dev/null +++ b/iamyou-kr.mmp @@ -0,0 +1 @@ +{"pdFile":"iamyou.pd","backgroundColor":[0.0,0.4,0.4,1.0],"pageCount":1,"port":54321,"isPageScrollShortEnd":false,"startPageIndex":0,"canvasType":"widePhone","gui":[{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":",","textFont":"","class":"MMPLabel","vAlign":0,"frame":[140.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lat.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[50.0,340.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lon.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"----.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[180.0,340.0,80.0,40.0]},{"highlightColor":[0.6,1.0,0.6,1.0],"borderThickness":4,"address":"/tgl.Location.En","color":[1.0,0.6,0.0,1.0],"class":"MMPToggle","frame":[270.0,10.0,40.0,40.0]},{"highlightColor":[0.0,0.4,0.4,1.0],"address":"/lcd.Compass","color":[1.0,1.0,1.0,0.0],"class":"MMPLCD","frame":[270.0,430.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"지금 가고있는 위치:","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,170.0,150.0,40.0]},{"highlightColor":[0.0,1.0,0.8,1.0],"borderThickness":4,"address":"/tgl.Location.Act","color":[1.0,0.6,0.0,1.0],"class":"MMPToggle","frame":[270.0,60.0,40.0,40.0]},{"highlightColor":[0.6,1.0,0.6,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"위치정보 켬/끔","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,10.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"위치정보 작동중","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,60.0,80.0,40.0]},{"highlightColor":[0.0,0.8,1.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"지금 서있는 위치:","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,310.0,150.0,40.0]},{"highlightColor":[0.0,0.8,1.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"북쪽은 어디?","textFont":"","class":"MMPLabel","vAlign":0,"frame":[210.0,430.0,70.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lon.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[250.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Current.Lat.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[110.0,340.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lat.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[50.0,200.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lat.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[110.0,200.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lon.Coarse","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"----.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[180.0,200.0,80.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/disp.Loc.Pointing.Lon.Fine","textSize":16,"hAlign":0,"color":[1.0,1.0,0.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[250.0,200.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[1.0,1.0,1.0,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":",","textFont":"","class":"MMPLabel","vAlign":0,"frame":[140.0,200.0,40.0,40.0]},{"highlightColor":[1.0,1.0,0.0,1.0],"address":"/btn.Set.Lat","color":[0.0,0.8,0.6,1.0],"class":"MMPButton","frame":[100.0,240.0,40.0,40.0]},{"highlightColor":[0.2,1.0,0.8,1.0],"address":"/btn.Set.Lon","color":[0.0,0.8,0.6,1.0],"class":"MMPButton","frame":[260.0,240.0,40.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.0,0.8,0.6,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"표식 위치 경도값 입력","textFont":"","class":"MMPLabel","vAlign":0,"frame":[170.0,240.0,90.0,40.0]},{"highlightColor":[1.0,0.0,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.0,0.8,0.6,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"표식 위치 위도값 입력","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,240.0,90.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/disp.Distance","textSize":20,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"-.---","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,130.0,130.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/lcd.Pointer","color":[1.0,1.0,1.0,0.0],"class":"MMPLCD","frame":[50.0,10.0,130.0,130.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"남은 거리 (km)","textFont":"","class":"MMPLabel","vAlign":0,"frame":[190.0,110.0,120.0,40.0]},{"highlightColor":[1.0,0.6,0.0,1.0],"address":"/myLabel","textSize":16,"hAlign":0,"color":[0.2,1.0,0.8,1.0],"androidFont":"Roboto-Regular","textFontFamily":"Default","text":"이쪽에 있어요!","textFont":"","class":"MMPLabel","vAlign":0,"frame":[10.0,110.0,70.0,40.0]}],"isOrientationLandscape":false,"preferAndroidFontDisplayInEditor":false,"version":2.0} \ No newline at end of file diff --git a/iamyou.pd b/iamyou.pd new file mode 100644 index 0000000..3c6b29d --- /dev/null +++ b/iamyou.pd @@ -0,0 +1,2 @@ +#N canvas 959 463 400 300 10; +#X obj 147 129 iamyou/main; diff --git a/iamyou.zip b/iamyou.zip new file mode 100644 index 0000000..76848e4 Binary files /dev/null and b/iamyou.zip differ diff --git a/iamyou/01.wav b/iamyou/01.wav new file mode 100644 index 0000000..188d4e7 Binary files /dev/null and b/iamyou/01.wav differ diff --git a/iamyou/eqpan2~.pd b/iamyou/eqpan2~.pd new file mode 100644 index 0000000..79f94b6 --- /dev/null +++ b/iamyou/eqpan2~.pd @@ -0,0 +1,57 @@ +#N canvas 413 152 930 452 10; +#X obj 47 27 inlet~; +#X obj 113 372 *~; +#X obj 503 372 *~; +#X obj 456 68 f \$1; +#X obj 456 39 loadbang; +#X obj 456 91 t a a a a; +#X obj 341 113 inlet~; +#X obj 128 261 expr~ max(min(max(min(($v1-$f2+$f3)/max($f3 \, 1e-6) +\, 1) \, 0)+max(min(($v1-$f2-$f3)/-max($f3 \, 1e-6) \, 1) \, 0)-1 \, +1) \, 0); +#X obj 518 261 expr~ max(min(max(min(($v1-$f2+$f3)/max($f3 \, 1e-6) +\, 1) \, 0)+max(min(($v1-$f2-$f3)/-max($f3 \, 1e-6) \, 1) \, 0)-1 \, +1) \, 0); +#X text 587 19 arg #1: width:; +#X text 637 79 in result \,; +#X text 657 119 -width/2 ~ width/2 -> cross fading; +#X obj 113 401 outlet~; +#X obj 503 401 outlet~; +#X obj 456 160 * -0.5; +#X obj 490 130 * 0.5; +#X obj 128 297 *~ 0.125; +#X obj 518 297 *~ 0.125; +#X text 168 343 sin~/cos~ input is NOT in radians! read help file; +#X text 168 363 equal power == using 3dB curve \, for ex. sin/cos; +#X text 657 139 +width/2 ~ width*(1.5) -> right fade-out; +#X text 607 39 -width*(1.5) ~ width/2 => left fade-in/out; +#X text 607 59 -width/2 ~ width*(1.5) => right fade-in/out; +#X text 657 99 -width*(1.5) ~ -width/2 -> left fade-in; +#X obj 128 320 -~ 0.25; +#X obj 128 343 cos~; +#X obj 518 343 cos~; +#X obj 518 320 -~ 0.25; +#X text 578 317 sin~ is NOT part of pd vanilla!; +#X text 578 337 [sin~] ==> [-~ 0.25]--[cos~]; +#X connect 0 0 1 0; +#X connect 0 0 2 0; +#X connect 1 0 12 0; +#X connect 2 0 13 0; +#X connect 3 0 5 0; +#X connect 4 0 3 0; +#X connect 5 0 14 0; +#X connect 5 1 7 2; +#X connect 5 2 15 0; +#X connect 5 3 8 2; +#X connect 6 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 16 0; +#X connect 8 0 17 0; +#X connect 14 0 7 1; +#X connect 15 0 8 1; +#X connect 16 0 24 0; +#X connect 17 0 27 0; +#X connect 24 0 25 0; +#X connect 25 0 1 1; +#X connect 26 0 2 1; +#X connect 27 0 26 0; diff --git a/iamyou/eqpan~.pd b/iamyou/eqpan~.pd new file mode 100644 index 0000000..8ecabff --- /dev/null +++ b/iamyou/eqpan~.pd @@ -0,0 +1,24 @@ +#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; diff --git a/iamyou/geocoord_bearing.pd b/iamyou/geocoord_bearing.pd new file mode 100644 index 0000000..b2a3cbd --- /dev/null +++ b/iamyou/geocoord_bearing.pd @@ -0,0 +1,32 @@ +#N canvas 445 91 443 482 10; +#X obj 198 67 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 128 142 print dLon; +#X msg 72 192 36.1234 128.139 36.1238 128.123; +#X obj 318 142 print brng; +#X obj 198 142 print y; +#X obj 248 142 print x; +#X obj 128 119 v dLon\$0; +#X obj 198 119 v y\$0; +#X obj 248 119 v x\$0; +#X obj 318 119 v brng\$0; +#X text 89 13 Calculate angle between two Latitude/Longitude points +=> https://stackoverflow.com/a/18738281; +#X obj 20 37 inlet; +#X obj 20 380 outlet; +#X text 66 380 bearing (deg \, CCW); +#X obj 20 262 expr brng\$0=fmod((brng\$0+360) \, 360) \; brng\$0=atan2(y\$0 +\, x\$0)*360/6.28319 \; x\$0=cos($f1*6.28319/360)*sin($f3*6.28319/360)-sin($f1*6.28319/360)*cos($f3*6.28319/360)*cos(dLon\$0) +\; y\$0=sin(dLon\$0)*cos($f3*6.28319/360) \; dLon\$0=($f4-$f2)*6.28319/360 +; +#X connect 0 0 6 0; +#X connect 0 0 7 0; +#X connect 0 0 8 0; +#X connect 0 0 9 0; +#X connect 2 0 14 0; +#X connect 6 0 1 0; +#X connect 7 0 4 0; +#X connect 8 0 5 0; +#X connect 9 0 3 0; +#X connect 11 0 14 0; +#X connect 14 0 12 0; diff --git a/iamyou/geocoord_dist.pd b/iamyou/geocoord_dist.pd new file mode 100644 index 0000000..cb1994b --- /dev/null +++ b/iamyou/geocoord_dist.pd @@ -0,0 +1,40 @@ +#N canvas 1 91 443 410 10; +#X obj 271 54 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 130 139 print dLat; +#X obj 200 139 print dLon; +#X obj 80 139 print R; +#X msg 56 192 36.1234 128.139 36.1238 128.123; +#X obj 270 139 print a; +#X obj 320 139 print c; +#X obj 370 139 print d; +#X text 74 10 Calculate distance between two latitude-longitude points? +(Haversine formula) ==> https://stackoverflow.com/a/27943; +#X obj 80 116 v R\$0; +#X obj 130 116 v dLat\$0; +#X obj 200 116 v dLon\$0; +#X obj 270 116 v a\$0; +#X obj 320 116 v c\$0; +#X obj 370 116 v d\$0; +#X obj 18 253 expr d\$0=R\$0*c\$0 \; c\$0=2*atan2(sqrt(a\$0) \, sqrt(1-a\$0)) +\; a\$0=sin(dLat\$0/2)*sin(dLat\$0/2)+cos($f2*6.28319/360)*cos($f4*6.28319/360)*sin(dLon\$0/2)*sin(dLon\$0/2) +\; dLon\$0=($f3-$f1)*6.28319/360 \; dLat\$0=($f4-$f2)*6.28319/360 \; +R\$0=6371; +#X obj 18 42 inlet; +#X obj 18 374 outlet; +#X text 63 374 dist (km); +#X connect 0 0 9 0; +#X connect 0 0 10 0; +#X connect 0 0 11 0; +#X connect 0 0 12 0; +#X connect 0 0 13 0; +#X connect 0 0 14 0; +#X connect 4 0 15 0; +#X connect 9 0 3 0; +#X connect 10 0 1 0; +#X connect 11 0 2 0; +#X connect 12 0 5 0; +#X connect 13 0 6 0; +#X connect 14 0 7 0; +#X connect 15 0 17 0; +#X connect 16 0 15 0; diff --git a/iamyou/main.pd b/iamyou/main.pd new file mode 100644 index 0000000..408c693 --- /dev/null +++ b/iamyou/main.pd @@ -0,0 +1,716 @@ +#N canvas 948 458 411 305 10; +#X obj 14 14 receive fromSystem; +#X obj 14 60 route /location /compass; +#X obj 14 37 list trim; +#X obj 14 113 unpack f f f f f f f f f; +#X obj 63 192 pack f f f f, f 19; +#X obj 84 83 s \$0-compass; +#X obj 83 225 s latlon; +#X obj 45 258 print locations:; +#N canvas 1 91 604 394 notes 0; +#X text 18 15 when location data is enabled \, it is sent via a message +"/location" with 9 numbers. Location coordinate data in iOS is a 64-bit +floating point number (double); +#X text 18 65 PureData is only 32-bit float \, so sending that number +into a patch loses resolution. However \, a tweaky workaround (via +64-bit math in the iOS layer) is provided by the last 4 numbers in +the message.; +#X text 18 125 arg #1: latitude coordinate (as 32-bit float); +#X text 18 145 arg #2: longitude coordinate (as 32-bit float); +#X text 18 165 arg #3: altitude (meters); +#X text 18 185 arg #4: horizontal accuracy (meters radius); +#X text 18 205 arg #5: vertical (altitude) accuracy (meters radius) +; +#X text 18 235 arg #6: latitude "rough"; +#X text 18 275 arg #8: latitude "fine"; +#X text 18 255 arg #7: longitude "rough"; +#X text 18 295 arg #9: longitude "fine"; +#X text 208 235 latitude/longitude "rough" = 64-bit value multiplied +by 1000 and truncated to an integer before being sent into Pd; +#X text 208 285 latitude/longitude "fine" = 64-bit value modded by +0.001 \, multiplied by 1e+06 \, and truncated to an integer \, before +being sent into Pd So the "rough" contains the significant digits up +to the thousandths place \, and the "fine" contains the next three +significant digits. An original coordinate value of 123.457 would be +turned into rough=123456 fine=789.; +#X restore 223 113 pd notes; +#X text 202 188 arg #6: latitude "rough"; +#X text 202 228 arg #8: latitude "fine"; +#X text 202 208 arg #7: longitude "rough"; +#X text 202 248 arg #9: longitude "fine"; +#X text 170 113 <======; +#N canvas 1 91 1064 672 gui 0; +#X obj 16 239 send toGUI; +#X obj 526 72 list trim; +#X obj 526 49 receive fromGUI; +#X msg 526 118 list /enableLocation \$1; +#X obj 526 141 send toSystem; +#X obj 356 49 loadbang; +#X obj 356 95 send toGUI; +#N canvas 590 91 614 581 draw_arrow 0; +#X obj 89 257 rot2d; +#X msg 89 149 0.5 0.6; +#X obj 70 327 list store; +#X msg 106 172 0.4 0.7; +#X msg 140 218 0.6 0.7; +#X obj 89 280 list prepend append; +#X obj 89 303 list trim; +#X obj 70 103 t b b b; +#X obj 89 126 t b b b b; +#X obj 70 81 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 70 19 inlet; +#X obj 70 42 t b a; +#X obj 209 219 t a; +#X obj 242 199 t a; +#X msg 123 195 0.5 0; +#X obj 70 350 list prepend /lcd.Pointer paintpoly; +#X obj 70 373 t b a b; +#X msg 70 419 list /lcd.Pointer paintoval 0.45 0.45 0.55 0.55 1 1 1 +1; +#X obj 89 442 send toGUI; +#X msg 244 311 list /lcd.Pointer paintoval 0 0 1 1 0.6 1 0.6 1; +#X msg 244 288 list /lcd.Pointer paintoval 0 0 1 1 0 0.8 0.6 1; +#X msg 109 396 list /lcd.Pointer paintoval 0 0 1 1 0.6 1 0.6 1; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 15 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 7 0 2 0; +#X connect 7 1 8 0; +#X connect 7 2 12 0; +#X connect 8 0 1 0; +#X connect 8 1 3 0; +#X connect 8 2 14 0; +#X connect 8 3 4 0; +#X connect 9 0 7 0; +#X connect 10 0 11 0; +#X connect 11 0 9 0; +#X connect 11 1 13 0; +#X connect 12 0 2 1; +#X connect 13 0 0 2; +#X connect 14 0 0 0; +#X connect 15 0 16 0; +#X connect 16 0 17 0; +#X connect 16 1 18 0; +#X connect 16 2 21 0; +#X connect 17 0 18 0; +#X connect 21 0 18 0; +#X restore 406 597 pd draw_arrow; +#X floatatom 406 403 5 0 0 1 angle_(deg) - -; +#X obj 100 580 send toGUI; +#X floatatom 406 335 5 0 0 1 angle_(deg) - -; +#X obj 406 380 +; +#X obj 406 357 * -1; +#X obj 406 312 r \$0-compass; +#X obj 586 417 r \$0-brng; +#X obj 100 534 r \$0-dist; +#X obj 154 372 loadbang; +#X obj 154 395 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#N canvas 592 91 458 517 draw_arrow 0; +#X obj 89 257 rot2d; +#X msg 89 149 0.5 0.6; +#X obj 70 327 list store; +#X msg 106 172 0.4 0.7; +#X msg 140 218 0.6 0.7; +#X obj 89 280 list prepend append; +#X obj 89 303 list trim; +#X obj 70 103 t b b b; +#X obj 89 126 t b b b b; +#X obj 70 81 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 70 19 inlet; +#X obj 70 42 t b a; +#X obj 209 219 t a; +#X obj 242 199 t a; +#X obj 87 465 send toGUI; +#X obj 70 350 list prepend /lcd.Compass paintpoly; +#X msg 70 442 list /lcd.Compass paintoval 0.45 0.45 0.55 0.55 1 1 1 +1; +#X obj 70 373 t b a b b; +#X msg 123 195 0.5 0.1; +#X msg 104 418 list /lcd.Compass frameoval 0.1 0.1 0.9 0.9 0 1 1 1 +; +#X msg 121 395 list /lcd.Compass paintoval 0 0 1 1 1 1 0 1; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 15 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 7 0 2 0; +#X connect 7 1 8 0; +#X connect 7 2 12 0; +#X connect 8 0 1 0; +#X connect 8 1 3 0; +#X connect 8 2 18 0; +#X connect 8 3 4 0; +#X connect 9 0 7 0; +#X connect 10 0 11 0; +#X connect 11 0 9 0; +#X connect 11 1 13 0; +#X connect 12 0 2 1; +#X connect 13 0 0 2; +#X connect 15 0 17 0; +#X connect 16 0 14 0; +#X connect 17 0 16 0; +#X connect 17 1 14 0; +#X connect 17 3 20 0; +#X connect 18 0 0 0; +#X connect 19 0 14 0; +#X connect 20 0 14 0; +#X restore 16 425 pd draw_arrow; +#X floatatom 16 335 5 0 0 1 angle_(deg) - -; +#X obj 16 312 r \$0-compass; +#X text 11 16 disp. lat/long in text; +#X text 354 18 toggle gps reception + automatically enable at start-up +; +#X obj 16 46 r latlon; +#X floatatom 16 403 5 0 0 1 angle_(deg) - -; +#X obj 16 357 * -1; +#X obj 16 380 + 360; +#X text 97 499 disp. distance (km) in text; +#X obj 850 281 s toGUI; +#X obj 807 284 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 757 238 f; +#X obj 807 238 + 1; +#X obj 807 261 % 2; +#X obj 757 134 t a b; +#X msg 784 202 0; +#X obj 757 202 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 850 200 del 1000; +#X msg 850 223 0; +#X obj 757 62 r latlon; +#X obj 757 85 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X text 756 24 location info arrival indicator; +#X obj 757 163 scan 400; +#X msg 757 111 10; +#X obj 526 95 route /tgl.Location.En; +#X msg 356 72 list /tgl.Location.En 1; +#X msg 850 252 list /tgl.Location.Act set \$1; +#X msg 16 98 list /disp.Loc.Current.Lat.Coarse \$1; +#X msg 43 121 list /disp.Loc.Current.Lon.Coarse \$1; +#X msg 70 167 list /disp.Loc.Current.Lat.Fine \$1; +#X msg 97 213 list /disp.Loc.Current.Lon.Fine \$1; +#X obj 16 69 unpack f f f f; +#X obj 100 557 list prepend /disp.Distance; +#X text 14 281 draw north pointing compass; +#X obj 304 367 loadbang; +#X obj 304 390 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 404 282 draw dest. pointing arrow = bearing arrow; +#X obj 586 332 expr fmod(($f1+360) \, 360); +#X obj 586 355 expr fmod(($f1+180) \, 360)-180; +#X obj 586 378 s \$0-brng-error; +#N canvas 24 163 465 242 tester 0; +#X obj 17 67 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X obj 17 87 metro 100; +#X obj 87 110 vline~; +#X obj 87 133 snapshot~; +#X floatatom 87 156 5 0 0 0 - - -; +#X msg 87 74 0 0 \, 50 2000 \, 0 2000 2000 \, 360 0 4000 \, 310 2000 +4000 \, 360 2000 6000; +#X obj 87 19 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X obj 87 45 metro 8000; +#X obj 87 178 outlet; +#X connect 0 0 1 0; +#X connect 1 0 3 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 4 0 8 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 6 0 0 0; +#X connect 7 0 5 0; +#X restore 331 312 pd tester; +#X obj 489 487 tgl 15 0 empty \$0-veryclose r:0-veryclose 17 7 0 10 +-262144 -1 -1 0 1; +#N canvas 719 91 614 663 draw_veryclose 0; +#X obj 89 257 rot2d; +#X msg 89 149 0.5 0.6; +#X obj 70 327 list store; +#X msg 106 172 0.4 0.7; +#X msg 140 218 0.6 0.7; +#X obj 89 280 list prepend append; +#X obj 89 303 list trim; +#X obj 70 103 t b b b; +#X obj 89 126 t b b b b; +#X obj 70 81 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 70 19 inlet; +#X obj 70 42 t b a; +#X obj 209 219 t a; +#X obj 242 199 t a; +#X obj 70 350 list prepend /lcd.Pointer paintpoly; +#X obj 161 577 send toGUI; +#X msg 123 195 0.5 0.3; +#X msg 113 465 list /lcd.Pointer frameoval 0.12 0.12 0.88 0.88 1 1 +0 0.7; +#X msg 142 419 list /lcd.Pointer frameoval 0 0 1 1 1 1 0 1; +#X obj 70 373 t b a b b b b b; +#X msg 70 511 list /lcd.Pointer paintoval 0.45 0.45 0.55 0.55 0 1 0 +1; +#X msg 99 488 list /lcd.Pointer frameoval 0.25 0.25 0.75 0.75 1 1 0 +0.5; +#X msg 128 442 list /lcd.Pointer frameoval 0.05 0.05 0.95 0.95 1 1 +0 0.9; +#X msg 222 325 list /lcd.Pointer paintoval 0 0 1 1 1 0.4 0.6 1; +#X msg 157 396 list /lcd.Pointer paintoval 0 0 1 1 0 0.4 0.4 1; +#X connect 0 0 5 0; +#X connect 1 0 0 0; +#X connect 2 0 14 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 6 0; +#X connect 6 0 2 0; +#X connect 7 0 2 0; +#X connect 7 1 8 0; +#X connect 7 2 12 0; +#X connect 8 0 1 0; +#X connect 8 1 3 0; +#X connect 8 2 16 0; +#X connect 8 3 4 0; +#X connect 9 0 7 0; +#X connect 10 0 11 0; +#X connect 11 0 9 0; +#X connect 11 1 13 0; +#X connect 12 0 2 1; +#X connect 13 0 0 2; +#X connect 14 0 19 0; +#X connect 16 0 0 0; +#X connect 17 0 15 0; +#X connect 18 0 15 0; +#X connect 19 0 20 0; +#X connect 19 1 15 0; +#X connect 19 2 21 0; +#X connect 19 3 17 0; +#X connect 19 5 18 0; +#X connect 19 6 24 0; +#X connect 20 0 15 0; +#X connect 21 0 15 0; +#X connect 24 0 15 0; +#X restore 491 597 pd draw_veryclose; +#X obj 491 574 spigot; +#X obj 445 531 == 0; +#X obj 406 574 spigot; +#X obj 445 508 f; +#X obj 406 485 t a a b; +#X obj 524 534 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 445 554 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 489 440 loadbang; +#X msg 489 463 0; +#X obj 70 144 makefilename %03d; +#X obj 97 190 makefilename %03d; +#X obj 876 589 send toGUI; +#X msg 876 566 list /tgl.Location.En \$1; +#X obj 913 514 del 500; +#X obj 876 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 876 491 t b b; +#X msg 876 514 0; +#X msg 913 537 1; +#X obj 935 171 del; +#X text 681 423 if there is no GPS update for a long time \, let's +try to get one intentionally by performing a enable/disable cycle. +; +#X msg 935 148 20000; +#X text 947 123 20 seconds; +#X connect 1 0 43 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 5 0 44 0; +#X connect 8 0 56 0; +#X connect 8 0 66 0; +#X connect 10 0 12 0; +#X connect 11 0 8 0; +#X connect 12 0 11 0; +#X connect 13 0 10 0; +#X connect 14 0 11 1; +#X connect 15 0 51 0; +#X connect 16 0 17 0; +#X connect 17 0 19 0; +#X connect 19 0 25 0; +#X connect 20 0 19 0; +#X connect 23 0 50 0; +#X connect 24 0 18 0; +#X connect 25 0 26 0; +#X connect 26 0 24 0; +#X connect 29 0 45 0; +#X connect 30 0 31 0; +#X connect 31 0 32 0; +#X connect 32 0 30 1; +#X connect 32 0 29 0; +#X connect 33 0 41 0; +#X connect 33 1 34 0; +#X connect 34 0 30 1; +#X connect 35 0 30 0; +#X connect 36 0 37 0; +#X connect 37 0 45 0; +#X connect 38 0 39 0; +#X connect 39 0 42 0; +#X connect 39 0 82 0; +#X connect 41 0 35 0; +#X connect 41 1 36 0; +#X connect 42 0 33 0; +#X connect 43 0 3 0; +#X connect 44 0 6 0; +#X connect 45 0 28 0; +#X connect 46 0 0 0; +#X connect 47 0 0 0; +#X connect 48 0 0 0; +#X connect 49 0 0 0; +#X connect 50 0 46 0; +#X connect 50 1 47 0; +#X connect 50 2 71 0; +#X connect 50 3 72 0; +#X connect 51 0 9 0; +#X connect 53 0 54 0; +#X connect 54 0 8 0; +#X connect 56 0 57 0; +#X connect 57 0 58 0; +#X connect 59 0 8 0; +#X connect 60 0 65 1; +#X connect 62 0 61 0; +#X connect 63 0 68 0; +#X connect 64 0 7 0; +#X connect 65 0 67 0; +#X connect 65 0 63 0; +#X connect 66 0 64 0; +#X connect 66 1 62 0; +#X connect 66 2 65 0; +#X connect 67 0 62 1; +#X connect 68 0 64 1; +#X connect 69 0 70 0; +#X connect 70 0 65 1; +#X connect 71 0 48 0; +#X connect 72 0 49 0; +#X connect 74 0 73 0; +#X connect 75 0 79 0; +#X connect 76 0 77 0; +#X connect 77 0 78 0; +#X connect 77 1 75 0; +#X connect 78 0 74 0; +#X connect 79 0 74 0; +#X connect 80 0 76 0; +#X connect 82 0 80 0; +#X restore 287 25 pd gui guts; +#X obj 63 142 / 1000; +#X obj 100 165 / 1000; +#N canvas 541 159 818 604 location 0; +#X obj 183 351 geocoord_dist; +#X obj 273 351 geocoord_bearing; +#X obj 183 291 pack f f f f; +#N canvas 1 91 631 615 get_point 0; +#X obj 297 17 r fromGUI; +#X obj 297 86 sel 1; +#X obj 297 173 send toSystem; +#X obj 17 40 list trim; +#X obj 17 17 r fromSystem; +#X obj 17 63 route /textDialog; +#X obj 388 86 sel 1; +#X obj 297 40 list trim; +#X obj 17 236 tofloat; +#X obj 205 236 tofloat; +#X obj 297 63 route /btn.Set.Lat /btn.Set.Lon; +#X msg 297 110 list /textDialog /diagInputLat Set Latitude:; +#X msg 317 143 list /textDialog /diagInputLong Set Longitude:; +#X obj 17 576 send toGUI; +#X obj 17 86 route /diagInputLong /diagInputLat; +#X msg 17 494 list /disp.Loc.Pointing.Lon.Coarse \$1; +#X msg 44 547 list /disp.Loc.Pointing.Lon.Fine \$1; +#X obj 159 447 outlet; +#X obj 159 424 pack f f f f; +#X obj 343 400 send toGUI; +#X msg 370 371 list /disp.Loc.Pointing.Lat.Fine \$1; +#X msg 343 325 list /disp.Loc.Pointing.Lat.Coarse \$1; +#X text 156 469 (Lat.fine \, Lon.fine \, Lat.rough \, Lon.rough); +#X obj 159 401 f; +#X obj 159 372 t b a; +#X obj 205 272 expr $f1+int($f2*1000)/1000 \; rint(abs($f2*1000000))%1000 +; +#X obj 17 272 expr $f1+int($f2*1000)/1000 \; rint(abs($f2*1000000))%1000 +; +#X obj 44 524 makefilename %03d; +#X obj 370 348 makefilename %03d; +#X obj 101 152 unpack f f f f; +#X obj 201 49 r PRESET; +#X obj 111 208 f; +#X obj 101 175 t b a; +#X connect 0 0 7 0; +#X connect 1 0 11 0; +#X connect 3 0 5 0; +#X connect 4 0 3 0; +#X connect 5 0 14 0; +#X connect 6 0 12 0; +#X connect 7 0 10 0; +#X connect 8 0 26 0; +#X connect 8 1 26 1; +#X connect 9 0 25 0; +#X connect 9 1 25 1; +#X connect 10 0 1 0; +#X connect 10 1 6 0; +#X connect 11 0 2 0; +#X connect 12 0 2 0; +#X connect 14 0 8 0; +#X connect 14 1 9 0; +#X connect 15 0 13 0; +#X connect 16 0 13 0; +#X connect 18 0 17 0; +#X connect 20 0 19 0; +#X connect 21 0 19 0; +#X connect 23 0 18 0; +#X connect 24 0 23 0; +#X connect 24 1 18 3; +#X connect 25 0 18 2; +#X connect 25 0 21 0; +#X connect 25 1 23 1; +#X connect 25 1 28 0; +#X connect 26 0 15 0; +#X connect 26 0 24 0; +#X connect 26 1 18 1; +#X connect 26 1 27 0; +#X connect 27 0 16 0; +#X connect 28 0 20 0; +#X connect 29 0 32 0; +#X connect 29 1 25 1; +#X connect 29 2 31 1; +#X connect 29 3 26 1; +#X connect 30 0 29 0; +#X connect 31 0 26 0; +#X connect 32 0 31 0; +#X connect 32 1 25 0; +#X restore 494 19 pd get_point; +#X obj 183 42 unpack f f f f; +#X obj 183 19 r latlon; +#X obj 421 351 geocoord_dist; +#X obj 511 351 geocoord_bearing; +#X obj 421 314 t a a; +#X obj 421 291 pack f f f f; +#X obj 183 111 pack f f f f; +#X obj 183 88 f; +#X obj 183 65 t b a; +#X obj 413 134 unpack f f f f; +#X obj 183 134 unpack f f f f; +#X obj 440 183 expr copysign($f1 \, $f2)/1e+06; +#X obj 413 206 expr copysign($f1 \, $f2)/1e+06; +#X obj 210 183 expr copysign($f1 \, $f2)/1e+06; +#X obj 183 206 expr copysign($f1 \, $f2)/1e+06; +#X text 574 273 coarse; +#X text 307 280 fine; +#X obj 183 374 v distF\$0; +#X obj 273 374 v brngF\$0; +#X obj 511 374 v brngC\$0; +#X obj 421 374 v distC\$0; +#X obj 183 314 t b a a; +#X obj 55 372 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 236 428 v x\$0; +#X obj 236 448 v y\$0; +#X obj 181 568 s \$0-dist; +#X obj 266 568 s \$0-brng; +#X text 325 72 (Lat.fine \, Lon.fine \, Lat.rough \, Lon.rough); +#X msg 18 64 36.123 127.789 456 12; +#X msg 18 113 456 12 36.123 127.789; +#X text 43 89 re-order to be; +#X obj 55 415 sel 1; +#X obj 55 392 v haveSetPoint; +#X obj 554 134 v haveSetPoint; +#X msg 554 111 1; +#X obj 653 224 send toGUI; +#X msg 653 201 list /tgl.Location.En \$1; +#X obj 690 149 del 500; +#X obj 653 106 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 653 126 t b b; +#X msg 653 149 0; +#X msg 690 172 1; +#X obj 494 42 t b b a; +#X obj 518 319 print input(C); +#X obj 278 319 print input(F); +#X obj 55 497 print dist(km); +#X obj 55 474 print brng(deg); +#X obj 181 474 expr sqrt(x\$0*x\$0+y\$0*y\$0) \; fmod(atan2(x\$0 \, +y\$0)*360/6.28319+360 \, 360) \; x\$0=distC\$0*sin(brngC\$0*6.28319/360)+ +distF\$0*sin(brngF\$0*6.28319/360) \; y\$0=distC\$0*cos(brngC\$0*6.28319/360)+ +distF\$0*cos(brngF\$0*6.28319/360); +#X obj 628 520 tgl 15 0 \$0-veryclose empty s:0-veryclose 17 7 0 10 +-262144 -1 -1 0 1; +#X obj 628 497 < 0.03; +#X obj 628 474 r \$0-dist; +#X connect 0 0 21 0; +#X connect 1 0 22 0; +#X connect 2 0 25 0; +#X connect 2 0 48 0; +#X connect 3 0 46 0; +#X connect 4 0 12 0; +#X connect 4 1 10 3; +#X connect 4 2 11 1; +#X connect 4 3 10 1; +#X connect 5 0 4 0; +#X connect 6 0 24 0; +#X connect 7 0 23 0; +#X connect 8 0 6 0; +#X connect 8 1 7 0; +#X connect 9 0 8 0; +#X connect 9 0 47 0; +#X connect 10 0 14 0; +#X connect 11 0 10 0; +#X connect 12 0 11 0; +#X connect 12 1 10 2; +#X connect 13 0 16 0; +#X connect 13 1 15 0; +#X connect 13 2 9 2; +#X connect 13 2 16 1; +#X connect 13 3 9 3; +#X connect 13 3 15 1; +#X connect 14 0 18 0; +#X connect 14 1 17 0; +#X connect 14 2 9 0; +#X connect 14 2 18 1; +#X connect 14 3 9 1; +#X connect 14 3 17 1; +#X connect 15 0 2 3; +#X connect 16 0 2 2; +#X connect 17 0 2 1; +#X connect 18 0 2 0; +#X connect 25 0 26 0; +#X connect 25 1 0 0; +#X connect 25 2 1 0; +#X connect 26 0 36 0; +#X connect 32 0 4 0; +#X connect 33 0 13 0; +#X connect 35 0 51 0; +#X connect 36 0 35 0; +#X connect 38 0 37 0; +#X connect 40 0 39 0; +#X connect 41 0 45 0; +#X connect 42 0 43 0; +#X connect 43 0 44 0; +#X connect 43 1 41 0; +#X connect 44 0 40 0; +#X connect 45 0 40 0; +#X connect 46 0 42 0; +#X connect 46 1 38 0; +#X connect 46 2 13 0; +#X connect 51 0 29 0; +#X connect 51 0 49 0; +#X connect 51 1 30 0; +#X connect 51 1 50 0; +#X connect 53 0 52 0; +#X connect 54 0 53 0; +#X restore 287 48 pd location guts; +#N canvas 142 162 800 337 audio 0; +#X obj 18 146 wav2~; +#X msg 18 68 01.wav; +#X msg 31 117 1; +#X msg 667 227 \; pd dsp 1; +#X obj 31 16 loadbang; +#X obj 153 39 r \$0-dist; +#X obj 153 62 map 0.005 0.05 1 0.1; +#X obj 18 303 dac~; +#X floatatom 318 43 5 0 0 1 - - -; +#X floatatom 153 85 5 0 0 1 vol - -; +#X obj 153 146 line~; +#X msg 153 123 \$1 20; +#X obj 31 39 t b b; +#X obj 667 204 loadbang; +#X obj 18 169 expr~ $v1 * pow($v2 \, 4); +#X obj 318 20 r \$0-brng-error; +#X obj 318 248 line~; +#X obj 18 265 eqpan2~ 30; +#X obj 363 81 t a a; +#X obj 363 110 -; +#X obj 363 156 > 100; +#X obj 318 65 t a a; +#X obj 363 179 sel 1 0; +#X obj 318 225 pack f f; +#X msg 393 202 100; +#X msg 363 202 0; +#X obj 363 133 abs; +#X text 419 150 if abs of diff. greater than 100 \, disable fading. +(otherwise one will hear glitches.); +#X text 411 47 for a very big jumps \, like 180 <-> -180 .. this is +not regular change \, we should disable [line~] for such events.; +#X connect 0 0 14 0; +#X connect 1 0 0 0; +#X connect 2 0 0 1; +#X connect 4 0 12 0; +#X connect 5 0 6 0; +#X connect 6 0 9 0; +#X connect 8 0 21 0; +#X connect 9 0 11 0; +#X connect 10 0 14 1; +#X connect 11 0 10 0; +#X connect 12 0 2 0; +#X connect 12 1 1 0; +#X connect 13 0 3 0; +#X connect 14 0 17 0; +#X connect 15 0 8 0; +#X connect 16 0 17 1; +#X connect 17 0 7 0; +#X connect 17 1 7 1; +#X connect 18 0 19 1; +#X connect 18 1 19 0; +#X connect 19 0 26 0; +#X connect 20 0 22 0; +#X connect 21 0 23 0; +#X connect 21 1 18 0; +#X connect 22 0 25 0; +#X connect 22 1 24 0; +#X connect 23 0 16 0; +#X connect 24 0 23 1; +#X connect 25 0 23 1; +#X connect 26 0 20 0; +#X restore 287 71 pd audio guts; +#N canvas 1 420 450 324 PRESET 0; +#X obj 147 287 s PRESET; +#X obj 147 264 pack f f f f; +#X text 14 8 (Lat.integral \, Lat.fractional \, Lon.integral \, Lon.fractional) +; +#X obj 18 43 loadbang; +#X obj 18 162 t b b b b, f 46; +#X obj 18 112 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 +-1; +#X obj 18 89 del; +#X msg 18 66 500; +#X msg 109 211 0.574749; +#X msg 291 211 0.92608; +#X msg 18 185 37; +#X msg 200 185 126; +#X connect 1 0 0 0; +#X connect 3 0 7 0; +#X connect 4 0 10 0; +#X connect 4 1 8 0; +#X connect 4 2 11 0; +#X connect 4 3 9 0; +#X connect 6 0 5 0; +#X connect 7 0 6 0; +#X connect 8 0 1 1; +#X connect 9 0 1 3; +#X connect 10 0 1 0; +#X connect 11 0 1 2; +#X restore 190 24 pd PRESET; +#X connect 0 0 2 0; +#X connect 1 0 3 0; +#X connect 1 1 5 0; +#X connect 2 0 1 0; +#X connect 3 5 15 0; +#X connect 3 6 16 0; +#X connect 3 7 4 2; +#X connect 3 8 4 3; +#X connect 4 0 6 0; +#X connect 4 0 7 0; +#X connect 15 0 4 0; +#X connect 16 0 4 1; diff --git a/iamyou/map-help.pd b/iamyou/map-help.pd new file mode 100644 index 0000000..e9d3126 --- /dev/null +++ b/iamyou/map-help.pd @@ -0,0 +1,20 @@ +#N canvas 1 91 487 300 10; +#X obj 16 143 map-ui 34 456.315 0.0012 0.0016; +#X obj 64 100 map 34 456.315 0.0012 0.0016; +#X floatatom 16 87 5 0 0 0 - - -; +#X floatatom 64 121 15 0 0 0 - - -; +#X floatatom 16 268 15 0 0 0 - - -; +#X obj 244 220 map2 34 456.315 0.0012 0.0016; +#X floatatom 244 241 15 0 0 0 - - -; +#X text 15 49 (INPUT / OUPUT must be increasing); +#X text 16 13 basic map : (val - from[0]) * (to[1] - to[0]) / (from[1] +- from[0]) + to[0]; +#X text 240 174 (INPUT / OUPUT CAN be bi-directional); +#X text 240 194 NO LIMIT for output (extrapolation)!; +#X text 236 49 <=== this is NOT true anymore!; +#X connect 0 0 4 0; +#X connect 1 0 3 0; +#X connect 2 0 0 0; +#X connect 2 0 1 0; +#X connect 2 0 5 0; +#X connect 5 0 6 0; diff --git a/iamyou/map-ui.pd b/iamyou/map-ui.pd new file mode 100644 index 0000000..4dd30ea --- /dev/null +++ b/iamyou/map-ui.pd @@ -0,0 +1,127 @@ +#N canvas 198 84 573 623 10; +#X obj 23 150 inlet; +#X obj 439 231 loadbang; +#X obj 454 301 f \$1; +#X obj 470 324 f \$2; +#X obj 486 347 f \$3; +#X obj 502 370 f \$4; +#X obj 454 401 v \$0-from0; +#X obj 470 424 v \$0-from1; +#X obj 486 447 v \$0-to0; +#X obj 502 470 v \$0-to1; +#X obj 439 254 t b b b b b; +#X obj 439 277 bng 15 250 50 0 \$0-apply empty s:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 172 216 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 68 170 v \$0-from0; +#X obj 23 253 -; +#X obj 23 286 *; +#X obj 172 259 v \$0-to1; +#X obj 189 282 v \$0-to0; +#X obj 206 305 v \$0-from1; +#X obj 223 328 v \$0-from0; +#X obj 172 305 -; +#X obj 206 351 -; +#X obj 172 378 /; +#X obj 23 362 +; +#X obj 38 339 v \$0-to0; +#X obj 23 452 outlet; +#X obj 172 236 t b b b b; +#X obj 68 150 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 38 319 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X text 511 183 2018 8; +#X obj 58 370 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 58 390 v \$0-to1; +#X obj 23 418 min; +#X obj 23 205 max; +#X text 198 186 (INPUT / OUPUT must be increasing); +#X obj 362 447 inlet; +#X obj 389 493 unpack f f f f; +#X obj 362 470 t b a; +#X obj 362 516 bng 15 250 50 0 \$0-apply empty s:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 234 393 s \$0-from0-lbl-set; +#X msg 234 372 label \$1; +#X msg 227 440 label \$1; +#X obj 227 461 s \$0-from1-lbl-set; +#X msg 202 570 label \$1; +#X msg 219 506 label \$1; +#X obj 202 591 s \$0-to1-lbl-set; +#X obj 219 527 s \$0-to0-lbl-set; +#X obj 79 50 cnv 5 1 1 empty \$0-from0-lbl-set 34 -3 3 0 10 -262144 +-66577 0; +#X obj 36 62 cnv 5 1 1 empty empty from...| -3 3 0 10 -262144 -66577 +0; +#X obj 79 76 cnv 5 1 1 empty \$0-from1-lbl-set 456.315 -3 3 0 10 -262144 +-66577 0; +#X obj 80 94 cnv 5 1 1 empty \$0-to0-lbl-set 0.0012 -3 3 0 10 -262144 +-66577 0; +#X obj 48 106 cnv 5 1 1 empty empty to...| -3 3 0 10 -262144 -66577 +0; +#X obj 80 120 cnv 5 1 1 empty \$0-to1-lbl-set 0.0016 -3 3 0 10 -262144 +-66577 0; +#X text 199 150 basic map : (val - from[0]) * (to[1] - to[0]) / (from[1] +- from[0]) + to[0]; +#X obj 202 549 sprintf symout %g; +#X obj 234 351 sprintf symout %g; +#X obj 227 419 sprintf symout %g; +#X obj 219 485 sprintf symout %g; +#X connect 0 0 33 0; +#X connect 1 0 10 0; +#X connect 2 0 6 0; +#X connect 3 0 7 0; +#X connect 4 0 8 0; +#X connect 5 0 9 0; +#X connect 10 0 11 0; +#X connect 10 1 2 0; +#X connect 10 2 3 0; +#X connect 10 3 4 0; +#X connect 10 4 5 0; +#X connect 12 0 26 0; +#X connect 13 0 33 1; +#X connect 13 0 14 1; +#X connect 14 0 15 0; +#X connect 15 0 23 0; +#X connect 16 0 20 0; +#X connect 16 0 54 0; +#X connect 17 0 20 1; +#X connect 17 0 57 0; +#X connect 18 0 21 0; +#X connect 18 0 56 0; +#X connect 19 0 21 1; +#X connect 19 0 55 0; +#X connect 20 0 22 0; +#X connect 21 0 22 1; +#X connect 22 0 15 1; +#X connect 23 0 32 0; +#X connect 24 0 23 1; +#X connect 26 0 16 0; +#X connect 26 1 17 0; +#X connect 26 2 18 0; +#X connect 26 3 19 0; +#X connect 27 0 13 0; +#X connect 28 0 24 0; +#X connect 30 0 31 0; +#X connect 31 0 32 1; +#X connect 32 0 25 0; +#X connect 33 0 14 0; +#X connect 35 0 37 0; +#X connect 36 0 6 0; +#X connect 36 1 7 0; +#X connect 36 2 8 0; +#X connect 36 3 9 0; +#X connect 37 0 38 0; +#X connect 37 1 36 0; +#X connect 40 0 39 0; +#X connect 41 0 42 0; +#X connect 43 0 45 0; +#X connect 44 0 46 0; +#X connect 54 0 43 0; +#X connect 55 0 40 0; +#X connect 56 0 41 0; +#X connect 57 0 44 0; +#X coords 0 -1 1 1 120 120 1 20 20; diff --git a/iamyou/map.pd b/iamyou/map.pd new file mode 100644 index 0000000..1e2ca89 --- /dev/null +++ b/iamyou/map.pd @@ -0,0 +1,21 @@ +#N canvas 574 233 430 240 10; +#X obj 33 30 inlet; +#X obj 33 186 outlet; +#X obj 117 90 f \$1; +#X obj 202 90 f \$2; +#X obj 287 90 f \$3; +#X obj 372 90 f \$4; +#X obj 202 31 loadbang; +#X obj 312 32 v val\$0; +#X obj 33 134 expr (val\$0-$f2)*($f5-$f4)/($f3-$f2)+$f4 \; if($f1<$f2 +\, val\$0=$f2 \, if($f1>$f3 \, val\$0=$f3 \, val\$0=$f1)); +#X connect 0 0 8 0; +#X connect 2 0 8 1; +#X connect 3 0 8 2; +#X connect 4 0 8 3; +#X connect 5 0 8 4; +#X connect 6 0 2 0; +#X connect 6 0 5 0; +#X connect 6 0 4 0; +#X connect 6 0 3 0; +#X connect 8 0 1 0; diff --git a/iamyou/map2.pd b/iamyou/map2.pd new file mode 100644 index 0000000..298cd9d --- /dev/null +++ b/iamyou/map2.pd @@ -0,0 +1,74 @@ +#N canvas 308 279 488 481 10; +#X obj 33 100 inlet; +#X obj 292 19 loadbang; +#X obj 307 89 f \$1; +#X obj 323 112 f \$2; +#X obj 339 135 f \$3; +#X obj 355 158 f \$4; +#X obj 307 189 v \$0-from0; +#X obj 323 212 v \$0-from1; +#X obj 339 235 v \$0-to0; +#X obj 355 258 v \$0-to1; +#X obj 292 42 t b b b b b; +#X obj 292 65 bng 15 250 50 0 \$0-apply empty s:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 154 26 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 68 160 v \$0-from0; +#X text 102 411 (val - from[0]) * (to[1] - to[0]) / (from[1] - from[0]) ++ to[0]; +#X obj 33 243 -; +#X obj 33 276 *; +#X obj 154 69 v \$0-to1; +#X obj 171 92 v \$0-to0; +#X obj 188 115 v \$0-from1; +#X obj 205 138 v \$0-from0; +#X obj 154 115 -; +#X obj 188 161 -; +#X obj 154 188 /; +#X obj 33 352 +; +#X obj 48 329 v \$0-to0; +#X obj 33 442 outlet; +#X obj 154 46 t b b b b; +#X obj 68 140 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 48 309 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X text 44 42 basic map; +#X text 399 30 2018 8; +#X obj 68 360 bng 15 250 50 0 empty \$0-apply r:apply! 17 7 0 10 -257985 +-1 -1; +#X obj 68 380 v \$0-to1; +#X text 181 356 (INPUT / OUPUT CAN be bi-directional); +#X text 181 376 NO LIMIT for output (extrapolation)!; +#X connect 0 0 15 0; +#X connect 1 0 10 0; +#X connect 2 0 6 0; +#X connect 3 0 7 0; +#X connect 4 0 8 0; +#X connect 5 0 9 0; +#X connect 10 0 11 0; +#X connect 10 1 2 0; +#X connect 10 2 3 0; +#X connect 10 3 4 0; +#X connect 10 4 5 0; +#X connect 12 0 27 0; +#X connect 13 0 15 1; +#X connect 15 0 16 0; +#X connect 16 0 24 0; +#X connect 17 0 21 0; +#X connect 18 0 21 1; +#X connect 19 0 22 0; +#X connect 20 0 22 1; +#X connect 21 0 23 0; +#X connect 22 0 23 1; +#X connect 23 0 16 1; +#X connect 24 0 26 0; +#X connect 25 0 24 1; +#X connect 27 0 17 0; +#X connect 27 1 18 0; +#X connect 27 2 19 0; +#X connect 27 3 20 0; +#X connect 28 0 13 0; +#X connect 29 0 25 0; +#X connect 32 0 33 0; diff --git a/iamyou/rot2d-help.pd b/iamyou/rot2d-help.pd new file mode 100644 index 0000000..5e1d060 --- /dev/null +++ b/iamyou/rot2d-help.pd @@ -0,0 +1,13 @@ +#N canvas 1 91 450 300 10; +#X obj 138 135 rot2d; +#X msg 241 86 30; +#X msg 58 83 0.5 0.6; +#X obj 138 158 print; +#X msg 148 88 0.5 0.5; +#X text 39 56 1 input pnt.; +#X text 139 56 2 pivot pnt.; +#X text 239 56 3 rotation angle (deg); +#X connect 0 0 3 0; +#X connect 1 0 0 2; +#X connect 2 0 0 0; +#X connect 4 0 0 1; diff --git a/iamyou/rot2d.pd b/iamyou/rot2d.pd new file mode 100644 index 0000000..b6455d1 --- /dev/null +++ b/iamyou/rot2d.pd @@ -0,0 +1,35 @@ +#N canvas 1 91 450 300 10; +#X obj 35 30 inlet; +#X obj 35 53 unpack f f; +#X obj 326 30 inlet; +#X obj 326 76 * 6.28319; +#X obj 326 53 / 360; +#X text 279 223 px = x * cs - y * sn \; py = x * sn + y * cs \;; +#X obj 35 184 pack f f; +#X obj 35 207 outlet; +#X obj 180 30 inlet; +#X obj 180 53 unpack f f; +#X text 29 6 1 input pnt.; +#X text 129 6 2 pivot pnt.; +#X text 229 6 3 rotation angle (deg); +#X obj 35 112 expr (($f1-$f3)*cos($f5)-($f2-$f4)*sin($f5))+$f3 \; (($f1-$f3)*sin($f5)+($f2-$f4)*cos($f5))+$f4 +; +#X obj 124 206 loadbang; +#X msg 124 229 0.5 0.5; +#X obj 124 252 unpack f f; +#X connect 0 0 1 0; +#X connect 1 0 13 0; +#X connect 1 1 13 1; +#X connect 2 0 4 0; +#X connect 3 0 13 4; +#X connect 4 0 3 0; +#X connect 6 0 7 0; +#X connect 8 0 9 0; +#X connect 9 0 13 2; +#X connect 9 1 13 3; +#X connect 13 0 6 0; +#X connect 13 1 6 1; +#X connect 14 0 15 0; +#X connect 15 0 16 0; +#X connect 16 0 13 2; +#X connect 16 1 13 3; diff --git a/iamyou/scan-help.pd b/iamyou/scan-help.pd new file mode 100644 index 0000000..60b157b --- /dev/null +++ b/iamyou/scan-help.pd @@ -0,0 +1,20 @@ +#N canvas 630 384 450 300 12; +#X floatatom 120 194 5 0 0 0 - - -; +#X obj 120 224 print; +#X floatatom 120 73 5 0 0 1 scan_target - -; +#X msg 120 48 100; +#X floatatom 193 144 5 0 0 1 delay_amount_(ms) - -; +#X obj 120 163 scan 100; +#X msg 140 109 0; +#X text 174 109 if <= 0 \, stop immediately; +#X obj 173 198 bng 15 250 50 0 empty empty done! 17 7 0 10 -262144 +-1 -1; +#X obj 173 224 print done; +#X connect 0 0 1 0; +#X connect 2 0 5 0; +#X connect 3 0 2 0; +#X connect 4 0 5 1; +#X connect 5 0 0 0; +#X connect 5 1 8 0; +#X connect 6 0 5 0; +#X connect 8 0 9 0; diff --git a/iamyou/scan.pd b/iamyou/scan.pd new file mode 100644 index 0000000..5bd2316 --- /dev/null +++ b/iamyou/scan.pd @@ -0,0 +1,58 @@ +#N canvas 136 328 385 426 12; +#X obj 120 295 f; +#X obj 84 295 + 1; +#X obj 218 270 sel 1; +#X msg 138 270 0; +#X obj 218 245 ==; +#X obj 236 195 - 1; +#X obj 39 71 inlet; +#X msg 179 215 0; +#X msg 106 214 1; +#X obj 106 245 metro \$1; +#X obj 106 155 t b b a; +#X msg 39 215 0; +#X obj 236 220 max 0; +#X text 5 4 <<<; +#X text 345 4 >>>; +#X text 5 394 <<<; +#X text 345 394 >>>; +#X text 39 22 generate numbers from 0 to given (inlet-1); +#X text 39 38 argument: delay amount (ms) between counts; +#X text 84 72 1-command:; +#X text 124 88 - number-> target value; +#X obj 169 134 inlet; +#X text 211 134 2-delay amount (ms); +#X text 124 102 - if <= 0 \, stop immediately; +#X obj 39 125 moses 1; +#X obj 278 315 outlet; +#X text 278 294 2#end bng; +#X msg 39 240 bang; +#X obj 120 320 t a a; +#X floatatom 152 345 5 0 0 0 - - -; +#X obj 152 369 outlet; +#X text 202 369 1#values; +#X connect 0 0 1 0; +#X connect 0 0 28 0; +#X connect 1 0 0 1; +#X connect 2 0 7 0; +#X connect 2 0 25 0; +#X connect 3 0 0 1; +#X connect 4 0 2 0; +#X connect 5 0 12 0; +#X connect 6 0 24 0; +#X connect 7 0 9 0; +#X connect 8 0 9 0; +#X connect 9 0 0 0; +#X connect 10 0 8 0; +#X connect 10 1 3 0; +#X connect 10 2 5 0; +#X connect 11 0 9 0; +#X connect 11 0 27 0; +#X connect 12 0 4 1; +#X connect 21 0 9 1; +#X connect 24 0 11 0; +#X connect 24 1 10 0; +#X connect 27 0 25 0; +#X connect 28 0 4 0; +#X connect 28 1 29 0; +#X connect 29 0 30 0; diff --git a/iamyou/tofloat.pd b/iamyou/tofloat.pd new file mode 100644 index 0000000..d227350 --- /dev/null +++ b/iamyou/tofloat.pd @@ -0,0 +1,87 @@ +#N canvas 595 91 554 605 10; +#X obj 105 103 list fromsymbol; +#X obj 71 185 list store; +#X obj 105 126 list prepend append; +#X obj 105 149 list trim; +#X obj 105 80 list; +#X obj 71 231 list length; +#X obj 71 323 list split 1; +#X obj 71 300 list; +#X obj 71 208 t l l; +#X obj 71 277 until; +#X obj 362 145 v sign\$0; +#X obj 362 268 v itgr\$0; +#X obj 362 291 v frac\$0; +#X obj 362 245 v isfrac\$0; +#X msg 169 362 -1; +#X msg 332 245 0; +#X obj 362 168 v nfrac\$0; +#X msg 332 145 1; +#X obj 71 254 + 1; +#X obj 71 49 t b b a b; +#X obj 84 546 spigot; +#X obj 47 454 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 164 546 spigot; +#X obj 87 454 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 +1; +#X obj 20 392 t b b; +#X msg 47 415 1; +#X obj 71 20 inlet; +#X obj 84 569 outlet; +#X obj 164 569 outlet; +#X obj 332 119 bng 15 250 50 0 empty \$0-init r:0-init 17 7 0 10 -262144 +-1 -1; +#X obj 30 112 bng 15 250 50 0 \$0-init empty s:0-init 17 7 0 10 -262144 +-1 -1; +#X obj 332 219 bng 15 250 50 0 empty \$0-init r:0-init 17 7 0 10 -262144 +-1 -1; +#X obj 87 395 bng 15 250 50 0 empty \$0-init r:0-init 17 7 0 10 -262144 +-1 -1; +#X msg 87 415 0; +#X obj 169 391 expr if($i1==-1 \, sign\$0*itgr\$0 \, 0) \; if($i1==-1 +\, sign\$0*frac\$0*nfrac\$0 \, 0) \; if($i1==46 \, isfrac\$0=1 \, 0) +\; if(isfrac\$0==1 \, nfrac\$0=nfrac\$0/10 \, 0) \; if($i1 >= 48 \, +if($i1 <= 57 \, if(isfrac\$0==0 \, itgr\$0=itgr\$0*10+($i1-48) \, frac\$0=frac\$0*10+($i1-48)) +\, 0) \, 0) \; if($i1==45 \, sign\$0=-1 \, 0) \; if($i1==-1 \, isfrac\$0=0 +\, 0); +#X connect 0 0 2 0; +#X connect 1 0 8 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 0 0; +#X connect 5 0 18 0; +#X connect 6 0 34 0; +#X connect 6 1 7 1; +#X connect 6 2 24 0; +#X connect 7 0 6 0; +#X connect 8 0 5 0; +#X connect 8 1 7 1; +#X connect 9 0 7 0; +#X connect 14 0 34 0; +#X connect 15 0 12 0; +#X connect 15 0 11 0; +#X connect 15 0 13 0; +#X connect 17 0 16 0; +#X connect 17 0 10 0; +#X connect 18 0 9 0; +#X connect 19 0 1 0; +#X connect 19 1 30 0; +#X connect 19 2 4 0; +#X connect 19 3 1 1; +#X connect 20 0 27 0; +#X connect 21 0 20 1; +#X connect 22 0 28 0; +#X connect 23 0 22 1; +#X connect 24 0 14 0; +#X connect 24 1 25 0; +#X connect 25 0 23 0; +#X connect 25 0 21 0; +#X connect 26 0 19 0; +#X connect 29 0 17 0; +#X connect 31 0 15 0; +#X connect 32 0 33 0; +#X connect 33 0 23 0; +#X connect 33 0 21 0; +#X connect 34 0 20 0; +#X connect 34 1 22 0; diff --git a/iamyou/wav2~-help.pd b/iamyou/wav2~-help.pd new file mode 100644 index 0000000..dba8b32 --- /dev/null +++ b/iamyou/wav2~-help.pd @@ -0,0 +1,67 @@ +#N canvas 372 89 905 708 10; +#X text 182 94 good; +#X text 632 94 bad; +#X obj 102 516 env~; +#X floatatom 102 544 5 0 0 0 - - -, f 5; +#X text 117 571 don't forget to switch 'dsp' on.; +#X text 146 522 (3) audio output; +#X msg 602 244 bang; +#X obj 613 268 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 638 270 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 584 222 nonexist.wav; +#X floatatom 646 294 5 0 0 0 - - -, f 5; +#X text 614 410 ERRORS...; +#X text 780 683 dianaband; +#X text 780 703 2016; +#X text 111 137 (1) sound filename! (wav/aiff); +#X floatatom 162 342 5 0 0 0 - - -, f 5; +#X msg 135 255 1; +#X msg 145 282 0; +#X obj 155 314 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 165 373 -1; +#X msg 103 165 somesound.wav; +#X text 206 340 effect!; +#X text 201 373 reverse-playback; +#X text 134 225 (2) play! - by playback speed.; +#X text 180 254 play.; +#X text 188 283 pause.; +#X text 183 311 play/pause toggle.; +#X floatatom 667 339 5 0 0 3 if_u_do_this_before_loading.. - -, f +5; +#X obj 170 442 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 174 465 (4) rewind sound file \; (back to the starting position) +; +#X obj 55 512 dac~; +#X obj 103 476 wav2~; +#X obj 105 687 wav2~; +#X msg 127 625 0; +#X obj 127 647 t b a; +#X text 183 626 stop (pause and rewind); +#X obj 602 365 wav2~; +#X text 14 12 NOTE!! filename will be searched relative to 'wav~' patch's +location. so copy and keep it nearby to the main patch. e.g. the very +same folder or ./lib/ and use ../data/*.wav etc.; +#X connect 2 0 3 0; +#X connect 6 0 36 0; +#X connect 7 0 36 0; +#X connect 8 0 36 0; +#X connect 9 0 36 0; +#X connect 10 0 36 0; +#X connect 15 0 31 1; +#X connect 16 0 31 1; +#X connect 17 0 31 1; +#X connect 18 0 31 1; +#X connect 19 0 31 1; +#X connect 20 0 31 0; +#X connect 27 0 36 1; +#X connect 28 0 31 2; +#X connect 31 0 2 0; +#X connect 31 0 30 0; +#X connect 31 0 30 1; +#X connect 33 0 34 0; +#X connect 34 0 32 2; +#X connect 34 1 32 1; diff --git a/iamyou/wav2~.pd b/iamyou/wav2~.pd new file mode 100644 index 0000000..4b9f396 --- /dev/null +++ b/iamyou/wav2~.pd @@ -0,0 +1,171 @@ +#N canvas 397 89 770 708 10; +#X obj 277 300 table \$0-sound 8820; +#X obj 41 402 soundfiler; +#X obj 164 182 f \$0; +#X obj 164 160 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 41 182 list append; +#X msg 41 160 read -resize; +#X msg 41 270 read -resize somesound.wav; +#X obj 41 204 list prepend set; +#X obj 41 226 list trim; +#X obj 41 138 t b a; +#X obj 41 292 list append; +#X msg 41 380 read -resize somesound.wav 1005-sound; +#X obj 41 314 list prepend set; +#X obj 41 336 list trim; +#X obj 41 248 t b a; +#X obj 41 358 t b a; +#X obj 164 138 loadbang; +#X text 636 621 dianaband; +#X obj 54 52 inlet; +#X msg 164 204 \$1-sound; +#X text 39 24 (1) filename; +#X obj 41 424 sel 0; +#X obj 41 106 t a a; +#X obj 290 626 print [wav~]; +#X msg 64 496 error: cannot load the file!; +#X obj 370 472 samplerate~; +#X obj 351 494 /; +#X text 3 -26 .anchor.; +#X msg 351 516 length: \$1 seconds; +#X msg 333 538 samples: \$1 ea; +#X text 279 270 sound loads to ...; +#X text 327 601 messages to post ...; +#X obj 482 102 inlet; +#X obj 434 182 sel 0; +#X msg 192 74 error: file should be loaded first!!; +#X text 571 397 [1] audio; +#X text 636 641 2016; +#X text 692 681 .anchor.; +#X msg 108 106 error: file name should be a string!!; +#X obj 54 74 route float bang; +#X obj 250 196 list prepend; +#X msg 331 174 loading:; +#X obj 331 152 loadbang; +#X obj 250 218 list trim; +#X obj 87 518 f \$0; +#X msg 87 540 \; \$1-sound resize 1 \; \$1-sound 0 0 \;; +#X obj 577 470 loadbang; +#X msg 577 492 0; +#X msg 41 608 0; +#X msg 73 608 1; +#X obj 73 446 t b a; +#X obj 41 474 t b b b; +#X text 580 444 loaded? check.; +#X floatatom 126 419 5 0 0 1 s:0-samples - #0-samples, f 5; +#X obj 577 514 v \$0-is-loaded; +#X obj 514 146 v \$0-is-loaded; +#X obj 41 636 v \$0-is-loaded; +#X floatatom 514 168 5 0 0 0 - - -, f 5; +#X obj 572 304 phasor~; +#X obj 572 326 *~; +#X floatatom 572 285 5 0 0 0 - - -, f 5; +#X obj 604 246 v \$0-playspeed_x1; +#X obj 572 263 *; +#X obj 572 224 t a b; +#X text 340 354 info. msg. / playback speed; +#X obj 333 383 t a a b b a; +#X obj 388 406 samplerate~; +#X obj 388 428 /; +#X obj 572 370 outlet~; +#X floatatom 642 312 5 0 0 2 r:0-samples #0-samples -, f 5; +#X obj 388 450 v \$0-playspeed_x1; +#X obj 577 540 loadbang; +#X msg 577 562 0; +#X obj 577 584 v \$0-playspeed_x1; +#X text 481 74 (2) play speed : 1 for x1; +#X obj 482 124 t a b; +#X obj 482 207 spigot; +#X obj 521 187 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 572 348 tabread~ \$0-sound; +#X text 649 123 (3) rewind!; +#X obj 652 148 inlet; +#X msg 652 190 0; +#X obj 652 170 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 318 14 NOTE!! filename will be searched relative to THIS patch's +location. so copy and keep it nearby to the main patch. e.g. the very +same folder or ./lib/ and use ../data/*.wav etc.; +#X connect 1 0 21 0; +#X connect 1 0 53 0; +#X connect 2 0 19 0; +#X connect 3 0 2 0; +#X connect 4 0 7 0; +#X connect 5 0 4 0; +#X connect 6 0 10 0; +#X connect 7 0 8 0; +#X connect 8 0 14 0; +#X connect 9 0 5 0; +#X connect 9 1 4 1; +#X connect 10 0 12 0; +#X connect 11 0 1 0; +#X connect 12 0 13 0; +#X connect 13 0 15 0; +#X connect 14 0 6 0; +#X connect 14 1 6 0; +#X connect 15 0 11 0; +#X connect 15 1 11 0; +#X connect 16 0 3 0; +#X connect 18 0 39 0; +#X connect 19 0 10 1; +#X connect 21 0 51 0; +#X connect 21 1 50 0; +#X connect 22 0 9 0; +#X connect 22 1 40 0; +#X connect 24 0 23 0; +#X connect 25 0 26 1; +#X connect 26 0 28 0; +#X connect 28 0 23 0; +#X connect 29 0 23 0; +#X connect 32 0 75 0; +#X connect 33 0 34 0; +#X connect 34 0 23 0; +#X connect 38 0 23 0; +#X connect 39 0 38 0; +#X connect 39 1 38 0; +#X connect 39 2 22 0; +#X connect 40 0 43 0; +#X connect 41 0 40 1; +#X connect 42 0 41 0; +#X connect 43 0 23 0; +#X connect 44 0 45 0; +#X connect 46 0 47 0; +#X connect 47 0 54 0; +#X connect 48 0 56 0; +#X connect 49 0 56 0; +#X connect 50 0 49 0; +#X connect 50 1 65 0; +#X connect 51 0 48 0; +#X connect 51 1 24 0; +#X connect 51 2 44 0; +#X connect 55 0 57 0; +#X connect 57 0 33 0; +#X connect 57 0 77 0; +#X connect 58 0 59 0; +#X connect 59 0 78 0; +#X connect 60 0 58 0; +#X connect 61 0 62 1; +#X connect 62 0 60 0; +#X connect 63 0 62 0; +#X connect 63 1 61 0; +#X connect 65 0 29 0; +#X connect 65 1 26 0; +#X connect 65 2 25 0; +#X connect 65 3 66 0; +#X connect 65 4 67 1; +#X connect 66 0 67 0; +#X connect 67 0 70 0; +#X connect 69 0 59 1; +#X connect 71 0 72 0; +#X connect 72 0 73 0; +#X connect 75 0 76 0; +#X connect 75 1 55 0; +#X connect 76 0 63 0; +#X connect 77 0 76 1; +#X connect 78 0 68 0; +#X connect 80 0 82 0; +#X connect 81 0 58 1; +#X connect 82 0 81 0; +#X coords 0 708 1 707 170 60 0; diff --git a/iamyou/wav~-help.pd b/iamyou/wav~-help.pd new file mode 100644 index 0000000..17598c0 --- /dev/null +++ b/iamyou/wav~-help.pd @@ -0,0 +1,70 @@ +#N canvas 431 89 846 708 10; +#X text 182 94 good; +#X text 579 94 bad; +#X obj 128 250 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 102 376 env~; +#X floatatom 102 404 5 0 0 0 - - -, f 5; +#X obj 159 303 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X msg 103 165 somesound.wav; +#X text 134 225 (2) play!; +#X text 117 431 don't forget to switch 'dsp' on.; +#X text 146 382 (3) audio output; +#X text 180 318 (4) play 'done' signal.; +#X obj 152 532 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 183 585 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 124 497 how to make a LOOPING...; +#X text 113 614 when it 's done \, it will self-trigger.; +#X obj 152 676 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 183 729 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 135 640 how to stop then?; +#X obj 183 751 spigot; +#X obj 222 729 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X msg 549 244 bang; +#X obj 560 268 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 585 270 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 +1; +#X obj 615 338 bng 15 250 50 0 empty empty if_u_do_this_before_loading.. +17 7 0 10 -262144 -1 -1; +#X msg 531 222 nonexist.wav; +#X floatatom 593 294 5 0 0 0 - - -, f 5; +#X text 561 410 ERRORS...; +#X text 646 713 dianaband; +#X text 646 733 2016; +#X obj 103 286 wav~; +#X obj 127 568 wav~; +#X obj 127 712 wav~; +#X obj 549 365 wav~; +#X text 111 137 (1) sound filename! (wav/aiff); +#X obj 57 322 dac~; +#X text 14 12 NOTE!! filename will be searched relative to 'wav~' patch's +location. so copy and keep it nearby to the main patch. e.g. the very +same folder or ./lib/ and use ../data/*.wav etc.; +#X connect 2 0 29 1; +#X connect 3 0 4 0; +#X connect 6 0 29 0; +#X connect 11 0 30 1; +#X connect 12 0 11 0; +#X connect 15 0 31 1; +#X connect 16 0 18 0; +#X connect 18 0 15 0; +#X connect 19 0 18 1; +#X connect 20 0 32 0; +#X connect 21 0 32 0; +#X connect 22 0 32 0; +#X connect 23 0 32 1; +#X connect 24 0 32 0; +#X connect 25 0 32 0; +#X connect 29 0 3 0; +#X connect 29 0 34 0; +#X connect 29 0 34 1; +#X connect 29 1 5 0; +#X connect 30 1 12 0; +#X connect 31 1 16 0; diff --git a/iamyou/wav~.pd b/iamyou/wav~.pd new file mode 100644 index 0000000..4e63306 --- /dev/null +++ b/iamyou/wav~.pd @@ -0,0 +1,136 @@ +#N canvas 506 89 771 708 10; +#X obj 317 310 table \$0-sound 8820; +#X obj 41 402 soundfiler; +#X obj 164 182 f \$0; +#X obj 164 160 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X obj 514 327 outlet~; +#X obj 41 182 list append; +#X msg 41 160 read -resize; +#X msg 41 270 read -resize somesound.wav; +#X obj 41 204 list prepend set; +#X obj 41 226 list trim; +#X obj 41 138 t b a; +#X obj 41 292 list append; +#X msg 41 380 read -resize somesound.wav 1005-sound; +#X obj 41 314 list prepend set; +#X obj 41 336 list trim; +#X obj 41 248 t b a; +#X obj 41 358 t b a; +#X obj 164 138 loadbang; +#X text 636 581 dianaband; +#X obj 54 52 inlet; +#X obj 630 327 outlet; +#X msg 164 204 \$1-sound; +#X text 39 24 (1) filename; +#X obj 41 424 sel 0; +#X obj 41 106 t a a; +#X obj 280 636 print [wav~]; +#X msg 64 496 error: cannot load the file!; +#X obj 369 485 samplerate~; +#X obj 346 507 /; +#X text 3 -26 .anchor.; +#X msg 346 529 length: \$1 seconds; +#X msg 323 551 samples: \$1 ea; +#X obj 482 166 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 +-1 -1; +#X text 319 280 sound loads to ...; +#X text 317 611 messages to post ...; +#X obj 482 122 inlet; +#X text 481 94 (2) play start!; +#X obj 482 245 sel 0; +#X msg 192 74 error: file should be loaded first!!; +#X obj 514 267 t b; +#X text 510 351 [1] audio; +#X text 630 351 [2] play-done; +#X text 636 601 2016; +#X text 692 681 .anchor.; +#X msg 108 106 error: file name should be a string!!; +#X obj 54 74 route float bang; +#X obj 250 196 list prepend; +#X msg 331 174 loading:; +#X obj 331 152 loadbang; +#X obj 250 218 list trim; +#X obj 514 289 tabplay~ \$0-sound; +#X obj 323 463 t a a b; +#X text 382 447 info. msg.; +#X obj 87 518 f \$0; +#X msg 87 540 \; \$1-sound resize 1 \; \$1-sound 0 0 \;; +#X obj 577 430 loadbang; +#X msg 577 452 0; +#X msg 41 608 0; +#X msg 73 608 1; +#X obj 73 446 t b a; +#X obj 41 474 t b b b; +#X text 580 404 loaded? check.; +#X floatatom 126 419 5 0 0 1 samples - -, f 5; +#X obj 577 474 v \$0-is-loaded; +#X obj 482 192 v \$0-is-loaded; +#X obj 41 636 v \$0-is-loaded; +#X floatatom 482 220 5 0 0 0 - - -, f 5; +#X text 318 14 NOTE!! filename will be searched relative to THIS patch's +location. so copy and keep it nearby to the main patch. e.g. the very +same folder or ./lib/ and use ../data/*.wav etc.; +#X connect 1 0 23 0; +#X connect 1 0 62 0; +#X connect 2 0 21 0; +#X connect 3 0 2 0; +#X connect 5 0 8 0; +#X connect 6 0 5 0; +#X connect 7 0 11 0; +#X connect 8 0 9 0; +#X connect 9 0 15 0; +#X connect 10 0 6 0; +#X connect 10 1 5 1; +#X connect 11 0 13 0; +#X connect 12 0 1 0; +#X connect 13 0 14 0; +#X connect 14 0 16 0; +#X connect 15 0 7 0; +#X connect 15 1 7 0; +#X connect 16 0 12 0; +#X connect 16 1 12 0; +#X connect 17 0 3 0; +#X connect 19 0 45 0; +#X connect 21 0 11 1; +#X connect 23 0 60 0; +#X connect 23 1 59 0; +#X connect 24 0 10 0; +#X connect 24 1 46 0; +#X connect 26 0 25 0; +#X connect 27 0 28 1; +#X connect 28 0 30 0; +#X connect 30 0 25 0; +#X connect 31 0 25 0; +#X connect 32 0 64 0; +#X connect 35 0 32 0; +#X connect 37 0 38 0; +#X connect 37 1 39 0; +#X connect 38 0 25 0; +#X connect 39 0 50 0; +#X connect 44 0 25 0; +#X connect 45 0 44 0; +#X connect 45 1 44 0; +#X connect 45 2 24 0; +#X connect 46 0 49 0; +#X connect 47 0 46 1; +#X connect 48 0 47 0; +#X connect 49 0 25 0; +#X connect 50 0 4 0; +#X connect 50 1 20 0; +#X connect 51 0 31 0; +#X connect 51 1 28 0; +#X connect 51 2 27 0; +#X connect 53 0 54 0; +#X connect 55 0 56 0; +#X connect 56 0 63 0; +#X connect 57 0 65 0; +#X connect 58 0 65 0; +#X connect 59 0 58 0; +#X connect 59 1 51 0; +#X connect 60 0 57 0; +#X connect 60 1 26 0; +#X connect 60 2 53 0; +#X connect 64 0 66 0; +#X connect 66 0 37 0; +#X coords 0 708 1 707 170 60 0;