Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-10 Thread Richard Shann
On Mon, 2017-07-10 at 08:44 +0200, Urs Liska wrote:
> 
> Am 08.07.2017 um 16:58 schrieb Simon Albrecht:
> > On 08.07.2017 15:49, Richard Shann wrote:
> >> I was intrigued by this, as I have a patch to the figured bass formatter
> >> that has been hanging around because the route to making contributions
> >> that I knew about involved a virtual machine which I can't get working
> >> on my current system.
> >
> > The method Urs named is possible with openLilyLib, but not with the
> > LilyPond source.  That
> > means you would have to get a VM to work, or install a Unix system in
> > parallel – both a lot of
> > effort for one small patch obviously.  Or you just e-mail your patch
> > to the devel list and ask for
> > someone to shepherd it through the review process and into the code
> > base for you, which is done
> > from time to time.
> >
> > Best, Simon
> 
> I have to add something here.
> 
> Simon is correct that I described a method for openLilyLib, not
> LilyPond. The Github copy of the LilyPond code is not up-to-date and is
> basically a mirror that *can* at any time made ready for people to
> contribute with a lower entry barrier than setting up a developer
> account on LilyPond's proper repository.
> However, this would still require a developer *with* such an account to
> process a patch, i.e. pull it to his local machine and upload it to
> LilyPond as a patch for review. So nothing would be won with that for
> your use-case, Richard.
> 
> HOWEVER:
> Linux (i.e. for you, a virtual machine) is required for BUILDING
> LilyPond, not actually for contributing. If you don't have that you by
> definition can't do any modifications that require building LilyPond but
> you can only work on the LilyPond and Scheme files.
> 
> What you need for contributing, i.e. sending patches into the review
> line and eventually the code base is:
> 
> * Git
> * git-cl
> (http://lilypond.org/doc/v2.19/Documentation/contributor/git_002dcl)
> * Accounts on the sourceforge tracker and the savannah git repository
> 
> git-cl is a Python script, so that should be possible to install on any
> computer.
> So essentially, if you are planning to contribute .scm or .ly files only
> (and as you don't have a build system I assume this is the case) I'm
> sure you can set up a proper contribution toolchain on your OS of choice.
> 
> Urs

Thanks for this - very clear.

Richard




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


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-10 Thread Richard Shann
On Mon, 2017-07-10 at 09:06 +0200, Jacques Menu Muzhic wrote:
> Hello Richard,
> 
> Just for the record: I’m using LilyDev 4, in which LilyPond builds
> seamlessly. The work to have it running in your virtual machines
> environment
Unfortunately my Debian Stable installation won't install the virtual
machine software any more, the package manager failed to find files it
needed on the Debian servers.

Richard



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


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-10 Thread Jacques Menu Muzhic
Hello Richard,

Just for the record: I’m using LilyDev 4, in which LilyPond builds seamlessly. 
The work to have it running in your virtual machines environment is not that 
great.

JM

> Le 10 juil. 2017 à 08:44, Urs Liska  a écrit :
> 
> 
> 
> Am 08.07.2017 um 16:58 schrieb Simon Albrecht:
>> On 08.07.2017 15:49, Richard Shann wrote:
>>> I was intrigued by this, as I have a patch to the figured bass formatter
>>> that has been hanging around because the route to making contributions
>>> that I knew about involved a virtual machine which I can't get working
>>> on my current system.
>> 
>> The method Urs named is possible with openLilyLib, but not with the
>> LilyPond source.  That
>> means you would have to get a VM to work, or install a Unix system in
>> parallel – both a lot of
>> effort for one small patch obviously.  Or you just e-mail your patch
>> to the devel list and ask for
>> someone to shepherd it through the review process and into the code
>> base for you, which is done
>> from time to time.
>> 
>> Best, Simon
> 
> I have to add something here.
> 
> Simon is correct that I described a method for openLilyLib, not
> LilyPond. The Github copy of the LilyPond code is not up-to-date and is
> basically a mirror that *can* at any time made ready for people to
> contribute with a lower entry barrier than setting up a developer
> account on LilyPond's proper repository.
> However, this would still require a developer *with* such an account to
> process a patch, i.e. pull it to his local machine and upload it to
> LilyPond as a patch for review. So nothing would be won with that for
> your use-case, Richard.
> 
> HOWEVER:
> Linux (i.e. for you, a virtual machine) is required for BUILDING
> LilyPond, not actually for contributing. If you don't have that you by
> definition can't do any modifications that require building LilyPond but
> you can only work on the LilyPond and Scheme files.
> 
> What you need for contributing, i.e. sending patches into the review
> line and eventually the code base is:
> 
> * Git
> * git-cl
> (http://lilypond.org/doc/v2.19/Documentation/contributor/git_002dcl)
> * Accounts on the sourceforge tracker and the savannah git repository
> 
> git-cl is a Python script, so that should be possible to install on any
> computer.
> So essentially, if you are planning to contribute .scm or .ly files only
> (and as you don't have a build system I assume this is the case) I'm
> sure you can set up a proper contribution toolchain on your OS of choice.
> 
> Urs
> 
> 
> -- 
> u...@openlilylib.org
> https://openlilylib.org
> http://lilypondblog.org
> 
> 
> ___
> 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: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-10 Thread Urs Liska


Am 08.07.2017 um 16:58 schrieb Simon Albrecht:
> On 08.07.2017 15:49, Richard Shann wrote:
>> I was intrigued by this, as I have a patch to the figured bass formatter
>> that has been hanging around because the route to making contributions
>> that I knew about involved a virtual machine which I can't get working
>> on my current system.
>
> The method Urs named is possible with openLilyLib, but not with the
> LilyPond source.  That
> means you would have to get a VM to work, or install a Unix system in
> parallel – both a lot of
> effort for one small patch obviously.  Or you just e-mail your patch
> to the devel list and ask for
> someone to shepherd it through the review process and into the code
> base for you, which is done
> from time to time.
>
> Best, Simon

I have to add something here.

Simon is correct that I described a method for openLilyLib, not
LilyPond. The Github copy of the LilyPond code is not up-to-date and is
basically a mirror that *can* at any time made ready for people to
contribute with a lower entry barrier than setting up a developer
account on LilyPond's proper repository.
However, this would still require a developer *with* such an account to
process a patch, i.e. pull it to his local machine and upload it to
LilyPond as a patch for review. So nothing would be won with that for
your use-case, Richard.

HOWEVER:
Linux (i.e. for you, a virtual machine) is required for BUILDING
LilyPond, not actually for contributing. If you don't have that you by
definition can't do any modifications that require building LilyPond but
you can only work on the LilyPond and Scheme files.

What you need for contributing, i.e. sending patches into the review
line and eventually the code base is:

* Git
* git-cl
(http://lilypond.org/doc/v2.19/Documentation/contributor/git_002dcl)
* Accounts on the sourceforge tracker and the savannah git repository

git-cl is a Python script, so that should be possible to install on any
computer.
So essentially, if you are planning to contribute .scm or .ly files only
(and as you don't have a build system I assume this is the case) I'm
sure you can set up a proper contribution toolchain on your OS of choice.

Urs


-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org


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


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Richard Shann
On Sun, 2017-07-09 at 13:15 +0200, Malte Meyn wrote:
> 
> Am 09.07.2017 um 12:50 schrieb Richard Shann:
> > Thanks - here is such a small patch then. It fixes the centering of
> > isolated accidentals and digits on whole notes which is currently too
> > far to the left.
> 
>  From your patch:
> 
> +(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 
> 'duration))) (markup? fig-markup))
> 
> Shouldn’t you consider negative duration logs (\breve and longer notes) 
> too, i. e. “>=” instead of “eqv?”?
> 
> (if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) 
> (markup? fig-markup))

it seems so, I was unsure what values duration log could take, perhaps
being set sometimes to #f so I used eqv? to be safe.
Attached is the revised patch which works on this:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
<<

{

\time 4/2 c''\breve c'' c''1 c''

c''4 c'' c'' c''


}

\new FiguredBass {

\figuremode {

<_+>\breve <_-> <3>1 <3+>

<_+>4 <_-> <3> <3+>

}

}

>>
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

Richard


--- ORIG_translation-functions.scm	2017-07-08 12:36:17.716097042 +0100
+++ translation-functions.scm	2017-07-09 14:05:34.084003967 +0100
@@ -184,13 +184,10 @@ way the transposition number is displaye
   (set! alt-markup #f)))
 
 
-;; hmm, how to get figures centered between note, and
-;; lone accidentals too?
-
-;;(if (markup? fig-markup)
-;;  (set!
-;;   fig-markup (markup #:translate (cons 1.0 0)
-;;  #:center-align fig-markup)))
+(if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) (markup? fig-markup))
+(set!
+fig-markup (markup #:translate (cons 1.0 0)
+#:center-align fig-markup)))
 
 (if alt-markup
 (set! fig-markup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Malte Meyn



Am 09.07.2017 um 12:50 schrieb Richard Shann:

Thanks - here is such a small patch then. It fixes the centering of
isolated accidentals and digits on whole notes which is currently too
far to the left.


From your patch:

+(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 
'duration))) (markup? fig-markup))


Shouldn’t you consider negative duration logs (\breve and longer notes) 
too, i. e. “>=” instead of “eqv?”?


(if (and (>= 0 (ly:duration-log  (ly:event-property event 'duration))) 
(markup? fig-markup))


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


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-09 Thread Richard Shann
On Sat, 2017-07-08 at 16:58 +0200, Simon Albrecht wrote:
> On 08.07.2017 15:49, Richard Shann wrote:
> > I was intrigued by this, as I have a patch to the figured bass formatter
> > that has been hanging around because the route to making contributions
> > that I knew about involved a virtual machine which I can't get working
> > on my current system.
> 
> The method Urs named is possible with openLilyLib, but not with the 
> LilyPond source.  That
> means you would have to get a VM to work, or install a Unix system in 
> parallel – both a lot of
> effort for one small patch obviously.  Or you just e-mail your patch to 
> the devel list and ask for
> someone to shepherd it through the review process and into the code base 
> for you, which is done
> from time to time.
Thanks - here is such a small patch then. It fixes the centering of
isolated accidentals and digits on whole notes which is currently too
far to the left.
Here is a snippet that illustrates the problem.
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
<<
   {
c''1 c'' c'' c''
c''4 c'' c'' c''

  }
  \new FiguredBass {
\figuremode {
  <_+>1 <_-> <3> <3+>
  <_+>4 <_-> <3> <3+>
}
  }
>>
8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><

Richard

--- ORIG_translation-functions.scm	2017-07-08 12:36:17.716097042 +0100
+++ translation-functions.scm	2017-07-09 11:34:13.248080809 +0100
@@ -184,13 +184,10 @@ way the transposition number is displaye
   (set! alt-markup #f)))
 
 
-;; hmm, how to get figures centered between note, and
-;; lone accidentals too?
-
-;;(if (markup? fig-markup)
-;;  (set!
-;;   fig-markup (markup #:translate (cons 1.0 0)
-;;  #:center-align fig-markup)))
+(if (and (eqv? 0 (ly:duration-log  (ly:event-property event 'duration))) (markup? fig-markup))
+(set!
+fig-markup (markup #:translate (cons 1.0 0)
+#:center-align fig-markup)))
 
 (if alt-markup
 (set! fig-markup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-08 Thread Simon Albrecht

On 08.07.2017 15:49, Richard Shann wrote:

I was intrigued by this, as I have a patch to the figured bass formatter
that has been hanging around because the route to making contributions
that I knew about involved a virtual machine which I can't get working
on my current system.


The method Urs named is possible with openLilyLib, but not with the 
LilyPond source.  That
means you would have to get a VM to work, or install a Unix system in 
parallel – both a lot of
effort for one small patch obviously.  Or you just e-mail your patch to 
the devel list and ask for
someone to shepherd it through the review process and into the code base 
for you, which is done

from time to time.

Best, Simon

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


A contribution (was Re: snippet to properly align dynamics with expressive text)

2017-07-08 Thread Richard Shann
On Sat, 2017-07-08 at 08:42 +0200, Urs Liska wrote:
> 
[...]
> > I would be pleased to contribute this to openlilylib, but I have no idea
> > how! I've never contributed to a collaborative project like that before. How
> > would I go about this?
> [...] you can also take the file from
> Github (the files in this repository are mostly self-contained) and make
> updates to it locally.
> Then you can go to Github to "edit" the file, which you can do by simply
> overwriting the online version with your local one. Github will then
> automatically create a fork for you and open a pull request.

I was intrigued by this, as I have a patch to the figured bass formatter
that has been hanging around because the route to making contributions
that I knew about involved a virtual machine which I can't get working
on my current system. I discovered I had an account on GitHub so I
followed your instructions to create a new version of
scm/translation-functions.scm
which is here:

https://github.com/vec-perm/lilypond/blob/3fd3d89b9db0dbf4e99bdfbaca49634df7a167df/scm/translation-functions.scm


but it's not clear to me what if anything I have to do next...

Richard




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


Re: snippet to properly align dynamics with expressive text

2017-07-08 Thread Urs Liska


Am 08.07.2017 um 00:21 schrieb Shevek:
> Agreed about the optical spacing. My goal was to get the alignment to be
> identical between the bare dynamics and the dynamics + text. To my eye, the
> fff and fff espressivo are aligned the same, so it seems more like something
> that could be improved in Lilypond's dynamic alignment in general.
>
> I would be pleased to contribute this to openlilylib, but I have no idea
> how! I've never contributed to a collaborative project like that before. How
> would I go about this?

The "proper" way would be to have Git installed, fork the repository on
Github, clone the repository, make updates, push them to your fork and
then open a Pull Request on Github.

But if you don't want to go that way you can also take the file from
Github (the files in this repository are mostly self-contained) and make
updates to it locally.
Then you can go to Github to "edit" the file, which you can do by simply
overwriting the online version with your local one. Github will then
automatically create a fork for you and open a pull request.

Please supply a meaningful commit description (a short one-line
"heading" and a meaningful longer description of what you did.

Best
Urs

>
> Thanks,
>
> Saul
>
>
>
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/snippet-to-properly-align-dynamics-with-expressive-text-tp204305p204307.html
> Sent from the User mailing list archive at Nabble.com.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

-- 
u...@openlilylib.org
https://openlilylib.org
http://lilypondblog.org


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


Re: snippet to properly align dynamics with expressive text

2017-07-07 Thread Shevek
Agreed about the optical spacing. My goal was to get the alignment to be
identical between the bare dynamics and the dynamics + text. To my eye, the
fff and fff espressivo are aligned the same, so it seems more like something
that could be improved in Lilypond's dynamic alignment in general.

I would be pleased to contribute this to openlilylib, but I have no idea
how! I've never contributed to a collaborative project like that before. How
would I go about this?

Thanks,

Saul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/snippet-to-properly-align-dynamics-with-expressive-text-tp204305p204307.html
Sent from the User mailing list archive at Nabble.com.

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


Re: snippet to properly align dynamics with expressive text

2017-07-07 Thread Kieren MacMillan
Hi Shevek,

> Here is a snippet I've written to align custom dynamics correctly.

This is a nice start — thanks!

Two thoughts:

1. To my eye, the f's don't seem centred (the fff shows the "error" more 
prominently than the f". I realise this is an optical illusion based on the 
actual X-extent… but like optical spacing (see 
),
 it would be nice if the function adjusted accordingly (or at least the user 
had the ability to set an adjustment by dynamic).

2. Regardless, you should consider merging it with the analogous function in 
openlilylib (see 
).

Thanks and all the best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


snippet to properly align dynamics with expressive text

2017-07-07 Thread Shevek
Dynamics with expressive text, like "p espressivo" are meant to have the
dynamic aligned on the notehead the same as ordinary dynamics, with the
expressive text following. Here is a snippet I've written to align custom
dynamics correctly.

\version "2.18.2"

\paper {
  ragged-right = ##f
  indent = 0\cm
}

dynText = #(define-event-function (parser location dyn expr) (markup?
markup?)
 (let* (
 (mark #{ \markup { \dynamic $dyn \normal-text\italic
$expr } #})
 (offset (lambda (grob)
   (let* (
   (layout (ly:grob-layout grob))
   (props (ly:grob-alist-chain grob
(ly:output-def-lookup layout
'text-font-defaults)))
   (target-X-extent
(ly:stencil-extent

(ly:text-interface::interpret-markup layout props dyn)
 X))
   (width (abs
   (- (cdr target-X-extent) (car
target-X-extent
   )
 (display target-X-extent)
 (- 1 (/ width 2))
 )
   )
   )
 )
   #{
 \tweak DynamicText.X-offset #offset
 #(make-dynamic-script mark) 
   #}
   )
 )

%% Example

\new Staff \with {
  \omit TimeSignature
} \relative c' {
  c1\dynText "p" "sub."
  c1\dynText "fff" "espressivo"
  c1\dynText "p" "espressivo"
  c1\dynText "f" "sub."
  \break
  c1\p
  c1\fff
  c1\p
  c1\fffff
}



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/snippet-to-properly-align-dynamics-with-expressive-text-tp204305.html
Sent from the User mailing list archive at Nabble.com.

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