Re: [PATCH] musicxml2ly: Avoid duplicate "tr" if both and, are present

2015-12-15 Thread James
Hello,

On 13/12/15 21:48, Thomas Weber wrote:
> In situations like this:
>
> 
> 
>
> this will be created:
>
> \trill \startTrillSpan
>
> It should only be \startTrillSpan
Ticket created at:
https://sourceforge.net/rest/p/testlilyissues/issues/4698/

Thanks

James

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


Re: [PATCH] musicxml2ly: Avoid duplicate "tr" if both and, are present

2015-12-15 Thread Urs Liska


Am 15.12.2015 um 09:06 schrieb James:
> Ticket created at:
> https://sourceforge.net/rest/p/testlilyissues/issues/4698/
http://sourceforge.net/p/testlilyissues/issues/4698/

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


Re: [PATCH] musicxml2ly: Make sure movement_title exists before using it

2015-12-15 Thread James
Hello,

On 13/12/15 21:32, Thomas Weber wrote:
> fixed problem and was generated by Sibelius' internal MusicXML export 
> functionality (not Dolet).
Ticket created at:
https://sourceforge.net/rest/p/testlilyissues/issues/4699/

Thanks

James

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


Re: context id

2015-12-15 Thread David Kastrup
Milan van der Meer  writes:

