Re: horizontal spacing inside \magnifyMusic

2020-06-12 Thread Eby Mani
 Many thanks Kieren & Valentin,

Have used a mix of \newSpacingSection and \tweak extra-spacing-width to achieve 
something close to what is possible with use of "skip". Still it's not 
perfect(output attached).

Using \tweak extra-spacing-width alone only works for the first 2 sections on 
n32 notes.

And the other problem is \tweak have not much effect when used with 
\newSpacingSection. I'm not sure if this is due to the use of \magnifyMusic or 
the sheer number of notes in the section, not much difference even with \break 
after the manual \bar (please see comments).

thanks,
eby

**
\version "2.20.0"

global = {
\key des \major
\time 4/4
}

violin = \relative c' {
\global
\cadenzaOn

\newSpacingSection
\override Score.SpacingSpanner.spacing-increment = #2

aes2\fermata %%spacerequired

\newSpacingSection
\revert Score.SpacingSpanner.spacing-increment


\magnifyMusic 0.61 {
g32 \([aes b c d ees b c d ees ges] %%spacerequired
\tweak extra-spacing-width #'(-2 . 3) %%spacing between aes and d not much 
improved.
aes32\) [d,!32 \(ees ges aes bes c des ees f ges aes bes]
}
%%spacerequire
\tweak extra-spacing-width #'(-1 . 0) %%unable to get small spacing before c.
\newSpacingSection
\override Score.SpacingSpanner.spacing-increment = #2

c8-.\)

\newSpacingSection
\revert Score.SpacingSpanner.spacing-increment
%%spacerequired

\magnifyMusic 0.61 {
\newSpacingSection
\override Score.SpacingSpanner.spacing-increment = #2

aes,,8-^ [c-^ ees-^ aes-^ c-^ ees-^ c-^ ees-^ aes-^ c-^ ees-^]

\newSpacingSection
\revert Score.SpacingSpanner.spacing-increment
%%spacerequired
\ottava #1
\revert Score.SpacingSpanner.common-shortest-duration
\override Script.staff-padding = #2.5 {
\stemDown aes2\trill \pp a2\trill bes2\trill c2\trill \fermata } \bar "|"
\override Script.staff-padding = #0
}

\cadenzaOff

des1~
des2\fermata
\ottava #0
r \fermata \bar "|."

}

pianoVoice = \relative c'' {
\global

\cadenzaOn 1\fermata r1 r1 s2 r1 s4 \bar"|" \cadenzaOff
f2 (f4-. f-.)
f2\fermata r\fermata \bar "|."
}


violinPart = \new Staff \with {
instrumentName = "Violin"
shortInstrumentName = "Vl."
midiInstrument = "violin"
} \violin


\score {
<<
\violinPart
\pianoVoice
>>
\layout { }
}

**
 On Friday, 12 June, 2020, 12:32:53 am IST, Valentin Petzel 
 wrote:  
 
 Hi Kieren,

Note that doing it this way has the same problem I explained before if two 
stems a considerably vertically apart (as we just regulate the horizontal 
space to the neighboring Note, which is not nescessarily the next note.

Regards,
Valentin

Am Donnerstag, 11. Juni 2020, 20:51:48 CEST schrieb Kieren MacMillan:
> Hi Eby,
> 
> > I'm looking for to achieve something like the output without using
> > "skips". I plan to run the midi output thru VST instrument, thus adding
> > skips is a big no. The example is achieved using "skip".
> 
> \version "2.19.83"
> { c'4 4 \tweak extra-spacing-width #'(-10 . 0) 4 4 }
> 
> Hope that helps!
> Kieren.
> 
> p.s. This kind of thing is EXACTLY why I use the edition-engraver so
> heavily!  =) 
> 
> Kieren MacMillan, composer (he/him/his)
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info  

Re: Free rhythm in part of a bar

2020-06-12 Thread Timothy Lanfear

On 12/06/2020 15:26, Peter Toye wrote:
Free rhythm in part of a bar I need to have part only of a bar notated 
with free rhythm. Also other staves need to be synchronised. I've 
tried using \cadenzaOn but then I get a barcheck problem and the next 
bar goes odd. I can't see anything about this in the snippets or 
manuals. A minimal example follows.


There seem to be two issues:

1) How do I get the desired result, which is one bar with the first 2 
crotchets synchronised with the bass, and the rest unsynchronised?


2) This isn't in the example, but what if I want a free section within 
a bar, but synchronised accompaniment at the beginning and end of the 
bar (e.g. a chord on the final note of a cadenza).


