This is the readme for the "clip_exp"-package, a PD-module limiting ("clipping") the slope of the logarithm of an audio-signal.
Exactly: The "expmax" parameter specifies the maximal possible ratio of two signal values at a temporal distance of 1 ms.
If the input signal jumps by a factor exceeding the thus defined allowed ratio of two following samples
(up- or downwards) it is clipped accordingly.
Note that the output signal can consequently not change between positive and negative range.
It can though approach and, due to finit bit resolution, reach zero. The output is than "stuck" at 0.
A "reset"+float message at the first inlet resets the state.

So far, no care has been taken to avoid a possible stream of low-precision interupts for very small signals,
a phenomenon known as the "pentium-bug".


The development was part of the activities of the SOb(SoundingObject)-project.




The (C-)source of the PD module can be found in the "sound_modules/circ_max_filter" folder, which also contains an "example_patch" subfolder where you find an explaining PD patch ("circ_max_example.pd").


To compile run "make -f make_linux" resp. "nmake -f make_win_audio" in the source-directory ("sound_modules/circ_max_filter").
----------
An "obj" folder is automatically created where all intermedeate .o-files are placed.

Note that INCLUDE_locallinuxpaths contains several path variables that must coincide with your local environment:
* The general pd header file "m_pd.h" is searched for in the "src" subdirectory of your PD installation, which is assumed to be "/usr/local/lib/pd" (as for a standard pd installation). If you are using a different directory, you must specify this e.g by editing this file or through "make -f make_linux PD=/usr/local/pd-0.34...".
* The variable "LINUXBINDIR" specifies where the plugin binaries are placed after compilation; by default it is set to "/tmp". Again you can change it, e.g. to the "official" location with "LINUXBINDIR=/usr/local/lib/pd/externs"; note that of course you must have write access to the specific directory (e.g. install as root). Also, the here specified location must be included in PD's path; you will probably want to set this in the ".pdrc" configuration file in your home directory by including a line like "-path /tmp". (It seems that "#"-commented lines in ".pdrc" can cause troubles --- try to move such lines to the end in case ...)

Analog considerations of course apply to compilation for windows32 with respective filenames. Compilation with the "nmake" tool is somewhat less sophisticated, resulting in uglier make-files.


To run the example patches, you must use pd version 0.33 or later.
                                         ---------------
For questions, comments, suggestions don't hesitate to contact rath@sci.univr.it; examples of realized sounds of whatever (e.g. musical) use are particularly welcome.

Verona, august, 9th, Matthias Rath
