Hey, i'm using the Maker Pi Pico and following this tutorial to play mp3 files with it : https://tutorial.cytron.io/2021/04/13/p ... uitpython/
Is there a way to play multiple mp3 files at the same time and adjust the volume of each one independantly from the others?
Thank you !
Play multiple sounds on the Maker Pi Pico
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Nicolebendo
- Posts: 11
- Joined: Wed May 11, 2022 6:32 am
- blnkjns
- Posts: 963
- Joined: Fri Oct 02, 2020 3:33 am
Re: Play multiple sounds on the Maker Pi Pico
I doubt it. The playback in your example is very low-key. It is rudimentary PWM on a digital IO pin.
For your wishes you are better off with a board with a DAC or through attaching a DAC to the Pi.
Then for mixing multiple files, the code has to be low level. There are C++ libraries for the Teensy 3 and 4 that can handle these tasks, if you know how to you could make a python extension on top of that C code to control the playback. Python itself has not enough oomph to process all the data on the Pico.
The Teensy code can also be run on Adafruits M4 boards, like the Metro M4 or Itsy Bitsy M4. These boards have dual DAC's and a FPU for the complex calculations of mixing multiple signals.
For your wishes you are better off with a board with a DAC or through attaching a DAC to the Pi.
Then for mixing multiple files, the code has to be low level. There are C++ libraries for the Teensy 3 and 4 that can handle these tasks, if you know how to you could make a python extension on top of that C code to control the playback. Python itself has not enough oomph to process all the data on the Pico.
The Teensy code can also be run on Adafruits M4 boards, like the Metro M4 or Itsy Bitsy M4. These boards have dual DAC's and a FPU for the complex calculations of mixing multiple signals.
Please be positive and constructive with your questions and comments.