[Top][All Lists]

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

Re: Tips for code reusability

From: TJ Kolev
Subject: Re: Tips for code reusability
Date: Wed, 1 Mar 2023 14:35:17 -0600

I did try to do the first note trick, but obviously I didn't get the syntax right. Got it now.

Didn't get to tags and quoting. Those look very promising. Will investigate. Thank you for the references!

tjk :)

On Tue, Feb 28, 2023 at 5:50 PM Saul Tobin <> wrote: may help with the second question.

On Tue, Feb 28, 2023 at 5:08 PM TJ Kolev <> wrote:

I've decided to notate a brass band piece from a paper copy into some digital format that would be easier to edit and transform Picked LilyPond and have been using it with Frescobaldi. So far very happy with the whole setup.

I did a couple of instruments, and I am feeling my way through it. You can find what I have so far here:

I've been using the documentation a lot, and there are nice examples. However I have some questions I was unable to find answers for. I am hoping to get some ideas from this group.

(1) DrumVoice
Is there a way to define a default "note" for a drum voice? The piece has the bass drum and cymbal playing the same thing (with a two bar exception). I currently have the music duplicated, both rendering with the "bd" note. It would be nice if each was rendered with its separate note head. I was looking for something like this:

\new DrumVoice bd { \voiceOne \stemUp   \bassncymA ... }
\new DrumVoice cymc { \voiceTwo \stemDown \bassncymA ... }

(2) Copy music and replace bars
Some of the instruments, for a good part of the piece, play the same notes. Or transposition of some notes. Except here and there for a couple of bars they play different music. I am looking for a way to do something like this:

new frenchHornMusic = flugHornMusic.Transpose();
flugHornMusic.Replace(bars(10 through 14), { .... });
flugHornMusic.Replace(bars(108 through 114), { .... });

I know I can combine snippets of music, but the above is easier, when only a few bars differ. I am OK writing some custom function, and I looked at the "Extending" documentation. Could not figure out how the music is structured and how to get to the bars (if such an object exists).

I would appreciate any suggestions for the above issues. Or comments on how I am putting together the whole score.

tjk :)

reply via email to

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