Re: Clef "treble_8"

2020-02-10 Thread Hans Åberg


> On 10 Feb 2020, at 19:53, Michael Käppler  wrote:
> 
> Am 10.02.2020 um 16:56 schrieb Noeck:
>> 
>> If you don’t know what to look for to find the name, this page could help:
>> https://joramberger.de/files/lilypond_visualindex.pdf
> Wow, this is pretty cool! Why isn't this part of the official docs?

Since the guitar is a transposing instrument, sounding one octave lower than 
written, I tend to think one should be able to either enter the written pitches 
with the MIDI sounding one octave lower, or enter the pitches as sounded, 
written one octave higher.

The LilyPond \transposition does the former, but the second might be useful if 
changing the instrument.





Re: LSR contribution

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 20:51 schrieb Thomas Morley:

Am Mo., 10. Feb. 2020 um 10:11 Uhr schrieb Michael Käppler :


Hi Harm,


Fine with me, I already updated the LSR-code, for now unapproved.
Please have a look whether all is ok, snippet-description and the like.

Everything ok now, please approve if you're fine with it, too.

Cheers,
Michael



Re: Clef "treble_8"

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 22:09 schrieb Noeck:


The case of the spacing overview is similar. The visual index is created
from a LilyPond source code. If I (or someone) finds a way to create a
clickable SVG file from it, one could include it into HTML and make it
blend much better into the/a documentation website.

Would you share the source code for the visual index?

Cheers,
Michael


Cheers,
Joram


¹: A gentle introduction to overrides will follow at some point.
²: A 2.20 version will be put online as soon as 2.20 is out.





Re: Clef "treble_8"

2020-02-10 Thread Noeck
Hi Michael and Karlin,

thank you for your positive reaction. There are 3 files¹:

- a cheat sheet: https://joramberger.de/files/lilypond_sheet_2.18_en.pdf
- “visual index”: https://joramberger.de/files/lilypond_visualindex.pdf
- spacing overview: https://joramberger.de/files/LilypondSpacing.pdf

The cheat sheet is also available in other languages (and as SVG)²:

https://joramberger.de/files/lilypond_sheet_2.18_de.pdf
https://joramberger.de/files/lilypond_sheet_2.18_fr.pdf
https://joramberger.de/files/lilypond_sheet_2.18_it.pdf
https://joramberger.de/files/lilypond_sheet_2.18_en.svg
https://joramberger.de/files/lilypond_sheet_2.18_de.svg
https://joramberger.de/files/lilypond_sheet_2.18_fr.svg
https://joramberger.de/files/lilypond_sheet_2.18_it.svg


>> Why isn't this part of the official docs?

I once tried to get them in an appropriate place in the official
documentation. But they were not accepted. For the cheat sheet, main
objections were:

- not source code (even though SVG is an open and text based format)
- needs updates for new versions (well, those basic things did not
  change for at least 7 years now and even if they did…)
- does not fit into the texinfo documentation creation process (ok)

The case of the spacing overview is similar. The visual index is created
from a LilyPond source code. If I (or someone) finds a way to create a
clickable SVG file from it, one could include it into HTML and make it
blend much better into the/a documentation website.

Cheers,
Joram


¹: A gentle introduction to overrides will follow at some point.
²: A 2.20 version will be put online as soon as 2.20 is out.



Re: Clef "treble_8"

2020-02-10 Thread Karlin High

On 2/10/2020 12:53 PM, Michael Käppler wrote:

Why isn't this part of the official docs?


That was my reaction, too. Plus, there's at least one more work like it:



I'm usually not a very demanding LilyPond user. I have trouble staying 
sharp on all the different spacing and padding settings, due to not 
using them much. As a result, I've learned to like that Spacing map a lot.

--
Karlin High
Missouri, USA



Re: LSR contribution

