[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Re: Tips for code reusability
From: Saul Tobin <saul.james.tobin () gmail ! com>
Date: 2023-02-28 23:50:42
Message-ID: CAPF+3FE5eQZdmDozh7_koCQVA7A9dX_OW3C4pxhhgGd=a735vw () mail ! gmail ! com
[Download RAW message or body]
https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#quoting-other-voices
may help with the second question.
On Tue, Feb 28, 2023 at 5:08 PM TJ Kolev <tjkolev@gmail.com> wrote:
> Greetings,
>
> 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:
> https://github.com/tjkolev/MusicScores/tree/develop/DanubeHoro
>
> 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 ... }
>
>
> Re:
> https://github.com/tjkolev/MusicScores/blob/develop/DanubeHoro/drums.ly#L211-L212
>
> (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.
>
> Cheers!
> tjk :)
>
[Attachment #3 (text/html)]
<div dir="ltr"><a href="https://lilypond.org/doc/v2.24/Documentation/notation/writing- \
parts#quoting-other-voices">https://lilypond.org/doc/v2.24/Documentation/notation/writing-parts#quoting-other-voices</a> \
may help with the second question.<br></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Tue, Feb 28, 2023 at 5:08 PM TJ Kolev <<a \
href="mailto:tjkolev@gmail.com">tjkolev@gmail.com</a>> wrote:<br></div><blockquote \
class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div \
dir="ltr">Greetings,<div><br></div><div>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.</div><div><br></div><div>I did a couple of instruments, and I am feeling \
my way through it. You can find what I have so far here: <a \
href="https://github.com/tjkolev/MusicScores/tree/develop/DanubeHoro" \
target="_blank">https://github.com/tjkolev/MusicScores/tree/develop/DanubeHoro</a></div><div><br></div><div>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.</div><div><br></div><div>(1) DrumVoice</div><div>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:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">\new DrumVoice \
<b>bd</b> { \voiceOne \stemUp \bassncymA ... }<br>\new DrumVoice <b>cymc</b> { \
\voiceTwo \stemDown \bassncymA ... }</blockquote><div><br></div><div>Re: <a \
href="https://github.com/tjkolev/MusicScores/blob/develop/DanubeHoro/drums.ly#L211-L212" \
target="_blank">https://github.com/tjkolev/MusicScores/blob/develop/DanubeHoro/drums.ly#L211-L212</a></div><div><br></div><div>(2) \
Copy music and replace bars</div><div>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:</div><div><br></div><div><font face="monospace">new frenchHornMusic = \
flugHornMusic.Transpose();</font></div><div><font \
face="monospace">flugHornMusic.Replace(bars(10 through 14), { .... \
});</font></div><div><div><font face="monospace">flugHornMusic.Replace(bars(108 \
through 114), { .... });</font></div></div><div><br></div><div>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).</div><div><br></div><div>I would appreciate any \
suggestions for the above issues. Or comments on how I am putting together the whole \
score.</div><div><br></div><div>Cheers!</div><div>tjk :)</div></div> \
</blockquote></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic