Re: skip-of-length and \unfoldRepeats

2022-02-16 Thread Werner LEMBERG
>>> Now that I know to look for it, the definition of `\skip` in
>>> 
>>> does describe this behavior.  But I would never have found this on
>>> my own.
>>
>> OK, how did you search exactly?  Where did you look?  What have you
>> missed?  What did you assume?  If you can give those details it
>> might be possible to improve the documentation accordingly.
> 
> Werner, the documentation of \skip on music is a ticket
> at the moment.
> 
> https://gitlab.com/lilypond/lilypond/-/issues/6245

OK, but...

> Given that I am not surprised if people don't find it.

... it is still useful to know how people are searching.


Werner



Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Jean Abou Samra

Le 16/02/2022 à 06:04, Werner LEMBERG a écrit :

In recent versions, like version 2.23.6 which you are using, you
can use

   \skip \musicA

which is nicer syntax-wise and plays well with \unfoldRepeats.

Now that I know to look for it, the definition of `\skip` in
<https://lilypond.org/doc/v2.23/Documentation/notation/available-music-functions#index-_005cskip-5>
does describe this behavior.  But I would never have found this on
my own.

OK, how did you search exactly?  Where did you look?  What have you
missed?  What did you assume?  If you can give those details it might
be possible to improve the documentation accordingly.



Werner, the documentation of \skip on music is a ticket
at the moment.

https://gitlab.com/lilypond/lilypond/-/issues/6245

Given that I am not surprised if people don't find it.
A docstring is not easy-to-find nor sufficient documentation.
It's just that in unstable releases it happens to
have undocumented features like that -- of course,
they should get documented before the stable release.

Jean





Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Werner LEMBERG


>> In recent versions, like version 2.23.6 which you are using, you
>> can use
>>
>>   \skip \musicA
>>
>> which is nicer syntax-wise and plays well with \unfoldRepeats.
> 
> Now that I know to look for it, the definition of `\skip` in
> <https://lilypond.org/doc/v2.23/Documentation/notation/available-music-functions#index-_005cskip-5>
> does describe this behavior.  But I would never have found this on
> my own.

OK, how did you search exactly?  Where did you look?  What have you
missed?  What did you assume?  If you can give those details it might
be possible to improve the documentation accordingly.


Werner



Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Joel C. Salomon

On 2/15/22 14:22, Jean Abou Samra wrote:

In recent versions, like version 2.23.6 which you are using, you can use

\skip \musicA

which is nicer syntax-wise and plays well with \unfoldRepeats.


Now that I know to look for it, the definition of `\skip` in 
<https://lilypond.org/doc/v2.23/Documentation/notation/available-music-functions#index-_005cskip-5> 
—



\skip [music] - arg (duration-or-music)
Skip over arg, which may be music or a duration.


—does describe this behavior.  But I would never have found this on my 
own.  Thank you!


—Joel



Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Valentin Petzel
I’m sorry if this has come across in the wrong way. English is not my native 
language, so sometime I do not get the tone right and sound ruder than I 
intended. I did by no means indent to reprimand you for your legitimate 
question.

With the amazing Jean’s comment #skip-of-length should probably loose all use 
from a users perspective, as the \skip \music command is easier to use and 
more stable (this one basically does exactly what I said previously: It 
creates a SkipMusic event which takes the provided music as it’s element. Thus 
music functions like unfoldRepeats can still access this music as the skip is 
only created during translation (at which point all music functions are 
already evaluated)).

Cheers,
Valentin

Am Dienstag, 15. Februar 2022, 21:26:38 CET schrieb Joel C. Salomon:
> On 2/15/22 14:38, Valentin Petzel wrote:
> > 15.02.2022 20:20:02 Joel C. Salomon :
> >> … seem not to play nicely together.
> > 
> > Well, how should they? At the point the skip-of-length is evaluated the
> > repeats are not yet unfolded. To achieve what you want we could have some
> > mechanics where skip events could have an element property, and have the
> > handling be done by the engraver.
> In hindsight, this *is* obvious.  But I’m still only a casual user of
> the program, and have very limited experience at the Scheme level, so
> this was surprising.
> 
> ―Joel



signature.asc
Description: This is a digitally signed message part.


Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Joel C. Salomon

On 2/15/22 14:22, Jean Abou Samra wrote:

Le 15/02/2022 à 20:19, Joel C. Salomon a écrit :

… seem not to play nicely together.


In recent versions, like version 2.23.6 which you are using, you can use

\skip \musicA

which is nicer syntax-wise and plays well with \unfoldRepeats.


Thank you; this works.

—Joel




Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Joel C. Salomon

On 2/15/22 14:38, Valentin Petzel wrote:

15.02.2022 20:20:02 Joel C. Salomon :


… seem not to play nicely together.


Well, how should they? At the point the skip-of-length is evaluated the repeats 
are not yet unfolded. To achieve what you want we could have some mechanics 
where skip events could have an element property, and have the handling be done 
by the engraver.


In hindsight, this *is* obvious.  But I’m still only a casual user of 
the program, and have very limited experience at the Scheme level, so 
this was surprising.


―Joel



Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Jean Abou Samra




Le 15/02/2022 à 20:19, Joel C. Salomon a écrit :

… seem not to play nicely together.

―Joel

\version "2.23.6"

musicA = \fixed c'' \repeat volta 2 { c d }
musicB = \fixed c { a b }

music = {
  \musicA
  \musicB
}

dynamics = {
  <>\f
  #(skip-of-length musicA)
  <>\p
  #(skip-of-length musicB)
  %\fine
}

\score {
  \new Staff <<
  \unfoldRepeats  \music
  \unfoldRepeats  \dynamics
  >>
}




In recent versions, like version 2.23.6 which you are using, you can use

\skip \musicA

which is nicer syntax-wise and plays well with \unfoldRepeats.

Best,
Jean




Re: skip-of-length and \unfoldRepeats

2022-02-15 Thread Valentin Petzel
Well, how should they? At the point the skip-of-length is evaluated the repeats 
are not yet unfolded. To achieve what you want we could have some mechanics 
where skip events could have an element property, and have the handling be done 
by the engraver.

Valentin

15.02.2022 20:20:02 Joel C. Salomon :

> … seem not to play nicely together.
> 
> ―Joel
> 
> \version "2.23.6"
> 
> musicA = \fixed c'' \repeat volta 2 { c d }
> musicB = \fixed c { a b }
> 
> music = {
>    \musicA
>    \musicB
> }
> 
> dynamics = {
>    <>\f
>    #(skip-of-length musicA)
>    <>\p
>    #(skip-of-length musicB)
>    %\fine
> }
> 
> \score {
>    \new Staff <<
>    \unfoldRepeats  \music
>    \unfoldRepeats  \dynamics
>    >>
> }



skip-of-length and \unfoldRepeats

2022-02-15 Thread Joel C. Salomon

… seem not to play nicely together.

―Joel

\version "2.23.6"

musicA = \fixed c'' \repeat volta 2 { c d }
musicB = \fixed c { a b }

music = {
  \musicA
  \musicB
}

dynamics = {
  <>\f
  #(skip-of-length musicA)
  <>\p
  #(skip-of-length musicB)
  %\fine
}

\score {
  \new Staff <<
  \unfoldRepeats  \music
  \unfoldRepeats  \dynamics
  >>
}



Re: \unfoldRepeats

2020-11-01 Thread Aaron Hill

On 2020-11-01 2:25 pm, David Rogers wrote:

Aaron Hill  writes:


On 2020-10-29 2:35 pm, David Kastrup wrote:

David Nalesnik  writes:


Hi Andrew,
On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard 
 wrote:

Hi David,
But it would be great in the future to have more and better MIDI
support. I no longer regard it as a small feature on the side, but
something I really need. For now, I will stick to outputting my New
Complexity School scores - which Dorico has trouble with! :-)


I think an important step in the process would be to make the MIDI
backend somehow accessible from Scheme.  Then the power users would 
be

all over it.

Indeed.  And a unifying concept covering both grobs and MIDI objects
(mobs?) might even pave a way to iterative generation of time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the 
musical

content.


Mobs... 樂

Could we get LilyPond to output a Minecraft world populated with 
appropriate redstone and noteblocks?


Somehow I’m now imagining a Lilypond Toys Output Module that builds
(literally!) a representation of my score out of Lego, Meccano,
Tinkertoys, Slinky, popsicle sticks, pipe cleaners, etc, choosing the
materials by some kind of algorithm. And any elements of a score that
involve extra Scheme code or tweaks, it will build from papier-mâché.
Consider it an alternative definition of “object-oriented”. :)


And now I am thinking of Pipe Dream from Animusic or that marble music 
machine by Wintergaten.



-- Aaron Hill



Re: \unfoldRepeats

2020-11-01 Thread David Rogers

Aaron Hill  writes:


On 2020-10-29 2:35 pm, David Kastrup wrote:

David Nalesnik  writes:


Hi Andrew,
On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard 
 wrote:

Hi David,
But it would be great in the future to have more and better 
MIDI
support. I no longer regard it as a small feature on the 
side, but
something I really need. For now, I will stick to outputting 
my New

Complexity School scores - which Dorico has trouble with! :-)

I think an important step in the process would be to make the 
MIDI
backend somehow accessible from Scheme.  Then the power users 
would be

all over it.
Indeed.  And a unifying concept covering both grobs and MIDI 
objects
(mobs?) might even pave a way to iterative generation of 
time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the 
musical

content.


Mobs... 樂

Could we get LilyPond to output a Minecraft world populated with 
appropriate redstone and noteblocks?


Somehow I’m now imagining a Lilypond Toys Output Module that 
builds (literally!) a representation of my score out of Lego, 
Meccano, Tinkertoys, Slinky, popsicle sticks, pipe cleaners, etc, 
choosing the materials by some kind of algorithm. And any elements 
of a score that involve extra Scheme code or tweaks, it will build 
from papier-mâché. Consider it an alternative definition of 
“object-oriented”. :)


--
David Rogers



Re: \unfoldRepeats

2020-10-29 Thread Aaron Hill

On 2020-10-29 2:35 pm, David Kastrup wrote:

David Nalesnik  writes:


Hi Andrew,

On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard 
 wrote:


Hi David,

But it would be great in the future to have more and better MIDI
support. I no longer regard it as a small feature on the side, but
something I really need. For now, I will stick to outputting my New
Complexity School scores - which Dorico has trouble with! :-)



