Segno Repeat Structure

2024-09-19 Thread Lucas Cavalcanti
Hello, fellow lilypond users!

Is it possible to use the segno and volta commands in lilypond to generate
a file like this screenshot below?
[image: image.png]
This question arose because I need to use the \unfoldRepeats command to
check if my parts are synced (polymeter music)
.

Best regards,
Lucas

Base code:
\version "2.24.4"
\relative c'' {
  c1 d e f \break
  %\repeat segno 2 {
\repeat volta 2 {
  c4 d8 e c4 d8 e
  c4 d8 e c4 d8 e
  c4 d8 e c4 d8 e
  \alternative {
  \volta 1 {f1}
  \volta 2 {g1}
  } % end alternative
} % end ritornelo
  %} % end segno
  \break e1 } % EOF


Segno Structure + Fine

2024-08-25 Thread Lucas Cavalcanti
Hello! I'm trying to replicate this behaviour in Lilypond but having a
little bit of trouble.
[image: image.png]

But I can only do something like this:
[image: image.png]
I've used the SegnoFormatter brief mode but it gives me a double coda
marking, which I do not want.
Any help would be appreciated!

On a side note: is it possible to to move the segno "text" above a
staff/context? Is it possible to also change the phrase (as to translate it
to another language)?

CODE:
\version "2.24.4"
music = {\relative c'' {
c,2 g'
\repeat segno 3 {
c4 d e d
c4 d e d
\alternative {
\volta 1 {g, a b a g a b a}
\volta 2 {c, d e d c d e d}
\volta 3 {\fine }
} % end alternative
} % end segno
}} % end relative & variable

\score { \music }
\score { \unfoldRepeats {\music} }

Best regards,
Lucas
\version "2.24.4"
music = {\relative c'' {
%\set Score.dalSegnoTextFormatter = #format-dal-segno-text-brief
c,2 g' 
\repeat segno 3 {
c4 d e d
c4 d e d
\alternative {
\volta 1 {g, a b a g a b a}
\volta 2 {c, d e d c d e d}
\volta 3 {\fine }
} % end alternative 
} % end segno 
}} % end relative & variable

\score { \music }
\score { \unfoldRepeats {\music} }

\enablePolymeter halts bar numbers

2024-08-13 Thread Lucas Cavalcanti
Hello! I was writing a piece and realized the bar numbers are omitted when
using the "\enablePolymeter" feature.
[image: image.png]

Is there any way to have both of them working together?

Best regards,
Lucas

\version "2.24.4"
song = { \new TabStaff { \tabFullNotation
\time 4/4 \relative c'' {
\repeat unfold 3 {c4 d e f c4 d e f \break}
} \break % end relative
} % end TabStaff
} % end variable
\score { \song \layout { \enablePolymeter } }
\score { \song \layout {} }
\version "2.24.4"
song = { \new TabStaff { \tabFullNotation 
\time 4/4 \relative c'' {
\repeat unfold 3 {c4 d e f c4 d e f \break}
} \break % fim do relative 
} % end TabStaff
} % end variable
\score { \song \layout { \enablePolymeter } }
\score { \song \layout {} }

TabStaff String Bend + Tie/Ghost Notes

2024-08-13 Thread Lucas Cavalcanti
Hello! I'm having a bit of trouble trying to replicate this behaviour with
string bending and ties:
[image: GuitarProStringBends]
A bit of context: I'm a long time GuitarPro user and now I am fully
migrating to lilypond. For the last 4 to 5 years I was only writing
standard sheet music and lead sheets; now I'm rewriting all my
tablature-based songs created in GP to Lilypond.
However, I still cannot find a way to replicate the behaviour mentioned
above. All that I can do is this:
[image: image.png]
I'm accustomed to seeing the stem displayed by the staff. In the way that
lilypond is outputting I cannot visualize correctly the beat structure of
the measure.
Any help on this would be greatly appreciated!
I'll be annexing the .ly file and pasting the code.

Best regards,
Lucas

\version "2.24.4"
gtbend = {\new TabStaff { \tabFullNotation \relative c''{
g2..\3\^ \grace a8\3 a8\3~\^ a2\3 %\grace a8\3
a8\2 f\3\^ fis4\3 d1\3
\break
g2..\3\^ \grace a8\3 a8\3~\^ a2\3 %\grace a8\3
a8\2 f\3\^ fis4\3 \bendHold \^ d1\3
}}}
\score { \gtbend }
\version "2.24.4"
gtbend = {\new TabStaff { \tabFullNotation \relative c''{
g2..\3\^ \grace a8\3 a8\3~\^ a2\3 %\grace a8\3 
a8\2 f\3\^ fis4\3 d1\3
\break
g2..\3\^ \grace a8\3 a8\3~\^ a2\3 %\grace a8\3 
a8\2 f\3\^ fis4\3 \bendHold \^ d1\3
}}}
\score { \gtbend }

