The title theme — the first melody a PC speaker ever sang — back on a speaker.
1# Prince of Persia (1989): the title theme, for one speaker2# https://lab.glossema.dev/play/prince-of-persia3# G minor with the raised seventh, the augmented second Eb to F#; every ornament a4# semitone above its note. Sixteenth = 180ms, quarter = 720ms: the slow strain at5# about 83 bpm, the Dance at twice that, its eighth the Title's sixteenth.67:locals 180ms;89:globalnotes{10"C4"=262;"D4"=294;"G4"=392;"Ab4"=415;"A4"=440;"Bb4"=466;"B4"=494;11"C5"=523;"C#5"=554;"D5"=587;"Eb5"=622;"E5"=659;"F5"=698;"F#5"=740;12"G5"=784;"Ab5"=831;"A5"=880;"B5"=98813};1415# g = grace, t = the quick repeated note, s e d q = sixteenth eighth dotted-eighth quarter,16# l = quarter and a sixteenth, dq = dotted quarter17:globaldurs{18"g"=($s/ 3);19"t"=($s/ 2);20"s"=$s;21"e"=($s* 2);22"d"=($s* 3);23"q"=($s* 4);24"l"=($s* 5);25"dq"=($s* 6)26};2728# $play "NOTE:dur" sounds one note; "-" is a rest29:globalplaydo={30:globalnotes;31:globaldurs;32:localcut[:find$1":"];33:localnote[:pick$1 0 $cut];34:localkey[:pick$1($cut+ 1)[:len$1]];35:locallen($durs->$key);36:if($note!="-")do={37:beepfrequency=($notes->$note)length=$len;38 }39:delay($len+ 20ms);40}4142# 1. Title: the slow strain, long-short-short-short-long-long, each turn a grace above its note;43# then the answer, the turns written out, down to the long G44:put"Title";45:localtitle{46"-:s";47"C4:d";"G4:s";"G4:s";"G4:s";"Ab4:g";"G4:d";"G4:d";"C#5:g";48"C5:d";"G4:s";"G4:s";"G4:s";"C5:d";"C#5:s";"E5:s";"C#5:s";"C5:d";49"G4:s";"G4:s";"G4:s";"Ab4:g";"G4:d";"G4:d";"F#5:g";50"F5:d";"C5:s";"C5:s";"C5:s";"F5:d";"F#5:s";"A5:s";"F#5:s";"F5:d";51"C5:s";"C5:s";"C5:s";"C#5:g";"C5:q";"C5:dq";"C5:s"52};53:foreachnin=$titledo={$play$n;}54:localanswer{55"A4:q";"A4:dq";"A4:t";"A4:t";"A4:t";"A5:q";56"D5:l";"Eb5:s";"F#5:s";"Eb5:s";"D5:d";"Eb5:t";"F#5:t";"Eb5:t";"D5:q";57"G5:l";"Ab5:s";"B5:s";"Ab5:s";"G5:q";58"G4:l";"Ab4:s";"B4:s";"Ab4:s";"G4:dq";"G4:e";"-:e"59};60:foreachnin=$answerdo={$play$n;}6162# 2. Dance: the same strains in even notes at twice the speed, then the finale's run up to G63:put"Dance";64:localdance{65"G4:s";"G4:s";"G4:s";"C5:s";"C#5:s";"E5:s";"C#5:s";"C5:s";66"C5:s";"C5:s";"C5:s";"F5:s";"F#5:s";"A5:s";"F#5:s";"F5:s";67"A4:s";"A4:s";"A4:s";"A5:s";"D5:s";"Eb5:s";"F#5:s";"Eb5:s";68"D5:s";"Eb5:s";"F#5:s";"Eb5:s";"D5:s";"C5:s";"Bb4:s";"A4:s";69"D4:s";"G4:s";"C5:s";"Bb4:s";"G4:s";"D4:s";"G4:s";"Bb4:s";70"Eb5:s";"D5:s";"Bb4:s";"G4:s";"A4:s";"D5:s";"F#5:s";"G5:e";71"-:e"72};73:foreachnin=$dancedo={$play$n;}7475# 3. Title again: the slow strain once more, and the cadence: the turn on G high, then low76:put"Title again";77:foreachnin=$titledo={$play$n;}78:localcadence{79"G5:l";"Ab5:s";"B5:s";"Ab5:s";"G5:q";80"G4:l";"Ab4:s";"B4:s";"Ab4:s";"G4:dq";"G4:e"81};82:foreachnin=$cadencedo={$play$n;}
/
NoteFreqLine
On the router: paste the script into a terminal, or upload the file and run it.