Re: Pentatonic Diatonic Transposition?

2011-01-21 Thread m...@apollinemike.com
Hey Daniel,

Check out http://wiki.lilynet.net/index.php/JM_diatonic-transpose.ly .

Cheers,
MS

On Jan 20, 2011, at 9:05 PM, Daniel wrote:

> Hello,
> 
> I have recently discovered Lilypond, and wow. It is just great. I have been
> looking for something like this for a long time.
> 
> I have a question on how to diatonically transpose a motive in a non-major or
> minor scale in this case, a pentatonic.
> 
> For instance, suppose I have this pentatonic {a c d e g } and I have a phrase
> that is {a c g e} and now I want that phrase to start on g so transposed
> diatonically to the "mode" (its not really, but that is basically what I want)
> of that a pentatonic it would be {g a e d}. 
> 
> If I use regular "\transpose a g {MyPhrase}" it will come out {g bes f d} and
> include notes that are not in my original a minor pentatonic.
> 
> Can I define my own modes? I know that \dorian, \ionian are in there 
> somewhere,
> can I make my own scale\modes somehow and just use those?
> 
> Thanks for any advice or snippets!
> 
> Daniel
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

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


Hairpin rotation w/ bookending dynamic

2011-02-05 Thread m...@apollinemike.com
Hey all,

I'm working on a score and I can't figure out how to rotate the hairpin about 
the pianississimo -20ish degrees such that the sforzando moves with it.  Before 
measuring the distance in horizontal staff space of the hairpin and working 
with tangents to get the correct padding override (uuuh), can anyone 
suggest a quick and dirty way to slant the hairpin downwards and have the 
sforzando move along with it?

image @ http://www.apollinemike.com/hairpins.pdf

~Mike
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: strange output

2011-02-15 Thread m...@apollinemike.com
Same thing hit the French list a couple days ago.
Oddly, my heavily-krunked-out version of the source doesn't reproduce this 
result, but I would recommend (by way of Xavier Scheuer) adding \grace { s8 } 
to the beginning of all your parts.

Cheers,
MS

On Feb 15, 2011, at 7:14 AM, Mario Moles wrote:

> Double time and time indications:
> \version "2.13.50"
> 
> \header {
>   dedication = "A monsieur Constantin Mahrburg"
>   title = "IMPROMPTU"
>   composer = "Pietro Pettoletti"
>   opus = "Op. 29"
> }
> 
> \paper {
>   #(set-paper-size "a4")
> }
> 
> tempoMark = {
>   \once \override Score.RehearsalMark #'self-alignment-X = #LEFT
>   \once \override Score.RehearsalMark #'break-align-symbols = 
> #'(time-signature key-signature)
>   \once \override Staff.TimeSignature #'break-align-anchor-alignment = #LEFT
>   \mark \markup \bold "Allegro con energia"
> }
> 
> global = {
>   \tempoMark
>   \key c \major
>   \time 4/4
> }
> 
> classicalGuitarOne = \relative c' {
>   \global
>   % Qui segue la musica.
>   a4 b,16 b' c, c' d, d' e, e' f, f' gis, gis'|
> }
> 
> classicalGuitarTwo = \relative c' {
>   \global
>   % Qui segue la musica.
>   
> }
> 
> classicalGuitarThree = \relative c' {
>   \global
>   % Qui segue la musica.
>   
> }
> 
> classicalGuitarFour = \relative c {
>   \global
>   % Qui segue la musica.
>   \acciaccatura {a8} \stemDown a4 b8 c d e f gis|
> }
> 
> \book {
>   \score {
> \new Staff \with {
>   midiInstrument = "acoustic guitar (nylon)"
> } { \clef "treble_8" << \classicalGuitarOne \\ \classicalGuitarTwo \\ 
> \classicalGuitarThree \\ \classicalGuitarFour >> }
> \layout { }
> \midi {
>   \context {
> \Score
> tempoWholesPerMinute = #(ly:make-moment 100 4)
>   }
> }
>   }
> }
> 
> -- 
> oiram/bin/selom
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

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


Odd voice-squashing

2011-02-23 Thread m...@apollinemike.com
Hey all,In the first attached example, you'll see that the C# and D are oddly merged in the last note column. However, when I compile the code for a minimal example (\relative c' { << { d8 ~ d4 } \\ { d8 cis4 } >> }), it works just fine.  Also, when I compile the part outside of the full string quartet, it works fine as well (also see attached).  Does anyone have any intuition as to what could cause this sort of discrepancy between different settings of the same material?Cheers,MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Odd voice-squashing

2011-02-23 Thread m...@apollinemike.com

On Feb 23, 2011, at 4:17 PM, Nick Payne wrote:

