I do not understand R1*4?
May be you wanted something like that, does not make sense for me and
may be there are better versions possible, anyway ...
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
\version "2.18.2"
\header {
title = "merging rests"
}
global = { \time 4/4 }
Key = { \key g\major }
%% ------ Piano ------
rhUpper = \relative c''
{
\voiceOne
\Key
%r1*4
\mark \markup {"4x"}\repeat volta 4 {r1}
g4 r8 g r2 |
}
rhLower = \relative c' {
\voiceTwo
\Key
%r1*4
\mark \markup {"4x"}\repeat volta 4 {r1}
b4 r8 b r2 |
}
lhUpper = \relative c' {
\voiceOne
\Key
%r1*4 |
\mark \markup {"4x"}\repeat volta 4 {r1}
g4 r8 g r2 |
}
lhLower = \relative c {
\voiceTwo
\Key
%r1*4|
\mark \markup {"4x"}\repeat volta 4 {r1}
d4 r8 d r2 |
}
PianoRH = {
\clef treble
\global
\set Staff.midiInstrument = #"acoustic grand"
<<
\new Voice = "one" \rhUpper
\new Voice = "two" \rhLower
>>
}
PianoLH = {
\clef bass
\global
\set Staff.midiInstrument = #"acoustic grand"
<<
\new Voice = "one" \lhUpper
\new Voice = "two" \lhLower
>>
}
piano = {
<<
\set PianoStaff.instrumentName = #"Piano"
\new Staff = "upper" \PianoRH
\new Staff = "lower" \PianoLH
\set Staff.shortInstrumentName = #"p"
>>
}
\score {
<<
\new PianoStaff = "piano" \piano
>>
\layout {
\context { \Staff \RemoveEmptyStaves }
\context {
\Score
\override BarNumber.padding = #3
skipBars = ##t
}
}
}
%~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Am 01.09.2015 22:59, schrieb Martin Lejeune:
Hi Everybody,
here's a newbie question.
I tried to configure "merging automatically" of rests in polyphonic
staffs (piano) with a snipped, which I found in the manual.
It doesn't work.
What's the mistake, any idea?
Thanks very much!
Cheers
Martin
PS:
MY EXAMPLE:
version "2.18.2"
header {
title = "merging rests"
}
global = { time 4/4 }
Key = { key gmajor }
%% ------ Piano ------
rhUpper = relative c''
{
voiceOne
Key
R1*4
g4 r8 g r2 |
}
rhLower = relative c' {
voiceTwo
Key
R1*4
b4 r8 b r2 |
}
lhUpper = relative c' {
voiceOne
Key
R1*4 |
g4 r8 g r2 |
}
lhLower = relative c {
voiceTwo
Key
R1*4|
d4 r8 d r2 |
}
PianoRH = {
clef treble
global
set Staff.midiInstrument = #"acoustic grand"
<<
new Voice = "one" rhUpper
new Voice = "two" rhLower
>>
}
PianoLH = {
clef bass
global
set Staff.midiInstrument = #"acoustic grand"
<<
new Voice = "one" lhUpper
new Voice = "two" lhLower
>>
}
piano = {
<<
set PianoStaff.instrumentName = #"Piano"
new Staff = "upper" PianoRH
new Staff = "lower" PianoLH
set Staff.shortInstrumentName = #"p"
>>
}
score {
<<
new PianoStaff = "piano" piano
>>
layout {
context { Staff RemoveEmptyStaves }
context {
Score
override BarNumber.padding = #3
skipBars = ##t
}
}
}
the SNIPPET doesn't work:
version "2.18.2"
new Score {
<<
new Staff <<
s4-markup{ LilyPond default, rests in both voices. }
relative c'' { c4 d e r | r2 e4 g | R1 }
\
relative c'' { c4 b a r | r a g2 | R1 }
>>
new Staff with {
override RestCollision.positioning-done = #merge-rests-on-positioning
}
<<
s4-markup{Merge rests as per standard notation practice.}
relative c'' { c4 d e r | r2 e4 g | R1 }
\
relative c'' { c4 b a r | r a g2 | R1 }
>>
}
}
layout {}
midi {}
}
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user