Re: System with SystemStartBar only in PianoStaff

2019-03-15 Thread Urs Liska

Hi Harm and Lukas,

thank you for this reference and minimal example. In fact the 
ready-to-use example looks like I can directly apply it to my use case. 
I must say I would have never thought of such an approach!


Best
Urs

Am 14.03.19 um 21:27 schrieb Lukas-Fabian Moser:



http://lsr.di.unimi.it/LSR/Item?id=873
may help.


... and for Piano Staves, I condensed this in a minimal & ready-to-use 
example:


http://lilypond.1069038.n5.nabble.com/Unconnected-simultaenous-staff-groups-tp206812p206820.html 



Lukas



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


Markup beyond the final barline

2019-03-15 Thread Urs Liska

Hi all, this is more out of curiousity.

Markups can't flow beyond the end of a score (horizontally) and widen 
the score if necessary:


\version "2.19.82"

{
  c'1 -"This is a long text that widens the score because it can't protrude."
  c'1
}

Is there a possibility to override this behaviour so that the score is 
just spaced naturally and the markup just goes as long as it needs?


Urs

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


Re: Markup beyond the final barline

2019-03-15 Thread Mark Knoop
At 08:44 on 15 Mar 2019, Urs Liska wrote:
> Hi all, this is more out of curiousity.
>
> Markups can't flow beyond the end of a score (horizontally) and widen
> the score if necessary:
>
> \version "2.19.82"
>
> {
>c'1 -"This is a long text that widens the score because it can't protrude."
>c'1
> }
>
> Is there a possibility to override this behaviour so that the score is
> just spaced naturally and the markup just goes as long as it needs?

Hi Urs, I've achieved this in the past by overriding the final barline stencil, 
combining it with a spacer markup to push it to the left.

--
Mark Knoop

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


Order of callback function calls

2019-03-15 Thread Urs Liska

Hi,

I'm thinking about collecting some (and hopefully a growing corpus) of 
the functions that help dealing with grobs in callback functions and 
make them accessible in an openLilyLib package. For example for so many 
applications it is necessary to find a grob's system, then get all 
objects within that and find specific ones within that list. Or find the 
NoteColumn's at the two ends of a spanner, etc. I think making such 
patterns more accessible with functions is a way for me to become more 
comfortable with this type of grob manipulation, and maybe it will be 
useful to make this area somewhat more accessible for an (even if only 
slightly) wider audience.


I know that some functions can only be called before or after certain 
points in the engraving process. For example all information about the 
absolute positioning of grobs is only available after-line-breaking, 
while some actions (e.g. setting properties like 'X-offset) will only 
have an effect before-line-breaking (whereas one can set the 'color 
property at any time).


I have two questions about this for now:

1. Is there a list somewhere detailing *all* available callbacks?

2. Is there anything general to say about when callbacks for regular 
properties like e.g. 'direction  or 'X-offset. I mean, if I say 
\override DynamicText.X-offset = #my-custom-callback, when will that be 
called?


Best
Urs


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


Re: Markup beyond the final barline

2019-03-15 Thread Andrew Bernard
Hi Urs,

Any good?

\version "2.19.82"

{
  c'1
  -\markup {
\with-dimensions #'(0 . 0) #'(2 . 0)
"This is a long text that widens the score because it can't protrude."
  }
}

Andrew


On Fri, 15 Mar 2019 at 19:45, Urs Liska  wrote:

> Hi all, this is more out of curiousity.
>
> Markups can't flow beyond the end of a score (horizontally) and widen the
> score if necessary:
>
> \version "2.19.82"
>
> {
>   c'1 -"This is a long text that widens the score because it can't protrude."
>   c'1
> }
>
> Is there a possibility to override this behaviour so that the score is
> just spaced naturally and the markup just goes as long as it needs?
>
> Urs
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Markup beyond the final barline

2019-03-15 Thread Urs Liska

Hi Mark,

Am 15.03.19 um 10:08 schrieb Mark Knoop:

At 08:44 on 15 Mar 2019, Urs Liska wrote:

Hi all, this is more out of curiousity.

Markups can't flow beyond the end of a score (horizontally) and widen
the score if necessary:

\version "2.19.82"

{
c'1 -"This is a long text that widens the score because it can't protrude."
c'1
}

Is there a possibility to override this behaviour so that the score is
just spaced naturally and the markup just goes as long as it needs?

Hi Urs, I've achieved this in the past by overriding the final barline stencil, 
combining it with a spacer markup to push it to the left.



Hm, I'm afraid this is too specific for my use case. Another workaround 
I could imagine would be using \stopStaff and spacer rests after the 
final barline. But I'd be interested in a more general solution where 
LilyPond would just ingore the markup for the spacing of the score.


Urs




--
Mark Knoop

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


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


Re: Markup beyond the final barline

2019-03-15 Thread Urs Liska

Hi Andrew,

Am 15.03.19 um 10:14 schrieb Andrew Bernard:

\version "2.19.82"

{
  c'1
  -\markup {
    \with-dimensions #'(0 . 0) #'(2 . 0)
    "This is a long text that widens the score because it can't protrude."
  }
}


Perfect! Both from the result and conceptually exactly what I was 
looking for.


Best
Urs


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


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-03-15 Thread Federico Bruni
Il giorno ven 1 mar 2019 alle 21:14, David Wright 
 ha scritto:

Actually, I think there's an error in your reasoning in the apparmor
section, but I'm unable to test it because I have nothing installed
(that I know of) using these files. You wrote:

   Next, edit '/etc/apparmor.d/usr.bin.evince' and uncomment the line:

   # Site-specific additions and overrides. See local/README for 
details.

  include 

   [It's right at the end.] The local files provide for extending and 
adding
   information to the base apparmor files without interfering with 
them, and

   making system upgrades easier.

But I think you've removed a # that should be left in. AIUI in these
apparmor files:

 # Site-specific additions and overrides. See local/README for 
details.

 ↑↑ introduced an ordinary comment

 #include 
  this is an active include line (think C 
pragma)


David, finally I had the chance to test it on a vanilla Ubuntu 18.10.
You are right about the #include syntax. More details here:
http://manpages.ubuntu.com/manpages/cosmic/en/man5/apparmor.d.5.html

I've also verified it, just to be sure.
So the guide by Andrew is incorrect in this part. And also with 
reloading configuration: reloading apparmor systemd service is not 
necessary; AFAICT apparmor_parser is enough.



The main issues to be fixed (for Usage manual) are:

a. The Usage manual should point out that the lilypond full path in 
/etc/apparmor.d/local/usr.bin.evince should be changed according to 
your own installation (it's obvious, but you can easily forget it when 
you follow detailed instructions which make you "lazy"..).


b. Looking at `journalctl -xe|less` I see that the problem seems to be 
the fact that lilypond-invoke-editor is actually a symlink to a script, 
which then calls the guile executable distributed in lilypond package. 
So we have three files here.


My findings:

1. with Usage manual current configuration I get this error:

mar 15 13:32:01 ubuntu-18 audit[3121]: AVC apparmor="DENIED" 
operation="exec" profile="/usr/bin/evince" 
name="/home/fede/.local/bin/lilypond-wrapper.guile" pid=3121 
comm="gio-launch-desk" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000
mar 15 13:32:01 ubuntu-18 kernel: audit: type=1400 
audit(1552653121.550:40): apparmor="DENIED" operation="exec" 
profile="/usr/bin/evince" 
name="/home/fede/.local/bin/lilypond-wrapper.guile" pid=3121 
comm="gio-launch-desk" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000



2. Ok, let's try adding lilypond-wrapper.guile (see end of this email). 
And I get this:


mar 15 13:55:18 ubuntu-18 audit[3647]: AVC apparmor="DENIED" 
operation="exec" profile="/usr/bin/evince//sanitized_helper" 
name="/home/fede/.local/lilypond/usr/bin/guile" pid=3647 
comm="lilypond-invoke" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000
mar 15 13:55:18 ubuntu-18 org.gnome.Evince.desktop[1702]: 
/home/fede/.local/bin/lilypond-invoke-editor: 6: exec: 
/home/fede/.local/lilypond/usr/bin/guile: Permission denied
mar 15 13:55:18 ubuntu-18 kernel: audit: type=1400 
audit(1552654518.540:118): apparmor="DENIED" operation="exec" 
profile="/usr/bin/evince//sanitized_helper" 
name="/home/fede/.local/lilypond/usr/bin/guile" pid=3647 
comm="lilypond-invoke" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000



3. Ok, let's add also ...usr/bin/guile and I get this:

mar 15 13:57:49 ubuntu-18 audit[3678]: AVC apparmor="DENIED" 
operation="exec" profile="/usr/bin/evince//sanitized_helper" 
name="/home/fede/.local/lilypond/usr/bin/guile" pid=3678 
comm="lilypond-invoke" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000
mar 15 13:57:49 ubuntu-18 org.gnome.Evince.desktop[1702]: 
/home/fede/.local/bin/lilypond-invoke-editor: 6: exec: 
/home/fede/.local/lilypond/usr/bin/guile: Permission denied
mar 15 13:57:49 ubuntu-18 kernel: audit: type=1400 
audit(1552654669.399:124): apparmor="DENIED" operation="exec" 
profile="/usr/bin/evince//sanitized_helper" 
name="/home/fede/.local/lilypond/usr/bin/guile" pid=3678 
comm="lilypond-invoke" requested_mask="x" denied_mask="x" fsuid=1000 
ouid=1000


Same error as in point 2.
Perhaps there's another way usr/bin/guile should be enabled.
Hopefully Ubuntu or OpenSUSE users (where Apparmor is enabled by 
default) can shed some light on this.


This is my current configuration:

fede@ubuntu-18:~$ which lilypond
/home/fede/.local/bin/lilypond

fede@ubuntu-18:~$ cat /etc/apparmor.d/local/usr.bin.evince
# For Textedit links
/home/fede/.local/bin/lilypond-invoke-editor Cx -> sanitized_helper,
/home/fede/.local/bin/lilypond-wrapper.guile Cx -> sanitized_helper,
/home/fede/.local/lilypond/usr/bin/guile Cx -> sanitized_helper,




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


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-03-15 Thread Andrew Bernard
Hi Federico,

Well, the '#' issue was a simple typo, not a vast conceptual error.

I developed this on my pristine Ubuntu 18.10 and it all works swimmingly.

I am puzzled by your statement about need to be aware of different paths
for apparmor. This is system software and the location does not vary, and
it's not something a user optionally installs. What's going on here?

It's very late here and I will take a look at this more closely tomorrow. I
saw the error about guile but there's a trivial fix for it - sorry, I post
tomorrow when I have a minute. Don't have people searching around for some
complex solution to that.

This screed was intended purely for Ubuntu 18.10, and purely for gvim. I
became discouraged after people wanted it to be for all distros of Linux
and all different editors, a major undertaking. It was never intended to be
that, but more a response to a thread where one user was having difficulty
with this combination, and the Usage manual does fall a little short. But
if people consider it worthwhile I'd be happy to take corrections on board
and polish it.

I think the best spot is on the Scores of Beauty blog.

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


Re: Markup beyond the final barline

2019-03-15 Thread Alexander Kobel

Hi Urs, hi all,

sorry, I accidentally deleted the thread just before some hint came to 
my mind, so this is not a "proper" reply.


\with-dimensions came to my mind as well, but it's not without 
drawbacks. Somewhat more cumbersome to use, but also *somewhat* more 
robust is to use a TextSpanner. (N.B.: for both approaches, apparently 
there's no way to check whether the markup runs beyond the line-length 
or even the page, and force a line break before the note with the markup 
if necessary.) Compare the following approaches:


\version "2.19.82"

{
  c'1-\markup {
\with-dimensions #'(0 . 0) #'(2 . 0)
"This is a long text that widens the score because it can't protrude."
  }
  c,1
}

{
  \once \override TextSpanner.style = #'none
  \once \override TextSpanner.bound-details.left.text
= \markup \upright "This is a long text that widens the score 
because it can't protrude."

  c'1_\startTextSpan
  c,1\stopTextSpan
}


As to why a TextSpanner is dealt with differently, and whether a similar 
handling is possible for TextScripts too, I don't know (and didn't try 
to find out).


