Audio designer - Filters only self-oscillate in the harmonic series?

Status
Not open for further replies.

lucian_dusk

Active member
Hi All,
Having an absolute blast using the audio designer. It's fantastic!

I'm working on a project that uses a bank of bandpass filters and I'm trying to figure out a good way to allow them to self-oscillate.
I'm testing with white noise on the input so I can hear their responses clearly.

Setting the resonance of a state-variable filter to its maximum and then feeding back the bandpass output at a low volume gets great-sounding oscillation, but only in certain frequency intervals! There is a very pronounced difference in the level of oscillation depending on the frequency of the filter.
I'm guessing this is inherent to the filter's design and may be inevitable. Ideally I'd like at least somewhat even response across the audible spectrum.
I have reproduced the effect here on a small scale, with the filter's frequency being swept from 0 to 7kHz. Oscillation is clearly heard on a harmonic series; not sure what the fundamental is, or why.

Screen Shot 2019-12-11 at 15.58.41.png
code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>

// GUItool: begin automatically generated code
AudioSynthNoiseWhite noise1; //xy=156,254
AudioMixer4 mixer1; //xy=326,273
AudioFilterStateVariable filter1; //xy=447,370
AudioOutputAnalog dac1; //xy=594,379
AudioConnection patchCord1(noise1, 0, mixer1, 0);
AudioConnection patchCord2(mixer1, 0, filter1, 0);
AudioConnection patchCord3(filter1, 1, mixer1, 1);
AudioConnection patchCord4(filter1, 1, dac1, 0);
// GUItool: end automatically generated code

int ramp = 0;

void setup() {
AudioMemory(160);

noise1.amplitude(1);
mixer1.gain(0, .5); //noise input
mixer1.gain(1, .3); //filter feedback

filter1.frequency(600);
filter1.resonance(5.0);
}

void loop() {

ramp += 10;
if(ramp > 7000){ramp = 0;}
delay(50);
filter1.frequency(ramp);

}

I'm looking for suggestions about how to compensate for this effect, and if anyone is motivated enough, an explanation as to why this happens. I understand resonant filter design can be pretty complicated in software, but it's funny to think that this is so close to a solution!
Thanks all,
L
 
I haven't tried your example but:
Have you checked the peak levels at input and output of the filter? Have you made sure that the effect is not only coming from clipping?
 
Status
Not open for further replies.
Back
Top