lilypond-user
[Top][All Lists]
Advanced

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

Re: Pitch value of previous note


From: David Sumbler
Subject: Re: Pitch value of previous note
Date: Fri, 30 Apr 2021 14:42:07 +0100
User-agent: Evolution 3.36.4-0ubuntu1


On Fri, 2021-04-30 at 04:17 -0700, Aaron Hill wrote:
On 2021-04-30 3:39 am, David Sumbler wrote:
I want to be able to insert a note of the same pitch as the preceding
one.  I don't mind what form the pitch information is in, so long as I
can use it to create a new note.  It could, for example, be in the form
"b,,", or something similar to "(-2, 6)" as used by ly:make-pitch.
 There may be other possibilities.

What about the existing pitch-repeating functionality in LilyPond?

%%%%
\version "2.22.0"

foo = { 4 4 }
{ b'2 \foo g' \foo }
%%%%

A duration without pitch is encoded as a NoteEvent with the pitch 
property.  expand-repeat-notes! is the internal procedure that carries 
over the most recent pitch.  So long as you insert these events early 
enough, LilyPond should do the heavy lifting for you.

You are correct: I invented a problem where none exists.

I confess that I had not realized that a duration without a preceding pitch or rest takes the pitch of the preceding note.  I actually thought that, following a rest, it would produce further rests.

I must have seen this in action many times, otherwise I would have lots of pitches in my music where there should be rests.  But somehow it doesn't seem to have lodged itself in my brain.

Perhaps I'm getting too old for this!

David


reply via email to

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