• Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login
RetroPie forum home
  • Recent
  • Tags
  • Popular
  • Home
  • Docs
  • Register
  • Login

Music UI on Retropie -

Scheduled Pinned Locked Moved Ideas and Development
musicjukeboxemulationstaion
5 Posts 4 Posters 1.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    millsusaf
    last edited by 21 Oct 2017, 01:49

    I appreciate so much what you all have accomplished and the hard work I know has to have went into these projects.

    Many of us are building these cabinets with decent sound systems and placing them in man caves/basements/entertainment rooms/etc. I think it would be a great idea if there was a menu choice within ES to listen to music, either local music on storage or via streaming, Amazon Music, IheartRadio, Pandora, etc.

    I've looked all over but have not found any info regarding this. Is this possible? Thanks!

    M 1 Reply Last reply 21 Oct 2017, 05:28 Reply Quote 0
    • M
      mitu Global Moderator @millsusaf
      last edited by 21 Oct 2017, 05:28

      @millsusaf Wouldn't Kodi be the right choice for media playing ? You can install it from the RetroPie setup script and have it available in ES.

      1 Reply Last reply Reply Quote 0
      • Z
        zerojay
        last edited by 21 Oct 2017, 18:59

        I've started thinking about how to implement something along what you're talking about here to control music running in the background on the pi3 (through the mpg123 method) though it looks like we'll have to use something else to give us more fine-grained control. When I do a bit more research, I'll talk about it here but I don't see why this couldn't happen.

        1 Reply Last reply Reply Quote 0
        • C
          cyperghost
          last edited by cyperghost 22 Oct 2017, 12:37

          @zerojay I think a basic control can be done via bash-script. The folder structure would be like

          ~\BGM\Artist1
          ~\BGM\Artist2
          ~\BGM\Artist3
          

          The script would just change the folder that playes music in Background. But for a real implementation to ES I'm the wrong person to ask for.

          I've written (or adapted) some small scripts for simpelst music control

          1. Toggle Music Player status > this pauses/unpauses/starts mpg123
          2. Annother Track

          1. Toggle Music Player

          #!/bin/bash
          #Toggle MPG123 Music Player to mute/unmute condition
          #Simple by checking running PID and sent -STOP or -CONT term
          #Is no PID of MPG123 is available it will be launched - by cyperghost
          command="mpg123"
          pids="$( pgrep "$command" )"
          if [[ -z "$pids" ]]; then
          "$command" -Z /media/usb0/BGM/*.mp3 > /dev/null 2>&1 &
          exit 0
          fi
          for pid in $pids; do
          state="$( ps -ostate= -p "$pid" )"
          stopped=0
          case "$state" in
          *T*) stopped=1 ;;
          esac
          if (( stopped )); then
          kill -s CONT "$pid" > /dev/null 2>&1
          # printf '"%s" (%d) has been unpaused\n' "$command" "$pid"
          else
          kill -s STOP "$pid" > /dev/null 2>&1
          # printf '"%s" (%d) has been paused\n' "$command" "$pid"
          fi
          done

          2. Annother Track

          #!/bin/bash
          #This changes track by killing musicplayer
          #and reloading it
          pkill mpg123 > /dev/null 2>&1
          sleep 1
          mpg123 -Z /media/usb0/BGM/*.mp3 > /dev/null 2>&1 &

          My opinion about BGM is, it is a track with +45min of length and with ambient sound. For my setup I change the music track in just very rare cases. But of course I would not say "No" if an implenmentation in ES is made via mpg123 backend ;)

          1 Reply Last reply Reply Quote 0
          • Z
            zerojay
            last edited by 22 Oct 2017, 13:42

            I won't be using mpg123 as it has no real ability to control playback. I have something better in mind.

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post

            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.

              This community forum collects and processes your personal information.
              consent.not_received