> On 24/02/11 08:04, m...@apollinemike.com wrote:
>> 
>> Hey all,
>> 
>> In the first attached example, you'll see that the C# and D are oddly merged 
>> in the last note column. However, when I compile the code for a minimal 
>> example (\relative c' { << { d8 ~ d4 } \\ { d8 cis4 } >> }), it works just 
>> fine.  Also, when I compile the part outside of the full string quartet, it 
>> works fine as well (also see attached).  Does anyone have any intuition as 
>> to what could cause this sort of discrepancy between different settings of 
>> the same material?
> 
> Do you have \override NoteColumn #'ignore-collision = ##t turned on somewhere 
> in the full score?
> 
> Nick

You are wise beyond your years (whatever they may be), Nick Payne...

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


Re: Extending stem length without affecting spacing

2011-02-26 Thread m...@apollinemike.com
On Feb 25, 2011, at 2:35 PM, Jérémie Lumbroso wrote:

> Hello,
> 
> I am typesetting a piano score, in which I have chords which I want to span 
> both staves. I've determined that this is still not possible, and found that 
> the only suggested workaround was to align notes on both staves and to extend 
> the stem of one of the notes to join with the other. Unfortunately, whenever 
> I extend the length of the stem to that effect, LilyPond adjusts the spacing 
> between the two staves so as to ensure there are no collisions.
> 
> Is it possible to override the stem length, without it affecting LilyPond's 
> calculations for staff spacing? I'm wary about locking interstaff space 
> altogether (and I'm not sure how to go about it), but perhaps that is the 
> only solution?
> 
> Best Regards,
> Jeremie

Could you include a minimal example w/ your e-mail?
There's (almost) always a way, but it's easier to give you suggestions if we 
can see the type of music you're dealing with.

Cheers,
MS


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


Re: adjusting horizontal spacing and page turns

2011-03-04 Thread m...@apollinemike.com
On Mar 4, 2011, at 7:26 PM, Douglas Ridgway wrote:

> I'm working on the Mozart bassoon concerto from Mutopia. I'd like to
> include the tutti sections on the bassoon part, but in small notes,
> because they are usually not played. I used \tiny, but the result
> seems kind of stretched out, and the page turns end up in unpleasant
> spots. A standalone .ly of the first movement is attached. Any advice
> on improving layout? For comparison, check out the first page of the
> Edition Peters scan of the bassoon part on
> http://imslp.org/wiki/Bassoon_Concerto_in_B-flat_major,_K.191/186e_%28Mozart,_Wolfgang_Amadeus%29
> (http://imslp.org/wiki/Special:ImagefromIndex/39385).
> 
> Thanks!
> doug.
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

Hey Doug,

Check out: 
http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Writing-parts
It'll also give you some ideas on how to structure the document so that you can 
keep the solo part intact w/o having to worry about weaving in all of the cue 
notes.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: filename in markup

2011-03-15 Thread m...@apollinemike.com
On Mar 11, 2011, at 10:57 AM, MING TSANG wrote:

> Thank you.
> 
> Additional question:  Can the path of the file name be printed also?
> 
> 
> From: Marek Klein 
> To: MING TSANG 
> Cc: lilypond-user@gnu.org
> Sent: Fri, March 11, 2011 10:19:01 AM
> Subject: Re: filename in markup
> 
> 2011/3/11 MING TSANG 
> How can I code this in a .ly file? I am just interested in printing the file 
> name (if possible with the full path) on the bottom of a score sheet.
> 
> Click on the picture (with the text) here: 
>  and you will find the code.
> 
> Marek
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

One issue with this solution is that if you do batch processing from the 
command line:

lilypond foo.ly bar.ly

Then the solution no longer works.  Is there a more secure way to get the 
correct file name?

I know that the filename can be accessed from the parser, but I can't seem to 
get the parser out of anything that's not a music function.  Does anyone have 
any hints as to how to securely get the parser from anywhere in Scheme-land?

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Dot-notehead collision

2011-03-15 Thread m...@apollinemike.com
Hey all,

\relative c' { \time 3/4 << { 4 2 } \\ { d2. } >> }

Produces the attached output.  Is there a way to get it so that the dot does 
not collide with the notehead (w/o resorting to extra offsets and the like)?

Cheers,
MS

<>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Dot-notehead collision

2011-03-15 Thread m...@apollinemike.com
On Mar 15, 2011, at 5:04 PM, Phil Holmes wrote:

> - Original Message - From: "Trevor Daniels" 
> To: ; "lilypond-user" 
> Sent: Tuesday, March 15, 2011 6:24 PM
> Subject: Re: Dot-notehead collision
> 
> 
>> 
>> m...@apollinemike.com wrote Tuesday, March 15, 2011 5:00 PM
>> 
>>> \relative c' { \time 3/4 << { 4 2 } \\ { d2. } >> }
>>> 
>>> Produces the attached output.  Is there a way to get it so that the dot 
>>> does not collide with the notehead (w/o resorting to extra offsets and the 
>>> like)?
>> 
>> I don't think so.  You'll need 'force-hshift.
>> 
>> Trevor
> 
> 
> Agreed. I tried a number of other things, but h-shift worked out of the box.
> 
> 

Perhaps a stupid question - in traditional engraving, is there ever an instance 
where, in 2 voice polyphony, the note column w/ a downward pointing stem is 
placed to the right of note column with an upward pointing stem?  I hacked a 
solution that does this and it looks much clearer than moving in the other 
direction (see attached).  However, if it is not Kosher, I'll scrub it.

\relative c' { \time 3/4 << { 4 2 }
\\ { \once \override Voice . NoteColumn #'force-hshift = #1.25 d2. } >> }

\relative c' { \time 3/4 << { 4 2 }
\\ { \once \override Voice . NoteColumn #'force-hshift = #-1.25 d2. } >> }



<>

Cheers,
Mike___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: filename in markup

2011-03-15 Thread m...@apollinemike.com
On Mar 15, 2011, at 1:21 PM, -Eluze wrote:

> 
> 
> m...@apollinemike.com wrote:
>> 
>> 
>> One issue with this solution is that if you do batch processing from the
>> command line:
>> 
>> lilypond foo.ly bar.ly
>> 
>> Then the solution no longer works.  Is there a more secure way to get the
>> correct file name?
>> 
> 
> this works perfectly for me (windows vista, LP version 2.13.53)
> 

Could you confirm by running the attached two files using the following command:

lilypond foo.ly bar.ly

When I do it, both of them use the "bar" filename.
If this works on Windows, then I take back all of the mean things I ever said 
about the Windows command line.

Cheers,
Mike



foo.ly
Description: Binary data


bar.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: filename in markup

2011-03-16 Thread m...@apollinemike.com
(from Neil Puttock)


foo = #(ly:parser-output-name parser)

Cheers,
Neil


On Mar 16, 2011, at 10:32 AM, thehalpennys-lilyp...@yahoo.ca wrote:

> This snippet just parses the command line.  It would be nice if there was a 
> way to query the file attributes directly. I would expect that it should be 
> simple to do.
> 
> Dave.  
> 
> From: Trevor Daniels 
> To: -Eluze ; lilypond-user@gnu.org
> Sent: Wed, March 16, 2011 9:46:36 AM
> Subject: Re: filename in markup
> 
> 
> Eluze wrote Wednesday, March 16, 2011 12:31 PM
> 
> > m...@apollinemike.com wrote:
> >> 
> >> 
> >> Could you confirm by running the attached two files using the following
> >> command:
> >> 
> >> lilypond foo.ly bar.ly
> >> 
> >> When I do it, both of them use the "bar" filename.
> >> If this works on Windows, then I take back all of the mean things I ever
> >> said about the Windows command line.
> >> 
> > well, sorry for my premature statement: it only works in the sense that it
> > compiles "correctly".
> > but the result is as you stated: only the name of the latter file is shown!
> 
> Whoops, you're right!  I hadn't checked the pdfs.
> I just looked at the console output.
> 
> Trevor
> 
> 
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

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


Re: looking for a way to print inverval from 2 notes

2011-03-17 Thread m...@apollinemike.com
On Mar 17, 2011, at 5:55 AM, christophe 1710 wrote:

> Hello all,
> 
> i'm working on the different modal structure from a score and i woud like to 
> print the half or full ton from one not to the next one!
> 
> \version "2.12.3"
> \include "italiano.ly"
> \header { }
> TimeKey = { \key do \minor \time 12/8}
> One= \relative mi' {
> \clef treble
>   \override Score.BarLine #'stencil = ##f
> \override Stem #'transparent = ##t
> \override Staff.TimeSignature #'stencil = ##f 
> 
> sib4 dob reb mib fab solb
> }
> \score {
> \new Staff {
> \new voice = "Violon" { \One}
> } 
> \layout {}
> }
> 
> \startGroup and \stopGroup could be a solution but how to write bellow in the 
> middle of the bracket the interval "1/2T" or "1T"
> 
> Thanks for your help all
> 
> regard
> chris
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

Analysis brackets currently do not allow for text.  You can do it, though, with 
a hack.

\layout {
\context {
\Voice \consists "Horizontal_bracket_engraver"
}}

#(define (foo txt height padding)
  (lambda (grob)
(let* ((x-len (interval-length (ly:stencil-extent 
(ly:horizontal-bracket::print grob) X)))
  (dir (ly:grob-property grob 'direction))
  (text (grob-interpret-markup grob txt))
  (text-x (interval-length (ly:stencil-extent text X)))
  (text-y (interval-length (ly:stencil-extent text Y
(ly:stencil-add
  (ly:stencil-translate text (cons (- (/ x-len 2) (/ text-x 2)) (* dir (+ 
(+ padding height) text-y
  (ly:stencil-add
(make-line-stencil 0.1 0 0 (/ x-len 2) dir)
(make-line-stencil 0.1 (/ x-len 2) dir x-len 0))

\relative c'' {
\once \override HorizontalBracket #'stencil = #(foo "T" 1 0.2)
c2\startGroup d\stopGroup
\once \override HorizontalBracket #'stencil = #(foo "1/2T" 1 0.2)
d2\startGroup ees\stopGroup
}

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: fighting with lyrics

2011-03-20 Thread m...@apollinemike.com
On Mar 20, 2011, at 8:11 PM, Benjamin Peterson wrote:

> Hello,
> Having used Lilypond successfully for some instrumental works, I'm 
> typesetting a
> song with it. Here's a link to the lilypond source:
> http://paste.pocoo.org/show/356919/ Here's a image as it looks currently:
> http://imgur.com/Afa3q
> 
> Two questions: How do I get the hyphens to show? Why does it look like the
> lyrics are "lagging" behind the notes? Can I make them line up better?
> 
> 

Hey Ben,

This is not really a response to your question, but the two things you are 
pointing out are actually common behavior in typesetting:

1)  In vocal scores, the hyphens between lyrics disappear when the spacing 
is tight.
2)  The lagging you are taking about is also standard practice - I don't 
know of any publishers off the top of my head that left-justify their lyrics.

There are work-arounds to both questions you're asking, but before going down 
that road, check out scores on http://imslp.org/ and get acquainted with 
traditional typographical standards.  They have evolved over centuries 
facilitate reading and performance, and messing with them is generally an 
uphill battle.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Notes lining up, and warnings

2011-03-26 Thread m...@apollinemike.com
On Mar 26, 2011, at 7:37 AM, Father Gordon Gilbert wrote:

> Thanks, Peter!  That fixed all the errors as well as the spacing!
> There is one more thing I would like to accomplish -- to indent the
> Gloria Patri words just a bit.  I'm unfamiliar with the words below
> systems, and have tried various things I found in the manual, but
> nothing seems to have any effect.  Can you suggest how to do this?
> 
> Thanks,
> 
> Gordon+
> 
> On 25/03/2011, Peter Chubb  wrote:
>>> "Father" == Father Gordon Gilbert  writes:
>> 
>> Father> Can someone help me here?  On this Anglican chant , in the
>> Father> tenth measure (end of the first section of verse two) the
>> Father> melody notes are 1/2 notes and the harmony notes are whole
>> Father> notes, yet in my pdf viewer, they are not lined up as I would
>> Father> like them.  I've tried in LilyPondTool to shift them a bit,
>> Father> but it doesn't seem to be working for some reason.  (It
>> Father> introduces a horiz. shift expression into the line, but it
>> Father> seems to have no effect.)
>> 
>> The problem is that the tenor and bass parts cross over here.
>> Lilypond offsets one of them to show this.
>> 
>> If you make the bass line stay below the tenor line all the way then
>> the line-up is perfect.
>> 
>> I found some of the formatting a bit strange --- but here's hwhat I
>> adjusted to get a result.  you may want to change it!
>> 
>> 

In each of your markups, you can prepend additional space to indent the words.  
For example, on lines where you have [\markup { \wordwrap-string #"], if 
instead you put [\markup { "  " \wordwrap-string #"], you'll get an indentation 
of 2 spaces.

Cheers,
Mike
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: help with scheme function

2011-03-26 Thread m...@apollinemike.com
On Mar 26, 2011, at 8:58 AM, Damian leGassick wrote:

> hi all
> 
> as you can see below I've got some very repetitive note entry
> 
> my attempt at a scheme substitution is not working
> 
> can anyone help me out here?
> 
> cheers
> 
> Damian
> 
> 
> \version "2.13.54"
> 
> xenAccGliss = #(define-music-function (parser location nOne nTwo) (ly:music? 
> ly:music?) #{ 
>\afterGrace $nOne\glissando {\stemDown 
> \once \override Stem #'stroke-style = #"grace" $nTwo} #})
> 
> cello = {
> 
>  \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
>  \override Glissando #'minimum-length = #5
>  \override Glissando #'thickness = #2
>  \clef treble
>  #(define afterGraceFraction (cons 15 16))
>  \override Beam #'positions = #'(-8 . -8)
>  \afterGrace d'''16\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" c''16} 
>  \afterGrace b''16\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" e''16} 
>  \afterGrace f'''8\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" d'16} 
>  \afterGrace c''8\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" b''16} 
>  \afterGrace gis''16\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" f'16} 
>  \afterGrace c''16~\glissando {\stemDown \once \override Stem #'stroke-style 
> = #"grace" d'16} 
>  \afterGrace c''16\glissando {\stemDown \once \override Stem #'stroke-style = 
> #"grace" d'16} 
>  \xenAccGliss f'4 g''2
> }
> 
> \score {
>  \new Staff \with {
>instrumentName = "Cello"
>  } {\cello }
>  \layout { }
> }
> 

The problem is (I think) in the way glissando is parsed.

You can either remove glissando from the definition and add it in manually like 
so:

xenAccGliss = #(define-music-function (parser location nOne nTwo)
(ly:music? ly:music?)
#{
\afterGrace $nOne { \stemDown \once \override Stem #'stroke-style = #"grace" 
$nTwo }
#})

\xenAccGliss a' \glissando b'

OR write a function that'll tack the glissando on

#(define (bar m)
  (ly:music-set-property! m 'elements (reverse (cons (make-music (quote 
GlissandoEvent)) (ly:music-property m 'elements
m)

foo = #(define-music-function (parser location mus) (ly:music?) (bar mus))

xenAccGliss = #(define-music-function (parser location nOne nTwo)
(ly:music? ly:music?)
#{
\afterGrace \foo $nOne { \stemDown \once \override Stem #'stroke-style = 
#"grace" $nTwo }
#})

\xenAccGliss a' b'

Cheers,
MS

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


Re: Rounds/catches with LilyPond

2011-03-26 Thread m...@apollinemike.com

On Mar 26, 2011, at 7:57 PM, Ben Rudiak-Gould wrote:

> I think it is the sort of thing that ought to be
> doable, given LilyPond's support for all kinds of crazy stuff that
> almost nobody cares about, such as feathered beams.

i <3 feathered beams :(

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


Re: Combining NoteHead and Stem stencils for rotation

2011-03-29 Thread m...@apollinemike.com
On Mar 29, 2011, at 9:25 AM, David Kastrup wrote:

> m...@apollinemike.com writes:
> 
>> Hey all,
>> 
>> I'd like to rotate a note head and its stem in one fell swoop.
>> 
>> This seems rather nightmarish to do.  I can envision two solutions:
>> 
>> (1) Combine the stem stencil with its notehead stencil and then make
>> the notehead transparent.  Then, rotate this uberstencil.
>> (2) Do trig on the stem to translate it after having rotated the
>> notehead (or vice versa).
>> 
>> Both of these options seem not easy, but option 2 seems more feasible.
>> In order to do this, though, I'd have to spend a fair bit of time
>> doing the math and work with different unit systems for X and Y (I
>> think).
>> 
>> Before I start on this, can anyone think of a quick & easy way to do
>> this rotation?
> 
> 2 seems rather trivial.  Note that rotation about (x,y) is the same as
> subtracting (x,y), rotating about (0,0), and then adding (x,y).  So it
> should be easy enough, given the rotation of one element, to make
> another rotate in a shifted coordinate system.

The difficulty I had with this is that I get the sense that noteheads cannot be 
separately translated.

#(define (goo grob)
  (let* ((refpy (ly:grob-common-refpoint grob (ly:grob-parent grob Y) Y))
 (coord-y (ly:grob-relative-coordinate grob refpy Y))
 (rad (+ coord-y 2.5))
 (angle (degrees->radians 15))
 (x-trans (* rad (cos angle)))
 (y-trans (- (* rad (sin angle
 (stencil (ly:note-head::print grob)))
 (ly:stencil-translate (ly:stencil-rotate stencil 15 -1 -1) (cons 
x-trans y-trans   

\relative c' {
\override Stem #'stencil = ##f <\tweak #'stencil #goo d \tweak #'stencil #goo f 
\tweak #'stencil #goo a>8
}

You'll see that the three noteheads never translate in their X dimension.  I'm 
suspecting that the note column tries to keep them in line.  Is there a 
workaround for this without messing with stencil extents?

Cheers,
MS
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: problem with OS X 10.6.7 and Lily-PDFs

2011-03-31 Thread m...@apollinemike.com
On Mar 31, 2011, at 7:21 AM, Jan-Peter Voigt wrote:

> Hello List,
> 
> I installed Mac OSX 10.6.7 and now am unable to print my beautiful sheets 
> from my mac! It seems to be related to a font problem in the last security 
> update: http://www.tidbits.com/article/12078
> Luckily I work on Ubuntu and can print from there ...
> 
> Sorry for this off topic message, but I know, there are a lot mac users in 
> this community ;-)
> 
> Cheers,
> Jan-Peter

I have the same problem.  A solution proposed on the French list is downloading 
Skim (http://skim-app.sourceforge.net/ ), although I have not managed to get 
that working either with my borderline-dot-matrix printer.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Coloring individual staff lines snippet error

2011-04-02 Thread m...@apollinemike.com
On Apr 2, 2011, at 12:01 PM, Paul Morris wrote:

> I was trying to use this snippet to experiment with customizing staff line 
> colors:
> http://lsr.dsi.unimi.it/LSR/Item?id=700
> 
> But I get the following error when trying to compile the snippet in LilyPond:
> 
> Parsing...
> Interpreting music... 
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...ERROR: Unbound variable: interval-translate
> 
> 
> Any ideas?  I'm using LilyPond 2.13.56  
> 
> Thanks,
> -Paul Morris

Odd...I have no clue why interval translate disappeared from the source, but 
you can easily replicate its behavior.

Add to the top of your document:

#(define (interval-translate iv amount)
  (cons (+ amount (car iv))
(+ amount (cdr iv

And you should be set!

Cheers,
MS

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


Re: Trill notation with fingering

2011-04-03 Thread m...@apollinemike.com
On Apr 3, 2011, at 7:31 PM, Javier Ruiz-Alma wrote:

> Any ideas as to how best to approximate the trill plus fingering notiation as 
> shown in this image?
> The closest I can get is:
>  
> a2.\trill^markup{\finger "3 2"}
>  
> However, this doesn't show the cap over the digits, plus lilypond seems to 
> always try to display the "tr" symbol at the very top, no matter what order 
> the modifiers are listed after the note.
>  
> Thx, Javier

This is not exactly what you want, but it's close!

Make sure to have a font w/ the lyric tie (like DejaVu) in your font search 
path.

#(define-markup-command (up-tied-lyric layout props str)
  (string?)
  (if (string-contains str "~")
  (let*
  ((parts (string-split str #\~))
   (tie-str (ly:wide-char->utf-8 #x2040))
   (joined  (list-join parts tie-str))
   (join-stencil (interpret-markup layout props tie-str))
   )

(interpret-markup layout
  (prepend-alist-chain
   'word-space
   (/ (interval-length (ly:stencil-extent join-stencil 
X)) -3.5)
   props)
  (make-line-markup joined)))
   ;(map (lambda (s) (interpret-markup layout props s)) 
parts))
  (interpret-markup layout props str)))


{ \once \override Staff . Script #'outside-staff-priority = #0
a'2.\trill^\markup{ \up-tied-lyric #"3~2" }}

Cheers,
Mike___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trill notation with fingering

2011-04-03 Thread m...@apollinemike.com
On Apr 3, 2011, at 7:31 PM, Javier Ruiz-Alma wrote:

> Any ideas as to how best to approximate the trill plus fingering notiation as 
> shown in this image?
> The closest I can get is:
>  
> a2.\trill^markup{\finger "3 2"}
>  
> However, this doesn't show the cap over the digits, plus lilypond seems to 
> always try to display the "tr" symbol at the very top, no matter what order 
> the modifiers are listed after the note.
>  
> Thx, Javier
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> http://lists.gnu.org/mailman/listinfo/lilypond-user

Just realized that this is better...

#(define-markup-command (up-tied-lyric layout props a b)
  (markup? markup?)
  (let*
  ((tie-str (ly:wide-char->utf-8 #x2040))
   (joined  (list-join `(,a ,b) tie-str))
   (join-stencil (interpret-markup layout props tie-str))
   )

(interpret-markup layout
  (prepend-alist-chain
   'word-space
   (/ (interval-length (ly:stencil-extent join-stencil 
X)) -3.5)
   props)
  (make-line-markup joined


{ \once \override Staff . Script #'outside-staff-priority = #0
a'2.\trill^\markup{ \up-tied-lyric \finger 3 \finger 2 }}


Cheers,
Mike___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Trill notation with fingering

2011-04-04 Thread m...@apollinemike.com

On Apr 3, 2011, at 11:42 PM, Javier Ruiz-Alma wrote:

> On Apr 3, 2011, at 7:31 PM, Javier Ruiz-Alma wrote:
> 
>> Any ideas as to how best to approximate the trill plus fingering notiation 
>> as shown in this image?
>> The closest I can get is:
>>  
>> a2.\trill^markup{\finger "3 2"}
>>  
>> However, this doesn't show the cap over the digits, plus lilypond seems to 
>> always try to display the "tr" symbol at the very top, no matter what order 
>> the modifiers are listed after the note.
>>  
>> Thx, Javier
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> http://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> Just realized that this is better...
> 
> #(define-markup-command (up-tied-lyric layout props a b)
>   (markup? markup?)
>   (let*
>   ((tie-str (ly:wide-char->utf-8 #x2040))
>(joined  (list-join `(,a ,b) tie-str))
>(join-stencil (interpret-markup layout props tie-str))
>)
> 
> (interpret-markup layout
>   (prepend-alist-chain
>'word-space
>(/ (interval-length (ly:stencil-extent 
> join-stencil X)) -3.5)
>props)
>   (make-line-markup joined
> 
> 
> { \once \override Staff . Script #'outside-staff-priority = #0
> a'2.\trill^\markup{ \up-tied-lyric \finger 3 \finger 2 }}
> 
> 
> Cheers,
> Mike
> Wow, Thank You Mike!
> 
>  
> Attached is my first try with your code.  I improvised the following to 
> reduce the space between digits, with bad results:
> 
> \markup{ \up-tied-lyric \finger "43" }
> 
> I don't know anything about custom commands (yet), so I suspect it fails is 
> because your command is expecting two arguments.  Let me know if there's 
> anything I can tweak to improve the distance between the digits or horizontal 
> positioning of the cap/tie.
> 
>  

#(define-markup-command (up-tied-lyric layout props a b factor)
  (markup? markup? number?)
  (let*
  ((tie-str (ly:wide-char->utf-8 #x2040))
   (joined  (list-join `(,a ,b) tie-str))
   (join-stencil (interpret-markup layout props tie-str))
   )

(interpret-markup layout
  (prepend-alist-chain
   'word-space
   (/ (interval-length (ly:stencil-extent join-stencil 
X)) factor)
   props)
  (make-line-markup joined


{ \once \override Staff . Script #'outside-staff-priority = #0
a'2.\trill^\markup{ \up-tied-lyric \finger 3 \finger 2 #-2.75 }}

Alternatively, if you want to hardcode a value instead of passing the function 
a value every time, you can just use the code I sent you before but replace the 
-3.5 with whatever value you want hardcoded in there.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation

2011-04-06 Thread m...@apollinemike.com
On Apr 6, 2011, at 7:22 AM, James Lowe wrote:

> From: Peter O'Doherty [mailto:k.p.odohe...@gmail.com] 
> Sent: 06 April 2011 12:21
> To: James Lowe
> Subject: Re: ottavation
> 
> Thanks for your reply, James. My question wasn't very clear - there are 
> numerous instances of ottava passages in the score, but not the whole score 
> so \clef "treble_8" is not suitable. It's not the ottava instruction as such 
> I want to use in the \layout { } but the format, i.e. just an "8" instead of 
> "8va".
> Regards,
> Peter
> 
> On Wed, Apr 6, 2011 at 12:27 PM, James Lowe  wrote:
> Hello,
> 
> )-Original Message-
> )From: lilypond-user-bounces+james.lowe=datacore@gnu.org
> )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
> )Behalf Of Peter O'Doherty
> )Sent: 06 April 2011 09:51
> )To: lilypond-user
> )Subject: ottavation
> )
> )Hi,
> )
> )How can I adjust \set Staff.ottavation = #"8" to include it in the layout
> )section so it applies to the whole score?
> Can't you just use
> 
> \clef "treble_8" in your score
> 
> http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef
> 
> Instead of using a \layout { } construct?
> 
> james

\score { \new Staff {
\relative c'' {
a b c d
}}
\layout { \context { \Score ottavation=#"8" } }}

Cheers,
MS
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: ottavation

2011-04-06 Thread m...@apollinemike.com
On Apr 6, 2011, at 9:26 AM, Peter O'Doherty wrote:

> Thanks. 
> The code you sent applies \ottava #1 to the whole score, whereas I also have 
> instances of 8vb and 15va etc. All I need is a way to change the property to 
> print only 8 or 15 without va, vb etc. to save me typing \set 
> Staff.ottavation = #"8" each time.
> Thanks,
> Peter
> 
> \score { \new Staff {
>  {
> {
>   \ottava #1
>   %\set Staff.ottavation = #"8"
>   c''1
>   \ottava #-1
>   %\set Staff.ottavation = #"8"
>   c,1
> }
> 
> }}
> \layout { 
>   \context {  
>     % \Score ottavation=#"8" % this does not work
> } }}
> 
> 
> 
> 
> On 04/06/2011 01:51 PM, m...@apollinemike.com wrote:
>> 
>> On Apr 6, 2011, at 7:22 AM, James Lowe wrote:
>> 
>>> From: Peter O'Doherty [mailto:k.p.odohe...@gmail.com] 
>>> Sent: 06 April 2011 12:21
>>> To: James Lowe
>>> Subject: Re: ottavation
>>> 
>>> Thanks for your reply, James. My question wasn't very clear - there are 
>>> numerous instances of ottava passages in the score, but not the whole score 
>>> so \clef "treble_8" is not suitable. It's not the ottava instruction as 
>>> such I want to use in the \layout { } but the format, i.e. just an "8" 
>>> instead of "8va".
>>> Regards,
>>> Peter
>>> 
>>> On Wed, Apr 6, 2011 at 12:27 PM, James Lowe  wrote:
>>> Hello,
>>> 
>>> )-Original Message-
>>> )From: lilypond-user-bounces+james.lowe=datacore@gnu.org
>>> )[mailto:lilypond-user-bounces+james.lowe=datacore@gnu.org] On
>>> )Behalf Of Peter O'Doherty
>>> )Sent: 06 April 2011 09:51
>>> )To: lilypond-user
>>> )Subject: ottavation
>>> )
>>> )Hi,
>>> )
>>> )How can I adjust \set Staff.ottavation = #"8" to include it in the layout
>>> )section so it applies to the whole score?
>>> Can't you just use
>>> 
>>> \clef "treble_8" in your score
>>> 
>>> http://lilypond.org/doc/v2.13/Documentation/notation/displaying-pitches#clef
>>> 
>>> Instead of using a \layout { } construct?
>>> 
>>> james
>> \score { \new Staff {
>> \relative c'' {
>> a b c d
>> }}
>> \layout { \context { \Score ottavation=#"8" } }}
>> 
>> Cheers,
>> MS
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> http://lists.gnu.org/mailman/listinfo/lilypond-user
>> 

Kinda kludgy, but it works!  Automating this type of truncating can likely 
become part of LilyPond for 2.15/2.16.  In the meantime, this should do the 
trick.

#(define (make-ottava-set-short music)
  (let ((octavation (ly:music-property music 'ottava-number)))

(list (context-spec-music
   (make-apply-context
(lambda (context)
  (let ((offset (* -7 octavation))
(string (assoc-get octavation '((2 . "15")
(1 . "8")
(0 . #f)
(-1 . "8")
(-2 . "15")
(set! (ly:context-property context 'middleCOffset) offset)
(set! (ly:context-property context 'ottavation) string)
(ly:set-middle-C! context
   'Staff


shortOttava = #(define-music-function (parser location octave) (integer?)
(make-music 'OttavaMusic 'ottava-number octave 'elements-callback 
make-ottava-set-short))

\score { \new Staff {
\relative c'' {
\shortOttava #1 a b c d \shortOttava #0 a b c d
}}}___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: intro; art song example or template?

2011-04-07 Thread m...@apollinemike.com
On Apr 7, 2011, at 3:02 PM, ivan.k.kuznet...@gmail.com wrote:

> 
> Hello All;
> 
> I am a first time poster.  I have much experience with
> linux and latex and so hopefully I will catch on
> to lilypond without too much trouble.
> 
> I am a composer of mostly atonal music, often with
> a lot of time signature changes (or with passages
> that have no time signatures), to give you
> an idea of the kinds of issues I am be facing.
> 
> My first lilypond project is too notate some songs I
> wrote for soprano and classical guitar.
> 
> Can someone recommend a template or even a finished
> song that I could begin with?
> 
> Thank you for your help;  Ivan
> 

A couple things you may want to try:

#(set-accidental-style 'neo-modern) at the beginning of each staff
when there's no time signature, use \once \override Staff . TimeSignature 
#'stencil = ##f and then use \bar "" at each point in time where a line break 
would be acceptable.

If you're OK with beams over system breaks and glissandi over system breaks, 
set the breakable property to ##t for Beam and Glissando.

My four LilyPond scores from 2011 are at:

http://www.apollinemike.com/master.pdf
http://www.apollinemike.com/zauberbuch.pdf
http://www.apollinemike.com/norman1
http://www.apollinemike.com/test.svg

Not all of them are 100% LilyPond, but all of them use LilyPond somehow.  Two 
of them use voice.  If you see anything you'd want to use, I can tell you how I 
did it.

Cheers,
Mike
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: First page completed; tweaking questions

2011-04-09 Thread m...@apollinemike.com
On Apr 9, 2011, at 7:08 PM, ivan.k.kuznet...@gmail.com wrote:

> 
> 
> I have my first page of music notated with lilypond here:
> 
> http://www.flickr.com/photos/61572029@N04/5603253711/
> 
> 
> 
> CONCERNING area's marked in red A1 and A2:
> 
> Sometimes I require one note to have two stems indicating
> that the note belongs to two voices.  A2 worked out
> as I intended but for A1, ideally I would just like the
> half-note G# visible and the triplet eighth-note G# invisible,
> so that the first stem of the triplet is the a stem
> attached to the half-note G# (and the half-note G# still has
> its downward stem also).  How can this be achieved?
> 

\mergeDifferentlyHeadedOn


> 
> CONCERNING the area's marked B1, B2, B3, and B4:
> 
> Look at B1 for example.  The triplet bracket circled is
> too short, I want all triplet brackets to take the "entire
> duration", not just go to the last stem.

\set tupletFullLength = ##t
\set tupletFullLengthNote = ##t
> 
> Also, in the special case of B1, where I have two
> voices each with a triplet, notationally only one
> bracket is necessary.  Is there any way to make one
> of the bracket's "invisible" (like an "s" rest)?
> 

\once \override Voice . TupletBracket #'transparent = ##t
> 
> CONCERNING the area's marked C1, C2, and C3:
> Can I tilt the right side of the triplet bracket
> down at C1 and C3?  At C2i, can I tilt the
> left side of the beam upwards so it is over the rest?
> 

This I'll leave for someone else - I can think of kludgy ways to do it, but 
there may be more elegant ones.

Cheers,
MS


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


Re: First page completed; tweaking questions

2011-04-10 Thread m...@apollinemike.com
On Apr 10, 2011, at 2:12 PM, Ivan Kuznetsov wrote:

> m...@apollinemike.com  wrote:
> >
> > ivan.k.kuznet...@gmail.com wrote:
> > >
> > > I have my first page of music notated with lilypond here:
> > >
> > > http://www.flickr.com/photos/61572029@N04/5603253711/
> > >
> ...
> > >
> > > CONCERNING the area's marked B1, B2, B3, and B4:
> > >
> > > Look at B1 for example.  The triplet bracket circled is
> > > too short, I want all triplet brackets to take the "entire
> > > duration", not just go to the last stem.
> >
> > \set tupletFullLength = ##t
> > \set tupletFullLengthNote = ##t
> 
> Thanks; I have worked with this a bit, and
> I have only been able to get this to work within the tuplet
> bracket:
> 
>  \times 2/3 { \once \set tupletFullLength = ##t fs'4  d8  }
> 
> not for a entire voice.  Also, I just want to
> adjust brackets, not _add_ a bracket to a triplet beam
> when a bracket is not required (perhaps that was not clear).
> 
> 

There's a bracket-visibility property that you can play around with (ie \once 
\override Voice . TupletBracket #'bracket-visibility = ##t)

> 
> > > Also, in the special case of B1, where I have two
> > > voices each with a triplet, notationally only one
> > > bracket is necessary.  Is there any way to make one
> > > of the bracket's "invisible" (like an "s" rest)?
> > >
> > \once \override Voice . TupletBracket #'transparent = ##t
> 
> Great; this worked _except_ that it just removed the
> bracket and _not_ the number in the center of the bracket.
> I would like to remove both.
> 

\once \override Voice . TupletNumber #'transparent = ##t

> 
> I will respond to the others soon.
> Thank you very much to everyone for their assistance!
> 

Every time someone suggests a property, you should try to find it in the 
notation reference (that's how I learned LilyPond).  By doing so, it'll give 
you better intuition as to how the program works and help you search for 
definitions of things that could be helpful.

Cheers,
Mike___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Completion_heads_engraver produces segmentation fault

2011-04-19 Thread m...@apollinemike.com
On Apr 19, 2011, at 7:25 AM, ornello wrote:

> 
> Hello again,
> 
> I thínk there is a wrong index is in completion-note-heads-engraver.cc, line
> 223:
> 
>   Pitch *p_last
> = unsmob_pitch (tie_note_candidate_events_[j]->get_property
> ("pitch"));
> 
> but should be
> 
>   Pitch *p_last
> = unsmob_pitch (tie_note_candidate_events_[i]->get_property
> ("pitch"));


Your suggestion is spot on - I've changed the code in the most recent 
development version to fix this.

Cheers,
MS


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


Re: Beaming problem introduced with 2.13.60

2011-04-20 Thread m...@apollinemike.com
On Apr 20, 2011, at 4:01 AM, flup2 wrote:

> 
> I had the same problem in a score with these notes :
> 
> d4-- c8->( g ~ g) g'->( f e)
> 
> I had no problem before 2.13.60
> 
> Philippe
> 

Your snippet compiles fine in the most recent development version.

Cheers,
MS

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


Re: Change print-appearance of chord members to different duration, but not the logic behind.

2011-04-25 Thread m...@apollinemike.com
On Apr 25, 2011, at 7:09 PM, Nils wrote:

> Hello,
> 
> The goal is to have a very simple way of creating mixed-duration chords.I do 
> not know of any way to do this in lilypond which does not involve different 
> voices.
> 
> So I want to change single notes in a  so that they appear as 
> different duration, but only as printed item. The duration of the whole 
> chord, Measure-calculation etc. should not be affected by this.
> 
> Is there some override to achieve this? 
> 
> Nils


{  }
{  }

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


Re: Change print-appearance of chord members to different duration, but not the logic behind.

2011-04-26 Thread m...@apollinemike.com
On Apr 26, 2011, at 6:04 AM, Nils wrote:

> Thank you for your answer. This is what I'm looking for.
> {  }
> because it respects notehead-styles.
> 
> The other method mentioned is limited to one style.
> 

The other one can use any glyph you'd like.

> Do you know how breve and longa can be produced with that? #breve or #0.5 
> does not give an error, but it also does not work.

{ <\tweak #'stencil #(lambda (grob) (grob-interpret-markup grob (markup 
#:musicglyph "noteheads.slmensural"))) f' a' c''> }

You can throw whatever you want in there...

{ <\tweak #'stencil #(lambda (grob) (grob-interpret-markup grob (markup 
#:musicglyph "clefs.G"))) f' a' c''> }

Cheers,
MS


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


Re: Change print-appearance of chord members to different duration, but not the logic behind.

2011-04-26 Thread m...@apollinemike.com
On Apr 26, 2011, at 6:27 AM, Nils Hammerfest wrote:

> Eventhough I thought I had prevented this it happened :)
> 
> That you can rewrite the notehead replacement to any glyph I want does not 
> change the fact that it is exactly the glyph/notehead I give it. Once the 
> enviroment changes I have to replace all the noteheads. Imagine this for a 
> complex piano score where you need this kind of mixed-duration chords. 
> Yes, I know I can use variables but its still less elegant than using 
> duration-log. 
> 
> Nils
> 
> 
> 
> On Tue, 26 Apr 2011 06:10:30 -0400
> "m...@apollinemike.com"  wrote:
> 
>> On Apr 26, 2011, at 6:04 AM, Nils wrote:
>> 
>>> Thank you for your answer. This is what I'm looking for.
>>> {  }
>>> because it respects notehead-styles.
>>> 
>>> The other method mentioned is limited to one style.
>>> 
>> 
>> The other one can use any glyph you'd like.
>> 
>>> Do you know how breve and longa can be produced with that? #breve or #0.5 
>>> does not give an error, but it also does not work.
>> 
>> { <\tweak #'stencil #(lambda (grob) (grob-interpret-markup grob (markup 
>> #:musicglyph "noteheads.slmensural"))) f' a' c''> }
>> 
>> You can throw whatever you want in there...
>> 
>> { <\tweak #'stencil #(lambda (grob) (grob-interpret-markup grob (markup 
>> #:musicglyph "clefs.G"))) f' a' c''> }
>> 
>> Cheers,
>> MS
>> 

Ah, I gotchya...I thought you wanted a method that could insert anything...

Negative duration logs get you breves and longas.

{ <\tweak #'duration-log #-1 f' a' c''>
<\tweak #'duration-log #-2 f' a' c''>
\override NoteHead #'style = #'mensural
<\tweak #'duration-log #-1 f' a' c''>
<\tweak #'duration-log #-2 f' a' c''>
}

Cheers,
MS


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


Re: Drawing systems...ERROR: In procedure min: ERROR: Wrong type: lilyvartmpbh

2011-04-26 Thread m...@apollinemike.com
On Apr 26, 2011, at 8:02 AM, Nick Payne wrote:

> This code used to work for me about a year ago, but when I try to build it 
> using 2.13.60, I get the weird error shown in the console log output at the 
> bottom. Is this a bug or not? I'm running 2.13.60 on Ubuntu 10.04 amd64.
> 
> %===
> \version "2.13.60"
> 
> % e.g. \spanbox #-8 #'(-1 . -1)
> spanbox = #(define-music-function (parser location yval shorten) (number? 
> pair?) #{
>\once \override TextSpanner #'style = #'line
>\once \override TextSpanner #'bound-details #'left #'text = \markup { 
> \draw-line #'(0 . $yval) }
>\once \override TextSpanner #'bound-details #'right #'text = \markup { 
> \draw-line #'(0 . $yval) }
>\once \override TextSpanner #'bound-details #'left #'padding = #(car 
> $shorten)
>\once \override TextSpanner #'bound-details #'right #'padding = #(cdr 
> $shorten)
> #})
> 
> \relative c' {
>\spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan
> }
> %===
> 
> Processing `/home/nick/lilypond/examples/box.ly'
> Parsing...
> Interpreting music...
> Preprocessing graphical objects...
> Finding the ideal number of pages...
> Fitting music on 1 page...
> Drawing systems...ERROR: In procedure min:
> ERROR: Wrong type: lilyvartmpbh


This should do the trick - the problem is that you need to quasiquote the list 
and then unquote the temp variable that lilypond uses to store yval.

spanbox = #(define-music-function (parser location yval shorten) (number? 
pair?) #{
   \once \override TextSpanner #'style = #'line
   \once \override TextSpanner #'bound-details #'left #'text = \markup { 
\draw-line #`(0 . ,$yval) }
   \once \override TextSpanner #'bound-details #'right #'text = \markup { 
\draw-line #`(0 . ,$yval) }
   \once \override TextSpanner #'bound-details #'left #'padding = #(car 
$shorten)
   \once \override TextSpanner #'bound-details #'right #'padding = #(cdr 
$shorten)
#})

\relative c' {
   \spanbox #-8 #'(-1 . -1) c4\startTextSpan c c c\stopTextSpan
}

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


Re: Is a cross-staff chord with ties possible in lilypond?

2011-04-27 Thread m...@apollinemike.com
On Apr 26, 2011, at 5:18 AM, David Kastrup wrote:

> Francisco Vila  writes:
> 
>> 2011/4/26 Helge Hafting :
>>> 2. Cross-staff chords could get simpler too. Switch staff inside
>>>   a chord, and lilypond would know to connect the stems.
>> 
>> Cross-staff chords is one of the very first features I tried in
>> lilypond and could not achieve.  I used to teach Finale and gave a
>> Satie example as an exercise to my students; when I switched to
>> lilypond I could not use the piece (first Gnossienne) any more, you
>> can not ask for such a complicated exercise at the initial stages of
>> learning, but it was fairly easy with the afore mentioned visual
>> package.  The idea was: you select a special tool, choose a measure
>> and a number of handles appear on noteheads. Then just drag and drop
>> notes onto the desired staff.  In lilypond we have not a syntax for
>> this but we do have one for simple cross staff voices, so I guess we
>> have a small step done towards this. Remember, however, that a syntax
>> is not by far all you need to have for a feature to work.
>> 
>> I'd be delighted to sponsor the feature.  ¿A price?
> 
> Staff changes are currently done by music events IIRC, meaning that they
> occur at a certain point of time.
> 
> With the current architecture of Lilypond, the most straightforward
> approach at the moment would appear to specify cross-staff notes via
> tweaks instead.
> 
> 

To get cross-staff ties, you have to change how/where the tie engraver is doing 
its work.  Check out:

\score {
<<
\new Staff = up \with { tieWaitForNote = ##t } \relative c' {
s2 2
}
\new Staff = down \with { tieWaitForNote = ##t } \relative c' {
a8 ~ [ b ~ \change Staff = up c ~ d ~ ] \change Staff = down
\override Stem #'cross-staff = ##t
\override Stem #'length = #20
2
}
>>
\layout {
\context { \Staff \consists "Tie_engraver" }
\context { \Voice \remove "Tie_engraver" }
}}

Cheers,
Mike


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


Re: Beam avoidance of other voices and stem length for beamed notes

2011-05-04 Thread m...@apollinemike.com

On May 4, 2011, at 3:16 PM, Nick Payne wrote:

> Latest LP development version has inconsistency. See below.
> 
> \version "2.13.61"
> 
> \relative c'' {
>\time 3/4
>\key d \minor
> <<
>{ 8 r  r s }
>\\
>{ d, r cis r r4 }
>\\
>{ g'8. f16 g8. bes16 a8. g16 }
> >>
> }
> 
> Nick

Hey Nick,

The disparity in results comes (I think) from the fact that the flag of the 
stem in the left example ends after the beam begins on the X axis, and thus, 
the beam collision engraver moves the beam up to avoid the entire stem+flag.  
In the second example, on the other hand, the flag's rightmost X point falls to 
the left of the beam's leftmost X point.

Cheers,
MS


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


Re: Beam avoidance of other voices and stem length for beamed notes

2011-05-05 Thread m...@apollinemike.com
On May 5, 2011, at 2:12 AM, Nick Payne wrote:

> On 05/05/11 13:21, m...@apollinemike.com wrote:
>> On May 4, 2011, at 3:16 PM, Nick Payne wrote:
>> 
>>> Latest LP development version has inconsistency. See below.
>>> 
>>> \version "2.13.61"
>>> 
>>> \relative c'' {
>>>\time 3/4
>>>\key d \minor
>>> <<
>>>{8 r  r s }
>>>\\
>>>{ d, r cis r r4 }
>>>\\
>>>{ g'8. f16 g8. bes16 a8. g16 }
>>> }
>>> 
>> The disparity in results comes (I think) from the fact that the flag of the 
>> stem in the left example ends after the beam begins on the X axis, and thus, 
>> the beam collision engraver moves the beam up to avoid the entire stem+flag. 
>>  In the second example, on the other hand, the flag's rightmost X point 
>> falls to the left of the beam's leftmost X point.
> Yes, that seems to be why, as if I add \once \override NoteColumn 
> #'force-hshift = #1 at the beginning of voice 2, then both beams intersect 
> the rests above. However, if the collision avoidance mechanism does shift the 
> note at the beginning of voice 2 horizontally, why doesn't it shift the note 
> far enough for the stem/beam to avoid the flag on the note in voice 1, given 
> that it manages to do so successfully for the second beat in the bar. Or is 
> that difference due to the notes in the two voices being a third apart on the 
> first beat but only a second apart on the second beat.
> 

Hey NIck,
Not to get too technical (but I'm gonna get too technical), the mechanism that 
decides the X placements of grobs (and thus the bleed-over of stems into a 
beam's X extent) does not have anything to do with LilyPond's beam collision 
algorithms.  You'd want to report two separate bugs: one about the fact that 
the horizontal shift of the stem is inconsistent, and one that the 
beam-collision-engraver kicks in for even minuscule overlaps in grobs' 
X-extents.

In this instance, if you put \once \override Beam #'collision-voice-only = ##t 
before the first beam, you're golden.  Meanwhile, I'm working on something for 
the next devel version that gets beams to avoid rests.

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


Re: Repeat alternative includes a tempo change

2011-05-05 Thread m...@apollinemike.com
On May 5, 2011, at 9:08 PM, Ken Smith wrote:

> I'm new to LilyPond (v2.12.3) and to music notation in general, so I'm just a 
> tad beyond the starting point on LilyPond's learning curve.  I'm scratching 
> my head now as to how to write the repeats in my learning testfile, 
> "Podmoskovnye Vechera", (Moscow Nights).  The melody has four verses, each 
> verse has two couplets (i.e., four stanzas per verse), with the second 
> couplet repeated in each of the four verses.  The repeats for the first three 
> verses are identical, but the repeat for the final verse includes a tempo 
> change (slower, sadly) with an octave upbeat at the end.  I'm only coding the 
> melody line for now; here's the code I've been using (time = 2/4):
>  
> \bar "|:"
> \repeat volta 4%% notation shows repeat for verses 1, 2, 
> 3, only
> {
> b4 cis4
> e8 d8 a4~a8
> e4 d8 \mbreak%% \mbreak defined in my  '%% Definitions' 
> block
> a'8. g16 bes4~bes4
> c8 bes8
> a4 g8 f8
> }
> \alternative%% notation shows repeat for verse 4
> {
> {a4 g8 f8 d2 }
> { d'2~d2\fermata }
> }
> \bar "||"
>  
> To get it right (volta showing verses 1 - 4, alternative showing verse 4 
> only) will I need to code the final couplet of verse 4 into \alternative?  Or 
> is there a better, more professional way to do it?
>  

Generally, alternative endings start on the first full measure during which a 
repeated section diverges.  It sounds like the solution would be to back the 
beginning of the alternative up one measure so that the changed upbeat can be 
part of the alternative.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: musicxml2ly - very little bug(s)

2011-05-06 Thread m...@apollinemike.com
On May 6, 2011, at 7:57 AM, Werner wrote:

> Hello,
> 
> musicxml2ly always brings in the paper-block „botton-margin“ instead of
> „bottom-margin“. Could somebody fix that? 
> 

Fixed in the most recent development version.

> Also I would prefere a line break to get 
> „ \clef "treble" \key as \major \time 3/4 
> es4 \bar "|" “
> instead of
> „ \clef "treble" \key as \major \time 3/4 es4 \bar "|" “
> as first lines inside a voice definition.
> 

This is a bit more complicated and hits at the issue of automated LilyPond code 
beautification, a road down which I went when I was doing my woodwind-diagram 
work and that is difficult to tackle.  I'm sure that the specific thing you're 
requesting is not difficult, but I think it'd be better to wait until 2.14.0 is 
out before we have a consolidated discussion about how to consistently get 
LilyPond to generate input language that is as beautiful as its music.

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


Re: footnotes?

2011-05-06 Thread m...@apollinemike.com
On May 6, 2011, at 12:20 PM, padovani wrote:

> Are the footnotes working on the last development version?
> Are there examples on how to use them?
> 

Yup.

If you check out the page 
http://lilypond.org/doc/v2.13/input/regression/collated-files.html and do a 
search for footnote, you'll see some files that'll give you a sense of how to 
use them.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Stem length on beamed notes incorrect in 2.13.61

2011-05-07 Thread m...@apollinemike.com
On May 7, 2011, at 1:49 AM, Nick Payne wrote:

> A bar excerpted from the Mertz guitar transcription of Ständchen. When I last 
> worked on this score about ten months ago, using 2.13.27, I didn't have the 
> problem with the beam on the notes in the middle voice being placed below the 
> stem of the note in the lower voice - the beam was placed along the bottom 
> line of the stave - see 2.13.27.png, a screen shot from the PDF I made at the 
> time:
> 
> \version "2.13.61"
> 
> \relative c'' {
>\time 3/4
> <<
>{ cis'2. }
>\\
>{ a,,2. }
>\\
>{ \stemDown a''8 e  e  e }
> >>
> }
> 
> Nick

Hang tight - the current git has this problem fixed, and it'll be fixed in the 
next version of LilyPond available on the website.

Cheers,
MS


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


Re: footnotes?

2011-05-07 Thread m...@apollinemike.com
On May 7, 2011, at 7:07 AM, luis jure wrote:

> 
> on 2011-05-06 at 13:02 m...@apollinemike.com wrote:
> 
>> Yup.
> 
> wow, that's great! i had no idea footnotes had been introduced in lilypond.

They snuck in when none of us were looking.

> 
>> you'll see some files that'll give you a sense of how to use them.
> 
> yes, sort of...
> 
> i found that this can be very useful:
> 
> \override FootnoteItem #'annotation-line = ##f
> 
> if you don't want the line connecting the footnote.
> 

Yup!  If you don't like the annotations right on the grobs and would rather 
have them overhead, this allows you to do :

\override FootnoteItem #'annotation-line = ##f
\footnoteGrob #'NoteHead #'(0 . 0) \markup { } \markup { \super * foo } a4^"*"

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


Re: Glissando no longer printed within graces?

2011-05-15 Thread m...@apollinemike.com
On May 14, 2011, at 4:02 PM, Xavier Scheuer wrote:

> Hi,
> 
> Since a few months I am using my own "glissandoGrace" grace-function
> to print glissando without starting note (I made this "modified" grace
> invisible, but the glissando visible).
> 
> Unfortunately I see that with 2.13.61 a glissando within a grace is no
> longer printed.
> 
> Here is a minimal example, output with 2.12 and 2.13 are in attachment.
> Is this intentional?  Or should it be considered as a bug ?
> 
>  %% MINIMAL EXAMPLE
>  %% glissando-within-grace
> 
>  % Just to actually *see* the glissando (minimum-length)
>  \once \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
>  \once \override Glissando #'minimum-length = #4
>  \grace c'8 c''4
> 
>  %% END OF MINIMAL EXAMPLE
> 
> 
> Cheers,
> Xavier
> 
> PS: Just as information, here is my "glissandoGrace" grace-function.
> 
> startGlissandoGraceMusic = {
>  \once \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
>  \once \override Glissando #'minimum-length = #4
>  \hideNotes
>  s1*0\glissando
> }
> stopGlissandoGraceMusic = {
>  \unHideNotes
>  s1*0
> }
> glissandoGrace = #(def-grace-function startGlissandoGraceMusic
> stopGlissandoGraceMusic
>   (_i "Create an invisible grace for glissando without starting note"))
> 

I think you left out the glissando

\version "2.13.61"
{
 \once \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
 \once \override Glissando #'minimum-length = #4
 \grace c'8 \glissando c''4
 \once \override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
 \once \override Glissando #'minimum-length = #4
 \grace \hideNotes c'8 \glissando \unHideNotes c''4
}


I get a good result in the most recent git.

Cheers,
Mike___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Lining up notes in disparate voices

2011-05-21 Thread m...@apollinemike.com
Hey all,

I'm using a trick from the LSR to print string harmonics, but I'm not getting 
the horizontal alignment I want between note columns (ideally everything should 
line up horizontally @ its center).  Any ideas on how to tweak this?

Cheers,
Mike

\relative c' {
<<
{
  \oneVoice
  1
}
\\
{
  \oneVoice
  \tiny
  \override Stem #'stencil = ##f
  \override Beam #'stencil = ##f
  \override Dots #'stencil = ##f
  \override ParenthesesItem #'font-size = #0
  \override NoteHead #'duration-log = 2
  <\parenthesize f''>1
}
  >>
}


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


Re: Notation convention: dotted notes, duplet or else?

2011-05-31 Thread m...@apollinemike.com
On May 31, 2011, at 11:17 AM, Xavier Scheuer wrote:

> Hi,
> 
> I have a question not about LilyPond itself but about notational
> conventions (rules).  Maybe you know better or I know some have great
> references such as Ted Ross or Gardner Read.
> 
> In 3/4 times, what would be the recommended notation of the following
> rhythm?
> 
>  \time 3/4
>  % proposal 1: dotted notes
>  c4. c4. |

I would never do this unless there was a longer section of hemiolas.

>  % proposal 2: tied notes
>  c4~ c8 c8~ c4 |

Lots of info.

>  % proposal 3: duplet
>  \times 3/2 { c4 c4 } |

Ditto - only in the case of hemiolas.

>  % proposal 4: mix (not "symmetric")
>  c4. c8~ c4 |
> 

This is what I do if there's only one measure.

Cheers,
MS

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


Rebroadcasting events from a single timestep

2011-06-16 Thread m...@apollinemike.com
Hey all,

I am working on a piece now where I need certain events to transmogrify into 
other events.  Specifically, whole-measure rests need to turn into 
multi-measure rests, and given the way that the piece is algorithmically 
generated, it would take a lot of time for me to change all of the `r' to `R' 
when this is the case.  I'd like to add a bit to rest-engraver.cc in the spirit 
of :

  if (to_boolean (get_property ("lazyMultiMeasureRests"))
  && (unsmob_moment (get_property ("measurePosition"))->main_part_ == 
Rational(0,0))
  && (unsmob_moment (get_property ("measureLength"))->main_part_ == 
unsmob_moment (rest_event_->get_property ("length"))->main_part_))
{
  Stream_event *mmrest_event_ = new Stream_event (ly_symbol2scm 
("multi-measure-rest-event"));
  mmrest_event_->set_property ("duration", rest_event_->get_property 
("duration"));
  mmrest_event_->set_property ("length", rest_event_->get_property 
("length"));
  mmrest_event_->set_property ("duration-log", rest_event_->get_property 
("duration-log"));
  mmrest_event_->unprotect ();
  context ()->event_source ()->broadcast (mmrest_event_);
  return;
}

However, when I do this, it does not seem that the multi-measure-rest-engraver 
hears the broadcast info.
I'm guessing this has something to do with how/when/where events are broadcasts 
in the grand scheme of things, but I'm not sure.  I see things called iterators 
in the source that may be valuable for this type of hack, but I have no clue 
how they work.  Any ideas on how to accomplish this sorta thing?

Cheers,
MS


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


Re: Rebroadcasting events from a single timestep

2011-06-16 Thread m...@apollinemike.com
On Jun 16, 2011, at 2:43 PM, Graham Percival wrote:

> On Thu, Jun 16, 2011 at 01:50:27PM +0200, m...@apollinemike.com wrote:
>> If only it were that easy...
>> I have also tweaked the rest engraver to do automatic rest grouping.
>> 
>> For example, if in my file I have
>> \time 4/4
>> d4 r8. r8 r16 r8 r2 r4 r2
>> 
>> What will be printed is
>> d4 r4 r2 r1
> 
> That sounds like a job for a scheme music function.
> 

It is certainly doable in Scheme insofar as one can create engravers in Scheme. 
 However, in order to pull this off, I need access to context properties like 
measureLength and timeSignatureFraction, which are only available (as far as I 
know) from translators/engravers..  The type of filtering in the two snippets 
below deal with music before it gets sent to an engraver.

>> This is why the event needs to be rebroadcasted - it changes the rest to r1 
>> in the engraver (not in the .ly file).
>> I could, of course, implement a crude parser in python that combines my 
>> rests into a new input file, but this would be doubleplusunfun.
> 
> It still really sounds like you should use a combination of
> http://lsr.dsi.unimi.it/LSR/Item?id=372
> http://lsr.dsi.unimi.it/LSR/Item?id=122
> 
> 
>> Right now, I can make this work by deleting the multi-measure-rest engraver 
>> and copying all the code to rest-engraver.  However, I'd like to keep the 
>> changes as minimal as possible in hopes that the useful parts can remain 
>> separable and become part of LilyPond.
> 
> Scheme would be good for that.  Also, that way somebody else could
> compile your scores without needing to custom-patch the C++ in
> their source code.  Granted, you're probably never going to want
> anybody else in the world to compile this particular score... but
> you never know.  What if those teenagers wanted to play with
> stuff, and you gave them a short exerpt of this composition?  It
> would be *way* easier if they could just download 2.14.1 and
> compile the .ly in there, instead of trying to work with the
> source code.
> 

True, but even if I rewrote the rest engraver in Scheme, the question would 
still stand about rebroadcasting an event.
I think there may be enough users who are lazy about how they write their rests 
that it'd be valuable to have auto-rest-making à la auto-beaming, so I may wind 
up making a patch out of all this.

>> My question still stands for anyone who has any idea if/how stream events 
>> can be rerouted to other engravers.
> 
> Sure, but you should ask that on the -devel list, not the -user
> list.
> 

Generally I consult -user when it has to do with my composition activities, but 
you're right that the people one devel are those who wrote the whole 
translator/engraver/iterator system.  cc'ed to devel :)

Cheers,
MS


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


Re: Rebroadcasting events from a single timestep

2011-06-16 Thread m...@apollinemike.com
On Jun 16, 2011, at 12:58 PM, Graham Percival wrote:

> On Thu, Jun 16, 2011 at 11:01:18AM +0200, m...@apollinemike.com wrote:
>> I am working on a piece now where I need certain events to transmogrify into 
>> other events.  Specifically, whole-measure rests need to turn into 
>> multi-measure rests, and given the way that the piece is algorithmically 
>> generated, it would take a lot of time for me to change all of the `r' to 
>> `R' when this is the case.  I'd like to add a bit to rest-engraver.cc in the 
>> spirit of :
> 
> This looks like using a tactical nuke to swat a fly.  Why not
> write a plain old music function (in your .ly file) which changes
> the events?  I see no reason to mess with C++ stuff here...?
> 
> (obviously you'd add that music function to your
> algorithm-exporting code as well, but that's a minor issue)
> 

If only it were that easy...
I have also tweaked the rest engraver to do automatic rest grouping.

For example, if in my file I have
\time 4/4
d4 r8. r8 r16 r8 r2 r4 r2

What will be printed is
d4 r4 r2 r1

This is why the event needs to be rebroadcasted - it changes the rest to r1 in 
the engraver (not in the .ly file).
I could, of course, implement a crude parser in python that combines my rests 
into a new input file, but this would be doubleplusunfun.

Right now, I can make this work by deleting the multi-measure-rest engraver and 
copying all the code to rest-engraver.  However, I'd like to keep the changes 
as minimal as possible in hopes that the useful parts can remain separable and 
become part of LilyPond.

My question still stands for anyone who has any idea if/how stream events can 
be rerouted to other engravers.  The only solution I'm ruling out (for now) is 
the creation of a dummy grob that is created in the rest engraver and 
acknowledged in the multi measure rest engraver - I tried it once to 
communicate between the auto-beam and beam-collision engravers and people were 
not fans.

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


Very short lilypond snippets in LaTeX

2011-06-21 Thread m...@apollinemike.com
Hey all,

I am lilypond-booking a latex document where I endeavor to insert short 
snippets into fragments of text :

The dynamic should be between
\begin{lilypond}
\markup { \dynamic "ppp" }
\end{lilypond}
and
\begin{lilypond}
\markup { \dynamic "pp" }
\end{lilypond}
.

The typeset result is not nearly as nice as \markup { The dynamic should be 
between \dynamic "ppp" and \concat { \dynamic "pp" .} }.  I'd like to achieve 
this, but in LaTeX w/o too much hard-coded tweakery.  Thoughts?

The reason I can't use the native lilypond is because all of this is going into 
a table, and I don't want to go down the slippery slope of reimplementing latex 
in lilypond thru markup commands.

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


Re: Position of slur between two notes in different chords

2011-06-21 Thread m...@apollinemike.com
On Jun 21, 2011, at 1:26 PM, Markus Pfaff wrote:

> A slur from one chord to another is positioned relative to the complete chord.
> 
> In my opinion this reduces readability of the score. Shouldn't the slur go 
> from the note inside of the chord wich it actually starts on to the note 
> which it actually ends on (from a to bes in attached example for flamenco 
> guitar)?

Hey Markus,

Slurs only make sense insofar as they act on individual voices.  To improve the 
readability of your score, you could either :

(1) put the two slurred in a second voice
(2) create a glissando just between the a and bes & remove the slur

Option (2) comes up a fair bit in guitar music.

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


Re: footnoteGrob allowed Grob names

2011-06-24 Thread m...@apollinemike.com
On Jun 24, 2011, at 10:15 AM, Jan-Peter Voigt wrote:

> Hello list,
> 
> I am now using lilypond 2.14 and have a question to the newly introduced 
> \footnote command:
> What grobnames are allowed?
> The following works as expected:
> --snip--
> \relative c'' {
>\footnoteGrob #'NoteHead #'(1 . 1) \markup { \super "*" } \markup { \line 
> { \super "*" my explanation} } c
>\footnoteGrob #'Rest #'(1 . 1) \markup { \super "*" } \markup { \line { 
> \super "*" my explanation} } r1
> }
> --snip--
> 
> But the following does not expose a footnote:
> --snip--
> \relative c'' {
>\footnoteGrob #'MultiMeasureRest #'(1 . 1) \markup { \super "*" } \markup 
> { \line { \super "*" my explanation} } R1
> }
> --snip--
> 
> And is there a way to use footnotes in lyrics?
> 
> Cheers, Jan-Peter
> 

Hey Peter,

As you correctly point out, \footnote is new, and there are a few kinks to work 
out (you may be the first person who's tried them on these grobs).  The goal is 
for the syntax you've used to work for every grob (or to issue a message 
stating why it can't work for a given grob).  If you report this to the bug 
list, it'll likely be worked on in the not-too-distant future.

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


Re: Complex cross-rhythms

2011-06-28 Thread m...@apollinemike.com
On Jun 28, 2011, at 12:07 PM, Brian Lenth wrote:

> Hello everybody,
> 
> I'm attempting to create a score that uses simultaneous multiple tempi, at a 
> ratio of 5:7. As a test, I made this (see code below). Basically it uses the 
> ridiculous time signature of 42/4, with barlines inserted to create an 
> artificial independent meter for each staff. It looks beautiful, but the 
> problem is: put in shorter note values than these dotted quarters (sixteenths 
> etc) and there isn't enough room on the line to render the music; it all just 
> runs off the page, in other words, it doesn't want to break the line in 
> mid-bar (as I'm using ridiculously long measures to simulate polytempi). I've 
> read everything the Notation Reference has to offer about forcing line 
> breaks. But for some reason it doesn't let me break the line during active 
> note events (removing Forbid_line_break_engraver only seems to work across 
> "actual" automatic barlines, not ones I've put in). Does anybody have any 
> advice here? Is there a way to get more control over breaking my lines? Or 
> better yet, is there a way to do these kinds of polytempi without using 
> 8497/8 time?
> 
> Thanks,
> brian
> 
> 
> PartA = \new Voice \relative c'' {
>   \clef treble
>   \time 42/4
>   \set Staff.instrumentName = #"Part A "
>   \set Staff.timeSignatureFraction = #'(12 . 8)
>   \scaleDurations #'(7 . 5) {
> c4.^\markup { \note #"4." #1 " = 60" } c c c \bar "|"
> c c c c \bar "|"
> c c c c \bar "|"
> c c c c \bar "|"
> c c c c
>   }
> }
> PartB = \new Voice \with {
>   \remove Forbid_line_break_engraver
>   } \relative c'' {
>   \clef treble
>   \set Staff.instrumentName = #"Part B "
>   \time 42/4
>   \set Staff.timeSignatureFraction = #'(12 . 8)
>   \override Beam #'breakable = ##t
>  
>   g4.^\markup { \note #"4." #1 " = 84" } g g g \bar "|"
>   g g g g \bar "|"
>   g g g g \bar "|"
>   g g g g \bar "|"
>   g g g g \bar "|"
>   g g g g \bar "|"
>   g g g g
> }
> \score {
>   <<
> \new Staff \PartA
> \new Staff \PartB
>   >>
> }
> \layout {
>   \context {
> \Score
> \remove "Timing_translator"
> \remove "Default_bar_line_engraver"
>   }
>   \context {
> \Staff
> \consists "Timing_translator"
> \consists "Default_bar_line_engraver"
>   }
>   \context {
> \Voice
> \remove "Forbid_line_break_engraver"
>   }
> }

You'd have to fiddle with the length of the material in the variable `bars', 
but this sorta thing does the trick :

bars = {\repeat unfold 150 { s8 \bar "" } }
PartA = \new Voice \relative c'' {
  \clef treble
  \time 42/4
  \set Staff.instrumentName = #"Part A "
  \set Staff.timeSignatureFraction = #'(12 . 8)
  \scaleDurations #'(7 . 5) {
c4.^\markup { \note #"4." #1 " = 60" } \repeat unfold 6 { c8 } \repeat 
unfold 6 { c8 } \repeat unfold 6 { c8 } \bar "|"
\repeat unfold 6 { c8 } \repeat unfold 6 { c8 } \repeat unfold 6 { c8 } 
\repeat unfold 6 { c8 } \bar "|"
\repeat unfold 6 { c8 } \repeat unfold 6 { c8 } \repeat unfold 6 { c8 } 
\repeat unfold 6 { c8 } \bar "|"
\repeat unfold 6 { c8 } \repeat unfold 6 { c8 } \repeat unfold 6 { c8 } 
\repeat unfold 6 { c8 } \bar "|"
\repeat unfold 6 { c8 } \repeat unfold 6 { c8 } \repeat unfold 6 { c8 } c4.
  }
}
PartB = \new Voice \with {
  \remove Forbid_line_break_engraver
  } \relative c'' {
  \clef treble
  \set Staff.instrumentName = #"Part B "
  \time 42/4
  \set Staff.timeSignatureFraction = #'(12 . 8)
  \override Beam #'breakable = ##t
 
  g4.^\markup { \note #"4." #1 " = 84" } \repeat unfold 6 { g8 } \repeat unfold 
6 { g8 } \repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } 
\repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } 
\repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } 
\repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } 
\repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } 
\repeat unfold 6 { g8 } \bar "|"
  \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } \repeat unfold 6 { g8 } g4.
}
\score {
  <<
\new Staff << \PartA \bars >>
\new Staff \PartB
  >>
}
\layout {
  \context {
\Score
\remove "Timing_translator"
\remove "Default_bar_line_engraver"
  }
  \context {
\Staff
\consists "Timing_translator"
\consists "Default_bar_line_engraver"
  }
  \context {
\Voice
\remove "Forbid_line_break_engraver"
  }
}

Cheers,
MS

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


Re: help with pitchedtrill

2011-06-29 Thread m...@apollinemike.com
On Jun 29, 2011, at 3:27 PM, Alex Jones wrote:

> Couple of questions:
> I'm trying to use pitchedTrill, but its creating a problem when I have a tie 
> coming off the note:
> 
> score.ly:125:88: warning: unterminated tie
> \pitchedTrill d4~ \startTrillSpan \! ees d16 \stopTrillSpan b (g ees 
> \pitchedTrill d4~) 
>   
> \startTrillSpan ees d16 \stopTrillSpan b (g a)
> 
> The score comes out ok, but I get the above warning.
> 
> What I really want is the trill with a flat sign, but I didn't figure that 
> one out.

You can put a markup above the note:

a4\trill^\markup { \flat }

or

a4\startTrillSpan^\markup { \flat } a4\stopTrillSpan

> 
> Also, is there a workaround to get a break where you have a glissando?

\override Glissando #'breakable = ##t

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


Re: fret diagrams for scales and arpeggios - using finger numbers as intervals

2011-06-30 Thread m...@apollinemike.com
Have you tried

(markup #:flat)

?

I'm not sure if it'll work, but it's worth a shot!

Cheers,
MS

On Jun 30, 2011, at 3:52 PM, Jay Lee wrote:

> I've tried various kinds of syntax, but can't seem to include the \flat 
> symbol.
> 
> \addChordShape#'DominantSeventh
>   #ukulele-tuning
>   #'(
>   (place-fret 4 1 5)
>   (place-fret 4 4 "b7")
>   (place-fret 4 6 "R")
>   (place-fret 4 10 3)
>   (place-fret 4 13 5)
>   (place-fret 4 16 "b7")
>   (place-fret 3 1 "R")
>   (place-fret 3 5 3)
>   (place-fret 3 8 5)
>   (place-fret 3 11 "b7")
>   (place-fret 3 13 "R")
>   (place-fret 2 1 3)
>   (place-fret 2 4 5)
>   (place-fret 2 7 "b7")
>   (place-fret 2 9 "R")
>   (place-fret 2 13 3)
>   (place-fret 2 16 5)
>   (place-fret 1 2 "b7")
>   (place-fret 1 4 "R")
>   (place-fret 1 8 3)
>   (place-fret 1 11 5)
>   (place-fret 1 14 "b7")
>   (place-fret 1 16 "R")
>   )
> 
> \storePredefinedDiagram #default-fret-table \chordmode { des'':7 }
>   #ukulele-tuning
>   #(chord-shape 'DominantSeventh ukulele-tuning)
> 
> 
> 
> ___
> 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: Fermata over parallel barlines

2011-07-01 Thread m...@apollinemike.com
Yup!

\score {
\new ChoirStaff<<
\new Staff \with { \consists "Mark_engraver" } { R1 \mark \markup { \musicglyph 
#"scripts.ufermata" } R1 }
\new Staff \with { \consists "Mark_engraver" } { R1 \mark \markup { \musicglyph 
#"scripts.ufermata" } R1 }
\new Staff \with { \consists "Mark_engraver" } { R1 \mark \markup { \musicglyph 
#"scripts.ufermata" } R1 }
\new Staff \with { \consists "Mark_engraver" } { R1 \mark \markup { \musicglyph 
#"scripts.ufermata" } R1 }
>>
\layout { \context { \Score \remove "Mark_engraver" } }
}

Cheers,
MS

On Jul 1, 2011, at 11:48 AM, Hilary Snaden wrote:

> Is it possible to place a fermata over barlines in more than just the top 
> staff in a system? (In this case over all of the staffs in a choirstaff.)
> 
> -- 
> Hilary Snaden
> 
> ___
> 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: Odd-looking tie on a chord

2011-07-04 Thread m...@apollinemike.com
On Jul 4, 2011, at 11:45 AM, Dmytro O. Redchuk wrote:

> On Mon 04 Jul 2011, 15:39 James Harkins wrote:
>> \version "2.14.1"
>> 
>> \include "english.ly"
>> 
>> \score {
>> \new Staff {
>>   \key d \major
>>   \numericTimeSignature
>>   \time 4/4
>>   r4
>>   \times 4/5 { 16\< > d'' b''>~ }
>>   16 8.
>> 
>>   %% Here: the tie on the D's looks funny
>>   %% Too tall? Left-hand endpoint is not aligned with the B tie?
>>   ~ 
>> 
>>   8 [ ->\mf ]
>> }
>> }
>> 
>> It looks even funnier at lower resolution, somewhat better when viewed up 
>> close.
>> 
>> I'm aware of \override TieColumn #'tie-configuration but would just as soon 
>> avoid it if possible.
> I found this is an instance of known issue, 1126:
> http://code.google.com/p/lilypond/issues/detail?id=1126
> 
> I have added your example there thougth.
> 
> Thank you!

Hey James,

Ties, like beams and stems, vary widely in terms of aesthetic preference, and 
LilyPond offers a few properties to help express these preferences through 
various minima, maxima, and penalties.

Try setting:
\override Tie #'details #'outer-tie-length-symmetry-penalty-factor = #0

before your chords - I think this may be what you're after.

Here is a list of all the factors and their default settings :

   (ratio . 0.333)
   (center-staff-line-clearance . 0.6)
   (tip-staff-line-clearance . 0.45)
   (note-head-gap . 0.2)
   (stem-gap . 0.35)
   (height-limit . 1.0)
   (horizontal-distance-penalty-factor . 10)
   (same-dir-as-stem-penalty . 8)
   (min-length-penalty-factor . 26)
   (tie-tie-collision-distance . 0.45)
   (tie-tie-collision-penalty . 25.0)
   (intra-space-threshold . 1.25)
   (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
   (outer-tie-length-symmetry-penalty-factor . 10)
   (vertical-distance-penalty-factor . 7)
   (outer-tie-vertical-gap . 0.25)
   (multi-tie-region-size . 3)
   (single-tie-region-size . 4)
   (between-length-limit . 1.0)

We always strive to have the best out-of-the-box result possible, so if you 
feel after experimenting with these settings that you arrive at a result that 
is more akin to what you see in musical rep, send us a scan of the rep and the 
parameters you used to get there and we can start considering how to encode 
this (these) exception(s) in LilyPond's default output.

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


Re: Cowell/Ferneyhough Unconventional Meters

2011-07-04 Thread m...@apollinemike.com
On Jul 5, 2011, at 8:29 AM, Joey wrote:

> Just wondering if Lilypond can handle this type of situation;
> 
> In Ferneyhough's etudes transcendentales,
> he employs meters such as 2/12 or 2/10,
> acting as literal subdivisions of the semi-breve.
> This of course translates to n-tuplets,
> but frees up the score (and mind) a 
> bit so that one can really focus on
> a clear nested tuplet formation/interpretation
> within the general overview of a tuplet-based meter 
> without a general increase in tempo (as one would get in compound 
> time if adhering to the same principle).
> 
> I'm just curious if Lilypond would be able 
> to handle something along these lines.
> 
> 
> Basically I'm simply looking for the ability
> to notate "n/m" meter without much trouble.
> 
> Thanks!
> 

Hey Joey,

The easiest way would be to create an override for the time signature stencil:
{
\time 2/8
\once \override Score . TimeSignature #'stencil =
#(lambda (grob) (grob-interpret-markup grob (markup #:override '(baseline-skip 
. 0) (#:center-column (#:number "2" #:number "10")
b8 b
}

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


Re: Cowell/Ferneyhough Unconventional Meters

2011-07-05 Thread m...@apollinemike.com
On Jul 5, 2011, at 11:45 AM, Joseph Wakeling wrote:

> On 07/05/2011 08:57 AM, m...@apollinemike.com wrote:
>> On Jul 5, 2011, at 8:29 AM, Joey wrote:
>> 
>>> In Ferneyhough's etudes transcendentales,
>>> he employs meters such as 2/12 or 2/10,
>>> acting as literal subdivisions of the semi-breve.
>> 
>> The easiest way would be to create an override for the time signature 
>> stencil:
> 
> No, you don't need to be so complicated. :-)
> 
> 

True, but I say "easiest" because the solution of creating a non-standard time 
signature will lead to a lot of changing between dead and not-dead tuplet 
stencils.

nixtup = {\once \override TupletBracket #'stencil = ##f \once \override 
TupletNumber #'stencil = ##f }
{
   \time 2/10
   \nixtup
   \times 4/5 { c'8 c'8 }
   \nixtup
   \times 4/5 { c'8 c'8 }
   \nixtup
   \times 4/5 {
 % no nix tup because this is a nested tuplet that we want to see.
 \times 2/3 { c'8 c'8 c'8 }
   }
}

Whereas the time signature stencil change avoids this sort of book-keeping.

However, if you are harvesting data from engravers and/or using MIDIs, then 
Joseph is absolutely right - \time 2/10 is the best way to do it.

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


Re: aleatoric squiggles

2011-07-07 Thread m...@apollinemike.com
Karim Barkati  is currently typesetting a score not 
unlike this for viola & electronics.  I'm ccing him to this e-mail: his 
approach also uses glissandi and looks really nice.

For the arrow:
\relative c' {\override Glissando #'bound-details #'right #'arrow = ##t c1 
\glissando s1 c1 }

For the cuing, if the glissando is always gonna be flat, try:

\relative c' {
\override Glissando #'bound-details #'right #'padding = #0
\override Glissando #'bound-details #'left #'padding = #0
f4 \glissando
\override Voice . NoteHead #'stencil = #(ly:make-stencil '() '(0 . 0) '(0 . 0))
\override Voice . Stem #'stencil = ##f
\repeat unfold 22 { f4 \glissando }
\revert Voice . NoteHead #'stencil
f4
}

Karim does something like this - it allows you to break the glissando at any 
given beat and still have it in cued voices.

Cheers,
MS

On Jul 7, 2011, at 10:06 AM, James Harkins wrote:

> Google let me down on this one -- I'm looking for some advice on notating 
> aleatoric materials. The piece is for the Chinese instrument sheng and live 
> electronics (computer running SuperCollider). Many of the computer materials 
> will start at a specific point in the score, but the exact notes and rhythms 
> will be different from performance to performance.
> 
> This is close, but seems a little messy. Any ways to clean it up? Also, I 
> think it won't work if I want to quote a portion including the glissando line 
> as cue notes within another staff (\cueDuring). Would be really nice to have 
> a solution that could be cued.
> 
> \version "2.14.1"
> 
> \score {
>  \new Staff \with {
>\override Glissando #'style = #'trill
>  } {
><<
>  \new Voice {
>   \voiceOne \stemNeutral
>   b'2\rest d''8 [ a' d'' e'' ]
>   \glissando s2.. 
>   \once \override Stem #'transparent = ##t
>   \once \override NoteHead #'transparent = ##t
>   e''8
>  }
>  \new Voice {
>   \voiceTwo \stemNeutral
>   s1
>   s2.. b'8\rest
>  }
>>> 
>  }
> }
> 
> Also, I'd really like to have an arrowhead at the end of the glissando. I can 
> find the arrow "sub property" of the line spanner interface, but I'm not 
> clever enough to figure out how to use it without an example.
> 
> Thanks,
> James
> 
> PS (Yes, I'm aware of relative mode for pitch entry... it just didn't seem 
> worth it to me for this example.)
> 
> 
> --
> James Harkins /// dewdrop world
> jamshar...@dewdrop-world.net
> http://www.dewdrop-world.net
> 
> "Come said the Muse,
> Sing me a song no poet has yet chanted,
> Sing me the universal."  -- Whitman
> 
> blog: http://www.dewdrop-world.net/words
> audio clips: http://www.dewdrop-world.net/audio
> more audio: http://soundcloud.com/dewdrop_world/tracks
> 
> ___
> 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: aleatoric squiggles

2011-07-07 Thread m...@apollinemike.com
On Jul 7, 2011, at 2:16 PM, James Harkins wrote:

> At Thu, 7 Jul 2011 10:21:01 +0200,
> m...@apollinemike.com wrote:
>> 
>> Karim Barkati  is currently typesetting a score not 
>> unlike this for viola & electronics.  I'm ccing him to this e-mail: his 
>> approach also uses glissandi and looks really nice.
>> 
>> For the arrow:
>> \relative c' {\override Glissando #'bound-details #'right #'arrow = ##t c1 
>> \glissando s1 c1 }
>> 
>> For the cuing, if the glissando is always gonna be flat, try:
>> 
>> \relative c' {
>> \override Glissando #'bound-details #'right #'padding = #0
>> \override Glissando #'bound-details #'left #'padding = #0
>> f4 \glissando
>> \override Voice . NoteHead #'stencil = #(ly:make-stencil '() '(0 . 0) '(0 . 
>> 0))
>> \override Voice . Stem #'stencil = ##f
>> \repeat unfold 22 { f4 \glissando }
>> \revert Voice . NoteHead #'stencil
>> f4
>> }
> 
> Not bad, though the glisses don't always join exactly. I won't be too fussy 
> at this stage.
> 

That's odd...they should.  Could you send an example of them not joining up?

Cheers,
MS


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


Re: Suggestions for a Contemporary Music Font

2011-07-10 Thread m...@apollinemike.com
On Jul 10, 2011, at 4:34 PM, Bernardo Barros wrote:

> I'm thinking of creating a font for contemporary music with the most
> commonly used symbols.
> I miss a lot of specific symbols and I'm sure a lot of LilyPond users do too.
> 

This is a fantastic idea.

> I know that there are some sources for this purpose, and find them very 
> useful.
> But most are bloated with not very useful symbols, while very common
> things are missing.
> 
> I know of Controla, Sonora fonts, for instance
> [http://www.music-notation.info/en/fonts/Controla.html]
> Both with really useful symbols.
> 

If these are free fonts, I'd recommend finding out what license they're under.  
If they're under a flexible license, you could start by tracing a hi-res bitmap 
in FontForge and tweaking those vector graphics to your heart's content.  The 
easiest way to get them into LilyPond would be to get them into MetaFont via 
FontForge.

> If anyone wants to contribute, it would be interesting to put this
> source in some repository (github or similar),
> so more users could all contribute, review, discuss and use the work.
> 

You've likely already covered many of the important bases.  I'm looking forward 
to seeing, using, and contributing to what you cook up!

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: how to change gap between beams?

2011-07-13 Thread m...@apollinemike.com
On Jul 13, 2011, at 1:48 PM, Janek Warchoł wrote:

> Is it possible to change gap between beams (i.e. the distance between the 
> lines) painlessly?
> \override Beam #'gap = #2 doesn't work, i don't find anything in LSR nor 
> Internals...
> 
> cheers,
> Janek

You have to override the Beam #'length-fraction property.

Cheers,
MS


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


Re: problem with svg-output

2011-07-18 Thread m...@apollinemike.com
On Jul 18, 2011, at 2:23 PM, Stefan Thomas wrote:

> Dear community,
> when I compile the following file with 
> lilypond -dbackend=svg
> the svg-output looks different to the pdf, I've compiled with lilypond.
> The symbol for "muchair" is not displayed correctly.
> Here the example:
> 
> \version "2.14.1"
> %% note with air
> 
> #(define (airohalf radius height thick)
> (string-append "gsave
> /msellipse {
>   /endangle exch def
>   /startangle exch def
>   /yrad exch def
>   /xrad exch def
>   /y exch def
>   /x exch def
>   /savematrix matrix currentmatrix def
>   x y translate
>   xrad yrad scale
>   0 0 1 startangle endangle arc
>   savematrix setmatrix
>   } def
> /rad " (number->string radius) " def
> /offset " (number->string height) " rad mul def
> /ecenter 0 offset add def
> /xradius rad rad mul offset offset mul sub sqrt def
> /yradius rad offset sub def
> " (number->string thick) " setlinewidth
> currentpoint translate
> 0 0 moveto
> newpath
> 0 rad rad 0 360 arc
> fill
> 0 rad translate
> 1 1 1 setcolor
> newpath
> 0 ecenter xradius yradius 0 -180 msellipse
> closepath
> fill
> 0 0 rad sub translate
> 0 0 0 setcolor
> newpath
> 0 rad rad 0 360 arc
> stroke
> grestore"))
> 
> #(define (airuhalf radius height thick)
> (string-append "gsave
> /msellipse {
>   /endangle exch def
>   /startangle exch def
>   /yrad exch def
>   /xrad exch def
>   /y exch def
>   /x exch def
>   /savematrix matrix currentmatrix def
>   x y translate
>   xrad yrad scale
>   0 0 1 startangle endangle arc
>   savematrix setmatrix
>   } def
> /rad " (number->string radius) " def
> /offset " (number->string height) " rad mul def
> /ecenter 0 offset sub def
> /xradius rad rad mul offset offset mul sub sqrt def
> /yradius 0 rad offset sub sub def
> " (number->string thick) " setlinewidth
> currentpoint translate
> 0 0 moveto
> newpath
> 0 rad rad 0 360 arc
> stroke
> 0 rad translate
> newpath
> 0 ecenter xradius yradius 0 -180 msellipse
> closepath
> fill
> grestore"))
> 
> 
> #(define-markup-command (airytone layout props radius height thick)
>(number? number? number?)
>(let ((longstring ""))
>  (set! height (max (min height 1) 0))
>  (if (> height 0.5)
>  (set! longstring (airohalf radius (* 2 (- height 0.5)) thick))
>  (set! longstring (airuhalf radius (- 1 (* 2 height)) thick)))
>  (ly:make-stencil
>   (list 'embedded-ps longstring)
>   (cons 0 0) (cons 0 2
> 
> muchair =  \markup { \airytone #1.0 #1.0 #0.1 }  
> motiv =  { \times 4/5 {a32-.->\f [ b-.  c'-.   cis'-.   d'-.   ]} }
> \new Staff {
>   \override TextSpanner #'(bound-details left text) = \muchair % der Text, 
> mit der TextSpanner beginnt
> r2 r4 r8  \context Voice << {\motiv} {s8 \startTextSpan  }>> \times 4/5 { 
> cis' 32-.   d'-.   es'-.   \stopTextSpan   r16   } r8 r4 r2 
>   
> } 

You cannot use the embedded-ps command in an SVG (PS does not embed in SVG).
Given that these are drawing simple circles and not ellipses, you can rewrite 
this using LilyPond stencil commands.  These commands will export to all 
backends.

Cheers,
MS


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


Re: Basic function question

2011-07-26 Thread m...@apollinemike.com
On Jul 26, 2011, at 10:14 AM, Urs Liska wrote:

> Hello list members,
> 
> after fiddling around too long and getting lost with the basics, I decided to 
> ask my question here.
> I know it's basic, and I wonder why I get stuck this way, but obviously I'm 
> confused and unable to find the right place in the docs.
> 
> I want to write a function "instr" to produce formatted markup that I can use 
> like
> 
> { c d e f^\instr "Vl." }
> 
> which should be translated to (e.g.)
> 
> { c d e f^\markup \bold \italic \huge { "Vl." } }
> 
> Unfortunately I seem absolutely unable to find out how to define the function 
> so I can attach it to the note like in the example.
> 
> Hopefully someone can either give me a working example or point me to the 
> exact location in the docs where I can fully understand this issue.
> 
> Thanks in advance
> Urs

To do this, you need to use a music function.

instr = #(define-music-function (parser location m s) (ly:music? string?)
  (make-music 'EventChord 'elements (append (ly:music-property m 'elements)
(list (make-music 'TextScriptEvent 
'direction 1

'text (markup #:huge #:bold #:italic s))

\instr a4 "foo"

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


Re: Error opening 2.14.2

2011-07-26 Thread m...@apollinemike.com
On Jul 26, 2011, at 3:55 PM, Paul Morris wrote:

> Upon opening LilyPond 2.14.2 I got the following error.  (OSX 10.7)
> 
> LilyPond Error
> An unexpected error has occurred during execution of the main script
> 
> ImportError: 
> dlopen(/Applications/LilyPond.app/Contents/Resources/lib/python2.6/lib-dynload/objc/_objc.so,
>  2): Symbol not found: _objc_sync_notify
>  Referenced from: 
> /Applications/LilyPond.app/Contents/Resources/lib/python2.6/lib-dynload/objc/_objc.so
>  Expected in: /usr/lib/libobjc.A.dylib
> 
> 
> Any ideas how to fix?
> Thanks,
> Paul
> 

I think the problem is with the LilyPond GUI.
Open your terminal application, cd to the folder with your score, and type
/Applications/LilyPond.app/Contents/Resources/bin/lilypond 

for example, if my score were called "foo.ly", i'd type

/Applications/LilyPond.app/Contents/Resources/bin/lilypond foo.ly

Rename your score to something without spaces - otherwise, it's difficult to 
get it typed in correctly to the command line.

This should work, and if it doesn't and if you're desperate to get a score 
compiled before the problem in the GUI is fixed, I'm running 10.7 right now and 
the LilyPond distro from brew (http://mxcl.github.com/homebrew/) works 
flawlessly.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: vector graphics spanner / OSX /packaged LP (2.15.5-1)

2011-07-26 Thread m...@apollinemike.com
On Jul 26, 2011, at 4:08 PM, padovani wrote:

> Hello mike,
> 
> I want to try you vgs on Lilypond 2.15.5-1 (packaged .app) / OSX 10.6.7.
> 
> I've installed guile 1.8.7 and glpk 4.45 through macports.
> Do I need to change vgs Makefile or the configure file in some way? If yes, 
> how exactly?
> 
> I as because when I run it, it gives me the following error about libglpk..
> 
> "checking for glp_simplex in -lglpk... no
> configure: error: libglpk is needed to compile"
> 
> (BTW, I have those libglpk files on my system..
> opt/local/lib/libglpk.0.dylib
> opt/local/lib/libglpk.la
> opt/local/lib/libglpk.a)
> 
> below is the entire log...
> 
> thank you for any tips,
> 
> josé henrique
> 
> zzz:vector-graphic-spanner ze$ ./configure
> checking for a BSD-compatible install... /opt/local/bin/ginstall -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
> checking for gawk... no
> checking for mawk... no
> checking for nawk... no
> checking for awk... awk
> checking whether make sets $(MAKE)... yes
> checking for g++... g++
> checking for C++ compiler default output file name... a.out
> checking whether the C++ compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking for style of include used by make... GNU
> checking dependency style of g++... gcc3
> checking build system type... i386-apple-darwin10.6.0
> checking host system type... i386-apple-darwin10.6.0
> checking for gcc... gcc
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking dependency style of gcc... gcc3
> checking for a sed that does not truncate output... /opt/local/bin/gsed
> checking for grep that handles long lines and -e... /usr/bin/grep
> checking for egrep... /usr/bin/grep -E
> checking for fgrep... /usr/bin/grep -F
> checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
> checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU 
> ld... no
> checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
> checking the name lister (/usr/bin/nm) interface... BSD nm
> checking whether ln -s works... yes
> checking the maximum length of command line arguments... 196608
> checking whether the shell understands some XSI constructs... yes
> checking whether the shell understands "+="... yes
> checking for /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld option to reload 
> object files... -r
> checking for objdump... no
> checking how to recognize dependent libraries... pass_all
> checking for ar... ar
> checking for strip... strip
> checking for ranlib... ranlib
> checking command to parse /usr/bin/nm output from gcc object... ok
> checking for dsymutil... dsymutil
> checking for nmedit... nmedit
> checking for lipo... lipo
> checking for otool... otool
> checking for otool64... no
> checking for -single_module linker flag... yes
> checking for -exported_symbols_list linker flag... yes
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking for dlfcn.h... yes
> checking whether we are using the GNU C++ compiler... (cached) yes
> checking whether g++ accepts -g... (cached) yes
> checking dependency style of g++... (cached) gcc3
> checking how to run the C++ preprocessor... g++ -E
> checking for objdir... .libs
> rm: conftest.dSYM: is a directory
> checking if gcc supports -fno-rtti -fno-exceptions... no
> checking for gcc option to produce PIC... -fno-common -DPIC
> checking if gcc PIC flag -fno-common -DPIC works... yes
> checking if gcc static flag -static works... no
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.o... (cached) yes
> checking whether the gcc linker 
> (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) supports shared libraries... 
> yes
> checking dynamic linker characteristics... darwin10.6.0 dyld
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> checking for ld used by g++... /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
> checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU 
> ld... no
> checking whether the g++ linker 
> (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) support

Re: Roman numeral analysis

2011-07-29 Thread m...@apollinemike.com
On Jul 29, 2011, at 2:33 PM, Jerod Sommerfeldt wrote:

> Hello,
> 
> I'm new to LilyPond and have been searching for a useful strategy to write 
> out roman numeral analyses for my class' theory worksheets.  Here's what I've 
> come up with:
> 
> <<{
>   \clef bass
>   \override Score.TimeSignature #'transparent = ##t
>   \time 4/4
>   \key a \major
>   \set Staff.printKeyCancellation = ##f
>   \hideNotes
>   a1
>   -\tweak #'self-alignment-X #2  
>   -\tweak #'Y-offset #ly:self-alignment-interface::y-aligned-on-self
>   -\tweak #'self-alignment-Y #8  
>   -ii
> }
> 
> 
> \new FiguredBass{
>   \figuremode{
>   <6>1
>   }
> }>>
> 
> If there is a more streamlined approach, I'd be grateful to know, but I hope 
> this might be useful for some in the community.
> 
> Hope everyone is well,
> 
> Jerod
> --
> www.jerodsommerfeldt.com
> 
> 


Check out http://lsr.dsi.unimi.it/LSR/Snippet?id=710

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Lilypond lobbying?

2011-08-18 Thread m...@apollinemike.com
Hey all,

I recently came across an announcement for an incredible composition 
competition for SIX ORGANS (1one).

http://mmp.cm-cascais.pt/NR/rdonlyres/5BBEE22D-3C21-4996-AEFE-A2C0B2FAF9C9/12487/regulMCIngles2.pdf

The rules state that one can only use Sibelius or Finale.  Thinking that this 
was perhaps an oversight, I contacted the administrator to see if I could use 
Lilypond, who replied:

***
Dear Sir

We can't accept another program. Only those referred in the contest rules.
***

I found this rather bizarre, making me think that:

(a) Sibelius and Finale are paying competitions to exclude other software 
(unlikely)
(b) People are writing nonsensical rules (likely)

In either case, it makes me sad that I won't be able to write a work for SIX 
ORGANS.  My question is: what can we do, as a community, to overcome this type 
of hurdle?  Obviously, the more competitions/clients/whathaveyou that require 
one to use a specific piece of software for music making makes LilyPond less 
and less advantageous to use.  So, is it appropriate for a representative from 
the development team to contact competitions like this on the behalf of the 
user community to signal non-understanding and/or outrage?

In the meantime, if anyone has six organs at their disposition, please let me 
know and I will write a piece for you.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Stem #'flag-style no longer valid

2011-09-16 Thread m...@apollinemike.com
On Sep 11, 2011, at 11:28 PM, Nick Payne wrote:

> Just tried to rebuild one of my scores using 2.15.10, and got a number of 
> warnings in the log like so:
> 
> warning: cannot find property type-check for `flag-style' (backend-type?).  
> perhaps a typing error?
> warning: doing assignment anyway
> 
> it looks like the override I am using is no longer valid - the following 
> short test case gives the same error:
> 
> \version "2.15.10"
> 
> \relative c' {
>  \once \override Stem #'flag-style = #'no-flag c8
> }
> 
> What should I replace it with?
> 
> Nick

Hey all,

Back from vacation and slowly clearing out a backlog of e-mails.
This indeed should be a convert-ly rule: I'll write one tonight or tomorrow 
(there was some talk on the devel list about how these rules should be handled 
when syntax changes are involved - I'll e-mail the list later to work this out).

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


Custom note heads in multi-staff documents

2011-09-20 Thread m...@apollinemike.com
Hey all,

I'm working on a piece that uses a fair bit of spoken text.

The best solution I've found so far to typeset X amount of spoken text in 
measure Y is :

\version "2.14.0"

textnote =
#(define-music-function (parser location music marky) (ly:music? markup?)
#{
  \once \override NoteHead #'stencil = #ly:text-interface::print
  \once \override NoteHead #'text = $marky
  $music
#})

#(define-markup-command (hD layout props) () (interpret-markup layout props 
(markup #:hspace 5)))

\new Staff {
  \textnote b'1 \markup { \hD \hD Attention \hD K-Mart \hD shoppers. }
  \textnote b'1 \markup { \hD \hD Today's \hD Blue \hD Light }
  \textnote b'1 \markup { special \hD can \hD be \hD found \hD in }
  \textnote b'1 \markup { asile \hD seven. \hD \hD }
  \textnote b'1 \markup { Asile \hD seven, \hD K-Mart \hD shoppers. }
}


So far so good.  However, as soon as a second staff is added, the spacing goes 
out of whack.

\version "2.14.0"

textnote =
#(define-music-function (parser location music marky) (ly:music? markup?)
#{
  \once \override NoteHead #'stencil = #ly:text-interface::print
  \once \override NoteHead #'text = $marky
  $music
#})

#(define-markup-command (hD layout props) () (interpret-markup layout props 
(markup #:hspace 5)))

<<
\new Staff {
\repeat unfold 40 a8
}
\new Staff {
  \textnote b'1 \markup { \hD \hD Attention \hD K-Mart \hD shoppers. }
  \textnote b'1 \markup { \hD \hD Today's \hD Blue \hD Light }
  \textnote b'1 \markup { special \hD can \hD be \hD found \hD in }
  \textnote b'1 \markup { asile \hD seven. \hD \hD }
  \textnote b'1 \markup { Asile \hD seven, \hD K-Mart \hD shoppers. }
}
>>

I'm not sure how to get the spacing of the first example while keeping the 
multi-staffitude of the second example.  For the geeks on the list, 
ly:text-interface::print is registered as a pure print callback, so it should 
get fed just fine into the horizontal spacing engine in both examples.

Does anyone have any suggestions as to:

(1) A better way to do this; and/or
(2) If there is no better way, how to fix the horizontal spacing problem above?

Cheers,
MS


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


Re: Custom note heads in multi-staff documents

2011-09-20 Thread m...@apollinemike.com
On Sep 21, 2011, at 1:53 AM, Trevor Daniels wrote:

> 
> 
> Tuesday, September 20, 2011 8:31 PM
> 
>> I'm working on a piece that uses a fair bit of spoken text.
>> 
>> Does anyone have any suggestions as to:
>> 
>> (1) A better way to do this; and/or
>> (2) If there is no better way, how to fix the horizontal spacing problem 
>> above?
> 
> Mike, this might be an a more promising approach:
> 
> <<
> \new Staff {
>  \repeat unfold 20 \skip 4
> }
> \new Lyrics
>  \with {
>\override VerticalAxisGroup
>  #'nonstaff-relatedstaff-spacing = #'((padding . -3))
>  }
> \lyricmode {
>  \skip 4 Attention4 K-Mart4 shoppers.4
>  \skip 4 Today's4 Blue4 Light4
>  special1*1/5 can1*1/5 be1*1/5 found1*1/5 in1*1/5
>  aisle4 seven.4 \skip 2
>  Aisle4 seven,4 K-Mart4 shoppers.4
> }
> \new Staff {
>  \repeat unfold 40 a'8
> }
>>> 
> 
> But being able to space a spoken phrase evenly between
> two end points would be a welcome enhancement.
> 
> Trevor
> 

This works very well - thanks!  I agree about you with the enhancement, but I'd 
have to mull over how that'd work with horizontal spacing.

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


new Voices and Lyrics

2011-09-21 Thread m...@apollinemike.com
Hey users,

This question has been kicked around a few times on this list, but I can't find 
a current response, so I'm looking for some help.

In a piece I'm working on, the singers need to clap in rhythm and say text at 
the same time.  In order to do this, I'm creating two voices - a text voice and 
a clapping voice.  The text voice still needs lyrics attached to it, whereas 
the clapping voice doesn't.

Here's a mockup of the only solution I've thought of so far:

\new Staff <<
  \new Voice = "foo" \relative c' { a b c
<< << \new Voice = "bar" { d e } \lyricsto "bar" \new Lyrics { i work } >> 
\\
   \new Voice { f8 g a b } >>
   c4 d }
\lyricsto "foo" \new Lyrics { a b c d e }
>>

There are a few problems with this approach:

1)  Lilypond drops the last two notes into the ether.
2)  The lyrics are typeset lower than the original line.

Is there a quick and easy way to do this sorta thing?  Ideally, I'd like not to 
resort to having two voices running on the staff at all times (as the clapping 
takes place late in the work and only once, so I'd need to create a voice with 
a lot of skips in a piece that changes time signatures almost every measure).

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


Re: \autochange for chords

2011-09-21 Thread m...@apollinemike.com
On Sep 22, 2011, at 7:34 AM, Bernardo Barros wrote:

> It would be possible to make \autochange work for big chords that cross 
> staffs?
> 
> For example:
> 
> \score {
>  \new PianoStaff {
>\autochange {
>  < gis  d, fih' disih'' ais'' dih''' fis'' cih''' eih''' gih'''
> aisih''' c >
>}
>  }
> }
> 

Bernardo,

It is not doable in lilypond for the moment

I wrote a proof-of-concept patch to do this a while back, and I'm laying some 
groundwork in the source to make this sorta thing possible.

It takes a severe gutting of several engravers in LilyPond (Stem, Note_heads, 
Rhythmic_column) to meddle with contexts (you have to do context assignment 
manually, like Auto_beam_engraver).  If you copy the logic in 
Change_iterator::process to Event_chord_iterator::process, that does it.

The big problem that comes up is not the implementation of making it happen, 
but:
(1) The collisions that arise when the stem crosses staffs (this is what I'm 
working on now via something called Span_bar_stub_engraver and 
Pure_from_neighbor_interface...to be released soon).
(2) The coordination of multiple NoteCollision and NoteColumn grobs across 
staffs (I briefly worked on this and then gave up - it requires a PhD in rocket 
science).

So, if you are interested in helping out on some of the coding, yes, it could 
be possible!  Lemme know :)

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


Re: High-level users?

2011-09-23 Thread m...@apollinemike.com
On Sep 23, 2011, at 2:30 PM, Peekay Ex wrote:

> Mike
> 
> On Fri, Sep 23, 2011 at 1:22 PM, Urs Liska  wrote:
>> Am 23.09.2011 01:53, schrieb Tim Roberts:
>>> 
>>> Janek Warchoł wrote:
 
 If your friend would like to see what Lily can do, i'd show him this:
 http://www.apollinemike.com/scores/granini.pdf
>>> 
>>>  From a publishing perspective, that's impressive on a nearly magical
>>> scale.  As a musician, please forgive my parochial and archaic attitude,
>>> but that's nuts.
> 
> I'm curious, knowing what you know now about LP how long did/would
> this take you to create assuming that you had already done the
> composition itself on pad and paper (i.e. transcribe)?
> 
> and how long it took to compile.
> 
> -- 
> --
> James
> 

Just got back home from transcribing chipmunk noises for my most recent choral 
work.
I'll just say that being called nuts is the single greatest compliment I could 
possibly receive.

A few things regarding this thread:

-) I'd be happy to send anyone the source material for any of my pieces - just 
let me know what you'd like to see in a private mail.  I can't promise that 
it's tidy or that it compiles on current versions of LilyPond, but most of the 
tweaks/overrides should be salvageable.

-) I see what you're saying about pen/paper composition, but I actually work 
faster typing in music from a command line than on paper.  I also feel I can do 
certain things that I can't on paper, such as legible stream-of-counsciousness 
thoughts-to-self and various algorithmic experiments.  I do use pen and paper, 
though, to make flow charts.  I also use GarageBand to sing mock ups of most of 
my pieces and then transcribe these mockups into LilyPond.  For my sketches, I 
gravitate towards the tool that will (a) allow me to express an idea as fast as 
possible; and (b) allow me to play with this idea as much as possible (which, 
of course, includes getting rid of it).

-) The piece in question (granini di luce...) took me one week of LilyPond 
work, but I was working from an audio mockup of me singing all of the parts and 
there were several gaps where I knew I had to add stuff in LilyPond w/o 
sketches.  This actually speeds me up, as I can improvise on the spot in the 
Terminal instead of switching between paper/computer.  For a better barometer 
of transcription, check out http://www.apollinemike.com/auxeppes.  This took me 
seven weeks to transcribe pulling 12 hour days.

Valentin Villenave was working on some very interesting stuff regarding 
"thinking" in lily code, and I'm sure that the other composers on this list 
(Kieren, Trevor Bača, etc) work in a similar manner.

Cheers,
MS


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


Re: High-level users?

2011-09-24 Thread m...@apollinemike.com
On Sep 23, 2011, at 9:38 PM, Seth Williamson wrote:

> This has all been very interesting.  But almost nobody addressed my main 
> question.  Namely, are there any, or many, pros out there who have chosen 
> LilyPond over Sibelius or Finale?  I did appreciate hearing from Kieran 
> MacMillan.
> 

I have been in the music biz for 10ish years and I have only seen this choice 
being made recently with a handful of editors on the French lilypond mailing 
list.  If you consider the clergy music professionals (I do insofar as the 
music they're typesetting is linked to their vocation), you can add a few more 
from this list.

For the majority of my professional musicking years, I didn't even know 
LilyPond existed.  So, I would guess that the majority of people have not made 
this choice because they do not know if LilyPond exists, and if they did know, 
they wouldn't make the switch because of the cost in time of learning a new 
program and changing all of one's documents over to a new format.

> Somebody said there have been 2 million downloads of MuseScore.  Does anybody 
> know if MuseScore is gaining many former LilyPond adherents?  I know for a 
> fact that my girlfriend definitely prefers it.
> 

I would not be surprised if MuseScore's usage has already eclipsed that of 
LilyPond and if some LilyPond users move over to MuseScore.  I am almost 
positive that Finale and Sibelius combined dwarf the usage of SCORE.  They do 
different things.  I see LilyPond evolving towards something like SCORE with 
easier input syntax and more features, and I think MuseScore will eventually be 
able to perform at the same level as Finale and Sibelius.

The scenario you described before of a group of arrangers around computers 
making changes on the fly under time pressure could never work with LilyPond in 
its current state - it needs to recompile a score every time to get the 
horizontal spacing right.  Furthermore, the people working in these groups 
likely feel much more comfortable with a WYSIWYG interface - it is certainly 
better for error checking, which likely counts much more than correct spacing 
and collisions of fermatas with slurs in time crunches.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Apparently bogus warning with 2.15.12

2011-09-26 Thread m...@apollinemike.com
On Sep 26, 2011, at 11:27 AM, Nick Payne wrote:

> I'm setting Bach's BWV853 (Prelude from WTC 1), using showLastLength to just 
> engrave the last six bars added, and as I add bars I'm getting  warnings 
> about unterminated ties that come and go as the bars are added. The reason I 
> say the warning is bogus is because there are no ties across barlines 
> anywhere in the piece, and when I have a look at the bar(s) being complained 
> of, there are no ties anywhere near. I spent about half an hour trying to get 
> a small test case to reproduce the problem, but was not successful. I don't 
> recall getting this warning with previous versions of Lilypond except when 
> there really was a tie across the bar where the engraving started. Console 
> log sample below.
> 
> Processing `C:/Users/Nick/Documents/lilypond/bwv853a.ly'
> Parsing...
> Interpreting music...
> C:/Users/Nick/Documents/lilypond/bwv853a.ly:94:13: warning: unterminated tie
>  cs>\arpeggio r4 r16 fs e d \offset "Slur" #'(0 . 0.3) 
> cs\arpeggio( d)
> 
> C:/Users/Nick/Documents/lilypond/bwv853a.ly:94:11: warning: unterminated tie
>e cs>\arpeggio r4 r16 fs e d \offset "Slur" #'(0 . 0.3) 
> cs\arpeggio( d)
> 
> C:/Users/Nick/Documents/lilypond/bwv853a.ly:94:9: warning: unterminated tie
> <
> g e cs>\arpeggio r4 r16 fs e d \offset "Slur" #'(0 . 0.3) 
> cs\arpeggio( d)
> 
> Preprocessing graphical objects...

Are you using the Completion_heads_engraver?

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


Re: best practices for divisi string writing

2011-09-26 Thread m...@apollinemike.com
On Sep 25, 2011, at 10:50 AM, Shevek wrote:

> 
> I'm a composer that has been using Finale for around 10 years, but recently
> switched to Lilypond almost exclusively. The reasons for my switch are
> numerous, including that I run Linux, Lilypond's beautiful engraving, and
> the natural way Lilypond supports a variety of extended notations. I've been
> incredibly impressed by the ease of my transition from Finale (it probably
> helps that I am comfortable reading code), and I don't plan to go back any
> time soon.
> 
> I've been able to figure out how to do most things I'd want to do
> "idiomatically" in Lilypond, thanks to the wonderful documentation. One
> thing that I have had trouble figuring out, though, is the best way to do
> divisi string writing in Lilypond. \partcombine with custom texts seems like
> a good option for simple divisi passages that alternate with unison, but
> when one part has rests, the rests disappear, when really they should
> display. There are a variety of techniques described in the documentation
> for ossia staves that could very easily be adapted for divisi staves, but
> I'm unclear as to which would be the best. Ideally, I'd like to separate
> content (the music expressions) from the presentation (whether the parts are
> displayed on one or multiple staves) as much as possible, so that I can
> reuse the content to generate parts. Parts and score, naturally, may need to
> present the divisi passages differently, with some notated in score on the
> same staff, but in separate staves in the part.
> 
> I'd really appreciate any suggestions for how to do this.

Congrats on making the switch!  There are several composers on this list 
(including me) that have followed a similar path and I don't think any of us 
have ever switched back.

If I understand your question correctly, you are looking for :

(1) The best way to write a divisi that preserves the parts in their original 
form (i.e. doesn't drop rests); and
(2) A way to do it that separates content from structure.

Here are two options:

\version "2.15.12"

preferatoryMatter = \relative c' { c d e f }
foo = \relative f' { a r c d }
bar = \relative f' { f g r b }

\new Staff { \preferatoryMatter << \foo \\ \bar >> }

\score {
  \new Staff = "mystaff" {
\preferatoryMatter
<< \new Staff \with { alignAboveContext = "mystaff" } { \foo }  \bar >>
  }
}

Cheers,
MS


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


Re: Accordion transposition notation

2011-09-29 Thread m...@apollinemike.com
On Sep 29, 2011, at 9:31 AM, David Kastrup wrote:

> Mike Solomon  writes:
> 
>> Hey all,
>> 
>> If I want an accordion player to use stops to play a passage one
>> octave under the written pitch, I was wondering what the appropriate
>> notation was?  I found the info about discant notation in the manual,
>> but I'm not sure if those correspond to a change in octave (i.e. by
>> using the bassoon, is the pitch automatically played an octave
>> under?).
> 
> Yes.  The lowest-sounding reed in the register determines the basic
> pitch of the sound, any additional reeds change the timbre.
> 
> The low reed has the same pitch as the middle reed played one octave
> lower, but is usually more mellow in sound quality when played alone
> (Italian register switches tend to call them "bassoon" and "clarinet",
> respectively).  So you have to be prepared for a switch in sound quality
> as well as of octave when composing.
> 

Good deal - thanks!
~Mike

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


Re: Accordion transposition notation

2011-09-29 Thread m...@apollinemike.com
On Sep 29, 2011, at 9:53 AM, m...@apollinemike.com wrote:

> On Sep 29, 2011, at 9:31 AM, David Kastrup wrote:
> 
>> Mike Solomon  writes:
>> 
>>> Hey all,
>>> 
>>> If I want an accordion player to use stops to play a passage one
>>> octave under the written pitch, I was wondering what the appropriate
>>> notation was?  I found the info about discant notation in the manual,
>>> but I'm not sure if those correspond to a change in octave (i.e. by
>>> using the bassoon, is the pitch automatically played an octave
>>> under?).
>> 
>> Yes.  The lowest-sounding reed in the register determines the basic
>> pitch of the sound, any additional reeds change the timbre.
>> 
>> The low reed has the same pitch as the middle reed played one octave
>> lower, but is usually more mellow in sound quality when played alone
>> (Italian register switches tend to call them "bassoon" and "clarinet",
>> respectively).  So you have to be prepared for a switch in sound quality
>> as well as of octave when composing.
>> 
> 
> Good deal - thanks!
> ~Mike
> 

Follow-up - is there a standard notation for the air button and, if so, can 
LilyPond do it?

Cheers,
MS


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


Re: Animated SVG Percussion Music

2011-09-30 Thread m...@apollinemike.com
On Sep 30, 2011, at 10:20 AM, Tim Sawyer wrote:

> On 30/09/11 07:12, Jay Anderson wrote:
>> On Fri, Aug 19, 2011 at 5:30 AM, Tim Sawyer
>>   wrote:
>>> http://percussion360.com/
>>> 
>>> This works by taking SVG generated from lilypond, munging it a bit
>>> (including matching it up with the .ly source), then playing it back using
>>> javascript and html5 audio.  Playback doesn't work in IE but does work in
>>> other recent (proper) browsers.
>> 
>> This is really neat. I'm thinking of doing something similar with some
>> hymns. How did you add the id attributes to the paths to the svg
>> source? I assume this is what you meant by matching it up with the
>> source. I'm not seeing a good way to do this yet.
> 
> It's not nice...took me quite a while to do.
> 
> I have my books split into 32 parts.  Each part is in a separate .tex file.  
> I have a python script that extracts lilypond scores from these .tex files.  
> Once it has a score, it writes it to disk as a .ly file.
> 
> Next, we take the .ly file and convert it into an svg/xml file using 
> "lilypond -dbackend=svg file.ly".  This uses lilypond 2.13.11.
> 
> We also at this point generate a .eps file from the score, "lilypond 
> -dbackend=eps file.ly", then use http://www.imagemagick.org to convert this 
> into a trimmed .jpg of the score.  (I made this bit optional in the 
> generation - it's what takes the longest time)
> 
> I then create an object which wrappers the .ly file and the .svg file, and 
> links them together.  I'm parsing the music line from my .ly file so that I 
> know what notes are involved in what order.  We first work out a music 
> resolution (ie shortest note required to accurately playback the score), and 
> then we produce a python dictionary that has positions in the stave (in units 
> of the music resolution) pointing to objects that hold details of the note.  
> If it's a chord (ie snare drum and bass drum together) the note holds a 
> chordList for the other notes.
> 
> On the SVG side, we look through the svg file produced, looking for known 
> shapes (ie a tag with attribute d="M217 139c67 0 112 -38 112 -94c0 -90 -111 
> -184 -217 -184c-67 0 -112 38 -112 94c0 90 111 184 217 184z" is a solid 
> notehead).  We order this structure by position (from the value in the 
> transform attribute) and then match up the notes between the svg and the 
> lilypond object structure.  If we get a different number of notes, then we 
> have a problem somewhere!
> 
> We then write out a new SVG file with some additional attributes on the nodes 
> - an id for position, a delay for length and an audio for sounds at playback. 
>  Rests are just notes with no sound.
> 
> Note that this only currently works for one line staves - I've only done this 
> for my short exercises.  I'd have to expand this matching code to cope with 
> multiline stuff, and there's no point for what I'm doing with it.
> 
> So, here's the original .ly for my first stave:
> 
> #(set-global-staff-size 18)
> \paper
> {
>  ragged-right=##f
> }
> \score
> {
>  \version "2.10.0"
>  {
>\time 4/4
>\override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 7)
>\override Staff.TimeSignature #'style = #'()
>\clef bass
>\stemUp
>e e e r e r e r r e e r e e e r \bar "|."
>  }
> }
> 
> The lilypond generated SVG is attached (1.1.0.1.svg)
> 
> The resulting SVG that ends up in the web page is also attached 
> (1.1.0.1.svg.xml)
> 
> This is basically the same SVG as lilypond produced with the addition of:
> 
> * audio - path to the sound to play
> * id - the position in the music, in units of music resolution
> * delay - number of music resolution units to sound this note for
> 
> and a bit of metadata.
> 
> The javascript then looks at the length of the music (see bottom of 
> .svg.xml), grabs hold of all the elements with an id of n1 up to n16 (or the 
> length), loads the appropriate sounds, then starts playback, setting the 
> colour of elements to red for the specified length of time, then back to 
> black.
> 
> Hope that helps!
> 
> Tim.

In the same vein, I have a python script that I used to make the following two 
works for cello solo:

http://apollinemike.com/rhythmtest.svg
http://apollinemike.com/test.svg

It is the exact same idea: the python script parses the svg, extracts all 
relevant info, and then rewrites the svg animated-style.
You'll see that all of the motion handling is done by one core javascript 
function that looks up every movable node and either moves it or doesn't.

Lemme know off-list if you'd like to see more (I have to spruce up my script to 
make it human-readable).  And, on-list, one of my projects that I'll be taking 
on soon is incorporating some type of grouping mechanism into SVGs generated by 
LilyPond so that less python trickery is needed.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: wind instrument transposition (was Good work, Keith!)

2011-10-04 Thread m...@apollinemike.com
On Oct 4, 2011, at 10:10 PM, Tim Roberts wrote:

> Tim Reeves wrote:
>> 
>> Nothing odd about it at all.
> 
> I disagree, but we'll get to that in a moment.
> 
>> It would be odd if a horn part in C or E, etc. had any key signature at all.
> 
> Why?  Every other instrument has a key signature appropriate to the
> transposition in use at the current time.  Why should horn and trumpet
> be the sole exceptions here?  Certainly in 20th Century music, we expect
> every part to have an appropriate key signature (even horn in F), unless
> the music is not based on a key signature.  The Ninth Symphony does not
> fall into that category.
> 

Often times, in timpani parts of the 18th century, the timpani part is written 
with C and G irrespective of the key of the work (I guess the timpanist was 
supposed to figure out what he or she was supposed to tune to).  Ditto for 
trumpets.  I'm not sure how/where/why this practice was used, but it definitely 
dates way back for certain instruments.

Cheers,
MS


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


Re: Custom note heads in multi-staff documents

2011-10-07 Thread m...@apollinemike.com
On Sep 21, 2011, at 8:12 AM, m...@apollinemike.com wrote:

> On Sep 21, 2011, at 1:53 AM, Trevor Daniels wrote:
> 
>> 
>> 
>> Tuesday, September 20, 2011 8:31 PM
>> 
>>> I'm working on a piece that uses a fair bit of spoken text.
>>> 
>>> Does anyone have any suggestions as to:
>>> 
>>> (1) A better way to do this; and/or
>>> (2) If there is no better way, how to fix the horizontal spacing problem 
>>> above?
>> 
>> Mike, this might be an a more promising approach:
>> 
>> <<
>> \new Staff {
>> \repeat unfold 20 \skip 4
>> }
>> \new Lyrics
>> \with {
>>   \override VerticalAxisGroup
>> #'nonstaff-relatedstaff-spacing = #'((padding . -3))
>> }
>> \lyricmode {
>> \skip 4 Attention4 K-Mart4 shoppers.4
>> \skip 4 Today's4 Blue4 Light4
>> special1*1/5 can1*1/5 be1*1/5 found1*1/5 in1*1/5
>> aisle4 seven.4 \skip 2
>> Aisle4 seven,4 K-Mart4 shoppers.4
>> }
>> \new Staff {
>> \repeat unfold 40 a'8
>> }
>>>> 
>> 
>> But being able to space a spoken phrase evenly between
>> two end points would be a welcome enhancement.
>> 
>> Trevor
>> 
> 
> This works very well - thanks!  I agree about you with the enhancement, but 
> I'd have to mull over how that'd work with horizontal spacing.
> 
> Cheers,
> MS

Just a follow up: I've been using this to achieve the above effect and it works 
like a charm.

\version "2.14.0"

bar = {
  \override TextScript #'extra-spacing-width = #'(0 . 0)
  \override TextScript #'Y-offset = #0
  \override TextScript #'outside-staff-priority = ##f
  \override TextScript #'self-alignment-X = #LEFT
  \override Stem #'transparent = ##t
  \override NoteHead #'transparent = ##t
  \override NoteHead #'no-ledgers = ##t
}

<<
\new Staff \with { \override StaffSymbol #'line-count = #1 \override BarLine 
#'bar-extent = #'(-1.5 . 1.5) }
  \repeat unfold 6 \relative c' { \bar c-\markup { i } c-\markup { hope } 
c-\markup { this } c-\markup { works } }
\new Staff \with { \override StaffSymbol #'line-count = #1 \override BarLine 
#'bar-extent = #'(-1.5 . 1.5) }
  \repeat unfold 8 \relative c' { \bar c-\markup { o } c-\markup { ooo } 
c-\markup { o } }
>>

I'll throw it up on the LSR.

Cheers,
MS


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


Re: Custom note heads in multi-staff documents

2011-10-07 Thread m...@apollinemike.com
On Oct 7, 2011, at 2:04 PM, m...@apollinemike.com wrote:

> On Sep 21, 2011, at 8:12 AM, m...@apollinemike.com wrote:
> 
>> On Sep 21, 2011, at 1:53 AM, Trevor Daniels wrote:
>> 
>>> 
>>> 
>>> Tuesday, September 20, 2011 8:31 PM
>>> 
>>>> I'm working on a piece that uses a fair bit of spoken text.
>>>> 
>>>> Does anyone have any suggestions as to:
>>>> 
>>>> (1) A better way to do this; and/or
>>>> (2) If there is no better way, how to fix the horizontal spacing problem 
>>>> above?
>>> 
>>> Mike, this might be an a more promising approach:
>>> 
>>> <<
>>> \new Staff {
>>> \repeat unfold 20 \skip 4
>>> }
>>> \new Lyrics
>>> \with {
>>>  \override VerticalAxisGroup
>>>#'nonstaff-relatedstaff-spacing = #'((padding . -3))
>>> }
>>> \lyricmode {
>>> \skip 4 Attention4 K-Mart4 shoppers.4
>>> \skip 4 Today's4 Blue4 Light4
>>> special1*1/5 can1*1/5 be1*1/5 found1*1/5 in1*1/5
>>> aisle4 seven.4 \skip 2
>>> Aisle4 seven,4 K-Mart4 shoppers.4
>>> }
>>> \new Staff {
>>> \repeat unfold 40 a'8
>>> }
>>>>> 
>>> 
>>> But being able to space a spoken phrase evenly between
>>> two end points would be a welcome enhancement.
>>> 
>>> Trevor
>>> 
>> 
>> This works very well - thanks!  I agree about you with the enhancement, but 
>> I'd have to mull over how that'd work with horizontal spacing.
>> 
>> Cheers,
>> MS
> 
> Just a follow up: I've been using this to achieve the above effect and it 
> works like a charm.
> 
> \version "2.14.0"
> 
> bar = {
>  \override TextScript #'extra-spacing-width = #'(0 . 0)
>  \override TextScript #'Y-offset = #0
>  \override TextScript #'outside-staff-priority = ##f
>  \override TextScript #'self-alignment-X = #LEFT
>  \override Stem #'transparent = ##t
>  \override NoteHead #'transparent = ##t
>  \override NoteHead #'no-ledgers = ##t
> }
> 
> <<
> \new Staff \with { \override StaffSymbol #'line-count = #1 \override BarLine 
> #'bar-extent = #'(-1.5 . 1.5) }
>  \repeat unfold 6 \relative c' { \bar c-\markup { i } c-\markup { hope } 
> c-\markup { this } c-\markup { works } }
> \new Staff \with { \override StaffSymbol #'line-count = #1 \override BarLine 
> #'bar-extent = #'(-1.5 . 1.5) }
>  \repeat unfold 8 \relative c' { \bar c-\markup { o } c-\markup { ooo } 
> c-\markup { o } }
>>> 
> 
> I'll throw it up on the LSR.
> 
And I just realized that it's moronic to use the word "bar" for a variable (I'm 
used to using foo and bar for short examples...but this is LilyPond).  Use foo 
instead :)

Cheers,
MS


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


Re: Difference between 2.12.3 and 2.14.2

2011-10-11 Thread m...@apollinemike.com
On Oct 12, 2011, at 7:45 AM, GRAEME F ST CLAIR wrote:

> The same .ly that gave me what I wanted at 2.12.3 is now giving me an 
> extraneous clef and time-signature protruding from the top left corner of the 
> first staff in 2.14.2.  Is this intended, and if so, how can I remove it?
> 
> GFStC.
> 
> 

Graeme,

Could you please send a tiny example illustrating the problem or, if you can't 
reduce the example, post the file so we can have a look?

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


Re: lilypond / inkscape

2011-10-19 Thread m...@apollinemike.com
On Oct 19, 2011, at 11:39 AM, Gerard McConnell wrote:

> I often see topics introduced here in which solutions are sought for 
> font-related or position-related problems.  Almost all of these problems are 
> easily solved by creating an SVG file with Lilypond and then editing that 
> file with Inkscape.What is the downside of working this way?

If you're sure that your score will never change and that you'll never want to 
share the .ly files it with anyone, then there is no downside.  However, if you 
want the score to be flexible in case you need to change it and if you want 
others to be able to edit it, I'd steer clear of the Inkscape solution.  I've 
tried it several times as an expedient and, like many expedients, one regrets 
them later on.

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


Re: Slur as TupletBracket

2011-10-22 Thread m...@apollinemike.com
On Oct 22, 2011, at 1:44 AM, Thomas Morley wrote:

> Hi Mke
> 
> 2011/10/21 m...@apollinemike.com 
> i <3 hacks
> 
> \version "2.15.12"
> \relative c'' {
>  \override TupletBracket #'stencil = #ly:slur::print
>  \override TupletBracket #'direction = #UP
>  \override TupletNumber #'whiteout = ##t
>  \override TupletNumber #'layer = #2
>  \override TupletBracket #'layer = #1
>  \override TupletNumber #'Y-offset = #(lambda (grob) (+ 0.5 
> (ly:tuplet-number::calc-y-offset grob)))
>  \override TupletBracket #'control-points =
> #(lambda (grob)
>   (let ((x-pos (ly:grob-property grob 'X-positions))
> (pos (ly:grob-property grob 'positions)))
> (list (cons (car x-pos) (car pos))
>   (cons (+ (car x-pos) (/ (interval-length x-pos) 3)) (+ (car pos) 
> 0.5))
>   (cons (+ (car x-pos) (* (interval-length x-pos) 2/3)) (+ (cdr pos) 
> 0.5))
>   (cons (cdr x-pos) (cdr pos)
> \repeat unfold 10 \times 2/3 { a4 b4 c }
> }
> 
> To be messed with to your heart's content :)
> This'll only work in one of the more recent development versions, as 
> X-positions is a new addition to LilyPond.
> 
> Cheers,
> MS
> 
> Hi Mike,
> 
> I tested your suggestion with "2.15.13" and  get this warning:
> 
> In procedure car in expression (car x-pos):
> atest.ly:13:17: Wrong type (expecting pair): ()
> 
> Searching 'X-positions gives no result, even in define-grob-properties.scm.
> 
> Am I missing something?
> 
> Harm


Hey Harm,
I compiled it against current master.  If your version of LilyPond doesn't have 
an X-positions property, you can assemble something that works like X-positions 
by getting the two spanner bonuds via ly:spanner-bound and then getting their 
relative coordinates.

\version "2.14.0"
\relative c'' {
 \override TupletBracket #'stencil = #ly:slur::print
 \override TupletBracket #'direction = #UP
 \override TupletNumber #'whiteout = ##t
 \override TupletNumber #'layer = #2
 \override TupletBracket #'layer = #1
 \override TupletBracket #'control-points =
#(lambda (grob)
  (let* ((b-l (ly:spanner-bound grob LEFT))
 (b-r (ly:spanner-bound grob RIGHT))
 (crf (ly:grob-common-refpoint b-l b-r X))
 (x-pos (cons (ly:grob-relative-coordinate b-l crf X) 
(ly:grob-relative-coordinate b-r crf X)))
 (pos (ly:grob-property grob 'positions)))
(list (cons (car x-pos) (car pos))
  (cons (+ (car x-pos) (/ (interval-length x-pos) 3)) (+ (car pos) 0.5))
  (cons (+ (car x-pos) (* (interval-length x-pos) 2/3)) (+ (cdr pos) 
0.5))
  (cons (cdr x-pos) (cdr pos)
\repeat unfold 10 \times 2/3 { a4 b4 c }
}

In 2.14.0 the TupletNumber Y-offset callback doesn't exist, so I've nixed it.  
This messes with the tuplet number positioning, but you can write a positioning 
fixed based on the coordinates of the bracket.  To get the bracket, if the 
TupletNumber is `grob' in a function, use (ly:grob-object grob 'bracket).

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Force Key Signature

2011-10-24 Thread m...@apollinemike.com
On Oct 24, 2011, at 9:38 AM, J Ruiz wrote:

> I need to display again the current Clef and Key Signature.
> I found this command to force Lilypond to show the current Clef:
> \set Staff.forceClef = ##t
>  
> Is there a command to also force to print the current key signature after the 
> clef?
>  
> Thx, Javier

Not that I know of, but you can type in the current key signature at any point 
& it'll reprint.

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: slightly offtopic

2011-10-24 Thread m...@apollinemike.com

On Oct 24, 2011, at 10:01 PM, Ole Schmidt wrote:

> Hi,
> 
> Can anyone point me in the right direction, I need a little circle above the 
> letter (norwegian...)
> like this: 
> å  (see also attached screenshot if it is not displayed correctly)
> Whats do I have to enter, I can not found the utf-code that fits the 
> description in the manual...
> 
> thanks for a hint
> 
> ole
> 

You should be able to just enter the text normally :

\markup { Smörgåsbord }

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


key signatures in ossias

2011-10-24 Thread m...@apollinemike.com
Hey all,

I'm currently working on a bit of music with a key signature in the ossia that 
is not in the main voice.  The typesetting is meh due to the large gap to 
accommodate the key signature.  Is there any way to make it such that:

a) the key signature is typeset before the arrival of the notes in the ossia?
b) there is no gap to accommodate said key signature?

\version "2.14.0"

{ \repeat unfold 24 d'32
  <<
{ \repeat unfold 40 d'32 }

\new Staff \with {
  \remove "Time_signature_engraver"
  alignAboveContext = #"main"
  fontSize = #-3
  \override StaffSymbol #'staff-space = #(magstep -3)
  \override StaffSymbol #'thickness = #(magstep -3)
  firstClef = ##f
}
{ \key cis \major ais4 ais ais ais ais }
  >>
}


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


Re: Problem with glissandi in 2.15.15

2011-10-28 Thread m...@apollinemike.com

On Oct 28, 2011, at 10:57 AM, Nick Payne wrote:

> I'm using glissandi to indicate slides in fingering. The following code 
> should give me a glissando between the fingering digits (it did in older 
> versions), but on 2.15.15 I get no glissando at all:
> 
> \version "2.15.15"
> 
> \relative c'' {
>\override Fingering #'staff-padding = #'()
>\once \override Glissando #'extra-offset = #'(0 . 1.4)
> 4\glissando 
> }
> 

You have to tell it not to end on the accidental.

\relative c'' {
   \override Fingering #'staff-padding = #'()
   \once \override Glissando #'extra-offset = #'(0 . 1.4)
   \once \override Glissando #'bound-details #'right #'end-on-accidental = ##f
4\glissando 
}

There are more accurate & automated ways of doing this, though.  If you create 
a Scheme engraver that acknowledges fingerings and glissandi and then override 
the Y positions to match up with these fingerings, you don't need to use the 
extra offset.  Check out scheme-engraver-instance.ly and scheme-engraver.ly in 
input/regression.

Cheers,
MS


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


Re: Glissando on single note in chords

2011-11-01 Thread m...@apollinemike.com
On Nov 1, 2011, at 8:31 AM, Nick Payne wrote:

> The behaviour seems to have changed - with 2.15.16 I now get a glissando 
> between each note. However, I'm using glissandi to indicate a fingering slide 
> along the same string, and only want the glissando against this one note. I 
> could previously do it by making this note the first in both chords. Is this 
> still possible, or do I need to create a separate hidden voice containing 
> only the wanted notes?
> 
> Nick
> 

Hey Nick,

The answer is yes.  Could you please send a minimal example - it'd be easier 
for me to explain how it works through .ly text.

Cheers,
MS


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


Re: Glissando on single note in chords

2011-11-01 Thread m...@apollinemike.com

On Nov 1, 2011, at 10:59 AM, Nick Payne wrote:

> On 01/11/11 20:37, m...@apollinemike.com wrote:
>> On Nov 1, 2011, at 8:31 AM, Nick Payne wrote:
>> 
>>> The behaviour seems to have changed - with 2.15.16 I now get a glissando 
>>> between each note. However, I'm using glissandi to indicate a fingering 
>>> slide along the same string, and only want the glissando against this one 
>>> note. I could previously do it by making this note the first in both 
>>> chords. Is this still possible, or do I need to create a separate hidden 
>>> voice containing only the wanted notes?
>>> 
>>> Nick
>>> 
>> Hey Nick,
>> 
>> The answer is yes.  Could you please send a minimal example - it'd be easier 
>> for me to explain how it works through .ly text.
>> 
>> Cheers,
>> MS
>> 
>> 
> Thanks. Here's a minimal example. I only want a glissando between the 
> fingering on the F# and G.
> 
> \version "2.15.16"
> 
> \relative c {
>\set fingeringOrientations = #'(down)
>\override Fingering #'staff-padding = #'()
>\once \override Glissando #'extra-offset = #'(0 . -1.4)
> 4\glissando 
> }
> 
> Nick
> 

Hey Nick,

Here's what you'll need:

\version "2.15.16"

\relative c {
   \set fingeringOrientations = #'(down)
   \override Fingering #'staff-padding = #'()
   \once \override Glissando #'extra-offset = #'(0 . -1.4)
   \set glissandoMap = #'((0 . 0))
  4\glissando 
}

The glissandoMap property is a switchboard operator that says who plugs into 
who.
Here, the 0th (lowest) note plugs into the 0th note.
If you get a chance, try implementing a Scheme engraver - this type of override 
can wreak panic with spacing changes in LilyPond, whereas a custom engraver 
will survive changes in spacing.

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


Re: Space between last note in a bar and the barline

2011-11-03 Thread m...@apollinemike.com

On Nov 3, 2011, at 12:56 PM, Jiri Zurek (Prague) wrote:

> 
> How can I control the space between the last note of a bar and the barline?
> There are number of tools to control the space between a barline and the
> next note in the BarLine space-alist (first-note fixed-space . 1.3)
> (next-note semi-fixed-space . 0.9) (right-edge extra-space . 0.0)
> but there seems to be no tool to control the opposite the note just BEFORE
> the barline. Please advice.
> 
> 

version "2.14.0"

\relative c'' {
  \override Staff . BarLine #'extra-spacing-width = #'(-5.0 . 0.0)
  \repeat unfold 20 { a b c d }
}

Cheers,
MS

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


Re: How to change the stem-length?

2011-11-07 Thread m...@apollinemike.com

On Nov 6, 2011, at 4:56 AM, harm6 wrote:

> 
> Hi,
> 
> using a beam-stencil-override, I'd wish to adjust the stem-length within the
> beam-stencil-override. The following (boiled down) function works fine in
> most cases, even with kneed-beams. But when using it in a cross-staff
> example with kneed-beams, I've noticed a problem: Some stems are affected
> some not. Oddly enough, when changing the global-staff-size, I retrieve
> different results.
> 
> 

I love how that looks!!
I need to find a way to work it into a piece...

The function will be consistent if you hijack a different property.  To wit, 
quantized-positions.  By the time you call ly:beam::print, the stencil values 
for the stem may have already been cached, in which case they will not be 
recalculated for length.

Cheers,
MS

\version "2.15.16"


#(set-global-staff-size 20)

#(define ((stem-change y) grob)
  (let ((pos (ly:beam::set-stem-lengths grob)))
 (begin
   (ly:grob-set-property! grob 'color red)
   (map 
 (lambda (n)
   (ly:grob-set-property! n 'length y))
 (ly:grob-array->list (ly:grob-object grob 'stems
  pos))

% Test

top = \change Staff = "1"
bottom = \change Staff = "2"

music = \relative c {

   \override Beam #'auto-knee-gap = #0

   \override Beam #'quantized-positions = #(stem-change 20)

\bottom c32[ g' \top eis'']
c[ b \bottom  g,]
\top e''[ \bottom c,, \top  g'']
\bottom c,,64[ \top g'' e' \bottom c,, \top  c'']
f,,32 [f''' f,,, f''']
}

\score {
 \new PianoStaff <<
   \new Staff = "1" {
 s4 s8 s16
   }
   \new Staff = "2" {
 \clef bass
 \music
   }
  >>
}


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


Re: collision of special notehead and accidental

2011-11-14 Thread m...@apollinemike.com
On Nov 14, 2011, at 11:02 AM, takumi ikeda wrote:

> When using special notehead, accidental and notehead collide to some specific
> notes. What should I do in order to avoid this using Scheme?
> 
> \version "2.14.2"
> 
> triBk =
> #(ly:make-stencil 
>   (list 'embedded-ps
>   "gsave
>   currentpoint translate
>   newpath
>   -.1675 .5 moveto
>   .65625 -.5 lineto
>   1.5 .5 lineto
>   closepath
>   fill
>   grestore" )
>   (cons -.1875 1.5)
>   (cons -.5 .5)
> )
> 
> triWt =
> #(ly:make-stencil 
>   (list 'embedded-ps
>   "gsave
>   currentpoint translate
>   newpath
>   -.0775 .43 moveto
>   .65625 -.43 lineto
>   1.39 .43 lineto
>   closepath
>   0.1 setlinewidth
>   stroke
>   grestore" )
>   (cons -.1875 1.5)
>   (cons -.5 .5)
> )
> 
> #(define (stencil-notehead grob)
>   (if (> 2 (ly:grob-property grob 'duration-log))
>   triWt triBk
>   )
> )
> 
> upStem= #'(1 . .9)
> downStem  = #'(1 . -1)
> 
> #(define (pitch-to-stem stemdir)
>   (if (= UP stemdir) upStem downStem)
> )
> 
> #(define (notehead-get-notecolumn nhgrob)
>   (ly:grob-parent nhgrob X))
> 
> #(define (notehead-get-stem nhgrob)
>   (let ((notecolumn (notehead-get-notecolumn nhgrob)))
>   (ly:grob-object notecolumn 'stem)))
> 
> #(define (stem-adjuster nhgrob)
>   (pitch-to-stem
>   (ly:grob-property (notehead-get-stem nhgrob) 'direction) ))
> 
> 
> notes = \relative c' {
>   c2 cis d dis e f fis g gis a ais b
>   c cis d dis e f fis g gis a ais b
>   c4 b bes a aes g ges f e ees d des
>   c b bes a aes g ges f e ees d des
> }
> 
> 
> \new Staff 
> {
>   \override NoteHead #'stencil = #stencil-notehead
>   \override NoteHead #'stem-attachment = #stem-adjuster
>   <<
>   \notes 
>   >>
> }
> 
> 

If you download the unstable version, you can use a new feature called 
unpure-pure-containers to solve this problem.

In the current stable version, you'd have to not use a function as an override 
but rather use the stencil directly.

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


LilyPond, MetaFont and Scheme

2011-11-18 Thread m...@apollinemike.com
Hey users,

I am trying to create the feta font note head stencil in Scheme so that I can 
bend it to my heart's liking with various tweaks, but I am running into a 
problem of my not being able to convert MetaFont to Scheme (mostly because I 
don't speak MetaFont).  I did, however, get the SVG path for this grob :

M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 
-36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z

(plus various translations and scalings)

I've tried inputting these coordinates into make-path-stencil (accounting for 
translation, scaling, and the fact that all of these coordinates are relative), 
but the result never comes out to a notehead.

Any suggestions for how to convert this SVG instruction into something readable 
by make-path-stencil?  This is the type of thing that I could spend 10 hours 
trying to figure out if no one has a 15 minute answer, so please don't spend 
any more time than that on the question.  Beyond the actual result, what 
interests me most is how to map one encoding of Bézier curves onto the other 
successfully.

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


Re: LilyPond, MetaFont and Scheme

2011-11-20 Thread m...@apollinemike.com
On Nov 18, 2011, at 11:48 PM, m...@apollinemike.com wrote:

> Hey users,
> 
> I am trying to create the feta font note head stencil in Scheme so that I can 
> bend it to my heart's liking with various tweaks, but I am running into a 
> problem of my not being able to convert MetaFont to Scheme (mostly because I 
> don't speak MetaFont).  I did, however, get the SVG path for this grob :
> 
> M220 138c56 0 109 -29 109 -91c0 -72 -56 -121 -103 -149c-36 -21 -76 -36 -117 
> -36c-56 0 -109 29 -109 91c0 72 56 121 103 149c36 21 76 36 117 36z
> 
> (plus various translations and scalings)
> 
> I've tried inputting these coordinates into make-path-stencil (accounting for 
> translation, scaling, and the fact that all of these coordinates are 
> relative), but the result never comes out to a notehead.
> 
> Any suggestions for how to convert this SVG instruction into something 
> readable by make-path-stencil?  This is the type of thing that I could spend 
> 10 hours trying to figure out if no one has a 15 minute answer, so please 
> don't spend any more time than that on the question.  Beyond the actual 
> result, what interests me most is how to map one encoding of Bézier curves 
> onto the other successfully.
> 
> Cheers,
> MS

Hey all,

I came up with a hack that more or less works - I'm still working on the 
scaling, but I think the shape is right:

\version "2.15.16"   
 
\relative c'' {
  \override NoteHead #'stencil =
#(ly:stencil-translate (make-connected-path-stencil
'(
( 56 0 109 -29 109 -91 )
( 109 -163 53 -212 6 -240 )
( -30 -261 -70 -276 -111 -276 )
( -167 -276 -220 -247 -220 -185 )
( -220 -113 -164 -64 -117 -36 )
( -81 -15 -41 0 0 0 )
)
0.01 0.0040 0.0040 #f #t) '(0 . 0.5))
a4
}

Cheers,
MS


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


Re: OT: Karaoke tracks?

2011-11-22 Thread m...@apollinemike.com
On Nov 22, 2011, at 1:44 PM, Henning Hraban Ramm wrote:

> Hello Lilyponderers,
> 
> I engraved the notes for a songbook, using LilyPond of course.
> Now the publisher wants to create an App with some (about 30) of the songs 
> and needs karakoke files (MP3+G or CDG).
> 
> As far as I researched, there are only a few specialized applications that 
> can create such. I'm not willing to invest the time and money for a one-time 
> project.
> 
> So I'm looking for a contractor. (What would you charge?)
> Input are my one-verse MIDIs (or LilyPond sources) and the complete lyrics 
> from the book PDF (German folk/socialist songs).
> 
> 

Henning,

While I cannot take this job, the idea of singing Karaoke to German folk music 
interests me greatly.  Please keep us posted as to the final result & where one 
can get the songs!

Cheers,
MS


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


columns in lyrics

2011-11-23 Thread m...@apollinemike.com
hey all,

i have a lot of lyrics in a row where i need them to appear as :

\markup \column { foo bar } \markup \column { who what } \markup \column { 
hello world }

To avoid typing the markup command every time, I'd like to do:

\command #"foo" #"bar" \command #"who" #"what" \command #"hello" #"world"

I'm having trouble figuring out how to implement this as a music function 
that'll work in the Lyric context - any suggestions?

For bonus points, what I'd love is:

\command #"foo who hello" #"bar what world" that'd automatically split out n 
lyrics in column form, each containing 2 lyrics a piece (n being 3 in this 
example).

Cheers,
MS___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: columns in lyrics

2011-11-24 Thread m...@apollinemike.com
On Nov 24, 2011, at 3:05 PM, Jan-Peter Voigt wrote:

> Hey Mike,
> 
> here's one, that splits up strings to columns. So its the other way round 
> than your bonus point part. But it should save typing, because 
> 
> \markup \column { foo bar } \markup \column { who what } \markup \column { 
> hello world }
> 
> turns to
> 
> \cols { "foo bar" "who what" "hello world" }
> 
> --snip--
> \version "2.14.2"
> 
> #(define-public cols (define-music-function (parser location lyrics) 
> (ly:music?)
> (music-map
>   (lambda (m)
>   (begin
> ;; catch every Lyric Event
> (if (equal? (ly:music-property m 'name) 'LyricEvent)
> ;; set text to column markup using string-split (and 
> markup->string for safety)
> (let ((syl (string-split (markup->string 
> (ly:music-property m 'text)) #\ )))
>  (ly:music-set-property! m 'text 
> (make-center-column-markup syl)) ; you might want to use another one like 
> make-column-markup
> ))
> m))
>   lyrics)))
> 
> 
> \relative c'' {
>   c2 b a
> } \addlyrics {
>   \cols { "foo bar" "who what" "hello world" }
> }

You still get bonus points!  It'll definitely save me time typing - many thanks!

All the best,
Mike

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


  1   2   3   >