[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to evaluate 'articulations entries?
From: |
Marc Hohl |
Subject: |
Re: How to evaluate 'articulations entries? |
Date: |
Thu, 01 Sep 2011 10:02:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110805 Thunderbird/3.1.12 |
Am 30.08.2011 08:23, schrieb Marc Hohl:
Am 29.08.2011 18:52, schrieb Reinhold Kainhofer:
Am Montag, 29. August 2011, 18:07:17 schrieb Marc Hohl:
Hello list,
I think I have asked a similar question long time ago, but I didn't
find the answer.
Currently, I am working on a little scheme engraver which should
read the
'string-number, if given, and should do some calculations, depending on
other articulations, like 'HarmonicEvent.
The articulations are a list, so you have to filter them to get the
actual
string numbers.
Example attached,
Reinhold
Thank you, Neil, David and Reinhold, for your hints and examples!
Work like a charm!
Umm, well, not quite yet.
I noticed that
a)
I can detect string numbers within < ... > only, so
< c\3 > is recognized, d\4 not, but I need to cover *both* cases.
So I looked at the output of \displayMusic { c\4 }:
(make-music
'SequentialMusic
'elements
(list (make-music
'EventChord
'elements
(list (make-music
'NoteEvent
'duration
(ly:make-duration 2 0 1 1)
'pitch
(ly:make-pitch -1 0 0))
(make-music
'StringNumberEvent
'string-number
4)))))
Ok, so \4 isn't an articulation (which is obvious, but I had overlooked it).
AFAIK, the string-number won't be accessible in this case, so I tried to
acknowledge the string-number-interface, too.
For sake of simplicity, I staggered two for-each loops and am now able
to detect
string-numbers with this approach (note: the displayed information is
partly wrong
due to the loop construct), but still I can't access the first two notes
which aren't
surrounded by <...>. What am I doing wrong?
b)
Even in the first approach sent by Reinhold, the information about the
note heads is displayed *twice* for each note head - why?
Regards,
Marc
Regards,
Marc
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user
string-number2.ly
Description: Text Data
- Re: How to evaluate 'articulations entries?,
Marc Hohl <=