lilypond-user
[Top][All Lists]
Advanced

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

Re: Lining up notes in staves with different rhythms and time signatures


From: tisimst
Subject: Re: Lining up notes in staves with different rhythms and time signatures
Date: Thu, 20 Aug 2015 16:11:20 -0700 (MST)

Malte Meyn-3 wrote
> Am 20.08.2015 um 20:07 schrieb Jack Taylor:
>>
>> I have managed to make the time signatures for each song independent, but
>> I'm having problems making the notes line up (and with stopping the music
>> from running off the page). I've dumped my current code at PasteBin
>> <http://pastebin.com/Z6kmy6yt>  if you want to inspect it (it's not
>> very long).
> 
> Probably the easiest way to achieve something very similar to the image 
> you posted is to scale the durations of the second staff (f. e. if there 
> is a “e4. r4” in the upper staff and a “e4.” in the lower, scale it to 
> “e4.*5/3”) and set beams and bar lines manually (turn the automatic 
> behaviour off with \cadenzaOn).
> 
> Here is a solution (I also moved the Metronome_mark_engraver from Score 
> to Staff to be able to print to a tempo on each staff):

Nice work, Malte! I've added a few *tiny* things to make the code exactly
match the target image from the OP:

%%%%%%%%%%%%%%%%%%

\version "2.18.2"

\layout {
   \context {
     \Score
     \remove "Timing_translator"
     \remove "Default_bar_line_engraver"
     \remove "Metronome_mark_engraver"
   }
   \context {
     \Staff
     \consists "Timing_translator"
     \consists "Default_bar_line_engraver"
     \consists "Metronome_mark_engraver"
   }
   indent = 0    % <--- added
}

\score {
   <<
     \new Staff \with {
       instrumentName = "a)"
     } \relative c'' {
       \time 6/8
       \tempo "Tempo Giusto"
       \partial 8 g8 |
       c4 b8 d4 a8 |
       g4. r4 g'8 |
       g4 d8 g4 f8 |
       e4. r4
       \bar "|" \break  % <--- added for mid-measure break
       c8 |
       g'4 a8 g4 e8 |
       c4. r4 e8 |
       d4 b8 c4 a8 |
       g4. r4 
       \bar "|"  % <--- added
     }
     \addlyrics  {
       Jó | es -- tét bar -- na | lány    Mi | lö -- le te -- ge | det?
       | Ta -- | lán a va -- cso -- | rád    Nem | i -- gen jól e -- | sett
     }
     \new Staff \with {
       instrumentName =  "b)"
       \omit TimeSignature % don’t print it
     } \relative c'' {
       \tempo "Rubato"
       \cadenzaOn % don’t do barchecks, barlines, etc. automatically
       % now scale durations so that they fit to the other voice
       % you have to set manual beams [ ]
       % and manual barlines with \bar "|"  % <--- added
       g8[ c8*2 d8 c8*2] \bar "|"
       a8 g4.*5/3 \bar "|"
       e'8[ g8*2 d8 e8*2] \bar "|"
       g8 e4.*5/3 \bar "|"
       e8[ g8*2 a8 g8*2] \bar "|"
       e8 c4.*5/3 \bar "|"
       d8 d4.*2/3
       a16*2 c8.*4/3 \bar "|"
       a8 g4.*5/3 \bar "|"
     }
     \addlyrics {
       Vi -- rá -- gim, vi -- rá -- gim Gyö -- nyö -- rü vi -- rá -- gim
       föd -- re bo -- re ja tok, En -- gem si -- ras -- sa tok
     }
   >>
}

%%%%%%%%%%%%%%%%%%

I can't claim any more than that from your excellent solution ;-) Well done!

- Abraham



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Lining-up-notes-in-staves-with-different-rhythms-and-time-signatures-tp179831p179832.html
Sent from the User mailing list archive at Nabble.com.



reply via email to

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