Suggestions please for an enhanced audio player #257
-
I'd like to create an enhanced audio player and I'd welcome any suggestions. It would be a development of the SD->MP3->Mixer->I2S pipeline but with some specific requirements. I already have a basic player working on ESP32 + MAX98357 with 4 input streams.
Any thoughts or advice would be very welcome. Thank you for such a useful library. So many possibilities ! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
A couple of comments:
|
Beta Was this translation helpful? Give feedback.
-
Thank you Phil. By 'speed up' I was thinking about e.g. a steam engine, and changing the sample 'speed' to match the engine's speed. I think resampling would be like speeding up a tape, which would result in a pitch change (the 'mickey mouse' effect, or nitrous oxide gas!). They would likely be limits to dropping samples, after which the sound quality would be affected, but it would reduce the number of source files required. But I can experiment with this. I'll also experiment with manipulating the mixer's streams and weights vectors at runtime. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
I've added a couple of methods to the InputMixer class (addAt() and remove()) which manipulate the streams and weights vectors. This works fine and I can add and remove streams at runtime. There is a brief 'splat' artefact when removing the last stream or calling the end() method, but my project would always have at least one looped stream running and I can reduce the volume to 0.0 if required. My test pipeline is: 4x SineWaveGenerator -> mixer -> volume control -> I2S |
Beta Was this translation helpful? Give feedback.
-
You could incrementally reduce the weight until 0 and remove only if it is at 0. This way you could avoid any artefacts |
Beta Was this translation helpful? Give feedback.
-
Thanks, I'll try that. Another question, if I may: which class do I need to connect one or more MP3 streams to a mixer ? My intended pipeline is: MemoryStream -> MP3DecoderHelix -> <???> -> InputMixer -> VolumeStream -> I2SStream Which class is <???> ? I've been testing so far with SineWaveGenerator -> GeneratedSoundStream -> InputMixer ... |
Beta Was this translation helpful? Give feedback.
-
You would use an OutputMixer instead of an InputMixer, but I think there is not enough memory to decode more then one mp3 |
Beta Was this translation helpful? Give feedback.
A couple of comments: