Re: Please tear apart this example lead sheet template for traditional Western folk tunes
Le 23/02/2022 à 02:14, Valentin Petzel a écrit : Hi Simon, note that to enable having multiple stanzas of lyrics the LY thing is not music, but a list of music. In LISP a list either the empty list '() or a pair (cons a b) where b is a list. Thus the list (a b c d) is in fact (cons a (cons b (cons c (cons d '() or (a . (b . (c . (d . '( which shorthands to (a b c d . '()). So if we were to use (list CN FB VC LY) this would correspond to `(,CN ,FB ,VC ,LY). Let’s say CB = a, FB = b, VC = c, LY = (d e). Then this would be (a b c (d e)). On the other hand using `(,CN ,FB ,VC . ,LY) [which corresponds to (cons CN (cons FB (cons VC LY)))] gives us (a b c d e), so a flat list. We could also write this as (append (list CN FB VC) LY). Also (cons* CN FB VC LY). Best, Jean
Re: Please tear apart this example lead sheet template for traditional Western folk tunes
Hi Simon, note that to enable having multiple stanzas of lyrics the LY thing is not music, but a list of music. In LISP a list either the empty list '() or a pair (cons a b) where b is a list. Thus the list (a b c d) is in fact (cons a (cons b (cons c (cons d '() or (a . (b . (c . (d . '( which shorthands to (a b c d . '()). So if we were to use (list CN FB VC LY) this would correspond to `(,CN ,FB ,VC ,LY). Let’s say CB = a, FB = b, VC = c, LY = (d e). Then this would be (a b c (d e)). On the other hand using `(,CN ,FB ,VC . ,LY) [which corresponds to (cons CN (cons FB (cons VC LY)))] gives us (a b c d e), so a flat list. We could also write this as (append (list CN FB VC) LY). Cheers, Valentin Am Mittwoch, 23. Februar 2022, 01:59:59 CET schrieben Sie: > Hi Valentin, > > one line in your Scheme code confused me. If you don’t mind explaining, > why do you write > > `(,CN ,FB ,VC . ,LY) > > instead of > > (list CN FB VC LY) > > ? > > Best, Simon > > On 22/02/2022 09:25, Valentin Petzel wrote: > > Hello Tom, > > > > A good template will separate content and form. Ideally you’d be able to > > use a few templates that work so universally that you need only to define > > the music variables and include the template file. This would mean that > > changing the music and the form can be done simply. If for example you > > wanted to change the layout a bit you do not want to have to change this > > in every score you have. Instead you can change it in the included layout > > definition and you’re done. > > > > We can even use functions to do this in a very clean manner. See the > > appended example. > > > > Cheers, > > Valentin > > > > Am Dienstag, 22. Februar 2022, 03:09:03 CET schrieb Tom Campbell: > >> I am about to transcribe a bunch of older Western folk music in lead > >> sheet > >> form for an open source tunebook. Am trying to create a robust template > >> so > >> I don't have to think too much about anything other than getting the > >> notes, > >> chords, and lyrics right. You can see it below, or rendered by the > >> invaluable Lilybin at http://lilybin.com/u6p5m8/8. > >> > >> Can you tell me what's bad about this as a template? The lead sheets will > >> contain chord names and guitar fretboard diagrams. Added a crucial (for > >> me) > >> section overriding the predefined guitar fretboard diagram for a chord. I > >> also took too long to figure out how to get pickup notes in a format that > >> seemed natural. > >> > >> Thanks! > >> > >> % Lead sheet with: > >> % - Guitar fretboard diagrams > >> % - Override a predefined fretboard diagram > >> % - Pickup note with text above it suppressed > >> % - Chord and other text suppressed above the pickup note > >> Please send critiques to tomcampb...@gmail.com > >> \version "2.18.2" > >> \include "predefined-guitar-fretboards.ly" > >> > >> % Override predefined fretboard for e minor. > >> % This just adds a G to the first (highest) string. > >> % A little contrived but it's brief. > >> \storePredefinedDiagram #default-fret-table \chordmode { e:m } > >> #guitar-tuning > >> #"o;2-2;2-3;o;o;3-4;" > >> > >> \header { > >> title = "Hit and Miss (Daphne)" > >> composer = "Trad." > >> } > >> > >> theMelody = \relative c { > >> > >>\clef treble > >>\key e \minor > >>\time 6/8 > >> > >> % Pickup note > >> > >>\partial 8 e'8 > >> > >> % Verse melody (truncated for clarity) > >> g4 a8 b4 e8 > >> d8. e16 fis8 > >> e4 b16 c > >> > >> } > >> > >> theLyrics = \lyricmode { > >> When Daph -- ne from fair > >> > >>Phoe -- bus did fly the -- > >> > >> } > >> > >> theChords = \chordmode { > >> % Replace the N.C. that would appear over > >> % the pickup note > >> \set noChordSymbol = "" > >> \partial 8 r8 > >> > >>e2.:min > >>b4.:min > >>e4.:min > >> > >> } > >> > >> \score { > >> > >><< > >>\new ChordNames { \theChords } > >>\new FretBoards { \theChords } > >>\new Voice = "one" { \autoBeamOn \theMelody } > >>\new Lyrics \lyricsto "one" \theLyrics > >> > >>\layout { } > >>\midi { } > >> > >> } signature.asc Description: This is a digitally signed message part.
Re: Please tear apart this example lead sheet template for traditional Western folk tunes
Hi Valentin, one line in your Scheme code confused me. If you don’t mind explaining, why do you write `(,CN ,FB ,VC . ,LY) instead of (list CN FB VC LY) ? Best, Simon On 22/02/2022 09:25, Valentin Petzel wrote: Hello Tom, A good template will separate content and form. Ideally you’d be able to use a few templates that work so universally that you need only to define the music variables and include the template file. This would mean that changing the music and the form can be done simply. If for example you wanted to change the layout a bit you do not want to have to change this in every score you have. Instead you can change it in the included layout definition and you’re done. We can even use functions to do this in a very clean manner. See the appended example. Cheers, Valentin Am Dienstag, 22. Februar 2022, 03:09:03 CET schrieb Tom Campbell: I am about to transcribe a bunch of older Western folk music in lead sheet form for an open source tunebook. Am trying to create a robust template so I don't have to think too much about anything other than getting the notes, chords, and lyrics right. You can see it below, or rendered by the invaluable Lilybin at http://lilybin.com/u6p5m8/8. Can you tell me what's bad about this as a template? The lead sheets will contain chord names and guitar fretboard diagrams. Added a crucial (for me) section overriding the predefined guitar fretboard diagram for a chord. I also took too long to figure out how to get pickup notes in a format that seemed natural. Thanks! % Lead sheet with: % - Guitar fretboard diagrams % - Override a predefined fretboard diagram % - Pickup note with text above it suppressed % - Chord and other text suppressed above the pickup note Please send critiques to tomcampb...@gmail.com \version "2.18.2" \include "predefined-guitar-fretboards.ly" % Override predefined fretboard for e minor. % This just adds a G to the first (highest) string. % A little contrived but it's brief. \storePredefinedDiagram #default-fret-table \chordmode { e:m } #guitar-tuning #"o;2-2;2-3;o;o;3-4;" \header { title = "Hit and Miss (Daphne)" composer = "Trad." } theMelody = \relative c { \clef treble \key e \minor \time 6/8 % Pickup note \partial 8 e'8 % Verse melody (truncated for clarity) g4 a8 b4 e8 d8. e16 fis8 e4 b16 c } theLyrics = \lyricmode { When Daph -- ne from fair Phoe -- bus did fly the -- } theChords = \chordmode { % Replace the N.C. that would appear over % the pickup note \set noChordSymbol = "" \partial 8 r8 e2.:min b4.:min e4.:min } \score { << \new ChordNames { \theChords } \new FretBoards { \theChords } \new Voice = "one" { \autoBeamOn \theMelody } \new Lyrics \lyricsto "one" \theLyrics \layout { } \midi { } }
Re: LilyPond 2.22.2 released
On 22/02/2022 14:07, Phil Holmes wrote: We are proud to announce the release of GNU LilyPond 2.22.2 on 2-22-22 (i.e. February the 22nd, 2022). Fabulous ;) Thanks to everyone involved!
Re: inconsistent \RemoveEmptyStaves action
On 22/02/2022 23:28, Lukas-Fabian Moser wrote: Do you consider this inferior (or unnecessarily verbose and therefore non-minimal)? No, the motivation for that was more naive. You’re probably right that it would actually be more minimal in a deeper sense to explicitly instantiate the staves. Best, Simon
Re: inconsistent \RemoveEmptyStaves action
On 2/22/22, 3:29 PM, "lilypond-user on behalf of Lukas-Fabian Moser" wrote: Hi Simon, > This is a minimal example for the issue you were having: > > %%% > \version "2.22.1" > > upper = { 1 \break 1 } > lower = { R1*2 } > > \score { > \new PianoStaff << \upper \lower >> > \layout { > \context { > \Staff > \RemoveEmptyStaves > } > } > } > Now that's interesting: For my taste, this is _too_ minimal. I don't wouldn't recommend relying on the implicit creation of contexts to turn \upper and \lower into staves (as opposed to, for instance, voices). So, I would always write \new PianoStaff << \new Staff \upper \new Staff \lower >> Do you consider this inferior (or unnecessarily verbose and therefore non-minimal)? I don't think it makes any difference in this particular situation. Both work appropriately. Personally, I always explicitly instantiate all of my contexts. Carl
Re: inconsistent \RemoveEmptyStaves action
Hi Simon, This is a minimal example for the issue you were having: %%% \version "2.22.1" upper = { 1 \break 1 } lower = { R1*2 } \score { \new PianoStaff << \upper \lower >> \layout { \context { \Staff \RemoveEmptyStaves } } } Now that's interesting: For my taste, this is _too_ minimal. I don't wouldn't recommend relying on the implicit creation of contexts to turn \upper and \lower into staves (as opposed to, for instance, voices). So, I would always write \new PianoStaff << \new Staff \upper \new Staff \lower >> Do you consider this inferior (or unnecessarily verbose and therefore non-minimal)? Lukas
Re: inconsistent \RemoveEmptyStaves action
Hi, On 12/02/2022 20:22, jh wrote: This is the shortest example I could figure out how to make David and Lukas-Fabian have already answered the core question, so allow me to comment on this: tiny examples are important for communication on the list and it takes a while to learn how to make one. This is a minimal example for the issue you were having: %%% \version "2.22.1" upper = { 1 \break 1 } lower = { R1*2 } \score { \new PianoStaff << \upper \lower >> \layout { \context { \Staff \RemoveEmptyStaves } } } I hope that gives you some ideas on how to boil down your excerpt even more. Best, Simon
LilyPond 2.22.2 released
We are proud to announce the release of GNU LilyPond 2.22.2 on 2-22-22 (i.e. February the 22nd, 2022). LilyPond is a music engraving program devoted to producing the highest-quality sheet music possible. It brings the aesthetics of traditionally engraved music to computer printouts. This version includes improvements and fixes since the release of the previous stable release in April 2021.
Re: Please tear apart this example lead sheet template for traditional Western folk tunes
Hello Tom, A good template will separate content and form. Ideally you’d be able to use a few templates that work so universally that you need only to define the music variables and include the template file. This would mean that changing the music and the form can be done simply. If for example you wanted to change the layout a bit you do not want to have to change this in every score you have. Instead you can change it in the included layout definition and you’re done. We can even use functions to do this in a very clean manner. See the appended example. Cheers, Valentin Am Dienstag, 22. Februar 2022, 03:09:03 CET schrieb Tom Campbell: > I am about to transcribe a bunch of older Western folk music in lead sheet > form for an open source tunebook. Am trying to create a robust template so > I don't have to think too much about anything other than getting the notes, > chords, and lyrics right. You can see it below, or rendered by the > invaluable Lilybin at http://lilybin.com/u6p5m8/8. > > Can you tell me what's bad about this as a template? The lead sheets will > contain chord names and guitar fretboard diagrams. Added a crucial (for me) > section overriding the predefined guitar fretboard diagram for a chord. I > also took too long to figure out how to get pickup notes in a format that > seemed natural. > > Thanks! > > % Lead sheet with: > % - Guitar fretboard diagrams > % - Override a predefined fretboard diagram > % - Pickup note with text above it suppressed > % - Chord and other text suppressed above the pickup note > Please send critiques to tomcampb...@gmail.com > \version "2.18.2" > \include "predefined-guitar-fretboards.ly" > > % Override predefined fretboard for e minor. > % This just adds a G to the first (highest) string. > % A little contrived but it's brief. > \storePredefinedDiagram #default-fret-table \chordmode { e:m } > #guitar-tuning > #"o;2-2;2-3;o;o;3-4;" > > \header { > title = "Hit and Miss (Daphne)" > composer = "Trad." > } > > theMelody = \relative c { > \clef treble > \key e \minor > \time 6/8 > > % Pickup note > \partial 8 e'8 > > % Verse melody (truncated for clarity) > g4 a8 b4 e8 > d8. e16 fis8 > e4 b16 c > > } > > theLyrics = \lyricmode { > When Daph -- ne from fair > Phoe -- bus did fly the -- > } > > theChords = \chordmode { > % Replace the N.C. that would appear over > % the pickup note > \set noChordSymbol = "" > \partial 8 r8 > e2.:min > b4.:min > e4.:min > } > > \score { > << > \new ChordNames { \theChords } > \new FretBoards { \theChords } > \new Voice = "one" { \autoBeamOn \theMelody } > \new Lyrics \lyricsto "one" \theLyrics > > \layout { } > \midi { } > } % Lead sheet with: % - Guitar fretboard diagrams % - Override a predefined fretboard diagram % - Pickup note with text above it suppressed % - Chord and other text suppressed above the pickup note Please send critiques to tomcampb...@gmail.com \version "2.22" STARTING INCLUDABLE TEMPLATE #(define (music-or-false? m) (or (ly:music? m) (not m))) #(define (music-or-list-or-false? m) (or (music-or-false? m) (list? m))) leadsheetScore = #(define-void-function (title composer voice chords lyrics) (markup? (markup? "Trad.") music-or-false? music-or-false? music-or-list-or-false?) (let* ((CN (if chords #{ \new ChordNames $chords #} (empty-music))) (FB (if chords (if voice #{ \new FretBoards $chords #} #{ \new FretBoards \with { \consists Bar_engraver \override BarLine.bar-extent = #'(-6 . 3) } $chords #}) (empty-music))) (VC (if voice #{ \new Staff \new Voice="auto" $voice #} (empty-music))) (LY (if lyrics (if voice (if (ly:music? lyrics) (list #{ \new Lyrics \lyricsto "auto" $lyrics #}) (map (lambda (x) (if (ly:music? x) #{ \new Lyrics \lyricsto "auto" $x #} (if (pair? x) ; If x is a pair of the form (key . music) we create a stanza indication #{ \new Lyrics \lyricsto "auto" { \set stanza = $(if (markup? (car x)) (car x) (format "~a" (car x))) $(cdr x) } #}))) lyrics)) (if (ly:music? lyrics) (list #{ \new Lyrics $lyrics #}) (map (lambda (x) (if (ly:music? x) #{ \new