--- title: "Musical Keys" id: 72704 type: "computer_media" slug: "musical-keys" url: "http://localhost/computer_media/musical-keys/" markdown_url: "http://localhost/computer_media/musical-keys.md" published_at: "2026-10-26T23:19:30+00:00" modified_at: "2026-10-26T23:19:30+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/musicalkeys-1.png" excerpt: "A music-theory quiz that asks which major key has a given number of sharps or flats, then lists them in order." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Peter Ross" slug: "peter-ross" taxonomy: "indiv" url: "http://localhost/indiv/peter-ross/" genre: - name: "Music" slug: "music" taxonomy: "genre" url: "http://localhost/type/music/" media_type: "Program" programmers: - name: "Peter Ross" slug: "peter-ross" taxonomy: "indiv" url: "http://localhost/indiv/peter-ross/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Musical%20Keys%20%28198x%29%28Ross%2C%20Peter%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "Musical Keys (198x)(Ross, Peter)(TS2068)(US)(Program)/Musical Keys (198x)(Ross, Peter)(TS2068)(US)(Program).tap" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/10/musicalkeys-1.png" - url: "http://localhost/wp-content/uploads/2026/10/musicalkeys-3.png" - url: "http://localhost/wp-content/uploads/2026/10/musicalkeys-4.png" media_type_tags: "Music" license: false --- # Musical Keys Musical Keys tests your knowledge of key signatures. Each question picks one to seven sharps or flats at random and asks which key has that signature; you type the key, such as F, B FLAT or F SHARP. A right answer flashes and plays a rising and falling sweep, a wrong one a low tone, and either way the program then names the key and lists its sharps or flats in order, with a flat sign drawn as a user-defined graphic. The opening screen reads “MUSIC QUIZ – created by Peter Ross with the aid of Jerry Alexandros”, followed by “THE ROSS LEARNING SYSTEM – MUSICAL KEYS”. Sound is by BEEP only. ## Program Analysis ### Program Structure - Line 1 sets CAPS LOCK (`POKE 23658,8`), shows the credit (8000) and defines UDG `F` as a flat sign. - Lines 200–900 pick the question, look up the answer in the IF chain at 5500–6200 and mark the reply. - Lines 1000–1600 read the sharps (F#, C#, G#…) or flats from DATA at 2000 and print them. ### Potential Issues - Line 150 shows the score if `INKEY$` is the STOP character, but it is checked only once per question, before the INPUT, so it is very hard to reach. This copy comes from a Larken disk, the TTSUC library disk “Music and Sound”. It was converted for tape (the disk command was removed from the save line) and tested in ZEsarUX. ## Source Code ``` 1 POKE 23658,8: RANDOMIZE : GO SUB 8000: LET L=0: LET U=1: FOR K=0 TO 7: READ E: POKE USR "F"+K,E: NEXT K 2 DATA 0,64,64,112,80,96,64,0 5 PAPER 5: INK 2: PRINT FLASH 1;AT 8,6;"THE ROSS LEARNING SYSTEM": FLASH 0: PRINT INK 0;AT 11,11;"MUSICAL KEYS": PAUSE 375 10 PAPER 1: INK 7: BORDER 0: CLS 100 CLS 150 IF INKEY$=CHR$ 226 THEN CLS : PRINT AT 11,6;"YOU HAVE SCORED ";L;" OUT OF ";U;" CORRECTLY.": STOP 200 LET A2=INT (RND*7)+1 300 LET A1=INT (RND*2)+1 400 IF A1=2 THEN LET E$="SHARP(S)": GO TO 550 500 LET E$="FLAT(S)" 550 GO SUB 5500 600 PRINT AT 9,3;"QUESTION #";U;AT 11,3;"WHAT KEY HAS ";A2;" ";E$;" IN IT'S KEY SIGNATURE?" 700 INPUT G$ 800 IF G$=C$ THEN CLS : LET L=L+1: PRINT FLASH 1;AT 11,6;" YOU ARE CORRECT": FOR F=-60 TO 60: BEEP .001,-F: BEEP .001,F: NEXT F: PRINT : PAUSE 50: CLS : FLASH 0: GO TO 1000 900 CLS : PRINT AT 8,6;" YOU ARE MISTAKEN": PRINT : BEEP 1,-10: PAUSE 75: CLS 1000 LET U=U+1: PRINT AT 10,3;" THE KEY OF ";C$;" CONTAINS ";A2;" ";E$: PRINT "THEY ARE:" 1005 LET D=1 1100 IF A1=1 THEN LET A2=A2+7: LET D=D+7 1200 LET Y=12 1300 FOR X=D TO A2: LET Y=Y+1 1400 READ A,Z$: IF AA THEN GO TO 1400 1410 PRINT INVERSE 1;AT Y,16;Z$: INVERSE 0 1500 NEXT X 1600 RESTORE 2000: PRINT AT 20,3;"PRESS ANY KEY TO CONTINUE": PAUSE 0: GO TO 100 2000 DATA 1,"F#",2,"C#",3,"G#",4,"D#",5,"A#",6,"E#",7,"B#",8,"Bf",9,"Ef",10,"Af",11,"Df",12,"Gf",13,"Cf",14,"Ff" 5500 IF A2=1 AND A1=1 THEN LET C$="F": RETURN 5550 IF A2=1 AND A1=2 THEN LET C$="G": RETURN 5600 IF A2=2 AND A1=1 THEN LET C$="B FLAT": RETURN 5650 IF A2=2 AND A1=2 THEN LET C$="D": RETURN 5700 IF A2=3 AND A1=1 THEN LET C$="E FLAT": RETURN 5750 IF A2=3 AND A1=2 THEN LET C$="A": RETURN 5800 IF A2=4 AND A1=1 THEN LET C$="A FLAT": RETURN 5850 IF A2=4 AND A1=2 THEN LET C$="E": RETURN 5900 IF A2=5 AND A1=1 THEN LET C$="D FLAT": RETURN 5950 IF A2=5 AND A1=2 THEN LET C$="B": RETURN 6000 IF A2=6 AND A1=1 THEN LET C$="G FLAT": RETURN 6100 IF A2=6 AND A1=2 THEN LET C$="F SHARP": RETURN 6150 IF A2=7 AND A1=1 THEN LET C$="C FLAT": RETURN 6200 IF A2=7 AND A1=2 THEN LET C$="C SHARP": RETURN 8000 PAPER 5: BORDER 1: INK 0: CLS 8001 PRINT AT 11,11; FLASH 1;"MUSIC QUIZ"; FLASH 0;AT 20,0; INVERSE 1;"CREATED BY PETER ROSS WITH THE AID OF JERRY ALEXANDROS "; INVERSE 0 8002 PAUSE 200: CLS : RETURN 9997 STOP 9998 SAVE "MuQuiz.B1" LINE 1 ```