Re: slur and percent

2018-05-03 Thread Gianmaria Lari
On 3 May 2018 at 01:27, Aaron Hill <lilyp...@hillvisions.com> wrote:

> Is there any way to write this
>>>
>>> \version "2.19.81"
>>> {a( b c' a a b c' a)}
>>>
>>> with a repeat percent? Something similar to this:
>>>
>>> \version "2.19.81"
>>> {\repeat percent 2 {a( b c' a} ) }
>>>
>>> Thank you, g.
>>>
>>
>> I found in the documentation the "Isolated percents". Here it is the
>> documentation excerpt:
>>
>> makePercent =
>> #(define-music-function (note) (ly:music?)
>>"Make a percent repeat the same length as NOTE."
>>(make-music 'PercentEvent
>>'length (ly:music-length note)))
>>
>> \relative c'' {
>>   \makePercent s1
>> }
>>
>> What about the midi generation? Should I handle it with tag or there is a
>> better way?
>>
>
> Consider the following:
>
> %%%
> \version "2.19.80"
>
> makePercent =
>   #(define-music-function (parser location note) (ly:music?)
> "Make a percent repeat the same length as NOTE."
> (make-music 'PercentEvent
>   'length (ly:music-length note)))
>
> original = { a4( b c' a a b c' a) }
>
> percentRepeat = { \repeat percent 2 { \slurHalfSolid a4( b c' a) } }
>
> hiddenNotesAndMakePercent = { <<
>   { \oneVoice \slurHalfSolid a4( b c' a \hideNotes a b c' a) \unHideNotes
> } \\
>   { s1 \makePercent s1 } >>
>
>> }
>>>
>>
> \score { \original \layout {} \midi {} }
> \score { \percentRepeat \layout {} }
> \score { \unfoldRepeats \percentRepeat \midi {} }
> \score { \hiddenNotesAndMakePercent \layout {} \midi {} }
> %%%
>
> These all produce the same MIDI output with different visual renderings.
> Obviously, the use of \slurHalfSolid is optional, but I think it adds a
> useful visual distinction to the normal slur.
>
>
When I saw your code I didn't understand why the last example was so
complicated. Then I tried to simply write:

\score { {a4( b c' a \makePercent s1 <>) } \layout {} \midi{} }

and discovered that lilypond stop the slur before the percent!
So thank you for your code!

Ciao, g.
P.S. Yes, the midi output of your examples are all the same. They are not
the same if I use \articulate script because in that case

a( b c' a) a( b c' a)


generate a different output than

a( b c' a a b c' a)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: slur and percent

2018-05-02 Thread Aaron Hill

Is there any way to write this

\version "2.19.81"
{a( b c' a a b c' a)}

with a repeat percent? Something similar to this:

\version "2.19.81"
{\repeat percent 2 {a( b c' a} ) }

Thank you, g.


I found in the documentation the "Isolated percents". Here it is the
documentation excerpt:

makePercent =
#(define-music-function (note) (ly:music?)
   "Make a percent repeat the same length as NOTE."
   (make-music 'PercentEvent
   'length (ly:music-length note)))

\relative c'' {
  \makePercent s1
}

What about the midi generation? Should I handle it with tag or there is 
a

better way?


Consider the following:

%%%
\version "2.19.80"

makePercent =
  #(define-music-function (parser location note) (ly:music?)
"Make a percent repeat the same length as NOTE."
(make-music 'PercentEvent
  'length (ly:music-length note)))

original = { a4( b c' a a b c' a) }

percentRepeat = { \repeat percent 2 { \slurHalfSolid a4( b c' a) } }

hiddenNotesAndMakePercent = { <<
  { \oneVoice \slurHalfSolid a4( b c' a \hideNotes a b c' a) 
\unHideNotes } \\

  { s1 \makePercent s1 }

}


\score { \original \layout {} \midi {} }
\score { \percentRepeat \layout {} }
\score { \unfoldRepeats \percentRepeat \midi {} }
\score { \hiddenNotesAndMakePercent \layout {} \midi {} }
%%%

These all produce the same MIDI output with different visual renderings. 
 Obviously, the use of \slurHalfSolid is optional, but I think it adds a 
useful visual distinction to the normal slur.



-- Aaron Hill

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


Re: slur and percent

2018-05-02 Thread Gianmaria Lari
On 2 May 2018 at 08:19, Gianmaria Lari  wrote:

> Is there any way to write this
>
> \version "2.19.81"
> {a( b c' a a b c' a)}
>
>
> with a repeat percent? Something similar to this:
>
> \version "2.19.81"
> {\repeat percent 2 {a( b c' a} ) }
>
> Thank you, g.
>


I found in the documentation the "Isolated percents". Here it is the
documentation excerpt:

makePercent =
#(define-music-function (note) (ly:music?)
   "Make a percent repeat the same length as NOTE."
   (make-music 'PercentEvent
   'length (ly:music-length note)))

\relative c'' {
  \makePercent s1
}


What about the midi generation? Should I handle it with tag or there is a
better way?
Thank you, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: slur and percent

2018-05-02 Thread Gianmaria Lari
On 2 May 2018 at 14:50, Simon Albrecht  wrote:

> On 02.05.2018 08:19, Gianmaria Lari wrote:
>
>> Is there any way to write this
>>
>> \version "2.19.81"
>> {a( b c' a a b c' a)}
>>
>>
>> with a repeat percent? Something similar to this:
>>
>> \version "2.19.81"
>> {\repeat percent 2 {a( b c' a} ) }
>>
>>
> Probably no sensible/reasonably easy way.
> How is that even supposed to look? I don’t think it’s a good idea, except
> in extreme cases.
>

I'm not sure to really use this because I agree with you it doesn't look
nice.

But it's also true that I would use it for a difficult part for kids, and
percent makes the score more light to read and more clear they have to play
exactly the same as the previous measure.

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


Re: slur and percent

2018-05-02 Thread Simon Albrecht

On 02.05.2018 08:19, Gianmaria Lari wrote:

Is there any way to write this

\version "2.19.81"
{a( b c' a a b c' a)}


with a repeat percent? Something similar to this:

\version "2.19.81"
{\repeat percent 2 {a( b c' a} ) }



Probably no sensible/reasonably easy way.
How is that even supposed to look? I don’t think it’s a good idea, 
except in extreme cases.


Best, Simon

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


slur and percent

2018-05-02 Thread Gianmaria Lari
Is there any way to write this

\version "2.19.81"
{a( b c' a a b c' a)}


with a repeat percent? Something similar to this:

\version "2.19.81"
{\repeat percent 2 {a( b c' a} ) }

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