Re: Function to override the stem direction and flag of a single note?

2018-02-26 Thread Torsten Hämmerle
Sorry, in my reply, the sample coding got "auto formatted" because the the
note b after < was interpreted as bold tag and everything went belly-up.
I've now inserted a space between < and b and the LilyPond code became
readable:

\version "2.19.81"

\relative {
  << 
{ \autoBeamOff e''16*2 e e e } \\ 
{ 8 < b e'> } 
  >>
}

\relative {
  << { e''16 s e s e s e s } \\ 
 { 8 < b e'> } 
  >>
}





--
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: Function to override the stem direction and flag of a single note?

2018-02-26 Thread Torsten Hämmerle
Hi Andy, 

You don't need a special function for this, it's all contained in the
standard.

I've constructed a parallel context (with <<...\\...>>) thus having two
voices with opposite stem directions.
The upper noteheads will automatically be merged.

Now for the tricky part (the 16th flags): First, I've set \autoBeamOff in
the upper voice to get single flags.
Secondly, I've entered 16th notes (to get the semiquaver tails), but
rhythmically made quavers out of them by multiplying their value by 2 (16*2
= 8).
As a result, you get the desired 16th flags where practically there are 8th
notes:

\version "2.19.81"

\relative {
  << { \autoBeamOff e''16*2 e e e } \\ 
 { 8 * } >>
}

Another (simpler) way is to insert invisible rests between ordinary
semiquavers:

\relative {
  << { e''16 s e s e s e s } \\ 
 { 8 * } >>
}

But there's a more or less serious drawback (depending on the overall
spacing, the contents of other staves in the system, etc): the note spacing
will be unnaturally widened (with respect to ordinary quaver spacing).

semiquaver-quavers.png
  

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


Function to override the stem direction and flag of a single note?

2018-02-26 Thread Andy Chase
Hello all,

Let me establish a bit of context before getting to the meat of my question: I 
mainly use LilyPond for transcribing 5-string banjo music from the 19th and 
early 20th centuries.  Pretty much all of this music is in standard notation, 
but there’s one very banjo-specific convention that I haven’t been able to 
figure out how to replicate using LilyPond.

On 5-string banjo, the 5th string is a short drone starting at the 5th fret 
position; it’s typically always played open with the thumb.  On modern banjos 
in standard tuning, the note is G4.  Because there are several ways to play a 
G4 across the banjo fingerboard, there was a convention used for 5th string 
notes:  They were always set with the stem up, and with a sixteenth note flag 
(regardless of the actual note duration.) 

Here is an example from a piece published in 1882 (In this instance the 5th 
string is actually an E4, as banjos used to be tuned lower.  The clef is 
treble_8.): http://andychase.net/img/banjo_5th_string_notation.png

All of which is to explain why I’m asking whether it is possible to write a 
function to format notes in this way, that is:

1) Stem always pointing up  2) Always using a 16th note flag (regardless of the 
note’s actual duration)

I’ve spent a fair amount of time tinkering with this but I’m a little bit out 
of my depth.  

Thanks for any suggestions!

-Andy



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