LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   startup/boot tunes (grub2_init-tune) share your knowdegle please! (https://www.linuxquestions.org/questions/linux-software-2/startup-boot-tunes-grub2_init-tune-share-your-knowdegle-please-4175423709/)

Master_CAPS 08-23-2012 09:31 PM

startup/boot tunes (grub2_init-tune) share your knowdegle please!
 
All I could find is mario, starwars, wolfstein3d.... Basically nerdy overplayed stuff.

Oddly I searched all over google but I guess this init tune in grub isnt a very big deal to people so I came here in hope of seeking more tunes or how I could convert notes to frequcies.

I also found a script to "test" the tunes in a terminal, but it doesnt work for me: (all I can do is keep trying and rebooting to hear my tunes)

Code:

#!/bin/dash

if [ $# -lt 3 ]; then
    echo "Usage: $0 tempo freq dur [freq dur freq dur...]" >&2
    exit 1
fi

tempo=$1; shift

tmpdir=$(mktemp -d)

while [ -n "$*" ]; do
    freq=$1; shift
    dur=$1;  shift
    dur=$(echo "$dur*(60/$tempo)"|bc -l)
    sox -U -r 8000 -n -t raw - synth $dur sine $freq >>$tmpdir/grubtune.ul
done

play -q -c1 -r 8000 $tmpdir/grubtune.ul

rm -r $tmpdir


PTrenholme 08-23-2012 10:42 PM

I just tried that script on a couple "tunes" I found on-line, and it worked fine.

Note that the next-to-last command is play, so naming the script "play" and making it executable and in you $PATH won't work.

Here's what I ran:

./Play 480 440 4 440 4 440 4 349 3 523 1 440 4 349 3 523 1 440 8 659 4 659 4 659 4 698 3 523 1 415 4 349 3 523 1 440 8
./Play 1000 334 1 334 1 0 1 334 1 0 1 261 1 334 1 0 1 392 2 0 4 196 2

And here's an attempt at Für Elise I found in a Ubuntu forum:
./Play 480 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 262 1 315 1 335 3 213 1 420 1 400 1 420 1 400 1 420 1 315 1 370 1 335 1 282 3 180 1 215 1 282 1 315 3 213 1 330 1 315 1 282 3

<edit>
Changing the tempo from 480 to 580 on that last one made it sound better to me . . .
</edit>


All times are GMT -5. The time now is 03:47 PM.