A WAV player based on Teensy 4.0. Controller using Serial Input.
Based on the Example Sketch: WAVFilePlayer from PJRC
- Teensy 4.0
- 4 Ohm 3W Speaker
- Adafruit SD Card Breakout Board
- MAX98357A I2S Amplifier
- 16 GB MicroSD Card
- Basic electronic componets (jumper wires, soldering iron, breadboard, micro usb cable)
- SD CARD:
- Adafruit Board Pin Teensy Pin
- CS 10
- DI 11
- DO 12
- CLK 13
- GND GND
- 5v 5V
- MAX98537A:
- Amplifier Pin Teensy Pin
- LRCLK 20
- BCLK 21
- DIN 7
- VDD 5V
- GND GND
- Gain GND
- Speaker connect to the I2S Amplifier Board Output. Polaity does not matter (at least for the ones that are linked above)
- 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.
- 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. - 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. Sends
to stop playing. Sendingf
selects the next 10 track and sendingb
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!!!!