Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 7 of 7

Thread: Audio board or no Audio board?

  1. #1

    Audio board or no Audio board?

    Greetings,
    I have built a 65 button midi controller and I want to add audio out. I have been checking out the Teensy audio library and there are some basics I am not understanding.
    For my application I want to be able to
    a. Generate audio waves at given frequencies
    b. Change the amplitude of the waves
    c. Change the frequency (pitch bend) that wave
    d. Stop the waves
    I would like to be polyphonic up to 10 notes or so. I am thinking I want to generate a simple sawtooth wave for now.
    What is the advantage of the audio adapter board? Is it more of a breakout board or does it have additional DAC resources beyond what comes on the Teensy 3.6 that will actually come in handy for my application? If I do not need it, how do I change the audio library examples to use the 3.6 for tone generation?

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,278
    Since the Teensy's internal DAC(s) and ADCs have only useable 12bit resolution (even when you select higher resolution, the finer "bits" will mostly contain noise), people looking for more Hifi-like audio quality use the audio shield which contains (as everybody can see in the schematic on the corresponding PJRC website) a higher quality audio codec with 16bit audio ADCs and DACs, plus a headphone amp, plus a mic preamp, plus a SD card slot (only useful for T 3.2, while T3.5 and 3.6 have a quicker SDIO interface on board), plus a space which allows adding optionally a RAM or Flash chip to increase memory, either for effects like delay or for storing additional wave tables.

    The audio library offers you (after thorough study of the documentation and using the hints in the online design tool) always the choice to use either the internal ADCs and DACs or an external codec like the one which is on the audio shield but not only. A closer look will show you that there is support for many output and control objects and protocols. Thus, using the audio library does not require using the audio shield. Just read here: https://www.pjrc.com/teensy/td_libs_Audio.html

  3. #3
    Senior Member+ Frank B's Avatar
    Join Date
    Apr 2014
    Location
    Germany NRW
    Posts
    5,426
    In addition the low cost$ of the board are not worth thinking about it... if you do audio, and have the needed pins available, add it.

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,529
    The built in 12 bit DAC sounds pretty good for many types of sounds. For 10 simultaneous waveforms mixed together, if some will have fairly low amplitude compared to the others, then you probably want to step up to full 16 bit resolution to faithfully reproduce those very subtle sounds while also in the presence of the much louder ones. If there isn't a large dynamic range in the amplitudes of all your notes, and if you're happy with moderate sound quality (about on par with the better cassette tapes) then 12 bits might be ok.

    Quote Originally Posted by colorado_hick View Post
    how do I change the audio library examples to use the 3.6 for tone generation?
    Just select Teensy 3.6 in Arduino's Tools > Boards menu. All the audio library stuff works on Teensy 3.6.

  5. #5
    Lots of great info, much appreciated!

    Another basic thing that I am confused about, the audio board has a pinout and it is not using all of the pins on the teensy. But if you solder it up with the header pins then it seems to me that those spots on the teensy will no longer be available. How does one generally going about accessing, say pin 0 or 1 or 5 on the teensy board once the audio shield has been attached?

  6. #6
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    7,814
    Idea's with double/tall headers here : teensy3_audio.html

    To breadboard or proto board or other. Unused pins soldering is optional - but they do not connect and function is not impared if connected.

  7. #7
    It is for the actual application (not breadboarding), I was planning on soldering the wires from my switch matrix directly to the teensy board im not sure how to do that if I use the audio board and the headers. Do I try and cut the header pins out of the way for the spots that the audio board doesnt need? How would the double / tall header help me? Maybe I could get sockets (female / female) that I can attach my wires to that would fit on top of the tall pins after they had gone through the audio board? That would be cool because I could unplug the board if I wanted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •