├── .gitignore
├── INSTALL.md
├── LICENSE
├── Makefile
├── README.md
├── help
├── attackTime-help.pd
├── attackTime~-help.pd
├── audio
│ ├── drum-loop-1.wav
│ ├── drum-loop-2.wav
│ ├── satie.wav
│ ├── testing.wav
│ ├── training.wav
│ └── voice2.wav
├── autoCorrPitch-help.pd
├── autoCorrPitch~-help.pd
├── bark-help.pd
├── barkSpec-help.pd
├── barkSpecBrightness-help.pd
├── barkSpecBrightness~-help.pd
├── barkSpecCentroid-help.pd
├── barkSpecCentroid~-help.pd
├── barkSpecFlatness-help.pd
├── barkSpecFlatness~-help.pd
├── barkSpecFlux-help.pd
├── barkSpecFlux~-help.pd
├── barkSpecIrregularity-help.pd
├── barkSpecIrregularity~-help.pd
├── barkSpecKurtosis-help.pd
├── barkSpecKurtosis~-help.pd
├── barkSpecRolloff-help.pd
├── barkSpecRolloff~-help.pd
├── barkSpecSkewness-help.pd
├── barkSpecSkewness~-help.pd
├── barkSpecSlope-help.pd
├── barkSpecSlope~-help.pd
├── barkSpecSpread-help.pd
├── barkSpecSpread~-help.pd
├── barkSpec~-help.pd
├── bark~-help.pd
├── bfcc-help.pd
├── bfcc~-help.pd
├── binWrangler-help.pd
├── cepstrum-help.pd
├── cepstrumPitch-help.pd
├── cepstrumPitch~-help.pd
├── cepstrum~-help.pd
├── chroma-help.pd
├── chroma~-help.pd
├── data
│ ├── cluster.txt
│ └── tID-help-labels.txt
├── dct-help.pd
├── dct~-help.pd
├── energy-help.pd
├── energyEntropy-help.pd
├── energyEntropy~-help.pd
├── energy~-help.pd
├── featureAccum-help.pd
├── featureDelta-help.pd
├── featureNorm-help.pd
├── harmonicRatio-help.pd
├── harmonicRatio~-help.pd
├── magSpec-help.pd
├── magSpec~-help.pd
├── maxSample-help.pd
├── maxSampleDelta-help.pd
├── maxSampleDelta~-help.pd
├── maxSample~-help.pd
├── melSpec-help.pd
├── melSpec~-help.pd
├── mfcc-help.pd
├── mfcc~-help.pd
├── minSample-help.pd
├── minSampleDelta-help.pd
├── minSampleDelta~-help.pd
├── minSample~-help.pd
├── nearestPoint-help.pd
├── peakSample-help.pd
├── peakSample~-help.pd
├── phaseSpec-help.pd
├── phaseSpec~-help.pd
├── sampleBuffer~-help.pd
├── specBrightness-help.pd
├── specBrightness~-help.pd
├── specCentroid-help.pd
├── specCentroid~-help.pd
├── specFlatness-help.pd
├── specFlatness~-help.pd
├── specFlux-help.pd
├── specFlux~-help.pd
├── specHarmonicity-help.pd
├── specHarmonicity~-help.pd
├── specIrregularity-help.pd
├── specIrregularity~-help.pd
├── specKurtosis-help.pd
├── specKurtosis~-help.pd
├── specRolloff-help.pd
├── specRolloff~-help.pd
├── specSkewness-help.pd
├── specSkewness~-help.pd
├── specSlope-help.pd
├── specSlope~-help.pd
├── specSpread-help.pd
├── specSpread~-help.pd
├── tID-conversion-help.pd
├── tID_fft-help.pd
├── tID_fft~-help.pd
├── tID_mean-help.pd
├── tID_std-help.pd
├── tabletool-help.pd
├── tempo~-help.pd
├── timbreID-help.pd
├── waveNoise-help.pd
├── waveNoise~-help.pd
├── waveSlope-help.pd
├── waveSlope~-help.pd
├── zeroCrossing-help.pd
└── zeroCrossing~-help.pd
├── include
└── tIDLib.h
├── pd-lib-builder
└── Makefile.pdlibbuilder
└── src
├── attackTime.c
├── attackTime~.c
├── autoCorrPitch.c
├── autoCorrPitch~.c
├── bark.c
├── bark2freq.c
├── barkSpec.c
├── barkSpecBrightness.c
├── barkSpecBrightness~.c
├── barkSpecCentroid.c
├── barkSpecCentroid~.c
├── barkSpecFlatness.c
├── barkSpecFlatness~.c
├── barkSpecFlux.c
├── barkSpecFlux~.c
├── barkSpecIrregularity.c
├── barkSpecIrregularity~.c
├── barkSpecKurtosis.c
├── barkSpecKurtosis~.c
├── barkSpecRolloff.c
├── barkSpecRolloff~.c
├── barkSpecSkewness.c
├── barkSpecSkewness~.c
├── barkSpecSlope.c
├── barkSpecSlope~.c
├── barkSpecSpread.c
├── barkSpecSpread~.c
├── barkSpec~.c
├── bark~.c
├── bfcc.c
├── bfcc~.c
├── bin2freq.c
├── binWrangler.c
├── cepstrum.c
├── cepstrumPitch.c
├── cepstrumPitch~.c
├── cepstrum~.c
├── chroma.c
├── chroma~.c
├── dct.c
├── dct~.c
├── energy.c
├── energyEntropy.c
├── energyEntropy~.c
├── energy~.c
├── featureAccum.c
├── featureDelta.c
├── featureNorm.c
├── freq2bark.c
├── freq2bin.c
├── freq2mel.c
├── harmonicRatio.c
├── harmonicRatio~.c
├── magSpec.c
├── magSpec~.c
├── maxSample.c
├── maxSampleDelta.c
├── maxSampleDelta~.c
├── maxSample~.c
├── mel2freq.c
├── melSpec.c
├── melSpec~.c
├── mfcc.c
├── mfcc~.c
├── minSample.c
├── minSampleDelta.c
├── minSampleDelta~.c
├── minSample~.c
├── nearestPoint.c
├── peakSample.c
├── peakSample~.c
├── phaseSpec.c
├── phaseSpec~.c
├── sampleBuffer~.c
├── specBrightness.c
├── specBrightness~.c
├── specCentroid.c
├── specCentroid~.c
├── specFlatness.c
├── specFlatness~.c
├── specFlux.c
├── specFlux~.c
├── specHarmonicity.c
├── specHarmonicity~.c
├── specIrregularity.c
├── specIrregularity~.c
├── specKurtosis.c
├── specKurtosis~.c
├── specRolloff.c
├── specRolloff~.c
├── specSkewness.c
├── specSkewness~.c
├── specSlope.c
├── specSlope~.c
├── specSpread.c
├── specSpread~.c
├── tIDLib.c
├── tID_fft.c
├── tID_fft~.c
├── tID_mean.c
├── tID_std.c
├── tabletool.c
├── tempo~.c
├── timbreID.c
├── timbreIDLib.c
├── waveNoise.c
├── waveNoise~.c
├── waveSlope.c
├── waveSlope~.c
├── zeroCrossing.c
└── zeroCrossing~.c
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | src/*.o
3 | help/data/*.timid
4 | timbreIDLib.*
5 |
--------------------------------------------------------------------------------
/INSTALL.md:
--------------------------------------------------------------------------------
1 | # Using timbreIDLib
2 |
3 | timbreIDLib is a library that contains many different Pd objects. If you already have the compiled timbreIDLib binary, you can use it in Pd by either:
4 |
5 |
6 | - using the [declare] object to load timbreIDLib as needed per patch
7 | - telling Pd to load the timbreIDLib binary file globally at startup via Pd's "Preferences/Startup" dialog
8 |
9 |
10 | For method 1, assuming timbreIDLib is installed to the default Externals Install Directory, you can simply use the [declare] object in your patch like this:
11 |
12 | > [declare -lib timbreIDLib]
13 |
14 | For method 2, make a new startup path in the Startup dialog, and provide the path to the timbreIDLib binary. Note that you must not list the extension of the timbreIDLib file (i.e., pd_linux, pd_darwin, or dll). For example:
15 |
16 | > /Users/yourname/Documents/Pd/externals/timbreIDLib
17 |
18 | When using Pd's Startup dialog on Windows, note that you can specify the path with forward slashes, and spaces in the path are ok. There is still no need to append the library file extension (dll). For instance:
19 |
20 | > C:/Users/Your Name/Documents/Pd/externals/timbreIDLib
21 |
22 | Once you have specified the path to timbreIDLib in the Startup dialog, you must quit and restart Pd.
23 |
24 | If timbreIDLib is loaded successfully (using either method), you will see a message in Pd's post window stating the timbreIDLib version number.
25 |
26 |
27 |
28 |
29 | # Notes on FFTW
30 |
31 | As of version 0.7, timbreIDLib uses the FFTW library available at http://www.fftw.org.
32 |
33 | FFTW is included as a pre-compiled shared library with timbreIDLib's Windows package available through deken. Simply leave libfftw3f-3.dll in the timbreIDLib directory and everything should work fine. For the Linux and macOS packages on deken, FFTW is statically linked with timbreIDLib.
34 |
35 | If you are compiling timbreIDLib from source (see below), you must link it with a single precision compilation of FFTW. To build FFTW in single precision under Linux, configure it like this:
36 |
37 | > ./configure CFLAGS="-fPIC" --enable-float
38 |
39 | and like this on macOS:
40 |
41 | > ./configure CFLAGS="-arch arm64 -arch x86_64" --enable-float
42 |
43 | and like this on a Raspberry Pi:
44 |
45 | > ./configure CFLAGS="-fPIC" --enable-float
46 |
47 | Then run:
48 |
49 | > make
50 | >
51 | > sudo make install
52 |
53 | On Linux and macOS, the FFTW library files should be installed to /usr/local/lib by default.
54 |
55 |
56 |
57 |
58 | # Building timbreIDLib From Source
59 |
60 | As of timbreIDLib 0.7.8, pd-lib-builder is used for building:
61 |
62 | > https://github.com/pure-data/pd-lib-builder
63 |
64 | A (likely outdated) version of pd-lib-builder is already included with the timbreIDLib source, but you can update it via the link above if needed. If you have already compiled and installed FFTW, you can make timbreIDLib from the command line by typing "make" in this directory. On Linux and macOS, timbreIDLib will statically link to the FFTW library.
65 |
66 | On Windows, you can use MSYS2 (https://msys2.org) to compile timbreIDLib from the command line. You may need to edit the location and name of the FFTW library in timbreIDLib/Makefile because the libfftw3f-3.dll binary and FFTW header file may not be installed to the expected default locations on your system. Further, Windows expects the FFTW binary name to be "fftw3f-3" rather than the Linux/macOS expectation of "fftw3f." Simply change the ldlibs and cflags lines of timbreIDLib/Makefile to:
67 |
68 | > ldlibs = -LC:/my/fftw/library/directory -lfftw3f-3
69 |
70 | > cflags = -Iinclude -IC:/my/fftw/library/directory
71 |
72 | Finally, after successful compilation, you will either have to set up an environment variable to point to the location of libfftw3f-3.dll, or simply put libfftw3f-3.dll directly in the timbreIDLib directory so that the timbreIDLib.dll binary can access the shared FFTW library.
73 |
74 | The FFTW library for Windows is available precompiled at:
75 |
76 | > http://www.fftw.org/install/windows.html
77 |
78 | You will need the single precision version specifically. Their provided zip file contains several compiled versions of FFTW, but only libfftw3f-3.dll is required for timbreIDLib.
79 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### timbreIDLib ###
2 |
3 | timbreIDLib is a library of audio analysis externals for Pure Data. The classification external [timbreID] accepts arbitrary lists of audio features and attempts to find the best match between an input feature and previously stored training instances. The library can be used for a variety of real-time and non-real-time applications, including sound classification, sound searching, sound visualization, automatic segmenting, ordering of sounds by timbre, key and tempo estimation, and concatenative synthesis.
4 |
5 | 
6 |
7 |
8 | ### Examples Package ###
9 |
10 | [Download the latest examples package here](http://williambrent.conflations.com/pd/timbreID/timbreIDLib-examples-v2.0.zip)
11 | [Video demo of timbre space example](http://williambrent.conflations.com/mov/timbre-space-june-2019.mp4)
12 |
13 |
14 | 
15 |
--------------------------------------------------------------------------------
/help/audio/drum-loop-1.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/drum-loop-1.wav
--------------------------------------------------------------------------------
/help/audio/drum-loop-2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/drum-loop-2.wav
--------------------------------------------------------------------------------
/help/audio/satie.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/satie.wav
--------------------------------------------------------------------------------
/help/audio/testing.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/testing.wav
--------------------------------------------------------------------------------
/help/audio/training.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/training.wav
--------------------------------------------------------------------------------
/help/audio/voice2.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wbrent/timbreIDLib/6a4f1b5d6256b82b55adf8e6ff58521c4261d186/help/audio/voice2.wav
--------------------------------------------------------------------------------
/help/autoCorrPitch-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 199 191 922 651 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 50 310 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
4 | #000000;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-waveform 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 47 47 graph;
9 | #X text 72 307 Bang to analyze the entire array.;
10 | #N canvas 721 350 482 216 soundfile 0;
11 | #X obj 50 103 soundfiler;
12 | #X obj 50 24 loadbang;
13 | #X obj 50 46 f \$0;
14 | #X msg 50 78 read -resize ./audio/voice2.wav \$1-sample;
15 | #X obj 185 120 table \$0-sample;
16 | #X obj 50 125 - 1024;
17 | #X obj 50 147 pack f \$0;
18 | #X msg 50 169 \; \$2-scrub-bar-set range 0 \$1 \;;
19 | #X connect 0 0 5 0;
20 | #X connect 1 0 2 0;
21 | #X connect 2 0 3 0;
22 | #X connect 3 0 0 0;
23 | #X connect 5 0 6 0;
24 | #X connect 6 0 7 0;
25 | #X restore 655 86 pd soundfile;
26 | #X msg 107 455 analyze \$1 1024;
27 | #N canvas 722 238 304 333 waveform 0;
28 | #X obj 46 61 inlet;
29 | #X obj 46 82 t f f;
30 | #X obj 91 131 + 1023;
31 | #X msg 46 200 copy_range 0 \$3-sample \$1 \$2;
32 | #X obj 46 164 pack f f \$0;
33 | #X obj 46 241 tabletool \$0-waveform;
34 | #X connect 0 0 1 0;
35 | #X connect 1 0 4 0;
36 | #X connect 1 1 2 0;
37 | #X connect 2 0 4 1;
38 | #X connect 3 0 5 0;
39 | #X connect 4 0 3 0;
40 | #X restore 655 138 pd waveform;
41 | #X obj 50 243 hsl 800 25 0 38051 0 0 \$0-scrub-bar \$0-scrub-bar-set
42 | Scrub-bar -2 -8 0 12 #b8b8b8 #000000 #000000 0 1;
43 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
44 | 0;
45 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
46 | 0;
47 | #N canvas 911 367 625 290 other-settings 0;
48 | #X msg 54 51 set another-sample-array;
49 | #X msg 94 91 samplerate 48000;
50 | #X text 242 50 Read from a different array;
51 | #X obj 54 221 outlet;
52 | #X text 228 90 Specify your sample's sampling rate. (default: 44100)
53 | ;
54 | #X msg 174 171 print;
55 | #X text 224 173 Print current settings in the post window;
56 | #X msg 134 131 threshold 50;
57 | #X text 241 126 Set threshold for detecting correlation peak in percent
58 | (default: 60);
59 | #X connect 0 0 3 0;
60 | #X connect 1 0 3 0;
61 | #X connect 5 0 3 0;
62 | #X connect 7 0 3 0;
63 | #X restore 152 498 pd other-settings;
64 | #X obj 107 433 r \$0-scrub-bar;
65 | #X obj 655 116 r \$0-scrub-bar;
66 | #X text 245 436 Move through the soundfile with the slider above,
67 | f 28;
68 | #X floatatom 50 568 5 0 0 0 - - - 0;
69 | #X text 48 613 Output value is pitch in MIDI units;
70 | #X obj 677 612 declare -lib timbreIDLib;
71 | #X obj 50 546 autoCorrPitch \$0-sample;
72 | #X text 675 572 Updated for timbreIDLib version 0.9;
73 | #X text 675 592 June 2022;
74 | #X obj 598 438 autoCorrPitch~;
75 | #X text 596 389 See the real-time version for more information on autocorrelation
76 | pitch tracking in general., f 38;
77 | #X msg 94 379 analyze 24100 2000;
78 | #X text 92 345 Analyze a window starting at sample 24100 that is 2000
79 | samples long (samples 24100 - 26099).;
80 | #X text 222 541 Creation argument is the name of the sample array to
81 | analyze., f 37;
82 | #X connect 0 0 16 0;
83 | #X connect 4 0 16 0;
84 | #X connect 9 0 16 0;
85 | #X connect 10 0 4 0;
86 | #X connect 11 0 5 0;
87 | #X connect 16 0 13 0;
88 | #X connect 21 0 16 0;
89 |
--------------------------------------------------------------------------------
/help/autoCorrPitch~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 252 172 988 678 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
4 | #000000 #000000;
5 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
6 | #000000 0 1;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
10 | 0;
11 | #N canvas 876 349 587 271 other-settings 0;
12 | #X obj 55 212 outlet;
13 | #X msg 135 140 print;
14 | #X text 185 142 Print current settings in the post window;
15 | #X msg 95 100 overlap 2;
16 | #X text 176 88 Inside a subpatch with re-blocking involving overlap
17 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
18 | things to behave properly;
19 | #X msg 55 60 threshold 50;
20 | #X text 162 55 Set threshold for detecting correlation peak in percent
21 | (default: 60);
22 | #X connect 1 0 0 0;
23 | #X connect 3 0 0 0;
24 | #X connect 5 0 0 0;
25 | #X restore 237 300 pd other-settings;
26 | #X msg 193 243 window 2000;
27 | #X text 275 243 Change analysis window size;
28 | #X text 172 153 Bang repeatedly to keep refreshing..., f 21;
29 | #N canvas 0 50 450 278 (subpatch) 0;
30 | #X array acPitch 100 float 0;
31 | #X coords 0 64 99 40 200 140 1 0 0;
32 | #X restore 523 305 graph;
33 | #X obj 241 466 f;
34 | #X obj 271 458 + 1;
35 | #X obj 271 480 % 100;
36 | #X obj 137 212 t b b;
37 | #X obj 57 72 adc~;
38 | #X text 105 115 Bang to output pitch;
39 | #X obj 137 190 metro 20;
40 | #X floatatom 84 460 10 0 0 0 - - - 0;
41 | #X obj 688 536 timbreID;
42 | #X text 521 471 This feature can be sent to the timbreID external in
43 | order to identify timbres in real time. For more on using audio features
44 | for classification \, see the timbreID helpfile:;
45 | #X obj 678 641 declare -lib timbreIDLib;
46 | #X obj 57 387 autoCorrPitch~ 2048;
47 | #X text 677 599 Updated for timbreIDLib version 0.9;
48 | #X text 677 619 June 2022;
49 | #X obj 57 501 tabwrite acPitch;
50 | #X text 189 387 Creation argument is window size in samples., f 45
51 | ;
52 | #X text 521 34 autoCorrPitch~ works by calculating the autocorrelation
53 | of an incoming periodic signal and finding the distance between correlation
54 | peaks in the results. The distance between peaks is related to the
55 | period of the signal in samples \, which is then converted to Hz and
56 | finally MIDI units.;
57 | #X text 521 104 Autocorrelation is a time-domain calculation. In order
58 | to get accurate results \, a full period of the incoming signal must
59 | be captured \, so window size must be chosen carefullly. For instance
60 | \, at a sampling rate of 44.1kHz \, using a window size of 512 samples
61 | will only produce meaningful results for signals above ~90Hz. Increasing
62 | window size to 1024 can extract frequencies as low as ~45Hz.;
63 | #X text 521 201 Audio buffering is taken care of by the external \,
64 | so there is no need for tabreceive~ or block~. You can set the window
65 | size with a creation argument \, or change it with the "window" message.
66 | Window size is not required to be a power of two.;
67 | #X connect 0 0 20 0;
68 | #X connect 1 0 15 0;
69 | #X connect 4 0 20 0;
70 | #X connect 5 0 20 0;
71 | #X connect 9 0 10 0;
72 | #X connect 9 0 23 1;
73 | #X connect 10 0 11 0;
74 | #X connect 11 0 9 1;
75 | #X connect 12 0 20 0;
76 | #X connect 12 1 9 0;
77 | #X connect 13 0 20 0;
78 | #X connect 15 0 12 0;
79 | #X connect 20 0 16 0;
80 | #X connect 20 0 23 0;
81 |
--------------------------------------------------------------------------------
/help/barkSpecBrightness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 314 128 904 547 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 143 128 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X text 178 163 Change window size.;
6 | #X obj 55 79 *~;
7 | #X obj 84 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
8 | ;
9 | #X obj 107 79 *~;
10 | #X obj 136 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
11 | 1;
12 | #X obj 55 48 noise~;
13 | #X text 140 110 Bang to output brightness.;
14 | #X obj 107 48 osc~ 440;
15 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
16 | 0;
17 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
18 | 0;
19 | #N canvas 592 23 765 615 other-settings 0;
20 | #X obj 24 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
21 | -1 3;
22 | #X msg 24 106 window_function \$1;
23 | #X msg 125 217 power_spectrum \$1;
24 | #X obj 125 199 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
25 | 1;
26 | #X obj 24 535 outlet;
27 | #X text 266 217 Use power spectrum. (default: magnitude);
28 | #X msg 83 163 filterbank 1;
29 | #X msg 283 457 print;
30 | #X obj 171 279 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
31 | 1;
32 | #X msg 171 299 spec_band_avg \$1;
33 | #X obj 201 339 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
34 | 1;
35 | #X msg 201 359 filter_avg \$1;
36 | #X text 333 459 Print current settings in the post window;
37 | #X text 22 49 Change windowing function. Rectangular (0) \, Blackman
38 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
39 | ;
40 | #X text 183 163 Construct a new filterbank with a specific spacing.
41 | ;
42 | #X msg 250 406 overlap 2;
43 | #X text 331 394 Inside a subpatch with re-blocking involving overlap
44 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
45 | things to behave properly;
46 | #X text 227 327 If using the triangular Bark spaced filters \, you
47 | can either sum or average the energy in each filter (default: sum)
48 | ;
49 | #X text 197 247 Rather than sum energy in the triangular Bark spaced
50 | filters to get the amount of energy in each Bark band \, you can average
51 | energy in the unfiltered bins (default: OFF);
52 | #X connect 0 0 1 0;
53 | #X connect 1 0 4 0;
54 | #X connect 2 0 4 0;
55 | #X connect 3 0 2 0;
56 | #X connect 6 0 4 0;
57 | #X connect 7 0 4 0;
58 | #X connect 8 0 9 0;
59 | #X connect 9 0 4 0;
60 | #X connect 10 0 11 0;
61 | #X connect 11 0 4 0;
62 | #X connect 15 0 4 0;
63 | #X restore 216 300 pd other-settings;
64 | #X msg 180 181 window 3000;
65 | #X obj 55 408 barkSpecBrightness~ 1024 0.5 8.5;
66 | #X msg 207 235 boundary 10;
67 | #X text 206 217 Set boundary point in Barks;
68 | #X text 651 466 Updated for timbreIDLib version 0.7;
69 | #X text 299 402 Creation arguments are window size in samples \, filterbank
70 | spacing in Barks \, and boundary point in Barks;
71 | #X obj 601 298 timbreID;
72 | #X obj 55 442 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
73 | -262144 -1 -1 0 256;
74 | #X text 434 34 Bark Spectrum Brightness is the ratio of the sum of
75 | energy above a given boundary point in Barks to the sum of all energy
76 | in a Bark spectrum. Signals with a lot of high Bark frequency content
77 | will have high brightness. At left \, noise will have much higher brightness
78 | than a sinusoid at 440 Hz.;
79 | #X text 434 114 Audio buffering and windowing are taken care of by
80 | the external \, so there is no need for tabreceive~ or block~. You
81 | can set the window size with a creation argument \, or change it with
82 | the "window" message. Window size is not required to be a power of
83 | two. The second creation argument specifies the Bark-spacing of the
84 | filterbank. This can also be changed later with the "filterbank" message.
85 | The third creation argument sets the boundary point in Barks.;
86 | #X text 433 238 This feature can be sent to the timbreID external in
87 | order to identify timbres in real time. For more on using audio features
88 | for classification \, see the timbreID helpfile:;
89 | #X text 651 486 July 2017;
90 | #X obj 653 511 declare -lib timbreIDLib;
91 | #X connect 0 0 13 0;
92 | #X connect 2 0 13 0;
93 | #X connect 3 0 2 1;
94 | #X connect 4 0 13 0;
95 | #X connect 5 0 4 1;
96 | #X connect 6 0 2 0;
97 | #X connect 8 0 4 0;
98 | #X connect 11 0 13 0;
99 | #X connect 12 0 13 0;
100 | #X connect 13 0 19 0;
101 | #X connect 14 0 13 0;
102 |
--------------------------------------------------------------------------------
/help/barkSpecCentroid~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 295 113 907 543 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 98 159 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 160 190 Bang repeatedly...;
6 | #X obj 136 191 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
7 | 1;
8 | #X obj 617 346 timbreID;
9 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #N canvas 629 66 730 632 other-settings 0;
14 | #X obj 24 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
15 | -1 0;
16 | #X msg 24 106 window_function \$1;
17 | #X msg 82 176 power_spectrum \$1;
18 | #X obj 82 158 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
19 | 1;
20 | #X obj 24 575 outlet;
21 | #X text 241 243 Construct a new filterbank with a specific spacing.
22 | ;
23 | #X text 223 176 Use power spectrum. (default: magnitude);
24 | #X text 22 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X msg 320 504 print;
28 | #X obj 238 384 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X msg 238 404 spec_band_avg \$1;
31 | #X obj 268 444 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 268 464 filter_avg \$1;
34 | #X text 370 506 Print current settings in the post window;
35 | #X text 294 432 If using the triangular Bark spaced filters \, you
36 | can either sum or average the energy in each filter (default: sum)
37 | ;
38 | #X text 264 352 Rather than sum energy in the triangular Bark spaced
39 | filters to get the amount of energy in each Bark band \, you can average
40 | energy in the unfiltered bins (default: OFF);
41 | #X msg 183 302 overlap 2;
42 | #X text 264 290 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X msg 141 243 filterbank 1;
46 | #X connect 0 0 1 0;
47 | #X connect 1 0 4 0;
48 | #X connect 2 0 4 0;
49 | #X connect 3 0 2 0;
50 | #X connect 8 0 4 0;
51 | #X connect 9 0 10 0;
52 | #X connect 10 0 4 0;
53 | #X connect 11 0 12 0;
54 | #X connect 12 0 4 0;
55 | #X connect 16 0 4 0;
56 | #X connect 18 0 4 0;
57 | #X restore 216 320 pd other-settings;
58 | #X obj 56 49 noise~;
59 | #X obj 56 437 barkSpecCentroid~ 1024 0.5;
60 | #X text 95 142 Bang to output centroid;
61 | #X msg 172 263 window 2000;
62 | #X text 171 245 Change analysis window size;
63 | #X text 260 431 Creation arguments are window size in samples \, and
64 | filterbank spacing in Barks;
65 | #X obj 56 111 bp~ 1000 3;
66 | #X obj 121 32 loadbang;
67 | #X msg 121 54 7;
68 | #X obj 121 76 bark2freq;
69 | #X text 675 460 Updated for timbreIDLib version 0.7;
70 | #X text 449 286 This feature can be sent to the timbreID external in
71 | order to identify timbres in real time. For more on using audio features
72 | for classification \, see the timbreID helpfile:;
73 | #X text 450 171 Audio buffering and windowing are taken care of by
74 | the external \, so there is no need for tabreceive~ or block~. You
75 | can set the window size with a creation argument \, or change it with
76 | the "window" message. Window size is not required to be a power of
77 | two. The second creation argument specifies the Bark-spacing of the
78 | filterbank. This can also be changed later with the "filterbank" message.
79 | ;
80 | #X obj 56 475 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
81 | -262144 -1 -1 0 256;
82 | #X obj 136 210 metro 100;
83 | #X text 675 480 July 2017;
84 | #X text 450 21 Bark spectrum centroid is the center of mass of the
85 | Bark spectrum. It is computed as the ratio of the sum of Bark spectrum
86 | energy weighted by Bark frequency to the sum of all Bark spectrum energy.
87 | Therefore \, it reports the Bark frequency associated with Bark spectrum
88 | center of mass. This is demonstrated at left \, where white noise is
89 | band pass filtered with a center frequency of 7 Barks and low Q (allowing
90 | plenty of energy above and below 7 Barks to pass through as well).
91 | Despite the low filter Q \, the centroid reliably hovers near 7 Barks.
92 | ;
93 | #X obj 677 505 declare -lib timbreIDLib;
94 | #X connect 0 0 8 0;
95 | #X connect 2 0 21 0;
96 | #X connect 6 0 8 0;
97 | #X connect 7 0 13 0;
98 | #X connect 8 0 20 0;
99 | #X connect 10 0 8 0;
100 | #X connect 13 0 8 0;
101 | #X connect 14 0 15 0;
102 | #X connect 15 0 16 0;
103 | #X connect 16 0 13 1;
104 | #X connect 21 0 8 0;
105 |
--------------------------------------------------------------------------------
/help/barkSpecFlatness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 324 262 941 529 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 159 155 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X obj 569 319 timbreID;
6 | #X obj 107 58 osc~ 440;
7 | #X obj 55 89 *~;
8 | #X obj 84 89 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
9 | ;
10 | #X obj 107 89 *~;
11 | #X obj 136 89 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
12 | 1;
13 | #X obj 55 58 noise~;
14 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
15 | 0;
16 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
17 | 0;
18 | #N canvas 676 230 772 568 other-settings 0;
19 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
20 | -1 0;
21 | #X msg 54 106 window_function \$1;
22 | #X msg 155 197 power_spectrum \$1;
23 | #X obj 155 179 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
24 | 1;
25 | #X obj 54 505 outlet;
26 | #X text 296 197 Use power spectrum. (default: magnitude);
27 | #X msg 109 147 window 4000;
28 | #X msg 320 434 print;
29 | #X obj 238 314 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
30 | 1;
31 | #X msg 238 334 spec_band_avg \$1;
32 | #X obj 268 374 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
33 | 1;
34 | #X msg 268 394 filter_avg \$1;
35 | #X text 370 436 Print current settings in the post window;
36 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
37 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
38 | ;
39 | #X msg 198 239 filterbank 1;
40 | #X text 294 362 If using the triangular Bark spaced filters \, you
41 | can either sum or average the energy in each filter (default: sum)
42 | ;
43 | #X text 264 282 Rather than sum energy in the triangular Bark spaced
44 | filters to get the amount of energy in each Bark band \, you can average
45 | energy in the unfiltered bins (default: OFF);
46 | #X text 289 241 Construct a new filterbank with a specific spacing.
47 | ;
48 | #X connect 0 0 1 0;
49 | #X connect 1 0 4 0;
50 | #X connect 2 0 4 0;
51 | #X connect 3 0 2 0;
52 | #X connect 6 0 4 0;
53 | #X connect 7 0 4 0;
54 | #X connect 8 0 9 0;
55 | #X connect 9 0 4 0;
56 | #X connect 10 0 11 0;
57 | #X connect 11 0 4 0;
58 | #X connect 14 0 4 0;
59 | #X restore 227 262 pd other-settings;
60 | #X obj 55 391 barkSpecFlatness~ 1024 0.5;
61 | #X text 650 453 Updated for timbreIDLib version 0.7;
62 | #X text 433 249 This feature can be sent to the timbreID external in
63 | order to identify timbres in real time. For more on using audio features
64 | for classification \, see the timbreID helpfile:;
65 | #X text 434 134 Audio buffering and windowing are taken care of by
66 | the external \, so there is no need for tabreceive~ or block~. You
67 | can set the window size with a creation argument \, or change it with
68 | the "window" message. Window size is not required to be a power of
69 | two. The second creation argument specifies the Bark-spacing of the
70 | filterbank. This can also be changed later with the "filterbank" message.
71 | ;
72 | #X obj 55 429 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
73 | -262144 -1 -1 0 256;
74 | #X text 166 90 Activate a signal;
75 | #X msg 193 215 window 2000;
76 | #X text 249 384 Creation arguments are window size in samples and filterbank
77 | spacing in Barks;
78 | #X text 434 41 Bark spectrum flatness is the ratio of the geometric
79 | mean of a Bark spectrum to its arithmetic mean. A very noisy Bark spectrum
80 | with equal energy across all Bark bands will have a high flatness value
81 | \, where 1 is perfect flatness. The flatness of noise~ is about 0.5
82 | \, while the flatness of a sinusoid only gets as high as about 0.0004.
83 | ;
84 | #X text 156 134 bang to output flatness;
85 | #X text 191 197 Change window size;
86 | #X text 650 473 July 2017;
87 | #X obj 651 494 declare -lib timbreIDLib;
88 | #X connect 0 0 11 0;
89 | #X connect 2 0 5 0;
90 | #X connect 3 0 11 0;
91 | #X connect 4 0 3 1;
92 | #X connect 5 0 11 0;
93 | #X connect 6 0 5 1;
94 | #X connect 7 0 3 0;
95 | #X connect 10 0 11 0;
96 | #X connect 11 0 15 0;
97 | #X connect 17 0 11 0;
98 |
--------------------------------------------------------------------------------
/help/barkSpecKurtosis~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 292 117 958 543 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 190 204 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X text 252 235 Bang repeatedly...;
6 | #X obj 228 236 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
7 | 1;
8 | #X obj 640 299 timbreID;
9 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #N canvas 626 81 776 632 other-settings 0;
14 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
15 | -1 0;
16 | #X msg 54 106 window_function \$1;
17 | #X msg 112 176 power_spectrum \$1;
18 | #X obj 112 158 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
19 | 1;
20 | #X obj 54 575 outlet;
21 | #X text 271 243 Construct a new filterbank with a specific spacing.
22 | ;
23 | #X text 253 176 Use power spectrum. (default: magnitude);
24 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X msg 350 504 print;
28 | #X obj 268 384 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X msg 268 404 spec_band_avg \$1;
31 | #X obj 298 444 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 298 464 filter_avg \$1;
34 | #X text 400 506 Print current settings in the post window;
35 | #X text 324 432 If using the triangular Bark spaced filters \, you
36 | can either sum or average the energy in each filter (default: sum)
37 | ;
38 | #X text 294 352 Rather than sum energy in the triangular Bark spaced
39 | filters to get the amount of energy in each Bark band \, you can average
40 | energy in the unfiltered bins (default: OFF);
41 | #X msg 213 302 overlap 2;
42 | #X text 294 290 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X msg 171 243 filterbank 1;
46 | #X connect 0 0 1 0;
47 | #X connect 1 0 4 0;
48 | #X connect 2 0 4 0;
49 | #X connect 3 0 2 0;
50 | #X connect 8 0 4 0;
51 | #X connect 9 0 10 0;
52 | #X connect 10 0 4 0;
53 | #X connect 11 0 12 0;
54 | #X connect 12 0 4 0;
55 | #X connect 16 0 4 0;
56 | #X connect 18 0 4 0;
57 | #X restore 308 365 pd other-settings;
58 | #X msg 264 308 window 2000;
59 | #X text 263 290 Change analysis window size;
60 | #X text 281 427 Creation arguments are window size in samples \, and
61 | filterbank spacing in Barks;
62 | #X text 705 460 Updated for timbreIDLib version 0.7;
63 | #X text 472 239 This feature can be sent to the timbreID external in
64 | order to identify timbres in real time. For more on using audio features
65 | for classification \, see the timbreID helpfile:;
66 | #X text 473 127 Audio buffering and windowing are taken care of by
67 | the external \, so there is no need for tabreceive~ or block~. You
68 | can set the window size with a creation argument \, or change it with
69 | the "window" message. Window size is not required to be a power of
70 | two. The second creation argument specifies the Bark-spacing of the
71 | filterbank. This can also be changed later with the "filterbank" message.
72 | ;
73 | #X obj 56 475 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
74 | -262144 -1 -1 0 256;
75 | #X obj 56 40 noise~;
76 | #X obj 157 141 *~;
77 | #X obj 193 141 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
78 | 1;
79 | #X obj 157 82 osc~ 880;
80 | #X obj 56 174 +~;
81 | #X floatatom 113 53 5 0 0 1 Q - -;
82 | #X obj 56 141 *~;
83 | #X obj 92 141 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
84 | 1;
85 | #X obj 56 82 bp~ 1000 1;
86 | #X obj 56 104 bp~ 1000 1;
87 | #X obj 228 255 metro 100;
88 | #X text 473 34 Bark spectrum kurtosis measures the peakedness of a
89 | Bark spectrum. The kurtosis of a single sinusoid will be extremely
90 | high \, while that of noise will be extremely low. Raise the Q on the
91 | band-passed noise to make its Bark spectrum more and more peaked \,
92 | and see how kurtosis reflects the changes.;
93 | #X obj 56 437 barkSpecKurtosis~ 1024 0.5;
94 | #X text 187 187 Bang to output kurtosis;
95 | #X text 705 480 July 2017;
96 | #X obj 705 502 declare -lib timbreIDLib;
97 | #X connect 0 0 26 0;
98 | #X connect 2 0 24 0;
99 | #X connect 6 0 26 0;
100 | #X connect 7 0 26 0;
101 | #X connect 14 0 22 0;
102 | #X connect 15 0 18 1;
103 | #X connect 16 0 15 1;
104 | #X connect 17 0 15 0;
105 | #X connect 18 0 26 0;
106 | #X connect 19 0 22 2;
107 | #X connect 19 0 23 2;
108 | #X connect 20 0 18 0;
109 | #X connect 21 0 20 1;
110 | #X connect 22 0 23 0;
111 | #X connect 23 0 20 0;
112 | #X connect 24 0 26 0;
113 | #X connect 26 0 13 0;
114 |
--------------------------------------------------------------------------------
/help/barkSpecRolloff~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 311 132 939 547 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 143 128 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X text 178 163 Change window size.;
6 | #X obj 55 79 *~;
7 | #X obj 84 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
8 | ;
9 | #X obj 107 79 *~;
10 | #X obj 136 79 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
11 | 1;
12 | #X obj 55 48 noise~;
13 | #X obj 107 48 osc~ 440;
14 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
15 | 0;
16 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
17 | 0;
18 | #N canvas 589 81 813 615 other-settings 0;
19 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
20 | -1 3;
21 | #X msg 54 106 window_function \$1;
22 | #X msg 155 217 power_spectrum \$1;
23 | #X obj 155 199 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
24 | 1;
25 | #X obj 54 535 outlet;
26 | #X text 296 217 Use power spectrum. (default: magnitude);
27 | #X msg 113 163 filterbank 1;
28 | #X msg 313 457 print;
29 | #X obj 201 279 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
30 | 1;
31 | #X msg 201 299 spec_band_avg \$1;
32 | #X obj 231 339 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
33 | 1;
34 | #X msg 231 359 filter_avg \$1;
35 | #X text 363 459 Print current settings in the post window;
36 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
37 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
38 | ;
39 | #X text 213 163 Construct a new filterbank with a specific spacing.
40 | ;
41 | #X msg 280 406 overlap 2;
42 | #X text 361 394 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X text 257 327 If using the triangular Bark spaced filters \, you
46 | can either sum or average the energy in each filter (default: sum)
47 | ;
48 | #X text 227 247 Rather than sum energy in the triangular Bark spaced
49 | filters to get the amount of energy in each Bark band \, you can average
50 | energy in the unfiltered bins (default: OFF);
51 | #X connect 0 0 1 0;
52 | #X connect 1 0 4 0;
53 | #X connect 2 0 4 0;
54 | #X connect 3 0 2 0;
55 | #X connect 6 0 4 0;
56 | #X connect 7 0 4 0;
57 | #X connect 8 0 9 0;
58 | #X connect 9 0 4 0;
59 | #X connect 10 0 11 0;
60 | #X connect 11 0 4 0;
61 | #X connect 15 0 4 0;
62 | #X restore 216 300 pd other-settings;
63 | #X text 681 476 Updated for timbreIDLib version 0.7;
64 | #X obj 631 328 timbreID;
65 | #X obj 55 442 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
66 | -262144 -1 -1 0 256;
67 | #X text 463 268 This feature can be sent to the timbreID external in
68 | order to identify timbres in real time. For more on using audio features
69 | for classification \, see the timbreID helpfile:;
70 | #X obj 55 408 barkSpecRolloff~ 1024 0.5 0.85;
71 | #X text 299 400 Creation arguments are window size in samples \, filterbank
72 | spacing in Barks \, and concentration threshold;
73 | #X msg 207 249 concentration 0.7;
74 | #X text 206 217 Change the concentration threshold, f 23;
75 | #X msg 180 181 window 2000;
76 | #X text 464 140 Audio buffering and windowing are taken care of by
77 | the external \, so there is no need for tabreceive~ or block~. You
78 | can set the window size with a creation argument \, or change it with
79 | the "window" message. Window size is not required to be a power of
80 | two. The second creation argument specifies the Bark-spacing of the
81 | filterbank. This can also be changed later with the "filterbank" message.
82 | The third creation argument sets the concentration threshold \, which
83 | must be between 0 and 1.0.;
84 | #X text 53 488 Output is the Bark frequency band below which most of
85 | the Bark spectrum energy is concentrated.;
86 | #X text 464 34 Bark spectrum rolloff is the Bark frequency below which
87 | a certain amount of spectral energy is concentrated. The default concentration
88 | is 0.85 \, but you can change this with the concentration message.
89 | Keep in mind that roll-off reports the Bark frequency associated with
90 | the Bark spectrum band of the filterbank being used \, and results
91 | depend on filterbank spacing.;
92 | #X text 140 110 Bang to output rolloff;
93 | #X text 681 496 July 2017;
94 | #X obj 682 517 declare -lib timbreIDLib;
95 | #X connect 0 0 15 0;
96 | #X connect 2 0 15 0;
97 | #X connect 3 0 2 1;
98 | #X connect 4 0 15 0;
99 | #X connect 5 0 4 1;
100 | #X connect 6 0 2 0;
101 | #X connect 7 0 4 0;
102 | #X connect 10 0 15 0;
103 | #X connect 15 0 13 0;
104 | #X connect 17 0 15 0;
105 | #X connect 19 0 15 0;
106 |
--------------------------------------------------------------------------------
/help/barkSpecSkewness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 292 117 907 620 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 88 243 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 150 274 Bang repeatedly...;
6 | #X obj 126 275 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
7 | 1;
8 | #X obj 597 376 timbreID;
9 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #N canvas 626 81 780 632 other-settings 0;
14 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
15 | -1 0;
16 | #X msg 54 106 window_function \$1;
17 | #X msg 112 176 power_spectrum \$1;
18 | #X obj 112 158 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
19 | 1;
20 | #X obj 54 575 outlet;
21 | #X text 271 243 Construct a new filterbank with a specific spacing.
22 | ;
23 | #X text 253 176 Use power spectrum. (default: magnitude);
24 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X msg 350 504 print;
28 | #X obj 268 384 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X msg 268 404 spec_band_avg \$1;
31 | #X obj 298 444 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 298 464 filter_avg \$1;
34 | #X text 400 506 Print current settings in the post window;
35 | #X text 324 432 If using the triangular Bark spaced filters \, you
36 | can either sum or average the energy in each filter (default: sum)
37 | ;
38 | #X text 294 352 Rather than sum energy in the triangular Bark spaced
39 | filters to get the amount of energy in each Bark band \, you can average
40 | energy in the unfiltered bins (default: OFF);
41 | #X msg 213 302 overlap 2;
42 | #X text 294 290 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X msg 171 243 filterbank 1;
46 | #X connect 0 0 1 0;
47 | #X connect 1 0 4 0;
48 | #X connect 2 0 4 0;
49 | #X connect 3 0 2 0;
50 | #X connect 8 0 4 0;
51 | #X connect 9 0 10 0;
52 | #X connect 10 0 4 0;
53 | #X connect 11 0 12 0;
54 | #X connect 12 0 4 0;
55 | #X connect 16 0 4 0;
56 | #X connect 18 0 4 0;
57 | #X restore 206 404 pd other-settings;
58 | #X msg 162 347 window 2000;
59 | #X text 161 329 Change analysis window size;
60 | #X text 260 493 Creation arguments are window size in samples \, and
61 | filterbank spacing in Barks;
62 | #X text 635 532 Updated for timbreIDLib version 0.7;
63 | #X text 429 316 This feature can be sent to the timbreID external in
64 | order to identify timbres in real time. For more on using audio features
65 | for classification \, see the timbreID helpfile:;
66 | #X text 430 201 Audio buffering and windowing are taken care of by
67 | the external \, so there is no need for tabreceive~ or block~. You
68 | can set the window size with a creation argument \, or change it with
69 | the "window" message. Window size is not required to be a power of
70 | two. The second creation argument specifies the Bark-spacing of the
71 | filterbank. This can also be changed later with the "filterbank" message.
72 | ;
73 | #X obj 46 539 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
74 | -262144 -1 -1 0 256;
75 | #X obj 46 51 noise~;
76 | #X obj 46 111 lop~;
77 | #X obj 110 52 hsl 128 15 0 26 0 0 empty empty empty -2 -8 0 10 -262144
78 | -1 -1 0 1;
79 | #X floatatom 107 112 10 0 0 0 - - -;
80 | #X obj 46 133 lop~;
81 | #X obj 126 294 metro 100;
82 | #X obj 46 501 barkSpecSkewness~ 1024 0.5;
83 | #X obj 107 92 bark2freq;
84 | #X floatatom 107 72 5 0 0 0 - - -;
85 | #X text 85 226 Bang to output skewness;
86 | #X text 635 552 July 2017;
87 | #X text 430 45 Bark spectrum skewness measures the symmetry of a Bark
88 | spectrum envelope. Positive skew means most of the energy is in the
89 | low end \, and the envelope tapers to 0 toward the higher frequencies.
90 | Negative skew is the opposite: most of the energy is at the high end
91 | \, and the envelope tapers to 0 toward the low frequencies. By filtering
92 | white noise with a low-pass filter and varying the cutoff frequency
93 | at left \, you can get a sense of the range of values. Setting the
94 | cutoff halfway up the Bark scale (about 12 Barks) results in a skewness
95 | near zero \, because the filtered result has a very flat Bark spectrum.
96 | ;
97 | #X obj 637 575 declare -lib timbreIDLib;
98 | #X connect 0 0 20 0;
99 | #X connect 2 0 19 0;
100 | #X connect 6 0 20 0;
101 | #X connect 7 0 20 0;
102 | #X connect 14 0 15 0;
103 | #X connect 15 0 18 0;
104 | #X connect 16 0 22 0;
105 | #X connect 17 0 15 1;
106 | #X connect 17 0 18 1;
107 | #X connect 18 0 20 0;
108 | #X connect 19 0 20 0;
109 | #X connect 20 0 13 0;
110 | #X connect 21 0 17 0;
111 | #X connect 22 0 21 0;
112 |
--------------------------------------------------------------------------------
/help/barkSpecSpread~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 292 117 950 543 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 98 189 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 160 220 Bang repeatedly...;
6 | #X obj 136 221 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
7 | 1;
8 | #X obj 647 327 timbreID;
9 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #N canvas 626 81 781 632 other-settings 0;
14 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
15 | -1 0;
16 | #X msg 54 106 window_function \$1;
17 | #X msg 112 176 power_spectrum \$1;
18 | #X obj 112 158 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
19 | 1;
20 | #X obj 54 575 outlet;
21 | #X text 271 243 Construct a new filterbank with a specific spacing.
22 | ;
23 | #X text 253 176 Use power spectrum. (default: magnitude);
24 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X msg 350 504 print;
28 | #X obj 268 384 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X msg 268 404 spec_band_avg \$1;
31 | #X obj 298 444 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 298 464 filter_avg \$1;
34 | #X text 400 506 Print current settings in the post window;
35 | #X text 324 432 If using the triangular Bark spaced filters \, you
36 | can either sum or average the energy in each filter (default: sum)
37 | ;
38 | #X text 294 352 Rather than sum energy in the triangular Bark spaced
39 | filters to get the amount of energy in each Bark band \, you can average
40 | energy in the unfiltered bins (default: OFF);
41 | #X msg 213 302 overlap 2;
42 | #X text 294 290 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X msg 171 243 filterbank 1;
46 | #X connect 0 0 1 0;
47 | #X connect 1 0 4 0;
48 | #X connect 2 0 4 0;
49 | #X connect 3 0 2 0;
50 | #X connect 8 0 4 0;
51 | #X connect 9 0 10 0;
52 | #X connect 10 0 4 0;
53 | #X connect 11 0 12 0;
54 | #X connect 12 0 4 0;
55 | #X connect 16 0 4 0;
56 | #X connect 18 0 4 0;
57 | #X restore 216 350 pd other-settings;
58 | #X obj 56 49 noise~;
59 | #X msg 172 293 window 2000;
60 | #X text 171 275 Change analysis window size;
61 | #X text 248 430 Creation arguments are window size in samples \, and
62 | filterbank spacing in Barks;
63 | #X obj 121 32 loadbang;
64 | #X obj 121 76 bark2freq;
65 | #X text 695 460 Updated for timbreIDLib version 0.7;
66 | #X text 479 267 This feature can be sent to the timbreID external in
67 | order to identify timbres in real time. For more on using audio features
68 | for classification \, see the timbreID helpfile:;
69 | #X text 480 152 Audio buffering and windowing are taken care of by
70 | the external \, so there is no need for tabreceive~ or block~. You
71 | can set the window size with a creation argument \, or change it with
72 | the "window" message. Window size is not required to be a power of
73 | two. The second creation argument specifies the Bark-spacing of the
74 | filterbank. This can also be changed later with the "filterbank" message.
75 | ;
76 | #X obj 56 475 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
77 | -262144 -1 -1 0 256;
78 | #X obj 136 240 metro 100;
79 | #X obj 56 437 barkSpecSpread~ 1024 0.5;
80 | #X floatatom 208 83 5 0 0 1 Q - -;
81 | #X obj 56 111 bp~ 1000 1;
82 | #X obj 56 133 bp~ 1000 1;
83 | #X obj 211 61 hsl 128 15 1 50 1 0 empty empty empty -2 -8 0 10 -262144
84 | -1 -1 0 1;
85 | #X msg 121 54 7;
86 | #X text 480 41 Bark spectrum spread is a measure of the concentration
87 | of a Bark spectrum's energy around its centroid. It is reported in
88 | units of Barks. A sinusoid will have a very low spread value because
89 | all of the energy in its spectrum is in one place. Noise will have
90 | a high spread. Try changing the Q of the filtered noise at left. The
91 | spread will be greater with a lower Q.;
92 | #X text 95 172 Bang to output spread;
93 | #X text 695 480 July 2017;
94 | #X obj 697 501 declare -lib timbreIDLib;
95 | #X connect 0 0 18 0;
96 | #X connect 2 0 17 0;
97 | #X connect 6 0 18 0;
98 | #X connect 7 0 20 0;
99 | #X connect 8 0 18 0;
100 | #X connect 11 0 23 0;
101 | #X connect 12 0 20 1;
102 | #X connect 12 0 21 1;
103 | #X connect 17 0 18 0;
104 | #X connect 18 0 16 0;
105 | #X connect 19 0 20 2;
106 | #X connect 19 0 21 2;
107 | #X connect 20 0 21 0;
108 | #X connect 21 0 18 0;
109 | #X connect 22 0 19 0;
110 | #X connect 23 0 12 0;
111 |
--------------------------------------------------------------------------------
/help/binWrangler-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 233 93 762 662 10;
2 | #X declare -lib timbreIDLib;
3 | #X msg 124 266 clear;
4 | #X msg 150 322 length 7;
5 | #X text 304 556 To clear memory \, send the "clear" message. Note that
6 | changing the expected list length with the "length" message automatically
7 | clears memory.;
8 | #X obj 52 173 bfcc~;
9 | #X obj 127 74 tgl 15 0 empty empty Analyze 17 7 0 12 -262144 -1 -1
10 | 0 1;
11 | #N canvas 0 22 450 300 (subpatch) 0;
12 | #X array \$0-bw-graph 250 float 0;
13 | #X coords 0 1 249 -1 400 140 1 0 0;
14 | #X restore 306 75 graph;
15 | #X text 50 493 Also see:;
16 | #X obj 52 510 featureAccum;
17 | #X msg 140 292 num_frames 6;
18 | #X obj 52 427 list prepend 0;
19 | #X obj 81 215 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
20 | 1;
21 | #X msg 81 235 spew \$1;
22 | #X obj 52 50 adc~;
23 | #X obj 127 125 t b b;
24 | #X obj 171 152 f;
25 | #X obj 201 152 + 1;
26 | #X msg 229 57 0;
27 | #X obj 229 37 select 4;
28 | #X text 304 511 Creation arguments are the number of frames to expect
29 | \, the length of the feature \, and a flag for "spew" mode.;
30 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
31 | 0;
32 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
33 | 0;
34 | #X msg 166 353 print;
35 | #X obj 52 394 binWrangler 5 50 0;
36 | #X obj 52 450 s \$0-bw-graph;
37 | #X text 304 243 [binWrangler] accumulates a database of lists sent
38 | to its inlet. Its purpose in the timbreID library is to take in several
39 | frames of a feature vector (like BFCCs) \, then output the time varying
40 | information ordered by bin number. The features in all frames must
41 | be of a common length N \, specified at creation time \, or with the
42 | "length" message. It's ok for length to be 1 \, but [featureAccum]
43 | would be the better object for that case.;
44 | #X text 304 442 If the optional "spew" mode is activated \, featureAccum
45 | outputs the total concatenated list each time it receives a new analysis
46 | frame. It acts as a sliding buffer for time-based feature capture \,
47 | organized by bin number.;
48 | #X text 24 587 Updated for timbreIDLib version 0.7;
49 | #X obj 127 104 metro 20;
50 | #X text 304 355 After the specified number of frames have been accumulated
51 | \, [binWrangler] outputs a concatenated list containing the columns
52 | of the database from top to bottom \, left to right \, and clears internal
53 | memory. To see this behavior \, click the "Analyze" toggle at left
54 | (DSP must be on). It automatically shuts off after 5 frames of analysis
55 | are taken.;
56 | #X text 24 607 July 2017;
57 | #X obj 26 629 declare -lib timbreIDLib;
58 | #X obj 52 550 featureNorm;
59 | #X obj 52 530 featureDelta;
60 | #X connect 0 0 22 0;
61 | #X connect 1 0 22 0;
62 | #X connect 3 0 22 0;
63 | #X connect 4 0 27 0;
64 | #X connect 8 0 22 0;
65 | #X connect 9 0 23 0;
66 | #X connect 10 0 11 0;
67 | #X connect 11 0 22 0;
68 | #X connect 12 0 3 0;
69 | #X connect 13 0 3 0;
70 | #X connect 13 1 14 0;
71 | #X connect 14 0 15 0;
72 | #X connect 14 0 17 0;
73 | #X connect 15 0 14 1;
74 | #X connect 16 0 14 1;
75 | #X connect 16 0 4 0;
76 | #X connect 17 0 16 0;
77 | #X connect 21 0 22 0;
78 | #X connect 22 0 9 0;
79 | #X connect 27 0 13 0;
80 |
--------------------------------------------------------------------------------
/help/cepstrumPitch-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 225 85 922 651 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 50 310 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
4 | #000000;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-waveform 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 47 47 graph;
9 | #X text 72 307 Bang to analyze the entire array.;
10 | #N canvas 721 350 482 216 soundfile 0;
11 | #X obj 50 103 soundfiler;
12 | #X obj 50 24 loadbang;
13 | #X obj 50 46 f \$0;
14 | #X msg 50 78 read -resize ./audio/voice2.wav \$1-sample;
15 | #X obj 185 120 table \$0-sample;
16 | #X obj 50 125 - 1024;
17 | #X obj 50 147 pack f \$0;
18 | #X msg 50 169 \; \$2-scrub-bar-set range 0 \$1 \;;
19 | #X connect 0 0 5 0;
20 | #X connect 1 0 2 0;
21 | #X connect 2 0 3 0;
22 | #X connect 3 0 0 0;
23 | #X connect 5 0 6 0;
24 | #X connect 6 0 7 0;
25 | #X restore 655 86 pd soundfile;
26 | #X msg 107 455 analyze \$1 1024;
27 | #N canvas 722 238 304 333 waveform 0;
28 | #X obj 46 61 inlet;
29 | #X obj 46 82 t f f;
30 | #X obj 91 131 + 1023;
31 | #X msg 46 200 copy_range 0 \$3-sample \$1 \$2;
32 | #X obj 46 164 pack f f \$0;
33 | #X obj 46 241 tabletool \$0-waveform;
34 | #X connect 0 0 1 0;
35 | #X connect 1 0 4 0;
36 | #X connect 1 1 2 0;
37 | #X connect 2 0 4 1;
38 | #X connect 3 0 5 0;
39 | #X connect 4 0 3 0;
40 | #X restore 655 138 pd waveform;
41 | #X obj 50 243 hsl 800 25 0 38051 0 0 \$0-scrub-bar \$0-scrub-bar-set
42 | Scrub-bar -2 -8 0 12 #b8b8b8 #000000 #000000 0 1;
43 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
44 | 0;
45 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
46 | 0;
47 | #N canvas 956 220 820 636 other-settings 0;
48 | #X obj 44 56 hradio 15 1 0 5 empty empty empty 0 -8 0 10 #fcfcfc #000000
49 | #000000 0;
50 | #X msg 44 76 window_function \$1;
51 | #X msg 100 138 set another-sample-array;
52 | #X msg 139 194 samplerate 48000;
53 | #X text 288 137 Read from a different array;
54 | #X msg 165 247 power_spectrum \$1;
55 | #X obj 165 229 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
56 | #000000 0 1;
57 | #X obj 44 585 outlet;
58 | #X text 273 193 Specify your sample's sampling rate. (default: 44100)
59 | ;
60 | #X msg 325 473 print;
61 | #X text 42 19 Change windowing function. Rectangular (0) \, Blackman
62 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
63 | ;
64 | #X text 375 475 Print current settings in the post window;
65 | #X obj 195 279 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
66 | #000000 0 1;
67 | #X msg 195 297 power_cepstrum \$1;
68 | #X obj 235 329 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
69 | #000000 0 1;
70 | #X msg 235 347 spectrum_offset \$1;
71 | #X msg 265 387 threshold 3;
72 | #X text 372 382 Set threshold for detecting cepstral peak. In standard
73 | deviations above the mean (default: 0);
74 | #X text 435 421 Set the expected pitch range (MIDI) to determine where
75 | to look for peaks in the cepstrum.;
76 | #X msg 295 427 pitch_range 35 60;
77 | #X text 306 247 Use power spectrum. (default: power);
78 | #X text 336 297 Report power cepstrum (default: magnitude);
79 | #X text 376 340 Add 1 to the power or magnitude spectrum before the
80 | cepstrum is computed (default: ON);
81 | #X connect 0 0 1 0;
82 | #X connect 1 0 7 0;
83 | #X connect 2 0 7 0;
84 | #X connect 3 0 7 0;
85 | #X connect 5 0 7 0;
86 | #X connect 6 0 5 0;
87 | #X connect 9 0 7 0;
88 | #X connect 12 0 13 0;
89 | #X connect 13 0 7 0;
90 | #X connect 14 0 15 0;
91 | #X connect 15 0 7 0;
92 | #X connect 16 0 7 0;
93 | #X connect 19 0 7 0;
94 | #X restore 152 498 pd other-settings;
95 | #X text 675 572 Updated for timbreIDLib version 0.7;
96 | #X obj 107 433 r \$0-scrub-bar;
97 | #X obj 655 116 r \$0-scrub-bar;
98 | #X text 245 436 Move through the soundfile with the slider above,
99 | f 28;
100 | #X text 675 592 July 2017;
101 | #X floatatom 50 568 5 0 0 0 - - - 0;
102 | #X obj 50 546 cepstrumPitch \$0-sample 43 64;
103 | #X obj 598 438 cepstrumPitch~;
104 | #X text 596 389 See the real-time version for more information on cepstrum
105 | pitch tracking in general., f 33;
106 | #X text 48 613 Output value is pitch in MIDI units;
107 | #X msg 94 379 analyze 24100 2000;
108 | #X obj 677 612 declare -lib timbreIDLib;
109 | #X text 92 345 Analyze a window starting at sample 24100 that is 2000
110 | samples long (samples 24100 - 26099).;
111 | #X text 295 530 Creation arguments are the name of the sample array
112 | to analyze and the lower and upper bounds of the expected pitch range
113 | to track in MIDI units., f 42;
114 | #X connect 0 0 16 0;
115 | #X connect 4 0 16 0;
116 | #X connect 9 0 16 0;
117 | #X connect 11 0 4 0;
118 | #X connect 12 0 5 0;
119 | #X connect 16 0 15 0;
120 | #X connect 20 0 16 0;
121 |
--------------------------------------------------------------------------------
/help/cepstrumPitch~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 252 172 988 678 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
6 | 1;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 365 384 842 591 other-settings 0;
12 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
13 | -1 1;
14 | #X msg 54 106 window_function \$1;
15 | #X msg 173 257 power_spectrum \$1;
16 | #X obj 173 239 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
17 | 1;
18 | #X obj 54 525 outlet;
19 | #X msg 357 459 print;
20 | #X text 407 461 Print current settings in the post window;
21 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
22 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
23 | ;
24 | #X msg 303 407 overlap 2;
25 | #X text 384 395 Inside a subpatch with re-blocking involving overlap
26 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
27 | things to behave properly;
28 | #X obj 213 289 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X msg 213 307 power_cepstrum \$1;
31 | #X text 314 257 Use power spectrum. (default: power);
32 | #X text 243 151 Set the expected pitch range (MIDI) to determine where
33 | to look for peaks in the cepstrum.;
34 | #X msg 103 157 pitch_range 35 60;
35 | #X obj 253 339 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
36 | 1;
37 | #X msg 253 357 spectrum_offset \$1;
38 | #X text 354 307 Use power cepstrum (default: magnitude);
39 | #X msg 143 207 threshold 3;
40 | #X text 250 202 Set threshold for detecting cepstral peak. In standard
41 | deviations above the mean (default: 0);
42 | #X text 394 351 Add 1 to magnitude or power spectrum before cepstrum
43 | calculation (default: ON);
44 | #X connect 0 0 1 0;
45 | #X connect 1 0 4 0;
46 | #X connect 2 0 4 0;
47 | #X connect 3 0 2 0;
48 | #X connect 5 0 4 0;
49 | #X connect 8 0 4 0;
50 | #X connect 10 0 11 0;
51 | #X connect 11 0 4 0;
52 | #X connect 14 0 4 0;
53 | #X connect 15 0 16 0;
54 | #X connect 16 0 4 0;
55 | #X connect 18 0 4 0;
56 | #X restore 237 300 pd other-settings;
57 | #X text 677 599 Updated for timbreIDLib version 0.7;
58 | #X msg 193 243 window 2000;
59 | #X text 275 243 Change analysis window size;
60 | #X text 172 153 Bang repeatedly to keep refreshing..., f 21;
61 | #X obj 57 387 cepstrumPitch~ 2048 43 64;
62 | #N canvas 0 50 450 278 (subpatch) 0;
63 | #X array cepsPitch 100 float 0;
64 | #X coords 0 64 99 40 200 140 1 0 0;
65 | #X restore 523 305 graph;
66 | #X obj 57 501 tabwrite cepsPitch;
67 | #X obj 241 466 f;
68 | #X obj 271 458 + 1;
69 | #X obj 271 480 % 100;
70 | #X obj 137 212 t b b;
71 | #X obj 57 72 adc~;
72 | #X text 677 619 July 2017;
73 | #X text 105 115 Bang to output pitch;
74 | #X obj 137 190 metro 20;
75 | #X floatatom 84 460 10 0 0 0 - - -;
76 | #X text 260 357 Creation arguments are window size in samples and the
77 | lower and upper bounds of the expected pitch range to track in MIDI
78 | units., f 32;
79 | #X obj 688 536 timbreID;
80 | #X text 521 471 This feature can be sent to the timbreID external in
81 | order to identify timbres in real time. For more on using audio features
82 | for classification \, see the timbreID helpfile:;
83 | #X text 521 201 Audio buffering and windowing are taken care of by
84 | the external \, so there is no need for tabreceive~ or block~. You
85 | can set the window size with a creation argument \, or change it with
86 | the "window" message. Window size is not required to be a power of
87 | two.;
88 | #X text 521 24 Cepstrum analysis can be used for pitch tracking by
89 | searching for a cepstral peak within a given quefrency range. Although
90 | it is possible to search for pitch peaks using the output of [cepstrum~]
91 | \, [cepstrumPitch~] is specially designed for the task. You can easily
92 | set the quefrency bin range to search by supplying an upper and lower
93 | pitch range in MIDI units via the "pitch_range" message. You can also
94 | choose to set a threshold for recognizing pitch peaks via the "thresh"
95 | message. If no peaks exceed the threshold \, [cepstrumPitch~] outputs
96 | -1500 like [sigmund~]'s "pitch" function. The only output is pitch
97 | in MIDI units.;
98 | #X obj 678 641 declare -lib timbreIDLib;
99 | #X connect 0 0 9 0;
100 | #X connect 1 0 19 0;
101 | #X connect 4 0 9 0;
102 | #X connect 6 0 9 0;
103 | #X connect 9 0 11 0;
104 | #X connect 9 0 20 0;
105 | #X connect 12 0 13 0;
106 | #X connect 12 0 11 1;
107 | #X connect 13 0 14 0;
108 | #X connect 14 0 12 1;
109 | #X connect 15 0 9 0;
110 | #X connect 15 1 12 0;
111 | #X connect 16 0 9 0;
112 | #X connect 19 0 15 0;
113 |
--------------------------------------------------------------------------------
/help/cepstrum~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 191 96 960 589 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-cepstrum-graph 513 float 0;
7 | #X coords 0 0.5 512 -0.25 200 140 1 0 0;
8 | #X restore 483 310 graph;
9 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 407 179 816 479 other-settings 0;
16 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
17 | -1 0;
18 | #X msg 54 106 window_function \$1;
19 | #X msg 113 176 power_spectrum \$1;
20 | #X obj 113 158 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
21 | 1;
22 | #X obj 54 415 outlet;
23 | #X text 254 176 Use power spectrum. (default: magnitude);
24 | #X msg 305 379 print;
25 | #X text 355 381 Print current settings in the post window;
26 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
27 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
28 | ;
29 | #X msg 251 327 overlap 2;
30 | #X text 332 315 Inside a subpatch with re-blocking involving overlap
31 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
32 | things to behave properly;
33 | #X obj 153 208 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
34 | 1;
35 | #X msg 153 226 power_cepstrum \$1;
36 | #X text 294 226 Report power cepstrum (default: magnitude);
37 | #X obj 193 258 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
38 | 1;
39 | #X msg 193 276 spectrum_offset \$1;
40 | #X text 334 269 Add 1 to the power or magnitude spectrum before the
41 | cepstrum is computed.;
42 | #X connect 0 0 1 0;
43 | #X connect 1 0 4 0;
44 | #X connect 2 0 4 0;
45 | #X connect 3 0 2 0;
46 | #X connect 6 0 4 0;
47 | #X connect 9 0 4 0;
48 | #X connect 11 0 12 0;
49 | #X connect 12 0 4 0;
50 | #X connect 14 0 15 0;
51 | #X connect 15 0 4 0;
52 | #X restore 217 300 pd other-settings;
53 | #X obj 57 72 adc~;
54 | #X text 52 507 Updated for timbreIDLib version 0.7;
55 | #X msg 173 243 window 2000;
56 | #X text 280 237 Change analysis window size, f 17;
57 | #X obj 648 536 timbreID;
58 | #X text 161 170 Bang repeatedly to keep refreshing...;
59 | #X text 481 471 This feature can be sent to the timbreID external in
60 | order to identify timbres in real time. For more on using audio features
61 | for classification \, see the timbreID helpfile:;
62 | #X obj 57 387 cepstrum~ 1024;
63 | #X text 180 382 Creation argument is window size in samples, f 23
64 | ;
65 | #X text 105 115 Bang to output cepstrum as a list;
66 | #N canvas 0 81 724 308 do-plotting 0;
67 | #X obj 79 37 inlet;
68 | #X obj 79 59 t b l l;
69 | #X obj 130 173 list prepend 0;
70 | #X obj 304 116 list length;
71 | #X obj 304 138 change;
72 | #X obj 304 160 pack f \$0;
73 | #X msg 304 181 \; \$2-cepstrum-graph resize \$1 \;;
74 | #X obj 130 194 s \$0-cepstrum-graph;
75 | #X obj 79 253 tabletool \$0-cepstrum-graph;
76 | #X msg 79 231 clip -0.25 0.5;
77 | #X text 290 234 clip to graph bounds because first value in cepstrum
78 | is often extremely low;
79 | #X connect 0 0 1 0;
80 | #X connect 1 0 9 0;
81 | #X connect 1 1 2 0;
82 | #X connect 1 2 3 0;
83 | #X connect 2 0 7 0;
84 | #X connect 3 0 4 0;
85 | #X connect 4 0 5 0;
86 | #X connect 5 0 6 0;
87 | #X connect 9 0 8 0;
88 | #X restore 57 432 pd do-plotting;
89 | #X text 481 171 Audio buffering and windowing are taken care of by
90 | the external \, so there is no need for tabreceive~ or block~. You
91 | can set the window size with a creation argument \, or change it with
92 | the "window" message. Window size is not required to be a power of
93 | two. Cepstrum values are typically between 1 and -1 \, with the exception
94 | of the first coefficient \, which is often much lower (here \, the
95 | first value is clipped to -1 for convenience graphing).;
96 | #X text 481 24 Real cepstrum is defined as the real portion of the
97 | IFT of log magnitude spectrum. It is sometimes also defined as the
98 | real part of the forward FT of log magnitude spectrum. This external
99 | applies the former method \, and there is little difference between
100 | the two. When cepstrum~ receives a bang \, it spits out (N/2)+1 cepstral
101 | coefficients for the most recent analysis window as a list. The first
102 | dozen or so coefficients from the cepstrum and its perceptually weighted
103 | relatives mel-cepstrum and Bark-cepstrum are often used as compact
104 | feature vectors to describe timbre.;
105 | #X text 52 527 July 2017;
106 | #X obj 137 190 metro 20;
107 | #X obj 53 547 declare -lib timbreIDLib;
108 | #X connect 0 0 13 0;
109 | #X connect 2 0 20 0;
110 | #X connect 5 0 13 0;
111 | #X connect 6 0 13 0;
112 | #X connect 8 0 13 0;
113 | #X connect 13 0 16 0;
114 | #X connect 20 0 13 0;
115 |
--------------------------------------------------------------------------------
/help/data/cluster.txt:
--------------------------------------------------------------------------------
1 | 0 1 2 3 4
2 | 5 6 7 8 9
3 | 10 11 12 13 14
4 | 15 16 17 18 19
5 | 20 21 22 23 24
6 | 25 26 27 28 29
7 | 30 31 32 33 34
8 | 35 36 37 38 39
9 | 40 41 42 43 44
10 | 45 46 47 48 49
11 | 50 51 52 53 54
12 | 55 56 57 58 59
--------------------------------------------------------------------------------
/help/data/tID-help-labels.txt:
--------------------------------------------------------------------------------
1 | 6129
2 | 32016
3 | 58388
4 | 84936
5 | 110867
6 | 151395
7 | 176003
8 | 200214
9 | 223939
10 | 247797
11 | 289119
12 | 310331
13 | 333131
14 | 355666
15 | 378069
16 | 403074
17 | 424638
18 | 447526
19 | 469885
20 | 491626
21 | 541768
22 | 565317
23 | 587588
24 | 609285
25 | 632129
26 | 657134
27 | 679228
28 | 701190
29 | 723681
30 | 746436
31 | 781584
32 | 804913
33 | 827801
34 | 850159
35 | 872121
36 | 903873
37 | 925791
38 | 947620
39 | 969450
40 | 991500
41 | 1.02824e+06
42 | 1.04976e+06
43 | 1.0715e+06
44 | 1.09319e+06
45 | 1.1141e+06
46 | 1.14096e+06
47 | 1.16199e+06
48 | 1.18334e+06
49 | 1.20512e+06
50 | 1.22699e+06
51 | 1.25592e+06
52 | 1.27714e+06
53 | 1.29822e+06
54 | 1.31908e+06
55 | 1.34051e+06
56 | 1.37305e+06
57 | 1.39387e+06
58 | 1.41468e+06
59 | 1.43444e+06
60 | 1.45512e+06
61 |
--------------------------------------------------------------------------------
/help/dct-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 187 83 874 631 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 50 310 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-waveform 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 47 47 graph;
9 | #N canvas 0 50 450 300 (subpatch) 0;
10 | #X array \$0-dct-graph 1024 float 0;
11 | #X coords 0 1 1023 -1 200 140 1 0 0;
12 | #X restore 313 47 graph;
13 | #X text 72 307 Bang to analyze the entire array.;
14 | #N canvas 666 270 482 216 soundfile 0;
15 | #X obj 50 103 soundfiler;
16 | #X obj 50 24 loadbang;
17 | #X obj 185 120 table \$0-sample 130000;
18 | #X msg 50 78 read -skip 120000 ./audio/testing.wav \$1-sample;
19 | #X obj 50 46 f \$0;
20 | #X connect 1 0 4 0;
21 | #X connect 3 0 0 0;
22 | #X connect 4 0 3 0;
23 | #X restore 655 86 pd soundfile;
24 | #X msg 107 455 analyze \$1 1024;
25 | #N canvas 722 238 304 333 waveform 0;
26 | #X obj 46 61 inlet;
27 | #X obj 46 82 t f f;
28 | #X obj 91 131 + 1023;
29 | #X msg 46 200 copy_range 0 \$3-sample \$1 \$2;
30 | #X obj 46 164 pack f f \$0;
31 | #X obj 46 241 tabletool \$0-waveform;
32 | #X connect 0 0 1 0;
33 | #X connect 1 0 4 0;
34 | #X connect 1 1 2 0;
35 | #X connect 2 0 4 1;
36 | #X connect 3 0 5 0;
37 | #X connect 4 0 3 0;
38 | #X restore 655 138 pd waveform;
39 | #X obj 50 243 hsl 800 25 0 128000 0 0 \$0-scrub-bar empty Scrub-bar
40 | -2 -8 0 12 -191407 -1 -1 0 1;
41 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
42 | 0;
43 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
44 | 0;
45 | #N canvas 458 182 776 483 other-settings 0;
46 | #X obj 44 56 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
47 | -1 1;
48 | #X msg 44 76 window_function \$1;
49 | #X obj 100 118 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
50 | 1;
51 | #X msg 100 136 normalize \$1;
52 | #X msg 140 188 set another-sample-array;
53 | #X msg 179 244 samplerate 48000;
54 | #X text 328 187 Read from a different array;
55 | #X obj 44 415 outlet;
56 | #X text 313 243 Specify your sample's sampling rate. (default: 44100)
57 | ;
58 | #X msg 257 346 print;
59 | #X text 42 19 Change windowing function. Rectangular (0) \, Blackman
60 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
61 | ;
62 | #X text 307 348 Print current settings in the post window;
63 | #X text 206 136 Normalize (default: ON);
64 | #X connect 0 0 1 0;
65 | #X connect 1 0 7 0;
66 | #X connect 2 0 3 0;
67 | #X connect 3 0 7 0;
68 | #X connect 4 0 7 0;
69 | #X connect 5 0 7 0;
70 | #X connect 9 0 7 0;
71 | #X restore 152 498 pd other-settings;
72 | #X text 607 550 Updated for timbreIDLib version 0.7;
73 | #X msg 94 379 analyze 44100 2000;
74 | #X obj 107 433 r \$0-scrub-bar;
75 | #X obj 655 116 r \$0-scrub-bar;
76 | #X text 231 438 Move through the soundfile with the slider above,
77 | f 27;
78 | #N canvas 205 170 463 267 do-plotting 0;
79 | #X obj 79 37 inlet;
80 | #X obj 79 173 list prepend 0;
81 | #X obj 203 116 list length;
82 | #X obj 203 138 change;
83 | #X obj 203 160 pack f \$0;
84 | #X obj 79 59 t l l;
85 | #X obj 79 194 s \$0-dct-graph;
86 | #X msg 203 181 \; \$2-dct-graph resize \$1 \;;
87 | #X connect 0 0 5 0;
88 | #X connect 1 0 6 0;
89 | #X connect 2 0 3 0;
90 | #X connect 3 0 4 0;
91 | #X connect 4 0 7 0;
92 | #X connect 5 0 1 0;
93 | #X connect 5 1 2 0;
94 | #X restore 50 582 pd do-plotting;
95 | #X text 213 540 Creation argument is the name of the sample array to
96 | analyze., f 33;
97 | #X obj 598 438 dct~;
98 | #X text 596 389 See the real-time version for more information on the
99 | discrete cosine transform in general., f 33;
100 | #X text 607 570 July 2017;
101 | #X obj 50 546 dct \$0-sample;
102 | #X text 92 344 Analyze a window starting at sample 44100 that is 2000
103 | samples long (samples 44100 - 46099).;
104 | #X obj 608 593 declare -lib timbreIDLib;
105 | #X connect 0 0 21 0;
106 | #X connect 5 0 21 0;
107 | #X connect 10 0 21 0;
108 | #X connect 12 0 21 0;
109 | #X connect 13 0 5 0;
110 | #X connect 14 0 6 0;
111 | #X connect 21 0 16 0;
112 |
--------------------------------------------------------------------------------
/help/dct~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 267 82 958 589 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-dct-graph 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 483 310 graph;
9 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 648 263 721 479 other-settings 0;
16 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
17 | -1 1;
18 | #X msg 54 106 window_function \$1;
19 | #X obj 110 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
20 | 1;
21 | #X msg 110 166 normalize \$1;
22 | #X obj 54 415 outlet;
23 | #X text 216 166 Normalize spectrum (default: ON);
24 | #X msg 215 279 print;
25 | #X text 265 281 Print current settings in the post window;
26 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
27 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
28 | ;
29 | #X msg 161 227 overlap 2;
30 | #X text 242 215 Inside a subpatch with re-blocking involving overlap
31 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
32 | things to behave properly;
33 | #X connect 0 0 1 0;
34 | #X connect 1 0 4 0;
35 | #X connect 2 0 3 0;
36 | #X connect 3 0 4 0;
37 | #X connect 6 0 4 0;
38 | #X connect 9 0 4 0;
39 | #X restore 217 300 pd other-settings;
40 | #X obj 57 72 adc~;
41 | #X text 52 507 Updated for timbreIDLib version 0.7;
42 | #X msg 173 243 window 2000;
43 | #X text 285 236 Change analysis window size, f 17;
44 | #X obj 648 536 timbreID;
45 | #X text 161 170 Bang repeatedly to keep refreshing...;
46 | #X text 481 471 This feature can be sent to the timbreID external in
47 | order to identify timbres in real time. For more on using audio features
48 | for classification \, see the timbreID helpfile:;
49 | #X obj 137 190 metro 100;
50 | #X text 180 382 Creation argument is window size in samples, f 23
51 | ;
52 | #N canvas 205 170 463 267 do-plotting 0;
53 | #X obj 79 37 inlet;
54 | #X obj 79 173 list prepend 0;
55 | #X obj 203 116 list length;
56 | #X obj 203 138 change;
57 | #X obj 203 160 pack f \$0;
58 | #X obj 79 59 t l l;
59 | #X obj 79 194 s \$0-dct-graph;
60 | #X msg 203 181 \; \$2-dct-graph resize \$1 \;;
61 | #X connect 0 0 5 0;
62 | #X connect 1 0 6 0;
63 | #X connect 2 0 3 0;
64 | #X connect 3 0 4 0;
65 | #X connect 4 0 7 0;
66 | #X connect 5 0 1 0;
67 | #X connect 5 1 2 0;
68 | #X restore 57 437 pd do-plotting;
69 | #X obj 57 387 dct~ 1024;
70 | #X text 105 115 Bang to output DCT results as a list;
71 | #X text 52 527 July 2017;
72 | #X text 481 191 Audio buffering and windowing are taken care of by
73 | the external \, so there is no need for tabreceive~ or block~. You
74 | can set the window size with a creation argument \, or change it with
75 | the "window" message. Window size is not required to be a power of
76 | two.;
77 | #X text 481 54 The discrete cosine transform (DCT) multiplies an incoming
78 | window of audio against cosine basis functions. Unlike the Fourier
79 | transform \, it outputs N purely real numbers \, so the length of the
80 | DCT list will be the same as the specified window size \, N. [dct~]'s
81 | output is normalized to be between -1 and 1 by default. timbreID 0.7
82 | uses FFTW's FFTW_REDFT10 in a real-to-real 1-dimensional plan. This
83 | is the same DCT-II algorithm used in previous timbreID releases \,
84 | just more efficient.;
85 | #X obj 53 548 declare -lib timbreIDLib;
86 | #X connect 0 0 16 0;
87 | #X connect 2 0 13 0;
88 | #X connect 5 0 16 0;
89 | #X connect 6 0 16 0;
90 | #X connect 8 0 16 0;
91 | #X connect 13 0 16 0;
92 | #X connect 16 0 15 0;
93 |
--------------------------------------------------------------------------------
/help/energy-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 203 96 978 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | -191407 -1 -1 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 714 176 718 475 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 174 288 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 395 outlet;
20 | #X text 308 287 Specify your sample's sampling rate. (default: 44100)
21 | ;
22 | #X msg 231 346 print;
23 | #X msg 84 108 normalize \$1;
24 | #X obj 84 88 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
25 | ;
26 | #X obj 114 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
27 | 1;
28 | #X text 208 95 Normalize the energy total according to the current
29 | window size. This helps in comparing energy measurements taken with
30 | mixed window sizes. (default: ON);
31 | #X obj 144 208 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 144 228 db \$1;
34 | #X msg 114 168 power \$1;
35 | #X text 208 167 Output energy as power instead of RMS (default: OFF)
36 | ;
37 | #X text 208 208 Report result in dB units instead of linear. 100 dB
38 | represents unity \, in keeping with Pd conventions for [env~] and [sigmund~].
39 | This option is only valid when "power" mode is not active. (default:
40 | OFF);
41 | #X connect 0 0 3 0;
42 | #X connect 1 0 3 0;
43 | #X connect 5 0 3 0;
44 | #X connect 6 0 3 0;
45 | #X connect 7 0 6 0;
46 | #X connect 8 0 12 0;
47 | #X connect 10 0 11 0;
48 | #X connect 11 0 3 0;
49 | #X connect 12 0 3 0;
50 | #X restore 207 343 pd other-settings;
51 | #N canvas 0 50 450 300 (subpatch) 0;
52 | #X array \$0-waveform 1024 float 0;
53 | #X coords 0 1 1023 -1 200 140 1 0 0;
54 | #X restore 653 247 graph;
55 | #N canvas 666 270 552 163 soundfile 0;
56 | #X obj 50 93 soundfiler;
57 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
58 | #X obj 185 100 table \$0-sample 130000;
59 | #X obj 50 24 loadbang;
60 | #X obj 50 46 f \$0;
61 | #X connect 1 0 0 0;
62 | #X connect 3 0 4 0;
63 | #X connect 4 0 1 0;
64 | #X restore 653 397 pd soundfile;
65 | #N canvas 722 238 369 330 waveform 0;
66 | #X obj 46 61 inlet;
67 | #X obj 46 82 t f f;
68 | #X obj 46 284 outlet;
69 | #X obj 131 131 + 1023;
70 | #X obj 86 241 tabletool \$0-waveform;
71 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
72 | #X obj 86 164 pack f f \$0;
73 | #X connect 0 0 1 0;
74 | #X connect 1 0 2 0;
75 | #X connect 1 0 6 0;
76 | #X connect 1 1 3 0;
77 | #X connect 3 0 6 1;
78 | #X connect 5 0 4 0;
79 | #X connect 6 0 5 0;
80 | #X restore 155 269 pd waveform;
81 | #X text 259 477 Creation argument is the name of the sample array to
82 | analyze., f 33;
83 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
84 | samples long (samples 44100 - 46099), f 48;
85 | #X msg 98 123 analyze 44100 2000;
86 | #X obj 703 565 declare -lib timbreIDLib;
87 | #X text 702 520 Updated for timbreIDLib version 0.9.0;
88 | #X text 702 540 June 2022;
89 | #X obj 59 483 energy \$0-sample;
90 | #X text 514 59 See the real-time version for more information on signal
91 | energy in general.;
92 | #X obj 704 85 energy~;
93 | #X connect 0 0 17 0;
94 | #X connect 3 0 17 0;
95 | #X connect 4 0 10 0;
96 | #X connect 7 0 17 0;
97 | #X connect 10 0 3 0;
98 | #X connect 13 0 17 0;
99 | #X connect 17 0 2 0;
100 |
--------------------------------------------------------------------------------
/help/energyEntropy-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 421 245 978 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
4 | #000000;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | #fcfcfc #000000 #000000 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | #b8b8b8 #000000 #000000 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
14 | 0;
15 | #N canvas 714 176 677 446 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 144 228 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 395 outlet;
20 | #X text 278 227 Specify your sample's sampling rate. (default: 44100)
21 | ;
22 | #X msg 201 286 print;
23 | #X text 248 167 Set the number of sub-windows per mid-term window;
24 | #X text 198 108 Set the number of samples in each sub-window of mid-term
25 | windows, f 65;
26 | #X msg 114 168 mid_term_window 8;
27 | #X msg 84 108 sub_window 2048;
28 | #X connect 0 0 3 0;
29 | #X connect 1 0 3 0;
30 | #X connect 5 0 3 0;
31 | #X connect 8 0 3 0;
32 | #X connect 9 0 3 0;
33 | #X restore 207 343 pd other-settings;
34 | #N canvas 0 50 450 300 (subpatch) 0;
35 | #X array \$0-waveform 1024 float 0;
36 | #X coords 0 1 1023 -1 200 140 1 0 0;
37 | #X restore 653 247 graph;
38 | #N canvas 666 270 552 163 soundfile 0;
39 | #X obj 50 93 soundfiler;
40 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
41 | #X obj 185 100 table \$0-sample 130000;
42 | #X obj 50 24 loadbang;
43 | #X obj 50 46 f \$0;
44 | #X connect 1 0 0 0;
45 | #X connect 3 0 4 0;
46 | #X connect 4 0 1 0;
47 | #X restore 653 397 pd soundfile;
48 | #N canvas 722 238 369 330 waveform 0;
49 | #X obj 46 61 inlet;
50 | #X obj 46 82 t f f;
51 | #X obj 46 284 outlet;
52 | #X obj 131 131 + 1023;
53 | #X obj 86 241 tabletool \$0-waveform;
54 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
55 | #X obj 86 164 pack f f \$0;
56 | #X connect 0 0 1 0;
57 | #X connect 1 0 2 0;
58 | #X connect 1 0 6 0;
59 | #X connect 1 1 3 0;
60 | #X connect 3 0 6 1;
61 | #X connect 5 0 4 0;
62 | #X connect 6 0 5 0;
63 | #X restore 155 269 pd waveform;
64 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
65 | samples long (samples 44100 - 46099), f 48;
66 | #X msg 98 123 analyze 44100 2000;
67 | #X obj 703 565 declare -lib timbreIDLib;
68 | #X text 702 520 Updated for timbreIDLib version 0.9.0;
69 | #X text 702 540 June 2022;
70 | #X text 299 461 Creation arguments are the name of the sample array
71 | to analyze \, sub-window size (samples) \, and number of sub-windows
72 | per mid-term window., f 33;
73 | #X obj 59 483 energyEntropy \$0-sample 4096 16;
74 | #X text 514 59 See the real-time version for more information on energy
75 | entropy in general.;
76 | #X obj 704 85 energyEntropy~;
77 | #X connect 0 0 17 0;
78 | #X connect 3 0 17 0;
79 | #X connect 4 0 10 0;
80 | #X connect 7 0 17 0;
81 | #X connect 10 0 3 0;
82 | #X connect 12 0 17 0;
83 | #X connect 17 0 2 0;
84 |
--------------------------------------------------------------------------------
/help/energy~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 185 144 904 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X floatatom 70 414 10 0 0 0 - - -;
4 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
5 | 0;
6 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
7 | 0;
8 | #N canvas 676 230 678 432 other-settings 0;
9 | #X obj 54 365 outlet;
10 | #X msg 174 308 print;
11 | #X msg 54 68 overlap 2;
12 | #X text 135 56 Inside a subpatch with re-blocking involving overlap
13 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
14 | things to behave properly;
15 | #X msg 84 128 normalize \$1;
16 | #X obj 84 108 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
17 | 1;
18 | #X obj 114 168 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
19 | 1;
20 | #X text 208 115 Normalize the energy total according to the current
21 | window size. This helps in comparing energy measurements taken with
22 | mixed window sizes. (default: ON);
23 | #X obj 144 228 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
24 | 1;
25 | #X msg 144 248 db \$1;
26 | #X msg 114 188 power \$1;
27 | #X text 208 187 Output energy as power instead of RMS (default: OFF)
28 | ;
29 | #X text 208 228 Report result in dB units instead of linear. 100 dB
30 | represents unity \, in keeping with Pd conventions for [env~] and [sigmund~].
31 | This option is only valid when "power" mode is not active. (default:
32 | OFF);
33 | #X connect 1 0 0 0;
34 | #X connect 2 0 0 0;
35 | #X connect 4 0 0 0;
36 | #X connect 5 0 4 0;
37 | #X connect 6 0 10 0;
38 | #X connect 8 0 9 0;
39 | #X connect 9 0 0 0;
40 | #X connect 10 0 0 0;
41 | #X restore 181 289 pd other-settings;
42 | #X obj 592 320 timbreID;
43 | #X text 425 255 This feature can be sent to the timbreID external in
44 | order to identify timbres in real time. For more on using audio features
45 | for classification \, see the timbreID helpfile:;
46 | #X text 170 361 Creation argument is window size in samples;
47 | #X msg 135 233 window 2000;
48 | #X text 425 175 Audio buffering is taken care of by the external \,
49 | so there is no need for [block~]. You can set the window size with
50 | a creation argument \, or change it with the "window" message. Window
51 | size is not required to be a power of two.;
52 | #X obj 637 445 declare -lib timbreIDLib;
53 | #X text 636 422 June 2022;
54 | #X text 636 402 Updated for timbreIDLib version 0.9.0;
55 | #X obj 70 361 energy~ 1024;
56 | #X obj 70 111 *~;
57 | #X floatatom 136 48 5 0 100 1 linear-gain - -;
58 | #X obj 136 70 / 100;
59 | #X text 116 144 Output signal energy continuously;
60 | #X text 133 215 Change window size;
61 | #X obj 98 167 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
62 | 1;
63 | #X obj 118 167 metro 100;
64 | #X obj 70 43 sig~ 1;
65 | #X text 425 74 As an alternative to Pd's built-in [env~] object \,
66 | timbreIDLib's [energy~] and [energy] objects report signal energy in
67 | units of power \, RMS \, or dB. This may be useful in situations where
68 | it is important to control analysis timing with bangs that are used
69 | to trigger other timbreIDLib feature extraction objects.;
70 | #X connect 3 0 12 0;
71 | #X connect 7 0 12 0;
72 | #X connect 12 0 0 0;
73 | #X connect 13 0 12 0;
74 | #X connect 14 0 15 0;
75 | #X connect 15 0 13 1;
76 | #X connect 18 0 19 0;
77 | #X connect 19 0 12 0;
78 | #X connect 20 0 13 0;
79 |
--------------------------------------------------------------------------------
/help/featureDelta-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 162 104 924 642 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 60 65 adc~;
4 | #N canvas 0 22 450 300 (subpatch) 0;
5 | #X array \$0-fdelta-graph 3 float 2;
6 | #X coords 0 1.1 3 -1.1 200 140 1 0 0;
7 | #X restore 422 231 graph;
8 | #X text 207 577 Also see:;
9 | #X msg 289 414 length 7;
10 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
11 | 0;
12 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
13 | 0;
14 | #X msg 309 434 print;
15 | #X obj 655 597 declare -lib timbreIDLib;
16 | #X obj 279 597 binWrangler;
17 | #X obj 60 186 bfcc~;
18 | #X msg 139 354 mode \$1;
19 | #N canvas 0 22 450 278 (subpatch) 0;
20 | #X array \$0-current-graph 3 float 2;
21 | #X coords 0 1.1 3 -1.1 200 140 1 0 0;
22 | #X restore 422 61 graph;
23 | #X obj 279 557 featureAccum;
24 | #X obj 279 577 featureNorm;
25 | #N canvas 414 281 450 300 plot-current 0;
26 | #X obj 37 37 inlet;
27 | #X obj 37 194 list prepend 0;
28 | #X obj 160 115 list length;
29 | #X obj 160 136 change;
30 | #X obj 160 157 pack f \$0;
31 | #X obj 37 77 t l l;
32 | #X msg 160 179 \; \$2-current-graph resize \$1 \;;
33 | #X obj 37 217 s \$0-current-graph;
34 | #X connect 0 0 5 0;
35 | #X connect 1 0 7 0;
36 | #X connect 2 0 3 0;
37 | #X connect 3 0 4 0;
38 | #X connect 4 0 6 0;
39 | #X connect 5 0 1 0;
40 | #X connect 5 1 2 0;
41 | #X restore 80 238 pd plot-current;
42 | #X obj 210 186 bfcc~;
43 | #N canvas 414 281 450 300 plot-previous 0;
44 | #X obj 37 37 inlet;
45 | #X obj 37 194 list prepend 0;
46 | #X obj 160 115 list length;
47 | #X obj 160 136 change;
48 | #X obj 160 157 pack f \$0;
49 | #X obj 37 77 t l l;
50 | #X obj 37 217 s \$0-previous-graph;
51 | #X msg 160 179 \; \$2-previous-graph resize \$1 \;;
52 | #X connect 0 0 5 0;
53 | #X connect 1 0 6 0;
54 | #X connect 2 0 3 0;
55 | #X connect 3 0 4 0;
56 | #X connect 4 0 7 0;
57 | #X connect 5 0 1 0;
58 | #X connect 5 1 2 0;
59 | #X restore 230 238 pd plot-previous;
60 | #N canvas 0 22 450 278 (subpatch) 0;
61 | #X array \$0-previous-graph 3 float 2;
62 | #X coords 0 1.1 3 -1.1 200 140 1 0 0;
63 | #X restore 662 61 graph;
64 | #N canvas 648 548 450 300 plot-delta 0;
65 | #X obj 37 37 inlet;
66 | #X obj 37 194 list prepend 0;
67 | #X obj 160 115 list length;
68 | #X obj 160 136 change;
69 | #X obj 160 157 pack f \$0;
70 | #X obj 37 77 t l l;
71 | #X msg 160 179 \; \$2-fdelta-graph resize \$1 \;;
72 | #X obj 37 217 s \$0-fdelta-graph;
73 | #X connect 0 0 5 0;
74 | #X connect 1 0 7 0;
75 | #X connect 2 0 3 0;
76 | #X connect 3 0 4 0;
77 | #X connect 4 0 6 0;
78 | #X connect 5 0 1 0;
79 | #X connect 5 1 2 0;
80 | #X restore 60 531 pd plot-delta;
81 | #X msg 139 294 diff;
82 | #X msg 179 294 abs;
83 | #X msg 219 294 squared;
84 | #X obj 139 325 symbol;
85 | #X obj 210 124 delwrite~ \$0-del 100;
86 | #X obj 210 144 delread~ \$0-del 100;
87 | #X obj 148 59 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
88 | -1;
89 | #X obj 148 79 t b b;
90 | #X text 222 38 Analyze the most recent frame of audio and one from
91 | 100ms earlier to see the BFCC delta between the two moments in time.
92 | , f 25;
93 | #X obj 210 207 list split 3;
94 | #X obj 60 207 list split 3;
95 | #X obj 229 355 symbol;
96 | #X msg 229 384 direction \$1;
97 | #X msg 229 324 pos;
98 | #X msg 269 324 neg;
99 | #X msg 309 324 both;
100 | #X text 420 396 [featureDelta] calculates the difference between each
101 | attribute in pairs of feature lists sent to its hot and cold inlets.
102 | Incoming features must be of a common length N \, specified at creation
103 | time \, or with the "length" message. The "direction" message allows
104 | you to get either positive-only \, negative-only \, or all delta values.
105 | If "direction" is positive- or negative-only \, other values are reported
106 | as zero., f 73;
107 | #X obj 60 480 featureDelta 3 diff both;
108 | #X text 654 555 Updated for timbreIDLib version 0.8.2;
109 | #X text 654 575 January 2020;
110 | #X text 420 474 Creation arguments are the length of the feature \,
111 | a symbol indicating the desired mode ("diff" \, "abs" \, or "squared"
112 | for straight difference \, absolute value of difference \, or squared
113 | difference) \, and a symbol indicating the desired direction ("pos"
114 | \, "neg" \, or "both" \, to report positive difference \, negative
115 | difference \, or both positive and negative difference)., f 73;
116 | #X connect 0 0 9 0;
117 | #X connect 0 0 23 0;
118 | #X connect 3 0 36 0;
119 | #X connect 6 0 36 0;
120 | #X connect 9 0 29 0;
121 | #X connect 10 0 36 0;
122 | #X connect 15 0 28 0;
123 | #X connect 19 0 22 0;
124 | #X connect 20 0 22 0;
125 | #X connect 21 0 22 0;
126 | #X connect 22 0 10 0;
127 | #X connect 24 0 15 0;
128 | #X connect 25 0 26 0;
129 | #X connect 26 0 9 0;
130 | #X connect 26 1 15 0;
131 | #X connect 28 0 16 0;
132 | #X connect 28 0 36 1;
133 | #X connect 29 0 14 0;
134 | #X connect 29 0 36 0;
135 | #X connect 30 0 31 0;
136 | #X connect 31 0 36 0;
137 | #X connect 32 0 30 0;
138 | #X connect 33 0 30 0;
139 | #X connect 34 0 30 0;
140 | #X connect 36 0 18 0;
141 |
--------------------------------------------------------------------------------
/help/featureNorm-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 191 77 842 681 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 60 65 adc~;
4 | #N canvas 0 22 450 300 (subpatch) 0;
5 | #X array \$0-fnorm-graph 3 float 2;
6 | #X coords 0 1.1 3 -1.1 200 140 1 0 0;
7 | #X restore 422 231 graph;
8 | #X text 58 623 Also see:;
9 | #X msg 128 294 length 7;
10 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
11 | 0;
12 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
13 | 0;
14 | #X msg 148 314 print;
15 | #X obj 597 637 declare -lib timbreIDLib;
16 | #X text 596 615 June 2019;
17 | #X obj 130 643 binWrangler;
18 | #X obj 130 603 featureAccum;
19 | #X obj 60 116 bfcc~;
20 | #X obj 60 137 list split 3;
21 | #X obj 121 61 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
22 | -1;
23 | #X msg 108 244 mode \$1;
24 | #X obj 108 224 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
25 | 1;
26 | #X msg 155 423 0 0 0;
27 | #X msg 255 423 0.9 0.7 0.2;
28 | #X obj 60 480 featureNorm 3 0;
29 | #N canvas 0 22 450 278 (subpatch) 0;
30 | #X array \$0-raw-graph 3 float 2;
31 | #X coords 0 1.1 3 -1.1 200 140 1 0 0;
32 | #X restore 422 61 graph;
33 | #N canvas 414 281 450 300 plot-raw 0;
34 | #X obj 37 37 inlet;
35 | #X obj 37 194 list prepend 0;
36 | #X obj 160 115 list length;
37 | #X obj 160 136 change;
38 | #X obj 160 157 pack f \$0;
39 | #X obj 37 77 t l l;
40 | #X obj 37 217 s \$0-raw-graph;
41 | #X msg 160 179 \; \$2-raw-graph resize \$1 \;;
42 | #X connect 0 0 5 0;
43 | #X connect 1 0 6 0;
44 | #X connect 2 0 3 0;
45 | #X connect 3 0 4 0;
46 | #X connect 4 0 7 0;
47 | #X connect 5 0 1 0;
48 | #X connect 5 1 2 0;
49 | #X restore 80 168 pd plot-raw;
50 | #N canvas 648 548 450 300 plot-normalized 0;
51 | #X obj 37 37 inlet;
52 | #X obj 37 194 list prepend 0;
53 | #X obj 160 115 list length;
54 | #X obj 160 136 change;
55 | #X obj 160 157 pack f \$0;
56 | #X obj 37 77 t l l;
57 | #X msg 160 179 \; \$2-fnorm-graph resize \$1 \;;
58 | #X obj 37 217 s \$0-fnorm-graph;
59 | #X connect 0 0 5 0;
60 | #X connect 1 0 7 0;
61 | #X connect 2 0 3 0;
62 | #X connect 3 0 4 0;
63 | #X connect 4 0 6 0;
64 | #X connect 5 0 1 0;
65 | #X connect 5 1 2 0;
66 | #X restore 60 531 pd plot-normalized;
67 | #X text 420 514 Creation arguments are the length of the feature and
68 | a flag for -1 to 1 normalization rather than the default 0 to 1 normalization.
69 | ;
70 | #X obj 155 396 loadbang;
71 | #X text 140 217 mode 1: -1 to 1 normalization;
72 | #X text 140 197 mode 0: 0 to 1 normalization;
73 | #X text 420 466 Provide minimum value and maximum value lists in the
74 | 2nd and 3rd inlets. These lists can be obtained from [timbreID] using
75 | the "min_values" and "max_values" methods.;
76 | #X text 152 363 Provide feature minimum and maximum attribute lists.
77 | , f 29;
78 | #X text 420 396 [featureNorm] takes in raw feature lists and normalizes
79 | each attribute to be between 0 and 1 (or optionally \, -1 and 1). Incoming
80 | features must be of a common length N \, specified at creation time
81 | \, or with the "length" message. A length of 1 is allowed.;
82 | #X obj 130 623 featureDelta;
83 | #X text 596 595 Updated for timbreIDLib version 0.8.0;
84 | #X connect 0 0 11 0;
85 | #X connect 3 0 18 0;
86 | #X connect 6 0 18 0;
87 | #X connect 11 0 12 0;
88 | #X connect 12 0 18 0;
89 | #X connect 12 0 20 0;
90 | #X connect 13 0 11 0;
91 | #X connect 14 0 18 0;
92 | #X connect 15 0 14 0;
93 | #X connect 16 0 18 1;
94 | #X connect 17 0 18 2;
95 | #X connect 18 0 21 0;
96 | #X connect 23 0 16 0;
97 | #X connect 23 0 17 0;
98 |
--------------------------------------------------------------------------------
/help/harmonicRatio-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 203 96 978 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
4 | #000000;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 10 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | #fcfcfc #000000 #000000 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 61055 0 0 empty empty Scrub -2 -8 0 12
10 | #b8b8b8 #000000 #000000 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
14 | 0;
15 | #N canvas 714 176 641 296 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X text 242 47 Read from a different array;
18 | #X obj 54 235 outlet;
19 | #X msg 134 168 print;
20 | #X obj 94 88 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000
21 | 0 1;
22 | #X msg 94 108 normalize \$1;
23 | #X text 196 103 Turn normalization on or off. With normalization on
24 | \, values will fall between 0 and 1 (default: OFF);
25 | #X connect 0 0 2 0;
26 | #X connect 3 0 2 0;
27 | #X connect 4 0 5 0;
28 | #X connect 5 0 2 0;
29 | #X restore 207 343 pd other-settings;
30 | #N canvas 0 50 450 300 (subpatch) 0;
31 | #X array \$0-waveform 1024 float 0;
32 | #X coords 0 1 1023 -1 200 140 1 0 0;
33 | #X restore 653 247 graph;
34 | #N canvas 666 270 552 203 soundfile 0;
35 | #X obj 50 93 soundfiler;
36 | #X obj 50 24 loadbang;
37 | #X obj 50 46 f \$0;
38 | #X msg 50 68 read -resize ../doc/sound/voice.wav \$1-sample;
39 | #X obj 185 100 table \$0-sample;
40 | #X obj 30 46 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
41 | #000000;
42 | #X connect 1 0 2 0;
43 | #X connect 2 0 3 0;
44 | #X connect 3 0 0 0;
45 | #X connect 5 0 2 0;
46 | #X restore 653 397 pd soundfile;
47 | #N canvas 722 238 369 330 waveform 0;
48 | #X obj 46 61 inlet;
49 | #X obj 46 82 t f f;
50 | #X obj 46 284 outlet;
51 | #X obj 131 131 + 1023;
52 | #X obj 86 241 tabletool \$0-waveform;
53 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
54 | #X obj 86 164 pack f f \$0;
55 | #X connect 0 0 1 0;
56 | #X connect 1 0 2 0;
57 | #X connect 1 0 6 0;
58 | #X connect 1 1 3 0;
59 | #X connect 3 0 6 1;
60 | #X connect 5 0 4 0;
61 | #X connect 6 0 5 0;
62 | #X restore 155 269 pd waveform;
63 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
64 | samples long (samples 44100 - 46099), f 48;
65 | #X msg 98 123 analyze 44100 2000;
66 | #X obj 703 565 declare -lib timbreIDLib;
67 | #X text 702 520 Updated for timbreIDLib version 0.9.0;
68 | #X text 702 540 June 2022;
69 | #X obj 59 483 harmonicRatio \$0-sample;
70 | #X obj 704 85 harmonicRatio~;
71 | #X text 514 59 See the real-time version for more information on harmonic
72 | ratio in general.;
73 | #X text 259 477 Creation argument is the name of the sample array to
74 | analyze, f 33;
75 | #X connect 0 0 16 0;
76 | #X connect 3 0 16 0;
77 | #X connect 4 0 10 0;
78 | #X connect 7 0 16 0;
79 | #X connect 10 0 3 0;
80 | #X connect 12 0 16 0;
81 | #X connect 16 0 2 0;
82 |
--------------------------------------------------------------------------------
/help/magSpec~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 333 81 957 589 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-magSpec-graph 513 float 0;
7 | #X coords 0 0.25 512 0 200 140 1 0 0;
8 | #X restore 483 310 graph;
9 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 439 85 762 479 other-settings 0;
16 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
17 | -1 4;
18 | #X msg 54 106 window_function \$1;
19 | #X obj 110 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
20 | 1;
21 | #X msg 110 166 normalize \$1;
22 | #X msg 153 226 power_spectrum \$1;
23 | #X obj 153 208 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
24 | 1;
25 | #X obj 54 415 outlet;
26 | #X text 216 166 Normalize spectrum (default: ON);
27 | #X text 294 226 Use power spectrum. (default: magnitude);
28 | #X msg 275 329 print;
29 | #X text 325 331 Print current settings in the post window;
30 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
31 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
32 | ;
33 | #X msg 221 277 overlap 2;
34 | #X text 302 265 Inside a subpatch with re-blocking involving overlap
35 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
36 | things to behave properly;
37 | #X connect 0 0 1 0;
38 | #X connect 1 0 6 0;
39 | #X connect 2 0 3 0;
40 | #X connect 3 0 6 0;
41 | #X connect 4 0 6 0;
42 | #X connect 5 0 4 0;
43 | #X connect 9 0 6 0;
44 | #X connect 12 0 6 0;
45 | #X restore 217 300 pd other-settings;
46 | #X obj 57 72 adc~;
47 | #X text 32 507 Updated for timbreIDLib version 0.7;
48 | #X msg 173 243 window 2000;
49 | #X text 268 236 Change analysis window size, f 17;
50 | #X obj 648 536 timbreID;
51 | #X text 161 170 Bang repeatedly to keep refreshing...;
52 | #X text 481 471 This feature can be sent to the timbreID external in
53 | order to identify timbres in real time. For more on using audio features
54 | for classification \, see the timbreID helpfile:;
55 | #X obj 137 190 metro 100;
56 | #X text 180 382 Creation argument is window size in samples, f 23
57 | ;
58 | #X obj 57 387 magSpec~ 1024;
59 | #X text 105 115 Bang to output magnitude spectrum as a list;
60 | #N canvas 202 174 463 267 do-plotting 0;
61 | #X obj 79 37 inlet;
62 | #X obj 79 173 list prepend 0;
63 | #X obj 233 116 list length;
64 | #X obj 233 138 change;
65 | #X obj 233 160 pack f \$0;
66 | #X obj 79 59 t l l;
67 | #X obj 79 194 s \$0-magSpec-graph;
68 | #X msg 233 181 \; \$2-magSpec-graph resize \$1 \;;
69 | #X connect 0 0 5 0;
70 | #X connect 1 0 6 0;
71 | #X connect 2 0 3 0;
72 | #X connect 3 0 4 0;
73 | #X connect 4 0 7 0;
74 | #X connect 5 0 1 0;
75 | #X connect 5 1 2 0;
76 | #X restore 57 437 pd do-plotting;
77 | #X text 32 527 July 2017;
78 | #X text 481 191 Audio buffering and windowing are taken care of by
79 | the external \, so there is no need for tabreceive~ or block~. You
80 | can set the window size with a creation argument \, or change it with
81 | the "window" message. Window size is not required to be a power of
82 | two.;
83 | #X text 481 54 Magnitude spectrum can be measured with a combination
84 | of basic Pd objects like fft~ \, *~ \, and sqrt~. However \, those
85 | objects compute continuously \, and the final output is a signal vector.
86 | magSpec~ does nothing until it receives a bang \, then it spits out
87 | the magnitude spectrum for the most recent analysis window as a list.
88 | The length of the magnitude spectrum list will be one half of the specified
89 | window size plus one (N/2+1). magSpec~'s output is normalized to be
90 | between 0 and 1 by default.;
91 | #X obj 33 549 declare -lib timbreIDLib;
92 | #X connect 0 0 15 0;
93 | #X connect 2 0 13 0;
94 | #X connect 5 0 15 0;
95 | #X connect 6 0 15 0;
96 | #X connect 8 0 15 0;
97 | #X connect 13 0 15 0;
98 | #X connect 15 0 17 0;
99 |
--------------------------------------------------------------------------------
/help/maxSample-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 213 81 915 635 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | -191407 -1 -1 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 724 184 641 315 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 93 104 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 255 outlet;
20 | #X msg 150 162 print;
21 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
22 | ;
23 | #X connect 0 0 3 0;
24 | #X connect 1 0 3 0;
25 | #X connect 4 0 3 0;
26 | #X restore 207 343 pd other-settings;
27 | #N canvas 0 50 450 300 (subpatch) 0;
28 | #X array \$0-waveform 1024 float 0;
29 | #X coords 0 1 1023 -1 200 140 1 0 0;
30 | #X restore 653 247 graph;
31 | #N canvas 666 270 552 163 soundfile 0;
32 | #X obj 50 93 soundfiler;
33 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
34 | #X obj 185 100 table \$0-sample 130000;
35 | #X obj 50 24 loadbang;
36 | #X obj 50 46 f \$0;
37 | #X connect 1 0 0 0;
38 | #X connect 3 0 4 0;
39 | #X connect 4 0 1 0;
40 | #X restore 653 407 pd soundfile;
41 | #N canvas 722 238 369 330 waveform 0;
42 | #X obj 46 61 inlet;
43 | #X obj 46 82 t f f;
44 | #X obj 46 284 outlet;
45 | #X obj 131 131 + 1023;
46 | #X obj 86 241 tabletool \$0-waveform;
47 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
48 | #X obj 86 164 pack f f \$0;
49 | #X connect 0 0 1 0;
50 | #X connect 1 0 2 0;
51 | #X connect 1 0 6 0;
52 | #X connect 1 1 3 0;
53 | #X connect 3 0 6 1;
54 | #X connect 5 0 4 0;
55 | #X connect 6 0 5 0;
56 | #X restore 155 269 pd waveform;
57 | #X text 229 457 Creation argument is the name of the sample array to
58 | analyze., f 33;
59 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
60 | samples long (samples 44100 - 46099), f 48;
61 | #X text 652 557 Updated for timbreIDLib version 0.7;
62 | #X msg 98 123 analyze 44100 2000;
63 | #X obj 59 483 maxSample \$0-sample;
64 | #X obj 269 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
65 | -262144 -1 -1 0 256;
66 | #X text 652 577 July 2017;
67 | #X obj 704 85 maxSample~;
68 | #X text 644 59 See the real-time version too.;
69 | #X text 17 567 Outlet 1: maximum sample value;
70 | #X text 17 587 Outlet 2: maximum sample index relative to the analysis
71 | window, f 31;
72 | #X msg 269 582 \; \$2-waveform xlabel -1 \$1 \;;
73 | #X obj 269 562 pack f \$0;
74 | #X obj 653 598 declare -lib timbreIDLib;
75 | #X connect 0 0 15 0;
76 | #X connect 3 0 15 0;
77 | #X connect 4 0 10 0;
78 | #X connect 7 0 15 0;
79 | #X connect 10 0 3 0;
80 | #X connect 14 0 15 0;
81 | #X connect 15 0 2 0;
82 | #X connect 15 1 16 0;
83 | #X connect 16 0 23 0;
84 | #X connect 23 0 22 0;
85 |
--------------------------------------------------------------------------------
/help/maxSampleDelta-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 213 81 923 675 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
9 | -191407 -1 -1 0 1;
10 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
11 | 0;
12 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
13 | 0;
14 | #N canvas 724 184 641 315 other-settings 0;
15 | #X msg 54 48 set another-sample-array;
16 | #X msg 93 104 samplerate 48000;
17 | #X text 242 47 Read from a different array;
18 | #X obj 54 255 outlet;
19 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
20 | ;
21 | #X msg 150 162 print;
22 | #X connect 0 0 3 0;
23 | #X connect 1 0 3 0;
24 | #X connect 5 0 3 0;
25 | #X restore 207 343 pd other-settings;
26 | #N canvas 0 50 450 300 (subpatch) 0;
27 | #X array \$0-waveform 1024 float 0;
28 | #X coords 0 1 1023 -1 200 140 1 0 0;
29 | #X restore 653 247 graph;
30 | #N canvas 666 270 552 163 soundfile 0;
31 | #X obj 50 93 soundfiler;
32 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
33 | #X obj 185 100 table \$0-sample 130000;
34 | #X obj 50 24 loadbang;
35 | #X obj 50 46 f \$0;
36 | #X connect 1 0 0 0;
37 | #X connect 3 0 4 0;
38 | #X connect 4 0 1 0;
39 | #X restore 653 407 pd soundfile;
40 | #N canvas 722 238 369 330 waveform 0;
41 | #X obj 46 61 inlet;
42 | #X obj 46 82 t f f;
43 | #X obj 46 284 outlet;
44 | #X obj 86 241 tabletool \$0-waveform;
45 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
46 | #X obj 86 164 pack f f \$0;
47 | #X obj 131 131 + 1023;
48 | #X connect 0 0 1 0;
49 | #X connect 1 0 2 0;
50 | #X connect 1 0 5 0;
51 | #X connect 1 1 6 0;
52 | #X connect 4 0 3 0;
53 | #X connect 5 0 4 0;
54 | #X connect 6 0 5 1;
55 | #X restore 155 269 pd waveform;
56 | #X text 259 477 Creation argument is the name of the sample array to
57 | analyze., f 33;
58 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
59 | samples long (samples 44100 - 46099), f 48;
60 | #X text 652 593 Updated for timbreIDLib version 0.7;
61 | #X msg 98 123 analyze 44100 2000;
62 | #X obj 269 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
63 | -262144 -1 -1 0 256;
64 | #X obj 59 483 maxSampleDelta \$0-sample;
65 | #X obj 656 91 maxSampleDelta~;
66 | #X text 514 59 See the real-time version for more information on sample
67 | delta in general.;
68 | #X text 652 613 July 2017;
69 | #X msg 155 291 analyze \$1 1024;
70 | #X msg 269 582 \; \$2-waveform xlabel -1 \$1 \;;
71 | #X obj 269 562 pack f \$0;
72 | #X text 17 567 Outlet 1: maximum sample delta value, f 31;
73 | #X text 17 607 Outlet 2: maximum sample delta index relative to the
74 | analysis window, f 31;
75 | #X obj 653 636 declare -lib timbreIDLib;
76 | #X connect 0 0 15 0;
77 | #X connect 3 0 9 0;
78 | #X connect 6 0 15 0;
79 | #X connect 9 0 19 0;
80 | #X connect 13 0 15 0;
81 | #X connect 14 0 21 0;
82 | #X connect 15 0 2 0;
83 | #X connect 15 1 14 0;
84 | #X connect 19 0 15 0;
85 | #X connect 21 0 20 0;
86 |
--------------------------------------------------------------------------------
/help/maxSampleDelta~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 264 240 893 623 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 92 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X floatatom 70 414 10 0 0 0 - - -;
6 | #X text 173 215 Change window size.;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 676 230 576 318 other-settings 0;
12 | #X obj 54 225 outlet;
13 | #X msg 165 135 print;
14 | #X msg 54 68 overlap 2;
15 | #X text 135 56 Inside a subpatch with re-blocking involving overlap
16 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
17 | things to behave properly;
18 | #X connect 1 0 0 0;
19 | #X connect 2 0 0 0;
20 | #X restore 221 289 pd other-settings;
21 | #X text 616 536 Updated for timbreIDLib version 0.7;
22 | #X obj 592 320 timbreID;
23 | #X text 425 255 This feature can be sent to the timbreID external in
24 | order to identify timbres in real time. For more on using audio features
25 | for classification \, see the timbreID helpfile:;
26 | #X text 240 361 Creation argument is window size in samples;
27 | #X msg 175 233 window 2000;
28 | #X floatatom 220 414 10 0 0 0 - - -;
29 | #X text 616 556 July 2017;
30 | #X obj 70 41 adc~;
31 | #X obj 159 142 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X floatatom 70 455 10 0 0 0 - - -;
34 | #X obj 70 433 rmstodb;
35 | #X obj 70 475 > 60;
36 | #X obj 70 497 change;
37 | #X obj 70 519 select 1;
38 | #X obj 70 549 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
39 | -1;
40 | #X obj 159 162 metro 100;
41 | #X obj 70 361 maxSampleDelta~ 1024;
42 | #X text 116 54 Bang to output maximum sample delta magnitude of most
43 | recent N sample window, f 40;
44 | #X text 216 469 Outlet 1: maximum sample delta magnitude value;
45 | #X text 216 489 Outlet 2: index of maximum sample delta magnitude relative
46 | to the analysis window;
47 | #X text 425 54 [maxSampleDelta~] takes the absolute value of the difference
48 | between all neighboring pairs of samples in a window of audio \, then
49 | reports the value and location of the highest difference. This is useful
50 | for finding sudden discontinuities in a waveform. Here \, it's used
51 | as a crude percussive onset detector by looking for delta values above
52 | a threshold in dB.;
53 | #X text 425 165 Audio buffering is taken care of by the external \,
54 | so there is no need for [block~]. You can set the window size with
55 | a creation argument \, or change it with the "window" message. Window
56 | size is not required to be a power of two.;
57 | #X obj 617 577 declare -lib timbreIDLib;
58 | #X connect 0 0 22 0;
59 | #X connect 1 0 16 0;
60 | #X connect 5 0 22 0;
61 | #X connect 10 0 22 0;
62 | #X connect 13 0 22 0;
63 | #X connect 14 0 21 0;
64 | #X connect 15 0 17 0;
65 | #X connect 16 0 15 0;
66 | #X connect 17 0 18 0;
67 | #X connect 18 0 19 0;
68 | #X connect 19 0 20 0;
69 | #X connect 21 0 22 0;
70 | #X connect 22 0 1 0;
71 | #X connect 22 1 11 0;
72 |
--------------------------------------------------------------------------------
/help/maxSample~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 228 104 939 526 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
6 | 1;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 614 256 581 289 other-settings 0;
12 | #X obj 55 210 outlet;
13 | #X msg 109 129 print;
14 | #X text 159 131 Print current settings in the post window;
15 | #X msg 55 77 overlap 2;
16 | #X text 136 65 Inside a subpatch with re-blocking involving overlap
17 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
18 | things to behave properly;
19 | #X connect 1 0 0 0;
20 | #X connect 3 0 0 0;
21 | #X restore 217 300 pd other-settings;
22 | #X obj 57 72 adc~;
23 | #X text 670 451 Updated for timbreIDLib version 0.7;
24 | #X msg 173 243 window 2000;
25 | #X text 270 236 Change analysis window size, f 17;
26 | #X obj 648 266 timbreID;
27 | #X text 161 170 Bang repeatedly to keep refreshing...;
28 | #X text 481 201 This feature can be sent to the timbreID external in
29 | order to identify timbres in real time. For more on using audio features
30 | for classification \, see the timbreID helpfile:;
31 | #X obj 137 190 metro 100;
32 | #X text 200 382 Creation argument is window size in samples, f 23
33 | ;
34 | #X text 670 471 July 2017;
35 | #X obj 57 387 maxSample~ 1024;
36 | #X floatatom 57 449 10 0 0 0 - - -;
37 | #X floatatom 167 419 10 0 0 0 - - -;
38 | #X text 105 115 Bang to output maximum sample value and index;
39 | #X text 481 54 [maxSample~] reports the value and index of the largest
40 | sample value in the most recent N-sample window of audio.;
41 | #X text 481 111 Audio buffering is taken care of by the external \,
42 | so there is no need for [block~]. You can set the window size with
43 | a creation argument \, or change it with the "window" message. Window
44 | size is not required to be a power of two.;
45 | #X obj 671 492 declare -lib timbreIDLib;
46 | #X connect 0 0 15 0;
47 | #X connect 1 0 12 0;
48 | #X connect 4 0 15 0;
49 | #X connect 5 0 15 0;
50 | #X connect 7 0 15 0;
51 | #X connect 12 0 15 0;
52 | #X connect 15 0 16 0;
53 | #X connect 15 1 17 0;
54 |
--------------------------------------------------------------------------------
/help/mfcc~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 304 81 957 595 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-mfcc-graph 38 float 0;
7 | #X coords 0 1 37 -1 200 140 1 0 0;
8 | #X restore 493 317 graph;
9 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 439 85 866 725 other-settings 0;
16 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
17 | -1 4;
18 | #X msg 54 106 window_function \$1;
19 | #X obj 110 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
20 | 1;
21 | #X msg 110 166 normalize \$1;
22 | #X msg 153 226 power_spectrum \$1;
23 | #X obj 153 208 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
24 | 1;
25 | #X obj 54 655 outlet;
26 | #X text 322 293 Construct a new filterbank with a specific spacing.
27 | ;
28 | #X text 216 166 Normalize spectrum (default: ON);
29 | #X text 294 226 Use power spectrum. (default: magnitude);
30 | #X msg 385 549 print;
31 | #X obj 263 366 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
32 | 1;
33 | #X msg 263 386 spec_band_avg \$1;
34 | #X obj 293 426 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
35 | 1;
36 | #X msg 293 446 filter_avg \$1;
37 | #X text 435 551 Print current settings in the post window;
38 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
39 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
40 | ;
41 | #X msg 331 497 overlap 2;
42 | #X text 412 485 Inside a subpatch with re-blocking involving overlap
43 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
44 | things to behave properly;
45 | #X msg 212 293 filterbank 150;
46 | #X text 289 334 Rather than sum energy in the triangular mel spaced
47 | filters to get the amount of energy in each mel band \, you can average
48 | energy in the unfiltered bins. (default: OFF);
49 | #X text 319 414 If using the triangular mel spaced filters \, you can
50 | either sum or average the energy in each filter .(default: sum);
51 | #X connect 0 0 1 0;
52 | #X connect 1 0 6 0;
53 | #X connect 2 0 3 0;
54 | #X connect 3 0 6 0;
55 | #X connect 4 0 6 0;
56 | #X connect 5 0 4 0;
57 | #X connect 10 0 6 0;
58 | #X connect 11 0 12 0;
59 | #X connect 12 0 6 0;
60 | #X connect 13 0 14 0;
61 | #X connect 14 0 6 0;
62 | #X connect 17 0 6 0;
63 | #X connect 19 0 6 0;
64 | #X restore 217 300 pd other-settings;
65 | #X obj 57 72 adc~;
66 | #X text 55 509 Updated for timbreIDLib version 0.7;
67 | #X msg 173 243 window 2000;
68 | #X text 275 237 Change analysis window size, f 16;
69 | #X obj 658 537 timbreID;
70 | #X text 161 170 Bang repeatedly to keep refreshing...;
71 | #X text 491 482 This feature can be sent to the timbreID external in
72 | order to identify timbres in real time. For more on using audio features
73 | for classification \, see the timbreID helpfile:;
74 | #X obj 137 190 metro 100;
75 | #X obj 57 387 mfcc~ 1024 100;
76 | #X text 188 382 Creation arguments are window size in samples and filterbank
77 | spacing in mels, f 39;
78 | #X text 105 115 Bang to output MFCCs as a list;
79 | #X text 55 529 July 2017;
80 | #X text 491 178 Audio buffering and windowing are taken care of by
81 | the external \, so there is no need for tabreceive~ or block~. You
82 | can set the window size with a creation argument \, or change it with
83 | the "window" message. Window size is not required to be a power of
84 | two. The second creation argument specifies the mel spacing of the
85 | filterbank.;
86 | #X text 491 38 Mel-frequency cepstrum is much different than raw cepstrum.
87 | The most significant differences are an emphasis on lower spectral
88 | content and the use of a DCT rather than a FT in the final step of
89 | the process. When mfcc~ receives a bang \, it spits out the MFCCs for
90 | the most recent analysis window as a list. The default 100mel filterbank
91 | spacing produces a 38-component MFCC vector regardless of window size.
92 | MFCC components are normalized to be between 1 and -1 by default. If
93 | normalized \, the first MFCC will always have a value of 1;
94 | #N canvas 0 81 450 300 plotting 0;
95 | #X obj 57 183 list prepend 0;
96 | #X obj 192 148 list length;
97 | #X obj 192 170 change;
98 | #X obj 57 89 t l l;
99 | #X obj 192 192 pack f \$0;
100 | #X msg 192 215 \; \$2-mfcc-graph resize \$1 \;;
101 | #X obj 57 205 s \$0-mfcc-graph;
102 | #X obj 57 49 inlet;
103 | #X connect 0 0 6 0;
104 | #X connect 1 0 2 0;
105 | #X connect 2 0 4 0;
106 | #X connect 3 0 0 0;
107 | #X connect 3 1 1 0;
108 | #X connect 4 0 5 0;
109 | #X connect 7 0 3 0;
110 | #X restore 57 449 pd plotting;
111 | #X obj 57 553 declare -lib timbreIDLib;
112 | #X connect 0 0 14 0;
113 | #X connect 2 0 13 0;
114 | #X connect 5 0 14 0;
115 | #X connect 6 0 14 0;
116 | #X connect 8 0 14 0;
117 | #X connect 13 0 14 0;
118 | #X connect 14 0 20 0;
119 |
--------------------------------------------------------------------------------
/help/minSample-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 240 65 915 635 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | -191407 -1 -1 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 727 180 641 315 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 93 104 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 255 outlet;
20 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
21 | ;
22 | #X msg 150 162 print;
23 | #X connect 0 0 3 0;
24 | #X connect 1 0 3 0;
25 | #X connect 5 0 3 0;
26 | #X restore 207 343 pd other-settings;
27 | #N canvas 0 22 450 300 (subpatch) 0;
28 | #X array \$0-waveform 1024 float 0;
29 | #X coords 0 1 1023 -1 200 140 1 0 0;
30 | #X restore 653 247 graph;
31 | #N canvas 666 270 552 163 soundfile 0;
32 | #X obj 50 93 soundfiler;
33 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
34 | #X obj 185 100 table \$0-sample 130000;
35 | #X obj 50 24 loadbang;
36 | #X obj 50 46 f \$0;
37 | #X connect 1 0 0 0;
38 | #X connect 3 0 4 0;
39 | #X connect 4 0 1 0;
40 | #X restore 653 407 pd soundfile;
41 | #N canvas 722 238 369 330 waveform 0;
42 | #X obj 46 61 inlet;
43 | #X obj 46 82 t f f;
44 | #X obj 46 284 outlet;
45 | #X obj 131 131 + 1023;
46 | #X obj 86 241 tabletool \$0-waveform;
47 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
48 | #X obj 86 164 pack f f \$0;
49 | #X connect 0 0 1 0;
50 | #X connect 1 0 2 0;
51 | #X connect 1 0 6 0;
52 | #X connect 1 1 3 0;
53 | #X connect 3 0 6 1;
54 | #X connect 5 0 4 0;
55 | #X connect 6 0 5 0;
56 | #X restore 155 269 pd waveform;
57 | #X text 237 467 Creation argument is the name of the sample array to
58 | analyze., f 33;
59 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
60 | samples long (samples 44100 - 46099), f 48;
61 | #X text 652 527 Updated for timbreIDLib version 0.7;
62 | #X msg 98 123 analyze 44100 2000;
63 | #X obj 269 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
64 | -262144 -1 -1 0 256;
65 | #X text 652 547 July 2017;
66 | #X text 644 59 See the real-time version too.;
67 | #X obj 704 85 minSample~;
68 | #X obj 59 483 minSample \$0-sample;
69 | #X text 20 567 Outlet 1: minimum sample value;
70 | #X text 20 587 Outlet 2: minimum sample index relative to the analysis
71 | window, f 32;
72 | #X msg 269 582 \; \$2-waveform xlabel -1 \$1 \;;
73 | #X obj 269 562 pack f \$0;
74 | #X obj 653 567 declare -lib timbreIDLib;
75 | #X connect 0 0 19 0;
76 | #X connect 3 0 19 0;
77 | #X connect 4 0 10 0;
78 | #X connect 7 0 19 0;
79 | #X connect 10 0 3 0;
80 | #X connect 14 0 19 0;
81 | #X connect 15 0 23 0;
82 | #X connect 19 0 2 0;
83 | #X connect 19 1 15 0;
84 | #X connect 23 0 22 0;
85 |
--------------------------------------------------------------------------------
/help/minSampleDelta-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 213 81 923 675 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
9 | -191407 -1 -1 0 1;
10 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
11 | 0;
12 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
13 | 0;
14 | #N canvas 727 180 641 315 other-settings 0;
15 | #X msg 54 48 set another-sample-array;
16 | #X msg 93 104 samplerate 48000;
17 | #X text 242 47 Read from a different array;
18 | #X obj 54 255 outlet;
19 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
20 | ;
21 | #X msg 150 162 print;
22 | #X connect 0 0 3 0;
23 | #X connect 1 0 3 0;
24 | #X connect 5 0 3 0;
25 | #X restore 207 343 pd other-settings;
26 | #N canvas 0 50 450 300 (subpatch) 0;
27 | #X array \$0-waveform 1024 float 0;
28 | #X coords 0 1 1023 -1 200 140 1 0 0;
29 | #X restore 653 247 graph;
30 | #N canvas 666 270 552 163 soundfile 0;
31 | #X obj 50 93 soundfiler;
32 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
33 | #X obj 185 100 table \$0-sample 130000;
34 | #X obj 50 24 loadbang;
35 | #X obj 50 46 f \$0;
36 | #X connect 1 0 0 0;
37 | #X connect 3 0 4 0;
38 | #X connect 4 0 1 0;
39 | #X restore 653 407 pd soundfile;
40 | #N canvas 722 238 369 330 waveform 0;
41 | #X obj 46 61 inlet;
42 | #X obj 46 82 t f f;
43 | #X obj 46 284 outlet;
44 | #X obj 86 241 tabletool \$0-waveform;
45 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
46 | #X obj 86 164 pack f f \$0;
47 | #X obj 131 131 + 1023;
48 | #X connect 0 0 1 0;
49 | #X connect 1 0 2 0;
50 | #X connect 1 0 5 0;
51 | #X connect 1 1 6 0;
52 | #X connect 4 0 3 0;
53 | #X connect 5 0 4 0;
54 | #X connect 6 0 5 1;
55 | #X restore 155 269 pd waveform;
56 | #X text 259 477 Creation argument is the name of the sample array to
57 | analyze., f 33;
58 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
59 | samples long (samples 44100 - 46099), f 48;
60 | #X text 652 587 Updated for timbreIDLib version 0.7;
61 | #X msg 98 123 analyze 44100 2000;
62 | #X obj 269 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
63 | -262144 -1 -1 0 256;
64 | #X text 504 59 See the real-time version for more information on sample
65 | delta in general.;
66 | #X text 652 607 July 2017;
67 | #X msg 155 291 analyze \$1 1024;
68 | #X msg 269 582 \; \$2-waveform xlabel -1 \$1 \;;
69 | #X obj 269 562 pack f \$0;
70 | #X text 17 562 Outlet 1: minimum sample delta value, f 25;
71 | #X text 17 607 Outlet 2: minimum sample delta index relative to the
72 | analysis window, f 31;
73 | #X obj 646 91 minSampleDelta~;
74 | #X obj 59 483 minSampleDelta \$0-sample;
75 | #X obj 653 629 declare -lib timbreIDLib;
76 | #X connect 0 0 23 0;
77 | #X connect 3 0 9 0;
78 | #X connect 6 0 23 0;
79 | #X connect 9 0 17 0;
80 | #X connect 13 0 23 0;
81 | #X connect 14 0 19 0;
82 | #X connect 17 0 23 0;
83 | #X connect 19 0 18 0;
84 | #X connect 23 0 2 0;
85 | #X connect 23 1 14 0;
86 |
--------------------------------------------------------------------------------
/help/minSampleDelta~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 264 240 879 548 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 92 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X floatatom 70 414 10 0 0 0 - - -;
6 | #X text 173 215 Change window size.;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 676 230 576 318 other-settings 0;
12 | #X obj 54 225 outlet;
13 | #X msg 165 135 print;
14 | #X msg 54 68 overlap 2;
15 | #X text 135 56 Inside a subpatch with re-blocking involving overlap
16 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
17 | things to behave properly;
18 | #X connect 1 0 0 0;
19 | #X connect 2 0 0 0;
20 | #X restore 221 289 pd other-settings;
21 | #X text 606 464 Updated for timbreIDLib version 0.7;
22 | #X obj 592 300 timbreID;
23 | #X text 425 235 This feature can be sent to the timbreID external in
24 | order to identify timbres in real time. For more on using audio features
25 | for classification \, see the timbreID helpfile:;
26 | #X text 240 361 Creation argument is window size in samples;
27 | #X msg 175 233 window 2000;
28 | #X floatatom 210 414 10 0 0 0 - - -;
29 | #X text 606 484 July 2017;
30 | #X obj 159 142 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
31 | 1;
32 | #X obj 159 162 metro 100;
33 | #X obj 70 361 minSampleDelta~ 1024;
34 | #X text 68 458 Outlet 1: minimum sample delta magnitude value;
35 | #X text 68 478 Outlet 2: index of minimum sample delta magnitude relative
36 | to the analysis window;
37 | #X text 116 54 Bang to output minimum sample delta magnitude of most
38 | recent N sample window, f 40;
39 | #X text 425 54 [minSampleDelta~] takes the absolute value of the difference
40 | between all neighboring pairs of samples in a window of audio \, then
41 | reports the value and location of the lowest difference. This is useful
42 | for finding moments in a signal before the attack or after the release
43 | of a sound event.;
44 | #X obj 70 41 adc~;
45 | #X text 425 145 Audio buffering is taken care of by the external \,
46 | so there is no need for [block~]. You can set the window size with
47 | a creation argument \, or change it with the "window" message. Window
48 | size is not required to be a power of two.;
49 | #X obj 607 505 declare -lib timbreIDLib;
50 | #X connect 0 0 15 0;
51 | #X connect 5 0 15 0;
52 | #X connect 10 0 15 0;
53 | #X connect 13 0 14 0;
54 | #X connect 14 0 15 0;
55 | #X connect 15 0 1 0;
56 | #X connect 15 1 11 0;
57 | #X connect 20 0 15 0;
58 |
--------------------------------------------------------------------------------
/help/minSample~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 228 104 937 526 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
6 | 1;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 614 256 581 289 other-settings 0;
12 | #X obj 55 210 outlet;
13 | #X msg 109 129 print;
14 | #X text 159 131 Print current settings in the post window;
15 | #X msg 55 77 overlap 2;
16 | #X text 136 65 Inside a subpatch with re-blocking involving overlap
17 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
18 | things to behave properly;
19 | #X connect 1 0 0 0;
20 | #X connect 3 0 0 0;
21 | #X restore 217 300 pd other-settings;
22 | #X obj 57 72 adc~;
23 | #X text 658 453 Updated for timbreIDLib version 0.7;
24 | #X msg 173 243 window 2000;
25 | #X text 279 237 Change analysis window size, f 17;
26 | #X obj 648 266 timbreID;
27 | #X text 161 170 Bang repeatedly to keep refreshing...;
28 | #X text 481 201 This feature can be sent to the timbreID external in
29 | order to identify timbres in real time. For more on using audio features
30 | for classification \, see the timbreID helpfile:;
31 | #X obj 137 190 metro 100;
32 | #X text 180 372 Creation argument is window size in samples, f 23
33 | ;
34 | #X text 658 473 July 2017;
35 | #X floatatom 57 449 10 0 0 0 - - -;
36 | #X floatatom 167 419 10 0 0 0 - - -;
37 | #X obj 57 387 minSample~ 1024;
38 | #X text 481 54 [minSample~] reports the value and index of the smallest
39 | sample value in the most recent N-sample window of audio.;
40 | #X text 105 115 Bang to output minimum sample value and index;
41 | #X text 481 111 Audio buffering is taken care of by the external \,
42 | so there is no need for [block~]. You can set the window size with
43 | a creation argument \, or change it with the "window" message. Window
44 | size is not required to be a power of two.;
45 | #X obj 659 495 declare -lib timbreIDLib;
46 | #X connect 0 0 17 0;
47 | #X connect 1 0 12 0;
48 | #X connect 4 0 17 0;
49 | #X connect 5 0 17 0;
50 | #X connect 7 0 17 0;
51 | #X connect 12 0 17 0;
52 | #X connect 17 0 15 0;
53 | #X connect 17 1 16 0;
54 |
--------------------------------------------------------------------------------
/help/nearestPoint-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 426 178 675 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 266 340 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 736 161 304 400 random-point 0;
6 | #X obj 54 36 t b b b;
7 | #X obj 54 167 random 100;
8 | #X obj 54 249 pack f f f;
9 | #X obj 77 117 random 100;
10 | #X obj 100 66 random 100;
11 | #X obj 54 300 outlet;
12 | #X obj 54 7 inlet;
13 | #X obj 100 87 / 99;
14 | #X obj 77 138 / 99;
15 | #X obj 54 188 / 99;
16 | #X obj 123 290 print input-vector;
17 | #X connect 0 0 1 0;
18 | #X connect 0 1 3 0;
19 | #X connect 0 2 4 0;
20 | #X connect 1 0 9 0;
21 | #X connect 2 0 5 0;
22 | #X connect 2 0 10 0;
23 | #X connect 3 0 8 0;
24 | #X connect 4 0 7 0;
25 | #X connect 6 0 0 0;
26 | #X connect 7 0 2 2;
27 | #X connect 8 0 2 1;
28 | #X connect 9 0 2 0;
29 | #X restore 266 359 pd random-point;
30 | #X text 137 237 Clear the current set of points.;
31 | #X msg 88 238 clear;
32 | #X text 194 267 Change dimensionality.;
33 | #X msg 98 268 dimensions 2;
34 | #X text 43 476 The index of the nearest point comes out the left outlet
35 | \, and its distance from the input point comes out the right outlet.
36 | ;
37 | #X text 289 338 Generate a random point in space.;
38 | #X obj 45 415 nearestPoint 3;
39 | #X text 42 91 nearestPoint accepts members from a set of points in
40 | its left inlet. All members of the set must have the same dimensionality
41 | \, set by a creation argument. Once you've given it all the points
42 | in your set \, send an arbitrary point of the same dimensionality to
43 | the right inlet to see which point in the set is nearest.;
44 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
45 | 0;
46 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
47 | 0;
48 | #X text 411 526 Updated for timbreIDLib version 0.7;
49 | #X text 120 300 Output the N nearest matches to the test point;
50 | #X msg 156 355 print;
51 | #X msg 122 320 num_matches 5;
52 | #X obj 45 454 print Index;
53 | #X obj 175 454 print Distance;
54 | #X msg 45 188 1 0 0 \, 0 1 0 \, 0 0 1 \, 1 1 0 \, 0 1 1 \, 1 0 1;
55 | #X text 411 546 July 2017;
56 | #X text 42 41 This object exists in order to enable the timbreID timbre-space
57 | example patches \, but it's bound to be useful in other situations
58 | too.;
59 | #X obj 412 569 declare -lib timbreIDLib;
60 | #X connect 0 0 1 0;
61 | #X connect 1 0 8 1;
62 | #X connect 3 0 8 0;
63 | #X connect 5 0 8 0;
64 | #X connect 8 0 16 0;
65 | #X connect 8 1 17 0;
66 | #X connect 14 0 8 0;
67 | #X connect 15 0 8 0;
68 | #X connect 18 0 8 0;
69 |
--------------------------------------------------------------------------------
/help/peakSample-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 213 81 915 635 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | -191407 -1 -1 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 724 184 641 315 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 93 104 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 255 outlet;
20 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
21 | ;
22 | #X msg 150 162 print;
23 | #X connect 0 0 3 0;
24 | #X connect 1 0 3 0;
25 | #X connect 5 0 3 0;
26 | #X restore 207 343 pd other-settings;
27 | #N canvas 0 50 450 300 (subpatch) 0;
28 | #X array \$0-waveform 1024 float 0;
29 | #X coords 0 1 1023 -1 200 140 1 0 0;
30 | #X restore 653 247 graph;
31 | #N canvas 666 270 552 163 soundfile 0;
32 | #X obj 50 93 soundfiler;
33 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
34 | #X obj 185 100 table \$0-sample 130000;
35 | #X obj 50 24 loadbang;
36 | #X obj 50 46 f \$0;
37 | #X connect 1 0 0 0;
38 | #X connect 3 0 4 0;
39 | #X connect 4 0 1 0;
40 | #X restore 653 407 pd soundfile;
41 | #N canvas 722 238 369 330 waveform 0;
42 | #X obj 46 61 inlet;
43 | #X obj 46 82 t f f;
44 | #X obj 46 284 outlet;
45 | #X obj 131 131 + 1023;
46 | #X obj 86 241 tabletool \$0-waveform;
47 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
48 | #X obj 86 164 pack f f \$0;
49 | #X connect 0 0 1 0;
50 | #X connect 1 0 2 0;
51 | #X connect 1 0 6 0;
52 | #X connect 1 1 3 0;
53 | #X connect 3 0 6 1;
54 | #X connect 5 0 4 0;
55 | #X connect 6 0 5 0;
56 | #X restore 155 269 pd waveform;
57 | #X text 259 477 Creation argument is the name of the sample array to
58 | analyze., f 33;
59 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
60 | samples long (samples 44100 - 46099), f 48;
61 | #X text 650 555 Updated for timbreIDLib version 0.7;
62 | #X msg 98 123 analyze 44100 2000;
63 | #X obj 269 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
64 | -262144 -1 -1 0 256;
65 | #X text 650 575 July 2017;
66 | #X text 644 59 See the real-time version too.;
67 | #X obj 59 483 peakSample \$0-sample;
68 | #X text 24 567 Outlet 1: peak sample value;
69 | #X text 24 587 Outlet 2: peak sample index relative to the analysis
70 | window, f 31;
71 | #X obj 704 85 peakSample~;
72 | #X msg 269 582 \; \$2-waveform xlabel -1 \$1 \;;
73 | #X obj 269 562 pack f \$0;
74 | #X obj 651 596 declare -lib timbreIDLib;
75 | #X connect 0 0 18 0;
76 | #X connect 3 0 18 0;
77 | #X connect 4 0 10 0;
78 | #X connect 7 0 18 0;
79 | #X connect 10 0 3 0;
80 | #X connect 14 0 18 0;
81 | #X connect 15 0 23 0;
82 | #X connect 18 0 2 0;
83 | #X connect 18 1 15 0;
84 | #X connect 23 0 22 0;
85 |
--------------------------------------------------------------------------------
/help/peakSample~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 222 104 938 528 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
6 | 1;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 884 207 599 301 other-settings 0;
12 | #X obj 54 205 outlet;
13 | #X msg 108 119 print;
14 | #X text 158 121 Print current settings in the post window;
15 | #X msg 54 67 overlap 2;
16 | #X text 135 55 Inside a subpatch with re-blocking involving overlap
17 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
18 | things to behave properly;
19 | #X connect 1 0 0 0;
20 | #X connect 3 0 0 0;
21 | #X restore 217 300 pd other-settings;
22 | #X obj 57 72 adc~;
23 | #X msg 173 243 window 2000;
24 | #X text 275 237 Change analysis window size, f 16;
25 | #X obj 648 296 timbreID;
26 | #X text 161 170 Bang repeatedly to keep refreshing...;
27 | #X text 481 236 This feature can be sent to the timbreID external in
28 | order to identify timbres in real time. For more on using audio features
29 | for classification \, see the timbreID helpfile:;
30 | #X obj 137 190 metro 100;
31 | #X text 180 382 Creation argument is window size in samples, f 23
32 | ;
33 | #X floatatom 57 449 10 0 0 0 - - -;
34 | #X floatatom 167 419 10 0 0 0 - - -;
35 | #X obj 57 387 peakSample~ 1024;
36 | #X text 481 152 Audio buffering and windowing are taken care of by
37 | the external \, so there is no need for tabreceive~ or block~. You
38 | can set the window size with a creation argument \, or change it with
39 | the "window" message. Window size is not required to be a power of
40 | two.;
41 | #X text 105 115 Bang to output peak sample value and location;
42 | #X obj 663 489 declare -lib timbreIDLib;
43 | #X text 662 467 June 2022;
44 | #X text 662 447 Updated for timbreIDLib version 0.9.0;
45 | #X text 481 74 [peakSample~] reports the value and index of the sample
46 | with the largest magnitude in the most recent N-sample window of audio.
47 | Note that this is not peak amplitude \, as the resulting sample value
48 | will sometimes be negative. For peak amplitude \, use [abs] on the
49 | output of the first outlet.;
50 | #X connect 0 0 15 0;
51 | #X connect 1 0 11 0;
52 | #X connect 4 0 15 0;
53 | #X connect 5 0 15 0;
54 | #X connect 6 0 15 0;
55 | #X connect 11 0 15 0;
56 | #X connect 15 0 13 0;
57 | #X connect 15 1 14 0;
58 |
--------------------------------------------------------------------------------
/help/phaseSpec~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 280 111 957 589 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 142 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-phaseSpec-graph 33 float 2;
7 | #X coords 0 3.14159 33 -3.12381 200 140 1 0 0;
8 | #X restore 483 310 graph;
9 | #X obj 137 181 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 740 301 615 476 other-settings 0;
16 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
17 | -1 1;
18 | #X msg 54 106 window_function \$1;
19 | #X obj 54 415 outlet;
20 | #X msg 158 208 print;
21 | #X text 208 210 Print current settings in the post window;
22 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
23 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
24 | ;
25 | #X msg 104 156 overlap 2;
26 | #X text 185 144 Inside a subpatch with re-blocking involving overlap
27 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
28 | things to behave properly;
29 | #X connect 0 0 1 0;
30 | #X connect 1 0 2 0;
31 | #X connect 3 0 2 0;
32 | #X connect 6 0 2 0;
33 | #X restore 217 310 pd other-settings;
34 | #X msg 173 253 window 2000;
35 | #X text 268 246 Change analysis window size, f 17;
36 | #X obj 648 536 timbreID;
37 | #X text 161 180 Bang repeatedly to keep refreshing...;
38 | #X text 481 471 This feature can be sent to the timbreID external in
39 | order to identify timbres in real time. For more on using audio features
40 | for classification \, see the timbreID helpfile:;
41 | #X text 180 382 Creation argument is window size in samples, f 23
42 | ;
43 | #N canvas 202 174 463 267 do-plotting 0;
44 | #X obj 79 37 inlet;
45 | #X obj 79 173 list prepend 0;
46 | #X obj 233 116 list length;
47 | #X obj 233 138 change;
48 | #X obj 233 160 pack f \$0;
49 | #X obj 79 59 t l l;
50 | #X msg 233 181 \; \$2-phaseSpec-graph resize \$1 \;;
51 | #X obj 79 194 s \$0-phaseSpec-graph;
52 | #X connect 0 0 5 0;
53 | #X connect 1 0 7 0;
54 | #X connect 2 0 3 0;
55 | #X connect 3 0 4 0;
56 | #X connect 4 0 6 0;
57 | #X connect 5 0 1 0;
58 | #X connect 5 1 2 0;
59 | #X restore 57 437 pd do-plotting;
60 | #X text 481 221 Audio buffering and windowing are taken care of by
61 | the external \, so there is no need for tabreceive~ or block~. You
62 | can set the window size with a creation argument \, or change it with
63 | the "window" message. Window size is not required to be a power of
64 | two.;
65 | #X text 712 299 pi;
66 | #X text 709 442 -pi;
67 | #X text 40 511 Updated for timbreIDLib version 0.7.6;
68 | #X text 40 531 August 2018;
69 | #X text 105 125 Bang to output spectrum phases as a list;
70 | #X obj 137 200 metro 30;
71 | #X floatatom 57 29 5 0 63 1 bin - -;
72 | #X obj 57 49 bin2freq 64 44100;
73 | #X floatatom 57 70 10 0 0 1 Hz - -;
74 | #X obj 57 92 osc~ 2232.56;
75 | #X obj 57 387 phaseSpec~ 64;
76 | #X text 481 34 The phase spectrum is calculated by taking the arctangent
77 | of each complex number resulting from a Fourier transform. While the
78 | distance of a complex number from zero (magnitude) represents the amount
79 | of energy in a given frequency bin \, the angle (argument) of that
80 | same number represents the phase information for the bin. [phaseSpec~]
81 | does nothing until it receives a bang \, then it spits out the spectrum
82 | phases for the most recent analysis window as a list. The length of
83 | the phase list will be one half of the specified window size plus one
84 | (N/2+1). [phaseSpec~]'s output is between -pi and +pi radians. Try
85 | changing the frequency of the oscillator at left by bin number. Note
86 | the unique phase spectrum that occurs at the Nyquist bin. Also note
87 | that the choice of window (Blackman \, Hann \, etc) has a big impact
88 | on phase information.;
89 | #X obj 41 555 declare -lib timbreIDLib;
90 | #X connect 0 0 24 0;
91 | #X connect 2 0 19 0;
92 | #X connect 5 0 24 0;
93 | #X connect 6 0 24 0;
94 | #X connect 19 0 24 0;
95 | #X connect 20 0 21 0;
96 | #X connect 21 0 22 0;
97 | #X connect 22 0 23 0;
98 | #X connect 23 0 24 0;
99 | #X connect 24 0 12 0;
100 |
--------------------------------------------------------------------------------
/help/sampleBuffer~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 205 140 940 589 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 108 132 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-sampleBuffer-graph 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 483 240 graph;
9 | #X obj 137 171 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
10 | 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 648 263 574 351 other-settings 0;
16 | #X obj 54 255 outlet;
17 | #X msg 108 119 print;
18 | #X text 158 121 Print current settings in the post window;
19 | #X msg 54 67 overlap 2;
20 | #X text 135 55 Inside a subpatch with re-blocking involving overlap
21 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
22 | things to behave properly;
23 | #X connect 1 0 0 0;
24 | #X connect 3 0 0 0;
25 | #X restore 217 300 pd other-settings;
26 | #X text 52 507 Updated for timbreIDLib version 0.7;
27 | #X msg 173 243 window 2000;
28 | #X text 272 237 Change analysis window size, f 16;
29 | #X obj 648 466 timbreID;
30 | #X text 161 170 Bang repeatedly to keep refreshing...;
31 | #X text 481 401 This feature can be sent to the timbreID external in
32 | order to identify timbres in real time. For more on using audio features
33 | for classification \, see the timbreID helpfile:;
34 | #X obj 137 190 metro 100;
35 | #X text 200 382 Creation argument is window size in samples, f 23
36 | ;
37 | #N canvas 205 170 462 302 do-plotting 0;
38 | #X obj 79 37 inlet;
39 | #X obj 79 203 list prepend 0;
40 | #X obj 203 116 list length;
41 | #X obj 203 138 change;
42 | #X obj 203 160 pack f \$0;
43 | #X obj 79 59 t l l;
44 | #X obj 79 224 s \$0-sampleBuffer-graph;
45 | #X msg 203 181 \; \$2-sampleBuffer-graph resize \$1 \;;
46 | #X connect 0 0 5 0;
47 | #X connect 1 0 6 0;
48 | #X connect 2 0 3 0;
49 | #X connect 3 0 4 0;
50 | #X connect 4 0 7 0;
51 | #X connect 5 0 1 0;
52 | #X connect 5 1 2 0;
53 | #X restore 57 437 pd do-plotting;
54 | #X text 52 527 July 2017;
55 | #X text 105 95 Bang to output the most recent N samples as a list,
56 | f 31;
57 | #X obj 57 387 sampleBuffer~ 1024;
58 | #X obj 57 72 adc~;
59 | #X text 481 54 [sampleBuffer~] contains the same audio buffering routine
60 | that other real-time timbreID analysis objects use. This could be useful
61 | for viewing the exact audio frame that is analyzed by analysis objects
62 | triggered via the same bang.;
63 | #X text 481 121 Audio buffering is taken care of by the external \,
64 | so there is no need for [block~]. You can set the window size with
65 | a creation argument \, or change it with the "window" message. Window
66 | size is not required to be a power of two.;
67 | #X obj 53 549 declare -lib timbreIDLib;
68 | #X connect 0 0 17 0;
69 | #X connect 2 0 12 0;
70 | #X connect 5 0 17 0;
71 | #X connect 7 0 17 0;
72 | #X connect 12 0 17 0;
73 | #X connect 17 0 14 0;
74 | #X connect 18 0 17 0;
75 |
--------------------------------------------------------------------------------
/help/specBrightness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 308 136 907 481 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 143 127 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 107 403 10 0 0 0 - - -;
6 | #X text 178 172 Change window size.;
7 | #X obj 55 78 *~;
8 | #X obj 84 78 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
9 | ;
10 | #X obj 107 78 *~;
11 | #X obj 136 78 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
12 | 1;
13 | #X obj 55 47 noise~;
14 | #X text 206 216 Set boundary freq.;
15 | #X text 140 109 Bang to output brightness.;
16 | #X obj 107 47 osc~ 440;
17 | #X obj 107 357 specBrightness~ 1024 1200;
18 | #X text 434 53 Spectral Brightness is the ratio of the sum of magnitudes
19 | above a given boundary frequency to the sum of all magnitudes in a
20 | spectrum. Signals with a significant amount of high frequency content
21 | will have higher brightness. At left \, noise will have much higher
22 | brightness than a sinusoid at 440 Hz.;
23 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
24 | 0;
25 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
26 | 0;
27 | #N canvas 673 234 711 488 other-settings 0;
28 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
29 | -1 3;
30 | #X msg 54 106 window_function \$1;
31 | #X msg 145 187 power_spectrum \$1;
32 | #X obj 145 169 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
33 | 1;
34 | #X obj 54 415 outlet;
35 | #X text 286 187 Use power spectrum. (default: magnitude);
36 | #X msg 264 311 print;
37 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
38 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
39 | ;
40 | #X msg 181 249 overlap 2;
41 | #X text 262 237 Inside a subpatch with re-blocking involving overlap
42 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
43 | things to behave properly;
44 | #X connect 0 0 1 0;
45 | #X connect 1 0 4 0;
46 | #X connect 2 0 4 0;
47 | #X connect 3 0 2 0;
48 | #X connect 6 0 4 0;
49 | #X connect 8 0 4 0;
50 | #X restore 216 299 pd other-settings;
51 | #X msg 207 234 boundary 9000;
52 | #X text 645 403 Updated for timbreIDLib version 0.7;
53 | #X obj 601 304 timbreID;
54 | #X text 434 239 This feature can be sent to the timbreID external in
55 | order to identify timbres in real time. For more on using audio features
56 | for classification \, see the timbreID helpfile:;
57 | #X text 434 149 Audio buffering and windowing are taken care of by
58 | the external \, so there is no need for tabreceive~ or block~. You
59 | can set the window size with a creation argument \, or change it with
60 | the "window" message. Window size is not required to be a power of
61 | two.;
62 | #X msg 180 190 window 2000;
63 | #X text 312 344 Creation arguments are window size in samples \, and
64 | a boundary frequency to determine the ratio of high spectral content.
65 | , f 47;
66 | #X text 645 423 July 2017;
67 | #X obj 647 445 declare -lib timbreIDLib;
68 | #X connect 0 0 11 0;
69 | #X connect 3 0 11 0;
70 | #X connect 4 0 3 1;
71 | #X connect 5 0 11 0;
72 | #X connect 6 0 5 1;
73 | #X connect 7 0 3 0;
74 | #X connect 10 0 5 0;
75 | #X connect 11 0 1 0;
76 | #X connect 15 0 11 0;
77 | #X connect 16 0 11 0;
78 | #X connect 21 0 11 0;
79 |
--------------------------------------------------------------------------------
/help/specCentroid~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 280 81 879 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 162 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 70 414 10 0 0 0 - - -;
6 | #X text 133 215 Change window size.;
7 | #X obj 70 111 +~;
8 | #X obj 70 57 osc~ 400;
9 | #X obj 88 80 osc~ 500;
10 | #X obj 70 361 specCentroid~ 1024;
11 | #X text 116 144 Bang to output centroid.;
12 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
13 | 0;
14 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
15 | 0;
16 | #X text 425 44 Spectral Centroid is the center of mass of magnitude
17 | spectrum \, and is a common low-level timbre feature. It is computed
18 | as the ratio of the sum of spectral magnitude weighted by frequency
19 | to the sum of spectral magnitude. Therefore \, it reports the frequency
20 | associated with spectral center of mass. This is clearly demonstrated
21 | at left \, where two perfect spikes in the spectrum at 400 Hz and 500
22 | Hz produce a centroid near 450 Hz.;
23 | #N canvas 676 230 642 497 other-settings 0;
24 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
25 | -1 0;
26 | #X msg 54 106 window_function \$1;
27 | #X msg 175 247 power_spectrum \$1;
28 | #X obj 175 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
29 | 1;
30 | #X obj 54 415 outlet;
31 | #X text 316 247 Use power spectrum. (default: magnitude);
32 | #X msg 215 305 print;
33 | #X msg 104 168 overlap 2;
34 | #X text 185 156 Inside a subpatch with re-blocking involving overlap
35 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
36 | things to behave properly;
37 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
38 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
39 | ;
40 | #X connect 0 0 1 0;
41 | #X connect 1 0 4 0;
42 | #X connect 2 0 4 0;
43 | #X connect 3 0 2 0;
44 | #X connect 6 0 4 0;
45 | #X connect 7 0 4 0;
46 | #X restore 181 289 pd other-settings;
47 | #X text 616 406 Updated for timbreIDLib version 0.7;
48 | #X obj 592 325 timbreID;
49 | #X text 425 260 This feature can be sent to the timbreID external in
50 | order to identify timbres in real time. For more on using audio features
51 | for classification \, see the timbreID helpfile:;
52 | #X text 425 170 Audio buffering and windowing are taken care of by
53 | the external \, so there is no need for tabreceive~ or block~. You
54 | can set the window size with a creation argument \, or change it with
55 | the "window" message. Window size is not required to be a power of
56 | two.;
57 | #X text 210 361 Creation argument is window size in samples;
58 | #X msg 135 233 window 2000;
59 | #X text 616 426 July 2017;
60 | #X obj 617 447 declare -lib timbreIDLib;
61 | #X connect 0 0 6 0;
62 | #X connect 3 0 6 0;
63 | #X connect 4 0 3 0;
64 | #X connect 5 0 3 1;
65 | #X connect 6 0 1 0;
66 | #X connect 11 0 6 0;
67 | #X connect 17 0 6 0;
68 |
--------------------------------------------------------------------------------
/help/specFlatness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 280 81 882 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 109 172 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 60 424 10 0 0 0 - - -;
6 | #X text 123 225 Change window size.;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 676 230 638 497 other-settings 0;
12 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
13 | -1 0;
14 | #X msg 54 106 window_function \$1;
15 | #X msg 175 247 power_spectrum \$1;
16 | #X obj 175 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
17 | 1;
18 | #X obj 54 415 outlet;
19 | #X text 316 247 Use power spectrum. (default: magnitude);
20 | #X msg 215 305 print;
21 | #X msg 104 168 overlap 2;
22 | #X text 185 156 Inside a subpatch with re-blocking involving overlap
23 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
24 | things to behave properly;
25 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
26 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
27 | ;
28 | #X connect 0 0 1 0;
29 | #X connect 1 0 4 0;
30 | #X connect 2 0 4 0;
31 | #X connect 3 0 2 0;
32 | #X connect 6 0 4 0;
33 | #X connect 7 0 4 0;
34 | #X restore 171 299 pd other-settings;
35 | #X text 616 406 Updated for timbreIDLib version 0.7;
36 | #X obj 592 325 timbreID;
37 | #X text 425 260 This feature can be sent to the timbreID external in
38 | order to identify timbres in real time. For more on using audio features
39 | for classification \, see the timbreID helpfile:;
40 | #X text 425 170 Audio buffering and windowing are taken care of by
41 | the external \, so there is no need for tabreceive~ or block~. You
42 | can set the window size with a creation argument \, or change it with
43 | the "window" message. Window size is not required to be a power of
44 | two.;
45 | #X text 200 371 Creation argument is window size in samples;
46 | #X msg 125 243 window 2000;
47 | #X obj 112 51 osc~ 440;
48 | #X obj 60 82 *~;
49 | #X obj 89 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
50 | ;
51 | #X obj 112 82 *~;
52 | #X obj 141 82 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
53 | 1;
54 | #X obj 60 51 noise~;
55 | #X obj 60 134 +~;
56 | #X obj 60 371 specFlatness~ 1024;
57 | #X text 106 154 Bang to output flatness;
58 | #X text 616 426 July 2017;
59 | #X text 425 57 Spectral Flatness is the ratio of the geometric mean
60 | of magnitude spectrum to the arithmetic mean of magnitude spectrum.
61 | A very flat spectrum with equal energy across all frequency bands (e.g.
62 | \, that of white noise) should have a high flatness value \, where
63 | 1 is perfect flatness. The flatness of noise~ is about 0.85 \, while
64 | the flatness of a sinusoid is basically zero.;
65 | #X obj 617 449 declare -lib timbreIDLib;
66 | #X connect 0 0 19 0;
67 | #X connect 5 0 19 0;
68 | #X connect 11 0 19 0;
69 | #X connect 12 0 15 0;
70 | #X connect 13 0 18 0;
71 | #X connect 14 0 13 1;
72 | #X connect 15 0 18 1;
73 | #X connect 16 0 15 1;
74 | #X connect 17 0 13 0;
75 | #X connect 18 0 19 0;
76 | #X connect 19 0 1 0;
77 |
--------------------------------------------------------------------------------
/help/specIrregularity~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 290 99 982 581 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 143 197 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 56 523 10 0 0 0 - - -;
6 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
7 | 0;
8 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
9 | 0;
10 | #N canvas 608 129 737 475 other-settings 0;
11 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
12 | -1 3;
13 | #X msg 54 106 window_function \$1;
14 | #X msg 155 217 power_spectrum \$1;
15 | #X obj 155 199 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
16 | 1;
17 | #X obj 54 415 outlet;
18 | #X text 296 217 Use power spectrum. (default: magnitude);
19 | #X msg 234 335 print;
20 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
21 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
22 | ;
23 | #X msg 191 279 overlap 2;
24 | #X text 272 267 Inside a subpatch with re-blocking involving overlap
25 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
26 | things to behave properly;
27 | #X obj 111 146 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
28 | 1;
29 | #X msg 111 164 normalize \$1;
30 | #X text 239 155 Normalize spectrum. This only affects results when
31 | using the Krimphoff algorithm. (default: ON);
32 | #X connect 0 0 1 0;
33 | #X connect 1 0 4 0;
34 | #X connect 2 0 4 0;
35 | #X connect 3 0 2 0;
36 | #X connect 6 0 4 0;
37 | #X connect 8 0 4 0;
38 | #X connect 10 0 11 0;
39 | #X connect 11 0 4 0;
40 | #X restore 216 409 pd other-settings;
41 | #X text 705 503 Updated for timbreIDLib version 0.7;
42 | #X obj 671 340 timbreID;
43 | #X text 504 275 This feature can be sent to the timbreID external in
44 | order to identify timbres in real time. For more on using audio features
45 | for classification \, see the timbreID helpfile:;
46 | #X msg 180 260 window 2000;
47 | #X obj 214 315 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
48 | 1;
49 | #X msg 214 335 algorithm \$1;
50 | #X text 229 354 Choose either Jensen (0) or Krimphoff (1) algorithm.
51 | (default: Jensen), f 38;
52 | #X text 504 179 Audio buffering and windowing are taken care of by
53 | the external \, so there is no need for tabreceive~ or block~. You
54 | can set the window size with a creation argument \, or change it with
55 | the "window" message. Window size is not required to be a power of
56 | two. The second creation argument sets the algorithm to either Jensen
57 | (0) or Krimphoff (1).;
58 | #X obj 56 49 phasor~ 440;
59 | #X obj 116 71 noise~;
60 | #X obj 56 131 *~;
61 | #X obj 86 131 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
62 | 1;
63 | #X obj 116 131 *~;
64 | #X obj 146 131 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
65 | 1;
66 | #X obj 116 92 lop~ 1000;
67 | #X obj 56 71 *~ 2;
68 | #X obj 56 93 -~ 1;
69 | #X obj 56 183 +~;
70 | #X text 263 481 Creation arguments are window size in samples \, and
71 | choice of algorithm: either Jensen (0) or Krimphoff (1)., f 56;
72 | #X text 140 179 Bang to output irregularity;
73 | #X text 178 242 Change window size;
74 | #X obj 56 487 specIrregularity~ 1024 0;
75 | #X text 705 523 July 2017;
76 | #X text 504 33 Spectral Irregularity has two common definitions: one
77 | by Jensen \, the other by Krimphoff. The calculation differs \, but
78 | the general idea of both is to inspect a spectrum from low to high
79 | and see how each frequency bin compares to its immediate neighbors.
80 | For jagged spectra \, irregularity will be high \, and and for smooth
81 | contoured spectra \, it will be low. In 2005 \, McAdams et. al identified
82 | this measure as important to timbre perception. At left \, the irregularity
83 | of a sawtooth wave (with a spiky spectrum) is much more than low-pass
84 | filtered noise.;
85 | #X obj 706 547 declare -lib timbreIDLib;
86 | #X connect 0 0 26 0;
87 | #X connect 4 0 26 0;
88 | #X connect 8 0 26 0;
89 | #X connect 9 0 10 0;
90 | #X connect 10 0 26 0;
91 | #X connect 13 0 20 0;
92 | #X connect 14 0 19 0;
93 | #X connect 15 0 22 0;
94 | #X connect 16 0 15 1;
95 | #X connect 17 0 22 1;
96 | #X connect 18 0 17 1;
97 | #X connect 19 0 17 0;
98 | #X connect 20 0 21 0;
99 | #X connect 21 0 15 0;
100 | #X connect 22 0 26 0;
101 | #X connect 26 0 1 0;
102 |
--------------------------------------------------------------------------------
/help/specKurtosis~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 280 81 898 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 201 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 50 433 10 0 0 0 - - -;
6 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
7 | 0;
8 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
9 | 0;
10 | #N canvas 635 97 609 497 other-settings 0;
11 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
12 | -1 0;
13 | #X msg 54 106 window_function \$1;
14 | #X msg 155 247 power_spectrum \$1;
15 | #X obj 155 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
16 | 1;
17 | #X obj 54 415 outlet;
18 | #X text 296 247 Use power spectrum. (default: magnitude);
19 | #X msg 215 305 print;
20 | #X msg 104 168 overlap 2;
21 | #X text 185 156 Inside a subpatch with re-blocking involving overlap
22 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
23 | things to behave properly;
24 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X connect 0 0 1 0;
28 | #X connect 1 0 4 0;
29 | #X connect 2 0 4 0;
30 | #X connect 3 0 2 0;
31 | #X connect 6 0 4 0;
32 | #X connect 7 0 4 0;
33 | #X restore 221 338 pd other-settings;
34 | #X text 626 407 Updated for timbreIDLib version 0.7;
35 | #X obj 592 305 timbreID;
36 | #X text 425 240 This feature can be sent to the timbreID external in
37 | order to identify timbres in real time. For more on using audio features
38 | for classification \, see the timbreID helpfile:;
39 | #X text 425 150 Audio buffering and windowing are taken care of by
40 | the external \, so there is no need for tabreceive~ or block~. You
41 | can set the window size with a creation argument \, or change it with
42 | the "window" message. Window size is not required to be a power of
43 | two.;
44 | #X text 190 400 Creation argument is window size in samples;
45 | #X msg 185 296 window 2000;
46 | #X obj 50 400 specKurtosis~ 1024;
47 | #X text 171 224 Bang continuously;
48 | #X obj 150 225 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
49 | 1;
50 | #X obj 50 44 noise~;
51 | #X obj 151 135 *~;
52 | #X obj 187 135 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
53 | 1;
54 | #X obj 151 86 osc~ 880;
55 | #X obj 50 178 +~;
56 | #X floatatom 107 41 5 0 0 1 Q - -;
57 | #X obj 107 60 * 10;
58 | #X obj 50 135 *~;
59 | #X obj 86 135 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
60 | 1;
61 | #X text 425 60 Spectral kurtosis measures the peakedness of a spectrum.
62 | The kurtosis of a single sinusoid will be extremely high \, while that
63 | of noise will be extremely low. Raise the Q on the band-passed noise
64 | to make its spectrum more and more peaked and see how kurtosis reflects
65 | the changes.;
66 | #X text 183 278 Change window size;
67 | #X text 116 183 Bang to output kurtosis;
68 | #X obj 150 247 metro 100;
69 | #X text 626 427 July 2017;
70 | #X obj 50 108 bp~ 1000 1;
71 | #X obj 50 86 bp~ 1000 1;
72 | #X obj 627 451 declare -lib timbreIDLib;
73 | #X connect 0 0 11 0;
74 | #X connect 4 0 11 0;
75 | #X connect 10 0 11 0;
76 | #X connect 11 0 1 0;
77 | #X connect 13 0 26 0;
78 | #X connect 14 0 29 0;
79 | #X connect 15 0 18 1;
80 | #X connect 16 0 15 1;
81 | #X connect 17 0 15 0;
82 | #X connect 18 0 11 0;
83 | #X connect 19 0 20 0;
84 | #X connect 20 0 28 2;
85 | #X connect 20 0 29 2;
86 | #X connect 21 0 18 0;
87 | #X connect 22 0 21 1;
88 | #X connect 26 0 11 0;
89 | #X connect 28 0 21 0;
90 | #X connect 29 0 28 0;
91 |
--------------------------------------------------------------------------------
/help/specRolloff~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 208 81 948 568 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 133 147 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 55 503 10 0 0 0 - - -;
6 | #X obj 55 47 noise~;
7 | #X obj 3 3 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 3 3 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 638 101 716 488 other-settings 0;
12 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
13 | -1 3;
14 | #X msg 54 106 window_function \$1;
15 | #X msg 145 187 power_spectrum \$1;
16 | #X obj 145 169 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
17 | 1;
18 | #X obj 54 415 outlet;
19 | #X text 286 187 Use power spectrum. (default: magnitude);
20 | #X msg 229 318 print;
21 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
22 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
23 | ;
24 | #X msg 181 249 overlap 2;
25 | #X text 262 237 Inside a subpatch with re-blocking involving overlap
26 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
27 | things to behave properly;
28 | #X connect 0 0 1 0;
29 | #X connect 1 0 4 0;
30 | #X connect 2 0 4 0;
31 | #X connect 3 0 2 0;
32 | #X connect 6 0 4 0;
33 | #X connect 8 0 4 0;
34 | #X restore 268 376 pd other-settings;
35 | #X text 657 490 Updated for timbreIDLib version 0.7;
36 | #X obj 651 358 timbreID;
37 | #X text 484 293 This feature can be sent to the timbreID external in
38 | order to identify timbres in real time. For more on using audio features
39 | for classification \, see the timbreID helpfile:;
40 | #X text 484 209 Audio buffering and windowing are taken care of by
41 | the external \, so there is no need for tabreceive~ or block~. You
42 | can set the window size with a creation argument \, or change it with
43 | the "window" message. Window size is not required to be a power of
44 | two.;
45 | #X msg 204 254 window 2000;
46 | #X text 232 303 Set energy concentration target;
47 | #X msg 233 321 concentration 0.7;
48 | #X obj 55 78 lop~ 1000;
49 | #X obj 55 100 lop~ 1000;
50 | #X text 232 444 Creation arguments are window size in samples \, and
51 | an energy concentration target between 0 and 1, f 47;
52 | #X text 130 129 Bang to output rolloff frequency;
53 | #X text 202 236 Change window size;
54 | #X obj 171 177 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
55 | 1;
56 | #X obj 171 197 metro 100;
57 | #X text 197 176 Output continuously;
58 | #X obj 142 53 hsl 128 15 100 15000 1 0 empty empty empty -2 -8 0 10
59 | -262144 -1 -1 0 1;
60 | #X floatatom 139 73 10 0 0 0 - - -;
61 | #X text 484 33 Spectral Rolloff is the frequency below which a certain
62 | amount of total spectral energy is concentrated. The default concentration
63 | is 0.85 \, but you can change this with the concentration message below.
64 | Keep in mind that roll-off reports the frequency associated with the
65 | spectral bin in question. Bin frequency resolution depends on window
66 | size (N) and sampling rate (R) \, and all bin frequencies will be multiples
67 | of R/N. Move the cutoff frequency for the low pass filter at left \,
68 | and watch the rolloff value change accordingly. With the settings used
69 | here \, 65% of the spectral energy for the low pass filtered noise
70 | is below the reported bin frequency.;
71 | #X text 657 510 July 2017;
72 | #X obj 55 457 specRolloff~ 1024 0.65;
73 | #X obj 658 535 declare -lib timbreIDLib;
74 | #X connect 0 0 25 0;
75 | #X connect 2 0 13 0;
76 | #X connect 5 0 25 0;
77 | #X connect 10 0 25 0;
78 | #X connect 12 0 25 0;
79 | #X connect 13 0 14 0;
80 | #X connect 14 0 25 0;
81 | #X connect 18 0 19 0;
82 | #X connect 19 0 25 0;
83 | #X connect 21 0 22 0;
84 | #X connect 22 0 13 1;
85 | #X connect 22 0 14 1;
86 | #X connect 25 0 1 0;
87 |
--------------------------------------------------------------------------------
/help/specSkewness~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 280 81 886 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 201 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 50 433 10 0 0 0 - - -;
6 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
7 | 0;
8 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
9 | 0;
10 | #N canvas 635 97 633 497 other-settings 0;
11 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
12 | -1 0;
13 | #X msg 54 106 window_function \$1;
14 | #X msg 155 247 power_spectrum \$1;
15 | #X obj 155 229 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
16 | 1;
17 | #X obj 54 415 outlet;
18 | #X text 296 247 Use power spectrum. (default: magnitude);
19 | #X msg 215 305 print;
20 | #X msg 104 168 overlap 2;
21 | #X text 185 156 Inside a subpatch with re-blocking involving overlap
22 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
23 | things to behave properly;
24 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
25 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
26 | ;
27 | #X connect 0 0 1 0;
28 | #X connect 1 0 4 0;
29 | #X connect 2 0 4 0;
30 | #X connect 3 0 2 0;
31 | #X connect 6 0 4 0;
32 | #X connect 7 0 4 0;
33 | #X restore 221 338 pd other-settings;
34 | #X text 626 400 Updated for timbreIDLib version 0.7;
35 | #X obj 592 348 timbreID;
36 | #X text 425 283 This feature can be sent to the timbreID external in
37 | order to identify timbres in real time. For more on using audio features
38 | for classification \, see the timbreID helpfile:;
39 | #X text 425 193 Audio buffering and windowing are taken care of by
40 | the external \, so there is no need for tabreceive~ or block~. You
41 | can set the window size with a creation argument \, or change it with
42 | the "window" message. Window size is not required to be a power of
43 | two.;
44 | #X text 210 400 Creation argument is window size in samples;
45 | #X msg 185 296 window 2000;
46 | #X text 171 224 Bang continuously;
47 | #X obj 150 225 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
48 | 1;
49 | #X obj 50 178 +~;
50 | #X text 183 278 Change window size;
51 | #X obj 150 247 metro 100;
52 | #X obj 50 400 specSkewness~ 1024;
53 | #X text 116 183 Bang to output skewness;
54 | #X obj 50 46 noise~;
55 | #X obj 50 106 hip~;
56 | #X obj 50 127 *~;
57 | #X obj 86 127 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
58 | 1;
59 | #X obj 147 127 *~;
60 | #X obj 183 127 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
61 | 1;
62 | #X obj 147 106 lop~;
63 | #X obj 171 47 hsl 128 15 20 20000 1 0 empty empty empty -2 -8 0 10
64 | -262144 -1 -1 0 1;
65 | #X floatatom 168 67 10 0 0 0 - - -;
66 | #X text 626 420 July 2017;
67 | #X text 425 60 Spectral skewness measures the symmetry of a spectral
68 | envelope. Positive skew means most of the energy is in the low end
69 | \, and the envelope tapers to 0 toward the higher frequencies. Negative
70 | skew is the opposite: most of the energy is at the high end \, and
71 | the envelope tapers to 0 toward the low frequencies. By filtering white
72 | noise with either a low- or high-pass filter at left \, you can get
73 | a sense of the range of values. Unfiltered white noise will have a
74 | skew value near zero.;
75 | #X obj 628 445 declare -lib timbreIDLib;
76 | #X connect 0 0 16 0;
77 | #X connect 4 0 16 0;
78 | #X connect 10 0 16 0;
79 | #X connect 12 0 15 0;
80 | #X connect 13 0 16 0;
81 | #X connect 15 0 16 0;
82 | #X connect 16 0 1 0;
83 | #X connect 18 0 19 0;
84 | #X connect 18 0 24 0;
85 | #X connect 19 0 20 0;
86 | #X connect 20 0 13 0;
87 | #X connect 21 0 20 1;
88 | #X connect 22 0 13 1;
89 | #X connect 23 0 22 1;
90 | #X connect 24 0 22 0;
91 | #X connect 25 0 26 0;
92 | #X connect 26 0 24 1;
93 | #X connect 26 0 19 1;
94 |
--------------------------------------------------------------------------------
/help/specSlope~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 214 81 950 631 10;
2 | #X declare -lib timbreIDLib;
3 | #N canvas 0 50 450 300 (subpatch) 0;
4 | #X array \$0-magSpec-graph 129 float 0;
5 | #X coords 0 0.5 128 0 200 140 1 0 0;
6 | #X restore 414 401 graph;
7 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
8 | 0;
9 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
10 | 0;
11 | #N canvas 0 50 450 278 (subpatch) 0;
12 | #X array \$0-slope-graph 2 float 0;
13 | #X coords 0 0.0625 1 -0.0625 200 140 1 0 0;
14 | #X restore 644 401 graph;
15 | #X msg 180 315 window 2000;
16 | #X text 267 315 Change analysis window size;
17 | #X obj 64 77 s~ \$0-input;
18 | #X obj 64 217 r~ \$0-input;
19 | #X obj 221 79 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
20 | -1;
21 | #X text 292 125 Bang repeatedly...;
22 | #X obj 268 126 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
23 | 1;
24 | #X obj 268 145 metro 100;
25 | #X text 219 60 Bang to output slope;
26 | #X obj 221 189 s \$0-analyze;
27 | #X obj 142 267 r \$0-analyze;
28 | #X text 680 552 Updated for timbreIDLib version 0.7;
29 | #N canvas 819 131 746 546 other-settings 0;
30 | #X obj 54 86 hradio 15 1 0 5 empty empty empty 0 -8 0 10 -262144 -1
31 | -1 1;
32 | #X msg 54 106 window_function \$1;
33 | #X obj 110 148 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
34 | 1;
35 | #X msg 110 166 normalize \$1;
36 | #X msg 153 226 power_spectrum \$1;
37 | #X obj 153 208 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
38 | 1;
39 | #X obj 54 475 outlet;
40 | #X text 216 166 Normalize spectrum (default: ON);
41 | #X text 294 226 Use power spectrum. (default: magnitude);
42 | #X msg 265 339 print;
43 | #X text 315 341 Print current settings in the post window;
44 | #X text 52 49 Change windowing function. Rectangular (0) \, Blackman
45 | (1) \, Cosine (2) \, Hamming (3) \, or Hann (4). (default: Blackman)
46 | ;
47 | #X msg 211 287 overlap 2;
48 | #X text 292 275 Inside a subpatch with re-blocking involving overlap
49 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
50 | things to behave properly;
51 | #X connect 0 0 1 0;
52 | #X connect 1 0 6 0;
53 | #X connect 2 0 3 0;
54 | #X connect 3 0 6 0;
55 | #X connect 4 0 6 0;
56 | #X connect 5 0 4 0;
57 | #X connect 9 0 6 0;
58 | #X connect 12 0 6 0;
59 | #X restore 232 358 pd other-settings;
60 | #X text 481 212 This feature can be sent to the timbreID external in
61 | order to identify timbres in real time. For more on using audio features
62 | for classification \, see the timbreID helpfile:;
63 | #X obj 653 276 timbreID;
64 | #X text 481 27 Spectrum slope is the slope of the best-fit line through
65 | the data points of a magnitude spectrum. Here \, the input signal and
66 | analysis commands are wirelessly sent to magSpec~ as well so that you
67 | can see the spectrum alonside its slope. When specSlope~ receives a
68 | bang \, it spits out the spectrum slope for the most recent analysis
69 | window.;
70 | #X text 481 131 Audio buffering and windowing are taken care of by
71 | the external \, so there is no need for tabreceive~ or block~. You
72 | can set the window size with a creation argument \, or change it with
73 | the "window" message. Window size is not required to be a power of
74 | two.;
75 | #N canvas 507 399 895 386 graph-slope-measure-magSpec 0;
76 | #X obj 114 125 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
77 | -262144 -1 -1 0 256;
78 | #X obj 114 55 inlet;
79 | #X msg 538 242 1;
80 | #X obj 403 227 / 2;
81 | #X obj 403 267 tabwrite \$0-slope-graph;
82 | #X obj 403 205 t f b;
83 | #X obj 193 267 tabwrite \$0-slope-graph;
84 | #X obj 193 205 t f b;
85 | #X obj 193 227 / -2;
86 | #X msg 328 242 0;
87 | #X obj 640 228 list prepend 0;
88 | #X obj 640 63 r~ \$0-input;
89 | #X obj 682 122 r \$0-analyze;
90 | #X obj 640 250 s \$0-magSpec-graph;
91 | #X obj 640 184 magSpec~ 256;
92 | #X connect 1 0 0 0;
93 | #X connect 1 0 7 0;
94 | #X connect 1 0 5 0;
95 | #X connect 2 0 4 1;
96 | #X connect 3 0 4 0;
97 | #X connect 5 0 3 0;
98 | #X connect 5 1 2 0;
99 | #X connect 7 0 8 0;
100 | #X connect 7 1 9 0;
101 | #X connect 8 0 6 0;
102 | #X connect 9 0 6 1;
103 | #X connect 10 0 13 0;
104 | #X connect 11 0 14 0;
105 | #X connect 12 0 14 0;
106 | #X connect 14 0 10 0;
107 | #X coords 0 -1 1 1 250 70 1 100 100;
108 | #X restore 64 471 pd graph-slope-measure-magSpec;
109 | #X obj 64 55 adc~;
110 | #X obj 64 417 specSlope~ 256;
111 | #X text 680 572 July 2017;
112 | #X obj 681 596 declare -lib timbreIDLib;
113 | #X connect 4 0 23 0;
114 | #X connect 7 0 23 0;
115 | #X connect 8 0 13 0;
116 | #X connect 10 0 11 0;
117 | #X connect 11 0 13 0;
118 | #X connect 14 0 23 0;
119 | #X connect 16 0 23 0;
120 | #X connect 22 0 6 0;
121 | #X connect 23 0 21 0;
122 |
--------------------------------------------------------------------------------
/help/tID-conversion-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 249 138 1011 507 10;
2 | #X declare -lib timbreIDLib;
3 | #X floatatom 83 230 10 0 0 0 - - -;
4 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
5 | 0;
6 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
7 | 0;
8 | #X msg 238 132 2048 48000;
9 | #X floatatom 83 320 10 0 0 0 - - -;
10 | #X floatatom 83 140 10 0 0 0 - - -;
11 | #X floatatom 403 230 10 0 0 0 - - -;
12 | #X floatatom 403 140 10 0 0 0 - - -;
13 | #X obj 403 185 freq2bark;
14 | #X floatatom 403 320 10 0 0 0 - - -;
15 | #X obj 403 275 bark2freq;
16 | #X floatatom 583 230 15 0 0 0 - - -;
17 | #X floatatom 583 140 10 0 0 0 - - -;
18 | #X floatatom 583 320 10 0 0 0 - - -;
19 | #X obj 583 185 freq2mel;
20 | #X obj 583 275 mel2freq;
21 | #X text 36 34 timbreID conversion objects use the same functions in
22 | the timbreID library that Bark- and mel-based objects use.;
23 | #X text 400 92 Bark frequency is calculated as 6.0*asinh(freq/600.0)
24 | \, and frequency as 600 * sinh(bark/6.0), f 55;
25 | #X text 581 354 Mel frequency is calculated as 1127*log(1+(freq/700))
26 | \, and frequency as 700 * (exp(mel/1127) - 1), f 55;
27 | #X obj 83 185 bin2freq 1024 44100;
28 | #X obj 83 275 freq2bin 1024 44100;
29 | #X text 723 431 Updated for timbreIDLib version 0.7.6;
30 | #X text 723 451 August 2018;
31 | #X text 81 369 Frequency is calculated as bin*R/N \, and bin number
32 | is calculated as freq*N/R (not rounded), f 43;
33 | #X obj 724 474 declare -lib timbreIDLib;
34 | #X connect 0 0 20 0;
35 | #X connect 3 0 19 1;
36 | #X connect 3 0 20 1;
37 | #X connect 5 0 19 0;
38 | #X connect 6 0 10 0;
39 | #X connect 7 0 8 0;
40 | #X connect 8 0 6 0;
41 | #X connect 10 0 9 0;
42 | #X connect 11 0 15 0;
43 | #X connect 12 0 14 0;
44 | #X connect 14 0 11 0;
45 | #X connect 15 0 13 0;
46 | #X connect 19 0 0 0;
47 | #X connect 20 0 4 0;
48 |
--------------------------------------------------------------------------------
/help/tID_mean-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 268 138 901 476 10;
2 | #X declare -lib timbreIDLib;
3 | #X floatatom 496 234 10 0 0 0 - - -;
4 | #X msg 496 143 927.55 819.1 527.85 497.31 303.98;
5 | #X text 39 131 Suppose you take 32 spectral centroid measurements over
6 | the course of a 2 second sound \, and 16 centroid measurements over
7 | the course of a 1 second sound. A distance between these two feature
8 | vectors cannot be calculated because they have a different number of
9 | components.;
10 | #X text 39 301 Creating a larger feature vector composed of several
11 | time-varying timbre features summarized in this fashion will pack a
12 | great deal of information into one compact descriptor. In other words
13 | \, you can create a vector that describes how spectral centroid \,
14 | flatness \, flux \, and individual Bark-frequency cepstral coefficients
15 | vary over the course of a sound.;
16 | #X text 533 301 Also see:;
17 | #X text 39 211 Taking the mean and standard deviation for each of these
18 | centroid lists creates two 2-component lists that CAN be compared to
19 | compute a distance. All the precise detail of how centroid varied over
20 | the course of each sound is lost \, but mean and standard deviation
21 | do provide meaningful general information about a data set.;
22 | #X text 39 41 [tID_mean] calculates the arithmetic mean (average) of
23 | a list of numbers. The list must have at least 1 element. It is intended
24 | to be used for summarizing time-varying timbre attributes that are
25 | measured with other timbreID externals. This provides one way to compare
26 | the spectro-temporal characteristics of sounds with different durations.
27 | ;
28 | #X obj 3 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
29 | 0;
30 | #X obj 3 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
31 | 0;
32 | #X obj 496 189 tID_mean;
33 | #X obj 605 301 tID_std;
34 | #X text 632 396 Updated for timbreIDLib version 0.7;
35 | #X text 632 416 July 2017;
36 | #X obj 633 440 declare -lib timbreIDLib;
37 | #X connect 1 0 9 0;
38 | #X connect 9 0 0 0;
39 |
--------------------------------------------------------------------------------
/help/tID_std-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 259 182 868 457 10;
2 | #X declare -lib timbreIDLib;
3 | #X floatatom 499 246 10 0 0 0 - - -;
4 | #X msg 499 155 927.55 819.1 527.85 497.31 303.98;
5 | #X text 42 143 Suppose you take 32 spectral centroid measurements over
6 | the course of a 2 second sound \, and 16 centroid measurements over
7 | the course of a 1 second sound. A distance between these two feature
8 | vectors cannot be calculated because they have a different number of
9 | components.;
10 | #X text 42 313 Creating a larger feature vector composed of several
11 | time-varying timbre features summarized in this fashion will pack a
12 | great deal of information into one compact descriptor. In other words
13 | \, you can create a vector that describes how spectral centroid \,
14 | flatness \, flux \, and individual Bark-frequency cepstral coefficients
15 | vary over the course of a sound.;
16 | #X text 42 43 The [tID_std] object calculates the standard deviation
17 | of a list of numbers. The list must have at least 2 elements. It is
18 | intended to be used for summarizing time-varying timbre attributes
19 | that are measured with other timbreID externals. This provides one
20 | way to compare the spectro-temporal characteristics of sounds with
21 | different durations.;
22 | #X text 536 313 Also see:;
23 | #X text 42 223 Taking the mean and standard deviation for each of these
24 | centroid lists creates two 2-component lists that CAN be compared to
25 | compute a distance. All the precise detail of how centroid varied over
26 | the course of each sound is lost \, but mean and standard deviation
27 | do provide meaningful general information about a data set.;
28 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
29 | 0;
30 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
31 | 0;
32 | #X obj 499 201 tID_std;
33 | #X obj 608 313 tID_mean;
34 | #X text 600 378 Updated for timbreIDLib version 0.7;
35 | #X text 600 398 July 2017;
36 | #X obj 601 425 declare -lib timbreIDLib;
37 | #X connect 1 0 9 0;
38 | #X connect 9 0 0 0;
39 |
--------------------------------------------------------------------------------
/help/waveNoise-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 196 163 978 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000
4 | #000000;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | #fcfcfc #000000 #000000 0 256;
8 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
9 | #b8b8b8 #000000 #000000 0 1;
10 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
11 | 0;
12 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
13 | 0;
14 | #N canvas 724 184 641 315 other-settings 1;
15 | #X msg 54 48 set another-sample-array;
16 | #X msg 93 104 samplerate 48000;
17 | #X text 242 47 Read from a different array;
18 | #X obj 54 255 outlet;
19 | #X text 227 103 Specify your sample's sampling rate. (default: 44100)
20 | ;
21 | #X msg 150 162 print;
22 | #X connect 0 0 3 0;
23 | #X connect 1 0 3 0;
24 | #X connect 5 0 3 0;
25 | #X restore 207 343 pd other-settings;
26 | #N canvas 0 50 450 300 (subpatch) 0;
27 | #X array \$0-waveform 128 float 0;
28 | #X coords 0 1 127 -1 200 140 1 0 0;
29 | #X restore 653 247 graph;
30 | #N canvas 666 270 552 163 soundfile 0;
31 | #X obj 50 93 soundfiler;
32 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
33 | #X obj 185 100 table \$0-sample 130000;
34 | #X obj 50 24 loadbang;
35 | #X obj 50 46 f \$0;
36 | #X connect 1 0 0 0;
37 | #X connect 3 0 4 0;
38 | #X connect 4 0 1 0;
39 | #X restore 653 397 pd soundfile;
40 | #N canvas 722 238 369 330 waveform 0;
41 | #X obj 46 61 inlet;
42 | #X obj 46 82 t f f;
43 | #X obj 46 284 outlet;
44 | #X obj 86 241 tabletool \$0-waveform;
45 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
46 | #X obj 86 164 pack f f \$0;
47 | #X obj 131 132 + 127;
48 | #X connect 0 0 1 0;
49 | #X connect 1 0 2 0;
50 | #X connect 1 0 5 0;
51 | #X connect 1 1 6 0;
52 | #X connect 4 0 3 0;
53 | #X connect 5 0 4 0;
54 | #X connect 6 0 5 1;
55 | #X restore 155 269 pd waveform;
56 | #X text 259 477 Creation argument is the name of the sample array to
57 | analyze., f 33;
58 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
59 | samples long (samples 44100 - 46099), f 48;
60 | #X msg 98 123 analyze 44100 2000;
61 | #X msg 155 291 analyze \$1 128;
62 | #X obj 721 571 declare -lib timbreIDLib;
63 | #X obj 704 85 waveNoise~;
64 | #X text 514 59 See the real-time version for more information on waveform
65 | noisiness in general.;
66 | #X obj 59 483 waveNoise \$0-sample;
67 | #X text 720 527 Updated for timbreIDLib version 0.9.0;
68 | #X text 720 547 June 2022;
69 | #X text 514 128 Note that with a real signal \, low level noise will
70 | produce lots of tiny changes of direction in the waveform \, so wave
71 | noise values will be high despite the low amplitude of the signal.
72 | Use a basic amplitude threshold before measuring to filter out this
73 | information out if it's not needed.;
74 | #X connect 0 0 17 0;
75 | #X connect 3 0 9 0;
76 | #X connect 6 0 17 0;
77 | #X connect 9 0 13 0;
78 | #X connect 12 0 17 0;
79 | #X connect 13 0 17 0;
80 | #X connect 17 0 2 0;
81 |
--------------------------------------------------------------------------------
/help/waveNoise~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 248 204 1010 651 10;
2 | #X declare -lib timbreIDLib;
3 | #X floatatom 110 504 10 0 0 0 - - - 0;
4 | #X text 253 286 Change window size.;
5 | #X obj 110 111 +~;
6 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 #e0e0e0 #404040
7 | 0;
8 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 #e0e0e0 #404040
9 | 0;
10 | #N canvas 676 230 576 318 other-settings 0;
11 | #X obj 54 225 outlet;
12 | #X msg 165 135 print;
13 | #X msg 54 68 overlap 2;
14 | #X text 135 56 Inside a subpatch with re-blocking involving overlap
15 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
16 | things to behave properly;
17 | #X connect 1 0 0 0;
18 | #X connect 2 0 0 0;
19 | #X restore 285 334 pd other-settings;
20 | #X obj 801 401 timbreID;
21 | #X text 745 298 This feature can be sent to the timbreID external in
22 | order to identify timbres in real time. For more on using audio features
23 | for classification \, see the timbreID helpfile:, f 28;
24 | #X msg 255 304 window 2000;
25 | #X obj 110 43 noise~;
26 | #X obj 110 77 *~;
27 | #X floatatom 250 504 10 0 0 0 - - - 0;
28 | #X obj 380 505 list prepend 0;
29 | #X obj 380 526 s \$0-samples;
30 | #N canvas 0 22 450 278 (subpatch) 0;
31 | #X array \$0-samples 128 float 0;
32 | #X coords 0 1 127 -1 200 300 1 0 0;
33 | #X restore 520 298 graph;
34 | #X obj 160 54 *~ 0.75;
35 | #X obj 167 82 hsl 128 15 45 100 0 0 empty empty noise-level 8 8 0 10
36 | #fcfcfc #000000 #000000 0 1;
37 | #X obj 150 242 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
38 | #000000 0 1;
39 | #X text 174 241 Bang repeatedly to keep refreshing...;
40 | #X obj 150 261 metro 100;
41 | #X obj 30 298 r~ \$0-signal;
42 | #X obj 250 448 r~ \$0-signal;
43 | #X obj 380 448 r~ \$0-signal;
44 | #X obj 110 132 s~ \$0-signal;
45 | #X obj 164 102 dbtorms;
46 | #X obj 250 481 zeroCrossing~ 128;
47 | #X obj 380 484 sampleBuffer~ 128;
48 | #X obj 160 33 osc~ 440;
49 | #X text 515 205 Audio buffering is taken care of by the external \,
50 | so there is no need for [block~]. You can set the window size with
51 | a creation argument \, or change it with the "window" message. Window
52 | size is not required to be a power of two.;
53 | #X obj 757 585 declare -lib timbreIDLib;
54 | #X text 755 561 June 2022;
55 | #X text 755 541 Updated for timbreIDLib version 0.9.0;
56 | #X obj 110 481 waveNoise~ 128;
57 | #X text 515 24 Similar to zero crossing \, another time-domain measure
58 | of noisiness is the number of times a signal changes direction \, regardless
59 | of whether the samples are on the positive or negative side. [waveNoise~]
60 | measures direction changes within the window of audio that is captured
61 | when it receives a bang. Its creation argument is window size in samples.
62 | Here \, [waveNoise~] output is compared with that of [zeroCrossing~]
63 | when measuring a 440Hz sinusoid mixed with white noise. Try raising
64 | the noise level to see what happens. For relatively low level noise
65 | \, the zero crossing measure stays fixed at about 3 crossings per window
66 | \, but the wave noise measure is much higher because random noise causes
67 | kinks all along the waveform.;
68 | #X connect 2 0 23 0;
69 | #X connect 5 0 32 0;
70 | #X connect 8 0 32 0;
71 | #X connect 9 0 10 0;
72 | #X connect 10 0 2 0;
73 | #X connect 12 0 13 0;
74 | #X connect 15 0 2 1;
75 | #X connect 16 0 24 0;
76 | #X connect 17 0 19 0;
77 | #X connect 19 0 25 0;
78 | #X connect 19 0 26 0;
79 | #X connect 19 0 32 0;
80 | #X connect 20 0 32 0;
81 | #X connect 21 0 25 0;
82 | #X connect 22 0 26 0;
83 | #X connect 24 0 10 1;
84 | #X connect 25 0 11 0;
85 | #X connect 26 0 12 0;
86 | #X connect 27 0 15 0;
87 | #X connect 32 0 0 0;
88 |
--------------------------------------------------------------------------------
/help/waveSlope-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 279 191 884 737 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 51 289 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #N canvas 0 50 450 300 (subpatch) 0;
6 | #X array \$0-waveform 1024 float 0;
7 | #X coords 0 1 1023 -1 200 140 1 0 0;
8 | #X restore 48 48 graph;
9 | #X text 73 286 Bang to analyze the entire array.;
10 | #N canvas 919 483 552 276 soundfile 0;
11 | #X obj 50 83 soundfiler;
12 | #X obj 50 14 loadbang;
13 | #X obj 50 36 f \$0;
14 | #X obj 50 145 pack f \$0;
15 | #X msg 50 167 \; \$2-scrub-bar-set range 0 \$1 \;;
16 | #X obj 50 105 - 1024;
17 | #X msg 50 58 read -skip 244600 ./audio/testing.wav \$1-sample;
18 | #X obj 185 100 table \$0-sample 52000;
19 | #X connect 0 0 5 0;
20 | #X connect 1 0 2 0;
21 | #X connect 2 0 6 0;
22 | #X connect 3 0 4 0;
23 | #X connect 5 0 3 0;
24 | #X connect 6 0 0 0;
25 | #X restore 490 497 pd soundfile;
26 | #N canvas 723 239 304 333 waveform 0;
27 | #X obj 46 61 inlet;
28 | #X obj 46 82 t f f;
29 | #X obj 91 131 + 1023;
30 | #X msg 46 200 copy_range 0 \$3-sample \$1 \$2;
31 | #X obj 46 241 tabletool \$0-waveform;
32 | #X obj 46 164 pack f f \$0;
33 | #X connect 0 0 1 0;
34 | #X connect 1 0 5 0;
35 | #X connect 1 1 2 0;
36 | #X connect 2 0 5 1;
37 | #X connect 3 0 4 0;
38 | #X connect 5 0 3 0;
39 | #X restore 490 549 pd waveform;
40 | #X obj 51 244 hsl 800 25 0 50976 0 0 \$0-scrub-bar \$0-scrub-bar-set
41 | Scrub-bar -2 -8 0 12 -191407 -1 -1 0 1;
42 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
43 | 0;
44 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
45 | 0;
46 | #N canvas 0 50 450 278 (subpatch) 0;
47 | #X array \$0-slope-graph 2 float 1;
48 | #A 0 1.58351e-05 -1.58351e-05;
49 | #X coords 0 0.35 1 -0.35 200 140 1 0 0;
50 | #X restore 48 48 graph;
51 | #X obj 134 386 r \$0-scrub-bar;
52 | #X msg 99 334 analyze 44100 2000;
53 | #X text 245 328 Analyze a window starting at sample 44100 that is 2000
54 | samples long (samples 44100 - 46099);
55 | #X msg 134 411 analyze \$1 1024;
56 | #X obj 490 527 r \$0-scrub-bar;
57 | #X text 623 651 Updated for timbreIDLib version 0.7;
58 | #N canvas 590 90 654 440 other-settings 0;
59 | #X obj 44 62 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
60 | ;
61 | #X msg 44 80 normalize \$1;
62 | #X msg 84 132 set another-sample-array;
63 | #X msg 123 188 samplerate 48000;
64 | #X text 272 131 Read from a different array;
65 | #X obj 44 375 outlet;
66 | #X text 257 187 Specify your sample's sampling rate. (default: 44100)
67 | ;
68 | #X msg 193 244 print;
69 | #X text 243 246 Print current settings in the post window;
70 | #X text 148 72 Normalize the waveform in the analysis window so that
71 | the peak amplitude is 1 (default: OFF);
72 | #X connect 0 0 1 0;
73 | #X connect 1 0 5 0;
74 | #X connect 2 0 5 0;
75 | #X connect 3 0 5 0;
76 | #X connect 7 0 5 0;
77 | #X restore 196 480 pd other-settings;
78 | #X text 269 392 Use the slider above to move through the audio file
79 | , f 27;
80 | #X obj 51 547 waveSlope \$0-sample;
81 | #N canvas 654 581 671 360 graph-slope 0;
82 | #X obj 114 125 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
83 | -262144 -1 -1 0 256;
84 | #X obj 114 55 inlet;
85 | #X msg 538 242 1;
86 | #X obj 403 227 / 2;
87 | #X obj 403 267 tabwrite \$0-slope-graph;
88 | #X obj 403 205 t f b;
89 | #X obj 193 267 tabwrite \$0-slope-graph;
90 | #X obj 193 205 t f b;
91 | #X obj 193 227 / -2;
92 | #X msg 328 242 0;
93 | #X connect 1 0 0 0;
94 | #X connect 1 0 7 0;
95 | #X connect 1 0 5 0;
96 | #X connect 2 0 4 1;
97 | #X connect 3 0 4 0;
98 | #X connect 5 0 3 0;
99 | #X connect 5 1 2 0;
100 | #X connect 7 0 8 0;
101 | #X connect 7 1 9 0;
102 | #X connect 8 0 6 0;
103 | #X connect 9 0 6 1;
104 | #X coords 0 -1 1 1 250 70 1 100 100;
105 | #X restore 51 593 pd graph-slope;
106 | #X text 212 541 Creation argument is the name of the sample array to
107 | analyze, f 33;
108 | #X obj 628 450 waveSlope~;
109 | #X text 626 401 See the real-time version for more information on waveform
110 | slope in general., f 33;
111 | #X text 623 671 July 2017;
112 | #X text 342 88 Note that quiet moments between sound events will produce
113 | erratic slope reports that constantly change between positive and negative
114 | values. A basic amplitude threshold before analysis can be used to
115 | filter this information out if it's not needed.;
116 | #X obj 625 695 declare -lib timbreIDLib;
117 | #X connect 0 0 17 0;
118 | #X connect 9 0 12 0;
119 | #X connect 10 0 17 0;
120 | #X connect 12 0 17 0;
121 | #X connect 13 0 4 0;
122 | #X connect 15 0 17 0;
123 | #X connect 17 0 18 0;
124 |
--------------------------------------------------------------------------------
/help/waveSlope~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 225 139 1068 637 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
4 | 0;
5 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
6 | 0;
7 | #X msg 189 303 window 2000;
8 | #X text 286 303 Change analysis window size;
9 | #X obj 129 145 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
10 | -1 -1;
11 | #X text 200 191 Bang repeatedly...;
12 | #X obj 176 192 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
13 | 1;
14 | #X text 127 126 Bang to output slope;
15 | #X text 765 555 Updated for timbreIDLib version 0.7;
16 | #N canvas 673 234 654 397 other-settings 0;
17 | #X obj 53 54 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
18 | ;
19 | #X msg 53 72 normalize \$1;
20 | #X obj 53 331 outlet;
21 | #X msg 175 201 print;
22 | #X text 225 203 Print current settings in the post window;
23 | #X msg 121 149 overlap 2;
24 | #X text 202 137 Inside a subpatch with re-blocking involving overlap
25 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
26 | things to behave properly;
27 | #X text 159 64 Normalize the waveform in the analysis window so that
28 | the peak amplitude is 1 (default: OFF);
29 | #X connect 0 0 1 0;
30 | #X connect 1 0 2 0;
31 | #X connect 3 0 2 0;
32 | #X connect 5 0 2 0;
33 | #X restore 232 358 pd other-settings;
34 | #X text 591 369 This feature can be sent to the timbreID external in
35 | order to identify timbres in real time. For more on using audio features
36 | for classification \, see the timbreID helpfile:;
37 | #X obj 773 433 timbreID;
38 | #N canvas 0 50 450 278 (subpatch) 0;
39 | #X array \$0-slope-graph 2 float 1;
40 | #A 0 -9.3408e-05 9.3408e-05;
41 | #X coords 0 0.075 1 -0.075 200 140 1 0 0;
42 | #X restore 351 93 graph;
43 | #N canvas 654 581 677 360 graph-slope 0;
44 | #X obj 114 125 nbx 7 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
45 | -262144 -1 -1 0 256;
46 | #X obj 114 55 inlet;
47 | #X msg 538 242 1;
48 | #X obj 403 227 / 2;
49 | #X obj 403 267 tabwrite \$0-slope-graph;
50 | #X obj 403 205 t f b;
51 | #X obj 193 267 tabwrite \$0-slope-graph;
52 | #X obj 193 205 t f b;
53 | #X obj 193 227 / -2;
54 | #X msg 328 242 0;
55 | #X connect 1 0 0 0;
56 | #X connect 1 0 7 0;
57 | #X connect 1 0 5 0;
58 | #X connect 2 0 4 1;
59 | #X connect 3 0 4 0;
60 | #X connect 5 0 3 0;
61 | #X connect 5 1 2 0;
62 | #X connect 7 0 8 0;
63 | #X connect 7 1 9 0;
64 | #X connect 8 0 6 0;
65 | #X connect 9 0 6 1;
66 | #X coords 0 -1 1 1 250 70 1 100 100;
67 | #X restore 64 471 pd graph-slope;
68 | #X obj 64 105 *~;
69 | #X obj 135 76 line~;
70 | #X obj 176 211 metro 20;
71 | #X obj 64 45 osc~ 5000;
72 | #X text 591 222 With a real signal \, quiet moments between sound events
73 | will produce erratic slope reports that constantly change between very
74 | small positive and negative values \, so it's usually best to have
75 | a basic amplitude threshold before analysis.;
76 | #X text 765 575 July 2017;
77 | #X msg 135 34 1 1000;
78 | #X msg 145 54 0 1000;
79 | #X obj 64 417 waveSlope~ 4096;
80 | #X text 592 27 Waveform slope is the slope of the best-fit line through
81 | the absolute value of samples in the analysis window. When waveSlope~
82 | receives a bang \, it spits out the waveform slope for the most recent
83 | analysis window. One use for this feature is to segment a sound event
84 | with a clear attack into attack \, decay \, and sustain portions. While
85 | the slope is positive \, the attack portion of the event is still ongoing.
86 | When slope suddenly turns negative \, the initial decay into the sustain
87 | portion of the event has begun. When slope is very near zero \, the
88 | sound event is sustaining at a steady amplitude. At left \, try triggering
89 | the 1-second attack and watch the slope change. Once the attack is
90 | done \, slope settles at nearly zero. Then you can trigger the 1-second
91 | release.;
92 | #X text 591 292 Audio buffering is taken care of by the external \,
93 | so there is no need for [block~]. You can set the window size with
94 | a creation argument \, or change it with the "window" message. Window
95 | size is not required to be a power of two.;
96 | #X obj 766 601 declare -lib timbreIDLib;
97 | #X connect 2 0 22 0;
98 | #X connect 4 0 22 0;
99 | #X connect 6 0 16 0;
100 | #X connect 9 0 22 0;
101 | #X connect 14 0 22 0;
102 | #X connect 15 0 14 1;
103 | #X connect 16 0 22 0;
104 | #X connect 17 0 14 0;
105 | #X connect 20 0 15 0;
106 | #X connect 21 0 15 0;
107 | #X connect 22 0 13 0;
108 |
--------------------------------------------------------------------------------
/help/zeroCrossing-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 203 96 978 604 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 59 74 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
4 | -1;
5 | #X text 80 74 Bang to analyze the entire array.;
6 | #X obj 59 522 nbx 5 32 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 32
7 | -262144 -1 -1 0 256;
8 | #X msg 155 291 analyze \$1 1024;
9 | #X obj 158 249 hsl 400 15 0 128000 0 0 empty empty Scrub -2 -8 0 12
10 | -191407 -1 -1 0 1;
11 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
12 | 0;
13 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
14 | 0;
15 | #N canvas 714 176 641 360 other-settings 0;
16 | #X msg 54 48 set another-sample-array;
17 | #X msg 123 164 samplerate 48000;
18 | #X text 242 47 Read from a different array;
19 | #X obj 54 295 outlet;
20 | #X text 257 163 Specify your sample's sampling rate. (default: 44100)
21 | ;
22 | #X msg 180 222 print;
23 | #X text 258 95 Normalize the zero crossing total according to the current
24 | window size. This helps in comparing zero crossing rate measurements
25 | taken with mixed window sizes.;
26 | #X msg 84 108 normalize \$1;
27 | #X obj 84 88 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
28 | ;
29 | #X connect 0 0 3 0;
30 | #X connect 1 0 3 0;
31 | #X connect 5 0 3 0;
32 | #X connect 7 0 3 0;
33 | #X connect 8 0 7 0;
34 | #X restore 207 343 pd other-settings;
35 | #N canvas 0 50 450 300 (subpatch) 0;
36 | #X array \$0-waveform 1024 float 0;
37 | #X coords 0 1 1023 -1 200 140 1 0 0;
38 | #X restore 653 247 graph;
39 | #N canvas 666 270 552 163 soundfile 0;
40 | #X obj 50 93 soundfiler;
41 | #X msg 50 68 read -skip 120000 ./audio/testing.wav \$1-sample;
42 | #X obj 185 100 table \$0-sample 130000;
43 | #X obj 50 24 loadbang;
44 | #X obj 50 46 f \$0;
45 | #X connect 1 0 0 0;
46 | #X connect 3 0 4 0;
47 | #X connect 4 0 1 0;
48 | #X restore 653 397 pd soundfile;
49 | #N canvas 722 238 369 330 waveform 0;
50 | #X obj 46 61 inlet;
51 | #X obj 46 82 t f f;
52 | #X obj 46 284 outlet;
53 | #X obj 131 131 + 1023;
54 | #X obj 86 241 tabletool \$0-waveform;
55 | #X msg 86 200 copy_range 0 \$3-sample \$1 \$2;
56 | #X obj 86 164 pack f f \$0;
57 | #X connect 0 0 1 0;
58 | #X connect 1 0 2 0;
59 | #X connect 1 0 6 0;
60 | #X connect 1 1 3 0;
61 | #X connect 3 0 6 1;
62 | #X connect 5 0 4 0;
63 | #X connect 6 0 5 0;
64 | #X restore 155 269 pd waveform;
65 | #X text 259 477 Creation argument is the name of the sample array to
66 | analyze., f 33;
67 | #X text 107 143 Analyze a window starting at sample 44100 that is 2000
68 | samples long (samples 44100 - 46099), f 48;
69 | #X msg 98 123 analyze 44100 2000;
70 | #X obj 59 483 zeroCrossing \$0-sample;
71 | #X obj 704 85 zeroCrossing~;
72 | #X text 514 59 See the real-time version for more information on zero
73 | crossing rate in general.;
74 | #X text 514 148 Note that with a real signal \, low level noise will
75 | produce lots of zero crossings. Use a basic amplitude threshold before
76 | measuring crossings to filter out this information out if it's not
77 | needed.;
78 | #X obj 703 565 declare -lib timbreIDLib;
79 | #X text 702 520 Updated for timbreIDLib version 0.9.0;
80 | #X text 702 540 June 2022;
81 | #X connect 0 0 14 0;
82 | #X connect 3 0 14 0;
83 | #X connect 4 0 10 0;
84 | #X connect 7 0 14 0;
85 | #X connect 10 0 3 0;
86 | #X connect 13 0 14 0;
87 | #X connect 14 0 2 0;
88 |
--------------------------------------------------------------------------------
/help/zeroCrossing~-help.pd:
--------------------------------------------------------------------------------
1 | #N canvas 185 144 904 483 10;
2 | #X declare -lib timbreIDLib;
3 | #X obj 119 162 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
4 | -1 -1;
5 | #X floatatom 70 414 10 0 0 0 - - -;
6 | #X text 133 215 Change window size.;
7 | #X obj 70 111 +~;
8 | #X obj 4 4 cnv 10 400 10 empty empty empty 20 12 0 14 -233017 -66577
9 | 0;
10 | #X obj 4 4 cnv 10 10 400 empty empty empty 20 12 0 14 -233017 -66577
11 | 0;
12 | #N canvas 676 230 576 318 other-settings 0;
13 | #X obj 54 225 outlet;
14 | #X msg 165 175 print;
15 | #X msg 54 68 overlap 2;
16 | #X text 135 56 Inside a subpatch with re-blocking involving overlap
17 | (e.g. \, [block~ 4096 2]) \, you'll need to change the overlap for
18 | things to behave properly;
19 | #X msg 94 128 normalize \$1;
20 | #X obj 74 128 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
21 | 1;
22 | #X text 195 116 Normalize the zero crossing total according to the
23 | current window size. This helps in comparing zero crossing rate measurements
24 | taken with mixed window sizes.;
25 | #X connect 1 0 0 0;
26 | #X connect 2 0 0 0;
27 | #X connect 4 0 0 0;
28 | #X connect 5 0 4 0;
29 | #X restore 181 289 pd other-settings;
30 | #X obj 592 320 timbreID;
31 | #X text 425 255 This feature can be sent to the timbreID external in
32 | order to identify timbres in real time. For more on using audio features
33 | for classification \, see the timbreID helpfile:;
34 | #X text 220 361 Creation argument is window size in samples;
35 | #X msg 135 233 window 2000;
36 | #X obj 70 43 noise~;
37 | #X obj 70 77 *~;
38 | #X obj 98 77 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1
39 | ;
40 | #X obj 120 77 *~;
41 | #X obj 148 77 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
42 | 1;
43 | #X obj 120 43 osc~ 440;
44 | #X text 116 144 Bang to output zero crossings;
45 | #X obj 70 361 zeroCrossing~ 1024;
46 | #X text 425 54 A simple way to measure a signal's noisiness is to count
47 | the number of times it crosses 0 in a given window. This information
48 | is also related to frequency. Zero crossing is sometimes used as a
49 | crude timbre feature. Select either noise~ or osc~ and bang zeroCrossing~
50 | to see the different ranges of values. Note that with a real signal
51 | \, low level noise will produce lots of zero crossings \, so it's best
52 | to use a basic amplitude threshold before measuring crossings.;
53 | #X text 425 175 Audio buffering is taken care of by the external \,
54 | so there is no need for [block~]. You can set the window size with
55 | a creation argument \, or change it with the "window" message. Window
56 | size is not required to be a power of two.;
57 | #X obj 637 445 declare -lib timbreIDLib;
58 | #X text 636 422 June 2022;
59 | #X text 636 402 Updated for timbreIDLib version 0.9.0;
60 | #X connect 0 0 18 0;
61 | #X connect 3 0 18 0;
62 | #X connect 6 0 18 0;
63 | #X connect 10 0 18 0;
64 | #X connect 11 0 12 0;
65 | #X connect 12 0 3 0;
66 | #X connect 13 0 12 1;
67 | #X connect 14 0 3 1;
68 | #X connect 15 0 14 1;
69 | #X connect 16 0 14 0;
70 | #X connect 18 0 1 0;
71 |
--------------------------------------------------------------------------------
/src/bark2freq.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | bark2freq
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* bark2freq_class;
19 |
20 | typedef struct _bark2freq
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_bark2freqFormula x_formula;
25 | t_outlet* x_freq;
26 |
27 | } t_bark2freq;
28 |
29 |
30 | // TODO: could add an option for the other formula: 13*arctan (0.00076*freq) + 3.5*arctan ((freq/7500)^2)
31 | /* ------------------------ bark2freq -------------------------------- */
32 | static void bark2freq_calculate (t_bark2freq* x, t_float b)
33 | {
34 | t_float bark;
35 |
36 | bark = b;
37 |
38 | if (bark >= 0.0 && bark <= TID_MAXBARKS)
39 | {
40 | t_float freq;
41 |
42 | freq = tIDLib_bark2freq (bark);
43 | outlet_float (x->x_freq, freq);
44 | }
45 | else
46 | pd_error (x, "%s: Bark frequency must be between 0 and %f Barks", x->x_objSymbol->s_name, TID_MAXBARKS);
47 | }
48 |
49 |
50 | static void* bark2freq_new (t_symbol* s, int argc, t_atom* argv)
51 | {
52 | t_bark2freq* x = (t_bark2freq *)pd_new (bark2freq_class);
53 | x->x_freq = outlet_new (&x->x_obj, &s_float);
54 |
55 | x->x_objSymbol = s;
56 |
57 | // will use x->x_formula in future
58 | switch (argc)
59 | {
60 | case 1:
61 | x->x_formula = atom_getfloat (argv);
62 | break;
63 | default:
64 | x->x_formula = bark2freqFormula0;
65 | break;
66 | }
67 |
68 | return (x);
69 | }
70 |
71 |
72 | void bark2freq_setup (void)
73 | {
74 | bark2freq_class =
75 | class_new (
76 | gensym ("bark2freq"),
77 | (t_newmethod)bark2freq_new,
78 | 0,
79 | sizeof (t_bark2freq),
80 | CLASS_DEFAULT,
81 | A_GIMME,
82 | 0
83 | );
84 |
85 | class_addcreator (
86 | (t_newmethod)bark2freq_new,
87 | gensym ("timbreIDLib/bark2freq"),
88 | A_GIMME,
89 | 0
90 | );
91 |
92 | class_addfloat (
93 | bark2freq_class,
94 | (t_method)bark2freq_calculate
95 | );
96 |
97 | class_sethelpsymbol (bark2freq_class, gensym ("tID-conversion"));
98 | }
99 |
--------------------------------------------------------------------------------
/src/bin2freq.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | bin2freq - Calculate the frequency of a bin number for a given window size and sample rate.
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* bin2freq_class;
19 |
20 | typedef struct _bin2freq
21 | {
22 | t_object x_obj;
23 | t_float x_n;
24 | t_float x_sr;
25 | t_outlet* x_freq;
26 |
27 | } t_bin2freq;
28 |
29 |
30 | /* ------------------------ bin2freq -------------------------------- */
31 | static void bin2freq_calculate (t_bin2freq* x, t_float bin)
32 | {
33 | if (bin >= 0.0 && bin < x->x_n)
34 | {
35 | t_float freq;
36 |
37 | freq = tIDLib_bin2freq (bin, x->x_n, x->x_sr);
38 |
39 | outlet_float (x->x_freq, freq);
40 | }
41 | else
42 | {
43 | pd_error (x, "bin2freq: bin number must be between 0 and %lu", (t_binIdx)(x->x_n - 1));
44 | }
45 | }
46 |
47 |
48 | static void bin2freq_setWinSampRate (t_bin2freq* x, t_float n, t_float sr)
49 | {
50 | if (sr)
51 | {
52 | x->x_n = n;
53 | x->x_sr = sr;
54 | }
55 | else if (n)
56 | {
57 | x->x_n = n;
58 | x->x_sr = TID_SAMPLERATEDEFAULT;
59 | }
60 | else
61 | {
62 | x->x_n = TID_WINDOWSIZEDEFAULT;
63 | x->x_sr = TID_SAMPLERATEDEFAULT;
64 | }
65 | }
66 |
67 |
68 | static void bin2freq_print (t_bin2freq* x)
69 | {
70 | post ("bin2freq window size: %i", (t_sampIdx)x->x_n);
71 | post ("bin2freq samplerate: %i", (t_sampIdx)x->x_sr);
72 | }
73 |
74 |
75 | static void* bin2freq_new (t_float n, t_float sr)
76 | {
77 | t_bin2freq* x = (t_bin2freq *)pd_new (bin2freq_class);
78 | inlet_new (&x->x_obj, &x->x_obj.ob_pd, gensym ("list"), gensym ("setWinSampRate"));
79 | x->x_freq = outlet_new (&x->x_obj, &s_float);
80 |
81 | bin2freq_setWinSampRate (x, n, sr);
82 |
83 | return (x);
84 | }
85 |
86 |
87 | void bin2freq_setup (void)
88 | {
89 | bin2freq_class =
90 | class_new (
91 | gensym ("bin2freq"),
92 | (t_newmethod)bin2freq_new,
93 | 0,
94 | sizeof (t_bin2freq),
95 | CLASS_DEFAULT,
96 | A_DEFFLOAT,
97 | A_DEFFLOAT,
98 | 0
99 | );
100 |
101 | class_addcreator (
102 | (t_newmethod)bin2freq_new,
103 | gensym ("timbreIDLib/bin2freq"),
104 | A_DEFFLOAT,
105 | A_DEFFLOAT,
106 | 0
107 | );
108 |
109 | class_addmethod (
110 | bin2freq_class,
111 | (t_method)bin2freq_print,
112 | gensym ("print"),
113 | 0
114 | );
115 |
116 | class_addfloat (
117 | bin2freq_class,
118 | (t_method)bin2freq_calculate
119 | );
120 |
121 | class_addmethod (
122 | bin2freq_class,
123 | (t_method)bin2freq_setWinSampRate,
124 | gensym ("setWinSampRate"),
125 | A_DEFFLOAT,
126 | A_DEFFLOAT,
127 | 0
128 | );
129 |
130 | class_sethelpsymbol (bin2freq_class, gensym ("tID-conversion"));
131 | }
132 |
--------------------------------------------------------------------------------
/src/freq2bark.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | freq2bark - Calculate the Bark frequency of a given frequency in Hertz
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* freq2bark_class;
19 |
20 | typedef struct _freq2bark
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_freq2barkFormula x_formula;
25 | t_outlet* x_barkFreq;
26 |
27 | } t_freq2bark;
28 |
29 |
30 | // TODO: could add an option for the other formula: 13*arctan (0.00076*freq) + 3.5*arctan ((freq/7500)^2)
31 | /* ------------------------ freq2bark -------------------------------- */
32 | static void freq2bark_calculate (t_freq2bark* x, t_float f)
33 | {
34 | t_float freq;
35 |
36 | freq = f;
37 |
38 | if (freq >= 0.0 && freq <= TID_MAXBARKFREQ)
39 | {
40 | t_float barkFreq;
41 |
42 | barkFreq = tIDLib_freq2bark (freq);
43 |
44 | outlet_float (x->x_barkFreq, barkFreq);
45 | }
46 | else
47 | pd_error (x, "%s: frequency must be between 0 and %f Hz", x->x_objSymbol->s_name, TID_MAXBARKFREQ);
48 | }
49 |
50 | static void* freq2bark_new (t_symbol* s, int argc, t_atom* argv)
51 | {
52 | t_freq2bark* x = (t_freq2bark *)pd_new (freq2bark_class);
53 | x->x_barkFreq = outlet_new (&x->x_obj, &s_float);
54 |
55 | x->x_objSymbol = s;
56 |
57 | // will use x->x_formula in future
58 | switch (argc)
59 | {
60 | case 1:
61 | x->x_formula = atom_getfloat (argv);
62 | break;
63 | default:
64 | x->x_formula = freq2barkFormula0;
65 | break;
66 | }
67 |
68 | return (x);
69 | }
70 |
71 | void freq2bark_setup (void)
72 | {
73 | freq2bark_class =
74 | class_new (
75 | gensym ("freq2bark"),
76 | (t_newmethod)freq2bark_new,
77 | 0,
78 | sizeof (t_freq2bark),
79 | CLASS_DEFAULT,
80 | A_GIMME,
81 | 0
82 | );
83 |
84 | class_addcreator (
85 | (t_newmethod)freq2bark_new,
86 | gensym ("timbreIDLib/freq2bark"),
87 | A_GIMME,
88 | 0
89 | );
90 |
91 | class_addfloat (
92 | freq2bark_class,
93 | (t_method)freq2bark_calculate
94 | );
95 |
96 | class_sethelpsymbol (freq2bark_class, gensym ("tID-conversion"));
97 | }
98 |
--------------------------------------------------------------------------------
/src/freq2bin.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | freq2bin - Calculate the nearest bin number of a frequency for a given window size and sample rate.
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* freq2bin_class;
19 |
20 | typedef struct _freq2bin
21 | {
22 | t_object x_obj;
23 | t_float x_n;
24 | t_float x_sr;
25 | t_outlet* x_bin;
26 |
27 | } t_freq2bin;
28 |
29 |
30 | /* ------------------------ freq2bin -------------------------------- */
31 | static void freq2bin_calculate (t_freq2bin* x, t_float f)
32 | {
33 | t_float freq;
34 |
35 | freq = f;
36 |
37 | if (freq >= 0.0 && freq < x->x_sr)
38 | {
39 | t_float bin;
40 |
41 | bin = tIDLib_freq2bin (freq, x->x_n, x->x_sr);
42 |
43 | outlet_float (x->x_bin, bin);
44 | }
45 | else
46 | {
47 | pd_error (x, "freq2bin: frequency must be between 0 and %i", (int)x->x_sr);
48 | }
49 | }
50 |
51 | static void freq2bin_setWinSampRate (t_freq2bin* x, t_float n, t_float sr)
52 | {
53 | if (sr)
54 | {
55 | x->x_n = n;
56 | x->x_sr = sr;
57 | }
58 | else if (n)
59 | {
60 | x->x_n = n;
61 | x->x_sr = TID_SAMPLERATEDEFAULT;
62 | }
63 | else
64 | {
65 | x->x_n = TID_WINDOWSIZEDEFAULT;
66 | x->x_sr = TID_SAMPLERATEDEFAULT;
67 | }
68 | }
69 |
70 | static void freq2bin_print (t_freq2bin* x)
71 | {
72 | post ("freq2bin window size: %i", (t_sampIdx)x->x_n);
73 | post ("freq2bin samplerate: %i", (t_sampIdx)x->x_sr);
74 | }
75 |
76 | static void* freq2bin_new (t_float n, t_float sr)
77 | {
78 | t_freq2bin* x = (t_freq2bin *)pd_new (freq2bin_class);
79 | inlet_new (&x->x_obj, &x->x_obj.ob_pd, gensym ("list"), gensym ("setWinSampRate"));
80 | x->x_bin = outlet_new (&x->x_obj, &s_float);
81 |
82 | freq2bin_setWinSampRate (x, n, sr);
83 |
84 | return (x);
85 | }
86 |
87 | void freq2bin_setup (void)
88 | {
89 | freq2bin_class =
90 | class_new (
91 | gensym ("freq2bin"),
92 | (t_newmethod)freq2bin_new,
93 | 0,
94 | sizeof (t_freq2bin),
95 | CLASS_DEFAULT,
96 | A_DEFFLOAT,
97 | A_DEFFLOAT,
98 | 0
99 | );
100 |
101 | class_addcreator (
102 | (t_newmethod)freq2bin_new,
103 | gensym ("timbreIDLib/freq2bin"),
104 | A_DEFFLOAT,
105 | A_DEFFLOAT,
106 | 0
107 | );
108 |
109 | class_addmethod (
110 | freq2bin_class,
111 | (t_method)freq2bin_print,
112 | gensym ("print"),
113 | 0
114 | );
115 |
116 | class_addfloat (
117 | freq2bin_class,
118 | (t_method)freq2bin_calculate
119 | );
120 |
121 | class_addmethod (
122 | freq2bin_class,
123 | (t_method)freq2bin_setWinSampRate,
124 | gensym ("setWinSampRate"),
125 | A_DEFFLOAT,
126 | A_DEFFLOAT,
127 | 0
128 | );
129 |
130 | class_sethelpsymbol (freq2bin_class, gensym ("tID-conversion"));
131 | }
132 |
--------------------------------------------------------------------------------
/src/freq2mel.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | freq2mel - Calculate the mel frequency of a given frequency in Hertz
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* freq2mel_class;
19 |
20 | typedef struct _freq2mel
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_freq2melFormula x_formula;
25 | t_outlet* x_melFreq;
26 |
27 | } t_freq2mel;
28 |
29 |
30 | /* ------------------------ freq2mel -------------------------------- */
31 | static void freq2mel_calculate (t_freq2mel* x, t_float f)
32 | {
33 | t_float freq;
34 |
35 | freq = f;
36 |
37 | if (freq >= 0.0 && freq <= TID_MAXMELFREQ)
38 | {
39 | t_float melFreq;
40 |
41 | melFreq = tIDLib_freq2mel (freq);
42 |
43 | outlet_float (x->x_melFreq, melFreq);
44 | }
45 | else
46 | pd_error (x, "%s: frequency must be between 0 and %f Hz", x->x_objSymbol->s_name, TID_MAXMELFREQ);
47 | }
48 |
49 | static void* freq2mel_new (t_symbol* s, int argc, t_atom* argv)
50 | {
51 | t_freq2mel* x = (t_freq2mel *)pd_new (freq2mel_class);
52 | x->x_melFreq = outlet_new (&x->x_obj, &s_float);
53 |
54 | x->x_objSymbol = s;
55 |
56 | // will use x->x_formula in future
57 | switch (argc)
58 | {
59 | case 1:
60 | x->x_formula = atom_getfloat (argv);
61 | break;
62 | default:
63 | x->x_formula = freq2melFormula0;
64 | break;
65 | }
66 |
67 | return (x);
68 | }
69 |
70 | void freq2mel_setup (void)
71 | {
72 | freq2mel_class =
73 | class_new (
74 | gensym ("freq2mel"),
75 | (t_newmethod)freq2mel_new,
76 | 0,
77 | sizeof (t_freq2mel),
78 | CLASS_DEFAULT,
79 | A_GIMME,
80 | 0
81 | );
82 |
83 | class_addcreator (
84 | (t_newmethod)freq2mel_new,
85 | gensym ("timbreIDLib/freq2mel"),
86 | A_GIMME,
87 | 0
88 | );
89 |
90 | class_addfloat (
91 | freq2mel_class,
92 | (t_method)freq2mel_calculate
93 | );
94 |
95 | class_sethelpsymbol (freq2mel_class, gensym ("tID-conversion"));
96 | }
97 |
--------------------------------------------------------------------------------
/src/mel2freq.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | mel2freq - Calculate the frequency in Hertz of a given mel frequency
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* mel2freq_class;
19 |
20 | typedef struct _mel2freq
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_mel2freqFormula x_formula;
25 | t_outlet* x_freq;
26 |
27 | } t_mel2freq;
28 |
29 |
30 | /* ------------------------ mel2freq -------------------------------- */
31 | static void mel2freq_calculate (t_mel2freq* x, t_float m)
32 | {
33 | t_float mel, freq;
34 |
35 | mel = m;
36 |
37 | if (mel >= 0.0 && mel <= TID_MAXMELS)
38 | {
39 | freq = tIDLib_mel2freq (mel);
40 | outlet_float (x->x_freq, freq);
41 | }
42 | else
43 | pd_error (x, "%s: mel frequency must be between 0 and %f mels", x->x_objSymbol->s_name, TID_MAXMELS);
44 | }
45 |
46 | static void* mel2freq_new (t_symbol* s, int argc, t_atom* argv)
47 | {
48 | t_mel2freq* x = (t_mel2freq *)pd_new (mel2freq_class);
49 | x->x_freq = outlet_new (&x->x_obj, &s_float);
50 |
51 | x->x_objSymbol = s;
52 |
53 | // will use x->x_formula in future
54 | switch (argc)
55 | {
56 | case 1:
57 | x->x_formula = atom_getfloat (argv);
58 | break;
59 | default:
60 | x->x_formula = mel2freqFormula0;
61 | break;
62 | }
63 |
64 | return (x);
65 | }
66 |
67 | void mel2freq_setup (void)
68 | {
69 | mel2freq_class =
70 | class_new (
71 | gensym ("mel2freq"),
72 | (t_newmethod)mel2freq_new,
73 | 0,
74 | sizeof (t_mel2freq),
75 | CLASS_DEFAULT,
76 | A_GIMME,
77 | 0
78 | );
79 |
80 | class_addcreator (
81 | (t_newmethod)mel2freq_new,
82 | gensym ("timbreIDLib/mel2freq"),
83 | A_GIMME,
84 | 0
85 | );
86 |
87 | class_addfloat (
88 | mel2freq_class,
89 | (t_method)mel2freq_calculate
90 | );
91 |
92 | class_sethelpsymbol (mel2freq_class, gensym ("tID-conversion"));
93 | }
94 |
--------------------------------------------------------------------------------
/src/tID_mean.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | tID_mean - Calculate mean of a list of numbers.
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* tID_mean_class;
19 |
20 | typedef struct _tID_mean
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_outlet* x_mean;
25 |
26 | } t_tID_mean;
27 |
28 |
29 | /* ------------------------ tID_mean -------------------------------- */
30 |
31 | static void tID_mean_calculate (t_tID_mean* x, t_symbol* s, int argc, t_atom* argv)
32 | {
33 | t_float n, sum, mean;
34 | t_float* input;
35 | t_sampIdx i;
36 |
37 | n = argc;
38 |
39 | if (n < 1)
40 | pd_error (x, "%s: too few elements in list.", x->x_objSymbol->s_name);
41 | else
42 | {
43 | // create local memory
44 | input = (t_float *)t_getbytes (n * sizeof (t_float));
45 |
46 | for (i = 0; i < n; i++)
47 | input[i] = atom_getfloat (argv + i);
48 |
49 | sum = 0.0;
50 |
51 | for (i = 0; i < n; i++)
52 | sum += input[i];
53 |
54 | mean = sum / n;
55 |
56 | outlet_float (x->x_mean, mean);
57 |
58 | // free local memory
59 | t_freebytes (input, n * sizeof (t_float));
60 | }
61 | }
62 |
63 | static void* tID_mean_new (void)
64 | {
65 | t_tID_mean* x = (t_tID_mean *)pd_new (tID_mean_class);
66 | x->x_mean = outlet_new (&x->x_obj, &s_float);
67 |
68 | x->x_objSymbol = gensym ("tID_mean");
69 |
70 | return (x);
71 | }
72 |
73 | void tID_mean_setup (void)
74 | {
75 | tID_mean_class =
76 | class_new (
77 | gensym ("tID_mean"),
78 | (t_newmethod)tID_mean_new,
79 | 0,
80 | sizeof (t_tID_mean),
81 | CLASS_DEFAULT,
82 | 0
83 | );
84 |
85 | class_addcreator (
86 | (t_newmethod)tID_mean_new,
87 | gensym ("timbreIDLib/tID_mean"),
88 | A_GIMME,
89 | 0
90 | );
91 |
92 | class_addlist (
93 | tID_mean_class,
94 | (t_method)tID_mean_calculate
95 | );
96 | }
97 |
--------------------------------------------------------------------------------
/src/tID_std.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | tID_std - Calculate standard deviation of a list of numbers.
4 |
5 | Copyright 2009 William Brent
6 |
7 | This file is part of timbreID.
8 |
9 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10 |
11 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 | You should have received a copy of the GNU General Public License along with this program. If not, see .
13 |
14 | */
15 |
16 | #include "tIDLib.h"
17 |
18 | static t_class* tID_std_class;
19 |
20 | typedef struct _tID_std
21 | {
22 | t_object x_obj;
23 | t_symbol* x_objSymbol;
24 | t_outlet* x_std;
25 |
26 | } t_tID_std;
27 |
28 |
29 | /* ------------------------ tID_std -------------------------------- */
30 |
31 | static void tID_std_calculate (t_tID_std* x, t_symbol* s, int argc, t_atom* argv)
32 | {
33 | t_float n, sum, mean, std;
34 | t_float* input;
35 | t_sampIdx i;
36 |
37 | n = argc;
38 |
39 | if (n <= 1)
40 | pd_error (x, "%s: too few elements in list.", x->x_objSymbol->s_name);
41 | else
42 | {
43 | // create local memory
44 | input = (t_float *)t_getbytes (n * sizeof (t_float));
45 |
46 | for (i = 0; i < n; i++)
47 | input[i] = atom_getfloat (argv + i);
48 |
49 | sum = 0.0;
50 |
51 | for (i = 0; i < n; i++)
52 | sum += input[i];
53 |
54 | mean = sum / n;
55 |
56 | sum = 0.0;
57 |
58 | // center & square the data
59 | for (i = 0; i < n; i++)
60 | {
61 | input[i] -= mean;
62 | input[i] *= input[i];
63 | sum += input[i];
64 | }
65 |
66 | std = sum / (n - 1.0);
67 | std = sqrt (std);
68 |
69 | outlet_float (x->x_std, std);
70 |
71 | // free local memory
72 | t_freebytes (input, n * sizeof (t_float));
73 | }
74 | }
75 |
76 | static void* tID_std_new (void)
77 | {
78 | t_tID_std* x = (t_tID_std *)pd_new (tID_std_class);
79 | x->x_std = outlet_new (&x->x_obj, &s_float);
80 |
81 | x->x_objSymbol = gensym ("tID_std");
82 |
83 | return (x);
84 | }
85 |
86 | void tID_std_setup (void)
87 | {
88 | tID_std_class =
89 | class_new (
90 | gensym ("tID_std"),
91 | (t_newmethod)tID_std_new,
92 | 0,
93 | sizeof (t_tID_std),
94 | CLASS_DEFAULT,
95 | 0
96 | );
97 |
98 | class_addcreator (
99 | (t_newmethod)tID_std_new,
100 | gensym ("timbreIDLib/tID_std"),
101 | A_GIMME,
102 | 0
103 | );
104 |
105 | class_addlist (
106 | tID_std_class,
107 | (t_method)tID_std_calculate
108 | );
109 | }
110 |
--------------------------------------------------------------------------------
/src/timbreIDLib.c:
--------------------------------------------------------------------------------
1 | /*
2 |
3 | Copyright 2009 William Brent
4 |
5 | This file is part of timbreID.
6 |
7 | timbreID is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
8 |
9 | timbreID is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
10 | You should have received a copy of the GNU General Public License along with this program. If not, see .
11 |
12 | */
13 |
14 | #include "tIDLib.h"
15 |
16 | typedef struct timbreIDLib
17 | {
18 | t_object t_obj;
19 | } t_timbreIDLib;
20 |
21 | t_class* timbreIDLib_class;
22 |
23 |
24 | static void* timbreIDLib_new (void)
25 | {
26 | t_timbreIDLib* x = (t_timbreIDLib *)pd_new (timbreIDLib_class);
27 |
28 | return (x);
29 | }
30 |
31 | void timbreIDLib_setup (void)
32 | {
33 | timbreIDLib_class = class_new (gensym ("timbreIDLib"), timbreIDLib_new, 0, sizeof (t_timbreIDLib), CLASS_PD, 0);
34 |
35 | post ("timbreIDLib version %s", TID_VERSION);
36 |
37 | attackTime_setup();
38 | attackTime_tilde_setup();
39 | autoCorrPitch_setup();
40 | autoCorrPitch_tilde_setup();
41 | bark_setup();
42 | bark2freq_setup();
43 | barkSpec_setup();
44 | barkSpecBrightness_setup();
45 | barkSpecBrightness_tilde_setup();
46 | barkSpecCentroid_setup();
47 | barkSpecCentroid_tilde_setup();
48 | barkSpecFlatness_setup();
49 | barkSpecFlatness_tilde_setup();
50 | barkSpecFlux_setup();
51 | barkSpecFlux_tilde_setup();
52 | barkSpecIrregularity_setup();
53 | barkSpecIrregularity_tilde_setup();
54 | barkSpecKurtosis_setup();
55 | barkSpecKurtosis_tilde_setup();
56 | barkSpecRolloff_setup();
57 | barkSpecRolloff_tilde_setup();
58 | barkSpecSkewness_setup();
59 | barkSpecSkewness_tilde_setup();
60 | barkSpecSlope_setup();
61 | barkSpecSlope_tilde_setup();
62 | barkSpecSpread_setup();
63 | barkSpecSpread_tilde_setup();
64 | barkSpec_tilde_setup();
65 | bark_tilde_setup();
66 | bfcc_setup();
67 | bfcc_tilde_setup();
68 | bin2freq_setup();
69 | binWrangler_setup();
70 | cepstrum_setup();
71 | cepstrumPitch_setup();
72 | cepstrumPitch_tilde_setup();
73 | cepstrum_tilde_setup();
74 | chroma_setup();
75 | chroma_tilde_setup();
76 | dct_setup();
77 | dct_tilde_setup();
78 | energy_setup();
79 | energy_tilde_setup();
80 | energyEntropy_setup();
81 | energyEntropy_tilde_setup();
82 | featureAccum_setup();
83 | featureDelta_setup();
84 | featureNorm_setup();
85 | freq2bark_setup();
86 | freq2bin_setup();
87 | freq2mel_setup();
88 | harmonicRatio_setup();
89 | harmonicRatio_tilde_setup();
90 | magSpec_setup();
91 | magSpec_tilde_setup();
92 | maxSample_setup();
93 | maxSampleDelta_setup();
94 | maxSampleDelta_tilde_setup();
95 | maxSample_tilde_setup();
96 | mel2freq_setup();
97 | melSpec_setup();
98 | melSpec_tilde_setup();
99 | mfcc_setup();
100 | mfcc_tilde_setup();
101 | minSample_setup();
102 | minSampleDelta_setup();
103 | minSampleDelta_tilde_setup();
104 | minSample_tilde_setup();
105 | nearestPoint_setup();
106 | peakSample_setup();
107 | peakSample_tilde_setup();
108 | phaseSpec_setup();
109 | phaseSpec_tilde_setup();
110 | sampleBuffer_tilde_setup();
111 | specBrightness_setup();
112 | specBrightness_tilde_setup();
113 | specCentroid_setup();
114 | specCentroid_tilde_setup();
115 | specFlatness_setup();
116 | specFlatness_tilde_setup();
117 | specFlux_setup();
118 | specFlux_tilde_setup();
119 | specHarmonicity_setup();
120 | specHarmonicity_tilde_setup();
121 | specIrregularity_setup();
122 | specIrregularity_tilde_setup();
123 | specKurtosis_setup();
124 | specKurtosis_tilde_setup();
125 | specRolloff_setup();
126 | specRolloff_tilde_setup();
127 | specSkewness_setup();
128 | specSkewness_tilde_setup();
129 | specSlope_setup();
130 | specSlope_tilde_setup();
131 | specSpread_setup();
132 | specSpread_tilde_setup();
133 | tempo_tilde_setup();
134 | tID_fft_setup();
135 | tID_fft_tilde_setup();
136 | tID_mean_setup();
137 | tID_std_setup();
138 | tabletool_setup();
139 | timbreID_setup();
140 | waveSlope_setup();
141 | waveSlope_tilde_setup();
142 | waveNoise_setup();
143 | waveNoise_tilde_setup();
144 | zeroCrossing_setup();
145 | zeroCrossing_tilde_setup();
146 | }
147 |
--------------------------------------------------------------------------------