A series that focuses on using the popular microcomputers for making music.
The two previous editions of Electronics and Music Maker have detailed the versatile musical capabilities of the Sharp MZ-80K microcomputer. Some of the readers who purchased the Maplin cassette were quite amazed by the range of sound effects which can be programmed on the MZ-80K from Basic. The main program this month utilises the variety of note durations and the seven tempos in a unique way to make up an interesting method of learning the morse code with the assistance of a computer.
The thirty two line program takes less than 1K of memory and can be run on any Sharp MZ-80K microcomputer — regardless ot the memory size available. The dots and dashes which make up the morse code are entered as DATA statements in lines 23 to 32. Line 23 contains the code for the letters A,B,C,D and E; line 24 contains F,G,H and I; line 25 contains J,K,L,M and N; line 26 contains O,P,Q and R; line 27 contains S,T,U,V and W; line 28 contains X,Y and Z. Similarly lines 29 to 32 contain the numbers 0 to 9. It is most important that care is taken in entering these DATA lines as they define the dots and dashes which will be both displayed on the screen and heard coming from the MZ-80K speaker.
Once entered and run the program can be used to learn morse by both sight and sound. Seven different learning speeds are controlled by the TEMPO as defined in line 5 and line 7. The printing of the morse characters on the screen is achieved by reading the DATA and printing the value of C$ (line 17) and the morse sounds are generated by the MUSIC statements in lines 18 and 19. After selecting a learning speed between 1 and 7 simply enter the message you wish to hear on the MZ-80K keyboard, press the carriage return key and the morse code for your message will then be heard and displayed on the screen.
The program is quite a simple one but is capable of further expansion. The 32 line version only caters for the letters of the alphabet and for figures. Some enthusiasts may wish to expand the DATA lines and make the other appropriate changes to add punctuation marks, currency symbols, etc. It would also be possible to use the program to generate morse to feed the microphone circuits of a transmitter — morse could then be sent by simply entering the messages on the keyboard of the MZ-80K.
Readers who liked the previously published program which generated whistles, trimphone rings, engaged tones, etc have asked for guidance in using the POKE commands, and the second program shows how to control the sounds produced from the Sharp Basic for musicians to experiment with.
The program allows the user to enter a frequency in Hertz and the Sharp will then play it and display the appropriate POKE values for locations 4514 and 4513. The program will generate tones and display these values over a range from 16Hz to 3,900 Hz.
Table 1 will assist readers who are more accustomed to musical notation and the POKE values are given for 36 notes to start you off.
mu:zines is the result of thousands of hours of effort, and will require many thousands more going forward to reach our goals of getting all this content online.