Maybe something like this will help. The fillbar function scales a 
semi-breve rest to the right duration to fill up the remainder of the bar.


\version "2.20.0"

fillbar =
#(define-music-function (cadenza) (ly:music?)
  (ly:music-compress #{ r1\fermata #} (ly:music-length cadenza)))

cadenza = { c'8 8 8 8 8 8 8 8 8 8 }

\score {
  <<
    \new Staff {
  \time 4/4
  c'4 4 4 4 |
  \cadenzaOn c'4 4 \cadenza \bar "|" \cadenzaOff
  R1
    }

    \new Staff {
  \time 4/4
  \clef "bass"
  c1
  4 4
  \fillbar \cadenza
  R1
    }
  >>
}


--
Timothy Lanfear, Bristol, UK.




How to modify the gap between the clef or time signature and the first note/chord/pause/skip in the bar

2020-06-12 Thread Paolo Prete
Hello,

How can I modify the horizontal gap between the clef or time signature and
the first note/chord/pause/skip in the bar?

Thanks!


Re: How to pass a fraction as a parameter for a Scheme function

2020-06-12 Thread Paolo Prete
On Fri, Jun 12, 2020 at 1:15 PM Aaron Hill  wrote:

> .  If all that was needed was
> to specify a duration, then it might not matter since four quarters is
> the same as two halves.  However then, David's suggestion of using
> ly:duration? would make much more sense.
>
>
>
I agree, but my last observation was not associated with the initial
question, nor to Lilypond; it shows an ambiguity which is associated with
the italian language.
For mysterious reasons the term "rational" has a different meaning in
italian than the english/french one, then a note on the documentation is
desirable...
Best,
P


-- Aaron Hill
>


Janus M. Nowacki

2020-06-12 Thread Valentin Villenave
Greetings everybody,
I just wanted to let you know that Janus Nowacki, one of the founders
of the TeX Gyre font suite that is used by default in LilyPond, has
recently died:
http://www.gust.org.pl/news/jmn-obit-en
And his personal website (in Polish): https://jmn.pl/

The TeX Gyre font project was started in 2006 to provide high-quality,
free-licensed replacements for existing URW fonts:
http://www.gust.org.pl/projects/e-foundry/tex-gyre/nfp11.pdf

Its adoption in LilyPond was discussed from 2008 onwards, but took
more than seven years to finally be committed. (TeX Gyre Schola has
many advantages, less bugs and excellent support for non-Western glyph
sets such as Cyrillic and Hebrew.)
https://gitlab.com/lilypond/lilypond/-/issues/4552
https://lists.gnu.org/archive/html/lilypond-devel/2008-01/msg00174.html

Cheers,
-- V.



RE: Free rhythm in part of a barpa

2020-06-12 Thread Mark Stephen Mrotek
Peter,

 

>From trial and error I learned, if a cadenza is started mid-measure (say on
the second of four beats), then Lilypond want to start the nest meterd part
on the third beat.

The solution is to star the cadenza on the first beat of the measure.

As to the bass it can be "fudged" with a number of spacers equal to the
duration of the cadenza.

 

Here is my code:

 

\language "english"

\version "2.19.83"

\score {

<<

   \new Staff {

   \time 4/4

   {

c'4 4 4 4 |

\cadenzaOn 4 4 8 8 8 8 8 8 8 8 8 8 \cadenzaOff \bar "|" 

R1   }

}

 

\new Staff {

  \time 4/4

  \clef "bass"

  {

c1

4 4 s4*2 r2\fermata s4*4 |

  }

}

>>

}

 

Mark

 

From: lilypond-user
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Peter Toye
Sent: Friday, June 12, 2020 7:26 AM
To: lilypond-user@gnu.org
Subject: Free rhythm in part of a bar

 

I need to have part only of a bar notated with free rhythm. Also other
staves need to be synchronised. I've tried using \cadenzaOn but then I get a
barcheck problem and the next bar goes odd. I can't see anything about this
in the snippets or manuals. A minimal example follows.

There seem to be two issues:

1) How do I get the desired result, which is one bar with the first 2
crotchets synchronised with the bass, and the rest unsynchronised?

2) This isn't in the example, but what if I want a free section within a
bar, but synchronised accompaniment at the beginning and end of the bar
(e.g. a chord on the final note of a cadenza).

\language "english"

\version "2.19.83"

