lilypond-user
[Top][All Lists]
Advanced

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

Re: Generating music expressions from within \applyContext?


From: H. S. Teoh
Subject: Re: Generating music expressions from within \applyContext?
Date: Thu, 28 Jul 2016 09:52:23 -0700
User-agent: Mutt/1.6.0 (2016-04-01)

On Wed, Jul 27, 2016 at 09:47:53AM +0300, Heikki Tauriainen wrote:
[...]
> I also gave up on my attempts to try and understand how to make use of
> \applyContext back then, after I found the crude workaround of making
> use of additional global variables to access the dynamic equalizer
> function, and the maximum and minimum expression levels from within
> the music function.  (I think the inspiration for this came from the
> implementation of the \articulate function, which uses a number of
> such variables for controlling the behavior of the function - by
> changing the values of the variables between \articulate invocations,
> the function can be made to work differently between invocations
> without the need to specify extra function arguments.)

Wow.  Thanks so much for the code!  I'll definitely take a look at it
once I finish my current project (which is at too advanced of a stage to
introducing a whole new way of writing things at this point).  The idea
of using global variables ala articulate.ly did occur to me, but I never
thought to pursue the idea.


> At the risk making a fool out of myself by letting the Scheme experts
> tear this example code to shreds, I'll attach the workaround code
> (which I've tried to clean up a bit from my local stuff without much
> testing, it could contain bugs) here.
[...]

Haha, I'm pretty sure my own Scheme code is just as atrocious, if not
more, but the important thing is that it does what it's supposed to. :-)


T

-- 
If it tastes good, it's probably bad for you.



reply via email to

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