[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tuplet number direction
From: |
Thomas Morley |
Subject: |
Re: Tuplet number direction |
Date: |
Fri, 15 Apr 2016 00:51:18 +0200 |
2016-04-13 23:28 GMT+02:00 Thomas Morley <address@hidden>:
> 2016-04-13 15:06 GMT+02:00 Richard Shann <address@hidden>:
>> Thanks Abraham, that's most informative.
>> Thinking about it, I wonder if I've missed something: is there a way to
>> say typeset the tuplet bracket like a slur, with the tuplet number
>> inside?
>
> I once made the attached code.
> Maybe you can adapt it to fit your needs.
>
> Cheers,
> Harm
Meanwhile I recoded it (using make-bow-stencil which is not available
in 2.18.2) making things way easier.
Though,
(1) The TupletNumbers are always inside the bow, I coded no
possibility to print the Number cutting the bow.
I maybe add it later.
(2) What to do at line-break? See RehearsalMark A and B.
Could somebody take a look what Gould says about it (and/or other
type-setting-bibles)?
For now I let the colored default _and_ the new bow print above each
other for easy compare.
Feedback appreciated !!
\version "2.19.36"
foo =
%\once
\override TupletBracket.stencil =
#(lambda (grob)
(let* ((x-pos (ly:grob-property grob 'X-positions))
(pos (ly:grob-property grob 'positions))
(dir (ly:grob-property grob 'direction))
(edge-height (ly:grob-property grob 'edge-height)))
(ly:stencil-add
(stencil-with-color (ly:tuplet-bracket::print grob) red)
(make-bow-stencil
;; start
(cons (car x-pos) (- (car pos) (* dir (car edge-height))))
;; stop
(cons (cdr x-pos) (- (cdr pos) (* dir (cdr edge-height))))
;; thickness, taken from IR for Slur
0.12
;; angularity, value `0.6' is my choice,
;; TODO make angularity more flexible?
0.6
;; bow-height, value `1' is my choice, adding average of edge-height
;; TODO do less steep curves by using a fraction of
;; average-edge-height?
(+ 1 (/ (+ (car edge-height) (cdr edge-height)) 2))
;; orientation
dir))))
\relative c'' {
\voiceOne
%\override TupletBracket.staff-padding = #'()
\foo
\times 2/3 { a4 b c }
\times 2/3 { a4 b c' }
\times 2/3 { a,4 b c, }
\times 2/3 { a'4 b, c }
\voiceTwo
\times 2/3 { a'4 b c }
\times 2/3 { a4 b c' }
\times 2/3 { a,4 b c, }
\times 2/3 { a'4 b, c }
\oneVoice
\mark \default
\times 2/3 { a1 b2 \break b c1 }
\mark \default
\times 2/3 { a1 b1 \bar "" \break c1 }
}
Cheers,
Harm
atest-33.png
Description: PNG image
- Re: Tuplet number direction, (continued)
- Re: Tuplet number direction, Noeck, 2016/04/13
- Re: Tuplet number direction, Thomas Morley, 2016/04/13
- Re: Tuplet number direction, Simon Albrecht, 2016/04/13
- Re: Tuplet number direction, Thomas Morley, 2016/04/13
- Re: Tuplet number direction, Werner LEMBERG, 2016/04/14
- Re: Tuplet number direction, Simon Albrecht, 2016/04/14
- Re: Tuplet number direction, Richard Shann, 2016/04/14
- Re: Tuplet number direction, tisimst, 2016/04/14
- Re: Tuplet number direction, Richard Shann, 2016/04/14
- Re: Tuplet number direction, Richard Shann, 2016/04/14
- Re: Tuplet number direction,
Thomas Morley <=
- Re: Tuplet number direction, Simon Albrecht, 2016/04/14
- Re: Tuplet number direction, David Kastrup, 2016/04/15
- Re: Tuplet number direction, Phil Holmes, 2016/04/15
- Re: Tuplet number direction, David Kastrup, 2016/04/15
- Re: Tuplet number direction, David Kastrup, 2016/04/15
- Re: Tuplet number direction, Simon Albrecht, 2016/04/15
- Re: Tuplet number direction, David Nalesnik, 2016/04/15
- Re: Tuplet number direction, Thomas Morley, 2016/04/15
- Re: Tuplet number direction, Trevor Daniels, 2016/04/16
- Re: Tuplet number direction, Thomas Morley, 2016/04/16