Re: Search inside LilyPond

2020-04-28 Thread Freeman Gilmore
On Tue, Apr 28, 2020 at 4:51 PM David Nalesnik 
wrote:

> On Tue, Apr 28, 2020 at 3:46 PM David Nalesnik 
> wrote:
> >
> > On Mon, Apr 27, 2020 at 10:56 AM Adam Good 
> wrote:
> > >
> > > Freeman see below...
> > >
> > > On Sat, Apr 25, 2020 at 8:52 PM Freeman Gilmore <
> freeman.gilm...@gmail.com> wrote:
> > >>
> > >> David:
> > >> Sorry but i am lost, I do not understand how to get to the file were,
> \makamGlyphs is define with this.
> > >> Thank you, ƒg
> > >
> > >
> > > On a Windows machine your path is (most likely)...
> > >
> > > C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\ly
> > >
> >
> > I would suggest using some sort of text editor.  For example,
> > Notepad++ is easy to install and use on a Windows machine.  You can
> > open the folder Adam is pointing you to with "folder as workspace" and
> > easily search and navigate.  I would suggest that you also open
> > C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\scm since
> > there will no doubt be relevant materials there, too.
> >
>
> Actually, duh (that's for me), do you have Frescobaldi installed?
> Just use that to navigate to those folders we mentioned and look at
> the code.
>
Would not leave home with out it, opens everything!I even use it in
place of sandbox (never used).
I have the windows search working now so i have what i need.
Thank you, ƒg

>
> David
>


Re: Search inside LilyPond

2020-04-28 Thread Freeman Gilmore
On Tue, Apr 28, 2020 at 4:46 PM David Nalesnik 
wrote:

> On Mon, Apr 27, 2020 at 10:56 AM Adam Good  wrote:
> >
> > Freeman see below...
> >
> > On Sat, Apr 25, 2020 at 8:52 PM Freeman Gilmore <
> freeman.gilm...@gmail.com> wrote:
> >>
> >> David:
> >> Sorry but i am lost, I do not understand how to get to the file were,
> \makamGlyphs is define with this.
> >> Thank you, ƒg
> >
> >
> > On a Windows machine your path is (most likely)...
> >
> > C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\ly
> >
>
> I would suggest using some sort of text editor.  For example,
> Notepad++ is easy to install and use on a Windows machine.  You can
> open the folder Adam is pointing you to with "folder as workspace" and
> easily search and navigate.  I would suggest that you also open
> C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\scm since
> there will no doubt be relevant materials there, too.
>
> The function you mention elsewhere (ly:parser-set-note-names) is
> written in C++, and the source isn't going to be on your computer with
> just an install.  To examine and work with this code, I've got a
> virtual machine set up.  (See the Contributor's Manual for
> instructions.  This may be farther than you intend to go!  You can do
> plenty with just ly and scm files.)
>
Not ready for this yet.
Thank you, ƒg

>
> Hope this is helpful,
>
> David
>


Re: resetting accidentals at word breaks

2020-04-28 Thread David Wright
On Tue 28 Apr 2020 at 15:47:22 (-0400), Fr. Samuel Springuel wrote:
> > On 25 Apr, 2020, at 2:02 PM, David Wright  wrote:
> > 
> > So you need a NullLyric which contains your "controlling" lyrics, but
> > which is not printed (and occupies no space).
> 
> My attempt to create such a context is attached.  Unfortunately, the 
> “occupies no space” thing still has me scratching my head.
> 
> > This lyric would have
> > very long "words" whose syllables are all hyphenated together unless
> > every real lyric line has a word break at that point. It could be
> > hand-crafted in the first instance or, with more ingenuity,
> > automatically constructed from the other lyrics. Good luck.
> 
> My lyrics are all entered in variables which look like: x = \lyricmode { some 
> wordy -- words }
> 
> Using \displayMusic, I see these are make-music expressions with an elements 
> list inside them containing 1 element per syllable.  If a hyphen follows a 
> syllable, then the corresponding element of the list has a HyphenEvent in its 
> articulations property.
> 
> So an algorithm for combining lyrics (lyrics_one and lyrics_two) would look 
> like this:
> 
> 1) Find the longer of lyrics_one and lyrics_two (referred to hereafter as 
> lyrics_max, the other is lyrics_min)
> 2) loop over syllables (the elements list) in lyrics_max
>   2a) if concurrent syllable (element at same index) exists in lyrics_min 
> (or more specifically the elements list in lyrics_min)
>   true) continue
>   false) break out of loop
>   2b) if current syllable of lyrics_max does has a HyphenEvent in its 
> list of articulations
>   true) continue
>   false) if the concurrent syllable of other lyrics has a 
> HyphenEvent in its list of articulations
>   true) add a HyphenEvent to list of articulations in 
> current syllable of lyrics_max
>   false) continue
> 3) return lyrics_max
> 
> Does that sound like a reasonable algorithm for implementation in scheme?

I know nothing about scheme, so I can't translate the following into
whatever data structures scheme has available.

The sort of way you might automate the generation of the null voice
could be something like:

a -- b -- c -- de -- fg -- h -- ij -- k
11101011010

1 indicates a non-terminal syllable, 0 a terminal one.

m -- no -- p -- qrs -- t
10110010000

