Re: Putting piano/forte *before* the note

2017-03-18 Thread Mojca Miklavec
On 18 March 2017 at 12:08, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> Is there any way that I could write something like
>>
>> melody = {
>> \makethispiano \melodyA
>> \melodyB
>> \makethisforte \melodyA
>> }
>>
>> To avoid having to split the segment
>
> melody = {
>   <>\p \melodyA
>   \melodyB
>   <>\f \meldyA
> }
>
> <> is an empty chord (no duration since it has no notes to give a
> duration to), so it's handy for sneaking in "post-events" (constructs
> needing to be written after a note or chord) when they don't have to be
> attached to particular notes.

Wonderful, it works like a charm.

Thank you very much,
Mojca

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


Putting piano/forte *before* the note

2017-03-18 Thread Mojca Miklavec
Hi,

I often have repeated segments of music where the first time the
segment is played piano and the second time it is played forte.

I define segments with

melodyA = \fixed c' { c4 e g | ... }

and then

melody = { \melodyA \melodyB \melodyA }

Is there any way that I could write something like

melody = {
\makethispiano \melodyA
\melodyB
\makethisforte \melodyA
}

To avoid having to split the segment and write

melodyA = \fixed c' { e4 g | ... }
melody = {
c4\p \melodyA
\melodyB
c4\f \melodyA
}

This is particularly problematic because I usually add those marks
later and would then need to modify the scores in weird ways to
achieve the desired effect.

I guess I could use conditional variables, but I would prefer if I
could just add some kind of markup, even if it's eventually placed at
the bar.

Thank you,
Mojca

(Please CC me.)

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


Re: \repeatTie on a single note in a chord

2017-03-09 Thread Mojca Miklavec
Dear Malte,

On 9 March 2017 at 17:27, Malte Meyn wrote:
> Am 09.03.2017 um 17:07 schrieb Mojca Miklavec:
>> How can one add "\repeatTie" that only works on a single note in a chord?
>>
>> Example where I would only want to add the tie just to "f":
>>
> […]
>>   <a, c f>2 \repeatTie r4 |
>
> I think
>
> <a, c f\repeatTie>2
>
> should do what you want. But there’s no visible output

Thank you.

That's exactly what I tried and came to the same conclusion (no
output), even though I didn't inspect as deep as you did.

> (although the
> RepeatTieEvent is present in the f’s 'articulations); I think that’s a bug.

Should I file a bug report?

> You can fake the desired result by placing all three ties at the same spot:
>
> \once \override RepeatTieColumn.tie-configuration =
> #`((-4 . ,DOWN) (-4 . ,DOWN) (-4 . ,DOWN))
> <a, c f>2\repeatTie

Thank you. While the source looks horrible, it gives me exactly the
desired output :) :) :)
Using (-2 . ,UP).

Thanks,
Mojca

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


\repeatTie on a single note in a chord

2017-03-09 Thread Mojca Miklavec
Hi,

How can one add "\repeatTie" that only works on a single note in a chord?

Example where I would only want to add the tie just to "f":

melody = \fixed c' {
  \time 3/4
  \repeat volta 2 {
2.~ |
  } \alternative {
{
  2. |
} {
  2 \repeatTie r4 |
}
  }
}

Thank you,
Mojca

(Please CC me.)

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


Re: Problems with parallel voices when using David's accordion push spanner

2017-03-09 Thread Mojca Miklavec
Dear David,

On 9 March 2017 at 14:16, David Nalesnik wrote:
> On Thu, Mar 9, 2017 at 6:26 AM, Mojca Miklavec wrote:
>> Hi,
>>
>> I just wanted to repeat my question (as I'm unable to get rid of some
>> pretty annoying side effects when typesetting musing for accordion).
>>
>> I would greatly appreciate any hints for solving the problem.
>
> I'm sorry, but I don't know what causes this.  I hope that someone
> else on the list can offer you a solution.

I'm almost sure that I understand the problem when using new voice. A
new voice macro must be executed twice. First time during typesetting
of the regular melody (as expected) and second time in the middle of
typesetting the accordion push spanner.

But I don't know if it's possible to "temporary disable" adding a new
voice when typesetting the push spanner.

Mojca

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


Re: Problems with parallel voices when using David's accordion push spanner

2017-03-09 Thread Mojca Miklavec
Hi,

I just wanted to repeat my question (as I'm unable to get rid of some
pretty annoying side effects when typesetting musing for accordion).

I would greatly appreciate any hints for solving the problem.

Thank you,
Mojca

On 24 February 2017 at 13:47, Mojca Miklavec wrote:
> Hi,
>
> A while ago David Nalesnik wrote some wonderful macros to help me
> write a thick line that denote accordion pushing [1]. The macros work
> wonderfully in 99% of cases, but there are some strange examples where
> this fails.
>
> The example below produces output you can see in the attached PNG. If
> I remove "AccordionPushPull", then the scores typeset fine, but I do
> need those events.
>
> I tried several other strategies. All I need is a small chunk of code
> with different properties (tails pointing in different direction,
> perhaps the size or colour of the scores slightly changed to denote
> optional part for the player, ...). But whatever I try that works in
> normal conditions, fails here.
>
> I'm attaching a "minimal" working example that includes David's code
> (which I left untouched).
>
> melody = \fixed c' {
>   \time 3/4
>   \partial 2
>   \startPush d' e' | \stopPush
>   << { f'4 e' d' | f'4 d'2 | } \\ { 2.~ | 2. | } >>
> }
>
> basses = \fixed c {
>   \clef bass
>   \partial 2
>   f,4  | d,4   | a,4   |
> }
>
> \score {
>   \new PianoStaff <<
> \new Voice = "melody" { \melody }
> \new AccordionPushPull \with {
>   \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
> } {
>   \melody
> }
> \new Staff = "staff" <<
>   \new Voice = "bass" { \basses }
> >>
>   >>
> }
>
> If I change the above line of melody to
>
>   <<
> {
>   \voiceOne f'4 e' d' | f'4 d'2 |
> }
> \new Voice {
>   \voiceTwo 2.~ | 2. |
> }
>   >>
>
> then I get the attached screenshot (lily-accordion-with-new-voices.png)
> which is "equally" bad, only in a different way.)
>
> The example was taken from
>  http://lilypond.org/doc/v2.18/Documentation/notation/multiple-voices
>
> The first example with "\\" as voice separator has the additional
> problem that I cannot add lyrics to it (which is not acceptable), but
> this one repeats the second voice which is highly undesirable.
>
> I would be grateful for a bit of help to fix this.
>
> Thank you very much,
> Mojca
> (please CC me)
>
>
> [1] http://lists.gnu.org/archive/html/lilypond-user/2016-07/msg00392.html
>
> PS: Other examples of the push/pull macros not really obeying me (but
> those are all cases with much lower priority and there's no need to do
> anything about those now unless it's related to the problem at hand):
>
> - When push/pull spanner starts at "\repeat volta 2 {}", it's not
> properly aligned
>
> - Sometimes I need:
> melodyA = {\startPush ... \stopPush}
> melodyB = {\startPush ... \stopPush}
> melody = {\melodyA \melodyB}
> but I need to delete the last \stopPush in A and the first \startPush
> in B, else the line is disconnected (placed at different heights).
> This is also a problem with \repeat volta 2 {} \alternative { {} {} }
> where push events need to cross alternatives even if they are not
> logically connected, but I need to make sure that it looks visually
> accepting.
>
> - The code sometimes says
> warning: I think there's a dangling accordion push spanner :-(
> but it doesn't tell me the line to help me debug the problem.


test-lily-multiple-voices.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with parallel voices when using David's accordion push spanner

2017-02-24 Thread Mojca Miklavec
Hi,

Now with attachment ...

On 24 February 2017 at 14:34, Mojca Miklavec wrote:
>
> I just wanted to add another screenshot. If I change the above line of melody 
> to
>
>   <<
> {
>   \voiceOne f'4 e' d' | f'4 d'2 |
> }
> \new Voice {
>   \voiceTwo 2.~ | 2. |
> }
>   >>
>
> then I get the attached screenshot which is "equally" bad, only in a
> different way.)
>
> The example was taken from
>  http://lilypond.org/doc/v2.18/Documentation/notation/multiple-voices
>
> The first example with "\\" as voice separator has the additional
> problem that I cannot add lyrics to it (which is not acceptable), but
> this one repeats the second voice which is highly undesirable.
>
> Thank you,
> Mojca
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Problems with parallel voices when using David's accordion push spanner

2017-02-24 Thread Mojca Miklavec
On 24 February 2017 at 13:47, Mojca Miklavec wrote:
> Hi,
>
> A while ago David Nalesnik wrote some wonderful macros to help me
> write a thick line that denote accordion pushing [1]. The macros work
> wonderfully in 99% of cases, but there are some strange examples where
> this fails.
>
> The example below produces output you can see in the attached PNG. If
> I remove "AccordionPushPull", then the scores typeset fine, but I do
> need those events.
>
> I tried several other strategies. All I need is a small chunk of code
> with different properties (tails pointing in different direction,
> perhaps the size or colour of the scores slightly changed to denote
> optional part for the player, ...). But whatever I try that works in
> normal conditions, fails here.
>
> I'm attaching a "minimal" working example that includes David's code
> (which I left untouched).
>
> melody = \fixed c' {
>   \time 3/4
>   \partial 2
>   \startPush d' e' | \stopPush
>   << { f'4 e' d' | f'4 d'2 | } \\ { 2.~ | 2. | } >>
> }
>
> basses = \fixed c {
>   \clef bass
>   \partial 2
>   f,4  | d,4   | a,4   |
> }
>
> \score {
>   \new PianoStaff <<
> \new Voice = "melody" { \melody }
> \new AccordionPushPull \with {
>   \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
> } {
>   \melody
> }
> \new Staff = "staff" <<
>   \new Voice = "bass" { \basses }
> >>
>   >>
> }
>
> I would be grateful for a bit of help to fix this.

I just wanted to add another screenshot. If I change the above line of melody to

  <<
{
  \voiceOne f'4 e' d' | f'4 d'2 |
}
\new Voice {
  \voiceTwo 2.~ | 2. |
}
  >>

then I get the attached screenshot which is "equally" bad, only in a
different way.)

The example was taken from
 http://lilypond.org/doc/v2.18/Documentation/notation/multiple-voices

The first example with "\\" as voice separator has the additional
problem that I cannot add lyrics to it (which is not acceptable), but
this one repeats the second voice which is highly undesirable.

Thank you,
Mojca

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


Problems with parallel voices when using David's accordion push spanner

2017-02-24 Thread Mojca Miklavec
Hi,

A while ago David Nalesnik wrote some wonderful macros to help me
write a thick line that denote accordion pushing [1]. The macros work
wonderfully in 99% of cases, but there are some strange examples where
this fails.

The example below produces output you can see in the attached PNG. If
I remove "AccordionPushPull", then the scores typeset fine, but I do
need those events.

I tried several other strategies. All I need is a small chunk of code
with different properties (tails pointing in different direction,
perhaps the size or colour of the scores slightly changed to denote
optional part for the player, ...). But whatever I try that works in
normal conditions, fails here.

I'm attaching a "minimal" working example that includes David's code
(which I left untouched).

melody = \fixed c' {
  \time 3/4
  \partial 2
  \startPush d' e' | \stopPush
  << { f'4 e' d' | f'4 d'2 | } \\ { 2.~ | 2. | } >>
}

basses = \fixed c {
  \clef bass
  \partial 2
  f,4  | d,4   | a,4   |
}

\score {
  \new PianoStaff <<
\new Voice = "melody" { \melody }
\new AccordionPushPull \with {
  \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
} {
  \melody
}
\new Staff = "staff" <<
  \new Voice = "bass" { \basses }
>>
  >>
}

I would be grateful for a bit of help to fix this.

Thank you very much,
Mojca
(please CC me)


[1] http://lists.gnu.org/archive/html/lilypond-user/2016-07/msg00392.html

PS: Other examples of the push/pull macros not really obeying me (but
those are all cases with much lower priority and there's no need to do
anything about those now unless it's related to the problem at hand):

- When push/pull spanner starts at "\repeat volta 2 {}", it's not
properly aligned

- Sometimes I need:
melodyA = {\startPush ... \stopPush}
melodyB = {\startPush ... \stopPush}
melody = {\melodyA \melodyB}
but I need to delete the last \stopPush in A and the first \startPush
in B, else the line is disconnected (placed at different heights).
This is also a problem with \repeat volta 2 {} \alternative { {} {} }
where push events need to cross alternatives even if they are not
logically connected, but I need to make sure that it looks visually
accepting.

- The code sometimes says
warning: I think there's a dangling accordion push spanner :-(
but it doesn't tell me the line to help me debug the problem.


test-lily-multiple-voices.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to define a macros for writing predefined chords of arbitrary length?

2017-01-31 Thread Mojca Miklavec
Dear Thomas,

Thanks a lot for the answer.

On 31 January 2017 at 00:55, Thomas Morley wrote:
> 2017-01-30 19:16 GMT+01:00 Mojca Miklavec:
>> Hi,
>>
>> I can easily use a macro to create chords of predefined lengths, say
>>
>> chord_F = { 4 }
>>
>> but the functionality is limited for what I want to achieve.
>>
>> On some instruments (like accordion) one gets that chord by pressing a
>> single button and I need some reasonable way to enter them without
>> messing everything up.
>>
>> (Some songs consist of only two different chords and I find it tedious
>> to keep entering   over and over again, making lots of
>> mistakes, if I could assign that to just "F" and "C" or numbers 4 and
>> 2. \somelongwordF and \somelongwordC are still better than writing out
>> the full chord; the compiler would catch it if I make a spelling
>> mistake.)
>>
>> What I would like to be able to do is:
>>
>> - specify lengths
>> \chord_F4 \chord_F2 or <\chord_F>4 <\chord_F>2
>>
>> - combine chords with other pitches (in theory perhaps with other
>> chords as well, but I never needed that so far)
>> <f, \chord_F>8
>>
>>
>> To get things like
>>
>> chord_F = { f a c' }
>> melody = {
>> f,8 <\chord_F>8 c8 <\chord_F>8 |
>> <f, \chord_F>2
>> }
>>
>> What options do I have to achieve the desired functionality? (I don't
>> care about the exact syntax as long as it would allow me to achieve
>> consistency.)
>>
>>
>> Thank you very much,
>> Mojca
>>
>> (Please CC me.)
>
> How about:
>
> \version "2.19.52"
>
> chord =
> #(define-music-function (mus dur)(ly:music? ly:duration?)
>   (let ((evc-notes (extract-typed-music mus 'note-event)))
> (for-each
>   (lambda (note-ev)
> (ly:music-set-property! note-ev 'duration dur))
>   evc-notes)
> (make-event-chord evc-notes)))
>
> chord_F = \chord  \etc
> chord_Gm = \chord <g' bes' d''> \etc
>
>
> {
> \set Score.skipBars = ##t
> \chord_F16 \chord_F1 \chord_F32.. \chord_F\longa
> \chord_Gm128 \chord_Gm2 \chord_Gm4
> << f''8 \\ \repeat unfold 3 \chord_F16*2/3 >>
> }

I need more time (and skill) to understand the function definition,
but I will happily use it. Thank you very much, this helps a lot. It's
a tiny bit suboptimal that the durations are not optional, but I can
live with that.

> %% remark:
> %% n.b.: \chord_F4 <-- a duration is needed, the value doesn't matter
> chord_XY = \chord { fis'' \chord_F1 } \etc
>
> {
> \chord_XY 64.
> \chord { gis'' \transpose f f' \chord_F4 ees } 32
> }

Thank you. It's not so critical to be able to define new chords as the
fact that I'm able to use
\chord { ... }
to combine predefined chords with something else. I tried using <>
earlier without success.

> The following I don't understand.

I tried to explain into some more details here:
https://github.com/mojca/frajtonarca/tree/master/lilypond#basses

but I should probably add more graphics and I'll explain a bit more
below. An example of a real score is here:

https://github.com/mojca/frajtonarca/blob/master/tablature/avtorske/Mladi%20Dolenjci%20-%20Nisem%20pozabil.pdf

(replace pdf with ly to see the source)

>> PS: At some point in the future I would ideally like to be able to
>> prepare single input to get both of the following modes as output (but
>> that's already the next step):
>>
>> \new Staff = "staff" <<
>>   \new Voice = "bass" {
>> \clef bass
>> \repeat unfold 3 { f,8  c,  | } % push mode
>> \repeat unfold 4 { g,8  c,  | } % pull mode
>> <f, f a c'>2 | % push mode
>>   }
>> >>
>>
>> \new FiguredBass {
>>   \figuremode {
>> \repeat unfold 3 { <4>8 <3> <2> <3> | } % push mode
>> \repeat unfold 4 { <2>8 <3> <4> <3> | } % pull mode
>> <4 3>2 | % push mode
>>   }
>> }

I like the way how the following example works (I learned a new trick just now):

basses = \chordmode { c1 g1 c1 }
<<
  \new ChordNames \chordmode {
\basses
  }
  \chordmode {
\basses
  }
>>

The user only has to input the melody once and lilypond will typeset
it in two different ways. I would like to do the same: write the
melody once and get it typeset in different ways.


Using your notation, here's the desired output (in "pull" direction):

ch_g 

How to define a macros for writing predefined chords of arbitrary length?

2017-01-30 Thread Mojca Miklavec
Hi,

I can easily use a macro to create chords of predefined lengths, say

chord_F = { 4 }

but the functionality is limited for what I want to achieve.

On some instruments (like accordion) one gets that chord by pressing a
single button and I need some reasonable way to enter them without
messing everything up.

(Some songs consist of only two different chords and I find it tedious
to keep entering   over and over again, making lots of
mistakes, if I could assign that to just "F" and "C" or numbers 4 and
2. \somelongwordF and \somelongwordC are still better than writing out
the full chord; the compiler would catch it if I make a spelling
mistake.)

What I would like to be able to do is:

- specify lengths
\chord_F4 \chord_F2 or <\chord_F>4 <\chord_F>2

- combine chords with other pitches (in theory perhaps with other
chords as well, but I never needed that so far)
8


To get things like

chord_F = { f a c' }
melody = {
f,8 <\chord_F>8 c8 <\chord_F>8 |
2
}

What options do I have to achieve the desired functionality? (I don't
care about the exact syntax as long as it would allow me to achieve
consistency.)


Thank you very much,
Mojca

(Please CC me.)

PS: At some point in the future I would ideally like to be able to
prepare single input to get both of the following modes as output (but
that's already the next step):

\new Staff = "staff" <<
  \new Voice = "bass" {
\clef bass
\repeat unfold 3 { f,8  c,  | } % push mode
\repeat unfold 4 { g,8  c,  | } % pull mode
2 | % push mode
  }
>>

\new FiguredBass {
  \figuremode {
\repeat unfold 3 { <4>8 <3> <2> <3> | } % push mode
\repeat unfold 4 { <2>8 <3> <4> <3> | } % pull mode
<4 3>2 | % push mode
  }
}

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


Typesetting "ornaments" with parallel voices when using accordion push spanner

2016-12-19 Thread Mojca Miklavec
Hi,

I would like to typeset some scores where only the main melody is obligatory:

\language "deutsch"

global = {
\time 3/4
\key f \major
}

melody = \fixed c' {
\global
2.~ |
2. |
}

while one could optionally add some ornaments:

\fixed c' {
s4 g4. a8 |
b2. |
}

and I would like to mark that "optionality" in whatever way is
reasonable to do so.


I was thinking of using grace notes (they are supposed to be
ornaments), so I started with

melody = \fixed c' {
\global
\afterGrace 2.~ { g4. a8 } |
2. | % b2. still missing
}

but the resulting MIDI sounds weird. It looks as if grace notes are
really meant as something that is as short as possible and "doesn't
take any time". (Otherwise the visual result is kind-of OK.)


I next tried to follow instruction for parallel voices, but the
following doesn't seem to work, the second voice seems to interfere
with the first one, note heads change direction and properties etc.:

  \version "2.19.30"
  \language "deutsch"

  global = {
\time 3/4
\key f \major
  }

  rhythm = {
\global
\repeat unfold 3 { c4 c c | }
  }

  melody = \fixed c' {
\global
<<
  {
\voiceOne
2.~ |
2. |
  }
  {
% This seems to change the first one as well
\voiceTwo
% I would like a simple command so switch the style, but only
the colour,
% potentially the size, not to the super ugly shape
% \voiceOneStyle
%
% dots should be coloured as well
\override NoteHead.color = #blue
\override Stem.color = #blue
r4 g4. a8 |
b2. |
\override NoteHead.color = #black
\override Stem.color = #black
  }
>> \oneVoice
4   |
  }
  \score {
  \new PianoStaff <<
  \new Voice = "melody" {
\set Staff.midiInstrument = "accordion"
\melody
  }
  \new RhythmicStaff {
\rhythm
  }
>>
  }


Creating a new voice helped:

melody = \fixed c' {
  \global
  <<
{
  \voiceOne
  2.~ |
  2. |
}
\new Voice {
  \voiceTwo
  % dot should be blue as well
  \override NoteHead.color = #blue
  \override Stem.color = #blue
  r4 g4. a8 |
  b2. |
}
  >> \oneVoice
  %\startPush
  4   |
  %\stopPush
}

but it seems to interfere with accordion push spanner (as implemented
for me by David Nalesnik, so I'm not sure how to "fix" that code).

\score {
\new PianoStaff <<
\new Voice = "melody" {
  \set Staff.midiInstrument = "accordion"
  \melody
}
\new AccordionPushPull \with {
  \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
} {
  \melody
}
\new RhythmicStaff {
  \rhythm
}
  >>
}

I could probably work around the problems mentioned above by defining
a completely independent second voice, but that will be a lot more
error-prone.

Is there a way to fix the interference between a new voice and the push spanner?

I tried to come up with as minimal example as possible, but I wouldn't
know how to further shrink the code from accordion.ily.

Thank you,
Mojca

(Please CC me.)


accordion.ily
Description: Binary data


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


Re: How to build LilyPond.app on macOS?

2016-12-06 Thread Mojca Miklavec
Dear Graham,

On 6 December 2016 at 19:01, Graham Percival wrote:
> On Tue, Dec 06, 2016 at 08:44:58AM +0100, Mojca Miklavec wrote:
>> I found
>> http://lilypond.org/doc/v2.18/Documentation/contributor-big-page
>> (didn't read it all) and only suspect that some logic might live in
>> GUB, but I'm pretty much lost for the moment.
>
> I am familiar with the process as of 4 years ago; it may have
> changed since then.  Much of it is in GUB, but the actual code for
> the editor is here:
> https://github.com/gperciva/lilypad

Thank you, that's exactly what I was looking for wrt. the GUI.

> This is compiled and uploaded to:
> http://lilypond.org/downloads/gub-sources/osx-lilypad-universal/osx-lilypad-universal-0.6.3.tar.gz
> and then GUB downloads that, inserts the cross-compiled
> command-line binary, and packages it.

I can luckily skip that part :)
Including instructions to fetch Python 2.6.
(I really wonder why LilyPond nowadays ships with Python 2.6.)

>> I would like to see LilyPond.app being distributed in a package
>> manager, but for that to happen I first need to understand how to
>> build it.
>
> As others have commented, the text editor included in the
> LilyPond.app is rather basic.

Yes, I'm aware.

> In addition, this whole process was
> created a decade ago.  If I were interested in the lilypond
> experience on OSX, I'd start looking at a new implementation:
> something that takes the compiled lilypond package (which I
> imagine can be easily done in homebrew or some other package
> manager),

This is off-topic, but the idea of a package manager is usually to
compile natively. I'm almost sure that Debian doesn't fetch your
binaries either.

But yes, outside of a package manager it would make sense to take that binary.

> then adds some sort of GUI shell or editor.

Redesigning the GUI for LilyPond is something that would likely
require more effort that I'm personally willing to spend for this. OS
X requires some kind of a GUI when distributing user-friendly apps;
with package managers this can be handled differently.

Mojca

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


Re: How to build LilyPond.app on macOS?

2016-12-06 Thread Mojca Miklavec
On 6 December 2016 at 19:01, Tim McNamara wrote:
>> On Dec 6, 2016, at 5:46 AM, Mojca Miklavec wrote:
>>
>>(b.2) I would actually like to know how to change the behaviour,
>> so that my favourite text editor opens rather than LilyPond.app.
>
> Wait, is all you want to do is to be able to assign *.ly files to open with a 
> specific text editor

No, that's not all.

> if you double-click on them?  On Macs that’s settable in the Finder with no 
> need to build anything from source.
>
> Right-click or Control-click on the *.ly file.  Select “Open with…” from the 
> popup menu that appears.  Select your desired application.  When it asks if 
> you want all *.ly files mapped to that application, click “yes.”  Should be 
> done.

Actually I already did that. It's not about double-clicking on the
*.ly file. It's about opening textedit:// hyperlinks and doing the
above doesn't solve the problem. The answers by Sven and Davide were
the most accurate ones, but it seems I'll have to package duti
(http://duti.org/) first :) before I can test.

Mojca

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


Re: How to build LilyPond.app on macOS?

2016-12-06 Thread Mojca Miklavec
On 6 December 2016 at 13:38, Sven Axelsson wrote:
> On 6 December 2016 at 12:46, Mojca Miklavec wrote:
>>
>> Dear Davide,
>>
>> (b) See the attached screenshot. If I click, I'm transferred to
>> LilyPond.app and I end up in the correct line and column to fix my
>> mistakes. With some notes:
>>
>> (b.1) Usually this works. With the example in the screenshot with
>> non-ascii characters in the file name this is broken however and
>> LilyPond.app only opens a generic sample document. There must be a bug
>> somewhere, but I'm not sure where exactly.
>>
>> (b.2) I would actually like to know how to change the behaviour,
>> so that my favourite text editor opens rather than LilyPond.app.
>
> Here's some information about how OSX url handlers work:
> http://superuser.com/questions/548119/how-do-i-configure-custom-url-handlers-on-os-x

The only entry there is

LSHandlerContentType com.unknown.ly
LSHandlerRoleAll com.macromates.textmate.preview

Which doesn't look like LilyPond.app responsible for opening textedit:// files.

Everything else is completely unrelated.

Mojca

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


Re: How to build LilyPond.app on macOS?

2016-12-06 Thread Mojca Miklavec
Dear Davide,

On 6 December 2016 at 10:50, Davide Liessi wrote:
> Dear Mojca,
>
> 2016-12-06 8:44 GMT+01:00 Mojca Miklavec:
>> I would like to see LilyPond.app being distributed in a package
>> manager, but for that to happen I first need to understand how to
>> build it.
>
> You surely know that there is a Portfile for Lilypond (both stable and
> development) in MacPorts.

Yes, I know and I'm happily using it, I was asking about LilyPond.app
bundle specifically.

> As others have already said, Homebrew has a formula for Lilypond.

Not interested in HB. Period.

> As far as I know, the .app provides only the builtin editor, but I
> wouldn't use it for anything past the very first example file.
> May I ask why would you want a package manager to provide the .app?

(a) There might be users who are "afraid of command line" (sure, they
might already stop at installation instructions for MP), so the simple
GUI with pre-loaded hello world document and the "Typeset" button
might still be useful to some.

(b) See the attached screenshot. If I click, I'm transferred to
LilyPond.app and I end up in the correct line and column to fix my
mistakes. With some notes:

(b.1) Usually this works. With the example in the screenshot with
non-ascii characters in the file name this is broken however and
LilyPond.app only opens a generic sample document. There must be a bug
somewhere, but I'm not sure where exactly.

(b.2) I would actually like to know how to change the behaviour,
so that my favourite text editor opens rather than LilyPond.app.

(c) I was assuming that installing LilyPond.app might be doable
without too much hassle. In that case I would be interested in looking
into it. But if that's too much work, I would let it go.

And no, I'm not talking about the Frescobaldi frontend. That's a
different software.

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


Re: How to build LilyPond.app on macOS?

2016-12-06 Thread Mojca Miklavec
Dear Michael, Werner & others,

On 6 December 2016 at 08:54, Michael Gerdau wrote:
> Hi Mojca,
>
>> Can someone please provide me a hint about how to build LilyPond.app
>> on macOS (natively, without any cross-compiling, ideally without
>> compiling any dependencies like ghostscript etc.)?
>
> you won't like this:

I slightly feared that, but no problem :)

> It is not meant to be compiled natively.
>
> If you want to do that anyway you'd have to do the porting all for
> yourself.

Can you please point me to the sources? Which parts would have to be
ported or how extensive is the job likely to be? Do just the
configure/makefiles need adjustment or also the source code? (I'm only
interested in adding the GUI part, lilypond itself has already been
packaged, so dependencies of the command line program are not
currently an issue.)

From a quick glimpse it looks like a Python application with some
Cocoa bindings and a bunch of "plain text" files (.info, .nib). Plus a
lot of configuration to make sure that it finds the appropriate files
and of course making sure that all the dependencies are there.
Dependencies shouldn't be so problematic (lilypond and lilypond are
already packaged and "work perfectly" aside from the slightly annoying
part that the devel version no longer compiles with clang), even
though I suspect there's something wrong with our guile libraries,
sometimes we get

ERROR: In procedure dynamic-link:
ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"

On 6 December 2016 at 09:45, Werner LEMBERG wrote:
>
> However, we rely heavily on the GNU stuff (in
> particular the gcc compiler), which is not native to MacOS.

In the context of a package manager this is not an issue at all.

The fact that GCC is needed is slightly annoying, but it's handled by
the package manager automatically, it just pulls in an annoying
additional dependency which is often problematic due to a different
stdlib; when C++ interfaces are shared between dependencies, that's a
problem that leads to crashes of software, but I think (or hope) that
this is not the case in LilyPond. Or at least I didn't experience any
problems so far. Other software crashes immediately when mixing
stdlibs.

> I think it would be an excellent idea to provide something for
> Homebrew – if we can make lilypond work with guile 2, I don't see
> large obstacles.

I'm not talking about HomeBrew and I have guile 1.8.8 installed with
the package manager (but maybe it wasn't configured properly), so
dependency on guile 1.8 is not an obstacle either.

Again: we already have a working package for lilypond, the only(?)
missing bit is the GUI.

Thank you,
Mojca

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


How to build LilyPond.app on macOS?

2016-12-05 Thread Mojca Miklavec
Hi,

Can someone please provide me a hint about how to build LilyPond.app
on macOS (natively, without any cross-compiling, ideally without
compiling any dependencies like ghostscript etc.)?

I checked lilypond-2.19.51.tar.gz, but it's not clear to me where the
sources for that would be. There is no obvious configure option and I
didn't find the relevant/needed files like Info.plist.

I found
http://lilypond.org/doc/v2.18/Documentation/contributor-big-page
(didn't read it all) and only suspect that some logic might live in
GUB, but I'm pretty much lost for the moment.

I would like to see LilyPond.app being distributed in a package
manager, but for that to happen I first need to understand how to
build it.

Bonus question (I'll probably ask separately). PDF viewer shows hyperlinks to
textedit://path/to/file.ly
How does the OS know that it has to open LilyPond.app for that as is
there a way to configure that, so that the file gets opened in another
editor? I configured the system to open my favourite text editor on
double-clicking, but it has no effect when I click on a hyperlink.

Thank you,
Mojca

(please CC me)

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


Re: Vertically overlapping material / too small vertical space

2016-11-30 Thread Mojca Miklavec
Dear David,

On 30 November 2016 at 20:14, David Kastrup wrote:
> Mojca Miklavec writes:
>>
>> I need a horizontally aligned list of button labels / fingerings. Most
>> of the time I need two labels, but every so often I need three or four
>> (when a chord consists of three or four pitches).
>>
>> I would prefer to use something like the following (please excuse me,
>> the syntax is not functional, but it should demonstrate what I want):
>>
>> <f-\x{"B4"} a-\x{"B5"}>4
>> <f-\x{"B4"} a-\x{"B5"} c'-\x{"B6"}>4
>>
>> Here's a working syntax (demonstrating the problem / why I cannot use it):
>>
>>   \score {
>> \fixed c' {
>>   %
>>   % looks almost perfect, but I'm unable to use anything but simple 
>> numbers
>>   %
>>   f4-4   f-4
>>   %
>>   % proper text, but horrible output
>>   %
>>   f4^\markup{\column{"B4"}}
>>   ^\markup{\column{"B5" "B4"}}
>>   ^\markup{\column{"B6" "B5" "B4"}}
>>   f^\markup{\column{"B4"}}
>> }
>>   }
>
> How about
>
> f4\B4
> <f\B4 a\B5>
> <f\B4 a\B5 c'\B6> f\B4
> f\B4
>
> You'll probably want more than \B but probably still a very limited
> number of fingerings.

Wonderful, thanks a lot. I like the syntax a lot.

I would additionally still need an optional finger number, perhaps
with a syntax similar to:
f4\B4
<f\B4-2 a\B5-3>
<f\B4-2 a\B5-3 c'\B6-4> f\B4
so that "\B4-2" would result in "2B4", but I guess that should be
feasible to add.

What's still a mystery to me is whether it is possible to horizontally
align all these labels. (I remember that one can force lilypond to put
all fingerings on top, but I didn't manage to achieve proper
alignment.)

Mojca

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


Re: Vertically overlapping material / too small vertical space

2016-11-30 Thread Mojca Miklavec
Dear Phil,

On 30 November 2016 at 16:47, Phil Holmes wrote:
> I think the use of  \context is getting the vertical spacing engine
> confused.  I _think_ my attached version of your music does what you want -
> it would seem to point in the right direction, at the very least.

I changed your document slightly and rearranged it in the way I want it.

But the problem is still present. So no, it doesn't seem to fix it.


I need a horizontally aligned list of button labels / fingerings. Most
of the time I need two labels, but every so often I need three or four
(when a chord consists of three or four pitches).

I would prefer to use something like the following (please excuse me,
the syntax is not functional, but it should demonstrate what I want):

<f-\x{"B4"} a-\x{"B5"}>4
<f-\x{"B4"} a-\x{"B5"} c'-\x{"B6"}>4

Here's a working syntax (demonstrating the problem / why I cannot use it):

  \score {
\fixed c' {
  %
  % looks almost perfect, but I'm unable to use anything but simple numbers
  %
  f4-4   f-4
  %
  % proper text, but horrible output
  %
  f4^\markup{\column{"B4"}}
  ^\markup{\column{"B5" "B4"}}
  ^\markup{\column{"B6" "B5" "B4"}}
  f^\markup{\column{"B4"}}
}
  }

But this doesn't work: I'm unable to align it horizontally. That's the
reason why I'm currently misusing lyrics.

(Mis)using lyrics is both tedious and error-prone (if I change "c8"
into "c16 c" somewhere, then all the labels are screwed up and I have
to go through the tedious work of finding and fixing the labels at the
right place).

Your example works because you move the third and the fourth line. I
need them aligned above the first and second line though, even if it's
usually empty.

Mojca


> Hi,
>
> I'm also attaching a "quasi-minimal" example (if a full page may even
> be called "minimal").
>
> Mojca
>
> (please CC me)
>
> On 30 November 2016 at 12:06, Mojca Miklavec wrote:
>>
>> Hi,
>>
>> I would like to ask for a bit of a guidance. I sometimes end up with
>> the scores as you see in the attachment. There's simply not enough
>> vertical space between staves and text is overlapping very badly.
>>
>> I can attach the complete example (or perhaps come up with some
>> "\repeat unfold ..." trick to compose a full page that more or less
>> reproduces the problem), but it's basically the same type of scores as
>> I used anywhere else in
>> https://github.com/mojca/frajtonarca/tree/master/tablature/avtorske
>>
>> On the example in the screenshot you see the following elements in one
>> stave:
>>
>> - button names are two lines of Lyrics attached on top of the melody
>> - Voice with the main melody
>> - accordion push spanner
>> - RhythmicStaff
>> - FiguredBass
>>
>> I didn't even try to touch the spacing inside the scores. The only
>> part where the code is messing up with vertical spacing is here:
>>
>> https://github.com/mojca/frajtonarca/blob/master/tablature/accordion.ily
>> in accordionPushSpannerEngraver (written by David Nalesnik) which is
>> something that I don't fully understand myself. But in theory it
>> should not affect distances between different staves, it should only
>> control the distance between main melody, push spanner event and the
>> basses.
>>
>> I was looking at
>> - http://lilypond.org/doc/v2.19/Documentation/learning/vertical-spacing
>> -
>> http://lilypond.org/doc/v2.19/Documentation/notation/flexible-vertical-spacing-paper-variables
>>
>> etc. and found some ugly workarounds to fix the problem (I can create
>> a manual page break; add artificial invisible marks; increase the
>> spacing between staves – which will result in too big space even when
>> I don't have any button names / lyrics above the melody and that looks
>> ugly; ...), but I wonder if this issue with vertical spacing is:
>>
>> (a) a bug in lilypond
>> (b) a bug in the code that handles accordion push events
>> (c) something that's super difficult to fix anywhere and I should be
>> using workarounds anyway
>>
>> I can provide more information if needed, but I'll need a bit more
>> guidance.
>>
>> Thank you,
>> Mojca


lily-vertical-spacePH-fix.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertically overlapping material / too small vertical space

2016-11-30 Thread Mojca Miklavec
Dear Michael,

On 30 November 2016 at 16:30, Gerdau, Michael wrote:
>> I'm also attaching a "quasi-minimal" example (if a full page may even
>> be called "minimal").
>
> Is the attached what you actually want?

No. I want the button names above the first line, not below.

Mojca

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


Vertically overlapping material / too small vertical space

2016-11-30 Thread Mojca Miklavec
Hi,

I would like to ask for a bit of a guidance. I sometimes end up with
the scores as you see in the attachment. There's simply not enough
vertical space between staves and text is overlapping very badly.

I can attach the complete example (or perhaps come up with some
"\repeat unfold ..." trick to compose a full page that more or less
reproduces the problem), but it's basically the same type of scores as
I used anywhere else in
https://github.com/mojca/frajtonarca/tree/master/tablature/avtorske

On the example in the screenshot you see the following elements in one stave:

- button names are two lines of Lyrics attached on top of the melody
- Voice with the main melody
- accordion push spanner
- RhythmicStaff
- FiguredBass

I didn't even try to touch the spacing inside the scores. The only
part where the code is messing up with vertical spacing is here:
https://github.com/mojca/frajtonarca/blob/master/tablature/accordion.ily
in accordionPushSpannerEngraver (written by David Nalesnik) which is
something that I don't fully understand myself. But in theory it
should not affect distances between different staves, it should only
control the distance between main melody, push spanner event and the
basses.

I was looking at
- http://lilypond.org/doc/v2.19/Documentation/learning/vertical-spacing
- 
http://lilypond.org/doc/v2.19/Documentation/notation/flexible-vertical-spacing-paper-variables

etc. and found some ugly workarounds to fix the problem (I can create
a manual page break; add artificial invisible marks; increase the
spacing between staves – which will result in too big space even when
I don't have any button names / lyrics above the melody and that looks
ugly; ...), but I wonder if this issue with vertical spacing is:

(a) a bug in lilypond
(b) a bug in the code that handles accordion push events
(c) something that's super difficult to fix anywhere and I should be
using workarounds anyway

I can provide more information if needed, but I'll need a bit more guidance.

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


Re: unexplained shift of a note head when layout-set-staff-size is set to 16.3

2016-11-30 Thread Mojca Miklavec
On 29 November 2016 at 14:51, Davide Liessi wrote:
> 2016-11-29 14:43 GMT+01:00 Mojca Miklavec <mojca.miklavec.li...@gmail.com>:
>> I'm experiencing a weird behaviour with the note head of g being
>> shifted to the left when I add
>> #(layout-set-staff-size 16.3)
>
> See thread starting here:
> https://lists.gnu.org/archive/html/lilypond-user/2016-10/msg00231.html
>
> I don't know if it has already been added to the bug tracker.

Oh, indeed, that seems to be the same problem. Thank you for the
pointer and sorry for not trying to search deeper, but I wouldn't know
what to look for.

(It's interesting though that the problem was only discovered so late
and then by two people at almost the same time.)

It took me a while as well to figure out what exactly was wrong
(initially I thought that I used the wrong chord).

Thank you,
Mojca

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


unexplained shift of a note head when layout-set-staff-size is set to 16.3

2016-11-29 Thread Mojca Miklavec
Hi,

I'm experiencing a weird behaviour with the note head of g being
shifted to the left when I add
#(layout-set-staff-size 16.3)

The source code is below and the image is in attachment.

I tried some using other numeric values, but none of those I tried
leads to the same problem.

Without changing the size, the note heads are properly aligned one
below another. I don't understand why this would ever happen unless
there is some floating point arithmetics screwing up things.

I'm using
GNU LilyPond 2.19.44
on OS X (compiled locally with MacPorts).

\version "2.19.44"
\language "deutsch"

\score {
\new PianoStaff <<
\new Staff = "staff" <<
  \new Voice = "bass" {
\clef bass
\time 3/4
g,4   |
  }
>>
  >>
  \layout {
 #(layout-set-staff-size 16.3)
  }
}

Thank you,
Mojca

(please CC me)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Setting the number for \mark \default

2016-11-14 Thread Mojca Miklavec
Dear Robin,

On 14 November 2016 at 17:28, Robin Bannister wrote:
> Mojca Miklavec wrote:
>>
>> I eventually needed to run "locate rehearsal-mark-letter.ly" on my
>> computer and inspect the contents to arrive to the answer.
>
> I was referring to the regression tests at
> http://lilypond.org/doc/v2.19/input/regression/collated-files.html
> This links to all the test files (like rehearsal-mark-letter.ly)
> and shows what they produce.

Thank you. I don't remember running into that page before, but I
certainly like the graphical representation of this page more than
grepping my local hard drive :)

Thanks for another hint.

Mojca

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


Re: Setting the number for \mark \default

2016-11-14 Thread Mojca Miklavec
Dear Robin,

On 14 November 2016 at 15:58, Robin Bannister wrote:
> Mojca Miklavec wrote:
>>
>>
>> Is there a way to just set the counter without printing the mark
>> itself? (I would like to set the counter at the beginning of Coda and
>> then use \markDefault where appropriate just like everywhere else.)
>>
>> Documentation points to
>> http://lilypond.org/doc/v2.19/Documentation/internals/rehearsalmark
>> but I don't see any obvious way to set the number.
>
>
>
> This links to 3.1.89 RehearsalMark which says:
>> RehearsalMark objects are created by: Mark_engraver.
> That links to 2.2.66 Mark_engraver which says:
>>  rehearsalMark (integer)  The last rehearsal mark printed.
>
>
> You can see an example regarding this in the regression tests.
> Searching for 'The mark may be set with' takes you to
>   rehearsal-mark-letter.ly
> which shows setting to #24 without triggering a \mark,
> the next \mark \default uses #25, producing 'Y'.

Thanks a lot for explanation. So
\set Score.rehearsalMark = #4
it is.

Actually the page
"http://lilypond.org/doc/v2.19/Documentation/notation/bars; already
says:

"The value to use is stored in the property rehearsalMark."

but this wasn't enough of a hint for a beginner like me and I
eventually needed to run "locate rehearsal-mark-letter.ly" on my
computer and inspect the contents to arrive to the answer.

I would find it useful if the following example:

\relative c'' {
  c1 \mark \default
  c1 \mark \default
  c1 \mark #8
  c1 \mark \default
  c1 \mark \default
}

was extended to also include something like
   \set Score.rehearsalMark = #20
followed by another mark or two.

"An example is worth 1000 words :)"

Seeing that in the example would make it more obvious to me what I needed to do.

Thank you,
Mojca

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


Re: Ties break the ability to add lyrics

2016-11-14 Thread Mojca Miklavec
Dear Phil,

On 14 November 2016 at 14:34, Phil Holmes wrote:
> - Original Message - From: "Mojca Miklavec"
>>
>> While trying to add slightly more complex fingerings (button label +
>> finger number) on top of some scores, I'm facing a problem with ties
>> on the following structure:
>>
>>  << {f'2~} {s8 d'4.~} {s4 b4~} {s4. g8} >>
>>  4. 8 |
>>
>> (This is some "simplification" that would look ugly if I would tie
>> five chords together; it should be clear enough for the player, so I
>> would like to leave this visual output.)
>>
>> I'm misusing lyrics to add fingerings because that was the only way I
>> found so far that gives me satisfactory output (with horrible and very
>> error-prone input).
>
> \set melismaBusyProperties = #'() will make each lyric syllable align on a
> note whether it's tied, slurred or beamed.

Wonderful, thank you very much.

(I saw that command on the page earlier, but didn't immediately
understand the meaning.)

Thanks again,
Mojca

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


Re: Ties break the ability to add lyrics

2016-11-14 Thread Mojca Miklavec
On 14 November 2016 at 13:31, Mojca Miklavec wrote:
> Hi,
>
> While trying to add slightly more complex fingerings (button label +
> finger number) on top of some scores, I'm facing a problem with ties
> on the following structure:
>
>   << {f'2~} {s8 d'4.~} {s4 b4~} {s4. g8} >>
>   4. 8 |

I just realized that I could probably use the technique mentioned in

http://lilypond.org/doc/v2.19/Documentation/notation/techniques-specific-to-lyrics
Polyphony with shared lyrics
like
\new NullVoice = "aligner" \aligner
but that will add yet another layer of complexity (or let's better
call it "yet another repetition of the same thing and yet another
option where things could go wrong") to the already annoyingly
error-prone way of entering button names.

(It would be really awesome if I could enter button names and finger
numbers right next to the music itself.)

Mojca

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


Ties break the ability to add lyrics

2016-11-14 Thread Mojca Miklavec
Hi,

While trying to add slightly more complex fingerings (button label +
finger number) on top of some scores, I'm facing a problem with ties
on the following structure:

  << {f'2~} {s8 d'4.~} {s4 b4~} {s4. g8} >>
  4. 8 |

(This is some "simplification" that would look ugly if I would tie
five chords together; it should be clear enough for the player, so I
would like to leave this visual output.)

I'm misusing lyrics to add fingerings because that was the only way I
found so far that gives me satisfactory output (with horrible and very
error-prone input).

I would like to put a label on top of every note/chord (I don't need
it on the last one), but for some (unknown to me) reason Lilypond
skips all notes in the structure when I use ties. The attachment
demonstrates this. The labels in the first two measures look ok, but
the labels in the second two measures skip some notes. (Fingerings in
the third example look OK, but are not visually appealing.) Sure, I'm
aware that the second note in a tie should not get its own lyrics, but
I would expect five "slots" in the 3rd and 4th measure for example (4
in the 3rd measure and one in the 4th measure, skipping the first
chord in the 4th measure).

I want to add that the usual fingerings work just fine and in fact I
would prefer to use fingerings if I would find a way to get a
satisfactory output (all fingerings aligned vertically above the
line).

Examples of similar scores (showing the usual desired output):
https://github.com/mojca/frajtonarca/tree/master/tablature/avtorske

If there is a better / more proper way to use "__", please also correct me.

Thank you,
Mojca


PS: please CC me

-

\version "2.19.30"
\language "deutsch"

melody = \fixed c' {
  \time 2/4
  \key b \major

  % this is missing ties
  % but allows adding button labels
  << {f'2} {s8 d'4.} {s4 b4} {s4. g8} >>
  4. 8 |

  % this contains proper ties,
  % but doesn't allow adding button labels
  \set tieWaitForNote = ##t
  << {f'2~} {s8 d'4.~} {s4 b4~} {s4. g8} >>
  4. 8 |

  8|
  8. 16 4 |

  % built-in mechanism for fingerings does both
  << {f'2~-4} {s8 d'4.~-3} {s4 b4~-2} {s4. g8-1} >>
  4. 8 |
}

buttonsIV = \lyricmode {
  "4"__ _ _ _ _ "4"
  "4/B6" __ _ _ _ _ "4/B6"
}
buttonsIII = \lyricmode {
  \skip 1 "3"__ _ _ _ ""
  \skip 1 "3/B5" __ _ _ _ ""
}

buttonsII = \lyricmode {
  \skip 1 \skip 1 "2"__ _ _ ""
  \skip 1 \skip 1 "2/B4" __ _ _ ""
}

buttonsI = \lyricmode {
  \skip 1 \skip 1 \skip 1 "1""1""1"
  \skip 1 \skip 1 \skip 1 "1/C5" "1/B3" "1/B3"
}

\score {
\new PianoStaff <<
\new Lyrics = "buttonsIV"  \with { \override
VerticalAxisGroup.staff-affinity = #DOWN }
\new Lyrics = "buttonsIII" \with { \override
VerticalAxisGroup.staff-affinity = #DOWN }
\new Lyrics = "buttonsII"  \with { \override
VerticalAxisGroup.staff-affinity = #DOWN }
\new Lyrics = "buttonsI"   \with { \override
VerticalAxisGroup.staff-affinity = #DOWN }
\new Voice  = "melody" { \melody }
\context Lyrics = "buttonsIV"  { \lyricsto "melody" { \buttonsIV  } }
\context Lyrics = "buttonsIII" { \lyricsto "melody" { \buttonsIII } }
\context Lyrics = "buttonsII"  { \lyricsto "melody" { \buttonsII  } }
\context Lyrics = "buttonsI"   { \lyricsto "melody" { \buttonsI   } }
  >>
}


test-golica.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Setting the number for \mark \default

2016-11-14 Thread Mojca Miklavec
Hi,

I'm using \markDefault from the following code for marking parts of music:

stdMarkFormat = {
  \set Score.markFormatter = #format-mark-box-letters
}
markDefault = {
  \stdMarkFormat
  \mark \default
}

But if I follow:
http://flaminghakama.com/adding-a-coda
to make Coda a "score" on its own, then the numbering is reset and
starts from A again.

  \score {
\new StaffGroup <<
  \new Staff {
... (the rest of the piece)
\markDefault
...
  }
>>
  }
  \score {
\new StaffGroup <<
  \new Staff {
... (the coda)
\markDefault % starts from A, undesired
...
 }
>>
  }

An example to overcome this is provided in
http://lilypond.org/doc/v2.19/Documentation/notation/bars
namely to use something like
\mark #8

but I would like to reset the counter before starting writing the coda
and if I use "\mark #3", then this prints out an unboxed mark at the
place where I don't want it.

Surely I can just use
\stdMarkFormat
\mark #4
at the place where I wanted a boxed D, but that somehow defeats the
purpose of macros.

Is there a way to just set the counter without printing the mark
itself? (I would like to set the counter at the beginning of Coda and
then use \markDefault where appropriate just like everywhere else.)

Documentation points to
http://lilypond.org/doc/v2.19/Documentation/internals/rehearsalmark
but I don't see any obvious way to set the number.

Thank you,
Mojca

PS: An alternative question would be

How to break the score without introducing 'artificial pauses'
like 'hide everything, then \repeat unfold 3 { s1 }' as in
http://lsr.di.unimi.it/LSR/Item?id=190

but it makes sense to ask this separately.

PPS: please CC me.

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


Re: Ties over multiple chords

2016-11-11 Thread Mojca Miklavec
On 11 November 2016 at 09:49, Richard Shann wrote:
> On Fri, 2016-11-11 at 09:15 +0100, Urs Liska wrote:
>> Try \set tieWaitForNotes = ##t
>
> Is there any circumstance in which it is useful to have this set false?
> That is, why is it not the default? (I never found this and when
> typesetting some music that made extensive use of written arpeggiation,
> instead I laboriously constructed workarounds ...)

The second alternative in my example is one use case when one might
want to have this set to false.

If it is set to false, one can simply do:
8~ 4.

If it is true, one has to put a tie on each separate pitch:
8 4.
else g will wait forever and tie to some random pitch somewhere else.

(Not to mention that newbies probably frequently mistakenly use this
instead of slurs and might wonder why the connection to a pitch three
lines lower.)

A bigger problem might be that this command is a bit nontrivial to find.

Mojca

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


Re: Ties over multiple chords

2016-11-11 Thread Mojca Miklavec
Dear Simon,

On 11 November 2016 at 09:16, Simon Albrecht wrote:
> On 11.11.2016 08:59, Mojca Miklavec wrote:
>>
>> Hello,
>>
>> I don't know how to explain in proper terms what I want to achieve,
>> but I hope that it will be clear from the example below (I would be
>> grateful for a proper English term for this as well :).
>>
>> I wrote the same thing twice. The second alternative works, but looks
>> ugly to me. I would like to use the first alternative (which is a bit
>> of cheating), but ties don't work properly there, most likely lilypond
>> has problems interpreting where the tie should point to.
>>
>> Is there any better workaround?
>
>
> Hi Mojca,
>
>   \set tieWaitForNote = ##t
> does the trick.

Wonderful, thank you.

Is there some way to limit the scope of this command or is it best to simply use
\set tieWaitForNote = ##f
once I no longer need it?

Not that I expect that I'll have to disable it as I usually don't
write ties unless I actually need them (except very rarely between
chords with less-than-perfect match), I would only like to know the
general principle (in TeX there is \begin ... \end :).

Thank you,
Mojca

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


Ties over multiple chords

2016-11-10 Thread Mojca Miklavec
Hello,

I don't know how to explain in proper terms what I want to achieve,
but I hope that it will be clear from the example below (I would be
grateful for a proper English term for this as well :).

I wrote the same thing twice. The second alternative works, but looks
ugly to me. I would like to use the first alternative (which is a bit
of cheating), but ties don't work properly there, most likely lilypond
has problems interpreting where the tie should point to.

Is there any better workaround?

\version "2.19.30"
\language "deutsch"

melody = \fixed c' {
  \time 2/4
  \key b \major

  % first alternative: this doesn't work
  << {f'2~} {s8 d'4.~} {s4 b4~} {s4. g8} >> |
  4. r8 |

  << {f'2~} {s8 es'4.~} {s4 a4~} {s4. g8} >> |
  4. r8 |

  % second alternative: this works
  f'8~ 8~ 8~ 8~ |
  4. r8 |

  f'8~ 8~ ~ 8~ |
  4. r8 |
}

\new PianoStaff <<
  \new Voice = "melody" {
\melody
  }
>>

(I could cheat with slurs, but I have no clue how to use them in this example.)

Thank you,
Mojca

(please CC me)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Beginner's questions about long repeats & MIDI files

2016-10-15 Thread Mojca Miklavec
On 15 October 2016 at 01:01, Flaming Hakama by Elaine wrote:
>
>> 2.) Sometimes I have a very simple repeat pattern, say, part A repeats
>> four times.
>> The only difference is that the third time "c2." gets replaced by "c2
>> c4" somewhere in the middle due to an additional syllable in the
>> lyrics.
>>
>> a) What's the correct way to visually represent that? Drawing the full
>> c2. plus some additional c4 in parenthesis at the end? How do you type
>> it in? Or "c2(c4)" with a potentially dashed tie/slur/whatever that is
>> called.
>>
>> b) How does one get a correct MIDI file? I can imagine writing
>>
>> aa = {...}
>> ab = { c2. | }
>> ac = { c2 c4 | }
>> ad = {...}
>> aA = { \aa \ab \ad }
>> aB = { \aa \ac \ad}
>> melodyMIDI = { \aA \aA \aB \aA }
>>
>> and slightly different approach for engraving to fake proper visual
>> appearance, but I'm sure there must be a more straightforward way with
>> some "if this is the third time of repeating this segment, do
>> something different for this one single note".
>
>
> I'm not familiar enough with vocal scores to know the standard practice in
> for this circumstance.
>
> For instrumental music, one approach I've seen is to display both rhythms
> using parallel voices and add text to instruct the performer when to play
> each variation.
>
> I'm not sure how nicely this plays with lyrics.
>
> \version "2.19.15"
>
> aa = { g'2. 2. 2. }
> ab = { c'2. | }
> ac = { c'2 4 | }
> ad = { b'2. 2. }
>
> bothVariations = <<
> { <>^\markup { \column { "1st, " "2nd &" "4th X" } } \ab } \\
> { <>_"3rd X" \ac }
>>>

Thank you very much for the example. I compiled it, but the output
doesn't look too appealing to me.

But you gave me the idea how to do it with two voices. For the visual
part I decided to use something like the following:

<<
  {
2.~ |
2. |
  }
  {
s2. |
s2 \parenthesize f4 |
  }
>>

That is: misuse parallel voices, use as much skip as necessary and add
a note inside parenthesis. There is no need for an explicit
explanation of when that additional note is needed. If the lyrics
stands below the scores, it's clear which one needs an additional
syllable.

Mojca

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


Re: Beginner's questions about long repeats & MIDI files

2016-10-14 Thread Mojca Miklavec
Hi,

Thank you very much for some very useful suggestion. I'll reply to the
rest later, but I have one "objection" (I could probably have
mentioned that in my first post):

On 15 October 2016 at 01:22, Flaming Hakama by Elaine wrote:
>
>> Is there a way to make this both appear correctly and play correctly
>> in a midi file?
>
> Similar to an earlier question, no, MIDI doesn't honor or respect repeats.

This is not entirely true. I happily use a super easy way to make this work:

melody = {...}
\unfoldRepeats { \melody }

to generate the MIDI file and for simple repeats like

\repeat volta 2 {...} \alternative {{...}{...}})

that simply works perfect.

Below is the general structure I use.

melody = {...}
basses = {...}

\score {
  \new PianoStaff <<
...
  >>
  \layout {}
}

\score {
  \unfoldRepeats {
\new PianoStaff <<
  \new Voice = "melody" {
\set Staff.midiInstrument = "accordion"
\melody
  }
  \new Voice = "basses" {
\set Staff.midiInstrument = "accordion"
\basses
  }
>>
  }
  \midi {
\tempo 4 = 160
  }
}

I'm just saying that it would be awesome if I could convince
\unfoldRepeats to be able to obey some more complex scenarios. (But I
believe that tagging will do the trick.)

Mojca

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


Beginner's questions about long repeats & MIDI files

2016-10-14 Thread Mojca Miklavec
 Hi,

I have some simple beginner's questions about different aspects of
repeats, mostly from the perspective of creating proper MIDI files.

1.) Let's assume that the song has one of the following patterns

Intro-A1-A2-B1-B2-A1-A2-A3

Intro-A1-A2-B1-B2-A1-A2-B1-B3

A1 = part A with the first ending
B3 = part B with the third ending etc.

Can the song be written in such a way that one could get the proper
engraving & the proper midi file at the same time (in particular for
the second example which is easier)?

Or is the only way to do it properly to create a separate melody for
engraving and a separate one for MIDI? Something like:

melodyIntro = {...}
melodyA = {...}
melodyAI = {...}
melodyAII = {...}
...
melodyScores = {
\melodyIntro
\repeat volta 2 { \melodyA }
\alternative {{ \melodyAI }{ \melodyAII }}
\repeat volta 2 { \melodyB }
\alternative {{ \melodyBI }{ \melodyBII }}
   ...
}
melodyMIDI = {...}

2.) Sometimes I have a very simple repeat pattern, say, part A repeats
four times.
The only difference is that the third time "c2." gets replaced by "c2
c4" somewhere in the middle due to an additional syllable in the
lyrics.

a) What's the correct way to visually represent that? Drawing the full
c2. plus some additional c4 in parenthesis at the end? How do you type
it in? Or "c2(c4)" with a potentially dashed tie/slur/whatever that is
called.

b) How does one get a correct MIDI file? I can imagine writing

aa = {...}
ab = { c2. | }
ac = { c2 c4 | }
ad = {...}
aA = { \aa \ab \ad }
aB = { \aa \ac \ad}
melodyMIDI = { \aA \aA \aB \aA }

and slightly different approach for engraving to fake proper visual
appearance, but I'm sure there must be a more straightforward way with
some "if this is the third time of repeating this segment, do
something different for this one single note".

3.) I sometimes want to write repeats as | 1,3 | 2 | 4 |

Is there any better way than the following?

\alternative {
  {
\set Score.repeatCommands = #'((volta "1, 3"))
...
  }
  {
...
  }
  {
\set Score.repeatCommands = #'((volta "4") end-repeat)
...
  }
}

Is there a way to make this both appear correctly and play correctly
in a midi file?

4.) What's the proper way to write the following:

