r/arduino•
Cashan

What do i need for an "Adaptive Soundtrack Board"?

Hardware Help

Hello,

i would like to do a project that involves a board that can do following:

  • Audio (Stereo) output
  • Library support (SD Card) with mp3 or other soundfiles
  • Be able to play multiple soundfiles with different volume
  • Volume control for all soundfiles (3 for example)
  • maybe some kind of interface to control what files are loaded.

i want to be able to play in an Pen and Paper group, while i'm the Gamemaster i want to have control over the ambient sound. Like "Adaptive Soundtrack" in games, i want to be able to change the sound on the fly and be able to choose some presets (like Forest with 1. ambient 2. mysterious 3. Battle soundtrack, that can fade between each other).

I would like to know what kind of arduino is capable of this (for example is Arduino uno enough?) and what moduls/shields are recommend. I use bose Soundlink 2 for Audio Output, is it possible to use Bluetooth?

I found some moduls so far:

  • MAX9744 - Stereo 20W Class D Audio Amplifier (what means Class D?)
  • VS1053 MicroSD Breakout (i think this is exactly what i need, but i'm not sure)
  • Troyka Module - Slider (for volume control, i bet there are cheaper options)

Step 1: What components are useful and why? (What options are there?)

Step 2: Try a basic program with like 2 or 3 soundchannels

Step 3: Presets or complex soundfile chooser.

​

My Skills:

Basic in c++

extended knowlegde in VBA and LabVIEW

Posted Nov 22, 2019, 8:44 PM UTC

26
treddit22•

You probably already have a device in your pocket that can do all that. Why do need to involve an Arduino?

Arduino is a microcontroller platform, it's not designed for audio, and an Arduino UNO is definitely not up for the task.

That being said, there are people that managed to do pretty impressive things using the UNO's limited resources, and there are Arduino-compatible Teensy boards that have good audio support.

1
CashanOP•

if you mean my Smartphone, i would say no. I cant do Adaptive Soundtrack with that.

I would like to do something with microcontroller, thats why i asks what hardware is capable.

I didnt know that Uno isn't up for the task, so a teensy board is a standalone or an expansion shield card?

1
treddit22•

A simple microcontroller is not going to beat a modern smartphone when it comes to audio. The DACs in a smartphone are simply better than most DIY solutions, and it has much more processing power and memory for decoding and mixing.

Teensy is a brand of powerful 32-bit ARM microcontrollers. They can be programmed using the Arduino IDE, just like a "normal" Arduino.

Teensy 3 and 4 have I2S and TDM hardware peripherals with DMA, which is a must if you want reliable audio. You can hook them up to an I2S DAC, there's an audio shield with I2S DAC available. Alternatively, you can use the built-in DACs, but they are only 12 bit IIRC, so the audio quality will not be great.

3
CashanOP•

So i should use something like an Raspberry (i have a zero, 1A+ and 3B)?

Dos a audio shield have a similar quality like an raspberry? Should i search for an teensy audio shield? Or doesnt it matter?

1
treddit22•

The DAC on my RPi 2B+ was to be pretty noisy, so I used a USB DAC or audio over HDMI for audio. It's probably better on the 3B, but I don't know.

If you have some Linux and Python skills, RPi is going to be a bit easier than programming a Teensy in C++, but the Teensy Audio library does an outstanding job abstracting away the hard parts.

The Teensy audio shield has pretty good quality. Unless you're listening on expensive speakers/headphones, you probably won't hear a difference compared to a computer or phone.

If you Google for "Teensy Audio library" you'll find a video with demos and more information. You don't have to use a Teensy Audio shield, most other I2S DACs will work as well.

2