lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macro/multiply notes


From: Thomas Morley
Subject: Re: Macro/multiply notes
Date: Fri, 13 Jun 2014 18:49:11 +0200

2014-06-13 17:42 GMT+02:00 Hlolli <address@hidden>:
> Is is possible to do smoething like this:
>
> {c'8 d' e' d'}*4 -> c'8 d' e' d' | c'8 d' e' d' | c'8 d' e' d' | c'8 d' e'
> d' ?
>
> Just to save space I was hoping that repetitive musical patterns could be
> repeted with multiplication/asterix sign?
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/Macro-multiply-notes-tp163291.html
> Sent from the User mailing list archive at Nabble.com.
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Afaik, closest you can do is:

\version "2.18.0"

"*" =
#(define-scheme-function (parser location number)(number?)
  (define-music-function (parser location music)(ly:music?)
    #{ \repeat unfold $number $music #}))

"*4" = \"*" 4
"*3" = \"*" 3
"*2" = \"*" 2

{ \"*3" { \"*4" { c'8 d' e' d' \"*2" g'4 \bar "||" } \bar "S" } }

Cheers,
  Harm



reply via email to

[Prev in Thread] Current Thread [Next in Thread]