diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-23 00:21:28 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2003-09-23 00:21:28 +0000 |
commit | 64fdb009695828b788fce074135b20a5e52c5fc4 (patch) | |
tree | a05144197dd339721b6d4a3a0927f7596e8872b6 /pd/extra/bonk~ | |
parent | a30193fcd726552364de74984b200be2c30723e7 (diff) |
imported version 0.37-0
svn path=/trunk/; revision=1016
Diffstat (limited to 'pd/extra/bonk~')
-rw-r--r-- | pd/extra/bonk~/help-bonk~.pd | 162 | ||||
-rw-r--r-- | pd/extra/bonk~/makefile | 25 |
2 files changed, 10 insertions, 177 deletions
diff --git a/pd/extra/bonk~/help-bonk~.pd b/pd/extra/bonk~/help-bonk~.pd deleted file mode 100644 index 5102e860..00000000 --- a/pd/extra/bonk~/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/bonk~/makefile b/pd/extra/bonk~/makefile index 731e5cb3..2ac53f8c 100644 --- a/pd/extra/bonk~/makefile +++ b/pd/extra/bonk~/makefile @@ -12,13 +12,13 @@ pd_nt: $(NAME).dll PDNTCFLAGS = /W3 /WX /DNT /DPD /nologo VC="C:\Program Files\Microsoft Visual Studio\Vc98" -PDNTINCLUDE = /I. /I\tcl\include /I\ftp\pd\src /I$(VC)\include +PDNTINCLUDE = /I. /I..\..\src /I$(VC)\include PDNTLDIR = $(VC)\lib PDNTLIB = $(PDNTLDIR)\libc.lib \ $(PDNTLDIR)\oldnames.lib \ $(PDNTLDIR)\kernel32.lib \ - \ftp\pd\bin\pd.lib + ..\..\bin\pd.lib .c.dll: cl $(PDNTCFLAGS) $(PDNTINCLUDE) /c $*.c @@ -37,8 +37,7 @@ SGIINCLUDE = -I../../src .c.pd_irix5: cc $(SGICFLAGS5) $(SGIINCLUDE) -o $*.o -c $*.c ld -elf -shared -rdata_shared -o $*.pd_irix5 $*.o - rm -f $*.o ../$*.pd_linux - ln -s $*.pd_linux .. + rm $*.o # ----------------------- IRIX 6.x ----------------------- @@ -52,7 +51,7 @@ SGICFLAGS6 = -n32 -DPD -DUNIX -DIRIX -DN32 -woff 1080,1064,1185 \ .c.pd_irix6: cc $(SGICFLAGS6) $(SGIINCLUDE) -o $*.o -c $*.c - ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o + ld -n32 -IPA -shared -rdata_shared -o $*.pd_irix6 $*.o rm $*.o # ----------------------- LINUX i386 ----------------------- @@ -61,20 +60,17 @@ pd_linux: $(NAME).pd_linux .SUFFIXES: .pd_linux -LINUXCFLAGS = -fPIC -DPD -O2 -funroll-loops -fomit-frame-pointer \ +LINUXCFLAGS = -DPD -O2 -funroll-loops -fomit-frame-pointer \ -Wall -W -Wshadow -Wstrict-prototypes -Werror \ -Wno-unused -Wno-parentheses -Wno-switch LINUXINCLUDE = -I../../src -LSTRIP = strip --strip-unneeded -R .note -R .comment - .c.pd_linux: cc $(LINUXCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - cc -Wl,-export_dynamic --shared -o $*.pd_linux $*.o -lm - $(LSTRIP) $*.pd_linux - rm -f $*.o ../$*.pd_linux - ln -s $*/$*.pd_linux .. + ld -export_dynamic -shared -o $*.pd_linux $*.o -lc -lm + strip --strip-unneeded $*.pd_linux + rm -f $*.o # ----------------------- Mac OSX ----------------------- @@ -87,9 +83,8 @@ DARWINCFLAGS = -DPD -O2 -Wall -W -Wshadow -Wstrict-prototypes \ .c.pd_darwin: cc $(DARWINCFLAGS) $(LINUXINCLUDE) -o $*.o -c $*.c - cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o - rm -f $*.o ../$*.pd_darwin - ln -s $*/$*.pd_darwin .. + cc -bundle -undefined suppress -flat_namespace -o $*.pd_darwin $*.o + rm -f $*.o # ---------------------------------------------------------- |