Missing syllables are terminal.

Add the codes:

11101011010
10110010000
---
21211021010

An inclusive OR is just as good as addition:

11111011010

Potential breakpoints always follow a zero. Naively, one could
generate:

1 -- 1 -- 1 -- 1 -- 1 -- 01 -- 1 -- 01 -- 0

as the null Lyric, but there might be better ways to feed this
information back into LilyPond.

That's probably all very similar to what you suggested above,
but expressed in slightly different terms. It scales to many
voices, and deals with missing syllables more simply.

Cheers,
David.



Re: Bar numbers “repeat aware” for music for dancing

2020-04-28 Thread Niols

Hello,

And thank you for your answer!

On 22/04/2020 20:01, Flaming Hakama by Elaine wrote:

For such tunes, we are not so interested in the “usual” printed bar
numbers, but rather in the bar numbers (“repeat aware”) from the dance.
In particular, a repeat in the music does not mean a repeat in the
dance: if the first eight bars are repeated in the music, I would like
the bar numbers to go from 1 to 8 and then directly to 17.

I am unsure how to deal with that in an automated and clean way.


I'm not aware of an automated way.


I would love to be able to write one, but I think it requires a much 
better understanding of the intrinsics of LilyPond, and especially the 
"iterators", "engravers" and "performers". I read the LilyPond 
developers documentation about this but that didn't help me so much. Are 
you aware of any reference on the topic?



On the other hand, I find that it is not really much trouble to just reset
the bar numbers as you need to.  You're already writing code for \repeat
volta and \alternative and possibly \bar "||" and so forth, so what is one
additional line of code to reset the bar number?


That is how I do it currently. However, we start having thousands of 
tunes and a lot of contributors, and every new rule we invent (whether 
it's that there is a || every 8 bars except if there is a volta, that 
there is a break every 4 bars, that the bar numbers are “repeat aware”) 
mean new maintenance tasks to change all the old tunes, new instructions 
for the contributors, and new automated tasks that the contributors have 
to think of. I tend to see computers as tools that should take care of 
everything that one can automate.


I guess it is also a way for me to find a project that will allow me to 
dive a bit into LilyPond, and to satisfy my craving for automation.



Also, I would want to not print one bar number but all the bar numbers
within the repeat. If the first eight bars are repeated, I would like to
print 1 9, 2 10, 3 11, etc. This is less a priority for me but I guess
it is linked to the same problem. Would you have pointers for that too?


So, here is a function I use to show duplicate bar numbers.
You pass in the starting bar number, and the number of repeated bars.

Also, the ones I use for triple and quadruple numbers.


Thank you very much for those! They are definitely going to be useful.

Best regards,
— Nicolas “Niols” Jeannerod



Re: Search inside LilyPond

2020-04-28 Thread David Nalesnik
On Mon, Apr 27, 2020 at 10:56 AM Adam Good  wrote:
>
> Freeman see below...
>
> On Sat, Apr 25, 2020 at 8:52 PM Freeman Gilmore  
> wrote:
>>
>> David:
>> Sorry but i am lost, I do not understand how to get to the file were, 
>> \makamGlyphs is define with this.
>> Thank you, ƒg
>
>
> On a Windows machine your path is (most likely)...
>
> C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\ly
>

I would suggest using some sort of text editor.  For example,
Notepad++ is easy to install and use on a Windows machine.  You can
open the folder Adam is pointing you to with "folder as workspace" and
easily search and navigate.  I would suggest that you also open
C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\scm since
there will no doubt be relevant materials there, too.

The function you mention elsewhere (ly:parser-set-note-names) is
written in C++, and the source isn't going to be on your computer with
just an install.  To examine and work with this code, I've got a
virtual machine set up.  (See the Contributor's Manual for
instructions.  This may be farther than you intend to go!  You can do
plenty with just ly and scm files.)

Hope this is helpful,

David



Re: Search inside LilyPond

2020-04-28 Thread David Nalesnik
On Tue, Apr 28, 2020 at 3:46 PM David Nalesnik  wrote:
>
> On Mon, Apr 27, 2020 at 10:56 AM Adam Good  wrote:
> >
> > Freeman see below...
> >
> > On Sat, Apr 25, 2020 at 8:52 PM Freeman Gilmore  
> > wrote:
> >>
> >> David:
> >> Sorry but i am lost, I do not understand how to get to the file were, 
> >> \makamGlyphs is define with this.
> >> Thank you, ƒg
> >
> >
> > On a Windows machine your path is (most likely)...
> >
> > C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\ly
> >
>
> I would suggest using some sort of text editor.  For example,
> Notepad++ is easy to install and use on a Windows machine.  You can
> open the folder Adam is pointing you to with "folder as workspace" and
> easily search and navigate.  I would suggest that you also open
> C:\Program Files (x86)\LilyPond\usr\share\lilypond\current\scm since
> there will no doubt be relevant materials there, too.
>

