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

Thread: teensy 4 audiomemory maximum delay is about 2.5seconds

  1. #1
    Junior Member
    Join Date
    Jan 2020
    Posts
    17

    teensy 4 audiomemory maximum delay is about 2.5seconds

    Hi,
    I'm working on an effects unit with the teensy4.

    I see this fairly recent commit by Paul that should allow delays up to 4 seconds.

    https://github.com/PaulStoffregen/Au...c989f4259465de

    I set AudioMemory(1300), which should give me 3.9s of delay. When the program starts and delay is set to 0, the memory usage reported by AudioMemoryUsageMax() is 18.

    As I increase the length of the delay the sound starts going wrong about 2.5s. I'm also monitoring AudioMemoryUsageMax(), which tops out at 896 at this point.

    Any ideas what's happening? Code is here: https://github.com/mattvenn/teensy-audio-fx

    I'm using platformio with following version:

    teensy @ 4.7.0
    framework-arduinoteensy @ 1.149.

  2. #2
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,363
    Can you reproduce the problem with Arduino 1.8.11 and Teensyduino 1.50?

  3. #3
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    Hi Paul, thanks for the reply.
    Yes I can reproduce it with those versions.

    Click image for larger version. 

Name:	Screenshot from 2020-02-12 10-00-42.jpg 
Views:	16 
Size:	181.8 KB 
ID:	19043

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,363
    Can you help me to reproduce it in Arduino? Please post that test program here on a forum message, so I can just copy it into Arduino and upload to a Teensy here to reproduce the issue.

    I did look briefly at your github link. But it is many files. I looked at several files but did not see any which look the same as the code in this screenshot.

    Please post (here on the forum) the exact code I should try in Arduino, so when I look into this I can recreate the problem quickly without guesswork.

  5. #5
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    sorry, should have attached it before.
    teensy-delay-test.ino

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    21,363
    Ok, I've put this on my list of issues to investigate. I can't promise I'll get to it quickly, but it is on the list so I won't forget.

  7. #7
    Junior Member
    Join Date
    Jan 2020
    Posts
    17
    no problem. I actually thought I was more likely to be me doing something wrong. Would you prefer I open an issue on github?

  8. #8
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,228
    Try changing the mixer1 amplitudes to this:
    Code:
      mixer1.gain(0,0.5);
      mixer1.gain(1,0.5);
    so that the total gain through the mixer is 1.

    Pete

Posting Permissions

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