lilypond-user
[Top][All Lists]
Advanced

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

Music function with \scaleDurations


From: Evan O'Dorney
Subject: Music function with \scaleDurations
Date: Fri, 5 Aug 2016 10:39:19 -0700

Hi everyone,

I'm working on a piece that includes cross-rhythms with 6/8 sounding against 2/4, with the bar lengths constant. I'm trying to compress my code with a music function like this:

\include "english.ly"

inTwoFour = 
#(define-music-function
     (parser location mus)
     (ly:music?)
  #{
    \set Staff.timeSignatureFraction = 2/4
    \scaleDurations 3/2 { $mus }
    \revert Staff.timeSignatureFraction
  #})
  
\relative g' {
  \time 6/8 g2. \inTwoFour { af2 } g2.
}

However, GUILE gives an error at "$mus". What's wrong?

reply via email to

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