Samuel DA MOTA | 30 Sep 22:36 2014
Picon

Overriding internal functions?

Hi,

I'd like to modify a function's body in ly-syntax-constructors.scm
Is there a way to override the function without touching that file?

I'm only looking to change the repeat command from

(define-ly-syntax-simple (repeat type num body alts)
  (make-repeat type num body alts))

to

(define-ly-syntax-simple (repeat type num body alts)
  (unfold-repeats (make-repeat type num body alts)))

Regards,
--
Sam
Karol Majewski | 30 Sep 20:53 2014
Picon

how to compile many .ly files with one command

Hi

I have over 50 .ly files in one directory. Compiling them with:

lilypond file1.ly
lilypond file2.ly

etc...

... is very time consuming ;)

Is there something like: 'lilypond all'?

--Karol
Jacques Menu | 30 Sep 19:35 2014
Picon

Tool to remove transpositions from LP source code

Hello folks,

After scanning music, I noticed very late in the process of handling it with LP that some treble_8 clefs had
been mistaken to « french » ones.

I’ve thus had to use transposition for some bars, such as in the example below.

Is there a command that can take this code as input and remove the transposition, producing code that 
produces the same score? The output can be relative or absolute.

Thanks if you can help!

JM

%%%%%%%%%
\version "2.18.2"

Tenor = \relative d' {
\override Score.BarNumber.break-visibility = #all-visible

\clef "treble_8"
\key g \major \time 3/4

a8 [ ( b8 ] c4 ) c4 | % 2
b2 e8\noBeam d8 | % 3

% \clef "french"
\transpose g e' {
  r4 g4 cis4 | % 4
  d8\noBeam d8 d4 r4 | % 5
(Continue reading)

Knute Snortum | 30 Sep 17:20 2014
Picon

Stopping LilyPond from merging a note head and rest

I am getting the message, "warning: cannot have note heads and rests together on a stem" in the code below.  I want the g-sharp, e chord to line up with the bass b-flat and the inner voice's rest on the first beat to be shifted a little to the right.  I have tried shifting the rest and the chord, and using force-hshift, but LilyPond seems to always want to merge the chord and the rest.  Suggestions?

%%% -- Begin
\version "2.18.2"
\language "english"

shiftRest = \once \override Rest.X-offset = #1

global = {
  \time 2/4
  \numericTimeSignature
  \key c \major
}

upperStaffTop = \relative c'' {
  <<
    {
      s4 <d d'>8 r |
      <d' d'>8 r r4 |
    }
    \\
    {
      \shiftRest r4 d,,8 r |
      d'8 r r4 |
    }
  >>
}

upperStaffBottom = \relative c'' {
  %% "warning: cannot have note heads and rests together on a stem"
  \shiftOn <e gs>2 \shiftOff |
  s2 |
}

lowerStaffTop = \relative c' {
}

lowerStaffBottom = \relative c, {
  bf2 ~ |
  bf2 |
}

upperStaff = {
  \clef treble
  \global
  << { \upperStaffTop } \\ { \upperStaffBottom } >>
}

lowerStaff = {
  \clef bass
  \global
  << { \lowerStaffTop } \\ { \lowerStaffBottom } >>
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upperStaff
    \new Staff = "lower" \lowerStaff
  >>
  \layout {
  }
  \midi {
  }
}
%%% -- End

Knute Snortum
(via Gmail)
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Joshua Nichols | 30 Sep 03:00 2014
Picon

Bounty for Fixing Ligature Bug?

I am not astute nor a programmer to know even how to begin fixing this issue. I know it has been discussed as a possible limitation of the pango. However, it seems that it works on some systems and others not.

What has to be done to fix the issue?

What would be an appropriate bounty to have this issue fixed?

Best,

Josh
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Samuel DA MOTA | 29 Sep 21:34 2014
Picon

Event-listener and repeats

Hi,

I've some question regarding the use of the event-listener.

Is it possible to get the event-listener run after unfolding the repeats
on the music sheet?

To clarify, on the following example:

============= Lilypond file =========
\version "2.18.2"

main = {
  a \repeat volta 2 { b c }
}

\score {
  \main
}
=====================================

The event-listener will only "see" three notes and will output the
following

========
0.00000000      note    57      4       0.25000000      point-and-click 2 4
0.25000000      note    59      4       0.25000000      point-and-click 22 4
0.50000000      note    48      4       0.25000000      point-and-click 24 4
========

