HOME GAMES APPS CODE DESIGNS ELECTRONICS DOWNLOADS LEGACY

MacKaraoke

GOAL

A Raspberry PI Karaoke Machine.

CONCEPT

  • Play and Sing karaoke songs

  • Videos can be uploaded to device or found on youtube

  • Song choice via phone

  • Must play CDG discs

PURCHASES

Controller Raspberry Pi 3 £32.95
Microphone USB Microphone (any old Rockstar microphones would work) £13.99
Sound Card innomaker Rasp Pi HiFi DAC Hat PCM5122 Audio Sound Card Expansion Board for Raspberry Pi £25.99
Case HiFiBerry universal case III £25.13
Speakers Logitech Z120 Compact PC Stereo Speakers, 3.5mm Audio Input, USB Powered £12.97
USB Stick USB Stick £10.00
CSG Karaoke Disc CDG Karaoke Disc (can be any but I used The Ultimate Karaoke Party Pack) £10.00
 
TOTAL £131.03

IMPLEMENTATION

So the creation of the MacKaraoke system actually involved 3 distinct programming requirements.
  • The Player App - to be run on the Raspberry PI and displayed on a tv
  • The Song Selection App - to be run on the users phone
  • A Song creator app - to be run on a pc to allow custom songs to be created.
THE PLAYER APP
I created a dotNet Core webservice as a backend for the selection and serving of songs. This used built in features to allow playing before the videos had downloaded. This was the compiled for use with Arm processors and uploaded and set up on the PI. For the front end app I used Electron to create an app hosting an HTML 5 media player. This was then a simple case of calling the service for the next song and playing it. Both the backend service and the Electron app were automatically started when the PI started up and was presented as a full screen console app. A USB hard stick was used to store the songs and was created as a shared folder allowing videos to be added via the network. Once the actual coding was done I messed about with the Alsaloop settings to ensure both microphones came on when the PI was turned on and directed to speakers.

THE SONG SELECTION APP
The dotnet service built above also provided a mobile friendly UI listing all the songs and allowing the user to add them to the playlist. After a few sessions though it quickly became clear that user controls were needed to pause, skip songs as well as gracefully rebooting and shutting down the PI.

THE SONG CREATION APP
Whilst the "Song creation" wasn't actually needed since the Player App was capable of playing MP4s from a disk or youtube videos I quickly found I wanted specific versions of songs that weren't available. I also read up and converted CDGs into workable files Click here to see an example

Enabling the microphones
aplay -l
write down the card number and the subdevice number. Do the same with:
arecord -l sudo nano /etc/rc.local
Added line
sudo /usr/bin/alsaloop -d -c l -C hw:2.0 -P plughw:3,0 -t 48000 &
Create folder on Linux

mkdir /home/pi/songs chmod 777 /home/pi/songs sudo nano /etc/samba/smb.conf [songs] comment = Songs available to the MacKaraoke service path=/home/pi/songs browsable=yes guest ok = yes writable = yes
I used Openscad to create a custom case which can be found here.

MULTIMEDIA

© 2025 All Rights Reserved. version 0.0.0.0 74736391