Re: Suppressing a voice in the midi output

2023-09-27 Thread Sandro Santilli
Karsten, a new answer to your question arrived 5 years later,
thanks to Stephen. I thought it would be useful to share back
in the mailing list :)

Ref:
https://lists.gnu.org/archive/html/lilypond-user/2019-12/msg00276.html

On Sun, Sep 24, 2023 at 03:16:59PM -0700, Stephen Riddle wrote:
> Hi Sandro
> 
> I'm not a member of the news list where you posted this (five years ago)
> 
> but this is what I would have answered,
> 
> I have found  either all on or all off midi settings kind of awkward myself.
> 
> Use the \with command when you start a new voice or staff or chordNames or
> whatever: chordProgression = \chordmode { c1:sus2  \(  c1 c1:sus2 c1 \) }
> 
>  \new ChordNames \with { \remove "Staff_performer"  }{ \chordProgression }
>  \new Staff \with {  \remove "Staff_performer" } { \chordProgression }
> \new Staff { c'4 d' e' c'' b' c'' b' e'' d'' c'' d'' c''1 }
> 
> which shuts down midi output for a single context.
> 
> 
> Stephen



Re: Suppressing a voice in the midi output

2019-12-20 Thread Sandro Santilli
On Fri, Dec 20, 2019 at 10:41:26AM +0100, Sandro Santilli wrote:
> On Sun, Dec 15, 2019 at 12:56:22PM +0100, Karsten Reincke wrote:
> > Dear friends;
> > 
> > In the LilyPOnd tutorial I found the explanation how to assign each a voice 
> > a
> > separate midi channel = instrument 
> > 
> > http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files
> > 
> > Unfortunately, I have to prevent one / some voice(s) from being ingrated 
> > into the
> > midi file (because it only contains meta information which shall not be 
> > played).
> > 
> > Does anyone know how I can say that voice X shall not be converted into the 
> > midi
> > file? Or does any know how I could assign this voice 'a silent instrument'?
> 
> Would setting volume to zero be ok for your use case ? If so, try
> something like the following:
> 
> \new Staff \with {
>   midiInstrument = "muted trumpet"
>   midiMinimumVolume = #0.0
>   midiMaximumVolume = #0.0
> } {
>   \new Voice = "vocal" { \melody }
> }

Or simply create a different "book" for the midi, and only include
the voices you want... I often do this also because I want to
\unfoldRepeats and maybe add a \tripletFeel and most significantly
because I'm using transposed instruments which then need to be
transposed for the sake of MIDI output but not for reading...

--strk;



Re: Suppressing a voice in the midi output

2019-12-20 Thread Sandro Santilli
On Sun, Dec 15, 2019 at 12:56:22PM +0100, Karsten Reincke wrote:
> Dear friends;
> 
> In the LilyPOnd tutorial I found the explanation how to assign each a voice a
> separate midi channel = instrument 
> 
> http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files
> 
> Unfortunately, I have to prevent one / some voice(s) from being ingrated into 
> the
> midi file (because it only contains meta information which shall not be 
> played).
> 
> Does anyone know how I can say that voice X shall not be converted into the 
> midi
> file? Or does any know how I could assign this voice 'a silent instrument'?

Would setting volume to zero be ok for your use case ? If so, try
something like the following:

\new Staff \with {
  midiInstrument = "muted trumpet"
  midiMinimumVolume = #0.0
  midiMaximumVolume = #0.0
} {
  \new Voice = "vocal" { \melody }
}

--strk;



Re: Suppressing a voice in the midi output

2019-12-15 Thread Karsten Reincke


... Sorry, directly after having posted my question I had an idea:

a) I've 'exported' each voice into a single variable.
b) I've created a score section containing all voices which shall be visible. 
This
score contains the layout infos, but no midi infos.
c) i've added another score section containing only the voices which shall be
audible. This score contains the midi infos, but no layout infos.

works.

thanks to all of you who would have answered ;-)

best regards Karsten

On Sun, 2019-12-15 at 12:56 +0100, Karsten Reincke wrote:
> Dear friends;
> 
> In the LilyPOnd tutorial I found the explanation how to assign each a voice a
> separate midi channel = instrument 
> 
> http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files
> 
> Unfortunately, I have to prevent one / some voice(s) from being ingrated into
> the
> midi file (because it only contains meta information which shall not be 
> played).
> 
> Does anyone know how I can say that voice X shall not be converted into the 
> midi
> file? Or does any know how I could assign this voice 'a silent instrument'?
> 
> Many thanks for your help
> Karsten
> 
-- 
  Karsten Reincke/\/\   (+49|0) 170 / 927 78 57
 Im Braungeröll 31   >oo<  mailto:k.rein...@fodina.de
60431 Frankfurt a.M.  \/http://www.fodina.de/kr/





Suppressing a voice in the midi output

2019-12-15 Thread Karsten Reincke
Dear friends;

In the LilyPOnd tutorial I found the explanation how to assign each a voice a
separate midi channel = instrument 

http://lilypond.org/doc/v2.18/Documentation/notation/creating-midi-files

Unfortunately, I have to prevent one / some voice(s) from being ingrated into 
the
midi file (because it only contains meta information which shall not be played).

Does anyone know how I can say that voice X shall not be converted into the midi
file? Or does any know how I could assign this voice 'a silent instrument'?

Many thanks for your help
Karsten

-- 
  Karsten Reincke/\/\   (+49|0) 170 / 927 78 57
 Im Braungeröll 31   >oo<  mailto:k.rein...@fodina.de
60431 Frankfurt a.M.  \/http://www.fodina.de/kr/