Actually, duh (that's for me), do you have Frescobaldi installed?
Just use that to navigate to those folders we mentioned and look at
the code.

David



Re: Combining roughly 70 separate files into a single book

2020-04-28 Thread Federico Bruni
Il giorno mer 29 apr 2020 alle 02:36, Brent Annable 
 ha scritto:
Does that do page numbers as well?  I'd really like to eliminate any 
extra steps if possible; my goal is to have a master file that I can 
adjust as necessary, and then just press a button to spit the whole 
thing out every time I need a new version.


Based on Jerry's suggestion I've done a little experimenting. Using a 
structure like this:


\book {
\bookpart {\include "O-Welt-ich-muss-dich.ly"}
\bookpart {\include "O-Welt-ich-muss-dich.ly"}
}

does produce scores in sequence with headings, etc. in place, but the 
music processing is full of errors and the output is nonsensical (see 
attachment). Can someone explain to me why this approach doesn't 
work? I thought that anything in a \bookpart block should be 
independent of everything around it, is that not the case? I even 
tried it with multiple \book blocks, but that produced nothing at all.


IIRC the reason is that you cannot include, within a bookpart, a file 
which contains top level expressions.
This means that, even if you remove the top level expressions (such as 
\score), in any case you'll need an extra file to produce the PDF of 
the single piece.


I usually follow this strategy:

- Piece-Name.ily: file containing only music variables (doesn't produce 
any output), including a variable for the \score block. You'd better 
use variable names which are unique within your project.
- Piece-Name.ly: here I include above file and call the \score 
variable, to print a single PDF.
- If the piece is part of a collection, the collection.ly file will 
include only the .ily file and call the \score variable.


HTH
Federico





Re: resetting accidentals at word breaks

2020-04-28 Thread Fr. Samuel Springuel
> On 28 Apr, 2020, at 3:47 PM, Fr. Samuel Springuel  
> wrote:
> 
>> On 25 Apr, 2020, at 2:02 PM, David Wright  wrote:
>> 
>> So you need a NullLyric which contains your "controlling" lyrics, but
>> which is not printed (and occupies no space).
> 
> My attempt to create such a context is attached.  Unfortunately, the 
> “occupies no space” thing still has me scratching my head.

After some more playing I came up with the following, which seems to work.  
Critiques welcome.

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


null_lyrics.ly
Description: Binary data


Re: Error en procesar

2020-04-28 Thread Karlin High

On 4/28/2020 3:47 AM, Mariona Reixach wrote:
warning: not relocating, no 2.18.2/ or current/ found under C:/Program 
Files (x86)/Denemo/usr/share/lilypond/


It looks like you are using Denemo. Although that software includes 
LilyPond, it is not the same thing. Other mailing lists may have better 
help:


denemo-de...@gnu.org
lilypond...@gnu.org

(GOOGLE TRANSLATE)

Parece que estás usando Denemo. Aunque ese software incluye LilyPond, no 
es lo mismo. Otras listas de correo pueden tener una mejor ayuda.


--
Karlin High
Missouri, USA



Re: resetting accidentals at word breaks

2020-04-28 Thread Fr. Samuel Springuel
> On 25 Apr, 2020, at 2:02 PM, David Wright  wrote:
> 
> So you need a NullLyric which contains your "controlling" lyrics, but
> which is not printed (and occupies no space).

My attempt to create such a context is attached.  Unfortunately, the “occupies 
no space” thing still has me scratching my head.

> This lyric would have
> very long "words" whose syllables are all hyphenated together unless
> every real lyric line has a word break at that point. It could be
> hand-crafted in the first instance or, with more ingenuity,
> automatically constructed from the other lyrics. Good luck.

My lyrics are all entered in variables which look like: x = \lyricmode { some 
wordy -- words }

Using \displayMusic, I see these are make-music expressions with an elements 
list inside them containing 1 element per syllable.  If a hyphen follows a 
syllable, then the corresponding element of the list has a HyphenEvent in its 
articulations property.

So an algorithm for combining lyrics (lyrics_one and lyrics_two) would look 
like this:

1) Find the longer of lyrics_one and lyrics_two (referred to hereafter as 
lyrics_max, the other is lyrics_min)
2) loop over syllables (the elements list) in lyrics_max
2a) if concurrent syllable (element at same index) exists in lyrics_min 
(or more specifically the elements list in lyrics_min)
true) continue
false) break out of loop
2b) if current syllable of lyrics_max does has a HyphenEvent in its 
list of articulations
true) continue
false) if the concurrent syllable of other lyrics has a 
HyphenEvent in its list of articulations
true) add a HyphenEvent to list of articulations in 
current syllable of lyrics_max
false) continue
3) return lyrics_max

Does that sound like a reasonable algorithm for implementation in scheme?

✝✝
Fr. Samuel, OSB
(R. Padraic Springuel)
St. Anselm’s Abbey
4501 South Dakota Ave, NE
Washington, DC, 20017
202-269-2300
(c) 202-853-7036

PAX ☧ ΧΡΙΣΤΟΣ


null_lyrics.ly
Description: Binary data


Re: Search inside LilyPond

2020-04-28 Thread Adam Good
Gottit sorry for the misunderstanding. If you haven't figured it out yet
how about this:

https://www.howtogeek.com/99406/how-to-search-for-text-inside-of-any-file-using-windows-search/


Pretty straight forward. Basically you'll add an ly extension to what files
are searchable. Then head to the ly directory in File Explorer, in the
search field, type in for example:
content:scale

