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

Thread: How many wavetable synths?

  1. #1
    Junior Member
    Join Date
    Jan 2019
    Location
    Coventry, UK
    Posts
    9

    How many wavetable synths?

    Newbie alert!

    Just starting out on the Teensy / Audio journey, so not entirely sure just how much of the audio processing is done by the Teensy and how much is done by the audio card.

    Anyway, what I'm trying to build is a simple synthesiser that will mimic a small street organ - probably limited to around 32 pipes plus a few percussion instruments. I was thinking about using the wavetable synth capability, and working out a way to manage the polyphony in my sketch.

    The bit of information that I can't find is how many wavetable synths can I use with a Teeny 3.2 / Audio card setup? The graphic designer tool seems to allow more than 8, which I'm surprised at - is it just that my expectations are set too low, or does the tool not check?


    Any help / advice welcome

    Mike

  2. #2
    Senior Member+ Theremingenieur's Avatar
    Join Date
    Feb 2014
    Location
    Colmar, France
    Posts
    2,161
    The audio shield does just the A/D and D/A conversion, all processing is done within the Teensy. There is no hard limit for the number of wave table objects, everything depends on the over all memory consumption of your code.
    Since the Teensys and the audio shield cost only a pocket money, I’d suggest that you simply start building your project step by step, first monophonic and than adding more polyphony tone by tone until you run into limits. Either you are happy with that or you upgrade to a Teensy 3.6 then.

  3. #3
    Junior Member
    Join Date
    Jan 2019
    Location
    Coventry, UK
    Posts
    9
    Thanks for the quick response. I'd sort of guessed from the audio shield data sheet that this is how it would work, but its good to get confirmation. I'm trying to get an idea of the polyphony requirements from the street organ forum, and I'll take it from there.

    I've got a number of potential projects using Teensys (or arduinos), so I'm sure that my 3.2 will find a good home if I need a faster one.

    Mike

  4. #4
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,209
    Usually the limiting factor for wavetable synth is Teensy's flash memory. Definitely go with Teensy 3.6 if you're going to do wavetable stuff, so you have 1M to store wavetable data. On Teensy 3.2, the 256K flash size just isn't enough for several good quality sounds.

  5. #5
    Junior Member
    Join Date
    Jan 2019
    Location
    Coventry, UK
    Posts
    9
    Hmm - the small street organs generally only have two types of pipes (although each is available at several pitches), so only a couple of wavetable files. I was hoping to get away with the 3.2, at least to start with. I'll have to talk to the financial manageress and wee how much pocket money I have left.

  6. #6
    Senior Member PaulStoffregen's Avatar
    Join Date
    Nov 2012
    Posts
    19,209
    On polyphony, I don't have an exact number for you. But I did try running the example from File > Examples > Audio > Synthesis > WaveTable > Zelda. While playing on a Teensy 3.6, the CPU usage fluctuates between 6% up to about 11.2%. While the code has 64 player objects, looking at the info near the end of Overworld.c, it looks like this tune is playing up to 8 notes simultaneously.

    The code compiles to 270044 bytes (25%) flash and uses 47884 bytes (18%) of the RAM.

    How this would scale up beyond 8 voices is a good question, but it's so far away from any of the hard limits that I'd imagine you could do many more voices.

    But the flash memory is a limiting factor. This example has 5 wavetables, and not all of them are great quality. The CPU & RAM usage are fairly lightweight. Larger flash memory is the main resource you'll want for wavetable synth.

  7. #7
    For a street organ you could use the same sample for many pipes and just play it back in different frequencies to fit into the flash memory. I have mixed over 32 samples on Teensy 3.6 @ 44kHz without issues with my own custom (not hand asm optimized) mixer code, but I would think the audio lib can handle it as well.

  8. #8
    Junior Member
    Join Date
    Jan 2019
    Location
    Coventry, UK
    Posts
    9
    That's good to know, thanks

Posting Permissions

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