Classic Computer Magazine Archive HI-RES VOL. 1, NO. 4 / MAY/JUNE 1984 / PAGE 26

Music Theory Drills

by Duane Tutaj


Most music students can memorize the name and length of each type of rhythmic symbol. However, many have difficulty in combining the various symbols into rhythmic groups.

The third part of this series tests students by having them decide whether the value length of four notes adds up to a complete measure of music.

Previous installments set the groundwork for this segment with coverage of the names of lines and spaces as well as note and rest identification.

In order to make this drill more exciting, several graphics routines are employed to flip the rhythmic symbols in a slot machine-type action.

To succeed in this lesson, the student should not only know how to recognize the various kinds of notes and rests, but also how to determine the length of each note or rest in various time signatures.

Student input is very simple and requires only typing Y or N during the course of the drill. There are four levels of difficulty and the student may choose to have 10, 15 or 20 questions in each drill. If a student needs help in recalling the correct amount of beats for a given note or rest, a press of the H key will generate a series of help screens.

The program begins by displaying the two title screens and playing another variation of the arcade song. The music is followed by a short delay while machine language routines are read into memory. The instructions include a display of all the notes and rests that are used in the drill as well as the help screens that contain the various rhythmic values of the different notes and rests in the time signatures of 4/4, 2/2, and 6/8.

The next screen gives the user the choice of how many questions will be in the drill. This is followed by the main menu.

There are four levels in this drill: level one is 4/4 time; level two is 2/2 or cut time; level three is slow 6/8 time; level four is a combination of the previous three levels. Selections are entered by pushing the SELECT key until a choice appears on the screen. After choosing a level, the game will begin by holding down the START key.

A jump to a graphic screen will take place and the appropriate time signature will be drawn along with four rhythm symbols. The four rhythm symbols will flash in slot machine fashion and generate various clicks. Slowly, each symbol will stop until all four are displayed.

At this time, the drill will ask for the student to identify a complete measure with a Y or N depending on whether a complete measure is displayed. If a key other than Y or N is pressed, a short message will appear, followed by the chance to again enter an answer. If the answer is correct, a pleasant beep is heard. An incorrect answer brings a buzz.

The answer is tabulated and a check is made to see if there are any more questions left in the drill. If there are more questions, another four symbols will appear and begin flipping. If there are no more questions, a new screen showing the score will appear followed by a short message.

Many additions can be made to this program in order to test students on other aspects of rhythmic values. Having the student input the amount of beats that show on the screen is possible. Another choice could be flipping the symbols until the student presses the right key to match a symbol with its value. Correct and incorrect messages could be added, as well as a timed input routine. Also 3/4, 2/4 and fast 6/8 time could be added.

Obviously, a educational-type program is rarely finished. Just as teachers constantly update their lesson plans each week, educational programmers must strive to cover all aspects of a subject. This program is simply the start of that search.

Program Description

The program starts by initializing several string variables and an array for the arcade music. Values also are set for several counters. Line 45 jumps over line 50 to 59. Lines 50 to 59 were placed at the beginning because they are called up so often. If they were in the main loop at line 600, there would be slower execution of the program.

Line 60 jumps to line 2000, which calls the title screens,and arcade music at lines 20000 to 26000.

The data in lines 65 to 81 contain the notes for the music and must be placed in the program to give the correct speed of the play loop. Experiment with this concept by retyping lines 65 to 81 elsewhere in the program. Set the RESTORE statement in line 25010 and run the program. At this point, the music slows. Since there is no delay loop built into the arcade music section, it is necessary to place the data in the correct spot to achieve the desired speed.

After the title screens are displayed and the music stops, there is a short delay while the machine language routines are read into various string variables. Lines 200 to 480 contain these routines. Line 2300 clears the screen and sets the background color. Lines 2310 to 2350 ask for the instructions. If Y is pressed, a jump to the instructions at line 10000 is made. If N is pressed, then the amount of questions is asked for. The variable ATTEMPTS is set and all the counters are cleared in line 2350.

Remember, always POKE 764 with 255 before a GET command is executed. If this is not done, the program will place a value in the GET variable if a key had been inadvertently depressed since the last GET command. Take out the POKE 764,255 and experiment.

Lines 2360 to 2465 contain the Menu screen. In lines 2465 to 2490, the program reads the console keys and changes the level whenever SELECT is depressed. If the START key is depressed, the program goes on to line 2500 -- which call the graphics screen and jumps to the main loop in line 608.

Lines 600 to 713 contain the main loop where all the action takes place . The first call starts at line 608. Here, GOSUB to line 3000 and get the correct time signature drawn to the screen from lines 3000 to 3059.

On the return, the amount of symbol flipping is selected by a random number. Each of the four symbols has a different number count and this is decreased in line 610. A check is made in line 611 to see if the first symbol has stopped flipping. If not, the program checks to see if this is 6/8 time and if so, it limits the kinds of symbols that can be selected. If it is not 6/8 time, any of 14 choices can be made. A short GOSUB to line 1000 gets the correct symbol and draws it to the screen with a USR command. A click is made and then a check of the next symbol.

This loop repeats until all four symbols have been selected and printed to the screen. Lines 1500 to 1980 contain the section where the last symbol is chosen and printed. This routine had to be added since the odds favored that there was usually not a full measure. By careful selection of the last symbol, the odds of a complete or incomplete measure is now about 50-50.

Next, the symbols are given beat values and added. The program jumps to line 600 and asks if this is a full measure. There is a check for only the H, Y or N keys. Upon input, the program jumps to the correct section and checks the answer or prints the HELP screens.


Variable Table

Temporary variables
Input variables
Screen variables
Score variables
Sound variables
Message variables
Image variables
Z,I,A,WW4,V,T1-T4,W1-W4
K,KEY,FM,ATTEMPTS,MENU,TS
X,Y
C,ATT,W,SCORE,TOTAL,BEAT,H
YY(4)
F$,F1$,BL$
I1$-I7$,I1-I7,E$,E


Line 606 checks for end of drill at lines 4000 to 4520. Line 607 goes to line 950 and clears the symbols and returns.

Line 900 is the end sound of the flipping symbols. It also turns off all the other voices.

Lines 4000 to 4520 check for end of drill and display the final screen with an appropriate message. Lines 10000 to 10180 contain the instructions while lines 10200 to 10320 display each symbol and its name.

Lines 10400 to 10680 are the HELP screens and print the correct beat values of each type of note in the various time signatures.

Lines 20000 to 25320 are the title screens and arcade music loop discussed in the previous installments.

Editor's note: If you have enjoyed the past three articles and wish to see other areas of music theory or sound covered, please write to Duane Tutaj in care of Hi-Res Magazine, 280 W. Canton Ave., Suite 310, Winter Park, Fla., 32789.

Listing: MUSICDR3.BAS Download