Re: Hairpin.minimum-length gives wrong output

2019-10-30 Thread Thomas Morley-2
ptoye wrote
> What I want is the first quaver sf and the hairpin to finish before the
> next quaver, so that the 3rd quaver is at the same dynamic  as the 2nd
> one.
> 
> Here's a better MWV
> 
> \version "2.19.52"
> \language "english"
> {
>   <<
> \new Staff {
>   \time 2/4
>   \clef "treble"
>   c''8 8 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4\break
>   c''8 8 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4\break
>   c''8 8 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4\break
>   c''8 8 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
> }
> \new Dynamics {
>   s8\sf\> s8\! s4 | s2 2 2 2 2 2 2 2 2 2 2 2
>   s8\sf\> s8\p s4 | s2 2 2 2 2 2 2 2 2 2 2 2
>   \override Hairpin.minimum-length = #10
>   s8\sf\> s8\! s4 | s2 2 2 2 2 2 2 2 2 2 2 2
>   s8\sf\> s8\p s4 | s2 2 2 2 2 2 2 2 2 2
> }
>   >>
> }
> 
> Line 1 has the hairpin too late at both the start and endpoints. Line 2
> has a warning that the hairpin is too small. Line 3 has the end of the
> hairpin too late. Line 4 is fine.

Hi Peter,

I'm having a hard time to shorten your mail to the part I want to reply. 
I'd recommend to use plain text.
Right now I use the nabble-interface, because I failed to do it otherwise.
That's unneeded tedious.

Anyway, single Hairpins (not surrounded by other dynamic signs) should start
at the left of the starting note and end at the right of the target note. If
dynamic signs are present they are centered below their notes and the
Hairpin is printed in between. 
For subsequent Hairpins, end/new-start are printed a little left and right
from the corresponding notehead-center.
This is the typesetting rule as far as I can tell.

See LilyPond doing it:
\paper { ragged-right = ##f }
{ b4\> b\! }
{ b4\> b\> b\! }


Thus I think you're wrong saying
"Line 3 has the end of the hairpin too late."
And even your initial quoted statement is not at the lines of usual
typesetting rules.
The Hairpin _is_positioned correctly, although admittedly it looks terrible.
But this is due to the uneven spacing, not a wrong Hairpin.

Here: "Line 1 has the hairpin too late at both the start and endpoints" I'm
not sure what you want instead for the Hairpin-start, wherelse than after
the sforzato should it start? 
The endpoint is correct either (see above).
Alas, this line looks terrible as well.
By all means, the Hairpin is too short.

Similiar for line 2 of your example.

So, all these three examples look weird because the Hairpin is not long
enough.
This may be a weakness of LilyPond: A spanner doesn't push it's bounds,
unless forced. P.e. with setting minimum-length to a higher value. This is
not done automagically.

Thus line 4 looks best: The Hairpin is lengthened and positioned between the
two dynamic signs, each centerd below their notes. Although the uneven
spacing is still ugly.


So if you really want the Hairpin to end before the target note, you have to
ensure/set two things
(1) Help LilyPond, make the Hairpin long enough, i.e. set minimum-length to
a suitable value.
(2) For further tweaking use shortern-pair 

\paper { ragged-right = ##t }
{ 
\override Hairpin.shorten-pair = #'(0 . 1.5)
\override Hairpin.minimum-length = #10
b4\> b\! 
}


Cheers,
  Harm








--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



Re: Obtain the number of notes and rests from "ly:music?" parameter passed to a function

2018-03-02 Thread Thomas Morley-2
Paolo Prete wrote
> Hello,
> in the snippet below how can I replace "4" (in the denominator of
> "\times") with the number of notes+rests (including "s") in $notes ?
> Thanks
> 
> 
> createTuplet = #(define-music-function (parser location notes)
> (ly:music?)#{  \times 2/4 $notes#})
> {  \createTuplet {c' e' r g'}}

Well, you could do like below, but I can't believe the output is what you
want.

\version "2.18.2"

createTuplet = #(define-music-function (parser location notes) (ly:music?)
#{
  \times 
#(cons 
  2 
  (length (extract-named-music notes '(RestEvent SkipEvent NoteEvent
  $notes
#})

{
  \createTuplet { c'4 e' r g' }
  \createTuplet { c'4 e' r  }
  \createTuplet { c'4 e' r s4 }
  \createTuplet { c'4 e' r s16 s16 s16 s16 }
}

Cheers,
  Harm




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Stem forced to be at the right (or left) of the notehead

2018-03-02 Thread Thomas Morley-2
Paolo Prete wrote
> From what I see, the result of the snippet is that the notehead is moved,
> but the stem remains fixed. Instead, I need that the notehead remains in
> its position and the stem is placed on the right...
> thanks for your help 

For unknown reasons I don't see your posts on the mailing-list, thus
answering through the nabble-interface...

Probably below may do what you want, although I've no clue what you're
trying to achieve.
See the last example, strange, to say the least.

\version "2.19.65"

{
  \override NoteHead.stem-attachment =
#(lambda (grob)
   (let* ((stem-attach (ly:note-head::calc-stem-attachment grob))
  (stem (ly:grob-object grob 'stem))
  (stem-thick (ly:grob-property stem 'thickness))
  (layout (ly:grob-layout grob))
  (line-thick (ly:output-def-lookup layout 'line-thickness))
  (blot (ly:output-def-lookup layout 'blot-diameter))
  (stem-dir (ly:grob-property stem 'direction)))
 (if (and (ly:grob? stem) (< stem-dir 0))
 (cons 
   (- (+ blot (* stem-thick line-thick)) (car stem-attach))
   (- (cdr stem-attach)))
 stem-attach)))
  
  d'2
  g''2
  
  
}


HTH,
  Harm



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Link to "A Complete List of Music Symbols With Their Meaning"

2017-04-03 Thread Thomas Morley-2
This is a test posting via the nabble-interface.

Below the quoted message:


Son_V wrote
> Maybe useful for someone (I hope)
> Should it be multilanguage...
> 
> http://www.buzzle.com/articles/a-complete-list-of-music-symbols-with-their-meaning.html

Here I try to repost the link Son provided by clicking "Link"-button and
inserting it:

http://www.buzzle.com/articles/a-complete-list-of-music-symbols-with-their-meaning.html

  


-Harm



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Link-to-A-Complete-List-of-Music-Symbols-With-Their-Meaning-tp201880p201907.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: Chord Glissando Individual Voice right bound tweaking

2016-03-21 Thread Thomas Morley-2
dtsmarin wrote
> Thank you but the gliss. goes downwards whereas it should go upwards.

The code of my recent post wasn't meant to fix anything.
It is supposed to demonstrate the problem with a small (not even tiny)
code-example.

Though you may have noticed:
(1) Some aspects of the weird output are gone, because I deleted your
fix-attempts.
It would have been nice you inserted a comment like
"I tried

but to no avail"
(2)
It doesn't makes any sense to write
\override NoteColumn.glissando-skip = ##t \hideNotes r \unHideNotes
if you want to skip a column with the glissando.
Just use spacer, they don't cause a NoteColumn.

Furthermore I noticed some bugs, while continuing today on my small example:
https://sourceforge.net/p/testlilyissues/issues/4806/
  
https://sourceforge.net/p/testlilyissues/issues/4807/
  

You could have spotted them yourself, at least with a small/tiny example.
Some work or at least research on them already started.

Without bug-report no fix.

-Harm






--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188756.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: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread Thomas Morley-2
dtsmarin wrote
> The codefile is HUGE and I can't post it due to copyright reasons, so here
> is a part of the code.
> I want each gliss. line to be parallel with the other ones and after the
> break they should continue their normal angle.


dtsmarin wrote
> Ok I was in a real rush next time I'll be more brief. I selected the
> minimum elements so that the code works, do you want only the spot that
> has the problem even if it doesn't work in Lilypond? Sorry for the
> inconvenience.  

Please read the link I posted earlier again.
It's about compilable and minimal code and demonstrating the problem and
only the problem.
Yes this means some additional work and time for you.

Because I'm such nice guy I made your homework for you:

\version "2.19.38"

\layout {
  \context {
\Voice
\override Glissando.breakable = ##t
\override Glissando.after-line-breaking = ##t
  }
}

upper = 
\relative c'' { 
  \time 3/4 
  s2 
  \change Staff = "lower"
  4\glissando 
  \break
  \change Staff = "upper" 
  4
}

\new PianoStaff <<
  \new Staff = "upper" \upper
  \new Staff = "lower" { \clef bass s2. s4 }
>>

Took me 40 min.
In this time I could have worked on your problem.
I suggest you now do the work on my snippet above, I as a volunteer, don't
have time for it anymore.
Kitchen is calling.

-Harm




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188732.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: Chord Glissando Individual Voice right bound tweaking

2016-03-20 Thread Thomas Morley-2
please:
http://www.lilypond.org/website/tiny-examples.html

-Harm



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Chord-Glissando-Individual-Voice-right-bound-tweaking-tp188718p188721.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: AW: A pause in 3/4 measure

2014-10-31 Thread Thomas Morley-2
Dr. Bernhard Kleine wrote
 The following shows my problem: I want to move the rest symbols: 
 \version 2.19.15
 \language deutsch
 global = {
   \key c \major
   \time 3/4
 }
 soprano = \relative c'' {
   \global
   \dynamicUp
   % Die Noten folgen hier.
R2. | d2.\rest | d1\rest | d1\rest |
   } 
 \score {
   
 \soprano

   \layout { }
   \midi {
 \tempo 4=100
   }
 }
  And still have the glyph for full rest.
 
 Bernhard

See:

{
^Whole measure Rests! The glyphs are correct!!
\time 1/16
R16
\time 2/8
R4
\time 3/4
R2.
\time 4/4
R1
-MultiMeasureRests
\compressFullBarRests
R1*7
R1*12
}

{
^Moving MultiMeasureRests up/down
_default \time 1/16 R16 

\override MultiMeasureRest.staff-position = #4
_up \time 1/16 R16 

\override MultiMeasureRest.staff-position = #6
_up \time 1/16 R16 

\override MultiMeasureRest.staff-position = #-4
_down \time 1/16 R16 

\override MultiMeasureRest.staff-position = #-6
_down \time 1/16 R16 
}

{
^Simple, not centered rests, filling a whole measure by accident
\time 1/16
r16
\time 2/8
r4
\time 3/4
r2.
\time 4/4
r1
}

{
^Moving rests up/down
_default \time 1/16 r16 

\override Rest.staff-position = #4
_up \time 1/16 r16 

\override Rest.staff-position = #6
_up \time 1/16 r16 

\override Rest.staff-position = #-4
_down \time 1/16 r16 

\override Rest.staff-position = #-6
_down \time 1/16 r16 
}

-Harm




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/A-pause-in-3-4-measure-tp168136p168184.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: Integrating a markup in a music-function

2014-07-10 Thread Thomas Morley-2
Schneidy wrote
 Hi List,
 
 On the French forum Remy and I (see:
 http://lilypond-french-users.1298960.n2.nabble.com/instrumentName-sur-plusieurs-lignes-dans-une-fonction-tt7581499.html)
 are stucked with a markup function.
 
 Here we are so far :
 
 \version 2.18.2
 
 #(define (general-column align-dir baseline mols)
   (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X
 align-dir)) mols)))
 (stack-lines -1 0.0 baseline aligned-mols)))
 
 #(define-markup-command (textCenter layout props args)(markup-list?)
   #:properties ((baseline-skip))
   (general-column CENTER baseline-skip (wordwrap-internal-markup-list
 layout props #f args)))
 
 shortIncipit =
 #(define-music-function (parser location InstrName ) (markup?)
   #{
 \set Staff.instrumentName = \markup {
 \override #'(line-width . 12)
 #InstrName
   }
   #})
 
 myInst = \markup\textCenter { Cantus primi chori }
 
 \layout {
   indent = 30
 }
 
 { \shortIncipit\myInst c' }
 
 What we would like is to integrate \textCenter in the shortIncipit
 function
 in order to be able to write :
 
 { \shortIncipit #Cantus primi chori c' }
 
 Anyone ?
 
 Cheers,
 Pierre

Hi Pierre,

try:

\version 2.18.2

#(define (general-column align-dir baseline mols)
  (let* ((aligned-mols 
   (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))
  
#(define-markup-command (center-text-string layout props arg)
  (string?)
  #:properties ((baseline-skip)
wordwrap-string-internal-markup-list)
  (general-column CENTER baseline-skip
   (wordwrap-string-internal-markup-list layout props #f arg)))
   
shortIncipit =
#(define-music-function (parser location instr-name ) (markup?)
  #{
\set Staff.instrumentName = 
  \markup {
\override #'(line-width . 12)
\center-text-string #instr-name
  }
  #})

\layout { indent = 30 }

{ \shortIncipit Cantus primi chori c' }


OT: I'm replying via the nabble-interface, because your post didn't appear
in my mails til now. Currently it seems I miss several mails.
Some of them I notice, when they are quoted. 

Others with the same experience?

Cheers,
  Harm




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Integrating-a-markup-in-a-music-function-tp164214p164234.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