2020-02-10 Thread Thomas Morley
Am Mo., 10. Feb. 2020 um 20:43 Uhr schrieb Michael Käppler :
>
> Am 10.02.2020 um 10:10 schrieb Michael Käppler:
> >
> >
> > Do you have any idea how to preserve indentation within  blocks?
> > Inserting   or the like seems hacky, inline-css-styling too...
> Ok, found out that the combination of  and  tags does work
> well for that purpose.

:)

> >> Probably one suggestion:
> >> How about gving the user some hint or example-message what can be
> >> expected if warnings are triggered or debug-mode is enabled?
> > Do you mean inside the description or as snippet output?
> > Btw, do you know a way to dump warning-messages to the graphical output?
> Added some examples to the description.
> The LSR seems to be down at the moment, though.
> What bothers me a little bit is the unpredictable order of warnings on
> the console.
> Do you know a way to fix this?

Sorry, no clue if it's even possible ...

Cheers,
  Harm



Re: LSR contribution

2020-02-10 Thread Thomas Morley
Am Mo., 10. Feb. 2020 um 10:11 Uhr schrieb Michael Käppler :
>
>
> Hi Harm,
>
> > Fine with me, I already updated the LSR-code, for now unapproved.
> > Please have a look whether all is ok, snippet-description and the like.
> Thank you for updating!
> Will update the description this evening.
> Do you have any idea how to preserve indentation within  blocks?
> Inserting   or the like seems hacky, inline-css-styling too...
> >
> > Probably one suggestion:
> > How about gving the user some hint or example-message what can be
> > expected if warnings are triggered or debug-mode is enabled?
> Do you mean inside the description or as snippet output?

In the description or probably as a comment in the code.

> Btw, do you know a way to dump warning-messages to the graphical output?

Nope. My experiments with 'with-output-to-string' weren't successful,
at least for ly:warning and similar.
Ofcourse one could avoid ly:warning and go for some other printing
function, but I think it would lead to more confusion instead of
helping the user.

Best,
  Harm



Re: LSR contribution

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 10:10 schrieb Michael Käppler:



Do you have any idea how to preserve indentation within  blocks?
Inserting   or the like seems hacky, inline-css-styling too...

Ok, found out that the combination of  and  tags does work
well for that purpose.



Probably one suggestion:
How about gving the user some hint or example-message what can be
expected if warnings are triggered or debug-mode is enabled?

Do you mean inside the description or as snippet output?
Btw, do you know a way to dump warning-messages to the graphical output?

Added some examples to the description.
The LSR seems to be down at the moment, though.
What bothers me a little bit is the unpredictable order of warnings on
the console.
Do you know a way to fix this?

Cheers,
Michael



Re: Clef "treble_8"

2020-02-10 Thread Michael Käppler

Am 10.02.2020 um 16:56 schrieb Noeck:


If you don’t know what to look for to find the name, this page could help:
https://joramberger.de/files/lilypond_visualindex.pdf

Wow, this is pretty cool! Why isn't this part of the official docs?

Cheers,
Michael


HTH,
Joram






Re: Clef "treble_8"

2020-02-10 Thread Noeck
Hi Anthony,

>     \transposition c''

What you are looking for here is \transpose:
http://lilypond.org/doc/v2.18/Documentation/notation/changing-multiple-pitches#transpose

> Now I want also the time signature "C" to disappear... I've read the doc
> ,
> but don't see how.

\omit was introduced in 2.18:
http://lilypond.org/doc/v2.18/Documentation/changes/index.html

Documentation:
http://lilypond.org/doc/v2.18/Documentation/notation/visibility-of-objects

> Is there a "\omit" ?

you can basically \omit anything as soon as you know what the object it
is called:

\omit TimeSignature

If you don’t know what to look for to find the name, this page could help:
https://joramberger.de/files/lilypond_visualindex.pdf

HTH,
Joram



Re: Clef "treble_8"

2020-02-10 Thread Anthony Rushforth
"\omit ClefModifier" is what I want, thank you

I have tried Amy's suggestion too, but the notes don't change, I'm doing
something wrong :
\version "2.18.2"
\score
{
\new Staff {
   %\clef "treble_8"
\transposition c''
   b
 }
}