Re: Simile/Percent Repeat + Volta with Alternative

2024-08-07 Thread Lucas Cavalcanti
Valentin, my friend, thank you so much.
If I may trouble you again, I've encountered a problem while trying to use
your method. I've applied it to a 5/4 two bar theme (similar to the case I
presented before); however, by removing the "superfluous" time signatures
the engraving breaks. I'm trying to remove those unnecessary time
signatures because they stand out.
[image: image.png]
\version "2.24.4"

makeDPercent =
#(define-music-function (duration) (ly:duration?)
   "Make a double percent repeat of given duration."
   (make-music 'DoublePercentEvent
   'length (ly:duration-length duration)))

music = {
\new TabStaff \with {
  \tabFullNotation}
  \relative { \time 5/4
  \repeat volta 4 {
  \repeat unfold 2 {c16 c d8\5 d\5} \repeat unfold 2 {c16 c d8\5}
  \repeat unfold 2 {c16 c d8\5 d\5} c16 c d8\5 4
  \alternative {
{\after 4*5
 \time 5/4 % if I remove this time signature the project won't
engrave.
 \makeDPercent 4*10 }
{\repeat unfold 2 {c16 c d8\5 d\5} \repeat unfold 2 {c16 c d8\5}
 2.~ 2}
  } % end alternative
  } % end ritornelo\volta
} % end relative
} % end variable

\score { \music }
%\score { \unfoldRepeats \music }

Best regards,
Lucas


Em qua., 7 de ago. de 2024 às 07:05, Valentin Petzel 
escreveu:

> Am Mittwoch, 7. August 2024, 06:53:02 MESZ schrieb Lucas Cavalcanti:
> > Hello. I'm migrating from Guitar Pro to Lilypond and I'm trying to
> > replicate something that I've always done in my scores and lead sheets:
> > [image: image.png]
> > I'm having a bit of a pickle while trying to recreate this score,
> > especially because of two factors:
> > 1. Lilypond's way of writing percent repeats.
> > 2. The frequent/periodical time signature changes (6/4 to 5/4).
> >
> > Is there a way to make a score that looks like this?
> >
> > Best regards,
> > Lucas
>
> Hello Lucas,
>
> first let’s write out your score:
>
> \new TabStaff \with {
>   \tabFullNotation
> } \relative {
>   \time 6/4
>   e,8 e e d'\5 e, e c' d\5 f d c d\5
>   \time 5/4
>   e, e e d'\5 e, e f' d f g\4
> }
>
> Now how do we get percent repeats? We can simply do \repeat percent count
> ...:
>
> \new TabStaff \with {
>   \tabFullNotation
> } \relative {
>   \repeat percent 2 {
> \time 6/4
> e,8 e e d'\5 e, e c' d\5 f d c d\5
> \time 5/4
> e, e e d'\5 e, e f' d f g\4
>   }
> }
>
> But note how this does not apply the time changes. So we need to specify
> them
> ourselves:
>
> \new TabStaff \with {
>   \tabFullNotation
> } \relative {
>   \after 4*11 \time 6/4
>   \after 4*17 \time 5/4
>   \repeat percent 2 {
> \time 6/4
> e,8 e e d'\5 e, e c' d\5 f d c d\5
> \time 5/4
> e, e e d'\5 e, e f' d f g\4
>   }
> }
>
> So how do we get repeats? In simple cases we can use \repeat volta count
> ...
> and \alternative for the voltas. Now here this is a bit complicated, as
> essentially the first alternative is actually a repeat.
>
> So instead of using \repeat percent we’ll need to manually place the
> Percent
> repeat signs:
>
> makeDPercent =
> #(define-music-function (duration) (ly:duration?)
>"Make a double percent repeat of given duration."
>(make-music 'DoublePercentEvent
>'length (ly:duration-length duration)))
>
> \new TabStaff \with {
>   \tabFullNotation
> } \relative {
>   \repeat volta 4 {
> \time 6/4
> e,8 e e d'\5 e, e c' d\5 f d c d\5 |
> \time 5/4
> e, e e d'\5 e, e f' d f g\4 |
> \alternative {
>   {
> \time 6/4
> \after 1. \time 5/4
> \makeDPercent 4*11
>   }
>   {
> \time 6/4
> e, e e d'\5 e, e c' d\5 f d c d\5~ |
> \time 5/4
> d1*5/4\5
>   }
> }
>   }
>   \section
> }
>
> Cheers,
> Valentin


Simile/Percent Repeat + Volta with Alternative

2024-08-06 Thread Lucas Cavalcanti
Hello. I'm migrating from Guitar Pro to Lilypond and I'm trying to
replicate something that I've always done in my scores and lead sheets:
[image: image.png]
I'm having a bit of a pickle while trying to recreate this score,
especially because of two factors:
1. Lilypond's way of writing percent repeats.
2. The frequent/periodical time signature changes (6/4 to 5/4).

Is there a way to make a score that looks like this?

Best regards,
Lucas
\version "2.24.4"

guitar = { \new Staff \relative c '{
%section's theme. this would be the fixed musical expression
%before the alternative.
\time 1,1,1,1,1,1 6/4 d8 d d d' d, d c' d f d c d
\time 5/4 d,8 d d d' d, d f' d f g
%volta 4 of the alternative would begin here:
\time 1,1,1,1,1,1 6/4 d,8 d d d' d, d c' d f d c d~
\time 5/4 d2.~ d2
} }

\score { \guitar }

OneStaff + Lyrics problem

2024-08-03 Thread Lucas Cavalcanti
Hello. I'm transcribing a piece and I have come to need to use the
"OneStaff" feature: I need to switch between multiple types of staff
between this song. However, I'm facing a problem while inputting lyrics:
the lyrics are aligned vertically with the OneStaff (as the reference
manual said it would) but I cannot override this situation in any way
whatsoever.
The first image is the output.
[image: 1. What is happening.jpeg]
This second image is what I wish to achieve.
[image: 2. What it should be like.jpeg]
Any help would be appreciated.
Best regards,
Lucas
\version "2.24.4"
\score { %\new OneStaff  { 
  << \new Staff = "latim" { \relative c'' {
\new Voice = "melody" { d4 d d d d1 } } }
\new Lyrics { \lyricsto "melody" { Ly rics to a song } }
>>% } % end of OneStaff
} % end of variable

Re: Question about voltas and repeats

2024-03-12 Thread Lucas Cavalcanti
Hi, Michael! Unfortunately, this is not what I'm looking for. You seem to
have written (or copied) the 'whatiwant' part. I'm looking for a way to
abstract (as Kieren has put) the volta command. The purpose is to minimize
writing while being able to export repeat/volta musical parts (plus
straight non volta parts) and being able to create independent multi-part
grid scores. The reasoning of the 'unfoldRepeat' command is to merely
create a straight non repeating score - and subsequently having it through
a repeat/volta pattern.

Em qua., 13 de mar. de 2024 às 01:59, Michael Werner 
escreveu:

> Hi Lucas,
>
> > On Mar 12, 2024, at 7:00 PM, Lucas Cavalcanti 
> wrote:
>>
>> >
>>> > Hello. I've been thinking about Lilypond's usage on parts: for one
>>> musician (for example, the singer singing the melody) I'd like to give them
>>> a score containing voltas using the repeat and volta commands; for another
>>> musician (for example, the drummer) I'd like to give them a score with no
>>> repeats and voltas. I know that if I'd like to create a full-band score
>>> (i.e a grid) I can use the \unfoldRepeats at every variable, creating one
>>> straight through score.
>>> >
>>> > However, is it possible to create something like a "Tempo Map" of
>>> sorts? Like a part/variable that gives instructions to the master grid to
>>> create repeats and voltas without the need to create new parts?
>>> >
>>> > My objective is to figure out a way to create independent grid scores
>>> from musician part scores. To give a singer one straight, 6 pages score, to
>>> give a drummer a 1 page score and to give the conductor a 4 page score.
>>> > Is that possible?
>>>
>>
> Unless I'm misunderstanding what it is you're after, I think this can be
> done. If you shift where you're calling the \unfoldRepeats function it
> seems to work just fine, while still following the guideline Kieren
> mentioned of including the volta structure. Something like:
>
> \version "2.24.3"
>
> melody = {
>   \relative c' {
> \repeat volta 2 {
>   g4 bes c r
>   \alternative {
> \volta 1 { g bes des c }
> \volta 2 { bes g r r }
> } } } }
>
> drumpart = {
>   \new DrumStaff {
> \drummode {
>   \repeat volta 2 {
> 4   
> \alternative {
>   \volta 1 { 4}
>   \volta 2 { 4}
> } } } } }
>
> %\book
> \score {
>   <<
> \melody
> \drumpart
>   >>
> }
>
> \score {
>   \unfoldRepeats
>   <<
> \melody
> \drumpart
>   >>
> }
>
> This gives two scores, with the same music. One with the repeats written
> with the volta structure, the second with the repeats unfolded.
> --
> Michael
>
>


