Omit repeated chords. Fix omitted steps

This commit is contained in:
Matthias Neeracher 2008-02-24 20:14:43 +00:00
parent 0edecd72eb
commit 1011966cfd
2 changed files with 10 additions and 5 deletions

5
BUGS
View File

@ -10,5 +10,10 @@
* Prefer flats in C major * Prefer flats in C major
* Walking syllables is not accurate * Walking syllables is not accurate
23Feb08
* Joy Spring: Import in 12ths
* Let's do it: C697
* Let's Misbehave: Transposes wrong way

View File

@ -186,7 +186,7 @@ def parseLilypond
tokens = [] tokens = []
INFILE.each do |line| INFILE.each do |line|
line.chomp!.sub!(/%.*/, "") line.chomp!.sub!(/%.*/, "")
line.scan(%r$\G\s*(\{|\}|\(|\)|\||=|~|<<|>>|--|#'|#\(|##t|##f|\\\w+|\".*?\"|\w[-+\w\d.',:*/]+|.)$) do |token| line.scan(%r$\G\s*(\{|\}|\(|\)|\||=|~|<<|>>|--|#'|#\(|##t|##f|\\\w+|\".*?\"|\w[-+^\w\d.',:*/]+|.)$) do |token|
tokens.push(token[0]) tokens.push(token[0])
end end
end end
@ -237,7 +237,7 @@ def parseLilypond
(\d+ # 1, 2, 4, 8, 16 ... (\d+ # 1, 2, 4, 8, 16 ...
\.*(?:\*\d+/\d+)? # ., *3/4 \.*(?:\*\d+/\d+)? # ., *3/4
)? )?
(?:\:([-+^:.a-z\d]+)?)? # :maj9.7-^2 (?:\:([-+^:.a-z\d]*))? # :maj9.7-^2
(?:/\+?( # /+ (?:/\+?( # /+
[a-g](?:[ei]?s)? # Root: a, bes, fis, as [a-g](?:[ei]?s)? # Root: a, bes, fis, as
))? ))?
@ -476,9 +476,9 @@ def makeMeasures
if len+chordLen > measureLen if len+chordLen > measureLen
remLen = len+chordLen-measureLen remLen = len+chordLen-measureLen
chordLen -= remLen chordLen -= remLen
remChord = chord.dup remChord = {
remChord['durNum'] = remLen.num 'pitch' => VL::NoPitch, 'root' => VL::NoPitch,
remChord['durDenom'] = remLen.denom 'durNum' => remLen.num, 'durDenom' => remLen.denom}
CHORDS.unshift(remChord) CHORDS.unshift(remChord)
end end
mchords.push(chord) mchords.push(chord)