Re: Music stream patch
On Mon, 26 Jun 2006 08:34:21 +0200 Erik Sandberg <[EMAIL PROTECTED]> wrote: > .. and the following works fine in both cases: > \featherDurations > #(ly:make-moment 5 4) > { c16 c c c c c c } I've modified the example in the NEWS file to only use 7 notes; everything else compiles cleanly. Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: A bigger and better accidental placement torture test
Bruce McIntyre schreef: You will find that in most usual cases, Lilypond matches this Score utility. Where Lilypond falls behind is in the treatment of crazy-big clusters and in off the staff chords where the accidentals fall halfway on the leger-lines. Werner once posted a better solution to the devel list. I'd say that some of this might make a useful addition to the regression test suite... Not right now. The idea of the regtest is that it shows cases that _are_ handled. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
Erik Sandberg schreef: The attached patch solves this problem: a music class 'post-event is added, which contains events such as GlissandoEvent, that have no duration and that should be attached to notes. That way, there is a way to distinguish between music identifiers and post-event-identifiers. I'm not sure if this is the best solution, but it fixes the bug. I guess this is an academic music representation issue: Do you think that there is a fundamental difference (non-syntactically) between events with postfix syntax, and other events? No, and that's why I oppose to adding 'post-event as a music class. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Music stream patch
Erik Sandberg schreef: Something strange is happening in that code; I don't think it's my fault: If you add another note, it crashes both with and without my patch, and the graphical output when using only 8 notes is incorrect without my patch. More concretely, the following works poorly without my patch and crashes with my patch: \featherDurations #(ly:make-moment 5 4) { c16 c c c c c c c } .. while the following hangs in both cases: There are overflow problems with \featherDurations. It would be a good idea to go to SCM based rationals, which have unlimited precision. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: configure find wrong python path
[EMAIL PROTECTED]: ... > Unfortunately, configure completely bails out then using something like > > $ PYTHON=/usr/local/bin/python2.4 ./configure ... > > The problem is in STEPMAKE_GETVERSION, since it takes the first > line that looks like it contains a version number of the output > from [Path stripped to take the line shorter]: > > $ python2.4 --version 2>&1 || python2.4 -V 2>&1 > > which is > > Unknown option: -- > usage: python2.4 [option] ... [-c cmd | -m mod | file | -] [arg] ... > Try `python -h' for more information. > Python 2.4.3 > > The net result is that, for whatever reason, configure first detects > 2.4.3, but later 2.3.5. > > I think the attached patch fixes this. (Works at least when configuring > on OpenBSD). Seen same problem, your patch fixes this for me also. > Note that the patch contains another quick hack to let the version > check work on OpenBSD and other systems where the shell has 32 bit > integer arithmetic (without it, you'll get too large version numbers > for fontforge, letting configure think that 20060413 is smaller > than the requested version). > > Ciao, > Kili > > ps: do we really still have to use backticks instead of $(...)? > Anyone running LilyPond on old systems with rotten shells? configure is about portability, why not keep the backticks? The same goes for shells with 32bit int arith. > pps: I *only* tested the configure step yet. No idea wether it will > actually build and run. ... It builds and runs ok (using debian v3.1). Regards, /Karl ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
On 6/26/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: Erik Sandberg schreef: > I guess this is an academic music representation issue: Do you think that > there is a fundamental difference (non-syntactically) between events with > postfix syntax, and other events? No, and that's why I oppose to adding 'post-event as a music class. One easy solution for now would be to let identifier_init wrap events in chords when needed. In a future solution, I think it would be sensible to represent all post-events directly as stream events; that would clean up cases such as NoteEvent, where one [stream]event can contain a list of [post]events. BTW: I think there's a small problem with the current identifier syntax: I think the post-event syntax c4\p (which really is a shorthand for c4-\p) is a bit confusing: Assuming that foo contains an event, the expression { c4 \foo d4 } either makes foo happen together with the c or d, depending on whether foo's event is wrapped in an EventChord. Wouldn't it be less confusing if the c4-\p syntax was forced for post-events? Erik ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Music stream patch
On Monday 26 June 2006 10:33, Graham Percival wrote: > On Mon, 26 Jun 2006 08:34:21 +0200 > > Erik Sandberg <[EMAIL PROTECTED]> wrote: > > .. and the following works fine in both cases: > > \featherDurations > > #(ly:make-moment 5 4) > > { c16 c c c c c c } > > I've modified the example in the NEWS file to only use 7 notes; > everything else compiles cleanly. OK. Han-Wen or Jan, may I apply my patch now, if I also reduce the feather example to 7 notes? -- Erik ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
On Monday 26 June 2006 16:49, Erik Sandberg wrote: > On 6/26/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: > > Erik Sandberg schreef: > > > I guess this is an academic music representation issue: Do you think > > > that there is a fundamental difference (non-syntactically) between > > > events with postfix syntax, and other events? > > > > No, and that's why I oppose to adding 'post-event as a music class. > > One easy solution for now would be to let identifier_init wrap events > in chords when needed. In a future solution, I think it would be > sensible to represent all post-events directly as stream events; that > would clean up cases such as NoteEvent, where one [stream]event can > contain a list of [post]events. .. and here's a patch. May I apply? -- Erik Index: lily/parser.yy === RCS file: /sources/lilypond/lilypond/lily/parser.yy,v retrieving revision 1.517 diff -u -r1.517 parser.yy --- lily/parser.yy 13 Jun 2006 22:01:19 - 1.517 +++ lily/parser.yy 26 Jun 2006 16:17:28 - @@ -579,7 +579,16 @@ $$ = $1; } | music { - $$ = $1; + /* Hack: Create event-chord around standalone events. + Prevents the identifier from being interpreted as a post-event. */ + Music *mus = unsmob_music ($1); + bool is_event = mus && + (scm_memq (ly_symbol2scm ("event"), mus->get_property ("types")) +!= SCM_BOOL_F); + if (!is_event) + $$ = $1; + else + $$ = MAKE_SYNTAX ("event-chord", @$, scm_list_1 ($1)); } | post_event { $$ = $1; ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
Erik Sandberg schreef: On Monday 26 June 2006 16:49, Erik Sandberg wrote: On 6/26/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: Erik Sandberg schreef: I guess this is an academic music representation issue: Do you think that there is a fundamental difference (non-syntactically) between events with postfix syntax, and other events? No, and that's why I oppose to adding 'post-event as a music class. One easy solution for now would be to let identifier_init wrap events in chords when needed. In a future solution, I think it would be sensible to represent all post-events directly as stream events; that would clean up cases such as NoteEvent, where one [stream]event can contain a list of [post]events. .. and here's a patch. May I apply? How's the complete picture now? (reg test compiles etc.?) I had rather not see that we discover another syntax body in a broomcloset. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Music stream patch
Erik Sandberg schreef: On Monday 26 June 2006 10:33, Graham Percival wrote: On Mon, 26 Jun 2006 08:34:21 +0200 Erik Sandberg <[EMAIL PROTECTED]> wrote: .. and the following works fine in both cases: \featherDurations #(ly:make-moment 5 4) { c16 c c c c c c } I've modified the example in the NEWS file to only use 7 notes; everything else compiles cleanly. OK. Han-Wen or Jan, may I apply my patch now, if I also reduce the feather example to 7 notes? if this was the last issue, then yes. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: configure find wrong python path
On Mon, Jun 26, 2006 at 12:29:24PM +0200, Karl Hammar wrote: > > ps: do we really still have to use backticks instead of $(...)? > > Anyone running LilyPond on old systems with rotten shells? > > configure is about portability, why not keep the backticks? > The same goes for shells with 32bit int arith. Gotcha ;-) > It builds and runs ok (using debian v3.1). Yep, the build on OpenBSD I started later was fine, too. Ciao, Kili -- Als Katholik muss man halt auch mal auf ein Opfer verzichten können. -- Benedikt Spranger in der lug-bs ml ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: LSR integration with lilypond docs
For a while I've been musing on how to make LSR more visible/useful, and now I have some time to play with it. I also don't think it's Google indexable, at least in the snippets. Is there some way to make it more visible in that respect as well? Geoff ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
On Monday 26 June 2006 18:41, Han-Wen Nienhuys wrote: > > How's the complete picture now? (reg test compiles etc.?) regtest compiles nicely. -- Erik ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: music definition change in 2.9.9 or thereabouts?
Erik Sandberg schreef: On Monday 26 June 2006 18:41, Han-Wen Nienhuys wrote: How's the complete picture now? (reg test compiles etc.?) regtest compiles nicely. ok, please apply. -- Han-Wen Nienhuys - [EMAIL PROTECTED] - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Music stream patch
On Monday 26 June 2006 18:43, Han-Wen Nienhuys wrote: > Erik Sandberg schreef: > > On Monday 26 June 2006 10:33, Graham Percival wrote: > >> On Mon, 26 Jun 2006 08:34:21 +0200 > >> > >> Erik Sandberg <[EMAIL PROTECTED]> wrote: > >>> .. and the following works fine in both cases: > >>> \featherDurations > >>> #(ly:make-moment 5 4) > >>> { c16 c c c c c c } > >> > >> I've modified the example in the NEWS file to only use 7 notes; > >> everything else compiles cleanly. > > > > OK. Han-Wen or Jan, may I apply my patch now, if I also reduce the > > feather example to 7 notes? > > if this was the last issue, then yes. OUCH! I committed the patch, but accidentally also committed my own attempts to make it compile. I have now reverted those changes. I just can't understand why I always keep blundering any time I try to commit anything.. -- Erik ___ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Updated stream/parser todo
On Monday 19 June 2006 16:02, Erik Sandberg wrote: > On 6/19/06, Han-Wen Nienhuys <[EMAIL PROTECTED]> wrote: > > Erik Sandberg schreef > > > BTW: May I change Sequential_iterator::get_music_list to return > > > something like scm_call_1 (get_music ()->get_property > > > ("child-list-callback"), get_music ()->self_scm ()); > > > ? > > > > > > This would make it possible to soft-code e.g. percent-repeat-iterator. > > > > > > but, all in all, I don't see what advantage this would get us. > > Custom iterators makes it easier to make music expressions more > abstract, in the sense that the current time-scaled-music is abstract > (one music expression can acts as an alias for a more complex pattern > of nested expressions). Writing a two-line Scheme function is IMHO > easier and more elegant than creating a new iterator C++ module. > > In most examples I've seen so far, customised Sequential-iterators > seem to be sufficient for abstracting music expressions. The attached patch makes my proposed change to sequential-iterators, and uses this to clean up multi measure rests. The patch obsoletes the following: - glue-mm-rests - MultiMeasureRestMusicGroup - Sequential_music_iterator I know mm rests can be further cleaned up by creating spanner events, but I won't do that this time (IIRC you want to do some related cleanups of mm rests, and I want to avoid double work) -- Erik Index: lily/sequential-iterator.cc === RCS file: /sources/lilypond/lilypond/lily/sequential-iterator.cc,v retrieving revision 1.42 diff -u -r1.42 sequential-iterator.cc --- lily/sequential-iterator.cc 18 Jun 2006 12:57:37 - 1.42 +++ lily/sequential-iterator.cc 27 Jun 2006 06:11:15 - @@ -42,7 +42,12 @@ SCM Sequential_iterator::get_music_list () const { - return SCM_EOL; + Music *m = get_music (); + SCM proc = m->get_property ("elements-callback"); + if (scm_procedure_p (proc)) +return scm_call_1 (proc, m->self_scm ()); + else +return SCM_EOL; } void Index: scm/define-music-types.scm === RCS file: /sources/lilypond/lilypond/scm/define-music-types.scm,v retrieving revision 1.81 diff -u -r1.81 define-music-types.scm --- scm/define-music-types.scm 5 Jun 2006 13:57:05 - 1.81 +++ scm/define-music-types.scm 27 Jun 2006 06:11:15 - @@ -7,6 +7,20 @@ ;; TODO: should link back into user manual. +(define (mm-rest-child-list music) + "Check if we have R1*4-\\markup { .. }, and if applicable convert to +a property set for MultiMeasureRestNumber." + (let ((location (ly:music-property music 'origin)) + (duration (ly:music-property music 'duration))) +(list (make-music 'BarCheck + 'origin location) + (make-event-chord (cons (make-music 'MultiMeasureRestEvent + 'origin location + 'duration duration) + (ly:music-property music 'articulations))) + (make-music 'BarCheck + 'origin location + (define-public music-descriptions `( (AbsoluteDynamicEvent @@ -281,7 +295,16 @@ Syntax: @code{c4\\melisma d\\melismaEnd}.") (types . (general-music melisma-span-event event)) )) - +(MultiMeasureRestNew + . ( + (description . "Rests that may be compressed into Multi rests. + +Syntax [EMAIL PROTECTED] for 4 measures in 3/4 time.") + (iterator-ctor . ,ly:sequential-iterator::constructor) + (elements-callback . ,mm-rest-child-list) + (types . (general-music sequential-music)) + )) (MultiMeasureRestEvent . ( (description . "Rests that may be compressed into Multi rests. @@ -445,7 +468,8 @@ (length-callback . ,ly:music-sequence::cumulative-length-callback) (start-callback . ,ly:music-sequence::first-start-callback) - (iterator-ctor . ,ly:sequential-music-iterator::constructor) + (elements-callback . ,(lambda (m) (ly:music-property m 'elements))) + (iterator-ctor . ,ly:sequential-iterator::constructor) (types . (general-music sequential-music)) )) Index: scm/ly-syntax-constructors.scm === RCS file: /sources/lilypond/lilypond/scm/ly-syntax-constructors.scm,v retrieving revision 1.2 diff -u -r1.2 ly-syntax-constructors.scm --- scm/ly-syntax-constructors.scm 13 Jun 2006 22:01:19 - 1.2 +++ scm/ly-syntax-constructors.scm 27 Jun 2006 06:11:15 - @@ -85,9 +85,27 @@ (define-ly-syntax-simple (repeat type num body alts) (make-repeat type num body alts)) +(define (script-to-mmrest-text music) + "Extract 'direction and 'text from SCRIPT-MUSIC, and transform MultiMeasureTextEvent" + (if (memq 'script-event (ly:music-property music 'types)) + + (let ((dir (ly:music-property music 'direction)) + (p (make-music 'MultiMeasureTextEvent + 'text (ly:music-property music 'text + (if (ly:dir? dir) + (set! (ly:music-property p 'direction) dir)) + p) + music)) + +(define-ly-syntax (multi-measure-rest parser location dur