2

I want to disable the bars and make all notes equally spaced (regardless of their duration).

I have tried:

\layout {
  \override Stem.transparent = ##t
  \context {
    \Score
    \override SpacingSpanner.spacing-increment = 1
    \override SpacingSpanner.uniform-stretching = ##t
    \override SpacingSpanner.strict-note-spacing = ##t
  }
}

But still the spacing between notes depends on their duration.

scaramouche
  • 461
  • 2
  • 12

1 Answers1

2

This code below is really clumsy but should produce something similar to what you want:

\version "2.19.82"

\layout {
  \omit Score.Stem
  \omit Score.Beam
  \omit Score.TimeSignature
  \omit Score.BarLine
  \context {
    \Score
    \override SpacingSpanner.spacing-increment = 0.2
    \override SpacingSpanner.uniform-stretching = ##t
    \override SpacingSpanner.strict-note-spacing = ##t
    \override SpacingSpanner.base-shortest-duration = #(ly:make-moment 1/100000000)
  }
}

{
  c'4 d'4 e'2 
  c'8 cis'8 d'4 e'2
  c'4 d'4 ees'2 
  c'8 g'8 a'4 e'2
}

Outputting:

enter image description here

The trick is to make the base-shortest-duration really small and then adjust the spacing-increment accordingly. The smaller the base-shortest-duration, the less noticeable the difference between different durations become. So all you need to do is to use some value of spacing-increment that outputs the note head distance that you want.

gilbertohasnofb
  • 1,984
  • 16
  • 28
  • 1
    By the way, it's far better to use `\omit` instead of changing the `transparent` property or using `\hide`. This is because transparent and hidden graphic objects still occupy space in a score and will be taken into consideration when the positions are decided (so an invisible beam that would collide with an accidental can cause a note to be shifted, for instance). So omitting is the way to go since the object is not created and thus doesn't occupy any space. – gilbertohasnofb Jun 27 '19 at 18:47