bug-lilypond
[Top][All Lists]
Advanced

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

Re: conversion rule for set-octavation/ottava with wrong version number?


From: David Kastrup
Subject: Re: conversion rule for set-octavation/ottava with wrong version number?
Date: Wed, 01 Nov 2017 09:26:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Alex Schreiber <address@hidden> writes:

> A file with content
>
> {c''' #(set-octavation 1) c''' #(set-octavation 0) c'''}
>
> compiles just fine in lilypond 2.12.0, but not in lilypond 2.18.2. However,
>
> convert-ly --from=2.12.0 --to=2.18.2 file.ly
>
> does not change anything.
> It seems as if
>
> @rule ((2, 11, 55), "#(set-octavation oct) -> \\ottava #oct
>
> in python/convertrules.py does not contain the correct version number.

I see that

commit 589ba7953e92ad4ad793d89291b97d738614408e
Author: Reinhold Kainhofer <address@hidden>
Date:   Sat Jun 28 14:07:25 2008 +0200

    New function: \ottava #oct, replaces #(set-octavation oct)

was introduced in 2.11.53, _including_ the convert-ly rule.

However,

commit d00ca5c25ad78a6de4ed5098673bb151707f28c1
Author: Neil Puttock <address@hidden>
Date:   Mon Jul 26 23:01:34 2010 +0100

    Fix #765: Display method for \ottava.
    
    Since \ottava currently uses ApplyContext to set the relevant context
    properties which trigger creation of an ottava bracket, the information
    useful to its display method (i.e., the octavation) is inaccessible: the 
only
    music property which can be extracted is the argument to ApplyContext, its
    procedure.
    
    By wrapping the existing code which creates an ottava bracket 
(make-ottava-set)
    in a synthetic event, the octavation can be passed as a music property, 
thus making
    it accessible from a display method.
    
    * input/regression/display-lily-tests.ly:
    
      add test for \ottava
    
    * ly/music-functions-init.ly (ottava):
    
      create ottava bracket via synthetic OttavaMusic
    
    * scm/define-music-display-methods.scm:
    
      add display method for \ottava, which simply catches OttavaMusic and reads
      'ottava-number
    
    * scm/define-music-properties.scm (all-music-properties):
    
      add 'ottava-number
    
    * scm/define-music-types.scm:
    
      copy make-ottava-set from scm/music-functions.scm
    
      add OttavaMusic: uses a sequential iterator to call make-ottava-set via 
its
      elements-callback
    
    * scm/music-functions.scm:
    
      add ly:context-property as procedure-with-setter
    
      remove make-ottava-set

removed set-octavation in version 2.13.29 .  So set-octavation seems
more like a backward compatibility remnant than anything else in 2.12.0.

I don't see that we can do this significantly better than it is
currently done.

-- 
David Kastrup



reply via email to

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