Re: "Text spanner"-ish thing with text in the middle

2017-10-27 Thread Nathan Ho

On 2017-10-27 21:37, James Harkins wrote:

I couldn't find this quickly: for an unmetered section, I'd like to
indicate duration by tuplet-style brackets, only not a tuplet (no
change to note durations) and with arbitrary text markup in the
middle, e.g. if a tuplet goes

:- 3 -:

I'd like

:--- 10" ---:

TextSpanner seems to assume text at the beginning or end, but not the 
middle.


hi james,

you can hijack an ordinary tuplet by setting the duration ratio to 1/1 
and modifying the text:


{
  \once \override TupletNumber.text = \markup \normal-text { "10\"" }
  \tuplet 1/1 {
c'4 c'4 c'4 c'4
  }
}

(sorry for the double message, forgot to hit "reply all" on the first 
one it seems)



nathan

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


Re: Creating a 11-line system

2017-09-22 Thread Nathan Ho

On 2017-09-22 00:55, Ståle Ødegården wrote:

Thank you, this is excactly what I was looking for!

I have another challenge: making the key signature also mimic a
standard PianoStaff setup.
I have a partial solution with «\override KeySignature.flat-positions
= #'((-10 . 10))» and similar, but I don’t want the «extra»
accidentals in the middle.

How do I do this?


hi Ståle,

you can intercept the stencil and tell it to print the default key 
signature twice with different translations:


