lilypond-devel
[Top][All Lists]
Advanced

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

Re: musicxml2ly patch for articulations (fermata, staccato, accent, etc


From: Han-Wen Nienhuys
Subject: Re: musicxml2ly patch for articulations (fermata, staccato, accent, etc.)
Date: Sat, 18 Aug 2007 02:35:31 -0300
User-agent: Thunderbird 2.0.0.5 (X11/20070719)

Reinhold Kainhofer escreveu:
> Now that OMR applications like Audiveris (https://audiveris.dev.java.net/) or 
> SmartScore are in a state where they detect most of the music correctly, I 
> think it's more important than ever to have a good MusicXML to Lilypond 
> converter so that one can scan in a score and process it with lilypond 
> without loosing too much of the music.


Thanks for looking at this.

The musicxml2ly converter hasn't seen much attention.
As the primary author, I have forgot most of the subtleties, so would be 
nice if we would have some tests to make sure we don't break any functionality.
Could you provide small separate musicxml files that exercise the 
functionalities?
I could then integrate them in our regression test framework.

regarding your patch

+    if ( dir ):

no ( ) in if and while.

+    if ( mxl_event.get_name() != "tremolo" ): return

if body (return in this case) on separate line.

+        self.force_direction = False
+
+    def direction_mod(self):
+        dirstr=''
+        if (self.force_direction == 1 or self.force_direction == "^" or 
self.force_direction == "up" ):
+            dirstr += '^'

Use a consistent type for force_direction. I recommend {-1,0,1}.

+        #print "Element named %s" % n.get_name()
+        
+        #if  n.get_name() == 'direction':

delete  debugging hacks before submitting

+            print "------------------------------------"
+            print "Encountered a <direction> element!!!"
+            print "++++++++++++++++++++++++++++++++++++"

print is actually being deprecated. Better use sys.stderr

+            printer.dump( "\\%s" % self.type )
+        else:
+            printer.dump( "\\markup{ \\dynamic %s }" % self.type )

function calls look like 

  printer.dump (...)

note placement of spaces

Can you revise your patch(es), and submit them as git patch, preferably
one per fix/subject?  

thanks,

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen





reply via email to

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