Re: Half and whole notes in tab notation

2011-05-05 Thread Marc Hohl

Am 05.05.2011 13:34, schrieb Peter Crighton:
Thank you very much! I adjusted the circle padding to 0 to prevent 
overlapping in chords and even now it is not perfect, but you have to 
look very close to see that. So it's good for me.

Good to hear!
But reverting the double stem doesn't work… although I suspect a 
general \revert failure there, as I also noticed that reverting a stem 
direction didn't work, so that I have to override it with up or down 
accordingly.

Any clues why this is the case?
The example I sent to you worked perfectly for me, so perhaps the 
\revert is in the wrong context?
I think it would be easier to find the culprit if you send a minimal 
example.


Regards,

Marc


2011/5/5 Marc Hohl mailto:m...@hohlart.de>>

Hello Peter,

Am 04.05.2011 20:05, schrieb Peter Crighton:

In 2.13.61 half notes in tab notation are distinguished from
quarter notes through a second stem.
Now I haven't seen this method before – it would seem natural
to me to draw a circle around the "tab note", the number, and
have only one stem like in normal notation.
The same would apply to whole notes, but of course without the
stem.

One may discuss about aesthetics, but I have seen this way of
displaying half notes and whole notes.


How can I achieve this kind of notation? Can I?

Yes! See the attached example. I tried to comment what I have done.

I is untested for working with harmonics - should the circle be
drawn around the fret number only,
or should it include the parentheses and the angle brackets?



In chords I would use a single circle (an ellipse, to be
correct) around all "tab notes" instead of drawing a circle
around every single one. This would be more difficult if
possible at all, I reckon, but it would be great to have this
possibility…

This is more difficult to implement, and, to be honest, I don't
know how.

HTH,

Marc



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






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


Re: Half and whole notes in tab notation

2011-05-05 Thread Peter Crighton
Thank you very much! I adjusted the circle padding to 0 to prevent
overlapping in chords and even now it is not perfect, but you have to look
very close to see that. So it's good for me.
But reverting the double stem doesn't work… although I suspect a general
\revert failure there, as I also noticed that reverting a stem direction
didn't work, so that I have to override it with up or down accordingly.
Any clues why this is the case?

2011/5/5 Marc Hohl 

> Hello Peter,
>
> Am 04.05.2011 20:05, schrieb Peter Crighton:
>
>  In 2.13.61 half notes in tab notation are distinguished from quarter notes
>> through a second stem.
>> Now I haven't seen this method before – it would seem natural to me to
>> draw a circle around the "tab note", the number, and have only one stem like
>> in normal notation.
>> The same would apply to whole notes, but of course without the stem.
>>
> One may discuss about aesthetics, but I have seen this way of displaying
> half notes and whole notes.
>
>
>> How can I achieve this kind of notation? Can I?
>>
> Yes! See the attached example. I tried to comment what I have done.
>
> I is untested for working with harmonics - should the circle be drawn
> around the fret number only,
> or should it include the parentheses and the angle brackets?
>
>
>
>> In chords I would use a single circle (an ellipse, to be correct) around
>> all "tab notes" instead of drawing a circle around every single one. This
>> would be more difficult if possible at all, I reckon, but it would be great
>> to have this possibility…
>>
> This is more difficult to implement, and, to be honest, I don't know how.
>
> HTH,
>
> Marc
>
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Half and whole notes in tab notation

2011-05-04 Thread Marc Hohl

Hello Peter,

Am 04.05.2011 20:05, schrieb Peter Crighton:
In 2.13.61 half notes in tab notation are distinguished from quarter 
notes through a second stem.
Now I haven't seen this method before – it would seem natural to me to 
draw a circle around the "tab note", the number, and have only one 
stem like in normal notation.

The same would apply to whole notes, but of course without the stem.
One may discuss about aesthetics, but I have seen this way of displaying 
half notes and whole notes.


How can I achieve this kind of notation? Can I?

Yes! See the attached example. I tried to comment what I have done.

I is untested for working with harmonics - should the circle be drawn 
around the fret number only,

or should it include the parentheses and the angle brackets?



In chords I would use a single circle (an ellipse, to be correct) 
around all "tab notes" instead of drawing a circle around every single 
one. This would be more difficult if possible at all, I reckon, but it 
would be great to have this possibility…

This is more difficult to implement, and, to be honest, I don't know how.

HTH,

Marc



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


\version "2.13.61"

%
% this is (mostly) copied from scm/tablature.scm -> tab-note-head::print
#(define-public (tab-note-head::my-print grob)
  (define (is-harmonic? grob)
(let ((arts (ly:event-property (event-cause grob) 'articulations)))
  (not (null? (filter (lambda (a)
(ly:in-event-class? a 'harmonic-event))
  arts)

  (let* ((cautionary (ly:grob-property grob 'display-cautionary #f))
 (details (ly:grob-property grob 'details '()))
 (harmonic-props (assoc-get 'harmonic-properties details '()))
 (harmonic-angularity (assoc-get 'angularity harmonic-props 2))
 (harmonic-half-thick (assoc-get 'half-thickness harmonic-props 0.075))
 (harmonic-padding (assoc-get 'padding harmonic-props 0))
 (harmonic-proc (assoc-get 'procedure harmonic-props parenthesize-stencil))
 (harmonic-width (assoc-get 'width harmonic-props 0.25))
 (cautionary-props (assoc-get 'cautionary-properties details '()))
 (cautionary-angularity (assoc-get 'angularity cautionary-props 2))
 (cautionary-half-thick (assoc-get 'half-thickness cautionary-props 0.075))
 (cautionary-padding (assoc-get 'padding cautionary-props 0))
 (cautionary-proc (assoc-get 'procedure cautionary-props parenthesize-stencil))
 (cautionary-width (assoc-get 'width cautionary-props 0.25))
 (output-grob (ly:text-interface::print grob))
 (duration-log (ly:grob-property grob 'duration-log))
 (ref-grob (grob-interpret-markup grob "8"))
 (offset-factor (assoc-get 'head-offset details 3/5))
 (column-offset (* offset-factor
   (interval-length
 (ly:stencil-extent
   (grob-interpret-markup grob "8")
   X)
(if (is-harmonic? grob)
(set! output-grob (harmonic-proc output-grob
 harmonic-half-thick
 harmonic-width
 harmonic-angularity
 harmonic-padding)))
(if cautionary
(set! output-grob (cautionary-proc output-grob
   cautionary-half-thick
   cautionary-width
   cautionary-angularity
   cautionary-padding)))
;; the next two lines draw circles around half and whole notes
;; the numbers 0.1 and 0.2 are hardcoded (ugh!) and resemble
;; the line-thickness and the padding
(if (> 2 duration-log)
(set! output-grob (circle-stencil output-grob 0.1 0.2)))
(ly:stencil-translate-axis (centered-stencil output-grob)
   column-offset
   X)))

music = { c4 d e2 | f1 }

\score {
  \new TabStaff {
\new TabVoice {
  \tabFullNotation
  % use the new function instead of the standard callback
  \override TabNoteHead #'stencil = #tab-note-head::my-print
  % don't draw double stems for half notes
  \revert TabVoice.Stem #'stencil
  \music }
  }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Half and whole notes in tab notation

2011-05-04 Thread Peter Crighton
In 2.13.61 half notes in tab notation are distinguished from quarter notes
through a second stem.
Now I haven't seen this method before – it would seem natural to me to draw
a circle around the "tab note", the number, and have only one stem like in
normal notation.
The same would apply to whole notes, but of course without the stem.

How can I achieve this kind of notation? Can I?

In chords I would use a single circle (an ellipse, to be correct) around all
"tab notes" instead of drawing a circle around every single one. This would
be more difficult if possible at all, I reckon, but it would be great to
have this possibility…
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user