[prev in list] [next in list] [prev in thread] [next in thread]
List: lilypond-user
Subject: Slashed beamed grace notes: error of Context type
From: Karim Barkati <karimbarkati () gmail ! com>
Date: 2011-05-30 16:36:51
Message-ID: 840F5F9B-9A99-4A1B-9A64-39CF9A1FF4D9 () gmail ! com
[Download RAW message or body]
Hello,
An exerpt of code that I would need compiles when isolated in a small file but does \
not compile when inserted in the whole piece, giving the following "expecting \
Context" error message:
> > %lilypond %args "/Users/karimbarkati/Projets/TEP/Partition/LaColereDuSoleil.ly"
> Traitement de « /Users/karimbarkati/Projets/TEP/Partition/LaColereDuSoleil.ly »
> Analyse...
> Interprétation en cours de la \
> musique.../Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/music-functions.scm:730:21: \
> In procedure ly:context-property in expression (ly:context-property where (quote \
> graceSettings)): /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/music-functions.scm:730:21: \
> Wrong type argument in position 1 (expecting Context): () Durée totale du \
> traitement : 1 secondes
The code is attached hereafter: do someone have an idea of what's wrong?
Cheers,
- Karim
> %LSR contributed by Valentin as per request \
> http://code.google.com/p/lilypond/issues/detail?id=1333
> \version "2.12.3"
>
> slashGroup = {
> #(remove-grace-property 'Voice 'Stem 'direction)
> \once \override Stem #'stencil =
> #(lambda (grob)
> (let* ((x-parent (ly:grob-parent grob X))
> (is-rest? (ly:grob? (ly:grob-object x-parent 'rest))))
> (if is-rest?
> empty-stencil
> (let* ((dir (ly:grob-property grob 'direction))
> (stem (ly:stem::print grob))
> (stem-y (ly:grob-extent grob grob Y))
> (stem-length (- (cdr stem-y) (car stem-y))))
> (ly:stencil-add
> stem
> (grob-interpret-markup grob
> (markup #:translate (cons -1 (* dir (1- (/ stem-length 2))))
> #:draw-line (cons 2 (* dir 2))))
> )))))
> }
>
> \new Staff \relative c' {
> \clef alto
> \grace {
> \slashGroup < fis!-2 c,_0 >8_-\sfz^\markup{pizz. sempre} [ d8-0_- \> cis8_- e8_- \
> b8_- \! ] } ais4_-\pp\laissezVibrer
> }
[Attachment #3 (unknown)]
<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
-webkit-line-break: after-white-space; ">Hello,<div><br></div><div>An exerpt of code \
that I would need compiles when isolated in a small file but does not compile when \
inserted in the whole piece, giving the following "expecting Context" error \
message:</div><div><br></div><div><div></div><blockquote type="cite"><div>> \
%lilypond %args "/Users/karimbarkati/Projets/TEP/Partition/LaColereDuSoleil.ly"</div><div>Traitement \
de « /Users/karimbarkati/Projets/TEP/Partition/LaColereDuSoleil.ly \
»</div><div>Analyse...</div><div>Interprétation en cours de la \
musique.../Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/music-functions.scm:730:21: \
In procedure ly:context-property in expression (ly:context-property where (quote \
graceSettings)):</div><div>/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/music-functions.scm:730:21: \
<b>Wrong type argument in position 1 (expecting Context): ()</b></div><div>Durée \
totale du traitement : 1 secondes</div></blockquote></div><div><br></div><div>The \
code is attached hereafter: do someone have an idea of what's \
wrong?</div><div><br></div><div>Cheers,</div><div><br></div><div>- \
Karim</div><div><br></div><div><br></div><div><br></div><div><div></div><blockquote \
type="cite"><div>%LSR contributed by Valentin as per request <a \
href="http://code.google.com/p/lilypond/issues/detail?id=1333">http://code.google.com/p/lilypond/issues/detail?id=1333</a></div><div><br></div><div>\version \
"2.12.3"</div><div><br></div><div>slashGroup = \
{</div><div> #(remove-grace-property 'Voice 'Stem \
'direction)</div><div> \once \override Stem #'stencil \
=</div><div> #(lambda (grob)</div><div> (let* ((x-parent \
(ly:grob-parent grob X))</div><div> (is-rest? \
(ly:grob? (ly:grob-object x-parent 'rest))))</div><div> (if \
is-rest?</div><div> empty-stencil</div><div> \
(let* ((dir (ly:grob-property grob 'direction))</div><div> \
(stem (ly:stem::print \
grob))</div><div> (stem-y \
(ly:grob-extent grob grob Y))</div><div> \
(stem-length (- (cdr stem-y) (car stem-y))))</div><div> \
(ly:stencil-add</div><div> \
stem</div><div> (grob-interpret-markup \
grob</div><div> (markup #:translate (cons -1 (* dir \
(1- (/ stem-length 2))))</div><div> \
#:draw-line (cons 2 (* dir 2))))</div><div> \
)))))</div><div>}</div><div><br></div><div>\new Staff \relative c' \
{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>\clef \
alto</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>\grace \
{</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>\slashGroup \
< fis!-2 c,_0 >8_-\sfz^\markup{pizz. sempre} [ d8-0_- \> cis8_- e8_- b8_- \! \
] }</div><div><span class="Apple-tab-span" \
style="white-space:pre"> </span>ais4_-\pp\laissezVibrer</div><div>}</div></blockquote></div></body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic