lilypond-devel
[Top][All Lists]
Advanced

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

Re: Artificial harmonics with sounding pitch in parenthesis


From: Trevor Daniels
Subject: Re: Artificial harmonics with sounding pitch in parenthesis
Date: Tue, 13 Jan 2009 09:29:17 -0000

Carl

Before I saw this email from you I had tucked away
the note from -user to include it in the Scheme
tutorial in the Learning Manual.  This is where it
and other trivial uses of Scheme belong, I think.
Then, with a few of these easier examples behind
them, users will be able to tackle the harder bits
in the NR.  That is exactly what the LM is for.

Trevor

Carl D. Sorensen" <address@hidden>
To: "Trevor Daniels" <address@hidden>; "Graham Percival" <address@hidden>; "lily-devel" <address@hidden>
Sent: Tuesday, January 13, 2009 12:19 AM
Subject: FW: Artificial harmonics with sounding pitch in parenthesis


Graham and Trevor,

This mail below, from -user, shows why I think NR 5 and NR 6 should be
combined into one chapter, something like Extending LilyPond.

This music function is trivial, and will show up frequently once people
start making tweaks.  Any special tweak involving a music function can use
this profitably.  And anybody, even a total scheme novice, can write this
kind of function.

But because it's tucked away in NR6 "Interfaces for Programmers
(HARD!!!!!)", people never see it.

IMO, it's lots more gentle to just put it all in one chapter, and let the
reader decide what tasks are more challenging than he/she wants to
undertake.

Just some food for thought,

Carl

------ Forwarded Message
From: Tom Hall <address@hidden>
Date: Mon, 12 Jan 2009 15:21:04 -0700
To: <address@hidden>
Conversation: Artificial harmonics with sounding pitch in parenthesis
Subject: Re: Artificial harmonics with sounding pitch in parenthesis

Carl D. Sorensen <c_sorensen <at> byu.edu> writes:

Yes, this is a job for scheme, because parenthesize is a music function, and
it needs to have music following it.  That's why you can't move it into an
identifier.

The custosNote example in Section 6.1.2 of the Notation Reference should
give you the pattern you need to use to define a music function
harmonicParenthesize (or hP for short, if you desire).

thanks Carl, with some prodding I've now written my first lily scheme
function
as below, seems to work fine, was surprised that I could just plonk in
\parenthesize as below.


harmonicPitch = #(define-music-function (parser location note)
                                    (ly:music?)
 #{
   \once \override Voice.Stem #'stencil = ##f
       \once \override Voice.NoteHead #'font-size = #-4
       \parenthesize
       $note
 #})

If you can't figure it out, ask a question or two.

HTH,

Yes indeed!

Tom


Carl









------ End of Forwarded Message






reply via email to

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