Re: transpose several key signature

2018-05-30 Thread Torsten Hämmerle
Hi Ming,

I think there is a general misunderstanding:
When saying "\transpose ef d", ef and d do *not* mean key signatures but
reference pitches defining an interval, nothing more, nothing less.

For specifying a key signature, by the way, you'd also have to state the
mode (e.g. minor, major, dorian, …).
So, \transpose ef d { … } just means "transpose everything in { … } down a
minor second.
You could also have written \transpose c' b or \transpose f e etc.

Just imagine the term "trumpet in Bb". The Bb generally states that the
trumpet will sound a major second lower than notated, i.e. a written C will
sound as a Bb. This also implies that a written A will sound as a G etc. and
is in no way restricted to a key signature.
In fact, this has nothing to do with key signatures at all and also works
for atonal music.
The only difference between the "trumpet in Bb" example and LilyPond's
\transpose is that "trumpet in Bb" implicitly takes C as a reference point,
whereas in LilyPond, both pitches have to be stated.

When taking a closer look, it becomes clear that LilyPond not just
transposes by a given number of semitones, but by considering actual
intervals:
Bb C (two semitones) is a major second, whereas A# C (two semitone, too) is
diminished third.

Apart from that, LilyPond will use suitable enharmonic key signatures if
things (i.e. accidentals) are getting too weird.
In your example, the second key signature (F major) will *not* be converted
into Fb major (with 6 flats and even one double-flat!) but into E major
(with only 4 sharps).

HTH,
Torsten




--
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: transpose several key signature

2018-05-30 Thread David Kastrup
Torsten Hämmerle  writes:

> Apart from that, LilyPond will use suitable enharmonic key signatures if
> things (i.e. accidentals) are getting too weird.
> In your example, the second key signature (F major) will *not* be converted
> into Fb major (with 6 flats and even one double-flat!) but into E major
> (with only 4 sharps).

Excuse me?

{
  \transpose es d { \key f \major s1 }
  \transpose es eses { \key f \major s1 }
}

LilyPond has no qualms about things getting weird.  The typesetting
stage will bomb out at more than _double_ accidentals (slated to be
changed IIRC), but processing will proceed just fine.  Try
\transpose e feses here.

There have been a few proposals for the sake of transposing instrument
transpositions about weirdness limiting methods, but nothing with
permanent impact so far.

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


Re: transpose several key signature

2018-05-30 Thread Torsten Hämmerle
David Kastrup wrote
> Excuse me?

Ah, yes, sorry, of course…
I just looked at Ming's example, had (for an unknown reason) something
*\naturalizeMusic* in mind and completely ignored what I had said before
about intervals.

When transposing F major down a minor second, we will get E major quite
naturally without any enharmonic wizardry and, yes, \transpose ef eff or
\transpose e ef etc. would have ruthlessly made Fb major out of it...

Sorry,
Torsten 




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


Barline glyphs in lilyglyphs

2018-05-30 Thread Sam Bivens

Hi all,

How can I invoke a barline glyph in lilyglyphs? I'm having trouble 
finding a list of glyphs akin to 
http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font


Thanks,

Sam


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


Re: Barline glyphs in lilyglyphs

2018-05-30 Thread Urs Liska



Am 30. Mai 2018 20:35:44 MESZ schrieb Sam Bivens :
>Hi all,
>
>How can I invoke a barline glyph in lilyglyphs? I'm having trouble 
>finding a list of glyphs akin to 
>http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font
>

A barline is not a glyph but is *drawn* in LilyPond. Therefore it doesn't"t 
belong to the glyphs accessible by lilyglyphs.

Please describe more concretely what you want (with/without staff lines etc.). 
It is possible to add commands with precompiled LilyPond snippets, but maybe 
you'd be better off with the new(er) lyluatex package.

Best
Urs

>Thanks,
>
>Sam
>
>
>___
>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: Barline glyphs in lilyglyphs

2018-05-30 Thread Sam Bivens

Hi Urs,


A barline is not a glyph but is *drawn* in LilyPond. Therefore it doesn't"t 
belong to the glyphs accessible by lilyglyphs.

Thanks; this is what I feared!

Please describe more concretely what you want (with/without staff lines etc.). 
It is possible to add commands with precompiled LilyPond snippets, but maybe 
you'd be better off with the new(er) lyluatex package.

I'm hoping to incorporate the following barlines into some TiKz diagrams:

 * "||"
 * "|."
 * ".|:"
 * ":|.|:"
 * ":|."

I don't need anything else (no staff lines, no pitches, etc.); just the 
barlines themselves.


Thanks,

Sam

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


Re: Barline glyphs in lilyglyphs

