Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-24 Thread H. S. Teoh
On Wed, Feb 25, 2015 at 08:58:07AM +1100, Peter Chubb wrote:
[...]
> BTW, articulate was developed as a hack for the Artemis robot
> instrument challenge; changes in Lilypond since then mean that it's
> rather out of date.  Some of the functionality is now already in the
> Lilypond C++ core (shortening non-legato notes); it'd be nice to clean
> it up.  Especially as at the time I taught myself scheme and lilypind
> internals enough to create the script; there are lots of things that
> are sub-optimal.  So it really needs a complete rewrite, using some of
> the ideas, but not much of the code.
[...]

I'm very interested in this! While I know that "lilypond is not a
sequencer" and all that, I'd like to be able to leverage lilypond's IMO
superior representation of music to drive nice (or rather, just
tolerable?) performances of my pieces. I'm willing to write my own
scripts, etc., to achieve what I want, but if much of the functionality
can be already available in the articulate script, it would save me a
lot of work.


T

-- 
Elegant or ugly code as well as fine or rude sentences have something in 
common: they don't depend on the language. -- Luca De Vitis

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-24 Thread Peter Chubb
> "Davide" == Davide Liessi  writes:

Davide> Dear Peter, Il 24/02/15 06.48, Peter Chubb ha scritto:
>> I had a brainstorm -- the problem is SkipMusic which isn't handled
>> anywhere.  But we can use a SkipEvent instead, and it all works!!!

Davide> Alas it does not: I get the same barcheck failures both in the
Davide> minimal example I posted and in the real use case and the
Davide> trill spanner still does not end.

Davide> Instead I tried to mimick in articulate.ly the workaround
Davide> suggested by Joram (<>) and it seems to work: I get correct
Davide> trills and no barcheck warnings.

That works!

Can you get Joram to push a patch to Rietveldt?  I'd rather the kudos
for the fix went to the person who developed it.


BTW, articulate was developed as a hack for the Artemis robot
instrument challenge; changes in Lilypond since then mean that it's
rather out of date.  Some of the functionality is now already in the
Lilypond C++ core (shortening non-legato notes); it'd be nice to clean
it up.  Especially as at the time I taught myself scheme and lilypind
internals enough to create the script; there are lots of things that
are sub-optimal.  So it really needs a complete rewrite, using some of
the ideas, but not much of the code.


Peter C
-- 
Dr Peter Chubb  peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au  Software Systems Research Group/NICTA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-24 Thread Davide Liessi
Dear Peter,

Il 24/02/15 06.48, Peter Chubb ha scritto:
> I had a brainstorm -- the problem is SkipMusic which isn't handled
> anywhere.  But we can use a SkipEvent instead, and it all works!!!

Alas it does not: I get the same barcheck failures both in the minimal example 
I posted and in the real use case and the trill spanner still does not end.

Instead I tried to mimick in articulate.ly the workaround suggested by Joram 
(<>) and it seems to work: I get correct trills and no barcheck warnings.

Do you think that this could be added to the LilyPond version of articulate.ly?


