lilypond-user
[Top][All Lists]
Advanced

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

Re: scheme function help


From: David Kastrup
Subject: Re: scheme function help
Date: Mon, 06 May 2013 11:36:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stjepan Horvat <address@hidden> writes:

> I'm trying to figure out how and learn to create a function based on a
> \displayMusic function.
> for example:
> \displayMusic { \mark "A" c'4 }
> gives me
> (make-music
> 'SequentialMusic
> 'elements
> (list (make-music (quote MarkEvent) (quote label) "A")
> (make-music
> 'NoteEvent
> 'duration
> (ly:make-duration 2 0 1)
> 'pitch
> (ly:make-pitch 0 0 0))))
>
> so what i have gotten so far is that there is new (make-music (quote
> MarkEvent) (quote label) "A") or (make-music 'MarkEvent 'label "A") in
> front of c'
> and i don't know how to put this line into it. I understand that i
> have to use cons on 'elements to put the line in front of c.
> Is there a way to figure out what "elements" do i have to use in my
> function to work.
> I'm going through
> http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Music-properties#Music-
> properties to get an idea of how to get into it

You are still using version 2.12?  Seriously?

> but #
> (display-scheme-music (first (ly:music-property someNote 'elements)))

You are not giving us any context to work with.

> doesn't work. I get an error saying:
> Wrong type argument in position 1 (expecting Music): #<Pitch c' > with
> someNote = c'.
> Help would be appreciated.

My first guess is that you are using a newer version of LilyPond than
2.12 and that things have changed in the mean time.  Try consulting the
documentation corresponding to your version.

-- 
David Kastrup




reply via email to

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