Custom accidental styles

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom accidental styles

Dan Eble
Simon,

When you have time, would you please give me an example of adding a user-defined accidental style? (changes in https://codereview.appspot.com/280510043/, as far as I can tell)

The latest lilypond doesn’t work on my source where I’ve been using this:

hymnbookCautionaryAccidentalStyle =
    #(set-accidentals-properties
      #f
      `(Voice ,(make-accidental-rule 'same-octave 0))
      `(Staff ,(make-accidental-rule 'same-octave 0))
      'Staff)

Dan


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Custom accidental styles

Simon Albrecht-2
Hi Dan,

On 20.05.2016 00:38, Dan Eble wrote:
> When you have time, would you please give me an example of adding a user-defined accidental style? (changes inhttps://codereview.appspot.com/280510043/, as far as I can tell)

exactly, that’s the one. I just attach my library file which adds the
custom accidental style ‘baroque’ to simulate 18th century usage. I hope
the comments are useful – it was so difficult to grasp the logic that I
made them right away so it would be easier to get there again. For
everything else, you need to look into scm/music-functions.scm, e.g.
lines 1703ff. I was hoping to do further improvements to the code
(comments and simplification) such as to make the threshold still lower,
but I didn’t get there unfortunately.

HTH, Simon

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel

accidental-style-baroque.ily (8K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Custom accidental styles

Dan Eble
On May 20, 2016, at 05:38 , Simon Albrecht <[hidden email]> wrote:
> I was hoping to do further improvements to the code (comments and simplification) such as to make the threshold still lower, but I didn’t get there unfortunately.
>
> HTH, Simon
> <accidental-style-baroque.ily>

Thank you.  That was helpful.  This worked for me:

%% Like voice, with additional cautionary cross-voice cancellations
#(set! accidental-styles (append accidental-styles
                          `((hymnbook-cautionary #f
                             (Voice ,(make-accidental-rule 'same-octave 0))
                             (Staff ,(make-accidental-rule 'same-octave 0))
                             Staff))))

Dan


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Custom accidental styles

David Kastrup
Dan Eble <[hidden email]> writes:

> On May 20, 2016, at 05:38 , Simon Albrecht <[hidden email]> wrote:
>> I was hoping to do further improvements to the code (comments and
>> simplification) such as to make the threshold still lower, but I
>> didn’t get there unfortunately.
>>
>> HTH, Simon
>> <accidental-style-baroque.ily>
>
> Thank you.  That was helpful.  This worked for me:
>
> %% Like voice, with additional cautionary cross-voice cancellations
> #(set! accidental-styles (append accidental-styles
>  `((hymnbook-cautionary #f
>     (Voice ,(make-accidental-rule 'same-octave 0))
>     (Staff ,(make-accidental-rule 'same-octave 0))
>     Staff))))

accidental-styles.hymnbook-cautionary =
#`(#f (Voice ,(make-accidental-rule 'same-octave 0))
      (Staff ,(make-accidental-rule 'same-octave 0))
      Staff)

--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel