11

I need to engrave a choir piece, where some voices have unpitched parts, like whispered, spoken or screamed words. I want to engrave this using cross-headed notes, like in the following piece of music:

\version "2.18.2"

myMusic = {
  \relative c' {
    c4 d e f |
    \override NoteHead.style =#'cross 
    f4 f f f |
    \revert NoteHead.style
    g a b c |
  }
}

\score {
  \myMusic
  \midi {}
}
\score {
  \myMusic
  \layout {}
}

As it is annoying to have these parts in the MIDI file with a pitch, I would like the MIDI generator to either ignore them, i.e. replace the notes by corresponding rests, or replace by something unpitched. However, they shall be printed correctly (that's why I have two \score blocks).

Is there a way to achieve this? Thanks!

8

This can be achieved by using tags (see the documentation), for example as follows:

\version "2.18.2"

myMusic = {
  \relative c' {
    c4 d e f | 
    \tag #'printonly { 
      \override NoteHead.style = #'cross
      f4 f f f |
      \revert NoteHead.style
    }
    \tag #'midionly {
      r4 r r r |
    }
    g a b c |
  }
}

\score {
  \removeWithTag #'printonly
  \myMusic
  \midi {}
}

\score {
  \removeWithTag #'midionly
  \myMusic
  \layout {}
}
| improve this answer | |
3

If you want something that makes a percussion type sound in the MIDI file, and is clear to the readers;

Use a Drum Staff in an Ossia:

\version "2.18.2"

myMusic = \new Staff = "main" {
  \relative c' {
    c4 d e f |

    <<
        R1

        \new DrumStaff \with {
                \override StaffSymbol.line-count = #0
                \override BarLine.bar-extent = #'(-1.5 . 1.5) 
                \remove "Time_signature_engraver"
                alignAboveContext = #"main"
                %\magnifyStaff #2/3
                %firstClef = ##f
            } { 
            \drummode {
                hh4 hh4 hh4 hh4 | 
            }
        }
    >>

    g4 a b c |
  }
}

\score {
  \myMusic
  \midi {}
}

\score {
  \myMusic
  \layout {}
}

drum staff in an ossia

| improve this answer | |
  • As an amateur singer, I would find this definitely less clear that crossed heads in the staff. It would lead to many time-consuming discussions. – Édouard Jan 27 at 12:17
1

If you want no sound for the unpitched notes, you can put the pitched notes in one Voice context and the unpitched notes in another Voice context, muting this last one.

\version "2.18.2"

myMusic = {
    \relative c' {
        c4 d e f |
        s1 |
        g4 a b c |
    }
}

myMusicUnpitched = {
    \relative c' {
        \override NoteHead.style =#'cross 
        s1 |
        f4 f f f |
        s1 |
    }
}

\score {
    \new Staff { <<
        \new Voice { \myMusic }
        \new Voice { \set midiMaximumVolume = #0 \myMusicUnpitched }
    >> }
    \layout {}
    \midi {
        \context { \Staff \remove "Staff_performer" }
        \context { \Voice \consists "Staff_performer" }
    }
}

Sources:
http://lsr.di.unimi.it/LSR/Item?id=438
http://lilypond.org/doc/v2.18/Documentation/notation/controlling-midi-dynamics#overall-midi-volume

By the way, I didn't get what's the point of using two \score {} blocks.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.