[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Creating arbitrary/isolated RepeatSlash objects
From:       Galen Hazelwood <galenhz () gmail ! com>
Date:       2022-08-21 20:15:33
Message-ID: CANDRfYeA3W_nczsikczugTphs=yMa8Hx0RHdcQBhgvJsyijhfw () mail ! gmail ! com
[Download RAW message or body]

Thank you very much--that worked perfectly.

--Galen

On Sun, Aug 21, 2022 at 10:52 AM Jean Abou Samra <jean@abou-samra.fr> wrote:

>
>
> Le 21/08/2022 à 03:15, Galen Hazelwood a écrit :
> > Hello all.
> >
> > I have another question, this time about percent repeats. I'm
> > repeating a long, complex keyboard figure which extends across both
> > staves, and using a combination of MagnifyMusic reduction and percent
> > repeats to keep things manageable. The only thing is that the repeat
> > slashes only appear on one staff; I'd like to mirror them in the
> > other, just so things look symmetric.
> >
> > There's a function in the documentation for generating arbitrary
> > percent figures in the score...
> > makePercent =
> > #(define-music-function (note) (ly:music?)
> >     "Make a percent repeat the same length as NOTE."
> >     (make-music 'PercentEvent
> >                 'length (ly:music-length note)))
> > ...so I assumed I could just substitute a RepeatSlashEvent for the
> > Percent Event. Turns out I can't; it compiles fine, but throws an
> > error when I try to use it.
> >
> > ERROR: Wrong type (expecting exact integer): ()
> >
> > I could just shove the repeat slashes into the middle between the
> > staves, but I'd rather have them mirrored if I could. Is there some
> > way to make a function like this that works, or is there a completely
> > different path that makes more sense?
>
>
>
> In the lower staff, instead of
>
>    s1 s1 s1
>
> use
>
>    \repeat percent 6 { \repeat unfold 16 { s32 } }
>
> You have to use \repeat unfold 16 { s32 } instead of s2 because
> the durations inside \repeat percent determine how many slashes
> are printed.
>
> Cheers,
> Jean
>
>
>

[Attachment #3 (text/html)]

<div dir="ltr">Thank you very much--that worked \
perfectly.<div><br></div><div>--Galen</div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Sun, Aug 21, 2022 at 10:52 AM Jean Abou Samra &lt;<a \
href="mailto:jean@abou-samra.fr">jean@abou-samra.fr</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br> <br>
Le 21/08/2022 à 03:15, Galen Hazelwood a écrit  :<br>
&gt; Hello all.<br>
&gt;<br>
&gt; I have another question, this time about percent repeats. I&#39;m <br>
&gt; repeating a long, complex keyboard figure which extends across both <br>
&gt; staves, and using a combination of MagnifyMusic reduction and percent <br>
&gt; repeats to keep things manageable. The only thing is that the repeat <br>
&gt; slashes only appear on one staff; I&#39;d like to mirror them in the <br>
&gt; other, just so things look symmetric.<br>
&gt;<br>
&gt; There&#39;s a function in the documentation for generating arbitrary <br>
&gt; percent figures in the score...<br>
&gt; makePercent =<br>
&gt; #(define-music-function (note) (ly:music?)<br>
&gt;        &quot;Make a percent repeat the same length as NOTE.&quot;<br>
&gt;        (make-music &#39;PercentEvent<br>
&gt;                          &#39;length (ly:music-length note)))<br>
&gt; ...so I assumed I could just substitute a RepeatSlashEvent for the <br>
&gt; Percent Event. Turns out I can&#39;t; it compiles fine, but throws an <br>
&gt; error when I try to use it.<br>
&gt;<br>
&gt; ERROR: Wrong type (expecting exact integer): ()<br>
&gt;<br>
&gt; I could just shove the repeat slashes into the middle between the <br>
&gt; staves, but I&#39;d rather have them mirrored if I could. Is there some <br>
&gt; way to make a function like this that works, or is there a completely <br>
&gt; different path that makes more sense?<br>
<br>
<br>
<br>
In the lower staff, instead of<br>
<br>
     s1 s1 s1<br>
<br>
use<br>
<br>
     \repeat percent 6 { \repeat unfold 16 { s32 } }<br>
<br>
You have to use \repeat unfold 16 { s32 } instead of s2 because<br>
the durations inside \repeat percent determine how many slashes<br>
are printed.<br>
<br>
Cheers,<br>
Jean<br>
<br>
<br>
</blockquote></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic