This evening I’ve ported this fantastic noise cancelling library into a supercollider plugin -
Here it is, but it will require you to compile it yourself.
And here is an example - you might need to turn it up loud to hear the noise. Also, I haven’t tweaked the controls so there might be some artefacts, but there are several options.
It introduces a little latency, so depending on the application it might not be suitable, however, it works wonders if you are recording into a buffer for later processing.
And here’s a minimal example of what the code can be:
x = {
var noisy = SoundIn.ar(0);
NoiseRepellent.ar(
input: noisy,
learner: NRAverage(\isLearning.kr(0)),
);
}.play;
// capture some noise
x.set(\isLearning, 1);
// start the noise cancellation
x.set(\isLearning, 0);
// move mouse from the left to the right of screen to blend between
There is also an Lv2 version the original author made
By the way, you’ve made it using cookeicutter I see. This means you get auto builds for free. Just push a tag that begins with v and it will automatically build for all platforms. Eg:
Do you know how to link against fftw3 so that it works on the github workflow?
I’ve add the FindFFTW3 cmake plugin.
and the following lines to the cmake.txt: find_package(FFTW REQUIRED)
… target_link_libraries(${sy_name} FFTW::Float)
When I build it locally I pass -DFFTW_INCLUDE_DIRS=/usr/local/lib, and all works.
However github complains, Could NOT find FFTW (missing: FFTW_INCLUDE_DIRS).
Is there a standard way of dealing with this? Like, do I need to change the workflow so the vm has fftw3 installed, or do I need to include all the source code of fftw3 in this cmake project and build it?
So I’ve tried installing fftw on the vm by altering the workflow file. That went fine, and findFFTW.cmake says that its got it, but the linking still fails and I don’t know why.
-- Found FFTW: /usr/local/lib
-- Found SuperCollider: /home/runner/work/NoiseRepellent-supercollider/NoiseRepellent-supercollider/supercollider
-- Building plugins for SuperCollider version: 3.12.2
then, whilst building:
fatal error: fftw3.h: No such file or directory
#include <fftw3.h>