Forum Rule: Always post complete source code & details to reproduce any issue!
Page 4 of 4 FirstFirst ... 2 3 4
Results 76 to 99 of 99

Thread: Teensyduino 1.54 Beta #7

  1. #76
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,921
    @Paul:
    Minor edit to LFSIntegrity to HALT on failed myfs.begin() :: github.com/PaulStoffregen/LittleFS/pull/11

  2. #77
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,008
    @Paul - Not sure if you want to pick this up soon or not... But there is a new update to: https://github.com/greiman/SdFat-beta
    It now supports UTF-8 filenames...

    Plus he update the configuration file where it checks first to see if a define is set and only use default if not set:
    https://github.com/greiman/SdFat-bet...tConfig.h#L218
    The one location in the link is one I wish he defaulted to ON...

  3. #78
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,281
    Perhaps we should review the PAD settings for I2C and use very conserative settings.
    From my experients they work well, even for higher I2C speeds and may cause less problems.


    edit: Perhaps the folks with your I2c tester board can try that?

    Or, we could add a general usable function pinMode(pin, const output, speed, strength, slewRate) something like that..
    Last edited by Frank B; 04-06-2021 at 08:40 PM.

  4. #79
    Audio ladder filter (Richard van Hoesel)

    Oooh tell me more - I can't find it in the audio design tool, presumably because it's still experimental?

  5. #80
    Junior Member
    Join Date
    Mar 2021
    Posts
    10

    AUDIO Library : Ladder filter degrades signal/noise ratio ?

    ... not sure where to post this one which relates to the audio library new ladder filter.

    I am using 16 Waveform oscillators routed to 4 ladder filters.
    When turning on the oscillators (amplitude > 0.f) a fixed frequency noise (NOT the oscillators frequency) is generated to the line output even when input/output mixers are set with a gain of 0.

    This does not happen if no ladder filter is present.

    Teensy 4.0 / Audio Rev D

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioSynthWaveformDc     dc1;            //xy=204.33333206176758,663.0000004768372
    AudioSynthWaveformModulated waveformMod6;   //xy=596.3333320617676,543.0000004768372
    AudioSynthWaveformModulated waveformMod1;   //xy=606.3333320617676,171.00000047683716
    AudioSynthWaveformModulated waveformMod2;   //xy=606.3333320617676,251.00000047683716
    AudioSynthWaveformModulated waveformMod4;   //xy=608.3333320617676,393.00000047683716
    AudioSynthWaveformModulated waveformMod10;  //xy=612.3333320617676,875.0000004768372
    AudioSynthWaveformModulated waveformMod5;   //xy=614.3333320617676,461.00000047683716
    AudioSynthWaveformModulated waveformMod3;   //xy=615.3333320617676,318.00000047683716
    AudioSynthWaveformModulated waveformMod9;   //xy=619.3333320617676,800.0000004768372
    AudioSynthWaveformModulated waveformMod7;   //xy=620.3333320617676,639.0000004768372
    AudioSynthWaveformModulated waveformMod8;   //xy=620.3333320617676,727.0000004768372
    AudioSynthWaveformModulated waveformMod16;  //xy=622.3333320617676,945.0000004768372
    AudioSynthWaveformModulated waveformMod13;  //xy=622.3333320617676,1137.0000004768372
    AudioSynthWaveformModulated waveformMod11;  //xy=624.3333320617676,1008.0000004768372
    AudioSynthWaveformModulated waveformMod14;  //xy=629.3333320617676,1194.0000004768372
    AudioSynthWaveformModulated waveformMod15;  //xy=629.3333320617676,1245.0000004768372
    AudioSynthWaveformModulated waveformMod12;  //xy=641.3333320617676,1069.0000004768372
    AudioMixer4              mixer1;         //xy=867.3333320617676,324.00000047683716
    AudioMixer4              mixer2;         //xy=867.3333320617676,544.0000004768372
    AudioMixer4              mixer3;         //xy=869.3333320617676,944.0000004768372
    AudioMixer4              mixer4;         //xy=869.3333320617676,1147.0000004768372
    AudioFilterLadder        ladder4;        //xy=1022.5000152587891,1160.0001392364502
    AudioFilterLadder        ladder2;        //xy=1029.1666412353516,557.5000095367432
    AudioFilterLadder        ladder1;        //xy=1032.5000762939453,337.500036239624
    AudioFilterLadder        ladder3;        //xy=1048.3333282470703,958.3333225250244
    AudioMixer4              mixer5;         //xy=1533.166763305664,801.1667594909668
    AudioOutputI2S           i2s1;           //xy=1776.8333930969238,787.0000114440918
    AudioConnection          patchCord1(dc1, 0, waveformMod1, 0);
    AudioConnection          patchCord2(dc1, 0, waveformMod2, 0);
    AudioConnection          patchCord3(dc1, 0, waveformMod3, 0);
    AudioConnection          patchCord4(dc1, 0, waveformMod4, 0);
    AudioConnection          patchCord5(dc1, 0, waveformMod5, 0);
    AudioConnection          patchCord6(dc1, 0, waveformMod6, 0);
    AudioConnection          patchCord7(dc1, 0, waveformMod7, 0);
    AudioConnection          patchCord8(dc1, 0, waveformMod8, 0);
    AudioConnection          patchCord9(dc1, 0, waveformMod9, 0);
    AudioConnection          patchCord10(dc1, 0, waveformMod10, 0);
    AudioConnection          patchCord11(dc1, 0, waveformMod16, 0);
    AudioConnection          patchCord12(dc1, 0, waveformMod11, 0);
    AudioConnection          patchCord13(dc1, 0, waveformMod12, 0);
    AudioConnection          patchCord14(dc1, 0, waveformMod13, 0);
    AudioConnection          patchCord15(dc1, 0, waveformMod14, 0);
    AudioConnection          patchCord16(dc1, 0, waveformMod15, 0);
    AudioConnection          patchCord17(waveformMod6, 0, mixer2, 1);
    AudioConnection          patchCord18(waveformMod1, 0, mixer1, 0);
    AudioConnection          patchCord19(waveformMod2, 0, mixer1, 1);
    AudioConnection          patchCord20(waveformMod4, 0, mixer1, 3);
    AudioConnection          patchCord21(waveformMod10, 0, mixer3, 1);
    AudioConnection          patchCord22(waveformMod5, 0, mixer2, 0);
    AudioConnection          patchCord23(waveformMod3, 0, mixer1, 2);
    AudioConnection          patchCord24(waveformMod9, 0, mixer3, 0);
    AudioConnection          patchCord25(waveformMod7, 0, mixer2, 2);
    AudioConnection          patchCord26(waveformMod8, 0, mixer2, 3);
    AudioConnection          patchCord27(waveformMod16, 0, mixer3, 2);
    AudioConnection          patchCord28(waveformMod13, 0, mixer4, 1);
    AudioConnection          patchCord29(waveformMod11, 0, mixer3, 3);
    AudioConnection          patchCord30(waveformMod14, 0, mixer4, 2);
    AudioConnection          patchCord31(waveformMod15, 0, mixer4, 3);
    AudioConnection          patchCord32(waveformMod12, 0, mixer4, 0);
    AudioConnection          patchCord33(mixer1, 0, ladder1, 0);
    AudioConnection          patchCord34(mixer2, 0, ladder2, 0);
    AudioConnection          patchCord35(mixer3, 0, ladder3, 0);
    AudioConnection          patchCord36(mixer4, 0, ladder4, 0);
    AudioConnection          patchCord37(ladder4, 0, mixer5, 3);
    AudioConnection          patchCord38(ladder2, 0, mixer5, 1);
    AudioConnection          patchCord39(ladder1, 0, mixer5, 0);
    AudioConnection          patchCord40(ladder3, 0, mixer5, 2);
    AudioConnection          patchCord41(mixer5, 0, i2s1, 0);
    AudioConnection          patchCord42(mixer5, 0, i2s1, 1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=1008.3333320617676,251.00000047683716
    // GUItool: end automatically generated code
    
    
    struct OSC {
      AudioSynthWaveformModulated *osc;
    } oscillators[16];
    
    void setup() {
     // Serial.begin(115200);
      AudioMemory(80);
    
    
      oscillators[0].osc = &waveformMod1;
      oscillators[1].osc = &waveformMod2;  
      oscillators[2].osc = &waveformMod3;
      oscillators[3].osc = &waveformMod4;
      oscillators[4].osc = &waveformMod5;
      oscillators[5].osc = &waveformMod6;
      oscillators[6].osc = &waveformMod7;
      oscillators[7].osc = &waveformMod8;
      oscillators[8].osc = &waveformMod9;
      oscillators[9].osc = &waveformMod10;
      oscillators[10].osc = &waveformMod11;
      oscillators[11].osc = &waveformMod12;
      oscillators[12].osc = &waveformMod13;
      oscillators[13].osc = &waveformMod14;
      oscillators[14].osc = &waveformMod15;
      oscillators[15].osc = &waveformMod16;
    
    
      // put your setup code here, to run once:
      mixer5.gain(0, 0);
      mixer5.gain(1, 0);
      mixer5.gain(2, 0);
      mixer5.gain(3, 0);
    
      mixer1.gain(0, 0);
      mixer1.gain(1, 0);
      mixer1.gain(2, 0);
      mixer1.gain(3, 0);
    
      mixer2.gain(0, 0);
      mixer2.gain(1, 0);
      mixer2.gain(2, 0);
      mixer2.gain(3, 0);
    
      mixer3.gain(0, 0);
      mixer3.gain(1, 0);
      mixer3.gain(2, 0);
      mixer3.gain(3, 0);
    
      mixer4.gain(0, 0);
      mixer4.gain(1, 0);
      mixer4.gain(2, 0);
      mixer4.gain(3, 0);
    
    
      for (int i = 0; i < 16 ; i++) {
        oscillators[i].osc->begin(0.5f,440.f, WAVEFORM_SINE);
      }
    
      sgtl5000_1.enable();
      sgtl5000_1.lineOutLevel(13);
      sgtl5000_1.autoVolumeDisable();
      sgtl5000_1.audioProcessorDisable();
    
    }
    
    void loop() {
      static bool toggle = false;
      delay(1000);
      toggle = (toggle)?0:1;
      float oscAmp = (toggle)?0.1:0.0;
    
      for (int i=0; i<16 ; i++) {
        oscillators[i].osc->amplitude(oscAmp);
      }
    }
    Click image for larger version. 

Name:	signal_noise_test.png 
Views:	26 
Size:	87.8 KB 
ID:	24456

  6. #81
    Senior Member
    Join Date
    Jul 2020
    Posts
    977
    If all the output mixer gains are set to zero there should be silence. If not perhaps there is a shortage of Audio buffers or CPU time?
    The ladder filter is expensive in CPU time as it has to do rate conversion.

  7. #82
    Junior Member
    Join Date
    Mar 2021
    Posts
    10
    Quote Originally Posted by MarkT View Post
    If all the output mixer gains are set to zero there should be silence. If not perhaps there is a shortage of Audio buffers or CPU time?
    The ladder filter is expensive in CPU time as it has to do rate conversion.
    Just added audio processor and memory measures :
    Code:
    20:10:11.806 -> | Processor Usage = 16.66 | Memory Buffers Usage = 16 |
    20:10:12.807 -> | Processor Usage = 16.66 | Memory Buffers Usage = 1 |
    20:10:13.840 -> | Processor Usage = 16.66 | Memory Buffers Usage = 16 |
    20:10:14.810 -> | Processor Usage = 16.66 | Memory Buffers Usage = 1 |

  8. #83
    Senior Member
    Join Date
    Jul 2020
    Posts
    977
    If the digital stream is not stuttering and is all zeros, what remains can only be noise on the supply rail getting into
    the analog output. This noise will be pattern sensitive and could conceivably be only audible in some configurations
    of the audio objects.

    The audio shield in particular doesn't have separate analog and digital grounds and supplies.

  9. #84
    Junior Member
    Join Date
    Mar 2021
    Posts
    10
    Quote Originally Posted by MarkT View Post
    If the digital stream is not stuttering and is all zeros, what remains can only be noise on the supply rail getting into
    the analog output. This noise will be pattern sensitive and could conceivably be only audible in some configurations
    of the audio objects.

    The audio shield in particular doesn't have separate analog and digital grounds and supplies.
    Thanks for the advice... however, this shows an important limit for its use... meanwhile I will try to investigate further (checking the audio stream, reduce the configuration). Any suggestions welcome!

    Lionel

  10. #85
    Junior Member
    Join Date
    Mar 2021
    Posts
    10
    Quote Originally Posted by MarkT View Post
    If the digital stream is not stuttering and is all zeros, what remains can only be noise on the supply rail getting into
    the analog output. This noise will be pattern sensitive and could conceivably be only audible in some configurations
    of the audio objects.

    The audio shield in particular doesn't have separate analog and digital grounds and supplies.
    Just tried with a SINGLE ladder filter with 4 osc. The issue is still alive and the same fixed frequency is still audible - though attenuated -...
    I don't know how to reliably check the contents of the digital stream...

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioSynthWaveformModulated waveformMod1;   //xy=606.3333320617676,171.00000047683716
    AudioSynthWaveformModulated waveformMod2;   //xy=606.3333320617676,251.00000047683716
    AudioSynthWaveformModulated waveformMod4;   //xy=608.3333320617676,393.00000047683716
    AudioSynthWaveformModulated waveformMod3;   //xy=615.3333320617676,318.00000047683716
    AudioMixer4              mixer1;         //xy=867.3333320617676,324.00000047683716
    AudioFilterLadder        ladder1;        //xy=1032.5000762939453,337.500036239624
    AudioOutputI2S           i2s1;           //xy=1235.1666946411133,330.33335399627686
    AudioConnection          patchCord1(waveformMod1, 0, mixer1, 0);
    AudioConnection          patchCord2(waveformMod2, 0, mixer1, 1);
    AudioConnection          patchCord3(waveformMod4, 0, mixer1, 3);
    AudioConnection          patchCord4(waveformMod3, 0, mixer1, 2);
    AudioConnection          patchCord5(mixer1, 0, ladder1, 0);
    AudioConnection          patchCord6(ladder1, 0, i2s1, 0);
    AudioConnection          patchCord7(ladder1, 0, i2s1, 1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=1008.3333320617676,251.00000047683716
    // GUItool: end automatically generated code
    
    
    struct OSC {
      AudioSynthWaveformModulated *osc;
    } oscillators[4];
    
    void setup() {
      Serial.begin(115200);
      AudioMemory(60);
    
    
      oscillators[0].osc = &waveformMod1;
      oscillators[1].osc = &waveformMod2;  
      oscillators[2].osc = &waveformMod3;
      oscillators[3].osc = &waveformMod4;
      
      mixer1.gain(0, 0);
      mixer1.gain(1, 0);
      mixer1.gain(2, 0);
      mixer1.gain(3, 0);
      
      for (int i = 0; i < 4 ; i++) {
        oscillators[i].osc->begin(0.5f,440.f, WAVEFORM_SINE);
      }
    
      sgtl5000_1.enable();
      sgtl5000_1.lineOutLevel(13);
      sgtl5000_1.autoVolumeDisable();
      sgtl5000_1.audioProcessorDisable();
    
    }
    
    void loop() {
      static bool toggle = false;
      delay(1000);
      toggle = (toggle)?0:1;
      float oscAmp = (toggle)?0.1:0.0;
    
      for (int i=0; i< 4 ; i++) {
        oscillators[i].osc->amplitude(oscAmp);
      }
      Serial.println("| Processor Usage = " + String(AudioProcessorUsageMax()) + " | Memory Buffers Usage = " + String(AudioMemoryUsageMax()) + " |");
      AudioMemoryUsageMaxReset();
      AudioProcessorUsageMaxReset();
    }

  11. #86
    Senior Member
    Join Date
    Jul 2020
    Posts
    977
    AudioAnalyzePeak can do this I think.

  12. #87
    Junior Member
    Join Date
    Mar 2021
    Posts
    10
    Quote Originally Posted by MarkT View Post
    AudioAnalyzePeak can do this I think.
    Thanks Mark, this allowed me to do some more tests, and... here are my findings:

    1 - The ladder filter will induce some significant unwanted fixed frequency noise when (at least) one mixer is used in the sketch. The noise occurs when the AudioFilterLadder::LPF() method is invoked for each of the 4 stages of the filter (which is quite compute intensive...).

    2 - Using "peak" I discovered a strange difference of behavior between amp and mixer. In the following tests, the gain of amp or mixer is always 0.0 (no sound). Every second the amplitude of the waveform is toggled between 0.0 (stop) and 0.1 alternatively which should result to no sound being issued to the I2S/peak.

    2.1 - Using waveform -> amp -> ladder

    Click image for larger version. 

Name:	waveform_ladder_amp.png 
Views:	10 
Size:	21.1 KB 
ID:	24469

    The peak is stable and the result is as follows :

    Code:
    18:41:39.922 -> Peak with osc Amplitude set to  : 0.10 => 1.00003052
    18:41:40.920 -> Peak with osc Amplitude set to  : 0.00 => 1.00003052
    18:41:41.940 -> Peak with osc Amplitude set to  : 0.10 => 1.00003052
    18:41:42.948 -> Peak with osc Amplitude set to  : 0.00 => 1.00003052
    The sketch does not generate unwanted noise.
    No fixed frequency noise from Ladder filter : Expected behaviour.

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioSynthWaveform       waveform1;      //xy=770,348
    AudioAmplifier           amp1;           //xy=944,348
    AudioFilterLadder        ladder1;        //xy=1152,509
    AudioOutputI2S           i2s1;           //xy=1219.8333740234375,310.66668701171875
    AudioAnalyzePeak         peak1;          //xy=1223,402
    AudioConnection          patchCord1(waveform1, amp1);
    AudioConnection          patchCord2(amp1, 0, i2s1, 0);
    AudioConnection          patchCord3(amp1, 0, i2s1, 1);
    AudioConnection          patchCord4(amp1, peak1);
    AudioConnection          patchCord5(amp1, 0, ladder1, 0);
    AudioControlSGTL5000     sgtl5000_1;     //xy=1229.3333129882812,241
    // GUItool: end automatically generated code
    
    void setup() {
      Serial.begin(115200);
      AudioMemory(15);
    
      waveform1.begin(WAVEFORM_SINE);
      waveform1.frequency(440.f);
      waveform1.amplitude(0.f);
    
      amp1.gain(0.0f);
    
      sgtl5000_1.enable();
      sgtl5000_1.lineOutLevel(13);
      sgtl5000_1.autoVolumeDisable();
      sgtl5000_1.audioProcessorDisable();
    
    }
    
    void loop() {
      static bool toggle = false;
      static float oscAmp = 0.f;
      delay(1000);
    
      Serial.println("Peak with osc Amplitude set to  : "+ String(oscAmp) + " => " + String(peak1.read(),8));
      
      toggle = (toggle)?0:1;
      oscAmp = (toggle)?0.1:0.0;
      
      waveform1.amplitude(oscAmp);
    
    }
    2.1 - Using SAME code with a mixer in place of the amp :
    (All the mixer gains are set to 0.f)

    Click image for larger version. 

Name:	waveform_mixer_ladder.png 
Views:	9 
Size:	22.3 KB 
ID:	24470


    The result is :
    Code:
    18:51:48.823 -> Peak with osc Amplitude set to  : 0.00 => 1.00003052
    18:51:49.838 -> Peak with osc Amplitude set to  : 0.10 => 0.00000000
    18:51:50.837 -> Peak with osc Amplitude set to  : 0.00 => 1.00003052
    18:51:51.854 -> Peak with osc Amplitude set to  : 0.10 => 0.00000000
    18:51:52.838 -> Peak with osc Amplitude set to  : 0.00 => 1.00003052
    18:51:53.826 -> Peak with osc Amplitude set to  : 0.10 => 0.00000000
    We can see a peak change every second AND a (ladder filter) unwanted fixed frequency noise can be heard.

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioSynthWaveform       waveform1;      //xy=770,348
    AudioMixer4              mixer1;         //xy=943,367
    AudioFilterLadder        ladder1;        //xy=1152,509
    AudioOutputI2S           i2s1;           //xy=1219.8333740234375,310.66668701171875
    AudioAnalyzePeak         peak1;          //xy=1223,402
    AudioConnection          patchCord1(waveform1, 0, mixer1, 0);
    AudioConnection          patchCord2(mixer1, 0, i2s1, 0);
    AudioConnection          patchCord3(mixer1, 0, i2s1, 1);
    AudioConnection          patchCord4(mixer1, peak1);
    AudioConnection          patchCord5(mixer1, 0, ladder1, 0);
    AudioControlSGTL5000     sgtl5000_1;     //xy=1229.3333129882812,241
    // GUItool: end automatically generated code
    
    void setup() {
      Serial.begin(115200);
      AudioMemory(15);
    
      waveform1.begin(WAVEFORM_SINE);
      waveform1.frequency(440.f);
      waveform1.amplitude(0.f);
    
      mixer1.gain(0,0.0f);
      mixer1.gain(1,0.0f);
      mixer1.gain(2,0.0f);
      mixer1.gain(3,0.0f);
    
      sgtl5000_1.enable();
      sgtl5000_1.lineOutLevel(13);
      sgtl5000_1.autoVolumeDisable();
      sgtl5000_1.audioProcessorDisable();
    
    }
    
    void loop() {
      static bool toggle = false;
      static float oscAmp = 0.f;
      delay(1000);
    
      Serial.println("Peak with osc Amplitude set to  : "+ String(oscAmp) + " => " + String(peak1.read(),8));
      
      toggle = (toggle)?0:1;
      oscAmp = (toggle)?0.1:0.0;
      
      waveform1.amplitude(oscAmp);
    }
    2.3 - Removing the ladder filter from the sketch

    Click image for larger version. 

Name:	waveform_mixer_no_ladder.png 
Views:	11 
Size:	17.3 KB 
ID:	24471

    The peak results are as follow :

    19:03:44.907 -> Peak with osc Amplitude set to : 0.00 => 1.00003052
    19:03:45.890 -> Peak with osc Amplitude set to : 0.10 => 0.00000000
    19:03:46.878 -> Peak with osc Amplitude set to : 0.00 => 1.00003052
    19:03:47.878 -> Peak with osc Amplitude set to : 0.10 => 0.00000000
    19:03:48.898 -> Peak with osc Amplitude set to : 0.00 => 1.00003052

    We can see the peak changing every second, and, no unwanted fixed frequency noise can be heard.

    Code:
    #include <Audio.h>
    #include <Wire.h>
    #include <SPI.h>
    #include <SD.h>
    #include <SerialFlash.h>
    
    // GUItool: begin automatically generated code
    AudioSynthWaveform       waveform1;      //xy=770,348
    AudioMixer4              mixer1;         //xy=943,367
    AudioOutputI2S           i2s1;           //xy=1219.8333740234375,310.66668701171875
    AudioAnalyzePeak         peak1;          //xy=1223,402
    AudioConnection          patchCord1(waveform1, 0, mixer1, 0);
    AudioConnection          patchCord2(mixer1, 0, i2s1, 0);
    AudioConnection          patchCord3(mixer1, 0, i2s1, 1);
    AudioConnection          patchCord4(mixer1, peak1);
    AudioControlSGTL5000     sgtl5000_1;     //xy=1229.3333129882812,241
    // GUItool: end automatically generated code
    
    
    void setup() {
      Serial.begin(115200);
      AudioMemory(15);
    
      waveform1.begin(WAVEFORM_SINE);
      waveform1.frequency(440.f);
      waveform1.amplitude(0.f);
    
      mixer1.gain(0,0.0f);
      mixer1.gain(1,0.0f);
      mixer1.gain(2,0.0f);
      mixer1.gain(3,0.0f);
    
      sgtl5000_1.enable();
      sgtl5000_1.lineOutLevel(13);
      sgtl5000_1.autoVolumeDisable();
      sgtl5000_1.audioProcessorDisable();
    
    }
    
    void loop() {
      static bool toggle = false;
      static float oscAmp = 0.f;
      delay(1000);
    
      Serial.println("Peak with osc Amplitude set to  : "+ String(oscAmp) + " => " + String(peak1.read(),8));
      
      toggle = (toggle)?0:1;
      oscAmp = (toggle)?0.1:0.0;
      
      waveform1.amplitude(oscAmp);
    }
    This looks strange (as the code for Mixer and Amp look very similar)...
    Let me know if anyone get an idea to investigate further. This ladder filter fixed freq background noise is a real pain...

    Lionel

  13. #88
    Senior Member
    Join Date
    Jul 2020
    Posts
    977
    You're results from peak1.read() are spurious unless you first check peak1.available().

    I've had a play with the example and I see only zeroes coming out - this is likely EMI on the rails therefore.

    I double checked by hooking my 'scope to the LRCLK1 and OUT1A I2S pins and confirmed all zeros are
    being sent.

    I couldn't hear anything on the headphone output other than very low level noise that I'd expect, but I did
    pick up some odd occasional glitches on the line out every few seconds, which seem to be ultrasonic:

    Click image for larger version. 

Name:	odd_glitch.png 
Views:	12 
Size:	24.4 KB 
ID:	24484

    This might be a red herring I suppose, perhaps some artifact of the SGTL5000 noise-shaping.

    I am wondering how you have your audio ground set up for listening to the line-out signals - there's
    plenty of scope for accidentally having a ground-loop which could explain the noise break-through.

  14. #89
    Senior Member
    Join Date
    Jul 2014
    Posts
    3,154
    Quote Originally Posted by lg87783 View Post
    Thanks Mark, this allowed me to do some more tests, and... here are my findings:
    Please stick with title of thread (comments on, issues with TD1.54b7) and create different thread for detailed discussion on your program implementation

  15. #90
    Junior Member
    Join Date
    Mar 2021
    Posts
    10
    OK WMXZ . Thanks to Mark I found the problem on my side. Not a problem related to ladder filter implementation (TD1.54b7).
    Apologies...

  16. #91
    Senior Member+ manitou's Avatar
    Join Date
    Jan 2013
    Posts
    2,623
    Updates for 1.54?

    fix T3/T4 randomSeed()

    add T4 slow PWM
    Last edited by manitou; 04-24-2021 at 12:52 PM.

  17. #92
    Quote Originally Posted by lg87783 View Post
    OK WMXZ . Thanks to Mark I found the problem on my side. Not a problem related to ladder filter implementation (TD1.54b7).
    Apologies...
    Were you able to find what your problem is?

  18. #93
    Teensy LC emu-EEPROM issue.

    defragster suggested I mention the problem with EEPROM Corruption on the Teensy LC.

    More information here:
    https://forum.pjrc.com/threads/67088...ration-Program

  19. #94
    Junior Member
    Join Date
    Oct 2017
    Posts
    7
    Hi, I'm having a problem uploading to a T4.1: After booting my PC I can usually program it fine once or twice. After that, Teensyloader can't reset the board and won't upload the sketch. I can observe that the orange and red leds on the Teensy shine at half brightness (or 50% duty cycle?) There also ist a light flicker in the red led. I have tried the 15s reset - which still works fine - but after that the Teensy still cannot be programmed.
    Can this be an issue with this beta (which I am using)?
    Can this type of issue stem from the contents of the sketch? I am trying to get TeensyThreads running for my purpose.

  20. #95
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,921
    Quote Originally Posted by steinerlein View Post
    Hi, I'm having a problem uploading to a T4.1: After booting my PC I can usually program it fine once or twice. After that, Teensyloader can't reset the board and won't upload the sketch. I can observe that the orange and red leds on the Teensy shine at half brightness (or 50% duty cycle?) There also ist a light flicker in the red led. I have tried the 15s reset - which still works fine - but after that the Teensy still cannot be programmed.
    Can this be an issue with this beta (which I am using)?
    Can this type of issue stem from the contents of the sketch? I am trying to get TeensyThreads running for my purpose.
    After a 15s Restore of the factory blink code - it takes a button press to program as it does not include USB.

    Generally failure like described is caused by bad code. Though Red bootloader LED and the Orange Pin==13 LED at the same time is odd soudning?

    After a 15s Restore cycle make a simple blink - perhaps adding Serial.print(millis()) when it blinks to see that work after a button press

    Then upload that same sketch multiple times to see it function as it should if cable and the computer USB are working right.

    Beta 7 of TD 1.54 has been out some time and working well in general if install not corrupted.

  21. #96
    Junior Member
    Join Date
    Oct 2017
    Posts
    7
    Thanks for your comment, I reinstalled the beta and it seems to be working fine now.

  22. #97
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    13,921
    Quote Originally Posted by steinerlein View Post
    Thanks for your comment, I reinstalled the beta and it seems to be working fine now.
    Great news!

  23. #98
    Senior Member
    Join Date
    Apr 2014
    Location
    Cheltenham, UK
    Posts
    197
    The IR Remote Library supplied in Teensduino is WAY out of date.
    The latest revision is 3.31, the one supplied in TeensyDuino is revision vs 2.23 dating from March 2017.

  24. #99
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    8,281
    Quote Originally Posted by BriComp View Post
    The IR Remote Library supplied in Teensduino is WAY out of date.
    The latest revision is 3.31, the one supplied in TeensyDuino is revision vs 2.23 dating from March 2017.
    Are there problems with it?

Posting Permissions

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