openlilylib / snippets

A place to store useful pieces of LilyPond code - custom functions, engravers, hacks, templates, examples etc.
Other
120 stars 38 forks source link

gridly: Simplify public function interface #118

Closed Cecca closed 9 years ago

Cecca commented 9 years ago

This commit changes the public interface of two functions in GridLY public interface, namely gridPutMusic and gridSetSegmentTemplate. Both these functions took a mandatory music argument, optionally preceded by a context modifier to provide additional arguments. As per the discussion in issue #104, this is somewhat confusing in the case of cells using many optional arguments, since it is not immediately clear that the music belongs to the cells.

To simplify this situation, the music argument is "pulled" inside the context modifier, so the parentheses of the with block explicitly mark the boundaries of the cell definition.

This is a breaking change. In order to ease the migration, two functions are provided, namely gridPutMusicDepr and gridSetSegmentTemplateDepr that use the old interface. Please refer to the "Migration guide" in GridLY's README for more information.

uliska commented 9 years ago

Unfortunately I don't have any time to look into your pull requests (also the older one) as I'm preparing for the MEI conference and won't be "available" until the end of next week.

Cecca commented 9 years ago

I just rebased this PR on top of gridly-0.6.0 (which in turn got the updates from master with a merge) in order to make the future merge simpler