[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: |
percival . music . ca |
Subject: |
Re: Event listener to extract (some) music events. (issue4373046) |
Date: |
Sat, 23 Apr 2011 16:47:14 +0000 |
On 2011/04/22 18:25:19, Neil Puttock wrote:
On 18 April 2011 15:30, <mailto:address@hidden> wrote:
> On 2011/04/18 14:09:52, hanwenn wrote:
>> In that case, it would probably be cleaner to
>> hook into the event listener framework directly, without having an
>> engraver in between. The Scheme engraver mechanism is really
for
>> creating formatted output rather than siphoning off data.
>
> I have no clue how to do this? Is this simple to do with a .ly
file? I
> definitely don't want to mess with C++ code or SCM files.
You don't have to do that; there are exported functions which provide
all the hooks.
http://lists.gnu.org/archive/html/lilypond-user/2010-02/msg00688.html
Sorry, I'm still lost. Is the idea that I add stuff like this at the
top level?
#(ly:add-listener
(ly:make-listener
format-note)
(ly:context-events-below
(ly:make-global-context $defaultlayout))
'note-event)
I definitely don't want to create a music function, since that would
require manually editing lots of files -- it's much easier just to
cat "\include \"event-listener.ly\"" file-1234.ly >> tempfile.ly
rather than making some regex to add a music function call to the \score
section of each file.
Unless there's some fantastic advantage that I'm missing (I doubt that
there would be a big speed difference, and even if there was, speed
isn't a primary concern), I think that modifying the Voice context is
clearer from a "writing easily understandable code" perspective.
Advanced users are already familiar with adding tweaks to a \layout
\context, after all.
http://codereview.appspot.com/4373046/
- Re: Event listener to extract (some) music events. (issue4373046), (continued)
- 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
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/19
- Re: Event listener to extract (some) music events. (issue4373046), n . puttock, 2011/04/22
- Re: Event listener to extract (some) music events. (issue4373046), percival . music . ca, 2011/04/23
- Re: Event listener to extract (some) music events. (issue4373046),
percival . music . ca <=