[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Looking inside markup
From: |
Peter Chubb |
Subject: |
Re: Looking inside markup |
Date: |
Tue, 29 Apr 2008 09:43:53 +1000 |
User-agent: |
Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 MULE XEmacs/21.4 (patch 21) (Educational Television) (i486-linux-gnu) |
>>>>> "Peter" == Peter Chubb <address@hidden> writes:
Peter> On my quest for better MIDI, I'm trying to deal with
Peter> alterations on a turn. How do I look `inside' a markup
Peter> sequence?
Peter> What I've tried is:
Peter> (let* ((t (ly:music-property e 'text)))
Peter> (cond
Peter> ((equal? t (markup #:line (#:flat)))
Peter> (set! alteration -1/2))
Peter> ((equal? t (markup #:line (#:sharp)))
Peter> (set! alteration 1/2))))
Peter> but this never matches.
Turns out that the scheme function (markup ...) always adds an
extra #:line so what I should try to match against is (markup #:flat)
Then it works.
--
Dr Peter Chubb http://www.gelato.unsw.edu.au peterc AT gelato.unsw.edu.au
http://www.ertos.nicta.com.au ERTOS within National ICT Australia