Magazine Archive

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

The Codebreaker

Article from Electronic Soundmaker & Computer Music, August 1985

Build a sync to MIDI interface


Chris Read's sync to MIDI interface project.


For the last eighteen months, I have disappeared for several hours each week into the inner sanctum of my "studio". In reality, it used to be the front hall and measures a mere 12' x 4' into which I have crammed a Fostex 250 4-track recorder, Korg Poly 800, Drumatix drum machine, guitars and amplifier. The trouble was, the sequencer on the Poly 800 was virtually redundant as I could not synchronise it with the Drumatix. A survey of music shops and magazines revealed that I would have to spend at least £125 for a readymade interface to achieve compatibility. However luck has it, I am also an electronics design engineer, so I decided to give the old grey matter a shake-up and design an interface to overcome the problem of synchronisation.

DATA FORMAT



There are several drum machines, like the Drumatix, which output a simple clock pulse usually at a rate of 24 or 48 pulses per quarter note. However, this format is not compatible with sequencers or synthesisers which incorporate the MIDI standard of data transfer.

The MIDI system requires 10 bits of serial data at a rate of 31.25 KBaud for each command. Each command consists of a start bit, 8 data bits and a stop bit, making a total of 10 bits for a period of 320 microseconds per serial byte. For "Real Time" operation (ie sequencing) three commands are required. First start byte is received, followed by the timing bytes and finally, to stop the sequencer, a stop byte.

The MIDI "Real Time" codes are as follows:

Start 0010111111
Timing 0000111111
Stop 0001111111



Often, the codes are published in reverse serial order, but, in terms of real time, each bit is transmitted sequentially, reading from left to right.

CIRCUIT DESCRIPTION



From the outset, I decided to use readily available low-cost components and that the interface would be battery operated. The circuit can be broken down into block functions as shown in fig. 1.

Fig. 1. Circuit Overview


Upon receiving an input, the Pulse Decoder generates a set pulse which starts the Baud clock. The Decade Counter is incremented by the clock at 32 microsecond intervals until the Reset pulse stops the count. Depending on the type of input (ie Run, Stop or Clock), the Logic Decoder selects the equivalent MIDI code to be outputted.

An alternative method of control, utilising a "Clock-only" input (for drum machines without a Run/Stop signal), can be selected by switch SW2. This is facilitated by the R17, C11 circuit which detects presence of the Clock input.

The Baud clock is formed by a CMOS 555 timer (IC1) and is adjusted to 31.25 KHz by P1.

To accommodate an input rate of 48 pulses per quarter note instead of 24, switch SW3 is closed and the Decade counter (IC2) is forced to generate an additional count sequence during every other timing clock pulse. As this intermediate sequence is not outputted to the MIDI instrument, the tempo rate is halved.

The Pulse Decoder comprises logic Nand gates N3, N4 and outputs the three commands of Start, Timing and Stop, select to the MIDI Code select logic gates N2, N5. Transistor Q1 provides a current source of 5mA minimum compatible with a "MIDI IN" receiver.

Considerable design effort was given to the suppression of spurious or undefined transmissions at power-up, to prevent the MIDI Sequencer bursting into life unexpectedly. Suppression is accomplished by R1, R4, D4, C4 producing a "masking" reset pulse to pin 15 of IC2 via Nand gate N5. Similarly at powerdown, a Stop Code is automatically transmitted, otherwise the synthesiser would sound a continuous note or chord. This was achieved by careful design of the power supply circuitry D1, C1, R1, R2 and Z1.

Fig. 2. The Codebreaker Circuit
(Click image for higher resolution version)


CONSTRUCTION



The electronic components may be assembled on a piece of matrix or Veroboard approximately 4½" x 3½" - layout is not critical. All ICs should be plugged into suitable DIL sockets mounted on the board to facilitate testing and fault-finding. Handling of the CMOS ICs should be kept to a minimum before and during insertion to avoid damage due to static. The CMOS version of the 555 IC was used because of its low current requirement. A suitable metal or plastic box is used to house the circuit board, switches and DIN sockets.

TESTING



Another little black box

Carefully check all components, solder joints and wiring interconnections with particular attention to the orientation of the ICs in their sockets.

