Magazine Archive

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

Spectrum MIDI

A special feature for owners of the oft-neglected Sinclair Spectrum. There's an update for E&MM's original MicroMIDI interface board, plus patch dump software for two MIDI Poly-synths, the SCI SixTrak and Yamaha DX7.

Much-maligned in some circles, the Sinclair Spectrum is nonetheless still the most cost-effective way for many musicians to get into the field of computer music. In May of last year E&MM published details of MicroMIDI, a self-build hardware interface to link MIDI instruments to the Spectrum. Now Jim Grant has come up with a revised, simpler version of this unit, MicroMIDI II, and some software that enables control parameters of SCI's SixTrak polysynth to be displayed on screen, while Steve Parr has developed a similar program for the Yamaha DX7. A PCB for MicroMIDI II will be available shortly, while a limited quantity of E&MM's May '83 issue is still available, price £1.10.

For those who might have missed this magazine's original MicroMIDI feature, part of the design is reproduced below. The circuit remains unchanged except that the component count has been pruned down to the bare essentials necessary for MIDI communication, so it's farewell to the 8255 PIA and its associated decoding.

Table 1 gives the register addresses within the MC6850 serial transmitter/receiver, while Tables 2 and 3 detail the control words necessary to configure the chip to suit different applications. For MIDI we must first output a Master Reset (OUT 159,3) followed by clock divide and word length information (OUT 159, 86). All numbers are in decimal.

Transmitting and receiving MIDI information is quite straightforward. The, presence of received data can be checked by reading the Status Register (IN 223). Bit 0 is set if the Receive Register is full, and the data can be accessed by an IN 255 statement. Sending MIDI codes is achieved by writing to the Transmit Register using an OUT 191, nn statement.

One of the great advantages of the MIDI is the degree of control that can be effected over a sophisticated instrument, using only a few chips and a knowledge of BASIC programming...

SixTrak Patch Dump

One of the most interesting synthesisers to become available recently is Sequential Circuits' SixTrak polysynth, also known as the Prophet 610. It offers a wide range of features at a surprisingly reasonable price, and is also the first MIDI synth to offer a homophonic capability.

In the interests of keeping production costs down to a minimum, SCI have given the SixTrak the keypad and parameter control system. For example, if you want to change, say, the filter resonance, the number 20 must be keyed in for that parameter before the actual value can be altered. So, unless you key in each one individually, all the control settings for a given patch remain hidden, and the 610 is therefore an obvious candidate for the Patch Dump program first implemented by E&MM (in August '83) for its sister instrument, the Prophet 600.

Once again, the patch dump is in two parts. BASIC is used to present patch data and provide a screen dump if requested, while machine code is responsible for communicating with the SixTrak. To initiate a patch dump, the Spectrum transmits five bytes as follows:

1) F0H -System Exclusive Data Follows
2) 01 - SCI Identification
3) 00 - Program Dump Request
4) XX - Program Number
5) F7H - End of System Exclusive Data

This can be seen in the assembler listing, lines 670-760. The Prophet 610 responds by transmitting a dump in the following format:

1) F7H - System Exclusive Data Follows
2) 01 - SCI Identification
3) 05 - Program Dump Follows
4) XX - Program Number
5) 0X - 32 bytes of program information transmitted in right justified nibbles
6) F7H - End of Exclusive data

Table 4. SixTrak Program Bit Map.
(Click image for higher resolution version)

The data is collected by the assembler and the 32 nibbles are packed into 16 bytes, these having the format shown in Table 4. After this, the remainder of the program uses the parameter length data held in lines 50-410, to sort the 16 bytes into 32 bytes of parameter information. This is held in the DUMP table (line 30). Each parameter byte contains a value specific to a control on the SixTrak.

Once the machine code has done its job, control is passed to the BASIC, which accesses the parameter information and displays it on screen. Most of the BASIC is concerned with printing the 610 controls, while the position co-ordinates for each parameter to be printed are held in the DATA statements.

Table 6. SixTrak patch dump BASIC program.
(Click image for higher resolution version)
Table 5. SixTrak patch dump machine code listing.
(Click image for higher resolution version)


Although a wondrous beast in many ways, the Yamaha DX7 is no easy animal to program or edit, one of the main difficulties being that each parameter has to be accessed individually to see how it's affecting the overall patch. The DX7 dump program not only lets you see all the parameters laid out on a VDU, but also allows the user to save and load both single voices and 32-voice memories to and from tape, saving £££s on expensive RAM cartridges and providing backup for Yamaha's ROM packs, just in case you accidentally throw them out with the rubbish. In fact, it was because the writer cleverly succeeded in accomplishing this latter event that he was forced to write the program in the first place.