Now I want also the time signature "C" to disappear... I've read the doc
,
but don't see how. Is there a "\omit" ?
Thank you for your responses

Anthony


Le lun. 10 févr. 2020 à 14:46, David Kastrup  a écrit :

> Anthony Rushforth  writes:
>
> > Hello,
> >
> > I'm writing music for classical guitar, so I use the key " \clef
> "treble_8""
> >
> > I would like to make the "8" symbol disappear (although I know it's the
> > correct way to represent it)
> >
> > [image: image.png]
> >
> >
> > I guess it can be done with a ClefModifier but I don't know how to use
> it.
>
> You mean, without a ClefModifier.
>
>
>
> --
> David Kastrup
>


Re: Lily 2.19.83 crashed

2020-02-10 Thread Federico Bruni




Il giorno lun 10 feb 2020 alle 15:52, David Kastrup  ha 
scritto:

Jacques Menu  writes:


 Hello folks,

 The attached file caused a crash:

 menu@macbookprojm: ~/libmusicxml-git/files/samples/musicxml > 
lilypond HelloWorld.ly

 GNU LilyPond 2.19.83
 Processing `HelloWorld.ly'
 Parsing...
 Interpreting music...
 warning: no music found in score
 Preprocessing graphical objects...
 Interpreting music...
 warning: no music found in score
 MIDI output to `HelloWorld.midi'...Segmentation fault: 11 (core 
dumped)


 due to:

   \new Staff = "Part_POne_Staff_One"
   \with {
   }
   <<
   >>

 My wrong, I confess…


The given example does not generate Midi.  An example showing probably
the same kind of crash would be


Might be worth reporting to the bug list so that it gets tracked.




No need to write to the bug list. It's already in the tracker (even if 
summary should be corrected, I will do it now):


https://sourceforge.net/p/testlilyissues/issues/5234/







Re: Lily 2.19.83 crashed

2020-02-10 Thread David Kastrup
Jacques Menu  writes:

> Hello folks,
>
> The attached file caused a crash:
>
> menu@macbookprojm: ~/libmusicxml-git/files/samples/musicxml > lilypond 
> HelloWorld.ly 
> GNU LilyPond 2.19.83
> Processing `HelloWorld.ly'
> Parsing...
> Interpreting music...
> warning: no music found in score
> Preprocessing graphical objects...
> Interpreting music...
> warning: no music found in score
> MIDI output to `HelloWorld.midi'...Segmentation fault: 11 (core dumped)
>
> due to:
>
>   \new Staff = "Part_POne_Staff_One"
>   \with {
>   }
>   <<
>   >>
>
> My wrong, I confess…

The given example does not generate Midi.  An example showing probably
the same kind of crash would be

\score {
  \new Staff {}
  \midi {}
}

Might be worth reporting to the bug list so that it gets tracked.

-- 
David Kastrup
My replies have a tendency to cause friction.  To help mitigating
damage, feel free to forward problematic posts to me adding a subject
like "timeout 1d" (for a suggested timeout of 1 day) or "offensive".


Lily 2.19.83 crashed

2020-02-10 Thread Jacques Menu
Hello folks,

The attached file caused a crash:

menu@macbookprojm: ~/libmusicxml-git/files/samples/musicxml > lilypond 
HelloWorld.ly 
GNU LilyPond 2.19.83
Processing `HelloWorld.ly'
Parsing...
Interpreting music...
warning: no music found in score
Preprocessing graphical objects...
Interpreting music...
warning: no music found in score
MIDI output to `HelloWorld.midi'...Segmentation fault: 11 (core dumped)

due to:

  \new Staff = "Part_POne_Staff_One"
  \with {
  }
  <<
  >>

My wrong, I confess…

JM



HelloWorld.ly
Description: Binary data




Re: Clef "treble_8"

2020-02-10 Thread David Kastrup
Anthony Rushforth  writes:

