lilypond-user
[Top][All Lists]
Advanced

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

Scheme function question


From: James Worlton
Subject: Scheme function question
Date: Thu, 21 Nov 2013 09:45:05 -0600

Hello all,

I'm making my first forays into Scheme by adapting preexisting examples to do what I need.


Question: Why does the following code produce the output as shown in the attached png image? I expect it to just output a scale with a double-stemmed g.

\version "2.17.95"

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

melody = \relative c' {
  c4 d e f
  \doubleStem g a b c
}

\score {
  \new Staff \melody
}

I can work around this by adding \absolute before #note in the function (and remembering to use absolute mode in the input), but it would be nice if the function would produce the correct output. What am I doing wrong?

Thanks,
James Worlton


Attachment: doubleStem.png
Description: PNG image


reply via email to

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