[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LSR contribution
From: |
Thomas Morley |
Subject: |
Re: LSR contribution |
Date: |
Sat, 21 Dec 2019 21:05:58 +0100 |
Am Sa., 21. Dez. 2019 um 00:35 Uhr schrieb Michael Käppler <address@hidden>:
>
> Hi Harm et al.,
> attached is my updated version.
> I decided to split up the validity checks from the actual engraver,
> because otherwise in case of invalid parameters the engraver would
> only be instantiated to do nothing and nevertheless have its
> acknowledger called every time.
> The code is much more verbose now, which makes the flow of information
> and control
> clearer I hope.
>
> Please let me know what you think about it.
>
> Cheers,
> Michael
Hi Michael,
thanks again for your updated snippet.
I've taken a closer look.
You try to give the user always meaningful warning-messages.
That's great, putting out really helpful messages is hard work...
Alas, speaking only for me, I don't like those multiple nested `if`.
Thus I defined `type-check-intervals-given` and use it to filter the
user-given interval-list.
`filter` will return false for the first occurrence of failed
`type-check-intervals-given`. Thus it can be used to deal with
user-errors step-by-step.
Along with it, I added a basic check for the user provided list (about
equal length of each sublist)
There was an undefined variable `gen-warntext`, which is now gone as well.
Furthermore, I changed the basic `intervaldefs` to take only pairs of
the interval-string and the semi-tonoc steps. The diatonic steps are
calculated relying on the interval-string.
I found no need to do work in `process-acknowledged`.
Thus all work is done in 'note-head-interface of `acknowledgers`
Probably more efficient, but I have not really checked.
A plethora of minor changes in code and comments... ;)
WDYT?
Btw, there is one case, where I don't know how to deal with:
2.18.2 can't cope with an empty engraver, see:
\score {
\new Staff \relative c' { c4 d }
\layout {
\context {
\Voice
\consists \color_interval_engraver #intervaldefs #`(("30-" 0 #t ,green))
}
}
}
No problem for 2.19.83, though.
Cheers,
Harm
atest-95.ly
Description: Text Data
- LSR contribution, Michael Käppler, 2019/12/15
- Re: LSR contribution, Thomas Morley, 2019/12/15
- Re: LSR contribution, Thomas Morley, 2019/12/15
- Re: LSR contribution, Michael Käppler, 2019/12/18
- Re: LSR contribution, Michael Käppler, 2019/12/20
- Re: LSR contribution,
Thomas Morley <=
- Re: LSR contribution, Michael Käppler, 2019/12/27
- Re: LSR contribution, Thomas Morley, 2019/12/29
- Re: LSR contribution, Thomas Morley, 2019/12/29
- Re: LSR contribution, Michael Käppler, 2019/12/20
Re: LSR contribution, Pierre Perol-Schneider, 2019/12/15