Beat markers in the chords section

2023-01-18 Thread Mike Dean
Hi group:
I'm wondering if there is a way to put beat markers in the chords section
as in the following:
[image: image.png]
The snippet follows:


harmonies =  \chordmode { d4:m | d2.:m | d:m | c2. | c | c |
c | d:m | d2:m c4 | d2.:m | d:m | d:m | d:m
d:m | d:m | c | c | c | c |
d:m | d:m | d:m d:m d:m \bar ":|." }

melody = \relative c' {
  \key d \minor
  \time 3/4
  \partial 4
  d4 d a' a a2 a8 a g4 g e  c2. R2.
  r4 r8 g' g g a4 a a a f g a8 d~ d2 R2. R r4 r f8 f
  d4 d a a8 a4. a4 g c, c8 c c4c2 R2. r4 r c8 c
  d4 f a g e c d d2~ d2.~ d4 r \bar ":|."
}
\score {
<<
\new ChordNames {
\set chordChanges = ##t
\harmonies
}
\new Voice = "one" { \melody }
>>
}


Mike Dean


Re: Beat markers in the chords section

2023-01-19 Thread Kieren MacMillan
Hi Mike,

> I'm wondering if there is a way to put beat markers in the chords section as 
> in the following:

Well, you could definitely use the Slash_repeat_engraver, if you know what 
you’re doing…
I don’t really, but I took a whack at it — see snippet below.

Hope that helps!
Kieren.

p.s. Really, the built-in repeat engravers should handle this more elegantly. 
I’ll see what I can do to put a patch together.

%%%  SNIPPET BEGINS
\version "2.23.14"

% Function to print a specified number of slashes
comp = #(define-music-function (count) (integer?)
  #{
\override ChordName.stencil = #ly:percent-repeat-interface::beat-slash
\override ChordName.thickness = #0.48
\override ChordName.slope = #1.7
\override ChordName.Y-offset = #1
\repeat unfold $count { r4 }
\revert ChordName.stencil
\revert ChordName.Y-offset
  #}
)

\layout {
  system-count = 4
  ragged-right = ##f
  ragged-last = ##f
  \context {
\ChordNames
chordChanges = ##f
\consists Percent_repeat_engraver
\override VerticalAxisGroup.staff-affinity = #DOWN
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing.padding = #1
  }
}

harmonies = \chordmode {
  d4:m \comp 6
  c4 \comp 8
  d2:m
  c4 | d2.:m | d:m | d:m | d:m
d:m | d:m | c | c | c | c |
d:m | d:m | d:m d:m d:m }

melody = \relative c' {
  \key d \minor
  \time 3/4
  \partial 4
  d4 d a' a a2 a8 a g4 g e  c2. R2.  
  r4 r8 g' g g a4 a a a f g a8 d~ d2 R2. R r4 r f8 f
  d4 d a a8 a4. a4 g c, c8 c c4c2 R2. r4 r c8 c 
  d4 f a g e c d d2~ d2.~ d4 r \bar ":|."
}

\score {
  <<
\new ChordNames \harmonies
\new Voice = "one" { \melody }
  >>
}
%%%  SNIPPET ENDS




Re: Beat markers in the chords section

2023-01-19 Thread Knute Snortum
On Thu, Jan 19, 2023 at 9:01 AM Mike Dean  wrote:
>
> Kieren: it worked great, thanks mauch
> I am having problems when I print to PDF in 2.24/Frescobaldi 3.2: the program 
> hangs (I'm not sure if it's on the Lilypond side or the Frescobaldi side --- 
> Frescobaldi says that it's not responding):

Have you tried invoking LilyPond from the command line?

https://lilypond.org/doc/v2.24/Documentation/usage/command_002dline-usage

Also, tell us what kind of computer you're on (Windows, Mac, Linux).


--
Knute Snortum



Re: Beat markers in the chords section

2023-01-19 Thread Mike Dean
Knute: No, I haven't run Lilypond from the command line (I have enough
trouble using it with Frescobaldi 3.2)
Machine: Windows 10 Pro 64-bit, 16GB memory
LP version 2.24
Mike Dean


On Thu, Jan 19, 2023 at 12:15 PM Knute Snortum  wrote:

> On Thu, Jan 19, 2023 at 9:01 AM Mike Dean  wrote:
> >
> > Kieren: it worked great, thanks mauch
> > I am having problems when I print to PDF in 2.24/Frescobaldi 3.2: the
> program hangs (I'm not sure if it's on the Lilypond side or the Frescobaldi
> side --- Frescobaldi says that it's not responding):
>
> Have you tried invoking LilyPond from the command line?
>
> https://lilypond.org/doc/v2.24/Documentation/usage/command_002dline-usage
>
> Also, tell us what kind of computer you're on (Windows, Mac, Linux).
>
>
> --
> Knute Snortum
>