Re: getting ties to NOT avoid accidentals

2015-09-03 Thread Robert Edge
Right now Lilypond moves it so far away that it is unclear to the musician
reading.  I need the explicit accidentals because many of the pieces have
no barlines, and clear is more important to me than pretty.

In your example the first tie(modified) is better notation than the
second(default) for sure.  But I can't be doing it manually like that for
every note.

On Wed, Sep 2, 2015 at 11:23 PM, Andrew Bernard 
wrote:

> Hi Robert,
>
> Well I am cringing.
>
> But does this come closer to what you are after?
>
>
> \version "2.19.26"
>
> {
> \clef bass
> \once \override Tie.staff-position = #-2
> cis1~ cis!1~ cis!1
> }
>
>
> You don’t really want the tie to cross the accidental, do you?
>
> Andrew
>
>
>
>
> On 3/09/2015 12:40, "robert edge"  gmail@gnu.org on behalf of thumbknucklero...@gmail.com> wrote:
>
> >I want all the accidentals to appear and I do not want the tie to be moved
> >really far away like it is now.
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Text centralized above a TextSpan

2015-09-03 Thread Caio Giovaneti de Barros



On 02-09-2015 10:08, Andrew Bernard wrote:


I am not sure how long you may have been following things, but this topic came 
up for me recently, and there is various discussion in the archives.


Yes, I made a search through the list the best I could, but I didn't 
find this (maybe the titles are not so obvious?). Also, the list is just 
too active to follow each topic. I'm just saying this not to give the 
impression I asked without consulting the documentation first



I came up with two half baked solutions, one involving modifying a text 
spanner, another modifying a markup, but neither of these is satisfactory.


Ok, I'll look into the archive to find a solution.


I continue to be amazed how useful such a capability would be, and how many 
people request it. Certainly this sort of thing is all through the contemporary 
music scores I deal with.


Exactly! I, too, am dealing with contemporary music (my compositions), 
maybe that's it.


Thank you for the reply.

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


Re: Help for \beamExceptions

2015-09-03 Thread David Kastrup
Richard Shann  writes:

> On Wed, 2015-09-02 at 20:13 +0200, David Kastrup wrote:
>> 
>> > And there is a comment somewhere about using | to separate
>> something,
>> > I guess bars with the same \time signature (or, indeed different
>> > ones).
>> 
>> No, it's always for exactly one time signature, but at the time it is
>> called, LilyPond has no idea just how long a bar is and can't count it
>> off itself.  So you need to separate rule patterns by |. 
>
> Ah, in that case I need a way of building up the list of beamExceptions,
> so the user can define beaming rules for all the time signature changes
> they use in the score.

There are separate commands for defining time-signature-specific
exceptions rather than the currently active exception list.

