Cool!! I've attached the infamous Ravel quartet snippet that prompted
me to post the query about this clef in the first place. Your C clef
looks nice in there, almost like the original. Of course in this
passage there's a switch to treble clef, and when it returns to alto,
the clef is a teency bit too big (the original is almost the same size
vertically but less inky), but still this is much closer to the
appearance of the original score than a standard alto clef. Thanks for
creating that, Valentin! I'm adding it to my snippet definitions file. :)
Jon
Valentin Villenave wrote:
2008/10/9 Jonathan Kulp <[EMAIL PROTECTED]>:
Valentin,
Could you make a png file of your clef? When I tried to open it with
FontForge it said the file was corrupted or not the right type. Weird.
Better yet: here's a ready-to-use snippet.
%%%%
altoClef = \markup \postscript #"
gsave newpath
0.004 0.004 scale
-180 0 translate
248 -306 moveto
248 -492 lineto
248 -496 245 -500 240 -500 curveto
218 -500 lineto
213 -500 210 -496 210 -492 curveto
210 492 lineto
210 496 213 500 218 500 curveto
240 500 lineto
245 500 248 496 248 492 curveto
248 292 lineto
274 270 348 242 370 242 curveto
404 242 462 228 462 453 curveto
462 560 476 670 576 670 curveto
628 670 671 626 671 571 curveto
671 516 628 471 576 471 curveto
526 471 530 496 520 503 curveto
513 502 510 478 510 437 curveto
510 340 lineto
510 192 490 94 477 79 curveto
442 39 332 70 248 70 curveto
248 -83 lineto
332 -83 442 -53 477 -93 curveto
490 -108 510 -206 510 -354 curveto
510 -451 lineto
510 -491 513 -516 520 -517 curveto
530 -509 526 -485 576 -485 curveto
628 -485 671 -530 671 -584 curveto
671 -640 628 -684 576 -684 curveto
476 -684 462 -574 462 -467 curveto
462 -242 404 -256 370 -256 curveto
348 -256 274 -283 248 -306 curveto
closepath
130 -500 moveto
8 -500 lineto
4 -500 0 -496 0 -492 curveto
0 492 lineto
0 496 4 500 8 500 curveto
130 500 lineto
134 500 138 496 138 492 curveto
138 -492 lineto
138 -496 134 -500 130 -500 curveto
closepath
fill grestore"
\relative c'' {
\override Staff.Clef #'stencil = #ly:text-interface::print
\override Staff.Clef #'text = \altoClef
\clef alto
c
}
%%%
Cheers,
Valentin
--
Jonathan Kulp
http://www.jonathankulp.com
%******************************************************
% Inspirational header for Unfretted Strings section %
% of Lilypond Documentation. This passage is taken %
% from Ravel's String Quartet. %
% ****************************************************%
%\version "2.11.61"
#(set-global-staff-size 15)
\paper{
ragged-end=##t
line-width=17\cm
indent=0\cm
}
\layout {
\context { \Score
\remove "Bar_number_engraver"
\override PaperColumn #'keep-inside-line = ##t
\override NonMusicalPaperColumn #'keep-inside-line = ##t
}
}
%*************** MACROS ******************%
#(define (octave-up m t)
(let* ((octave (1- t))
(new-note (ly:music-deep-copy m))
(new-pitch (ly:make-pitch
octave
(ly:pitch-notename (ly:music-property m 'pitch))
(ly:pitch-alteration (ly:music-property m 'pitch)))))
(set! (ly:music-property new-note 'pitch) new-pitch)
new-note))
#(define (octavize-chord elements t)
(cond ((null? elements) elements)
((eq? (ly:music-property (car elements) 'name) 'NoteEvent)
(cons (car elements)
(cons (octave-up (car elements) t)
(octavize-chord (cdr elements) t))))
(else (cons (car elements) (octavize-chord (cdr elements ) t)))))
#(define (octavize music t)
(if (eq? (ly:music-property music 'name) 'EventChord)
(ly:music-set-property! music 'elements (octavize-chord
(ly:music-property music 'elements) t)))
music)
makeOctaves = #(define-music-function (parser location arg mus) (integer?
ly:music?)
(music-map (lambda (x) (octavize x arg)) mus))
%\relative c' { d e \makeOctaves #-1 { \times 2/3 {f g c }}} % this is an
example of the macro in practice
%%%%%%% Valentin Villanave's macro for the French-style C clef %%%%%%%%%%%
altoClef = \markup \postscript #"
gsave newpath
0.004 0.004 scale
-180 0 translate
248 -306 moveto
248 -492 lineto
248 -496 245 -500 240 -500 curveto
218 -500 lineto
213 -500 210 -496 210 -492 curveto
210 492 lineto
210 496 213 500 218 500 curveto
240 500 lineto
245 500 248 496 248 492 curveto
248 292 lineto
274 270 348 242 370 242 curveto
404 242 462 228 462 453 curveto
462 560 476 670 576 670 curveto
628 670 671 626 671 571 curveto
671 516 628 471 576 471 curveto
526 471 530 496 520 503 curveto
513 502 510 478 510 437 curveto
510 340 lineto
510 192 490 94 477 79 curveto
442 39 332 70 248 70 curveto
248 -83 lineto
332 -83 442 -53 477 -93 curveto
490 -108 510 -206 510 -354 curveto
510 -451 lineto
510 -491 513 -516 520 -517 curveto
530 -509 526 -485 576 -485 curveto
628 -485 671 -530 671 -584 curveto
671 -640 628 -684 576 -684 curveto
476 -684 462 -574 462 -467 curveto
462 -242 404 -256 370 -256 curveto
348 -256 274 -283 248 -306 curveto
closepath
130 -500 moveto
8 -500 lineto
4 -500 0 -496 0 -492 curveto
0 492 lineto
0 496 4 500 8 500 curveto
130 500 lineto
134 500 138 496 138 492 curveto
138 -492 lineto
138 -496 134 -500 130 -500 curveto
closepath
fill grestore"
%*********************************************************************
% This is a sweet macro by Mark Polesky to make the 4th-string
% indication look like it did in the original score
%********************************************************************
#(define-markup-command (No layout props n) (string?)
(define (format-char c)
(let ((s (string c)))
(if (number? (string->number s))
(markup #:hspace 0.125 #:number s #:hspace 0.125)
(markup #:hspace 0 #:fontsize 2 s))))
(define (format-string s i)
(let ((n (string-length s)))
(if (= n 0)
(markup #:null)
(markup (format-char (string-ref s i))
(if (= (+ i 1) n)
(markup #:null)
(format-string s (+ i 1)))))))
(let ((i (string-length n)))
(interpret-markup layout props
(markup
#:concat (
#:concat (
#:fontsize 3 "4"
#:hspace 0.5
#:override '(baseline-skip . 0.825)
#:override '(direction . 1)
#:dir-column (
#:fontsize 2 #:center-align "."
#:fontsize 1 #:center-align "e"
)
)
#:hspace 0.75
#:concat (
(format-string n 0)
#:fontsize 2 ""
)
)
)
)
)
)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
poco = \markup { \italic { \fontsize #+2.0 "poco" }}
apoco = \markup { \italic { \fontsize #+2.0 "a" }}
menovivo = \markup { \bold { \fontsize #+3.0 { "Poco meno vivo"} } }
pocorit = \markup { \bold { \fontsize #+3.0 { "poco rit."} } }
pocodim = \markup { \italic { \fontsize #+2.0 "un poco dim." }}
vlnOne = \relative c''' {
\key f \major
\time 4/4
\set Staff.midiInstrument = "violin"
\override TupletBracket #'bracket-visibility = ##f
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\once \override TextScript #'extra-offset = #'( -3.8 . 0.6 )
es4^\apoco
\once \override TextScript #'extra-offset = #'( -1.0 . -0.8 )
\times 2/3 { c8(^\poco d es) } es4 \times 2/3 { c8( d es) } | % 1
es4\ff\< \times 2/3 { c8( d es) } es4 \times 2/3 { c8( d es)\! } | % 2
\grace { a,,8[( a'\fff]^\menovivo } a'4) g8( a) d,4 c8( d) | % 3
a4 g8( a) d,4 c8( d) | % 4
a4 g8( a) d,8^\pocorit r8 r4 | % 5
ais16(\p\< e' ais e') e16(\f\> ais, e ais,)\! ais8 r r4 | % 6
}
vlnTwo = \relative c' {
\key f \major
\time 4/4
\set Staff.midiInstrument = "violin"
\override TupletBracket #'bracket-visibility = ##f
\set tupletSpannerDuration = #(ly:make-moment 1 4)
\times 2/3 { \makeOctaves #1 {fis8 fis fis fis fis fis fis fis fis fis fis
fis }} | % 1
\times 2/3 { \makeOctaves #1 {fis8\ff\< fis fis fis fis fis fis fis fis fis
fis fis\! }} |% 2
<ais, e' ais e'>16\fff( ais' e ais,) ais16( e' ais e') e16( ais, e ais,)
ais16( e' ais e') | % 3
e16( ais, e ais,) ais16( e' ais e') e16( ais, e ais,) ais16( e' ais e') |
% 4
e16( ais, e ais,)
\set subdivideBeams = ##t
\set Score.beatLength = #(ly:make-moment 1 8)
ais16( e') e( ais,)
d4^\markup \No #"Corde"
\once \override TextScript #'extra-offset = #'( -5.5 . 4.4 )
c8(_\markup { \italic { \fontsize #+1.0 "vibrato" }} d) | % 5
\set subdivideBeams = ##f
a2 ~ a8 g( c d) % 6
}
vlnTwoDyn = {
s1*4
s2 s4\f\< s8. s16\! |
s16 s16\> s8 s2 s8 s16 s32 s32\!
}
vla = \relative c'' {
\key f \major
\time 4/4
\clef "alto"
\override Staff.Clef #'stencil = #ly:text-interface::print
\override Staff.Clef #'text = \altoClef
\set Staff.midiInstrument = "viola"
\override Stem #'length = #9.5
bes4:32 a4:32 gis4:32 a4:32 | % 1
bes4:32 a4:32 gis4:32 a4:32\! | % 2
\tweak #'extra-offset #'(-1.3 . -0.0)
% \clef "treble" % I put the clef change in the Dynamics context instead
\revert Stem #'length
\acciaccatura { a8 } a'4\fff g8( a) d,4 c8( d)
a4 g8( a) d,4 c8( d) | % 4
a4 g8 a <e ais>2:32 | % 5
<e ais>1:32 | % 6
}
vlaDyn = {
s1 | s2\ff\< s4 s8 s16\! s32 s64
\revert Staff.Clef #'stencil % = #ly:text-interface::print
\revert Staff.Clef #'text
\clef "treble" s64 |
s2 s4 s8 s16 s32
\override Staff.Clef #'stencil = #ly:text-interface::print
\override Staff.Clef #'text = \altoClef
\clef "alto" %3
s32
s1| s2 s4\f\< s8 s16 s32 s32\! | % 3-5
s16 s16\> s8 s2 s8 s16 s32 s32\! | %6
}
vc = \relative c' {
\key f \major
\time 4/4
\clef "bass"
\set Staff.midiInstrument = "cello"
\override Stem #'length = #9.5
c4:32 d4:32 es4:32 d4:32 | % 1
c4:32 d4:32 es4:32 d4:32\! | % 2
\revert Stem #'length
\set subdivideBeams = ##t
\set Score.beatLength = #(ly:make-moment 1 8)
<fis,, cis'>16\fff( <cis' ais'>) <cis ais'>( <fis, cis'>) % 3
<fis cis'>16( <cis' ais'>) <cis ais'>( <fis, cis'>) % 3
<fis c'>16( <c' ais'>) <c ais'>( <fis, c'>) % 3
<fis c'>16( <c' ais'>) <c ais'>( <fis, c'>) | % 3
<fis cis'>16( <cis' ais'>) <cis ais'>( <fis, cis'>) % 4
<fis cis'>16( <cis' ais'>) <cis ais'>( <fis, cis'>) % 4
<fis c'>16( <c' ais'>) <c ais'>( <fis, c'>) % 4
<fis c'>16( <c' ais'>) <c ais'>( <fis, c'>) | % 4
<fis cis'>16( <cis' ais'>) <cis ais'>( <fis, cis'>) % 5
<fis cis'>16( <cis' ais'>) <cis ais'>( <fis, cis'>) fis2^\( ~ | % 5
fis4 g c,\) r4 % 6
}
vcDyn = {
s1 | s2\ff\< s4 s8. s16\! | % 1-2
s1*2 % 3-4
s2 s4\f\< s8 s16 s32 s32\! | % 5
s4\> s4 s4\! s4 | % 6
}
%%%%%%%%%%%%%%%% Score Block %%%%%%%%%%%%%%%%%%%%%%
\score {
<< % creates new grand staff
\new StaffGroup = "strings" <<
\context Staff = "violinOne" \vlnOne <<
\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-2 . 2)
>>
\context Staff = "violinTwo" <<
\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
\context Voice = "violin 2" { \vlnTwo }
\context Voice = "violin 2 dynamics" { \vlnTwoDyn }
>>
\new Staff = "viola" <<
\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
\context Voice = "viola" { \vla }
\context Voice = "viola dynamics" { \vlaDyn }
>>
\new Staff = "cello" <<
\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
\context Voice = "cello" { \vc }
\context Voice = "cello dynamics" { \vcDyn }
>>
>> % end of "strings" staffgroup
>> % end of grand staff
\layout {
\context { \Staff
% \override VerticalAxisGroup #'minimum-Y-extent = #'(-4 . 4)
}
\context {
\Score
\override TimeSignature #'stencil = ##f
\override BarNumber #'padding = #3
\override RehearsalMark #'padding = #2
skipBars = ##t
} % context \Score \overrides end
} % layout end
\midi {
\context {
\Score
tempoWholesPerMinute = #(ly:make-moment 120 4)
}
}
} % score end
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user