> Hello,
>
> I'm writing music for classical guitar, so I use the key " \clef "treble_8""
>
> I would like to make the "8" symbol disappear (although I know it's the
> correct way to represent it)
>
> [image: image.png]
>
>
> I guess it can be done with a ClefModifier but I don't know how to use it.

You mean, without a ClefModifier.

\new Staff \with { \omit ClefModifier }
{
  \clef "treble_8"
  1
}

-- 
David Kastrup


Clef "treble_8"

2020-02-10 Thread Anthony Rushforth
Hello,

I'm writing music for classical guitar, so I use the key " \clef "treble_8""

I would like to make the "8" symbol disappear (although I know it's the
correct way to represent it)

[image: image.png]


I guess it can be done with a ClefModifier but I don't know how to use it.

Anthony


Re[2]: OOolilypond Libre Office extension : insert object large as full page

2020-02-10 Thread benbigno...@gmx.de
Hi Dario,


Am 10.02.2020 um 10:17 schrieb Dario Marrini :
Hi Klaus, I found the problem


I don't know why, but the Default.ly in OOoLilyPond-templates directory ,
that's located in my home directory, /home/dario/, had no "\include
lilypond-preamble.ly" line; I think because may be it was coming from prevoius
version of the extension; after deleting every file and directory in my home
referring to OOoLilypond, I removed the extension and I added it again, and
now it works properly.
May be it would have been enough to do restore default templates, but I didn't
think to do it.
That would have been my next suggestion - now that we know that your last test
has been successful.
I'm surprised that the "include..." line was missing in your templates. AFAIK
it is part of the (non-SVG) templates since OLy 0.4.0 which has been released
about ten years ago.


I hope the extension will be useful for you. Some new features are coming
soon.  :)




Cheers,
Klaus


Re: Drawing boxes around grobs

2020-02-10 Thread Aaron Hill

On 2020-02-09 6:54 am, Paolo Prete wrote:
At this point, is there a way to extend the box by setting four 
parameters

separately:

top, bottom, left, right

..., instead of the "padding" one ?
Something like:

 #(make-stencil-boxer 0.1 #paddingLeft #paddingRight #paddingTop
#paddingBottom ly:script-interface::print cyan)


I've probably over-engineered this, but I adapted the CSS model for 
padding [1] so you can specify it with anywhere from one to four values. 
 Additionally, I made it an option whether you want the extents to be 
expanded to contain the new stencil or to preserve the original extents.


