This is a puredata external using the velipso/sndfilter dsp
library. Currently only the reverb
algorithm is available via the
[sndfilter.reverb~]
pd object.
Note: Currently the instructions are only for linux.
Todos
- [ ] Build for windows (mac? anyone?)
- [ ] add compressor module
- add biquad filters? perhaps not needed as pd already has the
[biquad~]
object.
rm -rf build
meson setup build
meson compile -C build
# Building in release mode
meson configure build -Dbuildtype=release
# some extra args as seen in reference Makefile
meson configure build -Dc_args='-funroll-loops -fomit-frame-pointer -O6'
Symbols such as pd_new
, gensym
etc are provided by
puredata. However, when this library (external in pd lingo) is
compiled, these symbols are not present, but they will be provided
by the puredata executable itself on loadtime/runtime.
For this to work, and not get any linke errors, we need the
allow-shlib-undefined
linker flag. BUT the problem now is that
we loose any other compiler warning about any actual linker
errors (if, say, we also are using some other utility library that
we forgot to link to!).
The following snippet provides a way to spot such errors by
- disabling the
allow-shlib-undefined
linker flag (meson built in optionb_lundef
handles this) - linking against libpd (you have to build it yourself, instructions below)
- compile as usually
- if you get linker errors now, these should be resolved!
# building libpd
git clone https://github.com/libpd/libpd.git --recurse-submodules
(cd libpd; mkdir build; cd build; cmake ..; cmake --build .)
LIBPD_LIB_DIR=$(realpath ./libpd/build)
meson configure build -Db_lundef=true
meson configure build -Dc_link_args="-L${LIBPD_LIB_DIR} -lpd"
meson compile -C build # if that fails, then there's an actual linker error
# revert: just ignoring undefined symbol linker errors
meson configure build -Db_lundef=false
meson configure build -Dc_link_args=''
meson compile -C build # that won't mention any linker errors, like ever! :(
# check
meson configure build | grep b_lundef
read more here:
- how-to-smartly-detect-undefined-symbols-when-linking-a-plugin
- what-exactly-does-rdynamic-do-and-when-exactly-is-it-needed
To make this available to puredata, the compiled object & the help file need to be placed in puredata’s search directory. See more here.
mkdir -p ~/.local/lib/pd/extra/sndfilter/
cp ./build/sndfilter.pd_linux ~/.local/lib/pd/extra/sndfilter/
cp ./help/* ~/.local/lib/pd/extra/sndfilter/
# to uninstall
rm -rf ~/.local/lib/pd/extra/sndfilter/
puredata ./help/sndfilter.reverb~-help.pd