Overriding outside-staff-padding of a PianoPedalBracket

2020-06-16 Thread Paolo Prete
Hello,

Is it possible to \override the outside-staff-padding property of a
PianoPedalBracket, in some way?

Of course it is doable on a Sustain/Sostenuto/UnaCorda-PedalLineSpanner,
but this causes to have the result only for the horizontal line of the
bracket, and not for the  __/\__ (\sustainoff\sustainOn) and __|  elements
(\sustainOff)

In case Lilypond doesn't natively support this, a hack could be to draw two
copies of the bracket (above and below) on the same grob, with white color
(so they appear invisible, but they act as a barrier). In this way:


/\___/\___|   (white color)
|
|  <- outside-staff-padding gap
|
| /\___/\___|  (black color)
|
|  <- outside-staff-padding gap
|
|_/\___/\___|   (white color)


How can it be done? Thanks for your help!!

Best,

P


Re: Problems with Internals manual

2020-06-16 Thread Robin Bannister

Peter Toye wrote:

I'm trying to work out what the properties of a LyricHyphen are, but the 
Internals manual for that object keeps referring to rests, notes. beams. stems, 
See, for example, the minimum-distance property. None of these, to my mind, 
have much to do with lyrics or hyphens. Has some text from another object 
wandered in here by mistake?


Yes and no.
I am afraid you are expecting too much of the Internals comments.
These comments are not handcrafted for each object's page.

https://lilypond.org/doc/v2.20/Documentation/notation/layout-properties
lists all of these properties, and the comments there (have to) serve 
for all the different situations in which these property names are used.


And there can be so many different situations, that no attempt is made 
to mention and describe all of them.  Keeps maintenance costs down.


Workarounds:
  - try guessing
  - search for usage examples
  - experiment
  - ask on this list
  - read the relevant source


Sorry.  At least we get these nice lists for each object/interface.


Cheers,
Robin



RE: Free rhythm in part of a bar

2020-06-16 Thread Mark Stephen Mrotek
Peter,

 

No, I was not very explicit.

If you replaced the rest and added the same duration of spaces as the
duration of the cadenza no error message would not be sent.

An alternative to the rest could be the use of "cue" notes in the bass.

 

Mark

 

From: Peter Toye [mailto:lilyp...@ptoye.com] 
Sent: Tuesday, June 16, 2020 2:25 AM
To: Mark Stephen Mrotek ; 'David Kastrup'

Cc: lilypond-user@gnu.org
Subject: Re: Free rhythm in part of a bar

 

Mark,

I'm not quite sure what you mean here.  A spacer takes the same musical time
as a rest. So replacing 'r2' by 's2' still gives the barcheck error. Or am I
being thick?

Best regards,

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

-
Sunday, June 14, 2020, 6:51:59 PM, Mark Stephen Mrotek wrote:


Peter,
 
Lilypond with always give a bar check error when this is done.
The bass has a total of 6 beats (with the inserted half rest) in a 4/4
measure.
If you replace the rest with spacers the bar check error goes away.
 
Mark
 
"You can have everything you want, you just have everything at the same
time."
 
From: Peter Toye [mailto:lilyp...@ptoye.com]
Sent: Sunday, June 14, 2020 3:22 AM
To: Mark Stephen Mrotek mailto:carsonm...@ca.rr.com>
>; 'David Kastrup' mailto:d...@gnu.org> >
Cc: lilypond-user@gnu.org  
Subject: Re: Free rhythm in part of a bar
 
Mark,

Thanks. That looks fine, but still gives a barcheck error

C:/Users/Peter/AppData/Local/Temp/frescobaldi-cucdco98/tmp7auq80jw/document.
ly:17:35: warning: barcheck failed at: 1/2
4 4 s4*2 r2\fermata s4 c'4 c'

Best regards,

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

-
Saturday, June 13, 2020, 6:07:03 PM, Mark Stephen Mrotek wrote:


Peter,
 
Below is a modification of my original suggestion that allows for the bass
to be aligned with notes after the cadenze.
 
Mark
 
\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 c'4 c' \bar "|"
}
}
 
\new Staff {
  \time 4/4
  \clef "bass"
  {
c1
4 4 s4*2 r2\fermata s4 c'4 c' |
  }
}
>>
}
 
