Commit dd5ac2e7 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

ported: "added rjlib to the base install to support added K12 functionality"

from pd-l2ork: 640d3c53ad8cd592b1d757b988e27d3ada2b1779
parent 0a96788c
#! /usr/bin/make
# available targets:
# clean: clean everything
# all: compile objective-c application
# package: prepare a zip file of the app
# upload: upload app to a phone
#
# use "make upload IPHONE=<iphone_ip>" to build and upload to device
# name of the application
TRG=RjDj
# version
VER=0.5
# ip of the phone to install it to
IPHONE?=192.168.1.36
# user name to upload with
IPHONE_USER=mobile
SCENE_LOC=/var/mobile/Applications/RJ/rjlib
RSYNC=rsync
RSYNC_OPTS=-av --delete-after --exclude .svn
upload:
$(RSYNC) $(RSYNC_OPTS) ./ $(IPHONE_USER)@$(IPHONE):$(SCENE_LOC) || echo "make sure rsync is installed on the phone"
Global messages from rjlib:
1) receiver "accelerate",
module accelerate.pd
- magnitude float: gives the magnitude of an accelerator motion
- pitch float: the pitch
- roll float: the roll
- x float: raw x value
- y float: raw y value
- z loat: raw z value
2) receiver "touch" ??? TODO: document
module touch.pd
- tap float:
- speed1.delta.1 float
- speed2.delta.2 float
- speed float float
3) receiver analyse
module analysepitch.pd
- pitch float: a pitch value when a pitched sound is detected
- continuouspitch float: always delivers a pitch
- onset bang: bang if an onset is detected
module analysesimpleonset.pd
configuration: onset_threshold float: default value 10
- simpleonset bang: cheap, basic onset detector
#N canvas 840 189 600 492 12;
#X obj 66 95 inlet~;
#X obj 130 96 inlet~;
#X obj 68 216 outlet~;
#X obj 141 215 outlet~;
#X obj 67 143 +~;
#X obj 140 141 -~;
#X obj 141 165 delwrite~ \$1 \$2;
#X obj 140 191 delread~ \$1 \$2;
#X text 48 14 This appears as an abstraction in patch G08.reverb.pd
;
#X text 27 267 This network makes two copies of the (stereo) input
\, one in phase \, the other out of phase and delayed. The total frequency
response is flat. The total signal power out is exactly twice that
of the input \, no matter what freqiencies the input contains. This
is used to increase echo density \, by stacking several of these units
with different delay times. Each stage doubles the echo density.;
#X connect 0 0 4 0;
#X connect 0 0 5 0;
#X connect 1 0 4 1;
#X connect 1 0 5 1;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 7 0 3 0;
#N canvas 537 40 360 283 10;
#N canvas 79 298 269 329 magnitude 0;
#X obj 14 17 r #accelerate;
#X obj 14 48 unpack f f f;
#X obj 14 108 *;
#X obj 76 108 *;
#X obj 135 108 *;
#X obj 14 138 +;
#X obj 14 168 +;
#X obj 14 198 pow 0.5;
#X obj 14 258 s accelerate;
#X msg 14 228 magnitude \$1;
#X msg 14 78 \$1 \$1;
#X msg 76 78 \$1 \$1;
#X msg 135 78 \$1 \$1;
#X connect 0 0 1 0;
#X connect 1 0 10 0;
#X connect 1 1 11 0;
#X connect 1 2 12 0;
#X connect 2 0 5 0;
#X connect 3 0 5 1;
#X connect 4 0 6 1;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 7 0 9 0;
#X connect 9 0 8 0;
#X connect 10 0 2 0;
#X connect 11 0 3 0;
#X connect 12 0 4 0;
#X restore 16 22 pd magnitude;
#N canvas 123 87 366 291 pitch 0;
#X obj 31 25 r #accelerate;
#X obj 31 205 s accelerate;
#X obj 31 85 /;
#X obj 31 115 atan;
#X msg 31 175 pitch \$1;
#X obj 31 145 * -1;
#X obj 31 55 list split 1;
#X connect 0 0 6 0;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 1 0;
#X connect 5 0 4 0;
#X connect 6 1 2 0;
#X restore 16 52 pd pitch;
#N canvas 256 44 307 244 roll 0;
#X obj 14 17 r #accelerate;
#X obj 14 47 unpack f f f;
#X obj 14 167 s accelerate;
#X msg 14 137 roll \$1;
#X obj 14 77 /;
#X obj 14 107 atan;
#X connect 0 0 1 0;
#X connect 1 0 4 0;
#X connect 1 2 4 1;
#X connect 3 0 2 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X restore 16 82 pd roll;
#X text 16 187 Author: Roman Haefeli;
#N canvas 166 94 327 239 x_y_z 0;
#X obj 14 17 r #accelerate;
#X obj 14 77 s accelerate;
#X msg 14 47 x \$1 \, y \$2 \, z \$3;
#X connect 0 0 2 0;
#X connect 2 0 1 0;
#X restore 16 112 pd x_y_z;
#X text 15 168 Version: 2008-07-14;
#N canvas 0 22 223 279 status 0;
#X obj 14 17 r #accelerate;
#X obj 14 77 f 150;
#X obj 14 107 del;
#X obj 14 167 change;
#X obj 14 47 t b b;
#X msg 14 197 status \$1;
#X obj 14 227 s accelerate;
#X obj 104 117 f 1;
#X obj 14 137 f 0;
#X connect 0 0 4 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 3 0 5 0;
#X connect 4 0 1 0;
#X connect 4 1 7 0;
#X connect 5 0 6 0;
#X connect 7 0 3 0;
#X connect 8 0 3 0;
#X restore 16 142 pd status;
#X text 16 207 Revision: 2008-09-19 eerne: minor enhancement;
#X text 16 227 2008-09-20 eerne: added status;
#N canvas 486 22 450 300 10;
#X obj 119 128 fiddle~;
#X obj 153 263 s analyse;
#X obj 119 65 adc~;
#X floatatom 43 235 5 0 0 0 - - -;
#X msg 92 202 pitch \$1;
#X msg 263 201 continuouspitch \$1;
#X msg 169 202 onset bang;
#X obj 264 178 unpack;
#X obj 169 64 r inputvolume;
#X obj 120 99 *~ 1;
#X connect 0 0 4 0;
#X connect 0 0 3 0;
#X connect 0 1 6 0;
#X connect 0 2 7 0;
#X connect 2 0 9 0;
#X connect 2 1 9 0;
#X connect 4 0 1 0;
#X connect 5 0 1 0;
#X connect 6 0 1 0;
#X connect 7 0 5 0;
#X connect 8 0 9 1;
#X connect 9 0 0 0;
#N canvas 270 63 551 550 10;
#X obj 96 61 adc~;
#X obj 97 121 env~;
#X obj 152 62 inlet;
#X obj 203 63 r onset_threshold;
#X obj 167 268 change;
#X obj 167 290 sel 1;
#X obj 167 389 s analyse;
#X floatatom 180 153 5 0 0 0 - - -;
#X obj 97 182 -;
#X obj 97 159 t f f;
#X obj 125 339 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 70 213 t f f;
#X obj 79 268 spigot;
#X obj 168 328 float;
#X msg 168 362 simpleonset \$1;
#X obj 103 236 > 3;
#X connect 0 0 1 0;
#X connect 0 1 1 0;
#X connect 1 0 7 0;
#X connect 1 0 9 0;
#X connect 2 0 15 1;
#X connect 3 0 15 1;
#X connect 4 0 5 0;
#X connect 5 0 10 0;
#X connect 5 0 13 0;
#X connect 8 0 11 0;
#X connect 9 0 8 1;
#X connect 9 1 8 0;
#X connect 11 0 12 0;
#X connect 11 1 15 0;
#X connect 12 0 13 1;
#X connect 13 0 14 0;
#X connect 14 0 6 0;
#X connect 15 0 4 0;
#X connect 15 0 12 1;
#N canvas 269 0 593 306 12;
#X obj 105 92 biquad~ 0.83774 -0.06338 0.06338 -0.83774 1;
#X obj 105 66 biquad~ 1.94632 -0.94657 0.94657 -1.94632 1;
#X obj 86 149 biquad~ -0.02569 0.260502 -0.260502 0.02569 1;
#X obj 86 175 biquad~ 1.8685 -0.870686 0.870686 -1.8685 1;
#X obj 86 39 inlet~;
#X obj 105 121 outlet~;
#X obj 86 202 outlet~;
#X text 34 232 This is a pair of 4th-order all-pass filters whose outputs
somehow manage to be about 90 degrees out of phase from each other.
Both have different phases from the original. Adapted from a 4X patch
by Emmanuel Favreau \, circa 1982;
#X obj 502 39 inlet;
#X text 461 13 bang to clear;
#X text 80 16 signal in;
#X msg 502 112 clear;
#X connect 0 0 5 0;
#X connect 1 0 0 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 4 0 1 0;
#X connect 4 0 2 0;
#X connect 8 0 11 0;
#X connect 11 0 1 0;
#X connect 11 0 0 0;
#X connect 11 0 2 0;
#X connect 11 0 3 0;
#N canvas 461 160 618 519 10;
#X obj 19 103 readsf~ 2;
#X msg 19 79 open \$1 \, 1;
#X obj 19 57 symbol;
#X obj 20 7 r #transport;
#X obj 19 30 route playback;
#X obj 19 132 soundoutput;
#X connect 0 0 5 0;
#X connect 0 1 5 1;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#N canvas 512 221 504 404 10;
#X obj 184 376 writesf~ 2;
#X obj 144 16 r #transport;
#X obj 156 127 route scene;
#X floatatom 48 209 5 0 0 0 - - -;
#X obj 48 188 random 30000;
#X obj 49 135 route record;
#X obj 48 166 sel 1;
#X msg 72 285 open \$1 \, start;
#X msg 143 310 stop;
#X obj 199 323 catch~ rec1;
#X obj 286 323 catch~ rec2;
#X obj 69 375 print;
#X msg 159 199 set \$1_%d.wav;
#X obj 159 150 symbol;
#X obj 158 179 makefilename %s;
#X obj 72 234 makefilename record_%d.wav;
#X connect 1 0 2 0;
#X connect 1 0 5 0;
#X connect 2 0 13 0;
#X connect 3 0 15 0;
#X connect 4 0 3 0;
#X connect 5 0 6 0;
#X connect 5 1 8 0;
#X connect 6 0 4 0;
#X connect 7 0 0 0;
#X connect 7 0 11 0;
#X connect 8 0 0 0;
#X connect 8 0 11 0;
#X connect 9 0 0 0;
#X connect 10 0 0 1;
#X connect 12 0 11 0;
#X connect 12 0 15 0;
#X connect 13 0 14 0;
#X connect 14 0 12 0;
#X connect 15 0 7 0;
#N canvas 390 121 790 517 10;
#X obj 91 17 inlet~;
#X obj 344 225 +~;
#X obj 386 225 +~;
#X obj 615 453 outlet~;
#X obj 685 453 outlet~;
#X obj 305 288 +~;
#X obj 414 289 +~;
#X obj 347 288 -~;
#X obj 454 288 -~;
#X obj 305 327 +~;
#X obj 349 328 +~;
#X obj 393 329 -~;
#X obj 432 329 -~;
#X obj 680 172 inlet;
#X obj 680 244 / 200;
#X obj 680 196 min 100;
#X obj 680 219 max 0;
#X obj 306 465 delwrite~ loop-del1 60;
#X obj 351 443 delwrite~ loop-del2 71.9345;
#X obj 432 397 delwrite~ loop-del4 95.945;
#X obj 365 164 delread~ loop-del1 60;
#X obj 407 189 delread~ loop-del2 71.9345;
#X obj 475 243 delread~ loop-del4 95.945;
#X obj 453 218 delread~ loop-del3 86.7545;
#X obj 393 420 delwrite~ loop-del3 86.7545;
#X obj 91 41 abs/reverb-echo echo-del1 5.43216;
#X obj 91 65 abs/reverb-echo echo-del2 8.45346;
#X obj 91 89 abs/reverb-echo echo-del3 13.4367;
#X obj 91 113 abs/reverb-echo echo-del4 21.5463;
#X obj 91 137 abs/reverb-echo echo-del5 34.3876;
#X obj 91 161 abs/reverb-echo echo-del6 55.5437;
#X obj 305 354 *~ \$1;
#X obj 350 355 *~ \$1;
#X obj 392 356 *~ \$1;
#X obj 433 357 *~ \$1;
#X obj 746 174 inlet;
#X obj 746 198 min 100;
#X obj 746 221 max 0;
#X obj 706 364 / 100;
#X obj 709 403 *~ \$2;
#X obj 652 393 *~ \$2;
#X connect 0 0 25 0;
#X connect 0 0 3 0;
#X connect 0 0 4 0;
#X connect 1 0 5 0;
#X connect 1 0 7 0;
#X connect 1 0 40 0;
#X connect 2 0 5 1;
#X connect 2 0 7 1;
#X connect 2 0 39 0;
#X connect 5 0 9 0;
#X connect 5 0 11 0;
#X connect 6 0 11 1;
#X connect 6 0 9 1;
#X connect 7 0 10 0;
#X connect 7 0 12 0;
#X connect 8 0 10 1;
#X connect 8 0 12 1;
#X connect 9 0 31 0;
#X connect 10 0 32 0;
#X connect 11 0 33 0;
#X connect 12 0 34 0;
#X connect 13 0 15 0;
#X connect 14 0 31 1;
#X connect 14 0 32 1;
#X connect 14 0 33 1;
#X connect 14 0 34 1;
#X connect 15 0 16 0;
#X connect 16 0 14 0;
#X connect 20 0 1 1;
#X connect 21 0 2 1;
#X connect 22 0 6 1;
#X connect 22 0 8 1;
#X connect 23 0 6 0;
#X connect 23 0 8 0;
#X connect 25 0 26 0;
#X connect 25 1 26 1;
#X connect 26 0 27 0;
#X connect 26 1 27 1;
#X connect 27 0 28 0;
#X connect 27 1 28 1;
#X connect 28 0 29 0;
#X connect 28 1 29 1;
#X connect 29 0 30 0;
#X connect 29 1 30 1;
#X connect 30 0 1 0;
#X connect 30 1 2 0;
#X connect 31 0 17 0;
#X connect 32 0 18 0;
#X connect 33 0 24 0;
#X connect 34 0 19 0;
#X connect 35 0 36 0;
#X connect 36 0 37 0;
#X connect 37 0 38 0;
#X connect 38 0 39 1;
#X connect 38 0 40 1;
#X connect 39 0 4 0;
#X connect 40 0 3 0;
#N canvas 722 176 296 279 10;
#N canvas 0 0 682 744 \$0-overview 1;
#X restore 85 182 pd \$0-overview;
#N canvas 337 123 417 469 dump 0;
#X obj 94 243 textfile;
#X obj 94 277 t a b;
#X obj 128 301 f;
#X obj 160 302 + 1;
#X obj 94 401 s pd-\$0-overview;
#X obj 94 351 list;
#X msg 172 247 1;
#X obj 94 211 until;
#X obj 74 41 inlet;
#X obj 74 76 list;
#X msg 258 199 print;
#X msg 115 184 read \$1 cr \, rewind;
#X msg 239 247 clear;
#X msg 94 373 obj 100 \$2 \$1;
#X obj 239 42 inlet;
#X obj 128 324 * 45;
#X msg 74 113 symbol \$1.txt;
#X obj 74 152 t b b a b;
#X msg 74 427 vis 1;
#X connect 0 0 1 0;
#X connect 0 1 7 1;
#X connect 1 0 5 0;
#X connect 1 1 2 0;
#X connect 2 0 3 0;
#X connect 2 0 15 0;
#X connect 3 0 2 1;
#X connect 5 0 13 0;
#X connect 6 0 2 1;
#X connect 7 0 0 0;
#X connect 8 0 9 0;
#X connect 9 0 16 0;
#X connect 10 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 4 0;
#X connect 13 0 4 0;
#X connect 14 0 12 0;
#X connect 15 0 5 1;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 17 1 7 0;
#X connect 17 2 11 0;
#X connect 17 3 12 0;
#X connect 17 3 6 0;
#X connect 18 0 4 0;
#X restore 84 154 pd dump;
#X msg 110 33 s;
#X text 138 33 ynths;
#X msg 110 54 e;
#X text 138 54 ffects;
#X msg 111 77 m;
#X text 139 77 appings;
#X msg 111 99 c;
#X text 139 99 controllers;
#X msg 111 122 u;
#X text 139 122 tilities;
#X msg 143 154 clear;
#X text 85 211 Help-click any object to;
#X text 84 229 open the help file!;
#X connect 2 0 1 0;
#X connect 4 0 1 0;
#X connect 6 0 1 0;
#X connect 8 0 1 0;
#X connect 10 0 1 0;
#X connect 12 0 1 1;
c_adsr
c_adsrj
c_mphasor
c_multimetro
c_xfade
#N canvas 256 30 668 776 10;
#X text 51 13 c_adsr: ADSR ENVELOPE;
#X text 85 151 When you send this patch a positive trigger it schedules
a line~ to do an attack and decay \, and if zero \, it starts the release
ramp.;
#X text 86 204 Negative triggers cause the output to jump to zero and
then attack (instead of attacking from the current location).;
#X obj 196 357 / 127;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-adsr 44100 float 2;
#X coords 0 1 44100 -1 200 140 1;
#X restore 118 558 graph;
#X obj 119 513 tabwrite~ \$0-adsr;
#X obj 87 292 t a b;
#X msg 87 270 80;
#X obj 87 335 makenote 100 400;
#X obj 196 383 t a a;
#X floatatom 141 311 5 0 0 2 velocity - -;
#X floatatom 256 290 5 0 0 1 A - -;
#X floatatom 286 315 5 0 0 1 D - -;
#X floatatom 316 343 5 0 0 1 S(%) - -;
#X floatatom 347 368 5 0 0 1 R - -;
#X text 85 46 This is the classical Miller S. Puckette linear ADSR
envelope \, but with vline~ instead of line~ inside for a bit of extra
timing accuracy.;
#X text 86 102 Arguments: peak level \, attack time \, decay time \,
sustain level \, release time. A \, D \, and R are in msec and S is
in percent!;
#N canvas 0 0 450 300 (subpatch) 0;
#X array \$0-adsr-quartic 44100 float 2;
#X coords 0 1 44100 -1 200 140 1;
#X restore 347 558 graph;
#X obj 347 518 tabwrite~ \$0-adsr-quartic;
#X obj 119 449 t b b;
#X obj 345 465 *~;
#X obj 346 494 *~;
#X obj 196 411 c_adsr 1 80 100 80 200;
#X text 385 473 simple curved envelope;
#X connect 3 0 9 0;
#X connect 6 0 8 0;
#X connect 6 1 19 0;
#X connect 7 0 6 0;
#X connect 8 1 3 0;
#X connect 9 0 22 0;
#X connect 9 1 22 1;
#X connect 10 0 8 1;
#X connect 11 0 22 2;
#X connect 12 0 22 3;
#X connect 13 0 22 4;
#X connect 14 0 22 5;
#X connect 19 0 5 0;
#X connect 19 1 18 0;
#X connect 20 0 21 0;
#X connect 20 0 21 1;
#X connect 21 0 18 0;
#X connect 22 0 5 0;
#X connect 22 0 20 0;
#X connect 22 0 20 1;
#N canvas 131 27 1006 740 10;
#X obj 105 111 inlet;
#X obj 435 151 inlet;
#X text 101 86 trigger;
#X obj 105 139 sel 0;
#X obj 244 155 t b;
#X obj 166 264 f \$1;
#X obj 166 289 pack 0 \$2;
#X obj 492 151 inlet;
#X obj 438 281 del \$2;
#X obj 462 304 f \$4;
#X obj 501 379 pack 0 \$3;
#X obj 554 151 inlet;
#X obj 616 151 inlet;
#X obj 689 150 inlet;
#X msg 105 170 stop;
#X obj 612 306 pack 0 \$5;
#X text 435 129 level;
#X obj 501 355 * \$1;
#X obj 458 454 outlet~;
#X text 102 378 and pack with;
#X text 103 398 attack time;
#X text 31 126 if zero;
#X text 32 143 release;
#X text 12 160 and cancel;
#X text 43 177 decay;
#X text 284 272 on attack \, set a;
#X text 278 305 recall sustain value;
#X text 315 378 pack with decay time;
#X text 605 332 on release ramp;
#X text 606 349 back to zero;
#X obj 462 329 * 0.01;
#X text 47 567 Objects such as "f" and "pack" can be given dollar sign
arguments to initialize their contents from adsr's creation arguments.
Inlets are supplied to change them on the fly.;
#X text 13 2 ADSR ENVELOPE;
#X text 488 129 attack;
#X text 555 128 decay;
#X text 609 129 sustain;
#X text 686 129 release;
#X text 202 71 attack;
#X obj 204 92 moses;
#X obj 194 122 t b b;
#X msg 128 290 0;
#X text 20 273 optionally;
#X text 10 291 bash to zero;
#X text 25 246 ATTACK:;
#X text 49 477 When you send this patch a positive trigger it schedules
a line~ to do an attack and decay \, and if zero \, it starts the release
ramp.;
#X text 495 629 Updated for Pd version 0.37;
#X text 255 89 test for negative trigger;
#X text 253 113 if so \, zero;
#X text 254 129 the output;
#X text 278 165 in any case;
#X text 303 355 multiply by peak level;
#X text 280 286 delay for sustain;
#X text 276 328 convert from percent;
#X text 155 340 ... then;
#X text 103 359 recall peak level;
#X text 439 113 peak;
#X text 281 149 ... do this;
#X text 47 529 Negative triggers cause the output to jump to zero and
then attack (instead of attacking from the current location).;
#X text 208 1 Arguments: level \, attack time \, decay time \, sustain
level \, release time. A \, D \, and R are in msec and S is in percent.
This patch is used as an abstraction in various examples.;
#X obj 458 429 vline~;
#X connect 0 0 3 0;
#X connect 1 0 5 1;
#X connect 1 0 17 1;
#X connect 3 0 14 0;
#X connect 3 0 15 0;
#X connect 3 1 38 0;
#X connect 4 0 5 0;
#X connect 4 0 8 0;
#X connect 5 0 6 0;
#X connect 6 0 59 0;
#X connect 7 0 6 1;
#X connect 7 0 8 1;