Score layout

Score layout in slippery-chicken is done primarily using keyword arguments to the make-slippery-chicken function. Arguments are available for inserting elements into the header, for defining attributes of the systems, and for attributes related to measures. Not all arguments are available for both CMN and LilyPond output.

slippery chicken itself does not produce printable output. Instead, it generates the data and files necessary for printable output to be produced by third-party software, namely Common Music Notation (CMN) and LilyPond. See the installation page for details on how to obtain these applications and prepare slippery chicken for use with them. Specifics on how to generate the output, once the keyword arguments have been set in the make-slippery-chicken function, can be found on the output page.

Because the printable output is not produced by slippery chicken itself, tweaking of scores (such as moving colliding symbols on the page etc.) is not possible using slippery chicken code. However, since both CMN and LilyPond produce vector-based graphics files, their output can be easily edited in a click-and-drag manner using third-party SVG software such as Adobe Illustrator or the open source alternative Inkscape. More on tweaking output using these applications can be found on the output page.

The header in a score generally consists of the title and the composer of the work. For LilyPond, these can be set within the make-slippery-chicken function using the :title and :composer keywords:

(make-slippery-chicken
 '+new-piece+
 :title "A Slippery Chicken Piece"
 :composer "Joe Green"

LilyPond output for the above settings would produce the following header:

scores-header.png

NB: Only English characters can be used in the title. Accents and umlauts etc. are not supported.

Also note: Only the :title, and not the :composer keyword, is available for CMN.

close

Systems

+ Score order

The order in which instruments will appear in score output is indicated in slippery chicken by the order in which players are entered in the ensemble block.

:ensemble '(((fl (flute :midi-channel 1))
             (ob (oboe :midi-channel 2))
             (hn (french-horn :midi-channel 3))
             (tp (b-flat-trumpet :midi-channel 4))
             (vn (violin :midi-channel 5))
             (va (viola :midi-channel 6))
             (vc (cello :midi-channel 7))))
scores-order.png

close

+ Player groups

By default, slippery chicken will place all of the players of the ensemble into one group, resulting in a single group bracket in the score that encloses all players, as seen in the example above. However, the user can indicate specific groups of players using the staff-groupings keyword argument.

This argument takes a list of integers that indicate how many consecutive players from the ensemble are to be grouped together in one bracket in each system of the score. Thus, a staff-groupings value of '(2 2 3) applied to the ensemble above would indicate groupings of 2 players (fl and ob), 2 players (hn and tp), and 3 players (vln, vla, and vlc). When setting the value of staff-groupings, the sum of the numbers in the list must be equal to the total number of players in the ensemble.

:ensemble '(((fl (flute :midi-channel 1))
             (ob (oboe :midi-channel 2))
             (hn (french-horn :midi-channel 3))
             (tp (b-flat-trumpet :midi-channel 4))
             (vn (violin :midi-channel 5))
             (va (viola :midi-channel 6))
             (vc (cello :midi-channel 7))))
:staff-groupings '(2 2 3)
scores-group.png

NB: CMN and LilyPond handle single-staff groups differently. By default, CMN will place a group bracket around single-staff groups while LilyPond will leave the group bracket out if there is only one instrument in that group.

close

+ Bars per system

CMN has an additional option for determining the number of bars placed in each system. This can be done using the :bars-per-system-map keyword argument. This feature does not affect LilyPond layout (which is done automatically by that programme) .

The value passed to this argument must be a list of two-item lists, each of which consists of a bar number paired with a number of measures. An entry such as (3 5), for example, would indicate that CMN is to place 5 measures per system starting with bar 3.

The following, for example, will result in CMN output that has one measure in the first system, two in the next, three in the system after that (starting with bar 3), and four and five measures in the last two systems (starting with bars 7 and 11 respectively).

:bars-per-system-map '((1 1) (2 2) (3 3) (7 4) (11 5))
scores-bars-per-sys.png

close

Bars

+ Bar line types