c4 4 4

when c's duration is actually "2." (a single button press) and d's
duration is "2" (again a single button press)? Should one draw c2. or
three c4, connected with a tie/slur?

5.) Is there any good "tutorial" about proper use of "D.S. al Fine"
and weird usages of those Segno signs? I've seen some, but wouldn't
mind seeing some nice reference just to make sure that I properly
understand the correct usage in all weird cases.

Thank you very much,
Mojca


PS: please CC me

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


Help for entering the basses for diatonic accordion

2016-10-14 Thread Mojca Miklavec
Hi,

After getting some very useful hints on this list about creating
scores for diatonic accordion, I would like to return for getting more
help on entering the basses in an easier way than having to manually
type the same information over and over again.

A few other things from the wishlist will come later.

I wrote the specification of what I want to achieve (but will shortly
repeat it below):

https://github.com/mojca/frajtonarca/blob/master/lilypond/README.md#basses

Here's an example of scores I did in "lazy mode" (see the basses:
there are only numbers + rhythm):

https://github.com/mojca/frajtonarca/blob/master/tablature/avtorske/Lojze%20Slak%20-%20Glas%20harmonike.ly
https://github.com/mojca/frajtonarca/blob/master/tablature/avtorske/Lojze%20Slak%20-%20Glas%20harmonike.pdf

And here's an example of scores that I imported from a MIDI file and
something that I would like to eventually get with less effort (the
basses are complete; I still had to manually write the button numbers
– which is something that LilyPond might be able to do for me as a
special kind of conversion):

https://github.com/mojca/frajtonarca/blob/master/tablature/ljudske/Je%20pa%20davi%20slanca%20pala.ly
https://github.com/mojca/frajtonarca/blob/master/tablature/ljudske/Je%20pa%20davi%20slanca%20pala.pdf


I would like to:

1.) Enter playing direction, button numbers (or chord names) with
durations just once.

2.) Define the mapping of buttons on the specific accordion for which
the scores are written

3.) Get full chords (engraved and in the midi file) without having to
tediously enter all individual chords (there are only 22 different
ones) a zillion times.


An acceptable way to enter the chords (this is what I do at the
moment) is for example the following:

\new FiguredBass {
  \figuremode {
\repeat unfold 2 { <2>4 <3> <3> | <4> <3> <3> | } % pull
\repeat unfold 4 { <4>4 <3> <3> | <2> <3> <3> | } % push
\repeat unfold 2 { <2>4 <3> <3> | <4> <3> <3> | } % pull
<6>4 <5> <5> | % push
<4>4 <9> <7> | % pull
<6 5>2.  | % pull
  }
}

but I would like to get full chords engraved and played in the midi file.

More information is on the link above and I will gladly add more in
case something is not entirely clear.

I'm looking forward for ideas. Running the input through some external
pre-processor would be acceptable (even if I would prefer not to
"duplicate" input). I'm perfectly happy to write python/ruby/C[++]
code, but learning enough lisp to achieve what I want to do would be a
serious challenge.

Thank you,
Mojca


PS: please CC me in reply.

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


Re: "Problematic" conversion from MIDI: c4*5, c1 (in 3/4 time) etc.

2016-07-29 Thread Mojca Miklavec
On 29 July 2016 at 21:55, David Wright wrote:
> On Fri 29 Jul 2016 at 14:29:57 (+0200), Mojca Miklavec wrote:
>> I have a midi file that I wanted to convert into scores, but the
>> scores simply don't look right.
>>
>> While I have a real (relatively long) song in the MIDI, I believe that
>> I can fully reproduce the problem with the following simple example:
>>
>> \score {
>>   \new Voice = "melody" {
>> \set Staff.midiInstrument = "accordion"
>> \time 3/4
>> \relative c' {
>>   c4 c c |
>>   c1 d4 e |
>>   f4*5 g4 |
>>   f2.~ | % becomes f4*5
>>   f2 e4 |
>>   d4*3 | % becomes d2.
>>   c4 c2~ | % becomes c1
>>   c2
>> }
>>   }
>>   \midi { \tempo 4 = 160 }
>>   \layout {}
>> }
>>
>> (I picked accordion because one doesn't hear the duration with piano.)
>>
>> The idea is to make midi from the above example first (lilypond
>> test.ly), then convert midi to scores (midi2ly test.midi -o test2.ly)
>> and typeset again (lilypond test2.ly).
>>
>>
>> The resulting MIDI file sounds right, but the typesetting of it is
>> very strange. I get just a single quarter note printed out rather than
>> something that takes the duration of five times a quarter.
>>
>> OK, that's probably expected when I consciously enter the above
>> syntax, but not after conversion from a MIDI file.
>>
>> I noticed that the whole idea of the asterisk operator is to print a
>> single unit, but to prolong it in MIDI (or for other purposes). But
>> there's a lot of inconsistency:
>> - if I properly enter c2.~ c2, I get c4*5 from the midi conversion
>> - if I properly enter c2~ c2, I get c1 which is "forbidden" inside 3/4
>> - if I sloppily enter c4*3 which would typset in a very weird way, it
>> comes out OK after the conversion as c2.
>>
>> None of that makes any sense to me.
>>
>> Sure I can manually fix the resulting plain text file, but I was
>> wondering if there was really no better way to get this done properly
>> and automatically.
>
> In the absence of any output examples, I've attached what my system
> produces from your source. Let us know what's incorrect.

Oh wait!

The "answer" to my question has always been there in the generated ly
file. These are the important settings that make all the difference:

\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"

(plus of course those for rests).

The main problem is that what I do is:
- run midi2ly (outputting absolute pitches & durations) to get the melody out
- copy just the melody to a different file template to get exactly the
staff arrangement I want (the default output is semi-useless for my
particular use case)

In fact I didn't realize that I would get correct PDF if I kept those
two settings.

This approach of copying just the melody avoids many useless settings like
\set Staff.instrumentName = "\new:melody"
but the two/four necessary lines were accidentally omitted.

> It looks to
> me as if the original score is just what you (idiosyncratically) asked
> for and the subsequent score has been "conventionalised" as one might
> expect, because the midi performer has no way of representing your
> odd notation.

I don't think so. I didn't try to manually inspect the dump of the
midi file (maybe I should), but I strongly suspect that there will be
absolutely no difference in midi irrespective of whether I enter
c2.~c2 or c4*5. It must be midi2ly that eventually decides what to do
with pitches that last for some "weird durations".

midi2ly already provides options for outputting absolute or relative
pitches, to always include the timing (or only when necessary), ...
There could potentially be another parameter to determine whether
midi2ly should produce "c1" or "c2.~c4". Or perhaps some way to fix
this with python-ly that I have to run anyway. Maybe that exists
already.

... the easiest solution would be simply add
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
to my main document and stop worrying.

Mojca


---

off-topic

>> (PS: please CC me in reply.)
>
> This will happen automatically if you coerce you mail client into
> including the header line:
>
>  Reply-To: Mojca Miklavec <mojca.miklavec.li...@gmail.com>, 
> lilypond-user@gnu.org

Thanks a lot for the hint. I can only adjust the settings globally
though (I cannot easily change reply-to for a single email
unless/until I change the mai

"Problematic" conversion from MIDI: c4*5, c1 (in 3/4 time) etc.

2016-07-29 Thread Mojca Miklavec
Hello,

I have a midi file that I wanted to convert into scores, but the
scores simply don't look right.

While I have a real (relatively long) song in the MIDI, I believe that
I can fully reproduce the problem with the following simple example:

\score {
  \new Voice = "melody" {
\set Staff.midiInstrument = "accordion"
\time 3/4
\relative c' {
  c4 c c |
  c1 d4 e |
  f4*5 g4 |
  f2.~ | % becomes f4*5
  f2 e4 |
  d4*3 | % becomes d2.
  c4 c2~ | % becomes c1
  c2
}
  }
  \midi { \tempo 4 = 160 }
  \layout {}
}

(I picked accordion because one doesn't hear the duration with piano.)

The idea is to make midi from the above example first (lilypond
test.ly), then convert midi to scores (midi2ly test.midi -o test2.ly)
and typeset again (lilypond test2.ly).


The resulting MIDI file sounds right, but the typesetting of it is
very strange. I get just a single quarter note printed out rather than
something that takes the duration of five times a quarter.

OK, that's probably expected when I consciously enter the above
syntax, but not after conversion from a MIDI file.

I noticed that the whole idea of the asterisk operator is to print a
single unit, but to prolong it in MIDI (or for other purposes). But
there's a lot of inconsistency:
- if I properly enter c2.~ c2, I get c4*5 from the midi conversion
- if I properly enter c2~ c2, I get c1 which is "forbidden" inside 3/4
- if I sloppily enter c4*3 which would typset in a very weird way, it
comes out OK after the conversion as c2.

None of that makes any sense to me.

Sure I can manually fix the resulting plain text file, but I was
wondering if there was really no better way to get this done properly
and automatically.

Thank you,
Mojca

(PS: please CC me in reply.)

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


Re: Asking midi2ly to output pitch names in another language

2016-07-28 Thread Mojca Miklavec
On 28 July 2016 at 12:06, Mojca Miklavec wrote:
> On 28 July 2016 at 11:38, Federico Bruni wrote:
>> Il giorno gio 28 lug 2016 alle 11:01, Mojca Miklavec ha scritto:
>>>
>>> Is it possible to convince midi2ly to output pitch names in, say
>>> \language "deutsch"
>>> ?
>>>
>>> I prefer using "b" to "bes".
>>
>>
>> You can use python-ly to postprocess the .ly file:
>>
>> https://github.com/wbsoft/python-ly
>> http://python-ly.readthedocs.io/en/latest/command.html#commands
>
> Wnderful!!!
>
> I started with my own pyPEG2-based simple parser that I didn't get
> working yet. I'll look into this package. I would need this
> functionality for other ("more advanced") features than just
> transposing & renaming anyway. I hope I get it working according to my
> needs :)

After wasting some time writing a new package for python-ly (just to
realize that the package already existed), translation of pitches
works wonderfully out of the box:

ly-3.5 "translate deutsch" -o new.ly old.ly

So even if Frescobaldi is broken for me at the moment, at least the
command-line tool does the job.

Parsing and doing my own acrobatics by adding buttons will take a bit
longer until I'm able to go into the depths of the documentation.

Thank you,
Mojca

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


Re: Asking midi2ly to output pitch names in another language

2016-07-28 Thread Mojca Miklavec
On 28 July 2016 at 12:20, Federico Bruni wrote:
> Il giorno gio 28 lug 2016 alle 12:06, Mojca Miklavec ha scritto:
>> On 28 July 2016 at 11:46, David Kastrup wrote:
>>>
>>>
>>>  I believe that this sort of pitch/representation manipulation is
>>>  something that the LilyPond editor Frescobaldi is supposed to be pretty
>>>  good at.
>>
>> Thank you, installing it now ...
>> For simple cases like this one and short scores it might be faster
>> than hand-crafing python code. So both advices are useful, thank you.
>
> It's actually the same advice, as Frescobaldi uses python-ly to perform
> those tasks (both are written by the same author.. python-ly was originally
> an internal module of Frescobaldi then it was moved out, as it can be useful
> as an independent tool).

Thanks a lot for explanation.

In any case I'm currently unable to run Frescobaldi. I opened a ticket
https://github.com/wbsoft/frescobaldi/issues/843

I'm just reading

http://www.wefearchange.org/2012/06/the-right-way-to-internationalize-your.html

Mojca

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


Asking midi2ly to output pitch names in another language

2016-07-28 Thread Mojca Miklavec
Hi,

Is it possible to convince midi2ly to output pitch names in, say
\language "deutsch"
?

I prefer using "b" to "bes".


Also, is it possible to get the output in something like
\fixed c'
?

Those problems are not something that I couldn't solve by either
manually editing the scores or writing a simple script to do it for me
or by transposing the melody one octave lower and run the scores
through another cycle of lilypond->midi->lilypond cycle. It's just a
convenience.

Thank you,
Mojca

(Please CC me.)

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


Re: More problems with hor. alignment of button numbers when misusing lyrics (for accordion)

2016-07-27 Thread Mojca Miklavec
On 26 July 2016 at 21:21, David Nalesnik  wrote:
> On Tue, Jul 26, 2016 at 1:23 PM, David Nalesnik
>  wrote:
>> On Tue, Jul 26, 2016 at 1:01 PM, David Nalesnik
>>  wrote:
>>> On Tue, Jul 26, 2016 at 12:52 PM, David Nalesnik
>>>  wrote:
>>>

 Something is messed up.

>>>
>>>
>>> Same results in 2.18.2 and 2.19.45 (Win10)
>>>
>>
>> Adding
>>
>> \set Lyrics.lyricMelismaAlignment = #CENTER
>>
>> appears to do the trick.  Have to do some more study of Lyric_engraver
>>  to understand why and if this makes any sense whatsoever.
>>
>
> *Arghh*
>
> As we read in 
> http://lilypond.org/doc/v2.19/Documentation/notation/techniques-specific-to-lyrics:
>
> "Note: do not use an underscore, _, to skip notes – an underscore
> indicates a melisma, causing the preceding syllable to be
> left-aligned."

Thank you. I went through that page a couple of times, but at the time
I read it I wasn't even sure what melisma was.

> This is exactly what happens. Here, the topmost LyricText is
> interpreted as the end of a melisma, and so left-aligned.

Ahem ...

--
On 16 July 2016 at 00:17, David Nalesnik wrote:
>
> BTW, you have numerous warnings about LyricText caused by using ""
> instead of an underscore for skips.  Corrected.
--

> Use \skip instead of _ and your problem is solved.

This solves the problem. Interesting enough though, the underscore
keeps (mis)aligning the text even if put in the next bar. Not that
this is a problem. I'll try to consistently enter skips instead of
"_", at least until I find a way to enter bottom-aligned column in
some "humane" way. Initially I was using empty strings, but I was told
that this was bad :)

(I still don't quite understand the logic behind LilyPond's
determination of spacing between staves when some "lyrics" is missing.
This was part of the problem that David K. was confused about at well.
But that's a different question.)

In any case ... the horizontal alignment works now.

Thank you,
Mojca


buttons-in-text.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Midi entry

2016-07-27 Thread Mojca Miklavec
On 27 July 2016 at 10:22, Richard Shann wrote:
> On Wed, 2016-07-27 at 00:25 +0200, Mojca Miklavec wrote:
>> On 26 July 2016 at 17:01, Richard Shann wrote:
>>
>> I realized that Denemo comes as a binary for Mac, so I tested it now,
>
> I wonder on which file?

The one I sent you / the one you mentioned below.

>> but it doesn't seem to like the original MIDI file. Not being familiar
>> with its GUI interface, I'm completely confused, but after importing
>> the MIDI and pressing play, I get some semi-nonsense out of it.
>
> with the "Se kiklco prodala bom.MID" file you sent it would not load at
> all, because it didn't like .MID, changing that to .mid it loaded and

This wasn't a problem on Mac :)

> then I got the semi-nonsense you describe here:

OK, so at least we are on the same page :)

> yes, it seems to have nothing for chord recognition, well, it must have
> recognized the chords as it has ignored the higher notes rather than
> linearizing them (MIDI does not represent chords, it just puts all the
> notes of the chord in one after the other with hopefully the same or
> similar timings - Denemo must be noticing the same timings and
> over-writing the note, which surprises me).
>>  it linearizes stuff, so I get weird alterations between
>> the basses and the main melody
>
> yes, I heard that - again it is not so much Denemo that is linearizing
> something, just that the bass and melody notes are in alternating
> positions on the same track

