lilypond-user
[Top][All Lists]
Advanced

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

Notes in Key Sig


From: David Raleigh Arnold
Subject: Notes in Key Sig
Date: Thu, 21 Apr 2005 18:48:27 -0400
User-agent: KMail/1.7.1

People have asked in the past for the ability to enter
notes without having to put in the chromatic signs
specified in the key signature.  This sed filter
does that plus a few other things optionally.

I found it quite useful in doing my "Alegrias for Rose"
which is in E major.  Here it is. daveA:

# keys.sed -- b for flat, w for double flat
# are optional.
# Can use h for bn, n for natural. 
# Outer address has no key changes.
# Write single letters for notes in key sig.
# Put @key0@ for no key change or
# put @key[1-7][bs]@    ( b|s = flat|sharp )
# anywhere on first line to edit and
# @key@ anywhere on last line of input to edit.
# (c)2005 David Raleigh Arnold. GNU license. Enjoy!

# Outer Address:
/@address@hidden/,/@key@/{

# no tabs, one space at beginning, end of line
s/\t/ /g
s/^ */ /
s/ *$/ /

#change spellings:

#   b and bb notes to f and ff
s/\([{<| ][a-g]\)bb/\1ff/g
s/\([{<| ][a-g]\)b/\1f/g

#   h to b-natural
s/\([{<| ]\)h/\1bn/g

#   w to double flat ff
s/\([{<| ][a-g]\)w/\1ff/g

/@key[1-7][bs]@/,/@key@/{
# place marker to mark eligible notes consisting in a
# single letter.
s/\([{<| ]\)c\([^a-gnx]\)/\1c%flatORsharp%\2/g
s/\([{<| ]\)d\([^a-gnx]\)/\1d%flatORsharp%\2/g
s/\([{<| ]\)e\([^a-gnx]\)/\1e%flatORsharp%\2/g
s/\([{<| ]\)f\([^a-gnx]\)/\1f%flatORsharp%\2/g
s/\([{<| ]\)g\([^a-gnx]\)/\1g%flatORsharp%\2/g
s/\([{<| ]\)a\([^a-gnx]\)/\1a%flatORsharp%\2/g
s/\([{<| ]\)b\([^a-gnx]\)/\1b%flatORsharp%\2/g

/@key7b@/,/@\/key@/b keycb
/@key6b@/,/@\/key@/b keygb
/@key5b@/,/@\/key@/b keydb
/@key4b@/,/@\/key@/b keyab
/@key3b@/,/@\/key@/b keyeb
/@key2b@/,/@\/key@/b keybb
/@key1b@/,/@\/key@/b keyf
/@key7s@/,/@\/key@/b keycs
/@key6s@/,/@\/key@/b keyfs
/@key5s@/,/@\/key@/b keyB
/@key4s@/,/@\/key@/b keye
/@key3s@/,/@\/key@/b keya
/@key2s@/,/@\/key@/b keyd
/@key1s@/,/@\/key@/b keyg 

:keycb
s/f%flatORsharp%/f%flat%/g
:keygb
s/c%flatORsharp%/c%flat%/g
:keydb
s/g%flatORsharp%/g%flat%/g
:keyab
s/d%flatORsharp%/d%flat%/g
:keyeb
s/a%flatORsharp%/a%flat%/g
:keybb
s/e%flatORsharp%/e%flat%/g
:keyf
s/b%flatORsharp%/b%flat%/g
b finish

:keycs
s/b%flatORsharp%/b%sharp%/g
:keyfs
s/e%flatORsharp%/e%sharp%/g
:keyB 
s/a%flatORsharp%/a%sharp%/g
:keye 
s/d%flatORsharp%/d%sharp%/g
:keya 
s/g%flatORsharp%/g%sharp%/g
:keyd 
s/c%flatORsharp%/c%sharp%/g
:keyg 
s/f%flatORsharp%/f%sharp%/g

:finish
s/%flatORsharp%//g      
# flat f
s/%flat%/f/g
# sharp s
s/%sharp%/s/g
}
# Now outer clean up
# rid of n's
s/\([{<| ][a-g]\)n/\1/g
# rid of markers
s/@key0@//g
s/@key[1-7][bs]@//g
s/@key@//g
}


-- 
Practice pie charts, plans and schedules are good.
Practice logs, diaries and records are good.
When they fail, and they will, do another.
How else can repeated failure be a recipe for success?

The only technical exercises for all guitarists worth a lifetime
of practice: "Dynamic Guitar Technique".  Nothing else is close.
Free download:  http://www.openguitar.com/instruction.html    
daveA         David Raleigh Arnold          dra..at..openguitar.com





reply via email to

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