diff --git a/ly/articulate.ly b/ly/articulate.ly
index bbfea19..68999e4 100644
--- a/ly/articulate.ly
+++ b/ly/articulate.ly
@@ -486,6 +486,8 @@
   (make-sequential-music
(list
(make-music 'BarCheck)
+   (make-music 'EventChord
+ 'elements (ly:music-property m 'articulations))
(make-music 'SkipMusic 'duration (ly:music-property m 'duration))
(make-music 'BarCheck
  (else


Anyway, thanks for the pointer and for trying.
Best wishes.
Davide

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-23 Thread Peter Chubb
> "Davide" == Davide Liessi  writes:

Davide> Dear Peter, Il 04/02/15 09.46, Peter Chubb ha scritto:
>> Looks like the code that was added to do agogic accents (aka swing)
>> expands MultiMeasureRestMusic and throws away any articulation
>> events (like the end of the trill spanner) on the way.
>> 
>> The fix is probably to add the ariculations in at the end of
>> ac:unFoldMusic when expanding MultiMeasureRestMusic.

Davide> How can I do this?


I had a brainstorm -- the problem is SkipMusic which isn't handled
anywhere.  But we can use a SkipEvent instead, and it all works!!!

diff --git a/ly/articulate.ly b/ly/articulate.ly
index bbfea19..882cf95 100644
--- a/ly/articulate.ly
+++ b/ly/articulate.ly
@@ -483,11 +483,11 @@
 (make-sequential-music
  (list-tabulate eff-nrep (lambda (i) (ly:music-deep-copy m
  ((MultiMeasureRestMusic)
-  (make-sequential-music
-   (list
+   (event-chord-wrap! (make-sequential-music (list
(make-music 'BarCheck)
-   (make-music 'SkipMusic 'duration (ly:music-property m 'duration))
-   (make-music 'BarCheck
+   (make-music 'SkipEvent 'duration (ly:music-property m 'duration)
+'articulations (ly:music-property m 'articulations))
+   (make-music 'BarCheck)
  (else
   m)))
(unfold-repeats music)))

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-23 Thread Peter Chubb
> "Davide" == Davide Liessi  writes:

Davide> Dear Peter, Il 04/02/15 09.46, Peter Chubb ha scritto:
>> Looks like the code that was added to do agogic accents (aka swing)
>> expands MultiMeasureRestMusic and throws away any articulation
>> events (like the end of the trill spanner) on the way.
>> 
>> The fix is probably to add the ariculations in at the end of
>> ac:unFoldMusic when expanding MultiMeasureRestMusic.

Davide> How can I do this?

Not sure ...

I tried this, but it didn't work --- more investiagtion (that I don;t
have time for at present is needed:
diff --git a/ly/articulate.ly b/ly/articulate.ly
index bbfea19..48a8535 100644
--- a/ly/articulate.ly
+++ b/ly/articulate.ly
@@ -486,7 +486,8 @@
   (make-sequential-music
(list
(make-music 'BarCheck)
-   (make-music 'SkipMusic 'duration (ly:music-property m 'duration))
+   (make-music 'SkipMusic 'duration (ly:music-property m 'duration)
+'articulations (ly:music-property m 'articulations))
(make-music 'BarCheck
  (else
   m)))
@@ -538,7 +539,7 @@
   ((BeamEvent) ; throw away beam events, or they'll be duplicated by turn 
or trill
(loop factor newelements tail actions))
 
-  ((LineBreakEvent FingeringEvent MarkEvent BreathingEvent TieEvent 
SkipEvent RestEvent) ; pass through some events.
+  ((SkipMusic LineBreakEvent FingeringEvent MarkEvent BreathingEvent 
TieEvent SkipEvent RestEvent) ; pass through some events.
(loop (cons 1 1) (cons e newelements) tail actions))
 
   ((ArticulationEvent)
(END)

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-20 Thread Davide Liessi

Dear Peter,

Il 04/02/15 09.46, Peter Chubb ha scritto:

Looks like the code that was added to do agogic accents (aka swing)
expands MultiMeasureRestMusic and throws away any articulation events
(like the end of the trill spanner) on the way.

The fix is probably to add the ariculations in at the end of
ac:unFoldMusic when expanding MultiMeasureRestMusic.


How can I do this?

Best wishes.
Davide

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-04 Thread Peter Chubb
> "Noeck" == Noeck   writes:

Noeck> Hi Davide,

>> I would expect \articulate to correctly handle trill spanners
>> regardless to what \stopTrillSpan is attached to.

Noeck> Yep, me too. That’s why I said: I don’t know how to fix it.

Looks like the code that was added to do agogic accents (aka swing)
expands MultiMeasureRestMusic and throws away any articulation events
(like the end of the trill spanner) on the way.

The fix is probably to add the ariculations in at the end of
ac:unFoldMusic when expanding MultiMeasureRestMusic.


--
Dr Peter Chubb  peter.chubb AT nicta.com.au
http://www.ssrg.nicta.com.au  Software Systems Research Group/NICTA

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-03 Thread Noeck
Hi Davide,

> I would expect \articulate to correctly handle trill spanners regardless
> to what \stopTrillSpan is attached to.

Yep, me too. That’s why I said: I don’t know how to fix it.

Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-03 Thread Davide Liessi

Dear Joram,

Il 04/02/15 00.19, Noeck ha scritto:

I don’t know how to fix it in articulate but adding <> and moving the
\stopTrillSpan before the rest seems to work:


Thanks, that is a nice workaround!
However I believe this is a bug in articulate.ly.


This means: The trill stops visually at the same point (measure 2) but before
the rest. How can you do a trill on a rest anyway?


Also in my example the trill spanner is meant to stop before the rest: 
it is *not* a trill on a rest.

Use of \startTrillSpan and \stopTrillSpan is described in [1].
E.g. the following code means that the trill begins on c and ends at the 
end of f, i.e. before g:


c4 \startTrillSpan d e f
g4 \stopTrillSpan a b c'

and indeed it does, both visually and (if you use \articulate) in MIDI.
If I understand correctly, it should be interpreted as "start the trill 
when c4 starts and stop the trill when g4 starts".


I would expect \articulate to correctly handle trill spanners regardless 
to what \stopTrillSpan is attached to.


Best wishes.
Davide


[1] 
http://lilypond.org/doc/v2.18/Documentation/notation/expressive-marks-as-lines#trills


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-03 Thread Noeck
Hi Davide,

I don’t know how to fix it in articulate but adding <> and moving the
\stopTrillSpan before the rest seems to work:

\version "2.19.15"
\include "articulate.ly"
mus = {
  b1 \startTrillSpan |
  <> \stopTrillSpan R1 |
  b2 r |
}

\new Staff \mus
\articulate \mus

This means: The trill stops visually at the same point (measure 2) but before
the rest. How can you do a trill on a rest anyway? <> is an empty chord, so a
note without duration.

HTH,
Joram

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Bug in articulate.ly + TrillSpan + full-measure rests

2015-02-03 Thread Davide Liessi

Dear all,
I found a strange behaviour in the interaction of articulate.ly with 
TrillSpan and full-measure rests.

This snippet:

\version "2.19.15"
\include "articulate.ly"
\articulate {
  b1 \startTrillSpan |
  R1 \stopTrillSpan |
  b2 r |
}

gives a warning: barcheck failed at: 1/2
  b2 r
   |
and also b2 is expanded as a trill.
This happens both with the version of articulate.ly included in LilyPond 
2.19.15 and with the version in latest Git (i.e. with all the latest 
patches).


The warning disappears and the trill spanner stops in the right place in 
any of the following cases:

- change R1 to r1 in measure 2
- change r to b in measure 3
- remove \articulate (of course!)

How can I solve this problem?
Best wishes.
Davide

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user