Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Filter Fq modifier introducing noise when amplitude is greater than zero

  1. #1
    Junior Member
    Join Date
    May 2018

    Filter Fq modifier introducing noise when amplitude is greater than zero

    I'm working a Teensy 3.6 based synth using the audio library and I'm getting unwanted signal noise when I use a waveform object to modify a filter object's frequency via its second input.

    The noise is introduced when the modifying waveform's amplitude is anything greater than zero.

    Repro Steps:
    1. Run the sketch. I'm using Teensyduino 1.48 & Arduino 1.8.10
    2. I'm using an amplified speaker turned up high, but the noise is still perceptible when using standard apple earbuds.
    3. The hardware is a Teensy 3.6 with a PJRC PT8211 audio kit.
    4. The only wiring is the PT8211 board connected via pin headers directly on top of the Teensy.
    5. For comparison, comment out line 29 and uncomment line 35. This sets the modifying waveform's amplitude to zero for a clean signal. You should only hear nice pink(?) noise.

    The primary waveform isn't running, this is so you don't blow out your ears or your speakers. The errant noise is happening regardless of wanted noise.
    The library is awesome. All the noise issues I've run into so far have been my fault or noted issues and fairly easy to diagnose, but this one has me stumped.

    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    // GUItool: begin automatically generated code
    AudioSynthWaveform       oscA1;      //xy=733,436
    AudioSynthWaveform       lfoA1;      //xy=735,467
    AudioFilterStateVariable filter1;        //xy=917,441
    AudioMixer4              mixer1;         //xy=1081,448
    AudioOutputPT8211        PT8211;           //xy=1245,445
    AudioConnection          patchCord1(oscA1, 0, filter1, 0);
    AudioConnection          patchCord2(lfoA1, 0, filter1, 1);
    AudioConnection          patchCord3(filter1, 0, mixer1, 0);
    AudioConnection          patchCord4(filter1, 1, mixer1, 1);
    AudioConnection          patchCord5(filter1, 2, mixer1, 2);
    AudioConnection          patchCord6(mixer1, 0, PT8211, 0);
    AudioConnection          patchCord7(mixer1, 0, PT8211, 1);
    // GUItool: end automatically generated code
    void setup() {
      //oscA1.begin(1, 440, WAVEFORM_SAWTOOTH); 
    // noise
    // the noise is the same regardless of amplitude. anything over .01 makes it happen
    //  lfoA1.begin(.05,3,WAVEFORM_SINE);
    //no noise
    //  lfoA1.begin(0,3,WAVEFORM_SINE); 
    void loop() {

  2. #2
    Senior Member
    Join Date
    Nov 2017
    Could not replicate the problem with your code on a teensy4 with the sgtl5000 audioshield.

    What happens if you add this to your setup()?
    Have a look at this thread, I suspect it might be related.
    Last edited by neurofun; 10-27-2019 at 05:32 PM. Reason: typing error

  3. #3
    Junior Member
    Join Date
    May 2018
    Thanks, neurofun, that's good news because I'm migrating to a T4 next week.

    I'll compare it to the audio shield as well(once I find it).
    It could be related to the PT8211 which is a more bare bones DAC than the Audio Shield.

    I tried initializing the filter and got the same results.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts