2015-05-14 13:44 GMT+02:00 Peter Gentry <[email protected]>: > I am trying to write an include file that will modify a music object > dependent on the specified instrument. > > I am trying to write a function that will call the current music object and > a user supplied argument string/number with the object of modifying the > music object depending on the supplied number/string. > > I can get this to work if the two arguments are ( ly:music? color?) but not > if they are (ly:music? number?) or (ly:music? string?) > > The function call in an include file aimed to get a music object and a user > number is > > callmyfunction = > #(define-music-function (parser location m n) (ly:music? number?) > (anotherfunction m n)) > > This is a fragment of the include file > > In the lilypond file > ... > \callmyfunction #2
Looks like you call 'callmyfunction' with a number as first argument, but ly:music? is expected. > ....etc > > The define-music-function does not accept a number or string my puzzle is > how do I get the music object and the user argument into my include > function. Any pointers gratefully recieved.... > > I think I am missing something crucial about define-music-function music-functions _do_ accept strings or numbers, something else must be wrong. Can't say more without compilable code, though. Cheers, Harm _______________________________________________ lilypond-user mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-user