I think an important step in the process would be to make the MIDI
backend somehow accessible from Scheme.  Then the power users would be
all over it.


Indeed.  And a unifying concept covering both grobs and MIDI objects
(mobs?) might even pave a way to iterative generation of time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the musical
content.


Mobs... 樂

Could we get LilyPond to output a Minecraft world populated with 
appropriate redstone and noteblocks?



-- Aaron Hill



Re: \unfoldRepeats

2020-10-29 Thread David Kastrup
David Nalesnik  writes:

> Hi Andrew,
>
> On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard  
> wrote:
>>
>> Hi David,
>>
>> But it would be great in the future to have more and better MIDI
>> support. I no longer regard it as a small feature on the side, but
>> something I really need. For now, I will stick to outputting my New
>> Complexity School scores - which Dorico has trouble with! :-)
>>
>
> I think an important step in the process would be to make the MIDI
> backend somehow accessible from Scheme.  Then the power users would be
> all over it.

Indeed.  And a unifying concept covering both grobs and MIDI objects
(mobs?) might even pave a way to iterative generation of time-based
MusicXML (xobs?) or Braille (bobs?) or other renditions of the musical
content.

-- 
David Kastrup



Re: \unfoldRepeats

2020-10-28 Thread David Rogers

Andrew Bernard  writes:


Hi David,

That's one view, but I have been using LilyPond for professional
engraving for years and I am now moving into MIDI for generation 
of
MIDI as the principal end output, for film scores and so on. 
That's a
valid musical compositional use case. The engraved score is 
_not_

always the principal object. …


I agree that an engraved score is not always each 
person’s principal aim. But it doesn’t follow that every piece of 
software ought to be the right one for every possible aim; 
Firefox’s double-entry bookkeeping is atrocious, and writing 
novels in Photoshop is way harder than it needs to be. :)  Nor 
does it follow that all music composition software developers need 
a worldwide agreement on which use-cases must be covered.


I don’t think there’s an unlimited number of people with both the 
skill and the desire to work on the main structure of Lilypond, 
and to me it makes more sense for them to intentionally neglect a 
secondary function than to hold back or limit a primary one.


--
David Rogers



Re: \unfoldRepeats

2020-10-28 Thread David Nalesnik
Hi Andrew,

On Wed, Oct 28, 2020 at 5:03 PM Andrew Bernard  wrote:
>
> Hi David,
>
> That's one view, but I have been using LilyPond for professional
> engraving for years and I am now moving into MIDI for generation of
> MIDI as the principal end output, for film scores and so on. That's a
> valid musical compositional use case. The engraved score is _not_
> always the principal object. So far more than mere proofing, I am
> (perhaps naively) attempting to use LilyPond to produce performance
> quality MIDI and I have discovered with no disrespect to anybody
> whatsoever that it is not the right tool for the job. So be it. But
> tools like Dorico exist (as you say) and a large part of the target
> market for that program is in fact film scoring and it comes with full
> MIDI support and a large library of VST instruments. I don't suppose
> MIDI in LilyPond will be raised to that level, and I am critically
> aware of the lack of development resources for LilyPond. But this is
> nowadays an important matter to me that it may be the final stimulus
> to move to Dorico, at least for this aspect of my work. Nothing wrong
> with having many tools in the toolchest. But it would be great in the
> future to have more and better MIDI support. I no longer regard it as
> a small feature on the side, but something I really need. For now, I
> will stick to outputting my New Complexity School scores - which
> Dorico has trouble with! :-)
>
>
> Andrew
>

I think an important step in the process would be to make the MIDI
backend somehow accessible from Scheme.  Then the power users would be
all over it.

David N.

> On Thu, 29 Oct 2020 at 04:07, David Rogers  
> wrote:
>
> > OK, after three tries, now I know my own opinion: If it would take
> > “real work” to make unfolded repeats for MIDI, then I’d wish that
> > time and effort had been spent on other Lilypond issues instead.
> > And if working on MIDI would turn into a distraction, or would
> > “open a can of worms”, then IMO it wouldn’t be worth it. There
> > certainly is software out there for creating
> > artistically-orchestrated MIDI.
> >
>



Re: \unfoldRepeats

2020-10-28 Thread Andrew Bernard
Hi David,

That's one view, but I have been using LilyPond for professional
engraving for years and I am now moving into MIDI for generation of
MIDI as the principal end output, for film scores and so on. That's a
valid musical compositional use case. The engraved score is _not_
always the principal object. So far more than mere proofing, I am
(perhaps naively) attempting to use LilyPond to produce performance
quality MIDI and I have discovered with no disrespect to anybody
whatsoever that it is not the right tool for the job. So be it. But
tools like Dorico exist (as you say) and a large part of the target
market for that program is in fact film scoring and it comes with full
MIDI support and a large library of VST instruments. I don't suppose
MIDI in LilyPond will be raised to that level, and I am critically
aware of the lack of development resources for LilyPond. But this is
nowadays an important matter to me that it may be the final stimulus
to move to Dorico, at least for this aspect of my work. Nothing wrong
with having many tools in the toolchest. But it would be great in the
future to have more and better MIDI support. I no longer regard it as
a small feature on the side, but something I really need. For now, I
will stick to outputting my New Complexity School scores - which
Dorico has trouble with! :-)


Andrew


On Thu, 29 Oct 2020 at 04:07, David Rogers  wrote:

> OK, after three tries, now I know my own opinion: If it would take
> “real work” to make unfolded repeats for MIDI, then I’d wish that
> time and effort had been spent on other Lilypond issues instead.
> And if working on MIDI would turn into a distraction, or would
> “open a can of worms”, then IMO it wouldn’t be worth it. There
> certainly is software out there for creating
> artistically-orchestrated MIDI.
>



Re: \unfoldRepeats

2020-10-28 Thread Martín Rincón Botero
> I think the fact that a person is using Lilypond means they want a
> properly-printed score, and making the effort to print a nice
> score implies a planned live performance. Which (in my mind)
> allows Lilypond’s MIDI into the “mere proof of concept” category.

In my opinion, every feature that can be improved in Lilypond is worth 
improving.

www.martinrinconbotero.com
On 28. Oct 2020, 18:08 +0100, David Rogers , wrote:
>
> real


Re: \unfoldRepeats

2020-10-28 Thread David Rogers

David Kastrup  writes:


Marc Shepherd  writes:

According to the documentation, the default behavior of the 
MIDI block is
not to “unfold” repeats (other than those that are explicitly 
\repeat unfold).
If you want repeats unfolded inside of a MIDI block, you have 
to requote
the music within the MIDI block, nested inside of an 
\unfoldRepeats block.


Any idea why that was chosen as the default behavior? When 
composers write
a repeat, they usually expect it to be performed. I would have 
thought that

automatically unfolding would be the more logical default.


The MIDI output of LilyPond is mainly intended for 
"proofhearing", not
as a performance; it has been fairly recently only that attempts 
to take
into account articulation marks (which are seminal for a 
performance)
have been added.  As such, unfolding repeats makes the material 
longer

without adding more information.


I started this reply with one idea, and have already changed my 
mind. I *was* going to say that the small size of MIDI files means 
there’s less reason to discuss wasted space. But now I think the 
bigger issue is the other thing you talked about: there’s a sort 
of unofficial division between MIDI files as just a quick way of 
allowing the notes to be heard (sort of a musical 
proof-of-concept), and MIDI files as carefully-orchestrated 
performances worth listening to in themselves.


I think the fact that a person is using Lilypond means they want a 
properly-printed score, and making the effort to print a nice 
score implies a planned live performance. Which (in my mind) 
allows Lilypond’s MIDI into the “mere proof of concept” category.


OK, after three tries, now I know my own opinion: If it would take 
“real work” to make unfolded repeats for MIDI, then I’d wish that 
time and effort had been spent on other Lilypond issues instead. 
And if working on MIDI would turn into a distraction, or would 
“open a can of worms”, then IMO it wouldn’t be worth it. There 
certainly is software out there for creating 
artistically-orchestrated MIDI.


--
David Rogers



Re: \unfoldRepeats

2020-10-28 Thread David Kastrup
Marc Shepherd  writes:

> According to the documentation, the default behavior of the MIDI block is
> not to “unfold” repeats (other than those that are explicitly \repeat unfold).
> If you want repeats unfolded inside of a MIDI block, you have to requote
> the music within the MIDI block, nested inside of an \unfoldRepeats block.
>
> Any idea why that was chosen as the default behavior? When composers write
> a repeat, they usually expect it to be performed. I would have thought that
> automatically unfolding would be the more logical default.

The MIDI output of LilyPond is mainly intended for "proofhearing", not
as a performance; it has been fairly recently only that attempts to take
into account articulation marks (which are seminal for a performance)
have been added.  As such, unfolding repeats makes the material longer
without adding more information.

-- 
David Kastrup



Re: \unfoldRepeats

2020-10-27 Thread Aaron Hill

On 2020-10-27 12:34 pm, Jean Abou Samra wrote:

Le 27/10/2020 à 20:08, Marc Shepherd a écrit :

According to the documentation, the default behavior of the MIDI block 
is not to “unfold” repeats (other than those that are explicitly 
\repeat unfold). If you want repeats unfolded inside of a MIDI block, 
you have to requote the music within the MIDI block, nested inside of 
an \unfoldRepeatsblock.


Any idea why that was chosen as the default behavior? When composers 
write a repeat, they usually expect it to be performed. I would have 
thought that automatically unfolding would be the more logical 
default.


-- Marc Shepherd


Hello,

I believe this is just for technical reasons -- currently
there is no proper way to create volta repeats that are
automatically unfolded in MIDI. If that became possible in
the future, it would certainly be the default.


To add to this, even with \unfoldRepeats, LilyPond cannot obey other 
instructions to "da capo" or "dal segno al coda".  Users who want the 
MIDI to be accurate will have to manually rejuggle their music anyway.



-- Aaron Hill



Re: \unfoldRepeats

2020-10-27 Thread Jean Abou Samra

Le 27/10/2020 à 20:08, Marc Shepherd a écrit :

According to the documentation, the default behavior of the MIDI block 
is not to “unfold” repeats (other than those that are explicitly 
\repeat unfold). If you want repeats unfolded inside of a MIDI block, 
you have to requote the music within the MIDI block, nested inside of 
an \unfoldRepeatsblock.


Any idea why that was chosen as the default behavior? When composers 
write a repeat, they usually expect it to be performed. I would have 
thought that automatically unfolding would be the more logical default.


