How To Add MUSIC To RetroPie In 5 Commands!

RetroPie with music
3
(2)

So you finally have your RetroPie setup and working. That’s great! but then you realise that things are just a little.. too quiet?!

Let’s add some killer background music to this little rig.

Here I will guide you through the process to add music to Retropie.

 

This post assumes one thing.. that your RetroPie is running on a Raspberry Pi.

 

Once you download and run the script by following the 5 commands you will not only add background music with the ability to turn it on and off from the config menu, but I added some extra functionality too.

 

We can also select an option to: 

  • start playing the music automatically when the Pi boots up, or not
  • we can continue to play the music over the top of games
  • and we can also hide some of the more, shall we say less appropriate music for when the kids get a chance to experience this excellent little gaming box (GTA “Joyride” by Da Shootaz anyone? ;).
 

With all these settings available to us, we’re gonna need a way to see what’s been switched on or off!

For this I created an “info” script, that when executed from Emulation Station front-end config menu, will display what our current state is with our music options.

 

Are you ready? ..Let’s do this!

Contents

RetroPie with music options
Custom config menu showing music options

SSH Into The Pi (For Beginner's)

 

The easiest way to follow along with this guide would be to SSH in to your Raspberry Pi as you can simply copy the commands/text over from this post and paste them into the terminal. To paste text into the terminal, use CTRL + SHIFT + V

Fire up a linux terminal (or what ever system you are rocking) on your PC/laptop and run the command:

ssh [email protected]_address

where ip_address is your RetroPie’s IP Address. It will most likely start with 192.168. It can be found in the config menu of your Pi or by pressing F4 on a keyboard and running the command:

ifconfig 

If you get the response “connection refused” then we may need to turn on the SSH service. To do this we need to get to a terminal on the Pi by pressing F4 on a keyboard. Now run the command:

sudo touch /boot/ssh 

enter the password if prompted (default password is: raspberry)

then reboot the Pi with the command:

sudo reboot 

When the RetroPie boot’s up again we can then try and SSH in to it again. You may need to check the IP address as it may have changed.

If you get a crazy warning that starts with the following:

WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

then copy and paste the line that starts with “ssh-keygen -f ” but add the word sudo at the beginning, and run it.

Type the word “yes” if prompted and enter the RetroPie password if your asked to do so.

Hopefully you’re now greeted with the RetroPie ‘message of the day’ and I’m now assuming you have an SSH session!

retropie ssh login
SSH session to RetroPie

Automated With 5 Commands

Tested on Retropie version 4.5.1

This automated method should have music playing on your RetroPie in just a few minutes!

Make sure you have an internet connection and press the ‘F4’ key on your keyboard to bring up a bash terminal or follow the SSH guide above.

Command 1:

Now we need to download the file. Enter the following command into the terminal:

wget https://installtekz.com/downloads/musicpi/music_setup.tar.gz 

Command 2:

Next we need to uncompress the file with the following command:

tar -xvzf music_setup.tar.gz 

Command 3:

Once the file is uncompressed, we need to move in to the “music_setup” directory with the next command:

cd music_setup 

Command 4:

Now we need to make the setup script executable:

chmod +x setup.sh 

Command 5:

And finally, run the script:

./setup.sh 

When the script starts we can hit the “s” key and then ‘Enter’. Wait for the script to finish running and then reboot. That’s it!

If you want to show or hide some menu items that appear in the Retropie settings screen then just run the script once again and choose the “m” option.

Conclusion

My aim for this post was to get you to add music to Retropie on a Raspberry Pi using just 5 commands.

If you’re comfortable with working in the shell then this small project shouldn’t be a problem for you.

However if you’re not that comfortable with working in a linux shell then this would make an excellent little project to carry out.

 

Not to mention that it’s fun! and you will have cool background music over that RetroPie when you’re done 🙂

If you would like some more tips on how you could improve your RetroPie setup then check out my other post “ULTIMATE RetroPie Guide: Tips For Beginner’s“.

New To Linux?

In 2020 I’ll be focused on creating linux tutorials for beginner’s!

These won’t be just some random posts though. I will be covering the Linux Professional Institute 1 (LPIC1) certification!

 A world wide recognised certification that covers all the basics of Linux Administration!

Ideal for retropie/raspberry pi users.

How useful was this post?

Click on a star to rate it!

Average rating 3 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

3 thoughts on “How To Add MUSIC To RetroPie In 5 Commands!

  1. Hello, great tutorial.

    Is there a way to play the music but have it stop playing once you select an operating system (Arcade, MAME, NES, etc…) so we can hear the game snaps (video/audio preview). Then have it start playing again once we get out of the operating system.

    Or is there a way to add a music option (operating system) to Retropie like an operating system but rather than selecting games to play we can select music to listen too?

    Thanks again for your knowledge and time.

    Regards,

    E

    1. Hi thanks for the comment.
      This project started to get very complex and so I stopped where I thought would be a good point for this first version.
      However, I might review this in the future. At the moment, there isn’t a music track selection feature but I would look into this at a later time.
      I’m not sure I fully understand your first question but there is an option to either play the music over the games or to pause the music while the game plays. Just select the setting “Continue Music Over Games” ON/OFF

      Hope this helps

  2. Thank You for this. As a complete novice there where a few things that were a challenge but this was exactly what I was looking for. Once I gained a little knowledge I was able to get it all work just fine. Now onto volume controls.

Leave a Reply

Your email address will not be published. Required fields are marked *