Teensy 3.6 Based Sound Board

Status
Not open for further replies.

EADG

New member
Hi all, new to the forum and looking for some advice on a project.

Basically, I'm trying to make a sound board/sample player for a friend that reads the audio sample form an SD card using a Teensy 3.6.

I'd like the audio to be stored on the SD card as either WAV or potentially RAW as it seems lower latency when playing (also tell me if I'm wrong). Having folders on the SD as banks is an ideal, so you can scroll through the banks, and once selected, the sounds from each bank would map to the buttons for playback. The sound board is designed to have a square of 16 arcade buttons, each with an independent sound mapped to them from the SD card, and endless encoder with momentary push button to scroll through and select banks and a master volume which will control a small external amp circuit and not control the sound on the teensy. To complicate things, I'm trying to use a small 16x2 character LCD screen to display the name of the banks as they are on the SD card to show what is currently loaded and aid in changing banks. I'm not looking at particularly long files, music or loops, just simple one shots e.g. drums.

I'm really looking for an opinion as to whether this is doable, and predominantly any advice on where to begin, especially with reading audio and file names from an SD card. I have some basic knowledge of Arduino code, but its mostly been hardware control based with some minor MIDI controlled solenoid projects, not as intensely code based.

Cheers

EADG
 
Yes it is all possible on a Teensy 3.6 though it will likely take a bit of programming to get everything right. I would suggest doing it in stages (i.e. just play a single sound from the SD, and then add a few selections). From a user input setup, a 16x2 LCD would be fairly cramped. I would look around for libraries to do the menu stuff.

I don't recall what the limit is for Teensy 3.6 for number of separate sound mixtures. If you haven't bought the Teensy yet, I would suggest getting the Teensy 4.1 instead as it has more memory and the processor runs faster.

In terms of setup, the easiest solution is to get the Teensy Audio Adapter (https://www.pjrc.com/store/teensy3_audio.html). You want revision C for the Teensy 3.6 and revision D for the Teensy 4.1). You will need to do some minor soldering to attach the audio board. The audio board has two different outputs: It has a headphone jack with a standard TRS plug and stereo line-level output that you would need to feed into amplified speakers.

One problem is the examples have not been modified to support the Teensy 4.0/4.1 which uses a different pin out. This is mostly for accessing the SD card (either the SD card on the audio adapter or the SD built-in to the Teensy 3.5, 3.6, or 4.1). This also affects if you use SPI to control the display, as 2 of the 3 SPI pins are different:
  • Teensy 3.x using audio adapter SD card: MOSI = pin 7, MISO = pin 12, SCLK = pin 14, SD card = pin 10;
  • Teensy 3.x using audio adapter SD card: MOSI = pin 7, MISO = pin 12, SCLK = pin 14, SD card = pin BUILTIN_SDCARD;
  • Teensy 4.x using audio adapter SD card: MOSI = pin 11, MISO = pin 12, SCLK = pin 13, SD card = pin 10;
  • Teensy 4.x using audio adapter SD card: MOSI = pin 11, MISO = pin 12, SCLK = pin 13, SD card = pin BUILTIN_SDCARD;

The built-in SD card reader on the Teensy 3.5, 3.6 and 4.1 is faster than the SD card reader on the audio adapter. It helps to good quality SD cards. Before the 1.54 beta, you would be typically limited to 32GB SDcards or smaller. With the current 1.54 beta 8 software, you can now use larger cards.

The audio adapter has an area that you can solder in a flash memory (usually 8 megabytes) that is faster to access than the SD card, but at the moment you are restricted to RAW files only. Likewise the Teensy 4.1 has two sets of solder pads underneath. One is typically used for PSram which acts as slower memory and each power cycle erases it. The other pad can be used for either a second PSram chip or a flash chip that keeps its content between power cycles.

If you don't want to get the audio adapter, on the Teensy 3.6, you can use the two DAC pins (digital to analog) and hook these up to powered speakers. However, this only gives you 12-bit sound instead of 16-bit sound.

Please listen to the audio tutorial (https://www.pjrc.com/teensy/td_libs_Audio.html). It was originally done with the Teensy 3.2, but it should apply to the Teensy 3.6 (and 4.1 with pin modifications).
 
Status
Not open for further replies.
Back
Top