slippery chicken documentation - players and the ensemble

## Players and the ensemble

This page addresses topics relating to players and the ensemble. A separate page is available for information specific to instruments and instrument-palettes.

### + Players

slippery chicken distinguishes between players, which make up the ensemble, and instruments, several of which can be assigned to the same player. For example, the same player can double on saxophone and clarinet, or one percussionist may switch from xylophone to vibraphone at some point during the composition. No player can play more than one instrument at a given time.

The players are defined as a list of parenthetical expressions in the `ensemble` block of the `make-slippery-chicken` function (see below). Each player definition consists of a user-chosen ID for the player coupled with a list of the instruments associated with that player and up to three optional keyword arguments (details below) for setting various slots of the `player` objects to be created.

The IDs used for the players can be any arbitrary alpha-numeric symbol, and are defined by the user for each piece. These IDs must be unique within the scope of the piece. They will be used as a reference from within the `rthm-seq-map` (see the page on rthm-seq-palettes and rthm-seq-maps for more detail). If LilyPond is to be used for printable output, the names chosen for the players cannot contain numbers (e.g. `violin-1`), as LilyPond's parser does not accept them. One option is to use hyphenated alphabetical characters instead, such as `violin-one`.

The players can only be assigned existing `instrument` objects from a current `instrument-palette` (see the page on instruments and instrument-palettes for more detail). The names of the instruments listed here must be the IDs of the given `instrument` objects exactly as they are defined in the `instrument-palette` being used.

Each player definition can also include the keyword arguments that belong to the `make-player` function, namely `:midi-channel`, `:microtones-midi-channel`, and `:cmn-staff-args`. If the MIDI arguments are not specified, all players will default to MIDI channel 1 in any MIDI files generated, and no extra MIDI channels will be made for microtonal material. See the section on MIDI and microtones below for more on this.

An example of a player definition with just one instrument (`flute` in this case), which is designated for playback on MIDI-channel 1, and which will have no microtones in the MIDI output, might look like this:

    (fl ((flute) :midi-channel 1))

NB: The `:microtones-midi-channel` setting only affects MIDI output. The given instrument may still have microtonal pitches indicated in the score (and the data of the `slippery-chicken` object generated). See the section on MIDI and microtones below.

A player definition for a performer that doubles on B-flat clarinet and B-flat bass clarinet, who will be playing microtones during the piece, may look like this:

    (cl ((b-flat-clarinet bass-clarinet)
         :midi-channel 2 :microtones-midi-channel 3))

These definitions are then enclosed in a list and passed to the `:ensemble` keyword argument of the `make-slippery-chicken` function, as described below.

close

### + The ensemble

Ensembles in slippery chicken are assembled from `players`, each of which may be assigned one or more `instruments`. When creating an `ensemble` within a call to the `make-slippery-chicken` function, the ensemble is defined using the `:ensemble` keyword, which directly sets the value of the corresponding `ensemble` slot of the resulting `slippery-chicken` object.

Defining the ensemble is very straightforward. The individual player definitions are wrapped in two sets of parentheses and passed as a quoted list to the `:ensemble` keyword of the `make-slippery-chicken` function, as such:

    :ensemble '(((fl ((alto-flute piccolo)
                      :midi-channel 1 :microtones-midi-channel 2))
                 (cl ((b-flat-clarinet bass-clarinet)
                      :midi-channel 3 :microtones-midi-channel 4))
                 (hn (french-horn :midi-channel 5 :microtones-midi-channel 6))
                 (perc (marimba :midi-channel 7))
                 (solo (violin :midi-channel 8 :microtones-midi-channel 9))
                 (vln (violin :midi-channel 11 :microtones-midi-channel 12))
                 (vla (viola :midi-channel 13 :microtones-midi-channel 14))
                 (vc (cello :midi-channel 15 :microtones-midi-channel 16))))

It is important to note that each of the players defined within an ensemble must have a different ID. However, multiple players can play multiple instances of the same instrument, as can be seen above in the `solo` and `vln` players. It is also important to ensure that multiple players are not assigned to the same MIDI channel, in particular if they are playing different material on different instruments, though of course this is only important if MIDI files are to be generated.

The order in which the players are listed in the `ensemble` block will be the order in which the instruments appear in the score. If not otherwise specified (see the section on instruments-hierarchy below), the order in which the players are listed in the `ensemble` block will also be the order in which slippery chicken automatically selects pitches for the corresponding instruments (see the documentation on how slippery chicken selects pitches). In the above example, for instance, pitches in each section would first be selected for the `fl` player (either `alto-flute` or `piccolo`, depending on the section), then for the `cl` player etc.

