lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto-ottava Scheme script problems


From: Torsten Hämmerle
Subject: Re: Auto-ottava Scheme script problems
Date: Wed, 15 Aug 2018 12:56:24 -0700 (MST)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]