Dear community,
I don't like to write lots of rests by hand into bars with only very few
notes.
Using the wonderful script extractMusic of Gilles, which I found at
http://gillesth.free.fr/Lilypond/extractMusic/extractMusic.ly I've defined
functions that fill up automatically a 3/4 or 4/4 bar with rests.
Off course I could easily define more functions for the most common
timesignatures, but I would like to define a function, with which one can
chose.
I'm dreaming of something like:
\makerests 4/4 c8
Has someone an idea to implement this into Lilypond? I think it should be
possible with if-then constructions, but I don't know how to do it in
scheme.
Here are my short definitions:

\version "2.16.0"
\include"rhythmen.ly" % there is my definition of replaceMusic included
restthreequarters = { r64 r r32 r16 r8 r4 r4  }
resttfourquarters = { r64 r64 r32 r16 r8 r4 r2 }

someofthreequarters = #(define-music-function (parser location x)
(ly:music?)
  #{
    \replaceMusic  \restthreequarters s1*0 $x
#})

someoffourquarters =  #(define-music-function (parser location x)
(ly:music?)
  #{
     \replaceMusic  \resttfourquarters s1*0 $x
#})


%% shortcurts
#(define stq someofthreequarters)
#(define sfq someoffourquarters)

\new Staff \relative c' {
  \time 4/4
  \sfq c32
  \time 3/4
  \stq c16-.
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to