Re: OT: high-precision tuner app

2016-05-26 Thread Olivier Biot
On Thursday, 26 May 2016, Johan Vromans  wrote:

> On Thu, 26 May 2016 08:57:31 +0100
> Michael Hendry > wrote:
>
> > Another phenomenon about which I have doubts involves people who claim
> > that when they hear music in “sharp” keys (e.g. G, D, A, E) their
> > experience is of brightness, while the flat keys make for a more sombre
> > sound. I’ve even heard in a radio interview that this applies to F# and
> > Gb (the one bright, the other dull).
>
> Interesting...
>
> I can put a capo on the 3rd fret on my guitar and play a piece in
> (effectively) G. Now I put the capo on the 2nd fret. Does the piece sound
> dull because it's now in Gb? Or does it sound brighter because it's in F#?
>
> In my experience it sounds the same, but lower.


Try playing without capo. If at all possibleon a guitar, technically
speaking. The sympathetic resonances on the non-played strings will be
starkly diminished.

Putting a capo effectively transposes your instrument, which defies the
OP's point (and mine).

Hope this makes sense.

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


Re: OT: high-precision tuner app

2016-05-26 Thread Olivier Biot
On Thursday, 26 May 2016, Michael Hendry  wrote:

> I seem to have struck an interesting chord, here!


Definitely!


> Another phenomenon about which I have doubts involves people who claim
> that when they hear music in “sharp” keys (e.g. G, D, A, E) their
> experience is of brightness, while the flat keys make for a more sombre
> sound. I’ve even heard in a radio interview that this applies to F# and Gb
> (the one bright, the other dull).


I experience the same from a string player's perspective. But in my humble
opinion it is a combination of 2 factors. One depends on harmonics induced
in the instrument played, the other is a more subjective element: often
'sharper' keys tend to play music at a higher pitch too, which results to
brightening of the music played. Maybe because a lot of written music
wanders around the natural scale of the clef, which goes up 1 full tone per
2 extra sharps (circle of fifths).

To get back to the former point, playing F minor (4 flats) on the cello
dulls most natural harmonics on the open strings, which results in an
eerie, almost dead color. To my ears at least.

Just my (musical) 2 cents,

Olivier

>
> Michael (lighting blue touch-paper and retiring to a safe distance).
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org 
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: OT: high-precision tuner app

2016-05-25 Thread Olivier Biot
Isn't that related to the independent church organ tunings back then: the
higher they were tuned, the brigher they sounded in a church. Sadly, the
human voice cannot be tuned up the same way an organ can...

See e.g. https://de.wikipedia.org/wiki/Orgelton (in German).

On Wed, May 25, 2016 at 8:05 AM, Johan Vromans  wrote:

> Since we're OT anyhow...
>
> On Tue, 24 May 2016 13:58:48 +0100
> Anthonys Lists  wrote:
>
> > Not a modern phenomenon. A lot of Baroque parts are almost unsingable in
> > the original pitch because they were written for A=400 or somesuch.
>
> Why are they almost unsingable? They were sung at the time they were
> written. Did the human voice get higher since?
>
> Just curious.
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vocal tenor clef

2016-05-24 Thread Olivier Biot
Hi,

See
http://lilypond.org/doc/v2.16/Documentation/notation/displaying-pitches.en.html

\clef "treble_8"

Best regards,

Olivier

On Tue, May 24, 2016 at 11:38 AM, Charles Johnson  wrote:

> I've pored through the manual and can't seem to see any way of getting a
> vocal tenor clef. That is, a regular G clef with an extra '8 curl' to
> distinguish it from the treble clef. Any ideas?
>
> TIA
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Anyone using a tablet for lily?

2013-07-30 Thread Olivier Biot
I have been browsing the Internet for ePaper solutions, and have only
reached potential products so far.

The Brussels Philharmonic quit using paper less than a year ago.

I'm still unsure what device to get for replacing my pile of music scores.

Best regards,

Olivier



On Wed, Jul 31, 2013 at 1:33 AM, Kieren MacMillan 
kieren_macmil...@sympatico.ca wrote:

 Hi Richard,

 I have many friends (professional performing musicians) who use their iPad
 to play from; I believe they all use an AirTurn to trigger turns with a
 wireless pedal.

 Looking forward to hearing what you end up with, and how it works for you
 — I will be looking into a tablet very soon myself.

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

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


Re: merging files

2013-05-20 Thread Olivier Biot
You can always use a tool such as PdfEdit to merge individual PDF files
afterwards.


On Mon, May 20, 2013 at 11:56 PM, Mark Stephen Mrotek
carsonm...@ca.rr.comwrote:

 Hello:

 ** **

 A piano sonata has three movements each encoded in a separate file. The
 three files shall be merged into one file for printing. Is “copy and paste”
 sufficient or must something be done to the individual files?

 ** **

 Thank you for your kind attention.

 ** **

 Mark Stephen Mrotek

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


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


Re: [OT] name of 1/256 note?

2013-03-30 Thread Olivier Biot
On Sat, Mar 30, 2013 at 12:22 PM, Federico Bruni fedel...@gmail.com wrote:

 I'm translating the Denemo .po file and I've found a note value of 1/256
 There's an english name for it?
 I couldn't find it anywhere..


Indeed, not even on Wikipedia. from Wikipedia: In order of halving
duration, we have: double note
(breve)http://en.wikipedia.org/wiki/Double_whole_note;
whole note (semibreve) http://en.wikipedia.org/wiki/Whole_note; half note
(minim) http://en.wikipedia.org/wiki/Half_note; quarter note
(crotchet)http://en.wikipedia.org/wiki/Quarter_note;
eighth note (quaver) http://en.wikipedia.org/wiki/Eighth_note; sixteenth
note (semiquaver) http://en.wikipedia.org/wiki/Sixteenth_note. Smaller
still are the thirty-second note
(demisemiquaver)http://en.wikipedia.org/wiki/Thirty-second_note,
sixty-fourth note
(hemidemisemiquaver)http://en.wikipedia.org/wiki/Sixty-fourth_note,
and hundred twenty-eighth note
(semihemidemisemiquaver)http://en.wikipedia.org/wiki/Hundred_twenty-eighth_note
.

