More about mixes

Roger Sapolsky
Several articles dealing with mixes have appeared in past issues of AMPLINEX, but this feature harks back in particular to G H Richardson's excellent 'Beginner's guide to unmixes' which appeared in AMPLINEX 011. There is, however, a difference. Whilst that article was based on the use of the Mixing Desk, I will be dealing with the Notepad only. This is not just to be contrary - it's because I find advantages doing it that way:
1) Because I type my programs in Notepad, it is time-saving to remain in Notepad when typing or altering mixes/unmixes
2) I find it simpler. There is no need to search in the user manual for a forgotten command (should I press 'i' or 'p' to do that?)
3) The Mixing Desk module is almost 1600 bytes bigger than the Notepad module. A mix might be one the first things you create in a program, but adding or changing mixes later, when the program has reached a considerable size, might not be possible using the Mixing Desk. Calling the Mixing Desk might then bring an unexpected colourful 'avant-garde' display and the 'Too big!' message
4) After looking at a very complicated John Bartlett program, I think using the Mixing Desk for such a program would be impossible.
To explain the use of Notepad for creating mixes and unmixes, I will describe an example of creating new mixes for an existing piece of music.
1) The piece might start with mix1, which allocates player 1 two voices, player 2 four voices and players 3 and 4 one voice each. This would give a mix as shown below:
"mix1" [M5MIX
1 SHARE 2 VOICES
  1 VOICE instrument1...
  2 VOICE instrument2...
2 SHARE 4 VOICES
          instrument3...
3 SHARE 1 VOICES
  1 VOICE instrument4...
4 SHARE 1 VOICES
  1 VOICE instrument5...
PNUM SHARE ]
2) We might then want 'mix2' to transfer one voice from player 2 to a new player 5. Assuming the transferred voice is the first (1 VOICE), this would give the following mix:
"mix2" [
2 SHARE 1 VOICE UNUSED
5 SHARE 1 VOICES
  1 VOICE instrument6...
PNUM SHARE ]
At the beginning of 'mix2', I have omitted the 'new mix' command M5MIX, which is not necessary when a mix is not processed through the Mixing Desk (see the Music 5000 User Manual page 83). Following '2 SHARE', you might expect to read '3 VOICES', since one voice has been subtracted from the four voices allocated to player 2 by 'mix1'. Actually, things go just as well without this command, although it could be included as a reminder.
3) Next we might wish 'mix3' to transfer another voice from player 2 to a new player 6. Noticing that player 2 now owns voices 2, 3 and 4, the voice selected for transfer can only be one of these three - say voice 2 (all three use the same instrument).
So, 'mix3' then reads:
"mix3" [
2 SHARE 2 VOICE UNUSED
6 SHARE 1 VOICES
  1 VOICE instrument6...
PNUM SHARE ]
During the programming of this piece, I first typed '1 VOICE UNUSED' instead of '2 VOICE UNUSED'. It took me some time before finding this was the cause of the message 'Too many players'. Because voice 1 had already been transferred by mix2, mix3 couldn't transfer a voice which player 2 didn't have.
4) In 'mix4' players 5 and 6 relinquish their voices for use by players 1 and 2:
"mix4" [
5 SHARE 1 VOICE UNUSED
6 SHARE 1 VOICE UNUSED
1 SHARE
  3 VOICE instrument1...
2 SHARE
  2 VOICE instrument3...
PNUM SHARE ]
Because player 1 owns voices 1 and 2 given to it by 'mix1', the voice coming from player 5 must be labelled '3 VOICE'. Similarly, player 2 owns voices 3 and 4, so the voice transferred from player 6 is then labelled '2 VOICE'.
5) Finally, 'mix5' returns the program to the state given initially by 'mix1':
"mix5" [
1 SHARE 3 VOICE UNUSED
2 SHARE
  1 VOICE instrument3...
PNUM SHARE ]
The chart below helps to visualize what voices serving a player are active, in each mix. The players are shown across the top of the chart, the mixes down the edge. The numbers in the boxes represent the voices on each player. An 'X' indicates that the voice shown in this position in the previous mix is freed by this mix.
player: | 1   | 2    | 3 | 4 | 5 | 6 |
--------|-----|------|---|---|---|---|
mix1    | 12  | 1234 | 1 | 1 |   |   |
mix2    | 12  | X234 | 1 | 1 | 1 |   |
mix3    | 12  | X34  | 1 | 1 | 1 | 1 |
mix4    | 123 | 234  | 1 | 1 | X | X |
mix5    | 12X | 1234 | 1 | 1 |   |   |
Whatever the number of mixes and the number of voice changes in your program, a chart of this type, if given a little attention, will rid you of the dreaded 'Too many voices in player...' message.
The method described above is designed to be 'efficient' in the sense that as few voice changes as possible are used. This is in the hope of minimising the number of 'glitches' (brief gaps in a player's output) which might occur.
An alternative, but less 'efficient' method, is to free all voices on a player and then redefine all the voices, including the ones which haven't changed, thus eliminating the need to worry about which voices were previously in use.

Published in AMPLINEX 021, March 1991