2015-01-28 17:55 GMT+01:00 and...@andis59.se <and...@andis59.se>:
> On 2015-01-28 17:39, Pierre Perol-Schneider wrote:
>>
>> Hi Anders,
>> Please send a full tiny example.
>> Cheers,
>> Pierre
>>
>> 2015-01-28 15:06 GMT+01:00 and...@andis59.se <mailto:and...@andis59.se>
>> <and...@andis59.se <mailto:and...@andis59.se>>:
>>
>>     In my current document I', using some functions, that I have created
>>     "myself" (a lot of help from the list) and I get an error
>>     C:/Users/ame/Documents/__Lilipond/PSG/firsttest.ly:5:6: error: not a
>>     rhythmic event
>>     <e\6
>>           \pedA a\5 \pedF cis'\4 >2  e'4\4
>>
>>     C:/Users/ame/Documents/__Lilipond/PSG/firsttest.ly:5
>>     <http://firsttest.ly:5>:__16: error: not a rhythmic event
>>     <e\6 \pedA a\5
>>                     \pedF cis'\4 >2  e'4\4
>>
>
> I have to resend the files. I sent the wrong versions...
> Sorry!
>
> // Anders



Not sure, whether it's the wanted output, though, how about:

pedalAction =
#(define-music-function (parser location pedal mus)(string? ly:music?)
   (music-map
    (lambda (m)
      (let ((strgnr '()))
        (if (music-is-of-type? m 'note-event)
            (begin
             (for-each
              (lambda (e)
                (if (music-is-of-type? e 'string-number-event)
                    (begin
                     ;(display (ly:music-property e 'string-number))
                     (set! strgnr (ly:music-property e 'string-number))
                     e)
                    e))
              (ly:music-property m 'articulations))
             ; else
              ;(logme "pedal" pedal)
              ;(logme "copedent" copedent)
              (set! tmp (assoc-get pedal copedent))
              ;(logme "tmp" tmp)
              (set! p (assoc-get strgnr tmp))
              ;(logme "p" p)
              (if (pair? p )
                  (begin
                    (set! transFrom (cdr p))
                    (set! transTo (car p))
                    (ly:music-set-property! m 'articulations
                      (cons
                       #{
                         \rightHandFinger
                           \markup\normal-text\bold\fontsize #0 $pedal
                       #}
                       (ly:music-property m 'articulations)))
                    #{
                      \tag myStaff $m
                      \tag myTab  \transpose $transFrom $transTo $m
                    #})
                  m)
           m) ;; <===
            m)))
    mus))


Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to