lilypond-user
[Top][All Lists]
Advanced

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

Re: Making two functions into one


From: | || | |
Subject: Re: Making two functions into one
Date: Mon, 16 Jan 2023 22:00:23 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

Thank you Valentin,

That was simpler than I thought. Of curse I tried first with lily code blocks, but have been struggling with

 \time #number/8 (which doesn't work because it needs pair but gets int).

Would you like to short explain difference between usage of $ and # or point me to place when I can understand it?

There is some kind of coding convention? Both # and $ seems to work the same.

Cheers!

W dniu 16.01.2023 o 15:32, Valentin Petzel pisze:
Hello,

not sure about that one, but this seems to work:

\version "2.24.0"

nd =  #(define-music-function (number) (integer?)
          #{
            #(time (cons number 8))
            s8 * $number
          #})

\score {
    \new Staff {

      \nd 8
      \nd 7
}
}

Cheers,
Valentin



reply via email to

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