\score {

 <<
   \new Staff {
   \time 4/4
   {
c'4 4 4 4 |
4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 8  \bar "|" \cadenzaOff
R1
   }
 }

 \new Staff {
  \time 4/4
  \clef "bass"
  {
c1
4 4 r2\fermata |
  }

 }

 >>

}
Thanks in advance,

Peter
  mailto:lilyp...@ptoye.com
  www.ptoye.com



Re: lilypond-user Digest, Vol 211, Issue 44

2020-06-12 Thread Valentin Villenave
On 6/12/20, Valentin Petzel  wrote:
> I’m not sure if \newSpacingSection is a nescessarily good idea, because it
> basically divides the score into parts of different spacing. And I’m not
> sure about that, but I think this may cause inconsequent spacing.

Well, IMO as soon as you start contradicting LilyPond’s decisions
you’re losing consistency anyway. \newSpacingSection may at least give
you some consistency at a local level (unlike adding skips as the OP
was understandably reluctant to do).

> (Also it is overly complicated for overriding a single bit auf spacing).

“Auf” oder “von”? :-)

> What we would  want to do is to remain in one sense of spacing and
> modify spacing only for single exceptions.

That is one way to do it (I actually hadn’t seen your message when I
posted mine; your mail client seems to be messing with subject lines,
as this message is another example).

Anybody who’s ever been using GNU LilyPond will tell you two things anyway:
- no matter where you look, there’s _always_ more than one way to skin a cat;
- no matter where you look, spacing algorithms are _always_ the single
most complex piece of LilyPond.

(Well actually I cheated a bit, because vertical spacing is certainly
even worse. But the point still stands for horizontal spacing within
systems.)

So your answer is certainly a good one; mine may be a bit simpler
although it may have its downsides, depending on taste.

Cheers,
-- V.



Re: Free rhythm in part of a bar

2020-06-12 Thread David Kastrup
Peter Toye  writes:

> David,
>
> Thanks. That solves the vocal line, but it doesn't seem to solve the
> synchronisation issue with the accompaniment, which is rather
> necessary in a song!

To quote: "1) How do I get the desired result, which is one bar with the
first 2 crotchets synchronised with the bass, and the rest
unsynchronised?"

Can you explain what you mean by "unsynchronised"?  Stuff just doesn't
add up.  Your vocal line ends with a full bar rest, your accompagniment
ends with a half rest.  You want stuff to have synchronisation but be
unsynchronised.

You can insert \skip 8*14 (for example) in the bass but I have no idea
whatsoever what you actually want.

-- 
David Kastrup



Re: Free rhythm in part of a bar

2020-06-12 Thread Peter Toye
David,

Thanks. That solves the vocal line, but it doesn't seem to solve the 
synchronisation issue with the accompaniment, which is rather necessary in a 
song!

Best regards,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

-
Friday, June 12, 2020, 4:31:18 PM, David Kastrup wrote:

> Peter Toye  writes:

>> I need to have part only of a bar notated with free rhythm. Also other 
>> staves need to be synchronised. I've tried using \cadenzaOn but then I get a 
>> barcheck problem and the next bar goes odd. I can't see anything about this 
>> in the snippets or manuals. A minimal example follows.

>> There seem to be two issues:

>> 1) How do I get the desired result, which is one bar with the first 2 
>> crotchets synchronised with the bass, and the rest unsynchronised?

>> 2) This isn't in the example, but what if I want a free section within a 
>> bar, but synchronised accompaniment at the beginning and end of the bar 
>> (e.g. a chord on the final note of a cadenza).

>> \language "english"

>> \version "2.19.83"

>> \score {

>>  <<
>>\new Staff {
>>\time 4/4
>>{
>> c'4 4 4 4 |
>> 4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 8  \bar "|" \cadenzaOff
>> R1
>>}
>>  }

>>  \new Staff {
>>   \time 4/4
>>   \clef "bass"
>>   {
>> c1
>> 4 4 r2\fermata |
>>   }

>>  }

>>  >>

>> } 
>> Thanks in advance,

> Switch off before the last note of the cadenza. That's not particularly
> great but works.

Re: lilypond-user Digest, Vol 211, Issue 44

2020-06-12 Thread Valentin Petzel
Hello Valentin,

I’m not sure if \newSpacingSection is a nescessarily good idea, because it 
basically divides the score into parts of different spacing. And I’m not sure 
about that, but I think this may cause inconsequent spacing. (Also it is 
overly complicated for overriding a single bit auf spacing). What we would 
want to do is to remain in one sense of spacing and modify spacing only for 
single exceptions.
I will try to dive into the cpp source a bit, maybe I can find a way to 
properly enable this.