...and that will show you all of the files that have the word "scale"

I'm not great with Windows so, very happy you brought this up!

Hopefully I'm not further misunderstanding, please let me know.

best,
Adam


Re: Combining roughly 70 separate files into a single book

2020-04-28 Thread JxStarks .
When I used this structure I did not use \book or \bookpart. I just used
the \include and \markup. I'll post an example when I get home from work.

-Jerry

On Tue, Apr 28, 2020, 12:51 PM Brent Annable  wrote:

> Hi Richard,
>
> Does that do page numbers as well?  I'd really like to eliminate any extra
> steps if possible; my goal is to have a master file that I can adjust as
> necessary, and then just press a button to spit the whole thing out every
> time I need a new version.
>
> Based on Jerry's suggestion I've done a little experimenting. Using a
> structure like this:
>
> \book {
> \bookpart {\include "O-Welt-ich-muss-dich.ly"}
> \bookpart {\include "O-Welt-ich-muss-dich.ly"}
> }
>
> does produce scores in sequence with headings, etc. in place, but the
> music processing is full of errors and the output is nonsensical (see
> attachment). Can someone explain to me why this approach doesn't work? I
> thought that anything in a \bookpart block should be independent of
> everything around it, is that not the case? I even tried it with multiple
> \book blocks, but that produced nothing at all.
>
> Brent.
>
> On Wed, 29 Apr 2020 at 02:18, Richard Shann 
> wrote:
>
>> On Tue, 2020-04-28 at 23:37 +1000, Brent Annable wrote:
>> > Hi all,
>> >
>> > I'm looking for some general advice on how to combine about 70 files
>> > into one, to turn multiple files into a single PDF.
>>
>> I guess you are aware that ghostscript can concatenate your pdfs?
>>
>> gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf
>>
>> Richard Shann
>>
>> >
>> > Over the past two years or so I've been typesetting a collection of
>> > organ pieces for a friend. After doing the first few I created a
>> > template that I subsequently used to set the rest, adding to it as I
>> > went along whenever new problems presented themselves. Now the
>> > collection is finished and I need to put them all together, and I'm
>> > just wondering about the easiest way to go about it.
>> >
>> > Most of the Lilypond files contain multiple \score blocks (usually 2
>> > or 3) and the variables in each file all have the same names. I've
>> > attached a typical file to give an idea of what I'm dealing with
>> > (plus the file with my macros, for convenience).
>> >
>> > So I have about 70 files like this. How should I go about putting
>> > everything together? Can I do an 'include' for every file somehow? Or
>> > do I need to rename all the variables in each separate file to do
>> > that? I've never done this before, so would really appreciate being
>> > steered in the right direction to avoid having to reinvent the wheel.
>> >
>> > Many thanks,
>> >
>> > Brent.
>>
>


Re: Replace the notes in a phrase (drum notation) with scheme?

2020-04-28 Thread Gilles Thibault

I appreciate the suggestion, but I don't think that helps.  I can see
that you are replacing whole bars of music, which is kinda cool in
fact.  However, it doesn't help me with my goal which is to not have to
define groovec at all.


Yes ok. Below a solution replacing only one note, all 4 measures. No 
groovec.
Not perhaps the simplest solution however because you have to add 
\repeat unfold 16

in each voices. (Probably not what you whished...)



A = \drummode { \voiceOne  \repeat unfold 8 hh8 }
B = \drummode { \voiceOne { s4 sn4 s4 sn4 } }
C = \drummode { \voiceTwo { bd8 bd8 r4 bd8 bd8 bd8 bd8 } }


grooveFinal = \drummode { <<
\multiReplaceMusic \repeat unfold 16 \A
{ cymc8 s1*0
  cymc8 s1*4
  cymc8 s1*8
  cymc8 s1*12  }
\\
\repeat unfold 16 \B
\\
\repeat unfold 16 \C



}

