Classic Computer Magazine Archive COMPUTE! ISSUE 77 / OCTOBER 1986 / PAGE 89

Mozart Magic

James Bagley

Based on a musical game devised by the composer Mozart, this delightful program for the Commodore 128 composes its own minuets in the style of Mozart himself.

This Commodore 128 program is a translation of a game by Wolfgang Amadeus Mozart. It composes a complete, original minuet at random. Mozart delighted in games of chance, so it was only natural that he should combine his two interests and produce an activity known as Musikalisches Wuerfelspiel, or musical craps. The idea was not original with Mozart, but his effort was the most successful.

Making Music

Type in and save the program; then run it. After it plays an introduction and initializes, the program displays a menu. You can choose a different instrument for each voice, but most songs sound best if you choose the same instrument for all three voices. Some of the instruments such as the drum and xylophone may sound strange or faint; they are included for the sake of completeness, so you can hear what all the 128's instruments sound like.

The next menu allows you to change the tempo. Press F to increase the speed at which the minuet is played, press S to decrease the speed, and press E to exit the routine. The tempo always defaults to 8. The main menu reappears after the minuet is finished.

The program itself is structured to reflect the composer's original technique. Mozart set up two grids of 8 columns and 11 rows. The columns were numbered 1-8, and the rows were numbered 2-12. On the first throw of the dice, he scanned down the first column to the row numbered the same as the sum of the two die. At this intersection was a number. He then copied down a measure of music corresponding to this number and repeated the process until he reached the eighth column of the first part.

In the eighth column of the grid, each number referred to a measure of music with two sets of notes. Because the music modulated to the dominant, the lower notes served for the first ending and the upper notes were for the second ending. Since these measures were all the same, M2$(1) is used in the program for the first ending and M2$(2) for the second ending of the first part of the minuet.

Mozart Magic

For instructions on entering this listing, please refer to "COMPUTE!'s Guide to Typing In Programs" in this issue of COMPUTE!.