I'm just saying that midi2ly did a much much better job.

>> but there is something horribly wrong with the import.
>
> yes! I'm fairly sure it is cruder than midi2ly, just a few lines of C I
> think. But it does occasionally do the job - as in the first example of
> yours that I tested, where I only had to delete the top staff and change
> the Tenor and Bass to Bass clef to get a plausible score.

What I provided was output from midi2ly from exactly the same midi file.

I don't mind that much if I have to go through midi2ly -> (some manual
editing) -> lilypond -> denemo -> (more manual editing) -> lilypond.
But I guess I'll try to finish a crude the parser for lilypond
notation and then do my own trickery with it, to suit the needs of the
current problem at hand.

(Or I might try a few more midi readers / interpreters / converters.)

Mojca

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


Re: Midi entry

2016-07-26 Thread Mojca Miklavec
On 26 July 2016 at 17:01, Richard Shann wrote:
> On Tue, 2016-07-26 at 15:45 +0200, Mojca Miklavec wrote:
>
> I think the first track is just being used to vary the tempo. Whether
> that is because it originated in a human performance (it would be a
> sophisticated program that generated this in that case)

Yes, I agree :)
I suspect computers ...

> or some sort of
> human-modified MIDI performance (you could easily "conduct" a MIDI
> performance causing the tempo to vary throughout and record the modified
> MIDI by adding a track with the tempo changes that you conducted).
>
>> In any case, I got reasonable output for at least some midi files with
>>
>> midi2ly -a --duration-quant=16 --key=-1 --start-quant=16 file.midi
>
> Interestingly, Denemo creates reasonable output straight out of the box
> - in many ways a measure of its crudity - it ignores all those tempo
> changes and so you get one empty staff and then the four parts. If that
> was a hard as it got, you could write a script to output the parts into
> your own templates quite easily.

I realized that Denemo comes as a binary for Mac, so I tested it now,
but it doesn't seem to like the original MIDI file. Not being familiar
with its GUI interface, I'm completely confused, but after importing
the MIDI and pressing play, I get some semi-nonsense out of it. It
doesn't seem to be able to handle chords at all (it just ignores the
upper pitch), it linearizes stuff, so I get weird alterations between
the basses and the main melody (with durations of 8. instead of 4 and
2), but the timings are all wrong. Not wrong in the sense of wrong
quantisation, but there is something horribly wrong with the import.

By picking a guided import it does something completely different, but
still completely useless.

Mojca

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


Re: Midi entry

2016-07-26 Thread Mojca Miklavec
Hello,

Just before I give up about midi2ly:

On 22 July 2016 at 17:50, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> That said, I wouldn't mind suggestions for some good OpenSource (GUI)
>> MIDI editors. I have a bunch of weird MIDI files that I would like to
>> turn into scores. They sound OK, but I'm not exactly sure if they were
>> just obfuscated on purpose or if they are recordings of "human
>> players" and thus the timings are some horrible (i)rational numbers.
>
> midi2ly is unsuitable for quantizing human play.  It's really just a
> software-produced Midi reimporter.
>
>> I did try to play with different settings of midi2ly, but didn't yet
>> find the magic recipe for fixing the timing of those (obfuscated?)
>> MIDIs.
>
> No, it's just that midi2ly's quantizer is just not for human play.

The problem is that this is what I'm getting in the *.ly file:

trackAchannelA = {
  \key f \major
  \time 3/4
  \key f \major
  \tempo 4 = 170
  \tempo 4 = 170
  \tempo 4 = 170
  \skip 4.
  \tempo 4 = 170
  \skip 16
  \tempo 4 = 169
  \skip 16
  \tempo 4 = 168
  \skip 16
  \tempo 4 = 167
  \skip 16
  \tempo 4 = 166
  \skip 16
  \tempo 4 = 165
  \skip 8
  \tempo 4 = 170
  \skip 16*17
  \tempo 4 = 170
  \skip 16
  ...

I would suspect that this looks like obfuscation of the midi file
rather than side-effect of human play, but I could be wrong.

In any case, I got reasonable output for at least some midi files with

midi2ly -a --duration-quant=16 --key=-1 --start-quant=16 file.midi

except that I had to manually delete all those \tempo settings, but
all those super weird durations are now gone. And the flag "-e"
produces faulty output (I wrote to bug-lilypond about that).

I would ask whether there is a way to suppress the zillion of \tempo
lines, but then again I don't really care because all I want to do is
copy the melody to a different file anyway.

I have to keep playing with more MIDI files. The ones I tried last
time were more problematic (or maybe I just didn't get the parameters
right).

There is one last problem though, see the attached example (a
subsection of what was actually generated from a MIDI file). The
channels are mixed. In the attached file midi2ly-example-correct.ly I
manually reshuffled contents to print what I actually want to get
printed. I guess there is no magic trick to fix this kind of grouping?
The second stave can only contain one of the eleven predefined pitches
or chords (either one or three pitches together). I can manually
reconstruct what I want (or potentially write some converter in a
scripting language like python), I just want to make sure that there
is no "magic wand" existing already. At least something like a script
that would put everything including c1 and below to the bass section
and everything above c1 to the main melody.

Thank you,
Mojca

(PS: please CC me in case you reply to this)


midi2ly-example.ly
Description: Binary data


midi2ly-example-correct.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


More problems with hor. alignment of button numbers when misusing lyrics (for accordion)

2016-07-26 Thread Mojca Miklavec
Hi,

Sorry for a bit of "top-posting", but all I wanted was to include some
minor background (started in the thread "Vertical clash of contents").
You can ignore that if you want.

If replying, please CC me.

To summarise again: I want to add button numbers (and optional finger
numbers) on top of pitches (usually one to three buttons at the same
time) to aid diatonic accordion players.

Following David's advice I'm currently misusing the lyrics for that.
But apart from a bug in vertical alignment when the "first syllable"
in the top row is missing (the only workaround I found so far was to
use "-" as the first syllable instead of an empty space), there's
another problem that I just discovered.

Namely, when one chord is played with more buttons/fingers than other
chords inside the same "bar", LilyPond tries to be smart and aligns
the top positions towards other chords where there is presumably more
space. But at the end this looks ugly.

A bit more background:

I would eventually like to be able to do the following:

- Export information (pitch/chord, duration, push/pull direction,
button, finger) from LilyPond input to some plain text (xml or
whatever) format; MIDI is ok to export pitch and duration, but
push/pull direction, button and finger number get lost

- I noticed that one particular school uses a different notation for
buttons. The most widely-spread notation uses A for the first row, B
for the second row, C for the third row. But that other school from
where I got a large collection of hand-written scores uses C for the
first row (for pitch "c"), F for the second row (for pitch "f") and B
for the third row (for "bes/hes"). I would eventually like to be able
to automatically convert from one notation to the other by changing a
single setting. I'm afraid that if button numbers are entered in
lyrics as "B4", it could get slightly more difficult to do the
auto-conversion to "F4".

- Do some consistency check in the same way as bars are entered and
then LilyPond complains loudly in case the durations don't match the
bars that the user entered explicitly. If button number and playing
direction is not consistent with the pitch, I would want a warning
from Lilypond.

- Do some [semi-]auto-conversion (in either direction) between button
numbers and pitches.

- Perhaps omit the staves and print just button numbers and fingers.

- When repeats with alternative endings are involved, I would want to
have the ability to print out the "expanded" version of button
numbers.

- Do other weird stuff with button numbers.

To make it clear: I don't need to do all of that now. Far from that.
But I would like to enter the information in such a way that I
wouldn't have to completely rewrite all the files I'm creating now in
the future when/if I manage to figure out how to do the things
mentioned above.

Until I get a better idea about scheme I started playing with pyPEG2
to parse lilypond input (a limited set of it), so that I could convert
between scores and button names (or reverse), but I'm still having
problems with certain aspects, so the code is not functional yet.

Simon mentioned creating FingeringLineSpanner, but I'm too green to
understand what exactly to do. David was also throwing me some bones
to help me with function to enter the button numbers more
consistently. It's just that this doesn't help me yet.

I don't mind if I get slightly ugly output at the moment that could be
corrected later by adding appropriate functions. But if I enter a
hundred scores now, I would like to be able to use some "magic wand"
to transpose/change/improve all of the scores in a single go a few
years from now. For this reason it is important to me to prepare the
most suitable input now.

Thank you,
Mojca


On 19 July 2016 at 11:17, Mojca Miklavec wrote:
> On 18 July 2016 at 14:55, David Kastrup wrote:
>> Mojca Miklavec writes:
>>
>>> I also totally agree that the fingerings are *the most sensible* place
>>> where this information should be entered. (Placing the information
>>> inside the lyrics is "kind-of horrible" idea, but I don't know how to
>>> achieve the desired layout if I start from fingerings.)
>>
>> I thought that what made you go to lyrics etc was alignment: having
>> everything appear at one height.
>
> Indeed.
>
>>> I would really like all the buttons / fingers to be aligned
>>> vertically, otherwise it looks horrible (I can post the example
>>> again). But if someone can show me how to tweak the fingerings
>>> properly to satisfy my needs, I'll gladly use those instead.
>>
>> I don't think this will work according to your desires, namely providing
>> a semi-independently readable rendering of the button sequences.
>
>> "\\-" = #(defi

Re: Changing and playing a different instrument in MIDI

2016-07-22 Thread Mojca Miklavec
On 22 July 2016 at 11:46, Robert Blackstone wrote:
> On 22 Jul 2016, at 08:51 , Mojca Miklavec wrote:
>
>> Hello,
>>
>> I don't have much experience with MIDI. I just tried all the media
>> players on OS X and realized than only QuickTime Player 7 had some
>> very very basic support for playing MIDI files (I cannot even make it
>> play loud enough, let alone do anything else with it). None of the
>> others I have installed worked (VLC, MPlayerX, QuickTime Player,
>> RealPlayer, ...)
>>
>> So I went on and made a package for TiMidity++ and freepats.
>>
>> The problem is: I'm still unable to figure out how to change the
>> instrument to anything but Piano.
>
> Hello Mojca,
> Although I cannot offer a solid solution for your problem with the instrument 
> playing your midi-file I can suggest a hack or at least a way to get what you 
> want to hear.
>
> By accident I found that when I click on a LilyPond midi-file it opens in 
> Finale, giving me the score and the means to play and change the instrument 
> into whatever I like.
> I guess that as  a "LilyPonder" you don't have Finale but maybe one of your 
> friends has it, who can do it for you and save the audio file with the 
> instrument of your choice.

True: I don't have Finale. I'm not a musician, let alone a composer.
But certainly not someone willing to buy expensive software for what
is a mere hobby. Plus, the "plain text" mode of lilypond offers quite
some benefits over commercial solutions / GUI tools, in particular if
we plan to start some collaboration to create an "open source"
collection of national songs (which could then easily be rearranged,
transposed, etc.).

(If this was a "one time need", I could use the opportunity, but I
cannot beg either you or other human being to keep fixing my midi
files on a regular basis.)

It would also be a nice experiment to figure out how to create a sound
font from recordings of the highest quality instrument.

Off-topic:

That said, I wouldn't mind suggestions for some good OpenSource (GUI)
MIDI editors. I have a bunch of weird MIDI files that I would like to
turn into scores. They sound OK, but I'm not exactly sure if they were
just obfuscated on purpose or if they are recordings of "human
players" and thus the timings are some horrible (i)rational numbers.

A friend of mine also has a midi interface for her accordion and I'm
thinking of asking her to play some of the songs she knows and then
turn them into nicely typeset scores (hoping that there is a way to do
that faster than by asking her to play it slowly and write everything
down as she plays).

I did try to play with different settings of midi2ly, but didn't yet
find the magic recipe for fixing the timing of those (obfuscated?)
MIDIs.

I checked some software websites, but the software usually has to be
compiled/packaged first (I need it for OS X), so I better pick the
best one from the start before spending hours resolving all
dependencies and reporting all the compile problems upstream :)

Reasonably priced commercial software would also be fine.

In any case I'll first try to get a bit more out of midi2ly to see
what can reasonably be done automatically. But I'll ask in a different
thread.

> If necessary I could do it for you.

This could be done once, but not on regular basis, so it doesn't really help.

Mojca

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


Changing and playing a different instrument in MIDI

2016-07-22 Thread Mojca Miklavec
Hello,

I don't have much experience with MIDI. I just tried all the media
players on OS X and realized than only QuickTime Player 7 had some
very very basic support for playing MIDI files (I cannot even make it
play loud enough, let alone do anything else with it). None of the
others I have installed worked (VLC, MPlayerX, QuickTime Player,
RealPlayer, ...)

So I went on and made a package for TiMidity++ and freepats.

The problem is: I'm still unable to figure out how to change the
instrument to anything but Piano.


Here's a minimal example:

\score {
  \new PianoStaff
  <<
\new Voice = "melody" \fixed c'
{
  \set midiInstrument = #"accordion"
  \time 3/4
  f4 g a
}
  >>
  \midi{ \tempo 4 = 100 }
}

But this doesn't help me in any way.

Freepats contains
Tone_000/021_Accordion.pat
so I tried to set the instrument to "021_Accordion", but that one
didn't help either.

It's not neccessarily a LilyPond's fault. It could be that I simply
misconfigured TiMidity++. I would be grateful for any hints about
where to look next.


Another slightly more straightforward question. TiMidity++ reports
Track name: \new:melody
Is there any simple way to change this to something more meaningful?

Thank you,
Mojca

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


Re: Hyphenating words in lyrics across long repeats and across multiple pitches

2016-07-21 Thread Mojca Miklavec
On 21 July 2016 at 11:29, Simon Albrecht wrote:
> On 21.07.2016 03:39, Mojca Miklavec wrote:
>>
>> When I try to start a syllable that continues after the repeat, I have
>> a problem.
>>
>> Lilypond complains loudly:
>>  repeats.ly:24:38: warning: unterminated hyphen; removing
>>
>> Below an example that should read
>> Oh, tralalala! Tralalali!
>>
>> (Of course the hyphen would "kind of" work if I add "li!" at the end –
>> it would pretend as if the word was "Tra -- li" and would place the
>> hyphen to the wrong place.)
>>
>> What's the best recipe to fix such cases?
>
>
> You have to revert to some kind of tricks; in this case, using "Tra -",
> which has the disadvantage of taking the hyphen from the font instead of
> Lily’s engraver tool, so it will probably look slightly different.

Yes, I tried using "Tra-" and noticed that the typesetting was
different (coming from TeX this seems unacceptable :) :) :) :)

OK, I don't mean that seriously. But if this is not easy to handle,
I'm fine with whatever is available and a differently typeset hyphen
is ok.

> See attached.

Thank you.

So I guess that what you wrote me is because "Tra" would normally be
centred on the musical note, but now that a hyphen is considered to be
part of it, it gets wider, so the function shifts the note relative to
lyrics for 0.4 units to the left to compensate.

I cannot decide whether it's more ugly to keep that source code or to
keep a slightly non-central position of the text. I guess it's more
tough to tolerate the ugly source code (plus, if I change the font, I
would have to fix the setting again). But I really like learning a new
trick.

>> Another problem are cases which I would intuitively write
>>  tra -- _ -- la
>>
>> where the first syllable "tra" would be sung across two pitches.
>
> Simple: just omit the second hyphen. Hyphens will be extended to span the
> whole distance until the next actual syllable comes. Same with extenders.

Great, thank you.

Could this be added to documentation, for example somewhere like

http://lilypond.org/doc/v2.19/Documentation/learning/aligning-lyrics-to-a-melody
http://lilypond.org/doc/v2.19/Documentation/notation/techniques-specific-to-lyrics

It really took me quite some time to figure out how to:
- hyphenate world (my initial attempt was a single '-' and perhaps
even without spaces)
- create an extended underline
- skip notes (my initial attempt was an empty string: "")
- create a "syllable" that contains space
- the two problems mentioned above

A zillion advanced techniques are discussed about how to do tricks
with both horizontal and vertical alignment, but some of the above
very simple techniques could probably be explained in a few words even
in the initial tutorial.

Thank you,
Mojca

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


Hyphenating words in lyrics across long repeats and across multiple pitches

2016-07-20 Thread Mojca Miklavec
Hello,

When I try to start a syllable that continues after the repeat, I have
a problem.

Lilypond complains loudly:
repeats.ly:24:38: warning: unterminated hyphen; removing

Below an example that should read
   Oh, tralalala! Tralalali!

(Of course the hyphen would "kind of" work if I add "li!" at the end –
it would pretend as if the word was "Tra -- li" and would place the
hyphen to the wrong place.)

What's the best recipe to fix such cases?

\new PianoStaff <<
  \new Voice = "melody" \fixed c' {
\time 2/4
a2 | a2 |
\repeat volta 2 {
  a4 a4 |
}
\alternative {
  { a4 a4 |}
  { a2 | }
}
\bar "|."
  }
  % the last hyphen after 'Tra" is problematic and gets removed
  \context Lyrics = "lyrics" {
\lyricsto "melody" {
  Oh, tra -- la -- la -- la! Tra --
  % li!
}
  }
>>

Another problem are cases which I would intuitively write
tra -- _ -- la

where the first syllable "tra" would be sung across two pitches. But
if I do the above, the hyphen gets lost and I get "trala" that
looks as if I had two words rather than "tra  -  la" (I can add a full
example if the question is not clear).

Is there any way to get the hyphen back (other than adding an explicit
slur)? If I just add a slur, it would not always work because
different stanzas might be different.

Thank you,
Mojca


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


Re: How to create a thick horizontal line (as its own staff)?

2016-07-20 Thread Mojca Miklavec
Dear David,

On 20 July 2016 at 22:49, David Nalesnik wrote:
> On Wed, Jul 20, 2016 at 10:05 AM, Mojca Miklavec wrote:
>>
>> One further thought.
>>
>> Given that it's super difficult to "transfer" information "across staves" ...
>>
>> Would it be feasible to allow the following input syntax (or something 
>> similar)?
>>
>> melody = { c a c \startPush f g a \stopPush h c d }
>> \new PianoStaff <<
>> \new Voice = "melody" \fixed c' {
>>   \melody
>>}
>>\new Dynamics \with {
>>  \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
>>} {
>>  \melody
>>}
>> >>
>>
>
> With the example I gave above, this would work fine.  The horizontal
> line engraver is only consisted to the Dynamics context, so the
> push/pull events will only produce a line there.  Conversely, the
> Dynamics context won't typeset the notes.

Nice.

> You will run into problems with this approach if you add dynamics to
> your melody, however, since they will of course appear in the Dynamics
> context.
>
> The best solution would be to define your own context.  (Instructions
> for doing this are found here:
> http://lilypond.org/doc/v2.19/Documentation/notation/defining-new-contexts)

Thank you. I skimmed over that text, but had no idea what I could use
it for earlier.

> I've gone ahead and defined an "AccordionPushPull" context which
> modifies the definition of a Dynamics context (definition found in
> engraver-init.ly in the source) to include the horizontal line
> engraver and nothing else.  So you can safely include your melody
> variable and not need to worry about extraneous elements being
> typeset.

Wonderful!
This is s much more elegant than typing it twice. It seems to work
with all the examples I have so far.

> P.S. I've attached two files, showing how you can cut down on the
> clutter in your input file by using an include.

Thank you. I already added the majority in one file, but wasn't sure
about layout / context part. Being able to remove also that makes me
even more happy :)

> Just to demonstrate how you could make an engraver to create different
> behavior, I wrote one to color note heads red.
>
> Add this definition to accordion.ily:
>
> accordionRedPushEngraver =
> #(lambda (context)
>(let ((push? #f))
>  (make-engraver
>   (listeners ((accordion-push-span-event engraver event)
>   (if (= START (ly:event-property event 'span-direction))
>   (set! push? #t)
>   (set! push? #f
>   (acknowledgers
>((note-head-interface engraver grob source-engraver)
> (if push?
> (set! (ly:grob-property grob 'color) red)))
>
> Then add the engraver in example.ly like this:
>
> \new PianoStaff <<
>   \new Staff <<
> \new Voice = "melody" \with { \consists \accordionRedPushEngraver } {
>   \melody
> }

Cool!

That's another very strong reason for wanting to encode the
information just once.
(Not that I would be able to come up with such a definition myself. :)

... Time to head for the next challenge.

Thanks again,
Mojca

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


Re: Defining a function that passes contents between braces to a markup

2016-07-20 Thread Mojca Miklavec
On 19 July 2016 at 14:36, David Kastrup wrote:
>
> Well, let's put this in perspective.  I've been throwing stuff at you
> without the slightest attempt of toning it down to beginners' level,
> basically expecting you to ask back where required.  I cannot remember
> any list newcomer ingest stuff at that rate and level and pump out new
> iterations.  Either our documentation has improved a lot over time or
> you are just good at picking stuff up and secondguessing system design.
> Knowing your background, it's likely more of the latter.

It's just that I want to learn playing the instrument while I still
have some free time and motivation.

But in contrast to say a guitar (where one can find the chords behind
every corner) it's a very specific market because I would mostly like
to learn "national music" (sadly many of the nice songs from elsewhere
might not be "playable" on the instrument) and with such a small
population most of the scores are either:
- handwritten (often in some hardly legible script)
- written without sufficient information or without "playing aid"
- accessible only via "YouTube tutorials" or some software showing the
buttons to be pressed
- super expensive
- very often non-existing

I would like to start with freely accessible (and "editable") scores
of at least the old national songs (with unknown authors, so no
problems with author rights etc.). If enough people contribute, the
collection could grow fast enough.

But:
- I need to do it while I'm still motivated (and before I learn too
much; because then motivation for adding the playing aid will then
decrease :)
- I need a fast and efficient way to enter the scores

Currently I'm able to enter the pitches fast enough, but adding button
names (and the basses) is still a horrible time waster that I want to
avoid and something that should be fixed if I want to continue the
effort. Most likely I will eventually have to use an external program
for "conversion" between pitches and button numbers.

Mojca

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


Re: How to create a thick horizontal line (as its own staff)?

2016-07-20 Thread Mojca Miklavec
Dear David (and others),

One further thought.

Given that it's super difficult to "transfer" information "across staves" ...

Would it be feasible to allow the following input syntax (or something similar)?

melody = { c a c \startPush f g a \stopPush h c d }
\new PianoStaff <<
\new Voice = "melody" \fixed c' {
  \melody
   }
   \new Dynamics \with {
 \override VerticalAxisGroup.nonstaff-nonstaff-spacing.padding = 1
   } {
 \melody
   }
>>

There are modes like "\new RhythmicStaff" that discard half of the
information about the scores.

I would be super happy if there was a way to enter the input
information only once because repeating it twice is calling for
errors. But also because \startPush and \stopPush could then do
different things inside the main melody.

The "\new Voice" could ignore the \startPush/\stopPush directives (or
do something special with them) and "\new Dynamics" could ignore
typesetting the actual musical notes. I don't know how much tweaking
of LilyPond internals would be needed to achieve that though.

Thank you,
Mojca

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


Running midi -> ly conversion

2016-07-20 Thread Mojca Miklavec
Hi,

I wonder if there is any easier (more intuitive) way to run the midi
to lilypond conversion on Mac than

arch -32 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python
/Applications/LilyPond.app/Contents/Resources/bin/midi2ly test.midi

which additionally complains about

/Applications/LilyPond.app/Contents/Resources/bin/midi2ly:945:
RuntimeWarning: Python C API version mismatch for module midi: This
Python has API version 1013, module midi has version 1012.
  import midi

(I didn't try to debug the problem because it was only an annoying
warning, so I ignored it for now.)


1.) Are there any plans to start distributing official 64-bit binaries for Mac?


2.) Are there any plans to allow using Python 3? I initially tried to run

> /Applications/LilyPond.app/Contents/Resources/bin/midi2ly test.midi
  File "/Applications/LilyPond.app/Contents/Resources/bin/midi2ly", line 534
sys.stderr.write ("SKIP: %s\n" % `e`)
 ^
SyntaxError: invalid syntax

Not that Python 3 compatibility would really help here because there
are further problems with the fact that LilyPond ships 32-bit
libraries and has to run on a 64-bit system. But if I manage to
compile lilypond natively, that would help.


3.) Would it be feasible to add a menu entry to the GUI to do the
conversion? Or perhaps at least add an entry about running midi2ly to
http://lilypond.org/macos-x.html


Thank you,
Mojca

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


Re: Defining a function that passes contents between braces to a markup

2016-07-19 Thread Mojca Miklavec
Dear David,

On 16 July 2016 at 09:31, David Kastrup wrote:
> Mojca Miklavec writes:
>>
>> I've learnt some basics of scheme and managed to write some simple
>> functions, but I'm unable to figure out how to write a function that
>> would take all the contents between braces as an argument and return a
>> markup.
>>
>> I would be grateful even if I get just the simplified version working, so 
>> that
>>
>> \A {}
>>
>> would be translated into
>>
>> \markup { \small \override #'(direction . 1) { \dir-column {  } } }
>
> Well, first thing to note is that scheme/music functions do not switch
> modes for their arguments.  So you either need to write something like
>
> \A \markup 
>
> here to get something in markup mode, or be in lyrics mode (which
> interprets  as lyrics), \A should be a markup command and are
> already in markup mode, like \markup \A  .
>
>> I would use this markup as part of the lyrics as in
>>
>> \lyricsto "melody" {
>> \A {foo bar}
>> \A {three short lines}
>> \A {one}
>> }
>
> Ah, we are in lyrics mode already.  That simplifies things.  Your
> arguments will then be of type ly:music? and you'll pick off the
> respective markup from the 'text field of the lyrics.

I'm no more confused than I was before :(

How could I simplify the input in attachment?

>> In a slightly more advanced version it would be nice to be able to type
>>
>> \lyricsto "melody" {
>>   % \command { array of values }
>>   %each entry can have an optional "-"
>>   \A {A1-1}
>>   \A {A1-1 C2-2}
>>   \A {A1-1 C2-2 E2-3}
>>   \A {C2 E2-3}
>>   \A {E2}
>> }
>
> Lyrics mode does not really take text scripts I think.  All of A1-1 will
> likely end up one lyrics syllable.
>
>> So far I came up with a function definition
>>
>> M = #(define-scheme-function (parser location aFinger aButton) (markup? 
>> markup?)
>>   #{ \markup{ \small \bold \with-color #(rgb-color 0.5 0 0) #aFinger
>> \small \with-color #(rgb-color 0 0 0.5) #aButton } #}
>> )
>> that can handle input like
>> \M "1" "A1"
>> and then I would enter multiple lines of lyrics, but this is tedious
>> to write, even more so when the number of lines varies from one pitch
>> to the other.
>
> Strings are the most simple form of markup, but I guess that pretty much
> everything else needs to be explicitly preceded by \markup.  You could
> work here with an optional finger argument as a number:
>
> M =
> #(define-scheme-function (parser location aFinger aButton) ((number?) markup?)
>(if afinger
>#{ \markup{ \small \bold \with-color #(rgb-color 0.5 0 0) #aFinger
>\small \with-color #(rgb-color 0 0 0.5) #aButton } #}
>;; #{ \markup whatever you want here when no finger is given #}
>))
>
> which can handle then both
> \M 1 "A1"
> as well as
> \M "A1"

This doesn't seem to work properly. The number is always treated as
the second argument (markup). See the attachment.

Thank you,
Mojca


function-to-type-multiline-markup-above-scores.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Vertical clash of contents

2016-07-19 Thread Mojca Miklavec
On 18 July 2016 at 14:55, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> I also totally agree that the fingerings are *the most sensible* place
>> where this information should be entered. (Placing the information
>> inside the lyrics is "kind-of horrible" idea, but I don't know how to
>> achieve the desired layout if I start from fingerings.)
>
> I thought that what made you go to lyrics etc was alignment: having
> everything appear at one height.

Indeed.

>> I would really like all the buttons / fingers to be aligned
>> vertically, otherwise it looks horrible (I can post the example
>> again). But if someone can show me how to tweak the fingerings
>> properly to satisfy my needs, I'll gladly use those instead.
>
> I don't think this will work according to your desires, namely providing
> a semi-independently readable rendering of the button sequences.

> "\\-" = #(define-event-function (m) (markup?)
> #{ \tweak text \markup \normal-text #m -1 #})
>
> \relative c' { <f\-"2.B4" a\-"3.B5" c\-"4.B6"> <f\-"2.B4" f'\-"5.B7"> }

Thank you very much for the snippet and for teaching me a new
technique. This is in fact exactly the kind of input I would prefer to
make (at least until I find a way to translate between buttons and
pitches automatically).

But from what I understand one would have to extend lilypond's
functionality to vertically align that text.

Mojca

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


Re: How to create a thick horizontal line (as its own staff)?

2016-07-18 Thread Mojca Miklavec
On 14 July 2016 at 23:59, David Nalesnik wrote:
> On Thu, Jul 14, 2016 at 10:24 AM, Mojca Miklavec wrote:
>
>>> Ah, OK.  Good.  I assumed that the push applied to both staves and so 
>>> should be
>>> centered like many piano dynamics. But as I say I know nothing about
>>> accordion notation!
>>
>> Yes, push applies to both staves of course (with a bit of humour:
>> pushing open part and pulling the other would probably result in
>> translation of the instrument rather than music :) :) :) :).
>
> That puts it into perspective :)
>
>
>> I checked one of the scores I got and the lines are in fact not
>> aligned vertically. They might indeed be "centered in the empty space
>> between the staves", but the effect is not noticeable because the
>> differences in line heights are just minor ones.
>
> I think you will be able to do much more with alignment putting the
> line into its own context.  In the attached example, I
> put it into a Dynamics context.  You have to use spacers to get the
> attachments right--redundant information, but I think that
> the advantages make the extra trouble worth it.
>
> That is if you can come to grips with the complex vertical spacing engine :)

Thank you very much. It took me some time to debug some of my own bugs
in the code, but I managed to typeset a couple of different real
scores successfully with your code.

Apart from the annoyance that it takes some redundant information to
define where the horizontal line should be, the visual output looks
exactly as I want it to be. No "vertical line jumping" (unless really
required) and no undesired clashing with anything from the top or
bottom stave.

>> Thank you. But now the line from the 8th bar on is too close to the
>> bottom stave (and in the second example the last horizontal line is
>> too close to the upper stave).
>>
>> It looks slightly better if I add >c'< to the basses of the first
>> example or >c< to the main melody of the second example.
>
> Again, you have complete control over vertical spacing with the line
> in its own context.
>
> [coloring objects affected by push/pull}
>
>>
>> What I meant was rather the following:
>>
>> \new PianoStaff <<
>>   \new Staff {
>> f'1
>> \startPush
>> f'
>> \startPull
>> f'
>>   }
>>   \new Staff {
>> \clef bass
>> f1
>> f % some magic to make this one red automatically
>> f
>>   }
>>>>
>
> Oh, OK, not trivial at all to do this automatically.  Probably you
> will end up just doing it manually.

Thank you. Given that "\repeat volta" has a way to work properly, I
didn't entirely give up on the idea yet. I now understand that it's
tricky and difficult, but I'll try to keep exploring ...

> Please see the attached example, where I recreate the PNG you attach
> down-thread.  I omitted several elements
> which are easily handled by extra Dynamics or Lyrics contexts.

Thanks again!

>> The "best" scores for beginners contain all of the following elements:
>> - all the pitches in both staves (melody + basses), even if everyone
>> ignores them
>> - all button names for both staves
>> - all finger numbers (at least for the upper stave)
>> - lyrics
>> - playing direction
>
> Thank you for the explanation.  My reaction is that it would be nice
> to be able to present different
> "editions" which provide this and that information but omit details
> which, say, an experienced player wouldn't need.  Judging by the PNG,
> these scores are cluttered and possibly a bit
> overwhelming for the player?

Not entirely joking, but ... experienced players don't need scores :)
They just play :)

Usually the finger numbers are not needed by experienced players.
Those who can read the usual notation (most don't, or at least cannot
do the translation between the accordion buttons and the notation) may
not need the aid of button numbers, but then those people don't need
*anything* beyond the "regular scores". So most users would request at
least the button numbers to be able to learn with ease. (Basses could
also be represented with numbers or names instead of scores to save
space.)

I will try to talk to some teachers and let you know if I find some
examples of music as would be requested by the most experienced
musicians on this instrument.

> I hope that the attached will give you what you need.  It didn't take
> me long at all to recreate what I did of the score example.

Yes, so far this seems to work perfectly well for me.

Is there a chance that after giving it some thought and time to
"ripe", think about potential optimization and configuration, the code
would be included in an official Lilypond library, avoiding the need
to copy-paste all those 200 lines?

Thank you,
Mojca

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


Re: Vertical clash of contents

2016-07-18 Thread Mojca Miklavec
On 18 July 2016 at 14:01, Andrew Bernard wrote:
> Hi Mojca,
>
> Why can’t you simply use the lilypond fingering instruction? You can stack
> fingerings as per your MWE, and they are easy to enter.

1.) I want to enter both finger number *and* button name. So something
like "2 B4" (where 2 is the finger number and B4 is the button name).
In addition it is usually helpful to have a bit more control about
whether or not finger numbers are actually typeset, their style
(potentially different from button name to be distinguishable with
ease) and placement.

I totally agree that fingerings alone are much easier to enter and I
would prefer to be able to write something like

but as far as I understand this is currently not really supported.

I also totally agree that the fingerings are *the most sensible* place
where this information should be entered. (Placing the information
inside the lyrics is "kind-of horrible" idea, but I don't know how to
achieve the desired layout if I start from fingerings.)

2.) Even if I somehow tweak this to work with some complex syntax, it
will look like "drunken lyrics" because I have absolutely no control
of the vertical placement. I would really like all the buttons /
fingers to be aligned vertically, otherwise it looks horrible (I can
post the example again). But if someone can show me how to tweak the
fingerings properly to satisfy my needs, I'll gladly use those
instead.

> I am sorry I have not been following your accordion thread as this is an
> instrument I know nothing about, so I apologise if this idea has already
> been rejected for accordion specific reasons.

There are no "accordion-specific" reasons.

Mojca

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


Vertical clash of contents

2016-07-18 Thread Mojca Miklavec
Hello,

I'm experiencing a weird (ugly) vertical clash inside the scores and
don't quite understand why.

I'm "misusing" lyrics above the stave to add button names. (I
initially tried with "^\markup{}", but didn't know how to vertically
align it.)

The same trick works if the line with lyrics is full, but as soon as I
need to add the third annotation just every now and then (and need to
start an almost empty third line), I get a clash.

I prepared a "somewhat minimal" example in the attachment.

Mojca

PS: please CC me


vertical-clash.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Defining a function that passes contents between braces to a markup

2016-07-15 Thread Mojca Miklavec
Hi,

I've learnt some basics of scheme and managed to write some simple
functions, but I'm unable to figure out how to write a function that
would take all the contents between braces as an argument and return a
markup.

I would be grateful even if I get just the simplified version working, so that

\A {}

would be translated into

\markup { \small \override #'(direction . 1) { \dir-column {  } } }

I would use this markup as part of the lyrics as in

\lyricsto "melody" {
\A {foo bar}
\A {three short lines}
\A {one}
}

In a slightly more advanced version it would be nice to be able to type

\lyricsto "melody" {
  % \command { array of values }
  %each entry can have an optional "-"
  \A {A1-1}
  \A {A1-1 C2-2}
  \A {A1-1 C2-2 E2-3}
  \A {C2 E2-3}
  \A {E2}
}

or something similar and be able to separate the optional number after
the dash and format it differently. But I can live without that extra
feature.


So far I came up with a function definition

M = #(define-scheme-function (parser location aFinger aButton) (markup? markup?)
  #{ \markup{ \small \bold \with-color #(rgb-color 0.5 0 0) #aFinger
\small \with-color #(rgb-color 0 0 0.5) #aButton } #}
)
that can handle input like
\M "1" "A1"
and then I would enter multiple lines of lyrics, but this is tedious
to write, even more so when the number of lines varies from one pitch
to the other.


The example of what I want to achieve is in the attachment.

Any hints greatly appreciated.

Thank you,
Mojca


function-to-type-multiline-markup-above-scores.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: How to create a thick horizontal line (as its own staff)?

2016-07-14 Thread Mojca Miklavec
Here's another examples of scores from someone's homepage:
http://www.stavarmatic.com/wp-content/uploads/2013/10/Moja-brez_0001.png

The order here is:
- figure number for melody
- button name for melody
- pitch for melody
- (lyrics missing)
- button numbers for the basses
- horizontal line (I would put it above button numbers for the basses,
but well ...)
- chords for basses
(no finger numbers for the basses)

Mojca

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


Re: How to create a thick horizontal line (as its own staff)?

2016-07-14 Thread Mojca Miklavec
Hi,

Just as an exercise I went on reading different parts of the manuals
and also came up with an alternative "poor man's" solution that
achieves the desired output, but would be way more tedious to input.
I'm attaching it nevertheless (maybe it turns out that parts of the
complex code could be simplified).

