On Wed, Oct 27, 2010 at 11:57:56PM +0200, Valentin Villenave wrote: [...]
> Since you're familiar with Scheme, you may use the following hack > (adapting it to your needs, of course): At last had occasion to play with. The result is attached. Very cool. Now I'm trying to get a grip on how to position the note names above and below the (two-voice) staff. A short note on the attached notes (haha). This is a typical pattern in Balinese music called "kotekan": the two voices play in a tight interlocking pattern. A couple of things stick out. For one, there are many manual beams. That may be due to my Lilypondian inexperience[1]. Second, there are many explicit octave marks: \relative doesn't work as it should; although the melodies almost always move in small steps (in Balinese terms), the intervals between the balinese notes are (usually) not uniform. Let this suffice. More deetails in my other mail Regards [1] Especially you all may have a good laugh at the "kempli" part "o o o o...". There must be a better way :-) -- tomás
%{
A first attempt at notation input
for Balinese gamelan. Note that
this is just one of many possible
mappings. Ideally we'd like to support
them all with just one input
i (ding) -- h
o (dong) -- c
e (deng) -- d
u (dung) -- f
a (dang) -- g
%}
% all complaints to <[email protected]>
% map gamelan names to "western" pitches
pitchnamesGamelan = #`(
(i . ,(ly:make-pitch -1 6 NATURAL))
(o . ,(ly:make-pitch 0 0 NATURAL))
(e . ,(ly:make-pitch 0 1 NATURAL))
(u . ,(ly:make-pitch 0 3 NATURAL))
(a . ,(ly:make-pitch 0 4 NATURAL)))
#(ly:parser-set-note-names parser pitchnamesGamelan)
% "reverse" mapping, to enable printing NoteNames
% This trick thanks to Valentin Villenave:
pitchnamesGamelanR =
#`(("b" . "i")
("c" . "o")
("d" . "e")
("f" . "u")
("g" . "a"))
gmlNoteNamesStencil =
#(lambda (grob)
(let* ((default-name (ly:grob-property grob 'text))
(new-name (assoc-get default-name pitchnamesGamelanR)))
(ly:grob-set-property! grob 'text new-name)
(ly:text-interface::print grob)))
% big mouthful.
\include "gamelan.ly"
%kebyangIg = { a1~ a2~ a4 i'16 o' r8 a1~ a2~ a4 i'16 o' r8 u1
% e8[ o16 e8 u] e8[ o16 e8 u] e8[ o16 e8 u] e'16[ u'8]
% s s i''\pp i'' u u i i u u i i u u i i u\ff u i i u u i i u }
%kebyangIc = { a1~ a a1~ a u s1 s4 s8 u1 }
%polos
kotekanIgp = { a16 s i' s a i' s a[ i'] s o' s i' o' s i'
o' s e' s o' e' s o'[ e'] s u' s e' u' s e'[
u'] s e' s u' e' s u'[ e'] s a' s u' a' s u'
a' s i' s e' s r8 r8 i'16 s e' s i' s e' s
a' s u' a' s u'[ a'] s u' s a' u' s a'[ u'] s
o' s e' o' s e' o' s a s i' a s i' a s
% [ ]
e s u e s u[ e] s a s u a s u[ a]~ a8.
e8 r e r e r
}
%sangsih
kotekanIgs = { s16 a s u[ a] s u a s i' s a[ i'] s a i'
s o' s i'[ o'] s i' o' s e' s o'[ e'] s o' e'
s u' s a'[ u'] s a' u' s e' s e'[ u'] s e' u'
s a s o' s8 s8 s16 a s o' s a s o'
s u' s e' u' s e' u' s a' s i'' a' s i'' a'
s u' s u' e' s u' e' s o' s o' i' s o' i'
s a s a u s a u s e s e u s e u
r r8. i'8 r i' r i' r
}
% this sure nicer
kotekanIkempli = {\override NoteHead #'style = #'cross
o4 o o o o o o o o o o o o
o o o o o o o o o o o o
o o o o o o o
}
\score {
% \set Score.timing = ##f
% \set Score.timing = 4
<<
\new Staff <<
\set Staff.instrumentName = "gangsa"
\context NoteNames \with {
\override NoteName #'stencil = #gmlNoteNamesStencil
}{ \kotekanIgp }
{ \kotekanIgs } \\
{ \kotekanIgp }
>>
\new DrumStaff \with {
\override StaffSymbol #'line-count = #1
} {
\set Staff.instrumentName = "kempli"
\kotekanIkempli
}
>>
% { \new Staff
% \set Staff.instrumentName = "calung"
% <<
% \calungA
% >>
% }
% >>
\layout {
\context {
\Staff
\remove "Time_signature_engraver"
}
}
}
signature.asc
Description: Digital signature
_______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
