Classic Computer Magazine Archive ANTIC VOL. 7, NO. 2 / JUNE 1988

ST Resource

Super CZ

Real-time MIDI Special Effects

by Jim Pierson-Perry

CASIO Super CZ



The Casio CZ series is among the most popular brands of synthesizers. Along with its comparatively low price, a major reason for the CZ's success is its ability to play four independent voices at once under MIDI control. This multi-voice capability is used effectively by such programs as Activision's Music Studio. But these effects cannot be achieved directly from the keyboard.

Wouldn't it be great to set up the CZ so that you could play all four voices together, each with its own section of the keyboard? Or how about playing multiple voices overlaid to make powerful synth sounds? The MIDI literature says it can't be done. Well, maybe not normally, but your ST can make it easy to add these super effects to your CZ playing.

My two programs show of real-time MIDI data processing by bringing live performance multi- voice capabilities to the Casio CZ synthesizers. CZ Split plays as many as four independent voices, each with its own keyboard zone. CZ Overlay plays as many as three independent voices overlaid on notes played by a base voice, and the overlay voices can be set to create a chord tracking effect.

The programs are only simple starting examples of what can be done with dedicated real-time MIDI data processing. Even so, the effects are nice and give additional punch to your playing. MIDI programming isn't difficult, so how about additional effects like echoing on multiple voices, or microtonal scales? Together, the ST and CZ make a dynamite duo for music and the fun is just starting.

Although my programs were coded with the CZ-101/1000 in mind, they should be compatible with the entire CZ synthesizer line. The only caveat is in patch program selection. I used information from The Guidebook for MIDI (free from Casio), which details patch program selection commands for the CZ-101/1000/3000/5000. I'm afraid that CZ-1 or CZ-230S owners will have to experiment to find the right values.

GETTING STARTED

Listing 1, CZSPLIT, and Listing 2, CZOVERLY were both written in GFA BASIC. The actual programs are. PRG files generated by the GEN BASIC Compiler. I deliberately did not go for flashy special GEM effects. The "vanilla" BASIC code should be easy to port to other BASIC dialects.

Two MIDI cables are required for running these programs. One cable connects the Casio's MIDI Out port to the ST's MIDI In port. The second cable connects the Casio's MIDI In port to the ST's MIDI Out port.

You might first want to pull out your CZ manual for a quick refresher on the mono mode (multi-voice operation). You might also want to look over Tom Jeffries' article "The Ins, Outs and Thrus of MIDI" from the Spring 1987 issue of START Magazine.

You need to know that the base MIDI channel is what your CZ synthesizer is set on to receive or transmit data. Although you could use any channel from 1 to 16, channel assignments above 12 will not work correctly because CZ needs four adjacent channels for proper separation of its four-voice mono mode.

You should also understand that the patch program selection is where you specify the particular sound (timber) to be associated with each of the playing voices - for example, trumpet, organ, snare drum. To specify a sound, you need to locate it by source (preset, internal, or cartridge), bank (where appropriate) and number. If you make a mistake, run the program again - you can't hurt the CZ or ST. Selecting sounds from the cartridge bank when no cartridges are installed will default into the preset bank.

CZ SPLIT

With CZ Split, you specify split points for as many as four separate zones on the CZ keyboard. Each zone controls its own voice (sound).

Zone 1 starts at the right end of the keyboard (MIDI key number 96) Initially its split point is set at the far left of the keyboard (MIDI key number 36) so that all keys fall within Zone 1. If you specify a split point, say middle C (MIDI key number 60), then all notes from the right, down to and including middle C, fall into Zone 1 and are played using its selected voice. Notes below middle C fall into the newly created Zone 2 and are played using its voice.

The maximum is three split points. Make sure that the split points you set are all sequentially lower down on the keyboard -- point 1 > point 2> point 3. Otherwise the zone decoding logic may not assign your notes as you expect.

When you run CZSPLIT.PRG, Listing 1, you're first asked to enter the MIDI channel for your CZ, then the number of keyboard zones (up to four). You are then asked for the split points to define the keyboard zones from right to left. Let's use MIDI key values of 72 (C above middle C), 60 (middle C) and 48 (C below middle C). This gives us four zones of one octave each.

The final step of setup is to specify the patch program for each zone. This is done by entering the source (preset, internal, or cartridge) and number (1 to 16) for each voice in turn. For this test, let's use preset bank program numbers 7, 2, 14 and 8 -- flute, trumpet, accordion and bass.

