[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Metronome marks
From: |
Alexander Kobel |
Subject: |
Re: Metronome marks |
Date: |
Sat, 12 Apr 2008 00:33:28 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (Macintosh/20080213) |
Risto Vääräniemi wrote:
On 08/04/2008, Trevor Daniels wrote:
The snippet 204 doesn't work very well with 2.11 because it uses
negative padding to position the rhythm mark closer to the staff and
that's not supported by 2.11.
I think there's another drawback of the snippet.
I had a very similar problem, trying to add marks like "Moderato (* =
63)", yet using rehearsal marks at the same time for sectioning the piece.
Problem is, Lily can't handle two RehearsalMark events on the same beat
(don't know whether there's a workaround), so I wanted to use
MetronomeMarks. Here's my snippet to do so; I suspect it should be
fairly straightforward to modify to mimic the rhythmMark behaviour.
Additionally, it might help some of you figuring out how a markup is
used as a stencil; especially when you want to add parameters on every
call and need to currify (right?) your markup function. It took me a
while since I'm not familiar with Scheme...
Of course it would be nice if the \tempo command would be run directly
in \tempoChangeMarkup; however I'm running into type problems here.
Is it possible to convert string->duration via Scheme? Else I always had
to type
\tempoChangeMarkup #"foo" #(make-duration 4) #"120"
or am I wrong there? And is this:
http://www.mail-archive.com/address@hidden/msg27033.html
solved by now? It seems to be a problem for the last argument (integer
vs. digit/unsigned)...
Thanks
Alexander
\version "2.11.43"
tempoMarkLabelSize = #0
tempoMarkNoteSize = #-6
#(define (tempoChangeMarkupFactory grob label noteValue tempo)
(interpret-markup
(ly:grob-layout grob)
(ly:grob-alist-chain grob (ly:output-def-lookup (ly:grob-layout grob)
'text-font-defaults) )
(markup
#:fontsize tempoMarkLabelSize #:italic #:concat (label (if (string-null?
label) "(" " ("))
#:hspace -1
#:fontsize tempoMarkNoteSize #:general-align Y DOWN #:note noteValue UP
#:fontsize tempoMarkLabelSize #:italic #:concat("= " tempo ")")
)
)
)
#(define (tempoChangeStencil label noteValue tempo)
(lambda (grob)
(tempoChangeMarkupFactory grob label noteValue tempo)
)
)
tempoChangeMarkup = #(define-music-function (parser location label noteValue
tempo) (string? string? string?)
#{
\once \override Score.MetronomeMark #'stencil =
#(tempoChangeStencil $label $noteValue $tempo)
#})
\relative c' {
\time 4/4
\clef treble
\tempoChangeMarkup #"Moderato" #"4" #"63" % just initialize the override
\tempo 4 = 63 % markup is printed
c4 d e f | g a b c |
\time 6/4
\mark \default % \rhythmMark would not be printed here!
\tempoChangeMarkup #"presto" #"2." #"90"
\tempo 2. = 90
c2. g | \break
e \tempoChangeMarkup #"handling collision with RehearsalMark" #"4"
#"120" \tempo 4 = 120 c |
\time 4/4
\mark \default
c1
}
- Metronome marks, Matthias Loitsch, 2008/04/08
- Re: Metronome marks, Trevor Daniels, 2008/04/08
- Re: Metronome marks, Risto Vääräniemi, 2008/04/10
- Snippet 204 for 2.11 (was Metronome marks), Trevor Daniels, 2008/04/10
- Re: Snippet 204 for 2.11 (was Metronome marks), Risto Vääräniemi, 2008/04/10
- Re: Snippet 204 for 2.11 (was Metronome marks), Trevor Daniels, 2008/04/10
- Re: Snippet 204 for 2.11 (was Metronome marks), Matthias Loitsch, 2008/04/10
- Re: Snippet 204 for 2.11 (was Metronome marks), Reinhold Kainhofer, 2008/04/10
- Re: Snippet 204 for 2.11 (was Metronome marks), Risto Vääräniemi, 2008/04/11
- Re: Metronome marks,
Alexander Kobel <=
- Re: Metronome marks, Risto Vääräniemi, 2008/04/12
- Re: Metronome marks, Werner LEMBERG, 2008/04/12
- Re: Metronome marks, Alexander Kobel, 2008/04/12
- Re: Metronome marks, Neil Puttock, 2008/04/14
- Re: Metronome marks, Risto Vääräniemi, 2008/04/15
- Re: Metronome marks, Neil Puttock, 2008/04/14
- Re: Metronome marks, Graham Percival, 2008/04/14
- Re: Metronome marks, Neil Puttock, 2008/04/15
Re: Metronome marks, Ole Schmidt, 2008/04/09