[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    rewriting function that takes music expression into two enclosing \...Begin and \...End commands
From:       Janek_WarchoĊ‚ <janek.lilypond () gmail ! com>
Date:       2014-08-27 19:19:28
Message-ID: CANYDDpoEPH7HYK7Gdh_6wtkKxf842raUXeh8FOVQ0MCVnyvpyg () mail ! gmail ! com
[Download RAW message or body]

Hi,

i have something like this:

divided =
#(define-music-function (parser location music)
   (ly:music?)
   #{
     \voiceOne
     \new Voice { \voiceTwo #music }
     \oneVoice
   #})

musI = \relative f' {
  g b a b
  c b a b
}

musII = \relative f' {
  e4 g f g
  \divided {
    f2 f
  }
}

\score {
  \new Staff \new Voice <<
    \musI
    \musII
  >>
}

What i would like to do is to split \divided function into two
commands \dividedBegin and \dividedEnd, so that the same result would
be produced with an interface like this:

musII = \relative f' {
  e4 g f g
  \dividedBegin
  f2 f
  \dividedEnd
}

(musI and \score block remain the same)

Is this doable at all?  I don't have any good idea on how to do
something like this...

Why i want this?  With current code, i must respect expression nesting
(i.e. everything inside \divided has to be in one expression).  I'd
like to be able to write something like this:

musIIpartI = \relative f' {
  e4 g f g
  \dividedBegin
  f2
}
musIIpartII = \relative f' {
  f2
  \dividedEnd
}
musII = { \musIIpartI \musIIpartII }

best,
Janek

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic