[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: First scheme program: Preprocessing graphical objects...Segmentation
From: |
Tim Woodall |
Subject: |
Re: First scheme program: Preprocessing graphical objects...Segmentation fault |
Date: |
Sat, 20 Jun 2009 15:07:36 +0100 (BST) |
On Sat, 20 Jun 2009, Tim Woodall wrote:
On Sat, 20 Jun 2009, Tim Woodall wrote:
I'm working on my first ever scheme program. Things were going
swimmingly until I made a typo and:
address@hidden:~/cvs/hanon$ lilypond hanon.ly
GNU LilyPond 2.10.33
Processing `hanon.ly'
Parsing...
Interpreting music...
[8][16][24][32][40][48][56][64][72][80][88][96][101]
Preprocessing graphical objects...Segmentation fault
I've tracked down the cause of the crash. This was caused by a
ridiculous number of leger lines. I suspect that the note would not even
fit on the page.
If you just include just the first six bars you get lots of:
programming error: Improbable offset for grob Fingering: -258062.676729
continuing, cross fingers
And the computer swaps wildly while generating the ps.
Ok, now I'm completely stuck.
In the script below, if I make apply-fingering return notes then this
works as I expect. If I make apply-fingering return (append notes
notes) then the notes go in the wrong direction - each note moves down a
seventh instead of up a tone.
If I make it relative c instead of relative c, then it works correctly
(as I expect) whether I return notes or (append notes notes) in
apply-fingering.
What am I doing wrong?
Tim.
\version "2.10.33"
#(ly:set-option 'point-and-click #f)
global = {
\time 2/4
\key c \major
\clef bass s2
}
notesi = {
c8 d e f
}
#(define (apply-fingering notes)
(begin
; (display-scheme-music (append notes notes))
(append notes notes)
; notes
)
)
fingering = #( define-music-function (parser location notes)
(ly:music?)
(make-music
'SequentialMusic
'elements
(begin
; (display-scheme-music (apply-fingering (ly:music-property notes
'elements)))
(apply-fingering (ly:music-property notes 'elements))
)
)
)
lh = \context Staff {
\context Voice = "lh"
\voiceTwo
\relative c,
{
\fingering \notesi
}
}
\score {
\context Staff = "bass" <<
\global
\displayMusic \lh
>>
}
--
God said, "div D = rho, div B = 0, curl E = - @B/@t, curl H = J + @D/@t,"
and there was light.
http://www.woodall.me.uk/