Post-generation data editing

While it is the goal of slippery chicken, Common Music Notation (CMN) and LilyPond to generate finished pieces and scores without the need for further tweaking, some editing of the post-generation output may be occasionally desired. In addition to the option of using third-party software to tweak the output (either by editing the .eps or .pdf files directly using SVG editing software or by importing the generated MIDI files into notation software, as described on the output page), editing the generated data from within the Lisp environment is also possible.

The make-slippery-chicken function generates a slippery-chicken object when it is run (evaluated) in Lisp. This object contains all of the data generated by slippery chicken for the given piece and is assigned to the variable given as the first argument to the make-slippery-chicken function. Since this is a global variable, the data remains accessible to the user after it has been generated and can be modified within the slippery-chicken object.

+ Events vs. notes

The primary two kinds of data within a given slippery-chicken object that the user will want to modify are its event objects and its notes.

An event in slippery chicken consists of an individual rhythm object, either a note or a rest, and all of the data associated with that object, such as its duration, its pitch if it is not a rest (or pitches if it is a chord), and any marks or clefs attached to it, etc.

A note is a non-rest event. Some of the post-generation editing methods will have arguments for event numbers within a specific bar or sequence, and others will require the note number.

An example of getting the first event of a bar:

(let ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((vn (violin :midi-channel 1))))
        :set-palette '((1 ((c4 d4 e4 f4 g4 a4 b4 c5))))
        :set-map '((1 (1)))
        :rthm-seq-palette '((1 ((((2 4) (s) (s) e e e))
                                :pitch-seq-palette ((1 2 3)))))
        :rthm-seq-map '((1 ((vn (1))))))))
  (data (get-event mini 1 1 'vn)))

=> S

An example of getting the first note from the same bar:

(let ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((vn (violin :midi-channel 1))))
        :set-palette '((1 ((c4 d4 e4 f4 g4 a4 b4 c5))))
        :set-map '((1 (1)))
        :rthm-seq-palette '((1 ((((2 4) (s) (s) e e e))
                                :pitch-seq-palette ((1 2 3)))))
        :rthm-seq-map '((1 ((vn (1))))))))
  (data (get-note mini 1 1 'vn)))

=> E

close

+ Basic usage

A number of methods exist for editing data within a slippery-chicken object, and these will all take a slippery-chicken object as their first argument, which can also be the global variable created for the given slippery-chicken object or a variable to which that object has been assigned. The other arguments required for these methods can be found in the source code documentation for the slippery chicken post-generation editing methods, but will generally consist of at least the bar-number and event- or note-number of the data to be changed, and the new value to be set.

For example, adding a ppp mark to the 4th note (non-rest) of the 2nd bar of the va part of the slippery-chicken object assigned to the variable mini after it has been generated (outside of the scope of the make-slippery-chicken function) can be done in the following manner:

(let ((mini
       (make-slippery-chicken
        '+mini+
        :ensemble '(((vn (violin :midi-channel 1))
                     (va (viola :midi-channel 2))
                     (vc (cello :midi-channel 3))))
        :set-palette '((1 ((c3 d3 e3 f3 g3 a3 b3 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 -))
                                :pitch-seq-palette ((1 2 3 4 5 6)))))
        :rthm-seq-map '((1 ((vn (1 1 1))
                            (va (1 1 1))
                            (vc (1 1 1))))))))
  (add-mark-to-note mini 2 4 'va 'ppp)
  (cmn-display mini))

close

+ A few specific methods for post-generation data editing

The full list of methods available for post-generation editing of the data in a slippery-chicken object can be found in the source code documentation for the the slippery-chicken-edit file. A few of these methods will also be mentioned here in brief:

close

+ All post-generation editing methods


add-arrow-to-events
add-clef
add-event-to-bar
add-mark-all-players
add-mark-before-note
add-mark-to-event
add-mark-to-note
add-mark-to-notes-from-to
add-marks-sh
add-marks-to-note
add-marks-to-notes
add-tuplet-bracket-to-bar
add-tuplet-brackets-to-beats
auto-accidentals
auto-beam
auto-clefs
auto-slur
change-bar-line-type
change-pitch
change-pitches
change-time-sig
consolidate-all-notes
consolidate-all-rests
copy-bars
delete-bars
delete-clefs
delete-events
delete-rehearsal-letter
delete-slur
double-events
enharmonic-spellings
enharmonics
force-artificial-harmonics
force-rest-bars
map-over-bars
move-clef
move-events
note-add-bracket-offset
process-events-by-time
re-bar
remove-extraneous-dynamics
replace-events
replace-multi-bar-events
replace-tempo-map
respell-bars
respell-notes
respell-notes-for-player
rest-to-note
rm-marks-from-note
rm-marks-from-notes
rm-slurs
sc-delete-beams
sc-delete-marks
sc-delete-marks-before
sc-delete-marks-from-event
sc-force-rest
sc-move-dynamic
sc-remove-dynamic
sc-remove-dynamics
set-cautionary-accidental
set-rehearsal-letter
tie
tie-all-last-notes-over-rests
tie-over-all-rests
tie-over-rest-bars
tie-over-rests
trill
unset-cautionary-accidental


close