|
Forum Index : Microcontroller and PC projects : Playing multiple MP3 tracks
| Author | Message | ||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
I have asked off-the-wall questions in the past expecting a flat "No!", only to be surprised with a "Yes". Are we able to play multiple synchronised tracks, somehow? Or with multiple PicoMites? The important thing is to have only one SD card. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8353 |
I strongly suspect that the answer for "conventional" tracks will be no. However, you may be able to use multiple MIDI tracks at the same time. That's because MIDI contains the timing information in the stream so grabbing into a buffer and pushing it out to another PicoMite in short packets might just work. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| Volhout Guru Joined: 05/03/2018 Location: NetherlandsPosts: 5507 |
Mick, The header of this thread is about MP3's. And even playing a single MP3 consumes a lot of memory, so I expect synchronizing 2 MP3's might be to much for pico. But it might be an option for the CMM2, with it's 8/32Mbyte RAM Volhout PicomiteVGA PETSCII ROBOTS |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
Looking at the manual, I'm thinking that multiple external devices would be the way to go. They are really impressive. Would probably need a common clock(?) I see others, attempting this on MCUs but without luck. I don't want a full-blown RPi. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8353 |
TBH I don't think it's possible on a Pico. The common SD card is a major problem as you have to upload the entire mp3 tracks to other picos then start them simultaneously and *hope* they stay in synch - there's no way you can stream multiple tracks unless you use stupidly low bit rates and I can't think of any way to share the mp3 clock. That's why I mentioned MIDI. Of course, if you use the bare RPxxxx chips on a PCB and connect the clock out on one to the clock in on the others and force them all to start at the same time they should remain in synch, but not doing it as PicoMites. There are system interrupts etc. that will mess up any synchronism. You need timing information within the file IMHO and it simply isn't there. Playing mp3 files isn't simple as it's a lossy format that has to be unpacked by some sort of CPU in real time. Attempting to do that on multiple streams and keep them in synch is the stuff of nightmares. A lossless format would probably be easier, but still not easy. mp3 files are simply grabbed in chunks then squirted out through the decoder, which re-builds the data on the fly. Different grabs, even of the same length, will have a different playing time depending on the content. There's no point in counting bytes from the beginning of the file as it's meaningless. You simply don't know where you are in the file and there's no timing info. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
I'm thinking that the VS1053 module with onboard SD-card would be one approach. Actually, multiple SD-Cards wouldn't be a problem. Wonder if I would have to tie them to a common clock. Wouldn't be using PicoMite's PLAY MP3 commands for the music playing but I have other ideas for this such as canned laughter/cheering/applause/boos, etc. Module #1: Stereo track to accommodate two instruments, e.g. Drums panned left, Bass panned right. Fed to separate inputs of the mixer. Output to be mono. Module #2: Stereo track to accommodate two other instruments or one stereo instrument. PicoMite to select the track and to start/stop playback (DIO?) |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8353 |
Don't. :) It's far easier to do this on a multi-track. Less complicated, less time consuming, more accurate and, if you look around, it might even be cheaper! And you stay sane. Ish. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
Which one? I only know of one in existence and it's super expensive. Performers who use backing tracks would like to have real-time control over each instrument track so that they can fine-tune for the venue. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8353 |
Reaper any good? Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
Reaper is the best DAW available IMO. I would report "undocumented features" in the early days and the $100M man himself (Justin Frankel, creator of WinAmp) would respond. But it's a full blown Digital Audio Workstation. Some DO use it for live performance but it's clunky and requires a PC. I have no problem with using my Android tablet for multitrack playback but the reason for my OP is that; lots of musicians just don't want to mess with apps on stage, etc. As it stands, they carry an MP3 player with pre-mixed tracks. The acoustics vary widely from venue to venue and so they want a device that outputs a separate MP3 or WAV track for each instrument. They can then fiddle with EQ and levels, on the mixer to suit the venue. |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8353 |
Ah, so we have more info. :) Nope. A 4-track or 8-track tape is the only way to go that I know of. As I said, mp3 is a complex streaming format and isn't (was never) designed with parallel playing in mind. It's designed as a compressed audio format to make the files as small as is reasonably possible, nothing else. wav format could probably do it by synchronising the clock rate in real time, but the files are enormous and you still need quite a processor because they bit stream from a buffer as you can't pause the stream during disk reads. Perhaps if you could use a CPU to keep the disk buffers loaded while one or more PIOs read them and clock the wav out you might be onto something. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| PhenixRising Guru Joined: 07/11/2023 Location: United KingdomPosts: 1667 |
These are the "STEMS" Separate MP3 Files Let's say I only need Bass and Drums and so only one VS1053. In my DAW, I pan the Bass MP3 all the way to the "R" channel and I pan the Drums all the way to the "L" channel. And save the MP3 (or WAV). Playing this file on a stereo player would then mean all Bass in the right ear and all Drums in the left ear The "R" output of the VS1053 goes to say Strip One Input of the mixer. The "L" output of the VS1053 goes to say Strip Two Input of the mixer. The output of the mixer is mono. So now the mixer can control the volume, eq, fx, etc. of the Bass on channel-strip one of the mixer and the Drums on channel-strip two of the mixer. Voila, no-longer stuck with a single pre-mixed backing track. |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |