title: Lilypond: how to add the number of repetitions above a bar
body: <p>I am working with a score in Lilypond that has a lot of repetitions, where basically every bar has to be repeated a certain number of times. I would like to be able to write above every bar the number of times it should be repeat, similar to the score below (which was not created in Lilypond):</p>
  
  <p><img src="https://i.stack.imgur.com/GLzuk.jpg" alt="enter image description here"></p>
  
  <p>It would be great to be able to have some brackets above the bar and also to have the "3x" centralized, just like in the example above. So far, the only (temporary) solution I was able to come up with in Lilypond was to add repeat bars and then simply write "3x" above the first note of every bar (since I could not have it centralized on the bar either). It does not look very good, but gets the job done. This temporary solution looks like this:</p>
  
  <p><img src="https://i.stack.imgur.com/jcCh2.jpg" alt="enter image description here"></p>
  
  <p>Any suggestions of how to make this example look more similar to the first inn Lilypond would be extremely welcome!</p>