MP3_Player_Ultibo
MP3 Player with Ultibo and libmad
- Active · last change 5-22-2025
- ★ 1 on GitHub
README
MP3 Player with Ultibo
Using libmad to decode the mp3 file.
Usage
Based on the 20-PWMSound example (Pascal).
- Folder RPi3 (Raspberry Pi 3A/3B/Zero2).
- Folder RPi4 (Raspberry Pi 4B/400).
- You must compile the Ultibo project (Pascal).
- Copy the
test.mp3file to the micro SD.
Note: You can use another mp3 file, but be sure to change the name within the program. The mp3 file has been downloaded from this site.
The included mad.pas file is only needed until the fpc package included with Ultibo is updated. It is recommended to work with the
developbranch of Ultibo, as it includes the libmad static library.
Program
- With the test.mp3 file, it reads it, decodes it, and obtains relevant information.
- Gets the duration of the song in hh:mm:ss.
- It is then played back via PWM with the output of the jack.
On screen displays:
The file size of test.mp3 is: 2105160 bytes
Read MP3 File OK
Decoding the mp3 file..
Duration: 00:02:11
Bitrate: 128000 bps
Number channels: 2
Sample Rate: 44100 hzAdditional information
- Information MAD: MPEG Audio Decoder
- Official forum and solution to doubts from Forum Ultibo.
- Ultibo examples and information Ultibo Examples.

