lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scheme attempt gives 'unknown escape string' error - any hints appreciat


From: Morten Jagd Christensen
Subject: Scheme attempt gives 'unknown escape string' error - any hints appreciated
Date: Sat, 14 Jan 2012 18:42:13 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0

Hi all

Im writing a small sceme function to be able to create examples of guitar fingerings
for various scales.

basically i create a music function "fretsc" to be called for example as

\fretsc "(6 1) (6 3) (5 0)"    to indicate the position and sequence of notes in a scale.

However I get an "unknown escape string" for \fret while compiling.

Anyone have an idea what Im doing wrong?

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"

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
                                 )
      }
    }
#})

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)"



... and here are the errors:
Processing `/Users/mjc/Desktop/all music/noder/snippets/fret.ly'
Parsing...
<string>:2:0: error: syntax error, unexpected \markup

\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'

        \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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]