Morten Jagd Christensen <morte...@jcaps.com> writes: > However I get an "unknown escape string" for \fret while compiling. > > Anyone have an idea what Im doing wrong?
How about reading the error messages? > Here is the example code if you comment out the last line you can see > the kind of fret diagram I am > working on. > > \version "2.14.0" Is that the version you are using? > > fretsc = #(define-music-function (parser location s1 ) > (string?) > #{ > \markup{\override #'(fret-diagram-details . ( > (finger-code . in-dot) > (number-type . arabic) > (label-dir . -1) > (orientation . landscape) > (dot-radius . 0.5) > (fret-count . 5) > (top-fret-thickness . 5) > (barre-type . straight) > (xo-padding . 0.3) )) { > \fret-diagram-verbose #'( > $s1 > ) > } > } > #}) A sequential music expression (which is what is in #{ ... #} in version 2.14.0) can't be a markup. Now in the current development version, #{ \markup ... #} will indeed work fine, but of course, it returns a markup, and a music function still can't return a markup. Either way, this does not fit. > ddd = \markup{\override #'(fret-diagram-details . ( > (finger-code . in-dot) > (number-type . arabic) > (label-dir . -1) > (orientation . landscape) > (dot-radius . 0.5) > (fret-count . 5) > (top-fret-thickness . 5) > (barre-type . straight) > (xo-padding . 0.3) )) { > \fret-diagram-verbose #'( > (place-fret 5 3 1) > (place-fret 4 5 2) > (place-fret 3 5 3) > (place-fret 2 5 4) > (place-fret 1 3 5) > (place-fret 1 4 6) > ) > } > } > > \score { > \new Staff {\relative c' { a'^\ddd b c d }} > } > \fretsc "(6 3 1) (5 3 2)" I have no idea what you are expecting here. > ... and here are the errors: > Processing `/Users/mjc/Desktop/all music/noder/snippets/fret.ly' > Parsing... > <string>:2:0: error: syntax error, unexpected \markup Well, this is the \markup in an unexpected place. It tries skipping it... > \markup{\override #(quote (fret-diagram-details (finger-code . in-dot) > (number-type . arabic) (label-dir . -1) (orientation . landscape) > (dot-radius . 0.5) (fret-count . 5) (top-fret-thickness . 5) > (barre-type . straight) (xo-padding . 0.3))) { > <string>:3:8: error: unknown escaped string: `\fret' And tries looking for music again. It arrives at \fret-diagram-verbose and since in music, escaped strings don't contain -, it stops after \fret. Which it does not find convincing. > \fret-diagram-verbose #(quote (lilyvartmpbg)) > /Users/mjc/Desktop/all music/noder/snippets/fret.ly:47:0: error: > errors found, ignoring music expression > > \fretsc "(6 3 1) (5 3 2)" > success: Compilation successfully completed By the way: can you switch off the HTML mail you are generating in addition to the normal mail? It is useless baggage. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user