In the Talk page on the 128th note entry in Wikipedia (
http://en.wikipedia.org/wiki/Talk%3AHundred_twenty-eighth_note), there's
this input:

The logical succession to a hundred twenty-eighth note would be a two
hundred fifty-sixth note, or a demisemihemidemisemiquaver in
British/Classic terminology. However, these are exceptionally rare, if not
non-existent, as no evidence exists to prove or disprove their existence. 

So unofficially, I'd say 1/256th note = demisemihemidemisemiquaver

Best regards,

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


Re: User comments on R shorthand

2013-03-23 Thread Olivier Biot
On Wed, Mar 20, 2013 at 3:54 PM, James Harkins jamshar...@gmail.com wrote:

 My opinion (as a somewhat-more-than-casual Lilypond user, and as a
 contributor to another music software package [SuperCollider]): Any
 change in syntax that will break prior usage should be considered
 very, very carefully to be sure the gains are worth it.

 The proposal is:

 - Old: R2  ==  a full measure rest in 2/4 time
 - New: R2  ==  *two* full measure rests in any time signature

 That breaks backward compatibility.


Apart from breaking backward functionality, it does so dramatically.


 I do agree with Kieren that it's annoying to have to enter durations
 for full measure rests, when the duration of the measure is known
 elsewhere. So I think some change, if possible, would be nice to have.


I agree, but it is difficult since the measure size can change, and as I
understand it the full-measure rest is treated the same way as any note or
rest or space event.

In my humble opinion a full-measure rest should be interpreted as a
full-measure rest, otherwise I could simply write it as a metered rest
and compress the rests with some magic. today this is not the case, it's a
special case of a metered rest where 'only' the rendering of the rest
will differ.

I think Joram's suggestion, R*n, makes a lot more sense. It's related
 to the current syntax, just more convenient, and it doesn't break
 existing uses since the parser can distinguish among all of the
 following unambiguously:

 R2 (a full measure rest in 2/4 time)
 R2*2 (two full measure rests in 2/4 time)
 R*2 (two full measure rests in any meter)


Since a full-measure rest is a different thing, why not make it look
differently?

I'm not in favor of using R for a full-measure rest since its behavior
differs from notes and rests.

Why not write \Rest{2} instead of R*2 or R2*2 for two 2/4 time full measure
rests?

The fact that Kieren's original proposal would change the meaning of
 the number immediately after R raises a red flag for me -- breaking
 compatibility, confusing current users once they are forced to adapt
 to the new syntax -- and the only gain over the second proposal is to
 lose a * after R. That falls far short of the threshold to justify
 breaking existing syntax, IMO.

 I'm strongly against Kieren's original idea. I'm cautiously in favor
 of Joram's alternative.


Time signatures are set differently than music expressions.

I think full-measure rests should be treated differently as well, to avoid
the confusion that will definitely appear when combining music expressions
and time signature changes.

Best regards,

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


Re: \relative proposal: putting absolute pitches anywhere within \relative block using @-sign

2013-03-13 Thread Olivier Biot
On Wed, Mar 13, 2013 at 8:24 PM, nothingwaver...@gmail.com wrote:

 Examples:

 1.  { c4 c' c@'' c@, }

 These are interpreted as absolute pitches, so the @-signs are
 redundant here.
 They could be silently ignored, or the at signs could be an error
 outside of \relative blocks.

 What do people think?


Hmmm... I'd use the @ sign as a prefix, not as a suffix, as in:

{ c4 c' @c'' @c, }

However, more fundamentally, I think the entire discussion relates to the
intent of \relative and the current use seen by the LiliPond community.

I'd rather see \relative { @c4 c' c'' c, } than \relative { c4 c' c'' c, }
in cases when the first pitch is supposed / expected to be an absolute
pitch. However there is no fundamental need for the first pitch being an
absolute pitch in the first place.

Maybe we must work on the intent of \relative first.

Just my 2 cents.

Best regards,

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


Re: \relative proposal: putting absolute pitches anywhere within \relative block using @-sign

2013-03-13 Thread Olivier Biot
On Wed, Mar 13, 2013 at 11:44 PM, David Kastrup d...@gnu.org wrote:

 Olivier Biot olivier.b...@gmail.com writes:

  On Wed, Mar 13, 2013 at 8:24 PM, nothingwaver...@gmail.com wrote:
 
  Examples:
 
  1. { c4 c' c@'' c@, }
 
  These are interpreted as absolute pitches, so the @-signs are
  redundant here.
  They could be silently ignored, or the at signs could be an error
  outside of \relative blocks.
 
  What do people think?
 
  Hmmm... I'd use the @ sign as a prefix, not as a suffix, as in:
 
  { c4 c' @c'' @c, }
 
  However, more fundamentally, I think the entire discussion relates to
  the intent of \relative and the current use seen by the LiliPond
  community.
 
  I'd rather see \relative { @c4 c' c'' c, } than \relative { c4 c' c''
  c, } in cases when the first pitch is supposed / expected to be an
  absolute pitch.

 What else is it supposed to be?


e.g, a relative pitch. It could be used e.g. for transposition. The problem
remains in that it's hard to determine where we should pin the starting
pitch to an absolute pitch, since there are several successful recipes we
can think of: default reference pitch, transposition, start with an
absolute pitch.


   However there is no fundamental need for the first pitch being an
  absolute pitch in the first place.

 It can be relative to f if we want to.  That adds the least amount of
 information to the first pitch.


Depends on what we want to achieve. I tend to think in terms of why am I
using this...


   Maybe we must work on the intent of \relative first.

 I have a hard time imagining what that is supposed to mean if we assume
 that we haven't been doing it so far.


We have, but maybe not always as explicitly.

Best regards,

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


Re: Proposed new available and recommended behavior of \relative

2013-03-09 Thread Olivier Biot
On Sat, Mar 9, 2013 at 12:20 AM, David Kastrup d...@gnu.org wrote:

 Olivier Biot olivier.b...@gmail.com writes:

  I have mixed feelings regarding the proposed syntax update of
  \relative.
 
  Treating the first pitch of \music in \relative \music differently is
  not intuitive and will likely result in octave errors.

 Treating the first pitch of \music in \relative is _absolutely_
 _unavoidable_ since the very _definition_ of relative pitches means that
 each pitch is specified in relation to the previous pitch, and the first
 pitch _has_ no previous pitch.

 So the first pitch will _always_ be special-cased.  With a reference
 pitch, it is special-cased to refer to that absolute pitch.  Without a
 reference pitch, it has to behave in _some_ manner as well.


I agree.


   Personally I think that
 
  c'' \relative { ... }
 
  is more intuitive than
 
  \relative c'' { ... }

 music functions don't look back into context, and if they are in
 variables, they don't even _have_ context.


I wasn't aware of this - I took for granted that this was needed to keep
state. Probably \relative does this under the hood. Considering that
\relative came as a feature after the core LilyPond was written, it makes
sense to me now.


   and could be made to work even when no starting pitch has been
  specified, where the default LilyPond pitch would apply (IIRC c' as
  starting point).

 The default LilyPond pitch.  If you personally think that could be made
 to work, I am looking forward to your sample implementation.


Well, since there is no state information available as you stated, this is
going to be tricky indeed, unless we add another command that adds some
context the same way \relative computes the closest pitch to transform a
relative pitch expression into absolute pitches.

Or actually even a coherent and comprehensive human-readable definition
 that could be placed in the manual and would make it possible for a user
 to predict LilyPond's behavior without experimenting.


I see that as less of a problem. I'd read c'' \relative { e g b } as c'',
then after this a series of relative pitches starting from the last known
pitch (or c' - the default LilyPond pitch).

Thinking of which, I believe I am struggling with music entry notation
versus music storage: writing in relative pitch is often easier for note
entry, but absolute pitches are IMHO better suited for storing music. I may
be trying to do both with the same grammar.

Best regards,

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


Re: Proposed new available and recommended behavior of \relative

2013-03-09 Thread Olivier Biot
On Sat, Mar 9, 2013 at 4:35 PM, David Kastrup d...@gnu.org wrote:

 Janek Warchoł janek.lilyp...@gmail.com writes:

  On Sat, Mar 9, 2013 at 4:10 PM, Olivier Biot olivier.b...@gmail.com
 wrote:
  Thinking of which, I believe I am struggling with music entry notation
  versus music storage: writing in relative pitch is often easier for
 note
  entry, but absolute pitches are IMHO better suited for storing
  music. I may
  be trying to do both with the same grammar.
 
  yes, what's convenient for music entry doesn't have to be convenient
  for storage.  Fortunately Frescobaldi can easily convert between
  relative and absolute.  I'm even thinking about converting all music
  to absolute right after input.

 At least it is robust against copypaste.


Definitely!

The more I think about it, and given the implementation constraints of
state in music expressions, the more I like the new proposal.

However I still need to make up _my_ mind about the entering music versus
storing music bout.

Best regards,

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


Re: Bar lines

2013-03-09 Thread Olivier Biot
This thread is extremely interesting.

However, I think we're mixing two things here:

1. Defining semantically disjoint and intuitive bar line types (e.g., final
measure ending bar line, start of repeat, end and start of repeat...)

2. Describing how a bar line type should be displayed

The former is not yet entirely addressed but would make a lot of sense to
me. I would immediately embrace these if they were made available.

The latter is addressed with the |. and other bar line input formats we
currently define / allow. In my humble opinion they shouldn't be allowed
except when defining a new bar line type.

Just my 2 cents.

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


Re: Excellent paper on 'Copyfraud'

2013-03-09 Thread Olivier Biot
On Sat, Mar 9, 2013 at 6:31 PM, Urs Liska li...@ursliska.de wrote:

 May I suggest a concrete example for consideration (because it's a tricky
 constellation and I'd appreciate any opinion)?

 Given a musical work that is clearly in the public domain (1820s).
 The autograph score is in private possession (in Switzerland).
 The contents of this autograph have been brought to the public through a
 'private print' (by a renowned scholar) in 1967.
 I don't know how many copies there are from this private print, but some
 of them are available through public libraries (where I had the opportunity
 to take digital photographs).

 If I now would want to make an edition of that work, and explicitely the
 version of that manuscript, would I have to ask the owner of the
 manuscript, or could I argue that the music is in the public domain and the
 manuscript has already been made public?


I didn't know that buying an out-of-copyright work suddenly makes it fall
under copyright. However (and this may be a gray area - I am not a lawyer)
the new owner of a work may decide what you're allowed to do with it - up
to a certain extent.

Would a claim of the owners of the manuscript to either charge royalties or
 prohibit the project be a valid cause or would you consider that copyfraud?


Imagine I have the possibility to acquire a manuscript by Bach. If I buy
said manuscript, I can only make a claim about the material object I
bought, not about the music it contains. Unless I conceal the work and am
assured that nobody has a copy from before I acquired the manuscript.

I am myself confronted with a similar issue - Opus 125 from F. A. Kummer
got lost in the wars, I have no idea if the manuscript even exists, and the
work was engraved a _very_ long time ago making it public domain. If I make
it publishable, and add my own remarks, what then? I think I know the
answer.

Best regards,

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


Re: lecker lek-ker in old German lyrics

2013-03-09 Thread Olivier Biot
On Fri, Mar 8, 2013 at 6:09 PM, Alexander Kobel n...@a-kobel.de wrote:

 On 03/08/2013 10:19 AM, Mats Bengtsson wrote:


 On 03/08/2013 03:52 PM, lilypond-user-requ...@gnu.org wrote:

 Hello,

 Some German lyrics from before the times of Neue Deutsche Rechtschreibung
 feature ck between two syllables. Without Hyphen it is lecker, with
 hyphen
 it is lek-ker. Using lec -- ker or lek -- ker ( on purpose not le --
 cker)
 the hyphen may or may not appear. Is there anything beyond trial and
 error
 to avoid lec-ker or lekker?

 Some time ago there was an idea of introducing lek == ker for forcing
 a hyphen but otherwise no change to formatting compared to lek -- ker.
 Has there happened anything since (I did not find anything in the 2.16
 doc)?

 The following should make it:

 \context {
 \Lyrics
 \override LyricHyphen #'minimum-distance = #1
 }


 I think Klaus did not ask for forcing the hyphen to be visible, or forcing
 it to be hidden, but instead choose the letters depending on whether the
 hyphen appears or not in that place (with automatic deduction how cramped
 the space is).


So this boils down to finding a functional hyphenation algorithm for each
language.

If no hyphen is needed, then write lecker. Otherwise write lek-ker. On
a side note, I didn't know this German hyphenation variant. In Dutch we
have similar constructs involving the use (or not) of accents, such as in
zoëven/zo-even and beëdigde/be-edigde/beë-dig-de/ involving even more
than one variant.

I suppose if such things happen, we _should_ be able to write something
aslecker/leck-ker.

Not sure though how to implement this.

Best regards,

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


Re: Proposed new available and recommended behavior of \relative

2013-03-08 Thread Olivier Biot
On Fri, Mar 8, 2013 at 11:43 AM, David Kastrup d...@gnu.org wrote:

 Werner LEMBERG w...@gnu.org writes:

  Well... if you just don't emit the warning if the first pitch in a
  \relative {} block is incorrect, then it seems like you get exactly
  the current proposal except that you have to spell \relative { c''
  } as \relative { c='' } instead.
 
  I like that idea!
 
  Indeed, this has some benefits in that the distinction between
  relative and absolute notes stay intact.

 The problem I have with it is that it is contrived.  Converting the
 whole documentation to this usage would seem artificial, and octave
 checks are not intended to change the meaning of code but to catch
 errors.


I have mixed feelings regarding the proposed syntax update of \relative.

Treating the first pitch of \music in \relative \music differently is not
intuitive and will likely result in octave errors.

Personally I think that

  c'' \relative { ... }

is more intuitive than

  \relative c'' { ... }

and could be made to work even when no starting pitch has been specified,
where the default LilyPond pitch would apply (IIRC c' as starting point).

The main question however, is to check how users make use of \relative
nowadays in their sheet music. Maybe that will shed some more light on the
problem and on a feasible change.

Best regards,

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


Re: Hushing up Sibelius news?

2013-02-26 Thread Olivier Biot
On Tue, Feb 26, 2013 at 6:25 PM, Federico Bruni fedel...@gmail.com wrote:

 2013/2/26 Noeck noeck.marb...@gmx.de

  is absolutely fantastic, but some people's aversion to anything which
  looks at all technical seems unsurmountable to me (although I'd love
  to be proven wrong; … )
 According to my experience, this just needs people talking and
 explaining. I taught LilyPond to users who have never programmed and do
 not use their keyboard much (used to GUI applications). They would never
 read the docs in order to understand it. But after explaining LilyPond
 for 30 min, they can use it and are actually excited that it works.


 That's why, IMO, a well crafted series of screencasts would attract many
 new users.
 It's in my long TODO list


I agree. However, some more elaborate tweaks and adjustments will need more
work, but there's already a lot of valuable matter elsewhere on the Net.
Not always easily reachable from within one spot (say the LilyPond
website). So one additional action is to hunt for relevant content external
to LilyPond and make it more easily accessible.

By the way, whenever I'm on the move and have a tune in mind, I write it in
LilyPond format. Convenient, no need for extra tools and easily importable
into LilyPond.

Cheers,

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


Re: Hushing up Sibelius news?

2013-02-24 Thread Olivier Biot
On Fri, Feb 22, 2013 at 1:33 AM, David Kastrup d...@gnu.org wrote:

 Hilary Snaden h...@newearth.demon.co.uk writes:

  On 2013-02-21 23:10, David Kastrup wrote:
 
  However, LilyPond indeed has a weakness in as far as it does not
  really have a file format.  It is an evolving input language.
 
  If that's a weakness, it's one I'm happy to see maintained
  indefinitely.

 Well, it is not going away since the primary generator of LilyPond files
 are humans rather than programs.


If you have a hammer, a weakness of screws is that they are hard to bang
into furniture. The same holds with screwdrivers and nails. It all depends
on the goals we want to achieve.

What scorewriters as Sibelius offer, is a tool that allows to input notes
and see the (near) end result immediately on screen. For many musicians,
remaining in the familiar music notation domain is the key reason why they
want such functionality.

What music engraving software does, is extensively prettifying music
expressions. Knowledge of music typography is very relevant in this realm.
You get a lot for free from the tool (default formatting without
tweaking), and you can still tweak a lot of the output to make it look the
way you want it to.


 As opposed to a file format,
 however, the only reliable reader (not just interpreter) of LilyPond
 files is LilyPond itself.  That's a disadvantage for interfacing with
 other programs.


To my knowledge there is no universally accepted standard yet for writing
out music expressions in a machine readable format, I suspect for reasons
of sheer complexity of the subject matter. Even the LilyPond notation
language is in constant evolution (which by the way is a great thing).

In addition, writing a music expression is one activity, while rendering
the output is another one and tweaking the final output yet a third one.
Most if not all score writing software and score engraving software
existing today are still researching better ways to support easy music
writing and editing, and they struggle finding their way in combining these
workflow activities in a tool (or tool chain).

From what I understand, MusicXML is a reasonably well accepted format for
exchanging rendered music expressions across electronic software tools. I
was told that some editors want a MusicXML rendering of your score before
they want to print it. This way they can still apply their own style to a
digital score.

Personally I think that we first need to understand (and agree on) how a
generic ideal music notation and engraving workflow should / could look
like, and then start mapping existing (and missing) bits on this big
picture. This may require starting with collecting user stories. It would
not surprise me if another intermediate language would emerge, and it would
look surprisingly similar to MusicXML, in between the very compact and
expressive LilyPond input language and the printed copy. And what if we
could use a small USB keyboard to input notes and have a simplified
graphical interface displaying what you just entered for a quick visual
first inspection of the music just entered. Eventually this input tool
will generate some machine readable code, e.g. as in bare LilyPond input
(no dynamics, no slurring, no articulations / fingerings etc). In a next
step we could start enriching the bare note input, then prepare it for
printing.

Another workflow could be a composer maintaining his scores in such a way
that they can make new arrangements, transpose the music etc for specific
purposes. The sort of transformations on existing music expressions and the
way to search in a music score repository may require yet another set of
tools and who knows machine readable formats.

Just my musings.

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


Re: Hushing up Sibelius news?

2013-02-24 Thread Olivier Biot
On Sun, Feb 24, 2013 at 2:31 PM, Richard Shann richard.sh...@virgin.netwrote:

 On Sun, 2013-02-24 at 13:56 +0100, Olivier Biot wrote:
  And what if we could use a small USB keyboard to input notes and have
  a simplified graphical interface displaying what you just entered for
  a quick visual first inspection of the music just entered.
 I guess you are aware that Denemo does exactly this?


Yes. I was merely listing a number of user stories. Denemo can even use a
microphone as input - although I haven't tried using that yet. And Denemo
relies upon LilyPond for the final engraving.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Expanding bowed arpeggios

2013-01-28 Thread Olivier Biot
On Mon, Jan 28, 2013 at 10:03 AM, David Kastrup d...@gnu.org wrote:

 Olivier Biot olivier.b...@gmail.com writes:

  Many thanks for your help David!
 
  Having used it I realize that it works perfectly for my purpose, but
  maybe others may want to add e.g. fingerings, cautionary accidentals,
  articulations and dynamics to the arpeggiated output. That of course
  won't work with the current code for arpeggiate since I only look at
  the notes.
 
  Imagine the following naive (not functional) snippet:
 
  \arpeggiate 16 c- g'-1 b'!-3 f'-4-\!
 
  Ideally it would render the fingering either to the far left of the
  arpeggio, or e.g. above each single note of the arpeggiated chord in
  the first half (avoiding fingering repetitions).
 
  How could that be addressed?

 That involves, apart from the \relative aspect, deconstructing the above
 expression and synthesizing a new one from it.  There are no convincing
 user-level tools for deconstruction of a music expression short of
 picking everything apart in Scheme via ly:music-property and its ilk.

 There is some half-Scheme approach called with-music-match in the
 display-lily code.  Turning this into a proper and usefully powerful
 method working with LilyPond syntax templates, possibly combining it
 with the pattern-matching module available for GUILE would be an
 interesting task.

 But without a well-accessible more general transformation tool, I don't
 really see a real user-accessible solution that would not start from
 single pitches, thus not needing to deconstruct anything.


Thank you for explaining the complexity of my naive request. I apparently
managed to write a challenging trick question :-)

I suppose that, to get such a construct to work, one needs to:
1. change the argument type in 'arpeggiate' from 'ly:pitch' to something
else (maybe ly:music?)
2. separate notes (pitch  duration maybe) from their extra
(articulations, dynamics, fingerings, script etc).
3. do the relative / absolute pitch magic with 'make-relative'
4. reattach the extra bits to the right notes in 'arpeggiate'

Another approach could be to overlay the extra on the output of the
'arpeggiate' macro, similar to the 'changePitch' macro from LSR (
http://lsr.dsi.unimi.it/LSR/Item?id=654).

Thirdly, these extra bits could be provided as arguments of the
'arpeggiate' macro.

I don't think I can make any of the above work though :)

Best regards,

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


Re: Expanding bowed arpeggios

2013-01-27 Thread Olivier Biot
On Thu, Jan 17, 2013 at 2:56 PM, David Kastrup d...@gnu.org wrote:


 Try something like (planning to commit this macro soonish)
 #(defmacro-public make-relative (pitches last-pitch music) [code snipped]

 arpeggiate =
 #(define-music-function (parser location d p1 p2 p3 p4)
(ly:duration? ly:pitch? ly:pitch? ly:pitch? ly:pitch?)
Arpeggiate each of the 4 notes note with a duration of d.
(make-relative (p1 p2 p3 p4) p1
 #{
   $p1 $d ( $p2 $d $p3 $d $p4 $d )
   $p4 $d ( $p3 $d $p2 $d $p1 $d )
 #}))

 This is based on the assumption that you want the next relative pitch be
 based on the _first_ note of the arpeggio.  If you want it based on the
 last instead, write
(make-relative (p1 p2 p3 p4) p4
 in the respective line.


Thanks David - works like a charm!!!


   So far I didn't find a way to make my arpeggio expansion work with
  notes in *relative pitch*. My bet is that I need to do some magic on
  ly:pitch? to get it to work, but I am clueless since I don't know
  what I should type as search keywords to get that information. Is
  there for example a relative-pitch-to-absolute-pitch checker routine
  that I could use?

 Sorry for taking so long.  Designing a user interface and actually
 coding this was not exactly trivial.  Note that arpeggiate will work
 fine _both_ when using \relative and when not using it.


Many thanks for your help David!

Having used it I realize that it works perfectly for my purpose, but maybe
others may want to add e.g. fingerings, cautionary accidentals,
articulations and dynamics to the arpeggiated output. That of course won't
work with the current code for arpeggiate since I only look at the notes.

Imagine the following naive (not functional) snippet:

\arpeggiate 16 c- g'-1 b'!-3 f'-4-\!

Ideally it would render the fingering either to the far left of the
arpeggio, or e.g. above each single note of the arpeggiated chord in the
first half (avoiding fingering repetitions).

How could that be addressed?

Best regards,

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


Fingerings and chords (v2.16.2)

2013-01-27 Thread Olivier Biot
Dear LilyPond community,

I'm having some questions regarding the way fingerings are engraved within
chords.

The LilyPond v2.16.2 documentation (
http://www.lilypond.org/doc/v2.16/Documentation/learning/within_002dstaff-objects)
provides information on how to use certain tweaks and the fingeringOptions
property of the new fingering engraver.

I observed a number of things, but I'm not sure whether they're built-in
features / restrictions or whether they're bugs:

1. when using only 'left' or 'right' position specifier, notes in unison or
a second apart will have overlapping fingerings (measures 2, 3  9)
2. you cannot specify 'left' and 'right' at the same time to mean left or
right (measure 9)
3. providing an empty position specifier list does not work as described in
the documentation (it should hide the fingerings - which it doesn't)
(measure
4. two notes in unison can have fingerings added to the wrong notehead
(measures 7  8)
5. why are fingerings of unison notes never displayed at the same height
(vertical position)?

Here's a short yet rather exhaustive example snippet displaying the actual
output for 10 different combinations of fingering placement specs:

 BEGIN snippet
\version 2.16.2

theChord = { e-1 cis'-3 g'-2 a-04 e-1 e-3 g'-2 a-0 }

theMusic = \new Staff {
  \relative c, {
\key c \major
\time 2/4
\clef bass

\override Score.RehearsalMark #'self-alignment-X = #LEFT
\override Score.BarNumber #'break-visibility = #'#(#f #t #t)
\set Score.barNumberVisibility = #(every-nth-bar-number-visible 1)
\override Score.BarNumber  #'stencil
= #(make-stencil-boxer 0.1 0.25 ly:text-interface::print)

\bar 

\mark \markup{ \rounded-box { default } } |
\theChord

\mark \markup{ \rounded-box { right } } |
\set fingeringOrientations = #'(right)
\theChord

\mark \markup{ \rounded-box { left } } |
\set fingeringOrientations = #'(left)
\theChord

\mark \markup{ \rounded-box { up } } |
\set fingeringOrientations = #'(up)
\theChord

\mark \markup{ \rounded-box { down } } |
\set fingeringOrientations = #'(down)
\theChord

\mark \markup{ \rounded-box { empty (spawns warning) } } |
\set fingeringOrientations = #'()
\theChord

\mark \markup{ \rounded-box { up left down } } |
\set fingeringOrientations = #'(up left down)
\theChord

\mark \markup{ \rounded-box { up right down } } |
\set fingeringOrientations = #'(up right down)
\theChord

\mark \markup{ \rounded-box { left right } } |
\set fingeringOrientations = #'(left right)
\theChord

\mark \markup{ \rounded-box { up down } } |
\set fingeringOrientations = #'(up down)
\theChord

\bar |.
  }
}

\score {
  \theMusic
  \layout {}
}
 END snippet

Best regards,

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


Re: Fingerings and chords (v2.16.2)

2013-01-27 Thread Olivier Biot
On Sun, Jan 27, 2013 at 4:07 PM, Phil Holmes m...@philholmes.net wrote:

 **
 This has been changed quite a bit in the development  version. Could you
 try with latest 2.17 and see whether you still have problems?


I just installed 2.17.11 on another computer (apparently it doesn't like to
be installed next to 2.16.2 and does not seem to work yet with Frescobaldi)
and I see that several problems I posted have disappeared. The fixes in
2.17.11 are a HUGE improvement!!!

I ran convert-ly on my source to upgrade the snippet to 2.17.11.

However,

1. Measures 3  7: accidentals and fingerings above / below the fingering
sometimes overlap - not a lot but some could find this objectionable. I can
live with the way it is rendered now.
2. Mesure 7 (up-left-down) still has two fingerings assigned to the same
notehead.

It looks like I can remove a number of fingering positioning tweaks I had
in my code, given the substantially improved out of the box fingering
rendering.

Best regards,

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


Re: Fingerings and chords (v2.16.2)

2013-01-27 Thread Olivier Biot
On Sun, Jan 27, 2013 at 5:47 PM, Phil Holmes m...@philholmes.net wrote:

 **
 Sorry to keep top-posting - HTML emails and Windows mail make it hard to
 do otherwise.

 If you still have stuff you'd like fixing, could you reduce your example
 to a tiny example with just these, and send it to bugs?


Hi Phil,

I just did and hope I did it right (it's my first post to the bug list):
http://article.gmane.org/gmane.comp.gnu.lilypond.bugs/36988

Best regards,

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


Re: Displaying page x of y in header / footer

2013-01-16 Thread Olivier Biot
Dear all,

Here's a trick that works better than the trick I posted earlier.

Add the following at the end of the music expression (e.g. after the last
note), or in a separate context having the same number of measures as the
music you want to engrave:

\label #'theLastPage

Best regards,

Olivier


On Fri, Dec 28, 2012 at 5:34 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Dear all,

 Replying to myself all I managed to do is the following hack: add the
 following sneppet after the last \score {} block:

 \label #'theLastPage

 \markup \rounded-box { \tiny  }


 Thios empty block displays nothing in the score and seems to solve the
 problem, although in a rather hackish way.


 Is there a proper way for reaching this?


 Best regards,


 Olivier



 On Fri, Dec 28, 2012 at 5:04 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Dear all,

 I can't find how to display the total number of pages in a score as part
 of the page header / footer.

 I tried adding a theLastPage label at the end of my score but it
 sometimes is off by one. I sadly cannot create a small snippet that
 reproduces the off-by one (page 4 of 3) problem.

 Placing a label outside the last score block yields an unresolved label
 and page reference.

 For what it's worth, here's the stencil I'm currently using:

 \paper {

 oddHeaderMarkup = \markup \fill-line { \hspace #1 \concat { page 
 \fromproperty #'page:page-number-string  of  \page-ref #'theLastPage 0
 ? } \hspace #1 }

 }

 evenHeaderMarkup = \oddHeaderMarkup
 }

 Any help is welcome.

 Best regards,

 Olivier



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


Re: many short music patterns in a Latex doc

2013-01-12 Thread Olivier Biot
On Fri, Jan 11, 2013 at 8:58 PM, Francisco Vila paconet@gmail.comwrote:

 2013/1/11 Lilly l...@ngi.it:
  I want to realize a document with some text and many musical patterns
 along
  it.
  I experienced how to insert one pattern in a place of a Latex document
 and
  it works.
  But i would not to repeat to paste every time for all the different
 patterns
  along the doc, the whole complete code for each of them.
  I would try to call a file where are written all the things needed
 around to
  compile the music pattern, and in ever precise place, insert only the
 music
  pattern itself.
 
  there's a way to do this?

 If I understand correctly, yes, you can keep a terse LaTeX file using
 lilpondfile. Imagine you have all common definitions and global music
 in A.ly and your documents are B.ly, C.ly and so on, such that all use
 \include A.ly to read the common part. Your text document called
 D.tex can use \lilypondfile{B}, \lilypondfile{C}, et cetera.


I am trying to understand what you want to do.

Are you trying to build a LaTeX file which reads in a number of LilyPond
files, each of which contains a number of common LilyPond code and settings?

If so, I'd recommend you use lilypond-book.py and read the following recent
thread:
http://lists.gnu.org/archive/html/lilypond-user/2013-01/msg00298.html

Best regards,

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


Re: frescobaldi on mac

2013-01-12 Thread Olivier Biot
On Sat, Jan 12, 2013 at 8:53 PM, Jim Tisdall supp...@jimtisdall.com wrote:

 In trying to compile frescobaldi on my mac pro osx10.7.5, I have the
 program running but I've run into the following problem with trying
 to get the python-poppler-qt4-0.16.3 extension to work:

 $ python setup.py build

[...]

 In file included from
 build/temp.macosx-10.7-intel-**2.7/sippopplerqt4cmodule.cpp:**7:
 poppler-qt4.sip:24:29: error: qt4/poppler-qt4.h: No such file or directory
 poppler-link.sip:41:30: error: qt4/poppler-link.h: No such file or
 directory


 and etc etc.  I have python2.7.1, sip4.14.2, and PyQT4.9.6

 Any suggestions would be welcome, if you've successfully compiled
 this on the mac.


I haven't compiled Frescobaldi on Mac, but a Google search yielded among
others the following post:
http://comments.gmane.org/gmane.comp.gnu.lilypond.general/74065

And here's another issue regarding libiconv on MacOS (used by Poppler):
http://www.qtcentre.org/threads/43417-Trouble-using-Poppler-libs-with-QT-Creator-on-Mac

Hope this helps.

Best regards,

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


Re: lilypond-book include *.ly, cannot find file

2013-01-08 Thread Olivier Biot
On Jan 8, 2013 4:13 PM, Cognac Natanael natanael.cog...@gmail.com wrote:

 Hello Everybody,

 I’m using :
 \include ../config.inc.ly
 in the beginning of all my lilypond scores, and :
 \include ../new.score.ly
 at the end.

 It works smoothly with lilypond.

 But now, I’m trying to make a book with lilypond-book  latex and include
the scores into it, and I've got this message when I run :


(snip)

 Does anyone have an idea to solve this ?

 Thank you very much for your time !

You must explicitly specify all folders containing LilyPond files that will
be included from within your sources, with their absolute path. There is a
command line option for this, if the directory contains spaces, use quotes
for specifying the directory.

Best regards,

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


Re: lilypond-book include *.ly, cannot find file

2013-01-08 Thread Olivier Biot
On Tue, Jan 8, 2013 at 5:50 PM, Cognac Natanael
natanael.cog...@gmail.comwrote:

 Thank you very much for your answer Olivier,

 There is no spaces or fancy character in my directories or files names.


Okay, so you don't need to use quotes around the directory names (not that
it hurts having them).

And I think I’ve tried l’option that you've mentionned, and I tried with
 the option you’ve mentionned :
 lilypond-book --include=my-lilypond-repertory/


Exactly. You must specify every directory with a separate --include
directive.


 But after some new tests, I found something that works.

 This si how is the directory I’m working in :

 lilypond/
 config.ly
 score.ly
 tuneA/
 tuneA.ly
 tuneB/
 tuneB.ly

 At the beginning and the end of tuneA.ly and tuneB.ly, I have those
 instructions :
 \include ../config.ly
 \include ../score.ly

 So in order to make lilypond-book work with those includes, I have to
 specify each directory of tune !!! (I’ve got more than twenty and it should
 grow !) and thus, it works :
 lilypond-book
 --include=/home/user/project/lilypond/tuneA/
 --include=/home/user/project/lilypond/tuneB/
 --include=/home/user/project/lilypond/tuneC/
 --include=/home/user/project/lilypond/tuneD/
 etc… for each tune, it’s really cumbersome …


This is the way it is currently available. You could automate part of this
effort with some shell scripting, e.g. (assuming Bash):

includespec=
for i in  /home/user/project/lilypond/tune* ; do
  includespec=$includespec --include \$i\
done
lilypond-book $includespec --output=out --pdf lilybook.lytex

BEWARE: I wrote the commands above without testing since I have no access
to a Linux box at the moment.

If you had a more complexe directory structure, then you'd have to crawl
down the entire subdirectory tree; the easiest way for doing so at the *NIX
command shell is with 'find'. The first line of the 'for' statement would
then read as follows:

dirlist=`find /home/user/project/lilypond/musicfiles/ -t d`
for i in $dirlist; do

BEWARE: I wrote the commands above without testing since I have no access
to a Linux box at the moment.

I’m sure I read somewhere (I didn’t find it back) that lilypond-book will
 look recursively into the reportory pointed out with --include. But
 apparantly it’s not the case.


No, or maybe not yet :)

Any lighter solution than the one I found ?


It would be great if a new recursive --include command were added to
lilypond-book (e.g. --include-base). It could even internally translate
into a cascade of --include directives (e.g. via the *NIX 'find' trick
implemented in Python)

Oh yes, and before I forget: make sure you NEVER have two LilyPond files
sharing the same file name when using lilypond-book!

Thanks again for your help.
 P.S: I forgot to mention my version : 2.16.1 (and I work with archlinux).


Maybe the lilypond-book author can shed some light on this?

Best regards,

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


Re: Trill and nonstandard expressive mark

2013-01-05 Thread Olivier Biot
On Sat, Jan 5, 2013 at 5:10 PM, David Kastrup d...@gnu.org wrote:

 Ed Gordijn ed.klari...@gmail.com writes:

  Hi David,
  Well, you need _two_ trill starting commands now (though you could
  likely squeeze \startTrillSpan into \SetUpPrall), and you need to
  spend more attention to detail to the overrides.
 
  So you likely contributed more time on this than I did.
 
  I am still in 2.16 and did try your tweaks but didn't get it ride. I
  know that 2.17 has got a new syntax with dots but converting that to
  the 2.16 style didn't solve it. Here is my code, I don't know what is
  wrong.
 
  \version 2.16.0
 
 
  beginPrallSpan = {
 
  \tweak #'(bound-details left text) \markup { \fontsize #-5 \musicglyph
  #accidentals.leftparen }
 
  \tweak #'(bound-details left stencil-offset) #'(0.02 . -0.65)
 
  \startTrillSpan
 
  }

 Well, putting { ... } around it is wrong, for one thing: it turns the
 whole into sequential music.


Bingo!

This is the most counterintuitive syntactic element in LilyPond for
newcomers (after Scheme). In most programming languages, curly braces are
used for grouping commands, in LilyPond curly braces have a double life and
can be used in one of their shapes as a shorthand for define serial music
(as opposed to define parallel music which is done with double angle
brackets. The double meaning of the curly braces in LilyPond is rather
confusing and I still have the impression at times that things seem to work
out of sheer luck when using curly braces.

Is this double meaning of curly braces documented somewhere? I did not come
across it in the online manuals so far.

Best regards,

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


(lilypond-book) Useful LaTeX snippets

2013-01-05 Thread Olivier Biot
Dear LilyPond users,

Is there a LaTeX snippet repository for submitting useful LaTeX macros for
lilypond-book users?

I'd like to share some snippets but don't know where to share them.

Best regards,

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


Re: Trill and nonstandard expressive mark

2013-01-05 Thread Olivier Biot
On Sun, Jan 6, 2013 at 12:28 AM, David Kastrup d...@gnu.org wrote:

 Olivier Biot olivier.b...@gmail.com writes:

  Well, putting { ... } around it is wrong, for one thing: it turns
  the
  whole into sequential music.
 
  Bingo!
 
  This is the most counterintuitive syntactic element in LilyPond for
  newcomers (after Scheme). In most programming languages, curly braces
  are used for grouping commands, in LilyPond curly braces have a double
  life and can be used in one of their shapes as a shorthand for define
  serial music (as opposed to define parallel music which is done
  with double angle brackets. The double meaning of the curly braces in
  LilyPond is rather confusing and I still have the impression at times
  that things seem to work out of sheer luck when using curly braces.
 
  Is this double meaning of curly braces documented somewhere? I did not
  come across it in the online manuals so far.

 What double life?  Within music, curly braces create sequential music.
 What other meaning do you see?


First meaning of curly braces as block delimiter, e.g. in:

\score {
  % Serial or parallel music goes here
  \layout {
% Layout directives go here
  }
}

Second meaning as serial music definition, e.g. as a music expression
that will be used in a voice within a score block:

theMusic = { c8 d e4-. f2 }

It is very difficult to disambiguate the meaning of the curly braces
without looking at where they will eventually appear.

Best regards,

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


Re: Lilypond-book on Windows 2.16.1

2013-01-04 Thread Olivier Biot
On Fri, Jan 4, 2013 at 4:12 PM, Phil Holmes em...@philholmes.net wrote:

 I have created a new stable version of the windows binary (2.16.2) which
 should fix the problem that prevents lilypond-book from being run on
 2.16.1. Before uploading this to the official website, I would appreciate
 it if interested and capable users could download it from my own website:

 http://philholmes.net/**lilypond/lilypond-2.16.2-1.**mingw.exehttp://philholmes.net/lilypond/lilypond-2.16.2-1.mingw.exe

 and test the lilypond-book functionality.  Please reply-all with your
 results.  I would appreciate it if those interested in a fix could do this
 as soon as possible.


Dear Phil,

I tested on Win7 x64, uninstalled LilyPond 2.16.1 and installed LilyPond
2.16.2.

LilyPond works, as does lilypond-book.py now. No longer do I need to run
python on the .py file as I reported earlier with LilyPond 2.16.1.

I already updated my makefile to reflect the fix in LilyPond 2.16.2.

Best regards and many thanks!

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


Re: Trill and nonstandard expressive mark

2013-01-04 Thread Olivier Biot
On Sat, Jan 5, 2013 at 1:32 AM, Andrew Bernard andrew.bern...@gmail.comwrote:

 Greetings list,

 This technique glues an upprall to a trill, but the difference in width of
 the glyphs is noticeable. Is there a way to achieve this without the
 discrepancy in width? Since lilypond produces the finest engraved output I
 know, can we do better than this for baroque engraving?


I don't know if the Feta font hosts the up/down leader for pralls and
mordents. If so, then it's probably a matter of adding that one instead of
the entire prall/mordent symbol to the left of the trill spanner.

Worst case, maybe a whiteout on top of the existing up/down-prall to only
show the interesting bit and then overwrite the whiteout with the custom
trill spanner?

Best regards,

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


Re: vertical line spacing of a markup

2013-01-03 Thread Olivier Biot
On Thu, Jan 3, 2013 at 8:56 PM, David Nalesnik david.nales...@gmail.comwrote:


 To be honest, I don't know much about typographical conventions, so
 I'm not sure whether the attached file has much utility.  Here, I've
 adapted the definition of `stack-lines' so that you can turn off the
 compromise mentioned above--namely that the value of baseline-skip is
 only used if there is no overlap of lines  This is done by overriding
 the property `strict'.  I've set it to #f by default (normal spacing)
 in the adaptation of \column in the file.


Hi David, yes, I think your contribution is a significant step forward in
LilyPond text handling!

Strict spacing only has any noticeable effect when lines are close
 together.  The attached example shows how the same column looks (on
 the left) by default when LilyPond ignores baseline-skip, and with
 strict spacing.  Note that the p and q are allowed to interleave
 in the right column.


Crystal clear to me.

If something like this is useful, the definition of 'stack-lines'
 might be modified in scm/stencil.scm.  Of course, an additional
 argument would be required in whatever markup-command definition
 includes that procedure.  I haven't tested this extensively to know
 what if any problems might show up.


This should make it somehow into LilyPond core text handling routines as an
alternative (the preferred) text line handling routine.

As a matter of fact, I gave up entirely working with text in LilyPond due
to my extensive and unfruitful tests so far, and I opted for lilypond-book
and LaTeX. It's somehow funny to resume working with LaTeX after a 13 year
hiatus :) Maybe I can contribute to improving the (currently rather
limited) lilypond-book documentation. Did you know for instance that adding
links in PDF files with lilypond-book can only be done with pdflatex and
the hyperref LaTeX package? Did you know you need to provide explicitly the
absolute paths to ALL directories containing LilyPond sources that you
include in your project? Did you know lilypond-book extracts the required
information from a lytex file by means of heuristics and hence sometimes
can miss the mark? Did you know the end result can be fabulous? To me the
combination of LaTeX and lilypond-book is ideal: it's the combinaiton of
the best of both worlds.

Best regards,

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


Re: Exporting SVG files into Inkscape - font issues

2013-01-03 Thread Olivier Biot
On Thu, Jan 3, 2013 at 11:40 PM, Gerard McConnell gerine...@gmail.comwrote:

 If you don't get fixed up here it's worth visiting the Inkscape help squad:
 https://launchpad.net/inkscape


For what it's worth I never managed to get InkScape correctly read the
fonts from any LilyPond output on a Windows box.

Saving a file opened with InkScape even without changing a thing completely
ruins the lay-out :(

Best regards,

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


Re: Sibelius user looking for the easiest way to learn LilyPond

2013-01-03 Thread Olivier Biot
On Thu, Jan 3, 2013 at 10:59 PM, Shane Brandes sh...@grayskies.net wrote:

 To give you a reverse opinion. Lilypond at a basic level is fairly
 easy to understand especially if you use a program like Frescobaldi to
 help you construct the scores with their various parts.


This is my experience as well. Writing the music and articulations is
pretty straightforward one you get the logic. Slurring may look
counter-intuitive but it makes sense: to add a slur between b and c  d,
you would write b ( c d ) and not (b c d) as the ( means starting
from the last note, start a slur up to and including the note before ). A
similar logic holds for manual beaming. Writing music in relative mode is
easy as well - if the distance to the note is less than a fifth, then you
don't need to add a ' or , octave changing mark.


 That initially
 was to me the greatest challenge. With Frescobaldi you can build
 scores and then from there learn how the syntax works. Additionally
 with such an external editor it will point out syntax errors which is
 really handy even if you have a great understanding of Lilypond it can
 be a chore to find a simple small syntax error in a plain text file.
 Doable certainly fun no. So as far as simply getting up and running it
 should not take to terribly long.


I agree. Frescobaldi has another advantage: it supports built-in syntax
highlighting and you can click on error messages and will be brought to the
offending bit in the offending file. You can also click on a note in the
PDF preview to go to the source file where that note was defined (e.g., to
correct an octave error). And ifg you create MIDI output you can even play
back the MIDI from within Frescobaldi (if you added a \midi{} construct
in your \score block.


 Of course it is when you want
 Lilypond to do things that are either nonstandard practice or not yet
 resolved in terms of what the program is capable of automagically that
 is when it can be a bit of a bear and you must begin to really think
 about how to get around odd things.


This is absolutely true. The main difficulty is that LilyPond makes use of
Scheme, which is a programming language that is not seen very frequently
and has its own logic. I'm a software engineer and even I have difficulties
understanding Scheme as I never was taught Scheme so far - I need to learn
it on-the-fly, along with the LilyPond code and a lot of useful snippets
you can find via your preferred search engine.

For example I would like to make a
 trill line go for a measure or so without the obligatory Tr. showing
 up at the beginning. You think oh that should be easy. Let's turn off
 the Trill part. After searching the user manual and wading through the
 lilypond snippet repository (if you have not seen this yet it is an
 selection of useful code that does not need to clutter up the user
 manual) you discover there is no easy way. So you think to yourself
 well the trill line is made by a widget called a spanner maybe I can
 redefine a spanner to do what you want so you go looking at the bits
 of the manual that talk about lines and you then find a way to
 redefine a dynamic spanner as a line and voila you realize you can
 tell it what sort of line to be and after a bit you have a trill
 marking senza the Tr. and the best part is in that process you learn
 all manner of other odd things that are possible that you might not
 need at the moment. Of course there maybe even other ways of cracking
 such a problem.


There's not one way only that leads to Rome, as one says :-)

One you start touching the internals of LilyPond, you get exposed to a
completely new universe where virtually everything is possible.


 And on top of that the people that hang about this
 list are generally very good about giving suggestions and pointing
 people in the right direction.


That is absolutely true!

Best regards,

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


Re: vertical line spacing of a markup

2013-01-02 Thread Olivier Biot
On Wed, Jan 2, 2013 at 12:52 PM, Federico Bruni fedel...@gmail.com wrote:

 Il 02/01/2013 12:46, David Kastrup ha scritto:

  \markup {
\override #'(baseline-skip . 1)
\override #'(line-width . 40)
\justify {
  text text text text text text text text text text text text
  text text text text text text text text text text text text
  text text text text text text text text text text text text
  text text text text text text text text text text text text
}
 }


 That's perfect!


There's one limitation though (and it does not feature in the
documentation): baseline-skip will find a compromise between the vertical
extent of text in the lines and the baseline-skip value, the bigger one
being used. This can result in irregular base line distances as illustrated
in the following snippet:

\markup {
  \override #'(baseline-skip . 1)
  \override #'(line-width . 4) \justify { The eee heh . . . . . . x x x x f
f f x x x f f f f f f j f f f f }
}

Look at the line spacing between the lines with dots, the lines with 'x' or
the 'tallest' lines with 'f' and 'j'.

You can make baseline-skip yield regular baseline intervals by making it as
big as to avoid these problems. The default value of 3 seems to yield
regular baseline intervals.

There is probably a way to specify strict base line spacings, but I
haven't found it yet.

Best regards,

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


Re: Expanding bowed arpeggios

2013-01-02 Thread Olivier Biot
On Sat, Nov 24, 2012 at 1:26 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Hi all,

 Sometimes arpeggios are written as chords to avoid repetitive and lengthy
 arpeggio expansions in a written score.

 However, is there a way in LilyPond to transform chords into bowed
 arpeggio expansions, as illustrated in the example below (first bar =
 input, 2nd bar = automatically generated expansion based on input)?


Dear all,

Following up on my own request, I stumbled upon an insightful article
featuring Bach's prelude for piano (BWV 846):
http://news.lilynet.net/?The-LilyPond-Report-23#feature_story_prelude_1_in_scheme

Based on this example I managed to create a first version, which however
only works with *absolute* pitches (see measure 1).

How can I make it work with *relative* pitches (see measure 2)?

%%% BEGIN Snippet
\version 2.16.1

arpeggiate = #(define-music-function (parser location d p1 p2 p3 p4)
(ly:duration? ly:pitch? ly:pitch? ly:pitch? ly:pitch?)
Arpeggiate each of the 4 notes note with a duration of d.
#{
  $p1 $d ( $p2 $d $p3 $d $p4 $d )
  $p4 $d ( $p3 $d $p2 $d $p1 $d )
#})

theMusic = {
  \arpeggiate 8 g d' a' e''
  \relative g {
\arpeggiate 8 g d' a' e'
  }
}

\score {
  \new StaffGroup 
\new Staff {
  \relative g {
g d' a' e'1 q
  }
}
\new Staff {
  \theMusic
}
  
  \layout { }
  \midi { }
}
%%% END Snippet

Best regards,

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


Using lilypond-book on Win7 x64

2013-01-02 Thread Olivier Biot
Dear all,

I can't get lilypond-book.py to work.

I added the LilyPond bin directory to %PATH%:
C:\Program Files (x86)\LilyPond\usr\bin

The PATH also contains a working LaTeX (proTeXt):
C:\Program Files\MiKTeX 2.9\miktex\bin\x64\

When enabling verbose mode in lilypond-book.py the following errors are
displayed at the end of lilypond-book.py, I can't get it to work:

Traceback (most recent call last):
  File C:\Program Files (x86)\LilyPond\usr\bin\lilypond-book.py, line
766, in ?
main ()
  File C:\Program Files (x86)\LilyPond\usr\bin\lilypond-book.py, line
689, in main
files = do_options ()
  File C:\Program Files (x86)\LilyPond\usr\bin\lilypond-book.py, line
681, in do_options
exit (2)
  File C:\Program Files (x86)\LilyPond\usr\bin\lilypond-book.py, line
114, in exit
raise Exception (_ ('Exiting (%d)...') % i)
Exception: Exiting (2)...

Best regards,

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


Re: Parenthesize slashed grace with fingering?

2013-01-02 Thread Olivier Biot
On Wed, Jan 2, 2013 at 10:59 PM, Colin Campbell c...@shaw.ca wrote:

  In transcribing some cello exercises, I need to show a slashed grace
 note, with a fingering, in parentheses.  The exercise involves shifting
 between first and third position on the same string, so it emphasizes the
 intermediate target position, with the intent that the grace note gets
 eliminated as the shift gets smoother.  The following gives me all I need
 except for the parentheses.  I'm a bit foggy from a virus, and I cannot
 find the magic incantation which will show both the grace note and the
 parenthesis. Using 2.17.10, by the way.
 %

 e'2-1 ( \parenthesize \slashedGrace gs8-1 a2-2

 %

 Any pointers to TFM or LSR gratefully received!

 Cheers,
 Colin


Hi Colin,

I found something in LSR snippet 186 (
http://lsr.dsi.unimi.it/LSR/Item?id=186).

Here's a working example:

%%% BEGIN snippet:
\version 2.16.1
\include english.ly

% LSR http://lsr.dsi.unimi.it/LSR/Snippet?id=186
#(define (parenthesize-callback callback)
   (define (parenthesize-stencil grob)
 (let* ((fn (ly:grob-default-font grob))
(pclose (ly:font-get-glyph fn accidentals.rightparen))
(popen (ly:font-get-glyph fn accidentals.leftparen))
(subject (callback grob))
;; get position of stem
(stem-pos (ly:grob-property grob 'stem-attachment))
;; remember old size
(subject-dim-x (ly:stencil-extent subject X))
(subject-dim-y (ly:stencil-extent subject Y)))

   ;; add parens
   (set! subject
 (ly:stencil-combine-at-edge
  (ly:stencil-combine-at-edge subject X RIGHT pclose 0)
  X LEFT popen 0))

   ;; adjust stem position
   (set! (ly:grob-property grob 'stem-attachment)
 (cons (- (car stem-pos) 0.43) (cdr stem-pos)))

   ;; adjust size
   (ly:make-stencil
(ly:stencil-expr subject)
(interval-widen subject-dim-x 0.5)
subject-dim-y)))

   parenthesize-stencil)

\relative c'' {
  e2-1 ( \once \override NoteHead #'stencil = #(parenthesize-callback
ly:note-head::print) \slashedGrace gs8-1  a-2 )
}
%%% END snippet

Hope this helps.

Best regards,

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


Re: Using lilypond-book on Win7 x64

2013-01-02 Thread Olivier Biot
On Wed, Jan 2, 2013 at 11:58 PM, Julien Rioux jri...@physics.utoronto.cawrote:

 On 02/01/2013 5:03 PM, Olivier Biot wrote:

 Dear all,

 I can't get lilypond-book.py to work.

 I added the LilyPond bin directory to %PATH%:
 C:\Program Files (x86)\LilyPond\usr\bin

 The PATH also contains a working LaTeX (proTeXt):
 C:\Program Files\MiKTeX 2.9\miktex\bin\x64\


 That looks like this bug:

 http://code.google.com/p/**lilypond/issues/detail?id=3052http://code.google.com/p/lilypond/issues/detail?id=3052

 You could see if you can get around it by undoing the changes to the
 registry that is described here:

 http://code.google.com/p/**lilypond/issues/detail?id=1455http://code.google.com/p/lilypond/issues/detail?id=1455


 Hi Julien,


It is possible, although all I can do for now is manually invoking
lilypond-book.py as follows:

1. Add the LilyPond bin directory to %PATH%:
C:\Program Files (x86)\LilyPond\usr\bin

2. Invoke lilypond-py via Python (doesn't work from command line):
python \Program Files (x86)\LilyPond\usr\bin\lilypond-book.py
Kummer_Op_125.lytex

Best regards,

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


Re: Guitar slides in lilypond

2012-12-30 Thread Olivier Biot
Hi Yevgeny,

Right now LilyPond does not (yet?) support pitch bends in the MIDI output.

As a work-around you could import the MIDI file created with LilyPond in
another tool, e.g. TuxGuitar or MidiEditor) and add the pitch bends in a
separate channel (MIDI doesn't apparently like playing notes simultaneously
with different pitch bends).

Best regards,

Olivier


On Sat, Dec 29, 2012 at 5:41 PM, Yevgeny Lezhnin z_lezh...@mail2000.ruwrote:

  Thank you. Is there any way to get something more soft, like the output
 sound of tuxguitar? Here is 2 midi files for compare in attachment.


 On 29.12.2012 22:58, Olivier Biot wrote:

  On Sat, Dec 29, 2012 at 4:31 PM, Yevgeny Lezhnin 
 z_lezh...@mail2000.ruwrote:

 Hi, then I trying to add slides, there is no slide's sound in midi output
 (on place of glissando mark). There was note in documentation, that
 lilypond support guitar slides. Does lilypond support slides for midi? Or
 will it be support of other effects for guitar in lilypond?


  Apparently you have to write out the glissando, see.

  Here's an implementation with tags and this snippet applied to your
 score:
 \version 2.17.9
 \language deutsch

 musicForBass = \relative c, {
   \tempo 4 = 90
   \time 2/4
   c8 c c8. g16 c g c8 c4~ c16 r ais8. f'8.
   \time 4/4
   c8 c c8. g16 c g c8 c8. g16

   \times 2/3 {c c c}
   \tag #'print { c4\glissando f\38 }
   \tag #'midi { c8. ( \times 3/7 { c16[ cis d dis e eis f] } f16 ) }
   ais,8. f'8. r8
   % \times 2/3 {c16[ c c]} c8. ( \times 3/7 { c16[ cis d dis e eis f] }
 f16 ) r8 \bar ||
 }

 \header {
   title = Circle of hands
   composer = Uriah heap
 }

 bassStaff =
   \new Staff {
 \set Staff.instrumentName = #Bas Guitar
 \set Staff.midiInstrument = #electric bass (finger)

 \new Voice {
   \clef bass_8
   \musicForBass
 }
   }

 \score {
   \new StaffGroup 
 \keepWithTag #'print \bassStaff
 \new TabStaff {
   \set TabStaff.stringTunings = #bass-tuning
   \keepWithTag #'print \musicForBass
 }
   
   \layout{}
 }

 \score {
   \unfoldRepeats { \keepWithTag #'midi \bassStaff }
   \midi{}
 }


  Best regards,


  Olivier



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


Re: String number spanner

2012-12-29 Thread Olivier Biot
On Fri, Dec 28, 2012 at 6:19 PM, Olivier Biot olivier.b...@gmail.comwrote:

 On Fri, Dec 28, 2012 at 6:14 PM, Phil Burfitt 
 phil.burf...@talktalk.netwrote:

 From: Nick Payne


  I'm stuck on the last part of getting this working - the part that is
 eluding me is getting a short vertical line drawn at the RH end of the
 spanner. According the the Internals reference, UP = 1 and DOWN = -1, and
 that works fine when I use the return value from the updown function to set
 TextSpanner.direction in beginStringNum. But when I try to use the value
 returned from updown in the section of code that is commented out in
 beginStringNum, I get an error. If I hardcode 1 or -1 instead of updown
 then the line is drawn as expected.

 I also tried the righttext function below to draw the line: no error is
 indicated but neither is the vertical line drawn.


Oops. Forgot to remove the comment for the right hook - here's a
corrected version:


 This is a spanner with an end 'hook' - I use it for telling in which cello
 position a passage should be played:

 \version 2.16.1
 % Allows to draw a dashed text spanner for highlighting sections with a
 given playng position in a score
 stringNumberSpanner =
 #(define-music-function (parser location stringNumber) (string?)
#{
  \override TextSpanner #'style = #'dashed-line
  \override TextSpanner #'dash-period = #1.5
  \override TextSpanner #'dash-fraction = #0.5
  \override TextSpanner #'font-size = #-5
  \override TextSpanner #'font-shape = #'upright
  \override TextSpanner #'(bound-details left stencil-align-dir-y) =
 #CENTER
  \override TextSpanner #'(bound-details left text) = \markup { \number
 $stringNumber }
  \override TextSpanner #'(bound-details right text) = \markup {
 \draw-line #'(0 . -1) }
  \override TextSpanner #'outside-staff-priority = 500
#}
)


If you need some examples on how  what can be done with spanners, please
visit the following link:
http://www.lilypond.org/doc/v2.16/Documentation/snippets/expressive-marks#expressive-marks-creating-text-spanners
It's where I found my inspiration.

From what I understand you still want to conditionally have an up hook (
\markup { \draw-line #'(0 . 1) } ) when the spanner is displayed below the
staff and a down hook (\markup { \draw-line #'(0 . -1) }) when the
spanner appears above the staff. This is something I can't help with, apart
from defining 2 music-function instances with each variant hard-coded.

Best regards,

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


Re: Guitar slides in lilypond

2012-12-29 Thread Olivier Biot
On Sat, Dec 29, 2012 at 4:31 PM, Yevgeny Lezhnin z_lezh...@mail2000.ruwrote:

 Hi, then I trying to add slides, there is no slide's sound in midi output
 (on place of glissando mark). There was note in documentation, that
 lilypond support guitar slides. Does lilypond support slides for midi? Or
 will it be support of other effects for guitar in lilypond?


Apparently you have to write out the glissando, see.

Here's an implementation with tags and this snippet applied to your score:
\version 2.17.9
\language deutsch

musicForBass = \relative c, {
  \tempo 4 = 90
  \time 2/4
  c8 c c8. g16 c g c8 c4~ c16 r ais8. f'8.
  \time 4/4
  c8 c c8. g16 c g c8 c8. g16

  \times 2/3 {c c c}
  \tag #'print { c4\glissando f\38 }
  \tag #'midi { c8. ( \times 3/7 { c16[ cis d dis e eis f] } f16 ) }
  ais,8. f'8. r8
  % \times 2/3 {c16[ c c]} c8. ( \times 3/7 { c16[ cis d dis e eis f] } f16
) r8 \bar ||
}

\header {
  title = Circle of hands
  composer = Uriah heap
}

bassStaff =
  \new Staff {
\set Staff.instrumentName = #Bas Guitar
\set Staff.midiInstrument = #electric bass (finger)

\new Voice {
  \clef bass_8
  \musicForBass
}
  }

\score {
  \new StaffGroup 
\keepWithTag #'print \bassStaff
\new TabStaff {
  \set TabStaff.stringTunings = #bass-tuning
  \keepWithTag #'print \musicForBass
}
  
  \layout{}
}

\score {
  \unfoldRepeats { \keepWithTag #'midi \bassStaff }
  \midi{}
}


Best regards,


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


Re: Guitar slides in lilypond

2012-12-29 Thread Olivier Biot
On Sat, Dec 29, 2012 at 4:58 PM, Olivier Biot olivier.b...@gmail.comwrote:

 On Sat, Dec 29, 2012 at 4:31 PM, Yevgeny Lezhnin z_lezh...@mail2000.ruwrote:

 Hi, then I trying to add slides, there is no slide's sound in midi output
 (on place of glissando mark). There was note in documentation, that
 lilypond support guitar slides. Does lilypond support slides for midi? Or
 will it be support of other effects for guitar in lilypond?


 Apparently you have to write out the glissando, see
 http://lsr.dsi.unimi.it/LSR/Snippet?id=193


Forgot to paste the LSR link - sorry for this.

Info on using tags with v2.16:
http://lilypond.org/doc/v2.16/Documentation/notation/different-editions-from-one-source#using-tags

Best regards,

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


Displaying page x of y in header / footer

2012-12-28 Thread Olivier Biot
Dear all,

I can't find how to display the total number of pages in a score as part of
the page header / footer.

I tried adding a theLastPage label at the end of my score but it
sometimes is off by one. I sadly cannot create a small snippet that
reproduces the off-by one (page 4 of 3) problem.

Placing a label outside the last score block yields an unresolved label and
page reference.

For what it's worth, here's the stencil I'm currently using:

\paper {

oddHeaderMarkup = \markup \fill-line { \hspace #1 \concat { page 
\fromproperty #'page:page-number-string  of  \page-ref #'theLastPage 0
? } \hspace #1 }

}

evenHeaderMarkup = \oddHeaderMarkup
}

Any help is welcome.

Best regards,

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


Re: Displaying page x of y in header / footer

2012-12-28 Thread Olivier Biot
Dear all,

Replying to myself all I managed to do is the following hack: add the
following sneppet after the last \score {} block:

\label #'theLastPage

\markup \rounded-box { \tiny  }


Thios empty block displays nothing in the score and seems to solve the
problem, although in a rather hackish way.


Is there a proper way for reaching this?


Best regards,


Olivier



On Fri, Dec 28, 2012 at 5:04 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Dear all,

 I can't find how to display the total number of pages in a score as part
 of the page header / footer.

 I tried adding a theLastPage label at the end of my score but it
 sometimes is off by one. I sadly cannot create a small snippet that
 reproduces the off-by one (page 4 of 3) problem.

 Placing a label outside the last score block yields an unresolved label
 and page reference.

 For what it's worth, here's the stencil I'm currently using:

 \paper {

 oddHeaderMarkup = \markup \fill-line { \hspace #1 \concat { page 
 \fromproperty #'page:page-number-string  of  \page-ref #'theLastPage 0
 ? } \hspace #1 }

 }

 evenHeaderMarkup = \oddHeaderMarkup
 }

 Any help is welcome.

 Best regards,

 Olivier

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


Re: String number spanner

2012-12-28 Thread Olivier Biot
On Fri, Dec 28, 2012 at 6:14 PM, Phil Burfitt phil.burf...@talktalk.netwrote:

 From: Nick Payne


  I'm stuck on the last part of getting this working - the part that is
 eluding me is getting a short vertical line drawn at the RH end of the
 spanner. According the the Internals reference, UP = 1 and DOWN = -1, and
 that works fine when I use the return value from the updown function to set
 TextSpanner.direction in beginStringNum. But when I try to use the value
 returned from updown in the section of code that is commented out in
 beginStringNum, I get an error. If I hardcode 1 or -1 instead of updown
 then the line is drawn as expected.

 I also tried the righttext function below to draw the line: no error is
 indicated but neither is the vertical line drawn.


This is a spanner with an end 'hook' - I use it for telling in which cello
position a passage should be played:

\version 2.16.1
% Allows to draw a dashed text spanner for highlighting sections with a
given playng position in a score
stringNumberSpanner =
#(define-music-function (parser location stringNumber) (string?)
   #{
 \override TextSpanner #'style = #'dashed-line
 \override TextSpanner #'dash-period = #1.5
 \override TextSpanner #'dash-fraction = #0.5
 \override TextSpanner #'font-size = #-5
 \override TextSpanner #'font-shape = #'upright
 \override TextSpanner #'(bound-details left stencil-align-dir-y) =
#CENTER
 \override TextSpanner #'(bound-details left text) = \markup { \number
$stringNumber }
 % \override TextSpanner #'(bound-details right text) = \markup {
\draw-line #'(0 . -1) }
 \override TextSpanner #'outside-staff-priority = 500
   #}
   )

Hope this helps.

Best regards,

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


Re: Markup and stencil formatting questions

2012-12-20 Thread Olivier Biot
On Thu, Dec 20, 2012 at 12:59 PM, Eluze elu...@gmail.com wrote:

 shutterfreak wrote
  % Neither override does something:
  \override #'(baseline-skip . 5.8) \box { \override
  #'(baseline-skip
  . 5.8) \line { \with-color #(rgb-color .8 .2 .2) { A . . . . . . . . . .
 .
  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
  .
  . . . . . } } }
  \override #'(baseline-skip . 8) \line { \with-color #red { C Dur.
  {\italic Do majeur.} C major. } }
}
  }
}
  }

 I still maintain that tiny examples help finding the relevant parts - the 2
 lines I quote above are part of a \column (in fact the 1st column you write
 in your example) so I'd guess the \override #'(baseline-skip . 4) just
 after
 the \rounded-box would apply.


Hi Eluze,

I would really love to be able to make smaller examples but in this case my
LilyPond knowledge does not allow me to make the proper judgment call on
what to leave and what not. I tried to recreate a snippet with line-wrapped
text appearing in 3 columns, sandwiched between lines with text. So far I
haven't found any documentation explaining the intricate differences
between \line, \fill-line, \column, \box etc that would allow me to reduce
my problem to a meaningful small snippet.

It would be extremely helpful if there were something in the documentation
about what I would call the box model, similar to how it is available in
XHTML and CSS. And that would also include documentation on the obscure
connection between for instance \vspace and baseline-skip (as apparently
sometimes one or the other or sometimes both work on a given object).

Best regards, and thanks again a lot for your patience and support in
trying to help me with this problem.

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


Re: Counters in markup (LSR 543) - getcounter addition

2012-12-20 Thread Olivier Biot
On Wed, Dec 19, 2012 at 5:30 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Hi all,

 I propose to extend LSR snippet 543 (counters in markup,
 http://lsr.dsi.unimi.it/LSR/Snippet?id=543) by adding a getcounter
 command that does NOT increment a counter when called (as opposed to the
 current counter command):

 #(define-markup-command (getcounter layout props name) (string?)
   Prints out the value of the given counter named @var{name}.
   If the counter does not yet exist, return 0.
   (let* ((curval (assoc-ref counter-alist name))
  (theval (if (number? curval) curval 0)))
   (interpret-markup layout props
 (markup (number-string theval)


 I hope it will be useful to others as well.


Dear all,

I realize I ran into a known limitation of LSR snippet 543 severely
impairing its usability:
http://lists.gnu.org/archive/html/bug-lilypond/2010-10/msg00144.html

Is there a command to defer / force parsing a command at the parsing
stage (as explained in this October 2010 thread), or is the only option to
replace all calls to \counter with the cumbersome snippet below:

#(set! sequence-number (1+ sequence-number))
b'1^\markup\score-sequence #sequence-number

Best regards,

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


Markup and stencil formatting questions

2012-12-19 Thread Olivier Biot
Dear all,

I cannot seem yet to get certain textual output rendered the way I intend.
Here are the questions I still have:


1. How can I combine header fields without adding whitespace between header
properties? I'm referring to snippets as:

\fromproperty #'header:composer (\fromproperty #'header:opus)

Using \concat doesn't help as it eats ALL white space.


2. Why does a strut have a nonzero width? Can it be used and set to zero?
Maybe it has zero width, but because of some internal processing every
markup element automatically gets white space glued to it (this may explain
my first question in part too).


3. How can I get markup in columns use the font strut dimensions for
correct vertical padding of a paragraph? In the example below, you'll see
that there's an ugly and uncontrollable vertical white space between the
3-column output and the red text, due to using text in the 3 columns with
characters protruding below the baseline or not.


So here comes the rather long self-contained example. Colors are only there
for identifying semantical elements.

%% BEGIN code
\version 2.16.1

% LSR snippet from http://lsr.dsi.unimi.it/LSR/Item?id=368
#(define-markup-command (when-property layout props symbol markp) (symbol?
markup?)
   (if (chain-assoc-get symbol props)
   (interpret-markup layout props markp)
   (ly:make-stencil '()  '(1 . -1) '(1 . -1

% LSR snippet from http://lsr.dsi.unimi.it/LSR/Snippet?id=464
#(define-markup-command (columns layout props args) (markup-list?)
   (let ((line-width (/ (chain-assoc-get 'line-width props
  (ly:output-def-lookup layout 'line-width))
   (max (length args) 1
 (interpret-markup layout props
   (make-line-markup (map (lambda (line)
(markup #:pad-to-box `(0 . ,line-width) '(0
. 0)
  #:override `(line-width . ,line-width)
  line))
   args)

\paper {
  scoreTitleMarkup = \markup {
\column {
  \when-property #'header:piece {
\rounded-box {
  \column {
%\rounded-box
\fill-line {
  % \fill-line 1 (piece title)
  \bold { \justify-field #'header:piece }
  \line { \with-color #blue \fromproperty #'header:composer
(\with-color #(rgb-color 1 .5 0) \fromproperty #'header:opus) }
} % \fill-line 1 (piece title)
\when-property #'header:piece-explanation {
  %
  % (piece explanation)
  % \vspace #.15
  % \rounded-box
  \columns {
\column {
  \wordwrap {
% Deutsch
\wordwrap-field #'header:piece-explanation-de
  }
}
\column {
  \wordwrap \italic {
% Français
\italic { \wordwrap-field #'header:piece-explanation-fr
}
  }
}
\column {
  \wordwrap {
% English
\wordwrap-field #'header:piece-explanation-en
  }
}
  } % \columns
} % \when-property #'header:piece-explanation (piece
explanation)
\when-property #'header:piece-tonality {
  % \rounded-box  {
  % \vspace #.1
  \with-color #red \fromproperty #'header:piece-tonality
}
  }
} % \column
  } % \rounded-box
} % \when-property #'header:piece
\when-property #'header:piece-comment {
  \rounded-box  {
% \vspace #.15
\with-color #magenta \italic { \wordwrap-field
#'header:piece-comment }
  }
}
  } % \column
}


\header {
  composer = Nemo Ignoto
  opus = Opus 3.14
}

pieceStr = N° 25. Minuetto
% \piece \pieceStr
\label #'score13

theMusic = \new StaffGroup 

  \new Staff {
\relative c' {
  \key c \major
  \time 3/4
  \tempo Moderato con moto
  \repeat unfold 10 { c4 c'8. d,16-. e8. f16-. }

  \bar |.
}
  }

  \new Staff {
\relative c {
  \key c \major
  \clef bass
  \repeat unfold 10 { g4- f c }

}
  }



\score {
  \theMusic

  \header {
piece = \pieceStr
piece-tonality = \markup { C Dur. {\italic Do majeur.} C major. }
piece-comment = This is a sample comment.
% {
piece-explanation = 
piece-explanation-de = Wird ganz in der zweiten Position gespielt.
piece-explanation-fr = Jouer entièrement à la 2° position.
piece-explanation-en = Play entirely in the 2nd position.
% }
  }

  \layout {
indent = 0.0\cm
\context {
  \Staff
  \override Fingering#'add-stem-support= ##t
  \override Fingering#'avoid-slur= #'outside
  % \override Fingering#'direction=
#DOWN
 

Counters in markup (LSR 543) - getcounter addition

2012-12-19 Thread Olivier Biot
Hi all,

I propose to extend LSR snippet 543 (counters in markup,
http://lsr.dsi.unimi.it/LSR/Snippet?id=543) by adding a getcounter
command that does NOT increment a counter when called (as opposed to the
current counter command):

#(define-markup-command (getcounter layout props name) (string?)
  Prints out the value of the given counter named @var{name}.
  If the counter does not yet exist, return 0.
  (let* ((curval (assoc-ref counter-alist name))
 (theval (if (number? curval) curval 0)))
  (interpret-markup layout props
(markup (number-string theval)


I hope it will be useful to others as well.

Best regards,

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


Re: Markup and stencil formatting questions

2012-12-19 Thread Olivier Biot
On Wed, Dec 19, 2012 at 5:54 PM, Eluze elu...@gmail.com wrote:

 shutterfreak wrote
  1. How can I combine header fields without adding whitespace between
  header
  properties? I'm referring to snippets as:
 
  \fromproperty #'header:composer (\fromproperty #'header:opus)
 
  Using \concat doesn't help as it eats ALL white space.

 use \hspace #1 between two items


Hey! That apprently works:

\line { \concat { \fromproperty #'header:composer , \hspace #1
\fromproperty #'header:opus } }


I'm scratching my head why it didn't work earlier... I had a string line
NemoIgnoto(Opus3.14) earlier, and now it works!

Many thanks for solving question #1!

Best regards,

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


Re: Markup and stencil formatting questions

2012-12-19 Thread Olivier Biot
On Wed, Dec 19, 2012 at 5:26 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Dear all,

 I cannot seem yet to get certain textual output rendered the way I intend.
 Here are the questions I still have:



 2. Why does a strut have a nonzero width? Can it be used and set to zero?
 Maybe it has zero width, but because of some internal processing every
 markup element automatically gets white space glued to it (this may explain
 my first question in part too).


 3. How can I get markup in columns use the font strut dimensions for
 correct vertical padding of a paragraph? In the example below, you'll see
 that there's an ugly and uncontrollable vertical white space between the
 3-column output and the red text, due to using text in the 3 columns with
 characters protruding below the baseline or not.


I have been playing with text objects and their layout, and it appears to
me that LilyPond always tries to find the smallest possible binding box for
any text. This is understandable from the music score notation point of
view, but for text it makes less sense in my opinion.

The following self-contained snippet illustrates a couple problems:

%% BEGIN Snippet
\version 2.16.1

% LSR snippet from http://lsr.dsi.unimi.it/LSR/Snippet?id=464
#(define-markup-command (columns layout props args) (markup-list?)
   (let ((line-width (/ (chain-assoc-get 'line-width props
  (ly:output-def-lookup layout 'line-width))
   (max (length args) 1
 (interpret-markup layout props
   (make-line-markup (map (lambda (line)
(markup #:pad-to-box `(0 . ,line-width) '(0
. 0)
  #:override `(line-width . ,line-width)
  line))
   args)


\markup {
  \fill-line {
\rounded-box {
  \column {
\box {
  \fill-line {
\bold N° 25. Minuetto
\line { \concat { \override#'(word-space 0)  {\with-color #blue
Nemo Ignoto  ( \with-color #(rgb-color 1 .5 0) Opus 3.14  ) } } }
  }
}
\fill-line {
  \columns {
\box { \wordwrap { n n n n n n n n n n n n n n n n n n n n n n
n n n n n n n n n n n n n n n n n n n n n n n n n n n  } }
\box { \wordwrap { \italic { f n f n f n f n f n f n f n f n f
n f n f n f n f n f n f n f n f n f n f n f n f n  } } }
\box { \wordwrap { . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . .  } }
  }
}
\fill-line {
  \columns {
\box { \justify { n n n n n n n n n n n n n n n n n n n n n n n
n n n n n n n n n n n n n n n n n n n n n n n n n n  } }
\box { \justify { \italic { f n f n f n f n f n f n f n f n f n
f n f n f n f n f n f n f n f n f n f n f n f n  } } }
\box { \justify { . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . .  } }
  }
}
\line {
  \columns {
\box { \wordwrap { \with-color #(rgb-color 1 .5 0) {n n n n n n
n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n n
n n n n n } } }
\box { \wordwrap { \italic { f n f n f n f n f n f n f n f n f
n f n f n f n f n f n f n f n f n f n f n f n f n  } } }
\box { \wordwrap { . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . .   } }
  }
}
\box { \line { \with-color #(rgb-color .8 .2 .2) { A . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . } } }
\line { \with-color #red { C Dur. {\italic Do majeur.} C major. } }
  }
}
  }
}
%% END Snippet

The boxes in the example above are only meant to show the bounding box of
all text objects.

Issue 1: vertical alignment of texts is ugly: the baseline-skip property
applies only within lines of the same line-wrapped text, apparently not
necessarily between different units of text.

Issue 2: use of \column pushes LilyPond to squeeze the 2-dimensional blobs
in the smallest space possible, \line or \fill-line with any \column text
will only extend to the highest / lowest bounding box within that row
(line).

Issue 3: \fill-line and \line (and \columns) apparently use different left
margin paddings: see the 3 lines containing 3-column text.

I illustrated some of the problems with blue lines on the attached PNG
image for clarity.

At this point I do not know how to proceed.

Best regards,

Olivier
attachment: LilyPond 2.16.1 text alignment.png___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Resolving cannot resolve rest collision: rest direction notsetwarnings

2012-12-19 Thread Olivier Biot
On Wed, Dec 19, 2012 at 7:34 PM, Reinhold Kainhofer
reinh...@kainhofer.comwrote:

 On 19/12/2012 17:04, David Kastrup wrote:
  Finding even obvious things in the documentation isn't always easy if
  you don't already know what to look for. As I had spent some time
  earlier looking for this and not found it, I can only state that it
  wasn't also terribly easy for me to find either.
  So how could this have been made easier?

 Does an AJAX search field (currently simply greps through the index)
 help in this regard (the input field in the upper left corner):

 http://kainhofer.com/~lilypond/Documentation/notation/

 Without that field I would be totally lost in the notation manual.
 Please note that this version of the manual is just my personal nightly
 build on my server, and in no way official (and thus should not be used
 in the future for posting URLs as pointer to questions here)


Many thanks Reinhold, as this really helps me A LOT!

It's very hard to find your way in the current documentation since you have
no clue where to start when beginning with LilyPond, and there's really a
lot of material to study.

I bookmarked your AJAX search and would love it if this would make it on
the main LilyPond documentation site - if possible (bandwidth and system
resources permitting).

Best regards,

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


Re: Markup and stencil formatting questions

2012-12-19 Thread Olivier Biot
On Wed, Dec 19, 2012 at 11:09 PM, Eluze elu...@gmail.com wrote:

 shutterfreak wrote
  2. Why does a strut have a nonzero width? Can it be used and set to zero?
  Maybe it has zero width, but because of some internal processing every
  markup element automatically gets white space glued to it (this may
  explain
  my first question in part too).

 you can find the definition of strut in define-markup-commands.scm

 the description says: /Create a box of the same height as the space in the
 current font/


Thank you for this pointer!

So it is *not* the maximum vertical extent above / below the baseline for a
given font? I made a wrong assumption here - I'm remembering my LaTeX and
TeX days...

maybe using \null iso \strut is what you want!?


I don't know, all I wanted was to fix the baseline skips at start and end
of line-wrapped text sections by adding this construct at start and end
of each text section. Probably this is not eh way to go.

btw - if you reduce your examples to really tiny examples demonstrating only
 one questionable item it's easier to find answers.


I didn't want to spam the list with too many parallel and related requests.
I'll try to follow your recommendation in the future.

Best regards,

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


Re: Writing to the console (debug info)

2012-12-18 Thread Olivier Biot
On Sat, Dec 15, 2012 at 9:45 AM, Federico Bruni fedel...@gmail.com wrote:

 Il 15/12/2012 00:39, Olivier Biot ha scritto:

  I'm running LilyPond either directly or from Frescobaldi. I'm not sure I
 can set the -v flag in Frescobaldi.


 In Frescobaldi you can choose the verbose output option in the custom run


Hi Federico,

I could not find where this can be set. There's no custom run
configuration setting on my version (2.0.8) of Frescobaldi.

Best regards,

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


Re: Writing to the console (debug info)

2012-12-18 Thread Olivier Biot
On Dec 14, 2012 6:39 PM, Olivier Biot olivier.b...@gmail.com wrote:

 Hi all,

 Is there a way to write text to the console in LilyPond?

 I'd like to display the file currently processed to keep track of
problems on a 60 part etude

On Sat, Dec 15, 2012 at 7:40 AM, Mark Witmer m...@markwitmer.com wrote:

 You can do that with Scheme.  I don't know if there's a LilyPond command
 for it.

 #(display your object here) will display what you give it, either a
 plain string or an expression. The results aren't always totally useful
 (give it a \paper{} block, for example, and it will just say #Output_def)
 but that's a start. #(newline) will move to the next line if you want
 cleaner output.

 There's also a procedure called 'format' that is more like printf.


 http://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/Formatted-Output.html#index-format-3918

 -Mark


Hi Mark,

Thank you for this pointer!

I tried using the Guile display method as follows at the top of my
LilyPond input file:

pieceStr = N° 1.
#(display (string-append [i] Converting Kummer Op 125  pieceStr))

In this case, the output shows up at the end of processing the file:
%%% begin log
Starting lilypond.exe 2.16.1 [01.ly]...

Processing `C:/Users/Olivier/Dropbox/Music/Kummer op.
125/LilyPond/attempt2/parts/01.ly'

Parsing...

Interpreting music...[8][16]

Preprocessing graphical objects...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Layout output to `01.ps'...

Converting to `./01.pdf'...

[i] Converting Kummer Op 125 N° 1.

Success: compilation successfully completed

Completed successfully in 2.2.

%%% end log

Whereas if I use 'ly:warning instead of display as follows:

#(ly:debug (string-append [i] Converting Kummer Op 125  pieceStr))

The debug statement appears before parsing, which is more useful to me:

%%% begin log
Starting lilypond.exe 2.16.1 [01.ly]...

Processing `C:/Users/Olivier/Dropbox/Music/Kummer op.
125/LilyPond/attempt2/parts/01.ly'

Parsing...

warning: [!] Converting Kummer Op 125 N° 1.

Interpreting music...[8][16]

Preprocessing graphical objects...

Finding the ideal number of pages...

Fitting music on 1 page...

Drawing systems...

Layout output to `01.ps'...

Converting to `./01.pdf'...

Success: compilation successfully completed

Completed successfully in 2.1.

%%% end log

There's apparently also a ly:debug method but I can't get it to diusplay
anything, probably there's a way to set the debug loglevel in Guile but I
didn't manage to find yet how to do so.

Best regards,

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


Re: zigzag staffline

2012-12-18 Thread Olivier Biot
On Tue, Dec 18, 2012 at 4:25 PM, David Kastrup d...@gnu.org wrote:

 Paul Morris p...@paulwmorris.com writes:

  Hi Gagi,
 
  On Dec 18, 2012, at 5:35 AM, Gagi Petrovic m...@gagipetrovic.nl wrote:
 
  Dear Ponders, i'm working on a composition where i'm in need of a
  custom 3-lined-staff with a zigzagged (like the glissando style, see
  attachment) middle line. Is it possible to make a small adjustement
  to the code below, or should i start doing some serious tweaking?
  Any pointers are well appreciated. Thank you very much in advance!
 
  I don't have any suggestions beyond the colored line snippet that
  David already mentioned (see below).  I once got this advice about
  dashed lines:
 
  It may be possible to get dashed lines by writing a stencil in Scheme
  and overriding it in. But you'd have to locate which stencil draws the
  lines, study the C++ code, and write Scheme to do the same thing with
  some extra options.

 Dashed lines can be done using something like

 \markup \pattern #60 #X #1 \draw-line #'(0.5 . 0)


How about using PostScript commands for creating the zigzag pattern?

I'm thinking in terms of repeating the following PostScript commands as a
stencil:

x y 2 / rlineto
x -y rlineto
x y 2 / rlineto

In this code, x is the x step increment of the zigzag, and y the y step
increment, in case you want to tweak the zigzag appearance.

I only do not know yet how to add the PostScript in a stencil.

Best regards,

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


Writing to the console (debug info)

2012-12-14 Thread Olivier Biot
Hi all,

Is there a way to write text to the console in LilyPond?

I'd like to display the file currently processed to keep track of problems
on a 60 part etude.

Best regards,

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


Re: Displaying string number above fingering

2012-12-14 Thread Olivier Biot
On Wed, Dec 12, 2012 at 10:25 AM, David Kastrup d...@gnu.org wrote:

 Keith OHara k-ohara5...@oco.net writes:

  Eluze eluzew at gmail.com writes:
 
  maybe this could be merged into
  https://code.google.com/p/lilypond/issues/detail?id=2830
 
  That issue is about fingering and string numbers inside chord brackets
 ,
  documenting how the order of input works together with script-priority
 
  d-1\28( e-\thumb\1 d-1\2)
  b-2\1( a-\thumb\2 g-1\3)
 
  articulations coming earlier in the input are printed closer to the
  note.

 New_fingering_engraver

  The irregular behavior Oliver sees occurs when there is no  chord
  indication.

 Fingering_engraver

  I think it is a separate bug, but I am confused right now.  There are
  two or three separate pieces of code setting fingerings and scripts
  according to different combinations of rules, some similar to what
  Nick posted just now.  (Too many people write new code without looking
  at the existing code first.)

 Outside of chords, articulations with an event listener are funneled off
 rhythmic events and just announced at the same time.  Inside of chords,
 they remain stuck on the individual rhythmic events which are then
 passed to the New_fingering_engraver in some manner.

  Then there is the problem \thumb is different than other fingerings...

 We should likely try doing something about that, though.


Thanks!

By the way, for cello:
1. \open means open string
2. \0 (finger zero) sometimes is used as a synonym for open string
3. \flageolet means touch the string at the flageolet position - often
played with the 3rd finger; in this case, the flageolet mark resides
closest to the note head, then the finger number
4. \thumb means played with the thumb. I suspect that it might be
combined with the flageolet sign to distinguish between stopping the string
(pressing it against the fingerboard) and touching the string with the
thumb at the desired flageolet position (typically one octave above the
open string, i.e., at the half string length a.k.a. first thumb position).
4. \harmonic is used for playing artificial harmonics by stopping the
string at a given note and touching the remainder of the string to excite
the desired harmonic (e.g. a fourth above the stopped note). The harmonic
sign can be accompanied by a finger number.

I have a strong suspicion that the same applies to other bowed string
instruments, but I can't state this with full confidence since I'm only
familiar with cello (playing) and violin/viola/double bass from reading
their sheet music.


   It seems if we give Fingerings and StringNumbers different
  script-priorities by default, as David suggested, it would render a
  lot of this (buggy) code moot.

 I am not sure this would cure the double-engraver scenario, but it might
 make some sense trying to at least make both engravers use the same kind
 of tie-breaking in comparable situations.


The main problem I see is that /maybe/ some articulations behave
differently for different instruments. The most remarkable example being
the classical guitar (with p/i/f/a fingering) versus cello.

How about creating a system similar to the drumset definition for assigning
the proper per instrument priorities to these scripts?

Best regards,

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


Re: Writing to the console (debug info)

2012-12-14 Thread Olivier Biot
On Sat, Dec 15, 2012 at 12:20 AM, Eric Pancer epan...@gmail.com wrote:

 On Dec 14, 2012, at 17:05, Olivier Biot olivier.b...@gmail.com wrote:

  Hi all,
 
  Is there a way to write text to the console in LilyPond?
 
  I'd like to display the file currently processed to keep track of
 problems on a 60 part etude


 Use a -v flag when running it in Terminal.



Hi Eric,

I'm running LilyPond either directly or from Frescobaldi. I'm not sure I
can set the -v flag in Frescobaldi.

Is there really no way to display something directly to the console, e.g.
as in the C function:

fprintf(stderr, Processing %s\n, fileName);

Best regards,

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


Re: Music teachers happy to hear about LilyPond

2012-12-11 Thread Olivier Biot
Over here (Belgium) LilyPond is not as well known as MuseScore. Other
popular (paid) software are Sibelius and Finale.

I have to agree that even with my software development background and
TeX/LaTeX experience I find the learning curve of LilyPond rather steep.
But the path is very rewarding. I can't find a faster AND better way to
recreate a lost 60-page document than doing it with LilyPond. The knowledge
shared by the community is an invaluable complement to the extensive yet
sometimes awkward documentation available on the website.

Without the very active participation of the Herders of the LilyPond
Memory in the LilyPond mailing lists I think many would not have found
their way.

Many thanks,

Olivier


On Tue, Dec 11, 2012 at 10:28 PM, Noeck noeck.marb...@gmx.de wrote:

 Hi again,

 some more thoughts that came up during the preparation of this teachers’
 meeting:

 - The LilyPond website could be a bit more enthusiastic about the
 features of LilyPond. Many proprietary programs have a shiny *list of*
 *features* with images on their site and LilyPond could attract more
 users by the fact that almost everything is possible. I hear quite often
 from new LilyPond users: Is this possible with LilyPond? (And most
 often it concerns the most basic features you can think of.)
 The examples page is quite nice but could be enhanced nonetheless. Like
 http://lilypond.org/doc/v2.16/Documentation/changes-big-page
 but not only the changes and less technical.
 For me it is the first thing I want to know from a previously unknown
 software: What can I do with it? What are the features?

 - *Mutopia* is often referenced as a showcase. The idea and the starting
 point is good but LilyPond can do much better by now and many examples
 on mutopia lack the quality that could be achieved with LilyPond.

 - Presentation *slides* that introduce LilyPond could be shared.

 Still happy that this software is appreciated,
 Joram

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

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


Artificial harmonics and MIDI output

2012-12-11 Thread Olivier Biot
Hi all,

When adding artificial harmonics in a music score, the stopped note and the
artificial harmonic are written in a chord construct, as in:

e-\thumb a-\harmonic-3

However, the MIDI output, even with articulate.ly, will render both the
stopped note AND the actual harmonic, whereas in this situation one
obviously wants only to hear the harmonic.

How can this be easily achieved? Is there a way to mute the MIDI channel
for one or a number of notes?

Best regards,

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


Displaying string number above fingering

2012-12-11 Thread Olivier Biot
Hi all,

How can I display the string number above fingerings in all cases?

Here's a small snippet that will semi randomly arrange fingerings and
string numbers:

%%% BEGIN snippet
\version 2.16.1

theMusic = \new Staff \with {midiInstrument = #cello} {
  \relative d {
\key c \major
\time 3/4
\clef bass

d8-1-\2 ( e-\thumb-\1 d-1-\2 )
b-2-\3 ( a-\thumb-\2 g-1-\3 )  |% 11
a ( b-2 a ) e4-2-\4 d8-\thumb-\3  |% 12
  }
}

\score {
  \theMusic
  \layout {}
}
%%% END snippet

Best regards,

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


Re: Displaying string number above fingering

2012-12-11 Thread Olivier Biot
On Wed, Dec 12, 2012 at 12:37 AM, Nathan when.possi...@gmail.com wrote:

 \override StringNumber #'script-priority = #150


Hi Nathan,

Many thanks, as this was precisely what I was looking for!

Best regards,

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


Re: Tuplet bracket collides with fingering when slurred

2012-12-10 Thread Olivier Biot
On Tue, Dec 4, 2012 at 7:47 PM, Eluze elu...@gmail.com wrote:

 shutterfreak wrote
  Dear all,
 
  As a follow-up, here's another snippet featuring the same or similar
  behavior. I haven't found the way to solve this problem yet.
 
  % BEGIN snippet 2
  \version 2.16.1

 this is a known bug - see

 https://code.google.com/p/lilypond/issues/detail?id=1642q=tuplet%20fingeringcolspec=ID%20Type%20Status%20Stars%20Owner%20Patch%20Needs%20Summary


Thanks for confirming that this is an outstanding bug.


 as workarounds you'll find (change the numbers to fit)

 \override Fingering #'staff-padding = #8
 \override TupletBracket #'padding = #9
 (and more)

 which you can \revert later


Thanks! Is there somewhere a place where I can find the relevant
documentation for these parameters?

Best regards,

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


Re: Tuplet bracket collides with fingering when slurred

2012-12-10 Thread Olivier Biot
On Thu, Dec 6, 2012 at 11:34 PM, Thomas Morley 
thomasmorle...@googlemail.com wrote:

 2012/12/6 Thomas Morley thomasmorle...@googlemail.com:

%% Using a value  250 will place the DynamicText *inside* the
 %% TupletBracket, depends on what you want.
 \override TupletBracket #'outside-staff-priority = #250


Thank you once again Thomas!

Is there some documentation available about this parameter?

Does it also control slurs so they appear outside the tuplet brackets?

Best regards,

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


Repeats with alternative endings and MIDI

2012-12-09 Thread Olivier Biot
Hi all,

I am typesetting a 2-staff cello etude with a volta with alternative
endings.

I am following the instructions from the documentation:
http://lilypond.org/doc/v2.16/Documentation/notation/repeats-in-midi
(I.e., write all repeats and voltas in all staffs)

And I am using articulate.ly as in the documentation:
http://lilypond.org/doc/v2.16/Documentation/notation/the-articulate-script

However I can't get the MIDI to do what is expected.

Here's a relevant snippet:

%%% BEGIN
\version 2.16.1

theMusic = \new StaffGroup 
  \new Staff \with {midiInstrument = #cello} {
\relative c {
  \key c \major
  \time 4/4
  \tempo Cantabile
  \clef bass
  \repeat volta 2 {
c-4 e-12-\p  { g'4.-4 ( f8 ) } \\ { b,2-3 } | % 1
c!-2 fis-14  { g'2-4 ( f4 ) } \\ { b,-3 a2-1 } | % 11
  } \alternative {
{ c-2 a'-12 ( b g'4 ) r| } % 12
{  { c'8-4 ( a-1 e-1 cis-3 ) g' ( d ais'-2 b-3 ) } \\ { g,2 g }
| } % 13
  }
   { c'8 ( a! e cis ) g' ( d ais' b  ) } \\ { g,2 g } |
% 14 ( = 13)
  g f'!8-\f b'-3 ( d-3-\flageolet ) g,, f' ( gis-1 f'-2 ) b'-3 (
d-3-\flageolet ) gis,,-1 f'-2| % 15
  \bar |.
}
  }

  \new Staff \with {midiInstrument = #cello} {
\relative g, {
  \key c \major
  \clef bass
  \repeat volta 2 {
 { g4 ( c ) d ( g, ) } \\ { c,2 g'4 s } | % 1
d2 d| % 11
  } \alternative {
{  { fis'8 ( d e fis ) } \\ { g,2 }  g g'8 ( g f! d ) }
| % 12
{ e'4 ( c8 a ) b4 ( d8 g ) }| % 13
  }
  e4 ( c8 a ) b4 ( d8 g )| % 14 (= 13)
  b r r b ( b ) r r b| % 15
}
  }




\score {
  \theMusic

  \layout {
\context {
  \Staff
  \override Fingering #'add-stem-support = ##t
  \override Fingering #'avoid-slur = #'outside
  \override TupletBracket #'bracket-visibility = ##t
}
  }
}

\include articulate.ly
\score {
  \unfoldRepeats \articulate  \theMusic 
  \midi {}
}
%%% END

If you wonder why I import articulate.ly at the end, it's because of some
strange side-effect it has on music expressions even without calling the
articulate command, which I posted in another thread:
http://lilypond.1069038.n5.nabble.com/Unexpected-side-effect-of-articulate-ly-on-aftergrace-tp137289.html

Best regards,

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


Re: Repeats with alternative endings and MIDI

2012-12-09 Thread Olivier Biot
On Sun, Dec 9, 2012 at 11:51 AM, Eluze elu...@gmail.com wrote:

 Federico Bruni-5 wrote
 
  The problem is not with articulate.ly

 it's the barcheck - if it is outside the alternatives' brackets it is
 counted as an alternative!

 Eluze


Many thanks! I completely overlooked the barcheck symbols in the 2nde staff
volta alternatives!

Best regards,

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


Re: Unexpected side-effect of articulate.ly on aftergrace

2012-12-09 Thread Olivier Biot
On Sun, Dec 9, 2012 at 11:55 AM, Federico Bruni fedel...@gmail.com wrote:

 Il 07/12/2012 00:18, Olivier Biot ha scritto:

 Dear LilyPond users,

 I just came across a weird interaction between articulate.ly
 http://articulate.ly and aftergrace.

 If I include articulate.ly http://articulate.ly then beamed

 aftergrace notes have a tenuto articulation and are not rendered
 smaller, even though I never called the \articulate macro.


 Yes, confirmed.


Thank you for confirming this.


 Is there a known fix for this problem?


 Placing the include after notes and just before using \articulate, as
 you've found out :)
 You may have share it in this thread to help others.

 The documentation page about Articulate should be improved, there's an
 open issue:
 http://code.google.com/p/**lilypond/issues/detail?id=2877http://code.google.com/p/lilypond/issues/detail?id=2877

 I'll ask to add some information about this problem.


Thank you Federico!

The problem I have, is that I am rendering the score AND the MIDI output
from 60 etudes stored in 60 individual files included from the master file.
I only include articulate.ly once when I build the entire etude book. So
the proposed fix will not work in my case :(

Best regards,

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


Re: Slurs, phrasing slurs and fingering

2012-12-08 Thread Olivier Biot
Dear all,

I am now aware of the \shape + list of control point offsets tweak thanks
to this thread, but are there always 4 control points?

I am also aware of yet another tweak: \once \override Slur #'positions (as
in
http://lilypond.org/doc/v2.16/Documentation/learning/fixing-overlapping-notation
)

Where can I find the documentation and explanation for tweaking the shape
of slurs and phrasing slurs?

Best regards,

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


Re: Slurs, phrasing slurs and fingering

2012-12-08 Thread Olivier Biot
Hi David,

http://lsr.dsi.unimi.it/LSR/Item?id=748 gave me exactly the answer I needed
for the positions tweak.

And the v2.17 documentation pointer you provided gave exactly the
information I needed for understanding how to tweak a slur.

Many thanks!

Best regards,

Olivier




On Sat, Dec 8, 2012 at 6:19 PM, David Nalesnik david.nales...@gmail.comwrote:

 Hi Olivier,

 On Sat, Dec 8, 2012 at 10:31 AM, Olivier Biot olivier.b...@gmail.com
 wrote:
  Dear all,
 
  I am now aware of the \shape + list of control point offsets tweak
 thanks to
  this thread, but are there always 4 control points?

 Yes.  TupletBracket used to have a 'control-points property that set
 two control points, but that is no longer the case.

 
  I am also aware of yet another tweak: \once \override Slur #'positions
 (as
  in
 
 http://lilypond.org/doc/v2.16/Documentation/learning/fixing-overlapping-notation
 )
 
  Where can I find the documentation and explanation for tweaking the
 shape of
  slurs and phrasing slurs?

 The \shape function is documented in the 2.17 documentation here:
 http://lilypond.org/doc/v2.17/Documentation/notation/modifying-shapes

 As far as 'positions, this snippet might be helpful to you:
 http://lsr.dsi.unimi.it/LSR/Item?id=684

 You can also do a displacement of 'positions values using this snippet:
 http://lsr.dsi.unimi.it/LSR/Item?id=748

 Note that you can override 'positions first to get a reasonable
 approximation of the slur you want, and then use \shape to fine-tune
 it.  (You won't be able to use snippet 748 with \shape though.)

 Hope this helps,
 David

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


Unexpected side-effect of articulate.ly on aftergrace

2012-12-06 Thread Olivier Biot
Dear LilyPond users,

I just came across a weird interaction between articulate.ly and aftergrace.

If I include articulate.ly then beamed aftergrace notes have a tenuto
articulation and are not rendered smaller, even though I never called the
\articulate macro.

Here's the LilyPond 1.16.1 code for reproducing the issue - comment the
include statement to see the difference:

% BEGIN code
\version 2.16.1

\include articulate.ly

theMusic = \new Staff {
  \relative c' {
\key g \major
\time 4/4
\clef bass
c4 \startTrillSpan ( b a \afterGrace g4-2 ) { fis16 [ g ]
\stopTrillSpan }| % 13
c,1
  }
}

\score {
  \theMusic

  \layout {
\context {
  \Staff
  \override Fingering #'add-stem-support = ##t
  \override Fingering #'avoid-slur = #'outside
  \override TupletBracket #'bracket-visibility = ##t
}
  }
}
% END code

Is there a known fix for this problem?

BEst regards,

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


Re: Slurs, phrasing slurs and fingering

2012-12-05 Thread Olivier Biot
Many thanks for the help and for the extra clarifications regarding usage
of these tweaks.

Best regards,

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


Re: Tuplet bracket collides with fingering when slurred

2012-12-04 Thread Olivier Biot
Dear all,

As a follow-up, here's another snippet featuring the same or similar
behavior. I haven't found the way to solve this problem yet.

% BEGIN snippet 2
\version 2.16.1

theMusic = \new Staff {
  \relative d' {
\clef bass
\key g \major
\time 2/4
\times 4/6 { g,,16 ( b' g' )  g ( b, g, )c,--\f ( e'-3 c'-4 )  c (
e, c, ) }   | % Test 1: sextuplets
\times 2/3 { g'16 ( b' g' )  g ( b, g, ) } \times 2/3 { c,--\f ( e'-3
c'-4 )  c ( e, c, ) }  | % Test 2: triplets
  }
}

\score {
  \theMusic

  \layout {
\context {
  \Staff
  \override Fingering #'add-stem-support = ##t
  \override Fingering #'avoid-slur = #'outside
  \override TupletBracket #'bracket-visibility = ##t
}
  }
}
% END snippet 2

Best regards,

Olivier


On Fri, Nov 23, 2012 at 10:58 PM, Olivier Biot olivier.b...@gmail.comwrote:

 Dear LilyPond users,

 How can I avoid the tuplet bracket colliding with fingerings in case the
 tuplet has a slur?

 Example of tuplet without and with slur, illustrating the problem:


 % BEGIN
 \version 2.16.1

 \score {

   \new Staff {
 \relative c, {
   \key g \major
   \time 2/4
   \clef bass
   \times 2/3 { c16--\f e'-3 c'-4  c e, c,  }
   \times 2/3 { c16--\f ( e'-3 c'-4 )  c ( e, c, ) }
 }
   }

   \layout {
 \context {
   \Staff
   \override Fingering #'add-stem-support = ##t
   \override Fingering #'avoid-slur = #'outside
   \override TupletBracket #'bracket-visibility = ##t
   \override TupletBracket #'avoid-slur = ##t
   \override TupletNumber #'avoid-slur = ##t
 }
   }
 }
 % END

 Is this related to the following issue?
 http://code.google.com/p/lilypond/issues/detail?id=2397

 Best regards,

 Olivier

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


Re: Slurs, phrasing slurs and fingering

2012-12-02 Thread Olivier Biot
On Sun, Dec 2, 2012 at 2:16 AM, Nick Payne nick.pa...@internode.on.netwrote:

 On 02/12/12 10:46, Olivier Biot wrote:

 Hi all,

 Is there a simple way to avoid fingerings from being overwritten with a
 phrasing slur, like in the following measure?

 % BEGIN
 \version 2.16.1

 theMusic = \new Staff {
   \relative d' {
 \key f \major
 \time 3/4
 \clef bass
 \acciaccatura { e-\! } d4  cis8-\ \( ( a'16-.-3 ) a-.-\! \)
   }
 }

 \score {
   \theMusic

   \layout {
 \context {
   \Staff
   \override Fingering #'add-stem-support = ##t
   \override Fingering #'avoid-slur = #'outside
   \override TupletBracket #'bracket-visibility = ##t
 }
   }
 }
 % END

 The following directive works for regular slurs:
   \override Fingering #'avoid-slur = #'outside
 However, phrasing slurs seem to be immune to this ovverride...


 As (in this case) the slur and phrasing slur overlap even without the
 fingering, you might as well shape the phrasing slur to avoid both the slur
 and fingering.


 [snip]
 \acciaccatura { e-\! } d4 \shape #'((0 . 1) (0 . 1.8) (0 . 1.8) (0 .
 0)) PhrasingSlur
 [/snip]


Hello Nick,

Thank you for your reply!

I had to invert the control point list and the PhrasingSlur string in your
solution to make it work, as in:

\acciaccatura { e-\! } d4 \shape PhrasingSlur #'((0 . 1) (0 . 1.8) (0 .
1.8) (0 . 0))


With that fix, the problem was entirely solved! Many thanks!!!

I really need to dig into these bezier/spline control point tweaks.

Best regards,

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


Slurs, phrasing slurs and fingering

2012-12-01 Thread Olivier Biot
Hi all,

Is there a simple way to avoid fingerings from being overwritten with a
phrasing slur, like in the following measure?

% BEGIN
\version 2.16.1

theMusic = \new Staff {
  \relative d' {
\key f \major
\time 3/4
\clef bass
\acciaccatura { e-\! } d4  cis8-\ \( ( a'16-.-3 ) a-.-\! \)
  }
}

\score {
  \theMusic

  \layout {
\context {
  \Staff
  \override Fingering #'add-stem-support = ##t
  \override Fingering #'avoid-slur = #'outside
  \override TupletBracket #'bracket-visibility = ##t
}
  }
}
% END

The following directive works for regular slurs:
  \override Fingering #'avoid-slur = #'outside
However, phrasing slurs seem to be immune to this ovverride...

Best regards,

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


Re: Appoggiatura help

2012-11-29 Thread Olivier Biot
Hi,

First, I suppose the last note in that 5/16 measure should be a fis8 and
not a fis4, otherwise the measure should last 9/16 and not 5/16.

I tried entering this in MuseScore. The default grace note gets no slur,
adding a slur without modifying a thing yields the result in measure 1,
inverting the orientation of the grace note slur yields the result in
measure 2 of attached image. No other tweaks were done in MuseScore.

In this case I think the slurring algorithm in LilyPond could be improved
by using different anchor points.

Just my 2 cents.

Best regards,

Olivier


On Thu, Nov 29, 2012 at 8:02 PM, SoundsFromSound
soundsfromso...@gmail.comwrote:

 Nick Payne-3 wrote
  On 29/11/12 18:32, SoundsFromSound wrote:
  Hello,
 
  Is there a way to flip the grace note/appoggiatura marking so it's above
  the
  note, instead of where it is now?  It's all messy and overlapping; I'd
  like
  to move it to be above the notes.
 
  If you mean the slur, use \once \override Slur #'direction = #UP
  \appoggiatura etc...
 
  ___
  lilypond-user mailing list

  lilypond-user@

  https://lists.gnu.org/mailman/listinfo/lilypond-user

 Hmm...I tried the fix you suggested and while it did work, it still looks a
 bit off.  If you were inputting this piece for a final copy, how would
 you
 settle on slurring of these notes so it looks best?

 Thanks,
 Ben

 (see image)

 above_fix.jpg
 http://lilypond.1069038.n5.nabble.com/file/n136998/above_fix.jpg




 -
 composer | sound designer
 --
 View this message in context:
 http://lilypond.1069038.n5.nabble.com/Appoggiatura-help-tp136978p136998.html
 Sent from the User mailing list archive at Nabble.com.

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

attachment: MuseScore example.jpg___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Note duration line (contemporary)

2012-11-29 Thread Olivier Biot
On Thu, Nov 29, 2012 at 6:58 PM, Matthew Probst matt...@yak.org wrote:

 I find myself wishing for an O'Reilly style book Hacking Lilypond.  The
 user guide and the reference are fine as is, but a book with some extended
 examples of how to _architect_ solutions in Lilypond would be great.


So do I!

But the mailing list archives, the LSR and the documentation are already
very close to this. LilyPond is also evolving quickly, so the book would be
outdated soon I guess.


This discussion list and all helpful contributions therein are an
invaluable resource to me.

Best regards,

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


Expanding bowed arpeggios

2012-11-24 Thread Olivier Biot
Hi all,

Sometimes arpeggios are written as chords to avoid repetitive and lengthy
arpeggio expansions in a written score.

However, is there a way in LilyPond to transform chords into bowed arpeggio
expansions, as illustrated in the example below (first bar = input, 2nd bar
= automatically generated expansion based on input)?

% BEGIN
\version 2.16.1

\score {
  \new Staff {
\relative c, {
  \key c \major
  \time 4/4
  \clef bass
  \set fingeringOrientations = #'(right)
  c-0 g'-0 e'-1 c'-22-\p^\markup{input} c g' f'-2 d'-42 |
  c16-0-\p^\markup{output} ( g'-0 e'-1 c'-2 )  c ( e, g, c,)c ( g'
f'-2 d'-4 )  d ( f, g, c,)
}
  }
}
% END

Best regards,

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


Re: vspace with non-integer argument does not work

2012-11-24 Thread Olivier Biot
On Sat, Nov 24, 2012 at 1:25 AM, Thomas Morley 
thomasmorle...@googlemail.com wrote:

 2012/11/24 Olivier Biot olivier.b...@gmail.com:
  Hi all,
 
  Is it possible to specify non-integer values for vertical spacing with
  vspace? I read once that it was possible, but apparently not (anymore) in
  version 2.16.0 or 2.16.1.

 vspace works with integers: \vspace #1 etc
 numbers: \vspace #1.23
 (even \vspace #(* 4 (atan 1)) is valid input)
 and fractions: \vspace #1/2


Okay, good to know :-)

 The following does compile without errors but the non-integer values are
  apparently silently transformed into 1

 No, don't forget that the \center-column-command uses a baseline-skip
 with value 3
 Very little divergations (0.01 or 2/300) will hardly be noticeable.


And this is something I was unaware of. I now re-read the documentation of
center-column and indeed it states that property baseline-skip is used. I
was not aware of the implication of that note in that section. Boxing the
texts and setting baseline-skip to zero

I'll have to reread the entire documentation now :-)

Many thanks again Thomas!

Best regards,

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


Tuplet bracket collides with fingering when slurred

2012-11-23 Thread Olivier Biot
Dear LilyPond users,

How can I avoid the tuplet bracket colliding with fingerings in case the
tuplet has a slur?

Example of tuplet without and with slur, illustrating the problem:


% BEGIN
\version 2.16.1

\score {

  \new Staff {
\relative c, {
  \key g \major
  \time 2/4
  \clef bass
  \times 2/3 { c16--\f e'-3 c'-4  c e, c,  }
  \times 2/3 { c16--\f ( e'-3 c'-4 )  c ( e, c, ) }
}
  }

  \layout {
\context {
  \Staff
  \override Fingering #'add-stem-support = ##t
  \override Fingering #'avoid-slur = #'outside
  \override TupletBracket #'bracket-visibility = ##t
  \override TupletBracket #'avoid-slur = ##t
  \override TupletNumber #'avoid-slur = ##t
}
  }
}
% END

Is this related to the following issue?
http://code.google.com/p/lilypond/issues/detail?id=2397

Best regards,

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


vspace with non-integer argument does not work

2012-11-23 Thread Olivier Biot
Hi all,

Is it possible to specify non-integer values for vertical spacing with
vspace? I read once that it was possible, but apparently not (anymore) in
version 2.16.0 or 2.16.1.

The following does compile without errors but the non-integer values are
apparently silently transformed into 1:

% BEGIN
\version 2.16.1
\markup {
  \center-column {
This
is
a
\vspace #1
\bold {test}
\vspace #2
And
\vspace #2/300
this
\vspace #.01
too.
\vspace #3
\line {\italic {I think.}}
  }
}
% END

Best regards,

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


Re: Adding 3-column section to score

2012-11-18 Thread Olivier Biot
On Sun, Nov 18, 2012 at 2:34 AM, Thomas Morley 
thomasmorle...@googlemail.com wrote:

 2012/11/17 Olivier Biot olivier.b...@gmail.com:
  Is there a more elegant and less verbose way than the following approach
 to
  add a 3-column section for documenting editorial changes to scores?
 
  %% BEGIN
  \version 2.16.0
 
  % LSR snippet: http://lsr.dsi.unimi.it/LSR/Snippet?id=464
  #(define-markup-command (columns layout props args) (markup-list?)
 [...]

 Hi Olivier,

 I do like this \columns-command and from my point of view it
 _is_elegant and _not_ verbose.


Hi Thomas,

Thanks again for your reply! What I mean, is that centering the section
headers is done differently (and actually, incorrectly, since the section
words have a different length) than arranging the 3 text columns.

I fixed the heading centering by writing this:

%% BEGIN snippet 1
\markup {
  \rounded-box
  \center-column {
% Notes section header:
\huge \bold \columns {
  \column {
\fill-line { \hspace #.1 Bemerkungen \hspace #.1 }
  }
  \column {
\italic { \fill-line { \hspace #.1 Remarques \hspace #.1 } }
  }
  \column {
\fill-line { \hspace #.1 Notes \hspace #.1 }
  }
}

% Notes section header:
% (as in initial message)

% Music annotation:
% (as in initial message)
  }
}
%% END snippet 1

So it is apparently rather difficult to center a text word in a column
where the column width has been fixed (in this case, to 1/3 of the text
width). I need to write the following construct if I want my text centered:

%% BEGIN snippet 2
\column {
  \fill-line { \hspace #.1 Bemerkungen \hspace #.1 }
}
%% END snippet 2


 I'd recommend to store more stuff in variables.


That will require a better understanding of the LilyPond / Guile tandem, as
I'm still used to think in a more traditional way, i.e. in terms of is
there some repetitive task I'm using which could benefit from a method call
instead of writing the same code over and over, but I still lack the
proper Scheme coding skills as well as a better understanding of how the
LilyPond / Guile tandem works.  How would you write a method that takes
e.g. a string literal as input (Bemerkungen) and produces the LilyPond code
to center the text in a column (see snippet 2)? Or should I think in terms
of centering a markup instead of a string literal (e.g. \italic { Remarques
}?

If you prefer a version without \columns you may want to use this:
 [...]
 \markup
\override #'(box-padding . 1)
\rounded-box \center-column {
 \fill-line { \txt¹ \txt² \txt³ }
 \vspace #0.1
 \mus
 }


This brings me to actually another problem I'm bumping into: I still have
difficulties understanding the way \vspace works. Right now it looks like
it's inhereited from TeX (rubber space). Sometimes I want to put a
well-defined nonelastic vertical spacing, but \vspace does not allow this
(try typing \vspace 1\cm). Besides, I see no difference in my output
between \vspace #1 or \vspace #.01.

Finally, it would be great if the \columns macro could provide a way to
specify padding between columns as well as vertical padding between rows,
similar to the way \override #'(box-padding . 1) works for \box.

Best regards,

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


Adding 3-column section to score

2012-11-17 Thread Olivier Biot
Is there a more elegant and less verbose way than the following approach to
add a 3-column section for documenting editorial changes to scores?

%% BEGIN
\version 2.16.0

% LSR snippet: http://lsr.dsi.unimi.it/LSR/Snippet?id=464
#(define-markup-command (columns layout props args) (markup-list?)
   (let ((line-width (/ (chain-assoc-get 'line-width props
  (ly:output-def-lookup layout 'line-width))
   (max (length args) 1
 (interpret-markup layout props
   (make-line-markup (map (lambda (line)
(markup #:pad-to-box `(0 . ,line-width) '(0
. 0)
  #:override `(line-width . ,line-width)
  line))
   args)

\markup {
  \rounded-box
  \center-column {
\huge \bold \fill-line {
  \hspace #1
  Bemerkungen
  \hspace #2
  \italic { Remarques }
  \hspace #2
  Notes
  \hspace #1
}

\normalsize
\columns {
  \column {
\wordwrap { % Deutsch
  \bold {N° 30.} Crantz Ausgabe T. 11: cis \bold { e } gis:
}
  }
  \column {
\wordwrap \italic { % Français
  \bold {N° 30.} Édition Crantz, mesure 11: do dièse  \bold { mi }
sol dièse:
}
  }
  \column {
\wordwrap { % English
  \bold {N° 30.} Crantz Edition, mesure 11: C sharp \bold { E
natural } G sharp:
}
  }
}
% Music annotation
\score {
  \new Staff \with {
\override Fingering #'add-stem-support = ##t
\override Fingering #'avoid-slur = #'outside
\override TupletBracket #'bracket-visibility = ##t
fontSize = #-3
\override StaffSymbol #'staff-space = #(magstep -3)
\override StaffSymbol #'thickness = #(magstep -3)
\remove Time_signature_engraver
  } {
\key fis \minor
\time 4/4
\clef bass
\bar 
\set Score.currentBarNumber = #11
cis2 ~ cis8 cis-. e?-. gis-.
  }
  \layout { ragged-right = ##t }
}
  }
}
%% END

Best regards,

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


Re: unwanted barnumber

2012-11-11 Thread Olivier Biot
On Sun, Nov 11, 2012 at 11:41 PM, Thomas Morley 
thomasmorle...@googlemail.com wrote:

 2012/11/11 shutterfreak olivier.b...@gmail.com:
  While incorporating this code in another score I came across a layouting
  problem: if the tempo name is sufficiently long, then the first measure
  number will be rendered _above_ the tempo indicator.
 
  This problem only occurs when \omitParenthesizedBarNumbers is invoked in
 the
  layout block.

 Hi Olivier,

 try it with:

 omitParenthesizedBarNumbers =
 \override Score.BarNumber #'before-line-breaking =
 #(lambda (grob)
(let* ((text (ly:grob-property grob 'text))
   (text-arg (caadr text))
   (nmbr? (string-number text-arg)))
  (if (not nmbr?)
  (ly:grob-suicide! grob)
  #f)))


 HTH,
   Harm


Hi Thomas,

Thanks again for your help!

Replacing #'after-line-breaking with #'before-line-breaking in
omitParenthesizedBarNumbers did the trick.

Best regards,

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


Re: Lilypond cheat sheet

2012-11-11 Thread Olivier Biot
Hi Joram,

Thank you for the updates cheat sheet.

As a matter of fact I just printed both cheat sheets on one sheet of paper
and laminated it. Two sides of invaluable LilyPond information :-)

Hint 1: use heavier stock paper when printing double sided.
Hint 2: print borderless for printing the other sheet (pale green
background).

Best regards,

Olivier


On Sun, Nov 11, 2012 at 10:45 PM, Noeck noeck.marb...@gmx.de wrote:

 Thank you for all your comments on my cheat sheet[1]!

 I included them and spotted some more. Here are the updated versions of
 the English and the German cheat sheet (in svg and pdf format)[2]:

 http://joramberger.de/files/lilypond_sheet_en.svg
 http://joramberger.de/files/lilypond_sheet_en.pdf
 http://joramberger.de/files/lilypond_sheet_de.svg
 http://joramberger.de/files/lilypond_sheet_de.pdf

 Because there is no script to produce it, but only an svg file, I cannot
 recommend including it in the documentation of LilyPond (just as a
 matter of file size and the reduced diff-ability).

 But, not just because I've made it, but especially from a user's point
 of view, I would suggest to make a link from the documentation to the
 cheat sheets of Reinhold Kainhofer (if he agrees) and me. (Perhaps from
 the bottom of this page:
 http://lilypond.org/doc/v2.16/Documentation/notation/cheat-sheet).

 For me personally it is a great help to have a cheat sheet while writing
 scores with LilyPond and I think many users would welcome it, but they
 would never find my website or Reinhold's. Both for beginners and more
 advanced users these could be useful in addition to the above mentioned
 existing cheat sheet of the documentation.

 Concerning the question how to update it for new versions:
 The documentation is for 2.16 anyway and a link could be removed in case
 it gets outdated. However, I intend to update it to the next stable
 version as soon as that comes out. But I cannot guarantee that for all
 eternity, though.

 Cheers,
 Joram



 [1] I have corrected Lilypond to LilyPond even though I dislike this
 capital P ;)

 [2] The website itself is not there yet, but the files are accessible.

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


Re: 2.16.0 Open string fingering marks have _ and ^ behave as ^

2012-11-09 Thread Olivier Biot
On Fri, Nov 9, 2012 at 2:35 AM, Thomas Morley thomasmorle...@googlemail.com
 wrote:

 Hi again,

 I stumbled across
 http://lsr.dsi.unimi.it/LSR/Item?id=631

 {
 c'_\open^\open
 }

 works.


Thanks again Thomas, I completely forgot about the chord trick for
articulations.

Best regards,

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


Re: 2.16.0 Open string fingering marks have _ and ^ behave as ^

2012-11-06 Thread Olivier Biot
On Tue, Nov 6, 2012 at 12:01 AM, Thomas Morley
thomasmorle...@googlemail.com wrote:
 2012/11/5 Olivier Biot olivier.b...@gmail.com:
 Dear all,

 I think I just found a Lilypond bug.

 The following snippet with fingerings does only show one open string
 fingering while TWO have been written. The order of _ and ^ play no
 role in this bug.

 Expected behavior: both \open fingerings are displayed, one above
 and one below selected note.

[ ...]

 Hi Olivier,

 I'm not sure that it is a bug.

 script-init.ly shows:
 open = #(make-articulation open)

 So \open is an articulation (not a fingering).
 I think a note can be articulated only once in the same manner, so I'd
 _expect_ that one setting is skipped.

 BTW, \open is printed different compared to fingerings. I'd prefer to use 
 d8_0^0

Thank you for this input Thomas. For a cellist I see no distinction
between using finger 0 and using an open string (\open). Technically
the \open macro is an articulation, but I do not know if it should
be seen as an articulation rather than as a fingering. Same with
\flageolet and \thumb...

Right now I replaced \open with 0 in that score snippet so I could
render both fingerings on the score.

This of course raises the question whether there should be a specific
subset of articulations that should behave more like fingerings (I'm
thinking \open, \flageolet and \thumb here). Unless I'm completely
wrong.

 P.S.
 If you think you've detected a bug, you should send it to the bug-list:
 http://lilypond.org/doc/v2.17/Documentation/web/bug-reports.html
 On the user-list it might get lost.

Thank you for pointing me to the bug list!

Best regards,

Olivier

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


2.16.0 Open string fingering marks have _ and ^ behave as ^

2012-11-05 Thread Olivier Biot
Dear all,

I think I just found a Lilypond bug.

The following snippet with fingerings does only show one open string
fingering while TWO have been written. The order of _ and ^ play no
role in this bug.

Expected behavior: both \open fingerings are displayed, one above
and one below selected note.

%%% BEGIN snippet
\version 2.16.0

\score {
  \new Staff \with {midiInstrument = #cello} {
\relative c, {
  \key d \major
  \time 3/4
  \tempo Allegro
  \clef bass
  d8^\open_\open (ees^1_1 e^2_1 f^3_2 fis^1_3 g^2_4)
  gis^3_4 (a^\open_\open bes^1_1 b^2_1 c^3_2 cis^1_3)

  \bar |.
}
  }

  \layout {}
}
%%% END snippet

Best regards,

Olivier

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


Managing the creation of a book with many scores

2012-11-04 Thread Olivier Biot
Dear all,

I ventured into Lilypond in recreating a lost etude book (it can no
longer be ordered for over 50 years).

One of the challenges is to process individual scores without the need
of recreating the entire score book. I first thought that there ought
to be a method like the preprocessor directives used in C, but that
did not work with Scheme apparently.

However, I managed to solve this issue very simply as follows:

1. The book and custom styling macros are located at the same level
folder, the individual parts are located in the parts subdirectory.

2. I created two files named custom-settings.ly in the base
directory of the book and in the parts subdirectory.

3. The custom-settings.ly file in the base directory remains empty.
(Every statement in this file will be executed as many times as there
are parts in the book)

4. The custom-settings.ly file in the parts subdirectory contains
the include directives for the custom code used to produce the book.

5. Each individual part starts with the following directive:
\include custom_settings.ly

6. The input file for the book contains the include statements
containing in parts/custom_settings.ly plus extra code to create the
front page, the table of contents, the book headings (chapters and
sections) and the include statements for the individual parts.

This way, creating the score book will include N times an empty file,
which is okay, and when working on an individual part, the settings
are read from the nonempty file.

Hope this will be useful to others.

Best regards,

Olivier

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


Re: Function for rendering key textually in 3 languages

2012-11-04 Thread Olivier Biot
On Sun, Nov 4, 2012 at 5:06 PM, Thomas Morley
thomasmorle...@googlemail.com wrote:
 2012/11/4 Thomas Morley thomasmorle...@googlemail.com:
 Hi Olivier,

 a)
 If you define a new `scoreTitleMarkup´, you have to _use_ it. :)

 \paper {
 scoreTitleMarkup = \myScoreTitleMarkup
 }

Oops... It's defined in book-titling.ily - I modified it there. I
think I ought to clean up the set of macros I'm using.

 b)
 \fromproperty #'header:piece-tonality will return a stencil not a string.
 So every markup-command or scheme-function requiering a
 string-argument (or tries to deal with the   argument as a string)
 will fail.
 P.e: \markup \simple { \fromproperty #'header:piece-tonality }

 Workaround:
 Use the markup-command/scheme-function _in_ the \header:

 \header {
   piece-tonality = \markup \simple cis-major
 }

This is new to me. I didn't know what was a stencil. Makes sense.
Thanks for clarifying this issue to me.

 c)
 My own approach attached, converting `piece-tonality´ into german,
 french and english.
 Please note: I don't know how double-flat/sharp is called in french,
 so I used double-bémol and double-dièse. Should be easy to alter.

That's excellent! It does exactly what I want! Many thanks for this!
In addition, I'm now exposed to some more builtin Scheme functions and
procedures. I'm still quite new with Scheme, C/Java/PHP would have
been easier on me :-)

 forgot two things:
 (1)
 Please change the second line of the markup-command to:

   (let* ((arg (string-downcase (markup-string text)))

I see: this one makes sure the argument is first transformed into all
lowercase, for the sake of safety.

 (2)
 For testing I added a (commented) scheme-function. It does not work
 with 2.16.0, but needs 17.6.

I'll have to give 17.6 a try then :-)

Again, many, many thanks for your assistance!

Best regards,

Olivier

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


Re: Function for rendering key textually in 3 languages

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 1:09 AM, Olivier Biot olivier.b...@gmail.com wrote:
 On Tue, Oct 30, 2012 at 10:50 PM, Eluze elu...@gmail.com wrote:
 shutterfreak wrote
 Hi all,

 I'd like to have a function to translate a key signature into the
 textual representation of that key in 3 languages.

 For instance, I'd write this in my score:


 and the rendering would look like this:


 The logic I'm trying to implement, is (in pseudo-code):
 1. key format =
 key_name
  [
 accidentals
 ]
 2. IF
 key_name
  is lowercase THEN key is minor ELSE key is major.
 3. If accidentals are added, they pertain to the key name

 How should I proceed?

 I guess you should use some scheme code to

 - create those translations/associations (a table?)
 - concatenate the 3 translated elements
 - include them in your LilyPond code

 if you feel this could be of general interest you should file an enhancement
 request.

 hth
 Eluze

 Hi Eluze,

 I am not yet fluent in Scheme, hence I need some indications in how to 
 proceed.

 It would be extremely helpful if I would know how to e.g. translate
 c+ into C sharp minor and D into D major.

 Best regards,

 Olivier

Dear all,

I definitely have problems with Scheme and LilyPond interpretation. I
now have the Scheme standard open as well.

I tried to simplify the initial job by first creating a function with
one string argument returning either a string or a markup. Does not
work.

I tried hundreds of alternatives, with musoc-function and withj
markup-command, with a define and define-scheme-funciton, to no avail.

Why is the following not working?

%%% BEGIN SNIPPET

\version 2.16.0

#(define-markup-command (tonicEN props layout tonic) ( string? )
(
(cond
( (string=? tonic 'cis) (C sharp) )
( (string=? tonic 'dis) (D sharp) )
)
)
)

\header {
  composer = myself
  title = \tonicEN cis
}

\score {
  \relative c' {
a bes cis deses e fisis ges
  }
  \layout {}
}

%%% END SNIPPET

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


Re: Show (and increment) bar numbers only after a double bar

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 5:42 PM, Thomas Morley
thomasmorle...@googlemail.com wrote:
 2012/11/1 Olivier Biot olivier.b...@gmail.com:
 Hi all,

 Is there a way to display and increment bar numbers only after a double bar?
 [...]

 Hi Olivier,

 why not use RehearsalMark?
[...]
 A function is possible, too:
[...]

 HTH,
   Harm

Hi Thomas,

Many thanks for providing both approaches! I'm learning a lot with
both examples. The simplest approach with rehearsal marks is the one I
am implementing now.

Now I only need to devise a way to emulate the double bar at the start
of each score line.

Best regards,

Olivier

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


Re: Function for rendering key textually in 3 languages

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 5:54 PM, David Kastrup d...@gnu.org wrote:
 Olivier Biot olivier.b...@gmail.com writes:

 I definitely have problems with Scheme and LilyPond interpretation. I
 now have the Scheme standard open as well.

 I tried to simplify the initial job by first creating a function with
 one string argument returning either a string or a markup. Does not
 work.

 I tried hundreds of alternatives, with musoc-function and withj
 markup-command, with a define and define-scheme-funciton, to no avail.

 Why is the following not working?

[...]

 One reason is because markup commands have rather rudimentary argument
 parsing (to make you appreciate the work done on music functions more,
 ha ha) and distinguish only markup, markup list, and Scheme as argument
 type.  A quoted LilyPond string counts only as markup.  And markup
 commands can only be used inside of explicit markup.

 Then you use ( ) where they don't belong.  Remember: those are _not_
 mere grouping constructs but form a list.  And a list of lists is
 something different from a list.  In evaluated contexts (like this is),
 ( ) are a function call.  So you try calling C sharp as a function
 (which does not work) and call the result of the cond as a function
 again (which also does not work).

 Just because Scheme seems to be crawling with parens does not mean that
 you can throw in a few more and hope that nobody will notice.

 'cis is awfully awkward (strings are self-quoting and don't need '
 before them) but not actually wrong.

 \header {
   composer = myself
   title = \tonicEN cis
 }

 You would likely have to write

 title = \markup \tonicEN #cis

 here after fixing the above definition.  Alternatively, use

 tonicEn =
 #(define-scheme-function (parser layout tonic) (string?) ...

 in which case title = \toniEN cis should work fine.  With the current
 development version, you should be able to use \tonicEN pretty much
 everywhere a string can be used, with 2.16.0 the uses will likely be
 more restrained.  On the right side of an assignment or as a function
 argument, however, should work fine all the time.

 --
 David Kastrup


Hi David,

Thanks a lot - I now start to see the mistakes I made (excess
parentheses around the cond expression and excess parentheses around
the return values in the cond sub expressions).

I have however to use quotes around the note name for it to work.

Here's code that actually works, maybe it can be useful for others:

%%% BEGIN SNIPPET
\version 2.16.0

tonicEN = #(define-scheme-function (parser layout tonic) (string?)
(
cond
( (string=? tonic cis) C sharp )
( (string=? tonic dis) D sharp )
)
)

\header {
  composer = myself
  title = \tonicEN cis
}

\score {
  \relative c' {
a bes cis deses e fisis ges
  }
  \layout {}
}
%%% END SNIPPET

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


Re: Show (and increment) bar numbers only after a double bar

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 6:58 PM, Thomas Morley
thomasmorle...@googlemail.com wrote:
 2012/11/3 Olivier Biot olivier.b...@gmail.com:
 [...}
 Now I only need to devise a way to emulate the double bar at the start
 of each score line.

 After an idea of Mats Bengtsson:

[...]

Thank you again Thomas, this does exactly what I wanted! I wouldn't
have been able to code this on my own.

Best regards,

Olivier

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


Re: Function for rendering key textually in 3 languages

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 6:11 PM, Olivier Biot olivier.b...@gmail.com wrote:
 Hi David,

 Thanks a lot - I now start to see the mistakes I made (excess
 parentheses around the cond expression and excess parentheses around
 the return values in the cond sub expressions).

 I have however to use quotes around the note name for it to work.

 Here's code that actually works, maybe it can be useful for others:

[...]

I now got the method to use 2 parameters and produce the key signature in text:

%%% START of snippet 1
tonicEN = #(define-scheme-function (parser layout tonic arg) (string? string?)
 (string-append
  (cond
   ( (string=? tonic a) A )
   ( (string=? tonic b) B )
   ( (string=? tonic c) C )
   ( (string=? tonic d) D )
   ( (string=? tonic e) E )
   ( (string=? tonic f) F )
   ( (string=? tonic g) G )

   ( (string=? tonic aes) A flat )
   ( (string=? tonic bes) B flat )
   ( (string=? tonic ces) C flat )
   ( (string=? tonic des) D flat )
   ( (string=? tonic ees) E flat )
   ( (string=? tonic fes) F flat )
   ( (string=? tonic ges) G flat )

   ( (string=? tonic ais) A sharp )
   ( (string=? tonic bis) B sharp )
   ( (string=? tonic cis) C sharp )
   ( (string=? tonic dis) D sharp )
   ( (string=? tonic eis) E sharp )
   ( (string=? tonic fis) F sharp )
   ( (string=? tonic gis) G sharp )
   )
  (cond
   ( (string=? arg major)  major )
   ( (string=? arg minor)  minor )
   )
  )
 )
%%% END of snippet 1

I have a similar tonicDE and tonicFR function now. I can call only one
of those and assign the value to a header parameter (e.g., title).

What I now need to figure out, is how to print the output in a markup,
like in the currently not working snippets below:

%%% START of snippet 2
\header {
  title = \markup {\italic \tonicEN cis minor}
}
%%% END of snippet 2

%%% START of snippet 3
 \markup {
\fill-line {
  \center-column {
\concat {
  \italic \tonicEN cis minor
  \upright \tonicDE cis minor
}
  }
}
 }
%%% END of snippet 3

Best regards,

Olivier

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


Re: Function for rendering key textually in 3 languages

2012-11-03 Thread Olivier Biot
On Sat, Nov 3, 2012 at 7:35 PM, David Kastrup d...@gnu.org wrote:
 Olivier Biot olivier.b...@gmail.com writes:

 On Sat, Nov 3, 2012 at 6:11 PM, Olivier Biot olivier.b...@gmail.com wrote:

 What I now need to figure out, is how to print the output in a markup,
 like in the currently not working snippets below:

 %%% START of snippet 2
 \header {
   title = \markup {\italic \tonicEN cis minor}

 That's inside of a markup.  I _think_ this should work in current 2.17
 with define-scheme-function, but likely not in 2.16.

Aah... I'm still using v2.16 stable for now.

 So you'll need a define-markup-command after all to use inside of
 \markup, and best give it two markup? arguments (if the arguments are
 not plain strings, you'll likely get an error then).

Okay.

 It is actually possible to both use define-scheme-function and
 define-markup-command with the same name, and LilyPond will pick the
 right one depending on context.

Hi David,

Okay, one more magic recipe I see :-)

I now have two methods sharing the same name but defined differently,
that do the job:

%%% BEGIN snippet 1
tonalityEN =
#(define-scheme-function (parser layout tonic scale) (string? string?)
   (string-append
(cond
 ( (string=? tonic a) A )
 ( (string=? tonic b) B )
 ( (string=? tonic c) C )
 ( (string=? tonic d) D )
 ( (string=? tonic e) E )
 ( (string=? tonic f) F )
 ( (string=? tonic g) G )
 ( (string=? tonic aes) A flat )
 ( (string=? tonic bes) B flat )
 ( (string=? tonic ces) C flat )
 ( (string=? tonic des) D flat )
 ( (string=? tonic ees) E flat )
 ( (string=? tonic fes) F flat )
 ( (string=? tonic ges) G flat )
 ( (string=? tonic ais) A sharp )
 ( (string=? tonic bis) B sharp )
 ( (string=? tonic cis) C sharp )
 ( (string=? tonic dis) D sharp )
 ( (string=? tonic eis) E sharp )
 ( (string=? tonic fis) F sharp )
 ( (string=? tonic gis) G sharp )
 )
(cond
 ( (string=? scale major)  major )
 ( (string=? scale minor)  minor )
 )
)
   )

#(define-markup-command (tonalityEN layout props tonic scale) (string? string?)
   (interpret-markup layout props
 (markup
  (cond
   ( (string=? tonic a) A )
   ( (string=? tonic b) B )
   ( (string=? tonic c) C )
   ( (string=? tonic d) D )
   ( (string=? tonic e) E )
   ( (string=? tonic f) F )
   ( (string=? tonic g) G )
   ( (string=? tonic aes) A flat )
   ( (string=? tonic bes) B flat )
   ( (string=? tonic ces) C flat )
   ( (string=? tonic des) D flat )
   ( (string=? tonic ees) E flat )
   ( (string=? tonic fes) F flat )
   ( (string=? tonic ges) G flat )
   ( (string=? tonic ais) A sharp )
   ( (string=? tonic bis) B sharp )
   ( (string=? tonic cis) C sharp )
   ( (string=? tonic dis) D sharp )
   ( (string=? tonic eis) E sharp )
   ( (string=? tonic fis) F sharp )
   ( (string=? tonic gis) G sharp )
   )
  (cond
   ( (string=? scale major) major )
   ( (string=? scale minor) minor )
   )
  )
 )
   )
%%% END snippet 1

The difference is a single space character since the first definition
makes use of the space-eating concat function.

Next I want to try to call the new markup method in a scoreTitleMarkup
block, but there I can't yet find the proper solution:

%%% BEGIN snippet 2
scoreTitleMarkup = \markup {
  \column {
\vspace #.5
\rounded-box {
  \column {
\fill-line {
  \bold { \justify-field #'header:piece }
  \italic \tonalityEN #'header:piece-tonality #'header:piece-scale
} % \fill-line
  } % \column
} % \rounded-box
  } % \column
} % \markup


\score {
  \new Staff {
\relative c' {
\key c \major
c d e fis ges d b
}
  }

  \header {
piece = The piece title comes here
piece-tonality = c
piece-scale = major
  }
}
%%% END snippet 2

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


  1   2   >