Re: scheme function for transposition

2009-06-01 Thread Gilles THIBAULT
Is the above code something flexible enough that it could work with the first of those being something other than c? (e.g., \transpose f g \notes) Just change (ly:make-pitch -1 0 0) () by (ly:make-pitch -1 3 0) () ( 0 = c, 1 = d, etc ...) If you do want 2 parameters, proceed as f

Re: scheme function for transposition

2009-06-01 Thread Josiah Boothby
> The only solution i know is to use the scheme equivalent of \transpose : >    ly:music-transpose > But it is a bit harder... > > > > firstNotes = \relative c' { c4 d e f } > > first = #(define-music-function (parser location trans)(ly:music?) > (let* ( >   (trans-note (ca

Re: scheme function for transposition

2009-06-01 Thread Gilles THIBAULT
\transpose c $trans { \firstNotes } :2:17: error: syntax error, unexpected MUSIC_IDENTIFIER, expecting NOTENAME_PITCH or TONICNAME_PITCH The only solution i know is to use the scheme equivalent of \transpose : ly:music-transpose But it is a bit harder... firs

Re: scheme function for transposition

2009-06-01 Thread Marc Hohl
Josiah Boothby schrieb: I think you have to declare two variables: #(define-music-function (parser location trans notes) (ly:music? ly:music?) #{ \transpose c $trans { $notes } #}) Sorry, I forgot to answer to the list, but as my proposal doesn't work anyway, it doesn't matter. The p

Re: scheme function for transposition

2009-06-01 Thread Josiah Boothby
> I think you have to declare two variables: > #(define-music-function (parser location trans notes) (ly:music? ly:music?) > #{ >  \transpose c $trans { $notes } > #}) The problem appears to be that \transpose is expecting a notename, not a variable, so this has the same problem, and doubled. Tha

scheme function for transposition

2009-05-31 Thread Josiah Boothby
I'm confused trying to use scheme to create a function. I've tried several things, but the current function (dysfunction?) and application looks something like this: % code snippet \version "2.12.2" firstNotes = \relative c' { c4 d e f } first = #(define-music-function (parser location trans)