As another step toward in my path toward varying notation in LilyPond,
I am varying note shapes by semitone.  Usually, there are fewer than
12 note heads, but the semitone of the note determine the shape.

My current implementation uses a function shapeLayoutFunction which
returns an integer, which is an index into the vector
shapeNoteStyles.  This seems to work.  The function description is:

                  Function returning an integer which indexes into
                  shapeNoteStyles vector. It takes an argument of
                  pitch and tonic.

Altnernatively, I could define a function which return a note head
shape.  Does anyone see a good reason to prefer one to the other.


The first option has an advantage of using a small function like this:

#(define (shapeSemitone pitch tonic)
  (modulo (ly:pitch-semitones pitch) 12))

plus an already standard vector.

The second option has an advantage of everything being included in one
variable, but the disadvantage of requiring slightly more complicated
functions.

For examples, see Twinline or kevin in this page:

http://www.kelphead.org/chromatic/scales.html



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to