lilypond-user
[Top][All Lists]
Advanced

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

Re: fret-diagrams.scm:657:42: Wrong type: #f


From: Thomas Morley
Subject: Re: fret-diagrams.scm:657:42: Wrong type: #f
Date: Thu, 20 Aug 2015 22:07:30 +0200

2015-08-19 22:06 GMT+02:00 Thomas Morley <address@hidden>:
> 2015-08-19 17:53 GMT+02:00 ClausRogge <address@hidden>:
>> I have two nearly identical pairs of code files, one calling the other. One
>> of them works, the other one gives me the strange error quoted.
>> Layout file one:
>>
>> %%%%%%%
>>
>> \version "2.18.2"
>>
>> \paper {#(set-default-paper-size "a4")
>> indent = 0
>> top-margin = 0\cm
>> left-margin = 1\cm
>> right-margin = 1\cm
>> bottom-margin = 1\cm
>> between-system-space = 28\mm
>> ragged-last-bottom=##f
>> ragged-right=##f
>> }
>> \include "DiagG.ly"
>>
>> \book{
>> \bookpart {
>> \header {title = "   "
>> subtitle = "   "
>> subsubtitle = "   "
>> composer = ""}
>>
>> \score {
>> {\override Staff.Clef.color = #white
>> \override Staff.TimeSignature.color = #white
>> \clef "G_8"
>> \key c \major
>> \time 4/4
>> \DiagG}
>> }
>> }%bookpart ends
>> }
>>
>> %%%%Data file one:
>>
>> DiagG = {
>>
>> \omit Score.BarNumber
>> \override TextScript.fret-diagram-details.dot-color = #'white
>> \override TextScript.fret-diagram-details.orientation = #'landscape
>> \stopStaff s2 s_\markup {\bold "G dur"}^\markup{{\fret-diagram
>> #"s:6;h:5;6-2;6-3;6-5;5-2;5-3;5-5;4-2;4-4;4-5;3-2;3-4;3-5;2-3;2-5;1-2;1-3;1-5;"}}
>>
>> \break
>>
>> \override TextScript.fret-diagram-details.dot-color = #'black
>> \override TextScript.fret-diagram-details.orientation = #'standard
>> s1 s1_\markup {\bold "G"}^\markup{{\fret-diagram #"s:2;h:5;
>> 6-3;5-5;4-5;3-4;2-3;1-3;"}}
>> s1_\markup {\bold "C"}^\markup{{\fret-diagram
>> #"s:2;h:5;6-x;5-3;4-5;3-5;2-5;1-3;"}}
>> s1_\markup {\bold "D"}^\markup{{\fret-diagram
>> #"s:2;h:5;6-x;5-5;4-4;3-2;2-3;1-2;"}}
>>
>> }
>>
>> %%%%%
>>
>> Layout File 2:
>>
>> \version "2.18.2"
>>
>> \paper {#(set-default-paper-size "a4")
>> indent = 0
>> top-margin = 0\cm
>> left-margin = 1\cm
>> right-margin = 1\cm
>> bottom-margin = 1\cm
>> between-system-space = 28\mm
>> ragged-last-bottom=##f
>> ragged-right=##f
>> }
>> \include "DiagD.ly"
>>
>> \book{
>> \bookpart {
>> \header {title = "   "
>> subtitle = "   "
>> subsubtitle = "   "
>> composer = ""}
>>
>> \score {
>> {\override Staff.Clef.color = #white
>> \override Staff.TimeSignature.color = #white
>> \clef "G_8"
>> \key c \major
>> \time 4/4
>> \DiagD}
>> }
>> }%bookpart ends
>> }
>>
>> %%%%%%
>>
>> Data file 2:
>>
>> DiagD = {
>>
>> \omit Score.BarNumber
>> \override TextScript.fret-diagram-details.dot-color = #'white
>> \override TextScript.fret-diagram-details.orientation = #'landscape
>> \stopStaff s2 s_\markup {\bold "D dur"}^\markup{{\fret-diagram #"s:6;h:5;
>> 6-2;6-3;6-5;5-2;5-4;5-5;4-2;4-4;4-5;3-2;3-4;2-2;2-3;2-5;1-2;1-3;1-5;"}}
>>
>> \break
>>
>> \override TextScript.fret-diagram-details.dot-color = #'black
>> \override TextScript.fret-diagram-details.orientation = #'standard
>> s1 s1_\markup {\bold "D"}^\markup{{\fret-diagram #"s:2;h:5;
>> 6-x;5-x;4-4;3-2;2-3;1-x;"}}
>> s1_\markup {\bold "G"}^\markup{{\fret-diagram #"s:2;h:5;
>> 6-x;5-x;4-5;3-4;2-3;1-x;"}}
>> s1_\markup {\bold "A"}^\markup{{\fret-diagram #"s:2;h:5;
>> 6-x;5-x;4-2;3-2;2-2;1-x;"}}
>>
>> }
>>
>> The first pair of files work, the second pair gives me this error message:
>>
>> /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/fret-diagrams.scm:657:42:
>> In procedure - in expression (- string-count (cadr mypair)):
>> /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/fret-diagrams.scm:657:42:
>> Wrong type: #f
>>
>> I don't understand the error message! This is going to be a book for my
>> guitar students so in order to not have to compile the whole book every
>> time, I keep the data in a special file and call it in a little "test"
>> layout file. But as far as I can see, the two pairs are identical except for
>> the variable names.
>>
>> Using LP 2.18.2 on a Mac
>>
>> Help appreciated!
>
>
>
> Well, your code is not a minimal example and it does not compile and
> thus it does not show the error.
> All I can say for now: I suspect your linebreaking of the strings for
> the fret-diagram.
>
> Cheers,
>   Harm

#(write
(string=?
"s:2;h:5;
6-3;5-5;4-5;3-4;2-3;1-3;"
"s:2;h:5;6-3;5-5;4-5;3-4;2-3;1-3;"))

-> #f

#(write
(lset-difference eq?
(string->list "s:2;h:5;
6-3;5-5;4-5;3-4;2-3;1-3;")
(string->list "s:2;h:5;6-3;5-5;4-5;3-4;2-3;1-3;")
)
)

-> (#\newline)


http://lilypond.org/tiny-examples.html
http://www.lilypond.org/doc/v2.19/Documentation/usage/troubleshooting



reply via email to

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