Home -> Magazines -> Issues -> Articles in this issue -> View
Micro-Music | |
Music on the ScreenArticle from Electronics & Music Maker, August 1981 |
A number of readers have written in asking for an example program to be published which would draw the music on the screen and play a tune. The program printed draws the stave and the notes of the beginning of the tune "Amazing Grace" and as the tune starts the appropriate notes light up as they play. The printout from the screen shown in Figure 1 illustrates the type of display you can expect to see on the Sharp MZ-80K microcomputer.
The MZ-80K screen display is made up of 25 lines of 40 characters thus giving a possible 1,000 characters on the screen. Each character is made up of an 8x8 dot matrix and, using the SET and RESET commands, it is possible to define to a quarter of a letter giving a resolution of 4,000 programmable points. The picture element positions on the screen are allocated as decimal addresses from 53248 and to light up the notes as they are played it is necessary to use POKE statements. Many users get confused using this special command on the MZ-80K, but it is easy if you type the following statement: POKE 53248 + X,Y; X corresponds to the location on the screen and will be a number between 0 for top left and 999 for bottom right. The value of Y will be between 0 and 255 and this number selects the character to appear on the screen and is detailed in the display code table in the MZ-80K manual.
The program given here starts by assigning X as 53248, allowing the user to simply say POKE X instead of having a much longer line each time saying POKE 53248. The tempo is also defined in the first line. Lines 15 to 25 display the first five bars with the appropriate notes of "Amazing Grace" on the screen. Line 26 shows the equivalent notes in Sharp Music notation. Line 28 has been included to display the chord sequence on the screen so that if you are feeling ambitious you can accompany your microcomputer with guitar, organ or piano. Lines 30 to 42 are the POKE commands to light up each note as it is played and then to return that note to normal before going on to light up and play the next.
You can hear one of our readers playing a guitar accompaniment to a tune composed by his MZ-80K on E&MM's Demo Cassette 3.
Programs of this type can be extended and whole tunes can be programmed to be played and displayed. Many schools are now using this method to assist in teaching music and modern 'video' age pupils seem to respond well to this new tuition method.
Previous issues of Electronics and Music Maker have detailed the special commands in the Sharp SP-5025 Basic which allows the programmer to select tempo, note and rest durations. A number of readers have written in with requests for certain tunes to be transcribed to a Sharp Basic program. A traditional tune like 'Greensleeves' is fairly simple especially as it has repeating sequences which can be assigned as a string. Three strings (G$, H$ and J$) are used in the 'Greensleeves' program thus enabling it to be written within 15 lines. Without the use of this technique writing music programs on the Sharp MZ-80K would be tedious and very repetitive.
The same string principle is applied in program 2, the 'Sailor's Hornpipe' - here all the music notes apart from those in lines 7 and 8 are in strings and assigned J1$, J2$, J3$, Ll$, L2$, L3$. Some readers have written in asking how the tempo can be changed without continually writing tempo statements. Readers who are experiencing this difficulty should study lines 5, 6 and 10 of the 'Sailor's Hornpipe' program as these lines contain the three changes of tempo required for this tune. The third program shown will play the 'Can Can' for you.
Careful study of these musical programs will soon allow readers to write far more complicated tunes as a Sharp Basic program.
Amiga Notes |
PC Notes |
Amiga Notes |
PC Notes |
Networking |
Digital Signal Processing - An introduction (Part 1) |
Atari Notes |
Lab Notes: In Pursuit of the Wild QuASH |
When Is A Computer |
Music On The PC |
On The Cards - Sound card feature |
PC Notes |
Browse by Topic:
Micro-Music - Sharp MZ-80K — the Melody Micro
(EMM Mar 81)
Micro-Music - Learning morse by computer.
(EMM May 81)
Micro-Music - Music Composer Program
(EMM Jun 81)
Micromusic - Rhythm Sequencer for the MZ80K
(EMM Mar 83)
Browse category: Computer > Sharp
Feature by Graham Knight
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.
If you value this resource, you can support this project - it really helps!
New issues that have been donated or scanned for us this month.
All donations and support are gratefully appreciated - thank you.
Do you have any of these magazine issues?
If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!