[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnu-music-discuss] etf2ly.py fails
From: |
David Chan |
Subject: |
[Gnu-music-discuss] etf2ly.py fails |
Date: |
Thu, 14 Sep 2000 16:36:05 +0100 (BST) |
Hi,
I've been trying to convert some etf files from www.freenote.org to
mudela, using etf2ly.py. The files I have been working on are
twopt01.etf, ..., twopt15.etf, located at
http://www.freenote.org/music/jsbach/twopt01.etf
etc. Here are some errors I've found.
twopt03.etf
-----------
etf2ly.py dies with the following output:
> Processing `../twopt03.etf'
> parsing ...Traceback (innermost last):
> File "../etf2ly.py", line 1004, in ?
> e = Etf_file(f)
> File "../etf2ly.py", line 666, in __init__
> self.parse (name)
> File "../etf2ly.py", line 842, in parse
> m = self.try_Sx (l)
> File "../etf2ly.py", line 767, in try_Sx
> self.slurs[-1].append_entry (params)
> AttributeError: 'None' object has no attribute 'append_entry'
I don't speak python but I have an idea as to what the problem might be.
In twopt03.etf, the lowest slurnumber an Sx(n) ever has is 5:
> ^Sx(5) 15 -32256 24576 1 6 45
I think etf2ly.py is assuming that the lowest slurnumber will be 1.
> def try_Sx(self,l):
> m = Sxre.match (l)
> if m:
> slurno = string.atoi (m.group (1))
> if len (self.slurs) == slurno:
^^^^^^^^^^^^^^^^^^^^^^ never true for this file?
> self.slurs.append (Slur (slurno))
>
> params = list (m.groups ()[1:])
> params = map (string.atoi, params)
** at this point "print self.slurs" outputs "[None]" **
> self.slurs[-1].append_entry (params)
>
> return m
twopt05.etf
-----------
etf2ly.py dies with the following output:
> Processing `../twopt05.etf'
> parsing ...processing ...Traceback (innermost last):
> File "../etf2ly.py", line 1004, in ?
> e = Etf_file(f)
> File "../etf2ly.py", line 666, in __init__
> self.parse (name)
> File "../etf2ly.py", line 861, in parse
> m.global_measure = self.measures[mno]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> IndexError: list index out of range
This is in Etf_file.parse(). mno = 33 when the indicated line fails,
wheras len(self.measures) = 33; i.e. it is failing on measure 33, the last
measure. Relevant-looking ^GF statements in twopt05.etf are as follows:
> ^GF(1,31) 0 0 0 0 0
> ^GF(1,31) 0 0 31 0 0
> ^GF(1,32) 0 0 0 0 0
> ^GF(1,32) 0 0 32 0 0
> ^GF(1,33) 0 0 0 0 0
^^^^^^^^^^^^^^^^^^^ this looks dodgy
> ^GF(2,1) 3 0 33 0 0
[...]
> ^GF(2,31) 3 0 63 0 0
> ^GF(2,31) 0 0 0 0 0
> ^GF(2,32) 3 0 64 0 0
> ^GF(2,32) 0 0 0 0 0
Note that ^GF(1,33) is only 1 line long, and there is no ^GF(2,33). In
fact, the piece is only 32 bars long.
Similarly,
twopt09.etf (34 bars long) has a 1-line ^GF(1,35)
twopt14.etf (20 bars long) has 1-line ^GF(1,21) and ^GF(1,22),
but also 1-line ^GF(2,21) and ^GF(2,22).
In all three cases, if I delete the dodgy looking lines then the
conversion succeeds.
Perhaps Finale doesn't stick to the spec entirely. Any chance of a
workround in the converter, Han-Wen? :-)
Many thanks,
--
David
- [Gnu-music-discuss] etf2ly.py fails,
David Chan <=