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

Thread: 4.1 w/Audio Shield... sdCardTest reads card, but audio comes out garbled.

  1. #1
    Junior Member
    Join Date
    Dec 2020
    Ocala, Florida, USA

    4.1 w/Audio Shield... sdCardTest reads card, but audio comes out garbled.

    I'm using a 4.1 board with a 4.0 Audio Shield attached.
    I've been able to get good output from the AS (audio shield) in outputting a tone (from an audio example).
    I have a known-good SD card that that contains the 4 "SDTEST#.WAV" files and the .wav's play fine on my MP3 player.
    When I run the SdCardTest.ino, the Serial Monitor gives me the following:

    SD Card Test
    SD card is connected :-)
    Card type is SDHC
    File system space is 31574.98 Mbytes.
    SD library is able to access the filesystem

    Reading SDTEST1.WAV:
    Overall speed = 0.75 Mbyte/sec
    Worst block time = 1.31 ms
    45.26% of audio frame time

    Reading SDTEST1.WAV & SDTEST2.WAV:
    Overall speed = 0.45 Mbyte/sec
    Worst block time = 3.52 ms
    121.46% of audio frame time

    and so on for all 4 waves...
    the audio that comes out is just a series of random high pitched notes, certainly not the music within the .wav files.
    can anyone help me with this?
    thank you in advance,
    Russ from Ocala, Florida, USA

  2. #2
    Junior Member
    Join Date
    Dec 2020
    Ocala, Florida, USA
    Ok, so, come to find out that the EXAMPLE program was the culprit. other examples that read from the SD card worked and played the files as they should...
    BUTT <-- the big but
    I am getting a tone (the note "F" below A440) in the background when the .wav's play.
    when I play the "Hardware_Test.ino" example, the "beeps" play clean without that background tone.
    Russ from Ocala, FLorida, USA

  3. #3
    Junior Member
    Join Date
    Feb 2022
    The SD card on the audio board is slower than the built in SD card on the Teensy 4.1 which is using SDIO.
    It is explained in this post:

    Access to T4.1 Sd card is faster (it uses 4-bit parallel SDIO protocol, while AudioAdapter user 1-bit SPI protocol)
    Analog input on Teensy are independent from Audio I/O of Audio Adapter
    yes you can use both SD Cards (T4.1 and AudioAdapter). only access speed is different (see above)

    Also I think in order for people to help you with your issue you might consider copy and pasting the code you are actually using in your post.
    I've also seen people post pictures of their setup and it was determined long wires were causing all sorts of weird issues so it's also important to mention of you have the Teensy connected to the shield with a connector or via a breadboard or wires.
    I'm not good enough to debug your code but I've seen a couple of forum members actually take the time to do that and find errors in the code.
    I myself am still trying to get my Teensy 4.0 up and running and in order to actually get the speed I want I decided to solder an SD adapter to the pads on the
    Teensy 4 which it would of course have been easier to buy a Teensy 4.1.
    I think I did manage at some point to get the example files to pay on my Teensy without any issues.

Posting Permissions

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