\textLengthOff and \override Score.PaperColumn.keep-inside-line = ##f 
don't cut it, as you might already know.
I searched for the keep-inside-line, hoping that it would, and found 
http://lilypond.org/doc/v2.19/Documentation/notation/writing-text, where 
I noticed that the "decresc." in the "Dynamics text spanner prefix" 
selected snippet protrudes over the margin.



HTH,
Alex



smime.p7s
Description: S/MIME Cryptographic Signature
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-03-15 Thread Federico Bruni




Il giorno ven 15 mar 2019 alle 14:31, Andrew Bernard 
 ha scritto:

Hi Federico,

Well, the '#' issue was a simple typo, not a vast conceptual error.

I developed this on my pristine Ubuntu 18.10 and it all works 
swimmingly.


I am puzzled by your statement about need to be aware of different 
paths for apparmor. This is system software and the location does not 
vary, and it's not something a user optionally installs. What's going 
on here?




I was talking about different _paths for lilypond* scripts_ set in 
apparmor conf files.
Usage manual uses /usr/local, but this is not necessarily true for 
everybody; and it's easy to forget what the actual path is in your 
system.


It's very late here and I will take a look at this more closely 
tomorrow. I saw the error about guile but there's a trivial fix for 
it - sorry, I post tomorrow when I have a minute. Don't have people 
searching around for some complex solution to that.




