[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: musicglyph: accidentals--1
From: |
Nicolas Sceaux |
Subject: |
Re: musicglyph: accidentals--1 |
Date: |
Fri, 30 Jan 2004 19:48:29 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Fri, 30 Jan 2004 10:25:06 +0100, Mats a dit :
> Since it won't let you do anything like
> \markup { B \flat }
> However, it shouldn't be hard to add definitions so you could write
> that or maybe
> \markup { B #flat }
The two following behave the same; one seems more convenient than the
other, though.
----------------------------------------------------------------
%%%
%%% alteration markups with variables
%%%
doublesharp = \markup \musicglyph #"accidentals-4"
threeqsharp = \markup \musicglyph #"accidentals-3"
sharp = \markup \musicglyph #"accidentals-2"
semisharp = \markup \musicglyph #"accidentals-1"
natural = \markup \musicglyph #"accidentals-0"
semiflat = \markup \musicglyph #"accidentals--1"
flat = \markup \musicglyph #"accidentals--2"
threeqflat = \markup \musicglyph #"accidentals--3"
doubleflat = \markup \musicglyph #"accidentals--4"
\score {
\notes {
c''-\markup { \doublesharp
\threeqsharp
\sharp
\semisharp
\natural
\semiflat
\flat
\threeqflat
\doubleflat }
}
\paper { raggedright = ##t }
}
%%%
%%% alteration markups with a dedicated command
%%%
#(def-markup-command (alteration paper props alt) (symbol?)
(let ((alt-string (string-append "accidentals-"
(case alt
((doublesharp) "4")
((threeqsharp) "3")
((sharp ) "2")
((semisharp ) "1")
((natural ) "0")
((semiflat ) "-1")
((flat ) "-2")
((threeqflat ) "-3")
((doubleflat ) "-4")))))
(interpret-markup paper props (make-musicglyph-markup alt-string))))
\score {
\notes {
c''-\markup { \alteration #'doublesharp
\alteration #'threeqsharp
\alteration #'sharp
\alteration #'semisharp
\alteration #'natural
\alteration #'semiflat
\alteration #'flat
\alteration #'threeqflat
\alteration #'doubleflat }
}
\paper { raggedright = ##t }
}
----------------------------------------------------------------
nicolas