lilypond-devel
[Top][All Lists]
Advanced

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

Re: Scheme in LilyPond


From: Jan-Peter Voigt
Subject: Re: Scheme in LilyPond
Date: Thu, 1 Jun 2017 17:29:18 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1

Hi Charles,

the make-note-ev function is hidden inside a closure and therefore not publicly visible. It depends on the duration defined in that closure. To create NoteEvents you should create them like this:

(make-music 'NoteEvent 'pitch root 'duration some-duration)

where 'some-duration' is defined with a duration: (ly:make-duration 2) for a quarter note.

The begin-define-sequence implies using 'let':

#(let ((root (ly:make-pitch 0 0 0))
       (dur (ly:make-duration 2)))
   (display (make-music 'NoteEvent 'pitch root 'duration dur)))

If there is a duration reachable in the scope you are acting, then you can use that one like you found in the mentioned file and probably copy the definition of make-note-ev.

HTH
Jan-Peter

Am 01.06.2017 um 17:03 schrieb Charles Winston:
Hi,

I’m fooling around with using Scheme in lilypond files, making some way on my 
GSoC chords project. I’m trying to call the make-note-ev procedure found in 
scm/chord-entry.scm on line 196. I’ve written something simple:

#(begin
        (define root (ly:make-pitch 0 0 0))
        (display (make-note-ev root))
)

And I get an error saying that make-note-ev is an unbound variable. I thought 
that we could call Scheme procedures from the source in lilypond files. What am 
I missing here?

Thanks,
Charles
_______________________________________________
lilypond-devel mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-devel





reply via email to

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