Re: Line breaks on a "where allowed" basis

2017-04-26 Thread David Kastrup
Lukas-Fabian Moser  writes:

> As far as I can see, the default line breaking behaviour in Lilypond is
> roughly as follows:
> "Break where forced by user (\break), add additional line breaks 'for best
> result'."
>
> By issuing \override NonMusicalPaperColumn.line-break-permission = ##f,
> this behaviour may be changed to:
> "Break where forced by user (\break) and nowhere else".
>
> Is there a way to get something like
> "Break at most where allowed by user"?

\once\autoLineBreaksOn ?

> presentation, three to eight measures each; line breaks in the middle of an
> exercise being undesirable, and page breaks in the middle of an exercise
> being a no-go.)

\once\autoPageBreaksOn

But the latter will not work all that well since LilyPond chooses its
line breaks independently of its page breaks, so you'll only get a page
break when the permission coincides by chance with a line break.

-- 
David Kastrup

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


Re: Center-align a score

2017-04-26 Thread Simon Albrecht
I'm glad to see my pessimism so thoroughly unfounded :-)
   Best, Simon 

 Am 26-Apr-2017 20:48:27 +0200 schrieb hend...@kontrafuss.de: 
  There are paper variables to achieve ragged-right and ragged-last layout. Is 
there a way to achieve center-aligned music in a score? Similar to ragged-left, 
but equally distribute the space between left and right borders (aka 
ragged-both).   I know it's an unusual request, but I feel it makes sense to my 
application.   cheers Hendrik
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Center-align a score

2017-04-26 Thread David Nalesnik
On Wed, Apr 26, 2017 at 3:08 PM, Kieren MacMillan
 wrote:
> Hi all,
>
>> I think this request is idiosyncratic enough to be left to a
>> two-stage process, some thing along the lines of:
>
> That would work, of course… but I think it would be easier (and better for 
> long-term maintainability) to do it all in Lilypond, e.g.,
>
> %%  SNIPPET BEGINS
> \version "2.19.17"
>
> \paper {
>   ragged-right = ##t
>   indent = 0
> }
>
> music = {
>   \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
> #'((X-offset . 38))
>   \repeat unfold 8 c'' \break
>   \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
> #'((X-offset . 33))
>   \repeat unfold 12 c'' \break
>   \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
> #'((X-offset . 46))
>   \repeat unfold 4 c'' \break
>   \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
> #'((X-offset . 39.5))
>   \repeat unfold 8 c'' \break
> }
>
> \score { \music }
> %%  SNIPPET ENDS
>
> A little trial-and-error is required if doing it manually, but there might be 
> a way to automate the process.
>

Here you go:

%

\version "2.19"

\paper {
  ragged-right = ##t
  indent = 0
}

