Getting started with generated audio
Posted: Mon Sep 21, 2020 8:20 pm
I've been using the ESP32 via the Arduino software for a while (ported an existing codebase from another Arduino board), and have some questions on how to start doing some audio generation within my overall design. These are "ADF newbie" questions.
I'm using the Adafruit Feather Huzzah32, and ideally would stay with that platform, since I've got a bunch, and understand it pretty well. I'd like to do mostly generative audio instead of playback of recorded sounds, but may move to some playback as needed - short samples. I'm basically adding motor sounds and the like to simple toys, so I could imagine having a quick canned sample for the motor start-up, then do the engine idle, rev., etc. via generative. These should be battery powered, and small.
My questions:
(1) I'm assuming the best approach is a i2s card and hook it to the feather. Then hook that to a small speaker. Issues? The Adafruit stereo board (UDA1334A) seems reasonable for this, or their mono (MAX98357A) which is sold out...
(2) I'll mostly do mono, but could imagine going to 2, or at most 4, speakers. If I am doing 4 speakers, is that 2 i2s connections, or does each i2s support only one speaker?
(3) For this type of application, should I be using ADF, or is generated audio not really the right fit for this? And will ADF force me to move to the IDF instead of the Arduino flow?
(4) If generative audio works within ADF, is there a good example to start from?
Thanks!
I'm using the Adafruit Feather Huzzah32, and ideally would stay with that platform, since I've got a bunch, and understand it pretty well. I'd like to do mostly generative audio instead of playback of recorded sounds, but may move to some playback as needed - short samples. I'm basically adding motor sounds and the like to simple toys, so I could imagine having a quick canned sample for the motor start-up, then do the engine idle, rev., etc. via generative. These should be battery powered, and small.
My questions:
(1) I'm assuming the best approach is a i2s card and hook it to the feather. Then hook that to a small speaker. Issues? The Adafruit stereo board (UDA1334A) seems reasonable for this, or their mono (MAX98357A) which is sold out...
(2) I'll mostly do mono, but could imagine going to 2, or at most 4, speakers. If I am doing 4 speakers, is that 2 i2s connections, or does each i2s support only one speaker?
(3) For this type of application, should I be using ADF, or is generated audio not really the right fit for this? And will ADF force me to move to the IDF instead of the Arduino flow?
(4) If generative audio works within ADF, is there a good example to start from?
Thanks!