RetroPie forum home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    1. Home
    2. Tags
    3. bgm
    Log in to post
    • All categories
    • sleve_mcdichael

      BGM, vcgencmd force_audio, and mpg123 &
      Help and Support • audio channel bgm mpg123 • • sleve_mcdichael

      3
      1
      Votes
      3
      Posts
      64
      Views

      sleve_mcdichael

      Still not sure why the things I was trying from command-line didn't work, but this seems to be getting the job done pretty reliably:

      autostart.sh:

      (vcgencmd force_audio hdmi 1 >/dev/null 2>&1; sleep 8; mpg123 -Z /home/pi/RetroPie/bgm/*.mp3 >/dev/null 2>&1) & #bgm emulationstation #auto

      .bashrc (excerpt):

      [[ $(tty) == "/dev/tty1" ]] && (vcgencmd force_audio hdmi 0 >/dev/null 2>&1; pkill mpg123) #bgm # RETROPIE PROFILE START

      ...this seems to work as intended, even though I couldn't get it to work on command-line for whatever reason. With this setup the audio channel opens in time for the music to begin, and closes again when I quit to console.

      In autostart.sh, I put vcgencmd before the sleep command because when I did the other way, sometimes it would open up in time for the music but other times it wouldn't. This way it opens up and "hums" for a few seconds before the music starts, but it always starts from the first instant, so an acceptable compromise.

      In .bashrc, the original guide said to put the command inside the RETROPIE PROFILE section but that whole section gets rewritten if you update bashwelcometweak; putting it outside the section preserves it even when the welcome tweak is updated.

    • jrossi90

      RPi 4b | Buster 10 | Retropie 4.7.1 | No Sound 3.5mm Jack EmulationStation
      Help and Support • retropie emulationstatio audio sound jack 3.5 bgm • • jrossi90

      2
      0
      Votes
      2
      Posts
      141
      Views

      mitu

      Issue 1 can be easily solved by using the Audio menu in RetroPie and choosing your default output (Analog Jack/HDMI).

      For #2 - The Headphone value can also be chosen in the EmulationStation settings, since it has been updated in June 2020 following the RPI OS changes.

    • retropie

      How to add an item retropiemenu (with icon and custom name)?
      Help and Support • script retropiemenu bgm • • retropie

      8
      0
      Votes
      8
      Posts
      360
      Views

      retropie

      @weirdh I already put console=tty3 some days ago, but it doesn't really hide the console, it just leaves a black screen instead of text.
      Actually, I don't really see the console when I run my scripts, I see a black screen. But since, I had console=tty3 I deduced that there would normally be console text instead of a black screen.
      It will be difficult to completely hide that console/black screen, maybe it's not even possible.
      Anyway, with the icons and detailed names in my scripts, it looks a lot better and 2 or 3 seconds of black screen isn't that bad I guess xD
      Thanks!

    • MrRussellgro

      Music Playlist Idea(s)?
      General Discussion and Gaming • bgm retropie menu music player • • MrRussellgro

      3
      0
      Votes
      3
      Posts
      201
      Views

      MrRussellgro

      @windg That's a really good list there. Thanks for that! :)

    • UberLumby

      Redream playing BGM from ES
      Help and Support • dreamcast bgm redream • • UberLumby

      12
      0
      Votes
      12
      Posts
      380
      Views

      UberLumby

      @mitu said in Redream playing BGM from ES:

      I don't know, but you can run ps -ef while steamlink is started and see the process name that it uses, so you can add it to the emulator list.

      thanks got it!

    • jurassicplayer

      Another BGM for ES script
      Ideas and Development • bgm player bgm script project music • • jurassicplayer

      8
      1
      Votes
      8
      Posts
      635
      Views

      jurassicplayer

      @bluestang
      Great, glad it's working.
      I removed the vc4 workaround stuff since it's not needed, and changed the init_delay to use seconds rather than milliseconds, since it's totally more useful with seconds (if people use video splashscreens).

      The installer script was also updated to have a brand new file/directory selector for the initial song and music directory options, making them actually usable without having to pull out the keyboard.
      Change Music Dir
      Also fixed an issue with spaces in file paths and fixed some smaller niggling things (stopping used to spit out "Terminated blah blah...").

      The only thing I'm planning at the moment is to maybe dynamically come up with some nice volume step values based off of fade_duration and max_volume to make just that little more "user-friendly" and remove that config option.

    • Jste84

      Background music - pi4
      Ideas and Development • bgm • • Jste84

      3
      0
      Votes
      3
      Posts
      186
      Views

      wmarcio

      Its is the best method.

    • Striderx99

      Can background music be added to EmulationStation?
      Help and Support • bgm emulationstatio windows 10 • • Striderx99

      7
      0
      Votes
      7
      Posts
      843
      Views

      Striderx99

      That's ok mitu. I would be willing to run a .bat file in the background if need be. I tried doing it myself and I was successful getting music to load up before the main screen finishes loading up on EmulationStation, as well as when you exit out of a game and go back to the menu. The problem I'm having is getting just one splashscreen to randomly load up/play before the loading screen and stopping/closing the media player that displays it.

      The code for my splashtest.bat is the following:

      @ECHO OFF

      REM Your splashscreens file path:
      start "" --play and exit "C:\Program Files (x86)\VLC\vlc.exe" -L "C:\Users\Username\Music\Playlists\Splashscreens.wpl"

      REM Kill your media player:
      C:\Program Files (x86)\VLC\vlc.exe /F

      REM Run the frontend (EmulationStation example):
      start "" "C:\Program Files (x86)\EmulationStation\emulationstation.exe"

      REM Run the media player (WMPlayer example):
      start "" "C:\Program Files (x86)\Windows Media Player\wmplayer.exe" -L "C:\Users\Username\Music\Playlists\EmulationStation.wpl"

      If anyone here has ideas on any mistakes you can see or a better way of executing this, please let me know. A big thank you goes out to those who can provide these answers :-D.

    • Jste84

      Ssh help/background music
      Help and Support • background musi ssh putty winscp bgm • • Jste84

      39
      0
      Votes
      39
      Posts
      1165
      Views

      Jste84

      @mitu success - I'm now in. Thank you so much for your help - much appreciated and sorry for my daft questions

    • MajorDangerNine

      RetroPie X86 - Background Music Guide
      Ideas and Development • x86 bgm music retropie guide • • MajorDangerNine

      1
      0
      Votes
      1
      Posts
      697
      Views

      No one has replied

    • dbrown1986

      BGM in Ubuntu Desktop 18.04
      Help and Support • linux ubuntu retropie amd64 bgm • • dbrown1986

      14
      0
      Votes
      14
      Posts
      541
      Views

      dbrown1986

      @mitu said in BGM in Ubuntu Desktop 18.04:

      @dbrown1986 said in BGM in Ubuntu Desktop 18.04:

      I think Ubuntu wouldn't allow it since it was a 'hidden' folder.

      First time I hear this kind of - obviously wrong - explanation. Check the permissions on the folder and make sure your $USER owns the folder where the scripts are saved. You don't need to use sudo to edit something that's in your home folder.

      Could also been something I mucked up; since I installed using net-inst, I checked the permissions and they looked fine.

    • thestarglider

      Argh! Can't find particular BGM!
      General Discussion and Gaming • bgm background musi retro music music • • thestarglider

      6
      0
      Votes
      6
      Posts
      323
      Views

      Outtatime71

      @thestarglider My pleasure mate, I'm glad I could help :)

    • cyperghost

      [opendev] The Background Music Box
      Ideas and Development • cyperghost bgm mp3 mpg123 • • cyperghost

      33
      4
      Votes
      33
      Posts
      2220
      Views

      majikill

      @mitu ok, i think i get it now. im using this as a crash course in writing scripts, so im sorry if i dont understand how this should work. but this is a huge help, thank you.

    • SeraphTC

      Updated BGM for ES Script
      Ideas and Development • emulationstatio bgm script music song • • SeraphTC

      1
      0
      Votes
      1
      Posts
      433
      Views

      No one has replied

    • cyperghost

      BGM Music mpg123 with fade in/out
      Ideas and Development • cyperghost bgm bgm player control • • cyperghost

      15
      3
      Votes
      15
      Posts
      2351
      Views

      sleve_mcdichael

      @cyperghost I have a working scriptmodule that installs mpg123 and sets up the background music automatically. May I have your blessing to include a modified version of this volume fade script (with credit) in the distribution?

    • zipeee2

      BGM, Bezels, and splash on Ubuntu 16.04 builds
      Help and Support • bgm ubuntu 16.04 bezels spalshscreens • • zipeee2

      7
      1
      Votes
      7
      Posts
      973
      Views

      muttleyloz

      @prog-amateur I would also like to know the steps taken to add BGM to RetroPie. This would be a great feature to be added

    • madmodder123

      Modified Background Music Script with added overlays!
      Ideas and Development • bgm overlay music song script • • madmodder123

      114
      6
      Votes
      114
      Posts
      16984
      Views

      Cascote

      @Cascote
      Solved: The issue lies on the Sample rate of the Mp3 file. It seems that Pygame is not able to correctly play anything that's not on 44100Hz Rate, so I Resampled the mp3s that were not on that rate using Audacity

      @legacy said in Modified Background Music Script with added overlays!:

      I click a game, the video loading screen kicks in and the music fades out.
      Black screen appears to load the game, but the music kicks in for 1 second and fades out, then the game loads.
      is there a fix for this. Thank you

      I know, I know, you have probably solved this or not interested on it anymore, but for whomever needs it, I had this issue too, I solved it by adding the following lines at the end of the runcommands scripts:
      runcommand-onend.sh

      pkill -CONT python

      runcommand-onstart.sh

      sleep 1 pkill -STOP python
    • zerojay

      Quick and easy guide for adding -EMULATED- music to Emulationstation on RetroPie
      General Discussion and Gaming • bgm guide music music rips vgm • • zerojay

      22
      6
      Votes
      22
      Posts
      4683
      Views

      HellenButterlips

      Thank you @zerojay ! This is tremendous. Very easy to install, and after a minor issue with the vgm directory permissions, was able to get everything up and running....kind of.

      Few issues below. Any help would be much appreciated.
      *Update Recreating the autostart.sh file fixed issues 1 and 2.

      Both the playmusic.sh and generatem3u.sh scripts are running without issue, but music will not start automatically after boot. I can start it by running the playmusic.sh script from the command line (or via ssh), but it only plays through HDMI port. I don't see anyplace in the vgmplay config file to point it to the Headphone output on RPI4. The playlist does not loop. Playback terminates after reaching the last item in the m3u file.