Self Contained Synth

Status
Not open for further replies.

JimmyD

Member
Hello,

Is it possible to use the Teensy alone or with something else to have it been a self contained instrument. Such as a pedal board that would trigger bass mp3 or wav files.

Basically press a button and a sound plays and can be connected to an external speaker. And would the usb be the power source using maybe a cell phone charger?

Thanks, I'm a bit new to this.
 
Yes. You can do it with either the Audio Shield, LC Prop Shield, or Prop Shield with motion sensors.

The Audio Shield gives you stereo output to either headphones or speakers. You would store the mp3/wav files on the micro-SD card. Here is the tutorial on the Audio Shield that goes into great details: http://www.pjrc.com/teensy/td_libs_Audio.html.

The two Prop Shields gives you mono output to a speaker. The prop shield has a 2 watt amplifier, so you can connect a speaker directly. Instead of a micro-SD card, there is 8 megabytes of flash memory to hold the files. This page discusses the features of the two prop shields: http://www.pjrc.com/store/prop_shield.html.

You power all 3 off of USB power, though you are limited in sound volume by USB power.
 
Yes. You can do it with either the Audio Shield, LC Prop Shield, or Prop Shield with motion sensors.

The Audio Shield gives you stereo output to either headphones or speakers. You would store the mp3/wav files on the micro-SD card. Here is the tutorial on the Audio Shield that goes into great details: http://www.pjrc.com/teensy/td_libs_Audio.html.

The two Prop Shields gives you mono output to a speaker. The prop shield has a 2 watt amplifier, so you can connect a speaker directly. Instead of a micro-SD card, there is 8 megabytes of flash memory to hold the files. This page discusses the features of the two prop shields: http://www.pjrc.com/store/prop_shield.html.

You power all 3 off of USB power, though you are limited in sound volume by USB power.

Well, you explained it very well. But this is past my ability at this time. Thank you very much for your reply!
 
That's why it is important to explain the context of your question.

If you just want to press a button and have a sound play, and not deal with programming the Teensy, a simpler approach is to get an Audio FX board from Adafruit that plays OGG and WAV files (not MP3). Note, due to component failures, Adafruit does not sell an integrated unit that includes the amplifier along with the sound board. So, you would either need an Audio FX with headphone output, and use a headphone speaker that includes an amplifier or use a separate amplifier.

For example, if you buy:

You would first use a USB cable to connect the Audio FX board to the computer. It should provide a mountable drive. Copy a WAV file to that drive with the name T00.WAV. Then remove the Audio FX board from the computer.

Using a USB charger to power the unit, plug in the speaker and turn it on, and hook one connector of the button to ground, and another to the pin labeled #0 on the Adafruit Audio FX board. When you push the button it should play the sound. There are various options to hook different sounds up to different buttons, play a sound that loops, play a sound that latches until you hit the button again, play a random sound, play the next sound, etc. Read the instructions for more details: https://learn.adafruit.com/adafruit-audio-fx-sound-board.

Note, if you plug in the Speaker to the same USB charger as the Audio FX board, and have them all close together, you will get some audio feedback. If you separate the speaker and Audio FX board, it will eliminate it (or at least reduce it). When I was using it, I tended to run the speaker on battery, so I could keep things all together.

An alternative unit would be the DFPlayer: http://www.dfrobot.com/wiki/index.php/DFPlayer_Mini_SKU:DFR0299

The code for playing a sound based on a button being pressed is fairly simple in the Teensy using either the Sound Shield or Prop Shield, as most of the details is in the libraries. I can probably post code, if you wanted to use the Teensy.
 
Last edited:
You're right I should have been more specific, I apologize. That is close to what I am looking to do. Basically I want to make a Bass Pedal like this,. So minimally 12 pedals, in my case I will just use momentary switches. Right now I have made my pedal with the teensy 2.0 as a midi controller. Bass vst programs are minimally $100. So I want to record a live bass for each button/note to make my own VST. Then I want it to plug into a bass guitar amp. I want to more or less play bass with my feet while I play guitar.
The adafruit deff looks promising.

Thank you for your patience.
 
The audio kit (an audio board connected to Teensy3) would be the platform to get this done... and it is powered by a single USB power source and its output should be able to provide 'instrument' levels to a bass amp.

However, there's a lot more to building a proper 'rompler' playback device than just triggering set length .wav files when the pedal goes down.... but if that's all you want it should not be very difficult.
 
Is the Teensy 3 any different than the 2 as far as how to code? Yeah I pretty much just want to trigger a sample when I hit a button with my foot, no velocity just sample. I think my biggest struggle will be actually playing it lol
 
At the library level, the two are pretty similar. The core Arduino library works on both systems, but the Teensy 2 is not getting any new active development these days.

There are a bunch of differences under the covers, due to the Teensy 2/2++ using an AVR 32u4 processor, and the Teensy 3.x which uses an Arm Cortex M4 processor. For audio stuff, you don't want to use the Teensy LC, since that is an Arm Cortext M0 processor, and it is fairly stripped down (in particular, the audio library uses Arm Cortex M4 features).

The pin layouts are different between the two, so you will need to change the wiring and pin numbers.

The Teensy 2/2++ runs at 5 volts, while the Teensy 3.x/LC runs at 3.3 volts. This means that anything you connect to the Teensy has to be able to run at 3.3v or you have to do voltage level conversion.

The Adafruit Audio FX board will run at either voltage.
 
Teensy 3.x is programmed using Arduino, pretty much the same as Teensy 2.0, and very similar to regular Arduino boards.

But with Teensy 3.2, you can use the Teensy Audio Library. If you're not familiar with it, I highly recommend watching the 48 minute tutorial walkthrough video.


There's a printed manual for the tutorial, and even a (somewhat expensive) complete kit with all the tutorial hardware pre-built. Both are here:

http://www.pjrc.com/store/audio_tutorial_kit.html

The audio lib has a lot more capabilities not shown in this video and not written in the tutorial. You use the design tool to discover them and find info about how they work. Playing sound samples from the serial flash memory chip is probably the one you'd be most interested in using.

While your needs sound pretty basic, if you later decide to add more features like velocity or effects, the audio library has a lot of great capabilities you can use when/if you need more. That's the main thing which sets it apart from a lot of products on the market which have a simple feature set and can't be expanded to do far more creative things.
 
Thank you. That's all good to know! I've mentioned before I'm very new to all of this and programming IS another language so all the little bits of help are very appreciated.
 
Status
Not open for further replies.
Back
Top