From: lilypond-user [

mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Peter Toye
Sent: Saturday, June 13, 2020 2:55 AM
To: David Kastrup <  d...@gnu.org>
Cc:   lilypond-user@gnu.org
Subject: Re: Free rhythm in part of a bar
 
David,

In this example the first two notes of the bass should synchronise with the
first two notes of the treble. And they do. My question was what to do in a
more complicated situation.

But as Christian has solved the problem I think we can stop here, unless
you're thinking of adding more functionality to the \cadenza construction,
in which case I'm happy to oblige. I have other problems to see to (a new
post will arrive shortly when I've written it)!

Best regards,

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

-
Saturday, June 13, 2020, 9:45:08 AM, David Kastrup wrote:

> Peter Toye <  lilyp...@ptoye.com> writes:

>> David,

>> What I mean is that in some music the end of the 'free rhythm' section
>> may need to be synchronised with the other staves. For instance, at
>> the end of a florid passage for a soloist in free rhythm, the last few
>> notes may need to coincide with an accompaniment. The \cadenza
>> keywords don't seem to handle this. Would you like an example or have
>> I explained it well enough now?

> You posted an example.  What in the bass of the example should
> synchronise where?

 

 



Re: Acciaccatura giving errors

2020-06-16 Thread Peter Toye
Carl,

Yes, thanks. It's working OK.

Best regards,

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

-
Tuesday, June 16, 2020, 5:27:00 PM, Carl Sorensen wrote:


Yes, but that error was fixed in 2.20.
 
It has to do with a different number of bits in the floating point precision of 
the processor and of the data type.
 
2.20 should work for you.
 
Carl
 
 
From: Peter Toye 
Reply-To: Peter Toye 
Date: Tuesday, June 16, 2020 at 10:18 AM
To: Xavier Scheuer 
Cc: Carl Sorensen , lilypond-user Mailinglist 

Subject: Re: Acciaccatura giving errors
 
Xavier,

Ah, the problems of using a Linux-developed program on Windows.

Best regards,

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

-
Tuesday, June 16, 2020, 5:06:18 PM, Xavier Scheuer wrote:

On Tue, 16 Jun 2020 at 17:31, Peter Toye  wrote:
>
> Thanks both. I've found the same now. I'd assumed that 2.21.0 would be later 
> than 2.20, but it seems not to be the case.
>
> Now sorted.

Hello,

IIRC some discussions on the mailing lists, "programming error: mis-predicted 
force" are Windows-only issues.
https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00400.html 

Cheers,
Xavier

--
Xavier Scheuer 
 

Problems with Internals manual

2020-06-16 Thread Peter Toye
I'm trying to work out what the properties of a LyricHyphen are, but the 
Internals manual for that object keeps referring to rests, notes. beams. stems, 
See, for example, the minimum-distance property. None of these, to my mind, 
have much to do with lyrics or hyphens. Has some text from another object 
wandered in here by mistake?
 
Peter
mailto:lilyp...@ptoye.com
www.ptoye.com

Re: Acciaccatura giving errors

2020-06-16 Thread Carl Sorensen
Yes, but that error was fixed in 2.20.

It has to do with a different number of bits in the floating point precision of 
the processor and of the data type.

2.20 should work for you.

Carl


From: Peter Toye 
Reply-To: Peter Toye 
Date: Tuesday, June 16, 2020 at 10:18 AM
To: Xavier Scheuer 
Cc: Carl Sorensen , lilypond-user Mailinglist 

Subject: Re: Acciaccatura giving errors

Xavier,

Ah, the problems of using a Linux-developed program on Windows.

Best regards,

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

-
Tuesday, June 16, 2020, 5:06:18 PM, Xavier Scheuer wrote:
On Tue, 16 Jun 2020 at 17:31, Peter Toye 
mailto:lilyp...@ptoye.com>> wrote:
>
> Thanks both. I've found the same now. I'd assumed that 2.21.0 would be later 
> than 2.20, but it seems not to be the case.
>
> Now sorted.

Hello,

IIRC some discussions on the mailing lists, "programming error: mis-predicted 
force" are Windows-only issues.
https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00400.html

Cheers,
Xavier

--
Xavier Scheuer mailto:x.sche...@gmail.com>>



Re: Acciaccatura giving errors

2020-06-16 Thread Peter Toye
Xavier,

Ah, the problems of using a Linux-developed program on Windows.

Best regards,

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

-
Tuesday, June 16, 2020, 5:06:18 PM, Xavier Scheuer wrote:


On Tue, 16 Jun 2020 at 17:31, Peter Toye  wrote:
>
> Thanks both. I've found the same now. I'd assumed that 2.21.0 would be later 
> than 2.20, but it seems not to be the case.
>
> Now sorted.

Hello,

IIRC some discussions on the mailing lists, "programming error: mis-predicted 
force" are Windows-only issues.
https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00400.html  

Cheers,
Xavier

-- 
Xavier Scheuer 

Re: Acciaccatura giving errors

2020-06-16 Thread Xavier Scheuer
On Tue, 16 Jun 2020 at 17:31, Peter Toye  wrote:
>
> Thanks both. I've found the same now. I'd assumed that 2.21.0 would be
later than 2.20, but it seems not to be the case.
>
> Now sorted.

Hello,

IIRC some discussions on the mailing lists, "programming error:
mis-predicted force" are Windows-only issues.
https://lists.gnu.org/archive/html/lilypond-user/2019-11/msg00400.html

Cheers,
Xavier

-- 
Xavier Scheuer 


Re: Acciaccatura giving errors

2020-06-16 Thread Martin Neubauer


On 16/06/2020 17:30, Peter Toye wrote:
> Thanks both. I've found the same now. I'd assumed that 2.21.0 would be later 
> than 2.20, but it seems not to be the case. 
> 
> Now sorted.
Technically it is, but that might be less relevant than one would
expect, as the split between the 2.20 release track branch and the 2.21
development branch happened quite some time before either release.

That said, your example gives no errors for me using 2.21.1.

Regards,
Martin

-- 
Click the Add/Set button, being careful not to press anything else



signature.asc
Description: OpenPGP digital signature


Re: Acciaccatura giving errors

2020-06-16 Thread Peter Toye
Thanks both. I've found the same now. I'd assumed that 2.21.0 would be later 
than 2.20, but it seems not to be the case. 

Now sorted.

Best regards,

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

-
Tuesday, June 16, 2020, 2:41:45 PM, Robin Bannister wrote:

> Peter Toye wrote:
>> An acciaccatura is giving 14 "programming error: mis-predicted force" errors 
>> and corrupt layout. The former I can live with the latter I can't.

> .
> .
>> I've tried to produce an MWE, and one is appended, but it doesn't show the 
>> layout errors which for me are a complete show-stopper. It's a slightly out 
>> of date version of LilyPond

> I see "mis-predicted force" with 2.19.80 and 2.19.83
> but not with 2.19.84 or 2.20.0


> Cheers,
> Robin

Re: Acciaccatura giving errors

2020-06-16 Thread Carl Sorensen
I ran your exact file, with no changes, and got no errors.

convert-ly was not needed to get it to compile successfully.

Lilypond 2.20.0
MacOS
Frescobaldi


Carl


From: Peter Toye 
Reply-To: Peter Toye 
Date: Tuesday, June 16, 2020 at 5:04 AM
To: 
Subject: Acciaccatura giving errors

\version "2.19.52"

\language "english"

\score {

  \transpose c a,% * comment out this line and it works OK

  \new Staff = "PianoLH" {
\clef "bass"
\relative {

  \time 4/4

  \clef "treble"% * comment this out and it's OK

  c'1
  \clef "bass"
  \resetRelativeOctave a,,
  \acciaccatura a8 c'1|
  c1

  % * comment out the following text and get fewer errors
 %%{
  {
c1 c c c
  }
%}
}
  }

  \layout {
  }
}




Re: Regexp Functions

2020-06-16 Thread Freeman Gilmore
On Tue, Jun 16, 2020 at 4:41 AM Aaron Hill  wrote:
>
> On 2020-06-15 11:16 pm, Freeman Gilmore wrote:
> > "y" could represent  one of my accidentals, "-y" inverted.   "-ax3" ,
> > one of my accidentals ,
> > "-a" used 3 times; like a flag, but needs to be inverted to "-x3".
> > "+rx2" needs a space like "+r x2".   "t" standard accidental. All "+"
> > removed.
> > "-y -ax3 +rx2 -stx2 t" becomes "-y -a -x3 r x2 -st -x2 t" , then
> > convert to list
> >  ("-y" "-a" "-x3" "r" "x2" "-st" "-x2" "t").
>
> This is sounding much more like you have invented a language/grammar
> that needs to be parsed rather than simply wanting to apply some
> arbitrary text transformation.  The interest in string manipulation
> stems from wanting to support a form of shorthand within the microtonal
> ligature notation.
>
> To that end, allow me to present an alternate way to attack the problem.
>   Consider:
>
> 
> (apply append
>(map (lambda (m)
>   (let ((inv (or (match:substring m 2) "")))
> (map (lambda (s) (string-append inv s))
>  (filter
>(lambda (s) (not (string-null? s)))
>(map (lambda (n) (or (match:substring m n) ""))
> '(3 4))
> (list-matches
>   "((-)|\\+?)([a-z]*)(x[0-9]+)?"
>   "-y -ax3 +rx2 -stx2 t")))
> 
> 
> ("-y" "-a" "-x3" "r" "x2" "-st" "-x2" "t")
> 

\version "2.20.0"
 #(use-modules (ice-9 regex))

#(define V "-6 -ax3 +rx2 -31x2 t" )%  note change, numbers as
well used for  names of accidentals

#(define W (apply append
   (map (lambda (m)
  (let ((inv (or (match:substring m 2) "")))
(map (lambda (s) (string-append inv s))
 (filter
   (lambda (s) (not (string-null? s)))
   (map (lambda (n) (or (match:substring m n) ""))
'(3 4))
 (list-matches
  "((-)|\\+?)([0-9]*|[a-z]*)(x[0-9]+)?"   %  do not
that this fool you, this chang is about
  V
%the only thing I think i understand here

 #(write W)
==
("-6" "-a" "-x3" "r" "x2" "-31" "-x2" "t")
==
I am running out of time, but the mapping may be extended to include a
ruffer input that i have already
converted to the  form like V above using 4 steps.   May take awhile
to get back.

Thank you, ƒg

>
> Several assumptions are being made within the core regular expression
> above; but what is important to note is that we are not doing any text
> substitution of the original input.  Rather, we are using a regular
> expression to identify the valid "words" and extract the key parts of
> those words.  While you can certainly act upon the information right
> away, I am showing a way to build a list of strings that should meet
> your specification.
>
>
> -- Aaron Hill



Re: PDF not shown in Frescobaldi

2020-06-16 Thread Federico Bruni




On Tue, 16 Jun, 2020 at 14:54, Noeck  wrote:



Am 16.06.20 um 14:13 schrieb Federico Bruni:

 IMO Frescobaldi package should not have lilypond as dependency


To be more precise: frescobaldi "recommends" and "enhances" lilypond.
But with default apt settings that means, installing frescobaldi will
install lilypond, too.


"recommends" makes sense, absolutely.

In Fedora there's the concept of weak dependency, but I think it was 
introduced a few years ago.

Currently in Fedora lilypond is a hard dependency of frescobaldi:
https://src.fedoraproject.org/rpms/frescobaldi/blob/master/f/frescobaldi.spec#_23

I think I opened an issue in Fedora/Red Hat tracker some time ago, but 
I cannot find it anymore.







Re: Acciaccatura giving errors

2020-06-16 Thread Peter Toye
Thanks Robin.

Interesting. I tried it with 2.21.0 and the problem is still there. I'll get 
hold of 2.20.0 but am a bit busy at the moment.

Best regards,

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

-
Tuesday, June 16, 2020, 2:41:45 PM, Robin Bannister wrote:

> Peter Toye wrote:
>> An acciaccatura is giving 14 "programming error: mis-predicted force" errors 
>> and corrupt layout. The former I can live with the latter I can't.

> .
> .
>> I've tried to produce an MWE, and one is appended, but it doesn't show the 
>> layout errors which for me are a complete show-stopper. It's a slightly out 
>> of date version of LilyPond

> I see "mis-predicted force" with 2.19.80 and 2.19.83
> but not with 2.19.84 or 2.20.0


> Cheers,
> Robin

Re: Acciaccatura giving errors

2020-06-16 Thread Robin Bannister

Peter Toye wrote:

An acciaccatura is giving 14 "programming error: mis-predicted force" errors 
and corrupt layout. The former I can live with the latter I can't.


.
.

I've tried to produce an MWE, and one is appended, but it doesn't show the 
layout errors which for me are a complete show-stopper. It's a slightly out of 
date version of LilyPond


I see "mis-predicted force" with 2.19.80 and 2.19.83
but not with 2.19.84 or 2.20.0


Cheers,
Robin



Re: PDF not shown in Frescobaldi

2020-06-16 Thread Noeck



Am 16.06.20 um 14:13 schrieb Federico Bruni:
> IMO Frescobaldi package should not have lilypond as dependency

To be more precise: frescobaldi "recommends" and "enhances" lilypond.
But with default apt settings that means, installing frescobaldi will
install lilypond, too.

Joram




Re: PDF not shown in Frescobaldi

2020-06-16 Thread Federico Bruni

On Tue, 16 Jun, 2020 at 13:02, Noeck  wrote:

By the way, one of several reasons to my own Frescobaldi was that the
version from the package repository depends on lilypond which depends 
on
python2 as the only application on my system. (I know, I could 
instruct

apt to ignore it and the lilypond installer also ships with python2).


IMO Frescobaldi package should not have lilypond as dependency, given 
that a) you can have your own "self-contained" installations from 
lilypond.org; b) lilypond package throws in a lot of dependencies 
(TexLive is the biggest one).


Maybe packagers are worried that a new user might complain that 
Frescobaldi can't do anything.
Perhaps Frescobaldi might check on startup if lilypond is installed and 
warn the user if it's not. Looks like a viable solution on Linux and 
Mac, but maybe not on Windows?

Ah, I found an old discussion on this topic:
https://github.com/frescobaldi/frescobaldi/issues/313






Acciaccatura giving errors

2020-06-16 Thread Peter Toye
An acciaccatura is giving 14 "programming error: mis-predicted force" errors 
and corrupt layout. The former I can live with the latter I can't.

The layout errors in the complete score are extremely wide spaces between the 
systems and a line with an extremely wide right margin on the page with the 
offending acciaccatura.

I've tried to produce an MWE, and one is appended, but it doesn't show the 
layout errors which for me are a complete show-stopper. It's a slightly out of 
date version of LilyPond, but I'm also having trouble using convert-ly in 
Frescobaldi.

\version "2.19.52"

\language "english"

\score {
  
  \transpose c a,   % * comment out this line and it works OK

  \new Staff = "PianoLH" {
\clef "bass"
\relative {

  \time 4/4

  \clef "treble"% * comment this out and it's OK

  c'1 
  \clef "bass"
  \resetRelativeOctave a,,
  \acciaccatura a8 c'1|
  c1

  % * comment out the following text and get fewer errors
 %%{
  {
c1 c c c
  }
%}
} 
  }

  \layout {
  }
}



 
Regards,

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

Re: PDF not shown in Frescobaldi

2020-06-16 Thread Noeck
> That sounds very reasonable, given the massive Qt changes we had since
> 2015. As a service to everyone you might get in touch with the Ubuntu
> package maintainers (both python3-poppler-qt and frescobaldi, if
> they're different), file a bug and tell them that the packages must be
> kept in sync.

tl;dr: problem solved with own build of python3-poppler-qt5


I build the python3-poppler-qt5 code according to the wiki and it works
now with Fresobaldi 3.1.2 from github.

Ubuntu provides a consistent (yet very old) combination of Frescobalid
3.0.0 and python3-poppler-qt5 0.24.2. So can’t see a bug on Ubuntu’s
side. Even though it is a pity that they will ship this old version
until 2025 with an LTS-update only in 2022.

As I wanted to use a new Frescobaldi (3.1.2), I had to follow the wiki
and build python3-poppler-qt5 0.75.0 myself. This combination works now.

By the way, one of several reasons to my own Frescobaldi was that the
version from the package repository depends on lilypond which depends on
python2 as the only application on my system. (I know, I could instruct
apt to ignore it and the lilypond installer also ships with python2).

Cheers,
Joram



Re: convert-ly is adding newlines

2020-06-16 Thread Peter Toye
Xavier,

Via Frescobaldi version 3.1.2. Thanks for the links. It seems to be a 
Frescobaldi issue. What a pain.

Best regards,

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

-
Tuesday, June 16, 2020, 11:20:42 AM, Xavier Scheuer wrote:


On Tue, 16 Jun 2020 at 11:19, Peter Toye  wrote:
>
> I've just used convert-ly to convert 2.19.2 to 2.21.0. And an extra newline 
> (x0D0A) has been added to every line. Odd, though, two consecutive newlines 
> are replaced by three. This is obviously a bit of a pain - any way of 
> stopping it?
>
> I'm on Windows 10, which may well be significant.

Hi Peter,

Are you running convert-ly directly via the command line or in Frescobaldi?
Several reports on lilypond-user and lilypond-user-fr mention this issue on 
Windows, but only when running in Frescobaldi.

https://github.com/frescobaldi/frescobaldi/issues/880#issuecomment-599236580  
https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00115.html 
https://lists.gnu.org/archive/html/lilypond-user-fr/2020-05/msg00214.html

Cheers,
Xavier

-- 
Xavier Scheuer 

Re: convert-ly is adding newlines

2020-06-16 Thread Xavier Scheuer
On Tue, 16 Jun 2020 at 11:19, Peter Toye  wrote:
>
> I've just used convert-ly to convert 2.19.2 to 2.21.0. And an extra
newline (x0D0A) has been added to every line. Odd, though, two consecutive
newlines are replaced by three. This is obviously a bit of a pain - any way
of stopping it?
>
> I'm on Windows 10, which may well be significant.

Hi Peter,

Are you running convert-ly directly via the command line or in Frescobaldi?
Several reports on lilypond-user and lilypond-user-fr mention this issue on
Windows, but only when running in Frescobaldi.

https://github.com/frescobaldi/frescobaldi/issues/880#issuecomment-599236580

https://lists.gnu.org/archive/html/lilypond-user/2020-03/msg00115.html
https://lists.gnu.org/archive/html/lilypond-user-fr/2020-05/msg00214.html

Cheers,
Xavier

-- 
Xavier Scheuer 


Harmonic reduction

2020-06-16 Thread Urs Liska
Hi all,

did anyone so far create a tool for an automatic harmonic reduction of
polyphonic music?

Attached you'll find one way how that could look like done manually.

The task would be to

 * read an arbitrary number of voices (music expressions)
 * determine the moments where "something" happens (note/rest)
 * calculate the chords for each of these steps
 * construct the corresponding music
* a) at the absolute pitches
* b) squashed into one of two ranges (all notes within one octave /
  "closest" setting but in order (this is not in the example)) 

I'm not fixated in *exactly* the output of the example but would like
to know if there's something existing in that direction.

Thanks
Urs
\version "2.20.0"

%\include "oll-core/package.ily"
%\loadPackage notation-fonts
%\useNotationFont \with {
%  extensions = ##t
%} arnold

\paper {
  indent = 3\cm
  system-count = 1
}

\layout {
  \context {
\Score
\accidentalStyle dodecaphonic
\override InstrumentName.font-size = #-1
  }
}

voice = \relative {
  r4 r8 cis'4 d c8

  |

  c ( fis4. ~ fis8 ) es es f
}

pianoUp = \relative {
  \clef bass
  r8 b, ( a'4 -> ) r8 b, ( g'4 -> )

  |

  r8 g ( as,4 g'16-. ) r a,4 ( gis'8 )
}

pianoDown = \relative {
  \clef bass
  r8 g,4 ( gis,16-. ) r r8 a4 ( gis'16-. ) r

  |

  r8 a,-. [ a
  %-\arnoldStrongbeat
  ( b'16 )]  r r4 b
}

combOneUp = \relative {
  r4 r8 cis'16 ~ cis ~ cis8 d8 ~ d c16 ~ c

  |

  c8 fis ~ fis ~ fis16 ~ fis ~ fis ~ fis es8 ~ es f
}

combOneDown = \relative {
  \clef bass
  r8 8  16 a'' r8 8 ~  ~ 16 ~ g'

  |

  r8 8  ~ 16 ~ as g' r a,8 ~  ~ 
}

combTwo = \relative {
  r8 8 ~  ^~ 16 ~  ~ cis8
  8 ~  ~ 16 ~ 

  |

  c8  ~  16 ~  ~
   ~ fis 8 ~  ~ 
}

rhythm = \relative {
  r8 d'' d d16 d d8 d d d16 d

  |

  d8 d d d16 d d d d8 d d
}

\score {
  <<
\new Staff \with {
  instrumentName = "Voice, orig."
} \voice
\new PianoStaff \with {
  instrumentName = "Piano, orig."
} <<
  \new Staff \pianoUp
  \new Staff \pianoDown
>>
\new PianoStaff \with {
  instrumentName = "Comb. 1"
  \omit Stem
  \omit Flag
  \omit Beam
  \omit Rest
  \omit Dots
}
<<
  \new Staff \combOneUp
  \new Staff \combOneDown
>>

\new Staff \with {
   \override StaffSymbol.line-count = 1
   \autoBeamOff
   \omit Clef
   \omit NoteHead
   \omit Accidental
} \rhythm
\new Staff \with {
  instrumentName = "Comb. squashed"
  \omit Stem
  \omit Flag
  \omit Beam
  \omit Rest
  \omit Dots
} \combTwo
  >>
}





excerpt.pdf
Description: Adobe PDF document


Re: Free rhythm in part of a bar

2020-06-16 Thread Peter Toye
Mark,

I'm not quite sure what you mean here.  A spacer takes the same musical time as 
a rest. So replacing 'r2' by 's2' still gives the barcheck error. Or am I being 
thick?

Best regards,

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

-
Sunday, June 14, 2020, 6:51:59 PM, Mark Stephen Mrotek wrote:


Peter,
 
Lilypond with always give a bar check error when this is done.
The bass has a total of 6 beats (with the inserted half rest) in a 4/4 measure.
If you replace the rest with spacers the bar check error goes away.
 
Mark
 
“You can have everything you want, you just have everything at the same time.”
 
From: Peter Toye [mailto:lilyp...@ptoye.com] 
Sent: Sunday, June 14, 2020 3:22 AM
To: Mark Stephen Mrotek ; 'David Kastrup' 
Cc: lilypond-user@gnu.org
Subject: Re: Free rhythm in part of a bar
 
Mark,

Thanks. That looks fine, but still gives a barcheck error

C:/Users/Peter/AppData/Local/Temp/frescobaldi-cucdco98/tmp7auq80jw/document.ly:17:35:
 warning: barcheck failed at: 1/2
4 4 s4*2 r2\fermata s4 c'4 c'

Best regards,

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

-
Saturday, June 13, 2020, 6:07:03 PM, Mark Stephen Mrotek wrote:

Peter,
 
Below is a modification of my original suggestion that allows for the bass to 
be aligned with notes after the cadenze.
 
Mark
 
\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 c'4 c' \bar "|"
}
}
 
\new Staff {
  \time 4/4
  \clef "bass"
  {
c1
4 4 s4*2 r2\fermata s4 c'4 c' |
  }
}
>>
}
 
From: lilypond-user [mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] 
On Behalf Of Peter Toye
Sent: Saturday, June 13, 2020 2:55 AM
To: David Kastrup 
Cc: lilypond-user@gnu.org
Subject: Re: Free rhythm in part of a bar
 
David,

In this example the first two notes of the bass should synchronise with the 
first two notes of the treble. And they do. My question was what to do in a 
more complicated situation.

But as Christian has solved the problem I think we can stop here, unless you're 
thinking of adding more functionality to the \cadenza construction, in which 
case I'm happy to oblige. I have other problems to see to (a new post will 
arrive shortly when I've written it)!

Best regards,

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

-
Saturday, June 13, 2020, 9:45:08 AM, David Kastrup wrote:

> Peter Toye  writes:

>> David,

>> What I mean is that in some music the end of the 'free rhythm' section
>> may need to be synchronised with the other staves. For instance, at
>> the end of a florid passage for a soloist in free rhythm, the last few
>> notes may need to coincide with an accompaniment. The \cadenza
>> keywords don't seem to handle this. Would you like an example or have
>> I explained it well enough now?

> You posted an example.  What in the bass of the example should
> synchronise where?
 

convert-ly is adding newlines

2020-06-16 Thread Peter Toye
I've just used convert-ly to convert 2.19.2 to 2.21.0. And an extra newline 
(x0D0A) has been added to every line. Odd, though, two consecutive newlines are 
replaced by three. This is obviously a bit of a pain - any way of stopping it?

I'm on Windows 10, which may well be significant.

 
Regards,

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

Re: Regexp Functions

2020-06-16 Thread Aaron Hill

On 2020-06-15 11:16 pm, Freeman Gilmore wrote:

"y" could represent  one of my accidentals, "-y" inverted.   "-ax3" ,
one of my accidentals ,
"-a" used 3 times; like a flag, but needs to be inverted to "-x3".
"+rx2" needs a space like "+r x2".   "t" standard accidental. All "+" 
removed.
"-y -ax3 +rx2 -stx2 t" becomes "-y -a -x3 r x2 -st -x2 t" , then 
convert to list

 ("-y" "-a" "-x3" "r" "x2" "-st" "-x2" "t").


This is sounding much more like you have invented a language/grammar 
that needs to be parsed rather than simply wanting to apply some 
arbitrary text transformation.  The interest in string manipulation 
stems from wanting to support a form of shorthand within the microtonal 
ligature notation.


To that end, allow me to present an alternate way to attack the problem. 
 Consider:



(apply append
  (map (lambda (m)
 (let ((inv (or (match:substring m 2) "")))
   (map (lambda (s) (string-append inv s))
(filter
  (lambda (s) (not (string-null? s)))
  (map (lambda (n) (or (match:substring m n) ""))
   '(3 4))
   (list-matches
 "((-)|\\+?)([a-z]*)(x[0-9]+)?"
 "-y -ax3 +rx2 -stx2 t")))


("-y" "-a" "-x3" "r" "x2" "-st" "-x2" "t")


Several assumptions are being made within the core regular expression 
above; but what is important to note is that we are not doing any text 
substitution of the original input.  Rather, we are using a regular 
expression to identify the valid "words" and extract the key parts of 
those words.  While you can certainly act upon the information right 
away, I am showing a way to build a list of strings that should meet 
your specification.



-- Aaron Hill



Re: PDF not shown in Frescobaldi

2020-06-16 Thread Urs Liska
Am Dienstag, den 16.06.2020, 10:31 +0200 schrieb Noeck:
> > Well, the *package* is not by Wilbert, which may be the problem.
> > The
> > issue is that the package has to be built against exactly the
> > correct
> > Qt/SIP version used in the OS and Frescobaldi. It seems that this
> > is an
> > issue that occasionally pops up in distributions.
> 
> Well not the package, but the code. I looked at the github page¹ and
> it
> seems that the Ubuntu package (0.24.2 from 2015) is very old compared
> to
> recent releases on github (0.75.0 from 2019). Should I use 0.75.0
> instead?

That sounds very reasonable, given the massive Qt changes we had since
2015. As a service to everyone you might get in touch with the Ubuntu
package maintainers (both python3-poppler-qt and frescobaldi, if
they're different), file a bug and tell them that the packages must be
kept in sync.

Thanks
Urs

> 
> ¹: https://github.com/frescobaldi/python-poppler-qt5/releases
> 
> I will try and follow your building-python-poppler-qt5-from-source
> link
> later today.
> 
> Cheers,
> Joram




Re: PDF not shown in Frescobaldi

2020-06-16 Thread Noeck


> Well, the *package* is not by Wilbert, which may be the problem. The
> issue is that the package has to be built against exactly the correct
> Qt/SIP version used in the OS and Frescobaldi. It seems that this is an
> issue that occasionally pops up in distributions.

Well not the package, but the code. I looked at the github page¹ and it
seems that the Ubuntu package (0.24.2 from 2015) is very old compared to
recent releases on github (0.75.0 from 2019). Should I use 0.75.0 instead?

¹: https://github.com/frescobaldi/python-poppler-qt5/releases

I will try and follow your building-python-poppler-qt5-from-source link
later today.

Cheers,
Joram



Re: PDF not shown in Frescobaldi

2020-06-16 Thread Urs Liska
Am Dienstag, den 16.06.2020, 10:23 +0200 schrieb Noeck:
> 
> Am 16.06.20 um 10:06 schrieb Urs Liska:
> > This may well be true, but the traceback looks like this one:
> > https://github.com/frescobaldi/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux#workaround-building-python-poppler-qt5-from-source
> > and
> > https://github.com/frescobaldi/frescobaldi/issues/838
> 
> This explains the missing icon and how to add it to the application
> menu. But for the music view I am still a bit at a loss.
> 
> > I wonder if it's still possible today to have that problem with
> > Linux
> > packages. What distribution/desktop do you use exactly?
> 
> I use the latest Ubuntu 20.04 LTS with the default Gnome desktop.
> python3-poppler-qt5 is 0.24.2-3build7 (I did not know that this
> package
> is also by Wilbert Berendsen).
> 
> https://packages.ubuntu.com/focal/python3-poppler-qt5

Well, the *package* is not by Wilbert, which may be the problem. The
issue is that the package has to be built against exactly the correct
Qt/SIP version used in the OS and Frescobaldi. It seems that this is an
issue that occasionally pops up in distributions.

Urs

> 
> Cheers,
> Joram




Re: PDF not shown in Frescobaldi

2020-06-16 Thread Noeck



Am 16.06.20 um 10:06 schrieb Urs Liska:
> This may well be true, but the traceback looks like this one:
> https://github.com/frescobaldi/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux#workaround-building-python-poppler-qt5-from-source
> and
> https://github.com/frescobaldi/frescobaldi/issues/838

This explains the missing icon and how to add it to the application
menu. But for the music view I am still a bit at a loss.

> I wonder if it's still possible today to have that problem with Linux
> packages. What distribution/desktop do you use exactly?

I use the latest Ubuntu 20.04 LTS with the default Gnome desktop.
python3-poppler-qt5 is 0.24.2-3build7 (I did not know that this package
is also by Wilbert Berendsen).

https://packages.ubuntu.com/focal/python3-poppler-qt5

Cheers,
Joram



Re: PDF not shown in Frescobaldi

2020-06-16 Thread Urs Liska
Am Dienstag, den 16.06.2020, 09:58 +0200 schrieb Noeck:
> Hi Urs,
> 
> Am 16.06.20 um 00:37 schrieb Urs Liska:
> 
> > Rhat diesn't seem too plausible, it looks more like a dependency
> > issue.
> 
> I looked at the dependencies of the frescobaldi package and now
> installed python3-poppler-qt5. Now Frescobaldi crashes at startup
> (see
> traceback below).
> 
> > What about the Tools menu? Can you manually open/close an (even
> > empty) Music View from there? If so, what does it look like?
> 
> The music view is there, it is empty (gray). The tools menu looks
> normal
> and I can choose the music view there and also deselect it.

OK, that means "the music view is gone" is not correct. It's that it
can't display anything. Which underlines the suspicion of the poppler
dependency issue.


> The SVG view
> works and shows the document (if I compile it to SVG). The PDF-
> document
> drop down in the symbols tool bar is gray and empty.
> 
> One other piece of information: I get this warning when starting
> frescobaldi in the terminal:
> 
> > Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use
> > QT_QPA_PLATFORM=wayland to run on Wayland anyway.
> 
> And the application has no icon in the Gnome menu. Could it be a
> Wayland
> issue? Using the second variable does not change anything obvious.

This may well be true, but the traceback looks like this one:
https://github.com/frescobaldi/frescobaldi/wiki/Run-Frescobaldi-3-on-Linux#workaround-building-python-poppler-qt5-from-source
and
https://github.com/frescobaldi/frescobaldi/issues/838

I wonder if it's still possible today to have that problem with Linux
packages. What distribution/desktop do you use exactly?

Best
Urs

> 
> Cheers
> Joram
> 
> 
> Here is the traceback with python3-poppler-qt5 installed:
> 
> > Traceback (most recent call last):
> >   File "frescobaldi-3.1.2/frescobaldi_app/plugin.py", line 79, in
> > instance
> > return _instances[cls][obj]
> >   File "/usr/lib/python3.8/weakref.py", line 383, in __getitem__
> > return self.data[ref(key)]
> > KeyError:  > (PanelManager)>
> > 
> > During handling of the above exception, another exception occurred:
> > 
> > Traceback (most recent call last):
> >   File "frescobaldi", line 28, in 
> > main.main() # Parse command line, create
> > windows etc
> >   File "frescobaldi-3.1.2/frescobaldi_app/main.py", line 210, in
> > main
> > win = mainwindow.MainWindow()
> >   File "frescobaldi-3.1.2/frescobaldi_app/mainwindow.py", line 129,
> > in __init__
> > self.createMenus()
> >   File "frescobaldi-3.1.2/frescobaldi_app/mainwindow.py", line
> > 1105, in createMenus
> > menu.createMenus(self)
> >   File "frescobaldi-3.1.2/frescobaldi_app/menu.py", line 61, in
> > createMenus
> > m.addMenu(menu_file(mainwindow))
> >   File "frescobaldi-3.1.2/frescobaldi_app/menu.py", line 95, in
> > menu_file
> > m.addMenu(snippet.menu.TemplateMenu(mainwindow))
> >   File "frescobaldi-3.1.2/frescobaldi_app/snippet/menu.py", line
> > 146, in __init__
> > self.addAction(self.tool().actionCollection.templates_manage)
> >   File "frescobaldi-3.1.2/frescobaldi_app/snippet/menu.py", line
> > 58, in tool
> > return panelmanager.manager(self.mainwindow()).snippettool
> >   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line
> > 38, in manager
> > return PanelManager.instance(mainwindow)
> >   File "frescobaldi-3.1.2/frescobaldi_app/plugin.py", line 84, in
> > instance
> > result.__init__(obj)
> >   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line
> > 70, in __init__
> > self.loadPanel("musicview.MusicViewPanel", "viewers")
> >   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line
> > 107, in loadPanel
> > __import__(module_name)
> >   File "frescobaldi-3.1.2/frescobaldi_app/musicview/__init__.py",
> > line 52, in 
> > import pagedview
> >   File "frescobaldi-3.1.2/frescobaldi_app/pagedview.py", line 36,
> > in 
> > import popplerqt5
> > ValueError: PyCapsule_GetPointer called with incorrect name
> 
> 




Re: PDF not shown in Frescobaldi

2020-06-16 Thread Noeck
Hi Urs,

Am 16.06.20 um 00:37 schrieb Urs Liska:

> Rhat diesn't seem too plausible, it looks more like a dependency issue.

I looked at the dependencies of the frescobaldi package and now
installed python3-poppler-qt5. Now Frescobaldi crashes at startup (see
traceback below).

> What about the Tools menu? Can you manually open/close an (even empty) Music 
> View from there? If so, what does it look like?

The music view is there, it is empty (gray). The tools menu looks normal
and I can choose the music view there and also deselect it. The SVG view
works and shows the document (if I compile it to SVG). The PDF-document
drop down in the symbols tool bar is gray and empty.

One other piece of information: I get this warning when starting
frescobaldi in the terminal:

> Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use 
> QT_QPA_PLATFORM=wayland to run on Wayland anyway.

And the application has no icon in the Gnome menu. Could it be a Wayland
issue? Using the second variable does not change anything obvious.

Cheers
Joram


Here is the traceback with python3-poppler-qt5 installed:

> Traceback (most recent call last):
>   File "frescobaldi-3.1.2/frescobaldi_app/plugin.py", line 79, in instance
> return _instances[cls][obj]
>   File "/usr/lib/python3.8/weakref.py", line 383, in __getitem__
> return self.data[ref(key)]
> KeyError: 
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "frescobaldi", line 28, in 
> main.main() # Parse command line, create windows etc
>   File "frescobaldi-3.1.2/frescobaldi_app/main.py", line 210, in main
> win = mainwindow.MainWindow()
>   File "frescobaldi-3.1.2/frescobaldi_app/mainwindow.py", line 129, in 
> __init__
> self.createMenus()
>   File "frescobaldi-3.1.2/frescobaldi_app/mainwindow.py", line 1105, in 
> createMenus
> menu.createMenus(self)
>   File "frescobaldi-3.1.2/frescobaldi_app/menu.py", line 61, in createMenus
> m.addMenu(menu_file(mainwindow))
>   File "frescobaldi-3.1.2/frescobaldi_app/menu.py", line 95, in menu_file
> m.addMenu(snippet.menu.TemplateMenu(mainwindow))
>   File "frescobaldi-3.1.2/frescobaldi_app/snippet/menu.py", line 146, in 
> __init__
> self.addAction(self.tool().actionCollection.templates_manage)
>   File "frescobaldi-3.1.2/frescobaldi_app/snippet/menu.py", line 58, in tool
> return panelmanager.manager(self.mainwindow()).snippettool
>   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line 38, in 
> manager
> return PanelManager.instance(mainwindow)
>   File "frescobaldi-3.1.2/frescobaldi_app/plugin.py", line 84, in instance
> result.__init__(obj)
>   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line 70, in 
> __init__
> self.loadPanel("musicview.MusicViewPanel", "viewers")
>   File "frescobaldi-3.1.2/frescobaldi_app/panelmanager.py", line 107, in 
> loadPanel
> __import__(module_name)
>   File "frescobaldi-3.1.2/frescobaldi_app/musicview/__init__.py", line 52, in 
> 
> import pagedview
>   File "frescobaldi-3.1.2/frescobaldi_app/pagedview.py", line 36, in 
> import popplerqt5
> ValueError: PyCapsule_GetPointer called with incorrect name





Re: [OT] modify midi

2020-06-16 Thread Gianmaria Lari
Thank you Matt, Mark & Gilles.

I had a look to all your propositions and the idea to convert midi to ascii
etc. etc. looks interesting and promising. I will make some test to see how
much work it needs and if it something that can work.

Thanks a lot!
g.

On Mon, 15 Jun 2020 at 16:58, Matt Wallis  wrote:

> On 15/06/2020 12:18, Mark Knoop wrote:
> > At 11:09 on 15 Jun 2020, Gianmaria Lari wrote:
> >> Sometimes I would like to modify a bit the midi file generated by
> >> Lilypond. What stops me from doing that is that in case I modify the
> >> lilypond source I lose all the work done on the midi and I have to do
> >> it again from scratch.
> >>
> >> So I was wondering if anyone knows a software that gives you the
> >> possibility to record the list of operations I do on a midi file so
> >> that I can reapply them "automatically". Of course I understand the
> >> limitation that a software like this will have: the midi file you want
> >> to apply the change has to be "very similar" to the original one (for
> >> example changing only the note pitch etc. etc.).
> >
> > There are various utilities on the web for converting midi to and from
> text formats, e.g. http://www.archduke.org/midi/
> >
> > You could have a potential workflow as follows:
> >
> > - convert Lilypond's MIDI output to text
> > - edit as necessary
> > - save diff of the edit
> > - convert back to MIDI for playback
> > ...
> > - edit Lilypond, export new MIDI, convert to text
> > - use patch to apply previous diff
> > - convert back to MIDI for playback
> >
> > https://www.pair.com/support/kb/paircloud-diff-and-patch/
>
> I wonder if it's possible to use git.  For example:
>
> - Commit (text version of) original midi in a branch called, say
> 'from-lilypond'
> - Create a new branch called, say 'modifications'
> - Make your modifications in the 'modifications' branch (this may
> involve another conversion from text to midi and back, depending on how
> you make your modifications)
> - When you have a new midi from lilypond, commit (a text version of) it
> to the 'from-lilypond' branch,.
> - Switch to  'modifications' branch, and merge from the branch
> 'from-lilypond'
>
> In all of the above, you use the same filename for all versions of the
> midi, and in both branches.
>
> Well, that's a back of an envelope sketch. I'm not sure if this has any
> benefits over the diff-and-patch method described by Mark.
> Is git better than diff-and-patch at dealing with this kind of merge? I
> don't know. I guess it may be useful to have all versions saved in git.
> git also is good at presenting conflicts - but again, I don't know how
> this compares with diff-and-patch - I haven't done much with the latter.
>
> Of course, with either method, you'd probably need to automate it (e.g..
> using make)
>
> Matt
>
>