Background Music at the OSD Menu?

Kernel, Main, Utilities & Applications, Miscellaneous Devices.
User avatar
Captain FPGA
Top Contributor
Posts: 373
Joined: Sun Apr 11, 2021 9:19 pm
Has thanked: 195 times
Been thanked: 25 times

Background Music at the OSD Menu?

Unread post by Captain FPGA »

Hypothetically speaking, would it be possible to run a script with background music playing at the main menu? Such a script would preferably play upon power cycling on first activation. There should also be an off script kind of like the Mister's SAM has. Ideally the music itself could go in a single folder with potential sub folders, this will hold all your tracks.

What's the likelihood of something like this becoming a reality? Would it be difficult to implement? To me that kind of script would be a breakthrough in the same lane as Wifi, update_all and Mister_SAM. I'm used to playing my Original XBOX mod and hearing third strike music playing when I turn it on (with matching theme) something like this would be cool for the Mister. :D
Dreams don't die!
Image
User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: Background Music at the OSD Menu?

Unread post by RealLarry »

That would be of interest for me too, what possibilities we can expect. I have a "shutdown" script which unmounts all CIFS mounts, shutdown my NAS per ssh and displays a "power off" picture to tty2oled. But it would be nice to change the background image of MiSTer's menu also.
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Background Music at the OSD Menu?

Unread post by bbond007 »

Captain FPGA wrote: Wed Sep 22, 2021 12:09 pm Hypothetically speaking, would it be possible to run a script with background music playing at the main menu? Such a script would preferably play upon power cycling on first activation. There should also be an off script kind of like the Mister's SAM has. Ideally the music itself could go in a single folder with potential sub folders, this will hold all your tracks.
I have not tried it yet, however, if you rename /media/fat/_user-startup.sh to /media/fat/user-startup.sh then add something like the following:

Code: Select all

aplay /media/fat/a1000.wav  &
or...

Code: Select all

mpg123 /media/fat/MP3/startsound.mp3 &
Maybe I'll try and make my A1200 MiSTer play the Amiga 1000 jingle on start.
http://www.geekometry.com/2013/11/amiga ... oot-sound/
User avatar
bazza_12
Top Contributor
Posts: 443
Joined: Sun May 24, 2020 7:49 pm
Location: Yorkshire, UK
Has thanked: 263 times
Been thanked: 121 times

Re: Background Music at the OSD Menu?

Unread post by bazza_12 »

wow i never knew the a1000 had a boot up sound..
The music is reversible but time is not. Turn back. Turn back
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: Background Music at the OSD Menu?

Unread post by lamarax »

bbond007 wrote: Wed Sep 22, 2021 2:25 pm
Captain FPGA wrote: Wed Sep 22, 2021 12:09 pm Hypothetically speaking, would it be possible to run a script with background music playing at the main menu? Such a script would preferably play upon power cycling on first activation. There should also be an off script kind of like the Mister's SAM has. Ideally the music itself could go in a single folder with potential sub folders, this will hold all your tracks.
I have not tried it yet, however, if you rename /media/fat/_user-startup.sh to /media/fat/user-startup.sh then add something like the following:

Code: Select all

aplay /media/a1000.wav  &
or...

Code: Select all

mpg123 /media/fat/MP3/startsound.mp3 &
Maybe I'll try and make my A1200 MiSTer play the Amiga 1000 jingle on start.
http://www.geekometry.com/2013/11/amiga ... oot-sound/
Woah, that worked! \o/

...but how do I amend the script (or which script do I have to edit) to be always on with each boot-up?

Sorry, I'm not a linux person :oops:

Edit: for reference, here's the .wav I used:
bbc.7z
(11.36 KiB) Downloaded 138 times
User avatar
terminator2k2
Posts: 36
Joined: Sun May 24, 2020 6:46 pm
Has thanked: 27 times
Been thanked: 22 times

Re: Background Music at the OSD Menu?

Unread post by terminator2k2 »

just edit user-startup.sh

and add your file name bbc.wav in place of a1000.wav

also make sure you have uploaded the wav file
User avatar
RealLarry
Top Contributor
Posts: 881
Joined: Mon May 25, 2020 4:04 am
Location: San Junipero/DE/Earth
Has thanked: 120 times
Been thanked: 385 times

