Merge branch 'release/2.0.0' into develop
Update CHANGELOG.md
Bump major version
Generate new audio synthesizers and filters in FAUST with Recurrent Cartesian Genetic Programming [1] [2]. Given a target sound or impulse response as input, the RCGP will return a FAUST synthesizer or filter, respectively, that best approximates the given signal or impulse response.
.dot
files)On Arch-based Linux distributions (preferred, as this is the main distribution for development):
sudo pacman -Syu --needed faust fftw libsndfile graphviz parallel r
On Debian-based Linux distributions, the following command may work for Debian "sid" and Ubuntu 22.10:
sudo apt install faust libfftw3-dev libsndfile1-dev graphviz parallel r-base
Otherwise, LLVM and FAUST might need to be installed manually for the time being:
# install and configure LLVM
sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
sudo ln -s /usr/bin/llvm-config-15 /usr/bin/llvm-config
# install additional dependencies to build FAUST
sudo apt install build-essential cmake libmicrohttpd-dev pkg-config
# build and install FAUST from source
git clone https://github.com/grame-cncm/faust.git
cd faust
make all
sudo make install
sudo ldconfig
# install remaining FaustCGP dependencies
sudo apt install libfftw3-dev libsndfile1-dev graphviz parallel r-base
Similarly, on Fedora/RPM-based Linux distributions:
# install FAUST dependencies
sudo dnf install cmake llvm-devel libmicrohttpd-devel
# build and install FAUST from source
git clone https://github.com/grame-cncm/faust.git
cd faust
make all
sudo make install
sudo ldconfig /usr/local/lib
# install remaining FaustCGP dependencies
sudo dnf install fftw-devel libsndfile-devel graphviz parallel R
Simply run make
from the project root directory,
which will compile the needed binaries and place them in the bin
directory.
To delete the binaries and reset the build process, run make clean
.
See the -?
/--help
option for detailed usage of each program.
./bin/audio2cgp -o audio.data path/to/input.wav
./bin/cgp2faust -o output.dsp audio.data
./bin/faust2cgp -o filter.data path/to/input.dsp
./bin/cgp2faust -e -o output.dsp filter.data
Running make sharc_test TEST_DIR=path/to/test
will clone and analyze
the SHARC timbre database [3],
then run the cgp2faust
program in synth mode in the background
across a selected number of tones.
Requires GNU parallel in order to run the test
across as many CPU cores as possible.
Once completed, the output files can be analyzed with
make sharc_results TEST_DIR=path/to/test
,
which will perform the following steps:
fitness.csv
files.nodes.csv
files..dot
files to .pdf
for ease of viewing graphs..csv
files
via the provided R scripts.Running make filter_test
will perform a similar test,
but using an inverse filter from MIT's KEMAR database [4] as a target instead.
Likewise, make filter_results
will read and analyze the data from this test.
This project uses Cppcheck and Uncrustify for automatic static code analysis and formatting, respectively.
After cloning the repository, add a link to the project's pre-commit hook script in the git hooks directory.
ln -s {../..,.git/hooks}/pre-commit
You can also run the pre-commit hook manually to lint all files.
./pre-commit lint
See each individual file for details, but in short:
.gitignore
and .editorconfig
files are licensed under CC0-1.0.In addition, all FAUST source code produced by the compiled binaries are licensed under MIT, and any generated audio files likewise under CC-BY-SA-4.0.
This software has been featured in the following research publications:
E. Ly and J. Villegas, "Digital Filter Design via Recurrent Cartesian Genetic Programming," IEEE 13th International Workshop on Computational Intelligence and Applications (IWCIA), Hiroshima, Japan, Nov. 2023, pp. 7-12.
E. Ly and J. Villegas, "Cartesian Genetic Programming Parameterization in the Context of Audio Synthesis," IEEE Signal Processing Letters, vol. 30, Aug. 2023, pp. 1077-1081.
E. Ly and J. Villegas, "Additive Synthesis via Recurrent Cartesian Genetic Programming in FAUST," 153rd AES Fall Convention, New York, Oct. 2022, pp. 1-7.
[1] A. J. Turner and J. F. Miller, "Introducing A Cross Platform Open Source Cartesian Genetic Programming Library," Genetic Programming and Evolvable Machines, vol. 16, 2014, pp. 83-91.
[2] A. J. Turner and J. F. Miller, "Recurrent Cartesian Genetic Programming," 13th International Conference on Parallel Problem Solving from Nature (PPSN XIII), Cham: Springer, 2014, pp. 476-486.
[3] G. J. Sandell, "A Library of Orchestral Instrument Spectra" (GitHub), 1991 International Computer Music Conference, Michigan Publishing, 1991, pp. 98-101.
[4] B. Gardner and K. Martin, "HRTF Measurements of a KEMAR Dummy-Head Microphone," Perceptual Computing - Technical Report #280, Cambridge: MIT Media Lab, 1994, pp. 1-7.