%% DO NOT EDIT this file manually; it was automatically
%% generated from the LilyPond Snippet Repository
%% (http://lsr.di.unimi.it).
%%
%% Make any changes in the LSR itself, or in
%% `Documentation/snippets/new/`, then run
%% `scripts/auxiliar/makelsr.pl`.
%%
%% This file is in the public domain.

\version "2.23.13"

\header {
  lsrtags = "pitches, real-music, really-cool, scheme-language"

  texidoc = "
In music that contains many occurrences of the same sequence of notes
at different pitches, the following music function may prove
useful.  It takes a note, of which only the pitch is used.

This example creates the rhythm used throughout @emph{Mars}, from
Gustav Holst's @emph{The Planets}.
"

  doctitle = "Creating a sequence of notes on various pitches"
} % begin verbatim


rhythm =
#(define-music-function (p) (ly:pitch?)
   "Make the rhythm in Mars (the Planets) at the given pitch"
  #{ \tuplet 3/2 { $p 8 8 8 } 4 4 8 8 4 #})

\new Staff {
  \time 5/4
  \rhythm c'
  \rhythm c''
  \rhythm g
}
