Bad audio quality using teensy 4.0 and audio shield rev D

Hello, I am trying to set up a teensy to play some audio on a speaker. I have soldered the teensy board to the audio shield and am using an aux cable connected currently to a set of headphones to play music. When I try to play something across it however, the quality is very choppy and noisy. I thought it would be an easy fix, but currently I am at the point thinking I have tried everything. I could really use some advice.

The things I have tried and found are (all resulting in the same problem):
- Setup a completely different teensy 4.0 + audio shield
- Use different speaker
- Use laptop as power source
- Use psu as power source
- Disconnect all other cables from teensy
- Bypass aux cable by connecting directly to the pads on the shield
- Use synthesizer example sketch
- Use sd wav player example sketch

Listen to the recording of the guitar synthesis here:

I am attaching some images of my setup.
 

Attachments

  • PXL_20240827_172831727.jpg
    PXL_20240827_172831727.jpg
    156.2 KB · Views: 18
  • PXL_20240827_172823098.jpg
    PXL_20240827_172823098.jpg
    146.6 KB · Views: 20
Ok, 5 minutes later i have solved it ;)

When uploading the sketch I used some "tweaks" which enabled "bigger blocks (256 samples)" I was told this would improve something... I dont know what but just assumed it was good. Apparently it resulted in horrible audio.

Maybe this will help somebody in the future.
 
Last edited:
The "bigger blocks tweak" is mine, and very specifically for the Audio Guestbook sketch. See discussion starting here for details, though note you'll have to read a lot of posts to find a link to the latest version. The bigger blocks were needed to help recording on slower SD cards, but that broke the standard library's playback (as you've discovered), so I also had to supply a copy of the playback code which could cope with the bigger blocks.

If you have what you need all is good. If you run into any more issues, you could give my improved recording / playback code a try - see this thread for the discussion on that...
 
Unfortunately the guestbook is a bit of an "all or nothing" sketch - leaving stuff out is harder than it should be, and you have to assemble the kit of parts properly, too! It doesn't help that the originator appears to have zero interest in his creation - there are currently 97 open issues on that repository 🤬
 
I have soldered the teensy board to the audio shield and am using an aux cable connected currently to a set of headphones to play music.
I hope you have connected headphones to the headphone output of the Audio adapter... Its the only output capable of driving a heavy load like that.

Conversely if you want to pass a signal to an amplifier or other audio input, _never_ use the headphone output, its only for headphones as its 'ground' is synthesized at mid-rail and is not true ground. Line outs are what you use then.
 
Yeah, and tbh I wasn't too worried that I did something wrong. I am quite familiar with these things, but really started to doubt myself after 2 days of struggling.
 
I hope you have connected headphones to the headphone output of the Audio adapter... Its the only output capable of driving a heavy load like that.

Conversely if you want to pass a signal to an amplifier or other audio input, _never_ use the headphone output, its only for headphones as its 'ground' is synthesized at mid-rail and is not true ground. Line outs are what you use then.
thats a good suggestion, i am not using an amp currently but ill keep this in mind for future projects
 
Back
Top