Matt Wallis <m...@heligon.net> writes: > But it doesn't work if I try to set the midiPanPosition inside a midi > context block like this: > > \version "2.19.83" > > \include "english.ly" > sopStaff = \new Staff = "sop" { > \relative c' { e4 f g a } > } > altoStaff = \new Staff = "alto" { > \relative c' { c4 d e f } > } > \score { > << > \sopStaff > \altoStaff > >> > \midi { > \context Staff = "sop" { > \set Staff.midiPanPosition = #1.0 > \set Staff.midiBalance = #1.0 > } > \context Staff = "alto" { > \set Staff.midiPanPosition = #-1.0 > \set Staff.midiBalance = #-1.0 > } > } > }
This is terrible. Really, really terrible. \context Staff = "xxx" should never be allowed in an output block since setting name-specific context defs is not supported and does not make sense, either. I'll see whether I can stop the parser from accepting this abomination. > > Furthermore, the result of doing this is that both staffs are played > through the left, and nothing on the right. > > Am I doing something wrong? As a rule, changing syntax until something passes the parser instead of working from documented syntax and examples is a bad idea. Most of the time, you'll trigger error messages pinpointing the problem. But sometimes there are oversights. > 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. Then create different variables/expressions for that purpose. But the \midi block cannot sensibly differentiate between differently named contexts. -- David Kastrup