[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extending event-listener.ly
From: |
Phil Hézaine |
Subject: |
Re: extending event-listener.ly |
Date: |
Wed, 27 Mar 2013 18:35:44 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 |
Le 27/03/2013 00:04, Graham Percival a écrit :
On Tue, Mar 26, 2013 at 08:12:42PM +0100, Phil Hézaine wrote:
for NoteEvent:
#(define (format-note engraver event)
(let* ((origin (ly:input-file-line-char-column
(ly:event-property event 'origin))))
(print-line engraver
"note"
;; get a MIDI pitch value.
;(+ 60 (ly:pitch-semitones
(ly:event-property event 'drum-type) ;))
It would be nice if this was abstracted into a separate function:
(get-pitch-or-drum
which would pick which type of output to produce. Then I think we
could accept a patch to this effect without much fuss.
;; point and click info
;(ly:format "point-and-click ~a ~a"
; (caddr origin)
; (cadr origin))
I'm quite curious about this -- do drum events not have
point-and-click info?
- Graham
Hi,
Because it's MY OWN & PERSONAL & SELFISH LISTENER! :-) :-) :-)
Seriously, I join a modified event-listener.
I have pointed out the additions.
However no success about MIDI pitch values.
It will be awesome to have that.
Cheers.
@ Luis
i must be missing something, though, because i get output only if use
\drummode inside a regular Staff or a RhythmicStaff, but no output when
using a DrumStaff. any ideas why? the output of \displayMusic is the same
in all cases.
In MY OWN & PERSONAL...etc... I have added a context for a DrumVoice
which was absent.
That's the tip.
I join zzzz-display.ly. I hope it helps you to play with the
event-listener.
Phil.
i'm also getting a series of warnings (4) of the form:
Unsupported SCM value for format: ()
perhaps i misunderstood how to insert your code in the event-listener.ly
file?
Cheers.
zzzz-event-listener.ly
Description: Text Data
zzzz-display.ly
Description: Text Data
- Re: extending event-listener.ly, (continued)
- Re: extending event-listener.ly, Graham Percival, 2013/03/27
- Re: extending event-listener.ly, luis jure, 2013/03/28
- Re: extending event-listener.ly, Janek Warchoł, 2013/03/28
- Re: extending event-listener.ly, Phil Hézaine, 2013/03/28
- Re: extending event-listener.ly, Janek Warchoł, 2013/03/28
- Re: extending event-listener.ly, Phil Hézaine, 2013/03/28
- Re: extending event-listener.ly, luis jure, 2013/03/28
- Re: extending event-listener.ly, Phil Hézaine, 2013/03/28
- Re: extending event-listener.ly, Phil Hézaine, 2013/03/29
- Re: extending event-listener.ly, Graham Percival, 2013/03/29
- Re: extending event-listener.ly,
Phil Hézaine <=
- Re: extending event-listener.ly, luis jure, 2013/03/27
- Re: extending event-listener.ly, luis jure, 2013/03/26