On 14 July 2016 at 14:35, David Nalesnik wrote:
> Hi Mojca,
>
> On Thu, Jul 14, 2016 at 4:41 AM, Mojca Miklavec
> <mojca.miklavec.li...@gmail.com> wrote:
>> Dear David,
>>
>> On 14 July 2016 at 00:01, David Nalesnik wrote:
>>> On Wed, Jul 13, 2016 at 1:58 AM, Mojca Miklavec wrote:
>>>>
>>>> I would like to have:
>>>>
>>>> - a thick horizontal line for "push" and nothing at all on "pull", no
>>>> vertical lines
>>>>
>>>> - it should start and stop at the vertical bar (if the push/pull stops
>>>> at '|', otherwise "cover the appropriate durations" below the pitches)
>>>>
>>>> - probably something like \startPush to start the thick line, then
>>>> perhaps specify the duration with something like "s1 s1", followed by
>>>> \startPull that would disable
>>>> (It would be soo much better if \startPush and \startPull could be
>>>> placed in the first staff with melody, between the pitches, so that
>>>> one wouldn't have to think twice about the proper duration of that
>>>> thick line.)
>>>>
>>>> - the vertical position should be somewhere below the lyrics
>>>
>>> This is a situation which calls for a new Grob.  Unfortunately,
>>> there's no user interface for doing this, but it is possible to mess
>>> with internals and create the following file.  (Which I don't
>>> guarantee :) )
>>
>> Wow! That's a piece of code!
>
> There's a bit of duplication of non-public functions involved in grob
> and event creation here.  If you were going to make a grob the
> accepted way -- i.e, in the code base --, you would thankfully need a
> bit less.
>
> I commented out some stuff that I don't believe is needed here,
> leftovers from the code for drawing text spanners that I adapted.
>
> (I also renamed the engraver.)
>
>
>>
>> Based on your comment
>> % Change vertical position of spanner.  Sorry, not automatic.
>>
>> I just wanted to add that my intention wasn't to put the horizontal
>> line into "arithmetic centre" of the whitespace between the staves.
>> Actually it makes a lot more sense to keep the height of the line
>> pretty much constant within a single line. So it looks better to me
>> when I *remove*
>> \override Staff.AccordionPushSpanner.staff-padding = 2
>> from the middle of the first line.
>>
>> Bottomline: what you thought to be a problem doesn't seem to be a
>> problem at all.
>
> Ah, OK.  Good.  I assumed that the push applied to both staves and so should 
> be
> centered like many piano dynamics. But as I say I know nothing about
> accordion notation!

Yes, push applies to both staves of course (with a bit of humour:
pushing open part and pulling the other would probably result in
translation of the instrument rather than music :) :) :) :).

But I admit that I don't have that much experience with music notation
(and even less with high quality one) nor did I ever play anything
else than some very simple songs on piano, so I don't know how exactly
it is (should be) done there.

To be honest the horizontal line is not the most pleasing one to the
eye, but it's hard to miss :), it seems to be "universally" accepted
among different parts of my country (even when people write just
button names for beginners without proper pitches) and if one gets
lost and wants to restart playing at some point, there's no need to
search back for the last direction changing sign.

It is also possible that they started using a horizontal line just
because that was the easiest thing to draw/add to the scores.

I checked one of the scores I got and the lines are in fact not
aligned vertically. They might indeed be "centered in the empty space
between the staves", but the effect is not noticeable because the
differences in line heights are just minor ones.

>>> As far as position relative to lyrics, it's helpful to know that you
>>> can override the direction property of the spanner.
>>>
>>> This is rough, but hopefully it will get you started.
>>
>> Wonderful. I will need some time to fully digest the code.
>>
>> One minor "problems" I noticed:
>>
>> In the basses I can use
>> f1-4^\markup {"f"

Re: How to create a thick horizontal line (as its own staff)?

2016-07-14 Thread Mojca Miklavec
Dear David,

On 14 July 2016 at 00:01, David Nalesnik wrote:
> On Wed, Jul 13, 2016 at 1:58 AM, Mojca Miklavec wrote:
>>
>> I would like to have:
>>
>> - a thick horizontal line for "push" and nothing at all on "pull", no
>> vertical lines
>>
>> - it should start and stop at the vertical bar (if the push/pull stops
>> at '|', otherwise "cover the appropriate durations" below the pitches)
>>
>> - probably something like \startPush to start the thick line, then
>> perhaps specify the duration with something like "s1 s1", followed by
>> \startPull that would disable
>> (It would be soo much better if \startPush and \startPull could be
>> placed in the first staff with melody, between the pitches, so that
>> one wouldn't have to think twice about the proper duration of that
>> thick line.)
>>
>> - the vertical position should be somewhere below the lyrics
>
> This is a situation which calls for a new Grob.  Unfortunately,
> there's no user interface for doing this, but it is possible to mess
> with internals and create the following file.  (Which I don't
> guarantee :) )

Wow! That's a piece of code!

> The horizontal positioning is automatic.

Wonderful!

> Not so vertical positioning.
> Putting the line midway between the staves automatically is a
> difficult problem, and I don't know enough to solve it.  You can
> override Staff.AccordionPushSpanner.staff-padding to move the line
> vertically.

Based on your comment
% Change vertical position of spanner.  Sorry, not automatic.

I just wanted to add that my intention wasn't to put the horizontal
line into "arithmetic centre" of the whitespace between the staves.
Actually it makes a lot more sense to keep the height of the line
pretty much constant within a single line. So it looks better to me
when I *remove*
\override Staff.AccordionPushSpanner.staff-padding = 2
from the middle of the first line.

Bottomline: what you thought to be a problem doesn't seem to be a
problem at all.

> As far as position relative to lyrics, it's helpful to know that you
> can override the direction property of the spanner.
>
> This is rough, but hopefully it will get you started.

Wonderful. I will need some time to fully digest the code.

One minor "problems" I noticed:

In the basses I can use
f1-4^\markup {"f"}
and the finger position is OK, but \markup{"f"} is placed above the
horizontal line.

This is not critical (yet?).


A few more questions (before I dive into the code):

- Is there any rule or a guideline to decide whether to put repeats
(\repeat volta 2 ...) in the upper or in the bottom stave?

- The way you implemented these lines, is there a way to access the
state (pushing or pulling) in the upper stave? (I would eventually
want to do more complex things with it, but for simplicity let's say
that I would want all the pitches in the upper stave to be red while
pushing, or if I would additionally want to add \upbow or \downbow
symbols in the upper line.) I'm not asking for the code to do the
colouring just yet, I just want to know whether lilypond has access to
the variable that would let me do it at some point.

Many many thanks,
Mojca

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


Re: How to control the placement of symbols (in \mark \markup)?

2016-07-14 Thread Mojca Miklavec
Dear Simon,

On 13 July 2016 at 21:48, Simon Albrecht wrote:
> On 13.07.2016 08:31, Mojca Miklavec wrote:
>>
>> I want to put this sign as the first thing after the bar
>> (or potentially anywhere later between the pitches).
>
> Perhaps you’ll like this function, which I find very convenient:
>
> 
> \version "2.19.45"
>
> after =
> #(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
>#{
>  \context Bottom <<
>#m
>{ \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
>  >>
>#})
>
> { \after 2 \upbow c'1\downbow }
> %

Thank you very much for teaching me a neat trick. I would actually use it as

\relative c'' {
\after 64 \upbow a4 a a a
\after 64 \downbow a a a a
}

With 64 meaning: put as much to the left as possible.

See also
https://lists.gnu.org/archive/html/lilypond-user/2009-10/msg00257.html

This approach is better than
\mark \markup{ \musicglyph #"scripts.upbow" }
in the sense that it puts the glyph to the proper vertical location,
but I would prefer if the symbol was a tiny bit more to the left (to
the left of the pitch).

(Is there a way to put \upbow/\downbow on top of the bar? If not,
"\after 64 \upbow" can do the trick for now.)

I would only like to ask for a bit of explanation of the code to get a
better understanding (being new to the lilypond world).

1.) I understand "\skip $t": make an invisible skip for this duration.
But what is "<> -" following that? An empty chord? What about the
dash?

2.) How exactly does "\context Bottom" work? The best hit I could find was
http://lilypond.org/doc/v2.19/Documentation/notation/contexts-explained
but that's not exactly it.

3.) How much "music" does the "m" variable from the \after function
"digest"? Just a single pitch?

Thank you,
Mojca

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


How to create a thick horizontal line (as its own staff)?

2016-07-13 Thread Mojca Miklavec
Hi,

Following the example to create scores for diatonic accordion as
posted recently by David:

http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-score-for-diatonic-accordion

I would like to get a better understanding of how
\staffTabLine
is created and how it could be improved.


I would like to have:

- a thick horizontal line for "push" and nothing at all on "pull", no
vertical lines

- it should start and stop at the vertical bar (if the push/pull stops
at '|', otherwise "cover the appropriate durations" below the pitches)

- probably something like \startPush to start the thick line, then
perhaps specify the duration with something like "s1 s1", followed by
\startPull that would disable
(It would be soo much better if \startPush and \startPull could be
placed in the first staff with melody, between the pitches, so that
one wouldn't have to think twice about the proper duration of that
thick line.)

- the vertical position should be somewhere below the lyrics

See the attached PNG.

I would be very grateful for some directions ...

Thank you very much,
Mojca

(Please CC me.)
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


How to control the placement of symbols (in \mark \markup)?

2016-07-13 Thread Mojca Miklavec
I'm "misusing" scripts.upbow and scripts.downbow to mark the change of
playing direction (for accordion).

In contrast to the "intended use" where it is used for marking a
single pitch, I want to put this sign as the first thing after the bar
(or potentially anywhere later between the pitches).

I found the syntax in an old post on this mailing list.

But here's an example that demonstrates the problem:

%%%
\version "2.19.44"

<<
  \new Lyrics = "topLyricsII" \with {
\override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \new Lyrics = "topLyricsI" \with {
\override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \new Voice = "melody" \fixed c'
  {
\mark \markup{ \musicglyph #"scripts.upbow" }
a a a a
% How to put this markup lower?
\mark \markup{ \musicglyph #"scripts.downbow" }
a a
\mark \markup{ \musicglyph #"scripts.upbow" }
a a
  }
  \context Lyrics = "topLyricsI" {
\lyricsto "melody" {
  A A A A A A A A
}
  }
  \context Lyrics = "topLyricsII" {
\lyricsto "melody" {
  tra -- la -- la -- la tra -- la -- la -- la
}
  }
>>
%%%

1. The first "upbow" is too far to the left. I want it after "C".

2. The second and third are too far on top. I would want then at the
same height as the first one. I wouldn't mind if the scores would get
wider to get enough space to place that markup between the lyrics
(ideal) or if the melody would be placed higher (less than ideal), but
it's not acceptable to have it so far on top where it's impossible to
see basically "invisible". I also want to have it printed below the
horizontal line for
\repeat volta 2 {} \alternative {{} {}}

(I'm currently misusing lyrics to place button names on top of scores.
I still believe that there should be a better mechanism to do that,
but at the moment I have to live with what I have.)

Thank you,
Mojca


bow-notation.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Generating cropped PDFs

2016-07-12 Thread Mojca Miklavec
On 12 July 2016 at 13:32, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> Hello,
>>
>> I would occasionally like to create cropped PDFs (either entirely
>> cropped or with some reasonable/configurable margin) without having to
>> guess the size of the paper for each snippet.
>>
>> I found a page which seems to contain reasonable answers:
>>
>> <http://superuser.com/questions/96970/lilypond-is-there-a-way-to-auto-crop-the-paper>
>>
>> but:
>>
>> 1.) Even if both -dpreview and \include "lilypond-book-preamble.ly"
>> from the first answer create cropped PDFs, the fonts are screwed up (I
>> get some very weird ugly font). I'm not sure if this is a bug or not.
>
> 2.19.45 got a really bad font bug when creating multiple output files.
> A fix is in the queue.  Revert back to 2.19.44 for now.

Thank you, that solved the problem.

Mojca

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


Re: Position fingerings for diatonic accordion that include button name (not just finger)

2016-07-12 Thread Mojca Miklavec
On 11 July 2016 at 22:44, Carl Sorensen wrote:
> On 7/11/16 12:06 PM, "David Kastrup" wrote:
>
>>I think the fundamental question is how to provide the information.
>>
>>We have a similar choice to make with tablature: enter the musical
>>information, or enter the playing instructions.
>>
>>With tablature, the choice ended up being notes, occasionally helped
>>with string numbers.  Where this "occasionally helped" is not present,
>>you have the advantage of being able to _transpose_ and a new tablature
>>falls out.

Except that this doesn't work with diatonic accordions at all. Except
for some rare occasions it's impossible to get a tablature for a
differently tuned accordion (and differently tuned ones cannot play
together at all).

Here's it's actually the reverse. I would say that it would be
desirable to be able to get proper scores (so that for example a piano
can accompany the accordion player) for a differently tuned accordion
playing on the same buttons. And in this case entering the music with
"buttons" rather than pitches helps.

Anyway, if the user would decide to enter pitches, like , then
this could be played with either <"A4" "A5"> or <"C2" "C3">. Since
LilyPond doesn't have the capability to offer interactive help to the
writer, the lilypond could at best write "either A4 or C2" for  or
the user would have to manually enter the button label. And once the
button label is required, asking to do both becomes very error-prone.

I probably wouldn't mind a mode where I would type , then
LilyPond would provide me both alternatives and write the complete
score for me in "button notation" with alternatives (that would
probably help a lot in the beginning when one doesn't know which
button is which and if one gets the usual scores from somewhere), but
eventually one would have to enter the button names to create
unambiguous tablatures. The best I could do would be something like

or
   
to give a hint to LilyPond that the outermost row should be used for
that particular pitch and it would then use "A4" and "A5" instead of
"C2" and "C3".


Also: entering the usual pitches is already supported. Maybe the only
thing that's missing is the ability to effortlessly add nicely aligned
tablatures at some places only. But entering button names is not yet
supported and it would be great if there was a way to do it.

>>  You can change the string tuning, and a new tablature falls
>>out.  This would be the same with diatonic accordions: you could change
>>your instrument to one with a different tuning or transpose the melody,
>>and you'd get a new score.  And/or you could change your choice of when
>>to push or pull (assuming notes are available) and you'd get a new score
>>appropriately changed.

I'm a total beginner, but I'm afraid that you think too much from a
perspective of a player of a chromatic accordion :) :) :).

What you are proposing is impossible (or at least very hard) to do
most of the time. Or at least the one doing this must know very well
what he or she is doing. And even then: what prevents LilyPond from
checking whether the song is "transposable" to a differently tuned
accordion even if the input stays in "button names"?

(But yes, I agree, being able to spit the button name suggestions
automatically would be a nice feature in any case.)

> I know nothing about diatonic accordions, but given your comment on this
> it seems that the best approach would be to define an diatonic accordion
> engraver that could take a note together with an accordion description
> (the equivalent of a StringTuning) and automatically spit out the symbol.
> It could be consisted in a new context that is an alias for ChordNames,
> but with the chord-namer function changed to an accordion namer function.
> And if you need the push/pull information to help decide the button you
> could use \downbow and \upbow (at least in the beginning).

I looked at
http://lilypond.org/doc/v2.19/Documentation/notation/displaying-chords
and I like the syntax
\chordmode { c d e }
that automatically generates the whole chord and this seems nice. (I
don't like the fact that one cannot easily do things like {c
\chordmode {c} c d}, but that's ok.)

I made some short "summary" of my type of accordion at
https://github.com/mojca/frajtonarca/tree/master/uglasitve
https://github.com/mojca/frajtonarca/blob/master/uglasitve/basi-crop.pdf
and the same song that I already posted yesterday at

https://github.com/mojca/frajtonarca/blob/master/tablature/ljudske/na-planincah.pdf

(The question mark means that I'm not sure whether this is how the
chord is properly written / how it actually sounds. I was just
blind-guessing.)

It might be easiest to start with the basses than with the melody basses though.

If this feature gets properly supported, it would make sense to
provide some defaults, but it should be straightforward to provide a
definition for the tuning somewhere 

Generating cropped PDFs

2016-07-12 Thread Mojca Miklavec
Hello,

I would occasionally like to create cropped PDFs (either entirely
cropped or with some reasonable/configurable margin) without having to
guess the size of the paper for each snippet.

I found a page which seems to contain reasonable answers:



but:

1.) Even if both -dpreview and \include "lilypond-book-preamble.ly"
from the first answer create cropped PDFs, the fonts are screwed up (I
get some very weird ugly font). I'm not sure if this is a bug or not.

2.) The "convert" command from ImageMagick rasterizes the PDF.

3.) I don't want PNGs.

Using "pdfcrop" from TeX Live does the trick, but I wonder if there is
any obvious way to do it from within lilypond that I overlooked (then
I could also configure the margin).

Thank you,
Mojca

(Please CC me.)

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


Re: Position fingerings for diatonic accordion that include button name (not just finger)

2016-07-11 Thread Mojca Miklavec
On 9 July 2016 at 17:07, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> On 9 July 2016 at 13:25, David Kastrup wrote:
>>> Mojca Miklavec writes:
>>>
>>>> I'm relatively new to lilypond (and new to diatonic accordion).
>>>
>>> Slovenia is a nice area to be in for diatonic accordion, though.
>>>
>>>> I would eventually like to add more automation to write scores for
>>>> accordion, but I need to start somewhere where I can at least get the
>>>> desired output.
>>>
>>> The automation currently available for diatonic accordion sucks (not
>>> even sucks and blows).
>>
>> :)
>>
>>> There is a quasi-ancient example in the manual at
>>> <URL:http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-score-for-diatonic-accordion>.

I tried to reproduce the bold line from the example, but I need to dig
a bit further and get a better understanding of the code to be able to
do it.

I want just a thick line below the lyrics spanning the area where push
is required, no thin line elsewhere or anything else

So for a moment I just used "bow up" and "bow down" notation which I
found in one of the books I just bought.

>> But the example in attachment is a good compromise that allows piano
>> players as well as either type of accordion player (those who prefer
>> reading the usual score and those who prefer just counting buttons) to
>> follow and I see it used here pretty often.
>
> Since it isn't actually a Griffschrift but rather a normal score plus
> additional information, it should actually be easier to target than most
> other diatonic accordion notations.

I'm attaching two examples of a simple song. It's not exactly a
"minimal" example because I wanted to give the impression of how the
complete scores would look like.

Here are some of the suggested approaches:

=== ^\markup{} ===

PRO:
- The button name is written next to the pitch: this makes most sense.
CONTRA:
- I don't know how to align it vertically properly.


I tried to "play" with lilypond a bit further. I went ahead and read
the gentle introduction to Scheme and came up with
"overtext-na-planincah" (in attachment).

AA = #(define-event-function (parser location aButton aFinger) (markup? markup?)
  #{ ^\markup{ \with-color #(rgb-color 0.5 0 0) #aFinger \with-color
#(rgb-color 0 0 0.5) #aButton } #}
)

- I would like to use the function as '\AA{C3 1}' rather than '\AA
"C3" "1"', but don't know how to do it.
- The finger number should be optional and should be a number rather
than markup.

I can now use
<<f4\AA "B4" "2" a\AA "B5" "3" >>
(the idea would be to "auto-generate" the "f" and "a" at some point,
but not just yet as I need to get the proper layout first).

This illustrates the same problem as I mentioned at the beginning
though: I'm unable to align the text vertically.

I saw references to "Voice.Fingering.padding" (section 5.2 Explaining
the Internals Reference) and "self-alignment-Y . 0", but I don't know
how to apply these or whether it makes any difference.


=== lyrics ===

In "na-planincah" I (mis)used the lyrics to typset button names.

PRO:
- nicely aligned vertically
CONTRA:
- super weird to enter when the song contains a mixture of one, two
and three fingers (the third finger in a single pitch would require
the third line of "lyrics", pontentially just for a single pitch)
- it would need some further tweaking of course