The program then calls a subroutine to put the CZ into mono mode and set up the desired patch programs with their respective voices. A screen prompt is given when all is ready. Now all notes played on the CZ go first to the ST, which determines the voice, then back to the CZ for sound synthesis. All sounds are from MIDI input. The keyboard is divorced from the sound generation circuits by using the Local Off MIDI command.

By the way, the CZ's pitchbend does work, but only in Zone 1. To exit the program, press the Portamento On/Off button on the CZ keyboard. This halts the program, resets the Portamento button and puts the CZ back into poly mode with the keyboard back online to the sound circuits (Local On MIDI command).

CZ OVERLAY

CZ Overlay sets up four voices, each with a different sound, and stacks (overlays) them to give a strong, punchy lead synth sound. In addition, the three overlay voices can form a four-note chord that will track the base voice (voice 1) up and down the keyboard to increase the power of the effect.

When you run CZOVERLY.PRG, Listing 2, the prompts first ask for the MIDI channel for your CZ, the model of your CZ synth and the number of overlay voices. You always have the base voice (voice 1) and can have up to three independent overlay voices.

Now enter an offset value for each overlay voice, specified in MIDI key numbers. This allows voice 2 to play up a fifth (+7 MIDI keys), down an octave (-12 MIDI keys), or whatever you like. Using this feature with all three overlay voices gives chord tracking of the base voice for impressive power sounds-even though you are just pressing one key at a time. Let's set overlay voice 1 to offset at 7 (up a fifth), voice 2 offset at 12 (up an octave) and voice 3 offset at -12 (down an octave).

Finally, choose the patch programs to give each voice its own distinctive sound. Let's use the preset bank for all four with voice 1 (base voice) as program number 2 (trumpet), voice 2 as number 7 (flute), voice 3 as 14 (accordion) and voice 4 as number 8 (bass). The ST then dives into the mono mode setup subroutine and flashes an onscreen message to start playing.

Play a solo on the CZ keyboard and listen to the added depth and dynamics you get from the overlay effect. The pitchbend effect also can be used to spice up the base voice. As with CZ Split, when you're done just press the Portamento On/Off button on the CZ keyboard.

HOW THEY WORK

The key to these programs is the MIDI command for Local Off. This divorces the keyboard from the synthesizer sound generation circuitry. Pressing keys or controls sends the appropriate commands to the MIDI Out port, but only data received at the MIDI In port will cause sound to be produced. If we put an ST in the middle of this loop, we can monitor the MIDI commands sent and either modify or pass them on unchanged to have the CZ play in real time.

For the programs given here, all we are interested in is Note On MIDI events-all other commands and data are immediately sent back to the CZ. For the split keyboard effect, when a Note On command is intercepted, its associated MIDI key value data byte is used to flag whichever voice will be sounded. The Note On command is altered to change the channel, according to the designated split points, and passed on to the CZ for play.

The overlay effect is even simpler. Each Note On event detected is sent back on its base channel as well as on all desired overlay channels. The MIDI key data byte is changed for each channel to reflect the desired offset for chord tracking.

The pitchbend effect always operates on the base channel while in real-time play. That is why I set the split zones to run from right to left-most players I know use pitchbend on the upper keys rather than the bass parts. It would be nice to be able to assign the effect to any voice, and I'd love to hear from anyone who can do it.

1/230S FIX

Earlier I said that those with a CZ-1 or CZ-230S would need to do some extra work to get the expected patch program changes assigned. At the bottom of the MIDI implementation charts for your synthesizer is a section on program changes that lists the program numbers associated with the various patch banks. Use these numbering assignments when asked for your patch program numbers, but start numbering from 1 instead of 0.

If the CZ tones don't sound right during play, pressing the Solo button on the CZ keyboard twice should clear it up. Apparently there's a bug in some of the earlier CZ ROMs that can be corrected with a firmware update. This is pretty well documented, and you can contact your Casio dealer for further information.

FOR MORE ARTICLES LIKE THIS, CIRCLE 204 ON READER SERVICE CARD.

Listing 1: CZSPLIT.BAS Download

Listing 2: CZOVERLY.BAS Download

On Disk: CZSPLIT.PRG Download
, CZOVERLY.PRG Download