lilypond-user
[Top][All Lists]
Advanced

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

Re: Status of harmonica in Lilypond?


From: David Raleigh Arnold
Subject: Re: Status of harmonica in Lilypond?
Date: Fri, 17 Dec 2004 12:52:31 -0500
User-agent: KMail/1.7.1

On Friday 17 December 2004 11:44 am, you wrote:
> David, I was searching on 'harmonica' in the Lilypond archives, and your
> name came up. I'm also interested in harmonica notation. Can you briefly
> tell me the status of your work with Lilypond on this? Can you send me an
> example of a harmonica piece engraved with Lilypond?

It's at a complete halt.  All I did was make a one-line staff and put
fingering (the hole numbers) above each note.  Then I used flats on the
line to indicate bends and a ring around the number to indicate a draw.

This sed script did the work of applying the fingering.  Of course
everything was in key of C.  I automated it with some bash scripts, but
I'd use slyce and python now.  You just type the notes and run the sed script 
on them.  Slyce is the way to go with stuff like this, because you can 
produce something and make the template while doing it without any extra
effort.

# get rid of tabs, put spaces front and end.
s/^ / /g
s/^/ /g
s/$/ /g
# attempt to allow certain chars before notes,
# by printing space after AND before.
s/[][>~<]/ & /g
# find: space c, any num of f's, comma (e.g.),
# anything not a comma or space, so
# a space needs
# another line.
# sub: all found plus string and extra space.
s/ \(cf*!*[^ ,']*\) / PROTECT\1^"4"^" "  /g 
s/ \(cf*!*\) / PROTECT\1^"4"^" "  /g 
s/ \(cf*,!*[^ ,']*\) / PROTECT\1^"1"^" "  /g 
s/ \(cf*,!*\) / PROTECT\1^"1"^" "  /g 
s/ \(cf*'!*[^ ,']*\) / PROTECT\1^"7"^" "  /g
s/ \(cf*'!*\) / PROTECT\1^"7"^" "  /g
s/ \(cf*''!*[^ ,']*\) / PROTECT\1^"0"^" "  /g
s/ \(cf*''!*\) / PROTECT\1^"0"^" "  /g
s/ \(df*!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{4}}"^" 
"  /g
s/ \(df*!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{4}}"^" "  /g
s/ \(df*,!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{1}}"^" 
"  /g
s/ \(df*,!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{1}}"^" "  /g
s/ \(df*'!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{8}}"^" 
"  /g
s/ \(df*'!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{8}}"^" "  /g
s/ \(ef*!*[^ ,']*\) / PROTECT\1^"5"^" "  /g 
s/ \(ef*!*\) / PROTECT\1^"5"^" "  /g 
s/ \(ef*,!*[^ ,']*\) / PROTECT\1^"2"^" "  /g 
s/ \(ef*,!*\) / PROTECT\1^"2"^" "  /g 
s/ \(ef*'!*[^ ,']*\) / PROTECT\1^"8"^" "  /g
s/ \(ef*'!*\) / PROTECT\1^"8"^" "  /g
s/ \(ff*!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{5}}"^" 
"  /g
s/ \(ff*!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{5}}"^" "  /g
s/ \(ff*'!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{9}}"^" 
"  /g
s/ \(ff*'!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{9}}"^" "  /g
s/ \(gf*!*[^ ,']*\) / PROTECT\1^"6"^" "  /g 
s/ \(gf*!*\) / PROTECT\1^"6"^" "  /g 
s/ \(gf*,!*[^ ,']*\) / PROTECT\1^"3"^" "  /g 
s/ \(gf*,!*\) / PROTECT\1^"3"^" "  /g 
s/ \(gf*'!*[^ ,']*\) / PROTECT\1^"9"^" "  /g
s/ \(gf*'!*\) / PROTECT\1^"9"^" "  /g
s/ G\(f*,!*[^ ,']*\) / PROTECTg\1^"\\\\large\\\\textcircled{\\\\small{2}}"^" 
"  /g
s/ G\(f*,!*\) / PROTECTg\1^"\\\\large\\\\textcircled{\\\\small{2}}"^" "  /g
s/ \(af*!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{6}}"^" 
"  /g
s/ \(af*!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{6}}"^" "  /g
s/ \(af*'!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{0}}"^" 
"  /g
s/ \(af*'!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{0}}"^" "  /g
s/ \(bf*,!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{3}}"^" 
"  /g
s/ \(bf*,!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{3}}"^" "  /g
s/ \(bf*!*[^ ,']*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{7}}"^" 
"  /g
s/ \(bf*!*\) / PROTECT\1^"\\\\large\\\\textcircled{\\\\small{7}}"^" "  /g
# clean up extra spaces
s/PROTECT/ /g
s/  */ /g
s/^  *//g
s/  *$//g

Using GNU sed, the thing could be much shorter, on account of having an
'or', "\|" or with $sed -r: "|".

I didn't know how to get the ringed number centered over the note at the
time.  Here is an ancient .ly file made with it.  I had a separate score
block for the midi, which would make it twice as long.  Version?  In the
ones.  Not too big a deal to fix the boilerplate and the sed file.

%% template: walkrightin.ly
\include "english.ly"
\include "paper20.ly"
\score { \notes { \transpose c''' {
\forgetAccidentals 
\context RhythmicStaff 
\property Staff.midiInstrument = #"harmonica"
\clef "percussion"
\property Staff.TimeSignature \override #'style = #'() 
\stemDown 
\property Staff.instrument = #"\\Large{}"
\property Voice.Stem \override #'thickness = #1.0
\time 4/4
d'4^"\\large\\textcircled{\\small{8}}" d'^"\\large\\textcircled{\\small{8}}" 
a2^"\\large\\textcircled{\\small{6}}"
d'8^"\\large\\textcircled{\\small{8}}" d'4^"\\large\\textcircled{\\small{8}}" 
b8^"\\large\\textcircled{\\small{7}}" ~ b4^"\\large\\textcircled{\\small{7}}" 
r
f'8^"\\large\\textcircled{\\small{9}}" e'^"8" 
d'^"\\large\\textcircled{\\small{8}}" b^"\\large\\textcircled{\\small{7}}" 
d'^"\\large\\textcircled{\\small{8}}" e'4^"8" 
d'8^"\\large\\textcircled{\\small{8}}" ~
d'2^"\\large\\textcircled{\\small{8}}" r
d'4^"\\large\\textcircled{\\small{8}}" d'^"\\large\\textcircled{\\small{8}}" 
a2^"\\large\\textcircled{\\small{6}}"
d'8^"\\large\\textcircled{\\small{8}}" d'4^"\\large\\textcircled{\\small{8}}" 
b8^"\\large\\textcircled{\\small{7}}" ~ b4^"\\large\\textcircled{\\small{7}}" 
r
\break
e'8^"8" e'^"8" e'^"8" e'^"8" e'8^"8" e'^"8" e'^"8" c'^"7"
a2^"\\large\\textcircled{\\small{6}}" r2
d'8^"\\large\\textcircled{\\small{8}}" d'^"\\large\\textcircled{\\small{8}}" 
b^"\\large\\textcircled{\\small{7}}" b^"\\large\\textcircled{\\small{7}}" 
a^"\\large\\textcircled{\\small{6}}" a^"\\large\\textcircled{\\small{6}}" 
b^"\\large\\textcircled{\\small{7}}" a^"\\large\\textcircled{\\small{6}}"
d'4^"\\large\\textcircled{\\small{8}}" b8^"\\large\\textcircled{\\small{7}}" 
b^"\\large\\textcircled{\\small{7}}" a8^"\\large\\textcircled{\\small{6}}" 
b4.^"\\large\\textcircled{\\small{7}}"
\break
f'8^"\\large\\textcircled{\\small{9}}" e'^"8" 
d'^"\\large\\textcircled{\\small{8}}" b^"\\large\\textcircled{\\small{7}}" 
f'^"\\large\\textcircled{\\small{9}}" e'4^"8" 
d'8^"\\large\\textcircled{\\small{8}}" ~
d'2^"\\large\\textcircled{\\small{8}}" r
d'4^"\\large\\textcircled{\\small{8}}" d'^"\\large\\textcircled{\\small{8}}" 
a2^"\\large\\textcircled{\\small{6}}"
d'8^"\\large\\textcircled{\\small{8}}" d'4^"\\large\\textcircled{\\small{8}}" 
b8^"\\large\\textcircled{\\small{7}}" ~ b4^"\\large\\textcircled{\\small{7}}" 
r
f'8^"\\large\\textcircled{\\small{9}}" e'^"8" 
d'^"\\large\\textcircled{\\small{8}}" b^"\\large\\textcircled{\\small{7}}" 
d'^"\\large\\textcircled{\\small{8}}" e'4^"8" 
d'8^"\\large\\textcircled{\\small{8}}" ~
d'2^"\\large\\textcircled{\\small{8}}" r
\bar "|."}  }  
\paper{ linewidth=7.0\in indent=0.15\in
     interscoreline = 0.1\in
     \translator {
         \RhythmicStaffContext 
         \consists Clef_engraver
         \consists Accidental_engraver
             }
      }
}

I have attached a dvi.  Hope it helps.  daveA

 

Attachment: walkrightin.dvi
Description: TeX dvi file


reply via email to

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