Re: Text centralized above a TextSpan

2015-09-14 Thread David Nalesnik
On Sun, Sep 6, 2015 at 12:17 PM, David Nalesnik 
wrote:

>
>
> Hopefully another step forward!
>
>
Attached is an improvement.

2.19.27 has been released, and you need this version to get the full
functionality here.  (There is provision for earlier versions--see note far
down in the first function--but you'll only get solid lines, unless you're
up for some heavy enhancement.)

The alignment of texts at the beginning and end is fixed, so you can
left-align, right-align, translate, whatever, with predictable results.

You can spread texts over more than two lines.  Here, the algorithm is
pretty simple, and is more of a placeholder.  Unfortunately, text can clump
when a spanner starts close to the line end or ends close to the start.
You can tweak the line distribution by adding spacers (""), as explained in
one of the examples.  What's needed is an algorithm that looks for overlaps
and shifts texts from first line forward, last line back as needed.  I've
been pondering this.  Probably it will require creating a new property
which specifies text count per line, so there isn't massive redundant
calculation. On the TODO list.  At the moment, if I have to write another
loop, I will scream :)

Anyway, enjoy!

David
\version "2.19.27"

%% Adapted from 'justify-line-helper' in scm/define-markup-commands.scm.
#(define (distribute-text-spanner-stencils grob args extent padding)
   "Return a stencil which spreads @var{args} along an extent
