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

Thread: SD Card WAV Files Analyze

  1. #1
    Junior Member
    Join Date
    Sep 2017
    Posts
    8

    SD Card WAV Files Analyze

    Hello Guys
    I'm new to Teensy. Im currently using Teensy 3.2 with mini sd adaptor. What im asking is inside the SD card, it has directories.
    Let's assume it has 5 directories called FILE1, FILE2, FILE3, FILE4 and FILE5. Also inside each directories it has .WAV files as Test1.wav, Test2.wav and Test3.wav
    I need to analyze the FFT of each Test.wav files of each directories automatically. When the Teensy powered up it should navigate through each directories and print the FFT results on serial.
    Guys i know it not a big deal. But please somebody suggest me how to do this. If there are example codes highly appreciated.

    Thank you

  2. #2
    Junior Member
    Join Date
    Oct 2015
    Posts
    14
    I don't know anything about FFT, but there is a "listfile" example provided with the SD library which does the equivalent of a unix "find" command on the SD card. That should show you how to list directories and files in a directory.

  3. #3
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    18,153
    Yes, start with the SD lib listfiles example.

    In the audio library tutorial for FFT you can find code which analyzes the content of a WAV file. First, edit that code to open one of your files in its subdirectory. Then edit the code to do more than 1 file.

    Once that is working, perhaps try merging the listfiles code with the FFT tutorial, so it analyzes the list of files instead of the fixed names.

    If you get stuck, we can try to help. Just remember the "Forum Rule". We can help much more when you post the complete code and give us clear details about what you are doing and what results you're actually seeing.

Posting Permissions

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