[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/padding


\version "2.19.83"

#(define (box-stencil stencil thickness padding color expand?)
  "Add a box around @var{stencil}, producing a new stencil."
  (define (css-style-padding padding)
;; padding => (top right bottom left)
(cond
  ((or (null? padding) (eqv? #f padding)) '(0 0 0 0))
  ((number? padding) (make-list 4 padding))
  ((number-pair? padding)
(list (car padding) (cdr padding)
  (car padding) (cdr padding)))
  ((and (number-list? padding) (<= (length padding) 4))
(case (length padding)
  ((1) (make-list 4 (first padding)))
  ((2) (list (first padding) (second padding)
 (first padding) (second padding)))
  ((3) (list (first padding) (second padding)
 (third padding) (second padding)))
  (else padding)))
  (else
(begin (ly:warning "Ignoring invalid padding: ~a" padding)
   '(0 0 0 0)
  (let* ((padding (css-style-padding padding))
 (padding-top (first padding))
 (padding-right (second padding))
 (padding-bottom (third padding))
 (padding-left (fourth padding))

 (x-ext-orig (ly:stencil-extent stencil X))
 (y-ext-orig (ly:stencil-extent stencil Y))
 (x-ext-inner
   (cons (- (interval-start x-ext-orig) padding-left)
 (+ (interval-end x-ext-orig) padding-right)))
 (y-ext-inner
   (cons (- (interval-start y-ext-orig) padding-bottom)
 (+ (interval-end y-ext-orig) padding-top)))
 (x-ext-outer (interval-widen x-ext-inner thickness))
 (y-ext-outer (interval-widen y-ext-inner thickness))
 (x-ext-new (if expand? x-ext-outer x-ext-orig))
 (y-ext-new (if expand? y-ext-outer y-ext-orig))

 (x-rule (make-filled-box-stencil (cons 0 thickness) 
y-ext-inner))
 (y-rule (make-filled-box-stencil x-ext-outer (cons 0 
thickness)))

 (box (stencil-with-color
   (ly:stencil-add
 (ly:stencil-translate-axis y-rule (interval-end 
y-ext-inner) Y)
 (ly:stencil-translate-axis x-rule (interval-end 
x-ext-inner) X)
 (ly:stencil-translate-axis y-rule (interval-start 
y-ext-outer) Y)
 (ly:stencil-translate-axis x-rule (interval-start 
x-ext-outer) X))

   color)))
(ly:make-stencil
  (ly:stencil-expr (ly:stencil-add stencil box))
  x-ext-new y-ext-new)))

#(define* (make-stencil-boxer thickness padding callback
   #:optional (color red) (expand? #t))
  "Return function that adds a box around the grob passed as argument."
  (lambda (grob)
(box-stencil (callback grob) thickness padding color expand?)))

{
  \override TextScript.stencil =
#(make-stencil-boxer 0.2 '(0.2 1.4 0.6) ly:text-interface::print 
magenta)

  \override Script.stencil =
#(make-stencil-boxer 0.2 '(1.4 1 0.6 0.2) 
ly:script-interface::print)

  \override NoteHead.stencil =
#(make-stencil-boxer 0.2 '(0.6 0.2) ly:note-head::print cyan #f)
c'4^"foo"->
  \override TupletBracket.stencil =
#(make-stencil-boxer 0.4 0 ly:tuplet-bracket::print)
\tuplet 3/2 { b4 4 4 }
}



-- Aaron Hill

Re: Change line-thickness of arpeggio brackets

2020-02-10 Thread Thomas Morley
Am Mo., 10. Feb. 2020 um 11:00 Uhr schrieb :
>
> Hi all,
>
> is it possible to change the line-thickness of the arpeggio-brackets or do I 
> have to recreate this bracket manually if I want to change anything?
>
>
>
> 
>
> \version "2.19.83"
>
>
>
> \relative c' {
>
>   \arpeggioBracket
>
>   4\arpeggio d e f
>
> }
>
> 
>
>
>
> The Arpeggio-Object does not seem to have a thickness setting …
>
>
>
> Thanks in advance
>
>

commit 50ba2171c6a88789ef5ed3673a4c6a4549400113
Author: Thomas Morley 
Date:   Fri Jul 28 23:09:14 2017 +0200

Issue 5168 Let arpeggio-bracket/slur depend on grob-property thickness

Before, used thickness based only on line-thickness from layout.
For brackets it's now the multiplication of line-thickness and grob's
thickness.
Slur-style-arpeggios now rely on grob-properties thickness and
line-thickness, both multiplies with layout line-thickness.
Similiar to real Slurs.

Will likely be available in 2.21.0 or from current master.

For now you'll need to self-compile LilyPond from master or recreate
the stencil.

Cheers,
  Harm



Change line-thickness of arpeggio brackets

2020-02-10 Thread sir.teddy.the.first
Hi all,

is it possible to change the line-thickness of the arpeggio-brackets or do I
have to recreate this bracket manually if I want to change anything?

 



\version "2.19.83"

 

\relative c' {

  \arpeggioBracket

  4\arpeggio d e f

}



 

The Arpeggio-Object does not seem to have a thickness setting .

 

Thanks in advance

 



Re: OOolilypond Libre Office extension : insert object large as full page

2020-02-10 Thread Dario Marrini
Hi Klaus, I found the problem

I don't know why, but the Default.ly in OOoLilyPond-templates directory ,
that's located in my home directory, /home/dario/, had no "\include
lilypond-preamble.ly" line; I think because may be it was coming from
prevoius version of the extension; after deleting every file and directory
in my home referring to OOoLilypond, I removed the extension and I added it
again, and now it works properly.
May be it would have been enough to do restore default templates, but I
didn't think to do it.
Many thanks to all you, I hope  I have made a little contribution to
someone.

Best regards

Dario

Il giorno lun 10 feb 2020 alle ore 10:10 Dario Marrini <
dario.marr...@gmail.com> ha scritto:

> Thanks Klaus, I can cnogirm I get the same results.
> So where do I have to put that \include?
>
> This is the Default.ly tha t I can extract from the .oxt :
> \transpose %{OOoLilyPondCustom1%}c c'%{OOoLilyPondEnd%}
> {
> %{OOoLilyPondCode%}% For getting started read (copy URL into your web
> browser):
> % https://github.com/openlilylib/LO-ly
> % http://lilypond.org/doc/stable/Documentation/learning/simple-notation%
> %
> % Use the "Custom 1" to transpose your music expression. E. g. try "e a'".
>
> \key e \major e8 fis gis e fis8 b,4. | e2\fermata \bar "|."
> %{OOoLilyPondEnd%}
> }
>
> *\include "lilypond-book-preamble.ly "*
> #(set-global-staff-size %{OOoLilyPondStaffSize%}20%{OOoLilyPondEnd%})
>
> \paper {
>   #(define dump-extents #t)
>   ragged-right = ##t
>   line-width = %{OOoLilyPondLineWidth%}17\cm%{OOoLilyPondEnd%}
> }
>
> \layout {
>   indent = #0
>   \context {
> \Score
> \remove "Bar_number_engraver"
>   }
> }
>
> that \include is present here, and if I copy and pas de Default.ly in
> Frescobaldi I get the correct thing (see the .png as attachment); but if I
> simply try to insert the music fragment by using the Default inside
> LibreOffice I get a whole page snippet...
>
> Il giorno lun 10 feb 2020 alle ore 00:07 Klaus Blum 
> ha scritto:
>
>> Hi Dario,
>>
>> Am 09.02.2020 um 22:26 schrieb Dario Marrini:
>> > HI tried to compile Default template in Frescobaldi, it works but I
>> > can't realize if it creates a little picture or a page, because I
>> > can't find where is the resulting .pdf file
>> >
>> on the right side of your screenshot I can see that a whole page is
>> created.
>>
>> Just try this minimal snippet:
>>
>> % --
>> \relative c' {c e g c}
>> \include "lilypond-book-preamble.ly"
>> % --
>>
>> It should create a small image.
>> If you remove or comment out the second line (\include
>> "lilypond-book-preamble.ly"), you get a whole page again.
>>
>> In the screenshots I'll attach the results that I get on my system.
>> There you can also see in the LilyPond output messages (at the bottom
>> left side) that in the version with the preamble there are some more
>> files created (*.tex, *.texi etc.).
>>
>> Can you check if you get similar results?
>> If not, I suspect that there is a problem with your LilyPond
>> installation that is independent from OOoLilyPond. In that case, I could
>> ask here on the mailing list tomorrow if someone with more Linux
>> knowlegde already knows about that problem.
>>
>> Cheers,
>> Klaus
>>
>>
>>
>>


Re: LSR contribution

2020-02-10 Thread Michael Käppler



Hi Harm,


Fine with me, I already updated the LSR-code, for now unapproved.
Please have a look whether all is ok, snippet-description and the like.

Thank you for updating!
Will update the description this evening.
Do you have any idea how to preserve indentation within  blocks?
Inserting   or the like seems hacky, inline-css-styling too...


Probably one suggestion:
How about gving the user some hint or example-message what can be
expected if warnings are triggered or debug-mode is enabled?

Do you mean inside the description or as snippet output?
Btw, do you know a way to dump warning-messages to the graphical output?

Cheers,
Michael