Magazine Archive

Home -> Magazines -> Issues -> Articles in this issue -> View

Micro-Music

Music Generation on the Microtan 65


The extreme modularity of the Tangerine Microtan 65 system lends it an advantage when considering computer controlled music synthesis projects. A variety of memory cards, parallel and serial I/O cards are available giving the user the flexibility to configure the system to match his exact needs. Due to the use of a motherboard concept this flexibility allows other manufacturers to step in with their own contribution to the system.

One such manufacturer in the OEM market has developed a nine voice sound card, originally intended for in-house use for the manufacture of professional arcade videogames based, incidentally, entirely on Microtan boards.

This card makes use of GI's popular AY-3-89 12 programmable sound generator chip (Figure 1). This gives three separate tone channels, a white noise channel, gain control for each tone channel and a single envelope shaper. The various sound channels can be used either singly or in combination. Due to there only being one envelope shaper, all tone channels trigger at the same time making multipart music difficult unless the computer takes control of each amplitude channel and adjusts it as the music is actually playing, which would be a laborious and time consuming task. As there are three of these chips on the board, giving nine tone channels and three noise channels, the simplest solution is to tie the tone channels of each chip together giving three individually triggered sounds with separate envelopes which is probably the minimum permissible for recognisable multipart music. Each chip is provided with an amplifier on the board allowing the use of small 3 inch speakers which give sufficient volume for most purposes, The board is supplied with some installation notes and a copy of GI's manual for the PSG chip. As no software comes with the unit it is up to the user to design his own.

Figure 1. Block diagram of GI AY-3-8912 Programmable Sound Generator.
(Click image for higher resolution version)


I considered using machine code and BASIC at first but decided that machine code takes too long to develop and BASIC runs too slow, so I plumped for Tangerine's new Forth compiler which allows for fast development and editing of software while giving a very high execution speed.

The listing given is a complete music generation program allowing the production of 3 part music with a fixed envelope for each note, in this case sounding vaguely like a harpsichord or clavichord. Although I don't intend to analyse the complete program some sections would bear a closer look.

Lines 0, 1 and 2 of screen 1 (SCR #1) define Forth words (a Forth program, or in this case 'Programlet' is called a 'Word', which starts with a colon followed by its name, then the instructions to be executed and closes with a semicolon). PLAY 1, PLAY 2 and PLAY 3, which allow me to easily access the three music chips directly, for instance by typing: 3 6 PLAY 2 (CR) would put 6 into register 3 of chip number two.

INIT 1, 2 and 3, simply initialise the sound chips by putting zero into each register.

Line six defines a Forth word which, when called, sets the current number base to 8, which is useful as all the examples given in GI's manual use octal notation. SETUP 1, 2 and 3 are used to define the amplitudes of each channel, the envelope period and shape, and to disable the noise channel. N1, N2 and N3 are the words which actually play a note through one of the three channels.

Screens two and four contain the lookup tables for the notes covering the fifth and sixth octaves, and these were found to be sufficient for experimental purposes. So, to play a note of A# through channel 3, one would specify: A#5 N3. To play A# and C together (or virtually together) one would specify: A#5 N1 C5 N2.

Screen 3 contains the delay values which specify how long to wait before playing the next note (or group of notes). DY is a whole note, 2DY is a half note and so on. The Forth construct 8000 0 DO LOOP would have the equipment in BASIC of:

FOR I = 0 to 8000: NEXT

Such is the speed of Forth that these large values are necessary to slow the playing down to a reasonable tempo.

Screens 5 and 6 define the actual tune — in this case the Morris dance 'Staines Morris', divided for ease of editing into individual bars which are then grouped into lines until in screen 7 the final piece is defined.

The music is quite pleasant to listen to although without any changes in tempo or expression, it is rather a wooden performance, probably much less sophisticated than the old Player pianos.

It is probably true that electronic and computer music is more constrained by the amount and quality of the software than by any limitations of the hardware actually playing it.

This article then, has shown that from fairly humble beginnings, passable music can be created with only a moderate understanding required of the fundamental techniques. It would be interesting to see what advances could be made from these basic program constructs.

Figure 2. Map of the AY-3-8912 control registers.


Software program in Forth.
(Click image for higher resolution version)


Enquiries concerning the availability of this board should be directed to the author c/o Tangerine Computer Systems.



Previous Article in this issue

Making Notes

Next article in this issue

Studio Sound Techniques


Electronics & Music Maker - Copyright: Music Maker Publications (UK), Future Publishing.

 

Electronics & Music Maker - Jun 1982

Donated & scanned by: Stewart Lawler

Topic:

Computing


Gear in this article:

Computer > Tangerine > Microtan 65

Feature by Paul B. Kaufman

Previous article in this issue:

> Making Notes

Next article in this issue:

> Studio Sound Techniques


Help Support The Things You Love

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!

Donations for July 2020
Issues donated this month: 1

New issues that have been donated or scanned for us this month.

Funds donated this month: £44.00

All donations and support are gratefully appreciated - thank you.

If you're enjoying the site, please consider supporting me to help build this archive...

...with a one time Donation, or a recurring Donation of just £2 a month. It really helps - thank you!
muzines_logo_02

Small Print

Terms of usePrivacy