[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \jazzOn vs. \improvisationOn
From: |
Thomas Morley |
Subject: |
Re: \jazzOn vs. \improvisationOn |
Date: |
Thu, 3 Oct 2013 23:36:44 +0200 |
2013/10/3 Thomas Morley <address@hidden>:
> Hi Jim,
>
> 2013/10/3 Jim Long <address@hidden>:
>> There is a known issue that prevents \improvisationOn from working
>> with LilyJAZZ and \jazzOn.
>>
>
> Never heard of it.
>
>> a) Is that issue terribly gnarly, or is there a likelihood that
>> the two modes might be made compatible sometime soon? It does
>> seem a tad ironic.
>>
>> b) How can I work around the problem in a piece which starts in
>> improv. mode? The closest attempt I have made so far is
>> attached, which involves specifying simultaneous music with
>> non-jazz mode to produce the improv slashes, and a simultaneous
>> jazz mode spacer rest to render the clef/key/time signature using
>> the LilyJAZZ glyphs. My first guess was to scale the spacer rest
>> to 0, but that defeats the jazz glyphs, and gives me Lily's
>> standard clef, etc.
>>
>> If anyone can offer an improved workaround, I'd be very grateful.
>>
>> Regards,
>>
>> Jim
>
> Will try to have a look soon.
>
> Cheers,
> Harm
Hi Jim,
you could try to replace
#(define (jazz-notehead grob)
...)
in LilyJAZZ.ily with the the definition below.
#(define (jazz-notehead grob)
"stencil: jazz noteheads"
(let* ((log (ly:grob-property grob 'duration-log))
(style (ly:grob-property grob 'style))
(n-c (ly:grob-parent grob Y))
(stem (ly:grob-object n-c 'stem))
(stem-dir (ly:grob-property stem 'direction))
(note-head-glyph (format #f "noteheads.s~a~ajazz"
(cond ((<= log 0) 0)
((<= log 1) 1)
(else 2))
(if (not (null? style)) style ""))))
(set! (ly:grob-property grob 'stem-attachment)
(if (eq? style 'slash)
(if (= stem-dir -1)
(if (<= log 1)
'(1.28 . 0.95)
'(1.12 . 0.725))
(if (<= log 1)
'(1.6 . 0.9)
'(1.227 . 0.72)))
'(1.0 . 0.35)))
(grob-interpret-markup grob (markup #:jazzglyph note-head-glyph))))
%%%%%%%%%%%%%%%%%%%
% EXAMPLE
%%%%%%%%%%%%%%%%%%%
\new Voice \with {
\consists "Pitch_squash_engraver"
}
\relative c' {
\jazzOn
\override Staff.NoteHead #'stencil = #jazz-notehead
e8 e g a a16( bes) a8 g
\improvisationOn
e8 ~
e2 ~ e8 f4 f8 ~
f1 ~
f2
\improvisationOff
a16( bes) a8 g e
\jazzOff
}
I'm not absolutely sure about the values for 'stem-attachment, though.
At least I feel quite convinced about the output from the example.
Note: only a few styles are supported by LilyJAZZ.ily so far:
The default, 'slash and 'cross.
HTH,
Harm