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

    Retropie & Sonos! Could it trigger a script to start/top playing music/arcade ambience?

    Scheduled Pinned Locked Moved Ideas and Development
    retropiesonosraspberry pie 4retroarch
    5 Posts 3 Posters 548 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.
    • N
      nyvram
      last edited by

      My inspiration came from here:

      Would love to have it play this track on the Sonos in my arcade room whenever I launch a ROM and since this guy created several of these videos (1983, 1990, 1996, etc.) would love to further be able to match which background music is playing with certain ROMs.

      I can 'caveman' it and have it start playing based on a motion sensor i have in that room when I walk in but it would be cooler to only play when I'm actually starting a game up and change the 'era' soundtrack baed on ROM metadata.

      1 Reply Last reply Reply Quote 0
      • IanDaemonI
        IanDaemon
        last edited by

        I have those files playing as background music when I turn the machine on. Then they stop when a game loads. I also added some game music that I personally relate to.

        • 5 Favorite Arcade Games in MAME
        • Cocktail Cabinet Games
        • Check out the MAME RoW
        N 1 Reply Last reply Reply Quote 0
        • N
          nyvram @IanDaemon
          last edited by

          @iandaemon are they playing on your arcade speakers or a separate speaker in the same room? I was hoping to have them play on a separate speaker as 'background ambience' and not in the UX on the arcade itself so it 'fills the room' so to speak.

          IanDaemonI 1 Reply Last reply Reply Quote 0
          • IanDaemonI
            IanDaemon @nyvram
            last edited by IanDaemon

            @nyvram I gotcha. I have the tracks playing through the arcade cabinet at the moment (with -onstart/-onend), but your idea of a motion switch is decent. I have copies of the tracks to play through a separate speaker system and could always push the "play" button on a second device.

            • 5 Favorite Arcade Games in MAME
            • Cocktail Cabinet Games
            • Check out the MAME RoW
            1 Reply Last reply Reply Quote 0
            • LolonoisL
              Lolonois
              last edited by

              @nyvram from the distance: If your room audio has some API reachable from the RetroPie you may consider the scripting function for specific events (since ES v2.9.2). https://retropie.org.uk/docs/EmulationStation/#scripting

              The event game-start passes two parameters to every script in the folder ~/.emulationstations/srcipts/game-start/: ROM and basename (easiest is to echo them in a test script to determine what they represent exactly.)

              Or put your actions for the room audio in runcommand-onstart/-onend.

              HTH

              1 Reply Last reply Reply Quote 0
              • First post
                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.