lilypond-user
[Top][All Lists]
Advanced

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

midiPanPosition in midi context block


From: Matt Wallis
Subject: midiPanPosition in midi context block
Date: Fri, 8 Nov 2019 09:10:59 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

I've been experimenting with midiPanPosition: http://lilypond.org/doc/v2.19/Documentation/notation/context-properties-for-midi-effects

I find the following works:

\version "2.19.83"

\include "english.ly"
sopStaff = \new Staff = "sop" {
  \set Staff.midiPanPosition = #-1.0
  \relative c' { e4 f g a }
}
altoStaff = \new Staff = "alto" {
  \set Staff.midiPanPosition = #1.0
  \relative c' { c4 d e f }
}
\score {
  <<
    \sopStaff
    \altoStaff
  >>
  \midi {  }
}

... with a wav built like this:

$ lilypond midiPanPosition.ly
$ fluidsynth -O s32 -F midiPanPosition.wav /opt/local/share/sounds/sf2/GeneralUser_GS_v1.471.sf2 midiPanPosition.mid

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
    }
  }
}

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?

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



reply via email to

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