Re: Question about voltas and repeats

2024-03-12 Thread Lucas Cavalcanti
Thanks for the reply, Kieren. Although you recommended not to, I'd like to
know if there is some documentation about this abstraction (going further
than the reference book's "Manual repeat marks"). This situation would help
me a lot.

Em ter., 12 de mar. de 2024 às 20:58, Kieren MacMillan <
kie...@kierenmacmillan.info> escreveu:

> Hi Lucas,
>
> I was told by people with a far deeper understanding of Lilypond’s than
> mine that trying to abstract the volta map is undesireable — it should be
> explicitly included in every music expression that it intersects with.
>
> Cheers,
> Kieren.
>
> > On Mar 12, 2024, at 7:00 PM, Lucas Cavalcanti 
> wrote:
> >
> > Hello. I've been thinking about Lilypond's usage on parts: for one
> musician (for example, the singer singing the melody) I'd like to give them
> a score containing voltas using the repeat and volta commands; for another
> musician (for example, the drummer) I'd like to give them a score with no
> repeats and voltas. I know that if I'd like to create a full-band score
> (i.e a grid) I can use the \unfoldRepeats at every variable, creating one
> straight through score.
> >
> > However, is it possible to create something like a "Tempo Map" of sorts?
> Like a part/variable that gives instructions to the master grid to create
> repeats and voltas without the need to create new parts?
> >
> > My objective is to figure out a way to create independent grid scores
> from musician part scores. To give a singer one straight, 6 pages score, to
> give a drummer a 1 page score and to give the conductor a 4 page score.
> > Is that possible?
> >
> > Best regards, Lucas.
> > 
>
> __
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>


Question about voltas and repeats

2024-03-12 Thread Lucas Cavalcanti
Hello. I've been thinking about Lilypond's usage on parts: for one musician
(for example, the singer singing the melody) I'd like to give them a score
containing voltas using the repeat and volta commands; for another musician
(for example, the drummer) I'd like to give them a score with no repeats
and voltas. I know that if I'd like to create a full-band score (i.e a
grid) I can use the \unfoldRepeats at every variable, creating one straight
through score.

