Definition of make-music

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Definition of make-music

Charles Winston
Could someone tell me where the make-music function is defined? I’m trying to understand the internals, and since make-music is used so frequently to create music expressions I want to concretely understand what it does. Also, any helpful explanation of what the function does would be great, too.

Charles
_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Definition of make-music

Carl Sorensen-3
On 5/30/17 12:18 PM, "lilypond-devel on behalf of Charles Winston"
<lilypond-devel-bounces+c_sorensen=[hidden email] on behalf of
[hidden email]> wrote:

>Could someone tell me where the make-music function is defined? I¹m
>trying to understand the internals, and since make-music is used so
>frequently to create music expressions I want to concretely understand
>what it does. Also, any helpful explanation of what the function does
>would be great, too.

I believe that you can find the definition of make-music in the file
scm/define-music-types.scm, line 778  The docstring tells what it does.

I found this file by using git grep.  By the name, I knew it couldn't be
C++ code, because C++ functions can't have a - character in them.  So I
did

$cd scm/
$git grep make-music

then searched through the output until I found one entry with "define" in
it.  I guess I could have made it easier by instead doing

$cd scm/
$git grep make-music | grep define

I'm telling you this because git grep is your friend; you will want to
learn to use this tool well when trying to work your way through the
LilyPond source code.

HTH,

Carl



_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Definition of make-music

Charles Winston

> On May 30, 2017, at 2:41 PM, Carl Sorensen <[hidden email]> wrote:
>
> On 5/30/17 12:18 PM, "lilypond-devel on behalf of Charles Winston"
> <lilypond-devel-bounces+c_sorensen=[hidden email] on behalf of
> [hidden email]> wrote:
>
>> Could someone tell me where the make-music function is defined? I¹m
>> trying to understand the internals, and since make-music is used so
>> frequently to create music expressions I want to concretely understand
>> what it does. Also, any helpful explanation of what the function does
>> would be great, too.
>
> I believe that you can find the definition of make-music in the file
> scm/define-music-types.scm, line 778  The docstring tells what it does.
>
> I found this file by using git grep.  By the name, I knew it couldn't be
> C++ code, because C++ functions can't have a - character in them.  So I
> did
>
> $cd scm/
> $git grep make-music
>
> then searched through the output until I found one entry with "define" in
> it.  I guess I could have made it easier by instead doing
>
> $cd scm/
> $git grep make-music | grep define

Yes, the “grep define” part is what I needed to make it clearer. I used git grep but couldn’t seem to find any entry with “define” after searching for a while. Thanks!

>
> I'm telling you this because git grep is your friend; you will want to
> learn to use this tool well when trying to work your way through the
> LilyPond source code.
>
> HTH,
>
> Carl
>
>


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Definition of make-music

David Kastrup
In reply to this post by Carl Sorensen-3
Carl Sorensen <[hidden email]> writes:

> On 5/30/17 12:18 PM, "lilypond-devel on behalf of Charles Winston"
> <lilypond-devel-bounces+c_sorensen=[hidden email] on behalf of
> [hidden email]> wrote:
>
>>Could someone tell me where the make-music function is defined? I¹m
>>trying to understand the internals, and since make-music is used so
>>frequently to create music expressions I want to concretely understand
>>what it does. Also, any helpful explanation of what the function does
>>would be great, too.
>
> I believe that you can find the definition of make-music in the file
> scm/define-music-types.scm, line 778  The docstring tells what it does.
>
> I found this file by using git grep.  By the name, I knew it couldn't be
> C++ code, because C++ functions can't have a - character in them.

ly:grob-property is defined in lily/grob-scheme.cc so I am not sure what
you are thinking about here.

> I'm telling you this because git grep is your friend; you will want to
> learn to use this tool well when trying to work your way through the
> LilyPond source code.

Little question about that.

--
David Kastrup

_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel
Reply | Threaded
Open this post in threaded view
|

Re: Definition of make-music

Carl Sorensen-3
On 5/30/17 12:49 PM, "David Kastrup" <[hidden email]> wrote:

>Carl Sorensen <[hidden email]> writes:
>
>>
>> I found this file by using git grep.  By the name, I knew it couldn't be
>> C++ code, because C++ functions can't have a - character in them.
>
>ly:grob-property is defined in lily/grob-scheme.cc so I am not sure what
>you are thinking about here.

As far as I know, every scheme function that is defined in C++ code has a
name starting with ly:.  And the C++ names have underscores to replace the
colon and the hyphen. The name containing the colon and the hyphen are a
string in the C++ code.

My rule for searching may not be 100% correct, but it generally works for
me.  If it were to fail, I would expand my search.  But I can't recall
having had it fail for me in the past.

Carl


_______________________________________________
lilypond-devel mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/lilypond-devel