On the midi file, there is five notes being played, hence the output of
the event-listener does not match it (because of the repeats).

What I'd like to see

========
0.00000000      note    57      4       0.25000000      point-and-click 2 4
0.25000000      note    59      4       0.25000000      point-and-click 22 4
0.50000000      note    48      4       0.25000000      point-and-click 24 4
0.75000000      note    59      4       0.25000000      point-and-click 22 4
1.00000000      note    48      4       0.25000000      point-and-click 24 4
========

So, is it possible to first unfold all the repeat,
and then have the event-listener see all of this?

A two-steps solution would be ok for me.
Like, first reading the music and apply the unfold-repeat scheme
function to generate an equivalent lilypond file with no repeat in it.

Also since lilypond do unfold the music when generating the midi file,
is there a way to change the midi generator to produce a file like the output of the event-listener?

Regards,
--
Sam
Peter Crighton | 29 Sep 20:50 2014
Picon

Unexpected TabStaff creation

I’m pretty sure this is not expected output, is it? (See attached image.)

\version "2.19.13"

<<

  \override TabStaff.Stem.stencil = ##f

  c'1

>>


This seems to occur with every kind of TabStaff override.

In the score I was working on the TabStaff didn’t show, but when I was removing the Clef_engraver in my (non-Tab) staff, there was still the same amount of space in the front, and the time signature didn’t move to the beginning of the line. I narrowed the problem down to the above scenario, but don’t know yet why the TabStaff didn’t show in my score, only the spacing problem. As if there was an invisible TabStaff present, that didn’t take any space.

--
Peter Crighton | Musician & Music Engraver based in Mainz, Germany
http://www.petercrighton.de
_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Paul Tannous | 29 Sep 05:00 2014
Picon

LilyPond Enhancement Proposal (with Bounty)

LilyPonders:

We are part of a startup company that wants to put LilyPond-generated 
musical scores on tablets. We believe this will allow users to have 
beautiful, readable scores on tablets and spread the usage of LilyPond to a 
wider audience. We have completed the first version of an Android 
application that does this. It dynamically repaginates the music score to 
fill the tablet screen, and it supports written annotation. 

We have a series of programs that run on a Mac or PC to generate the scores 
to be rendered on tablets of different screen sizes. A tablet-format score 
of our own design is built from LilyPond-generated score images so a tablet 
page of any size or orientation can be built dynamically, using note sizes 
that will be readable. If you’ve seen PDF scores reduced and displayed on 
tablets, you’ll understand why we think we have a better approach.

Creating our tablet-format scores to support dynamic repagination means we 
have to take steps to avoid having text directly above and below each of 
the measure bars. We add measure bars back when rendering each line and 
vary the bar widths in addition to adding space to fill out the lines. So 
any text (tempo, dynamics, pedal instructions, etc.) spanning measures 
would be split, pixels lost, and unwanted spacing added. We avoid this now 
by writing the LilyPond source to avoid text above or below the measure 
bars.  However, this can be painstaking and time-consuming work. 

We would therefore like to see an option added to LilyPond, that could be 
set before processing, that would avoid placing text above or below measure 
bars.

We believe there must be code already in the engravers to avoid splitting 
text over measures at line ends. So, we are hoping our proposed enhancement 
would be an extension of that code.

We would be willing to pay a bounty to have this feature added if no one 
else is interested in this functionality, but we have no idea of how much 
effort would be required. We would like to have some feedback on how long 
this would take and what someone who could do it would charge for the 
effort.

_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
David Nalesnik | 28 Sep 23:24 2014
Picon

Re: Thanks to David Nalesnik and Jan-Peter Voigt

Hi Jay,


On Sun, Sep 28, 2014 at 3:29 PM, Jay Vara <jay <at> diljun.com> wrote:
David,

If I use the compound meter which has a (1 4) as one of the moments, it does not work. It seems to be treated as a (2 4). Actually, I think the Completion_heads_engraver may be the one with a problem. I checked by varying the music and for situations where the Completion_heads_engraver did not  have to create a tie in the (1 4) measure, it was OK. 

meter = #'((7 4) (1 4) (2 4))


I
This makes my head hurt, and my reasoning may need straightening out...

Taking a shorter example:

 meter = #'((3 4) (2 4))

used with

music = {
  \compoundMeter #meter
  \relative c' {c1 c4}
}

suggests to me that the problem happens when the engraver doesn't successfully reset the meter.

