[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Figured Bass support
From: |
Nicolas Sceaux |
Subject: |
Re: Figured Bass support |
Date: |
Thu, 04 Sep 2003 22:04:14 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) |
Tue, 2 Sep 2003 22:22:36 +0200, Han-Wen a dit :
> For the moment, you could use markup texts. For example:
> \header
> {
> texidoc = "An alternate method to make bass figures is to use
> markup texts."
> }
> \version "1.9.4"
> nat = \markup { \musicglyph #"accidentals-0" }
> sh = \markup { \smaller \raise #0.6 \musicglyph #"accidentals-1" }
> fl = \markup { \musicglyph #"accidentals--1" }
> \score {
> \context Voice \notes {
> \clef bass
> \property Voice.TextScript \set #'font-family = #'number
> \property Voice.TextScript \set #'font-relative-size = #-3
> \property Voice.TextScript \set #'baseline-skip = #1.4
> dis4_\markup { 6 }
> c_\markup { 7 }
> d_\markup { \column < { 6 \sh } \bracket { \nat } >}
> ais_\markup { \column < 6 5 \bracket { 3 \sh } >}
> }
> }
Here is the same example using few scheme utilities:
----------
#(use-modules (ice-9 optargs)
(lilypond markups)) ; [1] See below
#(defmacro* fig (#:rest figs)
"Figured bass as markups. Each of `figs' arguments may be
a number, a variable referencing a markup, a list of
numbers or markups (for lining text), or a (keyworded) markup
command."
`(markup (#:column ,@(map gen-figures figs))))
#(define (gen-figures figure)
(cond ((and (pair? figure) (keyword? (car figure)))
`(,(car figure) ,@(map gen-figures (cdr figure))))
((and (pair? figure) (not (null? (cdr figure))))
`(#:line ,@(map gen-figures figure)))
((pair? figure)
(gen-figures (car figure)))
((number? figure)
`(#:string ,(number->string figure)))
(else
figure)))
nat = \markup { \musicglyph #"accidentals-0" }
sh = \markup { \smaller \raise #0.6 \musicglyph #"accidentals-1" }
fl = \markup { \musicglyph #"accidentals--1" }
\score {
\context Voice \notes {
\clef bass
\property Voice.TextScript \set #'font-family = #'number
\property Voice.TextScript \set #'font-relative-size = #-3
\property Voice.TextScript \set #'baseline-skip = #1.4
dis4_#(fig 6)
c_#(fig 7)
d_#(fig (6 sh) (#:bracket nat))
ais_#(fig 6 5 (#:bracket 3 sh))
}
}
----------
nicolas
---
[1] the module named (lilypond markups) can be found here:
http://nicolas.sceaux.free.fr/lilypond/scheme-hacks.html