The fanfare before every stage, twice, as the game did.
1# Battle City: the stage-start fanfare (NES, Namco 1985), for one speaker2# https://lab.glossema.dev/play/battle-city34# Tuning: equal temperament, A4 = 440 Hz, rounded to whole hertz5:globalnotes{"C5"=523;"D5"=587;"Eb5"=622;"F5"=698;"G5"=784;"A5"=880;"Ab5"=831;"Bb5"=932;"C6"=1047};67# Clock: 120 beats per minute; every note of the figure is a sixteenth, the held notes a dotted eighth8:localbeat 500ms;9:localsixteenth($beat/ 4);10:localheld($sixteenth* 3);11:localdur{"s"=$sixteenth;"h"=$held};12:globalgap 20ms;1314# Voice: one note, then the clock; the gap after each beep lets the repeated notes articulate15:globalplaydo={16:globalnotes;17:globalgap;18:beepfrequency=($notes->$1)length=($2-$gap);19:delay$2;20}2122# Score: the rising figure (four steps, each sounded twice), the held note, three march steps, the stop23:localmelody{24"C5:s";"D5:s";"Eb5:s";"C5:s";"D5:s";"Eb5:s";25"Eb5:s";"F5:s";"G5:s";"Eb5:s";"F5:s";"G5:s";26"F5:s";"G5:s";"A5:s";"F5:s";"G5:s";"A5:s";27"Ab5:s";"Bb5:s";"C6:s";"Ab5:s";"Bb5:s";"C6:s";28"C6:h";29"C6:s";"C6:s";"C6:s";30"C6:h"31};3233# Performance: twice, a full second of silence between, as the game did on the next stage34:put"Stage";35:forstagefrom=1 to=2 do={36:if($stage> 1)do={:delay 1000ms };37:foreachstepin=$melodydo={38:localcolon[:find$step":"];39:localname[:pick$step 0 $colon];40:locallen[:pick$step($colon+ 1)[:len$step]];41 $play$name($dur->$len);42 }43}
/
NoteFreqLine
On the router: paste the script into a terminal, or upload the file and run it.