However, is it possible to create something like a "Tempo Map" of sorts?
Like a part/variable that gives instructions to the master grid to create
repeats and voltas without the need to create new parts?

My objective is to figure out a way to create independent grid scores from
musician part scores. To give a singer one straight, 6 pages score, to give
a drummer a 1 page score and to give the conductor a 4 page score.
Is that possible?

Best regards, Lucas.


Question.pdf
Description: Adobe PDF document
\version "2.24.3"

\layout {
  \context {
\Staff
\RemoveAllEmptyStaves
  }
}
bateria = {
  \new DrumStaff { \drummode {
\repeat unfold 4 {4   }
}}}
melody = {
  \new Staff { 
\relative c' {
\repeat volta 2 {
  g4 bes c r
  \alternative {
  \volta 1 { g bes des c }
  \volta 2 { bes g r r }
  }

tempomapvolta = 
   {\repeat volta 2
s1
\alternative{
  \volta 1 {s1}
  \volta 2 {s1}
}
}
music = {<<
  \tempomapvolta
  \unfoldRepeats {\melody}
  \unfoldRepeats {\bateria}
>>}
%this part below is just for demonstration.
%Ignore all of its' code.
whatiwant = {<<
  {
  \new Staff { 
\relative c' {
\repeat volta 2 {
  g4 bes c r
  \alternative {
  \volta 1 { g bes des c }
  \volta 2 { bes g r r }
  }

  {
  \new DrumStaff { \drummode {
\repeat volta 2 {
  4   
  \alternative {
  \volta 1 { 4}
  \volta 2 { 4}
  }
}
}}}
>>}
%\book 
\score { \melody \layout {} }
\score { \music \layout {} }
\score { \whatiwant \layout {} }

Re: [HELP] RemoveAllEmptyStaves not working.

2024-03-06 Thread Lucas Cavalcanti
Hello, Kieren. Your suggestion did fix the issue. Thank you.

Em qua., 6 de mar. de 2024 às 14:52, Kieren MacMillan <
kie...@kierenmacmillan.info> escreveu:

> Hi Lucas,
>
> > I've used the RemoveAllEmptyStaves command to remove (obviously) the
> unnecessary staffs. However, the drumkit doesn't get removed like it should.
> > The drumkit staff is independent by itself; it is not part of a group
> staff. It is, however, a DrumStaff.
> > I've looked at the documentation (Hiding Staves) and found a similar
> situation (the double bass not being removed). However, the D.B was not
> removed because it was part of a section/group staff. Adding injury to the
> cause, I was not able comprehend the use of "Keep_alive" commands.
>
> It’s a little “nuclear”, but…
>
> \layout {
>   \context {
> \Score
> \RemoveAllEmptyStaves
>   }
> }
>
> [Note the \Score rather than \Staff]
>
> Hope that helps!
> Kieren.
> __
>
> My work day may look different than your work day. Please do not feel
> obligated to read or respond to this email outside of your normal working
> hours.
>
>


[HELP] RemoveAllEmptyStaves not working.

2024-03-06 Thread Lucas Cavalcanti
Hello. I'm writing a score of a song of which there are 16 measures of only
rests in two instruments (the rhythm and the drumkit). I've used the
RemoveAllEmptyStaves command to remove (obviously) the unnecessary staffs.
However, the drumkit doesn't get removed like it should.
The drumkit staff is independent by itself; it is not part of a group
staff. It is, however, a DrumStaff.
I've looked at the documentation (Hiding Staves
) and
found a similar situation (the double bass not being removed). However, the
D.B was not removed because it was part of a section/group staff. Adding
injury to the cause, I was not able comprehend the use of "Keep_alive"
commands.

Any help would be appreciated
Lucas
\version "2.24.3"

\layout {
  \context {
\Staff
\RemoveAllEmptyStaves
  }
}

tempomapnormal = {
  \numericTimeSignature
  \repeat unfold 2 {
  \time 6/4 \repeat unfold 6 { s4 }
  \time 4/4 \repeat unfold 3 {s4 s4 s4 s4} \break
  \repeat unfold 3 {s4 s4 s4 s4}
  \time 5/4 \repeat unfold 5 {s4} \break
  }
}
drumkit = \drummode { 
{
  
  \numericTimeSignature
  \time 6/4 
  4 \repeat unfold 5 r4
  \time 4/4
  \repeat unfold 6 {r4 r4 r4 r4}
  \time 5/4 r4 r4 r4 r4 r4
  %They have no difference. 
  %Both methods don't solve the issue.
  \time 6/4 \repeat unfold 6 r4
  \time 4/4 \repeat unfold 6 { r4 r4 r4 r4 }
  \time 5/4 \repeat unfold 5 r4
  %\repeat unfold 35 s4
}

}
Melody = { << \relative c' 
{
  %Just notes. No problem here.
  %\sectionLabel "Intro"
  r4 e' f e8 d4 e a,,8
  f''4 e8 d4
  c a,8 e''4 d8 c4
  b a,8 c'4 b8 a4. a,4 f'' e8 d4 e a,,8 f''4 e8 d4 c
  a,8 e''4 d8 c4 b a,8
  c' r8 gis a4 a,8 c'4 d
  %\break
  a,^\markup"Only the Melody staff should appear." e'' f
  e8 d4 e a,,8
  gis''4 f8 e4 d a,8 f''4
  e8 d4 c a,8 d'4
  c8 b4. a,4 
  %\break
  f''
  e8 d4 e a,,8 f''4
  e8 d4 c a,8 e''4
  d8 c4 b a,8 
  c' r8
  gis a4 a,8 4 
  
}
{ \tempomapnormal }
>>}

Rhythm = {<< \relative c' 
{
  %No problem here.
  4 \repeat unfold 5 {r4} 
  \repeat unfold 6 {r4 r4 r4 r4}
  r4 r4 r4 4 4 \break
  \repeat unfold 6 r4
  \repeat unfold 6 { r4 r4 r4 r4 }
  \repeat unfold 5 r4
}
{ \tempomapnormal }
>>}
music = {<<
  
  { \new Staff \with { instrumentName="Melody" } \Melody }
  { \new Staff \with { instrumentName="Rhythm" } \Rhythm }
  { \new DrumStaff \with { instrumentName="Drumkit" } \drumkit }
>>}

\score { \music 
 \layout { 
   %I've enabled polymeter because the drums will play
   %a 7/8 against the main rhythm and melody.
   \enablePolymeter 
} }

Witchcraft-help.pdf
Description: Adobe PDF document