Re: Re-use \chordmode for strumming patterns
There's unfortunately a problem with my idea. If I put the strumming patterns into the same variable I use for ChordNames, it still reserves space for them, even if I set chordChanges = ##t. See this example for comparison. Is there any way around this? I would have expected non-printed chords to not have impacted the spacing of printed notes. \version 2.19.25 \score { \new ChordNames { \repeat unfold 32 c8 } \relative c'' { c1 c c c} } \score { \new ChordNames { \set chordChanges = ##t \repeat unfold 32 c8 } \relative c'' { c1 c c c} } \score { \new ChordNames { c1 c c c } \relative c'' { c1 c c c} } On Tue, Aug 25, 2015 at 11:31 AM, Joel Ebel jbe...@mybox.org wrote: chordRoot = #(define-music-function (m) (ly:music?) (event-chord-reduce m)) That works perfectly! I don't like the name. Once we come up with a nice bike shed color, we probably should provide that function in LilyPond proper and document it along with Pitch_squash_engraver. I agree that this would be a handy function to exist and have documented in section 1.1.4 of the notation reference, though I don't have a better idea for the name. Now that I know about event-chord-reduce, I see that this has been discussed before: https://code.google.com/p/lilypond/issues/detail?id=185 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re-use \chordmode for strumming patterns
Hi. I'm curious if there's a way to re-use a variable containing chords entered in \chordmode to create strumming patterns with Pitch_squash_engraver and \improvisationOn. I like only having to enter the chords once, so if I change something, I only need to do it in one place, and I also would like the strumming patterns in the midi output. But the issue is that handing multiple notes to the Pitch_squash_engraver gives it a double note-head. Is there a way to maybe extract the root of the chord, or get a single head from the Pitch_squash_engraver? Thanks! Joel Example: \version 2.19.25 chordNames = \chordmode { c4 c8 c~ c c c c g4 g8 g~ g g g g } \new ChordNames { \set chordChanges = ##t \chordNames } \new Voice \with { \consists Pitch_squash_engraver } { \improvisationOn % Would like some option here like: % \chordRoot \chordNames } ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Re-use \chordmode for strumming patterns
Joel Ebel jbe...@mybox.org writes: Hi. I'm curious if there's a way to re-use a variable containing chords entered in \chordmode to create strumming patterns with Pitch_squash_engraver and \improvisationOn. I like only having to enter the chords once, so if I change something, I only need to do it in one place, and I also would like the strumming patterns in the midi output. But the issue is that handing multiple notes to the Pitch_squash_engraver gives it a double note-head. Is there a way to maybe extract the root of the chord, or get a single head from the Pitch_squash_engraver? Thanks! Joel Example: \version 2.19.25 chordNames = \chordmode { c4 c8 c~ c c c c g4 g8 g~ g g g g } \new ChordNames { \set chordChanges = ##t \chordNames } \new Voice \with { \consists Pitch_squash_engraver } { \improvisationOn % Would like some option here like: % \chordRoot \chordNames } Try chordRoot = #(define-music-function (m) (ly:music?) (event-chord-reduce m)) I don't like the name. Once we come up with a nice bike shed color, we probably should provide that function in LilyPond proper and document it along with Pitch_squash_engraver. -- David Kastrup ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: Re-use \chordmode for strumming patterns
chordRoot = #(define-music-function (m) (ly:music?) (event-chord-reduce m)) That works perfectly! I don't like the name. Once we come up with a nice bike shed color, we probably should provide that function in LilyPond proper and document it along with Pitch_squash_engraver. I agree that this would be a handy function to exist and have documented in section 1.1.4 of the notation reference, though I don't have a better idea for the name. Now that I know about event-chord-reduce, I see that this has been discussed before: https://code.google.com/p/lilypond/issues/detail?id=185 ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user