\score { \new DrumStaff {
   \set Staff.instrumentName = #"drums"
   \grooveFinal }
\layout { \override NoteColumn.ignore-collision = ##t }
}




This other solution use a very small groovec. Perhaps it will not work 
in 2.18 (uses \voices). I think it is the lighter solution.




A = \drummode { \repeat unfold 8 hh8 }
B = \drummode {  s4 sn8 s s4 sn8 s  }  % <- little change here to avoid 
notes collision

C = \drummode {  bd8 bd8 r4 bd8 bd8 bd8 bd8 }

groovec = \drummode { \voices 1,1,2 << cymc8 \\ s8 \\  bd8  >> }

groove =  { \voices 1,1,2 << \A \\ \B \\ \C >> }

grooveFinal = \multiReplaceMusic \repeat unfold 16 \groove {
\groovec s1*0
\groovec s1*4
\groovec s1*8
\groovec s1*12 }


\score { \new DrumStaff {
   \set Staff.instrumentName = #"drums"
   \grooveFinal }
}

%%

Extended features are in preparation (in a few weeks ?). This will make 
more easier to deal with simultaneous music. Not ready for now. Sorry


--
Gilles



Re: Combining roughly 70 separate files into a single book

2020-04-28 Thread Brent Annable
Hi Richard,

Does that do page numbers as well?  I'd really like to eliminate any extra
steps if possible; my goal is to have a master file that I can adjust as
necessary, and then just press a button to spit the whole thing out every
time I need a new version.

Based on Jerry's suggestion I've done a little experimenting. Using a
structure like this:

\book {
\bookpart {\include "O-Welt-ich-muss-dich.ly"}
\bookpart {\include "O-Welt-ich-muss-dich.ly"}
}

does produce scores in sequence with headings, etc. in place, but the music
processing is full of errors and the output is nonsensical (see
attachment). Can someone explain to me why this approach doesn't work? I
thought that anything in a \bookpart block should be independent of
everything around it, is that not the case? I even tried it with multiple
\book blocks, but that produced nothing at all.

Brent.

On Wed, 29 Apr 2020 at 02:18, Richard Shann  wrote:

> On Tue, 2020-04-28 at 23:37 +1000, Brent Annable wrote:
> > Hi all,
> >
> > I'm looking for some general advice on how to combine about 70 files
> > into one, to turn multiple files into a single PDF.
>
> I guess you are aware that ghostscript can concatenate your pdfs?
>
> gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf
>
> Richard Shann
>
> >
> > Over the past two years or so I've been typesetting a collection of
> > organ pieces for a friend. After doing the first few I created a
> > template that I subsequently used to set the rest, adding to it as I
> > went along whenever new problems presented themselves. Now the
> > collection is finished and I need to put them all together, and I'm
> > just wondering about the easiest way to go about it.
> >
> > Most of the Lilypond files contain multiple \score blocks (usually 2
> > or 3) and the variables in each file all have the same names. I've
> > attached a typical file to give an idea of what I'm dealing with
> > (plus the file with my macros, for convenience).
> >
> > So I have about 70 files like this. How should I go about putting
> > everything together? Can I do an 'include' for every file somehow? Or
> > do I need to rename all the variables in each separate file to do
> > that? I've never done this before, so would really appreciate being
> > steered in the right direction to avoid having to reinvent the wheel.
> >
> > Many thanks,
> >
> > Brent.
>


Master.pdf
Description: Adobe PDF document


Re: Combining roughly 70 separate files into a single book

2020-04-28 Thread Richard Shann
On Tue, 2020-04-28 at 23:37 +1000, Brent Annable wrote:
> Hi all,
> 
> I'm looking for some general advice on how to combine about 70 files
> into one, to turn multiple files into a single PDF.

I guess you are aware that ghostscript can concatenate your pdfs?

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf

Richard Shann

> 
> Over the past two years or so I've been typesetting a collection of
> organ pieces for a friend. After doing the first few I created a
> template that I subsequently used to set the rest, adding to it as I
> went along whenever new problems presented themselves. Now the
> collection is finished and I need to put them all together, and I'm
> just wondering about the easiest way to go about it. 
> 
> Most of the Lilypond files contain multiple \score blocks (usually 2
> or 3) and the variables in each file all have the same names. I've
> attached a typical file to give an idea of what I'm dealing with
> (plus the file with my macros, for convenience).
> 
> So I have about 70 files like this. How should I go about putting
> everything together? Can I do an 'include' for every file somehow? Or
> do I need to rename all the variables in each separate file to do
> that? I've never done this before, so would really appreciate being
> steered in the right direction to avoid having to reinvent the wheel.
> 
> Many thanks,
> 
> Brent.



Re: Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
Le mar. 28 avr. 2020 à 16:26, Carl Sorensen  a écrit :

->CS: I don't think we have anything in LilyPond that tries to synchronize
> two scores, so that doesn't particularly bother me.
>

Well, my idea was not to synchronised both scores, just to show the
unwanted extra space between to quarter notes when adding the lyrics.


> However, when I only use *one* score with my code, there is the extra
> space after the completion of the lyrics.  So this is a problem with the
> new voice instantiated in sequential music.
>

Ok

Cheers,
Pierre


Re: Lyrics vs horizontal spacing

2020-04-28 Thread Carl Sorensen


From: Pierre Perol-Schneider 
Date: Tuesday, April 28, 2020 at 8:16 AM
To: Carl Sorensen 
Cc: lilypond-user 
Subject: Re: Lyrics vs horizontal spacing

Hi Carl,
Thanks, but since you gathered both staves to a single score, yes that works. 
However, if 2 scores the first syllable looks ok -- so better output -- but the 
problem remains:

->CS: I don't think we have anything in LilyPond that tries to synchronize two 
scores, so that doesn't particularly bother me.

However, when I only use *one* score with my code, there is the extra space 
after the completion of the lyrics.  So this is a problem with the new voice 
instantiated in sequential music.

Carl



 



Re: Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
Hi Carl,
Thanks, but since you gathered both staves to a single score, yes that
works.
However, if 2 scores the first syllable looks ok -- so better output -- but
the problem remains:

\version "2.20.0"

%% just a line to show the horizontal spacing:
redline = \markup {
  \with-color #red
  \with-dimensions-from \null
  \translate #'(.6 . -15)
  \draw-line #'(0 . 25)
}
%%%

\score {
  <<
{ \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
{ \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4
  \tweak extra-offset #'(-.5 . -9)\mark\redline }
  >>
}

\score {
  <<
\new Staff = Portee <<
  {
\voiceOne c'' 4 4 4
  \new Voice ="lyrvoice" { \voiceOne c''4 4 4 }
4 4 } \\
  { \voiceTwo c'4 4 4 4 4 4 4 4 }
>>
\new Lyrics \lyricsto "lyrvoice" { la -- la -- la }
  >>
  \layout {
\context {
  \Lyrics
  alignAboveContext = "Portee"
  \override LyricText.font-size = #0
  %\remove Axis_group_engraver %% Yep!!
  %\override LyricText.Y-offset = 1
  %\override LyricHyphen.Y-offset = 1
}
  }
}

Cheers,
Pierre

Le mar. 28 avr. 2020 à 15:03, Carl Sorensen  a écrit :

>
>
>
>
> *From: *Pierre Perol-Schneider 
> *Date: *Tuesday, April 28, 2020 at 2:39 AM
> *To: *lilypond-user 
> *Subject: *Lyrics vs horizontal spacing
>
>
>
> 
>
> I'm not sure if this is a bug (I didn't find any it in the bug list).
>
> Anyway, I'd like to avoid this bad spacing. Any idea how to?
>
>
>
> CS->  I eliminated it by using \addlyrics.  I have found \addlyrics to be
> difficult enough to use properly that I exclusively use \lyricsto
>
>
>
> %%
>
> \version "2.20.0"
>
>
>
> %% just a line to show the horizontal spacing:
>
> redline = \markup {
>
>   \with-color #red
>
>   \with-dimensions-from \null
>
>   \translate #'(.6 . -15)
>
>   \draw-line #'(0 . 25)
>
> }
>
> %%%
>
> \score {
>
>   <<
>
> <<
>
>   { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
>
>   { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
>
> >>
>
>
>
> \new Staff = Portee <<
>
>   {
>
> \voiceOne c'' 4 4 4
>
>   \new Voice = "lyrvoice" { \voiceOne c''4 4 4 }
>
>  % \addlyrics  \with { alignAboveContext = "Portee" } { la la la }
>
> 4 4 } \\
>
>   { \voiceTwo c'4 4 4 4 4 4 4 4 }
>
> >>
>
>   \new Lyrics  \with {alignAboveContext = "Portee"}
>
> \lyricsto "lyrvoice" { la la la }
>
>
>
>
>
>   >>
>
>   }
>
> \layout {
>
>   \context {
>
> \Voice
>
> \override NoteColumn.force-hshift = 0 % <= no effect
>
>   }
>
>   \context {
>
> \Lyrics
>
> \override LyricText.font-size = #-10 % <= no effect
>
>   }
>
> }
>
> %%%
>
>
>
>
>
> HTH,
>
>
>
> Carl
>
>
>


Re: Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
Ok, thank you Kieren, I'll put that on the bug list.
Cheers,
Pierre

Le mar. 28 avr. 2020 à 14:24, Kieren MacMillan 
a écrit :

> Hi Pierre,
>
> > I'm not sure if this is a bug (I didn't find any it in the bug list).
>
> Sure looks like it to me…!
>
> > I'd like to avoid this bad spacing. Any idea how to?
>
> Only really hacky ones.  =(
>
> Sorry,
> Kieren.


Re: Lyrics vs horizontal spacing

2020-04-28 Thread Carl Sorensen


From: Pierre Perol-Schneider 
Date: Tuesday, April 28, 2020 at 2:39 AM
To: lilypond-user 
Subject: Lyrics vs horizontal spacing


I'm not sure if this is a bug (I didn't find any it in the bug list).
Anyway, I'd like to avoid this bad spacing. Any idea how to?

CS->  I eliminated it by using \addlyrics.  I have found \addlyrics to be 
difficult enough to use properly that I exclusively use \lyricsto

%%
\version "2.20.0"

%% just a line to show the horizontal spacing:
redline = \markup {
  \with-color #red
  \with-dimensions-from \null
  \translate #'(.6 . -15)
  \draw-line #'(0 . 25)
}
%%%
\score {
  <<
<<
  { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
  { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
>>

\new Staff = Portee <<
  {
\voiceOne c'' 4 4 4
  \new Voice = "lyrvoice" { \voiceOne c''4 4 4 }
 % \addlyrics  \with { alignAboveContext = "Portee" } { la la la }
4 4 } \\
  { \voiceTwo c'4 4 4 4 4 4 4 4 }
>>
  \new Lyrics  \with {alignAboveContext = "Portee"}
\lyricsto "lyrvoice" { la la la }


  >>
  }
\layout {
  \context {
\Voice
\override NoteColumn.force-hshift = 0 % <= no effect
  }
  \context {
\Lyrics
\override LyricText.font-size = #-10 % <= no effect
  }
}
%%%


HTH,

Carl



Re: Lyrics vs horizontal spacing

2020-04-28 Thread Kieren MacMillan
Hi Pierre,

> I'm not sure if this is a bug (I didn't find any it in the bug list).

Sure looks like it to me…!

> I'd like to avoid this bad spacing. Any idea how to?

Only really hacky ones.  =(

Sorry,
Kieren.


Re: Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
Oops, \tweak extra-spacing-width #-1 has nothing to do here...

Le mar. 28 avr. 2020 à 12:26, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> a écrit :

> I have this workaround:
>
> \version "2.20.0"
>
> %% just a line to show the horizontal spacing:
> redline = \markup {
>   \with-color #red
>   \with-dimensions-from \null
>   \translate #'(.6 . -15)
>   \draw-line #'(0 . 25)
> }
> %%%
>
> <<
>   { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
>   { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
> >>
>
> \new Staff = Portee <<
>   {
> \voiceOne c'' 4 4 4
>   \new Voice {
> \voiceOne
> \tweak extra-spacing-width #-1
> c''4 4 4 }
>   \addlyrics  \with { alignAboveContext = "Portee" } { la -- la -- la
> }
> 4 4 } \\
>   { \voiceTwo c'4 4 4 4 4 4 4 4 }
> >>
>
> \layout {
>   \context {
> \Voice
> \override NoteColumn.force-hshift = 0 % <= no effect
>   }
>   \context {
> \Lyrics
> \override LyricText.Y-offset = 1
> \override LyricHyphen.Y-offset = 1
> %\override LyricText.font-size = #-10 % <= no effect
> \override VerticalAxisGroup.nonstaff-relatedstaff-spacing = % <=
> logically no effect
>  #'((basic-distance . 1.0)
>(minimum-distance . 0.7)
>(padding . 0.7)
>(stretchability . 15))
> \remove Axis_group_engraver
>   }
> }
>
> Still, if someone find something less radical...
> Cheers,
> Pierre
>
> Le mar. 28 avr. 2020 à 10:39, Pierre Perol-Schneider <
> pierre.schneider.pa...@gmail.com> a écrit :
>
>> Hi All,
>> Please consider this snippet:
>>
>> %%
>> \version "2.20.0"
>>
>> %% just a line to show the horizontal spacing:
>> redline = \markup {
>>   \with-color #red
>>   \with-dimensions-from \null
>>   \translate #'(.6 . -15)
>>   \draw-line #'(0 . 25)
>> }
>> %%%
>>
>> <<
>>   { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
>>   { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
>> >>
>>
>> \new Staff = Portee <<
>>   {
>> \voiceOne c'' 4 4 4
>>   \new Voice { \voiceOne c''4 4 4 }
>>   \addlyrics  \with { alignAboveContext = "Portee" } { la la la }
>> 4 4 } \\
>>   { \voiceTwo c'4 4 4 4 4 4 4 4 }
>> >>
>>
>> \layout {
>>   \context {
>> \Voice
>> \override NoteColumn.force-hshift = 0 % <= no effect
>>   }
>>   \context {
>> \Lyrics
>> \override LyricText.font-size = #-10 % <= no effect
>>   }
>> }
>> %%%
>>
>> I'm not sure if this is a bug (I didn't find any it in the bug list).
>> Anyway, I'd like to avoid this bad spacing. Any idea how to?
>> TIA, cheers,
>> Pierre
>>
>


Re: Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
I have this workaround:

\version "2.20.0"

%% just a line to show the horizontal spacing:
redline = \markup {
  \with-color #red
  \with-dimensions-from \null
  \translate #'(.6 . -15)
  \draw-line #'(0 . 25)
}
%%%

<<
  { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
  { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
>>

\new Staff = Portee <<
  {
\voiceOne c'' 4 4 4
  \new Voice {
\voiceOne
\tweak extra-spacing-width #-1
c''4 4 4 }
  \addlyrics  \with { alignAboveContext = "Portee" } { la -- la -- la }
4 4 } \\
  { \voiceTwo c'4 4 4 4 4 4 4 4 }
>>

\layout {
  \context {
\Voice
\override NoteColumn.force-hshift = 0 % <= no effect
  }
  \context {
\Lyrics
\override LyricText.Y-offset = 1
\override LyricHyphen.Y-offset = 1
%\override LyricText.font-size = #-10 % <= no effect
\override VerticalAxisGroup.nonstaff-relatedstaff-spacing = % <=
logically no effect
 #'((basic-distance . 1.0)
   (minimum-distance . 0.7)
   (padding . 0.7)
   (stretchability . 15))
\remove Axis_group_engraver
  }
}

Still, if someone find something less radical...
Cheers,
Pierre

Le mar. 28 avr. 2020 à 10:39, Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com> a écrit :

> Hi All,
> Please consider this snippet:
>
> %%
> \version "2.20.0"
>
> %% just a line to show the horizontal spacing:
> redline = \markup {
>   \with-color #red
>   \with-dimensions-from \null
>   \translate #'(.6 . -15)
>   \draw-line #'(0 . 25)
> }
> %%%
>
> <<
>   { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
>   { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
> >>
>
> \new Staff = Portee <<
>   {
> \voiceOne c'' 4 4 4
>   \new Voice { \voiceOne c''4 4 4 }
>   \addlyrics  \with { alignAboveContext = "Portee" } { la la la }
> 4 4 } \\
>   { \voiceTwo c'4 4 4 4 4 4 4 4 }
> >>
>
> \layout {
>   \context {
> \Voice
> \override NoteColumn.force-hshift = 0 % <= no effect
>   }
>   \context {
> \Lyrics
> \override LyricText.font-size = #-10 % <= no effect
>   }
> }
> %%%
>
> I'm not sure if this is a bug (I didn't find any it in the bug list).
> Anyway, I'd like to avoid this bad spacing. Any idea how to?
> TIA, cheers,
> Pierre
>


Error en procesar

2020-04-28 Thread Mariona Reixach
Buenos días a todos!

Ayer el programa funcionaba perfectamente pero ahora cuando le doy a
"procesar" me sale este mensaje:

Iniciando lilypond-windows.exe 2.18.2 [OCPC_M01_0174.ly]...

warning: not relocating, no 2.18.2/ or current/ found under C:/Program
Files (x86)/Denemo/usr/share/lilypond/

ERROR: In procedure primitive-load-path:

ERROR: Unable to find file "ice-9/boot-9.scm" in load path

Completado con éxito en 0.1"



He desinstalado y vuelto a instalar el programa pero no hay manera.


Alguien podría ayudarme, por favor?


Muchas gracias!


Libre
de virus. www.avast.com

<#m_6946482337692028186_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


Lyrics vs horizontal spacing

2020-04-28 Thread Pierre Perol-Schneider
 Hi All,
Please consider this snippet:

%%
\version "2.20.0"

%% just a line to show the horizontal spacing:
redline = \markup {
  \with-color #red
  \with-dimensions-from \null
  \translate #'(.6 . -15)
  \draw-line #'(0 . 25)
}
%%%

<<
  { \voiceOne c'' 4 4 4  \new Voice { \voiceOne c''4 4 4 } 4 4 } \\
  { \voiceTwo c'4 4 4 4-\redline 4 4 4-\redline 4 }
>>

\new Staff = Portee <<
  {
\voiceOne c'' 4 4 4
  \new Voice { \voiceOne c''4 4 4 }
  \addlyrics  \with { alignAboveContext = "Portee" } { la la la }
4 4 } \\
  { \voiceTwo c'4 4 4 4 4 4 4 4 }
>>

\layout {
  \context {
\Voice
\override NoteColumn.force-hshift = 0 % <= no effect
  }
  \context {
\Lyrics
\override LyricText.font-size = #-10 % <= no effect
  }
}
%%%

I'm not sure if this is a bug (I didn't find any it in the bug list).
Anyway, I'd like to avoid this bad spacing. Any idea how to?
TIA, cheers,
Pierre


Re: Replace the notes in a phrase (drum notation) with scheme?

2020-04-28 Thread Stefano Antonelli
On Tue, 2020-04-28 at 02:14 +0200, Gilles Thibault wrote:
> > 
> > groove = \drummode {
> > <<
> > \voiceOne { \repeat unfold 8 {hh8}}
> > \\
> > \voiceOne { s4 sn4 s4 sn4 }
> > \\
> > \voiceTwo { bd8 bd8 r4 bd8 bd8 bd8 bd8 }
> > >>
> > }
> > 
> Hello Stafano.

Salut Gilles, many thanks for the reply.

> Perhaps you can try \multiReplaceMusic, a function from
> extractMusic.ly described here :
> http://lsr.di.unimi.it/LSR/Item?id=542

Quite the coincidence, I came across that snippet and others earlier
today.  That eventually led me to your personal website and from where
I downloaded all the lilypond scripts for further study.

I've been looking at extractMusic.ly trying to understand how it works
from the perspective of a non-scheme programmer.  I was hoping I could
cherry pick some select functions from a few different approaches in
the lsr, but I don't have enough scheme experience to hack it.

> %%%
> \include "extractMusic.ly"
> 
> groove = \drummode {
>   <<
>   { \voiceOne \repeat unfold 8 hh8 }
>   \\
>{ \voiceOne s4 sn4 s4 sn4 }
>   \\
>{ \voiceTwo bd8 bd8 r4 bd8 bd8 bd8 bd8 }
>   >>
> }
> 
> groovec = \drummode {
>   <<
>{ \voiceOne cymc8 \repeat unfold 7 hh8 }
>  \\
>{ \voiceOne s4 sn4 s4 sn4 }
>   \\
>{ \voiceTwo bd8 bd8 r4 bd8 bd8 bd8 bd8 }
>   >>
> }
> 
> 
> grooveFinal = \multiReplaceMusic \repeat unfold 16 \groove {
>  \groovec s1*0
>  \groovec s1*4
>  \groovec s1*8
>  \groovec s1*12 }
> 
> 

I appreciate the suggestion, but I don't think that helps.  I can see
that you are replacing whole bars of music, which is kinda cool in
fact.  However, it doesn't help me with my goal which is to not have to
define groovec at all.

I'm just trying to cut down on some of the duplication when only a
single note change is required.  As a test I tried:

beatc = \drummode {
<<
\voiceOne { cymc8 }
>>
}

\multiReplaceMusic \repeat unfold 16 \groove {
      \beatc s1*0
      \beatc s1*4
      \beatc s1*8
      \beatc s1*12 }

But that removed the bass drum on beat 1 as well.  I guess that's to be
expected.  So then I tried:

beatc = \drummode {
<<
\voiceOne { cymc8 }
\\
\voiceTwo { bd8 }
>>
}

This fixed the bass drum on beat1, but removed the beam between the 1st
and 2nd bass drum 8th notes.

Is there a way to limit multiReplaceMusic to a single voice?

Thanks,
Stef