Re: Auto-panner

2014-01-27 Thread Vaughan McAlley
On 28 January 2014 07:07, Jan-Peter Voigt wrote: > On 27.01.2014 20:51, David Kastrup wrote: > >> What about a closure? > > Won't be able to distinguish being called another time from the same > > output (\layout, \midi, \musicxml (this one's hypothetical yet), > > \addQuote...) or the next one.

Re: Auto-panner

2014-01-27 Thread Jan-Peter Voigt
On 27.01.2014 20:51, David Kastrup wrote: >> What about a closure? > Won't be able to distinguish being called another time from the same > output (\layout, \midi, \musicxml (this one's hypothetical yet), > \addQuote...) or the next one. of course not ... I see Vaughans idea as a first draft ... an

Re: Auto-panner

2014-01-27 Thread David Kastrup
Jan-Peter Voigt writes: > On 27.01.2014 16:54, David Kastrup wrote: >>> autopan = >>> > #(define-scheme-function (parser location)() >> Why define-scheme-function when returning music? > Perhaps this function had another meaning in the first place? > I overlooked this, when injecting my ApplyCont

Re: Auto-panner

2014-01-27 Thread Jan-Peter Voigt
On 27.01.2014 16:54, David Kastrup wrote: >> autopan = >> > #(define-scheme-function (parser location)() > Why define-scheme-function when returning music? Perhaps this function had another meaning in the first place? I overlooked this, when injecting my ApplyContext lines. >> >(begin >> >

Re: Auto-panner

2014-01-27 Thread David Kastrup
Jan-Peter Voigt writes: > Thanks, David. > @Vaughan > For a short test ... this compiles, but I can't listen to the resulting > pan in midi > \version "2.18.0" > > %%% > %{ &

Re: Auto-panner

2014-01-27 Thread Jan-Peter Voigt
need, you can wrap that in a function: > I'd recommend putting this into an \applyContext call. That way, you > get a call for each use in a different context. > \version "2.18.0" %%%%%%% %{ Aut

Re: Auto-panner

2014-01-27 Thread David Kastrup
Jan-Peter Voigt writes: > 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

Re: Auto-panner

2014-01-27 Thread Jan-Peter Voigt
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: %

Auto-panner

2014-01-27 Thread Vaughan McAlley
I was so excited by \set Score.midiPanPosition that I was inspired to write a function in Scheme that spreads the voices evenly from left to right. It can’t look ahead to find the number of voices or staves, that needs to be specified at the start or before a new \score definition: \version "2.18.