{
  \override Staff.StaffSymbol.line-count = #11

  \override Staff.KeySignature.stencil =
#(lambda (grob)
   (let ((stencil (ly:key-signature-interface::print grob)))
 (ly:stencil-add
   (ly:stencil-translate-axis stencil 3.5 Y)
   (ly:stencil-translate-axis stencil -3.5 Y

  \override Staff.Clef.stencil = #ly:text-interface::print
  \override Staff.Clef.text =
\markup
  \combine
\raise #2 \musicglyph #"clefs.G"
\lower #2 \musicglyph #"clefs.F"
  \clef alto
  \key es \minor
  c'1
}


nathan



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


Re: Creating a 11-line system

2017-09-21 Thread Nathan Ho

On 2017-09-21 14:05, Ståle Ødegården wrote:

Hi!

I wonder how I can create a 11-line system with both treble and bass
clefs present.

I have two ideas, but I can’t make any of them work:
- Create a PianoStaff or ChoirStaff and force the spacing between them
to be _excactly_ one line apart - then add the extra line
- Create lots of extra lines in a single staff and set up the two
clefs to mimic a PianoStaff

What could be the best solution to this problem?


hi Ståle,

personally i'd go with the second idea. this part of the notation manual 
concerns staff modification: 
http://lilypond.org/doc/v2.18/Documentation/notation/modifying-single-staves


the main tricky part is modifying the Clef stencil, which can be done 
using a markup:


{
  \override Staff.StaffSymbol.line-count = #11
  \override Staff.Clef.stencil = #ly:text-interface::print
  \override Staff.Clef.text =
\markup
  \combine
\raise #2 \musicglyph #"clefs.G"
\lower #2 \musicglyph #"clefs.F"
  \clef alto
  c'1
}



nathan

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


Re: Non-Standard Rhythmic Durations

2017-06-26 Thread Nathan Ho

On 2017-06-26 20:47, Brin Solomon wrote:

Hey all,

I'm working on an algorithmic piece where all the rhythmic durations
are an integer number of eighth notes long. I'm using
Completion_heads_engraver to handle the bar lines, but I'm running
into trouble when I need to write notes that are five eighth notes
long. Is there a way to send an arbitrary rhythmic value (i.e. one
that can't be described with the 8, 4, 4., etc system) to the
Completion_heads_engraver, or do I need to enter all the "half note
plus an eighth" rhythmic values by hand without automatic note
splitting?


hi brin,

i'd say that's kinda outside the scope of lilypond, although you could 
probably put it together with scheme magic. instead, you should check 
out abjad (http://abjad.mbrsi.org/), which is perfect for that kind of 
thing.



nathan

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


Re: Export to ?????

2017-05-28 Thread Nathan Ho

On 2017-05-25 00:45, Don Gingrich wrote:

I've been looking and looking and I cannot
find any useful references to export file
formats from LilyPond.

Now, I will agree that LilyPond's PDF output
is very good looking and is actually my preferred
sheet music, But the sad reality it that there are
people who do exist who use tools other than
LilyPond, and that occasionally it becomes
necessary to exchange files with these poor
benighted souls. ;-)


hi don,

if you'll forgive me for self-promotion, i'm a contributor to an open 
source project (https://ncodamusic.org/) which aims to support 
translation between a number of music formats, including lilypond import 
and export.


it's early in development, so definitely not helpful to you in its 
current state. but i know you're not the only person interested in this, 
so i just wanted to put this on the radar.



nathan

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


Re: Hairpin endings

2017-04-21 Thread Nathan Ho

On 2017-04-21 05:39, David Nalesnik wrote:

Instead of using a markup, why not use ly:line-interface::line
(available from 2.19.27)? This gets thickness from the grob--and any
other line attributes you want, so you can create dashed hairpins,
whatever.  There's no need adjust thickness in this case.


Hi David,

Thanks for the info. I still prefer markups for this kind of thing 
because more people understand them and they're (somewhat) better 
documented. Less ly:foo stuff I have to look up, the better. Good to 
know the proper way though!



Nathan

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


Re: Hairpin endings

2017-04-20 Thread Nathan Ho

On 2017-04-20 20:42, Andrew Bernard wrote:

I posted a while ago with a query about hairpins, to which no
response.

Would there be any way to have hairpins that don't start, or end in
the other direction, with the lines converging to the same point? I
have need from time to time of hairpins where the end points are still
separated, rather than coming to a termination together. Sure this can
be done with a whiteout box, but that is always fiddly and the
position tends to move when the score is repaginated etc etc. In the
same way as the 'height' property allows you to specify the separation
at the open end, it would be useful to have some property for this
sort of thing at the pointy end. Yes, definitely not Common Era
engraving practice, but this keeps coming up in the New Complexity
scores I work with.


hi andrew,

check it out:

#(define ((open-hairpin left-open right-open) grob)
   (let* ((stencil (ly:hairpin::print grob))
  (X-ext (ly:stencil-extent stencil X))
  (Y-ext (ly:stencil-extent stencil Y))
  (width (interval-length X-ext))
  (height (interval-length Y-ext)))
 (ly:stencil-translate
   (grob-interpret-markup grob
 (markup
   (#:path 0.1
 (list (list 'moveto 0 (* height (- 0.5 (* 0.5 left-open
   (list 'lineto width (* height (- 0.5 (* 0.5 
right-open

   (list 'moveto 0 (* height (+ 0.5 (* 0.5 left-open
   (list 'lineto width (* height (+ 0.5 (* 0.5 
right-open

   (cons 0 (interval-start Y-ext)

{
  c'1\> c'1 c'1\!
  \once \override Hairpin.stencil = #(open-hairpin 1.0 0.5)
  c'1\> c'1 c'1\!
  \once \override Hairpin.stencil = #(open-hairpin 0.5 0.0)
  c'1\> c'1 c'1\!
}

respects height, but not thickness. anyone know how to convert a 
thickness value into staff spaces?



nathan

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


Re: How to create measure with only slashes

2017-01-19 Thread Nathan Ho

On 2017-01-19 18:19, Rob Torop wrote:

I'dlike to create a measure that has 4 forward slashes in it
(only). This does almost what I want except of course it has the rest
at the start:

  \repeat percent 4 { r4 }

Is there a way to get just 4 slashes?


Hi Rob,

Here's how I do it:

{
  \override Rest #'stencil = 
#ly:percent-repeat-item-interface::beat-slash

  \override Rest #'thickness = #0.48
  \override Rest #'slope = #1.7
  \repeat unfold 16 { r4 }
}


Nathan

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


Re: Tips on quick entry

2017-01-07 Thread Nathan Ho

On 2017-01-06 13:39, Samuel Speer wrote:

Hello list,

It takes me ages to enter the note data into LilyPond. Last night I
spent almost an hour a page just getting notes and lyrics in. Does
anyone have any tips for quick entry? I do have a midi keyboard but
haven't tried it much. It seems slow because I have to switch back and
forth with the computer keyboard to do articulations, durations, etc.


Hi Samuel,

Composing and arranging directly into LilyPond is always going to be 
slow (since you're doing more than just note entry). But if you're just 
transferring music from paper to LilyPond, you can get pretty efficient.


It's important to have a workflow that doesn't involve switching windows 
and typing "lilypond prelude.ly" in the terminal and whatnot. Use 
Frescobaldi or a similar setup with your editor of choice.


Don't feel the need to wait for LilyPond to compile, especially for 
large scores. My approach is to keep typing music continuously. I hit 
Ctrl+M (Frescobaldi) every few bars or so, leave it on in the background 
while I keep transcribing, and maybe glance at its results. It's largely 
a matter of practice -- get really comfortable with LilyPond's syntax so 
you can confidently type a large chunk of music in without needing to 
look at the compiled output. Proofreading comes after the initial sprint 
through the music, and point and click is essential for that.


Oh yeah, and I suggest using \language "english". Save a few characters.


Nathan

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


Re: Overlapping Characters in markup

2016-12-23 Thread Nathan Ho

On 2016-12-23 08:07, Br. Samuel Springuel wrote:

[...]

While \translate works, and I can manipulate the offsets via trial and
error, I'm stumped as to the units.  I found the documentation for the
function (lilypond.org/doc/v2.18/Documentation/notation/align) and
it's companion \translate-scaled, but some idea as to the units (for
either function) would be useful for coordinating this faked character
across the project.


Hi Samuel,

Sorry, I was wrong -- you should use \translate-scaled, not \translate. 
As far as I can tell, \translate uses staff spaces. \translate-scaled 
also uses staff spaces, but multiplied by the magnification of the font 
size relative to a font size of 0. It doesn't seem that 
\translate-scaled is aware of any font metrics like em size.



Nathan

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


Re: Overlapping Characters in markup

2016-12-22 Thread Nathan Ho

On 2016-12-22 20:10, Br. Samuel Springuel wrote:

If I wish to create a markup command that combines two characters from
different fonts (the normal Roman font of the file and another font
which provides special glyphs) in an overlapping fashion, how would I
go about doing that?

Thus far I have the following which has both characters, but no 
overlap:


[...]


Hi Samuel,

\combine will overlay characters, and \translate lets you nudge things 
around to get them aligned properly.


\markup { \combine V \translate #'(0.3 . 0.4) \override #'(font-name . 
"greextra")  }



Nathan

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


Re: Is there a short way of forcing a particular octave?

2016-12-21 Thread Nathan Ho

On 2016-12-21 11:55, Kieren MacMillan wrote:

Hi David,


I can't see the point in avoiding any methodology
that makes things easier and more reliable.


I agree 100%. Which is exactly why I abandoned \relative and use only
\absolute.  ;)


I also stopped using \relative a few years ago (I think it was in 
response to one of your posts here). No regrets here.


It's alright for simple monophonic melodies, but it gets in the way when 
engraving anything with chords or polyphony. Also, if you break your 
music into sections and assign them to variables, you have to either 1) 
work out how octaves interact when juxtaposing these sections or 2) use 
a hybrid of absolute mode for structure and relative mode for note 
entry.


The main downside to absolute mode is that wrapping stretches of music 
in \transpose is inconvenient, creating distracting structures in the 
code that don't reflect the music. As an example, try typesetting a line 
that ascends over several octaves without an abundance of apostrophes 
and commas in the source.



Nathan

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


Re: Override SystemStartSquare width?

2016-11-16 Thread Nathan Ho

On 2016-11-16 16:16, dtsmarin wrote:

Hello,

How can I extend the square bracket to fill the gap? (see attached 
image)




Hi Dmitris,

Bad news. Looks like SystemStartSquare is hardcoded at 0.8 staff spaces 
(source: System_start_delimiter::line_bracket in 
system-start-delimiter.cc). It's possible to fix, but it will probably 
require Scheming.


However, my attempt at reproducing looks different from your screenshot:

\new StaffGroup \with {
  systemStartDelimiter = #'SystemStartBracket
} <<
  \new StaffGroup \with {
systemStartDelimiter = #'SystemStartSquare
  } <<
\new StaffGroup \with {
  systemStartDelimiter = #'SystemStartSquare
} <<
  \new Staff { c'4 }
  \new Staff { c'4 }
>>
\new Staff { c'4 }
  >>
  \new Staff { c'4 }




Apparently something in your code has squashed the delimiters together. 
Was that intentional? It would be helpful to see a minimal working 
example showing how to reproduce the screenshot.



Nathan

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


Re: How to get irrational tuplets inside a regular meter like 9/8

2016-11-08 Thread Nathan Ho

On 2016-11-08 15:02, mclaren wrote:
Whatever Lilypond is doing internally, there's some arbitrary limit to 
the
numbers it uses. Time signatures above some large value cause a crash. 
Too

many tuplets of too many different kinds causes Lilypond to crash.


Hi mclaren,

So you found bugs in LilyPond. In fact, I can reproduce the time 
signature issue in 2.19.50, since this code causes LilyPond to hang:


{
  \time 99/1
  s1
}

You don't need to go on a whole rant about how it's stupid or unmusical, 
and you don't need to accuse LilyPond of being backed by a conspiracy of 
programmers out to destroy music. It's a mistake, plain and simple, and 
it was overlooked because nobody has reported it before, and nobody has 
reported it before because such time signatures are extremely rare. I 
certainly would not expect to see them outside of "score as art" works, 
such as some of Tom Johnson's graphic scores or John Stump's infamous 
parody engravings.


I agree that these limitations are flaws in LilyPond that should be 
fixed. Maybe if you could grow up and stop being so entitled and 
accusative, the dev team would be willing to accommodate these needs, 
prioritization issues notwithstanding.



Nathan

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


Re: Cross staff and beaming

2016-11-06 Thread Nathan Ho

On 2016-11-05 08:05, Andrew Bernard wrote:

This is a question about cross staff stems and beaming. Referring to
the attached example, can this be done by any means in lilypond? Am I
missing something obvious?

Is there perhaps any way to have beams from the bass and from the
treble be made to coincide so as to get something like this, as a sort
of fake out? Lilypond of course does its level best to avoid beams
from the staves colliding. I am wondering if there is any way to
override this behaviour, of course normally desirable, but here it
would be useful.


Hi Andrew,

There's a hack for this that works very well, if I may say so myself. I 
don't think I ever posted it to the list and it's lost on an old hard 
drive, but it shouldn't be hard to recreate.


This is a kind of cross-staff stem, the twist being that the stems being 
joined have opposing directions. Copy-paste the Scheme code for 
cross-staff stems, which has a check to ensure that the two stems that 
you're joining 1) have the same direction and 2) have horizontal 
positions are within a certain margin of error of each other (I think it 
was 0.01 staff spaces). Remove the first check and widen the margin as 
necessary. All you need to do then is manually shift one of the note 
columns until the stems connect, and it Just Works.



Nathan

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


Re: Two different time signatures with different tuplets in 'em

2016-11-06 Thread Nathan Ho

On 2016-11-05 23:35, mclaren wrote:
Urs Liska's and Andrew Ho's page break code works well on most examples 
I've

worked through, but it doesn't work here.


Hi mclaren,

I hate to correct you, but the correct names are Hans Liska and Andrew 
Ho.



Andrew

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


Re: Can't get page breaks for 7 over square root of 71 meter

2016-11-03 Thread Nathan Ho

On 2016-11-03 17:36, mclaren wrote:
The problem comes from Lilypond's bizarre assumption that at some point 
all
the barlines in the score will line up. In this case, clearly the 
barlines
in the 7/sqr(71) staff will never line up with any of the other 
barlines in

the score. Therefore Lilypond can't ever break the page.


Hello mclaren,

LilyPond does not allow you to break in the middle of note events by 
default. The solution is to remove Forbid_line_break_engraver from the 
Voice context, as described in the docs here: 
http://lilypond.org/doc/v2.18/Documentation/notation/line-breaking


\layout {
  \context {
\Voice
\remove "Forbid_line_break_engraver"
  }
}

I admit to posting this without making much effort to understand your 
code, so apologies if this is does not solve the problem.


I also agree with Urs' comment on your tone.


Nathan

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


Re: Stencil questions (adding text and defining line style)

2016-09-21 Thread Nathan Ho

On 2016-09-21 11:49, Urs Liska wrote:


Concretely I want to add a text element at a certain position to a
  (ly:stencil-add
construction.


Hi Urs,

grob-interpret-markup is the way to create text. You can position it 
with ly:stencil-translate, and add it to another stencil using 
ly:stencil-add:


(ly:stencil-add
  your-current-stencil
  (ly:stencil-translate
(grob-interpret-markup
  grob
  (markup "Hey"))
'(2 . 3)))

ly:stencil-combine-at-edge is also really handy if you want to position 
a stencil relative to bounding box of another one, like "place this 
thing vertically centered so its left edge is 0.1 staff spaces away from 
the right edge of this other thing."



The other thing I didn't find is: how can I create a dashed (or
otherwise styled) line stencil with make-line-stencil?


I don't think it's possible, but you can use draw-dashed-line / 
draw-dotted-line in a grob-interpret-markup.



More generally: how can I learn more about these things? Searching
lilypond.org seems to only point to snippets and no real explanations.


I've generally relied on examining examples in the LSR to learn about 
this sort of thing. The "Scheme functions" section of the Notation and 
Internals manuals is helpful, but a lot of the functions are not clearly 
documented, and they're definitely not presented in a manner that's 
conducive to step-by-step learning.


Since it's pretty tough to use stencils, as you can see I resort a lot 
to markups. They're not the perfect solution, but they're better 
documented and easier to use.



Nathan

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


Re: Open Sound control?

2016-08-13 Thread Nathan Ho

On 2016-08-13 06:52, bb wrote:

https://de.wikipedia.org/wiki/Open_Sound_Control
is sayed to replace MIDI. Is this something usefull for lilypond? Can
one save osc files like MIDI files?


OSC replaces one particular use of MIDI, which is for real-time 
communication between software or hardware devices. OSC is much more 
general than MIDI, making few assumptions about the kind of musical 
content being conveyed, and pretty much every application of OSC uses 
its own sub-protocol. For example, here is the command reference for 
scsynth, an app that makes heavy use of OSC: 
http://doc.sccode.org/Reference/Server-Command-Reference.html Any app 
that wants to talk to scsynth will have to know these commands.


OSC has found use in music notation -- INScore (for animated/interactive 
scores) and IanniX (an OSC sequencer that acts as its own kind of 
graphic score). But these apps are nothing like LilyPond.


SuperCollider has an "OSC Score" format which encodes a bunch of timed 
OSC messages. I'm not sure how standardized it is, but it's as close as 
OSC gets to the MIDI file. Again, the process of reading and writing 
these scores requires some agreed-upon sub-protocol suited to your 
specific application.


It's a cool protocol, and very much alive. But it's not very useful to 
LilyPond.



Nathan

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


Re: I am not top posting

2016-07-24 Thread Nathan Ho

On 2016-07-23 21:05, Robert Edge wrote:
I have no idea why, but this interface won't let me ask a question.  It 
says

I am top posting.

I am not top posting.  I have not quoted anything.

How do I send a message to this list?


Sometimes if you have ">" symbols in LilyPond code, the list gets 
confused. If that happens, put this at the top of the message:



I'm not top posting.



Nathan

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


Segmentation fault with a bad systemStartDelimiter

2016-07-13 Thread Nathan Ho

Hi list,

A bad value for StaffGroup.systemStartDelimiter appears to cause a 
segmentation fault:


\version "2.19.45"
\new StaffGroup \with { systemStartDelimiter = #'aaa } { c'4 }


$ lilypond test.ly
GNU LilyPond 2.19.45
Processing `traiettorie_ohshit.ly'
Parsing...
Interpreting music...Segmentation fault (core dumped)


Is this the right place to report this sort of thing?



Nathan

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


Re: Flute Accompaniment

2016-06-26 Thread Nathan Ho

On 2016-06-26 11:14, Br. Gabriel-Marie | SSPX wrote:

In my piece I have a piano staff with the music on the bottom staff.
In the upper staff it is supposed to be notes for recorder or flute
accompaniment.  In the original the flute notes and its staff are all
a bit smaller in size.  What do you call those smaller notes?  I want
to make the entire top staff + the notes just smaller so it is obvious
to the singers not to try and sing the accompaniment.  How do I do
that?


Hello,

Try adding the following \with block to your Staff:

\new Staff \with {
  fontSize = #-3
  \override StaffSymbol.staff-space = #(magstep -3)
  \override StaffSymbol.thickness = #(magstep -3)
} {
   % Music follows here
}

it's been a while since I used LilyPond so this knowledge might be a bit 
out of date... I think in the development version there's a new way to 
do this.



Nathan

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


Re: Lilypond statistics

2016-04-08 Thread Nathan Ho

On 2016-04-07 21:51, Dave Higgins wrote:

Is there any way to generate statistics for a file?  Things like, let
say, a concordance or the number of a's b's or bes's, or repeated
markup's?  (I know I can do stuff like this with grep, but that's very
singular.)


Try event-listener.ly 
(http://lilypond.org/doc/v2.18/Documentation/notation/saving-music-events-to-a-file). 
It gives you a "database dump" of all the events in a file. You can 
either process this output with other programs, or use a custom fork of 
event-listener.ly that does the statistics for you.



Nathan

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


Re: Use jazz fonts in LilyPond?

2016-03-06 Thread Nathan Ho

On 2016-03-06 16:10, Nathan Ho wrote:

On 2016-03-06 15:10, Eric Albert wrote:

I've been working from Leigh Verlag's page on faking a Real Book page
in LilyPond (thanks to Kieren for the link):

  http://leighverlag.blogspot.ca/2015/12/mimicking-real-book-look.html

That page answers many of my questions. I still have some font
questions. Please forgive my ignorance of both LilyPond (this is my
first project) and fonts in general (no experience other than changing
fonts inside a Microsoft Word document).

Can I use any jazz character font set with LilyPond? Or is there a
magic order that the symbols need to be in?


Music fonts are not very well standardized. The only layout standard
is SMuFL, which was developed in 2013 -- too new to be used in
LilyPond, Sibelius, or Finale. The consequence is that in general, you
can't take a music font intended for one program and use it in another
because different programs expect different layouts. The Jazz Font
plug won't fit into the LilyPond socket, and you'll have to use an
adaptor.

The Jazz Font website claims compatibility with Sibelius and Finale.
To my knowledge, I don't think anyone has written a LilyPond adaptor
for one of those two formats.


Crap, I completely misread the post. I see you meant using the chord 
symbols.



Nathan

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


Re: Use jazz fonts in LilyPond?

2016-03-06 Thread Nathan Ho

On 2016-03-06 15:10, Eric Albert wrote:

I've been working from Leigh Verlag's page on faking a Real Book page
in LilyPond (thanks to Kieren for the link):

  http://leighverlag.blogspot.ca/2015/12/mimicking-real-book-look.html

That page answers many of my questions. I still have some font
questions. Please forgive my ignorance of both LilyPond (this is my
first project) and fonts in general (no experience other than changing
fonts inside a Microsoft Word document).

Can I use any jazz character font set with LilyPond? Or is there a
magic order that the symbols need to be in?


Music fonts are not very well standardized. The only layout standard is 
SMuFL, which was developed in 2013 -- too new to be used in LilyPond, 
Sibelius, or Finale. The consequence is that in general, you can't take 
a music font intended for one program and use it in another because 
different programs expect different layouts. The Jazz Font plug won't 
fit into the LilyPond socket, and you'll have to use an adaptor.


The Jazz Font website claims compatibility with Sibelius and Finale. To 
my knowledge, I don't think anyone has written a LilyPond adaptor for 
one of those two formats.



Nathan

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


Re: Funny LilyPond Score

2016-03-01 Thread Nathan Ho

On 2016-03-01 11:03, Abraham Lee wrote:

Fellow Pond Dwellers,

Here's a laugh for everyone today. I was browsing through the sea of
scores on the web and stumbled across this one [1]. Enjoy!


Funny! I was going to ask where you found this, but I answered my own 
question: 
https://opensource.com/life/16/2/lilypond-scores-beautiful-music



Nathan

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


Re: music writing

2016-02-27 Thread Nathan Ho

On 2016-02-27 11:25, Robert Sabourin wrote:

how do you over ride the security in place?  i get a message that this
did not come from an apples store so it will not be installed.


Hi Robert,

Please use "Reply All" in mailing list conversations, thanks!

Sorry, I don't use a Mac. Perhaps others on the list will be able to 
help you.



Nathan

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


Re: music writing

2016-02-27 Thread Nathan Ho

On 2016-02-27 10:51, Robert Sabourin wrote:

will this program work on an apple computer?  i have an i-mac.


Hi Robert,

Welcome to LilyPond! Yes, the program is available for Mac: 
http://lilypond.org/macos-x.html



Nathan

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


Re: Exited with return code -1073741819.

2016-02-26 Thread Nathan Ho

On 2016-02-25 16:23, MING TSANG wrote:

I transcribe a score SA-TB + piano contains 118 measures. I enter the
last measure and I got the error message.
If I comment out measure #118, the compile went OK. I double check
measure 118 and there is no code error. What is the error message
"Exited with return code -1073741819." mean ? What to do to resolve. I
am running frescobaldi -lilypond in window 10.


In the past I remember encountering a very strange bug where LilyPond 
would segfault on a file for no apparent reason. If I changed any note, 
the error went away, and reverting would restore the segfault. There 
wasn't anything extraordinary about the file either: it was just a page 
of conventional music notation. Fortunately it only happened with a very 
particular unfinished engraving, so I just went on with music entry and 
it never happened again. Maybe you're encountering the same bug.


Whatever the case is, I don't think we can do much to help you without 
any code.



Nathan

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


Re: Tie across voices

2016-02-12 Thread Nathan Ho

On 2016-02-12 15:37, Joseph N. Srednicki wrote:

In the following three-beat example, I am trying to tie the
upper-voice note in the second beat with the lower-voice note of the
third beat.

My example seems to work somewhat, but the notes of the upper and
lower voices of the second and third beats do not align vertically as
they should.

Can someone please explain how to align the upper and lower voices in
the second and third beats or another approach to the problem of
coding the tie across voices?

I tried using \shiftOn to align the voices, but I was unsuccessful.

I used Google to search and found the snippet located at
http://lsr.di.unimi.it/LSR/Snippet?id=8 [1]. I tried to follow this
snippet as an example.


Hi Joseph,

Here's how you fix the shifting problem:

\language "english"

\relative c' {\key d\major
  \time 3/8
  <<
{ fs8 b d }
\\
{ cs,8 es b' }
\\
{
  \override NoteColumn.force-hshift = #0
  \hideNotes
  s8 b8~ b8
}
  >>
}


Nathan

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


Re: overlaying noteheads in different voices

2016-02-08 Thread Nathan Ho

On 2016-02-08 19:27, Charles O. Lawrence wrote:

How do I get the dotted half low a in voice 2 to overlay (blot out? I
don't know the proper terminology) the eighth low a in voice 1?

I searched the LSR, but came up empty, probably because I don't know
the proper lilypond terminology for this notation.



Hi Charles,

I don't advise doing this because it is possible to interpret the eighth 
note as dotted. But if you must, you're looking for 
\mergeDifferentlyHeadedOn and \mergeDifferentlyDottedOn. See 
http://lilypond.org/doc/v2.18/Documentation/notation/multiple-voices#collision-resolution



Nathan

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


Re: Very fast typesetting regardless of beauty?

2016-02-03 Thread Nathan Ho

On 2016-02-03 17:51, Isaac Reilly wrote:

Hi all,

I'm working on a graphical music editing program. The final output
(with Lilypond, of course) is going great, but for editing the music
in real-time it's way too slow.

Can you give me advice or point me toward a resource on speeding up
Lilypond by turning off features? For instance, I don't care about
stem length, beam slant, collisions between noteheads and anything
else, collisions between markup elements, or spacing between staves.
And since it will always be rendering to a single page wide enough to
hold it all on one line, I'd like to turn off the line break
calculations. What do you suggest?


Hi Isaac,

I hate to be the bearer of bad news, but LilyPond doesn't seem to be the 
right tool for real-time engraving. Maybe take a look at guidolib 
(http://guidolib.sourceforge.net/), which is specifically intended for 
real-time engraving. INScore (http://inscore.sourceforge.net/) is a very 
cool environment that employs guidolib for animated, interactive scores.



Nathan

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


Re: Is this an error?

2016-01-29 Thread Nathan Ho

On 2016-01-29 07:54, Joseph Breton wrote:

AMDG

I am just learning using OOolilypond.  The following code prints out b
flat and not b natural.  Try as I might, I have not been able to
remedy the problem.  Any suggestions?  Thanks.

melody = \relative c'
{ \key g  \major \time 3/4
  b
}

\score {
  \new Staff
  \melody
  \layout { }
  \midi { }
}


Hi Joseph,

This compiles fine for me. The weird output must mean that your language 
is set to deutsch, norsk, suomi, or svenska. Please check for a 
\language command.



Nathan

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


Re: Learning more complicated lilypond coding

2016-01-29 Thread Nathan Ho

On 2016-01-29 14:54, Charles O. Lawrence wrote:

For my edification in learning more complicated lilypond coding
techniques, could one of you gurus post a sample of how to code the
attached measure. The complication, for me at least, is the fact that
the r8 should come AFTER the bass clef. With this code

\relative c' {\clef treble \time 2/4 \clef bass r8}

the initial treble clef disappears. Perhaps this behavior is the norm,
but I would like the r8 to appear after the mid measure bass clef, as
shown in the image. I'm sure it can be done. What say you.


Hi Charles,

I think this LSR snippet should work for you:

http://lsr.di.unimi.it/LSR/Item?id=792


Nathan

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


Re: simplifying chromatic scale notation

2016-01-25 Thread Nathan Ho

On 2016-01-25 21:35, Paul Morris wrote:

On Jan 25, 2016, at 4:19 PM, musicus  wrote:

See attached. Comments, suggestions are very welcome ;)


Hi musicus,

I think you’re right that standard notation is not as good as it
could be for such chromatic music, and you have an interesting
approach for improving it. I agree with what others have said about
the ambiguity of the notes though.

One idea would be to use triangle shapes for the accidental notes to
better clarify their relation to the “natural” or rather
in-the-key, non-accidental, notes. Like a diatonic-staff version of
Reed’s Twinline:
http://musicnotation.org/system/twinline-notation-by-thomas-reed/ [1]


There's http://www.simplifiedmusicnotation.org/. They offer a commercial 
plugin for Sibelius, but I also have a LilyPond implementation for it 
lying around somewhere.



Nathan

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


Re: unterminated tie

2016-01-15 Thread Nathan Ho

On 2016-01-15 11:49, Mark Stephen Mrotek wrote:

Hello:

I cannot find the "unterminated tie" in the following measures.

 r4 q2 | r4 2 | q2. |

 r4 2 | r4 2 | % this line highlighted.


Hi Mark,

Check your octaves on the f. If you're in relative mode, the second f on 
this line ends up an octave higher. If you're in absolute mode, f is of 
course an octave lower than f'.



Nathan

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


RE: unterminated tie

2016-01-15 Thread Nathan Ho

On 2016-01-15 12:26, Mark Stephen Mrotek wrote:

Nathan,

Thank you for your reply and the observation. I did not mention that 
the
second f is after a clef change - bass to treble - so the ' is 
necessary.


Since it compiles correctly, perhaps it is just a "glitch" in the 
program.




Hi Mark,

Clef changes do not affect pitch; they only change the way pitches are 
displayed. Are you trying to engrave a cross-clef tie? If so, this 
snippet might help you: http://lsr.di.unimi.it/LSR/Item?id=326


But I can only grasp at straws here. As Malte pointed out, your example 
isn't complete.



Nathan

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


Re: Bravura svg font

2016-01-07 Thread Nathan Ho

On 2016-01-07 02:57, Paul Booker wrote:

Thanks Nathan,
Since posting, I've scanned the bug and devel groups, and it would 
appear I
am not being fashionable in wanting to do this. The trend seems to be 
toward

woff fonts for svg, is that the case?


Yes and no. The openlilylib font project mostly supersedes the SMuFL 
implementation. I haven't been keeping up on the project (since I 
haven't been using LilyPond much lately), but I'd wager it is superior 
for the specific case of typesetting music in Bravura/Profondo. When the 
site gets back up, I suggest you use their work.


However, the LilyJAZZ dynasty still lives on. The most serious use is 
probably Robert Piéchaud's commercial font November. The least serious 
use is the recent Christmas font adaptation by Leigh Verlag :)


Nathan

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


Re: Bravura svg font

2016-01-07 Thread Nathan Ho

On 2016-01-06 11:23, Paul Booker wrote:

Hi,
I'm a new use of lilypond-windows on Win 8.1 64bit and Win 7. First of 
all,
thanks for wonderful software; I'm generating many snippets for 
educational

purposes.
My main problem so far is getting the bravura alternative font to 
appear. I

don't mind trying a few things, but this problem has me stumped.


Hi Paul,

I'm responsible for this issue as the maintainer of the SMuFL 
implementation. Thanks for reporting the bug; I'll get on this tomorrow.


By the way, there is another way to get Bravura (and a whole host of 
other fonts) in LilyPond. It should be available at 
fonts.openlilylib.org but that site seems to be down for the moment.


Nathan

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


Re: Bravura svg font

2016-01-07 Thread Nathan Ho

On 2016-01-07 15:49, Simon Albrecht wrote:


In case others be interested:

Nice and funny :-) Thanks, Abraham (and Mark)!

Yours, Simon


There aren't enough novelty music fonts out there. Once I was a kid and 
I entered "Take Me Out to the Ballgame" in Finale PrintMusic, then 
edited it in Paint to make the noteheads baseballs and to make the clefs 
wear little baseball caps.


Nathan

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


Re: When to Use Pound Signs

2016-01-05 Thread Nathan Ho

On 2016-01-05 20:55, Colin Campbell wrote:

On 16-01-05 09:47 PM, Andrew Bernard wrote:
According to the Unicode Standard 6.2, this is u0023, which is 
designated Number Sign, and also known equivalently as:


pound sign, hash, crosshatch, octothorpe

I have always called it octothorpe, mostly because it is just such a 
great word!





I wonder if the spaces delimited by the lines are thorpes? I' also
carpent for a living, though.


Fun fact -- the term "octothorpe" was completely fabricated and doesn't 
have an etymology. It started out as an in-joke at Bell Labs: 
http://dougkerr.net/Pumpkin/articles/Octatherp.pdf


A lot of young people today call the symbol a "hashtag." Some might 
scoff at this since a hashtag is an application of a hash and not the 
symbol itself, but hey, metonymy is metonymy.


Nathan

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


Re: Child quote

2015-09-28 Thread Nathan Ho
On Mon, Sep 28, 2015 at 8:28 AM, Menu Jacques  wrote:
> Hello folks,
>
> My grand-son, 6 years and a half old, discovered what he named a rainbow in 
> the first LP score I’ve done for him. The goal is for him to copy it by hand 
> on empty staves.
> The rainbow is actually a fermata…

\markup {
  \combine
  \with-color #(x11-color "purple") \musicglyph #"scripts.ufermata"
  \fontsize #1
  \combine
  \with-color #(x11-color "blue") \musicglyph #"scripts.ufermata"
  \fontsize #1
  \combine
  \with-color #(x11-color "green") \musicglyph #"scripts.ufermata"
  \fontsize #1
  \combine
  \with-color #(x11-color "yellow") \musicglyph #"scripts.ufermata"
  \fontsize #1
  \combine
  \with-color #(x11-color "orange") \musicglyph #"scripts.ufermata"
  \fontsize #1
  \with-color #(x11-color "red") \musicglyph #"scripts.ufermata"
}

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


Re: Time signature denominator as a note rather than number?

2015-09-15 Thread Nathan Ho
On Tue, Sep 15, 2015 at 7:12 PM, ViniWolfling
 wrote:
> Hi everybody,
>
> Anybody know how to put a note instead of a number in the denominator? Or at
> least /if/ it can be done? For example:
>
> 
>
> Thanks in advance!

Hello,

Have a look at this LSR snippet: http://lsr.di.unimi.it/LSR/Item?id=642

Regards,
Nathan

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


Re: OT: Beauty of programming languages

2015-09-10 Thread Nathan Ho
On Thu, Sep 10, 2015 at 12:50 PM, Kieren MacMillan
 wrote:
> Hi Nathan,
>
>> Most music I work with now is not conventionally notated,
>> so I haven't found much use for LilyPond recently.
>
> What kinds of things do you do?
> How *is* it notated?
>
> You may be the perfect [kind of] person to help make her the best notation 
> application ever.  =)
>

Most of it has no notation at all -- freely improvised (no written
notation), or purely electronic (no human performers).

Regards,
Nathan

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


Re: OT: Beauty of programming languages

2015-09-10 Thread Nathan Ho
On Thu, Sep 10, 2015 at 11:59 AM, Tim Reeves  wrote:
> Age: 49
> Amateur hornist.
> Typesetting of existing parts, occasionally creating simple exercises,
> fingering charts, etc. Not a regular user, but like to keep up on
> development.
> I use Frescobaldi every time for some time now, and I've been using LP for
> roughly eight years.
>

Age: 18
Composition and piano student. I have been using LilyPond on-and-off
for about six years, nowadays mostly for arrangements and
transcriptions. Most music I work with now is not conventionally
notated, so I haven't found much use for LilyPond recently.

Regards,
Nathan

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


Re: set barlines manually

2015-08-26 Thread Nathan Ho
On Wed, Aug 26, 2015 at 12:40 PM, Mátyás Seress serima...@gmail.com wrote:
 Hi all,

 how can I set barlines completely manually throughout a whole sheet music?

If you have no time signatures, remove Time_signature_engraver and use
\cadenzaOn. You can place bars with \bar |.

Regards,
Nathan

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


Re: Randomness in layout

2015-08-21 Thread Nathan Ho
On Fri, Aug 21, 2015 at 4:16 AM, Malte Meyn lilyp...@maltemeyn.de wrote:


 Am 21.08.2015 um 12:55 schrieb Malte Meyn:

 I think that it should be possible to redefine ( to tweak every slur
 with some randomness.


 Here you go:

You can also do \relative { \override Slur.eccentricity = #(lambda
(grob) (* 0.5 (random:normal))) c'2( d) c( d) ... }

To address the OP, I have experimented with this before with wobbly
noteheads, with the motivation of creating a generative jazz font:
http://lsr.di.unimi.it/LSR/Item?id=859  It was a fun Scheme exercise,
but I never followed through with the rest of the font. I just
handwrite my lead sheets these days.

I think the best way to make an engraving look dirtier would be to
use LilyPond normally and apply some sort of post-processing. Perhaps
convert to raster, add noise and distortion, and autotrace.

Regards,
Nathan

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


Re: Sibelius 8

2015-06-24 Thread Nathan Ho
On Wed, Jun 24, 2015 at 9:27 AM, Urs Liska u...@openlilylib.org wrote:
 Sibelius 8 has arrived - and gives an implicit answer to the questions
 that have arisen after they let their collected development competence
 go ...
 http://www.sibeliusblog.com/news/sibelius-8-is-here/

Corpses for sale, only $670 each.

Regards,
Nathan

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


Re: A Chord Question

2015-06-21 Thread Nathan Ho
On Sun, Jun 21, 2015 at 4:27 PM, William Marchant wmarch...@eastlink.ca
wrote:

  Using the \chordmode function,  when I enter a:m7.5-  I get as shown
 in the documentation.

 The guitarist in our group would very much like to stay with the notation
 he is used to.  Namely  .


Hi William,

Have a look at
http://lilypond.org/doc/v2.19/Documentation/notation/displaying-chords#customizing-chord-names,
which contains all the info you'll need for customizing the chord name
system.

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


Re: Polyphonic notes slur solution

2015-06-21 Thread Nathan Ho
On Sun, Jun 21, 2015 at 12:22 AM, rsfjr rsfj...@gmail.com wrote:

 I placed a \override Staff.Arpeggio.direction = 1 at the code, so that the
 arpeggio parenthesis would be at the right. It works OK, but, can it be
 mirroed? The parenthesis is pointed out the note pair.
 Tried the \shape command and nothing was changed.


This should do the trick:

\override Staff.Arpeggio.stencil = #(lambda (grob) (ly:stencil-scale
(ly:arpeggio::brew-chord-slur grob) -1 1))


Regards,

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


Re: Polyphonic notes slur solution

2015-06-20 Thread Nathan Ho
On Fri, Jun 19, 2015 at 11:48 PM, rsfjr rsfj...@gmail.com wrote:

 Hello,

 I am trying to overcome an issue. I need to place some slurs in a
 polyphonic
 pair, connecting the noteheads. Is there any workaround?


Hi rsfjr,

LilyPond doesn't support vertical slurs. What you're looking for is
\arpeggioParenthesis + \arpeggio:
http://lilypond.org/doc/v2.19/Documentation/notation/expressive-marks-as-lines#arpeggio

Cross-voice arpeggios are supported via Staff.connectArpeggios.
Unfortunately, cross-voice arpeggios *and *\arpeggioParenthesis don't work
together (!), requiring us to excavate the inner workings of
\arpeggioParenthesis and adapt them to the Staff context. It's details like
this that make me hate LilyPond sometimes :)

The final outcome:

\new Staff \with {

\consists Span_arpeggio_engraver

} {

\set Staff.connectArpeggios = ##t

\override Staff.Arpeggio.stencil = #ly:arpeggio::brew-chord-slur

\override Staff.Arpeggio.X-extent = #ly:grob::stencil-width

 { b'\arpeggio } \\ { g'\arpeggio } 

% And, of course, the slur's too short vertically and there's no simple
override to fix it...

}

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


Re: Assertion failed!

2015-06-12 Thread Nathan Ho
On Fri, Jun 12, 2015 at 8:10 AM, Daniel Rosen drose...@gmail.com wrote:

 Hello all,

 When I try to attach a balloon to a whole note, like this:

 %%% Snippet begins
 \version 2.19.21
 \new Voice \with { \consists Balloon_engraver }
 {
   \balloonGrobText #'Stem #'(3 . 3) \markup { I'm a Stem }
   g1
 }
 %%% Snippet ends

 I get the attached pop-up window.

 Is this an issue on my end, or is it a bug?


Definitely a bug. On my system the score compiles, but produces four
warning: Found infinity or nan in output. Substituting 0.0 warnings and
the PDF output looks weird (the staff is at the top of the page and the
note overlaps the clef).

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


Re: Formatting Titles...

2015-06-10 Thread Nathan Ho
On Tue, Jun 9, 2015 at 11:11 PM, Marco Bagolin bagolin.ma...@gmail.com
wrote:

 Hello all.
 I must to format titles.

 I write the following code:

 \header {

 dedication = \markup \override #'(font-name . Book Antiqua) \bold
 {Music from the Motion Picture}

 title = \markup \override #'(font-name . Book Antiqua) \fontsize #+2 {
 \bold TITLE}

 composer = \markup \override #'(font-name . Book Antiqua) \bold
  {COMPOSER}

 arranger = \markup \override #'(font-name . Book Antiqua) \italic
  {Arranged by MARCO BAGOLIN}

 tagline = 

 }

 But what I wrote is not functioning correctly.
 italic and bold commands are ignored.


Hi Marco, try this out:

\header {


dedication = \markup \override #'(font-name . Book Antiqua Bold) Music
from the Motion Picture


title = \markup \override #'(font-name . Book Antiqua Bold) \fontsize #+2
{ TITLE}


composer = \markup \override #'(font-name . Book Antiqua Bold) COMPOSER


arranger = \markup \override #'(font-name . Book Antiqua Italic)
Arranged by MARCO BAGOLIN


tagline = 


}


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


Re: Scheme function

2015-06-10 Thread Nathan Ho
On Wed, Jun 10, 2015 at 7:17 AM, Víctor piratabonifa...@gmail.com wrote:

 Hi all:

 solfa =
 #(define-music-function
 (parser location framed number note)
 (string? string? string?)
   #{
 ^\markup{
   \box
   \pad-to-box #'(0 . 0) #'(0 . 2.2){ #framed }
   #number :
   \italic #note
 }
   #})

 \relative c' { c4^\solfa C I do }

 I need this function to stop drawing the box when first argument is  or
 stop printing the : when second or third argument are . I'm very new to
 Scheme and any help is very much apreciated.

 Regards,
 Víctor.


Hi Victor,

Here's one way to do it:

solfa =
#(define-music-function
(parser location framed number note)
(string? string? string?)
  (make-music
'TextScriptEvent
'direction 1
'text
(markup
   (if (not (equal? framed ))
  (markup #:box #:pad-to-box '(0 . 0) '(0 . 2.2) framed)
  )
#:simple number
(if (not (or (equal? number ) (equal? note )))
  (markup #:simple :)
  )
#:italic note)))

\relative c' {
  c1^\solfa C I do
  c1^\solfa  I do
  c1^\solfa C  do
  c1^\solfa C I 
}

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


Re: Formatting tempo text

2015-06-08 Thread Nathan Ho
On Mon, Jun 8, 2015 at 9:03 PM, Marco Bagolin bagolin.ma...@gmail.com
wrote:



 Hello all.
 How can I obtain what you can see in What_I_want.png file?

 My best result is in myresult.png file.
 The code I wrote is the following:
 \tempo \markup {\column {\line { \tiny {''Do You Want to smile?''}}
 \line {Moderate - rhytmic, but expressive}}}

 But I want to obtain the formattation as in What_I_want.png file with the
 title Do You Want to smile? not bolt and with the marks under the text.

 Thank you all for the help.


Hi Marco,

Markups can be unbolded with the \normal-text markup command, and the
vertical order of rehearsal marks and tempo markings can be modified with
the outside-staff-priority grob property.

{
  \override Score.RehearsalMark.outside-staff-priority = #1000
  \override Score.MetronomeMark.outside-staff-priority = #1500
  \mark \markup \box 42
  \tempo \markup {
\column {
  \line { \tiny \normal-text { ''Do You Want to smile?'' } }
  \line {Moderate - rhytmic, but expressive }
}
  }
  c'1
}

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


Re: ostinato rhythm

2015-06-07 Thread Nathan Ho
On Sun, Jun 7, 2015 at 10:52 AM, Dan Eble d...@faithful.be wrote:

 % complete the bass ostinato on the same pitch as the preceding
 % quarter note
 ost = \notemode { r8 8~ 4 4 }

 Used like:

 | g4 \ost | a4 \ost | …

 This is good for avoiding some typing in a long piece.  Can anyone improve
 on it?  (For example, sometimes I need the same rhythm involving three
 separate pitches.) TIA.


 Hi Dan,

Have a look at http://lsr.di.unimi.it/LSR/Item?id=654

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


Re: dodecaphonic-no-repeat and grace notes

2015-06-06 Thread Nathan Ho
On Sat, Jun 6, 2015 at 5:52 PM, Gilberto Agostinho 
gilbertohasn...@gmail.com wrote:

 Hi all,

 I found a little problem with the \accidentalStyle dodecaphonic-no-repeat.
 When there is a grace note between two identical pitches, the second one
 does not receive an accidental as it's suppose to:

 \version 2.19.15
 \relative c' {
   \accidentalStyle dodecaphonic-no-repeat
   \textLengthOn
   cis4 b cis2^all fine here
   cis2 \grace{b8} cis2^no accidental
 }

 producing:

 http://lilypond.1069038.n5.nabble.com/file/n177554/lily.png

 Does anyone know any workaround for this?


A manual workaround is to force the accidental using an exclamation point:

\relative c' {
  \accidentalStyle dodecaphonic-no-repeat
  \textLengthOn
  cis4 b cis2^all fine here
  cis2 \grace{b8} cis2^no accidental
  cis2 \grace{b8} cis!2^manually added
}

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


Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 2:41 PM, priosfilho pauloriosfi...@gmail.com wrote:

 Sorry, Nathan. I will try to make my point clearer.

 *Firstly*, I got the code developed earlier in this thread and altered the
 numbers of handles of path-gliss to four -- the original version came with
 the values (list 'curveto 0 0 (first handle) (second handle)).


Thanks, this is what I was asking for.

It seems that part of the problem is the mailing list wrapping long lines,
so I'll attach the code.

Regards,
Nathan
\version 2.18.2

glissWidth = #0.175 % global variable for glissando width

#(define (radians-degrees theta)
   (* theta (/ 180 PI)))

#(define (path-gliss handle)
  (lambda (grob)
(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
  (X-ext (ly:stencil-extent stencil X))
  (Y-ext (ly:stencil-extent stencil Y))
  (width (interval-length X-ext))
  (height (interval-length Y-ext))
  (lefty (cdr (assoc 'Y (ly:grob-property grob 'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob 'right-bound-info
  (deltay (- righty lefty))
  (dir (if ( deltay 0) 1 -1))
  )


  (ly:stencil-translate
(ly:stencil-add
  (grob-interpret-markup grob
(markup
  (#:path glissWidth
(list (list 'moveto 0 0)
  (list 'curveto (first handle) (second handle) (third handle) (fourth handle) width (* height dir))
  (ly:stencil-translate
; the \rotate markup command doesn't let us pick a rotation center, so we resort to the stencil command
(ly:stencil-rotate
  (grob-interpret-markup grob
(markup #:arrow-head X RIGHT #t))
  (radians-degrees
($atan2
  (- (* height dir) (fourth handle))
  (- width (third handle 1 0)
(cons width (* height dir

(if ( dir 0)
   (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
   (cons (interval-start X-ext) (+ (interval-start Y-ext) height) #f)))


#(define (add-gliss m)
   (case (ly:music-property m 'name)
 ((NoteEvent) (set! (ly:music-property m 'articulations)
  (append (ly:music-property m 'articulations)
 (list (make-music (quote GlissandoEvent)
   m)
 (else #f)))

addGliss = #(define-music-function (parser location music)
 (ly:music?)
   (map-some-music add-gliss music))


\relative c' {
  \numericTimeSignature
  \tempo 4=52
\override NoteHead.font-size = #-1.5

$(add-grace-property 'Voice 'NoteHead 'font-size -4.5)


\time 5/8


   \override Score.GraceSpacing.spacing-increment = #7

   \once \override Glissando #'bound-details =
 #'((right (attach-dir . -2) (end-on-accidental .
#f) (padding . 1))
(left (attach-dir . 0) (padding . 0.)))

   \addGliss {
   \once \override Glissando #'stencil = #(path-gliss '(7 1 0 4))
   \grace b16
   a''4.~-}
   \tuplet 5/4 { a16 gis fis, e'- a,~ }

\time 3/8

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


Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 1:14 PM, priosfilho pauloriosfi...@gmail.com wrote:

 Thanks a lot, Nathan! This will really works fine.

 I just have one question now. I would very much appreciate if you could
 help
 me with that.

 I would like to have local control upon all the four variables of list
 'curveto. With the set-arc function you created, I have control only upon
 the two last variables.


Hi Paulo,

I think we're miscommunicating here, because I didn't create the set-arc
function. My code was developed from a version earlier in the thread -- I
couldn't work off your code because it's broken. At the end of the
definition of path-gliss, there's a mismatched )#f))) and the example
doesn't invoke the path-gliss function at all.

I'm sorry, but there's only so much I can do without a working example of
what you're using! If you can provide that, I can complete the task of
getting the arrowhead working in your code.

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


Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 11:06 AM, priosfilho pauloriosfi...@gmail.com
wrote:

 Hi,

 I'm just new to Lilypond, not a programing knower, but just trying to
 follow
 some instructions on the forum so I can finally achieve really beautiful
 scores in a not-too-easy but definitely intelligent way.

 I wanted to make a curved glissando between two notes and this thread
 helped
 me a lot with that. I am able to redraw the curve to fit my intents but by
 now I am just missing an arrow at the end of it pointing to the second
 note's notehead.


Hi Paulo,

Can you show me the code you're using, or link to the thread you got it
from?

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


Re: override stencil question

2015-06-04 Thread Nathan Ho
On Thu, Jun 4, 2015 at 11:35 AM, priosfilho pauloriosfi...@gmail.com
wrote:

 Hey Nathan

 This is just the code developed in the thread plus more adjustable handles
 for curveto:


Unfortunately this code isn't compiling for me. There are a few extra )'s
in there.

I created this from code earlier in the thread; maybe it'll help you:



arc = #(list 0 0) % global variable to bezier curve handle
glissWidth = #0.2 % global variable for glissando width

#(define (set-arc x y)
(set! arc (list x y)))

#(define (get-arc)
arc)

#(define (radians-degrees theta)
   (* theta (/ 180 PI)))

#(define (path-gliss grob)

(if (ly:stencil? (ly:line-spanner::print grob))
(let* ((stencil (ly:line-spanner::print grob))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y))
(width (interval-length X-ext))
(height (interval-length Y-ext))
(lefty (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
  (righty (cdr (assoc 'Y (ly:grob-property grob
'right-bound-info
(deltay (- righty lefty))
(dir (if ( deltay 0) 1 -1))
(handle (get-arc))) ;- getting the
handle value here

   (ly:stencil-translate
 (ly:stencil-add
   (grob-interpret-markup grob
 (markup
 ;(#: tiny (format ~a (ly:grob-properties grob)))
   ;(format ~a (cdr (assoc 'Y (ly:grob-property grob
'left-bound-info
   ;(#: tiny (format ~a handle))
   (#:path glissWidth
 (list (list 'moveto 0 0)
   (list 'curveto 0 0 (first
handle) (second handle) width (* height dir))
   (ly:stencil-translate
 ; the \rotate markup command doesn't let us pick a rotation
center, so we resort to the stencil command
 (ly:stencil-rotate
   (grob-interpret-markup grob
 (markup #:arrow-head X RIGHT #t))
   (radians-degrees
 ($atan2
   (- (* height dir) (second handle))
   (- width (first handle 1 0)
 (cons width (* height dir
 (if ( dir 0)
  (cons (interval-start X-ext) (+ (interval-start Y-ext) 0.1))
  (cons (interval-start X-ext) (+ (interval-start Y-ext)
height)
  #f))

\new Staff \with {
\override Glissando #'bound-details = #'((right (attach-dir . 0)
(end-on-accidental . #f) (padding . 2.)) (left (attach-dir . 0) (padding .
0.)))
\override Glissando #'stencil = #path-gliss
}
\transpose c c' {
  #(set-arc 2 -4)
  c2\glissando c''2
}



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


Re: change font name of just lyrics?

2015-05-26 Thread Nathan Ho
On Tue, May 26, 2015 at 10:34 AM, Joshua Nichols josh.d.nich...@gmail.com
wrote:

 I've looked for a hack, but I haven't found one yet. I was wondering if
 y'all could expedite my question:

 I'd like to be able to change the default lyric font to a different font
 within the same font family. I have an expert font that has many different
 weights and a condensed form, and I'm not quite sure how to tweak just the
 lyrics.


Here's the hack:

#(define ((force-font font-name) grob)
   (grob-interpret-markup
 grob
 (markup
  #:override (cons 'font-name font-name)
   (ly:grob-property grob 'text

\new Staff {
  c'4 d'4 e'2
} \addlyrics {
  \override LyricText.stencil = #(force-font Ubuntu)
  Li -- ly -- Pond
}

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


Re: variable containing header

2015-05-26 Thread Nathan Ho
On Tue, May 26, 2015 at 5:23 AM, Gianmaria Lari gianmarial...@gmail.com
wrote:

 I'm trying to define a variable containing the header but lilypond does not
 accept it. Am'I doing some error or is this forbidden?

 % my source
 \version 2.18.2
 head = \header {
   title = The Third Position
 }

 \score {
   {a b c d}
   \head
   \layout {}
 }


 Thank you, g


Unfortunately it's not possible :( The grammar simply doesn't allow
assignment of \header objects to variables.

As proposed here
https://lists.gnu.org/archive/html/lilypond-user/2013-04/msg00184.html one
workaround is to place the header in a separate file and use \include.

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


Re: Sometimes order is significant

2015-05-25 Thread Nathan Ho
On Mon, May 25, 2015 at 7:05 AM, Knute Snortum ksnor...@gmail.com wrote:

 I've noticed over the months I've been using LilyPond that there are some
 parts of the syntax that depend on order and some that don't.  For example:

 { c'!8 }

 Everything about must be in the exact order -- the note letter, the octave
 indicator, the force accidental, and the rhythm.  Are there others?

 Everything else I can think of can be in any order.

 { c---.~([ }

 And so on.  Is this worth mentioning in the documentation somewhere?
 Specifically, I had to do a little experimenting to figure out where the
 forced accidental markers (!?) were places syntactically.


This cheat sheet shows many note syntax elements in the correct order:

http://joramberger.de/files/lilypond_sheet_2.18_en.pdf

It seems that all the components starting with string number can be placed
in any order.

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


Re: Sometimes order is significant

2015-05-25 Thread Nathan Ho
On Mon, May 25, 2015 at 2:38 PM, Nathan Ho when.possi...@gmail.com wrote:


 This cheat sheet shows many note syntax elements in the correct order:

 http://joramberger.de/files/lilypond_sheet_2.18_en.pdf

 It seems that all the components starting with string number can be placed
 in any order.


Here's a more formal answer which can be found by delving into the LilyPond
grammar.
http://www.lilypond.org/doc/v2.18/Documentation/contributor/lilypond-grammar

To oversimplify, a monophonic note is divided into a simple_event and any
number of post_events. A simple_event breaks down like so:

- pitch (note name + octave)
- forced accidental markers
- octave check
- note duration and multiplier
- \rest

Beams, slurs, articulations, fingerings, etc. all fall under post_events,
which can occur in any order.

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


Re: rhytm

2015-05-22 Thread Nathan Ho
On Fri, May 22, 2015 at 2:13 PM, Gianmaria Lari gianmarial...@gmail.com
wrote:

 I'm creating in lilypond a violin study.Every measures have the same
 rhytmic configuration. For instance the first measure is:

 g4. \tuplet 3/2 a8 (b8 c8)


 and the second...


 d4. \tuplet 3/2 e8 (f8 g8)


 Does exist any way to simply write the melody and apply to the melody this
 specific rhytm ? So I would write:

 g a b c
 d e f g

 ??
 Thank you, g.


Hi Gianmaria,

Take a look at http://lsr.di.unimi.it/LSR/Item?id=654

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


Re: Question about copyrights and licenses on the LSR

2015-05-02 Thread Nathan Ho
On Sat, May 2, 2015 at 3:17 PM, David Bellows davebell...@gmail.com wrote:

 Hey all,

 I'm trying get everything organized and altogether legal and
 what-have-you with respect to my big music/software project the
 Platonic Music Engine (www.platonicmusicengine.com) which means that I
 need to make sure all the dependencies I'm using have the appropriate
 license and copyright information.

 I am using a few snippets hosted on the LSR but notice that at least
 these don't have any copyright notices or licenses and I don't see
 anything on the LSR about some general licensing thing that applies to
 all the submissions.


It's all public domain. From http://lsr.di.unimi.it/LSR/html/whatsthis.html:

The content of the database is public domain, so you can use it, copy it,
modify and redistribute it with no obligation.

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


Re: Height of start bar brace

2015-04-26 Thread Nathan Ho
On Sun, Apr 26, 2015 at 12:45 PM, Noeck noeck.marb...@gmx.de wrote:

 Hi,

 can I change the height of a start bar brace, like in

 \version 2.19.16
 \new PianoStaff 
   \new Staff { R1 }
   \new Staff { R1 }
 

 I would like to reduce the vertical size a little bit.


For some reason this solution doesn't automatically center the bracket
perfectly, but it's a start.

\version 2.19.16

\new PianoStaff \with {
  \override SystemStartBrace.stencil =
#(lambda (grob)
   (let* ((scale-amount 0.9)
  (stil (ly:system-start-delimiter::print grob))
  (scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
  (extent (ly:stencil-extent stil Y))
  (height (- (cdr extent) (car extent
 (ly:stencil-translate-axis
   scaled-stil
   (+
 (* -0.5 (- 1 scale-amount) height)
 -0.3) ; adjust this to nudge it
   Y)))
} 
  \new Staff { R1 }
  \new Staff { R1 }


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


Re: the sound of brushes

2015-04-07 Thread Nathan Ho
On Tue, Apr 7, 2015 at 1:54 PM, PharaoS yves.hoche...@wanadoo.fr wrote:

 I am trying to get the sound of the jazz brushes with midi \drums {
 sn2^brush sn1 sn sn sn} gives me only short snaps. Is it possible to
 improve that


This is a consequence of the MIDI player you're using, and not something
that can be controlled by LilyPond.

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


Re: Defining event classes

2015-03-31 Thread Nathan Ho
On Tue, Mar 31, 2015 at 4:41 PM, David Nalesnik david.nales...@gmail.com
wrote:

 You need to add 'event' to types for your event to register.  (I'd have to
 investigate why.)  Also, 'music-event' should be replaced with
 'general-music'.

 #(define bang-types
'(
  (BangEvent
   . ((description . BANG!)
  (types . (general-music event bang-event))
  ))
  ))

 Hope this helps!
 David


Thanks David, that works perfectly. I hope that there'll be an easy,
forward-compatible way to do all this in the future.

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


Re: Padding inside \bracket markup?

2015-03-31 Thread Nathan Ho
On Tue, Mar 31, 2015 at 7:40 AM, Trevor Bača trevorb...@gmail.com wrote:

 Hi,

 Is there a way to pad bracketed markup ...

% doesn't work
\override #'(padding . 2) \bracket Foo

 ... analogously to parenthesized markup ...

% does work
\override #'(padding . 2) \bracket Foo

 ... with an \override, or equivalent?

 Trevor.


Try this:

\bracket \pad-around #2 Foo

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


Re: Having shortInstrumentName appear at start of score (instead of instrumentName)?

2015-03-31 Thread Nathan Ho
On Tue, Mar 31, 2015 at 12:46 PM, Trevor Bača trevorb...@gmail.com wrote:

 Hi,

 Let's say that I have a stylesheet that sets instrumentName values and
 shortInstrumentName values for a bunch of contexts in the normal way:

 \context {
 \Staff
 ...
 instrumentName = \markup { Flute }
 shortInstrumentName = \markup { Fl. }
 }
 \context {
 \Staff
 ...
 instrumentName = \markup { Oboe }
 shortInstrumentName = \markup { Ob. }
 }
 ...

 QUESTION: is there a way to have the shortInstrumentName values appear at
 the start of the score (meaning that the instrumentName values will never
 appear)?

 The question looks pathological. (Why would you set a value for
 instrumentName if you don't want instrumentName to appear in the score?)
 But the motivation is as follows. I have a complex score that I've broken
 into multiple chunks (meaning separate LilyPond files with separate score
 blocks). All chunks \include the same stylesheet. But I want instrumentName
 to appear at the start of only chunk 1 (because chunk 1 is the start of the
 actual sore). For chunks 2, 3, ... I'd like shortInstrumentName to appear
 at the start of each score (because each non-first score is actually
 modeling subsequent parts of the one actual score).

 I can't imagine that there would be a setting for this. But is there some
 sort of Scheme wizardry that can be put at the beginning of each of the
 non-first score chunks to say set instrumentName to the value of
 shortInstrumentName?


This is pretty nasty but it does what you're trying to accomplish.

shortInstrAsInstr = #(lambda (context)

   (ly:context-set-property! context

 'instrumentName (ly:context-property context
'shortInstrumentName)) '())


\new Staff \with {

  instrumentName = Viola

  shortInstrumentName = Vla.

  \consists \shortInstrAsInstr

} {

  c1 c1 \break c1 c1

}


Regards,

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


Re: Defining event classes

2015-03-31 Thread Nathan Ho
On Mon, Mar 30, 2015 at 1:44 PM, Nathan Ho when.possi...@gmail.com wrote:

 Hi list,

 What is the most up-to-date way to define my own event classes?

 I've looked at frameEngraver as a model but none of the old versions
 seem to be working. The most up-to-date one I could find
 (https://lists.gnu.org/archive/html/lilypond-user/2013-07/msg00373.html)
 gives me numerous Event class should be a list errors and the frames
 don't show up in the output, while this one
 (https://lists.gnu.org/archive/html/lilypond-user/2013-07/msg00554.html)
 spits out a few errors and segfaults. I'm using 2.19.17.


Not hugely surprised to see that didn't get a quick answer :)

With some trial and error and fumbling around I came up with the following
code. Unlike the frame engraver code, this returns no errors or warnings,
but the engraver doesn't seem to notice the BangEvent at all. If I change
the listener to listen to music-event, then bang-trigger calls four times
(once per note) seemingly ignoring the \bang. What's going on here?

\version 2.19.17

#(define-event-class 'bang-event 'music-event)

#(define bang-types
   '(
 (BangEvent
  . ((description . BANG!)
 (types . (bang-event music-event))
 ))
 ))

#(set!
  bang-types
  (map (lambda (x)
 (set-object-property! (car x)
   'music-description
   (cdr (assq 'description (cdr x
 (let ((lst (cdr x)))
   (set! lst (assoc-set! lst 'name (car x)))
   (set! lst (assq-remove! lst 'description))
   (hashq-set! music-name-to-property-table (car x) lst)
   (cons (car x) lst)))
   bang-types))

#(set! music-descriptions
   (append bang-types music-descriptions))

#(set! music-descriptions
   (sort music-descriptions alist?))

#(define (bang-trigger engraver event)
   ; use ly:warning as a quick hack to get it to show up in the output log
   (ly:warning hell))

#(define Bang_engraver
   (make-engraver
 (listeners (bang-event . bang-trigger

bang = #(make-music 'BangEvent)

\new Staff \with {
  \consists #Bang_engraver
} {
  c1 c1 \bang c1 c1
}

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


Defining event classes

2015-03-30 Thread Nathan Ho
Hi list,

What is the most up-to-date way to define my own event classes?

I've looked at frameEngraver as a model but none of the old versions
seem to be working. The most up-to-date one I could find
(https://lists.gnu.org/archive/html/lilypond-user/2013-07/msg00373.html)
gives me numerous Event class should be a list errors and the frames
don't show up in the output, while this one
(https://lists.gnu.org/archive/html/lilypond-user/2013-07/msg00554.html)
spits out a few errors and segfaults. I'm using 2.19.17.

Regards,
Nathan

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


Name of a context

2015-03-29 Thread Nathan Ho
Hi list,

How do I extract the name of a context in Scheme? That is, I want to
be able to get foo from, say, \new Voice = foo. I don't see this
in the context properties lists.

Regards,
Nathan

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


Re: Name of a context

2015-03-29 Thread Nathan Ho
On Sun, Mar 29, 2015 at 3:44 PM, Urs Liska u...@openlilylib.org wrote:
 I *think* this is (ly:context-id context).

Exactly what I was looking for, thanks.

That's pretty confusing since everywhere else in the documentation,
this string is referred to as the name of the context, whereas
ly:context-name returns the type of context it is.

Regards,
Nathan

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


Re: Problem with repeat alternative endings that contain lyrics and leading rests

2015-03-25 Thread Nathan Ho
On Tue, Mar 24, 2015 at 7:42 PM, Peter Heisen
writepeterhei...@gmail.com wrote:
 Dear List,

 The LilyPond notation reference, section 2.1.2,
 (http://www.lilypond.org/doc/v2.18/Documentation/notation/techniques-specific-to-lyrics)
 contains the following example of how to use lyrics in concert with repeat
 alternative endings.  It compiles fine in version 2.18.2, showing both the
 first and second endings complete with lyrics:

 [...]

 In the following modified example, the first beat of each ending has been
 changed to a rest, and a syllable removed from the lyrics to match.  Now
 when compiled, it shows two first endings and two second endings.  Moreover
 the log contains the error warning: already have a volta spanner, ending
 that one prematurely. I have scoured the documentation and searched the
 list archives, and cannot find any mention of this.  Can you help?

It displays properly if you remove the \repeat ... \alternative
structure from the lyrics:

\score {
  
\new Staff {
  \time 2/4
  \new Voice = melody {
\relative c'' {
  a4 a a a
  \repeat volta 2 { b4 b }
  \alternative { { r b } { r c } }
}
  }
}
\new Lyrics {
  \lyricsto melody {
Not re -- peat -- ed.
Re -- peat
twice. twice.
  }
}
  
}

The reason is that the lyric code creates first and second endings
that line themselves up with the first lyric event they see, and it's
not aware of the rests going on in the Staff. So you get two
misaligned volta repeat systems, causing the funky output.

I'm not entirely sure how to enter the structure into the lyrics in a
way that lines up with the staff. Either way, I feel that the code in
the documentation is misleading.

Regards,
Nathan

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


Re: Problem with lyrics in alternative endings that contain leading rests

2015-03-25 Thread Nathan Ho
On Tue, Mar 24, 2015 at 7:42 PM, Colin Campbell c...@shaw.ca wrote:
 I can see that the problem seems to involve a lack of output, but perhaps a
 bit more input might clarify it a bit?

Now that's what I call a minimal example!  \drummode { sn8 bd8 r8 cymc8 }

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


Re: Score content spilling off left side of page

2015-03-25 Thread Nathan Ho
On Wed, Mar 25, 2015 at 1:37 PM, Stan Mulder st4588...@earthlink.net wrote:
 For some reason a score I made won't fit all the text on the left side of
 the page. I cannot find anything different about this score than previous 
 ones.

 The first page looks okay, but it's the subsequent pages with the instrument
 abbreviations that are getting cut off with no margin at all.

 I'm not using margin commands. Not using the \paper block.

 I can't really upload a snippet because it is too much data, but here's a
 screnshot:

 http://tradjazzbands.com//media/Screenshot%20from%202015-03-25%2016:19:01.png

 Stan

This is a known bug
(https://code.google.com/p/lilypond/issues/detail?id=766). The
solution is straightforward: just increase margin-left in the \paper
block. If you also want the first system aligned with the others, use
\paper { indent = 0 }.

Regards,
Nathan

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


Re: Guitar chord mode no longer produces MIDI file with chords

2015-03-25 Thread Nathan Ho
On Wed, Mar 25, 2015 at 2:08 PM, David Bellows davebell...@gmail.com wrote:
 In the versions of Lilypond I've used up through 2.19.16 when I would
 compile the attached file the resulting MIDI file would play the
 entire chord. With 2.19.17 now only the root note is played. I don't
 really know where to look for this kind of information but I can't
 tell if this is the new expected result or a bug. In any case I'd like
 to get the full chords back if possible.

 Thanks.

I was able to reproduce the issue, and it seems that ChordNames no
longer produces MIDI output and what you were hearing is the Voice
context you created. The workaround is to create two scores, one with
a \layout block and another with the \midi block:

theChords = \chordmode {
  f8:m c4:m f4:m c8:m f4:m c4:m g4 f4:m g4 c4:m f8:m f4:m \bar |.
}

\score {
  
\new ChordNames \theChords
\new FretBoards \theChords
\new Voice { ... }
  
  \layout { ... }
}

\score {
  \new Staff \theChords
  \midi { }
}

Regards,
Nathan

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


Re: Redefine chord default position in chordmode

2015-03-25 Thread Nathan Ho
On Wed, Mar 25, 2015 at 8:40 AM, Calixte Faure calixte.fa...@gmail.com wrote:
 Hello Lilyponders!

 Typing \chordmode{ c f g } produces {c e g f a c g b d}, would it be
 possible to define that \chordmode{ f g } should be {a c f  b d g} for
 all the piece?
 I know i could use \chordmode{ f/a g/b } but i wish to simplify the input,
 and ChordName to print F G and not F/A G/B.

I'm a little unclear on what you're asking for and what your
motivations are. It seems that you want to enter { c f g } into
\chordmode, and have the music events generated as if you entered { c
f/a g/b }, but then you want ChordNames to produce the output as if
you entered { c f g }?

Regards,
Nathan

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


Re: Adjacent double bars

2015-03-21 Thread Nathan Ho
On Sat, Mar 21, 2015 at 8:38 AM, John McWilliam jsmcwill...@gmail.com wrote:
 Bagpipe music has it's own conventions where each section or part of a tune
 is enclosed in either repeat bars or what I call double bars (\bar .| and
 \bar |.). The end of a part usually coincides with a line break. I have a
 problem with this and find that adjacent barlines with a break in between
 get overridden and one of the bar lines is eliminated. I have tried using
 \bar || instead but this does not help. See below:

What you need is \defineBarLine:
http://www.lilypond.org/doc/v2.18/Documentation/notation/bars

\version 2.18.0

\defineBarLine :|.-.| #'(:|. .| :|.)
\defineBarLine |.-.| #'(|. .| .|.)

music = \relative c' {
\key c \major
\time 4/4
\bar .|:

%Part 1
\repeat volta 2 {
\partial 8 a8
a4. a8 b4. b8
c4. c8 d4.
\break }

%Part 2
\bar :|.-.|
e8 |e4. e8 f4. f8
g4. g8 a4.
a8 b4. b8 c4.
\break

%Part 3
\bar |.-.|
a8 |
a4. a8 b4. b8
c4. c8 d4. \bar |.
\break

}% end relative

\score {
   \new Staff \music
}

Regards,
Nathan

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


Re: Fine piano pedals notation

2015-03-08 Thread Nathan Ho
On Sun, Mar 8, 2015 at 9:28 AM, 良ϖ p2b@gmail.com wrote:
 Hello,

 Although I often read messages from this mailing list, this is likely to be
 the first message I post to it. I've engraved some piano music already but
 it's always been pre-contemporary music: Bach, Liszt or even Debussy. Now
 I'm having trouble with contemporary pedalling notation.

 I'm trying to engrave a free score of Takemistsu's Rain Tree Sketch. You can
 found a video with score here on Youtube or you can download a copyrighted
 copy on this page.

 This piece makes innovative use of all three pedals of the piano. I've tried
 to play a bit with this snippet but I'm not convinced by what I've got. I
 especially don't know how to symbolize half pedal to the best of my
 knowledge. Moreover, I'd like to change « simile » for an arrow →.

 So I'm seeking for help. As it's a free software, I believe I'll get a
 helpful answer soon from the community then I say « thank you! » in advance
 ;-)

 胡雨軒 Hu YuXuan
 P.S: sorry for my English, I'm not native English-speaker.

I don't have any solution to offer yet; I would just like to add that
notations like this may also be found in John Adams' piano piece
Phrygian Gates, which has a variety of fractional pedaling
indications such as Ped/2 and Ped/4.

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


Re: Are these triple-dots of augmentation possible?

2015-02-14 Thread Nathan Ho
On Mon, Jan 19, 2015 at 2:59 PM, Graham King lilyp...@tremagi.org.uk wrote:
 Here's a little thing that has got me stumped.

 Is it possible to add three dots to a note glyph, thus:

 O:.

 to signify that the duration of the note is to be multiplied by 9/4 ?
 And can this be done in such a way
 (i) that the dots avoid clashing with staff lines, and
 (ii) that the note glyph changes correctly under \shiftDurations ? i.e. so
 that, say:

 c1\wierdDots% displays the note above,

 \shiftDurations #1  #0 { c1\wierdDots } % displays a 3-dotted minim, and

 \shiftDurations #-1 #0 { c1\wierdDots } % displays a 3-dotted breve.

 (For simplicity it is safe to assume that the second argument to
 \shiftDurations will always be zero).

 Grateful, as always, for any insight, even if on this occasion it is just
 expert advice to give up!

 -- Graham

Don't know if you still want to do this, but it's pretty easily
achieved by modifying the earlier code that Mark posted (itself
adapted from my SMuFL implementation):

%%%

\version 2.19.8

#(define (draw-l-dots grob)
   (let* ((count (ly:grob-property grob 'dot-count))
  (dot (grob-interpret-markup grob (markup #:musicglyph dots.dot)))
  (dot-width ((lambda (ext) (- (cdr ext) (car ext)))
(ly:stencil-extent dot X
 (ly:stencil-translate
   (ly:stencil-combine-at-edge
 (ly:stencil-combine-at-edge
   (ly:stencil-combine-at-edge '() X RIGHT dot)
   X RIGHT dot dot-width)
 Y UP dot (- 1 dot-width))
   (cons dot-width 0

lDots = #(define-music-function (parser location music) (ly:music?)
 #{
   \temporary \override Staff.Dots.stencil = #draw-l-dots
   % we use shiftDurations to add a dot to the note
   % 2/3 * 9/4 = 3/2
   \scaleDurations #'(3 . 2) \shiftDurations #0 #1 $music
   \revert Staff.Dots.stencil
 #})

\new Staff {
  \time 2/2
  \lDots c'4 d'4..
  \time 4/2
  \shiftDurations #-1 #0 { \lDots c'4 d'4.. }
}

%%%

Regards,
Nathan

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


Re: Levelling hairpins

2015-02-14 Thread Nathan Ho
On Fri, Feb 13, 2015 at 12:53 PM, Peter Gentry
peter.gen...@sunscales.co.uk wrote:

 This is very true but the dynamics context is very cumbersome for this
 purpose alone.

 Surely there must be a simpler way to align hairpins.

Hmm, how about a Scheme function that extracts all the dynamic events
and moves them into a Dynamics context? I doubt I have the skills to
write that, but it would be very convenient.

Regards,
Nathan

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


Re: Augmentation Dot Appearance

2015-02-12 Thread Nathan Ho
On Thu, Feb 12, 2015 at 6:16 PM, thepocketwade thepocketw...@gmail.com wrote:

 Is it possible to change the appearance of augmentation dots?  I'd like to
 use an open dot (think a degree symbol), to indicate adding 1/4 of note
 value.  I've only seen this notation in Stuart Saunders Smith's pieces, but
 it seems useful.

 Thanks for your help.

Here ya go:

%%%

\version 2.19.8

#(define (draw-semi-dots grob)
   (let* ((count (ly:grob-property grob 'dot-count))
  (dot (grob-interpret-markup grob (markup #:musicglyph dots.dot)))
  (dot-width ((lambda (ext) (- (cdr ext) (car ext)))
(ly:stencil-extent dot X)))
  (semi-dot (grob-interpret-markup grob (markup #:draw-circle
(* 0.5 dot-width) 0.1 #f)))
  (stil (make-transparent-box-stencil '(0 . 0) '(0 . 0
 (if (number? count)
   (let loop ((i count))
 (if (= i 0) stil
   (begin
 (set! stil (ly:stencil-combine-at-edge stil X RIGHT
semi-dot dot-width))
 (loop (- i 1

semiDot = #(define-music-function (parser location music) (ly:music?)
 #{
   \temporary \override Staff.Dots.stencil = #draw-semi-dots
   \scaleDurations #'(5 . 6) $music
   \revert Staff.Dots.stencil
 #})

\new Staff {
  \time 2/4
  \semiDot c'4. d'8. \semiDot e'4. f'8.
}

%%%

Regards,
Nathan

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


Re: Better sound file then MIDI

2014-08-06 Thread Nathan Ho
On Wed, Aug 6, 2014 at 11:58 AM, Abraham Lee tisimst.lilyp...@gmail.com wrote:
 Dirk,

 I've collected all my soundfonts into a MASSIVE compressed file (~2.5 GB).
 Here's the link where you can download it from my Google Drive account:

 https://docs.google.com/uc?export=downloadconfirm=6Ccwid=0B48p48kXy91YRUVqUGMzbl9PdGs

This link is giving me a 403 error.

Regards,
Nathan

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


Re: Question for all LilyPond users (especially power users)

2014-07-09 Thread Nathan Ho
On Wed, Jul 9, 2014 at 1:01 PM, Jim Long lilyp...@umpquanet.com wrote:
 Does anyone know what font is used for the chordnames in Pat
 Metheny's anthology songbook, published by Hal Leonard?

 Here is a sample image linked from a seller's website:

 http://d29ci68ykuu27r.cloudfront.net/product/Look-Inside/large/2958319_03.jpg

 http://www.sheetmusicplus.com/title/Pat-Metheny-Songbook-sheet-music/2958319

Looks like Comic Sans. Personally, I would prefer a chordname font
resembling the one in the Hal Leonard Real Books or the Chuck Sher New
Real Book; this all serves to highlight how varied jazz lead sheets
can be.

Regards,
Nathan

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


Re: Question for all LilyPond users (especially power users)

2014-07-09 Thread Nathan Ho
On Wed, Jul 9, 2014 at 1:01 PM, Jim Long lilyp...@umpquanet.com wrote:
 Does anyone know what font is used for the chordnames in Pat
 Metheny's anthology songbook, published by Hal Leonard?

 Here is a sample image linked from a seller's website:

 http://d29ci68ykuu27r.cloudfront.net/product/Look-Inside/large/2958319_03.jpg

 http://www.sheetmusicplus.com/title/Pat-Metheny-Songbook-sheet-music/2958319

Looks like Comic Sans. Personally, I would prefer a chordname font
resembling the one in the Hal Leonard Real Books or the Chuck Sher New
Real Book; this all serves to highlight how varied jazz lead sheets
can be, typographically.

Regards,
Nathan

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


Re: Question for all LilyPond users (especially power users)

2014-07-09 Thread Nathan Ho
Oops, sorry about the double email. Connection problems.

Regards,
Nathan


On Wed, Jul 9, 2014 at 2:14 PM, Nathan Ho when.possi...@gmail.com wrote:
 On Wed, Jul 9, 2014 at 1:01 PM, Jim Long lilyp...@umpquanet.com wrote:
 Does anyone know what font is used for the chordnames in Pat
 Metheny's anthology songbook, published by Hal Leonard?

 Here is a sample image linked from a seller's website:

 http://d29ci68ykuu27r.cloudfront.net/product/Look-Inside/large/2958319_03.jpg

 http://www.sheetmusicplus.com/title/Pat-Metheny-Songbook-sheet-music/2958319

 Looks like Comic Sans. Personally, I would prefer a chordname font
 resembling the one in the Hal Leonard Real Books or the Chuck Sher New
 Real Book; this all serves to highlight how varied jazz lead sheets
 can be, typographically.

 Regards,
 Nathan

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


Re: The pleasantry of Lilyponding

2014-04-01 Thread Nathan Ho
On Tue, Apr 1, 2014 at 7:41 AM, Simon Albrecht simon.albre...@mail.de wrote:
 It’s like a mixture of a logical puzzle and a
 strategy game, with the pleasant side effect that it is not just for fun,
 but you get a result which can be ported to real life and has an actual use
 for other people!

Complex contemporary scores are especially fun to engrave. I guess
this explains why I sometimes typeset Brian Ferneyhough or George
Crumb just to kill time.

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


Re: LilyPond benchmarks - request for proposals

2014-03-01 Thread Nathan Ho
On Sat, Mar 1, 2014 at 3:01 AM, Urs Liska u...@openlilylib.org wrote:
 Hello LilyPond users,

 [...]

 My ideas so far are:

 - classical piano piece

 - string quartet

 - solo instrument

 - moderately complex orchestral score

 - SATB choir with piano

 - complex song
   - We'll probably be able to use one of our Fried songs for that

 - complex score from 20th century (not graphic yet)
   - I have a proposal for that already:
 [...]

I'd also like to see a 32-bar jazz lead sheet and maybe a complete
score for, say, big band. (I know people -- myself included -- who
would be willing to donate.)

Regards,
Nathan

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


Re: Changing stem stencil

2014-02-28 Thread Nathan Ho
On Fri, Feb 28, 2014 at 5:33 AM, Peter Bjuhr peterbj...@gmail.com wrote:

 On 2014-02-27 20:44, Peter Bjuhr wrote:

 [...]

 I found this http://lsr.di.unimi.it/LSR/Snippet?id=864, and thanks to that I
 managed to set up this script:

 \include ../smufl/definitions.ily

 #(define (PendereckiTremolo-stem grob)
(if (ly:stencil? (ly:stem::print grob))
  (let* ((stencil (ly:stem::print grob))
 (X-ext (ly:stencil-extent stencil X))
 (Y-ext (ly:stencil-extent stencil Y))
 (width (interval-length X-ext))
 (len (interval-length Y-ext)))

(ly:stencil-translate
  (grob-interpret-markup grob
(markup #:smuflglyph stemPendereckiTremolo))
  (cons 0 (interval-start Y-ext
  #f))

  \relative c'{
   \override Stem #'stencil = #PendereckiTremolo-stem
   f4 b c e
 }


I'm glad to hear that my work on both the SMuFL package and the LSR
snippet has helped you! However, there's a much easier solution:

#(define (penderecki-tremolo grob)
   (grob-interpret-markup grob
 (markup #:vcenter #:smuflglyph pendereckiTremolo)))

\new Staff {
  \override StemTremolo.stencil = #penderecki-tremolo
  c'4:32 d'4:32 e'4:32 f'4:32
  c''4:32 d''4:32 e''4:32 f''4:32
}

Regards,
Nathan

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


Re: Ligatures in music font

2014-02-09 Thread Nathan Ho
On Sun, Feb 9, 2014 at 7:31 AM, Noeck noeck.marb...@gmx.de wrote:

 [...]

 Hmm, yes for the tuplet5 yes. But not for the tuplet8 that I wanted to
 use. So perhaps that’s just a bug in the font?


I can confirm that it doesn't work for tuplet8; in addition, the SMuFL
spec mysteriously skips over the gClefLigatedNumberAbove+tuplet8
ligature. Weird.

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