Ideally I should figure out how to make a horizontal line to denote a
push/pull, but if current marking stay, they should probably be
printed below finger notation / button names.

=== fingering ===

(adding "-" to the pitch)

PRO:
- allows specifying the finger number (half of the task I want to achieve)
- nice default font :)
CONTRA:
- doesn't let me specify anything else but the finger number alone (or
at least I don't know how to add anything else)
- I don't know how to align it vertically

=== accords ===

I still didn't understand how to apply
\tweak text "D2" c1

I also wasn't able to modify your attachment to suit my needs. In
particular, my attempts screwed up the lyrics (the lyrics was only
applied to pitch names; where names were missing, the lyrics would
skip the pitch).

I can imagine though that it might at some point be useful to support
output similar to

http://sola-diatonicne-harmonike.com/wp-content/uploads/2015/05/IMEJ-ME-RADA-1-ex.jpg

Basically something similar to woodwind diagrams, drawing all the
buttons and coloring the buttons being pressed.

===

I'm open to suggestions for improvements.

(I will soon have to figure out how to automate the input, but that's
for another topic.)

Mojca


na-planincah.ly
Description: Binary data


overtext-na-planincah.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Position fingerings for diatonic accordion that include button name (not just finger)

2016-07-10 Thread Mojca Miklavec
On 9 July 2016 at 17:07, David Kastrup wrote:
> Mojca Miklavec writes:
>
> This mechanism for pulling pitches and making graphics for them can be
> changed into something specific for your task.  However, we need
> additional information because the assignment of buttons to notes is not
> unique and also depends on push/pull.  So the question is how to get the
> information there.

I wanted to leave that for later, but since you started asking in that
direction, let me explain how I imagine to do this (for now with an
external script because I don't understand enough of that weird
programming language used in Lilypond :).

I'm not sure whether there are any substantially different accordions
around the world (not that the instrument is really common elsewhere),
but here most accordions follow more or less the same pattern.

You can check
http://www.harmonika.com/de/lieferbare-tonarten
http://www.harmonika.com/en/tone-types
and pick a 3-row C-F-B (B = Hes), the most commonly used one and the
one for which almost all the scores are written, so the "default"
output would follow that one. (Some basses seem wrong / different than
here and the layout / number of buttons is a bit weird on that
picture, but let's ignore that for a moment.)

The outer row (the top one on the picture) is usually labeled A, the
middle row is B, the bottom row is C, counting starts from head to
knee (on that figure that means from right to left). The three dark
orientation buttons are A6 (c''/h'), B6 (c''/c''), C6 (f''/f'').

I would start by defining all the pitches corresponding to individual
buttons in both directions, so something like:

push:
A0=c A1=e A2=g A3=c' A4=e' A5=g' A6=c'' A7=...
B0=c B1=f B2=a B3=c' B4=f' B5=a' B6=c'' B7=...
C0=f C1=b[es] C2=d' C3=f' C4=b[es]' C5=d'' C6=f'' C7=...

pull:
A0=f A1=g A2=h A3=d' A4=f' A5=a' A6=h' A7=...
B0=e B1=b B2=c' B3=e' B4=g' B5=b[es]' B6=c'' B7=...
C0=a C1=es' C2=f' C3=a' C4=c'' C5=es'' C6=f'' C7=...

All other accordions are just transpositions of these (for example the
next most common one, B-Es-As, is two half-tones lower), something
that Lilypond should be able to handle with ease. But anyone learning
on another type (different tuning) of accordion would normally use the
same learning material and would play the music pressing exactly the
same buttons as on the other types of accordions (some bands bring 4-5
accordions to the concert, so that they can play different songs).

The mapping from buttons to pitches is unique (it's some kind of a
surjective function), but pitches can have different buttons. So I
would prefer to enter buttons rather than pitches (it is of course
possible that two players would press different buttons to play the
same scores, but usually one button is easier to reach).

I would like to enter the music like in the following "pseudocode"
(comments are just for explanation):

\accordionPush
% <bes'4 d''> played with fingers 2 and 3 on buttons C4 and C5
<(C4)4-2 (C5)-3> |
% <a'2 c''> played with fingers 3 and 4 on buttons B5 and B6
% c' played with finger 1 on button B3
<(B5)2-3 (B6)-4> (B3)4-1 |
<(B4)2-2 (B5)-3> <(C4)-2 (C5)-3> |
\accordionPull
% <a'2 c''> played with fingers 1 and 2 on buttons C3 and C4
% <e'4 g'> played with fingers 1 and 2 on buttons B3 and B4
<(C3)2-1 (C4)-2> <(B3)-1 (B4)-2> |
<(B4)2-2 (B5)-3>
...

So from <(C4)4-2 (C5)-3>:
- (C4) would make a lookup in the accordion definition table => bes'
- (C5) would make a lookup in the accordion definition table => d''
- Lilypond would then draw <bes'4 d''> with the following label placed
above the pitch:
3/C5
2/C4

Also:
- The font / color / separator between the finger number and button
name would be configurable.
- Finger number would be optional and could be left out.
- Many teaching materials intentionally mark just the first pitch in
the song, so that the student gradually learns to interpret the scores
himself without the aid. Sometimes the button markings are left out
when changing from push to pull or vice versa because the buttons
should stay pressed, but the pitch changes. So there should be some
way to avoid printing the button names just for some scores.
- It should be easy to create a midi or print out the "proper" scores
for a differently tuned accordion by simply transposing the pitches,
but leaving all button markings the same.

>> Yes, I will need signs for directions (push/pull) etc., but the
>> following snippet could be a better minimal starting point for me:
>>
>> http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-single-staff-template-with-notes-lyrics-chords-and-frets
>>
>> But the example requires specifying real chords. How could I write
>>B3 (with finger 1)
>> without any real meaning or something like
>>1.B3
>> instead o

Re: Position fingerings for diatonic accordion that include button name (not just finger)

2016-07-09 Thread Mojca Miklavec
On 9 July 2016 at 13:25, David Kastrup wrote:
> Mojca Miklavec writes:
>
>> I'm relatively new to lilypond (and new to diatonic accordion).
>
> Slovenia is a nice area to be in for diatonic accordion, though.
>
>> I would eventually like to add more automation to write scores for
>> accordion, but I need to start somewhere where I can at least get the
>> desired output.
>
> The automation currently available for diatonic accordion sucks (not
> even sucks and blows).

:)

> There is a quasi-ancient example in the manual at
> <URL:http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-score-for-diatonic-accordion>.

Thank you. This is a super complex example that I'm unable to
interpret (I would have no idea how to play it before studying it for
a while), but it might become clearer what I want to achieve with the
attachment. I hope that the attached PNG will be OK now. (I never put
images inline and initially wanted to provide an URL to some scores,
but the image on the URL might disappear and the notes for beginners
suggested to add an image next to the minimal example.)

>> Here's an example[1] of the type of scores I would want to typeset (except
>> that these only mention the button name without the finger number):
>
> Your example is not present in the plain text rendition of the mail,
> consequently few people on the list will see it.  Try doing a proper
> Mime attachment, preferably as an in-line part.

I'm really sorry, see above. I'm attaching it now. I'm not sure what
an "in-line part" means though.

> In general, avoid HTML
> mails to the list: many people will not be able to read them and the
> list archives will usually not archive them well.

I always use plain text, but here I screwed up when trying to add an
inline image.

> If you are willing to invest some time (and prod the list for help for
> individual problems: there are a lot of very helpful people and capable
> around here) I am pretty sure that LilyPond can get a lot better for
> diatonics than it is now.

I also have an impression that there are as many different writing
notations as there are teachers :) :) :)

But the example in attachment is a good compromise that allows piano
players as well as either type of accordion player (those who prefer
reading the usual score and those who prefer just counting buttons) to
follow and I see it used here pretty often.

> but there is quite a lot of potential for good return on moderate
> investment of time.

I hope so :)

> As an initial keyword to look for: you'll want to go with a ChordNames
> context or Lyrics for aligned material I think.

OK, ChordNames might work.

It won't allow for the super intuitive writing because then durations
have to be specified twice. It would be more sensible to combine the
"Chord" with the "pitch", but the Chords might be a good start.

I'm still a bit confused though about how Chords work.

Yes, I will need signs for directions (push/pull) etc., but the
following snippet could be a better minimal starting point for me:

http://lilypond.org/doc/v2.18/Documentation/snippets/templates#templates-single-staff-template-with-notes-lyrics-chords-and-frets

But the example requires specifying real chords. How could I write
   B3 (with finger 1)
without any real meaning or something like
   1.B3
instead of "C"? Or a "stacked" example
3.B5
2.B4
in place of another chord?

> Nice to see you here!

Yes, we miss you a lot too at the Polish bonfires :)

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


Position fingerings for diatonic accordion that include button name (not just finger)

2016-07-09 Thread Mojca Miklavec
Hello,

I'm relatively new to lilypond (and new to diatonic accordion).

I would eventually like to add more automation to write scores for
accordion, but I need to start somewhere where I can at least get the
desired output.

I would like to make a "fingering" sign above every single pitch, but I
want to include the marking of the button that has to be pressed, not just
the finger number.

Here's an example[1] of the type of scores I would want to typeset (except
that these only mention the button name without the finger number):



Lilypond seems to support fingering with an easy syntax:

\version "2.18.2"
\relative c' {
  \key f \major
  { f4-2 a-3 c-4 e-5 |
<> |
<>
<>
  }
}

but the problem is that adding the button name seems non-trivial (I would
probably have to figure out how to properly change the font) and might
shift the label.

I want to keep all fingering marks (and button names) in the same row / at
the same height. There might of course be a different number of fingers
required in which case the bottom ones should remain in the same line and
the others should stack on top.

Here's my first naive attempt:

\version "2.18.2"
\relative c' {
  \textLengthOn
  \key f \major
  { f4^\markup { "2.B4" }
a^\markup { "3.B5" }
c^\markup{ "4.B6" }
e^\markup { "5.B7" } |
<> |
<>
  }
}

but it looks awful because the marking are jumping up and down (at least
it's slightly better with \textLenghtOn than without it) when I would
actually want to have them nicely aligned.

It would certainly be better to have a clear separation between the finger
number and button name, like a different font or colour for finger number
(current font for finger number is perfect, but button name probably needs
a different one). But that is secondary, I first need to figure out how to
align them properly. I would like to keep the two (finger number, button
number) next to each other, possibly separated with a dash/dot/slash or
something similar.

Maybe I could add those markings as some kind of a "separate voice",
similar to lyrics, only on top?

I saw
http://lilypond.org/doc/v2.18/Documentation/learning/moving-objects
but I'm too fresh to understand what it's suggesting me to do.

I would be grateful for any hints about how to achieve best results for
what I want to do.

Thank you very much,
Mojca

PS: Please CC me.

[1] from L. Slak: Čebelar
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Converting music files in Windows

2005-09-22 Thread Mojca Miklavec
Ben van Zanten wrote:

 I don't know were to find python…

You can hardly miss it. http://www.python.org/download/

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


Re: Lilypond for Windows 2.5.28 - Guile error

2005-09-20 Thread Mojca Miklavec
Jan Nieuwenhuizen wrote:
 Mojca Miklavec writes:
 
  http://article.gmane.org/gmane.comp.tex.context/22512. Well, the
  script calls lilypond filename.
 
 Maybe it should call $(which lilypond) filename.
 
  Why doesn't it happen already at the installation time then?
 
 Because I do not know how to do that, and none of the core developers
 use windows or knows very much about it.
 
 I tried using BAT wrappers to fix this problem of installation time
 prefixes, but that was a complete and utter disaster.  I had quite
 some help and input from windows users/programmers, but we could not
 manage to produce something that would work on more than one flavour
 of windows.

Just to make sure: does that mean that something like:

# in file lilypond.bat somewhere in PATH:
C:\progs\lilypond\usr\bin\lilypond.exe %1 %2 %3 %4 %5 %6 %7 %8 %9

doesn't work on older versions of windows (or that it reduces/badly
influences the lilypond functionality)? For simple cases it seems to
work on XP. I can perhaps try it on windows 98, but I would have to
search for windows 95 slightly longer. (I guess that lilypond.bat also
has to be placed somewhere else than lilypond.exe then.)

Thank you,
Mojca


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


Re: Lilypond for Windows 2.5.28 - Guile error

2005-09-16 Thread Mojca Miklavec
Jan Nieuwenhuizen wrote:
 Mojca Miklavec writes:
 
  E:\Mojcaset LILYPOND_VERBOSE=1
  E:\Mojcalilypond
  warning: argv0 relocation: argv0=lilypond, prefix=/usr/share/lilypond/2.6.3
 
 Can you try with the absolute file name (c:/Program 
 Files/LilyPond/usr/bin/lilypond.exe --verbose), or running from bash?

This solves it! If I call lilypond with the whole path, it works (but
it should be working also when calling lilypond alone). I can modify
the module which calls lilypond to fit my installation, but it won't
work for the others.

 Running from bash, I get

Here's my output if it can help you to discover the problem. I guess
that I manually added lilypond to the path, but why does it add itself
once more when running it (it should be either added at installation
time or not at all)?

Thank you,
Mojca


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

E:\set LILYPOND_VERBOSE=1

E:\lilypond
warning: argv0 relocation: argv0=lilypond, prefix=/usr/share/lilypond/2.6.3
warning: no such file: /etc/fonts/fonts.conf
warning: no such directory: /share/ghostscript/8.15/fonts
warning: no such directory: /share/ghostscript/8.15/Resource
warning: no such directory: /share/ghostscript/8.15/lib
warning: no such directory: /share/gs/fonts
warning: no such directory: /share/gs/Resource
warning: no such directory: /share/gs/lib
warning: no such directory: /share/guile/1.7
warning: no such file: /etc/pango/pangorc
warning: no such directory:
GNU LilyPond 2.6.3
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file ice-9/boot-9.scm in load path



E:\c:\Programme\LilyPond\usr\bin\lilypond.exe
warning: argv0 relocation:
argv0=c:\Programme\LilyPond\usr\bin\lilypond.exe,
prefix=/usr/share/lilypond/2.6.3
warning: no such directory:
c:/Programme/LilyPond/usr/share/ghostscript/8.15/fonts
warning: no such directory:
c:/Programme/LilyPond/usr/share/ghostscript/8.15/Resource
warning: no such directory: c:/Programme/LilyPond/usr/share/ghostscript/8.15/lib
warning: no such directory: c:/Programme/LilyPond/usr/share/gs/Resource
GNU LilyPond 2.6.3

LILYPOND_DATADIR=/usr/share/lilypond/2.6.3
LOCALEDIR=/usr/share/locale

Effective prefix: c:/Programme/LilyPond/usr/share/lilypond/2.6.3
FONTCONFIG_FILE=c:/Programme/LilyPond/usr/etc/fonts/fonts.conf
GS_FONTPATH=c:/Programme/LilyPond/usr/share/gs/fonts;C:\WINDOWS/fonts
GS_LIB=c:/Programme/LilyPond/usr/share/gs/lib
GUILE_LOAD_PATH=c:/Programme/LilyPond/usr/share/guile/1.7
PANGO_RC_FILE=c:/Programme/LilyPond/usr/etc/pango/pangorc
PATH=c:/Programme/LilyPond/usr/bin; [REMOVED]; C:\programme\lilypond\usr\bin
Initializing FontConfig...
adding font directory: c:/Programme/LilyPond/usr/share/lilypond/2.6.3/fonts/otf/
adding font directory:
c:/Programme/LilyPond/usr/share/lilypond/2.6.3/fonts/type 1/
adding font directory: c:/Programme/LilyPond/usr/share/lilypond/2.6.3/fonts/svg/
Usage: lilypond [OPTION]... FILE...

Typeset music and/or produce MIDI from FILE.

LilyPond produces beautiful music notation.
For more information, see http://lilypond.org

[HELP REMOVED]

E:\


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


Re: Lilypond for Windows 2.5.28 - Guile error

2005-09-16 Thread Mojca Miklavec
Jan Nieuwenhuizen wrote:
 Mojca Miklavec writes:
 
  This solves it! If I call lilypond with the whole path, it works (but
  it should be working also when calling lilypond alone). I can modify
  the module which calls lilypond to fit my installation
 
 Ok, great.
 
  , but it won't work for the others.
 
 What others?

Just as an example:
Someone has written (still preliminary) support for LilyPond inclusion
to ConTeXt (alternative to LaTeX), see
http://article.gmane.org/gmane.comp.tex.context/22512. Well, the
script calls lilypond filename. Whoever wants to use this script,
has to dig into the source and modify the line calling lilypond to
match his own installation path. (In Linux this is not a problem at
all.)

But it's not only because of this single exception that may be used by
some tens of people, out of which most use Linux. This looks like a
lilypond misbehaviour (It may be that it's Microsoft's fault, but you
can't make anything about it). You can't expect a programmer writing
some piece of software which uses LilyPond to write:
if OS == windows
find the path where lilypond resides and call it with the whole path

I don't even dare to start thinking what would happen if the path
would have to be hardcoded for a GhostScript call.

 That is for other programs in the lilypond bin directory.

Why doesn't it happen already at the installation time then? People
should be able to call lilypond from command line anyway.

Thank you very much for the hint anyway, it will do for now, but it
would be great if this could be fixed in the future releases.

Mojca


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


Re: Lilypond for Windows 2.5.28 - Guile error

2005-09-15 Thread Mojca Miklavec

Hello,

Has this thread:

http://lists.gnu.org/archive/html/lilypond-user/2005-06/msg00225.html

already been solved? I have the same problem. I have ...lilypond\usr\bin 
in path and I have also tried to set LiLYPOND_DATADIR (to 
...lilypond\usr\share\lilypond\2.6.3) and GUILE_LOAD_PATH (to 
...lilypond\usr\share\guile\1.7), but without any success. LilyPond on 
the desktop works perfectly, but I cannot call it from command line 
(which I need in order to be able to use it inside ConTeXt).


(I first tried it with the version 2.7.7 and then thought that the error 
may be due to a recently introduced problem and switched back to 2.6.3, 
but the behaviour didn't change.)


Thank you very much,
Mojca Miklavec



Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

E:\Mojcaset LILYPOND_VERBOSE=1

E:\Mojcalilypond
warning: argv0 relocation: argv0=lilypond, prefix=/usr/share/lilypond/2.6.3
warning: no such file: /etc/fonts/fonts.conf
warning: no such directory: /share/ghostscript/8.15/fonts
warning: no such directory: /share/ghostscript/8.15/Resource
warning: no such directory: /share/ghostscript/8.15/lib
warning: no such directory: /share/gs/fonts
warning: no such directory: /share/gs/Resource
warning: no such directory: /share/gs/lib
warning: no such directory: /share/guile/1.7
warning: no such file: /etc/pango/pangorc
warning: no such directory:
GNU LilyPond 2.6.3
ERROR: In procedure primitive-load-path:
ERROR: Unable to find file ice-9/boot-9.scm in load path

E:\Mojca


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