Re: French tablature (with note heads)?

2022-07-09 Thread Alasdair McAndrew
Dear Jean,

That's just perfect - very nicely done indeed - with many thanks.  Also -
Tobias Hume!  (I'm attempting to typeset in modern notation one of the
pieces from his "Poeticall Musick" of 1607, for two lyra viols tuned ffeff
and one bass viol.)

However, from looking at your score, there seem to be quite a few tweaks
needed in order to move notes and letters around to get everything in the
right place.  I wonder if this could be made internal to Lilypond, so that,
for example, calling "FrenchTab" would give you everything you needed?

Alasdair


Re: French tablature (with note heads)?

2022-07-08 Thread Jean Brefort
Hi,

Yes, it is possible. The issue was discussed some times ago on the
French users list. I join a sample of the result.

Hope this helps,
Jean

Le samedi 09 juillet 2022 à 11:42 +1000, Alasdair McAndrew a écrit :
> Hello,
> 
> I believe I asked a very similar question some years ago, since when
> Lilypond has had numerous new releases and improvements.  But I still
> don't know how to typeset French tablature for the viol.  This
> requires six lines, letters printed between the lines, and the notes
> above the staff printed with heads.  Examples are at
> 
> https://bit.ly/3OZVwXt
> 
> and at
> 
> https://bit.ly/3yoHkjP
>  
> There are other software systems that can manage this, but rather
> than jump between systems I'd rather stay entirely within Lilypond.
> 
> Can Lilypond produce tablature of the style shown in the two images
> above?
> 
> many thanks,
> Alasdair
> 

\version "2.20.0"

\header {
   title = "A Pollish Vilanell"
  composer = \markup{\smallCaps{Tobias Hume}}
}

common = {
  \time 2/2
  \repeat volta 2 {\partial 4 s4 s1*13}
  \repeat volta 2 {s1*18}
}

first = \relative c { \voiceOne
   \clef bass a4 d e f g a2. a4 c8 d e f e4 d8 c b4 a e gis a2. a4 c b a g a2. a4 g g g f
   e1 d4. e8 f4 g a2 d,4 f d2 cis d'1
   e,4 e e f e2. e'4 d a c b a1 d,4 d, d''2 c4 b a2 g4. f8 e4 a g4. f8 e4 a
   c f, e d cis1 d4 d, f' g a f bes a g f d cis d'1
   d,4 d, d'' a f8 g a bes a4 g8 f e4 d a cis d'1
}

second = \relative c {
  \voiceTwo
  s4 s1 a2. s4 s1 e'4 f s2 a,2. s4 s1 f'2. f4 c c c d
  a1 s1 s a2 s d,1 a'4 cis cis d a2. s4 s2 e'4 s a,1
  s1 a'4 e f2 c4. s8 c4 f c4. s8 c4 f
  e d a bes a1 s s c4 d a s d,1 s s s d
  
}

third = \relative c {
  \override Stem.stencil = ##f
  \voiceThree
  \shiftOff s4 s1 2. s4 s1 s 2. s4 s1 s s cis s s \shiftOn e2 s \shiftOff 1
  cis4 s2. cis2. s4 s1  s s s s s2 cis4 s s1 s s  s2 \shiftOn e4 \shiftOff s 1 s1 s s 
}


rythm = {
  c4 s1 c2. 4 8 s4. c4 8 s c4 s2. c2. 4 s1 c2. 4 s1 c1 4. 8 4 s c2 4 s c2 s c1
  c4 s s s c2. 4 s s s s c1 4 s c2 4 s c2 4. 8 4 s c4. 8 4 s
  s1 c1 4 s2. s1 s c1 c4 s2. c8 s4. c4 8 s c4 s2. c1
}