Regards,
The other Valentin

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


Re: Free rhythm in part of a bar

2020-06-12 Thread David Kastrup
Peter Toye  writes:

> I need to have part only of a bar notated with free rhythm. Also other staves 
> need to be synchronised. I've tried using \cadenzaOn but then I get a 
> barcheck problem and the next bar goes odd. I can't see anything about this 
> in the snippets or manuals. A minimal example follows.
>
> There seem to be two issues:
>
> 1) How do I get the desired result, which is one bar with the first 2 
> crotchets synchronised with the bass, and the rest unsynchronised?
>
> 2) This isn't in the example, but what if I want a free section within a bar, 
> but synchronised accompaniment at the beginning and end of the bar (e.g. a 
> chord on the final note of a cadenza).
>
> \language "english"
>
> \version "2.19.83"
>
> \score {
>
>  <<
>\new Staff {
>\time 4/4
>{
> c'4 4 4 4 |
> 4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 8  \bar "|" \cadenzaOff
> R1
>}
>  }
>
>  \new Staff {
>   \time 4/4
>   \clef "bass"
>   {
> c1
> 4 4 r2\fermata |
>   }
>
>  }
>
>  >>
>
> } 
> Thanks in advance,

Switch off before the last note of the cadenza.  That's not particularly
great but works.

\language "english"

\version "2.19.83"

\score {

 <<
   \new Staff {
 \time 4/4
 {
   c'4 4 4 4 |
   4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 \cadenzaOff \partial 8 8 |
   R1
 }
   }
 >>
}

-- 
David Kastrup


Re: Free rhythm in part of a bar

2020-06-12 Thread Christian Masser
Hi Peter!

I don't know if that's the correct way to do it, but if you use
\scaleDurations on the cadenza material it seems to work out for me:

   {
c'4 4 4 4 |
4 4 \scaleDurations 2/5 { 8 8 8 8 8 8 8 8 8 8 } |
   }

The '2/5'-part depends of course on the length of the material inside.

All the best
Christian

Am Fr., 12. Juni 2020 um 16:34 Uhr schrieb Peter Toye :

> I need to have part only of a bar notated with free rhythm. Also other
> staves need to be synchronised. I've tried using \cadenzaOn but then I get
> a barcheck problem and the next bar goes odd. I can't see anything about
> this in the snippets or manuals. A minimal example follows.
>
> There seem to be two issues:
>
> 1) How do I get the desired result, which is one bar with the first 2
> crotchets synchronised with the bass, and the rest unsynchronised?
>
> 2) This isn't in the example, but what if I want a free section within a
> bar, but synchronised accompaniment at the beginning and end of the bar
> (e.g. a chord on the final note of a cadenza).
>
> \language "english"
>
> \version "2.19.83"
>
> \score {
>
>  <<
>\new Staff {
>\time 4/4
>{
> c'4 4 4 4 |
> 4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 8  \bar "|" \cadenzaOff
> R1
>}
>  }
>
>  \new Staff {
>   \time 4/4
>   \clef "bass"
>   {
> c1
> 4 4 r2\fermata |
>   }
>
>  }
>
>  >>
>
> }
> Thanks in advance,
>
> Peter
> mailto:lilyp...@ptoye.com 
> www.ptoye.com
>


Free rhythm in part of a bar

2020-06-12 Thread Peter Toye
I need to have part only of a bar notated with free rhythm. Also other staves 
need to be synchronised. I've tried using \cadenzaOn but then I get a barcheck 
problem and the next bar goes odd. I can't see anything about this in the 
snippets or manuals. A minimal example follows.

There seem to be two issues:

1) How do I get the desired result, which is one bar with the first 2 crotchets 
synchronised with the bass, and the rest unsynchronised?

2) This isn't in the example, but what if I want a free section within a bar, 
but synchronised accompaniment at the beginning and end of the bar (e.g. a 
chord on the final note of a cadenza).

\language "english"

\version "2.19.83"

\score {

 <<
   \new Staff {
   \time 4/4
   {
c'4 4 4 4 |
4 4 \cadenzaOn 8 8 8 8 8 8 8 8 8 8  \bar "|" \cadenzaOff
R1
   }
 }

 \new Staff {
  \time 4/4
  \clef "bass"
  {
c1
4 4 r2\fermata |
  }

 }

 >>

} 
Thanks in advance,

Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

Re: How to pass a fraction as a parameter for a Scheme function

2020-06-12 Thread Aaron Hill

