lilypond-devel
[Top][All Lists]
Advanced

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

Re: MusicXML: Conversion of various types of spanners (octave, pedals, t


From: Reinhold Kainhofer
Subject: Re: MusicXML: Conversion of various types of spanners (octave, pedals, trills)
Date: Thu, 13 Sep 2007 11:50:05 +0200
User-agent: KMail/1.9.6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag, 13. September 2007 schrieb Han-Wen Nienhuys:
>    # TODO: setting dashed/dotted line style does not work, because that
> +        #       command needs to be written before the note, not when the
> +        #       event is observed after the note!
> +        #if self.line_type == 1:
> +            #before = '\\slurDotted'
> +        #elif self.line_type == 2:
> +            #before = '\\slur
>
>
> if False:
>   ..block..
> is shorter

Sorry, I don't understand what you mean by that.

> +    def ly_expression (self):
> +        return {-1: '\\sustainDown',
> +            0:'',
> +            1:'\\sustainUp'}.get (self.span_direction, '')
> +
>
> 0 key superfluous

sure, but that's simply copied from the BeamEvent...


>  spanner_type_dict = {
>      'start': -1,
>      'begin': -1,
> +    'up': -2,
> +    'down': -1,
>      'stop': 1,
>      'end' : 1
>  }
>
> Don't do this; this is very nonstandard within lilypond. -1 =
> left/down/start, 1 = right/up/stop,  0 = center.

Ottava bracket elements have three different types: up, down and stop.
A similar problem happens with hairpin crescendos, where the possible types 
are crescendo / diminuendo / stop. (Yes, both use inconsistent values 
currently, I know)
What's the preferred way to treat these in lilypond?

> @@ -492,12 +492,28 @@ class SpanEvent (Event):
>      def __init__(self):
>          Event.__init__ (self)
>          self.span_direction = 0
> +        self.line_type = 0
> +        self.size = 0
>
>
> why is line_type encoded as an int? It's clearer if you just use a
> string ('wavy', 'dotted', etc.)

I used an int since span_direction was also using an int...

Cheers,
Reinhold
- -- 
- ------------------------------------------------------------------
Reinhold Kainhofer, Vienna University of Technology, Austria
email: address@hidden, http://reinhold.kainhofer.com/
 * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/
 * K Desktop Environment, http://www.kde.org, KOrganizer maintainer
 * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFG6QfQTqjEwhXvPN0RAkjOAKDPZL62tSK8YqMi3OUXPKaBqxUhEACgxAmI
aBDObq/XPsbAeJ6L9kouz38=
=Gbp/
-----END PGP SIGNATURE-----




reply via email to

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