Teensy LC mixing Oscillators with Noise?

blakeAlbion

Well-known member
Firstly, it's truly wonderful I can use the audio library in the LC.

I'm hearing a weird behavior when trying to mix the noise synth with an oscillator. (two oscillators in this example)
The noise generator seems to be at 100% amplitude and the only thing that pushes the level down is making the oscillators louder.

This is my audio graph.

// GUItool: begin automatically generated code
AudioSynthWaveformDc vcoPitch; //xy=66,183
AudioSynthWaveformDc vcoSkew; //xy=67,459
AudioSynthWaveformModulated waveformMod1; //xy=228,322
AudioSynthWaveformModulated waveformMod2; //xy=230,377
AudioSynthNoiseWhite noise1; //xy=281,253
AudioMixer4 mixer1; //xy=529,322
AudioOutputAnalog dac1; //xy=730,347
AudioConnection patchCord1(vcoPitch, 0, waveformMod1, 0);
AudioConnection patchCord2(vcoPitch, 0, waveformMod2, 0);
AudioConnection patchCord3(vcoSkew, 0, waveformMod1, 1);
AudioConnection patchCord4(vcoSkew, 0, waveformMod2, 1);
AudioConnection patchCord5(waveformMod1, 0, mixer1, 1);
AudioConnection patchCord6(waveformMod2, 0, mixer1, 2);
AudioConnection patchCord7(noise1, 0, mixer1, 0);
AudioConnection patchCord8(mixer1, dac1);
// GUItool: end automatically generated code

void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// Serial2.begin(19200);
while (!Serial && millis() < 3000)
;
AudioMemory(6);


noise1.amplitude(0.1);
waveformMod1.begin(1, 1, WAVEFORM_PULSE); //WAVEFORM_TRIANGLE_VARIABLE
waveformMod2.begin(1, 1, WAVEFORM_PULSE);
mixer1.gain(0, 0.25); // as long as this is not zero, the oscillators sound odd
mixer1.gain(1, 0.25); // turning the oscillators up on the mixer pushes the noise sound lower?
mixer1.gain(2, 0.25);

waveformMod1.frequency(55);
waveformMod2.frequency(55.08);

Serial.println("DONE");
}


Adjusting the amplitude of noise1 has no effect; it's basically either zero or non-zero, where non-zero is 100%.
As I bring up the gain of mixer1's channel 1 and 2, which have waveformMod1 and waveformMod2, the noise gets pushed down and the oscillators come up. But they don't sound quite right as long as noise1 is running: I can hear a clicking sort of sound.

I'm just not sure what I am hearing, and curious. (arithmetic overflow?)
I can unplug the LC and use a Teensy 4.0 to generate these sounds, and that will be fine.

If I can use the Teensy LC to generate oscillator sounds OR noise sounds, I can design for that constraint. It's still pretty cool.

Thanks,
Ben
 
Back
Top