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

Thread: Audio shield for mallet controller

  1. #1
    Junior Member
    Join Date
    Jun 2017
    Posts
    3

    Audio shield for mallet controller

    Hi,
    I built a midi malletcontroller using a teensy 3.5 which works nicely (teensy rules)
    I am considering adding "onboard" sounds for it, at least for playing the traditonal mallet instruments
    Could the audioshield be used for that?
    I am a bit worried that loading the wav files from sd card will add too much latency, since it is a polyphonic instrument

  2. #2
    Member
    Join Date
    Nov 2012
    Location
    Olympia, WA
    Posts
    52
    Quote Originally Posted by remcoh View Post
    Hi,
    I built a midi malletcontroller using a teensy 3.5 which works nicely (teensy rules)
    I am considering adding "onboard" sounds for it, at least for playing the traditonal mallet instruments
    Could the audioshield be used for that?
    I am a bit worried that loading the wav files from sd card will add too much latency, since it is a polyphonic instrument
    This may be pedantic, but...I'd use the SD card slot on the 2.5 rather than the one on the audio shield because it has a wider/faster interface to the SD card, decreasing latency and increasing speed. I have not seen .WAV playback benchmarking for 3.5 and 3.6, but playing .WAV files off the audio shield SD interface, in my experience (Teensy 3.2), has fairly low polyphony (playing 3 simultaneous notes occasionally produces crackles). Serial flash is another avenue, but really I'd try it with the 3.5 SD slot first and see if it works well enough for you.

    https://forum.pjrc.com/threads/28860...ny-is-too-many

  3. #3
    Senior Member oddson's Avatar
    Join Date
    Feb 2013
    Location
    Isle in the Salish Sea
    Posts
    1,096
    Not just polyphonic but massively so for metalophones that can ring for ages.

    I think you would need proper note management to pull off anything convincing, as you need to steal notes and handle retriggers of ringing notes.

    To my knowledge there is no de facto standard way to do this in Teensyduino but I've not been following synth projects here lately so I may be mistaken on this.

    I think the faster boards would be more than capable of playing a sufficient number of voices if the software can steal voices effectively.

  4. #4
    Member
    Join Date
    Nov 2012
    Location
    Olympia, WA
    Posts
    52
    Good points, Oddson. Additionally...Although I didn't try too many cards, speed is dependent on type of card...in the words of Paul, from https://forum.pjrc.com/threads/25557...-audio-sampler

    Use AudioProcessorUsage() to discover the worst case CPU usage as you try running more play objects concurrently. When you approach 80 to 90%, you're at the limit....

    Not all SD cards are created equal. The speed class is usually meaningless. Sandisk Ultra cards are often much better than cheap no-name ones, or the many counterfeits that claim to be Sandisk, but obviously aren't.... buyer beware.

    When you try this, please post here with your results and which cards you tried. I'm sure others will find it really helpful.

Posting Permissions

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