Re: [frogs] Converting string-number-event into an integer

[ Thread Index | Date Index | More lilynet.net/frogs Archives ]




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!


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/