lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How parser stores Music objects in memory?


From: David Kastrup
Subject: Re: How parser stores Music objects in memory?
Date: Sun, 13 Jan 2013 13:42:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> "Joao E. Pereira Jr" <address@hidden> writes:
>
>> On Sun, Jan 13, 2013 at 9:35 AM, David Kastrup <address@hidden> wrote:
>>> "Joao E. Pereira Jr" <address@hidden> writes:
>>>
>>>> Many of the tokens parser reads ask for Music object creation so it
>>>> calls MY_MUSIC_SYNTAX macro, as this object represents music content
>>>> and layout even a one note ly file can lead to a considerable number
>>>> of Music objects, so I deduce it plays an importante role in
>>>> architecture. A lot of Music objects are created, but is not clear how
>>>> they are stored in memory, or which data structure is used to handle
>>>> them.
>>>
>>> They are of type ly:music?, check out lily/include/music.hh for their
>>> structure.
>>>
>>
>> Suppose I have the following ly code { c d e }, I think that in
>> parsing 3 objects of ly:music? type will be produced and I'm wondering
>> where this 3 objects would be put into: an array, a vector, a list?
>
> A list, stored in the 'elements property of another Music structure of
> type SequentialMusic.

Perhaps you should make yourself acquainted with the \displayMusic
command.  It should better help you understanding the structure of given
input.  I think that the "Extending LilyPond" guide should contain quite
a bit of material about the form of music expressions.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]