\layout {
  \context {
\Score
\override NonMusicalPaperColumn.after-line-breaking =
#(lambda (grob)
   (if (eqv? (ly:item-break-dir grob) 1) ; line beginning
   (let* ((sys (ly:grob-system grob))
  (sys-width (ly:grob-extent sys sys X))
  (layout (ly:grob-layout grob))
  (line-full-width (ly:output-def-lookup layout 'line-width)))
 (ly:grob-set-nested-property! grob
'(line-break-system-details X-offset)
   (/ (- line-full-width (interval-length sys-width)) 2)
  }
}

music = {
  \repeat unfold 8 c'' \break
  \repeat unfold 12 c'' \break
  \repeat unfold 4 c'' \break
  \repeat unfold 8 c'' \break
}

\score { \music }

%%

Hope this helps,

David

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


Re: Center-align a score

2017-04-26 Thread Kieren MacMillan
Hi Harm,

> One could do:
> \version "2.19.56"
> #(define-markup-list-command (center-column-list-args layout props args)

I figured you’d be able to work out an easy way!

Nicely done,
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


Re: Line breaks on a "where allowed" basis

2017-04-26 Thread Thomas Morley
2017-04-26 23:20 GMT+02:00 Lukas-Fabian Moser :
> As far as I can see, the default line breaking behaviour in Lilypond is
> roughly as follows:
> "Break where forced by user (\break), add additional line breaks 'for best
> result'."
>
> By issuing \override NonMusicalPaperColumn.line-break-permission = ##f, this
> behaviour may be changed to:
> "Break where forced by user (\break) and nowhere else".
>
> Is there a way to get something like
> "Break at most where allowed by user"?
>
> I.e. I want to tell Lilypond explicitly every point at which a line break
> would be acceptable, but I would like the program to determine which of
> these places to actually use for a line break.

Checkout:

\once
\override Score.NonMusicalPaperColumn.line-break-penalty = #-1

Also, see:
See IR 3.2.85 paper-column-interface

 line-break-penalty (number)

Penalty for a line break at this column. This affects the choices
of the line breaker; it avoids a line break at a column with a
positive penalty and prefers a line break at a column with a negative
penalty.

Cheers,
  Harm


>
> (Background: Files containing lots of short exercises for use in a
> presentation, three to eight measures each; line breaks in the middle of an
> exercise being undesirable, and page breaks in the middle of an exercise
> being a no-go.)
>
> Best
> Lukas
>
> ___
> 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: ignore code on include

2017-04-26 Thread Urs Liska


Am 26.04.2017 um 23:28 schrieb Noeck:
> It's just that I prefer not to duplicate the number of files I have.
> Most of my scores are in a single file and I would need another one for
> each of those just containing:
>
> \include "soprano.ily"
> \new Staff \soprano

You may also want to have a look at
https://git.openlilylib.org/bfsc/kayser/blob/master/make.ly

for an interface where you can specify the target to be engraved as an
argument to an "\engrave" command (so far there are the individual
parts, 'score and 'choir (SATB+figured bass)).

Obviously there's fairly complicated programming behind that interface
(or rather between the clean entry file and the clean content files),
but for your use case you should be able to reach the goal with less effort.

Urs

> (this is not a real example but close). And all that only for testing.
> I am currently thinking about some "preprocessor comments" and I will
> certainly look at the links by Urs and Jan-Peter.
>
> Cheers,
> Joram
>
> ___
> 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: Line breaks on a "where allowed" basis

2017-04-26 Thread Dominic
I would use /\autoLineBreaksOff/ just before a passage that must not be
broken, followed by /\autoLineBreaksOn/ where you don't mind it being broken
again.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Line-breaks-on-a-where-allowed-basis-tp202699p202701.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: ignore code on include

2017-04-26 Thread Noeck
It's just that I prefer not to duplicate the number of files I have.
Most of my scores are in a single file and I would need another one for
each of those just containing:

\include "soprano.ily"
\new Staff \soprano

(this is not a real example but close). And all that only for testing.
I am currently thinking about some "preprocessor comments" and I will
certainly look at the links by Urs and Jan-Peter.

Cheers,
Joram

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


Line breaks on a "where allowed" basis

2017-04-26 Thread Lukas-Fabian Moser
As far as I can see, the default line breaking behaviour in Lilypond is
roughly as follows:
"Break where forced by user (\break), add additional line breaks 'for best
result'."

By issuing \override NonMusicalPaperColumn.line-break-permission = ##f,
this behaviour may be changed to:
"Break where forced by user (\break) and nowhere else".

Is there a way to get something like
"Break at most where allowed by user"?

I.e. I want to tell Lilypond explicitly every point at which a line break
would be acceptable, but I would like the program to determine which of
these places to actually use for a line break.

(Background: Files containing lots of short exercises for use in a
presentation, three to eight measures each; line breaks in the middle of an
exercise being undesirable, and page breaks in the middle of an exercise
being a no-go.)

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


Strict note spacing

2017-04-26 Thread Peter Crighton
Hello all,

I am still working on a type of lead sheet that only shows chord symbols.
For the bars to align well, I need to set
SpacingSpanner.strict-note-spacing to true (set it to false to see what I
mean), but that has the unwanted effect of the last chord symbol in a bar
having less space than the others. So, of course with strict-note-spacing
the distance from chord to chord is the same, regardless of there being a
bar line in-between or not. But I need the distance from a chord to a bar
line to be the same as from a chord to the next chord.
Is there any way to get that result?


\version "2.19.59"

<<
  \new ChordNames \chordmode {
\repeat unfold 3 {
  a4 a a a
} \break
\repeat unfold 6 {
  a4 a a a
}
  }
>>

\layout {
  \context {
\ChordNames
\consists "Bar_engraver"
\override BarLine.bar-extent = #'(-2 . 2)
\override ChordName.Y-offset = #-0.9
  }

  \context {
\Score
\remove "Bar_number_engraver"
\override SpacingSpanner.strict-note-spacing = ##t
  }
}

\paper {
  indent = 0
}



Thanks,
Peter

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Center-align a score

2017-04-26 Thread David Kastrup
Hendrik Fuß  writes:

> There are paper variables to achieve ragged-right and ragged-last layout.
> Is there a way to achieve center-aligned music in a score? Similar to
> ragged-left, but equally distribute the space between left and right
> borders (aka ragged-both).
>
> I know it's an unusual request, but I feel it makes sense to my application.

It fails to use the standard line-spacing algorithm but you can try

#(define-markup-command (centered-in-line layout props mup) (markup?)
  #:properties ((line-width))
  (interpret-markup layout props
 #{ \markup \translate #`(,(/ line-width 2) . 0) \center-align #mup #}))

\markuplist
\centered-in-line
\score-lines { { #@(map (lambda x
		 #{ c'2-"Oh" g'-#(format "A~v{a~}h" (random 20) '(1)) #})
		 (iota 300)) }
   \layout { ragged-right = ##t } }

Frankly, the output is awful.

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


Re: Center-align a score

2017-04-26 Thread Thomas Morley
2017-04-26 21:09 GMT+02:00 Simon Albrecht :
> Am 26.04.2017 um 20:47 schrieb Hendrik Fuß:
>>
>> There are paper variables to achieve ragged-right and ragged-last layout.
>> Is there a way to achieve center-aligned music in a score?
>
>
> Not really. One way would be entering each line as a separate \score inside
> \markup \center-column {},

One could do:

\version "2.19.56"

#(define-markup-list-command (center-column-list-args layout props args)
  (markup-list?)
  #:properties ((baseline-skip))
  (let ((stils (interpret-markup-list layout props args))
(line-width (ly:output-def-lookup layout 'line-width)))
  (space-lines baseline-skip
(map
  (lambda (arg)
(ly:stencil-translate-axis
  arg
  (/ (- line-width (interval-length (ly:stencil-extent arg X))) 2)
  X))
  stils

%%%
%% EXAMPLE
%%%

\header {
  title = "TITLE"
  subtitle = "SUBTITLE"
}

mus = {
  a'1 1 1 \break
  1 1 \break
  1 \break
  1 1 \break
  1 1 1 \break
}

sc =
\score {
\new Staff \repeat unfold 6 \mus
\layout { ragged-right = ##t indent = 0 }
  }

\markuplist \center-column-list-args \score-lines { \sc }

Cheers,
  Harm

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


Re: Center-align a score

2017-04-26 Thread Erik Ronström
> There are paper variables to achieve ragged-right and ragged-last
> layout. Is there a way to achieve center-aligned music in a score?

I’ve been fairly successful in the past with rendering lilypond to svg, and 
then writing perl scripts to automatically edit the svg file (which is a lot 
easier than manipulating a pdf). In those specific situations, svg happened to 
be my target format anyway, but if you want pdf I suppose you can convert the 
svg to pdf somehow (?).

I don’t know whether this would make sense for you at all, just wanted to 
mention it!

Erik



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


Re: Center-align a score

2017-04-26 Thread Kieren MacMillan
Hi all,

> I think this request is idiosyncratic enough to be left to a
> two-stage process, some thing along the lines of:

That would work, of course… but I think it would be easier (and better for 
long-term maintainability) to do it all in Lilypond, e.g.,

%%  SNIPPET BEGINS
\version "2.19.17"

\paper {
  ragged-right = ##t
  indent = 0
}

music = {
  \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
#'((X-offset . 38))
  \repeat unfold 8 c'' \break
  \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
#'((X-offset . 33))
  \repeat unfold 12 c'' \break
  \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
#'((X-offset . 46))
  \repeat unfold 4 c'' \break
  \overrideProperty Score.NonMusicalPaperColumn.line-break-system-details 
#'((X-offset . 39.5))
  \repeat unfold 8 c'' \break
}

\score { \music }
%%  SNIPPET ENDS

A little trial-and-error is required if doing it manually, but there might be a 
way to automate the process.

Cheers,
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


Re: Center-align a score

2017-04-26 Thread David Wright
On Wed 26 Apr 2017 at 21:09:53 (+0200), Simon Albrecht wrote:
> Am 26.04.2017 um 20:47 schrieb Hendrik Fuß:
> >There are paper variables to achieve ragged-right and ragged-last
> >layout. Is there a way to achieve center-aligned music in a score?
> 
> Not really. One way would be entering each line as a separate \score
> inside \markup \center-column {}, but of course that’s only going to
> make sense in very specific situations.

That would involve serious work, breaking the score up with
losing its essential continuity.

I think this request is idiosyncratic enough to be left to a
two-stage process, some thing along the lines of:

. set the systems per page to 1, which will break the music up
  into separate lines automatically,
. pass the PDF file through pdfcrop to crop each page(=line),
  probably setting some thin top/bottom margins,
. burst the PDF file with pdftk into a sequentially named set
  of PDF files,
. pass these into LaTeX where the meat of the .tex file
  consists of:

\begin{center}
\includegraphics{filename0001}\\
\includegraphics{filename0002}\\
\includegraphics{filename0003}\\
\includegraphics{filename0004}\\
...
\end{center}

> Else you’d have to
> graphically edit the output score. (Or (have someone) write a patch
> for the respective C++ spacing engines, which might be very
> difficult.)

Cheers,
David.

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


Re: Center-align a score

2017-04-26 Thread Kieren MacMillan
Hi Hendrik,

> Is there a way to achieve center-aligned music in a score? Similar to 
> ragged-left, but equally distribute the space between left and right borders 
> (aka ragged-both).

ragged-right

+

the X-offset part of


For sure you can do this manually… but there *might* be a way to automate it, 
based on the current system X-extent.
Urs?

Hope this helps!
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


Re: Center-align a score

2017-04-26 Thread Simon Albrecht

Am 26.04.2017 um 20:47 schrieb Hendrik Fuß:
There are paper variables to achieve ragged-right and ragged-last 
layout. Is there a way to achieve center-aligned music in a score?


Not really. One way would be entering each line as a separate \score 
inside \markup \center-column {}, but of course that’s only going to 
make sense in very specific situations. Else you’d have to graphically 
edit the output score. (Or (have someone) write a patch for the 
respective C++ spacing engines, which might be very difficult.)


Best, Simon

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


Center-align a score

2017-04-26 Thread Hendrik Fuß
There are paper variables to achieve ragged-right and ragged-last layout.
Is there a way to achieve center-aligned music in a score? Similar to
ragged-left, but equally distribute the space between left and right
borders (aka ragged-both).

I know it's an unusual request, but I feel it makes sense to my application.

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


Re: Midiimport für Lilypond/Frescobaldi

2017-04-26 Thread Carl Sorensen


On 4/26/17 11:21 AM, "Bernhard Kleine"  wrote:

>I saw the thread in this group four years ago. Is there any new
>information whether a keyboard can be used to produce midi-output which
>can be imported into lilypond with a gain of time.

Andrew Hawryluk has this web page:

http://www.musicbyandrew.ca/finale-lilypond-4.html


where he describes his preferred way of entering pitches for LilyPond
using a MIDI keyboard.

HTH,

Carl


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


Re: Midiimport für Lilypond/Frescobaldi

2017-04-26 Thread David Kastrup
David Kastrup  writes:

> Bernhard Kleine  writes:
>
>> I saw the thread in this group four years ago. Is there any new
>> information whether a keyboard can be used to produce midi-output which
>> can be imported into lilypond with a gain of time.
>>
>> My problem: when writing scores to be used in our choir I often make
>> mistakes. If I could listen to the music instead of reading the notes I
>> might find errors faster.
>>
>> Any report from experience would be helpful.
>
> Are you an Emacs user?

Wait, the subject title is about Frescobaldi.  You use Frescobaldi's
Midi input already?

-- 
David Kastrup

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


Re: Midiimport für Lilypond/Frescobaldi

2017-04-26 Thread David Kastrup
Bernhard Kleine  writes:

> I saw the thread in this group four years ago. Is there any new
> information whether a keyboard can be used to produce midi-output which
> can be imported into lilypond with a gain of time.
>
> My problem: when writing scores to be used in our choir I often make
> mistakes. If I could listen to the music instead of reading the notes I
> might find errors faster.
>
> Any report from experience would be helpful.

Are you an Emacs user?

-- 
David Kastrup

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


Re: Midiimport für Lilypond/Frescobaldi

2017-04-26 Thread Johan Vromans
On Wed, 26 Apr 2017 19:21:06 +0200, Bernhard Kleine
 wrote:

> My problem: when writing scores to be used in our choir I often make
> mistakes. If I could listen to the music instead of reading the notes I
> might find errors faster.

Personally, I use Denemo for this purpose. It does exactly that (and more,
of course).

-- Johan

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


Midiimport für Lilypond/Frescobaldi

2017-04-26 Thread Bernhard Kleine
I saw the thread in this group four years ago. Is there any new
information whether a keyboard can be used to produce midi-output which
can be imported into lilypond with a gain of time.

My problem: when writing scores to be used in our choir I often make
mistakes. If I could listen to the music instead of reading the notes I
might find errors faster.

Any report from experience would be helpful.

Regards Bernhard

-- 

spitzhalde9
D-79853 lenzkirch
bernhard.kle...@gmx.net
www.b-kleine.com, www.urseetal.net
-
thunderbird mit enigmail
GPG schlüssel: D5257409
fingerprint:
08 B7 F8 70 22 7A FC C1 15 49 CA A6 C7 6F A0 2E D5 25 74 09




signature.asc
Description: OpenPGP digital signature
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ignore code on include

2017-04-26 Thread Urs Liska


Am 26.04.2017 um 18:45 schrieb Simon Albrecht:
> Am 26.04.2017 um 18:36 schrieb Noeck:
>> Hi,
>>
>> in python you can add code under this condition:
>> if __name__ == "__main__"
>> This way it is only executed if this file is the main file that is
>> executed. If the file is only imported ("included"), this code is
>> skipped.
>>
>> There is nothing similar in LilyPond, is there?
>
> I’m pretty sure there isn’t. The parser doesn’t make any difference
> between whether code comes from an \include or not.
>
>>
>> I am asking because it would be handy to have a file soprano.ly with the
>> soprano notes which can be included to use them. And if it is run on its
>> own, it produces a score containing only the soprano voice.
>>
>> I know that I can do that with multiple files.
>
> Which is why there won’t probably be great need for such a feature. Is
> there anything about your setup that absolutely necessitates it?

I don't know about Joram's use case, but for openLilyLib this is pretty
crucial. Each package includes the oll-core package, but it should of
course be actually read/parsed only once. The same with modules. If a
package/module is already loaded explicitly or implicitly I don't want
it to be parsed again.

Urs

>
> Best, Simon
>
> ___
> 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: Preserve links with includepdf

2017-04-26 Thread Noeck
I guess I found a solution that works for me: Not using includepdf but
rather pdftk to concat the pdfs directly. Drawback: Links from the table
of contents to the scores are probably impossible …

So if you have better solutions, I am still interested.

Cheers,
Joram

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


Re: ignore code on include

2017-04-26 Thread Jan-Peter Voigt

Hi Joram,

I use a scheme-function for that purpose. Here is a cutdown, that shows 
the essential test.


%%%
#(use-modules (ice-9 regex))

#(define-public (test-location? parser location)
  (let ((outname (ly:parser-output-name parser))
(locname (car (ly:input-file-line-char-column location
(regexp-match? (string-match (format "^(.*/)?~A\\.i?ly$" outname) 
locname))

))

#(if (test-location? (*parser*) (*location*)) (display "Yes"))
%%%

HTH
Jan-Peter

Am 26.04.2017 um 18:36 schrieb Noeck:

Hi,

in python you can add code under this condition:
if __name__ == "__main__"
This way it is only executed if this file is the main file that is
executed. If the file is only imported ("included"), this code is skipped.

There is nothing similar in LilyPond, is there?

I am asking because it would be handy to have a file soprano.ly with the
soprano notes which can be included to use them. And if it is run on its
own, it produces a score containing only the soprano voice.

I know that I can do that with multiple files. But I would be interested
if that exists.

Cheers,
Joram

___
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: ignore code on include

2017-04-26 Thread Simon Albrecht

Am 26.04.2017 um 18:36 schrieb Noeck:

Hi,

in python you can add code under this condition:
if __name__ == "__main__"
This way it is only executed if this file is the main file that is
executed. If the file is only imported ("included"), this code is skipped.

There is nothing similar in LilyPond, is there?


I’m pretty sure there isn’t. The parser doesn’t make any difference 
between whether code comes from an \include or not.




I am asking because it would be handy to have a file soprano.ly with the
soprano notes which can be included to use them. And if it is run on its
own, it produces a score containing only the soprano voice.

I know that I can do that with multiple files.


Which is why there won’t probably be great need for such a feature. Is 
there anything about your setup that absolutely necessitates it?


Best, Simon

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


Re: ignore code on include

2017-04-26 Thread Urs Liska


Am 26.04.2017 um 18:36 schrieb Noeck:
> Hi,
>
> in python you can add code under this condition:
> if __name__ == "__main__"
> This way it is only executed if this file is the main file that is
> executed. If the file is only imported ("included"), this code is skipped.
>
> There is nothing similar in LilyPond, is there?
>
> I am asking because it would be handy to have a file soprano.ly with the
> soprano notes which can be included to use them. And if it is run on its
> own, it produces a score containing only the soprano voice.
>
> I know that I can do that with multiple files. But I would be interested
> if that exists.

Maybe
https://github.com/openlilylib/oll-core/blob/master/package.ily
or
https://git.openlilylib.org/bfsc/das-trunkne-lied/blob/master/library/ly/makescore/compile-segment.ily
give you some inspiration?

The latter is probably your use-case: using a file either as an included
or a standalone one. The idea is to define a function whose
implementation is different depending on the presence of a flag. At the
end of the file the function is called and does the appropriate thing.

HTH
Urs

> Cheers,
> Joram
>
> ___
> 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


Preserve links with includepdf

2017-04-26 Thread Noeck
Hi,

when creating a book of lilypond scores using pdfpages and \includepdf,
can I preserve the links in the original scores?

My footer has a \with-url to the lilypond website, for instance. But in
the combined PDF created by LaTeX, the footer is not clickable.

Best,
Joram

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


ignore code on include

2017-04-26 Thread Noeck
Hi,

in python you can add code under this condition:
if __name__ == "__main__"
This way it is only executed if this file is the main file that is
executed. If the file is only imported ("included"), this code is skipped.

There is nothing similar in LilyPond, is there?

I am asking because it would be handy to have a file soprano.ly with the
soprano notes which can be included to use them. And if it is run on its
own, it produces a score containing only the soprano voice.

I know that I can do that with multiple files. But I would be interested
if that exists.

Cheers,
Joram

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


Re: I want my fs back!

2017-04-26 Thread Jeffery Shivers
>> Am 26.04.2017 um 17:13 schrieb zs.has...@gmx.de:
>> > The answer in my case was:
>> >
>> > \pdfinclusioncopyfonts=1
>>
>> which is a macro from which package? (Just for reference and out of
>> curiousity)

It is a part of pdftex; see p.35:
http://texdoc.net/texmf-dist/doc/pdftex/manual/pdftex-a.pdf

-- 

Jeffery Shivers
 jefferyshivers.com
 soundcloud.com/jefferyshivers

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


Re: I want my fs back!

2017-04-26 Thread David Kastrup
Urs Liska  writes:

> Am 26.04.2017 um 17:13 schrieb zs.has...@gmx.de:
>> The answer in my case was:
>>
>> \pdfinclusioncopyfonts=1
>
> which is a macro from which package? (Just for reference and out of
> curiousity)

Sounds like a PDFTeX primitive to me.

-- 
David Kastrup

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


AW: I want my fs back!

2017-04-26 Thread zs.hassia
I do not know.

Perhaps helps http://golatex.de/viewtopic.php?p=92424#92424

> -Ursprüngliche Nachricht-
> Von: lilypond-user [mailto:lilypond-user-
> bounces+zs.hassia=gmx...@gnu.org] Im Auftrag von Urs Liska
> Gesendet: Mittwoch, 26. April 2017 17:16
> An: lilypond-user@gnu.org
> Betreff: Re: I want my fs back!
> 
> 
> 
> Am 26.04.2017 um 17:13 schrieb zs.has...@gmx.de:
> > The answer in my case was:
> >
> > \pdfinclusioncopyfonts=1
> 
> which is a macro from which package? (Just for reference and out of
> curiousity)
> 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: Frescobaldi input latency

2017-04-26 Thread Shevek
Yes, this is a project with many large files. Well, I'm glad at least it's a
known issue. Unfortunately I don't have the means to contribute to solving
it. Here's hoping somebody will!



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Frescobaldi-input-latency-tp202665p202671.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: I want my fs back!

2017-04-26 Thread Urs Liska


Am 26.04.2017 um 17:13 schrieb zs.has...@gmx.de:
> The answer in my case was:
>
> \pdfinclusioncopyfonts=1

which is a macro from which package? (Just for reference and out of
curiousity)
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


AW: I want my fs back!

2017-04-26 Thread zs.hassia
The answer in my case was:

\pdfinclusioncopyfonts=1

Regards

> -Ursprüngliche Nachricht-
> Von: lilypond-user [mailto:lilypond-user-
> bounces+zs.hassia=gmx...@gnu.org] Im Auftrag von Jeffery Shivers
> Gesendet: Dienstag, 25. April 2017 14:08
> An: Stephan Zitzmann 
> Cc: Lilypond-User Mailing List 
> Betreff: Re: I want my fs back!
> 
> On Tue, Apr 25, 2017 at 6:12 AM Stephan Zitzmann
> mailto:zitzmann.step...@gmx.de> > wrote:
> 
> 
>   I have the problem with many files.
> 
> 
> 
>   [...]
> 
> 
> 
>   The problem is after incuding the resulting pdf in Latex with
>   \includegraphics all the ff in the lyrics text are missing.
> 
>   So I rendered the lilypondfile as a svg, opened it with inkscape,
> convertet
>   the file to pdf, and included it in the same way in Latex. Now I have
> the
>   fs.
> 
>   So I guess this is a problem of lilypond.
> 
> 
> 
> It seems like that *isn't* the case though, considering you found a
> workaround that fit after that part of the process.
> 
> 
>   Is it possible to attache files on this mailinglist?
> 
> 
> Of course, but better if you can embed a tiny example.
> 
> Search "LaTeX remove ligatures" and you'll probably find your solution is to
> use the *newunicodechar* package.
> Best,
> Jeffery
> --
> 
> 
> 
> Jeffery Shivers
>  jefferyshivers.com 
> soundcloud.com/jefferyshivers 


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


Re: Frescobaldi input latency

2017-04-26 Thread Urs Liska


Am 26. April 2017 15:37:11 MESZ schrieb Shevek :
>Does anybody else find the input in Frescobaldi to be sluggish? I find
>that
>the cursor lags noticeably when typing, navigating by arrow keys, or
>selecting with the mouse. I have auto-complete and "synchronize with
>cursor
>position" disabled but point-and-click enabled because I use it. This
>is the
>current version in the Ubuntu 16.04 repositories.
>

Do you experience this generally or only with larger documents?

Disabling autocomplete unfortunately doesn't turn everything off but only 
disables the pop-up. See https://github.com/wbsoft/frescobaldi/issues/933 which 
I created just a few days ago.

Slow handling of large files (or files with numerous includes) is a known 
issue, with several ideas to approach but nobody having had the time to tackle 
...

Urs


>
>
>--
>View this message in context:
>http://lilypond.1069038.n5.nabble.com/Frescobaldi-input-latency-tp202665.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

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


Re: Frescobaldi input latency

2017-04-26 Thread Federico Bruni
Il giorno mer 26 apr 2017 alle 15:37, Shevek 
 ha scritto:
Does anybody else find the input in Frescobaldi to be sluggish? I 
find that the cursor lags noticeably when typing, navigating by arrow 
keys, or selecting with the mouse. I have auto-complete and 
"synchronize with cursor position" disabled but point-and-click 
enabled because I use it. This is the current version in the Ubuntu 
16.04 repositories.


I guess that it happens only with certain files.. files which include a 
lot of files (or one very big file), right?

Checkout this issue:
https://github.com/wbsoft/frescobaldi/issues/473




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


Frescobaldi input latency

2017-04-26 Thread Shevek
Does anybody else find the input in Frescobaldi to be sluggish? I find that
the cursor lags noticeably when typing, navigating by arrow keys, or
selecting with the mouse. I have auto-complete and "synchronize with cursor
position" disabled but point-and-click enabled because I use it. This is the
current version in the Ubuntu 16.04 repositories.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Frescobaldi-input-latency-tp202665.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: Parenthesize bass figures as a whole

2017-04-26 Thread Lukas-Fabian Moser
>
> You know you can insert brackets doing what you want?
>

No, in fact I didn't - it never occured to me that the brackets inside
figures <6 4> could be put around more than one figure at a time.
Your solution fits my need perfectly - thanks very much!!

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