\score {
<<
  \new Staff <<
\common
\new Voice \first
\new Voice \second
\new Voice \third
  >>

  \new RhythmicStaff \with {
 \remove "Staff_symbol_engraver"
  \omit Clef   	   
  \omit TimeSignature
  \override VerticalAxisGroup #'staff-staff-spacing =
#'((basic-distance . 4)
   (minimum-distance . 3)
   (padding . .5))
 \override NoteHead.style = #'petrucci
  }{
\rythm
  }
  
  \new TabStaff \with {  
  tablatureFormat = #fret-letter-tablature-format 
  \override TabNoteHead.whiteout = ##f
  \override TabNoteHead.before-line-breaking =
   #(lambda (grob)
  (if (not (< (ly:grob-property grob 'Y-offset) -4))
  (ly:grob-set-property! grob 'Y-offset
(+  (ly:grob-property grob 'Y-offset) 0.6  
  \omit Clef
  \override TimeSignature.X-offset = #-2
  \override TimeSignature.font-size = #3
  \revert TimeSignature.stencil
  \override TabNoteHead.font-name = "LeRoy"
}
  {\stemUp
<<\common \first \second \third>>
  }
>>
  \layout {
indent = 0
\context {
  \TabStaff
  stringTunings = \stringTuning 
  fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
}
}
}
 
 
 
 
 
 
 

Re: French tablature?

2016-12-30 Thread Alasdair McAndrew
Many thanks - I've taken your advice to upgrade to version 2.19.53 
(also advised by other correspondents), and ran your example with 
the code block to fix the alignment.


It looks lovely!

Is it possible to write tablature directly as letters on the 
6-line staff, rather than as pitches?  The reason I ask is that 
some of the music I typeset uses a multitude of different tunings 
(scordatura, if you like), and keeping track of the pitches and 
their positions on the frets is fiddly.  On the other hand, if I'm 
copying from a manuscript, I can type out letters directly.


Thank you again for your time and trouble.

cheers,
Alasdair

Malte Meyn writes:


Am 30.12.2016 um 09:09 schrieb Alasdair McAndrew:
I tried it without the RhythmicStaff, just to see what the 
tablature
looks like.  However, the tablature is written on the lines, 
rather than
between them.  I suppose this could be tweaked by moving all 
the letters
up by half the distance between lines, but it would be nice to 
have this

done automatically.


I would strongly recommend to use version 2.19 not only because 
of the 
bass string support (I don’t know whether you need it) but 
because of a 
better letter positioning. In 2.18.2 the letters are positioned 
around 
their vertical center instead of the base line so the “d” sits 
lower 
than the “a” and “c”; see attachment.


Then you can add the following code to the 
\layout-\context-\TabStaff 
block (f. e. after setting tablatureFormat):


   \override TabNoteHead.before-line-breaking =
 #(lambda (grob)
   (ly:grob-set-property! grob 'Y-offset
 (+  (ly:grob-property grob 'Y-offset) 0.5)))

This moves the letters 0.5 staff spaces up from their original 
position. 
This code works also in 2.18.2 but it won’t fix the 
misalignment.


Attached you’ll find the original and the tweaked versions for 
both 
2.18.2 and 2.19.53.



--
Alasdair McAndrew
http://numbersandshapes.net

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-30 Thread Malte Meyn


Am 30.12.2016 um 09:27 schrieb Malte Meyn:

Then you can add the following code to the \layout-\context-\TabStaff
block (f. e. after setting tablatureFormat):

  \override TabNoteHead.before-line-breaking =
#(lambda (grob)
  (ly:grob-set-property! grob 'Y-offset
(+  (ly:grob-property grob 'Y-offset) 0.5)))


I just noticed that this naturally moves also the bass strings. If you 
want to have them at their original position (with some space between 
them and the TabStaff) you’ll need a small change to this; see the code 
below.


\version "2.19.53"

% maybe this could be automatically extracted from mel?
rh = {
  4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1
}

mel = \relative {
  a,,4 b c d8 e f4. g8
  a b c d e4 f g8
  a b c d16 e f g
  a8. b16 c8 cis d4
  d,2 d, d,1
}

\score {
  <<
\new RhythmicStaff \rh
\new TabStaff \mel
\new Staff { \clef "treble_8" \mel }
  >>
  \layout {
\context {
  \TabStaff
  tablatureFormat = #fret-letter-tablature-format
  \override TabNoteHead.before-line-breaking =
  #(lambda (grob)
 (if (not (< (ly:grob-property grob 'Y-offset) -4))
 (ly:grob-set-property! grob 'Y-offset
   (+  (ly:grob-property grob 'Y-offset) 0.5
  stringTunings = \stringTuning 
  additionalBassStrings = \stringTuning 
  % don’t use j as a fret label:
  fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
}
\context {
  \RhythmicStaff
  \override StaffSymbol.line-count = 0
  \autoBeamOff
  \remove Bar_engraver
  \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 7
  % you might want
  % 1. no time signature:
  \remove Time_signature_engraver
  % 2. straight flags:
  %\override Flag.stencil = #old-straight-flag
  % 3. other note head shape or no note heads:
  \override NoteHead.style = #'petrucci
  %\omit NoteHead
}
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-30 Thread Malte Meyn



Am 30.12.2016 um 09:09 schrieb Alasdair McAndrew:

I tried it without the RhythmicStaff, just to see what the tablature
looks like.  However, the tablature is written on the lines, rather than
between them.  I suppose this could be tweaked by moving all the letters
up by half the distance between lines, but it would be nice to have this
done automatically.


I would strongly recommend to use version 2.19 not only because of the 
bass string support (I don’t know whether you need it) but because of a 
better letter positioning. In 2.18.2 the letters are positioned around 
their vertical center instead of the base line so the “d” sits lower 
than the “a” and “c”; see attachment.


Then you can add the following code to the \layout-\context-\TabStaff 
block (f. e. after setting tablatureFormat):


  \override TabNoteHead.before-line-breaking =
#(lambda (grob)
  (ly:grob-set-property! grob 'Y-offset
(+  (ly:grob-property grob 'Y-offset) 0.5)))

This moves the letters 0.5 staff spaces up from their original position. 
This code works also in 2.18.2 but it won’t fix the misalignment.


Attached you’ll find the original and the tweaked versions for both 
2.18.2 and 2.19.53.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-30 Thread Malte Meyn



Am 30.12.2016 um 05:16 schrieb Alasdair McAndrew:

Many thanks!  I didn't know about RhythmicStaff.  Is this all possible
in version 2.18.2 (which I'm using)?


Not everything is possible: the additionalBassStrings property has been 
added in 2.19; so 2.18.2 won’t support this.



/home/Lilypond/tabTest.ly:5:4: error: syntax error, unexpected UNSIGNED
4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1


2.19 supports durations without pitch; in 2.18 this would have to be 
c4*3 c8*2 c4. c8*5 (with arbitrary pitch; Rhythmic staff doesn’t care 
about the pitch)



Maybe version 2.18.2 requires a little extra tweaking.  Again, thank you
very much.


If you don’t need bass strings here is the solution for 2.18.2:


\version "2.18.2"

% maybe this could be automatically extracted from mel?
rh = {
  c8*4 c4*2 c8*4 c16*4 c8. c16 c8*2 c4 c2 c1
}

mel = \relative {
  a,8 b c d e4 f g8
  a b c d16 e f g
  a8. b16 c8 cis d4
  d,2 d,1
}

\score {
  <<
\new RhythmicStaff \rh
\new TabStaff \mel
\new Staff { \clef "treble_8" \mel }
  >>
  \layout {
\context {
  \TabStaff
  tablatureFormat = #fret-letter-tablature-format
  stringTunings = \stringTuning 
  % don’t use j as a fret label:
  %fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
}
\context {
  \RhythmicStaff
  \override StaffSymbol.line-count = 0
  \autoBeamOff
  \remove Bar_engraver
  \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 6
  % you might want
  % 1. no time signature:
  %\remove Time_signature_engraver
  % 2. straight flags:
  %\override Flag.stencil = #old-straight-flag
  % 3. other note head shape or no note heads:
  %\override NoteHead.style = #'petrucci
  %\omit NoteHead
}
  }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-30 Thread Alasdair McAndrew
I tried it without the RhythmicStaff, just to see what the 
tablature looks like.  However, the tablature is written on the 
lines, rather than between them.  I suppose this could be tweaked 
by moving all the letters up by half the distance between lines, 
but it would be nice to have this done automatically.


Anyway, I'll keep a-fiddlin'.

Thanks,
Alasdair




Am 29.12.2016 um 23:15 schrieb Alasdair McAndrew:
Is it likely that Lilypond will provide such tablature at some 
stage?
Currently, if I want to typeset tablature, I need to use 
different

software.


LilyPond already supports this type of tablature: You have to 
set the 
tablatureFormat to #fret-letter-tablature, set a string tuning 
including 
bass strings, and maybe change the default fret labels to not 
include j.


The rhythm can be added in a separate RhythmicStaff; maybe one 
could 
extract it somehow from the music using a music function (might 
be 
tricky with polyphonic music) but of course it can also be done 
by hand.


\version "2.19.53"

% maybe this could be automatically extracted from mel?
rh = {
   4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1
}

mel = \relative {
   a,,4 b c d8 e f4. g8
   a b c d e4 f g8
   a b c d16 e f g
   a8. b16 c8 cis d4
   d,2 d, d,1
}

\score {
   <<
 \new RhythmicStaff \rh
 \new TabStaff \mel
 \new Staff { \clef "treble_8" \mel }
   >>
   \layout {
 \context {
   \TabStaff
   tablatureFormat = #fret-letter-tablature-format
   stringTunings = \stringTuning 
   additionalBassStrings = \stringTuningf, g,>

   % don’t use j as a fret label:
   %fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" 
   "k")

 }
 \context {
   \RhythmicStaff
   \override StaffSymbol.line-count = 0
   \autoBeamOff
   \remove Bar_engraver
   \override 
   VerticalAxisGroup.staff-staff-spacing.basic-distance = 6

   % you might want
   % 1. no time signature:
   %\remove Time_signature_engraver
   % 2. straight flags:
   %\override Flag.stencil = #old-straight-flag
   % 3. other note head shape or no note heads:
   %\override NoteHead.style = #'petrucci
   %\omit NoteHead
 }
   }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



--
Alasdair McAndrew
http://numbersandshapes.net

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-29 Thread Alasdair McAndrew
Many thanks!  I didn't know about RhythmicStaff.  Is this all 
possible in version 2.18.2 (which I'm using)?  Certainly when I 
copied and pasted your text into a file ("tabTest.ly"), Lilypond 
returned an error:


/home/Lilypond/tabTest.ly:5:4: error: syntax error, unexpected 
UNSIGNED
  
  4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1


Maybe version 2.18.2 requires a little extra tweaking.  Again, 
thank you very much.


-Alasdair

Malte Meyn writes:


Am 29.12.2016 um 23:15 schrieb Alasdair McAndrew:
Is it likely that Lilypond will provide such tablature at some 
stage?
Currently, if I want to typeset tablature, I need to use 
different

software.


LilyPond already supports this type of tablature: You have to 
set the 
tablatureFormat to #fret-letter-tablature, set a string tuning 
including 
bass strings, and maybe change the default fret labels to not 
include j.


The rhythm can be added in a separate RhythmicStaff; maybe one 
could 
extract it somehow from the music using a music function (might 
be 
tricky with polyphonic music) but of course it can also be done 
by hand.


\version "2.19.53"

% maybe this could be automatically extracted from mel?
rh = {
   4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1
}

mel = \relative {
   a,,4 b c d8 e f4. g8
   a b c d e4 f g8
   a b c d16 e f g
   a8. b16 c8 cis d4
   d,2 d, d,1
}

\score {
   <<
 \new RhythmicStaff \rh
 \new TabStaff \mel
 \new Staff { \clef "treble_8" \mel }
   >>
   \layout {
 \context {
   \TabStaff
   tablatureFormat = #fret-letter-tablature-format
   stringTunings = \stringTuning 
   additionalBassStrings = \stringTuningf, g,>

   % don’t use j as a fret label:
   %fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
 }
 \context {
   \RhythmicStaff
   \override StaffSymbol.line-count = 0
   \autoBeamOff
   \remove Bar_engraver
   \override 
   VerticalAxisGroup.staff-staff-spacing.basic-distance = 6

   % you might want
   % 1. no time signature:
   %\remove Time_signature_engraver
   % 2. straight flags:
   %\override Flag.stencil = #old-straight-flag
   % 3. other note head shape or no note heads:
   %\override NoteHead.style = #'petrucci
   %\omit NoteHead
 }
   }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



--
Alasdair McAndrew
http://numbersandshapes.net

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: French tablature?

2016-12-29 Thread Malte Meyn



Am 29.12.2016 um 23:15 schrieb Alasdair McAndrew:

Is it likely that Lilypond will provide such tablature at some stage?
Currently, if I want to typeset tablature, I need to use different
software.


LilyPond already supports this type of tablature: You have to set the 
tablatureFormat to #fret-letter-tablature, set a string tuning including 
bass strings, and maybe change the default fret labels to not include j.


The rhythm can be added in a separate RhythmicStaff; maybe one could 
extract it somehow from the music using a music function (might be 
tricky with polyphonic music) but of course it can also be done by hand.


\version "2.19.53"

% maybe this could be automatically extracted from mel?
rh = {
  4*3 8*2 4. 8*5 4*2 8*4 16*4 8. 16 8*2 4 2*2 1
}

mel = \relative {
  a,,4 b c d8 e f4. g8
  a b c d e4 f g8
  a b c d16 e f g
  a8. b16 c8 cis d4
  d,2 d, d,1
}

\score {
  <<
\new RhythmicStaff \rh
\new TabStaff \mel
\new Staff { \clef "treble_8" \mel }
  >>
  \layout {
\context {
  \TabStaff
  tablatureFormat = #fret-letter-tablature-format
  stringTunings = \stringTuning 
  additionalBassStrings = \stringTuning 
  % don’t use j as a fret label:
  %fretLabels = #'("a" "b" "c" "d" "e" "f" "g" "h" "i" "k")
}
\context {
  \RhythmicStaff
  \override StaffSymbol.line-count = 0
  \autoBeamOff
  \remove Bar_engraver
  \override VerticalAxisGroup.staff-staff-spacing.basic-distance = 6
  % you might want
  % 1. no time signature:
  %\remove Time_signature_engraver
  % 2. straight flags:
  %\override Flag.stencil = #old-straight-flag
  % 3. other note head shape or no note heads:
  %\override NoteHead.style = #'petrucci
  %\omit NoteHead
}
  }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user