Menu

#4891 Simplify "Changing \flageolet mark size" snippet

Invalid
None
abandoned
Documentation
2016-06-12
2016-06-12
No

Simplify "Changing \flageolet mark size" snippet

Also contains commit:

Run scripts/auxiliar/makelsr.py

Should this rather be done in the LSR in the first place?

http://codereview.appspot.com/300940043

Discussion

  • Phil Holmes

    Phil Holmes - 2016-06-12

    It definitely should be done in the LSR and not in snippets/new, and looking at the LSR now it looks like someone has beaten me to it.

    http://lsr.di.unimi.it/LSR/Snippet?id=315

    It will need an LSR import to show in the docs. Assuming I remember, I'll do that before the next relelase.

    Suggest you mark this as invalid or something like it now.

     
  • David Kastrup

    David Kastrup - 2016-06-12
    • Description has changed:

    Diff:

    
    
    • status: Started --> Invalid
    • Needs: -->
    • Patch: new --> abandoned
    • Type: Enhancement --> Documentation
     
  • David Kastrup

    David Kastrup - 2016-06-12

    Looks like already being fixed in LSR, marking as invalid.

     
  • David Kastrup

    David Kastrup - 2016-06-12

    Well, it's not really "the old scheme-coding" in this particular snippet: I cannot even remember whether it had ever been necessary to revert to Scheme for this particular task.

     
    • Thomas Morley

      Thomas Morley - 2016-06-12

      Doesn't work with v2.14.2.
      I still keep that version for research/testing

       
      • David Kastrup

        David Kastrup - 2016-06-12

        You just need to write \tweak #'font-size #-3 \flageolet instead. It's not a matter of not being able to store an expression tweaked with \tweak in a variable, merely one of the \tweak arguments needing to be typed explicitly as symbol/number. Not entirely sure about the number, but defnitely regarding the symbol.

         
        • Thomas Morley

          Thomas Morley - 2016-06-12

          Well, you know it's more of historical interest, not to say archaeological ...

          But this code:

          \version "2.14.2"
          
          smallFlageolet = \tweak #'font-size #-3 \flageolet
          
          { c''4^\smallFlageolet }
          

          returns:

          GNU LilyPond 2.14.2
          Processing `atest-37.ly'
          Parsing...
          atest-37.ly:3:40: error: syntax error, unexpected EVENT_IDENTIFIER
          smallFlageolet = \tweak #'font-size #-3 
                                                  \flageolet
          [...]
          
           
          • David Kastrup

            David Kastrup - 2016-06-13

            Let me guess.

            smallFlageolet = -\tweak #'font-size #-3 \flageolet
            

            and/or -\flageolet ? I am pretty sure that one could assign post-events to variables and that \tweak would work on either post-event or normal music; either feature was preexisting before I started fiddling with music functions. One just needed to get the syntax right...

             
            • Thomas Morley

              Thomas Morley - 2016-06-13

              smallFlageolet = -\tweak #'font-size #-3 \flageolet
              works indeed, although
              http://lilypond.org/doc/v2.14/Documentation/notation/the-tweak-command
              stated:
              The \tweak command cannot be used inside a variable.
              Thanks your "fiddling with music functions" all this works better nowadays, and not only this ...

               
              • David Kastrup

                David Kastrup - 2016-06-13
                The \tweak command cannot be used inside a variable.
                

                Well, the documentation tends to be maintained to a large amount by people not having written the underlying and likely underdocumented code. Often they make experiments, and when those experiments fail, generalize from the results.

                Of course that is unfortunate because exactly when it is hard to get things right for obscure and/or technical reasons, the documentation is most necessary.

                I think this is what originally happened with
                commit 95f4d574b1070683fe6d596a88cbe230203a7a72
                Author: Werner Lemberg wl@gnu.org
                Date: Tue Feb 27 09:35:26 2007 +0100

                Document Scheme replacement sample for \tweak.
                
                Fix node name (it must not contain `.' followed by a space).
                

                and that has survived and inspired code, in particular in connection with \flageolet, for years. In music expressions, you still need to do -\tweak so it's not like things have become a whole lot more consistent. One could actually let LilyPond complain with a more educational error message instead, but in this particular case silent acceptance seems not to do much harm. And my preferred end goal would be allowing just \tweak without preceding - everywhere but that's really tricky.

                 
MongoDB Logo MongoDB