very nice
Maybe Ill use that in a loop for customers who dont pay on time
VERY NICE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!A few people from my training class, including normis , wanted me to post the Super Mario theme I was working on during my stay for the Essentials training (I did pay attention, mind you ), so here it is. It's a bit rough since it is off my memory instead of calculating the actual frequencies for the notes, so I will find those later. It's up on the wiki here:
http://wiki.mikrotik.com/wiki/Super_Mario_Theme
In the future, I'm going to be working on accurate frequencies with all of the popular Super Mario music so you all can show off your MikroTiks with the awesome beep scripts!
:local song "370,175,200,370,175,3400,440,175,200,440,175,600,330,175,200, \
330,175,600,370,175,200,370,175,1400,587,175,200,587,175,600, \
330,175,200,330,175,600,370,175,200,370,175,200,554,175,200, \
370,175,200,587,175,200,370,175,200,554,175,200,370,175,200, \
494,175,200,440,175,200,415,175,200,440,175,200,494,175,200, \
440,175,200,415,175,200,330,175,200,370,175,200,370,175,200, \
554,175,200,370,175,200,587,175,200,370,175,200,554,175,200, \
370,175,200,494,175,200,440,175,200,415,175,200,440,175,200, \
494,175,200,440,175,200,415,175,200,330,175,200,370,175,200, \
370,175,200,554,175,200,370,175,200,587,175,200,370,175,200, \
554,175,200,370,175,200,494,175,200,440,175,200,415,175,200, \
440,175,200,494,175,200,440,175,200,415,175,200,330,175,200, \
370,175,200,370,175,200,554,175,200,370,175,200,587,175,200, \
370,175,200,554,175,200,494,175,200,587,775,800,330,775,800, \
440,175,200,440,75,100,440,75,100,880,175,200,440,75,100,440, \
75,100,440,75,100,440,75,100,784,175,200,440,75,100,440,75, \
100,440,75,100,440,75,100,740,175,200,440,75,100,440,75,100, \
440,75,100,440,75,100,659,575,600,392,75,100,415,75,100,440, \
175,200,440,175,200,440,75,100,440,75,100,880,175,200,440,75, \
100,440,75,100,440,75,100,440,75,100,784,175,200,440,75,100, \
440,75,100,440,75,100,440,75,100,740,175,200,440,75,100,440, \
75,100,440,75,100,440,75,100,659,575,600,440,375,400,659,175, \
200,554,575,2000,554,175,200,494,175,200,440,175,200,440,175, \
200,440,375,400,494,175,200,554,375,2800,880,175,200,880,175, \
200,880,175,200,740,375,400,659,575,1200,659,175,200,740,175, \
200,659,175,200,659,175,200,587,375,400,659,175,200,587,175, \
200,554,175,200,440,775,2400,659,175,200,554,575,2000,494, \
175,200,494,175,200,440,375,400,440,375,400,494,175,200,554, \
375,2600,880,175,200,880,175,200,880,175,200,880,175,200,740, \
175,200,659,375,1200,659,175,200,659,175,200,740,175,200,659, \
175,200,659,175,200,587,375,400,659,175,200,587,175,200,554, \
175,200,440,775,800"
:set song [ :toarray $song ]
:for i from=0 to=( [ :len $song ] - 3) step=3 do={
:local freq [ :tonum [ :pick $song $i ] ]
:local length ( [ :tostr [ :pick $song ( $i + 1 ) ] ] . "ms" )
:local pause ( [ :tostr [ :pick $song ( $i + 2 ) ] ] . "ms" )
:put ":beep frequency=$freq length=$length"
:beep frequency=$freq length=$length
:put ":delay $pause"
:delay $pause
}
start with "lady gaga you and i"Give me a song request, and you got it.
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 600ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 600ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=783 length=150ms
:delay 300ms;
:beep frequency=523 length=150ms
:delay 300ms;
:beep frequency=587 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 750ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=698 length=300ms
:delay 450ms;
:beep frequency=698 length=225ms
:delay 150ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=659 length=225ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 525ms;
:beep frequency=659 length=225ms
:delay 125ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=587 length=150ms
:delay 300ms;
:beep frequency=587 length=150ms
:delay 300ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=587 length=750ms
:delay 675ms;
:beep frequency=783 length=525ms
:delay 750ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 600ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 600ms;
:beep frequency=659 length=150ms
:delay 300ms;
:beep frequency=783 length=150ms
:delay 300ms;
:beep frequency=523 length=150ms
:delay 300ms;
:beep frequency=587 length=150ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 750ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=698 length=300ms
:delay 450ms;
:beep frequency=698 length=225ms
:delay 150ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=659 length=225ms
:delay 300ms;
:beep frequency=659 length=300ms
:delay 525ms;
:beep frequency=659 length=150ms
:delay 125ms;
:beep frequency=783 length=150ms
:delay 300ms;
:beep frequency=783 length=150ms
:delay 300ms;
:beep frequency=698 length=150ms
:delay 300ms;
:beep frequency=587 length=150ms
:delay 300ms;
:beep frequency=523 length=375ms
:delay 300ms;
:beep frequency=262 length=200ms;
:delay 200ms;
:beep frequency=523 length=200ms;
:delay 200ms;
:beep frequency=220 length=200ms;
:delay 200ms;
:beep frequency=440 length=200ms;
:delay 200ms;
:beep frequency=233 length=200ms;
:delay 200ms;
:beep frequency=466 length=200ms;
:delay 200ms;
:delay 1200ms;
:beep frequency=262 length=200ms;
:delay 200ms;
:beep frequency=523 length=200ms;
:delay 200ms;
:beep frequency=220 length=200ms;
:delay 200ms;
:beep frequency=440 length=200ms;
:delay 200ms;
:beep frequency=233 length=200ms;
:delay 200ms;
:beep frequency=466 length=200ms;
:delay 200ms;
:delay 1200ms;
:beep frequency=175 length=200ms;
:delay 200ms;
:beep frequency=349 length=200ms;
:delay 200ms;
:beep frequency=147 length=200ms;
:delay 200ms;
:beep frequency=294 length=200ms;
:delay 200ms;
:beep frequency=156 length=200ms;
:delay 200ms;
:beep frequency=311 length=200ms;
:delay 200ms;
:delay 1200ms;
:beep frequency=175 length=200ms;
:delay 200ms;
:beep frequency=349 length=200ms;
:delay 200ms;
:beep frequency=147 length=200ms;
:delay 200ms;
:beep frequency=294 length=200ms;
:delay 200ms;
:beep frequency=156 length=200ms;
:delay 200ms;
:beep frequency=311 length=200ms;
:delay 200ms;
:delay 800ms;
:beep frequency=311 length=133ms;
:delay 133ms;
:beep frequency=294 length=133ms;
:delay 133ms;
:beep frequency=277 length=133ms;
:delay 133ms;
:beep frequency=262 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=311 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=294 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=208 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=196 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=277 length=200ms;
:delay 200ms;
:delay 200ms;
:beep frequency=262 length=133ms;
:delay 133ms;
:beep frequency=370 length=133ms;
:delay 133ms;
:beep frequency=349 length=133ms;
:delay 133ms;
:beep frequency=330 length=133ms;
:delay 133ms;
:beep frequency=466 length=133ms;
:delay 133ms;
:beep frequency=440 length=133ms;
:delay 133ms;
:beep frequency=415 length=133ms;
:delay 133ms;
:delay 133ms;
:beep frequency=311 length=133ms;
:delay 133ms;
:delay 133ms;
:beep frequency=247 length=133ms;
:delay 133ms;
:delay 133ms;
:beep frequency=233 length=133ms;
:delay 133ms;
:delay 133ms;
:beep frequency=220 length=133ms;
:delay 133ms;
:delay 133ms;
:beep frequency=208 length=133ms;
:delay 133ms;
:delay 133ms;
If you offer a (pointer to a) MID(i) file I may try to convert them. In theory any midi file with no more than 3 main voices may be okay, and percussion isn't converted [could be simulated and I couldn't care less]. Complex midi files require more fiddling and I am not supposed to spend too much time, but I can check.Could someone make scripts that play Fate of the Fairies, Ancient Makes, Silver Will, Challenger Invited, and The Merciless Savior (they are all themes from the Legend of Heroes: Trails in the Sky First Chapter and Legend of Heroes: Trails in the Sky Second Chapter). Thanks in advance.
I only found two of the BGMs in question as MIDI files They are attached as a zip file.If you offer a (pointer to a) MID(i) file I may try to convert them. In theory any midi file with no more than 3 main voices may be okay, and percussion isn't converted [could be simulated and I couldn't care less]. Complex midi files require more fiddling and I am not supposed to spend too much time, but I can check.Could someone make scripts that play Fate of the Fairies, Ancient Makes, Silver Will, Challenger Invited, and The Merciless Savior (they are all themes from the Legend of Heroes: Trails in the Sky First Chapter and Legend of Heroes: Trails in the Sky Second Chapter). Thanks in advance.
It's still :beep (just remember about the colon before beep).whet is the right command to launch a beep from new terminal emulator at router board 912
:local E4 329;
:local F4 349;
:local G4 392;
:local A4 440;
:local B4 478;
:local H4 497;
:local C5 508;
:local CIS5 539;
:local D5 580;
:local DIS5 620;
:local E5 650;
:local F5 695;
:local FIS5 723;
:local G5 760;
:local AS5 850;
:local A5 880;
:local ONE "200ms";
:local DBL "400ms";
:local DBLD "500ms";
:local TRI "600ms";
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$A4 l=$ONE; :delay $ONE;
:beep f=$A4 l=$ONE; :delay $ONE;
:beep f=$A4 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$E4 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$E4 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:delay $TRI;
:beep f=$E5 l=$DBLD; :delay $TRI;
:beep f=$E5 l=$ONE; :delay $ONE;
:beep f=$E5 l=$ONE; :delay $ONE;
:beep f=$E5 l=$ONE; :delay $ONE;
:beep f=$E5 l=$DBLD; :delay $TRI;
:beep f=$F5 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$E4 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:delay $TRI;
:beep f=$A5 l=$TRI; :delay $TRI;
:delay $DBL;
:beep f=$A4 l=$ONE; :delay $ONE;
:beep f=$A5 l=$TRI; :delay $TRI;
:beep f=$AS5 l=$DBL; :delay $DBL;
:beep f=$G5 l=$ONE; :delay $ONE;
:beep f=$FIS5 l=$ONE; :delay $ONE;
:beep f=$F5 l=$ONE; :delay $ONE;
:beep f=$FIS5 l=$ONE; :delay $ONE;
:delay $DBL;
:beep f=$B4 l=$ONE; :delay $ONE;
:beep f=$DIS5 l=$TRI; :delay $TRI;
:beep f=$D5 l=$DBL; :delay $DBL;
:beep f=$CIS5 l=$ONE; :delay $ONE;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$H4 l=$ONE; :delay $ONE;
:beep f=$C5 l=$ONE; :delay $ONE;
:delay $DBL;
:beep f=$E4 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$E4 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:beep f=$E4 l=$DBL; :delay $DBL;
:beep f=$C5 l=$ONE; :delay $ONE;
:beep f=$A4 l=$DBLD; :delay $TRI;
:local A3 220;
:local H3 246;
:local C4 258;
:local D4 293;
:local E4 329;
:local F4 349;
:local G4 392;
:local A4 440;
:local H4 497;
:local C5 508;
:local D5 580;
:local E5 650;
:local F5 695;
:local FN "250ms";
:local HN "125ms";
:local DN "500ms";
:local NN "75ms";
:local HND "187ms";
:local FND "375ms";
:local FNMD "330ms";
:for a from=1 to=2 do={
:beep f=$C5 l=$HND; :delay $FN;
:beep f=$H4 l=$HND; :delay $FN;
:beep f=$G4 l=$HND; :delay $FN;
:beep f=$A4 l=$FN; :delay $DN;
:beep f=$E4 l=$FN; :delay $DN;
:beep f=$A4 l=$HN; :delay $FN;
:beep f=$E4 l=$HN; :delay $HN;
:beep f=$A4 l=$HN; :delay $FN;
:beep f=$A4 l=$HN; :delay $HN;
:beep f=$C5 l=$HN; :delay $FN;
:beep f=$D5 l=$FN; :delay $DN;
:beep f=$A4 l=$FN; :delay $DN;
:beep f=$D5 l=$HN; :delay $FN;
:beep f=$A4 l=$HN; :delay $HN;
:beep f=$D5 l=$HN; :delay $FN;
:beep f=$D5 l=$HN; :delay $HN;
:beep f=$F5 l=$HN; :delay $FN;
:beep f=$E5 l=$FN; :delay $DN;
:beep f=$H4 l=$FN; :delay $DN;
:beep f=$E5 l=$HN; :delay $FN;
:beep f=$H4 l=$HN; :delay $HN;
:beep f=$E5 l=$HN; :delay $FN;
:beep f=$E5 l=$HN; :delay $HN;
:beep f=$H4 l=$HN; :delay $FN;
:beep f=$A4 l=$HND; :delay $FN;
:beep f=$A4 l=$HND; :delay $FN;
:beep f=$E4 l=$HN; :delay $FN;
:beep f=$G4 l=$HN; :delay $HN;
:beep f=$A4 l=$HND; :delay $FND;
}
##
### (c)Peter 'grin' Gervai, 2017
##
## CC_BY-SA-4.0 / GPLv3+
##
:local chan1 "880,2,0,1,880,2,0,4,880,2,0,4,698,2,0,1,880,2,0,4,1047,2,0,22,698,2,0,7,523,2,0,7,440,2,0,7,587,2,0,4,659,2,0,4,622,2,0,1,587,2,0,4,523,2,0,2,880,2,0,2,1047,2,0,2,1175,2,0,4,932,2,0,1,1047,2,0,4,880,2,0,4,698,2,0,1,784,2,0,1,659,2,0,7,698,2,0,7,523,2,0,7,440,2,0,7,587,2,0,4,659,2,0,4,622,2,0,1,587,2,0,4,523,2,0,2,880,2,0,2,1047,2,0,2,1175,2,0,4,932,2,0,1,1047,2,0,4,880,2,0,4,698,2,0,1,784,2,0,1,659,2,0,13,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,554,2,0,1,587,2,0,1,698,2,0,4,587,2,0,1,698,2,0,1,784,2,0,7,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,1397,2,0,4,1397,2,0,1,1397,2,0,16,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,554,2,0,1,587,2,0,1,698,2,0,4,587,2,0,1,698,2,0,1,784,2,0,7,831,2,0,7,784,2,0,7,698,2,0,28,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,554,2,0,1,587,2,0,1,698,2,0,4,587,2,0,1,698,2,0,1,784,2,0,7,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,1397,2,0,4,1397,2,0,1,1397,2,0,16,1047,2,0,1,988,2,0,1,932,2,0,1,831,2,0,4,880,2,0,4,554,2,0,1,587,2,0,1,698,2,0,4,587,2,0,1,698,2,0,1,784,2,0,7,831,2,0,7,784,2,0,7,698,2,0,22,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,4,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,1,880,2,0,25,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,4,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,880,2,0,1,880,2,0,4,880,2,0,4,698,2,0,1,880,2,0,4,1047,2,0,22,698,2,0,7,523,2,0,7,440,2,0,7,587,2,0,4,659,2,0,4,622,2,0,1,587,2,0,4,523,2,0,2,880,2,0,2,1047,2,0,2,1175,2,0,4,932,2,0,1,1047,2,0,4,880,2,0,4,698,2,0,1,784,2,0,1,659,2,0,7,698,2,0,7,523,2,0,7,440,2,0,7,587,2,0,4,659,2,0,4,622,2,0,1,587,2,0,4,523,2,0,2,880,2,0,2,1047,2,0,2,1175,2,0,4,932,2,0,1,1047,2,0,4,880,2,0,4,698,2,0,1,784,2,0,1,659,2,0,7,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,2,1175,2,0,2,1175,2,0,2,1175,2,0,2,1047,2,0,2,932,2,0,2,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,1,932,2,0,4,932,2,0,1,932,2,0,2,880,2,0,2,784,2,0,2,698,2,0,22,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,2,1175,2,0,2,1175,2,0,2,1175,2,0,2,1047,2,0,2,932,2,0,2,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,1,932,2,0,4,932,2,0,1,932,2,0,2,880,2,0,2,784,2,0,2,698,2,0,22,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,4,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,1,880,2,0,25,698,2,0,1,698,2,0,4,698,2,0,4,698,2,0,1,784,2,0,4,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,880,2,0,1,880,2,0,4,880,2,0,4,698,2,0,1,880,2,0,4,1047,2,0,22,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,2,1175,2,0,2,1175,2,0,2,1175,2,0,2,1047,2,0,2,932,2,0,2,880,2,0,1,698,2,0,4,587,2,0,1,523,2,0,10,880,2,0,1,698,2,0,4,523,2,0,7,554,2,0,4,587,2,0,1,932,2,0,4,932,2,0,1,587,2,0,10,659,2,0,1,932,2,0,4,932,2,0,1,932,2,0,2,880,2,0,2,784,2,0,2,698,2,"
:local chan2 "494,2,0,1,494,2,0,4,494,2,0,4,494,2,0,1,494,2,0,4,659,2,0,10,523,2,0,10,440,2,0,7,349,2,0,7,262,2,0,7,349,2,0,4,392,2,0,4,370,2,0,1,349,2,0,4,349,2,0,2,523,2,0,2,659,2,0,2,698,2,0,4,587,2,0,1,659,2,0,4,587,2,0,4,440,2,0,1,466,2,0,1,392,2,0,7,440,2,0,7,349,2,0,7,262,2,0,7,349,2,0,4,392,2,0,4,370,2,0,1,349,2,0,4,349,2,0,2,523,2,0,2,659,2,0,2,698,2,0,4,587,2,0,1,659,2,0,4,587,2,0,4,440,2,0,1,466,2,0,1,392,2,0,13,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,440,2,0,1,466,2,0,1,523,2,0,4,349,2,0,1,440,2,0,1,466,2,0,7,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,932,2,0,4,932,2,0,1,932,2,0,16,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,440,2,0,1,466,2,0,1,523,2,0,4,349,2,0,1,440,2,0,1,466,2,0,7,554,2,0,7,466,2,0,7,440,2,0,28,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,440,2,0,1,466,2,0,1,523,2,0,4,349,2,0,1,440,2,0,1,466,2,0,7,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,932,2,0,4,932,2,0,1,932,2,0,16,880,2,0,1,831,2,0,1,784,2,0,1,659,2,0,4,698,2,0,4,440,2,0,1,466,2,0,1,523,2,0,4,349,2,0,1,440,2,0,1,466,2,0,7,554,2,0,7,466,2,0,7,440,2,0,22,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,4,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,1,523,2,0,25,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,4,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,494,2,0,1,494,2,0,4,494,2,0,4,494,2,0,1,494,2,0,4,659,2,0,10,523,2,0,10,440,2,0,7,349,2,0,7,262,2,0,7,349,2,0,4,392,2,0,4,370,2,0,1,349,2,0,4,349,2,0,2,523,2,0,2,659,2,0,2,698,2,0,4,587,2,0,1,659,2,0,4,587,2,0,4,440,2,0,1,466,2,0,1,392,2,0,7,440,2,0,7,349,2,0,7,262,2,0,7,349,2,0,4,392,2,0,4,370,2,0,1,349,2,0,4,349,2,0,2,523,2,0,2,659,2,0,2,698,2,0,4,587,2,0,1,659,2,0,4,587,2,0,4,440,2,0,1,466,2,0,1,392,2,0,7,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,2,932,2,0,2,932,2,0,2,932,2,0,2,880,2,0,2,784,2,0,2,698,2,0,1,587,2,0,4,466,2,0,1,440,2,0,10,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,1,784,2,0,4,784,2,0,1,784,2,0,2,698,2,0,2,659,2,0,2,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,2,932,2,0,2,932,2,0,2,932,2,0,2,880,2,0,2,784,2,0,2,698,2,0,1,587,2,0,4,466,2,0,1,440,2,0,10,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,1,784,2,0,4,784,2,0,1,784,2,0,2,698,2,0,2,659,2,0,2,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,4,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,1,523,2,0,25,554,2,0,1,554,2,0,4,554,2,0,4,554,2,0,1,622,2,0,4,523,2,0,1,440,2,0,4,440,2,0,1,349,2,0,10,494,2,0,1,494,2,0,4,494,2,0,4,494,2,0,1,494,2,0,4,659,2,0,10,523,2,0,10,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,2,932,2,0,2,932,2,0,2,932,2,0,2,880,2,0,2,784,2,0,2,698,2,0,1,587,2,0,4,466,2,0,1,440,2,0,10,698,2,0,1,587,2,0,4,440,2,0,7,440,2,0,4,466,2,0,1,698,2,0,4,698,2,0,1,466,2,0,10,523,2,0,1,784,2,0,4,784,2,0,1,784,2,0,2,698,2,0,2,659,2,0,2,523,2,0,1,440,2,0,4,440,2,0,1,349,2,"
:local chan3 "196,2,0,1,196,2,0,4,196,2,0,4,196,2,0,1,196,2,0,4,523,2,0,10,262,2,0,10,262,2,0,7,220,2,0,7,175,2,0,7,233,2,0,4,262,2,0,4,247,2,0,1,233,2,0,4,220,2,0,2,349,2,0,2,440,2,0,2,466,2,0,4,392,2,0,1,440,2,0,4,349,2,0,4,294,2,0,1,330,2,0,1,262,2,0,7,262,2,0,7,220,2,0,7,175,2,0,7,233,2,0,4,262,2,0,4,247,2,0,1,233,2,0,4,220,2,0,2,349,2,0,2,440,2,0,2,466,2,0,4,392,2,0,1,440,2,0,4,349,2,0,4,294,2,0,1,330,2,0,1,262,2,0,7,175,2,0,7,262,2,0,7,349,2,0,4,233,2,0,7,349,2,0,1,349,2,0,4,233,2,0,4,175,2,0,7,220,2,0,7,262,2,0,1,349,2,0,4,1047,2,0,4,1047,2,0,1,1047,2,0,4,262,2,0,4,175,2,0,7,262,2,0,7,349,2,0,4,233,2,0,7,349,2,0,1,349,2,0,4,233,2,0,4,175,2,0,4,277,2,0,7,311,2,0,7,349,2,0,7,262,2,0,1,262,2,0,4,175,2,0,4,175,2,0,7,262,2,0,7,349,2,0,4,233,2,0,7,349,2,0,1,349,2,0,4,233,2,0,4,175,2,0,7,220,2,0,7,262,2,0,1,349,2,0,4,1047,2,0,4,1047,2,0,1,1047,2,0,4,262,2,0,4,175,2,0,7,262,2,0,7,349,2,0,4,233,2,0,7,349,2,0,1,349,2,0,4,233,2,0,4,175,2,0,4,277,2,0,7,311,2,0,7,349,2,0,7,262,2,0,1,262,2,0,4,175,2,0,4,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,196,2,0,1,196,2,0,4,196,2,0,4,196,2,0,1,196,2,0,4,523,2,0,10,262,2,0,10,262,2,0,7,220,2,0,7,175,2,0,7,233,2,0,4,262,2,0,4,247,2,0,1,233,2,0,4,220,2,0,2,349,2,0,2,440,2,0,2,466,2,0,4,392,2,0,1,440,2,0,4,349,2,0,4,294,2,0,1,330,2,0,1,262,2,0,7,262,2,0,7,220,2,0,7,175,2,0,7,233,2,0,4,262,2,0,4,247,2,0,1,233,2,0,4,220,2,0,2,349,2,0,2,440,2,0,2,466,2,0,4,392,2,0,1,440,2,0,4,349,2,0,4,294,2,0,1,330,2,0,1,262,2,0,7,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,196,2,0,7,233,2,0,1,262,2,0,4,330,2,0,4,262,2,0,4,262,2,0,4,349,2,0,1,349,2,0,1,262,2,0,4,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,262,2,0,1,262,2,0,4,262,2,0,1,262,2,0,2,294,2,0,2,330,2,0,2,349,2,0,4,262,2,0,4,175,2,0,10,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,196,2,0,7,233,2,0,1,262,2,0,4,330,2,0,4,262,2,0,4,262,2,0,4,349,2,0,1,349,2,0,1,262,2,0,4,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,262,2,0,1,262,2,0,4,262,2,0,1,262,2,0,2,294,2,0,2,330,2,0,2,349,2,0,4,262,2,0,4,175,2,0,10,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,139,2,0,7,208,2,0,7,277,2,0,4,262,2,0,7,175,2,0,7,131,2,0,4,196,2,0,1,196,2,0,4,196,2,0,4,196,2,0,1,196,2,0,4,523,2,0,10,262,2,0,10,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,196,2,0,7,233,2,0,1,262,2,0,4,330,2,0,4,262,2,0,4,262,2,0,4,349,2,0,1,349,2,0,1,262,2,0,4,175,2,0,7,247,2,0,1,262,2,0,4,349,2,0,4,233,2,0,4,233,2,0,4,349,2,0,1,349,2,0,1,233,2,0,4,262,2,0,1,262,2,0,4,262,2,0,1,262,2,0,2,294,2,0,2,330,2,0,2,349,2,0,4,262,2,0,4,175,2,"
# slot timespan (~20ms)
:local st 20
# speed (~500ms)
:local spd ( $st * 2 )
:local slotlen ($spd / $st / 3)
:local slottime ($st . "ms")
:local c1 [:toarray $chan1]
:local c2 [:toarray $chan2]
:local c3 [:toarray $chan3]
:local chan ({$c1},{$c2})
:set $chan [:put ($chan, {$c3})]
:local voice {0;0;0}
# slot left for a tune to go
:local sleft
:set $sleft {0;0;0}
# position in a channel
:local cpointer
# this should fucking zero it, why doesn't it
:set $cpointer {0;0;0}
# force it down into its throat
:for i from=0 to=2 do={
:set ($cpointer->$i) 0
:set ($sleft->$i) 0
:put ("Cpointer $i = " . ($cpointer->$i))
}
:local running 1
:do {
# prepare actual voice for every channel
:for c from=0 to=2 do={
:if ( ($sleft->$c) > 1 ) do={
# same voice
:set ($sleft->$c) (($sleft->$c) - 1)
#:put ( "keep c=$c s=" . ($sleft->$c))
} else={
# new voice
#:put (">> c=$c p=" . ($cpointer->$c) ." v=" . ($chan->$c->($cpointer->$c)))
:set ($voice->$c) ($chan->$c->($cpointer->$c))
:set ($cpointer->$c) (($cpointer->$c)+1)
#:put (">> c=$c p=" . ($cpointer->$c) ." s=" . ($chan->$c->($cpointer->$c)))
:set ($sleft->$c) ($chan->$c->($cpointer->$c))
:set ($cpointer->$c) (($cpointer->$c)+1)
:if ( $cpointer->$c > [:len ($chan->$c)] ) do={
:set $running 0
}
}
}
:for i from=0 to=$slotlen do={
:for c from=0 to=2 do={
:if ( ($voice->$c) > 0 ) do={
:beep length=$slottime frequency=($voice->$c)
}
:delay $slottime
}
}
#:set $running 0
} while=( $running = 1)
:beep frequency=783 length=175ms;
:delay 200ms;
:beep frequency=880 length=175ms;
:delay 200ms;
:beep frequency=1046 length=1175ms;
:delay 1400ms;
:beep frequency=988 length=225ms;
:delay 250ms;
:beep frequency=988 length=225ms;
:delay 250ms;
:delay 100ms;
:beep frequency=1046 length=175ms;
:delay 500ms;
:beep frequency=783 length=175ms;
:delay 200ms;
:beep frequency=880 length=175ms;
:delay 200ms;
:beep frequency=1046 length=1175ms;
:delay 1400ms;
:beep frequency=988 length=225ms;
:delay 250ms;
:beep frequency=988 length=225ms;
:delay 250ms;
:delay 100ms;
:beep frequency=1046 length=675ms;
:delay 700ms;
:local Beeps {
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 783; 150 }; 300; { 523; 400 }; 500;
{ 587; 75 }; 100; { 659; 950 };1200; { 698; 150 }; 300;
{ 698; 150 }; 300; { 698; 400 }; 500; { 698; 75 }; 100;
{ 698; 150 }; 300; { 659; 150 }; 300; { 659; 250 }; 300;
{ 659; 75 }; 150; { 659; 75 }; 150; { 659; 150 }; 300;
{ 587; 150 }; 300; { 587; 150 }; 300; { 659; 150 }; 300;
{ 587; 450 }; 600; { 783; 450 }; 600; { 659; 150 }; 300;
{ 659; 150 }; 300; { 659; 500 }; 600; { 659; 150 }; 300;
{ 659; 150 }; 300; { 659; 500 }; 600; { 659; 150 }; 300;
{ 783; 150 }; 300; { 523; 400 }; 500; { 587; 75 }; 100;
{ 659; 950 };1200; { 698; 150 }; 300; { 698; 150 }; 300;
{ 698; 400 }; 500; { 698; 75 }; 100; { 698; 150 }; 300;
{ 659; 150 }; 300; { 659; 250 }; 300; { 659; 75 }; 150;
{ 659; 75 }; 150; { 783; 150 }; 300; { 783; 150 }; 300;
{ 698; 150 }; 300; { 587; 150 }; 300; { 523; 750 };1200;
}
:foreach Beep in=$Beeps do={
:if ([ :len $Beep ] = 2) do={
:beep frequency=($Beep->0) length=(($Beep->1) . "ms")
} else={
:delay ($Beep . "ms")
}
}
{
:local Beeps {
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 783; 150 }; 300; { 523; 400 }; 500; { 587; 75 }; 100; { 659; 950 }; 1200;
{ 698; 150 }; 300; { 698; 150 }; 300; { 698; 400 }; 500; { 698; 75 }; 100;
{ 698; 150 }; 300; { 659; 150 }; 300; { 659; 250 }; 300; { 659; 75 }; 150; { 659; 75 }; 150;
{ 659; 150 }; 300; { 587; 150 }; 300; { 587; 150 }; 300; { 659; 150 }; 300; { 587; 450 }; 600; { 783; 450 }; 600;
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 659; 150 }; 300; { 659; 500 }; 600;
{ 659; 150 }; 300; { 783; 150 }; 300; { 523; 400 }; 500; { 587; 75 }; 100; { 659; 950 }; 1200;
{ 698; 150 }; 300; { 698; 150 }; 300; { 698; 400 }; 500; { 698; 75 }; 100;
{ 698; 150 }; 300; { 659; 150 }; 300; { 659; 250 }; 300; { 659; 75 }; 150; { 659; 75 }; 150;
{ 783; 150 }; 300; { 783; 150 }; 300; { 698; 150 }; 300; { 587; 150 }; 300; { 523; 750 }; 1200;
}
:foreach Beep in=$Beeps do={
:if ([ :len $Beep ] = 2) do={
:beep frequency=($Beep->0) length=(($Beep->1) . "ms")
} else={
:delay ($Beep . "ms")
}
}
}
# Jingle Bells
:local song "
659,150,300, 659,150,300, 659,500,600, 659,150,300, 659,150,300, 659,500,600,
659,150,300, 783,150,300, 523,400,500, 587,75,100, 659,950,1200, 698,150,300,
698,150,300, 698,400,500, 698,75,100, 698,150,300, 659,150,300, 659,250,300,
659,75,150, 659,75,150, 659,150,300, 587,150,300, 587,150,300, 659,150,300,
587,450,600, 783,450,600, 659,150,300, 659,150,300, 659,500,600, 659,150,300,
659,150,300, 659,500,600, 659,150,300, 783,150,300, 523,400,500, 587,75,100,
659,950,1200, 698,150,300, 698,150,300, 698,400,500, 698,75,100, 698,150,300,
659,150,300, 659,250,300, 659,75,150, 659,75,150, 783,150,300, 783,150,300,
698,150,300, 587,150,300, 523,750,1200
"
:set song [:toarray $song]
:for i from=0 to=([:len $song] - 3) step=3 do={
:beep frequency=[:tonum [:pick $song $i]] length=([:tostr [:pick $song ($i + 1)]]."ms")
:delay ([:tostr [:pick $song ($i + 2)]]."ms")
}
# Jingle Bells
:local song [:toarray "
659, 150, 300, 659, 150, 300, 659, 500, 600, 659, 150, 300, 659, 150, 300, 659, 500, 600, 659, 150, 300,
783, 150, 300, 523, 400, 500, 587, 75, 100, 659, 950,1200, 698, 150, 300, 698, 150, 300, 698, 400, 500,
698, 75, 100, 698, 150, 300, 659, 150, 300, 659, 250, 300, 659, 75, 150, 659, 75, 150, 659, 150, 300,
587, 150, 300, 587, 150, 300, 659, 150, 300, 587, 450, 600, 783, 450, 600, 659, 150, 300, 659, 150, 300,
659, 500, 600, 659, 150, 300, 659, 150, 300, 659, 500, 600, 659, 150, 300, 783, 150, 300, 523, 400, 500,
587, 75, 100, 659, 950,1200, 698, 150, 300, 698, 150, 300, 698, 400, 500, 698, 75, 100, 698, 150, 300,
659, 150, 300, 659, 250, 300, 659, 75, 150, 659, 75, 150, 783, 150, 300, 783, 150, 300, 698, 150, 300,
587, 150, 300, 523, 750,1200"]
# last delay must be immediately followed by "
:for i from=0 to=([:len $song] - 3) step=3 do={
:beep frequency=[:tonum [:pick $song $i]] length="$[:tonum [:pick $song ($i + 1)]]ms"
:delay "$[:tonum [:pick $song ($i + 2)]]ms"
}
Unfortunately :beep (or the hardware required for it) is mostly a thing of the past...