I am trying to make the sound made by the Oscillator sound less annoying and one idea woulb be adding a dampaning effect. I currently use this code:
import processing.sound.*;
void setup() {
SinOsc s=new SinOsc(this);
Reverb reverb=new Reverb(this);
s.freq(880);
s.amp(1);
s.play();
reverb.process(s);
reverb.damp(0.1);
}
void draw() {
}
However the dampening has no effect.
Hi @NumericPrime! This is actually expected behavior. The damping parameter of a reverberator is usually a low pass filter set to a mid to high frequency (3kHz - 12kHz). Though there is no documentation that I can find as to what cutoff frequency Processing Sound’s reverb uses, it is most definitely higher than 880Hz as per your example. So there would be no audible effect as the input is much lower than the filter’s cutoff.
I’m not sure how to make an Oscillator less annoying, I suppose it is all about context. How are you planning on using the Oscillator? I might have some suggestions with more information.
I just noticed I left out a word. I meant make a oscillator sound less annoying.
A thing I already did was adding overtones.
import processing.sound.*;
float amps[]={0.7, 0.8/8, 0.4/8, 0.8/8, 0.6/8, 0.35/8, 0.4/8, 0.3/8, 0.4/8, 0.3/8};
SinOsc oscs[]=new SinOsc[amps.length];
int freq=880;
void setup() {
for (int i=0; i<oscs.length; i++) oscs[i]=new SinOsc(this);
for (int i=0; i<oscs.length; i++) oscs[i].freq(freq*(i+1));
for (int i=0; i<amps.length; i++) oscs[i].amp(amps[i]);
for (int i=0; i<oscs.length; i++) oscs[i].add(1/(i+2));
for (int i=0; i<oscs.length; i++) oscs[i].play();
}
void draw(){}