Re: setting fretboard diagrams at the top of the page
Oops, forgot to include the community. On Sat, Jan 19, 2019 at 5:51 PM Mr Tim wrote: > This is fantastic. I just changed how I do my chords. I used to have > "invisible" staff, notes, etc to do this. This is very helpful. I > actually put all the "define" stuff in a separate file with definitions of > all the different chords I have used so far for all my songs. Then I > include it in my typset file and put the "name-and-fret-markup" lines there > for just the chords I need for that song. > > Thanks! > > On Thu, Jan 17, 2019 at 2:35 PM Carl Sorensen wrote: > >> Hi Evan, >> >> Welcome to LilyPond! >> >> On 1/15/19, 11:10 AM, "Evan Levine" wrote: >> >> Good afternoon! I've got a few things I'm brewing right now, but the >> most pressing is that I'm looking to set all of the chord diagrams >> for a >> lead sheet at the top of the page under the title, and modify the >> spacing of the diagrams to be centered on the page and have padding >> between each diagram. >> >> The key here, in my opinion, is to set the fret diagrams as markups, >> rather than as music. >> >> Thanks so much! Here's my code: >> >> Great job on providing a small example! That was helpful to see what you >> intended. >> >> The only problem with the example is that it wouldn't completely compile, >> because the music and lyrics were missing. It's much easier if you provide >> those. >> >> >> Please forgive me for any oversight of the protocol here, as this is >> my >> first interaction with the mailing list. >> >> The only oversight I see is that you put your mail at the top of another >> unrelated post. Please don't post your reply to the top of a full post, >> and when you start a new thread, don't do it by replying to a previous >> post. >> >> With that said, here's how I'd attack your problem. I've created some >> markup functions to allow you to have control over size, spacing, etc. >> >> Beginning of sample code >> >> \version "2.19.82" >> >> \header { >> title = "Steven Universe Theme" >> composer = "Rebecca Sugar, Aivi & Surasshu" >> tagline = ##t >> } >> >> #(define chord-name-fontsize 6) >> #(define name-fretboard-separation .75) >> #(define different-separation 8) >> #(define same-separation 2) >> #(define or-vspace 1.75) >> >> #(define fret-formatting "s:2.2;w:4;h:3;d:0.37;f:1;") >> >> #(define c-fret "4-x;3-4-2;2-3-2;1-x;") >> #(define e-one-fret "c:4-2-4;4-4-3;3-4-3;2-4-3;1-x;") >> #(define e-two-fret "4-x;3-4-2;2-4-3;1-2-1;") >> #(define f-fret "4-x;3-5-2;2-5-3;1-3-1;") >> #(define fm-fret "4-x;3-5-2;2-4-3;1-3-1;") >> >> #(define-markup-command (chord-name-markup layout props chord-name) >>(markup?) >>"Display a chord name in the desired formatting" >>(interpret-markup layout props >> #{ \markup \sans \fontsize #chord-name-fontsize $chord-name #} )) >> >> #(define-markup-command (name-and-fret-markup layout props chord-name >> fret-diagram) >>(markup? markup?) >>"Display a chord name and fretboard as stacked markups separated by >> name-fretboard-separation" >>(interpret-markup layout props >> #{ \markup \center-column { >> \chord-name-markup $chord-name >> \vspace #name-fretboard-separation >> $fret-diagram >> } >> #})) >> >> #(define-markup-command (or-markup layout props or-text) >>(markup?) >>"Display a separator between alternative fretboards" >>(interpret-markup layout props >> #{ \markup \center-column { >> \vspace #or-vspace >> \chord-name-markup $or-text >> } >> #})) >> >> \markup \line { >> \name-and-fret-markup "C" \fret-diagram #(string-append >> fret-formatting c-fret) >> \hspace #different-separation >> \center-column { >> \name-and-fret-markup "E" \line { >> \fret-diagram #(string-append fret-formatting e-one-fret) >> \hspace #same-separation >> \or-markup "or" >> \hspace #same-separation >> \fret-diagram#(string-append fret-formatting e-two-fret) >> \hspace #same-separation >> \or-markup "or" >> \hspace #same-separation >> \fret-diagram#(string-append fret-formatting e-two-fret) >> } >> } >> \hspace #different-separation >> \name-and-fret-markup "F" \fret-diagram #(string-append >> fret-formatting f-fret) >> \hspace #different-separation >> \center-column { >> \name-and-fret-markup "Fm" \fret-diagram #(string-append >> fret-formatting fm-fret) >> } >> >> } >> >> >> \score { >> << >> \new ChordNames { >> c1 e f c f >> } >> \new Staff { >> \new Voice = "melody" { >> \repeat unfold 5 {c'4 d' e' f'} >> } >> } >> \new Lyrics { >> \lyricsto "melody" { >> \repeat unfold 5 {tra la la la } >> } >> } >> >> >> } >> >> end of sample code >> >> HTH, >> >> Carl >> >> >>
Re: setting fretboard diagrams at the top of the page
Hi Evan, Welcome to LilyPond! On 1/15/19, 11:10 AM, "Evan Levine" wrote: Good afternoon! I've got a few things I'm brewing right now, but the most pressing is that I'm looking to set all of the chord diagrams for a lead sheet at the top of the page under the title, and modify the spacing of the diagrams to be centered on the page and have padding between each diagram. The key here, in my opinion, is to set the fret diagrams as markups, rather than as music. Thanks so much! Here's my code: Great job on providing a small example! That was helpful to see what you intended. The only problem with the example is that it wouldn't completely compile, because the music and lyrics were missing. It's much easier if you provide those. Please forgive me for any oversight of the protocol here, as this is my first interaction with the mailing list. The only oversight I see is that you put your mail at the top of another unrelated post. Please don't post your reply to the top of a full post, and when you start a new thread, don't do it by replying to a previous post. With that said, here's how I'd attack your problem. I've created some markup functions to allow you to have control over size, spacing, etc. Beginning of sample code \version "2.19.82" \header { title = "Steven Universe Theme" composer = "Rebecca Sugar, Aivi & Surasshu" tagline = ##t } #(define chord-name-fontsize 6) #(define name-fretboard-separation .75) #(define different-separation 8) #(define same-separation 2) #(define or-vspace 1.75) #(define fret-formatting "s:2.2;w:4;h:3;d:0.37;f:1;") #(define c-fret "4-x;3-4-2;2-3-2;1-x;") #(define e-one-fret "c:4-2-4;4-4-3;3-4-3;2-4-3;1-x;") #(define e-two-fret "4-x;3-4-2;2-4-3;1-2-1;") #(define f-fret "4-x;3-5-2;2-5-3;1-3-1;") #(define fm-fret "4-x;3-5-2;2-4-3;1-3-1;") #(define-markup-command (chord-name-markup layout props chord-name) (markup?) "Display a chord name in the desired formatting" (interpret-markup layout props #{ \markup \sans \fontsize #chord-name-fontsize $chord-name #} )) #(define-markup-command (name-and-fret-markup layout props chord-name fret-diagram) (markup? markup?) "Display a chord name and fretboard as stacked markups separated by name-fretboard-separation" (interpret-markup layout props #{ \markup \center-column { \chord-name-markup $chord-name \vspace #name-fretboard-separation $fret-diagram } #})) #(define-markup-command (or-markup layout props or-text) (markup?) "Display a separator between alternative fretboards" (interpret-markup layout props #{ \markup \center-column { \vspace #or-vspace \chord-name-markup $or-text } #})) \markup \line { \name-and-fret-markup "C" \fret-diagram #(string-append fret-formatting c-fret) \hspace #different-separation \center-column { \name-and-fret-markup "E" \line { \fret-diagram #(string-append fret-formatting e-one-fret) \hspace #same-separation \or-markup "or" \hspace #same-separation \fret-diagram#(string-append fret-formatting e-two-fret) \hspace #same-separation \or-markup "or" \hspace #same-separation \fret-diagram#(string-append fret-formatting e-two-fret) } } \hspace #different-separation \name-and-fret-markup "F" \fret-diagram #(string-append fret-formatting f-fret) \hspace #different-separation \center-column { \name-and-fret-markup "Fm" \fret-diagram #(string-append fret-formatting fm-fret) } } \score { << \new ChordNames { c1 e f c f } \new Staff { \new Voice = "melody" { \repeat unfold 5 {c'4 d' e' f'} } } \new Lyrics { \lyricsto "melody" { \repeat unfold 5 {tra la la la } } } >> } end of sample code HTH, Carl ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
setting fretboard diagrams at the top of the page
Good afternoon! I've got a few things I'm brewing right now, but the most pressing is that I'm looking to set all of the chord diagrams for a lead sheet at the top of the page under the title, and modify the spacing of the diagrams to be centered on the page and have padding between each diagram. Here are the other things I've been struggling to find documentation on: Changing the size of the chord names above the fretboard diagrams Inserting markup between the diagrams to indicate that they are different options of the same chord with the word "or" Thanks so much! Here's my code: \storePredefinedDiagram #default-fret-table \chordmode { e' } #ukulele-tuning #"4-3-(;4-3;4-3-);x;" \storePredefinedDiagram #default-fret-table \chordmode { e'' } #ukulele-tuning #"x;4-2;4-3;2-1;" chord_diagrams = \chordmode { c e e' e'' f f:m } \header { title = "Steven Universe Theme" composer = "Rebecca Sugar, Aivi & Surasshu" tagline = ##t } %these are the chord diagrams at the top of the page << \new ChordNames { \chord_diagrams } \new FretBoards { \set Staff.stringTunings = #ukulele-tuning \override FretBoard.fret-diagram-details.fret-count = #3 \override FretBoard.fret-diagram-details.finger-code = #'in-dot \override FretBoard.fret-diagram-details.open-string = "ܘ" \override FretBoard.fret-diagram-details.dot-radius = #.37 \override FretBoard.fret-diagram-details.top-fret-thickness = #3.6 \override FretBoard.fret-diagram-details.dot-label-font-mag = #.76 \override FretBoard.size = #3.6 \chord_diagrams } >> %end of chord diagrams \score { << \new ChordNames { \SUchords } \new Staff { \new Voice = "melody" { \melody } } \new Lyrics { \lyricsto "melody" { \SUlyrics } } >> } Please forgive me for any oversight of the protocol here, as this is my first interaction with the mailing list. Thanks again! On 1/15/19 12:00 PM, lilypond-user-requ...@gnu.org wrote: Send lilypond-user mailing list submissions to lilypond-user@gnu.org To subscribe or unsubscribe via the World Wide Web, visit https://lists.gnu.org/mailman/listinfo/lilypond-user or, via email, send a message with subject or body 'help' to lilypond-user-requ...@gnu.org You can reach the person managing the list at lilypond-user-ow...@gnu.org When replying, please edit your Subject line so it is more specific than "Re: Contents of lilypond-user digest..." Today's Topics: 1. Re:fingering color (David Kastrup) 2. Re:Ambitus per voice and Ez_numbers_engraver (Gloops) 3. Re:[newbie] Some \markup stuff (Kieren MacMillan) 4. Re:[newbie] Some \markup stuff (Kieren MacMillan) 5. Re:[newbie] Some \markup stuff (David Kastrup) 6. Re:select a note in a chord (Davide Bonetti) 7. Increasing space between staves - how to? (po_...@yahoo.fr) 8. Re:Increasing space between staves - how to? (Malte Meyn) 9. System spacing for Certain (Reggie) -- Message: 1 Date: Tue, 15 Jan 2019 14:30:52 +0100 From: David Kastrup To: Gianmaria Lari Cc: lilypond-user Subject: Re: fingering color Message-ID: <87imyqkpyr@fencepost.gnu.org> Content-Type: text/plain Gianmaria Lari writes: First time I try to change color of lilypond elements. This is what I did to change fingering color: \version "2.19.82" { c' \finger \markup { \with-color #red 1 }} Is there a better way? { c' -\tweak color #red -1 } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user