Skip to content

A WAV player based on Teensy 4.0. Controller using Serial Input

License

Notifications You must be signed in to change notification settings

Nischay2312/TeensyWavPlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A WAV player based on Teensy 4.0. Controller using Serial Input.

Based on the Example Sketch: WAVFilePlayer from PJRC

Player in Action

Video Thumbnail

Components Used:

  1. Teensy 4.0
  2. 4 Ohm 3W Speaker
  3. Adafruit SD Card Breakout Board
  4. MAX98357A I2S Amplifier
  5. 16 GB MicroSD Card
  6. Basic electronic componets (jumper wires, soldering iron, breadboard, micro usb cable)

Connections:

  1. SD CARD:
    • Adafruit Board Pin   Teensy Pin
    •  CS          10
    •  DI           11
    •  DO          12
    •  CLK          13
    •  GND          GND
    •  5v          5V
  2. MAX98537A:
    • Amplifier Pin     Teensy Pin
    •  LRCLK          20
    •  BCLK          21
    •  DIN          7
    •  VDD          5V
    •  GND          GND
    •  Gain          GND
  3. Speaker connect to the I2S Amplifier Board Output. Polaity does not matter (at least for the ones that are linked above)

Setup + How to Use

  1. Flash the Arduino Sketch onto the teensy and open the serial monitor to view the output. If everything is correct then you will see the list of songs loaded in the root folder of the SD card as a list.
  2. To load music easily, I have made a simple python script. You can use this to quickly convert large batches of .WAV files into 44.1kHz .WAV files which are supported. Before using it, you need pydub module which can be done using this: pip install pydub. Also be sure to change the location of the Input and Output Folder. The script converts all the .WAV files from Input folder to 44.1kHz .WAV files and saves them in the Output folder.
  3. The controls are simple: Send 'h' to see the help text. Send l (lowercase L) to display the current 10 tracks. Send the number corresponding to the track (0-9) to play it. Send s to stop playing. Sending f selects the next 10 track and sending b selects the previous 10 tracks. Sending 'x' will toggle the Track Loop Feature. Once enabled, the track will play again if it is stopped. HOORAY ENDLESS MUSIC!!!!

About

A WAV player based on Teensy 4.0. Controller using Serial Input

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published