Magazine Archive

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

Technically Speaking

Article from Making Music, September 1986

First DIY steps to a MIDI sync box for your portastudio.


It's very hip to have a MIDI-tape interface. This wonderful device allows you to put a MIDI sync track on your demo-tape. Andy Honeybone built one. Isn't he nice? Part two next month.

MULTITRACKING is fun, but it's even more fun if, after six bounces, the drums still have the crispness of their original selves. To achieve this nirvana we must record a sync signal on the tape. Then when all the bouncing down is done, we can put the drum machine on last, triggered by this sync-signal, and know it will be perfectly in time with everything we've recorded so.

A quick check around the back of the trusty TR505 or RX11 shows a singular lack of sync socketry, and so it's down to us. This month's DIY special is therefore a MIDI-tape interface for the benefit of all and sundry.

The scheme is this: extract the MIDI clock from the MIDI data stream and generate a pulse; use this pulse to clock a modulator to encode the clock as a change in frequency of a carrier signal. On recovery of this signal from tape, decode the clock pulse and use it to trigger the transmission of a MIDI clock byte.

Given the task, the first feeling is to use a micro but we want the micro to be a sequencer and our task is really too trivial to tie up so much hardware. Of course, using a micro would allow the stop, start and continue codes to be brought into play but at considerably higher cost than the system to be described here. The practical solution is to use a UART (Universal Asynchronous Receiver/Transmitter) chip with a bit (and a bit more) hardwired logic. The UART sees to the interconnection of serial (ie MIDI) data and its parallel representation. With the MIDI data in 8-bit 'sideways' format we can more easily detect or force timing codes.

The unit has a tape input and output, a MIDI in, a MIDI thru and two MIDI outs. In use, the scheme is this: first set your drum machine to generate a MIDI sync clock. On the TR505 this is done by turning the MIDI sync off (confusing isn't it?). Make connections to the heap of chips herein outlined and set the tape recorder to record with the tap sync output connected to a single track at the lowest level at which you can ensure reliable operation.

Set up a guide drum pattern and hook the instrument on which you will shortly let rip to a free track. Set the tape machine recording and start the drums. Lay down the track, remembering to give a count in of some sort so that you can start the drums in time on playback. On completion of the take, wind back the tape and set the drum machine to receive a MIDI sync. Start the tape playback and bring in the drums on cue from the count in. All being well, the drums should remain in sync throughout the performance.


This is how it works. We have the UART and its clock circuitry, an fsk modulator and demodulator, some detecting logic and the odd MIDI driver and receiver.

The UART is the heart of the design and that's where I'll start the explanation. The chip requires a clock of 16 times the baud rate of the serial data. As MIDI is 31.25kHz, a frequency of 500kHz is in order. For stability and ease of setting up (ie there is no setting up) a crystal oscillator was chosen at a frequency of 2MHz which was a compromise between the expense of a lower frequency crystal and the pain of additional divider stages for anything higher. The crystal also provides the two frequency shift key (fsk) frequencies which are in the order of 1 and 2kHz and so advantage was taken of a 14 stage divider chip (4020) to conserve board space.

Unfortunately, the fine print on the spec sheet says that stages 2 and 3 are not available at the pins and so a spare flip flop (4013) was drafted into service to provide the necessary.

The MIDI data format is set by strapping various pins high or low to give 8 bits, no parity and 1 stop bit. Various other connections ensure the outputs don't drift off into a tri-state serenity. Given suitable clock and format details, the UART is fit and ready to grab the first MIDI byte and expose it, sideways on, at its receiver output pins. This it does remarkably well, so well in fact that the data just stays there and should a second byte of the same value come along, the only sign of its reception would be the overrun flag being set. This poses difficulties in detecting the arrival of successive clock pulses because we cannot assume that they will be interspersed with other data to cause a change at the receiver pins.

There is a data received flag (DR) but this gets stuck high unless reset by taking the data received reset line (DRR) low. The trick is to use the high to low transition of the incoming start bit of the next byte to clear DR. Hence we have a signal (DR) which pulses low on receipt of each MIDI byte.

The rest is much more simple. The 8 input NAND gate (4086) and the inverters (4049) are configured to give a low output only when a MIDI clock byte (F&H) has been received. This state is combined with the inverted DR signal to give a pulse when each MIDI clock is received. The pulse is stretched to about 5mS by the monostable built around the two NOR gates (4001). This period represents approximately a 50:50 duty cycle at 300 beats per minute.

Having obtained a pulse from the MIDI clock data, we must now encode it in a form suitable for recording on tape. It is possible to record the bare pulse as a click but this method is known for the sync leading into audio tracks. Further there can be phase problems which become noticeable at low clock rates. The industry standard way of encoding the pulse is fsk — the same technique used for sending data over the phone using a modem — where the ones and noughts of a digital message are sent as bursts of different audio frequencies. In this design, a zero is 976.5625Hz and a one is double that at 1953.125Hz. No prizes for conforming to a standard but it's just the way the crystal got divided.

The flip flop (4013) serves to synchronise the clock received pulse with the lower of the fsk frequencies so that whole cycles of the carriers are switched. The NAND gates (4011) form a digital multiplexer.

That's more than enough for one month so next time I'll describe the fsk demodulator, troubleshooting, setting up and how the MIDI clock is reconstituted.


More from these topics


Browse by Topic:

Electronics / Build

MIDI

Syncronisation



Previous Article in this issue

Sticks

Next article in this issue

Casio CZ-1 Digital Synth


Publisher: Making Music - Track Record Publishing Ltd, Nexus Media Ltd.

The current copyright owner/s of this content may differ from the originally published copyright notice.
More details on copyright ownership...

 

Making Music - Sep 1986

Feature by Andy Honeybone

Previous article in this issue:

> Sticks

Next article in this issue:

> Casio CZ-1 Digital Synth


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 December 2024
Issues donated this month: 0

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

Funds donated this month: £0.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!

Please Contribute to mu:zines by supplying magazines, scanning or donating funds. Thanks!

Monetary donations go towards site running costs, and the occasional coffee for me if there's anything left over!
muzines_logo_02

Small Print

Terms of usePrivacy