The software utilises a 48K Spectrum computer and the original MicroMIDI interface board published in E&MM May '83. The data for each DX7 voice is stored in the instrument's memory as a series of 155 bytes followed by a single checksum byte. This is preceded by six bytes of information ID to signify that what follows is a voice dump. Similarly, the data for the 32-voice memory is stored as a series of 32 chunks (each one 128 bytes long), and as before, this is followed by a single checksum byte and preceded by its identification code. In the case of the single voice data, this code is 240 67 0 01 27, while for the 32-voice memory it is 240 67 0 9 32 0. Each chunk is a condensed form of the single voice data, and for the purposes of this program, the information itself is not interpreted but merely shuttled about from keyboard to computer to tape and back again, with just a listing of the 32 patch names extracted from it. However, the computer does interpret and display the single-voice data parameter-by-parameter on four successive screens, the last of which gives the user the opportunity to allocate a file name to the data before dumping it onto tape.

The machine code program begins at location 35028 by loading DE with the address of the six identification bytes, HL with the address of the keyboard data dump, and BC with the relevant number of bytes to be transferred. It then checks the incoming bytes against the identification data, which has been poked into the location 35000 by the BASIC program by calling the Receive subroutine at 35006; if all is well, it then downloads the DX7 data into location 35200 onwards.

To transfer data back into the keyboard, the program loads the successive bytes in 35200 via the Transmit subroutine at 35019, decrementing the BC register each time until it reaches 0. For those interested in a fuller breakdown of the TX and RX routines, this is given in Ken McAlpine's article Interrogate Your Prophet 600, E&MM August '83.

The BASIC program starts by initialising the MIDI interface and poking system variables to set caps lock and keyboard click. It displays the menu after loading the machine code.

Line 1000 prints loading instructions and line 1020 pokes the data file with the appropriate bytes, prior to running the machine code at 35028 for the 32-voice memory: line 3000 does the same for the single-voice memory.

Line 2000 prints the loading instructions, pokes the number of bytes to be transferred into the BC register and runs the machine code at 35067 for the 32- voice memory: this time, line 4000 does the same for the single voice. Line 5000 checks that 32-voice data is resident in memory and then prints out all the parameters. If there is no data present it returns to the menu. Line 5500 does the same for the-single-voice memory, but this time it prints out all the parameters on screen, having interpreted and normalised them.

Line 6000 lets you give your file a name and saves it to tape, while line 7000 will load previously dumped files back into the Spectrum's memory.


First type in the BASIC program and save it using SAVE 'DUMP' LINE 10, and then load the machine code by using the loader in Table 7. Note that the code in Table 8 reads down, not across! Save this after the BASIC with SAVE 'DECODE' 35000, 90, and then load the BASIC program back in. This will automatically load the machine code for you. If by any chance you should break out of the program, re-enter with RUN 80.

Table 8.
Table 7.

To store the DX7 cartridge memory onto tape, the memory first has to be dumped into internal. If you're doing this, make sure you've saved the internal memory and checked it on the patch listing, or you could lose many long hours of programming, and probably your lunch as well...

Table 10. DX7 patch dump BASIC program.
(Click image for higher resolution version)
Table 9. DX7 patch dump machine code listing.
(Click image for higher resolution version)

Should you find the thought of hours of typing this listing into your Spectrum too horrible to contemplate, a cassette containing an expanded version of this program and a short sequencing routine can be obtained from SDS, (Contact Details), for £5.95 including postage and VAT. Finally, the author would like to thank Ken McAlpine for the idea and TX/RX routines, and Tony Saunders for his invaluable work deciphering the DX MIDI codes.

Figure 1. MicroMIDI II circuit diagram.
(Click image for higher resolution version)

Table 1. MC6850 register addresses.

Address Selection
159 6850 Control
191 Transmit Register
223 6850 Status
255 Receive Register

Table 2.

Table 3.

More with this topic

Browse by Topic:


Also featuring gear in this article

Featuring related gear

Previous Article in this issue

Yamaha Portasound MK100

Next article in this issue

Synthesis on a Budget

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


Electronics & Music Maker - Jul 1984



Gear in this article:

Computer > Sinclair > ZX Spectrum

Feature by Jim Grant, Steve Parr

Previous article in this issue:

> Yamaha Portasound MK100

Next article in this issue:

> Synthesis on a Budget

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 January 2022
Issues donated this month: 3

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

Funds donated this month: £141.00

All donations and support are gratefully appreciated - thank you.

Magazines Needed - Can You Help?

Do you have any of these magazine issues?

> See all issues we need

If so, and you can donate, lend or scan them to help complete our archive, please get in touch via the Contribute page - thanks!

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!

Small Print

Terms of usePrivacy