The log for the above values is:
bnum = 1 measurelength #<Mom 5/4>
bnum = 2 measurelength #<Mom 3/4>
bnum = 2 measurelength #<mom 1/2>
bnum = 3 measurelength #<Mom 1/2>

So measureLength of the first bar is 5/4--that is, the sum of the terms of the compound meter, which is what was assigned by \compoundMeter #meter. The meter has not been reset.

There needs to be a second note within the proposed first division of 3/4 for the new meter to take effect.

meter = #'((3 4) (2 4))

\relative c' {c2 c2}

The log shows that the measureLength of the first measure is reset:

bnum = 1 measurelength #<Mom 5/4>
bnum = 1 measurelength #<Mom 3/4>
bnum = 2 measurelength #<Mom 3/4>
bnum = 2 measurelength #<mom 1/2>

At the moment, my head is too tangled up to do something positive with this information.  I hope it will help, in any case.

--David. 


_______________________________________________
lilypond-user mailing list
lilypond-user <at> gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user
Kieren MacMillan | 28 Sep 19:18 2014
Picon

can a context change staff-affinity in a frenched score?

Hi all,

Given

  \new ChoirStaff <<
    \new Staff
    \new Lyrics
    \new Staff
  >>

Can the Lyrics have staff-affinity = #CENTER when both Staff contexts are alive, and staff-affinity = #UP
or #DOWN when the lower or upper Staff, respectively, is frenched? I’m using the latest development
build, if it makes any difference.

Thanks,
Kieren.
_______________________

Kieren MacMillan, composer
www:  <http://www.kierenmacmillan.info>
email:  info <at> kierenmacmillan.info
Jay Vara | 28 Sep 17:30 2014

Thanks to David Nalesnik and Jan-Peter Voigt

I wanted to get bar lines after each sub-meter of a compound meter, and 
to have Completion_heads_engraver recognize these bar lines and split 
and tie notes as needed.

Thanks to David and Jan-Peter, I was able to change their 
doubleBarlinesAfterTimeSig engraver to achieve this effect. I still have 
a little more work to do since some of the moment variables currently 
have fixed values. 

The engraver works well as seen in the code below. Again, I do not 
really understand the significance of why, for example time-signature is 
set to '() although it does not change in the engraver. Also, when I 
tried to change the variable last-fraction to last-bnum, it resulted in 
a syntax error, even after changing the #f to #0. Perhaps someone may 
know the answer to this.

Here is the modified engraver. Currently, it sets up timings of 3/4, 5/4 
and 2/4 and puts a double bar at the end of the three measures. Also 
notice how the double notes are split and tied across the bar lines. 
Pretty cool, I would say.

\version "2.18.0"

%{
  Based on a Scheme engraver that places
  double bar lines before time signature changes
  Provided by Jan-Peter Voigt
  Presumably written by David Nalesnik
%}
last-bnum = #0
fs = #(ly:make-moment 3 4)
rs = #(ly:make-moment 2 4)
ts = #(ly:make-moment 5 4)

alternateTiming =
#(lambda (context)
   (let ((time-signature '()) ;not sure why this time-signature is set 
to '()
         (last-fraction #f)) ;not sure why I can not change last-
fraction to last-bnum

     `((process-music
        . ,(lambda (trans)
             (let ((bnum (ly:context-property context 
'currentBarNumber)))

               (format #t "bnum = ~a measurelength ~a ~%" bnum 
(ly:context-property context 'measureLength))
               (case (modulo bnum 3)
                 ((1) (ly:context-set-property! context 'measureLength 
fs)
                   (if (> bnum last-bnum) (ly:context-set-property! 
context 'whichBar "||") )
                   (set! last-bnum bnum))
                 ((0) (ly:context-set-property! context 'measureLength 
rs))
                 ((2) (ly:context-set-property! context 'measureLength 
ts)))

               )
             ))

       (stop-translation-timestep
        . ,(lambda (trans)
             (set! time-signature '()))))
     ))

music = {
  \compoundMeter #'((3 4) (5 4) (2 4) )
  \relative c' {c d e2 f g4 a2 b c4 b2 a g4 f2 e d c d e f g a b c}

}

\score {
  \new Staff \music

  \layout {
    \context {
      \Score
      \consists #alternateTiming
    }
    \context {
      \Voice
      \remove Note_heads_engraver
      \remove Rest_engraver
      \consists Completion_heads_engraver
      \consists Completion_rest_engraver
    }
  }
}
\paper {
  indent = 0\cm

}

Gmane