@var{extent}, with spaces filled by a line."
   (let* ((orig-stencils
   (map (lambda (a) (grob-interpret-markup grob a)) args))
  (stencils
   (map (lambda (stc)
  (if (ly:stencil-empty? stc X)
  (ly:make-stencil (ly:stencil-expr stc)
'(0 . 0) (ly:stencil-extent stc Y))
  stc))
 orig-stencils))
  (line-contents
   (if (= (length stencils) 1)
   (list point-stencil (car stencils) point-stencil)
   stencils))
  (text-extents
   (map (lambda (stc) (ly:stencil-extent stc X))
 line-contents))
  (te1 text-extents)
  ;; How much shift is necessary to align left edge of first
  ;; stencil with extent?  Apply this shift to all stencils.
  (text-extents
   (map (lambda (stc)
  (coord-translate
   stc
   (- (car extent) (caar text-extents
 text-extents))
  ;; how much does the last stencil need to be translated for
  ;; its right edge to touch the end of the spanner?
  (last-shift (- (cdr extent) (cdr (last text-extents
  (word-count (length line-contents))
  ;; Make a list of stencils and their extents, scaling the
  ;; extents across extent. The right edge of the last stencil
  ;; is now aligned with the right edge of the spanner.  The
  ;; first stencil will be moved 0.0, the last stencil the
  ;; amount given by last-shift.
  (stencils-shifted-extents-list
   (let loop ((contents line-contents) (exts text-extents)
   (idx 0) (result '()))
 (if (null? contents)
 result
 (loop
  (cdr contents) (cdr exts) (1+ idx)
  (append result
(list
 (cons (car contents)
   (coord-translate
(car exts)
(* idx
  (/ last-shift (1- word-count)))
  ; Remove non-marker spacers from list of extents.  This is done
  ; so that a single line is drawn to cover the total gap rather
  ; than several. (A single line is needed since successive dashed
  ; lines will not connect properly.) TODO: seems broken!
  (stencils-extents-list-no-spacers
   (let loop ((orig stencils-shifted-extents-list) (idx 0) (result '()))
 (cond
  ((= idx (length stencils-shifted-extents-list)) result)
  ; Ignore first and last stencils, which--if point stencil--
  ; will be markers.
  ((or (= idx 0)
   (= idx (1- (length stencils-shifted-extents-list
   (loop (cdr orig) (1+ idx)
 (append result (list (car orig)
  ; Remove spacers.  Better way to identify them than comparing
  ; left and right extents?
  ((= (cadar orig) (cddar orig))
   (loop (cdr orig) (1+ idx) result))
  ; Keep any visible stencil.
  (else (loop (cdr orig) (1+ idx)
  (append result (list (car orig
  
  (padding (ly:grob-property grob 'padding 0.0))
  (padded-stencils-extents-list
   (let loop ((orig stencils-extents-list-no-spacers) (idx 0) (result '()))
  

Re: Text centralized above a TextSpan

2015-09-14 Thread BB

Tried to compile with version 2.19.25

.../tmp/frescobaldi-6V3LoT/tmpI8U_qS/text-spanner-centered-text.ly:152:20 <0>: 
In expression (ly:line-interface::line grob (caar exts) ...):


/tmp/frescobaldi-6V3LoT/tmpI8U_qS/text-spanner-centered-text.ly:152:20 
<1>: Unbound variable: ly:line-interface::line




On 14.09.2015 14:22, David Nalesnik wrote:

\version "2.19.27"

%% Adapted from 'justify-line-helper' in scm/define-markup-commands.scm.
#(define (distribute-text-spanner-stencils grob args extent padding)
"Return a stencil which spreads @var{args} along an extent
@var{extent}, with spaces filled by a line."
(let* ((orig-stencils
(map (lambda (a) (grob-interpret-markup grob a)) args))
   (stencils
(map (lambda (stc)
   (if (ly:stencil-empty? stc X)
   (ly:make-stencil (ly:stencil-expr stc)
 '(0 . 0) (ly:stencil-extent stc Y))
   stc))
  orig-stencils))
   (line-contents
(if (= (length stencils) 1)
(list point-stencil (car stencils) point-stencil)
stencils))
   (text-extents
(map (lambda (stc) (ly:stencil-extent stc X))
  line-contents))
   (te1 text-extents)
   ;; How much shift is necessary to align left edge of first
   ;; stencil with extent?  Apply this shift to all stencils.
   (text-extents
(map (lambda (stc)
   (coord-translate
stc
(- (car extent) (caar text-extents
  text-extents))
   ;; how much does the last stencil need to be translated for
   ;; its right edge to touch the end of the spanner?
   (last-shift (- (cdr extent) (cdr (last text-extents
   (word-count (length line-contents))
   ;; Make a list of stencils and their extents, scaling the
   ;; extents across extent. The right edge of the last stencil
   ;; is now aligned with the right edge of the spanner.  The
   ;; first stencil will be moved 0.0, the last stencil the
   ;; amount given by last-shift.
   (stencils-shifted-extents-list
(let loop ((contents line-contents) (exts text-extents)
(idx 0) (result '()))
  (if (null? contents)
  result
  (loop
   (cdr contents) (cdr exts) (1+ idx)
   (append result
 (list
  (cons (car contents)
(coord-translate
 (car exts)
 (* idx
   (/ last-shift (1- word-count)))
   ; Remove non-marker spacers from list of extents.  This is done
   ; so that a single line is drawn to cover the total gap rather
   ; than several. (A single line is needed since successive dashed
   ; lines will not connect properly.) TODO: seems broken!
   (stencils-extents-list-no-spacers
(let loop ((orig stencils-shifted-extents-list) (idx 0) (result 
'()))
  (cond
   ((= idx (length stencils-shifted-extents-list)) result)
   ; Ignore first and last stencils, which--if point stencil--
   ; will be markers.
   ((or (= idx 0)
(= idx (1- (length stencils-shifted-extents-list
(loop (cdr orig) (1+ idx)
  (append result (list (car orig)
   ; Remove spacers.  Better way to identify them than comparing
   ; left and right extents?
   ((= (cadar orig) (cddar orig))
(loop (cdr orig) (1+ idx) result))
   ; Keep any visible stencil.
   (else (loop (cdr orig) (1+ idx)
   (append result (list (car orig
   
   (padding (ly:grob-property grob 'padding 0.0))

   (padded-stencils-extents-list
(let loop ((orig stencils-extents-list-no-spacers) (idx 0) (result 
'()))
  (cond
   ((= idx (length stencils-extents-list-no-spacers)) result)
   ;; don't widen line markers
   ((= (cadar orig) (cddar orig))
(loop (cdr orig) (1+ idx)
  (append result (list (car orig)
   ;; right padding only if object starts line
   ((= idx 0)
(loop (cdr orig) (1+ idx)
  (append
   result
   (list (cons (caar orig)
   (coord-translate (cdar orig) (cons 0 padding)))
   ;; left padding only if object ends a line
   ((= idx (1- (length stencils-extents-list-no-spacers)))
(loop (cdr orig) (1+ idx)
  (append
   result
   (list 

Re: Text centralized above a TextSpan

2015-09-14 Thread Simon Albrecht

David,

This is tremendous! Thank you very much. This should definitely make 
it’s way into the official installation once it’s reasonably finished.


Yours, Simon

Am 14.09.2015 um 14:22 schrieb David Nalesnik:



On Sun, Sep 6, 2015 at 12:17 PM, David Nalesnik 
> wrote:




Hopefully another step forward!


Attached is an improvement.

2.19.27 has been released, and you need this version to get the full 
functionality here.  (There is provision for earlier versions--see 
note far down in the first function--but you'll only get solid lines, 
unless you're up for some heavy enhancement.)


The alignment of texts at the beginning and end is fixed, so you can 
left-align, right-align, translate, whatever, with predictable results.


You can spread texts over more than two lines.  Here, the algorithm is 
pretty simple, and is more of a placeholder.  Unfortunately, text can 
clump when a spanner starts close to the line end or ends close to the 
start. You can tweak the line distribution by adding spacers (""), as 
explained in one of the examples.  What's needed is an algorithm that 
looks for overlaps and shifts texts from first line forward, last line 
back as needed.  I've been pondering this.  Probably it will require 
creating a new property which specifies text count per line, so there 
isn't massive redundant calculation. On the TODO list.  At the moment, 
if I have to write another loop, I will scream :)


Anyway, enjoy!

David



___
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


Slightly OT: git hook environment assistance needed

2015-09-14 Thread Urs Liska
Hi list,

I've struggled with that too long so I have to ask for help. And I think
some personal assistance would be much more helpful than trying to
formulate a question for stackoverflow or the like ...

I'm trying to get the Git hook to run on my Debian server that produces
http://book.openlilylib.org upon pushing. The git hook calls Gitbook, a
node.js application (basically a static site generator), which in turn
calls a custom python script for LilyPond syntax highlighting.

Everything works locally and when run through the SSH login but not when
triggered from the Git hook.
So it's clear that this is due to the non-login environment the git hook
is running in. Which is where I seem to be totally lost ...

If anybody has experience with this kind of things (mainly the
environment thing, node.js is probably less important, and gitbook
doesn't play a major role, I think) I'd be happy if you could get in
touch with me, presumably in private.

Thanks
Urs


-- 
Urs Liska
www.openlilylib.org

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


Re: Text centralized above a TextSpan

2015-09-14 Thread Simon Albrecht

Am 14.09.2015 um 14:34 schrieb BB:


Tried to compile with version 2.19.25

.../tmp/frescobaldi-6V3LoT/tmpI8U_qS/text-spanner-centered-text.ly:152:20 
<0>: In expression (ly:line-interface::line grob (caar exts) ...):


/tmp/frescobaldi-6V3LoT/tmpI8U_qS/text-spanner-centered-text.ly:152:20 
<1>: Unbound variable: ly:line-interface::line




Please reread David’s post: that’s functionality available only in 
v2.19.27, but there is a workaround. Though: why not get Lily 2.19.27?


Yours, Simon




On 14.09.2015 14:22, David Nalesnik wrote:

\version "2.19.27"

%% Adapted from 'justify-line-helper' in scm/define-markup-commands.scm.
#(define (distribute-text-spanner-stencils grob args extent padding)
"Return a stencil which spreads @var{args} along an extent
@var{extent}, with spaces filled by a line."
(let* ((orig-stencils
(map (lambda (a) (grob-interpret-markup grob a)) args))
   (stencils
(map (lambda (stc)
   (if (ly:stencil-empty? stc X)
   (ly:make-stencil (ly:stencil-expr stc)
 '(0 . 0) (ly:stencil-extent stc Y))
   stc))
  orig-stencils))
   (line-contents
(if (= (length stencils) 1)
(list point-stencil (car stencils) point-stencil)
stencils))
   (text-extents
(map (lambda (stc) (ly:stencil-extent stc X))
  line-contents))
   (te1 text-extents)
   ;; How much shift is necessary to align left edge of first
   ;; stencil with extent?  Apply this shift to all stencils.
   (text-extents
(map (lambda (stc)
   (coord-translate
stc
(- (car extent) (caar text-extents
  text-extents))
   ;; how much does the last stencil need to be translated for
   ;; its right edge to touch the end of the spanner?
   (last-shift (- (cdr extent) (cdr (last text-extents
   (word-count (length line-contents))
   ;; Make a list of stencils and their extents, scaling the
   ;; extents across extent. The right edge of the last stencil
   ;; is now aligned with the right edge of the spanner.  The
   ;; first stencil will be moved 0.0, the last stencil the
   ;; amount given by last-shift.
   (stencils-shifted-extents-list
(let loop ((contents line-contents) (exts text-extents)
(idx 0) (result '()))
  (if (null? contents)
  result
  (loop
   (cdr contents) (cdr exts) (1+ idx)
   (append result
 (list
  (cons (car contents)
(coord-translate
 (car exts)
 (* idx
   (/ last-shift (1- word-count)))
   ; Remove non-marker spacers from list of extents.  This is done
   ; so that a single line is drawn to cover the total gap rather
   ; than several. (A single line is needed since successive dashed
   ; lines will not connect properly.) TODO: seems broken!
   (stencils-extents-list-no-spacers
(let loop ((orig stencils-shifted-extents-list) (idx 0) (result 
'()))
  (cond
   ((= idx (length stencils-shifted-extents-list)) result)
   ; Ignore first and last stencils, which--if point stencil--
   ; will be markers.
   ((or (= idx 0)
(= idx (1- (length stencils-shifted-extents-list
(loop (cdr orig) (1+ idx)
  (append result (list (car orig)
   ; Remove spacers.  Better way to identify them than comparing
   ; left and right extents?
   ((= (cadar orig) (cddar orig))
(loop (cdr orig) (1+ idx) result))
   ; Keep any visible stencil.
   (else (loop (cdr orig) (1+ idx)
   (append result (list (car orig
   
   (padding (ly:grob-property grob 'padding 0.0))

   (padded-stencils-extents-list
(let loop ((orig stencils-extents-list-no-spacers) (idx 0) (result 
'()))
  (cond
   ((= idx (length stencils-extents-list-no-spacers)) result)
   ;; don't widen line markers
   ((= (cadar orig) (cddar orig))
(loop (cdr orig) (1+ idx)
  (append result (list (car orig)
   ;; right padding only if object starts line
   ((= idx 0)
(loop (cdr orig) (1+ idx)
  (append
   result
   (list (cons (caar orig)
   (coord-translate (cdar orig) (cons 0 padding)))
   ;; left padding only if object ends a 

Rendering cropped SVG

2015-09-14 Thread potoroo
Hello,

I'd like to render my scores (only short exercises that don't fill a page) as 
.svg so I can include them on a website. For this, the images would have to be 
cropped without any white margins. I've searched the web for hours without 
finding a solution.

I tried lilypond -dbackend=svg test.ly, but this only renders the first system. 
I also tried to include this:

\paper {
  indent = 0\mm
  line-width = 120\mm
  oddHeaderMarkup = ""
  evenHeaderMarkup = ""
  oddFooterMarkup = ""
  evenFooterMarkup = ""
}

But that didn't help at all. I have found a solution for png:

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png test.ly 


However, the flag --svg doesn't seem to exist, and an additional -dbackend=svg 
in place of --png doesn't work either.

Can anybody help me out here?___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OT: Beauty of programming languages

2015-09-14 Thread Paul Morris
I’m in my early 40s, and started using LilyPond in early 2011.  I love 
LilyPond’s flexibility and extensibility which lets me create sheet music in 
alternative notation systems that have a “chromatic staff” – especially 
“Clairnote”[1].  LilyPond is in a league of its own for this kind of extension 
and customization, and she handles it like a champ.

By working on extending LilyPond I’ve learned a lot of Scheme.  Before I had 
basically only used javascript.  (I’m not a professional programmer.)  I try to 
contribute back where and when I can.  

I play guitar, trumpet, a little piano, and I sing.  I have mostly used 
LilyPond for arranging fiddle tunes and similar pieces for string bands / dance 
bands that I’ve played in.  

Thanks to everyone for their contributions to LilyPond!

-Paul

[1] Clairnote: http://clairnote.org  
See also the Music Notation Project: http://musicnotation.org
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OT: Beauty of programming languages

2015-09-14 Thread Tim Reeves
Well, as a hornist, I reckon my instrument of choice is a lot closer to a 
"vague pointing instrument" than to a keyboard instrument! Sometimes when 
I point it this way it goes the other way. In reality, it depends more on 
my lips etc. than on my fingers, of which I use four when playing 
normally. I am not average, I confess.
:)


Tim Reeves


David Kastrup  wrote on 09/14/2015 02:23:15 AM:

> From: David Kastrup 
> To: Alexander Kobel 
> Cc: Tim Reeves , lilypond-user@gnu.org
> Date: 09/14/2015 02:26 AM
> Subject: Re: OT: Beauty of programming languages
> 
> Alexander Kobel  writes:
> 
> > On 2015-09-12 02:17, Tim Reeves wrote:
> >>  > Am 11.09.2015 um 20:17 schrieb David Bellows:
> >>  > > Urs, I'd still like to see a poll or at least all the answers
> >>  > > collected and analyzed etc.
> >>  >
> >>  > I didn't intend to drop that poll idea.
> >>  > But I find this thread very interesting and also touching, andit 
should
> >>  > not be just buried in the mailing list archive. We should let it 
fade
> >>  > out and then see if we can give it a decent place somewhere.
> >>  >
> >>  > Urs
> >>
> >>
> >> So far, in the small, non-random sample we have, it looks like the
> >> average user's age is somewhere around 60. I guess you can teach old
> >> dogs new tricks! ;)
> >
> > Well, another interpretation is that to be able to spend the amount of
> > time required for using LilyPond, you need to be either retired or (by
> > profession) really desperately in need for its specific feature set...
> 
> Actually, it's more like if you're trying to teach old tricks, you
> better look for old dogs.
> 
> Text-based entry is an old trick in computing terms.  It appeals to
> people considering a keyboard as the principal means of input and who
> think of a mouse primarily as the main enemy of punch cards.
> 
> Now I'd like to think that this should generally make sense to the
> average musician, given that a lot more people play pianos, organs,
> flutes and other instruments with digital 10-finger input than, say
> theremins or other vague pointing instruments.
> 
> But I have to admit that bowed strings have quite a bit of analog input,
> and a trumpet does not sport more buttons than the average mouse these
> days.
> 
> -- 
> David Kastrup
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OT: Beauty of programming languages

2015-09-14 Thread Wols Lists
On 14/09/15 21:42, Tim Reeves wrote:
> Well, as a hornist, I reckon my instrument of choice is a lot closer to
> a "vague pointing instrument" than to a keyboard instrument! Sometimes
> when I point it this way it goes the other way. In reality, it depends
> more on my lips etc. than on my fingers, of which I use four when
> playing normally. I am not average, I confess.
> :)
> 
As a trombonist, I can beat you on that - I just wave it about, and use
at most one finger (I have a Bb/F). Still, I think a valve Bass Trombone
(Bb/F/G) (not that I've ever seen such a beast) would just about catch a
*typical* modern mouse up. A gaming mouse would still knock it into a
cocked hat.

Cheers,
Wol


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


Re: Rendering cropped SVG

2015-09-14 Thread Simon Albrecht
Only just did I see this e-mail has been rejected because the svg is too 
large. So – once more with only .ly…


Am 14.09.2015 um 20:35 schrieb Simon Albrecht:

Am 14.09.2015 um 18:28 schrieb poto...@posteo.de:

Hello,

I'd like to render my scores (only short exercises that don't fill a 
page) as .svg so I can include them on a website. For this, the 
images would have to be cropped without any white margins. I've 
searched the web for hours without finding a solution.


I tried lilypond -dbackend=svg test.ly , but this 
only renders the first system.


IIRC there is only one system in test.ly. -dbackend=svg should work 
just fine.



I also tried to include this:

\paper {
  indent = 0\mm
  line-width = 120\mm
  oddHeaderMarkup = ""
  evenHeaderMarkup = ""
  oddFooterMarkup = ""
  evenFooterMarkup = ""


These are not for margins, but for headers and footers, as their names 
say. Try the following:

%% zero-margin.ly 
\version "2.19.27"

\paper {
  right-margin = 0
  left-margin = 10
  top-margin = 0
  bottom-margin = 0
}

mus = \repeat unfold 64 \relative { c' d e f }

\score {
  \new StaffGroup \with { shortInstrumentName = "test" }
  <<
\mus
\mus
  >>
}


With that, I get the attached results.
If the left margin is 0 as well, the System_start_delimiter and 
instrument names will be off the page.
The svg seems OK to me, except for the missing embedded font, which we 
are trying to fix at the moment.


By the way: Searching the index of our Notation Reference manual for 
‘svg’ brings you directly to 
.


HTH, Simon


\version "2.19.27"

\paper {
  right-margin = 0
  left-margin = 10
  top-margin = 0
  bottom-margin = 0
}

mus = \repeat unfold 64 \relative { c' d e f }

\score {
  \new StaffGroup \with { shortInstrumentName = "test" }
  <<
\mus
\mus
  >>
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OT: Beauty of programming languages

2015-09-14 Thread J Martin Rushton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 14/09/15 22:01, Wols Lists wrote:
> On 14/09/15 21:42, Tim Reeves wrote:
>> Well, as a hornist, I reckon my instrument of choice is a lot
>> closer to a "vague pointing instrument" than to a keyboard
>> instrument! Sometimes when I point it this way it goes the other
>> way. In reality, it depends more on my lips etc. than on my
>> fingers, of which I use four when playing normally. I am not
>> average, I confess. :)
>> 
> As a trombonist, I can beat you on that - I just wave it about, and
> use at most one finger (I have a Bb/F). Still, I think a valve Bass
> Trombone (Bb/F/G) (not that I've ever seen such a beast) would just
> about catch a *typical* modern mouse up. A gaming mouse would still
> knock it into a cocked hat.
> 
> Cheers, Wol
> 
As a church bell ringer I just have a length of rope to pull.  Game,
set & match! :)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJV90dBAAoJEAF3yXsqtyBlq3cQAMFImFtHF/GFt+AGZtQZiUEa
ogEp5mqZg4mJRO4CW/Z6kDRiNixUK10RIx8muJITe3ct6UFZ/dXMJzh6qhPQQa89
PpYdsv7pF+2E/qAL1u1lGqZ40HQlDUOE4aSttquEkY1RmeOIB56b/zyzx0R5Q9/5
cPyD9pfT6I+Ze4E8tan+OJaLgIZntEJiD9ney+GDsrmHyz2UVr2Msb5Fk4NSojAA
jrifmK3BCxdNAEH3xW4H9AGGUafoDmS7Gy9Aqk3ZTVbJN8FwkyrOSTXdR6n0wnvx
eutcLqXSQ6/XTdNmiV1yTGpYkfpVv/GCRv0W5VCxEsWnxzYPd8f5Kz7aXUFOBUvD
Tl19vPlMRtAmbHsYMa+L1J96xLRqNL3WDhxI/S3GgnuL03ojUoAqEnoSv/e1rQCt
XzfsHGUZep+4KIb00f/EuPPy4NzVkObfx+ygZE7mcGcSJ6lrzF8AReyWguK1Uz3f
Aly/j1R2FJJ7lghWqOABnTtwgGCo96qCFPPGNzmiqLZhsWxxGnH3+NoYKsg4mTKI
w+8XvlpXBOQ2slpqq+ma9kezNP+G+uEYCH6XdyvBNm3lYjNhIy8Y9AqdeAdVzdzp
Ne17pRYs6OkqlED+dRjk33//EhYcwiObNTe0p3fnGQcBKPfklfFxXplyqCZ6/Kr/
wX3v3cPbjcg9KShGSOBI
=/G9M
-END PGP SIGNATURE-

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


Re: Rendering cropped SVG

2015-09-14 Thread David Wright
Quoting poto...@posteo.de (poto...@posteo.de):
> I forgot: My file is just the minimum to test if Lilypond can do what I want 
> it to do.
> 
> \pointAndClickOff
> 
> \relative {
>   c' d e f g f e d
>   c' d e f a a b d
>   c' d e f a a b d
> }
> 
> \version "2.18.2"

I typeset music fragments for insertion into LuaLaTeX files, so I
generate .pdf files and then crop them. My .ly source is built up from
quite a few includes, and processed with bash functions (on Debian)
but I've processed this minimal fragment with the same utilities:

\version "2.18.2"
\relative {
  c' d e f g f e d
  c' d e f a a b d
  c' d e f a a b d
}
\header { tagline = ##f }
\paper { indent = 0 \mm }

$ lilypond -dno-point-and-click -drelative-includes --include="$HOME/LilyLib" 
foo.ly

$ pdfcrop --margins 1 foo.pdf bar.pdf

$ pdf2svg bar.pdf foo.svg

pdfcrop is from texlive in Debian's texlive-extra-utils
pdf2svg homepage is at http://www.cityinthesky.co.uk/pdf2svg.html

Filesizes:

141 foo.ly
  18078 foo.pdf
  17158 bar.pdf
  39154 foo.svg

I checked the SVG with inkscape and it looks ok, as does the PDF.

I also ran your PNG command line:

   7454 foo.png

but I haven't looked at why the output has over a bar's width of
whitespace at the right side. I don't use PNGs anyway because they're
blurry, whereas PDFs (and the SVGs) remain crisp whatever the size.

I then added \break at the midpoint of the notes and reran everything.
The SVG is complete, and it also happens to fix the PNG.

pdfcrop handles multiple pages; pdf2svg has to process a page at a time.

Cheers,
David.

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


Re: OT: Beauty of programming languages

2015-09-14 Thread Alexander Kobel

On 2015-09-12 02:17, Tim Reeves wrote:

 > Am 11.09.2015 um 20:17 schrieb David Bellows:
 > > Urs, I'd still like to see a poll or at least all the answers
 > > collected and analyzed etc.
 >
 > I didn't intend to drop that poll idea.
 > But I find this thread very interesting and also touching, and it should
 > not be just buried in the mailing list archive. We should let it fade
 > out and then see if we can give it a decent place somewhere.
 >
 > Urs


So far, in the small, non-random sample we have, it looks like the
average user's age is somewhere around 60. I guess you can teach old
dogs new tricks! ;)


Well, another interpretation is that to be able to spend the amount of 
time required for using LilyPond, you need to be either retired or (by 
profession) really desperately in need for its specific feature set...


Here: 31 to lower the average. Computer science grad student from 
Saarbrücken, Germany, working on the borderline between mathematics 
(computer algebra and numerics) and computational geometry.


I used to lead a church choir for seven years, and still sing in choirs 
and ensembles. Lily was my reliable tool of choice for quick-and-undirty 
engravings of (mostly) chorales last minute before the rehearsal. I'm in 
a long-standing love-and-hate relationship with LaTeX and solely use 
Linux since more than a decade. Guess that helped to dampen the learning 
curve. I never had trouble to produce perfectly usable scores for my 
needs, but that's almost exclusively "simple" vocal scores.
Only occasionally, perfectionism hits me for a while and I try to push 
Lily's and my abilities - typically, until life complains and steals 
back its time. Unfortunately, that means that there are some unfinished 
pieces (both of Lily code and musical pieces) lying around and waiting 
for my retirement... ;-)



Cheers,
Alexander

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


Re:OT: Beauty of programming languages

2015-09-14 Thread Leszek Wroński
Age: 33.
Day job: Assistant Professor at the local Institute of Philosophy.

I do much teaching, but also write papers involving a lot of
mathematics (apart from 'philosophy' :-)). So, naturally, I'm using
LaTeX, under Linux. Also, I'm trying to use Emacs for everything. I
used it for Lilypond for a few years, but see below.

I sing the tenor in the local chamber baroque music choir. We quite
often do first (or one of the first) modern performances of forgotten
works. I prepare modern editions from manuscripts scanned by the
Dresden Library which are publicly available online, and put them on
the IMSLP. I have recently discovered Frescobaldi and I have to say
that for big scores its "click at the score to put the source editor
in the correct place" functionality is very efficient.

Any time I had any queries for this mailing list, I always got great
answers! Thanks everyone!

Cheers,

Leszek.

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


Re: Rendering cropped SVG

2015-09-14 Thread Simon Albrecht

Am 14.09.2015 um 18:28 schrieb poto...@posteo.de:

short exercises that don't fill a page


Forgot to add:
You can easily choose another paper format
\paper {
  #(set-paper-size "a5" 'landscape)
}
or set the paper width and height directly:
\paper {
  paper-width = 10\cm
  paper-height = 270\mm
}

For further reading and ‘ah! this is where to search the bunch of 
manuals’: 
 
and following sections.


Yours, Simon

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


Re: OT: Beauty of programming languages

2015-09-14 Thread Paul Morris
Forgot to say I use Frescobaldi.

-Paul


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


Re: Rendering cropped SVG

2015-09-14 Thread potoroo
lilypond-book-preamble.ly works with eps, but when I change it to svg, it says:

Systeme erstellen... 
/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/lily-library.scm:242:5:
 In procedure module-lookup in expression (process-procedure book paper ...):
/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/lily-library.scm:242:5:
 unbound variable: output-classic-framework 


> Am 14.09.2015 um 21:20 schrieb Simon Albrecht :
> 
> Please always use ‘Reply all’, including the list. That way others can chime 
> in, follow the thread, and answers will be available from the archive.
> 
> Am 14.09.2015 um 21:06 schrieb poto...@posteo.de :
>> I'm aware that I can set the paper size manually. But I want the sheet to be 
>> cropped exactly where the last staff ends, and I don't want to set the paper 
>> size for each score individually. 
>> 
>> I was looking at this page:  
>> http://lilypond.org/doc/v2.18/Documentation/usage/lilypond-output-in-other-programs#inserting-lilypond-output-into-other-programs
>>  
>> 
>> 
>> The command mentioned does exactly what I want for png, as I already noted 
>> in the first post:
>> lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --png 
>> Dateiname.ly 
>> 
>> But there's no command for svg on the same manual page.
> 
> Another suggestion: try using lilypond-book-preamble.ly (to be found in 
> INSTALL_DIR/lilypond/usr/share/lilypond/current/ly/), but with 'svg instead 
> of 'eps in the fourth-last line.
> And it always helps if you give an example file to work with.
> 
> Yours, Simon

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


Re: Rendering cropped SVG

2015-09-14 Thread potoroo
I forgot: My file is just the minimum to test if Lilypond can do what I want it 
to do.

\pointAndClickOff

\relative {
  c' d e f g f e d
  c' d e f a a b d
  c' d e f a a b d
}

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


Re: Rendering cropped SVG

2015-09-14 Thread Simon Albrecht
Please always use ‘Reply all’, including the list. That way others can 
chime in, follow the thread, and answers will be available from the archive.


Am 14.09.2015 um 21:06 schrieb poto...@posteo.de:
I'm aware that I can set the paper size manually. But I want the sheet 
to be cropped exactly where the last staff ends, and I don't want to 
set the paper size for each score individually.


I was looking at this page: 
http://lilypond.org/doc/v2.18/Documentation/usage/lilypond-output-in-other-programs#inserting-lilypond-output-into-other-programs


The command mentioned does exactly what I want for png, as I already 
noted in the first post:

lilypond -dbackend=eps -dno-gs-load-fonts -dinclude-eps-fonts --pngDateiname.ly 


But there's no command for svg on the same manual page.


Another suggestion: try using lilypond-book-preamble.ly (to be found in 
INSTALL_DIR/lilypond/usr/share/lilypond/current/ly/), but with 'svg 
instead of 'eps in the fourth-last line.

And it always helps if you give an example file to work with.

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


Re: OT: Beauty of programming languages

2015-09-14 Thread Jacques Menu
> Working with those commercial tools is discouraging to me, too much mouse 
> fine-tuning of details!

I had actually started with Finale 3.0 long ago, and… finally gave it, licence 
and all, to a friend who was studying music.
There were about 45 tools in the palettes at the time to perform the various 
tasks IIRW.

JM


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


Poor man' ossia

2015-09-14 Thread Menu Jacques
Hello folks,

In the example below, I’d like to indicate that someone else is playing two 
16th notes while this player plays the 8th on the first beat of the second bar, 
to help going a tempo altogether on the the second beat.

Trouble is that the two 16th are too much on the right and the stems of the « 
main » voice are too long.

Thanks for the help!

JM




\version "2.19.25"

\relative c' {
  \time 2/4

  d2 - \markup{ \italic "rall."}  ~ | % 8

  <<
{
  d8 [
  \tempo "A tempo"
  d'16 \pp -. g,16 -. ]
}
\new Voice {
  \small
  \voiceThree
  \hide NoteHead
  \override NoteHead.no-ledgers = ##t
  c'16 [ c ] s16 s16
}
  >>

}

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


Re: Poor man' ossia

2015-09-14 Thread Robert Schmaus
Without being able to test it right now: my assumption is that the 
"\voiceThree" is responsible for the shift right. Have you tried using voiceOne 
instead?

__

Truth does not change according to our ability to stomach it.
-- Flannery O'Connor

> On 14 Sep 2015, at 10:43, Menu Jacques  wrote:
> 
> Hello folks,
> 
> In the example below, I’d like to indicate that someone else is playing two 
> 16th notes while this player plays the 8th on the first beat of the second 
> bar, to help going a tempo altogether on the the second beat.
> 
> Trouble is that the two 16th are too much on the right and the stems of the « 
> main » voice are too long.
> 
> Thanks for the help!
> 
> JM
> 
> 
> 
> 
> \version "2.19.25"
> 
> \relative c' {
>   \time 2/4
> 
>   d2 - \markup{ \italic "rall."}  ~ | % 8
> 
>   <<
> {
>   d8 [
>   \tempo "A tempo"
>   d'16 \pp -. g,16 -. ]
> }
> \new Voice {
>   \small
>   \voiceThree
>   \hide NoteHead
>   \override NoteHead.no-ledgers = ##t
>   c'16 [ c ] s16 s16
> }
>   >>
> 
> }
> 
> ___
> 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: Poor man' ossia

2015-09-14 Thread Malte Meyn



Am 14.09.2015 um 10:43 schrieb Menu Jacques:

Trouble is that the two 16th are too much on the right


\override NoteColumn.ignore-collision = ##t
(in the “ossia” voice)

and the stems of the

« main » voice are too long.


\override Beam.collision-voice-only = ##t
(in the “main” voice)

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


Re: OT: Beauty of programming languages

2015-09-14 Thread David Kastrup
Leszek Wroński  writes:

> I have recently discovered Frescobaldi and I have to say that for big
> scores its "click at the score to put the source editor in the correct
> place" functionality is very efficient.

Well, this should work with a number of editors and previewers if you
read the instruction in the "Using LilyPond" manual about "Point and
Click", but of course not having to fight through any configuration for
that is convenient.

-- 
David Kastrup

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


Re: OT: Beauty of programming languages

2015-09-14 Thread David Kastrup
Alexander Kobel  writes:

> On 2015-09-12 02:17, Tim Reeves wrote:
>>  > Am 11.09.2015 um 20:17 schrieb David Bellows:
>>  > > Urs, I'd still like to see a poll or at least all the answers
>>  > > collected and analyzed etc.
>>  >
>>  > I didn't intend to drop that poll idea.
>>  > But I find this thread very interesting and also touching, and it should
>>  > not be just buried in the mailing list archive. We should let it fade
>>  > out and then see if we can give it a decent place somewhere.
>>  >
>>  > Urs
>>
>>
>> So far, in the small, non-random sample we have, it looks like the
>> average user's age is somewhere around 60. I guess you can teach old
>> dogs new tricks! ;)
>
> Well, another interpretation is that to be able to spend the amount of
> time required for using LilyPond, you need to be either retired or (by
> profession) really desperately in need for its specific feature set...

Actually, it's more like if you're trying to teach old tricks, you
better look for old dogs.

Text-based entry is an old trick in computing terms.  It appeals to
people considering a keyboard as the principal means of input and who
think of a mouse primarily as the main enemy of punch cards.

Now I'd like to think that this should generally make sense to the
average musician, given that a lot more people play pianos, organs,
flutes and other instruments with digital 10-finger input than, say
theremins or other vague pointing instruments.

But I have to admit that bowed strings have quite a bit of analog input,
and a trumpet does not sport more buttons than the average mouse these
days.

-- 
David Kastrup

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


Re: Poor man' ossia

2015-09-14 Thread Jacques Menu
Thanks Robert and Malte,

\voiceOne or \voiceThere have the same effect in this situation, so I can use 
either one or the other.

Here is a working solution.

A nice day!

JM



\version "2.19.25"

\relative c' {
  \time 2/4

  d2 - \markup{ \italic "rall."}  ~ | % 8

  <<
{
  \override Beam.collision-voice-only = ##t
  d8 [
  \tempo "A tempo"
  d'16 \pp -. g,16 -. ]
}
\new Voice {
  \voiceThree
  \hide NoteHead
  \override NoteHead.no-ledgers = ##t
  \override NoteColumn.ignore-collision = ##t
  c'16 [ c ] s16 s16
}
  >>

}


> Le 14 sept. 2015 à 11:23, Malte Meyn  a écrit :
> 
> 
> 
> Am 14.09.2015 um 10:43 schrieb Menu Jacques:
>> Trouble is that the two 16th are too much on the right
> 
> \override NoteColumn.ignore-collision = ##t
> (in the “ossia” voice)
> 
> and the stems of the
>> « main » voice are too long.
> 
> \override Beam.collision-voice-only = ##t
> (in the “main” voice)
> 
> ___
> 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: Re:OT: Beauty of programming languages

2015-09-14 Thread flup2
Age: 40

Job: teacher in a public music school (music theory, sightreading, music
history, etc.) and accompanist in Belgium

I began computer engraving by working for a little publishing and engraving
company that worked for some Belgian and French publishers. We were using
Finale, from 3.7.2 to 2007. After stopping there, I decided to use LaTeX for
all my writing stuff, and LilyPond came a few time later, with the same
ideas: text file source, content >< form, etc..
Before LaTeX and lilypond, my only "code" experience was TI-99 games in
Basic back in the early '80s ;-) (with backup on audio tapes !)

For now, my lilypond files are mostly teaching material for my students, or
transcriptions of melodies for my "amateur bass voice" (to avoid
transposition for the accompanist ;-) )

Philippe



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Re-OT-Beauty-of-programming-languages-tp181102p181103.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: OT: Beauty of programming languages

2015-09-14 Thread Adrian Oehm

45 years old

Day job: Chemist (like Borodin!)

Started with computers in the days of the VIC-20.  Went through several BASIC 
interpreter computers.  Work with both Windows (work) and Mac (home) now.  Work 
use includes some programming in high level BASIC-like languages, and some 
rudimentary SQL, HTML.

Vocalist (counter-tenor) in a church choir - have been singing since I was 
7-ish…  Know enough piano to tinkle and amuse myself.

Started engraving music (pieces I’d written) in the late 80’s on the Mac Plus 
(9” screen and all!) with a program called “Music Publisher”.  For its time, it 
wasn’t bad.  Came with a separate keyboard so you typed the music in, notes 
appearing on the screen on the staves.

Tried Finale…couldn’t work out how to use it…so I gave up.  Bought a lesser 
version from the same stable (well it is now) called Print Music.  I use that 
to tinker with pieces on screen then playback the audio.

Came across LilyPond when I was looking to set a vocal piece I’d written that 
had chanted sections.  I wanted stemless notes, and couldn’t do that in PM or 
Finale.  Lily did the job, and well, and I’ve used it to set a range of vocal 
music since - my own and others works.

While the interface can sometimes be a challenge, I steal from what I’ve done 
before and what’s in the manuals and usually get it to work.  I’ve made my own 
templates which makes it easier for me.  My code my not always be the 
prettiest, but, hey, it works!

Always impressed by the look of the output, as are those for whom I’ve set 
music.

I don’t mind the text input at all - I just use the basic editor that opens 
when you launch the application.  One thing I do like about the text based 
input is that even if I lose Lilypond for some reason, all my work is there 
accessible in text files…not like the pieces I have in Music Publisher 
files…now long inaccesible!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user