On 2020-06-10 10:28 am, Paolo Prete wrote:

... I have been misled by the term "rational". In fact, in the italian
language the term "rational" (---> razionale)  means an irreducible
fraction of two coprime integers, while in the english language it 
means a

number that can be expressed as the quotient or fraction p/q of two
integers.
For example, "2/4" is not rational in italian, but it is rational in
english. Then I did not even consider that predicate.
I suggest the italian maintainer of the translation to keep note of 
this

ambiguity.


I would not be so hasty.

A rational value and a fraction are two related but distinct things.  A 
fraction is the thing that consists of a numerator and a denominator, 
whereas the rational value is the ratio between the two components of 
the fraction.  So to say "2/4 is rational in English" is potentially 
misleading.  Regardless of native tongue, 2/4 is specifically a fraction 
that simply has a rational value of 1:2.  2/4 is not the rational value, 
1:2 is.  2/4 may be reduced to 1/2 which shares the same ratio, so we 
would say we have two fractions but only one rational value.


Connecting the above to Scheme, fraction? and rational? are distinct 
type predicates.  A fraction? is simply a pair of numbers--the car 
holding the numerator, the cdr holding the denominator.  On the other 
hand, a rational? refers to one of the primitive numeric types.  Of most 
importance, a rational? will be reduced whereas a fraction? will 
preserve the original numerator and denominator.


Going back to the original question regarding fractions, my suggested 
use of rational? would *not* be useful if you need to preserve the 
original numerator and denominator.  Otherwise, things like 4/4 and 2/2 
would look identical to the function.  In fact, the function would 
simply see the integer 1 as input for #4/4.  If all that was needed was 
to specify a duration, then it might not matter since four quarters is 
the same as two halves.  However then, David's suggestion of using 
ly:duration? would make much more sense.



-- Aaron Hill



Re: Orchestral strings, how to organise score and parts for divisi, solos, desks etc.

2020-06-12 Thread Valentin Villenave
On 6/7/20, Rutger Hofman  wrote:
> My first attempt is here:
> https://www.rutgerhofman.nl/lilypond/divisi-doc/divisi-doc.html

Very nice!  I have a few minor remarks:
- The writing style differs a bit from our recommended style, see CG
5.5.3 and 5.5.4
http://lilypond.org/doc/v2.21/Documentation/contributor/documentation-policy

- If we’re to make that a part of the NR (as I’m wishing for),
cross-references, index entries etc. will have to be added;
@lilypondfile examples will need to be directly embedded as @lilypond
blocks, etc.

- Some trimming or summing-up will certainly be needed; besides, the
keepAliveInterfaces example I recently added could be merged with your
quoteDuring example etc.

- I think your PMP macros could (and should) be integrated upstream,
by making them as general and universally-applicable as possible. In
which case you’ll need to think of more suitable names, doc strings
etc.

But that does look promising indeed!

Cheers,
-- V.



Re: How to pass a fraction as a parameter for a Scheme function

2020-06-12 Thread Valentin Villenave
On 6/10/20, Paolo Prete  wrote:
> When I looked at the list of predicates...;
>
> https://lilypond.org/doc/v2.19/Documentation/notation/predefined-type-predicates.it.html
>
> ... I have been misled by the term "rational". In fact, in the italian
> language the term "rational" (---> razionale)  means an irreducible
> fraction of two coprime integers, while in the english language it means a
> number that can be expressed as the quotient or fraction p/q of two
> integers.

Oh, that’s interesting.

> For example, "2/4" is not rational in italian, but it is rational in
> english. Then I did not even consider that predicate.
> I suggest the italian maintainer of the translation to keep note of this
> ambiguity.

I’m CCing Federico, but if you’re interested you may also want to join
the brand new Italian-speaking mailing list he’s just launched!
https://lists.gnu.org/mailman/listinfo/lilypond-it

Cheers,
-- V.



Re: horizontal spacing inside \magnifyMusic

2020-06-12 Thread Valentin Villenave
On 6/10/20, Eby Mani  wrote:
> Is there any way to add horizontal spacing to make music more readable
> without using "skip" inside violin section commented in the score ?.

Well, you probably can get a slightly better result by inserting
\newSpacingSection in a few of these places (and also overriding or
reverting the spacing-increment setting); see
http://lilypond.org/doc/stable/Documentation/notation/new-spacing-section

The reason why I’m saying “slightly better” is that your system is
already quite crowded so it’s somehow inevitable that some notes end
up quite close together.

Cheers,
-- V.