Re: selectively suppressing barlines?

2017-08-30 Thread Graham King
On Wed, 2017-08-30 at 14:22 -0400, Kieren MacMillan wrote:

> Hi Graham,
> 
> > This technique, however, feels really clumsy by Lilypond standards.
> > Have I overlooked a better way?
> 
> Maybe something like
> 
> %%%  SNIPPET BEGINS
> \version "2.19.40"
> 
> \layout {
>   indent = 0
>   ragged-right = ##t
>   \context {
> \Staff
> \RemoveEmptyStaves
>   }
> }
> 
> cantusVoice = {
>   c''1 \break R1 \break
>   c''\breve*1/2 \once \omit Staff.BarLine s1
> }
> 
> altusVoice = {
>   c'1 1 1 1
> }
> 
> \score {
>   \new ChoirStaff <<
> \new Staff { \cantusVoice }
> \new Staff { \altusVoice }
>   >>
> }
> %%%  SNIPPET ENDS

Thanks Kieren,
that's much neater.  Staff.BarLine was the thing I had missed.

And I can use a tag to generate reasonable MIDI output.

kind regards
-- Graham
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: selectively suppressing barlines?

2017-08-30 Thread Kieren MacMillan
Hi Graham,

> This technique, however, feels really clumsy by Lilypond standards.
> Have I overlooked a better way?

Maybe something like

%%%  SNIPPET BEGINS
\version "2.19.40"

\layout {
  indent = 0
  ragged-right = ##t
  \context {
\Staff
\RemoveEmptyStaves
  }
}

cantusVoice = {
  c''1 \break R1 \break
  c''\breve*1/2 \once \omit Staff.BarLine s1
}

altusVoice = {
  c'1 1 1 1
}

\score {
  \new ChoirStaff <<
\new Staff { \cantusVoice }
\new Staff { \altusVoice }
  >>
}
%%%  SNIPPET ENDS

??

Hope this helps,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


selectively suppressing barlines?

2017-08-30 Thread Graham King
In transcribing renaissance polyphony, I like to do three things:

 1. represent the final "longa" of a section with a single note,
rather than a series of notes tied over barlines, while other
parts continue twiddling away;
 2. use \RemoveEmptyStaves to produce a Frenched score; and
 3. display bar numbers on the top (remaining) staff.

I recognise that there are valid objections to combining 1 & 3, but
please indulge me...

The following (almost) MWE, illustrates the default behaviour.  I'd like
to remove the superfluous barline at bar "4" in the upper part (only).
By globally replacing "%{" with "%%{" you can uncomment my usual way of
achieving the objective.

This technique, however, feels really clumsy by Lilypond standards.
Have I overlooked a better way?

\version "2.19.40"

cantusVoice = {
  c''1 \break R1 \break
  %{
  \omit \time 4/2 % invisibly change this to accommodate breve
  %}
  \breve
  \bar "|."
}

altusVoice = {
  %{ % Suppress bar numbers until RemoveEmptyStaffContext 
 % makes them necessary:
  \override Staff.BarNumber.break-visibility = ##(#f #f #f)
  %}
  c'1

  %{ % and show bar numbers again, when the upper line
disappears.
  \temporary \override 
Staff.BarNumber.break-visibility = ##(#f #f #t)
  %}
  1
  %{
  \revert Staff.BarNumber.break-visibility
  %}
  1 1
  \bar "|."
}

\score {
  \new ChoirStaff <<
\new Staff
%{
\with { \consists "Bar_number_engraver" }
%}
{ \cantusVoice }
\new Staff
%{
\with { \consists "Bar_number_engraver" }
%}
{ \altusVoice }
  >>
  \layout {
indent = 0
ragged-right = ##t
\context {
  \Score
  %{
  \remove "Timing_translator"
  \remove "Default_bar_line_engraver"
  %}
}
\context {
  \Staff
  %{
  \consists "Timing_translator"
  \consists "Default_bar_line_engraver"
  %}
  \RemoveEmptyStaves
}
  }
}

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user