Quick and easy guide for adding music to Emulatonstation on RetroPie. Noob friendly!
-
Now just need to compile this functionality into emulationstation ;) good guide
-
@MapleStory This looks pretty cool. Question for you regarding the pkill command to start and stop the music. Is there a way to set the music to kill once you enter into a system detail page in emulationstation? I am running video preview with audio so it would be cool to have the music start after a splash screen video and play only on the main system selection screen. Once you enter a system the music would stop. Exit a system to main menu, the music would start. I am assuming this is probably to complicated until it is integrated into ES as @herb_fargus has indicated as you are using the launching and exiting of the roms as a command to start and stop the music.
-
@TMNTturtlguy Unfortunately, I haven't set up video previews, so I have no way of testing out a method to get music to pause/mute when highlighting a game. I'd imagine that it is a bit more complicated, considering it would have to specifically run commands based on your actions in the emulationstation interface. Hopefully once it's integrated, someone will find a way to make that feature a reality.
-
@MapleStory great guide!
Since it's a noob friendly guide, I would like to suggest an improvement: thechmod
part is unnecessary. ;-)
Theruncommand
callsonstart|onend
scripts in a way that they don't need permission to execute. -
Is it possible to use a different format alike midi or ogg?
-
I don't know about midi files, but ogg, I'm sure.
For midi, there would need to be a base sound (like a piano or something) in order for it to work. -
@itsnitro I know some applications that plays midi files but i dont know how to make them run under the retropie
the applications are:
wildmidi (as used by gstreamer)
timidity
playmidi
fluidsynth -
Running those under retropie would need an emulator of some type.
-
I have implemented the updates and one thing that I noticed is that I couldn't get my mp3 file to run if it had underscores it in so I removed them.
Also a second item of note is that if you execute the command to stop when exiting to the command line even though it does so cleanly when you enter back into EM it will not start again. I am assuming that there are other configurations required.
lastly I wonder if there is a way to set the volume level so that the mp3 track does not interfere with the game audio on video previews for games?
-
OK I did everything step by step and it works but.......once I shutdown or switch over to Attractmode and get back into ES no music. I get back into autostart.sh file and the command has disappeared! What could be happening? Any help is appreciated,thanx.
-
Great guide. Thanks!
-
Great guide and works perfectly! I do have one small problem though, I installed Moonlight into Retropie and once I launch it the music just continues :/
does anyone know a fix for that?
-
-
I installed Moonlight into Retropie and once I launch it the music just continues :/
I think this is because Moonlight is launched directly and not through the Runcommand like every other emulator in RetroPie. So basically
runcommand-onstart.sh
andruncommand-onend.sh
are not called.does anyone know a fix for that?
You might need to manually edit your Moonlight.sh script and add "pkill -STOP & -CONT mpg123" to it.
Something like this (I haven't tested it):#!/bin/bash pkill -STOP mpg123 moonlight stream -app Steam blah blah blah... pkill -CONT mpg123
-
Hi,
This works all fine! Thx!
But i have a question.I have many songs in the rome file.
Also i set a startsong for the first boot from ES.
This all works great.
Song play at start and than random music.But i wanna have a second "startsong" who plays if i leave the game /emulator.
for example:
RPI3 boot -> ES Starts -> Startsong "A" plays -> after song, random music starts -> Start game -> exit game -> Startsong "B" plays -> after song, random music starts
can someone help me?
System:
- RPI3
- Retropie 4.2.16
-
Could this be used to give audio control to google assistant? I have it working in desktop mode but during emulation station bootups it cannot grab the audio control because the audio device is busy (presumably being used by emulation station itself) I wouldn't even need it to check for emulators running to reduce the volume because I would want the google assistant to be able to output during gameplay
-
Thank you for posting this guide, I just implemented the music player on my build and it works great!
-
I’m curious how this works in a set up with video snaps. Will the music pause or fade out when you are previewing a game video in the game select list? Or will it play over it and I should just wait until this is ironed out?
-
I believe I might've missed something or typo'd somewhere. RPI3 starts up and song starts in the 10 seconds. Go into game and when I exit said game, mpg123 does not continue at all. How do you go about editing this sort of thing? Thanks! ^.^'
Edit: I had checked and found that "[[ $(tty) == "/dev/tty1" ]] && pkill mpg123" was typo'd and missing a "K" in pkill. However that didn't resolve the issue.
-
@ssimmers In
/opt/retropie/configs/all/runcommand-onstart.sh
it should say:pkill -STOP mpg123
In
/opt/retropie/configs/all/runcommand-onend.sh
it should say:pkill -CONT mpg123
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.