>   (make-music
> 'PropertySet
> 'value
> (list (list (quote end) (list 1/8 5 3))
>   (list (quote end) (list 1/8 4 2)))
> 'symbol
> 'beamExceptions))
>
> Which I guess means that this is not creating a beaming rule specific to
> those time signatures - can I augment the alist returned by
> \beamExceptions to make it into a rule specific to the time signature
> concerned? I guess I would know the answer to this if I could find out
> what the alist holds initially, but my feeble attempt to elicit this via
> \void \displayScheme #beamExceptions
> gave me
>
> #>
>
> which is the "music" function rather than the alist - how come these two
> things appear to have the same name?

Convenience.  Just so that you don't need to remember two names.  As a
context property, 'beamExceptions is just a symbol.  You could probably
use something like

\applyContext #(lambda (c) (write
 (ly:context-property c 'beamExceptions)))

to dump the current beamExceptions at any place in the score.

-- 
David Kastrup

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


Re: Help for \beamExceptions

2015-09-03 Thread Richard Shann
On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > On Wed, 2015-09-02 at 20:13 +0200, David Kastrup wrote:
> >> 
> >> > And there is a comment somewhere about using | to separate
> >> something,
> >> > I guess bars with the same \time signature (or, indeed different
> >> > ones).
> >> 
> >> No, it's always for exactly one time signature, but at the time it is
> >> called, LilyPond has no idea just how long a bar is and can't count it
> >> off itself.  So you need to separate rule patterns by |. 
> >
> > Ah, in that case I need a way of building up the list of beamExceptions,
> > so the user can define beaming rules for all the time signature changes
> > they use in the score.
> 
> There are separate commands for defining time-signature-specific
> exceptions rather than the currently active exception list.

I was just experimenting with something along those lines when your
email arrived:

#(override-time-signature-setting '(3 . 8) '())


I was thinking this might revert the 3/8 rules to the default, but I'm
not sure I've got it right yet. I got there from Simon Albrecht pointing
me to

scm/time-signature-settings.scm

reading which I understand default-time-signature-settings is set to an
alist that uses the time signature pair as a key and an alist as value,
in which inner alist one of the keys can be 'beamExceptions.
If this understanding is right, then I should be able to set!
default-time-signature-settings to a new value incorporating the user's
desired beamExceptions value before any \score {} blocks and the new
rules will then apply wherever the user has that time signature. I was
guessing that override-time-signature-setting would allow changing the
"inner" alist of default-time-signature-settings.
Let me know if I'm barking up the wrong tree here!

Richard


> 
> >   (make-music
> > 'PropertySet
> > 'value
> > (list (list (quote end) (list 1/8 5 3))
> >   (list (quote end) (list 1/8 4 2)))
> > 'symbol
> > 'beamExceptions))
> >
> > Which I guess means that this is not creating a beaming rule specific to
> > those time signatures - can I augment the alist returned by
> > \beamExceptions to make it into a rule specific to the time signature
> > concerned? I guess I would know the answer to this if I could find out
> > what the alist holds initially, but my feeble attempt to elicit this via
> > \void \displayScheme #beamExceptions
> > gave me
> >
> > #>
> >
> > which is the "music" function rather than the alist - how come these two
> > things appear to have the same name?
> 
> Convenience.  Just so that you don't need to remember two names.  As a
> context property, 'beamExceptions is just a symbol.  You could probably
> use something like
> 
> \applyContext #(lambda (c) (write
>  (ly:context-property c 'beamExceptions)))
> 
> to dump the current beamExceptions at any place in the score.
> 



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


Re: Help for \beamExceptions

2015-09-03 Thread David Kastrup
Richard Shann  writes:

> On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
>> Richard Shann  writes:
>> 
>> > On Wed, 2015-09-02 at 20:13 +0200, David Kastrup wrote:
>> >> 
>> >> > And there is a comment somewhere about using | to separate
>> >> something,
>> >> > I guess bars with the same \time signature (or, indeed different
>> >> > ones).
>> >> 
>> >> No, it's always for exactly one time signature, but at the time it is
>> >> called, LilyPond has no idea just how long a bar is and can't count it
>> >> off itself.  So you need to separate rule patterns by |. 
>> >
>> > Ah, in that case I need a way of building up the list of beamExceptions,
>> > so the user can define beaming rules for all the time signature changes
>> > they use in the score.
>> 
>> There are separate commands for defining time-signature-specific
>> exceptions rather than the currently active exception list.
>
> I was just experimenting with something along those lines when your
> email arrived:
>
> #(override-time-signature-setting '(3 . 8) '())
>
>
> I was thinking this might revert the 3/8 rules to the default, but I'm
> not sure I've got it right yet. I got there from Simon Albrecht pointing
> me to

Anything wrong with using \overrideTimeSignatureSettings here?  Cf



-- 
David Kastrup

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


Re: Help for \beamExceptions

2015-09-03 Thread Richard Shann
On Thu, 2015-09-03 at 12:59 +0200, David Kastrup wrote:
> Richard Shann  writes:
> 
> > On Thu, 2015-09-03 at 10:54 +0200, David Kastrup wrote:
> >> Richard Shann  writes:
> >> 
> >> > On Wed, 2015-09-02 at 20:13 +0200, David Kastrup wrote:
> >> >> 
> >> >> > And there is a comment somewhere about using | to separate
> >> >> something,
> >> >> > I guess bars with the same \time signature (or, indeed different
> >> >> > ones).
> >> >> 
> >> >> No, it's always for exactly one time signature, but at the time it is
> >> >> called, LilyPond has no idea just how long a bar is and can't count it
> >> >> off itself.  So you need to separate rule patterns by |. 
> >> >
> >> > Ah, in that case I need a way of building up the list of beamExceptions,
> >> > so the user can define beaming rules for all the time signature changes
> >> > they use in the score.
> >> 
> >> There are separate commands for defining time-signature-specific
> >> exceptions rather than the currently active exception list.
> >
> > I was just experimenting with something along those lines when your
> > email arrived:
> >
> > #(override-time-signature-setting '(3 . 8) '())
> >
> >
> > I was thinking this might revert the 3/8 rules to the default, but I'm
> > not sure I've got it right yet. I got there from Simon Albrecht pointing
> > me to
> 
> Anything wrong with using \overrideTimeSignatureSettings here?  Cf
> 


Well, that is the facility currently available in Denemo, but it applies
to a particular instance of a time signature change, the user has to
re-define (or cut and paste) to use it in another part of the score.

I think I have got there with modifying default-time-signature-settings
- now I have:

beamExceptions-three-eight =   \beamExceptions {  e'8[ f'8]a'8 }

#(let ((outer-value #f) (value #f))
   (set! outer-value (assoc-get '(3 . 8) default-time-signature-settings))
   (set! value (assoc-get 'beamExceptions outer-value))
   (set! outer-value (assoc-set! outer-value 'beamExceptions 
beamExceptions-three-eight))
   (set! default-time-signature-settings (assoc-set! 
default-time-signature-settings '(3 . 8) outer-value)))
  
This changes the 3/8 rule to 2 beamed and one un-beamed 1/8 note in the
bar. the beam exceptions can be created by the Denemo user simply by
selecting the music which has been manually beamed and declaring that
this is to be the rule, (or added to the current beamExceptions etc).

I think I am now cooking with gas - thank you very much David and Simon,
and apologies for a slightly off topic thread. 

Richard






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


Fwd: Text centralized above a TextSpan

2015-09-03 Thread David Nalesnik
Sorry...didn't reply all..

-- Forwarded message --
From: David Nalesnik 
Date: Thu, Sep 3, 2015 at 5:51 PM
Subject: Re: Text centralized above a TextSpan
To: Caio Giovaneti de Barros 


Hi Caio

On Thu, Sep 3, 2015 at 2:42 PM, Caio Giovaneti de Barros <
caio.bar...@gmail.com> wrote:

> Hello David!
>
> On 02-09-2015 10:19, David Nalesnik wrote:
>
>>
>> Try this out:
>>
>> http://lists.gnu.org/archive/html/lilypond-user/2013-05/msg00405.html
>>
>>
> This looks ok, but I'm not sure it'll work form me. I need to tweak the
> Spanner a bit to centralize the line height vertically in relation to the
> left and right bounds


A simple thing to do would be to modify mrkp.  Something like this:
 (mrkp
(lambda (x y)
  #{
\markup
\override #`(line-width . ,(+ staff-space y))
\fill-line
\translate #'(0 . -0.5)
$x
  #}))

You could of course calculate the \translate value, though this would be
more involved.


> and also use custom symbols for each bound.


It should be fairly straightforward to adapt the function to work with a
list of markups rather than a string.

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


Re: Profondo: note symbols in TupletBracket

2015-09-03 Thread Thomas Morley
2015-09-02 20:17 GMT+02:00 tisimst :
> David,
>
> On 8/31/2015 5:55 AM, David Stephen Grant [via Lilypond] wrote:
>
> Hi all,
> I'm using Abraham's Profondo font, but having some trouble with
> TupletBrackets.
>
> I would like to indicate the duration of some feathered beamed groups
with a
> TupletBracket showing the total duration. The following simplified code
> works fine with the default font, but the symbol in the first bracket
> doesn't print when I switch to Profondo. I also get the error: warning:
> Found infinity or nan in output. Substituting 0.0
>
> \version "2.19.25"
> \include "profondo.ily"
> {
>   \override TupletBracket.padding = #1.5
>   \override TupletBracket.bracket-visibility = ##t
>
>   \once \override TupletNumber.text = \markup { \note #"4" #UP }
>   \tuplet 5/8 { a'16 a' a' a' a' }
>
>
>   \revert Staff.TupletNumber.font-name
>   \once \override TupletNumber.text = \markup { \note #"4" #UP }
>   \tuplet 5/8 { a'16 a' a' a' a' }
>
>   \override Staff.TupletNumber.font-name = #"ProfondoTupletNumbers"
>   \tuplet 5/8 { a'16 a' a' a' a' }
> }
>
> As most TupletBrackets should be using the Profondo tuplet number font I
> thought about reverting to the default for these brackets, but ideally I
> would prefer not to have to remember to turn Profondo back on afterwards
as
> in the above code.
>
> Any ideas?
>
>
> I've been thinking about this since you first sent it and it is starting
to
> drive me crazy! I've poured over the code that creates the \note stencil
and
> I can't find anything that would cause it to go crazy like this. The only
> font it even refers to is the music font, so I don't know why the \markup
> has a hard time with it. In the example you show (not sure if you are
doing
> anything more complex in the actual score), the \markup doesn't use any
text
> from ProfondoTupletNumbers at all when it draws the \note, so I have to
> assume the error is caused by the \markup command itself, though I haven't
> been able to prove that yet.
>
> One way around this (at least to make it less of a typing hassle) is to
> remove the \override from the \layout block and instead encapsulate it in
> variables so you can use them on-the-fly, like this:
>
> %
>
> profondoTupletNumeralsOn = \override Staff.TupletNumber.font-name =
> #"ProfondoTupletNumbers"
> profondoTupletNumeralsOff = \revert Staff.TupletNumber.font-name
>
> %
>
> It's probably more than you want to do, but this might be the best thing
to
> do for the time being. Do you use the \note function in your tuplet
markings
> a lot?
>
> Best,
> Abraham


Hi,

I did some research on this topic, focusing on \note-by-number, which is
called in \note.

I've found that \note-by-number is _always_ disturbed, if _any_ font-name
is set. But \musicglyph not, for _every_ font-name-setting.

The difference seems to be that \musicglyph clears font-name, setting it to
#f.
\note-by-number does not.

Coding the same in \note-by-number seems to solve the issue. This needs
more testing, though, and _if_ it's the way to go, should be done in
\rest-by-number as well.


Code-examples:

\version "2.19.26"

%% The following _always_ works
%%{
\markup {
  \typewriter #"\\musicglyph #\"noteheads.s0\""
  \musicglyph #"noteheads.s0"
}

\markup {
  \typewriter "\\note #\"8.\" #UP"
  \note #"8." #UP
  \typewriter #"\\note #\"1.\" #UP"
  \note #"1." #UP
}
%}

%% The following _never_ works, regardless which font-name is specified.
%%{
\markup
  \override #'(font-name . "Times New Roman")
  {
  \typewriter #"\\musicglyph #\"noteheads.s0\""
  \musicglyph #"noteheads.s0"
}

\markup
  \override #'(font-name . "Times New Roman")
  {
  \typewriter "\\note #\"8.\" #UP"
  \note #"8." #UP
  \typewriter #"\\note #\"1.\" #UP"
  \note #"1." #UP
}
%}
 And the following bug can be observed (not related to the current
topic,
 I think), was ok with 2.18.2:
%%{
\markup \override #'(font-name . "Times New Roman") "\\<==what?"
%}


Replacing note-by-number in define-markup-commands.scm with the code below
seems to solve the issue (changes between the semicolon-lines) and the
reported problem with other fonts like profondo, etc
Please test.


(define-markup-command (note-by-number layout props log dot-count dir)
  (number? number? number?)
  #:category music
  #:properties ((font-size 0)
(flag-style '())
(style '()))
  "
@cindex notes within text by log and dot-count

Construct a note symbol, with stem and flag.  By using fractional values for
@var{dir}, longer or shorter stems can be obtained.
Supports all note-head-styles.
Supported flag-styles are @code{default}, @code{old-straight-flag},
@code{modern-straight-flag} and @code{flat-flag}.

@lilypond[verbatim,quote]
\\markup {
  \\note-by-number #3 #0 #DOWN
  \\hspace #2
  \\note-by-number #1 #2 #0.8
}
@end lilypond"
  (define (get-glyph-name-candidates dir log style)
(map (lambda (dir-name)
   (format #f "noteheads.~a~a" 

Re: centerPaperColumn

2015-09-03 Thread Víctor
Sorry to hear that. Anyway thank you for trying, I guess I'll have to 
fix them manually.


Regards,
Víctor.

El 31/08/15 a las 08:06, David Nalesnik escribió:



On Mon, Aug 31, 2015 at 7:58 AM, David Nalesnik 
> wrote:


Victor,

On Sun, Aug 30, 2015 at 8:12 PM, Víctor > wrote:

Dear David and lilyponders:

I'm glad to see that you are around here again, so now I
hope it will be not much of a trouble if ask you to take a
look to the aforementioned problem with the ties and centered
notes. For those who don't know what I'm talking about, David
Nalesnik programed a very useful function that centers notes
when they occupy the whole measure. The problem seems to be
that tie's length is not recalculated after the note column
has been moved; and since my scheme-fu is very basic, I just
can't fix this myself.


I'm sorry, but I don't know how to fix this.

The problem lies in the code for determining whether the
PaperColumn to center or ignore is alone in the measure.  This
requires access to other columns in the line, and these are
located through the grob-array 'columns.  Unfortunately, this
array is empty until line breaking has occurred.  By then, it's
too late to do anything about the ties, as far as I know.  If
there were a way to get the previous and adjoining columns before
line breaking, that could possibly fix your problem.  I don't see
a way in Scheme, but I'd welcome being wrong about that.


And you might think 'left-neighbor and 'right-neighbor 
(http://lilypond.org/doc/v2.19/Documentation/internals/spaceable_002dgrob_002dinterface) 
would be exactly what we want.  Works for an override of 
PaperColumn.after-line-breaking but we come up empty for 
'before-line-breaking:


\version "2.19.25"

{
  \override Score.PaperColumn.before-line-breaking =
  #(lambda (grob)
 (let ((left (ly:grob-object grob 'left-neighbor))
   (right (ly:grob-object grob 'right-neighbor)))
   (format #t "left neighbor: ~a right neighbor: ~a~%" left right)))
  c'1
  c'1
}

DN



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