lilypond-user
[Top][All Lists]
Advanced

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

Re: Set midiInstrument to silence


From: Jean Abou Samra
Subject: Re: Set midiInstrument to silence
Date: Thu, 25 Nov 2021 17:54:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1

Le 25/11/2021 à 17:43, Guy Stalnaker a écrit :
If I'm using /set Staff.midiInstrument = "#<inst>", can I also use some descriptor that equals NO sound, for example, "NUL" or something similar like /set Staff.midiInstrument = "#NUL"


This doesn't exist in the MIDI norm, but you can do

\set Staff.midiMaximumVolume = 0

Please refer to
https://lilypond.org/doc/v2.22/Documentation/notation/controlling-midi-dynamics.fr.html#setting-midi-volume

If you want a staff to be silent not on a
particular passage but on the whole score,
you can also \remove the Staff_performer.
This differs from setting midiMaximumVolume
in that it will not output the notes with
volume 0, but stop outputting the notes at all.

\version "2.22.1"

\score {
  <<
    \new Staff \with {
      \remove Staff_performer
    } {
      c'
      d'
    }
    \new Staff { e' f' }
  >>
  \midi { }
  \layout { }
}

Best,
Jean



reply via email to

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