David Bellows wrote
> The following works as intended:
> <c e g>
>  or
> <c e g>
> 4
> 
> but these produce errors:
> <c e g>
> \f or
> <c e g>
> 4\f
> 
> The error message:
> 
> GNU LilyPond 2.19.82
> Processing `auto-ottava.ly'
> Parsing...auto-ottava.ly:24:15: In procedure ly:pitch-steps in
> expression (ly:pitch-steps p):
> auto-ottava.ly:24:15: Wrong type argument in position 1 (expecting Pitch):
> ()
> 
> The problem seems to be when there are dynamics involved with chords.
> Note, this does *not* happen with single notes and dynamics, only with
> chords and dynamics.


Hi David,

In chords, all the elements have to be looped, and, as it happens, dynamics,
but also scripts like staccato etc. will be among these elements and calling
ledger-line-no passing anything other than a pitch will lead to the "Wrong
type argument" error.

Here's a quick fix (see file attached below):
Filter out pitches from the elements and use the filtered list "pitches"
instead of "elts". This way, only pitches will be passed to ledger-line-no,
and everything will work as desired.
There might be more elegant ways, but I wanted to keep the coding as
original as possible.

auto-ottava2.ly
<http://lilypond.1069038.n5.nabble.com/file/t3887/auto-ottava2.ly>  

HTH,
Torsten





--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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

Reply via email to