Re: [frogs] Converting string-number-event into an integer |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: Marc Hohl <marc@xxxxxxxxxx>, "frogs@xxxxxxxxxxx" <frogs@xxxxxxxxxxx>
- Subject: Re: [frogs] Converting string-number-event into an integer
- From: Carl Sorensen <c_sorensen@xxxxxxx>
- Date: Fri, 5 Mar 2010 17:00:19 -0700
- Accept-language: en-US
- Acceptlanguage: en-US
- Thread-index: Acq8QlbKSOh+ybG/ScC4T5FdmnLsUwAfatmp
- Thread-topic: [frogs] Converting string-number-event into an integer
On 3/5/10 2:00 AM, "Marc Hohl" <marc@xxxxxxxxxx> wrote:
> Hello all,
>
> after reading through quite a lot of files in lily/,
> I have still no idea how to obtain the digit from a
> string-number-event for further use as an integer.
>
> For example, if I have
> c4\4
> I want the "4" to be an integer variable in C++.
>
> My code is similar to the routine in tab-note-heads-engraver.cc,
> and I want to get the content of the vector string_events
> (which is stored in line 116) converted to integers.
I can't try this out right now, because my LilyPond is broken, thanks to
some MacPorts intrigue with dynamic link libraries :(, but it should work to
do something very similar to
string_events[i]->get_property("string-number")
If you look in the Internals Reference under 1.3 Music properties, you'll
see that string-number is the number of the string in a StringNumberEvent.
HTH,
Carl
---
----
Join the Frogs!