Keyboard split utility ('U.KSplit')

Richard Bettis

1) Introduction

The AMPLE program 'U.KSplit' contains the bare essentials of a utility to produce a sound 'split' when playing a Music 4000 keyboard.
The program will work with a Music 5000 (it doesn't use any of the words in the M4 module), but the same effect is easier to obtain by writing multiple parts.
The main purpose of the utility is to allow the 'live' playing of more than one sound; in the example provided these are 'Upright' on the higher notes and 'Slapbass' on the lower ones.
The actual position of the split can be defined by the player when the program is RUN.

2) RUNning the program

When the program is RUN, a prompt is given to define the 'split-point'. When a note is played, this becomes the lowest note for the 'top' instrument.
Any number of notes may be tried, but only the last one played will count.
When RETURN is pressed to select the 'ok' message, the split keyboard is brought into operation, and can be played.
In use the current program allows up to four note polyphony in each of the two sections.

3) How it works

As you may have guessed, the split function is based on the ACT structure. The rest of the program may also merit some description.
'setup' is merely a definition of a single 'player' with 8 voices, the first 4 voices are used by the higher section of the keyboard, while voices 5 to 8 are for the lower section.
'select' restores the default ACT, then uses 'getsplit' to prepare for finding the splitpoint. After that it displays a MENU with just one option, to tell the program that a splitpoint has been selected. (In effect this just provides a simple and familiar format for a 'pause' while the user decides).
'getsplit' redefines ACT for the first time. All that it actually does is to make a copy of the PITCH number, and store this in a variable, 'splitpoint'.
'ok' just confirms the note that has been chosen (the numbers work in semitones above or below middle C), and cancels the 'getsplit' ACT command.
'splitact' redefines ACT to give the split keyboard effect. One problem to be overcome is the allocation of different voices. Each key pressed while another is being held adds to the VOICE number generated; however, we want to split 8 possible notes into two groups of 4. This is done by 'change' (see below) on each voice number, which renumbers 5 to 8 as 1 to 4 again!
The PITCH value of the note is then compared with the selected value in 'splitpoint'. If it is above the splitpoint the ACT continues as normal (with any revisions to voice number already made by 'change').
If, on the other hand, the PITCH is below the splitpoint then 4 is added to each (none zero) voice number.
The net effect of all this is to ensure that higher notes are played on voices 1 to 4 and lower notes on voiceS 5 to 8, thus effecting the 'split'.
'change' reduces the VOICE numbers to the range 1 to 4. For speed of operation, and to avoid problems with the value 0 generated for both the LEVEL voice at all times and the GATE voice for an 'OFF GATE', the change is made using a 'look-up table'.
This is an ARRAY, 'vtabl', which has 9 elements (including element 0). 'change' takes each voice number and replaces it with the value held as that numbered element in 'vtabl'. For element 0 to 4 this makes no change, but elements 5 to 8 contain the values 1 to 4 again, so these voice numbers are re-allocated.
Finally 'RUN' coordinates the procedure. It does a 'setup', uses a word 'vset' to set up the 'look-up table' for VOICE numbering, allows the user to 'select' a splitpoint, and then sets the split keyboard going.

4) In conclusion...

Obviously, the actual voice allocations in 'setup' can be simply changed to any other instruments.
By changing the pitch played in each section, either by using SHIFT in the instrument definition or by altering the pitch voice in ACT, it is possible to play two melodies in the same register at the same time using different instruments on the same keyboard (at least I presume that it is possible - neither my brain nor my fingers could cope with it!).
I did originally write a more general version that allowed for a definition of the total number of voices, and how they were allocated between the two sections. However, the additional processing required led to a noticeable slowing down of the response to the keyboard. Notes sounded just late enough after pressing the keys for me to be aware of the delays, and block chords sounded like fast arpeggios!
This version, with values fixed both by constants in the ACT definition and by the contents of the look-up table, does not produce that much of a delay in note processing - it is only just audible on block chords.
(My next essay may well be called 'Swings, Roundabouts and Compromised Ideals').

Related file on this disc:
U.KSplit - AMPLE keyboard split utility program (LOAD and RUN)

Published in AMPLINEX 007, September 1988