--
Marc Shepherd


Hello,

I believe this is just for technical reasons -- currently
there is no proper way to create volta repeats that are
automatically unfolded in MIDI. If that became possible in
the future, it would certainly be the default.

Best,
Jean



\unfoldRepeats

2020-10-27 Thread Marc Shepherd
According to the documentation, the default behavior of the MIDI block is
not to “unfold” repeats (other than those that are explicitly \repeat unfold).
If you want repeats unfolded inside of a MIDI block, you have to requote
the music within the MIDI block, nested inside of an \unfoldRepeats block.

Any idea why that was chosen as the default behavior? When composers write
a repeat, they usually expect it to be performed. I would have thought that
automatically unfolding would be the more logical default.

-- 
Marc Shepherd


Re: \unfoldRepeats for midi file

2017-12-12 Thread Simon Albrecht

On 12.12.2017 11:27, David Kastrup wrote:

"Peter Chubb"  writes:


Ming> Thank you for the
Ming> answer. One question: how can I just want to show few color
Ming> lyric text only? I try to use {}, but it shows all lyric text in
Ming> color.  Ming

You need to delimit the coloured part.  Something like
  words=\lyricmode {
you \markup {\with-color #green can} see the \markup
{\with-color #red} frog
  }

Uh no?

words=\lyricmode {
  you \markup \with-color #green can see the
  \markup \with-color #red frog
}

works fine.


Or

words = \lyricmode {
  you
  \override LyricText . color = #green
  can see
  \revert LyricText . color
  the frog
}

Best, Simon

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


Re: \unfoldRepeats for midi file

2017-12-12 Thread David Kastrup
"Peter Chubb"  writes:

>> "Ming" == Ming Tsang  writes:
>
>
> Ming> Peter, I did reply all and I got mail
> Ming> delivery fail on your rmail address.
> You probably included HTML, which causes my spam daemon to reject it.
>
> Ming> Thank you for the
> Ming> answer. One question: how can I just want to show few color
> Ming> lyric text only? I try to use {}, but it shows all lyric text in
> Ming> color.  Ming
>
> You need to delimit the coloured part.  Something like
>  words=\lyricmode {
>   you \markup {\with-color #green can} see the \markup
>   {\with-color #red} frog
>  }

Uh no?

words=\lyricmode {
 you \markup \with-color #green can see the
 \markup \with-color #red frog
}

works fine.

-- 
David Kastrup

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


Re: \unfoldRepeats for midi file

2017-12-12 Thread Peter Chubb
> "Ming" == Ming Tsang  writes:


Ming> Peter, I did reply all and I got mail
Ming> delivery fail on your rmail address.
You probably included HTML, which causes my spam daemon to reject it.

Ming> Thank you for the
Ming> answer. One question: how can I just want to show few color
Ming> lyric text only? I try to use {}, but it shows all lyric text in
Ming> color.  Ming

You need to delimit the coloured part.  Something like
 words=\lyricmode {
you \markup {\with-color #green can} see the \markup
{\with-color #red} frog
 }

See e.g.,
http://lilypond.org/doc/v2.19/Documentation/snippets/text#text-formatting-lyrics-syllables

Peter C

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


RE: \unfoldRepeats for midi file

2017-12-11 Thread Ming Tsang
Peter,
I did reply all and I got mail delivery fail on your rmail address.
Thank you for the answer. One question: how can I just want to show few color 
lyric text only? I try to use {}, but it shows all lyric text in color. 
Ming

Sent from Mail for Windows 10

From: pe...@chubb.wattle.id.au
Sent: December 10, 2017 9:25 PM
To: Ming Tsang
Cc: lilypond-user@gnu.org
Subject: Re: \unfoldRepeats for midi file


Ming> Hi lilyponders, I try to produce file file that
Ming> unfoldRepeats. The following code did not produce repeats
Ming> volta. I need help.  Thanks, Ming

   Please next time try to produce a minimal example.

   You've asked for \repeat volta 1  which has no repeat.  Try \repeat
   volta 2 to play the tune twice.

Peter C

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


RE: \unfoldRepeats for midi file

2017-12-10 Thread Ming Tsang
Hi Peter,
Thank you for the reply.
I did not know volta 2 can have no \alternative. That why I use volta 1.  I 
change volta 1 to volta 2 and the \unfoldRepeats works.  Thank you very much.
Next time I will try a minimal example.
Ming.

Sent from Mail for Windows 10

From: pe...@chubb.wattle.id.au
Sent: December 10, 2017 9:25 PM
To: Ming Tsang
Cc: lilypond-user@gnu.org
Subject: Re: \unfoldRepeats for midi file


Ming> Hi lilyponders, I try to produce file file that
Ming> unfoldRepeats. The following code did not produce repeats
Ming> volta. I need help.  Thanks, Ming

   Please next time try to produce a minimal example.

   You've asked for \repeat volta 1  which has no repeat.  Try \repeat
   volta 2 to play the tune twice.

Peter C

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


Re: \unfoldRepeats for midi file

2017-12-10 Thread peter

Ming> Hi lilyponders, I try to produce file file that
Ming> unfoldRepeats. The following code did not produce repeats
Ming> volta. I need help.  Thanks, Ming

   Please next time try to produce a minimal example.

   You've asked for \repeat volta 1  which has no repeat.  Try \repeat
   volta 2 to play the tune twice.

Peter C

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


\unfoldRepeats for midi file

2017-12-07 Thread Ming Tsang
Hi lilyponders,
I try to produce file file that unfoldRepeats. The following code did not 
produce repeats volta. I need help.
Thanks,
Ming

\version "2.19.80"
\language "english"

\header {
  subtitle = "Joy to the World / Angels We Have Heard on High"
}

global = {
  \key d \major
  \numericTimeSignature
  \time 2/4
}

eVar =
#(define-music-function (xx start stop) (list? index? index?)
   #{ #@(map (lambda (i) #{ $xx . #i #}) (iota (- stop start -1) start)) #})

\include "\articulate.ly"

   
sop.1  = { \key f\major \time 4/4 a'4 4 4 c'' |}  soj.1  = { d''4 cs''8. b'16 
|} 
sop.2  = { c''4. bf'8 a'2 |}   soj.2  = { a'4. g'8 |}
sop.3  = { a'4 g' a' c''|} soj.3  = { fs'4 e'|} 
sop.4  = { a'4. g'8 f'2 |\break }  soj.4  = { d'4. a'8 |}
sop.5  = { a'4 4 4 c'' |}  soj.5  = { b'4. 8 |}
sop.6  = { c''4. bf'8 a'2 |}   soj.6  = { cs''4. 8 |}
sop.7  = { a'4 g' a' c'' |}soj.7  = { d''4. 
\bar""\break 8 |}
sop.8  = { a'4. g'8 f'2 |\break }  soj.8  = { d''8( cs'') b'8( 
a') |}
sop.9  = { c''2( d''8 c'' bf' a' |}soj.9  = { a'8.( g'16 fs'8) 
d''8|}
sop.10  = { bf'2 c''8 bf' a' g' |} soj.10  = { d''8( cs''8) 
b'8( a') |} 
sop.11  = { a'2 bf'8 a' g' f') |}  soj.11  = { a'8.( g'16 fs'8) 
\bar""\break fs'8|}
sop.12  = { g'4. c'8 2 |}  soj.12  = { fs'8 8 8 16( g') 
|}
sop.13  = { f'4 g' a' bf' |}   soj.13  = { a'4. g'16( fs')|}
sop.14  = { a'2 g' |\break }   soj.14  = { e'8 8 8 16( 
fs')|}
sop.15  = { c''2( d''8 c'' bf' a' |}   soj.15  = {  g'4. 
\bar""\break fs'16( e') |}
sop.16  = { bf'2 c''8 bf' a' g' |}  soj.16  = { d'8( d''4) b'8 
|}
sop.17  = { a'2 bf'8 a' g' f') |}  soj.17  = { a'8.( g'16 fs'8) 
g'8 |} 
sop.18  = { g'4. c'8 2 |}  soj.18  = { fs'4 e' |}
sop.19  = { f'4 g' a' bf' |}   soj.19  = { d'2 |}
sop.20  = { a'2( g'2) |}soj.20  = { r4. r8 |}
sop.21  = { f'1 |  }   soj.21  = { R4*2 |}
soprano =   {
  \global
  \repeat volta 1 { \eVar \soj 1 19 }

  \soj.20 \soj.21 \break
  \repeat volta 1 { \eVar \sop 1 21 }
  
  R1 R1 \break
  \global
  \eVar \soj 1 19 \bar"|."
}

verseOne = \lyricmode {  \set fontSize = #2.0 }

choirPart = \new ChoirStaff <<
  \new Staff = "soprano" \soprano
  
>>

\score {  
  <<
 
\choirPart
  >>
  \layout { }
  %midi {
  %  \tempo 4=100
  %}
}
\score { \unfoldRepeats
  <<
  
\choirPart
  >>
  %\layout { }
  \midi {
\tempo 4=100
  }
}

% Rehearsal MIDI files:
rehearsalMidi = #
(define-music-function
 (parser location name midiInstrument lyrics) (string? string? ly:music?)
 #{
   \unfoldRepeats <<
 \new Staff = "soprano" \new Voice = "soprano" { \soprano }

 \context Staff = $name {
   \set Score.midiMinimumVolume = #0.5
   \set Score.midiMaximumVolume = #0.5
   \set Score.tempoWholesPerMinute = #(ly:make-moment 100 4)
   \set Staff.midiMinimumVolume = #0.8
   \set Staff.midiMaximumVolume = #1.0
   \set Staff.midiInstrument = $midiInstrument
 }
 \new Lyrics \with {
   alignBelowContext = $name
 } \lyricsto $name $lyrics
   >>
 #})
\book {
  \bookOutputSuffix "soprano"
  \score {
\rehearsalMidi "soprano" "soprano sax" \verseOne
\midi { }
  }
}


Sent from Mail for Windows 10

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


nested-repeats, BarNumbers and unfoldRepeats

2016-04-05 Thread Thomas Morley
Hi all,

the challenge: start a repeat with alternative endings in the second
volta of a previous repeat _and_ do BarNumbers correctly with
'numbers-with-letters _and_ correct midi while using \unfoldRepeats.

First attempt:

mus-tst = {
  \set Score.alternativeNumberingStyle = #'numbers-with-letters
  \override Score.BarNumber.break-visibility = #end-of-line-invisible
  \repeat volta 2 { cis'1 }
  \alternative {
{ d'1 }
{
  \set Score.voltaSpannerDuration = #(ly:make-moment 4/4)
  \repeat volta 2 {
e'1
#(make-music 'AlternativeEvent 'alternative-dir 1
'alternative-increment 0)
f'1
\unset Score.voltaSpannerDuration
  }
  \alternative {
{ g'1 a' }
{ b'1 c'' }
  }
}
  }
  d''1
  \bar "|."
}

\score {
  { \new Staff \mus-tst }
  \layout {}
  %\midi {}
}

\score {
  \unfoldRepeats
  { \new Staff \mus-tst }
  \layout {}
  %\midi {}
}

It does all as desired but
#(make-music 'AlternativeEvent 'alternative-dir 1 'alternative-increment 0)
is not really nice. How to do it more elegant?
This came up in the german forum:
http://www.lilypondforum.de/index.php?topic=2229.msg12386#msg12386

My own attempt:

\version "2.18.2"

#(define ((my-make-volta-set l1 l2) mus)
  (let* ((music (ly:music-deep-copy mus))
 (alts (ly:music-property music 'elements))
 (lalts (length alts))
 (times (ly:music-property music 'repeat-count)))
(map (lambda (x y xx yy)

   (make-music
'SequentialMusic
'elements
;; set properties for proper bar numbering
(append
 (list (make-music 'AlternativeEvent
   'alternative-dir xx
   'alternative-increment yy))
 (list x)
 (if (= y (1- lalts))
 (list (make-music 'AlternativeEvent
   'alternative-dir 1
   'alternative-increment 0))
 '()
 alts
 (iota lalts)
 l1
 l2)))

mus-tst = {
  \set Score.alternativeNumberingStyle = #'numbers-with-letters
  \override Score.BarNumber.break-visibility = #end-of-line-invisible
  \withMusicProperty #'elements-callback #(my-make-volta-set '(-1 0) '(1 0))
  \repeat volta 2 { cis'1 }
  \alternative {
{ d'1 }
{
  \set Score.voltaSpannerDuration = #(ly:make-moment 4/4)
  \repeat volta 2 {
e'1
f'1
\unset Score.voltaSpannerDuration
  }
  \alternative {
{ g'1 a' }
{ b'1 c'' }
  }
}
  }
  d''1
  \bar "|."
}

\score {
  { \new Staff \mus-tst }
  \layout {}
  %\midi {}
}

\score {
  \unfoldRepeats
  { \new Staff \mus-tst }
  \layout {}
  %\midi {}
}

Is slightly different in printed output, but with recent
devel-versions the unfoldRepeats-version is terrible.


Hence the other question:
I suspect
https://sourceforge.net/p/testlilyissues/issues/4252/
being responsible for the difference compared with 2.18.

Though,
is my coding that bad?
Or is bordercase triggered not covered by 4252?


Thanks,
  Harm

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


unfoldRepeats and : shortcut

2016-01-21 Thread james
Hello, I've discovered something that looks to be intentional behavior, just 
not expected. The : shortcut for tremolos doesn't expand in unfoldRepeats. Is 
the only way to get tremolos to expand to use the full notation?

\version "2.18.2"
test = \relative c' { \repeat tremolo 4 { 16 e } \repeat tremolo 4 {  
d } a'2:8 g: }
\score { \new Staff \test }
\score { \new Staff \unfoldRepeats { \test } }

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


Re: unfoldRepeats and : shortcut

2016-01-21 Thread lilypond

Am 2016-01-21 15:57, schrieb james:

Hello, I've discovered something that looks to be intentional
behavior, just not expected. The : shortcut for tremolos doesn't
expand in unfoldRepeats. Is the only way to get tremolos to expand to
use the full notation?

\articulate (from articulate.ly) does this expansion (among others). If 
you want this expansion but not different note lengths for staccati etc. 
you can change the shortening factors.


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


Re: unfoldRepeats and : shortcut

2016-01-21 Thread james

> On Jan 21, 2016, at 6:36 PM, lilyp...@maltemeyn.de wrote:
> 
> Am 2016-01-21 15:57, schrieb james:
>> Hello, I've discovered something that looks to be intentional
>> behavior, just not expected. The : shortcut for tremolos doesn't
>> expand in unfoldRepeats. Is the only way to get tremolos to expand to
>> use the full notation?
> \articulate (from articulate.ly) does this expansion (among others). If you 
> want this expansion but not different note lengths for staccati etc. you can 
> change the shortening factors.
> 

Thanks, I didn't realize it had advanced so far as to be part of the main 
distribution.



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


General questions - \unfoldRepeats

2014-03-04 Thread MING TSANG
Hi, lilyponders:
 \unfoldRepeats generates a midi file with \repeat volta 2 music properly. 
Is it possible to generate midi file with D.S. al Code; segno; To Coda 
and Coda structure of a music?  I like to listen the generated midi contains 
all the D.S. al Code; segno; To Coda and Coda.
Emmanuel,
Ming___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: General questions - \unfoldRepeats

2014-02-26 Thread Yming

Sent from my NOOK

MING TSANG tsan...@rogers.com wrote:

Hi, lilyponders:
 \unfoldRepeats generates a midi file with \repeat volta 2 music properly. 
Is it possible to generate midi file with D.S. al Code; segno; To Coda 
and Coda structure of a music?  I like to listen the generated midi contains 
all the D.S. al Code; segno; To Coda and Coda.
Emmanuel,
Ming___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: General questions - \unfoldRepeats

2014-02-26 Thread Marc Hohl

Am 26.02.2014 11:58, schrieb Yming:


Sent from my NOOK

MING TSANG tsan...@rogers.com wrote:

Hi, lilyponders:
  \unfoldRepeats generates a midi file with \repeat volta 2 music
properly.
Is it possible to generate midi file with D.S. al Code; segno; To
Coda and Coda structure of a music?  I like to listen the generated
midi contains all the D.S. al Code; segno; To Coda and Coda.


No straightforward AFAIK. You can divide your music in parts like

\IntroToSegno
\SegnoToCoda
\CodaToEnd
\Coda

and create a separate \midi block with the correct order

\IntroToSengo
\SegnoToCoda
\CodaToEnd
\SegnoToCoda
\Coda

HTH,

Marc

Emmanuel,
Ming


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




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


Re: General questions - \unfoldRepeats

2014-02-26 Thread Martin Tarenskeen


On Wed, 26 Feb 2014, Yming wrote:



 Sent from my NOOK

 MING TSANG tsan...@rogers.com wrote:

 Hi, lilyponders:
  \unfoldRepeats generates a midi file with \repeat volta 2 music
 properly. 
 Is it possible to generate midi file with D.S. al Code; segno; To Coda
 and Coda structure of a music?  I like to listen the generated midi
 contains all the D.S. al Code; segno; To Coda and Coda.


This is how I do it:
- Organize the sections of your music in separate variables in a smart way
- Then it will not be that much work to make 2 different \score blocks, one for 
\layout{} and one for \midi{}


--

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


Re: General questions - \unfoldRepeats

2014-02-26 Thread MING TSANG
Martin,
Thank You very much.  Marc also suggested the same way. I am pursuing it now.
Emmanuel,
Ming



On Wednesday, February 26, 2014 7:21:06 AM, Martin Tarenskeen 
m.tarensk...@zonnet.nl wrote:
 



On Wed, 26 Feb 2014, Yming wrote:

 
 Sent from my NOOK
 
 MING TSANG tsan...@rogers.com wrote:
 
 Hi, lilyponders:
  \unfoldRepeats generates a midi file with \repeat volta 2 music properly. 
 Is it possible to generate midi file with D.S. al Code; segno; To Coda 
 and Coda structure of a music?  I like to listen the generated midi
 contains all the D.S. al Code; segno; To Coda and Coda.

This is how I do it:
- Organize the sections of your music in separate variables in a smart way
- Then it will not be that much work to make 2 different \score blocks, 
one for \layout{} and one for \midi{}

-- 

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


\partial and \unfoldRepeats

2012-05-17 Thread Christopher Webster
The intention of the input below was to produce a PDF with normal 
repeat notation plus a MIDI file in which the repeat was expanded 
explicitly.


\version 2.14.1

dots =
\relative c'
{
\partial 8 c'8
c8 c c c
c4 r8
}

\book
{
\score
{
\new Staff
{
\time 2/4
\repeat volta 2 \dots
}
}
}

\book
{
\score
{
\unfoldRepeats
{
\new Staff
{
\time 2/4
\repeat volta 2 \dots
}
}
\midi { }
}
}

The upbeat is handled perfectly by the \partial construct for the 
PDF output, but provokes a warning in conjunction with the MIDI 
output, presumably as a result of the \unfoldRepeats:


GNU LilyPond 2.14.1
Processing `temp1.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `temp1.ps'...
Converting to `./temp1.pdf'...
Interpreting music...
temp1.ly:6:16: warning: trying to use \partial after the start of 
a piece


\partial 8 c'8
MIDI output to `temp1-1.midi'...
success: Compilation successfully completed

I can fix this by replacing \partial 8 with \set 
Timing.measurePosition = #(ly:make-moment 3 8), though it seems I 
then also have to add \set Score.currentBarNumber = #0 to  make 
the bar (measure) numbers come out as expected.


Is that the recommendation, or have I missed an opportunity to do 
something more elegant?


Thanks in advance

/Christopher/.




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


Re: \partial and \unfoldRepeats

2012-05-17 Thread James
Hello,

On 17 May 2012 11:50, Christopher Webster
christop...@claytonwebster.net wrote:
 The intention of the input below was to produce a PDF with normal repeat
 notation plus a MIDI file in which the repeat was expanded explicitly.

 \version 2.14.1

 dots =
     \relative c'
     {
         \partial 8 c'8
         c8 c c c
         c4 r8
     }

 \book
 {
     \score
     {
         \new Staff
         {
             \time 2/4
             \repeat volta 2 \dots
         }
     }
 }

 \book
 {
     \score
     {
         \unfoldRepeats
         {
             \new Staff
             {
                 \time 2/4
                 \repeat volta 2 \dots
             }
         }
         \midi { }
     }
 }

 The upbeat is handled perfectly by the \partial construct for the PDF
 output, but provokes a warning in conjunction with the MIDI output,
 presumably as a result of the \unfoldRepeats:

 GNU LilyPond 2.14.1
 Processing `temp1.ly'
 Parsing...
 Interpreting music...
 Preprocessing graphical objects...
 Finding the ideal number of pages...
 Fitting music on 1 page...
 Drawing systems...
 Layout output to `temp1.ps'...
 Converting to `./temp1.pdf'...
 Interpreting music...
 temp1.ly:6:16: warning: trying to use \partial after the start of a piece

     \partial 8 c'8
 MIDI output to `temp1-1.midi'...
 success: Compilation successfully completed

 I can fix this by replacing \partial 8 with \set Timing.measurePosition =
 #(ly:make-moment 3 8), though it seems I then also have to add \set
 Score.currentBarNumber = #0 to  make the bar (measure) numbers come out as
 expected.

 Is that the recommendation, or have I missed an opportunity to do something
 more elegant?


http://lilypond.org/doc/v2.14/Documentation/notation-big-page.html#upbeats

See known issues and warnings.

James

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


Re: \partial and \unfoldRepeats

2012-05-17 Thread James
Hello again..

On 17 May 2012 18:57, James pkx1...@gmail.com wrote:
 Hello,

 On 17 May 2012 11:50, Christopher Webster
 christop...@claytonwebster.net wrote:
 The intention of the input below was to produce a PDF with normal repeat
 notation plus a MIDI file in which the repeat was expanded explicitly.

 \version 2.14.1

 dots =
     \relative c'
     {
         \partial 8 c'8
         c8 c c c
         c4 r8
     }

 \book
 {
     \score
     {
         \new Staff
         {
             \time 2/4
             \repeat volta 2 \dots
         }
     }
 }

 \book
 {
     \score
     {
         \unfoldRepeats
         {
             \new Staff
             {
                 \time 2/4
                 \repeat volta 2 \dots
             }
         }
         \midi { }
     }
 }

 The upbeat is handled perfectly by the \partial construct for the PDF
 output, but provokes a warning in conjunction with the MIDI output,
 presumably as a result of the \unfoldRepeats:

 GNU LilyPond 2.14.1
 Processing `temp1.ly'
 Parsing...
 Interpreting music...
 Preprocessing graphical objects...
 Finding the ideal number of pages...
 Fitting music on 1 page...
 Drawing systems...
 Layout output to `temp1.ps'...
 Converting to `./temp1.pdf'...
 Interpreting music...
 temp1.ly:6:16: warning: trying to use \partial after the start of a piece

     \partial 8 c'8
 MIDI output to `temp1-1.midi'...
 success: Compilation successfully completed

 I can fix this by replacing \partial 8 with \set Timing.measurePosition =
 #(ly:make-moment 3 8), though it seems I then also have to add \set
 Score.currentBarNumber = #0 to  make the bar (measure) numbers come out as
 expected.

 Is that the recommendation, or have I missed an opportunity to do something
 more elegant?


 http://lilypond.org/doc/v2.14/Documentation/notation-big-page.html#upbeats

 See known issues and warnings.


http://lilypond.org/doc/v2.15/Documentation/notation-big-page.html#upbeats

Still see known issues and warnings but it has a better example, this
section has had an update since the 2.14 doc.

james

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


Re: \partial and \unfoldRepeats

2012-05-17 Thread Christopher Webster

Many thanks for that.

The pedant in me wishes to object that it wasn't really I who put 
the \partial anywhere other than the beginning of the piece - it 
was \unfoldRepeats that copied it for me.  But I'm relieved to 
see that the use of Timing.measurePosition is the idiomatic 
work-around.


I also think it would be a friendly improvement to the 
documentation if it pointed out that setting 
Timing.measurePosition has a different effect on bar numbering 
from \partial.


Thanks again for your help.

/Christopher/.

On 2012-05-17 19:58, James wrote:

Hello again..

On 17 May 2012 18:57, Jamespkx1...@gmail.com  wrote:

  . . .
http://lilypond.org/doc/v2.14/Documentation/notation-big-page.html#upbeats

See known issues and warnings.


http://lilypond.org/doc/v2.15/Documentation/notation-big-page.html#upbeats

Still see known issues and warnings but it has a better example, this
section has had an update since the 2.14 doc.

james

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


unfoldRepeats for midi - a little hack.

2009-07-06 Thread Gilles THIBAULT
Here is a possible solution for the problem you get when you put all your 
\repeat volta  structure in a separate variable (often named global)  and 
then you want unfold all your music (for MIDI output for

example).
.

The globalizeMusic.ly (see joined files ) proposes a function
\globalizeMusic that can be used like this :
%%
\globalizeMusic \global
   \new StaffGroup
   {
   \new Staff  \musicA
   \new Staff  \musicB
   }
%%
it will have the same effects than
%%
   \new StaffGroup
   {
   \new Staff  \global \musicA
   \new Staff  global \musicB
   }
%%
BUT all the  \repeat volta .. will be copied inside each Staff 
so that you 'll get the right music when you call \unfoldRepeats.


Hope it will be usefull.

Gilles

NB
globalizeMusic.ly uses extractMusic.ly described here :
http://lsr.dsi.unimi.it/LSR/Item?id=542


#(use-modules (srfi srfi-39))
#(define *current-moment* (make-parameter (ly:make-moment 0 1 0 1)))

#(define moment-null (ly:make-moment 0 1 0 1))

#(define (music-has-no-lenght? music)
 Is music empty of notes, rests or skips ?
	(equal? (ly:music-length music) moment-null))
	

#(define (simultaneous? music )
 (memq (ly:music-property music 'name) 
 		(list 'SimultaneousMusic 'EventChord)))
	
#(define (defined-music? music)
 (not (eq? 'Music (ly:music-property music 'name

#(define (chord-event? music )
	(eq? 'EventChord (ly:music-property music 'name)))

#(define (get-duration music )
 (ly:music-property music 'duration))
			
#(define (moment=?	 momentA momentB )
(not (ly:moment? momentA momentB)))

#(define (moment-inside? moment from-moment to-moment)
	(and
		(moment=? moment from-moment)
		(ly:moment? moment to-moment)))

#(define (whole-music-inside? begin-music end-music left-range right-range)
	(and (moment=? begin-music left-range)
		 (moment=?	right-range end-music )
		 (not (equal?  begin-music right-range
		 
#(define (whole-music-outside? begin-music end-music left-range right-range)
	  (or (moment=? left-range end-music)
		  (moment=? begin-music right-range )))

#(define (moment-duration	moment) ;% see duration.cc in Lilypond sources (Duration::Duration)
(let* ((p (ly:moment-main-numerator moment))
	   (q (ly:moment-main-denominator moment))
	   (k (- (ly:intlog2 q) (ly:intlog2 p)))
	   (dots 0))
 (if ( (ash p k) q) (set! k (	1+ k))) ;% (ash p k) = p * 2^k
 (set! p (- (ash p k) q))
 (while (begin (set! p (ash p 1))(= p q))
 	(set! p (- p q))
	(set! dots (1+ dots)))
 (if ( k 6)
 	(ly:make-duration 6 0)
	(ly:make-duration k dots))
))
	
#(define (set-rest-duration moment) 
 (ly:make-duration 0 
 	0 
	(ly:moment-main-numerator moment)
	(ly:moment-main-denominator moment)))
	 
#(define (extract-music music from to)
 Keeps only music beetween `from' and `to', `from' and `to' as moment
(let ((begin-pos (*current-moment*))
	  (end-pos (ly:moment-add (*current-moment*) (ly:music-length music	  
 (cond 
	((whole-music-inside? begin-pos end-pos from to) 
		(*current-moment* end-pos)
		music)
	((whole-music-outside? begin-pos end-pos from to)
		(*current-moment* end-pos)
		(make-music 'Music))
	(else 			;% the intervals [begin-pos end-pos][from to] overlaps
	  (cond;% inside a chords or for multiRest events
		((ly:duration? (get-duration music))
			(if (moment-inside? begin-pos from to) 
(set! end-pos to)
(begin
	(set! begin-pos from)
	(if (not (moment-inside? end-pos from to))(set! end-pos to	
			(ly:music-set-property! music 'duration 
(if (eq? 'MultiMeasureRestMusic (ly:music-property music 'name))
	(set-rest-duration (ly:moment-sub end-pos begin-pos))
	(moment-duration  (ly:moment-sub end-pos begin-pos	
			(*current-moment* end-pos)
			music) 
		(else			;% for containers of chords
			(let ((elts (ly:music-property music 'elements))
			  	  (elt  (ly:music-property music 'element)))	
			  (if (ly:music? elt)
(ly:music-set-property! music 'element (extract-music elt from to)))
			  (if (pair? elts) 
(cond  
  ((simultaneous? music)		;% simultaneous music OR EventChords
	(ly:music-set-property! music 'elements (filter
		(lambda (evt)
			(or (music-has-no-lenght? evt) ;% i.e for 'VoiceSeparator 
(begin
	(*current-moment* begin-pos)	;% restore *current-moment*
	(set! evt (extract-music evt from to))
	(defined-music? evt
		elts))
	(*current-moment* end-pos))			
 (else 			;% sequential music 
 	(ly:music-set-property! music 'elements (filter
		(lambda (evt)
			(set! evt (extract-music evt from to))
			(defined-music? evt))
		elts)
music)))
	
	
%% the main function 
extractMusic =#(define-music-function (parser location music from during)
(ly:music? ly:music? ly:music?)
 (let* ((from-length (ly:music-length from))
(during-length (ly:music-length during))
(to-length (ly:moment

Re: unfoldRepeats for midi

2009-06-06 Thread Paul Scott

Mark Polesky wrote:

Paul Scott wrote:
  

2.13.1
I have read all of NR 3.5
Should the following work to unfold the above repeats for a MIDI
file?



I'm assuming you read this page:
http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI
  


I said I read all of 3.5 :)

Following the template provided there, I believe this should work:

\score {
   { \unfoldRepeats \global } \melody 
  \layout {
% layout stuff...
  }
}
\score {
   { \unfoldRepeats \global } \melody 
  \midi {
\context {
  \Score tempoWholesPerMinute = #(ly:make-moment 120 4)
}
  }
}

Let me know if it doesn't. 


It doesn't work.  At first I didn't use \unfoldRepeats for the graphical 
output as you show above.  But adding the \unfoldRepeats to the first 
(graphical) part the graphical music is unfolded in a strange way.  The 
graphical music is generated with the repeat signs omitted but nothing 
unfolded.  The music would be 16 bars long and it is but the last 6 bars 
are blank.


Here is what I used last:

\version 2.13.1
\include english.ly
#(set-global-staff-size 24)

global = { \repeat volta 2 s1*6 \alternative { { s1*2 } { s1*2 } } }
melody = \relative c' {
 \key d \major
 fs2 fs4. fs8 g4 fs e d d2( ~ d8 e8 d4) a2 a8 b d4 fs e2. fs4 e d e
 fs2 ~ fs8 g fs4 e1 e8 d ~ d2. ~ d1
}

\score {
 
   \new Staff = soprano 
 \context Voice = soprano {  { \unfoldRepeats \global } \melody  }
   
 
 \layout{ }
}

\score{
 \new Score{  { \unfoldRepeats \global } \melody  }
 \midi{
   \context{ \Score tempoWholesPerMinute = #(ly:make-moment 120 4) }
 }
}

Thanks,

Paul





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


Re: unfoldRepeats for midi

2009-06-06 Thread Mark Polesky
Paul Scott wrote:
 It doesn't work.  At first I didn't use \unfoldRepeats for the
 graphical output as you show above.  But adding the
 \unfoldRepeats to the first (graphical) part the graphical music
 is unfolded in a strange way.  The graphical music is generated
 with the repeat signs omitted but nothing unfolded.  The music
 would be 16 bars long and it is but the last 6 bars are blank.


Okay, I looked into this, and here's what I've learned.

 global = { \repeat volta 2 s1*6 \alternative { { s1*2 } { s1*2 } } }

Change s1*6 to { s1*6 }. The \repeat syntax is
  \repeat volta repeatcount musicexpr
and all music expressions require curly braces.


 \score {
 
   \new Staff = soprano 
 \context Voice = soprano {  { \unfoldRepeats \global } \melody  }
   
 
 \layout{ }
 }

If you're going to use \unfoldRepeats in a \score with \layout, it
doesn't make sense to apply it to only one music expression if
there are other simultaneous expressions. Since \global and
\melody are simultaneous expressions, move \unfoldRepeats outside:

\score {
  
  \new Staff = soprano

\context Voice = soprano
  \unfoldRepeats {  \global \melody  }

  
  \layout{ }
}

However, it may make even more sense to apply \unfoldRepeats to
the whole score, so you don't have to keep applying it to other
voices (should there be any)...

\score {
  \unfoldRepeats
  
  \new Staff = soprano

\context Voice = soprano {  \global \melody  }

  
  \layout{ }
}

Also consider Staff and Voice naming. Are you going to have
non-soprano Voices in the soprano Staff? If not, you probably
don't need the \context Voice = soprano since a Voice context is
implicitly created with any music expression (though there are
reasons for explicitly instantiating the Voice context). Either
way (and honestly I don't know if this makes a difference), I
wouldn't want two different contexts with the same name, even if
they are nested within each other. You might consider sopranoStaff
and sopranoVoice, for instance.

Also,  and  are only needed when there's more than one
simultaneous expression. So if sopranoStaff will only contain
sopranoVoice, you could do this:

\score {
  \unfoldRepeats
  
  \new Staff = sopranoStaff
\context Voice = sopranoVoice {  \global \melody  }
  
  \layout { }
}

And if  and  enclose simultaneous expressions which already
have curly braces built into their definition -- like \global and
\melody do, you don't need an extra pair of curly braces around
the  .

\score {
  \unfoldRepeats
  
  \new Staff = sopranoStaff
\context Voice = sopranoVoice  \global \melody 
  
  \layout { }
}

I've left the outer   with the assumption that other voices
will eventually be added, but if not, you could remove those too.

Unfortunately, after all this, I've learned that \unfoldRepeats
doesn't natively work when the repeats are in an expression
separate from the notes, even if they're funneled together before
calling \unfoldRepeats. See
http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00161.html
for a response to my post on the developers mailing-list regarding
this question.

So you must do something like this:

global = { \key d \major }
melody = \relative c' {  
  \repeat volta 2 {
fs2 fs4. fs8
g4 fs e d
d2( ~ d8 e8 d4)
a2 a8 b d4
fs e2.
fs4 e d e
  }
  \alternative {
{
  fs2 ~ fs8 g fs4
  e1
} {
  e8 d ~ d2. ~
  d1
}
  }
}

\score {
  \unfoldRepeats
  
  \new Staff = sopranoStaff
\context Voice = sopranoVoice  \global \melody 
  
  \layout { }
}

Also, in your \score with the \midi block, you have this line:
 \new Score{  { \unfoldRepeats \global } \melody  }

I don't think \new Score is used anymore. You could reduce this
line to 

  \unfoldRepeats 
  
  \melody
  

I've left the   with the assumption that other voices will 
eventually be added, and if so, consider renaming melody to
something like sopMusic. If melody is the only voice, then of
course you don't need the  , and you can just do

  \unfoldRepeats \melody


\score {
  \unfoldRepeats 
  
  \melody
  
  \midi {
\context {
  \Score tempoWholesPerMinute = #(ly:make-moment 120 4)
}
  }
}

Also, use \new instead of \context when a Voice first appears. Not
strictly necessary, but in complex scores, it's helpful to be able
to find the first instance of a specific context.

One last note: it may save space to put a lot of notes on one line
in your ly file, but it's easier for others to read your code if
it's nicely indented.

I've attached a working version of the file.

HTH.
- Mark



  \version 2.13.1
\include english.ly
#(set-global-staff-size 24)
% I need to add this line using LilyPondTool on Windows:
% #(ly:set-option 'midi-extension midi)

global = { \key d \major }
sopMusic = \relative c' {  
  \repeat volta 2 {
fs2 fs4. fs8
g4 fs e d
d2( ~ d8 e8 d4)
a2 a8 b d4
fs e2.
fs4 e d e
  }
  \alternative {
{
  fs2 ~ fs8 g fs4
  e1
} {
  e8

Re: unfoldRepeats for midi

2009-06-06 Thread Paul Scott

Hi Mark,

After I wrote most of what I wrote below I discovered your comment  
about your thread on the developers list.  I haven't read that thread  
yet but it seems to show that unfoldRepeats is not a very useful  
command.


Thanks, Mark, for all the work you have done on this.  Unfortunately  
you have gone in a direction that is not useful to me and have left  
me without a useful answer.


The most important thing is that I want the timing structure in my  
\global as I originally had it so that I don't have to duplicate it  
for everything part or voice.  I have tried to make a few simple  
changes to your code to get back to my structure and no longer have  
working code.  I have attached that code.

unfold-repeatspaul.ly
Description: Binary data



I will also make some comments on your thoughts below.

On Jun 6, 2009, at 1:19 PM, Mark Polesky wrote:


Paul Scott wrote:

It doesn't work.  At first I didn't use \unfoldRepeats for the
graphical output as you show above.  But adding the
\unfoldRepeats to the first (graphical) part the graphical music
is unfolded in a strange way.  The graphical music is generated
with the repeat signs omitted but nothing unfolded.  The music
would be 16 bars long and it is but the last 6 bars are blank.



Okay, I looked into this, and here's what I've learned.


global = { \repeat volta 2 s1*6 \alternative { { s1*2 } { s1*2 } } }


Change s1*6 to { s1*6 }. The \repeat syntax is
  \repeat volta repeatcount musicexpr
and all music expressions require curly braces.



This is simply not true.  I have done this and similar things many  
times.  In most or all of the programming languages I have written  
code in and in Lilypond curly braces are only needed to combine more  
than one simple piece of code into a single entity.  For example

repeat unfold 25 d16
works just fine.






\score {

  \new Staff = soprano 
\context Voice = soprano {  { \unfoldRepeats \global }  
\melody  }




\layout{ }
}


If you're going to use \unfoldRepeats in a \score with \layout, it
doesn't make sense to apply it to only one music expression if
there are other simultaneous expressions. Since \global and
\melody are simultaneous expressions, move \unfoldRepeats outside:



I think it does make sense to keep the timing structure separate from  
the pitch structure.  I know there are other Lily users who do the  
same thing.





\score {
  
  \new Staff = soprano

\context Voice = soprano
  \unfoldRepeats {  \global \melody  }




  \layout{ }
}

However, it may make even more sense to apply \unfoldRepeats to
the whole score, so you don't have to keep applying it to other
voices (should there be any)...



I didn't want the written music to be unfolded.



Also consider Staff and Voice naming. Are you going to have
non-soprano Voices in the soprano Staff? If not, you probably
don't need the \context Voice = soprano since a Voice context is
implicitly created with any music expression (though there are
reasons for explicitly instantiating the Voice context). Either
way (and honestly I don't know if this makes a difference), I
wouldn't want two different contexts with the same name, even if
they are nested within each other. You might consider sopranoStaff
and sopranoVoice, for instance.



This was a quick attempt based on old code of mine and was not  
totally cleaned up.




Also,  and  are only needed when there's more than one
simultaneous expression. So if sopranoStaff will only contain
sopranoVoice, you could do this:

\score {
  \unfoldRepeats
  
  \new Staff = sopranoStaff
\context Voice = sopranoVoice {  \global \melody  }



  \layout { }
}

And if  and  enclose simultaneous expressions which already
have curly braces built into their definition -- like \global and
\melody do, you don't need an extra pair of curly braces around
the  .



I do know that.



\score {
  \unfoldRepeats
  
  \new Staff = sopranoStaff
\context Voice = sopranoVoice  \global \melody 



  \layout { }
}

I've left the outer   with the assumption that other voices
will eventually be added, but if not, you could remove those too.

Unfortunately, after all this, I've learned that \unfoldRepeats
doesn't natively work when the repeats are in an expression
separate from the notes, even if they're funneled together before
calling \unfoldRepeats. See
http://lists.gnu.org/archive/html/lilypond-devel/2009-06/msg00161.html
for a response to my post on the developers mailing-list regarding
this question.



I hadn't read this part when I did my testing and wrote what I wrote  
above.  I will check out that thread.  If that is true than  
unfoldRepeats seems pointless to me.


Your code misses any usefulness of unfoldRepeats which you must have  
have discovered in your other thread.




One last note: it may save space to put a lot of notes on one line
in your ly file, but it's easier for others to read your code if
it's nicely indented.



Emacs indents my code just fine but sticking

Re: unfoldRepeats for midi

2009-06-06 Thread Mark Polesky

Paul Scott wrote:
 Change s1*6 to { s1*6 }. The \repeat syntax is
  \repeat volta repeatcount musicexpr
 and all music expressions require curly braces.

 This is simply not true.

I now see that I was wrong about that, sorry. This construct does
in fact work:

\relative {
  \repeat volta 2
  a'1
  \alternative {
{ b }
{ c }
  }
}


**


 If you're going to use \unfoldRepeats in a \score with
 \layout, it doesn't make sense to apply it to only one music
 expression if there are other simultaneous expressions. Since
 \global and \melody are simultaneous expressions, move
 \unfoldRepeats outside:

 I think it does make sense to keep the timing structure separate
 from the pitch structure.  I know there are other Lily users who
 do the same thing.

Yes, I do too. The approach works marvelously when setting
contemporary ensemble works which have meter changes in every
other measure. It is easy to write one meters expression and
funnel that into all the voices. That saves a lot of file-space,
typing, and aggravation.

Regarding my original comment though, my point was that
{ \unfoldRepeats \global } \melody 
ought to unfold the spacers only, and not the actual notes. But
it's a moot point, because that's what \unfoldRepeats does anyway,
even if you type
  \unfoldRepeats  \global \melody 
Though I do agree that it would be useful if it worked the way you
suggest. Let's see if something comes out of the -devel thread.


**


 However, it may make even more sense to apply \unfoldRepeats
 to the whole score, so you don't have to keep applying it to
 other voices (should there be any)...

 I didn't want the written music to be unfolded.

Then remove \unfoldRepeats from the \score block that has \layout
and only use \unfoldRepeats from the \score block that has \midi.


**


 I hadn't read this part when I did my testing and wrote what I
 wrote above.  I will check out that thread.  If that is true
 than unfoldRepeats seems pointless to me.

 Your code misses any usefulness of unfoldRepeats which you must
 have discovered in your other thread.

I think that's somewhat exaggerated. \unfoldRepeats is not
pointless, it's just not as advanced as you want it to be. Let's
see if something comes out of the -devel thread.


**


 Emacs indents my code just fine but sticking to one bar per line 
 would take far too much scrolling in much of the music I work
 on.  My compromise is to never break a line in the middle of a
 bar.

That's fine, but keep in mind that it's easier for others to spot
errors in your code if it's nicely organized. Consequently, you're
more likely to get a response if it is. A proofreader may end up
reformatting your code anyway just so s/he can read it clearly.


**


 Thanks again

Happy to help.
- Mark


  


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


unfoldRepeats for midi

2009-06-05 Thread Paul Scott

2.13.1

I have read all of NR 3.5

If I have this structure:
global = { \repeat volta 2 s1*6 \alternative { { s1*2 } { s1*2 } } }

Should the following work to unfold the above repeats for a MIDI file?

\score{
 \new Score{  { \unfoldRepeats \global } \melody  }
 \midi{
   \context{ \Score tempoWholesPerMinute = #(ly:make-moment 120 4) }
 }
}

Thanks,

Paul Scott









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


Re: unfoldRepeats for midi

2009-06-05 Thread Mark Polesky

Paul Scott wrote:
 2.13.1
 I have read all of NR 3.5
 Should the following work to unfold the above repeats for a MIDI
 file?

I'm assuming you read this page:
http://lilypond.org/doc/v2.13/Documentation/user/lilypond/Repeats-in-MIDI

Following the template provided there, I believe this should work:

\score {
   { \unfoldRepeats \global } \melody 
  \layout {
% layout stuff...
  }
}
\score {
   { \unfoldRepeats \global } \melody 
  \midi {
\context {
  \Score tempoWholesPerMinute = #(ly:make-moment 120 4)
}
  }
}

Let me know if it doesn't. If it does, then the next question is:
Did you read NR 3.5.4 Repeats in MIDI and did you find it
confusing? If so, what exactly confused you? That way we can try
to make it clearer for future users, which is always important to
us!

HTH.
- Mark


  


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


RE: Feat. request: autobehaviour of \unfoldRepeats

2009-04-11 Thread Piero Faustini

Thanks Valentin,

 It is now: http://code.google.com/p/lilypond/issues/detail?id=769


_
Quante ne sai? Scoprilo con CrossWire!
http://clk.atdmt.com/GBL/go/140630367/direct/01/___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread MonAmiPierrot

Hello,
I wonder why I (and, as I can imagine, 99% of users out there) have always
to put \unfoldRepeats in a different \score block just for correct MIDI
output, thus having to put in a variable all the \score content and use it
in both \score blocks.
 It's not -till now - a problem for me, but I feel it like a complication
(and thus, a potential danger) and I can't figure out why this should not be
the default MIDI behaviour, so that only if you don't want this you'll have
to put some code tweak.
Is there some technical problem? Any other reason not to change this
behaviour? If so, is there a manner to include this behaviour in a external
GenSetting.ly file in order to include it and having a single \score file
behave like this? 
thanks

Piero

-
Piero Faustini, PhD student
Dipartimento di Scienze Storiche
Sezione musicologia
Università di Ferrara 

Main Software used:

- LyX 1.6.1 on WinXP sp3; EndNote  JabRef
- MikTex
- LaTeX class: Koma book
- Lilypond 2.12 for example excerpts
- BibLaTeX for bibliographies 


-- 
View this message in context: 
http://www.nabble.com/Feat.-request%3A-autobehaviour-of-%5CunfoldRepeats-tp22985125p22985125.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Graham Percival
On Fri, Apr 10, 2009 at 01:57:12AM -0700, MonAmiPierrot wrote:
 
 I wonder why I (and, as I can imagine, 99% of users out there) have always
 to put \unfoldRepeats in a different \score block just for correct MIDI
 output, thus having to put in a variable all the \score content and use it
 in both \score blocks.

I *never* put \unfoldRepeats.  If you want real music, listen to
musicians.  If you want to check your typesetting, repeats just
waste your time.

Fortunately, there's a simple way for both of us to be happy: the
status pro.

Cheers,
- Garham


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Werner LEMBERG

 On Fri, Apr 10, 2009 at 05:25:01PM +0800, Graham Percival wrote:
 Fortunately, there's a simple way for both of us to be happy: the
 status pro.
 
 *facepalms*
 
 I cannot believe I just wrote that.

In dubio prosecco.


Werner


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Graham Percival
On Fri, Apr 10, 2009 at 05:25:01PM +0800, Graham Percival wrote:
 Fortunately, there's a simple way for both of us to be happy: the
 status pro.

*facepalms*

I cannot believe I just wrote that.

Cheers,
- Graham I'm a writer! Percival


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread MonAmiPierrot



Graham Percival-3 wrote:
 
 
 I *never* put \unfoldRepeats.  If you want real music, listen to
 musicians. 
 
Uhm... so, why don't we abolish \midi output?

I undestand what you said. It's because you mostly use \repeat for just
\repeats volta, which I can understand is THE most used \repeat usage (so,
I apologize for the 99% of users). For me, I only use \repeat percent
and most of all \repeat tremolo. In both cases, audio output is important.
At least for tremolos, you'll perfectly agree that there's no point in not
playing it by midi (midi only play the note(s)  that represent the length of
tremolo, not the notes of which trmolo actually consists: it doesn't make
sense, for me) I transcribe a lot of 19th century opera orch and piano
scores and in some operas there's almost no page without tremolos.
I would like to listen how it sounds, even with MIDI.
Unless, of course, you come in my studio  with a bunch of singers and a
not-above-average late 19th century orchestra, direct them (and occasionally
play piano) when I need. Just when I need, of course, you'll have plenty of
spare time! ;)


bye
H.
P.S. Perhaps, the \unfoldRepeats behaviour should be the default behaviour
in case of \repeat percent/tremolo, and not for \repeat volta (or
additionally in voltas also in case of different alternative endings). I
would like to know your (and all) opinions.



-
Piero Faustini, PhD student
Dipartimento di Scienze Storiche
Sezione musicologia
Università di Ferrara 

Main Software used:

- LyX 1.6.1 on WinXP sp3; EndNote  JabRef
- MikTex
- LaTeX class: Koma book
- Lilypond 2.12 for example excerpts
- BibLaTeX for bibliographies 


-- 
View this message in context: 
http://www.nabble.com/Feat.-request%3A-autobehaviour-of-%5CunfoldRepeats-tp22985125p22985879.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Graham Percival
On Fri, Apr 10, 2009 at 03:08:32AM -0700, MonAmiPierrot wrote:
 
 Graham Percival-3 wrote:
  
  
  I *never* put \unfoldRepeats.  If you want real music, listen to
  musicians. 
  
 Uhm... so, why don't we abolish \midi output?

Because you cut out the relevant part of the quote.  \midi is
useful for checking that you've entered the notes correctly.  If
you skipped over a note or something, the clashing chords will be
*really* noticeable.

 For me, I only use \repeat percent and most of all \repeat
 tremolo. In both cases, audio output is important.  At least
 for tremolos, you'll perfectly agree that there's no point in
 not playing it by midi (midi only play the note(s)  that
 represent the length of tremolo, not the notes of which trmolo
 actually consists: it doesn't make sense, for me)

Ah, I didn't realize that.  Yes, it would be nice if midi played
the real notes.  If that isn't already in the google tracker, it
should be added.

 P.S. Perhaps, the \unfoldRepeats behaviour should be the default behaviour
 in case of \repeat percent/tremolo, and not for \repeat volta (or
 additionally in voltas also in case of different alternative endings). I
 would like to know your (and all) opinions.

I could get behind that.


Of course, there won't be any action on any of these midi issues
until a Frog decides to work on midi output.  That could be 2-3
years in the future.

Cheers,
- Graham


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Jay Anderson
MonAmiPierrot pierofaustini at hotmail.com writes:
 P.S. Perhaps, the \unfoldRepeats behaviour should be the default behaviour
 in case of \repeat percent/tremolo, and not for \repeat volta (or
 additionally in voltas also in case of different alternative endings). I
 would like to know your (and all) opinions.

Last month this was bothering me also. I made a function to only unfold tremolo
repeats:

http://lists.gnu.org/archive/html/lilypond-user/2009-03/msg00166.html

It wouldn't be hard to have this also unfold percent repeats.

-Jay



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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread MonAmiPierrot



Jay Anderson wrote:
 
 
 
 It wouldn't be hard to have this also unfold percent repeats.
 
 
 

Of course, tremolos were the most important.
I'm with Hu: double tremolo notes are a must. They take the 90% of tremolos
I find in my work.
But if your \tremolos code works you'll save a huge amount of KB from my .ly
files.
On unfoldTremolo, I'll give a try, but if you confirm it works, I don't see
a reason not to implement it in next Lilypond version. What I suggest is to
having it work BY DEFAULT, cause 99,9% of tremolo users would switch it on
if they use MIDI output.
Piero



-
Piero Faustini, PhD student
Dipartimento di Scienze Storiche
Sezione musicologia
Università di Ferrara 

Main Software used:

- LyX 1.6.1 on WinXP sp3; EndNote  JabRef
- MikTex
- LaTeX class: Koma book
- Lilypond 2.12 for example excerpts
- BibLaTeX for bibliographies 


-- 
View this message in context: 
http://www.nabble.com/Feat.-request%3A-autobehaviour-of-%5CunfoldRepeats-tp22985125p22990710.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Mark Polesky

MonAmiPierrot wrote:

 On unfoldTremolo, I'll give a try, but if you
 confirm it works, I don't see a reason not to
 implement it in next Lilypond version. What I
 suggest is to having it work BY DEFAULT, cause
 99,9% of tremolo users would switch it on if 
 they use MIDI output.

I don't typeset 19th century operas, but I will
just mention that the one or two times I checked
a tremolo-containing score with MIDI, I was
unpleasantly surprised to hear the music go dead
all of a sudden. So I'm with Piero, switch it on
by default. It would make score-checking more
enjoyable.

- Mark



  


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Kees van den Doel

  I wonder why I (and, as I can imagine, 99% of users out there) 
 have always
  to put \unfoldRepeats in a different \score block just for 
 correct MIDI
  output, thus having to put in a variable all the \score 
 content and use it
  in both \score blocks.

I would also prefer \unfoldRepeats to be the default. I frequently use the midi 
as practice material for the musicians.
It's also good to have the repeats in the midi for listening checks to make 
sure you have all the repeats correct,
or that they sound as you had imagined.

Kees


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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Laura Conrad
 Kees == Kees van den Doel kvand...@shaw.ca writes:

Kees I would also prefer \unfoldRepeats to be the default. I
Kees frequently use the midi as practice material for the
Kees musicians.  It's also good to have the repeats in the midi
Kees for listening checks to make sure you have all the repeats
Kees correct, or that they sound as you had imagined.

I don't have a problem with the default changing, as long as there's
an easy way to get back the current behavior, preferably from the
command line so that hundreds of files don't have to be edited.

But for me, the currrent behavior (for \repeat volta) is the correct
one.  If I'm typesetting music, it saves a *lot* of proofreading time if
what the MIDI plays is what's on the paper, and not what the performer
is going to play.

When I was using ABC for note entry, this is the major feature that
convinced me to do the proofreading on the lily output and not on the
abcMIDI/abctab2ps output, which does the equivalent of \repeat unfold.

-- 
Laura   (mailto:lcon...@laymusic.org http://www.laymusic.org/ )
(617) 661-8097  233 Broadway, Cambridge, MA 02139   

forsan et haec olim meminisse iuvabit.  Vergil

This will make a good story to tell the grandchildren, if we live that
long.  Conrad Translation.




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


Re: Feat. request: autobehaviour of \unfoldRepeats

2009-04-10 Thread Valentin Villenave
2009/4/10 Graham Percival gra...@percival-music.ca:
 On Fri, Apr 10, 2009 at 03:08:32AM -0700, MonAmiPierrot wrote:
 For me, I only use \repeat percent and most of all \repeat
 tremolo. In both cases, audio output is important.  At least
 for tremolos, you'll perfectly agree that there's no point in
 not playing it by midi (midi only play the note(s)  that
 represent the length of tremolo, not the notes of which trmolo
 actually consists: it doesn't make sense, for me)

 Ah, I didn't realize that.  Yes, it would be nice if midi played
 the real notes.  If that isn't already in the google tracker, it
 should be added.

It is now: http://code.google.com/p/lilypond/issues/detail?id=769

Regards,
Valentin


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


unfoldRepeats

2008-10-14 Thread James E. Bailey
Okay, so I think I understand now. I think this may be a bug. Or at  
least, not documented. I don't know how to say this in proper lilypond  
terms, but the repeats don't unfold.


\score {
   \new Staff 
  {
 \time 1/4
 \repeat volta 2 {s4}
 \alternative { {s4} {s4} }
  }
  {
 c'4 g a
 \bar |.
  }
   
}


\score {
   \unfoldRepeats {
  \new Staff 
 {
\time 1/4
\repeat volta 2 {s4}
\alternative { {s4} {s4} }
 }
 {
c'4 g a
\bar |.
 }
  
   }
}

Does work. Is this correct? Can this be changed?


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


Re: unfoldRepeats

2008-10-14 Thread Mats Bengtsson
Your mistake is that you believe that the repeats can be separated from 
the notes. Please always keep in mind that the input should

describe the musical meaning, not only the resulting layout.
In this case, the music that should be played is c g c a, right.
In notation, you can use repeats as a shorthand and similarly
LilyPond input syntax allows to use \repeat. However, this should
be done together with the music and not separated, as you have done.
I would rather call it a bug that your first example produces the 
result it does.

Just replace
c'4 g a in your examples by
\repeat volta 2 {c'4} \alternative{{ g}{ a}}

   /Mats

Quoting James E. Bailey [EMAIL PROTECTED]:

Okay, so I think I understand now. I think this may be a bug. Or at  
least, not documented. I don't know how to say this in proper 
lilypond  terms, but the repeats don't unfold.


\score {
   \new Staff 
  {
 \time 1/4
 \repeat volta 2 {s4}
 \alternative { {s4} {s4} }
  }
  {
 c'4 g a
 \bar |.
  }
   
}


\score {
   \unfoldRepeats {
  \new Staff 
 {
\time 1/4
\repeat volta 2 {s4}
\alternative { {s4} {s4} }
 }
 {
c'4 g a
\bar |.
 }
  
   }
}

Does work. Is this correct? Can this be changed?


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







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


Re: \unfoldRepeats bug? [was: Partial measure moment]

2005-11-16 Thread Gilles
Hi.

  (1)
  First, is this in effect the most straightforward way to obtain
  the expected result?
 
 No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will 
 be four beats before the candenza bar is finished).


I don't get what you mean; maybe you could correct the one.ly example.
 
  What would the equivalent incantation using Timing.measurePosition?
 
 I guess it'd be something like
 \set Timing.measurePosition = #(make-moment 1 4)
 where you now inserted \cadenzaOn. But I don't know, so please experiment. 
 

I don't seem to get it any better with these moments:  In addition to the
warnings, I get a bar printed at the wrong place :-{

  (2)
  In the 3rd attached file, when \unfoldRepeats is put back in,
  warnings show up:
 
 That's becaue you don't end the cadenza within the repeat. Repeat unfolding 
 works in principle by copypaste, so you will have two \cadenzaOn:s followed 
 by two cadenzaOff:s in your example; this may give unexpected results.
 

Well...  The authoritative (Han-Wen) answer seems to indicate that there is
currently no way to improve the notation and get rid of the warnings.


Thanks,
Gilles


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


Re: \unfoldRepeats bug? [was: Partial measure moment]

2005-11-16 Thread Mats Bengtsson

It seems that the best you can do is something like:

\version 2.6.0

\score{
% \applymusic #unfold-repeats
\relative c'' {
 \time 4/4
\repeat volta 2 {
 \partial 4 d4 |
   e8 d e d e d e d |
 }
 \alternative {
   { f2. }
   { \set Timing.measurePosition = #(ly:make-moment 0 4) f8 e f e f e f 
g | }

 }
}
}

which gets rid of the warning and prints all the automatic beams
correctly.

  /Mats

Gilles wrote:


Hi.

 


(1)
First, is this in effect the most straightforward way to obtain
the expected result?
 


No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will 
be four beats before the candenza bar is finished).

   



I don't get what you mean; maybe you could correct the one.ly example.

 


What would the equivalent incantation using Timing.measurePosition?
 


I guess it'd be something like
\set Timing.measurePosition = #(make-moment 1 4)
where you now inserted \cadenzaOn. But I don't know, so please experiment. 

   



I don't seem to get it any better with these moments:  In addition to the
warnings, I get a bar printed at the wrong place :-{

 


(2)
In the 3rd attached file, when \unfoldRepeats is put back in,
warnings show up:
 


That's becaue you don't end the cadenza within the repeat. Repeat unfolding works 
in principle by copypaste, so you will have two \cadenzaOn:s followed by two 
cadenzaOff:s in your example; this may give unexpected results.

   



Well...  The authoritative (Han-Wen) answer seems to indicate that there is
currently no way to improve the notation and get rid of the warnings.


Thanks,
Gilles


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



--
=
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44  STOCKHOLM
Sweden
Phone: (+46) 8 790 8463 
   Fax:   (+46) 8 790 7260
Email: [EMAIL PROTECTED]
WWW: http://www.s3.kth.se/~mabe
=



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


Re: \unfoldRepeats bug? [was: Partial measure moment]

2005-11-15 Thread Erik Sandberg

On Tuesday 15 November 2005 14.37, Gilles wrote:
 Hello.

   - Partial bars:
   You probably don't want to use \partial in the middle of a piece. In
   your example, it tends to destroy the bar numbering. I think it's a
   better idea to set Timing.measureLength directly.
 
  One thing that might be easier is using \cadenzaOff, which will handle
  setting Timing.measurePosition correctly for you.  (See also
  \cadenzaOn, which turns off timing.)

 The problem comes from \unfoldRepeats !
 See the attached files for a stripped-down but complete example
 of the construct; the desired print output is achieved using
 \cadenzaOn and \cadenzaOff, as suggested.

(btw, it can be further reduced e.g. by removing two.ly)

 (1)
 First, is this in effect the most straightforward way to obtain
 the expected result?

No, a problem is that \cadenzaOff doesn't mark the end of the bar (there will be four beats before the candenza bar is finished).

 What would the equivalent incantation using Timing.measurePosition?

I guess it'd be something like
\set Timing.measurePosition = #(make-moment 1 4)
where you now inserted \cadenzaOn. But I don't know, so please experiment. 

 (2)
 In the 3rd attached file, when \unfoldRepeats is put back in,
 warnings show up:

That's becaue you don't end the cadenza within the repeat. Repeat unfolding works in principle by copypaste, so you will have two \cadenzaOn:s followed by two cadenzaOff:s in your example; this may give unexpected results.

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