lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Translating tempo marks -- scheme question


From: Dmytro O. Redchuk
Subject: Translating tempo marks -- scheme question
Date: Fri, 19 Dec 2008 21:14:59 +0200

Hi,

i asked some question about tempo marks translation some time ago.

So, i've tried to find a solution, and now i need help (and suggestion?).

Please, take a look. A question is below :-)


% here is a "dictionary":
#(define tempi
  (list
        (cons "Adagio" "Повільно")
        (cons "Allegro" "Швидко")
        ; etc-etc, let's say ...
  ))

% a function to get localized word -- if list does not contain
% translated variant, untranslated word returned.
#(define (getLocalized items word)
  (if (equal? '() items)
      word
      (if (equal? (car (car items)) word)
          (cdr (car items))
          (getLocalized (cdr items) word))))

% hmmm... possibly, error is somewhere here?
#(define-markup-command (ukr layout props word) (string?)
  (interpret-markup layout props
    (markup (getLocalized tempi word))))

%
% Just take a look -- second "Allegretto is *invisible*.
%
\relative c'' {
  \tempo \markup { \ukr #"Allegro" }
  \repeat "unfold" 2 { c4 c c c } \break

  \tempo \markup { \ukr #"Adagio" }
  \repeat "unfold" 2 { c4 c c c } \break

  \tempo \markup { \ukr #"Allegretto" }
  \repeat "unfold" 2 { c4 c c c } \break

  % boxed version works:
  % \tempo \markup { \box \ukr #"Allegretto" }
  \tempo \markup { \ukr #"Allegretto" }
  \repeat "unfold" 2 { c4 c c c } \break

  \tempo \markup { \ukr #"Adagio" }
  \repeat "unfold" 2 { c4 c c c } \break

  \bar "|."
}

So, second "Allegretto" is invisible... More correct -- if there are
repetitive, only the first one is visible. Yes, boxed version works.

However, both "Adagio"'s are visible.

Please, as usual, two questions :-)
1. Is this stupid or not? (I mean for me to make translations in such a way)
2. Why?-) Where is the problem?

Thank you a lot. Please, help.

-- 
Dmytro O. Redchuk

reply via email to

[Prev in Thread] Current Thread [Next in Thread]