Jump to content

Consecutive tremolos: Difference between revisions

From LilyPond wiki
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
m New category
 
(One intermediate revision by the same user not shown)
Line 40: Line 40:
[[Category:Scheme]]
[[Category:Scheme]]
[[Category:Tweaks and overrides]]
[[Category:Tweaks and overrides]]
[[Category:Snippet]]

Latest revision as of 23:12, 21 November 2025

Typing music for many consecutive tremolos with the same base duration becomes tedious. This is a function to make this easier.

By default LilyPond does not unfold tremolo repeats for midi. A function for unfolding only tremolo repeats is also included.

\version "2.24"

music = \relative c' {
  c4:16 d2: e4:
  f1:  
  g8: f: e: d: d2:
}

musicMidi = \relative c' {
  \repeat tremolo 4 c16 
  \repeat tremolo 8 d
  \repeat tremolo 4 e
  \repeat tremolo 16 f
  \repeat tremolo 2 { g f e d }
  \repeat tremolo 8 d
}

\score {
  \new Staff { 
    \music 
    %\musicMidi
  }
}

\score {
  \new Staff \relative c' {
    \unfoldRepeats
%% Tremolos entered with `:[number]` are not are reflected in the MIDI output:
  % \music 
   \musicMidi
  }
  \midi { }
}