Re: Scheme function question

2013-11-22 Thread David Kastrup
David Kastrup d...@gnu.org writes: James Worlton jworl...@gmail.com writes: I expect it to just output a scale with a double-stemmed g. [slightly fixed code quoted] \version 2.17.95 doubleStem = #(define-music-function (parser location note) (ly:music?) #{ { \voiceOne

Re: Scheme function question

2013-11-22 Thread James Worlton
On Fri, Nov 22, 2013 at 6:58 AM, David Kastrup d...@gnu.org wrote: See issue 3673. If that makes it in, you can do doubleStem = #(define-music-function (parser location note) (ly:music?) (make-relative (note) note #{ { \voiceOne $note } \new Voice { \voiceTwo $note }

Re: Scheme function question

2013-11-22 Thread David Kastrup
James Worlton jworl...@gmail.com writes: On Fri, Nov 22, 2013 at 6:58 AM, David Kastrup d...@gnu.org wrote: See issue 3673. If that makes it in, you can do doubleStem = #(define-music-function (parser location note) (ly:music?) (make-relative (note) note #{ { \voiceOne

Re: Scheme function question

2013-11-22 Thread Thomas Morley
2013/11/22 David Kastrup d...@gnu.org: #(defmacro-public make-relative (variables reference music) The list of pitch or music variables in @var{variables} is used as a sequence for creating relativable music from @var{music}. When the constructed music is used outside of @code{\\relative},

Re: Scheme function question

2013-11-22 Thread David Kastrup
Thomas Morley thomasmorle...@gmail.com writes: 2013/11/22 David Kastrup d...@gnu.org: #(defmacro-public make-relative (variables reference music) The list of pitch or music variables in @var{variables} is used as [...] in contrast, does not make sense. ;; pitch and music generator

Re: Scheme function question

2013-11-21 Thread James Worlton
On Thu, Nov 21, 2013 at 10:05 AM, David Kastrup d...@gnu.org wrote: \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

Re: Scheme function question

2013-11-21 Thread Janek WarchoĊ‚
2013/11/21 Gilberto Agostinho gilbertohasn...@gmail.com: David Kastrup wrote As a rule, don't use a music argument twice without copying in the same expression. \music copies music, just like $music does. #music is very Scheme-like: it does not change anything. Often, that's what you want.

Re: Scheme function question

2013-11-21 Thread David Kastrup
James Worlton jworl...@gmail.com writes: That is starting to make sense, after reading it a few times :) I've replaced #note with $note in both cases in the function and it works properly. Thanks! I need to go back and re-read the part about the difference between # and $ in Scheme

Re: Scheme function question

2013-11-21 Thread David Kastrup
James Worlton jworl...@gmail.com writes: 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

Re: Scheme function question

2013-11-21 Thread Gilberto Agostinho
and $variable inside a function covered in LilyPond's reference? I can't find it there, and I'd love to understand this better. Thanks and take care, Gilberto -- View this message in context: http://lilypond.1069038.n5.nabble.com/Scheme-function-question-tp154227p154239.html Sent from the User mailing

Scheme function question

2013-11-21 Thread James Worlton
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 =

Re: Scheme function question

2013-11-21 Thread Gilberto Agostinho
Thanks a lot, Janek! I will read the whole thing tonight. Take care, Gilberto -- View this message in context: http://lilypond.1069038.n5.nabble.com/Scheme-function-question-tp154227p154242.html Sent from the User mailing list archive at Nabble.com