Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/20 23:18:37, Neil Puttock wrote: Simply set 'direction inside the parser rule itself following the function evaluation. Hi Neil, something like that? (see new patch set) Cheers, Valentin. http://codereview.appspot.com/3743043/ ___

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/20 16:22:30, Carl wrote: IMO, go ahead and set the neutral direction. If it passes make check, then call it good. Hi Carl, actually, whilst it does pass make check, it breaks... all of my own scores! I use the following function: filterDirections= #(define-music-function

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread Carl . D . Sorensen
On 2010/12/21 20:45:42, Valentin Villenave wrote: On 2010/12/20 16:22:30, Carl wrote: actually, whilst it does pass make check, it breaks... all of my own scores! I can't understand why you don't want to push a patch that breaks all your scores... ;-) Does this latest patch break your

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/21 21:24:52, Carl wrote: I can't understand why you don't want to push a patch that breaks all your scores... ;-) Does this latest patch break your scores? It does, since the 'direction property is never left null (I can work around it, though. But at first I did feel a bit

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread n . puttock
On 2010/12/21 14:19:56, Valentin Villenave wrote: something like that? (see new patch set) Almost there, but you're still setting 'direction unconditionally instead of checking first, i.e., $$ = run_music_function (PARSER, $2); if ($1) { unsmob $$ and set direction } Cheers, Neil

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread n . puttock
On 2010/12/21 22:12:46, Valentin Villenave wrote: It does, since the 'direction property is never left null (I can work around it, though. But at first I did feel a bit shocked, I must say :-) Use ly:dir? instead of (not (null? ...). Cheers, Neil http://codereview.appspot.com/3743043/

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/21 22:21:38, Neil Puttock wrote: Almost there, but you're still setting 'direction unconditionally instead of checking first, i.e., Done (new patch). However, I can't really understand how this condition could ever be false. What kind of input could trigger the parser rule without

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/21 22:27:43, Neil Puttock wrote: Use ly:dir? instead of (not (null? ...). Duh. Nice catch, thanks! Cheers, V. http://codereview.appspot.com/3743043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread n . puttock
On 2010/12/21 22:34:23, Valentin Villenave wrote: Done (new patch). However, I can't really understand how this condition could ever be false. What kind of input could trigger the parser rule without actually containing a proper direction? script_dir: '_' { $$ = DOWN; }

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread v . villenave
On 2010/12/21 22:45:53, Neil Puttock wrote: CENTER = 0, so is always false. Oh, I didn't know 0 was false, in Guile you can have something like: guile (define a 0) guile (if a (display true\n)) true guile (yes it's silly, but remember that the only things about programming I know, I learned

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-21 Thread n . puttock
On 2010/12/21 22:56:05, Valentin Villenave wrote: Oh, I didn't know 0 was false, in Guile you can have something like: guile (define a 0) guile (if a (display true\n)) true guile Yep, Scheme is strict about #f: it's not equal to any other object. Do you think I can push this patch now?

[Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread v . villenave
Reviewers: Neil Puttock, Message: Greetings everybody, here's a patch that Neil suggested to me (if you remember my earlier postfix-dynamics patch, you may guess where I'm getting at with this). Thoughts? Cheers, Valentin. Description: Add direction-awareness ability to post-event music

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread Carl . D . Sorensen
On 2010/12/20 16:01:46, Valentin Villenave wrote: On 2010/12/20 15:31:43, Carl wrote: This seems like a cool idea! Thanks! As said before, it really isn't mine :) Could it be made more simple by just letting the 0 direction be set as a music property, instead of adding only the 1 and

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread v . villenave
On 2010/12/20 16:22:30, Carl wrote: IMO, go ahead and set the neutral direction. If it passes make check, then call it good. New patch set; for now I've just updated the regtest. I really don't feel comfortable passing a direction argument everywhere (since it would also affect *all* music

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread n . puttock
Hi Valentin, It's great to see you tackle this. The code looks pretty good, but I agree with Carl that it's too complicated. I'd go even further though: you should only be setting direction if it's necessary (just like articulations), so there's no need to pass an extra argument to the syntax

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread v . villenave
On 2010/12/20 23:18:37, Neil Puttock wrote: The code looks pretty good, but I agree with Carl that it's too complicated. I'd go even further though: you should only be setting direction if it's necessary (just like articulations), so there's no need to pass an extra argument to the syntax

Re: [Patch] make post-event music functions direction-aware (issue3743043)

2010-12-20 Thread n . puttock
On 2010/12/20 23:22:22, Valentin Villenave wrote: I've been looking for a way of doing this, but it's a bit too advanced for me (I suspect there must be something to unsmob somewhere or a Music object or whatever)... Could you give me a hint? See the rules for