By default slippery chicken produces data for score output in which all bar lines are normal (i.e. single) except for the right bar line of the last measure, which is a final double bar line.

scores-barlines-default.png

Bar line types can be changed by the user by means of post-generation editing, using the change-bar-line-type method. slippery chicken currently has 6 bar line types, which are indicated by number IDs rather than alphabetic symbols. These are:

0normal
1double bar
2final double bar
3begin repeat
4begin and end repeat
5end repeat

The change-bar-line-type method takes as its first argument a slippery-chicken object (or the variable it has been assigned to), the the bar number at the end of which the bar line is to be changed, and the number ID of the bar line type:

(let ((bar-lines-piece
       (make-slippery-chicken
        '+bar-lines-piece+
        :title "bar-lines piece"
        :instrument-palette +slippery-chicken-standard-instrument-palette+
        :ensemble '(((fl (flute :midi-channel 1))))
        :set-palette '((1 ((c4 d4 e4 f4 g4 a4 b4 c5))))
        :set-map '((1 (1 1 1)))
        :rthm-seq-palette '((1 ((((4 4) - e e e e - - e e e e -)))))
        :rthm-seq-map '((1 ((fl (1 1 1))))))))
  (change-bar-line-type bar-lines-piece 1 1)
  (change-bar-line-type bar-lines-piece 3 5)
  (write-lp-data-for-all bar-lines-piece :base-path "/tmp/"))
scores-barlines-change.png

NB: This is a score function only. Repeat bar lines will not be reflected in playback with MIDI or CLM.

close

+ Rehearsal letters

Data for rehearsal letters can be attached either by setting the rehearsal-letters slot of the slippery-chicken object directly, or in post-generation editing.

The rehearsal-letters slot takes a list of measure numbers, to which consecutive rehearsal letters are automatically added. No indication of the actual letter is necessary.

:rehearsal-letters '(3 6 10)
scores-letters-single.png

Placing individual rehearsals through post-generation editing is done using the set-rehearsal-letter method, which takes a slippery-chicken objects, a bar number, and a letter as its arguments.

(set-rehearsal-letter mini 3 'A)

slippery chicken attaches rehearsal letters to bar lines, which are only placed at the end of a given measure. When attaching a letter to measure 5, therefore, the letter will actually be attached to the right bar line of measure 4 (the user still enters 5 in the rehearsal-letters list). Thus, no rehearsal letter can be placed on the first measure of a piece.

By default, rehearsal letters are put over the bar lines of those instruments at the top of each group. The user can indicate that letters are to be put over all instruments in the score by using the :rehearsal-letters-all-players argument of the cmn-display method. If this is set to T the letters will be put over all instruments. (This can be useful when writing parts).

CMN and LilyPond differ in their manner of drawing rehearsal letters into a score. CMN enters the letter in a large, bold font, with no frame. LilyPond frames each letter in a thin box.

close

+ Clefs

By default, clefs in slippery chicken are handled automatically based on the values of the clefs, starting-clef, and clefs-in-c slots of the individual instrument objects. (See the page on instruments and the source code documentation on make-instrument for more detail on these three slots.) The software will also automatically place mid-measure clefs by default if a given instrument object has been defined with more than one clef.

The user can choose to delete all automatically placed clef changes before generating the printable output by setting the :auto-clefs keyword argument of the cmn-display and write-lp-data-for-all methods to NIL. Setting this value to NIL does not affect the starting-clef for the given instrument. When the :auto-clefs argument is set to NIL, the starting-clef will be placed in the first measure and all other clef data will be deleted from the remaining events of the slippery-chicken object before generating the score.

(cmn-display +sc-object+ :file "/tmp/mini.eps" :auto-clefs nil)

(write-lp-data-for-all +sc-object+ :base-path "/tmp/" :auto-clefs nil)

The user can manually insert or remove a clef for a given player at any point in the piece using the post-generation editing methods add-clef and delete-clefs. If these methods are used, the :auto-clefs argument within the calls to cmn-display or write-lp-data-for-all must be set to NIL, as any manually inserted clefs will otherwise be deleted.

The add-clef method can be used to place a clef sign before a given note-event (including rests) in the score by specifying the bar number, note-event number, and player:

(let ((mini
       (make-slippery-chicken
        '+mini+
        :title "A Slippery Chicken Piece"
        :composer "Joe Green"
        :instrument-palette +slippery-chicken-standard-instrument-palette+
        :ensemble '(((vc (cello :midi-channel 1))))
        :tempo-map '((1 (q 72)))
        :set-palette '((1 ((g3 a3 b3 c4 d4 e4 f4 g4))))
        :set-map '((1 (1 1 1)))
        :rthm-seq-palette '((1 ((((4 4) - e e e e - - e e e e -))
                                :pitch-seq-palette (1 2 3 4 5 6 7 8))))
        :avoid-melodic-octaves nil
        :rthm-seq-map '((1 ((vc (1 1 1)))))))) 
  (add-clef mini 'vc 2 2 'tenor)
  (add-clef mini 'vc 3 3 'treble)
  (write-lp-data-for-all mini :base-path "/tmp/" :auto-clefs nil))
scores-clefs.png

Setting the :auto-clefs argument to NIL will result in the user being required to manually place all clef changes unless the separate post-generation editing method auto-clefs is called prior to the add-clef and delete-clefs methods. Although this method has the same name as the :auto-clefs keyword argument of the cmn-display and write-lp-data-for-all methods, it is a separate method and can be called outside of their scope. This enables the user to have slippery chicken automatically place clef changes and still manually insert and remove clefs. Use of this method requires the :auto-clefs keyword argument of the cmn-display and write-lp-data-for-all methods be set to NIL.

  (auto-clefs mini)
  (add-clef mini 'vc 2 2 'tenor)
  (add-clef mini 'vc 3 3 'treble)
  (write-lp-data-for-all mini :base-path "/tmp/" :auto-clefs nil)

close

Transposed scores and generating parts

+ Transposed scores

By default, all scores generated from the data of a slippery-chicken object will be produced at concert pitch, or "in C". This feature can be disabled to allow for the generation of scores with transposed parts for any transposing instruments by setting the :in-c argument of the cmn-display and write-lp-data-for-all methods to NIL.

Default generation in C:

scores-in-c.png

Setting the :in-c argument to NIL:

(write-lp-data-for-all mini :base-path "/tmp/" :in-c nil)

…produces transposed scores:

scores-transposed.png

NB: If the clefs-in-c slot of a given instrument object is set, the clefs used in C scores for a given instrument will be drawn only from those clefs. This can be helpful, for instance, when writing for an instrument that sounds in the bass clef but is written in the treble, such as the bass clarinet or the baritone saxophone.

close

+ Parts

CMN

The cmn-display method has an optional keyword argument :players that allows for the generation of scores with only a selected group of players from the ensemble. This argument takes a list of one or more of the player IDs from the ensemble. If music for only one player is desired, the single player ID must be written as a one-item list.

Producing a sectional score using CMN (here in C by default) that contains only the music for the players hrn, tpt, tbn, and tba, can be done as such:

(cmn-display mini :file "/tmp/mini.eps" :players '(hrn tpt tbn tba))

Parts are generated for individual players in CMN by setting the players keyword argument to a list of only one player. If this player plays a transposing instrument, the :in-c argument must also be set to NIL.

(cmn-display mini :file "/tmp/mini.eps" :in-c nil :players '(cl))
LilyPond

The files required to generate parts using LilyPond are produced automatically by the write-lp-data-for-all method, as described on the output page. The files required to generate the individual parts can be identified by a suffix consisting of the player ID plus -part.ly. All LilyPond parts are automatically generated in the transposing key of the given instruments regardless of the value of the :in-c argument, which only affects the -score.ly file.

close