Re: Problem with /accepts

2017-04-18 Thread David Kastrup
Thomas Morley  writes:

> 2017-04-17 21:08 GMT+02:00 Roman Stawski :
>> Hello all
>>
>>
>> I'm coming across a problem with context definitions:
>>
>> \layout {
>> \context {
>> \name P
>> \alias Voice
>> }
>>
>> This blows up with the error
>>
>> Interpreting music...ERROR: In procedure symbol->string:
>> ERROR: Wrong type argument in position 1 (expecting symbol): ()
>> Exited with return code 1.
>>
>> If I comment out the '\accepts' compilation finishes, (but ignores the
>> context P obviously).
>
> From: NR 5.1.6 Defining new contexts
>
> "The mechanisms with which contexts communicate are established by declaring
> the context \type. Within a \layout block, most contexts will be of type
> Engraver_group.
> [...]
> Copying and modifying an existing context definition will also fill in
> the type."
>
>
> So (see comments):
>
>
> \layout {
> %% define "P" from scratch
> \context {
> \type "Engraver_group"
> \name P
> \alias Voice
> %% put in engravers for what you want
> %% otherwise no output
> }

Trigger and wording of error message are not overly helpful here.  This
should likely be caught at an earlier point of time.

-- 
David Kastrup

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


Re: Problem with /accepts

2017-04-18 Thread Thomas Morley
2017-04-18 10:55 GMT+02:00 David Kastrup :
> Thomas Morley  writes:
>
>> 2017-04-17 21:08 GMT+02:00 Roman Stawski :
>>> Hello all
>>>
>>>
>>> I'm coming across a problem with context definitions:
>>>
>>> \layout {
>>> \context {
>>> \name P
>>> \alias Voice
>>> }
>>>
>>> This blows up with the error
>>>
>>> Interpreting music...ERROR: In procedure symbol->string:
>>> ERROR: Wrong type argument in position 1 (expecting symbol): ()
>>> Exited with return code 1.
>>>
>>> If I comment out the '\accepts' compilation finishes, (but ignores the
>>> context P obviously).
>>
>> From: NR 5.1.6 Defining new contexts
>>
>> "The mechanisms with which contexts communicate are established by declaring
>> the context \type. Within a \layout block, most contexts will be of type
>> Engraver_group.
>> [...]
>> Copying and modifying an existing context definition will also fill in
>> the type."
>>
>>
>> So (see comments):
>>
>>
>> \layout {
>> %% define "P" from scratch
>> \context {
>> \type "Engraver_group"
>> \name P
>> \alias Voice
>> %% put in engravers for what you want
>> %% otherwise no output
>> }
>
> Trigger and wording of error message are not overly helpful here.  This
> should likely be caught at an earlier point of time.
>
> --
> David Kastrup

Out of curiosity, could you point me to where the current error is triggered?

I've added some debugging code:

(define (print-book-with parser book process-procedure)
  (let* ((paper (ly:parser-lookup parser '$defaultpaper))
 (layout (ly:parser-lookup parser '$defaultlayout))
 (outfile-name (get-outfile-name parser book)))

  (pretty-print
(list
  book
  paper
  (map
(lambda (sym)
 (cons
  (ly:context-def-lookup
 (assoc-get 'P (ly:module->alist
(ly:output-def-scope layout)))
 sym)
  sym))
  (list
'default-child
'consists
'description
'aliases
'accepts
'property-ops
'context-name
'group-type))
  (assoc-get 'P (ly:module->alist (ly:output-def-scope layout)))
  outfile-name))

(process-procedure
  book
  paper
  layout
  outfile-name)))

returning:

(#
 #< Output_def>
 ((() . default-child)
  (() . consists)
  (() . description)
  ((Voice) . aliases)
  (() . accepts)
  (() . property-ops)
  (P . context-name)
  (() . group-type))
 #
 "atest-55")

Though, I don't see symbol->string applied anywhere there.

Cheers,
  Harm

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


Re: placement of tuplet number on broken tuplet

2017-04-18 Thread David Nalesnik
On Mon, Apr 17, 2017 at 8:26 PM, Andrew Bernard
 wrote:
> Hi David,
>
> I am curious about what you say here.
>
> On 18 April 2017 at 02:24, David Nalesnik  wrote:
>>
>>
>> It isn't possible to shift the number within the bracket and have the gap
>> adjust, but you can lengthen the broken bracket:
>>
>
> This is a function I use all the time, and it seems to work for me.
>
> tupletNumberShift =
> #(define-music-function (offset)
>(number?)
>" Move tuplet number across.
>Offset is from left of tuplet bracket.
>"
>#{
>  \once \override TupletNumber.whiteout = ##t
>  \once \override Score.TupletNumber.layer = #3
>  \once \override TupletNumber.X-offset = $offset
>  \once \override TupletNumber.X-extent = #empty-interval
>#})
>
> But this will only work for the first part. Are you actually saying, more
> precisely, that it is not possible to shift the number in the broken part? I
> was just wanting to clarify for anybody referring to this thread in the
> future.


No, I didn't say that.  You can certainly move the number, but the gap
in the bracket will not follow--hence the whiteout in your function.
(The number also will need some vertical adjustment when the bracket
slopes.)

As for independence at line breaks, you could plug your overrides into
the function I gave above,use \alterBroken, or use the framework
suggested at 
http://lilypond.org/doc/v2.19/Documentation/extending/difficult-tweaks.

David

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


Re: placement of tuplet number on broken tuplet

2017-04-18 Thread Andrew Bernard
Hi David,

Thank you for clarifying. This is all good to know.

Interestingly I uniformly set horizontal tuplet brackets so the vertical
offset for slanting brackets never occurred to me in my small utility
function.

Andrew



On 18 April 2017 at 22:33, David Nalesnik  wrote:

>
> No, I didn't say that.  You can certainly move the number, but the gap
> in the bracket will not follow--hence the whiteout in your function.
> (The number also will need some vertical adjustment when the bracket
> slopes.)
>
> As for independence at line breaks, you could plug your overrides into
> the function I gave above,use \alterBroken, or use the framework
> suggested at http://lilypond.org/doc/v2.19/Documentation/extending/
> difficult-tweaks.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problem with /accepts

2017-04-18 Thread David Kastrup
Thomas Morley  writes:

> 2017-04-18 10:55 GMT+02:00 David Kastrup :
>> Thomas Morley  writes:
>>
>>> 2017-04-17 21:08 GMT+02:00 Roman Stawski :
 Hello all


 I'm coming across a problem with context definitions:

 \layout {
 \context {
 \name P
 \alias Voice
 }

 This blows up with the error

 Interpreting music...ERROR: In procedure symbol->string:
 ERROR: Wrong type argument in position 1 (expecting symbol): ()
 Exited with return code 1.

 If I comment out the '\accepts' compilation finishes, (but ignores the
 context P obviously).
>>>
>>> From: NR 5.1.6 Defining new contexts
>>>
>>> "The mechanisms with which contexts communicate are established by declaring
>>> the context \type. Within a \layout block, most contexts will be of type
>>> Engraver_group.
>>> [...]
>>> Copying and modifying an existing context definition will also fill in
>>> the type."
>>>
>>>
>>> So (see comments):
>>>
>>>
>>> \layout {
>>> %% define "P" from scratch
>>> \context {
>>> \type "Engraver_group"
>>> \name P
>>> \alias Voice
>>> %% put in engravers for what you want
>>> %% otherwise no output
>>> }
>>
>> Trigger and wording of error message are not overly helpful here.  This
>> should likely be caught at an earlier point of time.
>>
>> --
>> David Kastrup
>
> Out of curiosity, could you point me to where the current error is triggered?
>
> I've added some debugging code:
>
> (define (print-book-with parser book process-procedure)
>   (let* ((paper (ly:parser-lookup parser '$defaultpaper))
>  (layout (ly:parser-lookup parser '$defaultlayout))
>  (outfile-name (get-outfile-name parser book)))
>
>   (pretty-print
> (list
>   book
>   paper
>   (map
> (lambda (sym)
>  (cons
>   (ly:context-def-lookup
>  (assoc-get 'P (ly:module->alist
> (ly:output-def-scope layout)))
>  sym)
>   sym))
>   (list
> 'default-child
> 'consists
> 'description
> 'aliases
> 'accepts
> 'property-ops
> 'context-name
> 'group-type))
>   (assoc-get 'P (ly:module->alist (ly:output-def-scope layout)))
>   outfile-name))
>
> (process-procedure
>   book
>   paper
>   layout
>   outfile-name)))
>
> returning:
>
> (#
>  #< Output_def>
>  ((() . default-child)
>   (() . consists)
>   (() . description)
>   ((Voice) . aliases)
>   (() . accepts)
>   (() . property-ops)
>   (P . context-name)
>   (() . group-type))
>  #
>  "atest-55")
>
> Though, I don't see symbol->string applied anywhere there.

My guess is lily/context.cc:

void
Context::create_context_from_event (SCM sev)
{
  Stream_event *ev = unsmob (sev);

  string id = ly_scm2string (ev->get_property ("id"));
  SCM ops = ev->get_property ("ops");
  SCM type_scm = ev->get_property ("type");
  string type = ly_symbol2string (type_scm);

It's probably the last line quoted that gives this error.  The "accepts"
stuff is likely a red herring: if a context is not acceptable, it won't
get created in the first place and thus not trigger the error.

-- 
David Kastrup

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


Re: How to enlarge the size of accidentals in a figured bass ?

2017-04-18 Thread Richard Shann
On Thu, 2017-04-13 at 20:48 +0200, Thomas Morley wrote:
> 2017-04-13 19:52 GMT+02:00 Ziad Gholam :
> > Hello,
> >
> >
> >
> > Could someone help with advice about :
> >
> > How to enlarge the size of accidentals in a figured bass ?
> > ... Either leaving the size of the numbers unchanged or not ...
> >
> > (version used = 2.18.2)
> >
> >
> > Thanks you &
> > R
> > egards,
> >
> >
> > Ziad R. GHOLAM
> 
> 
> Hi,
> 
> figured bass is fomated by the context-property `figuredBassFormatter'
> which is set per default to the procedure `format-bass-figure'.
> 
> There is no single property to affect fontsize of accidentals only, afaik.
> 
> Though you could c/p the definition from translation-functions.scm
> into your ly-file, change it to fit your needs and let LilyPond use
> it.
> Below I did exactly that, giving accidentals a far too huge fontsize
> (just to make it obvious).
> 
> 
> #(define-public (format-bass-figures figure event context)
>   (let* ((fig (ly:event-property event 'figure))
>  (fig-markup (if (number? figure)
> 
>  ;; this is not very elegant, but center-aligning
>  ;; all digits is problematic with other markups,
>  ;; and shows problems in the (lack of) overshoot
>  ;; of feta-alphabet glyphs.
>  ((if (<= 10 figure)
>   (lambda (y) (make-translate-scaled-markup
>(cons -0.7 0) y))
>   identity)
> 
>   (cond
>((eq? #t (ly:event-property event 'diminished))
> (markup #:slashed-digit figure))
>((eq? #t (ly:event-property event 
> 'augmented-slash))
> (markup #:backslashed-digit figure))
>(else (markup #:number (number->string figure 
> 10)
>  #f))
> 
>  (alt (ly:event-property event 'alteration))
>  (alt-markup
>   (if (number? alt)
>   (markup
>#:general-align Y DOWN #:fontsize
> ;; !
>(if (not (= alt DOUBLE-SHARP))
>;-2 2 :; is the default
>4 4 ;; changed
>  )
> ;; !


I've been long wanting to tweak the size of the accidentals in the
figured bass and not got round to looking at it. This code you have
pointed to has given me a start. I noticed that simply changing the font
size of the accidental leads to knock-on effects with the figure
placement. What I find undesirable in the current default is the size of
lone accidentals (those indicating a third) and also the heights of the
sharp and flat when they precede a number - sharp too high, flat too
low. I have come up with the following version which fixes these two
problems:

8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><8><
#(define-public (format-bass-figures figure event context)
  (let* ((fig (ly:event-property event 'figure))
 (fig-markup (if (number? figure)

 ;; this is not very elegant, but center-aligning
 ;; all digits is problematic with other markups,
 ;; and shows problems in the (lack of) overshoot
 ;; of feta-alphabet glyphs.
 ((if (<= 10 figure)
  (lambda (y) (make-translate-scaled-markup
   (cons -0.7 0) y))
  identity)

  (cond
   ((eq? #t (ly:event-property event 'diminished))
(markup #:slashed-digit figure))
   ((eq? #t (ly:event-property event 'augmented-slash))
(markup #:backslashed-digit figure))
   (else (markup #:number (number->string figure 10)
 #f))

 (alt (ly:event-property event 'alteration))
 (alt-markup
  (if (number? alt)
  (markup
   #:general-align Y DOWN #:fontsize
   (if (not (= alt DOUBLE-SHARP))
   ;-2 2 ;; is the default
(if (not fig-markup) 0 -2) 4 ;; changed
 )
   (alteration->text-accidental-markup alt))
  #f))

 (plus-markup (if (eq? #t (ly:event-property event 'augmented))
  (markup #:number \"+\")
  #f))

 (alt-dir (ly:context-property context 'figuredBassAlterationDirection))
 (plus-dir (ly:context-property context 'figuredBassPlusDirection)))

(if (and (not fig-markup) alt-markup)
(begi

Suitable (file) format for "package manifest"

2017-04-18 Thread Urs Liska
Hi all,

I'm thinking about improving openLilyLib and making it more accessible
to arbitrary package handling approaches by requiring a manifest file to
be included in a package.

So far there is *some* solution with a \declarePackage \with { }
LilyPond command (as you can see in
https://github.com/openlilylib/snippets/blob/master/ly/scholarly/__init__.ily)
but actually I'd rather have a solution with a dedicated file for that.

So I'm looking for a suitable config file format that is equally simple
to read from LIlyPond and from other languages (e.g. Python or Node.js).
The obvious choice seems to be JSON with a package.json, but Guile
doesn't have proper JSON support yet (only with a module that is not
included by default).

Of course I could invent a format with sections/labels and a key-value
syntax which can easily be parsed with arbitrary languages, or I could
use a "bare" Scheme expression in such a file and require other
languages to parse that. But I'd prefer using something more mainstream
with existing solutions and support in different languages (like e.g.
JSON or YAML).

Any suggestions what would be a promising approach?

TIA
Urs


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


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


Re: How to enlarge the size of accidentals in a figured bass ?

2017-04-18 Thread Richard Shann
On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote:
> ;; hmm, how to get figures centered between note, and
> ;; lone accidentals too?
> 
>  ; (if (markup? fig-markup)
>  ;  (set!
>  ;  fig-markup (markup #:translate (cons 1.0 0)
>  ; #:center-align fig-markup)))

This part of the code is commented out like this in
translation-functions.scm, but I tried it out, and it improves the
centering over whole-notes but makes it worse over other notes.

I see that  (ly:event-property event 'duration) gives the duration of
the note that the bass figure is on as:

#

for a whole note.

so if I could test that I could use that code for this case (and the 1.
case). But here my understanding of Guile's display syntax runs out ...
what sort of a type is ly:event-property returning, and how do I test
for particular values?

Richard



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


Re: Suitable (file) format for "package manifest"

2017-04-18 Thread Andrew Bernard
Hi Urs,

I would go with YAML myself. Inventing a new wheel for this is can never be
a good idea.

There are many Python YAML implementations.

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


Re: Suitable (file) format for "package manifest"

2017-04-18 Thread Urs Liska


Am 18.04.2017 um 16:46 schrieb Andrew Bernard:
> Hi Urs,
>
> I would go with YAML myself. Inventing a new wheel for this is can
> never be a good idea.
>

This is why I wrote this post ...

> There are many Python YAML implementations.

I'm sure about that.

Is there any support for YAML in Guile (or any other Scheme dialect)?
OK, parsing YAML should be feasible in Scheme ;-) but as you said at the
top ...

Best
Urs

>
> Andrew

-- 
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: How to enlarge the size of accidentals in a figured bass ?

2017-04-18 Thread David Nalesnik
On Tue, Apr 18, 2017 at 9:25 AM, Richard Shann  wrote:
> On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote:
>> ;; hmm, how to get figures centered between note, and
>> ;; lone accidentals too?
>>
>>  ; (if (markup? fig-markup)
>>  ;  (set!
>>  ;  fig-markup (markup #:translate (cons 1.0 0)
>>  ; #:center-align fig-markup)))
>
> This part of the code is commented out like this in
> translation-functions.scm, but I tried it out, and it improves the
> centering over whole-notes but makes it worse over other notes.
>
> I see that  (ly:event-property event 'duration) gives the duration of
> the note that the bass figure is on as:
>
> #
>
> for a whole note.
>
> so if I could test that I could use that code for this case (and the 1.
> case). But here my understanding of Guile's display syntax runs out ...
> what sort of a type is ly:event-property returning, and how do I test
> for particular values?
>


It's a Duration object.

Why not:

(if (and (markup? fig-markup)
(eqv? 0 (ly:duration-log (ly:event-property event 'duration
(set!
   fig-markup (markup #:translate (cons 1.0 0)
   #:center-align fig-markup)))

BTW, your snippet above won't compile because of the following:

 (plus-markup (if (eq? #t (ly:event-property event 'augmented))
  (markup #:number \"+\")
  #f))

Why are you trying to escape the quotation marks here?

Hope this helps--

David

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


Problem with \slashedGrace and \partial

2017-04-18 Thread Pieter Terpstra
Dear Readers,
Have some issues here.

Stem goes down here (even if i try a \stemUp) and get double crosses and time 
signature.

What goes wrong here?

Thank you again so much!

Peter

score:
\version "2.18.2"

global = {
  \key a \major
  %\defaultTimeSignature
  \time 2/4
}

CGVoiceOne = \relative c' {
  \global
  \partial 8 \slashedGrace fis8 e16. dis32\p |
  e8 a a \slashedGrace fis8 e16. dis 32 |
}
CGVoiceTwo = \relative c {
  \global
  \partial 8 r8 |
  r a [a] r | 
}
\score {
   \new Staff \with {
midiInstrument = "acoustic guitar (nylon)"
  } { \clef "treble_8" << \CGVoiceOne
  \\ \CGVoiceTwo >>
}}


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


Re: Problem with \slashedGrace and \partial

2017-04-18 Thread Federico Bruni

Dear Pieter

You've just hit the famous "grace syncronization" bug:
https://sourceforge.net/p/testlilyissues/issues/34/


Il giorno mar 18 apr 2017 alle 17:51, Pieter Terpstra 
 ha scritto:

Dear Readers,
Have some issues here.

Stem goes down here (even if i try a \stemUp) and get double crosses 
and time signature.


What goes wrong here?

Thank you again so much!

Peter

score:
\version "2.18.2"

global = {
  \key a \major
  %\defaultTimeSignature
  \time 2/4
}

CGVoiceOne = \relative c' {
  \global
  \partial 8 \slashedGrace fis8 e16. dis32\p |
  e8 a a \slashedGrace fis8 e16. dis 32 |
}
CGVoiceTwo = \relative c {
  \global
  \partial 8 r8 |


above bar should be rewritten as:

\partial 8 \hideNotes \grace s8 \unHideNotes r8


  r a [a] r |
}
\score {
   \new Staff \with {
midiInstrument = "acoustic guitar (nylon)"
  } { \clef "treble_8" << \CGVoiceOne
  \\ \CGVoiceTwo >>
}}


___
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: Problem with \slashedGrace and \partial

2017-04-18 Thread Thomas Morley
2017-04-18 17:51 GMT+02:00 Pieter Terpstra :
> Dear Readers,
> Have some issues here.
>
> Stem goes down here (even if i try a \stemUp)

This is a bug with 2.18.2, already cured in devel-versions.

> and get double crosses and time signature.

This is issue 34.

> What goes wrong here?
>
> Thank you again so much!
>
> Peter
>
> score:
> \version "2.18.2"
>
> global = {
>   \key a \major
>   %\defaultTimeSignature
>   \time 2/4
> }
>
> CGVoiceOne = \relative c' {
>   \global
>   \partial 8 \slashedGrace fis8 e16. dis32\p |
>   e8 a a \slashedGrace fis8 e16. dis 32 |
> }
> CGVoiceTwo = \relative c {
>   \global
>   \partial 8

%% to cure issue 34 add:
  \grace s8
%% for more see NR

> r8 |
>   r a [a] r |
> }
> \score {
>\new Staff \with {
> midiInstrument = "acoustic guitar (nylon)"
>   } { \clef "treble_8" << \CGVoiceOne
>   \\ \CGVoiceTwo >>
> }}



I'd recommend to upgrade to a recent devel-version.
For 2.18.2 you may try:

global = {
  \clef "treble_8"
  \key a \major
  \time 2/4
}

CGVoiceOne =
\new Voice \with { \voiceOne }
  \relative c' {
\global
\partial 8 \slashedGrace fis8 e16. dis32\p |
e8 a a \slashedGrace fis8 e16. dis 32 |
  }
CGVoiceTwo =
\new Voice \with { \voiceTwo }
  \relative c {
\global
\partial 8 \grace s8 r8 |
r a [a] r |
  }
\score {
  \new Staff \with { midiInstrument = "acoustic guitar (nylon)" }
  << \CGVoiceOne \CGVoiceTwo >>
}


HTH,
  Harm

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


Re: Problem with /accepts

2017-04-18 Thread Thomas Morley
2017-04-18 15:45 GMT+02:00 David Kastrup :
> Thomas Morley  writes:

>> Out of curiosity, could you point me to where the current error is triggered?

>
> My guess is lily/context.cc:
>
> void
> Context::create_context_from_event (SCM sev)
> {
>   Stream_event *ev = unsmob (sev);
>
>   string id = ly_scm2string (ev->get_property ("id"));
>   SCM ops = ev->get_property ("ops");
>   SCM type_scm = ev->get_property ("type");
>   string type = ly_symbol2string (type_scm);
>
> It's probably the last line quoted that gives this error.  The "accepts"
> stuff is likely a red herring: if a context is not acceptable, it won't
> get created in the first place and thus not trigger the error.
>
> --
> David Kastrup

Thanks for the info,
  Harm

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


Re: Problem with \slashedGrace and \partial

2017-04-18 Thread David Wright
On Tue 18 Apr 2017 at 08:51:57 (-0700), Pieter Terpstra wrote:
> Dear Readers,
> Have some issues here.
> 
> Stem goes down here (even if i try a \stemUp) and get double crosses and time 
> signature.
> 
> What goes wrong here?

Try adding   \slashedGrace s8   to the lower voice.
(You could also place a single   \partial 8   in your
global variable, and remove the others.)

Cheers,
David.

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


Re: Specify output directory *in* the file

2017-04-18 Thread Patrick Hubers

Op 5-4-2017 om 11:32 schreef Malte Meyn:

is it possible to specify an output directory from within the LilyPond
file without going through the hoops of ly:book-process?

How about \bookOutputName? This works with absolute paths like

   \bookOutputName "/home/malte/foo" (output to /home/malte/foo.pdf)

and with relative paths too. You don’t need an explicit \book {} block.
I would love to use this solution, but it means that you also have to 
define the actual name of the *file* in addition to the directory. Is 
there a way to derive the filename from the title and use that? I found 
that using


  \bookOutputName \concat { "/home/foo/" \fromproperty #'header:title }

does not work...

Thanks for any pointers.

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


Page frames/watermarks

2017-04-18 Thread Psalle

Hello all,

I was wondering how to add a decorative frame to a score within 
lilypond, which led me to search too for absolute-positioned images in 
the way of a watermark, but found nothing relevant. I'm aware of 
\epsfile but in my experience it works inline.


Is there some advanced trickery to achieve this? Thanks in advance for 
any pointers.



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


Re: Page frames/watermarks

2017-04-18 Thread David Wright
On Tue 18 Apr 2017 at 19:56:08 (+0200), Psalle wrote:
> Hello all,
> 
> I was wondering how to add a decorative frame to a score within
> lilypond, which led me to search too for absolute-positioned images
> in the way of a watermark, but found nothing relevant. I'm aware of
> \epsfile but in my experience it works inline.
> 
> Is there some advanced trickery to achieve this? Thanks in advance
> for any pointers.

Thread starting at
http://lists.gnu.org/archive/html/lilypond-user/2017-04/msg00135.html

Cheers,
David.

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


What does everyone want? (1)

2017-04-18 Thread Mirosław Doroszewski
It is surprising to know something about people who do something
without money. It is amazing to find out about people who do something
with middle effect for 18 years, not
being discouraged, permanently busy. So someone can suppose that these
people are poor: with money for necessary things only.

Anyone can find out about free music notation software, like Musescore
or LilyPond. Both the software are made exactly for 18 years.
Musescore is WYSIWYG software for anyone, and LilyPond is typesetter
like TeX for specialists.

And what it is amazing or surprising? Both the software, 18 years old,
are in version just 2. It is unusual.

Everybody know that in the world are people: miserable (who have not
anything), poor (who have necessary things only) and rich (who have a
lot of money).

So somebody can suppose that doing something for many years, using
necessary things only, is a big challenge for brave people who plan to
reach one's aim. Why using necessary things only? It is simple:
Because making something for many years with middle, not big effect.

So somebody can think, from where is the courage of people who judge
or make something for many years or even centuries, like Church with
true only conception of Life, or false other world outlooks.

So somebody can think that people who do something for many years,
maybe are not poor with necessary things only. Even Linux, which was
for many years rather for programmers
and for poor people, with necessary money only, i.e. for computer 32
Megabytes system memory — now is for only people with money, for i.e.
2000 Megabytes memory.

So somebody can ask:
1) Why it happens? Why some people do something for many years, even
with not big effect, to give the service or product for other people,
without wanting any payment?
2) Why some people was doing something for many years for everyone,
like rich specialist and poor people who have not money for big
computer system memory — and now
require poor people to become a rich to get non-necessary things, like
just big computer system memory.
3) Why poor people who have computers for 20 years, with small memory,
and can use it for their work — have to throw out efficient and
properly working their computers with non-requiring Linux?

Somebody can think that people who was doing something for many years,
who now require the poor people to become a rich — maybe help these
people who do something for 18 years, like Musescore or LilyPond with
version only 2, which is usually middle effect.

Any people who study physics can calculate that all world for bulbs
(=electric lights), always turned on in computers and computer
peripherals, even loud-speakers — pays about
100,000,000,000 dollars or euro every month. Who thinks about it? Who
expects this? What sound is going to do with light, which is not
needed to listen?

Some programmer has told that he gets about 17$ per hour.

Some computer service has told that Linux has many bugs and Microsoft
Windows is necessary to be installed.

So any people who learns maths can calculate that in a 5 years
programmers can make about 557,000 softwares for many people:
miserable (who have not anything), poor (who have
necessary things only) and rich (who have a lot of money).

So somebody can think: "Who needs as many as 557,000 softwares?" — and
conclude that: miserable people who have not anything, their home,
live in the streets, and free computer
operating systems users, like Linux, all of them could have got free
of charge computers with free of charge operating systems, such fine
and proper like Microsoft Windows which is only for rich people.



Conclusions:

1) If all world would not pay about 100,000,000,000 dollars or euro
every month for unnecessary little lights, homeless people who lives
in the streets and beggars who begs to get little money to eat
something — would live in fine their homes and even get married, or
learn to be priests in some spiritual seminaries which takes
non-little money as a high schools.

2) MuseScore or LilyPond would be in version 2 a long time ago.

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


What does everyone want? (2)

2017-04-18 Thread Mirosław Doroszewski
Jesus, who is God without beginning, who is good, true, beautiful, who
is merciful and justice, who is Life — have not made cross.

People, who do not believe that are good, true, beautiful, that are
merciful and justice, they do not believe that are gods with
beginning, and because of this believe that

are death, make themselves and others suffering or died, make just
cross, always for Jesus and his Mother.

So let us not to be bad that came some Jesus and wants us to suffer.
He knows that we, people, do not and will not believe that we are gods
with beginning. He knows that we,

people, do not and will not believe that we are good, true, beautiful.
He knows that we, people, do not and will not believe that we are
merciful and justice. He knows that

we, people, do not and will not believe that we are Life with beginning.

Who do not believe that is good, true, beautiful, that is merciful and
justice, that is the Life — believe that is bad, false, ugly, unjust,
merciless, that is death, making

cross, for others, especially for Jesus and his Mother.

So let us not to be bad that came some Jesus and separates bad from
Good, separates false from Truth, separates ugliness from Beauty,
separates death from Life.
So let us not to be bad that came some Jesus and judges that bad
cannot be Good, judges that false cannot be True, judges that ugly
cannot be Beauty, judges that death cannot

be Life.

So let us believe that God without beginning, all-knowing, all-able —
wants gods with beginning to be all-believing, to be all-able.

If god with beginning all believes, everything is possible for him, for her.
Everything is: good, truth, beauty, mercy, justice, Life.

If god with beginning something believes, something only is possible.
Something is: small good, small truth, small beauty, small mercy, small justice.

If god with beginning nothing believes, anything is not possible.
Nothing is: bad, false, ugly, merciless, unjust, death.

And why rules to be written and to be done?
Because there are or there have to be many gods with beginning,
all-believing, all-able.
These rules are Will of God without beginning.

And why God without beginning tries gods with beginning?
Because God without beginning tells:
"Gods with beginning, if you want to leave Me, I will let you do this,
because I am not master of puppets. You all gods with beginning tells:
"...And justice for all", so do

not be bad that I, God without beginning, punish death, satisfying
your desire, with tortures without end, because who likes death, likes
tortures without end. You all gods

with beginning tells: "I do not want be against" — so do not be
against Me and crucify Me again. Everything is not nothing. Life is
not death. If you left Me, as long as you

moving, you can become the Life using my Mercy, although you crucified
Me again".



Conclusions:

1) Ugh, this linker: he thinks that world will be happy, when
disappear in every minds any thought about bad.

2) Ugh, this linker: he thinks anything is good, but is finding bad everywhere.

3) And mercy for all, whoever wants...

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


Re: Specify output directory *in* the file

2017-04-18 Thread Jeffery Shivers
On Tue, Apr 18, 2017 at 12:57 PM, Patrick Hubers  wrote:
>
> I would love to use this solution, but it means that you also have to define
> the actual name of the *file* in addition to the directory. Is there a way
> to derive the filename from the title and use that? I found that using
>
>   \bookOutputName \concat { "/home/foo/" \fromproperty #'header:title }
>
> does not work...

Couldn't one do this in scheme alone?

I don't know how to retrieve bookOutputName after it is set, but maybe
setting it independently like:

#(define mytitle "mytitle")

\book {
  \header {
title = #mytitle
  }
  \bookOutputName #(string-append "sub/" mytitle)
  \score {
c'4
  }
}

But if there is a way to use fromproperty in scheme, I can't figure it out.

-- 

Jeffery Shivers
 jefferyshivers.com
 soundcloud.com/jefferyshivers

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


Re: Specify output directory *in* the file

2017-04-18 Thread Thomas Morley
2017-04-18 20:34 GMT+02:00 Jeffery Shivers :
> On Tue, Apr 18, 2017 at 12:57 PM, Patrick Hubers  wrote:
>>
>> I would love to use this solution, but it means that you also have to define
>> the actual name of the *file* in addition to the directory. Is there a way
>> to derive the filename from the title and use that? I found that using
>>
>>   \bookOutputName \concat { "/home/foo/" \fromproperty #'header:title }
>>
>> does not work...
>
> Couldn't one do this in scheme alone?
>
> I don't know how to retrieve bookOutputName after it is set, but maybe
> setting it independently like:
>
> #(define mytitle "mytitle")
>
> \book {
>   \header {
> title = #mytitle
>   }
>   \bookOutputName #(string-append "sub/" mytitle)
>   \score {
> c'4
>   }
> }
>
> But if there is a way to use fromproperty in scheme, I can't figure it out.
>
> --
>
> Jeffery Shivers
>  jefferyshivers.com
>  soundcloud.com/jefferyshivers



Not sure if it'll help, here some methods to retrieve values:

\header {
  title = "My first title"
  secondtitle = "My second title"
}

\bookOutputName "my-out"

#(format #t
  "\nBindings in the header-module:\n~y"
  (ly:module->alist $defaultheader))

#(format #t
  "\ntitle from header-module, if not found fallback is used: \"~a\"\n"
  (assoc-get 'title (ly:module->alist $defaultheader)
  "fall-back-value"))

#(format #t
  "\nsecondtitle from header-module, if not found fallback is used: \"~a\"\n"
  (assoc-get 'secondtitle (ly:module->alist $defaultheader)
  "second-fall-back-value"))

#(format #t
  "\nthirdtitle from header-module, if not found fallback is used: \"~a\"\n"
  (assoc-get 'thirdtitle (ly:module->alist $defaultheader)
  "third-fall-back-value"))

#(format #t
  "\nCurrent output-filename: \"~a\"\n"
  (paper-variable (ly:parser-lookup '$current-book) 'output-filename))

#(format #t
  "\nCurrent filename: \"~a.ly\"\n"
  (ly:parser-output-name))


HTH,
  Harm

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


Re: Specify output directory *in* the file

2017-04-18 Thread Urs Liska


Am 18. April 2017 20:34:40 MESZ schrieb Jeffery Shivers 
:
>On Tue, Apr 18, 2017 at 12:57 PM, Patrick Hubers 
>wrote:
>>
>> I would love to use this solution, but it means that you also have to
>define
>> the actual name of the *file* in addition to the directory. Is there
>a way
>> to derive the filename from the title and use that? I found that
>using
>>
>>   \bookOutputName \concat { "/home/foo/" \fromproperty #'header:title
>}
>>
>> does not work...
>
>Couldn't one do this in scheme alone?
>
>I don't know how to retrieve bookOutputName after it is set, but maybe
>setting it independently like:
>
>#(define mytitle "mytitle")
>
>\book {
>  \header {
>title = #mytitle
>  }
>  \bookOutputName #(string-append "sub/" mytitle)
>  \score {
>c'4
>  }
>}
>
>But if there is a way to use fromproperty in scheme, I can't figure it
>out.

I'm not at my computer right now but I think \fromproperty is a markup-only 
thing. So try wrapping everything kn \markup { }

HTH
Urs

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


Re: Problem with \slashedGrace and \partial

2017-04-18 Thread Pieter Terpstra
Federico Bruni wrote:

> You've just hit the famous "grace syncronization" bug:
> https://sourceforge.net/p/testlilyissues/issues/34/

Oh, thank you!

Peter 



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


Re: Specify output directory *in* the file

2017-04-18 Thread Patrick Hubers

Op 18-4-2017 om 21:28 schreef Thomas Morley:

Not sure if it'll help, here some methods to retrieve values:

[...]
#(format #t
   "\nCurrent filename: \"~a.ly\"\n"
   (ly:parser-output-name))


HTH,
   Harm


This is great, because I found that I actually preferred to use the 
original file name. I'm using a template that produces C, B-flat and 
E-flat versions from a single lead sheet in C, so now I'm using:


\bookOutputName $(string-append "E-flat/" (ly:parser-output-name))
\bookOutputSuffix "Eb"

(and similar for the B-flat version) to store the transposed versions in 
their own directories.


Many thanks!

Regards, Patrick

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


Re: Problem with \slashedGrace and \partial

2017-04-18 Thread Pieter Terpstra
Thomas Morley wrote:

> HTH,
> Harm
> 

Works, thank you so much!

Peter


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


Re: Specify output directory *in* the file

2017-04-18 Thread Timothy Lanfear

On 18/04/17 20:28, Thomas Morley wrote:


#(format #t
   "\nCurrent output-filename: \"~a\"\n"
   (paper-variable (ly:parser-lookup '$current-book) 'output-filename))




This example of ly:parser-lookup was the clue I needed to figure out how 
to read fields in a book's header.


\version "2.19.59"

#(define (booktitle)
  (let* ((mybook   (ly:parser-lookup '$current-book))
 (myheader (ly:book-header mybook)))
(module-ref myheader 'title)))

\book {
  \header { title = "MyPiece" }
  \bookOutputName #(string-join (list (getcwd) (booktitle)) "/")
  \score { c''1 }
}

--
Timothy Lanfear, Bristol, UK.


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


Re: How to enlarge the size of accidentals in a figured bass ?

2017-04-18 Thread David Kastrup
Richard Shann  writes:

> On Tue, 2017-04-18 at 10:04 -0500, David Nalesnik wrote:
>> On Tue, Apr 18, 2017 at 9:25 AM, Richard Shann  
>> wrote:
>> > On Tue, 2017-04-18 at 14:47 +0100, Richard Shann wrote:
>> >> ;; hmm, how to get figures centered between note, and
>> >> ;; lone accidentals too?
>> >>
>> >>  ; (if (markup? fig-markup)
>> >>  ;  (set!
>> >>  ;  fig-markup (markup #:translate (cons 1.0 0)
>> >>  ; #:center-align fig-markup)))
>> >
>> > This part of the code is commented out like this in
>> > translation-functions.scm, but I tried it out, and it improves the
>> > centering over whole-notes but makes it worse over other notes.
>> >
>> > I see that  (ly:event-property event 'duration) gives the duration of
>> > the note that the bass figure is on as:
>> >
>> > #
>> >
>> > for a whole note.
>> >
>> > so if I could test that I could use that code for this case (and the 1.
>> > case). But here my understanding of Guile's display syntax runs out ...
>> > what sort of a type is ly:event-property returning, and how do I test
>> > for particular values?
>> >
>> 
>> 
>> It's a Duration object.
>
> Hmm, that's the LilyPond type, but I'm still curious as to what Scheme
> type it is that displays using #< ...>
> I've been combing the Guile manual and thought for a moment it was a
> vector, but no, no that.

None.  It is a user-defined type, and a user-defined print form which
Guile cannot read back in (at least currently).

-- 
David Kastrup

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


RE: Suitable (file) format for "package manifest"

2017-04-18 Thread Andrew Bernard
Hi Urs,

Racket has a YAML module ported from Python. Also refer to SO:

http://stackoverflow.com/questions/31927706/how-do-you-parse-yaml-with-scheme

Andrew


-Original Message-
From: Urs Liska [mailto:u...@openlilylib.org] 
Sent: Wednesday, 19 April 2017 12:49 AM

Is there any support for YAML in Guile (or any other Scheme dialect)?
OK, parsing YAML should be feasible in Scheme ;-) but as you said at the top ...



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


RE: What does everyone want? (2)

2017-04-18 Thread Andrew Bernard
Hello Miroslaw,

Welcome to the lilypond community.

Allow me to say that it is unusual to take up peoples' time with theological or 
religious topics on this forum, interesting though they may be. The principal 
purpose of the list is for discussion of technical matters related to engraving 
with lilypond. If you are seeking discussion, there are thousands of outlets 
for your topics on the internet. Here is not really the right place. No 
moderator will bar you from here, but pretty soon I imagine people will filer 
you out, so any legitimate lilypond questions you have will become invisible.

As a comment on your post, you should realise that it is a very longstanding 
tradition that open source projects are very modest in numbering releases, 
compared to commercial companies, and it is not at all surprising that lilypond 
should be at major release 2 after a considerable period of time.

Andrew




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


RE: What does everyone want? (2)

2017-04-18 Thread Mark Stephen Mrotek
Andrew,

Well spoken.

Mark

-Original Message-
From: lilypond-user
[mailto:lilypond-user-bounces+carsonmark=ca.rr@gnu.org] On Behalf Of
Andrew Bernard
Sent: Tuesday, April 18, 2017 8:01 PM
To: 'Mirosław Doroszewski' ;
lilypond-user@gnu.org
Subject: RE: What does everyone want? (2)

Hello Miroslaw,

Welcome to the lilypond community.

Allow me to say that it is unusual to take up peoples' time with theological
or religious topics on this forum, interesting though they may be. The
principal purpose of the list is for discussion of technical matters related
to engraving with lilypond. If you are seeking discussion, there are
thousands of outlets for your topics on the internet. Here is not really the
right place. No moderator will bar you from here, but pretty soon I imagine
people will filer you out, so any legitimate lilypond questions you have
will become invisible.

As a comment on your post, you should realise that it is a very longstanding
tradition that open source projects are very modest in numbering releases,
compared to commercial companies, and it is not at all surprising that
lilypond should be at major release 2 after a considerable period of time.

Andrew




___
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