OK, I look forward to it.
Thanks
Federico




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


Re: Order of callback function calls

2019-03-15 Thread Joshua Netterfield


Urs,
First, I’m new to LilyPond internals, so take everything I’m saying here with a 
grain of salt. Please, someone correct me if I say something wrong.
When properties are set to a procedure instead of a value, we call that 
procedure a callback. The callback is called whenever code (often C++) tries to 
get that property. You can make any property a callback.
https://github.com/lilypond/lilypond/blob/master/scm/define-grobs.scm lists 
default properties. That will get you a lot of the way there.
If you want a complete list of all properties, take a look at the interface 
list of each type (again, see define-grobs.scm). Each interface has zero or 
more properties that all grobs with that interface can set. These are 
documented in the internals reference. For example, the properties you can set 
for grobs with accidental-interface are documented at 
http://lilypond.org/doc/v2.19/Documentation/internals/accidental_002dinterface
The order callbacks are called in is complicated. Again, callbacks are called 
when code tries to get the associated property. There are some gymnastics to 
ensure that some callbacks are not called too early or cause cyclical 
dependencies. One notable example is the unpure-pure container: 
http://lilypond.org/doc/v2.19/Documentation/notation/unpure_002dpure-containers
I hope this helps. Good luck!


Best,
Joshua Netterfield

  From: lilypond-user  on 
behalf of Urs Liska 
Sent: Friday, March 15, 2019 05:14
To: lilypond-user
Subject: Order of callback function calls Hi,

I'm thinking about collecting some (and hopefully a growing corpus) of 
the functions that help dealing with grobs in callback functions and 
make them accessible in an openLilyLib package. For example for so many 
applications it is necessary to find a grob's system, then get all 
objects within that and find specific ones within that list. Or find the 
NoteColumn's at the two ends of a spanner, etc. I think making such 
patterns more accessible with functions is a way for me to become more 
comfortable with this type of grob manipulation, and maybe it will be 
useful to make this area somewhat more accessible for an (even if only 
slightly) wider audience.

I know that some functions can only be called before or after certain 
points in the engraving process. For example all information about the 
absolute positioning of grobs is only available after-line-breaking, 
while some actions (e.g. setting properties like 'X-offset) will only 
have an effect before-line-breaking (whereas one can set the 'color 
property at any time).

I have two questions about this for now:

1. Is there a list somewhere detailing *all* available callbacks?

2. Is there anything general to say about when callbacks for regular 
properties like e.g. 'direction  or 'X-offset. I mean, if I say 
\override DynamicText.X-offset = #my-custom-callback, when will that be 
called?

Best
Urs


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


Re: Order of callback function calls

2019-03-15 Thread David Nalesnik
On Fri, Mar 15, 2019 at 4:13 AM Urs Liska  wrote:
>
> Hi,
>
> I'm thinking about collecting some (and hopefully a growing corpus) of
> the functions that help dealing with grobs in callback functions and
> make them accessible in an openLilyLib package. For example for so many
> applications it is necessary to find a grob's system, then get all
> objects within that and find specific ones within that list. Or find the
> NoteColumn's at the two ends of a spanner, etc. I think making such
> patterns more accessible with functions is a way for me to become more
> comfortable with this type of grob manipulation, and maybe it will be
> useful to make this area somewhat more accessible for an (even if only
> slightly) wider audience.
>
> I know that some functions can only be called before or after certain
> points in the engraving process. For example all information about the
> absolute positioning of grobs is only available after-line-breaking,
> while some actions (e.g. setting properties like 'X-offset) will only
> have an effect before-line-breaking (whereas one can set the 'color
> property at any time).
>
> I have two questions about this for now:
>
> 1. Is there a list somewhere detailing *all* available callbacks?

You might find the following useful:

https://www.mail-archive.com/lilypond-user@gnu.org/msg100335.html

(One thing you will notice is the lack of documentation strings in
many public functions.)

HTH,
David

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


Re: The Guide to getting Point and Click going with Gvim under Ubuntu 18

2019-03-15 Thread David Wright
On Sat 16 Mar 2019 at 00:31:16 (+1100), Andrew Bernard wrote:
> Hi Federico,
> 
> Well, the '#' issue was a simple typo, not a vast conceptual error.
> 
> I developed this on my pristine Ubuntu 18.10 and it all works swimmingly.

Then I don't understand why you were altering the line at all.
AFAICT both Ubuntu's and Debian's /etc/apparmor.d/usr.bin.evince
files will include the local/usr.bin.evince file automatically.
Editing /etc/apparmor.d/usr.bin.evince is only needed for making
major changes to the configuration.

Cheers,
David.

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