Menu

#5181 Integrate lone post-events into surrounding expressions.

Fixed
Enhancement
2017-09-11
2017-09-03
No

Integrate lone post-events into surrounding expressions.

Reattaching post-events to a preceding music variable or music
function call (or expression) is often desired but was unsupported.

The problem with supporting such expressions everywhere is that it
breaks the use of

c-\single \dynamicUp \f

since then \f is attached to \dynamicUp instead of becoming the second
argument to \single, due to operator precedence. So reattaching lone
post-events is only done with lower precedence in selected constructs.

This issue does not yet contain regression tests, changes entries, or
documentation. I would want to solicit feedback on how useful people
find it since it messes with the syntax.

Contains commits (reverse order):

Integrate lone post-events into chords

Reattaching post-events to a preceding music variable or music
function call (or expression) is often desired but was unsupported.
This commit caters for the support inside of chords.

Allow lone postevents in braced lists

Reattaching post-events to a preceding music variable or music
function call (or expression) is often desired but was unsupported.

This commit caters for the support in braced lists.

The problem with supporting such expressions everywhere is that it
breaks the use of

c-\single \dynamicUp \f

since then \f is attached to \dynamicUp instead of becoming the second
argument to \single, due to operator precedence. So reattaching lone
post-events is only done with lower precedence in selected constructs.

Parser: Add reverse_music_list function

This function does not just reverse a music list but also integrates
post events into the respective preceding expressions. If that is not
possible, a warning is printed and they are either dropped or attached
to an empty chord (depending on a call parameter). If a list consists
only of post-events, it might be returned as a post-event, too.
Again, depending on a parameter. This is useful for #{ -2 -3 #} and
its ilk.

Also adds add_post_events function.

http://codereview.appspot.com/321560043

Discussion

  • Anonymous

    Anonymous - 2017-09-04
    • Description has changed:

    Diff:

    
    
    • Needs: -->
    • Patch: new --> review
     
  • Anonymous

    Anonymous - 2017-09-04

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2017-09-07
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2017-09-07

    Patch on countdown for September 10th

     
  • Anonymous

    Anonymous - 2017-09-10
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2017-09-10

    Patch counted down - please push.

     
  • Anonymous

    Anonymous - 2017-09-11
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Anonymous

    Anonymous - 2017-09-11

    Issue 5181/1: Parser: Add reverse_music_list function
    author David Kastrup dak@gnu.org
    Tue, 29 Aug 2017 11:01:03 +0100 (12:01 +0200)
    committer David Kastrup dak@gnu.org
    Mon, 11 Sep 2017 19:05:52 +0100 (20:05 +0200)
    commit 916408fbdcddfa956bd8447413e49530d8d9d6cb

    Issue 5181/2: Allow lone postevents in braced lists
    author David Kastrup dak@gnu.org
    Sun, 3 Sep 2017 21:43:19 +0100 (22:43 +0200)
    committer David Kastrup dak@gnu.org
    Mon, 11 Sep 2017 19:05:52 +0100 (20:05 +0200)
    commit 6373a95654a5025f7c4f3a50433e6cc821ca6dec

    author David Kastrup dak@gnu.org
    Sun, 27 Aug 2017 16:22:11 +0100 (17:22 +0200)
    committer David Kastrup dak@gnu.org
    Mon, 11 Sep 2017 19:05:52 +0100 (20:05 +0200)
    commit 8cdf89cee44dfff680e339c4f8d1af62dae7ff02

     
  • David Kastrup

    David Kastrup - 2017-09-11
    • labels: --> Fixed_2_21_0
    • status: Started --> Fixed
    • Needs: -->
    • Patch: new -->
    • Type: --> Enhancement