Is it even possible to do what I'm trying with Audio Tools and an ESP32 Audio dev kit? #2191
-
I'm not asking for a full assist, but I would love to know, first of all: Is what I'm trying to do even possible with the ESP32 A1s? Or am I barking up the wrong tree (module)? I've been going through the wiki and examples and it always feels like I'm very close but something isn't clicking. I've been scratching my head for the last week or so trying to get a working sketch of a basic four track recorder. I have a working sketch for recording one good .wav file to SD, with a solid sound. What I've been trying to find is a way to mix up to three already-recorded .wav files, and ideally a live monitor of the mic input, to a headphone out. While also recording the new fourth track to SD. I've had a little luck getting everything working, but it sounded awful. Live monitoring, while recording (to memory), has worked fine in other sketches. My thinking now is that it might be best to load the existing tracks (for instance track_1.wav, track_2.wav) into memory, and then stream that to headphones, mixing in the split from the mic, and send that memory stream to headphones, where it is thrown away as soon as it's heard. this way nothing is writing or reading from the SD card, while recording, other than the track_3.wav that we are recording straight to SD. That seems more likely than trying to read the first two files off the SD, while recording to it at the same time. The trick would be, is that possible? And can the tracks stay in sync? Sorry for the long post/question. And thanks for any advice or wiki topics to research. Here is my current working sketch for recording one track, no playback:
Is this a reasonable foundation to build on, if it's possible, or am I misunderstanding something basic? here is my failed attempt to build the full sketch:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Microcontrollers are slow and have only a limited amout of memory. So the challange is always to make things fit with the available memory and computing resources! Build you sketch in several steps and test each step speparatly. I would start with a simple mixing of files to figure out the max sample rate (using files vs PSRAM vs PROGMEM) A couple of hints:
|
Beta Was this translation helpful? Give feedback.
Microcontrollers are slow and have only a limited amout of memory. So the challange is always to make things fit with the available memory and computing resources!
Build you sketch in several steps and test each step speparatly. I would start with a simple mixing of files to figure out the max sample rate (using files vs PSRAM vs PROGMEM)
A couple of hints: