[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Event listener to extract (some) music events. (issue4373046)
From: |
v . villenave |
Subject: |
Re: Event listener to extract (some) music events. (issue4373046) |
Date: |
Thu, 07 Apr 2011 13:30:21 +0000 |
Greetings Graham,
this looks acceptable to me, although I'm certainly not the most
qualified person in this regard.
Are you quite sure this really is generic enough, though? There are a
few hardcoded things here, and more inconveniently this approach means
you have to manually choose which events you're listening to. I do use a
similar approach every now and then (without outputting it to a
formatted file though) but for very specific purposes only.
If we were to had a "LilyPond SDK" distribution, if would fit there
quite well, but I'm just not sure about the standard, user-oriented,
distribution.
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly
File input/regression/event-listener-output.ly (right):
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly#newcode17
input/regression/event-listener-output.ly:17: st =
Is it really necessary to use a function for text spanners? (In which
case you should seriously adding that to music-functions.ly) Oh, and you
might as well want to make it postfix:
http://git.savannah.gnu.org/cgit/opus-libre.git/tree/doc/snippets/postfix-text-spanners.ly#n12
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly#newcode40
input/regression/event-listener-output.ly:40: d16(\downbow cis b a) g4
\breathe e8\p( g) fis4
I'd \upbow here (a matter of taste? :)
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly#newcode45
input/regression/event-listener-output.ly:45: b4\p\<( d8 cis) d4(-.
fis8-.^"II" e-.^"II")
Similarly: how about ais and eis instead of a and e?
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly#newcode56
input/regression/event-listener-output.ly:56: a16\mp e' a e' a,,32\f e'
a e' r8 r4
Any slurs missing here?
http://codereview.appspot.com/4373046/diff/1/input/regression/event-listener-output.ly#newcode69
input/regression/event-listener-output.ly:69: << \vlnone >>
Is this considered good/sugar-ish syntax?
http://codereview.appspot.com/4373046/diff/1/ly/event-listener.ly
File ly/event-listener.ly (right):
http://codereview.appspot.com/4373046/diff/1/ly/event-listener.ly#newcode40
ly/event-listener.ly:40: 2 )
What about .ily extensions? I'd use a regexp here, much simpler and more
flexible.
http://codereview.appspot.com/4373046/diff/1/ly/event-listener.ly#newcode87
ly/event-listener.ly:87: (+ 60 (ly:pitch-semitones pitch))
Do you want to hardcode that?
http://codereview.appspot.com/4373046/diff/1/ly/event-listener.ly#newcode137
ly/event-listener.ly:137: (close p)))
This looks like a lot of duplicated code. Perhaps a generic function
could be achievable:
(format-from-engraver engraver event 'text)
or even as a list:
(format-list-from-engraver engraver event
(list
'breathe
'articulation-type
'text
...
)))
in which case it could be more elegant to then cons the "formatter" to
the "listeners" list.
http://codereview.appspot.com/4373046/
- Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/07
- Re: Event listener to extract (some) music events. (issue4373046),
v . villenave <=
- Re: Event listener to extract (some) music events. (issue4373046), mtsolo, 2011/04/07
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/07
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/11
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/15
- Re: Event listener to extract (some) music events. (issue4373046), hanwenn, 2011/04/17
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/18
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/18
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/19