Interconnect the Codebreaker with a drum machine and synthesiser sequencer which have been previously programmed. The synthesiser should be set up to receive MIDI sequence clock information. On the Poly 800 this is simply achieved by setting parameter 88 to value 2. The only adjustment to the interface is to calibrate the 555 timer (IC1) frequency and is accomplished thus: Set the tempo switch to 24 pulses per quarter note and the Run - Clock switch to the Run position, (some drum machines necessitate the clock position being selected instead). Switch on and press the start button on the drum machine. If the sequencer does not respond, gradually adjust potentiometer, P1 with repeated operations of the start button until successful. Finally set P1 to midway of the extreme positions that permit successful operation. Alternatively, an oscilloscope or frequency counter may be used to adjust the output at pin 3 of IC1 to 31,26KHz ± 300Hz. Measurement is readily achieved by temporarily removing N1 so that IC1 free-runs. Refit N1 after test. Check all switch positions for satisfactory operation. If all does not appear to function correctly, switch off and thoroughly check all components and connections.

Battery current consumption is typically 2 to 3mA. If an extra MIDI output is required, to control an additional sequencer, a second output circuit should be connected as per fig 3.

Fig. 3. Second MIDI Output Mod.


IN USE



Parts List

Part Number Description Unit Qty
R20 Resistor 100R 1
R2 R18 Resistor 1K 2
R16 R21 Resistor 2K2 2
R8 R13 Resistor 6K8 2
R3 R7 R19 Resistor 10K 3
R5 R15 Resistor 15K 2
R6 R10 R11 Resistor 14K 3
R9 R12 R14 Resistor 100K 3
R1 Resistor 150K 1
R17 Resistor 470K 1
R4 Resistor 2M2 1
P1 Potentiometer 10K 1
Q1 Transistor BC107 1
C5 Capacitor 470p 1
C10 Capacitor 1n 1
C2 Capacitor 2n2 1
C8 C9 Capacitor 3n3 2
C7 Capacitor 10n 1
C6 Capacitor 100n 1
C4 C11 Capacitor 470n 2
C3 Capacitor Tantalum 1
C1 10u 1
Capacitor Elec 16V 220u
D7-D10 Diode IN 4148 10
Z1 Zener Diode 400mW 5V1 7
N1-N5 Nand Gate CMOS 5
IC2 Decade Counter CMOS 4107B 1
IC1 Timer CMOS 555 7
SW1 Switch D.P.S.T. 1
SW2 Switch On-Off-On 1
SW3 Switch S.P.S.T. 1
Socket 5 pin 180° Din 2
Battery 9VPP3 1
Battery Clip for PP3 1

The interface can initiate, clock and stop a sequencer at any point in a song by judicious operation of switch SW2. A change in rhythmic "feel" can be implemented by switch SW3, including, with a little practice, between bars. The Codebreaker is suitable for live work or recording. An additional bonus during multitrack recording is available if a click-track is recorded from a drum machine or sync-pulse generator. The interface can now directly control the sequencer via the click-track to create overdubs of different sounds and sequences. This method allows corrective or retrospective programming of the drum machine or sequencer as the composition progresses.

THE DEMO TAPE



My home studio was used to record Codebreaker using a Drumatix and Poly 800. A click-track was recorded on one track to synchronise a basic drum and sequence pattern at the initial stages of the composition. It was then used to co-ordinate a further four synth overdubs with the final drum patterns. This feature has the effect of expanding the number of tracks on the recorder during overdubs, without the inherent deterioration encountered during track-bouncing. The melody leadlines were played live on the Poly 800 and my Fender Stratocaster guitar (sampled by the four digits on my left hand).

CONCLUSION



The Codebreaker interface costs about £20 to construct and must surely interest the many owners of hitherto incompatible sync clock and MIDI instruments. Further benefits are achieved when using a dick-track, to enhance the potential of the Codebreaker as a composition and recording tool.


More with this topic


Browse by Topic:

Electronics / Build



Previous Article in this issue

Who Dares Wins

Next article in this issue

Live Wires


Publisher: Electronic Soundmaker & Computer Music - Cover Publications Ltd, Northern & Shell Ltd.

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

 

Electronic Soundmaker - Aug 1985

Donated & scanned by: Mike Gorman

Feature by Chris Read

Previous article in this issue:

> Who Dares Wins

Next article in this issue:

> Live Wires


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 March 2025

Please note: Our yearly hosting fees are due every March, so monetary donations are especially appreciated to help meet this cost. Thank you for your support!

Issues donated this month: 0

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

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

Small Print

Terms of usePrivacy