From 80cc49a37d770cfd53ea8c543d2dc6c1746608ef Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Mon, 2 Feb 2004 12:24:33 +0000 Subject: merged with version_0_37_1test6 svn path=/trunk/; revision=1307 --- pd/extra/bonk~/help-bonk~.pd | 162 +++++++++++++++++++++++++++++++++++++ pd/extra/bonk~/makefile | 2 +- pd/extra/choice/help-choice.pd | 41 ++++++++++ pd/extra/expr~/README | 97 ---------------------- pd/extra/fiddle~/help-fiddle~.pd | 142 ++++++++++++++++++++++++++++++++ pd/extra/fiddle~/makefile | 2 +- pd/extra/help-bonk~.pd | 162 ------------------------------------- pd/extra/help-choice.pd | 41 ---------- pd/extra/help-fiddle~.pd | 107 ------------------------ pd/extra/help-loop~.pd | 66 --------------- pd/extra/help-pique.pd | 33 -------- pd/extra/help-rlshift~.pd | 29 ------- pd/extra/loop~/help-loop~.pd | 74 +++++++++++++++++ pd/extra/loop~/makefile | 2 +- pd/extra/lrshift~/help-rlshift~.pd | 29 +++++++ pd/extra/lrshift~/makefile | 2 +- pd/extra/pique/help-pique.pd | 33 ++++++++ 17 files changed, 485 insertions(+), 539 deletions(-) create mode 100644 pd/extra/bonk~/help-bonk~.pd create mode 100644 pd/extra/choice/help-choice.pd delete mode 100644 pd/extra/expr~/README create mode 100644 pd/extra/fiddle~/help-fiddle~.pd delete mode 100644 pd/extra/help-bonk~.pd delete mode 100644 pd/extra/help-choice.pd delete mode 100644 pd/extra/help-fiddle~.pd delete mode 100644 pd/extra/help-loop~.pd delete mode 100644 pd/extra/help-pique.pd delete mode 100644 pd/extra/help-rlshift~.pd create mode 100644 pd/extra/loop~/help-loop~.pd create mode 100644 pd/extra/lrshift~/help-rlshift~.pd create mode 100644 pd/extra/pique/help-pique.pd (limited to 'pd') diff --git a/pd/extra/bonk~/help-bonk~.pd b/pd/extra/bonk~/help-bonk~.pd new file mode 100644 index 00000000..5102e860 --- /dev/null +++ b/pd/extra/bonk~/help-bonk~.pd @@ -0,0 +1,162 @@ +#N canvas 107 94 958 626 10; +#X obj 320 579 print; +#X floatatom 314 501 0 0 0; +#X obj 320 549 spigot; +#X msg 314 471 0; +#X msg 351 471 1; +#X msg 442 427 bang; +#X obj 429 518 bonk~; +#X msg 442 244 learn 1; +#X msg 442 304 learn 0; +#X msg 437 486 print; +#X obj 390 467 adc~; +#X text 320 597 cooked; +#X msg 565 76 \; pd dsp 1; +#X obj 257 579 print; +#X floatatom 251 501 0 0 0; +#X obj 257 549 spigot; +#X msg 251 471 0; +#X msg 282 471 1; +#X text 257 597 raw; +#N canvas 366 126 600 400 synth 0; +#X obj 112 24 r bonk-cooked; +#X obj 112 49 unpack; +#X obj 112 99 * 12; +#X obj 112 124 div 7; +#X obj 112 74 + 1; +#X obj 112 174 mtof; +#X obj 112 224 osc~; +#X obj 112 249 cos~; +#X obj 112 149 + 47; +#X obj 209 247 line~; +#X obj 209 272 *~; +#X obj 209 297 lop~ 500; +#X obj 112 274 *~; +#X obj 103 361 dac~; +#X obj 253 165 dbtorms; +#X obj 253 115 * 0.5; +#X obj 253 140 + 50; +#X obj 211 189 f; +#X msg 173 159 bang; +#X obj 258 83 inlet; +#X obj 111 307 hip~ 5; +#X msg 34 24 0 60; +#X obj 112 199 sig~; +#X msg 209 222 \$1 \, 0 200; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 2 0 3 0; +#X connect 3 0 8 0; +#X connect 4 0 2 0; +#X connect 5 0 18 0; +#X connect 5 0 22 0; +#X connect 6 0 7 0; +#X connect 7 0 12 0; +#X connect 8 0 5 0; +#X connect 9 0 10 0; +#X connect 9 0 10 1; +#X connect 10 0 11 0; +#X connect 11 0 12 1; +#X connect 12 0 20 0; +#X connect 14 0 17 1; +#X connect 15 0 16 0; +#X connect 16 0 14 0; +#X connect 17 0 23 0; +#X connect 18 0 17 0; +#X connect 19 0 15 0; +#X connect 20 0 13 1; +#X connect 20 0 13 0; +#X connect 21 0 1 0; +#X connect 22 0 6 0; +#X connect 23 0 9 0; +#X restore 804 86 pd synth; +#X obj 454 549 s bonk-cooked; +#X floatatom 804 63 0 0 0; +#X msg 804 33 0; +#X msg 442 274 learn 10; +#X msg 442 334 forget; +#X msg 442 364 write templates.txt; +#X msg 442 394 read templates.txt; +#X msg 835 33 90; +#X msg 442 120 thresh 6 50; +#X text 8 70 The Bonk object takes an audio signal input and looks +for "attacks" defined as sharp changes in the spectral envelope of +the incoming sound. Optionally \, and less reliably \, you can have +Bonk check the attack against a collection of stored templates to try +to guess which of two or more instruments was hit. Bonk is described +theoretically in the 1998 ICMC proceedings \, reprinted on http://man104nfs.ucsd.edu/~mpuckett. +; +#X text 470 70 click here; +#X text 471 83 to start DSP; +#X text 8 191 Bonk's two outputs are the raw spectrum of the attack +(provided as a list of 11 numbers giving the signal "loudness" in the +11 frequency bands used) \, and the "cooked" output which gives only +an instrument number (counting up from zero) and a "velocity". The +instrumnent number is significant only if Bonk has a "template set" +in memory.; +#X text 8 368 In this patch \, after starting DSP \, you can print +out the raw or cooked output using the two "spigots" or listen to a +synthesizer output by raising its volume.; +#X text 259 448 enable printout; +#X text 705 32 output volume; +#X text 719 50 (0-100); +#X text 533 118 Set low and high thresholds. Signal growth must exceed +the high one and then fall to the low one to make an attack.; +#X text 533 151 Minimum velocity to output (quieter notes are ignored.) +; +#X msg 442 180 mask 4 0.7; +#X msg 442 214 debounce 0; +#X text 8 299 Bonk's analysis is carried out on a 256-point window +(6 msec at 44.1 kHz) and by default the analysis period is 128 samples. +The analysis period can be specified as Bonk's creation argument but +must be a multiple of 64; +#X text 532 219 Minimum time (msec) between attacks; +#X text 532 170 Describes how energy in each frequency band masks later +energy in the band. Here the masking is total for 4 analysis periods +and then drops by 0.7 each period.; +#X text 530 244 Forget all templates and start learning new ones. The +argument gives the number of times you will hit each instrument (10 +recommended.) Turn on the output volume above for audible feedback +as you train Bonk. "Learn 0" exits learn mode.; +#X text 530 328 Forget the last template. In Learn mode \, use "forget" +to erase and record over a template.; +#X text 595 368 Write templates to a file in text-editable format. +; +#X text 596 398 Read templates from a file.; +#X text 538 493 Print out all settings and templates.; +#X msg 442 150 minvel 10; +#X text 538 426 Poll the current spectrum via "raw" outlet \, You can +set a very high threshold if you don't want attacks mixed in.; +#X text 218 12 BONK - an attack detector for small percussion instruments +; +#X msg 634 517 print; +#X msg 437 456 debug 0; +#X text 538 466 turn debugging on or off.; +#X connect 1 0 2 1; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 4 0 1 0; +#X connect 5 0 6 0; +#X connect 6 0 15 0; +#X connect 6 1 2 0; +#X connect 6 1 20 0; +#X connect 7 0 6 0; +#X connect 8 0 6 0; +#X connect 9 0 6 0; +#X connect 10 0 6 0; +#X connect 14 0 15 1; +#X connect 15 0 13 0; +#X connect 16 0 14 0; +#X connect 17 0 14 0; +#X connect 21 0 19 0; +#X connect 22 0 21 0; +#X connect 23 0 6 0; +#X connect 24 0 6 0; +#X connect 25 0 6 0; +#X connect 26 0 6 0; +#X connect 27 0 21 0; +#X connect 28 0 6 0; +#X connect 39 0 6 0; +#X connect 40 0 6 0; +#X connect 49 0 6 0; +#X connect 53 0 6 0; diff --git a/pd/extra/bonk~/makefile b/pd/extra/bonk~/makefile index 2ac53f8c..b06d625f 100644 --- a/pd/extra/bonk~/makefile +++ b/pd/extra/bonk~/makefile @@ -67,7 +67,7 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ LINUXINCLUDE = -I../../src .c.pd_linux: - cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o diff --git a/pd/extra/choice/help-choice.pd b/pd/extra/choice/help-choice.pd new file mode 100644 index 00000000..df46ddc0 --- /dev/null +++ b/pd/extra/choice/help-choice.pd @@ -0,0 +1,41 @@ +#N canvas 16 5 488 531 12; +#X obj 8 186 choice; +#X msg 41 86 print; +#X msg 29 63 clear; +#X msg 8 34 add 1 0 0 \, add 0 1 0 \, add 0 0 1 \, add 1 1 1 \, add 1 1 0; +#X obj 77 162 pack 0 0 0; +#X floatatom 182 120; +#X floatatom 148 120; +#X floatatom 115 120; +#X obj 77 142 f; +#X msg 77 120 bang; +#X floatatom 8 207; +#X obj 53 187 choice 1; +#X floatatom 53 208; +#X obj 76 4 choice; +#X text 122 5 - search for a best match to an incoming list; +#X text 19 234 The choice object holds a list of vectors \, each having up to ten elements. When sent a list of numbers \, it outputs the index of the known vector that matches most closely. The quality of the match is the dot product of the two vectors after normalizing them \, i.e. \, the vector whose direction is closest to that of the input wins.; +#X text 19 316 If given a nonzero creation argument \, choice tries to avoid repetitious outputs by weighting less recently output vectors preferentially.; +#X text 18 354 You can use this to choose interactively between a number of behaviors depending on their attributes. For example \, you might have stored a number of melodies \, of which some are syncopated \, some chromatic \, some are more than 100 years old \, some are bugle calls \, and some are Christmas carols. You could then ask to find a syncopated bugle call (1 \, 0 \, 0 \, 1 \, 0) and you'll get the thing most closely matching the request.; +#X text 17 461 You can use numbers other than 0 and 1 to indicate relative strengths of the attributes \, or even use negative numbers to indicate opposites \, either in the incoming lists or in the stored ones.; +#X text 273 513 updated for Pd version-0.30; +#X text 72 63 delete all stored vectors; +#X text 394 36 add vectors; +#X text 81 85 debugging printout; +#X text 69 104 tweak the numbers and hit "bang" to input a list; +#X text 115 187 creation argument to avoid repeated outout; +#X text 85 208 output is the index of best match \, counting from zero; +#X connect 0 0 10 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 2 0 11 0; +#X connect 3 0 0 0; +#X connect 3 0 11 0; +#X connect 4 0 0 0; +#X connect 4 0 11 0; +#X connect 5 0 4 2; +#X connect 6 0 4 1; +#X connect 7 0 8 1; +#X connect 8 0 4 0; +#X connect 9 0 8 0; +#X connect 11 0 12 0; diff --git a/pd/extra/expr~/README b/pd/extra/expr~/README deleted file mode 100644 index bf84f2ae..00000000 --- a/pd/extra/expr~/README +++ /dev/null @@ -1,97 +0,0 @@ - -You can get more information on the expr object at -http://www.crca.ucsd.edu/~yadegari/expr.html - ------------ - -New if Version 0.4 - --access to variables (made by value object) --multiple expression separated by ; --added the following shorthands: - $y or $y1 = $y1[-1] and $y2 = $y2[-1] --new functions: - if - conditional evaluation - cbrt - cube root - erf - error function - erfc - complementary error function - expm1 - exponential minus 1, - log1p - logarithm of 1 plus - isinf - is the value infinite, - finite - is the value finite - isnan -- is the resut a nan (Not a number) - copysign - copy sign of a number - ldexp - multiply floating-point number by integral power of 2 - imodf - get signed integral value from floating-point number - modf - get signed fractional value from floating-point number - drem - floating-point remainder function - - Thanks to Orm Finnendahl for adding the following functions: - fmod - floating-point remainder function - ceil - ceiling function: smallest integral value not less than argument - floor - largest integral value not greater than argument - ------------- - -New in Version 0.3 --Full function functionality - ------------- - -The object "expr" is used for expression evaluaion of control data. - -Expr~ and fexpr~ are extentions to the expr object to work with vectors. -The expr~ object is designed to efficiently combine signal and control -stream processing by vector operations on the basis of the block size of -the environment. - -fexpr~ object provides a flexible mechanism for building FIR and -IIR filters by evaluating expressions on a sample by sample basis -and providing access to prior samples of the input and output audio -streams. When fractional offset is used, fexpr~ uses linear interpolation -to determine the value of the indexed sample. fexpr~ evaluates the -expression for every single sample and at every evaluation previous -samples (limited by the audio vector size) can be accessed. $x is used to -denote a singnal input whose samples we would like to access. The syntax -is $x followed by the inlet number and indexed by brackets, for example -$x1[-1] specifies the previous sample of the first inlet. Therefore, -if we are to build a simple filter which replaces every sample by -the average of that sample and its previous one, we would use "fexpr~ -($x1[0]+$x1[-1])/2 ". For ease of when the brackets are omitted, the -current sample is implied, so we can right the previous filter expression -as follows: " fexpr~ ($x1+$x1[-1])/2". To build IIR filters $y is used -to access the previous samples of the output stream. - -The three objects expr, expr~, and fexpr~ are implemented in the same object -so the files expr~.pd_linux and fexpr~.pd_linux are links to expr.pd_linux -This release has been compiled and tested on Linux 6.0. - --------- - -Here are some syntax information: (refer to help-expr.pd for examples) - -Syntyax: -The syntax is very close to how expression are written in -C. Variables are specified as follows where the '#' stands -for the inlet number: -$i#: integer input variable -$f#: float input variable -$s#: symbol input variable - -Used for expr~ only: -$v#: signal (vector) input (vector by vector evaluation) - -Used for fexpr~ only: -$x#[n]: the sample from inlet # indexed by n, where n has to - satisfy 0 => n >= -vector size, - ($x# is a shorthand for $x#[0], specifying the current sample) - -$y#[n]: the output value indexed by n, where n has to - satisfy 0 > n >= -vector size, - $y[n] is a shorthand for $y1[n] - - -I'll appreciate hearing about bugs, comments, suggestions, ... - -Shahrokh Yadegari (sdy@ucsd.edu) -7/10/02 diff --git a/pd/extra/fiddle~/help-fiddle~.pd b/pd/extra/fiddle~/help-fiddle~.pd new file mode 100644 index 00000000..f396725a --- /dev/null +++ b/pd/extra/fiddle~/help-fiddle~.pd @@ -0,0 +1,142 @@ +#N canvas 93 26 980 745 10; +#X obj 262 522 phasor~; +#X obj 531 616 unpack; +#X floatatom 531 666 0 0 0 0 - - -; +#X msg 437 449 print; +#X obj 262 500 sig~; +#X floatatom 262 478 0 0 0 0 - - -; +#X obj 262 456 mtof; +#X floatatom 262 434 0 0 0 0 - - -; +#X floatatom 545 643 0 0 0 0 - - -; +#X obj 531 576 route 1 2 3 4; +#X obj 614 616 unpack; +#X floatatom 614 666 0 0 0 0 - - -; +#X floatatom 628 643 0 0 0 0 - - -; +#X obj 698 616 unpack; +#X floatatom 698 666 0 0 0 0 - - -; +#X floatatom 712 643 0 0 0 0 - - -; +#X obj 389 616 unpack; +#X floatatom 389 666 0 0 0 0 - - -; +#X floatatom 403 643 0 0 0 0 - - -; +#X obj 334 545 *~; +#X obj 322 394 loadbang; +#X obj 353 522 sig~; +#X floatatom 353 500 0 0 0 0 - - -; +#X msg 322 478 1; +#X msg 353 478 0; +#X floatatom 466 666 0 0 0 0 - - -; +#X obj 281 666 print attack; +#X obj 190 666 print pitch; +#X msg 555 45 \; pd dsp 1; +#X text 460 39 click here; +#X text 460 61 to start DSP; +#X text 226 4 FIDDLE - pitch estimator and sinusoidal peak finder; +#X text 8 70 The Fiddle object estimates the pitch and amplitude of +an incoming sound \, both continuously and as a stream of discrete +"note" events. Fiddle optionally outputs a list of detected sinusoidal +peaks used to make the pitch determination. Fiddle is described theoretically +in the 1998 ICMC proceedings \, reprinted on http://man104nfs.ucsd.edu/~mpuckett. +; +#X text 8 170 Fiddle's creation arguments specify an analysis window +size \, the maximum polyphony (i.e. \, the number of simultaneous "pitches" +to try to find) \, the number of peaks in the spectrum to consider +\, and the number of peaks \, if any \, to output "raw." The outlets +give discrete pitch (a number) \, detected attacks in the amplitude +envelope (a bang) \, one or more voices of continuous pitch and amplitude +\, overall amplitude \, and optionally a sequence of messages with +the peaks.; +#X text 8 296 The analysis hop size is half the window size so in the +example shown here \, one analysis is done every 512 samples (11.6 +msec at 44K1) \, and the analysis uses the most recent 1024 samples +(23.2 msec at 44K1). The minimum frequency that Fiddle will report +is 2-1/2 cycles per analysis windows \, or about 108 Hz. (just below +MIDI 45.); +#X text 669 535 number of pitch outlets (1-3 \, default 1); +#X text 669 557 number of peaks to find (1-100 \, default 20); +#X text 669 579 number of peaks to output (default 0.); +#X msg 441 107 amp-range 40 50; +#X msg 439 227 reattack 100 10; +#X msg 438 282 npartial 7; +#X msg 438 170 vibrato 50 0.5; +#X text 560 91 a low and high amplitude threshold: if signal amplitude +is below the low threshold \, no pitches or peaks are output. The high +threshold is a minimum at which "cooked" outputs may appear.; +#X text 560 152 A period in milliseconds (50) over which the raw pitch +may not deviate more than an interval in half-tones (0.5) from the +average pitch to report it as a note to the "cooked" pitch outlet. +; +#X text 560 213 A period in milliseconds (100) over which a re-attack +is reported if the amplitude rises more than (1) dB. The re-attack +will result in a "bang" in the attack outlet and may give rise to repeated +notes in the cooked pitch output.; +#X text 142 432 test input pitch; +#X text 330 444 test input; +#X text 330 457 amplitude; +#X obj 410 545 fiddle~ 1024 1 20 3; +#X text 538 690 individual sinusoidal components; +#X text 466 688 amplitude; +#X text 476 703 (dB); +#X text 389 688 raw pitch; +#X text 376 712 and amplitude; +#X text 364 729 (up to 3 outputs); +#X text 287 686 bang on; +#X text 287 708 attack; +#X text 185 686 cooked pitch; +#X text 202 703 output; +#X text 545 545 ------ arguments:; +#X msg 262 412 57; +#X msg 440 331 auto 1; +#X msg 440 353 auto 0; +#X msg 439 418 bang; +#X text 561 416 poll current values --- useful if not in auto mode +\,; +#X text 560 274 Higher partials are weighed less strongly than lower +ones in determining the pitch. This specifies the number of the partial +(7) which will be weighted half as strongly as the fundamental.; +#X text 560 335 start and stop "auto" mode (on by default.) If off +\, output only appears on "bang" (poll mode).; +#X text 561 448 print out all settings; +#X text 669 513 window size (128-2048 \, default 1024); +#X msg 440 375 npoints 2048; +#X text 562 384 number of points in analysis window (power of 2 \, +128-2048); +#X msg 439 396 npoints 1024; +#X connect 0 0 19 0; +#X connect 1 0 2 0; +#X connect 1 1 8 0; +#X connect 3 0 48 0; +#X connect 4 0 0 0; +#X connect 5 0 4 0; +#X connect 6 0 5 0; +#X connect 7 0 6 0; +#X connect 9 0 1 0; +#X connect 9 1 10 0; +#X connect 9 2 13 0; +#X connect 10 0 11 0; +#X connect 10 1 12 0; +#X connect 13 0 14 0; +#X connect 13 1 15 0; +#X connect 16 0 17 0; +#X connect 16 1 18 0; +#X connect 19 0 48 0; +#X connect 20 0 60 0; +#X connect 20 0 23 0; +#X connect 21 0 19 1; +#X connect 22 0 21 0; +#X connect 23 0 22 0; +#X connect 24 0 22 0; +#X connect 38 0 48 0; +#X connect 39 0 48 0; +#X connect 40 0 48 0; +#X connect 41 0 48 0; +#X connect 48 0 27 0; +#X connect 48 1 26 0; +#X connect 48 2 16 0; +#X connect 48 3 25 0; +#X connect 48 4 9 0; +#X connect 60 0 7 0; +#X connect 61 0 48 0; +#X connect 62 0 48 0; +#X connect 63 0 48 0; +#X connect 69 0 48 0; +#X connect 71 0 48 0; diff --git a/pd/extra/fiddle~/makefile b/pd/extra/fiddle~/makefile index 6f6a963c..85035738 100644 --- a/pd/extra/fiddle~/makefile +++ b/pd/extra/fiddle~/makefile @@ -67,7 +67,7 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ LINUXINCLUDE = -I../../src .c.pd_linux: - cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o diff --git a/pd/extra/help-bonk~.pd b/pd/extra/help-bonk~.pd deleted file mode 100644 index 5102e860..00000000 --- a/pd/extra/help-bonk~.pd +++ /dev/null @@ -1,162 +0,0 @@ -#N canvas 107 94 958 626 10; -#X obj 320 579 print; -#X floatatom 314 501 0 0 0; -#X obj 320 549 spigot; -#X msg 314 471 0; -#X msg 351 471 1; -#X msg 442 427 bang; -#X obj 429 518 bonk~; -#X msg 442 244 learn 1; -#X msg 442 304 learn 0; -#X msg 437 486 print; -#X obj 390 467 adc~; -#X text 320 597 cooked; -#X msg 565 76 \; pd dsp 1; -#X obj 257 579 print; -#X floatatom 251 501 0 0 0; -#X obj 257 549 spigot; -#X msg 251 471 0; -#X msg 282 471 1; -#X text 257 597 raw; -#N canvas 366 126 600 400 synth 0; -#X obj 112 24 r bonk-cooked; -#X obj 112 49 unpack; -#X obj 112 99 * 12; -#X obj 112 124 div 7; -#X obj 112 74 + 1; -#X obj 112 174 mtof; -#X obj 112 224 osc~; -#X obj 112 249 cos~; -#X obj 112 149 + 47; -#X obj 209 247 line~; -#X obj 209 272 *~; -#X obj 209 297 lop~ 500; -#X obj 112 274 *~; -#X obj 103 361 dac~; -#X obj 253 165 dbtorms; -#X obj 253 115 * 0.5; -#X obj 253 140 + 50; -#X obj 211 189 f; -#X msg 173 159 bang; -#X obj 258 83 inlet; -#X obj 111 307 hip~ 5; -#X msg 34 24 0 60; -#X obj 112 199 sig~; -#X msg 209 222 \$1 \, 0 200; -#X connect 0 0 1 0; -#X connect 1 0 4 0; -#X connect 2 0 3 0; -#X connect 3 0 8 0; -#X connect 4 0 2 0; -#X connect 5 0 18 0; -#X connect 5 0 22 0; -#X connect 6 0 7 0; -#X connect 7 0 12 0; -#X connect 8 0 5 0; -#X connect 9 0 10 0; -#X connect 9 0 10 1; -#X connect 10 0 11 0; -#X connect 11 0 12 1; -#X connect 12 0 20 0; -#X connect 14 0 17 1; -#X connect 15 0 16 0; -#X connect 16 0 14 0; -#X connect 17 0 23 0; -#X connect 18 0 17 0; -#X connect 19 0 15 0; -#X connect 20 0 13 1; -#X connect 20 0 13 0; -#X connect 21 0 1 0; -#X connect 22 0 6 0; -#X connect 23 0 9 0; -#X restore 804 86 pd synth; -#X obj 454 549 s bonk-cooked; -#X floatatom 804 63 0 0 0; -#X msg 804 33 0; -#X msg 442 274 learn 10; -#X msg 442 334 forget; -#X msg 442 364 write templates.txt; -#X msg 442 394 read templates.txt; -#X msg 835 33 90; -#X msg 442 120 thresh 6 50; -#X text 8 70 The Bonk object takes an audio signal input and looks -for "attacks" defined as sharp changes in the spectral envelope of -the incoming sound. Optionally \, and less reliably \, you can have -Bonk check the attack against a collection of stored templates to try -to guess which of two or more instruments was hit. Bonk is described -theoretically in the 1998 ICMC proceedings \, reprinted on http://man104nfs.ucsd.edu/~mpuckett. -; -#X text 470 70 click here; -#X text 471 83 to start DSP; -#X text 8 191 Bonk's two outputs are the raw spectrum of the attack -(provided as a list of 11 numbers giving the signal "loudness" in the -11 frequency bands used) \, and the "cooked" output which gives only -an instrument number (counting up from zero) and a "velocity". The -instrumnent number is significant only if Bonk has a "template set" -in memory.; -#X text 8 368 In this patch \, after starting DSP \, you can print -out the raw or cooked output using the two "spigots" or listen to a -synthesizer output by raising its volume.; -#X text 259 448 enable printout; -#X text 705 32 output volume; -#X text 719 50 (0-100); -#X text 533 118 Set low and high thresholds. Signal growth must exceed -the high one and then fall to the low one to make an attack.; -#X text 533 151 Minimum velocity to output (quieter notes are ignored.) -; -#X msg 442 180 mask 4 0.7; -#X msg 442 214 debounce 0; -#X text 8 299 Bonk's analysis is carried out on a 256-point window -(6 msec at 44.1 kHz) and by default the analysis period is 128 samples. -The analysis period can be specified as Bonk's creation argument but -must be a multiple of 64; -#X text 532 219 Minimum time (msec) between attacks; -#X text 532 170 Describes how energy in each frequency band masks later -energy in the band. Here the masking is total for 4 analysis periods -and then drops by 0.7 each period.; -#X text 530 244 Forget all templates and start learning new ones. The -argument gives the number of times you will hit each instrument (10 -recommended.) Turn on the output volume above for audible feedback -as you train Bonk. "Learn 0" exits learn mode.; -#X text 530 328 Forget the last template. In Learn mode \, use "forget" -to erase and record over a template.; -#X text 595 368 Write templates to a file in text-editable format. -; -#X text 596 398 Read templates from a file.; -#X text 538 493 Print out all settings and templates.; -#X msg 442 150 minvel 10; -#X text 538 426 Poll the current spectrum via "raw" outlet \, You can -set a very high threshold if you don't want attacks mixed in.; -#X text 218 12 BONK - an attack detector for small percussion instruments -; -#X msg 634 517 print; -#X msg 437 456 debug 0; -#X text 538 466 turn debugging on or off.; -#X connect 1 0 2 1; -#X connect 2 0 0 0; -#X connect 3 0 1 0; -#X connect 4 0 1 0; -#X connect 5 0 6 0; -#X connect 6 0 15 0; -#X connect 6 1 2 0; -#X connect 6 1 20 0; -#X connect 7 0 6 0; -#X connect 8 0 6 0; -#X connect 9 0 6 0; -#X connect 10 0 6 0; -#X connect 14 0 15 1; -#X connect 15 0 13 0; -#X connect 16 0 14 0; -#X connect 17 0 14 0; -#X connect 21 0 19 0; -#X connect 22 0 21 0; -#X connect 23 0 6 0; -#X connect 24 0 6 0; -#X connect 25 0 6 0; -#X connect 26 0 6 0; -#X connect 27 0 21 0; -#X connect 28 0 6 0; -#X connect 39 0 6 0; -#X connect 40 0 6 0; -#X connect 49 0 6 0; -#X connect 53 0 6 0; diff --git a/pd/extra/help-choice.pd b/pd/extra/help-choice.pd deleted file mode 100644 index df46ddc0..00000000 --- a/pd/extra/help-choice.pd +++ /dev/null @@ -1,41 +0,0 @@ -#N canvas 16 5 488 531 12; -#X obj 8 186 choice; -#X msg 41 86 print; -#X msg 29 63 clear; -#X msg 8 34 add 1 0 0 \, add 0 1 0 \, add 0 0 1 \, add 1 1 1 \, add 1 1 0; -#X obj 77 162 pack 0 0 0; -#X floatatom 182 120; -#X floatatom 148 120; -#X floatatom 115 120; -#X obj 77 142 f; -#X msg 77 120 bang; -#X floatatom 8 207; -#X obj 53 187 choice 1; -#X floatatom 53 208; -#X obj 76 4 choice; -#X text 122 5 - search for a best match to an incoming list; -#X text 19 234 The choice object holds a list of vectors \, each having up to ten elements. When sent a list of numbers \, it outputs the index of the known vector that matches most closely. The quality of the match is the dot product of the two vectors after normalizing them \, i.e. \, the vector whose direction is closest to that of the input wins.; -#X text 19 316 If given a nonzero creation argument \, choice tries to avoid repetitious outputs by weighting less recently output vectors preferentially.; -#X text 18 354 You can use this to choose interactively between a number of behaviors depending on their attributes. For example \, you might have stored a number of melodies \, of which some are syncopated \, some chromatic \, some are more than 100 years old \, some are bugle calls \, and some are Christmas carols. You could then ask to find a syncopated bugle call (1 \, 0 \, 0 \, 1 \, 0) and you'll get the thing most closely matching the request.; -#X text 17 461 You can use numbers other than 0 and 1 to indicate relative strengths of the attributes \, or even use negative numbers to indicate opposites \, either in the incoming lists or in the stored ones.; -#X text 273 513 updated for Pd version-0.30; -#X text 72 63 delete all stored vectors; -#X text 394 36 add vectors; -#X text 81 85 debugging printout; -#X text 69 104 tweak the numbers and hit "bang" to input a list; -#X text 115 187 creation argument to avoid repeated outout; -#X text 85 208 output is the index of best match \, counting from zero; -#X connect 0 0 10 0; -#X connect 1 0 0 0; -#X connect 2 0 0 0; -#X connect 2 0 11 0; -#X connect 3 0 0 0; -#X connect 3 0 11 0; -#X connect 4 0 0 0; -#X connect 4 0 11 0; -#X connect 5 0 4 2; -#X connect 6 0 4 1; -#X connect 7 0 8 1; -#X connect 8 0 4 0; -#X connect 9 0 8 0; -#X connect 11 0 12 0; diff --git a/pd/extra/help-fiddle~.pd b/pd/extra/help-fiddle~.pd deleted file mode 100644 index a7feb4f7..00000000 --- a/pd/extra/help-fiddle~.pd +++ /dev/null @@ -1,107 +0,0 @@ -#N canvas 93 26 980 745 10; -#X obj 262 522 phasor~; -#X obj 531 616 unpack; -#X floatatom 531 666; -#X msg 437 449 print; -#X obj 262 500 sig~; -#X floatatom 262 478; -#X obj 262 456 mtof; -#X floatatom 262 434; -#X floatatom 545 643; -#X obj 531 576 route 1 2 3 4; -#X obj 614 616 unpack; -#X floatatom 614 666; -#X floatatom 628 643; -#X obj 698 616 unpack; -#X floatatom 698 666; -#X floatatom 712 643; -#X obj 389 616 unpack; -#X floatatom 389 666; -#X floatatom 403 643; -#X obj 334 545 *~; -#X obj 322 394 loadbang; -#X obj 353 522 sig~; -#X floatatom 353 500; -#X msg 322 478 1; -#X msg 353 478 0; -#X floatatom 466 666; -#X obj 281 666 print attack; -#X obj 190 666 print pitch; -#X msg 555 45 \; pd dsp 1; -#X text 460 39 click here; -#X text 460 61 to start DSP; -#X text 226 4 FIDDLE - pitch estimator and sinusoidal peak finder; -#X text 8 70 The Fiddle object estimates the pitch and amplitude of an incoming sound \, both continuously and as a stream of discrete "note" events. Fiddle optionally outputs a list of detected sinusoidal peaks used to make the pitch determination. Fiddle is described theoretically in the 1998 ICMC proceedings \, reprinted on http://man104nfs.ucsd.edu/~mpuckett.; -#X text 8 170 Fiddle's creation arguments specify an analysis window size \, the maximum polyphony (i.e. \, the number of simultaneous "pitches" to try to find) \, the number of peaks in the spectrum to consider \, and the number of peaks \, if any \, to output "raw." The outlets give discrete pitch (a number) \, detected attacks in the amplitude envelope (a bang) \, one or more voices of continuous pitch and amplitude \, overall amplitude \, and optionally a sequence of messages with the peaks.; -#X text 8 296 The analysis hop size is half the window size so in the example shown here \, one analysis is done every 512 samples (11.6 msec at 44K1) \, and the analysis uses the most recent 1024 samples (23.2 msec at 44K1). The minimum frequency that Fiddle will report is 2-1/2 cycles per analysis windows \, or about 108 Hz. (just below MIDI 45.); -#X text 669 535 number of pitch outlets (1-3 \, default 1); -#X text 669 557 number of peaks to find (1-100 \, default 20); -#X text 669 579 number of peaks to output (default 0.); -#X msg 441 107 amp-range 40 50; -#X msg 439 227 reattack 100 10; -#X msg 438 282 npartial 7; -#X msg 438 170 vibrato 50 0.5; -#X text 560 91 a low and high amplitude threshold: if signal amplitude is below the low threshold \, no pitches or peaks are output. The high threshold is a minimum at which "cooked" outputs may appear.; -#X text 560 152 A period in milliseconds (50) over which the raw pitch may not deviate more than an interval in half-tones (0.5) from the average pitch to report it as a note to the "cooked" pitch outlet.; -#X text 560 213 A period in milliseconds (100) over which a re-attack is reported if the amplitude rises more than (1) dB. The re-attack will result in a "bang" in the attack outlet and may give rise to repeated notes in the cooked pitch output.; -#X text 142 432 test input pitch; -#X text 330 444 test input; -#X text 330 457 amplitude; -#X obj 410 545 fiddle~ 1024 1 20 3; -#X text 538 690 individual sinusoidal components; -#X text 466 688 amplitude; -#X text 476 703 (dB); -#X text 389 688 raw pitch; -#X text 376 712 and amplitude; -#X text 364 729 (up to 3 outputs); -#X text 287 686 bang on; -#X text 287 708 attack; -#X text 185 686 cooked pitch; -#X text 202 703 output; -#X text 545 545 ------ arguments:; -#X msg 262 412 57; -#X msg 440 340 auto 1; -#X msg 440 362 auto 0; -#X msg 440 407 bang; -#X text 561 405 poll current values --- useful if not in auto mode \,; -#X text 560 274 Higher partials are weighed less strongly than lower ones in determining the pitch. This specifies the number of the partial (7) which will be weighted half as strongly as the fundamental.; -#X text 560 335 start and stop "auto" mode (on by default.) If off \, output only appears on "bang" (poll mode).; -#X text 561 448 print out all settings; -#X text 669 513 window size (128-2048 \, default 1024); -#X connect 0 0 19 0; -#X connect 1 0 2 0; -#X connect 1 1 8 0; -#X connect 3 0 48 0; -#X connect 4 0 0 0; -#X connect 5 0 4 0; -#X connect 6 0 5 0; -#X connect 7 0 6 0; -#X connect 9 0 1 0; -#X connect 9 1 10 0; -#X connect 9 2 13 0; -#X connect 10 0 11 0; -#X connect 10 1 12 0; -#X connect 13 0 14 0; -#X connect 13 1 15 0; -#X connect 16 0 17 0; -#X connect 16 1 18 0; -#X connect 19 0 48 0; -#X connect 20 0 60 0; -#X connect 20 0 23 0; -#X connect 21 0 19 1; -#X connect 22 0 21 0; -#X connect 23 0 22 0; -#X connect 24 0 22 0; -#X connect 38 0 48 0; -#X connect 39 0 48 0; -#X connect 40 0 48 0; -#X connect 41 0 48 0; -#X connect 48 0 27 0; -#X connect 48 1 26 0; -#X connect 48 2 16 0; -#X connect 48 3 25 0; -#X connect 48 4 9 0; -#X connect 60 0 7 0; -#X connect 61 0 48 0; -#X connect 62 0 48 0; -#X connect 63 0 48 0; diff --git a/pd/extra/help-loop~.pd b/pd/extra/help-loop~.pd deleted file mode 100644 index 6acff93c..00000000 --- a/pd/extra/help-loop~.pd +++ /dev/null @@ -1,66 +0,0 @@ -#N canvas 33 0 538 640 12; -#X floatatom 55 169; -#X obj 273 343 print~; -#X msg 273 305 bang; -#X obj 55 303 loop~; -#X floatatom 80 244; -#X msg 69 217 bang; -#X obj 172 350 print~; -#X msg 170 311 bang; -#X graph graph1 0 -1 150000 1 306 586 506 436; -#X array array2 150000 float; -#X pop; -#X msg 306 594 \; array2 resize 150000; -#X obj 29 578 soundfiler; -#X obj 55 419 tabread4~ array2; -#X obj 55 373 *~; -#X obj 55 488 dac~; -#X obj 55 465 hip~ 5; -#X obj 101 377 samphold~; -#X obj 55 396 +~; -#X floatatom 102 268; -#X obj 102 291 *~ 1000; -#X msg 47 533 read ../doc/sound/bell.aiff array2; -#X msg 47 556 read ../doc/sound/vocal.aiff array2; -#X msg 61 194 set 0.5; -#X text 100 164 left signal input is transposition (1 is normal \, 2 is up an octave \, etc); -#X text 37 6 loop~ - phase generator for looping samplers; -#X text 121 193 set phase (0 to 1); -#X text 121 213 reset phase to 0; -#X text 118 243 right signal input is window size in samples; -#X text 140 267 here's how to handle onsets; -#X obj 55 442 *~; -#X floatatom 171 397; -#X obj 171 466 line~; -#X obj 171 420 dbtorms; -#X obj 171 443 pack 0 50; -#X text 205 396 output level 0-100; -#X text 170 290 print outputs; -#X text 21 25 loop~ takes input signals to set a window size and transposition \, and outputs a phase and a sampled window size. The window size only changes at phase zero crossings and the phase output is adjusted so that changing window size doesn't change the transposition.; -#X text 22 95 You can send "bang" or "set" message to force the phase to zero--you should mute the output before doing so. This may be desirable if you've set a large window size but then want to decrease it without waiting for the next phase crossing.; -#X connect 0 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 6 0; -#X connect 3 0 12 0; -#X connect 3 0 15 1; -#X connect 3 1 1 0; -#X connect 3 1 12 1; -#X connect 4 0 3 1; -#X connect 5 0 3 0; -#X connect 7 0 6 0; -#X connect 11 0 28 0; -#X connect 12 0 16 0; -#X connect 14 0 13 0; -#X connect 14 0 13 1; -#X connect 15 0 16 1; -#X connect 16 0 11 0; -#X connect 17 0 18 0; -#X connect 18 0 15 0; -#X connect 19 0 10 0; -#X connect 20 0 10 0; -#X connect 21 0 3 0; -#X connect 28 0 14 0; -#X connect 29 0 31 0; -#X connect 30 0 28 1; -#X connect 31 0 32 0; -#X connect 32 0 30 0; diff --git a/pd/extra/help-pique.pd b/pd/extra/help-pique.pd deleted file mode 100644 index 1689c95b..00000000 --- a/pd/extra/help-pique.pd +++ /dev/null @@ -1,33 +0,0 @@ -#N canvas 143 0 729 407 12; -#X obj 47 11 pique; -#X text 105 12 -- find peaks in an FFT spectrum; -#X obj 214 174 rfft~; -#X obj 131 129 osc~ 2000; -#X graph graph2 0 -64 63 64 519 179 719 39; -#X array fft-real 64 float; -#X pop; -#X graph graph3 0 -64 63 64 519 327 719 187; -#X array fft-imag 64 float; -#X pop; -#X obj 214 215 tabwrite~ fft-real; -#X obj 245 240 tabwrite~ fft-imag; -#X obj 315 158 metro 1000; -#X obj 315 116 loadbang; -#X msg 315 138 1; -#X obj 91 349 pique; -#X msg 91 322 64 fft-real fft-imag 10; -#X obj 91 376 print; -#X obj 205 132 osc~ 5000; -#X text 25 37 pique takes unwindowed FFT analyses as input (they should be stored in arrays) and outputs a list of peaks \, giving their peak number \, frequency \, amplitude \, and phase (as a cosine/sine pair.); -#X text 13 289 message argumnets: number of FFT points \, fft real part \, fft imaginary part \, maximum number of peaks to report.; -#X text 578 387 updated for Pd 0.31.; -#X connect 2 0 6 0; -#X connect 2 1 7 0; -#X connect 3 0 2 0; -#X connect 8 0 6 0; -#X connect 8 0 7 0; -#X connect 9 0 10 0; -#X connect 10 0 8 0; -#X connect 11 0 13 0; -#X connect 12 0 11 0; -#X connect 14 0 2 0; diff --git a/pd/extra/help-rlshift~.pd b/pd/extra/help-rlshift~.pd deleted file mode 100644 index cdfd8830..00000000 --- a/pd/extra/help-rlshift~.pd +++ /dev/null @@ -1,29 +0,0 @@ -#N canvas 143 0 673 325 12; -#X msg 268 277 bang; -#X obj 244 303 print~; -#X msg 185 278 bang; -#X obj 161 304 print~; -#X text 53 117 click here first; -#X msg 72 270 bang; -#X obj 48 296 print~; -#X text 162 222 shift left; -#X text 243 224 shift right; -#X obj 161 252 lrshift~ 1; -#X obj 244 251 lrshift~ -1; -#X text 39 37 Acting at whatever vector size the window is running at \, lrshift~ shifts samples to the left (toward the beginning sample) or to the right. The argument gives the direction and the amount of the shift. The rightmost (or leftmost) samples are set to zero.; -#X graph graph2 0 0 63 1 448 258 648 118; -#X array shiftin 64 float; -#X pop; -#X obj 47 11 rlshift~; -#X text 115 11 -- shift signal vector elements left or right; -#X msg 54 138 \; pd dsp 1 \; shiftin 1 1; -#X obj 48 204 tabreceive~ shiftin; -#X text 525 308 Updated for Pd 0.31.; -#X connect 0 0 1 0; -#X connect 2 0 3 0; -#X connect 5 0 6 0; -#X connect 9 0 3 0; -#X connect 10 0 1 0; -#X connect 16 0 6 0; -#X connect 16 0 9 0; -#X connect 16 0 10 0; diff --git a/pd/extra/loop~/help-loop~.pd b/pd/extra/loop~/help-loop~.pd new file mode 100644 index 00000000..a445b805 --- /dev/null +++ b/pd/extra/loop~/help-loop~.pd @@ -0,0 +1,74 @@ +#N canvas 33 0 647 662 12; +#X floatatom 41 204 0 0 0 0 - - -; +#X obj 254 382 print~; +#X msg 254 347 bang; +#X obj 41 338 loop~; +#X floatatom 66 279 0 0 0 0 - - -; +#X msg 55 252 bang; +#X obj 183 382 print~; +#X msg 183 347 bang; +#N canvas 0 0 450 300 graph1 0; +#X array array2 150000 float 0; +#X coords 0 1 150000 -1 200 150 1; +#X restore 393 464 graph; +#X msg 393 622 \; array2 resize 150000; +#X obj 25 613 soundfiler; +#X obj 16 453 tabread4~ array2; +#X obj 16 407 *~; +#X obj 16 522 dac~; +#X obj 16 499 hip~ 5; +#X obj 62 411 samphold~; +#X obj 16 430 +~; +#X floatatom 96 303 0 0 0 0 - - -; +#X obj 96 326 *~ 1000; +#X msg 43 568 read ../doc/sound/bell.aiff array2; +#X msg 43 591 read ../doc/sound/vocal.aiff array2; +#X msg 47 229 set 0.5; +#X text 95 196 left signal input is transposition (1 is normal \, 2 +is up an octave \, etc); +#X text 82 4 loop~ - phase generator for looping samplers; +#X text 116 228 set phase (0 to 1); +#X text 104 253 reset phase to 0; +#X text 104 278 right signal input is window size in samples; +#X text 134 302 here's how to handle onsets; +#X obj 16 476 *~; +#X floatatom 167 432 0 0 0 0 - - -; +#X obj 167 501 line~; +#X obj 167 455 dbtorms; +#X obj 167 478 pack 0 50; +#X text 201 431 output level 0-100; +#X text 187 326 print outputs; +#X text 33 32 loop~ takes input signals to set a window size and transposition +\, and outputs a phase and a sampled window size. The window size only +changes at phase zero crossings and the phase output is adjusted so +that changing window size doesn't change the transposition.; +#X text 33 112 You can send "bang" or "set" message to force the phase +to zero--you should mute the output before doing so. This may be desirable +if you've set a large window size but then want to decrease it without +waiting for the next phase crossing.; +#X connect 0 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 3 0 12 0; +#X connect 3 0 15 1; +#X connect 3 1 1 0; +#X connect 3 1 12 1; +#X connect 4 0 3 1; +#X connect 5 0 3 0; +#X connect 7 0 6 0; +#X connect 11 0 28 0; +#X connect 12 0 16 0; +#X connect 14 0 13 0; +#X connect 14 0 13 1; +#X connect 15 0 16 1; +#X connect 16 0 11 0; +#X connect 17 0 18 0; +#X connect 18 0 15 0; +#X connect 19 0 10 0; +#X connect 20 0 10 0; +#X connect 21 0 3 0; +#X connect 28 0 14 0; +#X connect 29 0 31 0; +#X connect 30 0 28 1; +#X connect 31 0 32 0; +#X connect 32 0 30 0; diff --git a/pd/extra/loop~/makefile b/pd/extra/loop~/makefile index 881ec5f1..77bff84a 100644 --- a/pd/extra/loop~/makefile +++ b/pd/extra/loop~/makefile @@ -68,7 +68,7 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ LINUXINCLUDE = -I../../src .c.pd_linux: - cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o diff --git a/pd/extra/lrshift~/help-rlshift~.pd b/pd/extra/lrshift~/help-rlshift~.pd new file mode 100644 index 00000000..cdfd8830 --- /dev/null +++ b/pd/extra/lrshift~/help-rlshift~.pd @@ -0,0 +1,29 @@ +#N canvas 143 0 673 325 12; +#X msg 268 277 bang; +#X obj 244 303 print~; +#X msg 185 278 bang; +#X obj 161 304 print~; +#X text 53 117 click here first; +#X msg 72 270 bang; +#X obj 48 296 print~; +#X text 162 222 shift left; +#X text 243 224 shift right; +#X obj 161 252 lrshift~ 1; +#X obj 244 251 lrshift~ -1; +#X text 39 37 Acting at whatever vector size the window is running at \, lrshift~ shifts samples to the left (toward the beginning sample) or to the right. The argument gives the direction and the amount of the shift. The rightmost (or leftmost) samples are set to zero.; +#X graph graph2 0 0 63 1 448 258 648 118; +#X array shiftin 64 float; +#X pop; +#X obj 47 11 rlshift~; +#X text 115 11 -- shift signal vector elements left or right; +#X msg 54 138 \; pd dsp 1 \; shiftin 1 1; +#X obj 48 204 tabreceive~ shiftin; +#X text 525 308 Updated for Pd 0.31.; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 5 0 6 0; +#X connect 9 0 3 0; +#X connect 10 0 1 0; +#X connect 16 0 6 0; +#X connect 16 0 9 0; +#X connect 16 0 10 0; diff --git a/pd/extra/lrshift~/makefile b/pd/extra/lrshift~/makefile index 67afef10..00ed2493 100644 --- a/pd/extra/lrshift~/makefile +++ b/pd/extra/lrshift~/makefile @@ -68,7 +68,7 @@ LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ LINUXINCLUDE = -I../../src .c.pd_linux: - cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c + $(CC) $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm strip --strip-unneeded $*.pd_linux rm -f $*.o diff --git a/pd/extra/pique/help-pique.pd b/pd/extra/pique/help-pique.pd new file mode 100644 index 00000000..1689c95b --- /dev/null +++ b/pd/extra/pique/help-pique.pd @@ -0,0 +1,33 @@ +#N canvas 143 0 729 407 12; +#X obj 47 11 pique; +#X text 105 12 -- find peaks in an FFT spectrum; +#X obj 214 174 rfft~; +#X obj 131 129 osc~ 2000; +#X graph graph2 0 -64 63 64 519 179 719 39; +#X array fft-real 64 float; +#X pop; +#X graph graph3 0 -64 63 64 519 327 719 187; +#X array fft-imag 64 float; +#X pop; +#X obj 214 215 tabwrite~ fft-real; +#X obj 245 240 tabwrite~ fft-imag; +#X obj 315 158 metro 1000; +#X obj 315 116 loadbang; +#X msg 315 138 1; +#X obj 91 349 pique; +#X msg 91 322 64 fft-real fft-imag 10; +#X obj 91 376 print; +#X obj 205 132 osc~ 5000; +#X text 25 37 pique takes unwindowed FFT analyses as input (they should be stored in arrays) and outputs a list of peaks \, giving their peak number \, frequency \, amplitude \, and phase (as a cosine/sine pair.); +#X text 13 289 message argumnets: number of FFT points \, fft real part \, fft imaginary part \, maximum number of peaks to report.; +#X text 578 387 updated for Pd 0.31.; +#X connect 2 0 6 0; +#X connect 2 1 7 0; +#X connect 3 0 2 0; +#X connect 8 0 6 0; +#X connect 8 0 7 0; +#X connect 9 0 10 0; +#X connect 10 0 8 0; +#X connect 11 0 13 0; +#X connect 12 0 11 0; +#X connect 14 0 2 0; -- cgit v1.2.1