From: Matt Wallis <[email protected]>
> To: LilyPond User <[email protected]>
> Cc:
> Bcc:
> Date: Fri, 8 Nov 2019 09:10:59 +0000
> Subject: midiPanPosition in midi context block
>
...

>
> I want to do the setting in the midi context block because I require
> different pan positions for a staff depending on which score it appears in.
>
> ---
> Matt Wallis
>
Here is another approach

\version "2.19.80"
\include "english.ly"


createStaff =
#(define-music-function
    (STAFFNAME PAN MUSIC)
    (markup? number? ly:music?)
    #{
        \new Staff = "#STAFFNAME" {
            \set Staff.midiPanPosition = #PAN
            #MUSIC
        }
    #}
)

\score {
    <<
        \createStaff "sop" #1.0 \sopNotes
        \createStaff "alto" #-1.0 \altoNotes
    >>
    \midi {}
}

\score {
    <<
        \createStaff "sop" #0.5 \sopNotes
        \createStaff "alto" #-0.5 \altoNotes
    >>
    \midi {}
}


HTH,

Elaine Alt
415 . 341 .4954                                           "Confusion is
highly underrated"
[email protected] ~ Composer ~ Instrumentalist ~ Educator
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to