[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Auto-panner
From: |
Jan-Peter Voigt |
Subject: |
Re: Auto-panner |
Date: |
Mon, 27 Jan 2014 15:02:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Hi Vaughan,
if global is a music-function calling autopan, it will evaluate it
everytime. If global is a variable, its value is set, once it is assigned.
So if you have to wrap it in music-function. If you always have a
variable "global" containing all you need, you can wrap that in a function:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
music = { c'' }
global = { \time 4/4 }
% another name than "global"!
meta =
#(define-music-function (parser location)()
#{
\autopan \global
#})
\new Staff <<
\meta
\music
>>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
"global" is only a function, if it is declared one. Otherwise it is just
a variable.
BTW, nice autopan utility ;)
HTH, Jan-Peter
Am 27.01.2014 13:54, schrieb Vaughan McAlley:
> Because I’m lazy, I’d love to include the \autopan command in \global,
> but it looks like when \global is evaluated, the function is evaluated
> and its return value is permanently made part of \global, which means
> everything is panned to the far left. Is there a way to make the
> function run every time \global appears?
- Auto-panner, Vaughan McAlley, 2014/01/27
- Re: Auto-panner,
Jan-Peter Voigt <=
- Re: Auto-panner, David Kastrup, 2014/01/27
- Re: Auto-panner, Jan-Peter Voigt, 2014/01/27
- Re: Auto-panner, David Kastrup, 2014/01/27
- Re: Auto-panner, Jan-Peter Voigt, 2014/01/27
- Re: Auto-panner, David Kastrup, 2014/01/27
- Re: Auto-panner, Jan-Peter Voigt, 2014/01/27
- Re: Auto-panner, Vaughan McAlley, 2014/01/27