[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: relative music inside music functions explodes when used twice
From: |
Paul Morris |
Subject: |
Re: relative music inside music functions explodes when used twice |
Date: |
Sat, 11 Oct 2014 11:41:19 -0700 (PDT) |
Janek Warchoł wrote
> The problem is that when used with relative mode, the output gets crazy:
Hi Janek, you just need to use $m1 instead of #m1 in your function.
http://lilypond.org/doc/v2.18/Documentation/extending/scheme-function-definitions
HTH,
-Paul
\version "2.18.2"
voiceDivisi =
#(define-music-function (parser location m1 m2) (ly:music? ly:music?)
#{
\tag divI \context Voice = "divI" { $m1 }
\tag divII \context Voice = "divII" { $m2 }
\tag together \context Voice = "both" << $m1 $m2 >>
#})
% The problem is that when used with relative mode, the output gets crazy:
music = \relative c' {
\voiceDivisi {
c4 d e f
}
{
e4 f g a
}
}
\new Staff \keepWithTag divI \music
\new Staff \keepWithTag divII \music
\new Staff \keepWithTag together \music
--
View this message in context:
http://lilypond.1069038.n5.nabble.com/relative-music-inside-music-functions-explodes-when-used-twice-tp167420p167422.html
Sent from the User mailing list archive at Nabble.com.