| |
| Background thread: |
(Portaudio callback routine)
|
| - |
Realtime audio input in chunks of 512, 1024 or 2048 sampleframes, at any
user-selectable samplerate). |
| - |
Apply 100% overlapping Hamming window (windowsize = 1024 samples). |
| - |
Perform 1024, 2048, or 4096 point, real-input, FFT (always yielding
513 squared magnitudes (any higher bins are thrown away)). |
| - |
Reorganize FFT output on to a (more or less) logarithmic frequency scale
with the 'varidist' or 'equidist' algorithm. For example 27 equidist bands (minor thirds)
or 60 varidist bands (slightly narrowing, from major third up to minor second). |
| - |
Include some more linear measurements like RMS and peak magnitude and
normalize the composite input vector. |
| - |
Store vectors in a large circular buffer in RAM (storage for 1 hour just
takes some Megabytes).
|
|
|
Foreground thread:
|
| - |
Run the following network which reads from the large circular buffer
in RAM that is filled by the background process. |
| - |
Perform simultaneous audio recording to file (again large circular buffer
in RAM that is filled by the background process). |
| - |
Send out MIDI messages when audio fragments are recognized. |
| - |
Process user commands from the console. |
| - |
Process incoming MIDI events. |
| - |
In case of errors, report these on the console (or file).
|
|
| |
|
fig.3: Preprocessing and spatiotemporal layers are run as separate processes. |
 |
CMP1.42.tar.gz |
Complete ComParser sources, binaries and documentation,
version 1.42, tarred and gzipped (about 5 Megabytes). |
After unpacking this, subdirectory '/src' should look something like this
(below, files can also be viewed or downloaded individually):
|
 |
aiff |
To read and write audiofiles in AIFF format (endian-safe). |
 |
CMP.c |
Main() for the standalone ComParser. |
 |
CMP.h |
Version number, included by both the standalone ComParser and the PD external. |
 |
CMP_audiorecord.c |
Record audiofile while following (handy during rehearsels with musicians). |
 |
CMP_audiorecord.h |
Headerfile. |
 |
CMP_avalanche.c |
To write and read avalanche files. |
 |
CMP_avalanche.h |
Headerfile defining memory and file structures. |
 |
CMP_network.c |
To load network files in memory (linked list management). |
 |
CMP_network.h |
Headerfile defining internal memory structure and the network file format. |
 |
CMP_portaudio.c |
Realtime analysis object (wrapping the PREP with PortAudio). |
 |
CMP_portaudio.h |
Datastructures and constants for realtime audio analysis based on PortAudio. |
 |
CMP_prep.c |
Implements preprocessing object (delivers feature vectors). |
 |
CMP_prep.h |
C API header for audio preprocessor. |
 |
console/ |
Platform specific code for polling console-input (done SGI and Mac).
Quite clumsy, actually... We'd better create a separate 3rd thread for the spatiotemporal layer, instead
of avoiding blocking fgets-calls. |
 |
fft/ |
FFT code and code-generators from Eyal Lebedinsky. |
 |
gt/ |
Minimal graphic toolkit for drawing and writing (not reading) JPG-files.
Incorporates the compression-part of the JPEG-library from the Independent JPEG Group
(version 6b, 27-Mar-1998). Include source
gt/gt.c in the compiler-project. |
 |
midi/ |
MIDI API. Support for SGI and Mac-OMS and a generous
gift from Stephane Letz for
MidiShare support. |
 |
pd |
The comparser~ external for Pure Data (sourcecode, PD-helpfile plus precompiled binaries). |
 |
portaudio |
Copy of the portable audio library by Phil Burk and Ross Bencina (renamed 'index.html'),
version 18 (CVS-patch). |
 |
makefile |
To compile the standalone program and the PD-external under IRIX, Linux and Mac OSX. |
 |
macCW.sit.hqx |
To compile on Apple Macintosh, OS 7, 8 or 9. Contains a
projectfile for the Metrowerks Codewarrior compiler, version 5 (IDE version 4.0); a picture resource;
and some additional sources (for strdup(), usleep() etc). |