2018-05-30 Thread Erik Ronström
If you’re not specifically requiring the Feta font, you could try Bravura Text 
(https://www.smufl.org/fonts/)

See
https://w3c.github.io/smufl/gitbook/tables/barlines.html
https://w3c.github.io/smufl/gitbook/tables/repeats.html

Regards
Erik



> 30 maj 2018 kl. 20:35 skrev Sam Bivens :
> 
> Hi all,
> 
> How can I invoke a barline glyph in lilyglyphs? I'm having trouble finding a 
> list of glyphs akin to 
> http://lilypond.org/doc/v2.18/Documentation/notation/the-feta-font
> 
> Thanks,
> 
> Sam
> 
> 
> ___
> 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: Barline glyphs in lilyglyphs

2018-05-30 Thread Urs Liska



Am 30.05.2018 um 20:46 schrieb Sam Bivens:


Hi Urs,


A barline is not a glyph but is *drawn* in LilyPond. Therefore it doesn't"t 
belong to the glyphs accessible by lilyglyphs.
Thanks; this is what I feared! 


Don't think that's a serious issue.


Please describe more concretely what you want (with/without staff lines etc.). 
It is possible to add commands with precompiled LilyPond snippets, but maybe 
you'd be better off with the new(er) lyluatex package.

I'm hoping to incorporate the following barlines into some TiKz diagrams:

  * "||"
  * "|."
  * ".|:"
  * ":|.|:"
  * ":|."

I don't need anything else (no staff lines, no pitches, etc.); just 
the barlines themselves.




Then the easiest thing is to produce these as cropped PDF files from 
LilyPond and directly include them. There's no need to have the overhead 
of using a package like lilyglyphs for that.


You can start with something like

\version "2.19.80"

\paper {
  indent = 0\cm
}

\include "lilypond-book-preamble.ly"

{
  \omit Staff.StaffSymbol
  \omit Staff.TimeSignature
  \omit Staff.Clef
  s4 \bar "|."
}

Right now I'm not sure how to remove the space at the left of the 
barline. But if nobody here can tell you that you could still 
postprocess the file somewhere else.


HTH
Urs


Thanks,

Sam



___
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: handbell shake

2018-05-30 Thread Thomas Morley
2018-05-30 0:32 GMT+02:00 Rick Kimpel :

> I am trying to build a library of functions for handbell choir music. The
> first thing I attempted was how to show a shake. It sort of looks like a
> trill mark, but the squiggly line is at the level of the note being played.
> I'm hoping that I can just make a script that does all of this for me, but
> the fact that I had to nudge the invisible notehead over by hand has me
> worried that this might not be possible. If there's an easier way to do
> this, please let me know, especially if it gets rid of all the clash warning
> messages. Maybe something like faking the landing note of the gliss?
>
>
> Thanks,
>
> Rick
[...]

Hi Rick,

I don't know anything about handbell choir music and which special
notation-features may be needed.
Are there any images you could link to?

>From your coding-attempts, I think you want to mimic the shake with a
flat trill-style-glissando.
It's not too hard to get this, but glissando needs a target note-head.
Meaning a glissando to a rest is impossible (without second voice).
Also, suspended NoteHeads in a chord may lead to different start-end
points of simultaneous glissandi.

All in all it's not far from the problems avantgarde.music using
continuation-lines has to face.

To circumvent these problems I developed some code for
continuation-lines, which I stripped down to better fit your needs (as
far as I understood them)
It has it's own limitations (see comments), but it may get you started.

\version "2.19.81"


 Flat Glissandi

 Reads from Glissando.details:
   equal-chord-glissando-start-end [defaults to '(#t . #t)]

#(define flat-gliss
  (lambda (grob)
(let ((left-Y (assoc-get 'Y (ly:grob-property grob 'left-bound-info
  ;; create a flat glissando
  (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y

#(define same-gliss-start-end
  ;; Looks at details.equal-chord-glissando-start-end whether all glissandi
  ;; between chords should start at the same X-coordinate, same for
  ;; glissando-endings
  ;; 'equal-chord-glissando-start-end?' takes a pair of booleans indicating it.
  (lambda (grob)
(let* ((left-bound (ly:spanner-bound grob LEFT))
   (parent-nc (ly:grob-parent left-bound X))
   (details (ly:grob-property grob 'details))
   (equal-chord-glissando-start-end
 (assoc-get 'equal-chord-glissando-start-end details '(#t . #t)))
   (vertical-axis-group-elts
 (ly:grob-object (ly:grob-parent grob Y) 'elements))
   ;; Filter VerticalAxisGroup-elements for Glissandi, restricted to
   ;; those starting at the NoteHeads from same NoteColumn.
   ;; Return their 'X-value for start/end
   (relevant-gliss-Xs
 (if (ly:grob-array? vertical-axis-group-elts)
 (filter-map
   (lambda (elt)
 (and
   (grob::has-interface elt 'glissando-interface)
   (equal?
 (ly:grob-parent (ly:spanner-bound elt LEFT) X)
 parent-nc)
   (cons
 (assoc-get 'X
(ly:grob-property elt 'left-bound-info))
 (assoc-get 'X
(ly:grob-property elt 'right-bound-info)
   (ly:grob-array->list vertical-axis-group-elts))
 '(
  ;; Depending on `equal-chord-glissando-start-end':
  ;; Get the most left 'X for the resulting 'X-value of the end.
  ;; Get the most right 'X for the resulting 'X-value of the start.
  ;; Override left/right-bound-info with those values.
  (if (car equal-chord-glissando-start-end)
  (ly:grob-set-nested-property! grob '(left-bound-info X)
(apply max (map car relevant-gliss-Xs
  (if (cdr equal-chord-glissando-start-end)
  (ly:grob-set-nested-property! grob '(right-bound-info X)
(apply min (map cdr relevant-gliss-Xs)))


at =
#(define-music-function (parser location time event music)
  (ly:duration? ly:music? ly:music?)
"Place @var{event} at a relative duration @var{time} in relation
to @var{music}."
  #{ \context Bottom << { \skip $time <>$event } $music >> #})


%%
%% Limitation of `durLine':
%%   *  `mus' can't end exactly before \break
%%   *  not breakable, even if 'breakable is set #t
durLine =
#(define-music-function (parser location left-right-padding mus)
  ((pair? '(0.5 . 0)) ly:music?)
  (let* ((mus-copy (ly:music-deep-copy mus))
 (notes (extract-typed-music mus-copy 'note-event))
 (mus-to-insert
   (cond ((music-is-of-type? mus-copy 'event-chord)
   (make-event-chord
 (map
   (lambda (n)
 (ly:music-set-property! n 'articulations '())

Re: handbell shake

2018-05-30 Thread Aaron Hill

On 2018-05-30 15:40, Thomas Morley wrote:

I don't know anything about handbell choir music and which special
notation-features may be needed.
Are there any images you could link to?


Thomas,

For your (or anyone else's) reference, here is a site that summarizes 
standard American handbell notation:


https://www.handbellworld.com/music/HandbellNotation.cfm

Shaking is almost always denoted with `Sk`, but often that notation is 
accompanied with a wavy line as well.  (The wavy line is similar to the 
arpeggio marking but horizontal.)  Usually the wavy line is only 
necessary if there are other non-shaken notes in the measure and the 
duration of the shake is not otherwise clear.  Also, I have seen music 
where you have layers of shaken bells all starting and ending at 
different points.  Again, the wavy line can help make things clearer for 
ringers.


The skake line is strictly horizontal and would extend for the duration 
of the note, so it not attached to anything on the right end.  It would 
be similar to the *laissez vibrer*--a tie with no target.


-- Aaron Hill

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


Re: handbell shake

2018-05-30 Thread Rick Kimpel
From: Thomas Morley 
Sent: Wednesday, May 30, 2018 10:40 PM
> Hi Rick,
>
> I don't know anything about handbell choir music and which special
> notation-features may be needed.

There are a ton of things I need to do for this library, but this seemed like a
good middle-of-the-road starting point. Other tasks include martellato, 
tower swing, marks ()/{}/<> around single notes in a chord, and the dreaded 
list of bells at the beginning. I'll be posting looking for help with those at 
some point, I'm sure.

> Are there any images you could link to?

Google doesn't have a great selection of handbell music images, 
surprisingly. What's the etiquette on scanning something in for educational
purposes? I don't want to get into trouble. Aaron's link is a good starting
point.

> From your coding-attempts, I think you want to mimic the shake with a
> flat trill-style-glissando.
> It's not too hard to get this, but glissando needs a target note-head.
> Meaning a glissando to a rest is impossible (without second voice).
> Also, suspended NoteHeads in a chord may lead to different start-end
> points of simultaneous glissandi.

I have noticed these issues, all right. Also, I found that if I don't explicitly
set up the Staff context, it will put the gliss in its own staff. XD Might
be time for some remedial Lilypond tutorials. (I'm so rusty.)

> All in all it's not far from the problems avantgarde.music using
> continuation-lines has to face.
>
> To circumvent these problems I developed some code for
> continuation-lines, which I stripped down to better fit your needs (as
> far as I understood them)
> It has it's own limitations (see comments), but it may get you started.
[...]

Wow... I won't pretend to understand all of that. I had just gotten as far as 
using displayMusic to find out where the glissando even goes. But the
\hideNotes added a whole bunch of transparent properties, making it
hard to figure out.

Your sample works in 2.18, as well. I did notice that the gliss line can
obscure the dot. Interestingly, my workaround  does something that 
confuses the dot and puts it above the squiggle. Can't decide if that's the
best way to go, or if I should force the gliss to start after the dot.
bound-details.left.padding would do the trick there.

I couldn't figure out why you had to override the to-barline. Also, your
TODO about that is crazy. I was really surprised by the results of leaving it 
out. ?!

Thanks for your help. I'll be playing with it at lunch tomorrow. 

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