Re: Background Music at the OSD Menu?

Unread post by RealLarry »

RealLarry wrote: Wed Sep 22, 2021 1:32 pmit would be nice to change the background image of MiSTer's menu also.
Answering to myself: Solved by using MiSTer_Batch_Control https://github.com/mrchrisster/MiSTer_Batch_Control
Attachments
shutdown.jpg
shutdown.jpg (97.49 KiB) Viewed 3062 times
Contributor of tty2oled, author of tty2tft, tty2rpi and update_tty2xxx
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: Background Music at the OSD Menu?

Unread post by lamarax »

terminator2k2 wrote: Wed Sep 22, 2021 10:18 pm just edit user-startup.sh

and add your file name bbc.wav in place of a1000.wav

also make sure you have uploaded the wav file
Let me rephrase; the script doesn't run automatically on each boot. I've placed it directly under media/fat and checked paths, then inside the 'Scripts' folder, even converted the .wav to .mp3 and put it inside the existing 'MP3' folder, editing the path accordingly.

When manually executed, the script plays the file alright; my question is how can it be made to run 'by itself' at the moment of soft -or hard- rebooting.

With my limited knowledge, I'm guessing it's not that simple.
Flandango
Core Developer
Posts: 459
Joined: Wed May 26, 2021 9:35 pm
Has thanked: 59 times
Been thanked: 383 times

Re: Background Music at the OSD Menu?

Unread post by Flandango »

The user-startup.sh script will only run on startup of the linux os, which is during a cold-boot. Warm boots, and anybody please correct me if I'm wrong, is only the particular core in use is rebooted, therefore the script won't run.
Now what you may want to do, is write a script/daemon to monitor what core is running, if it's the main core, play the sound file, if not, stop/pause the playback.
User avatar
terminator2k2
Posts: 36
Joined: Sun May 24, 2020 6:46 pm
Has thanked: 27 times
Been thanked: 22 times

Re: Background Music at the OSD Menu?

Unread post by terminator2k2 »

lamarax wrote: Thu Sep 23, 2021 6:41 pm
terminator2k2 wrote: Wed Sep 22, 2021 10:18 pm just edit user-startup.sh

and add your file name bbc.wav in place of a1000.wav

also make sure you have uploaded the wav file
Let me rephrase; the script doesn't run automatically on each boot. I've placed it directly under media/fat and checked paths, then inside the 'Scripts' folder, even converted the .wav to .mp3 and put it inside the existing 'MP3' folder, editing the path accordingly.

When manually executed, the script plays the file alright; my question is how can it be made to run 'by itself' at the moment of soft -or hard- rebooting.

With my limited knowledge, I'm guessing it's not that simple.

mine plays the sound with every hard reboot or power on, doesnt do it by soft re-boot though

my elgato capture card takes a few seconds to kick in, but audio is fine on main display

My script is in /media/fat/linux

https://youtu.be/cTO--_zM6iU
User avatar
lamarax
Top Contributor
Posts: 472
Joined: Wed Nov 11, 2020 6:28 pm
Has thanked: 33 times
Been thanked: 202 times

Re: Background Music at the OSD Menu?

Unread post by lamarax »

Flandango wrote: Thu Sep 23, 2021 6:59 pm The user-startup.sh script will only run on startup of the linux os, which is during a cold-boot. Warm boots, and anybody please correct me if I'm wrong, is only the particular core in use is rebooted, therefore the script won't run.
Now what you may want to do, is write a script/daemon to monitor what core is running, if it's the main core, play the sound file, if not, stop/pause the playback.
Yep, you're exactly right. I've managed to make it work (script must reside under media/fat/linux), but only works on hard (cold) reset.

On the other hand, this is the expected behavior of a BBC micro in my posted example (Ctrl+Break=cold reboot produced the jingle, while Break alone=soft reboot would be silent).

So thank you people for another 100% accuracy milestone! :mrgreen:

this was easy
User avatar
marcelosofth
Posts: 174
Joined: Wed Sep 22, 2021 10:03 pm
Location: Brazil - São Paulo
Has thanked: 8 times
Been thanked: 4 times
Contact:

Re: Background Music at the OSD Menu?

Unread post by marcelosofth »

Did anyone manage to put background music on Mister's OSD?
Post Reply