> the code (frescobaldi):
>
> #(define (format-note engraver event)
>   (let* (
>   (context (ly:translator-context engraver))
>   (ID (ly:context-id context))
>   (parent (ly:context-parent context))
>   (name (ly:context-name context) )
>
>
>   )
> (display ID)
>
> (make-eventlist engraver event)
>)
>  )
>
>
>
> \layout {
>   \context {
>   \Score
>   \consists #(make-engraver
>   (listeners
>
>  (note-event . format-note)
>
>   ))

Why would you expect getting a Voice context when calling
ly:translator-context on an engraver you instantiate in a Score context?

-- 
David Kastrup

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


Re: [PATCH] musicxml2ly: Avoid duplicate "tr" if both and, are present

2015-12-15 Thread James
Thomas,

On 13/12/15 21:48, Thomas Weber wrote:
> Another patch for musicxml2ly: In situations like this:
>
> 
> 
>
> this will be created:
>
> \trill \startTrillSpan
>
> It should only be \startTrillSpan.
>
> (My changes can also be found on Github: https://github.com/th-we/lilypond.)
>
> Greets,
> Thomas Weber
This patch breaks 'make doc'

--snip--

lilypond-book.py: error: `musicxml2ly  --out=- - ' failed (0)
lilypond-book.py: error: The error log is as follows:
musicxml2ly: Reading MusicXML from Standard input ...
musicxml2ly: Converting to LilyPond expressions...
Traceback (most recent call last):
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
2990, in 
main()
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
2985, in main
voices = convert (filename, options)
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
2891, in convert
(voices, staff_info) = get_all_voices (parts)
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
2578, in get_all_voices
part_ly_voices[n] = musicxml_voice_to_lily_voice (v)
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
2402, in musicxml_voice_to_lily_voice
ev = musicxml_articulation_to_lily_event (ch, a)
  File "/home/jlowe/lilypond-git/build/scripts/out/musicxml2ly", line
1229, in musicxml_articulation_to_lily_event
ev = tmp_tp (mxl_event)
AttributeError: TremoloEvent instance has no __call__ method
/home/jlowe/lilypond-git/build/scripts/build/out/texi2omf --format pdf
--location
/usr/local/share/doc/lilypond/html/input/regression/musicxml/collated-files.pdf 
--version 2.19.34 out-www/collated-files.texi >
out-www/collated-files.pdf.omf
Traceback (most recent call last):
  File "/home/jlowe/lilypond-git/build/scripts/build/out/texi2omf", line
73, in 
texi = open (infile).read ()
IOError: [Errno 2] No such file or directory: 'out-www/collated-files.texi'
make[4]: *** [out-www/collated-files.pdf.omf] Error 1
make[4]: Leaving directory
`/home/jlowe/lilypond-git/build/input/regression/musicxml'
make[3]: *** [WWW-1] Error 2
make[3]: Leaving directory `/home/jlowe/lilypond-git/build/input/regression'
make[2]: *** [WWW-1] Error 2
make[2]: Leaving directory `/home/jlowe/lilypond-git/build/input'
make[1]: *** [WWW-1] Error 2
make[1]: Leaving directory `/home/jlowe/lilypond-git/build'
make: *** [doc-stage-1] Error 2


--snip--

James

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


Re: context id

2015-12-15 Thread Milan van der Meer
the code (frescobaldi):

#(define (format-note engraver event)
  (let* (
  (context (ly:translator-context engraver))
  (ID (ly:context-id context))
  (parent (ly:context-parent context))
  (name (ly:context-name context) )


  )
(display ID)

(make-eventlist engraver event)
   )
 )



\layout {
  \context {
  \Score
  \consists #(make-engraver
  (listeners

 (note-event . format-note)

  ))

\new Staff <<
  \new Voice = "first"
{ \voiceOne a }
  \new Voice= "second"
{ \voiceTwo d }
>>



On Mon, Dec 14, 2015 at 5:55 PM, David Kastrup  wrote:

> Milan  writes:
>
> > Hello All,
> >
> > I'm trying to return the context id for a voice.
> > I'm using ly:translator-context to get the
> > context from the engraver and the function ly:context-id
> > to get the ID. However, if i display the id it prints: \new.
> > displaying the parent context results in:
> > # > (# >  (# #
> > ) >) >) >
> >
> > The input:
> > \new Staff <<
> >   \new Voice = "first"
> > { \voiceOne a }
> >   \new Voice= "second"
> > { \voiceTwo d } >>
>
> That code does not output a context id.  Without actually showing the
> code you use for referencing ly:context-id, one cannot say what you do
> wrong here.
>
> --
> David Kastrup
>
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Add scheme procedure that gets paper column rank (issue 281020043 by paulwmor...@gmail.com)

2015-12-15 Thread paulwmorris

Reviewers: ,

Message:
Please review.

There is already a Paper_column::get_rank for C++ use, so I created a
Scheme version alongside it, but I'm not sure if this is the best
approach.  I named the Scheme one "get_rank_number" to differentiate the
two.  Any suggestions are welcome.

Background: I was working on a Scheme rewrite of
ly:ledger-line-spanner::print, to allow for some local customizations,
but it uses the rank of paper columns and currently there seems to be no
way to access rank from scheme.

Description:
Add scheme procedure that gets paper column rank

Please review this at https://codereview.appspot.com/281020043/

Affected files (+12, -0 lines):
  M lily/include/paper-column.hh
  M lily/paper-column.cc


Index: lily/include/paper-column.hh
diff --git a/lily/include/paper-column.hh b/lily/include/paper-column.hh
index  
f1cb01e740685bcf11f9463e82a42466501d01f0..d4e68edc656438953c30633689aecab14bed41c4  
100644

--- a/lily/include/paper-column.hh
+++ b/lily/include/paper-column.hh
@@ -49,6 +49,7 @@ public:

   DECLARE_SCHEME_CALLBACK (print, (SCM));
   DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
+  DECLARE_SCHEME_CALLBACK (get_rank_number, (SCM));

   static int get_rank (Grob const *);
   static bool is_musical (Grob *);
Index: lily/paper-column.cc
diff --git a/lily/paper-column.cc b/lily/paper-column.cc
index  
da3807c31d6f4ddb33fb75edf69c24ec3baf8175..f0b991780f81f1d5934642de1ab123f092f0bbdd  
100644

--- a/lily/paper-column.cc
+++ b/lily/paper-column.cc
@@ -57,6 +57,17 @@ Paper_column::get_rank (Grob const *me)
   return dynamic_cast (me)->rank_;
 }

+MAKE_DOCUMENTED_SCHEME_CALLBACK (Paper_column, get_rank_number, 1,
+ "Get the @code{rank number} of a"
+ " @code{PaperColumn} or"
+ " @code{NonMusicalPaperColumn}.");
+SCM
+Paper_column::get_rank_number (SCM grob)
+{
+  Grob *me = unsmob (grob);
+  return scm_from_int (Paper_column::get_rank (me));
+}
+
 void
 Paper_column::set_rank (int rank)
 {



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


Re: Add scheme procedure that gets paper column rank (issue 281020043 by paulwmor...@gmail.com)

2015-12-15 Thread dak

Not sure what you need it for.  Would it be more generic to provide
spanned_rank_interval ()?  That should be defined for every grob.
Probably also for paper columns?

https://codereview.appspot.com/281020043/

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


Re: Add scheme procedure that gets paper column rank (issue 281020043 by paulwmor...@gmail.com)

2015-12-15 Thread paulwmorris

On 2015/12/15 22:26:01, dak wrote:

Not sure what you need it for.


I was working on a Scheme rewrite of ly:ledger-line-spanner::print,
to allow for some local customizations.  It uses the rank of paper
columns,
namely, around line 210 in ledger-line-spanner.cc

  Direction vdir = Direction (sign (pos));
  int rank = h->get_column ()->get_rank ();

  reqs[rank][vdir].ledger_extent_.unite (ledger_extent);
  reqs[rank][vdir].head_extent_.unite (head_extent);
  reqs[rank][vdir].position_
= vdir * max (vdir * reqs[rank][vdir].position_, vdir *
pos);

For each note head the code gets the rank of the note head's paper
column as a way to effectively associate the note heads that belong
to the same column... and thus calculate, for each column, the furthest
note head position, how wide the ledger lines need to be, etc.


Would it be more generic to provide
spanned_rank_interval ()?  That should be defined for every grob.

Probably also

for paper columns?


I don't know enough about spanned_rank_interval to say for sure.  (I
looked
it up in grob.cc)  If it could be used to group note heads by paper
column
(as with paper column rank) then it should work and be more generic.


https://codereview.appspot.com/281020043/

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


Re: Add scheme procedure that gets paper column rank (issue 281020043 by paulwmor...@gmail.com)

2015-12-15 Thread paulwmorris

Some digging turned up:

 Grob::spanned_rank_interval in grob.cc
 Spanner::spanned_rank_interval in spanner.cc
 Item::spanned_rank_interval in item.cc

with the latter two being more illuminating.  So this would indeed work
and be much more generic.  Now to figure out how and where to implement
a Scheme version (or versions?)...

https://codereview.appspot.com/281020043/

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


PATCHES: Countdown for December the 19th

2015-12-15 Thread James
Hello,

Here is the current patch countdown list. The next countdown will be on
December the 19th.

A quick synopsis of all patches currently in the review process can be
found here:

http://philholmes.net/lilypond/allura/

__


Push:


4688 Fix documentation of \once \partcombine* - dakas
https://sourceforge.net/p/testlilyissues/issues/4688
http://codereview.appspot.com/280940043


4687 Let \etc in partial markup commands stand for any arguments - dakas
https://sourceforge.net/p/testlilyissues/issues/4687
http://codereview.appspot.com/280330043


Countdown:


4699 musicxml2ly: Make sure movement_title exists before using it -
lilypond-pkx
https://sourceforge.net/p/testlilyissues/issues/4699
http://codereview.appspot.com/281850043


4695 Better first example for a text mark (NR 1.8.1, ‘Text marks’) -
lilypond-pkx
https://sourceforge.net/p/testlilyissues/issues/4695
http://codereview.appspot.com/281830043


4694 Changes minimum-space to extra-space in BarLine.space-alist.clef -
thomas-morley
https://sourceforge.net/p/testlilyissues/issues/4694
http://codereview.appspot.com/277320043


4685 Improve markup->string - thomas-morley
https://sourceforge.net/p/testlilyissues/issues/4685
http://codereview.appspot.com/282740043


Review: No Patches in Review at this time.


New:


4700 Add scheme procedure that gets paper column rank - paulwmorris
https://sourceforge.net/p/testlilyissues/issues/4700
http://codereview.appspot.com/281020043


Waiting:


4600 Let notes/rests suppress multi-measure rest grobs - eble
https://sourceforge.net/p/testlilyissues/issues/4600
http://codereview.appspot.com/265160043

2643 Attach lilypond source in pdf
https://sourceforge.net/p/testlilyissues/issues/2643
http://codereview.appspot.com/225040043

_

James

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