openlilylib / lilypond-export

LilyPond export API to write Humdrum, MusicXML and more
GNU General Public License v3.0
22 stars 8 forks source link

Add support for ties. #22

Closed rshura closed 6 years ago

rshura commented 6 years ago

Also added export-example4.ly with ties.

jpvoigt commented 6 years ago

This looks good and I will merge it. We should have a look at the make-notations function. Now we have four boolean parameters for start/stop-slur/tie. So for every spanner there will be two more arguments to this function. I propose an argument alist. We can implement it as an optional argument: (define (make-notations . opts)) then check the args with (ly:assoc-get 'chord opts #f #f) and call the function with (make-notations (chord . #t)(tie-start . #t)). It leads to some more boilerplate inside make-notations, but prevents a long argument list.

jpvoigt commented 6 years ago

I merged and it works!

Am 08.11.18 um 06:04 schrieb Alex Roitman:

Also added |export-example4.ly| with ties.


    You can view, comment on, or merge this pull request online at:

  https://github.com/openlilylib/lilypond-export/pull/22

    Commit Summary

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/openlilylib/lilypond-export/pull/22, or mute the thread https://github.com/notifications/unsubscribe-auth/ADFWTuV6gPCjMtxwaxbOgUXW8RPyfccKks5us7tjgaJpZM4YUAYK.

rshura commented 6 years ago

A thing to keep in mind: only two boolean params, and two numeric params. The slur-start and slur-stop are numeric. This is because there can be one or more slurs ending on the note and one or more starting on the note (nested slurs are allowed I think). The slurs are identified by their number, hence the complication. The ties don't need the number (no nesting, and pitch identifies the tied notes).

On Wed, Nov 7, 2018 at 11:10 PM jpvoigt notifications@github.com wrote:

This looks good and I will merge it. We should have a look at the make-notations function. Now we have four boolean parameters for start/stop-slur/tie. So for every spanner there will be two more arguments to this function. I propose an argument alist. We can implement it as an optional argument: (define (make-notations . opts)) then check the args with (ly:assoc-get 'chord opts #f #f) and call the function with (make-notations (chord . #t)(tie-start . #t)). It leads to some more boilerplate inside make-notations, but prevents a long argument list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/openlilylib/lilypond-export/pull/22#issuecomment-436894917, or mute the thread https://github.com/notifications/unsubscribe-auth/AI_AaktTHPtGuuGBvKLXWoMcBjiuMvIzks5us9jUgaJpZM4YUAYK .