NB An ensemble object created in advance of the call to `make-slippery-chicken` can also be passed to the `make-slippery-chicken` function.

close

### + The instrument-change-map

If a player has been defined as doubling on more than one instrument, slippery chicken will need an `instrument-change-map` to determine when in the piece the player plays which of its assigned instruments, e.g.:

    :instrument-change-map '((1 ((fl ((1 flute) (3 piccolo) (5 flute)))
                                 (cl ((1 b-flat-clarinet) (2 bass-clarinet)
                                      (6 b-flat-clarinet)))))
                             (2 ((fl ((2 piccolo) (4 flute)))
                                 (cl ((2 bass-clarinet)
                                      (3 b-flat-clarinet))))))

The `instrument-change-map` takes at its top level a list of section IDs. These must be identical to the IDs also used in the `set-map` and the `rthm-seq-map` (see the pages on pitches and rthm-seq-palettes and rthm-seq-maps for more details).

Each section is then associated with a list of player IDs that are each coupled with a list of 2-item lists. These 2-item lists contain the number of a specific sequence within the given section, paired with the `instrument` ID that is to be played beginning with that sequence. Instruments cannot be changed mid-sequence, rather only at the beginning of new sequence. As with the player definitions, the instrument IDs here must be identical to those stipulated in the `instrument-palette` being used for the piece.

In the above example, the `fl` player begins with the `flute` at sequence 1 of section one, then changes to the `piccolo` at the beginning of sequence 3 of the same section, and back to the `flute` at sequence 5, and so forth.

An `instrument-change-map` is always required for all players that are defined as 'doubling' (i.e. playing more than one instrument) in the ensemble block, even if the user does not end up having them change instruments during the piece. All doubling players must have at least an indication for which instrument is to be played in sequence one of section one.

close

### + instruments-hierarchy

slippery chicken automatically selects pitches for the instruments one player after the next. By default, the order in which it does this follows the order in which the players are listed in the `ensemble` block (see the documentation on how slippery chicken selects pitches for more detail on this process). When choosing pitches for each instrument, slippery chicken takes into account which pitches it has already assigned to other instruments that are also playing in that sequence, which limits the pitches available to instruments of similar ranges as each player is processed. The order in which the instruments are allocated pitches can therefore be very important.

Should the user wish to specify a different order for the pitch-selection process than the default, the `:instruments-hierarchy` keyword of the `make-slippery-chicken` function can be used to set the corresponding slot of the resulting `slippery-chicken` object. Since the order in which instruments appear in the score is also determined by the order in which they are listed in the `ensemble` block, this feature may be used, for example, when composing for a solo instrument with ensemble, where the user may desire the `violin` to be given first preference of pitches even though it appears in the middle of the score layout.

Using the ensemble defined above, such an `instruments-hierarchy` might be specified, for example, as such:

    :instruments-hierarchy '(solo vln fl cl vla hn perc vc)

close

### + MIDI and microtones

slippery chicken handles microtonal pitch material for a given instrument on a separate channel to that of the equal-tempered pitch material. This allows the correct playback of mixed chromatic and microtonal chords. If a given instrument is to play microtones in a piece, the user must specify the microtone channel in the `ensemble` block of the `make-slippery-chicken` function using the `:microtones-midi-channel` keyword argument.

    :ensemble '(((vln (violin :midi-channel 1 :microtones-midi-channel 2))
                 (vla (viola :midi-channel 3 :microtones-midi-channel 4))
                 (vc (cello :midi-channel 5 :microtones-midi-channel 6))))

NB: The generation of musical material that includes microtones also requires that the `microtones` slot of the given `instrument` object is set to `T` and the given set contains microtonal pitches.

slippery chicken produces microtones in MIDI using pitch-bend. Since pitch-bend in MIDI always affects an entire channel and slippery chicken currently only uses one channel per instrument for microtones, all simultaneously occurring pitches on the microtone channel will be of the same type (quarter-tone, sixth-tone, or twelfth-tone) regardless of their actual type in the score. Thus, microtonal chords containing mixed microtone types will not render correctly in the MIDI output. This does not affect the printable output.

Linear microtonal pitch sequences consisting of only one pitch at a time are not affected by this limitation.

NB: Internally, slippery chicken always generates the pitch-bend values for MIDI output upwards from the nearest lower semitone, even though this might not be the semitone printed in the score. For example, the MIDI note number generated for `GQS4` is calculated as a half-semitone upwards from `G4`, while `GQF4` is calculated as a half-semitone upwards from `FS4`. This allows chords consisting of simultaneous microtonal sharps and flats of the same type to be rendered correctly in the MIDI output.

close