Re: \RemoveEmptyStaves removes Dynamics context

2018-05-06 Thread Simon Albrecht

On 06.05.2018 23:03, Malte Meyn wrote:

Am 06.05.2018 um 22:35 schrieb Thomas Weber:

Can anybody help me with keeping the dynamics alive?  Many thanks!

[…]

\layout {
   \context {
 \Score

Replace \Score by \Staff here.

 \RemoveEmptyStaves
 \override VerticalAxisGroup.remove-first = ##t
In case you’re using any version starting from 2.19.36, you can replace 
the above two lines by

\RemoveAllEmptyStaves

Best, Simon

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Thomas Morley-2 wrote
> Below my own attempt.
> The function has an optional argument, `details', for finetuning.

Ooo... Thank you very much Harm! This looks amazing :)
I'll try to play with this tomorrow and tell you how it works for me :-)



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread Thomas Morley
Hi,

I've read your post in the morning and some things in Simon's function
were obvious to impove.
But then I started testing use-cases and noticed the problem is very
complex, if you try a high amount of automatism (but still with the
possibility for the user to adjust values).
Some points of the coding challenge:
Make it robust for \voiceXxx, suspended NoteHeads in the column, accidentals.
The real problems arise when you try to make it work together with
common fingerings for fingeringOrientation set 'left or even unset.

First some remarks to Simon's coding

2018-05-06 9:45 GMT+02:00 foxfanfare :

> hook =
> #(let ((direction? (lambda (n) (= 1 (abs n

No need to define a predicate, we have ly:dir?

> (hook-markup #{ \markup \path #0.12 #'((moveto 0 0)
> (rlineto -0.85 0)
> (rlineto 0 3)) #}))
> (define-event-function (direction on-line)
>   (direction? boolean?)

`on-line' can be read, no need to have it as a function's argument.

>   (let* ((self-al (if on-line 0 0.31))
>  (self-al (if (= direction 1) (- self-al) self-al)))

`direction' could be used as a multiplier.

>
> #{
>   \tweak self-alignment-Y $self-al
>   \tweak extra-offset #'(0.75 . 0)
>   \tweak extra-spacing-width #'(-0.5 . 0)
>   \finger \markup \scale #(cons 1 direction) #hook-markup
> #})))



Below my own attempt.
The function has an optional argument, `details', for finetuning.

There are some helper-procedures, probably overkill, but it was going
on my nerves ;)

Still, there are some issues, when FingeringColumn comes into the game ...



\version "2.19.81"

%% From
%% https://archiv.lilypondforum.de/index.php/topic,2507.msg14157.html#msg14157
%% slightly changed
#(define (get-parent-in-hierarchie grob searchword)
  ;; goes up in hierarchie until it finds
  ;; a grob named searchword
  (define result #f)

  (define compare
(lambda (x)
  (and (ly:grob? x)
   (eq? searchword (grob::name x)

  (define (get-par grob)
(let* ((parx (ly:grob-parent grob X))
   (pary (ly:grob-parent grob Y)))

  (cond ((not(equal? result #f))
  result )
((compare parx)
  (set! result parx)
  result)
((compare pary)
  (set! result pary)
  result)
(else
  (if (ly:grob? parx)
  (get-par parx))
  (if(ly:grob? pary)
  (get-par pary))
  ;; the inner function gets called from here
  (let* ((result (get-par grob)))
;; check if we found something
(if (ly:grob? result)
result
#f)))

#(define (get-grob-most-left-relative-coordinate ref-point)
  ;; most suitable for container-grobs
  (lambda (grob)
(if (ly:grob? grob)
(cond
  ((eq? (grob::name grob) 'NoteColumn)
 (let* ((note-heads-array (ly:grob-object grob 'note-heads))
(note-heads-grobs
  (if (ly:grob-array? note-heads-array)
  (ly:grob-array->list note-heads-array)
  '()))
(note-heads-refpoints
  (map
(lambda (nh)
  (ly:grob-relative-coordinate nh ref-point X))
note-heads-grobs))
(sorted-note-heads-refpoints (sort note-heads-refpoints <)))
  (if (not (null? sorted-note-heads-refpoints))
  (car sorted-note-heads-refpoints
   ((eq? (grob::name grob) 'AccidentalPlacement)
  (let* ((acc-list (ly:grob-object grob 'accidental-grobs))
 (acc-refpoints
   (map
 (lambda (acc)
   (ly:grob-relative-coordinate (cadr acc) ref-point X))
 acc-list))
 (sorted-acc-refpoints (sort acc-refpoints <)))
   (if (not (null? sorted-acc-refpoints))
   (car sorted-acc-refpoints
   (else
 (if (ly:grob? grob)
 (ly:grob-relative-coordinate grob ref-point X
'(

hook =
#(define-event-function (details direction)
  ((number-list? '(0 0 -0.85 3)) ly:dir?)
  (let* ((hook-markup
 #{
 \markup
   \path
 #0.175
 #`((moveto 0 0)
   (rlineto ,(caddr details) 0)
   (rlineto 0 ,(* direction (cadddr details
 #}))
#{
   \tweak before-line-breaking
 #(lambda (grob)
(let* (;; grob-parent may be FingeringColumn
   (grob-parent (ly:grob-parent grob X))
   (note-head (get-parent-in-hierarchie grob 'NoteHead))
   (staff-pos 

Re: \RemoveEmptyStaves removes Dynamics context

2018-05-06 Thread Malte Meyn



Am 06.05.2018 um 22:35 schrieb Thomas Weber:

Can anybody help me with keeping the dynamics alive?  Many thanks!

[…]

\layout {
   \context {
     \Score


Replace \Score by \Staff here.


     \RemoveEmptyStaves
     \override VerticalAxisGroup.remove-first = ##t
   }
}


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


\RemoveEmptyStaves removes Dynamics context

2018-05-06 Thread Thomas Weber
Can anybody help me with keeping the dynamics alive?  Many thanks!


dynamics = {s1\p}
music = {c'1}

\layout {
  \context {
    \Score
    \RemoveEmptyStaves
    \override VerticalAxisGroup.remove-first = ##t
  }
}

\score {
  <<
    \new Staff \music
    \new Dynamics \dynamics
  >>
}



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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Simon Albrecht-2 wrote
> Please don’t infinitely propagate typos. It’s called ‘length’ in English.

Sorry but I'm no native speacker...
...pardon my French :)




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread David Kastrup
Simon Albrecht  writes:

> On 06.05.2018 11:43, foxfanfare wrote:
>
> ……
>> (define-event-function (direction on-line lenght offset)
>> (direction? boolean? number? pair?)
>> (let* ((self-al (if on-line 0 0.31))
>>  (self-al (if (= direction 1) (- self-al) self-al))
>>  (hook-markup #{
>>\markup \path #0.12 #`((moveto 0 0)
>>(rlineto -0.85 0)
>>(rlineto 0 ,lenght))
> ……
>> 1) As can see, the markup is centered aligned. If the lenght
>
> Please don’t infinitely propagate typos. It’s called ‘length’ in English.

"infinitely"?  A steep challenge.  I suggest one of "indiscriminately",
"indefinitely", "inattentively", "inanely", "insidiously",
"infuriatingly", "incessantly", "inventively", "ingeniously".

-- 
David Kastrup

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread Simon Albrecht

On 06.05.2018 11:43, foxfanfare wrote:

……

(define-event-function (direction on-line lenght offset)
(direction? boolean? number? pair?)
(let* ((self-al (if on-line 0 0.31))
 (self-al (if (= direction 1) (- self-al) self-al))
 (hook-markup #{
   \markup \path #0.12 #`((moveto 0 0)
   (rlineto -0.85 0)
   (rlineto 0 ,lenght))

……

1) As can see, the markup is centered aligned. If the lenght


Please don’t infinitely propagate typos. It’s called ‘length’ in English.

Best, Simon

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Urs Liska


Am 6. Mai 2018 12:08:39 MESZ schrieb Jacques Menu Muzhic 
:
>I’m not familiar with python.ly ’s internals: does
>it use LP’s internal description, shown below by \displayMusic?

No, it parses the input file(s) - which points to the single most significant 
limitation of python-ly's/Frescobaldi's approach.

>
>Starting lilypond 2.19.80 [nobeam.ly]...
>Processing
>`/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T/frescobaldi-nx6e_mso/tmp2kwa263p/nobeam.ly'
>Parsing...
>Interpreting music...
>Preprocessing graphical objects...
>Finding the ideal number of pages...
>Fitting music on 1 page...
>Drawing systems...
>Layout output to
>`/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T//lilypond-pwPv1B'...
>Converting to `nobeam.pdf'...
>Deleting
>`/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T//lilypond-pwPv1B'...
>
>(make-music
>'SequentialMusic
>'elements
>(list (make-music
>'NoteEvent
>'articulations
>(list (make-music
>'BeamEvent
>'span-direction
>-1))
>'duration
>(ly:make-duration 3)
>'pitch
>(ly:make-pitch 0 0))
>(make-music
>'NoteEvent
>'pitch
>(ly:make-pitch 0 1)
>'duration
>(ly:make-duration 3))
>(make-music
>'NoteEvent
>'pitch
>(ly:make-pitch 0 2)
>'duration
>(ly:make-duration 3))
>(make-music
>'NoteEvent
>'articulations
>(list (make-music
>'BeamEvent
>'span-direction
>1))
>'duration
>(ly:make-duration 3)
>'pitch
>(ly:make-pitch 0 3
>
>Success: compilation successfully completed
>Completed successfully in 0.8".
>
>> Le 6 mai 2018 à 11:58, Urs Liska  a écrit :
>> 
>> 
>> 
>> Am 06.05.2018 um 11:43 schrieb Jacques Menu Muzhic:
>>> Hello Urs,
>>> 
>>> musicsml2ly and Finale 2014 behave as expected, but MuseScore 2.2.1
>produces beams in both cases, i.e. even when there are no beams in the
>MusicXML data.
>> 
>> OK, that seems that between 2.1.0 and 2.2.1 MuseScore has added that
>feature.
>> Still it's of course inacceptable not to export beams at all.
>> 
>> Unfortunately we can so far only deal with explicit beams, there's no
>way (without substantial work to redo LilyPond's autobeaming (and
>beaming pattern) in Python).
>> 
>> Thanks for testing
>> Urs
>> 
>>> 
>>> Strange…
>>> 
>>> JM
>>> 
 Le 6 mai 2018 à 11:09, Urs Liska  a écrit :
 
 Hello Jacques,
 
 
 Am 06.05.2018 um 10:11 schrieb Jacques Menu Muzhic:
> Hello Urs,
> 
> I’m doing tests with MusicXML, could you send me an example where
>MuseScore doesn’t show any beams after exporting from LilyPond?
 Attached you'll find a simple nobeam.ly and the file nobeam.xml,
>which is the result from exporting with the current master of
>python-ly. This will be opened without beams in MuseScore 2.
 nobeam-withbeams.xml is the result of exporting from the branch
>xml-handle-beams (my current pull request). The XML file I originally
>sent was also created from that branch.
 
 Thanks for helping to look into it.
 Urs
 
> Thanks!
> 
> JM
> 
>> Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :
>> 
>> Hi Torsten,
>> 
>> 5. Mai 2018 11:44, "Torsten Hämmerle" 
>schrieb:
>> 
>>> Hi Urs,
>>> 
>>> Sibelius works fine:
>>> 
>>>
>
>>> 
>> Thanks.
>> 
>>> As my Dorico evaluation period has expired, I can't even start
>it.
>>> All the others allow testing w/o save/export functionality, but
>Steinberg is
>>> much more restrictive in that respect.
>>> 
>> On the Facebook group I got a screenshot of Dorico, so (not
>unexpectedly) this works too.
>> 
>> So my conclusion is: we can export faulty XML, and Finale,
>Sibelius, Dorico, MuseScore and Verovio will still properly handle it.
>> I find that somewhat embarrassing, but I think it's much better
>than nothing (I was pretty surprised to see that MusesScore didn't show
>*any* beams after exporting a small example from LilyPond ...)
>> 
>> Thanks to all who responded.
>> Urs
>> 
>>> All the best,
>>> Torsten
>>> 
>>> --
>>> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>>> 
>>> ___
>>> lilypond-user mailing list
>>> lilypond-user@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
 
>> 

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


Lilypond and Frescobaldi on Fedora 28

2018-05-06 Thread Martin Tarenskeen


Hi,

Official Fedora 28 version of lilypond 2.19.81 is currently broken. (I 
hope a fix will be found soon)
As a workaround the install script for linux from 
http://lilypond.org/download/binaries/ can be used. This one works fine.


If you install Frescobaldi from the official Fedora 28 repo it will pull 
in the (broken) lilypond version as a dependency. The default settings in 
Frescobaldi will point to the broken lilypond binary. Go to the 
preferences menu in Frescobaldi and you are ready to rock again.


Maybe this can help other Fedora 28 / Lilypond / Frescobaldi users.

--

MT


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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Jacques Menu Muzhic
I’m not familiar with python.ly ’s internals: does it use 
LP’s internal description, shown below by \displayMusic?

Starting lilypond 2.19.80 [nobeam.ly]...
Processing 
`/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T/frescobaldi-nx6e_mso/tmp2kwa263p/nobeam.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to 
`/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T//lilypond-pwPv1B'...
Converting to `nobeam.pdf'...
Deleting `/var/folders/jc/xrpy67_x6_vcjfzpzds_9_6mgn/T//lilypond-pwPv1B'...

(make-music
'SequentialMusic
'elements
(list (make-music
'NoteEvent
'articulations
(list (make-music
'BeamEvent
'span-direction
-1))
'duration
(ly:make-duration 3)
'pitch
(ly:make-pitch 0 0))
(make-music
'NoteEvent
'pitch
(ly:make-pitch 0 1)
'duration
(ly:make-duration 3))
(make-music
'NoteEvent
'pitch
(ly:make-pitch 0 2)
'duration
(ly:make-duration 3))
(make-music
'NoteEvent
'articulations
(list (make-music
'BeamEvent
'span-direction
1))
'duration
(ly:make-duration 3)
'pitch
(ly:make-pitch 0 3

Success: compilation successfully completed
Completed successfully in 0.8".

> Le 6 mai 2018 à 11:58, Urs Liska  a écrit :
> 
> 
> 
> Am 06.05.2018 um 11:43 schrieb Jacques Menu Muzhic:
>> Hello Urs,
>> 
>> musicsml2ly and Finale 2014 behave as expected, but MuseScore 2.2.1 produces 
>> beams in both cases, i.e. even when there are no beams in the MusicXML data.
> 
> OK, that seems that between 2.1.0 and 2.2.1 MuseScore has added that feature.
> Still it's of course inacceptable not to export beams at all.
> 
> Unfortunately we can so far only deal with explicit beams, there's no way 
> (without substantial work to redo LilyPond's autobeaming (and beaming 
> pattern) in Python).
> 
> Thanks for testing
> Urs
> 
>> 
>> Strange…
>> 
>> JM
>> 
>>> Le 6 mai 2018 à 11:09, Urs Liska  a écrit :
>>> 
>>> Hello Jacques,
>>> 
>>> 
>>> Am 06.05.2018 um 10:11 schrieb Jacques Menu Muzhic:
 Hello Urs,
 
 I’m doing tests with MusicXML, could you send me an example where 
 MuseScore doesn’t show any beams after exporting from LilyPond?
>>> Attached you'll find a simple nobeam.ly and the file nobeam.xml, which is 
>>> the result from exporting with the current master of python-ly. This will 
>>> be opened without beams in MuseScore 2.
>>> nobeam-withbeams.xml is the result of exporting from the branch 
>>> xml-handle-beams (my current pull request). The XML file I originally sent 
>>> was also created from that branch.
>>> 
>>> Thanks for helping to look into it.
>>> Urs
>>> 
 Thanks!
 
 JM
 
> Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :
> 
> Hi Torsten,
> 
> 5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:
> 
>> Hi Urs,
>> 
>> Sibelius works fine:
>> 
>> 
>> 
> Thanks.
> 
>> As my Dorico evaluation period has expired, I can't even start it.
>> All the others allow testing w/o save/export functionality, but 
>> Steinberg is
>> much more restrictive in that respect.
>> 
> On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) 
> this works too.
> 
> So my conclusion is: we can export faulty XML, and Finale, Sibelius, 
> Dorico, MuseScore and Verovio will still properly handle it.
> I find that somewhat embarrassing, but I think it's much better than 
> nothing (I was pretty surprised to see that MusesScore didn't show *any* 
> beams after exporting a small example from LilyPond ...)
> 
> Thanks to all who responded.
> Urs
> 
>> All the best,
>> Torsten
>> 
>> --
>> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>> 
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>> 
> 

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Urs Liska



Am 06.05.2018 um 11:43 schrieb Jacques Menu Muzhic:

Hello Urs,

musicsml2ly and Finale 2014 behave as expected, but MuseScore 2.2.1 produces 
beams in both cases, i.e. even when there are no beams in the MusicXML data.


OK, that seems that between 2.1.0 and 2.2.1 MuseScore has added that 
feature.

Still it's of course inacceptable not to export beams at all.

Unfortunately we can so far only deal with explicit beams, there's no 
way (without substantial work to redo LilyPond's autobeaming (and 
beaming pattern) in Python).


Thanks for testing
Urs



Strange…

JM


Le 6 mai 2018 à 11:09, Urs Liska  a écrit :

Hello Jacques,


Am 06.05.2018 um 10:11 schrieb Jacques Menu Muzhic:

Hello Urs,

I’m doing tests with MusicXML, could you send me an example where MuseScore 
doesn’t show any beams after exporting from LilyPond?

Attached you'll find a simple nobeam.ly and the file nobeam.xml, which is the 
result from exporting with the current master of python-ly. This will be opened 
without beams in MuseScore 2.
nobeam-withbeams.xml is the result of exporting from the branch 
xml-handle-beams (my current pull request). The XML file I originally sent was 
also created from that branch.

Thanks for helping to look into it.
Urs


Thanks!

JM


Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :

Hi Torsten,

5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:


Hi Urs,

Sibelius works fine:




Thanks.


As my Dorico evaluation period has expired, I can't even start it.
All the others allow testing w/o save/export functionality, but Steinberg is
much more restrictive in that respect.


On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) this 
works too.

So my conclusion is: we can export faulty XML, and Finale, Sibelius, Dorico, 
MuseScore and Verovio will still properly handle it.
I find that somewhat embarrassing, but I think it's much better than nothing (I 
was pretty surprised to see that MusesScore didn't show *any* beams after 
exporting a small example from LilyPond ...)

Thanks to all who responded.
Urs


All the best,
Torsten

--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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

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





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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Jacques Menu Muzhic
The « bug » seems to have been introduced since MuseScore 2.2.x: 2.1.0 behaves 
as expected.

JM

> Le 6 mai 2018 à 11:51, Martin Tarenskeen  a écrit :
> 
> 
> 
> On Sun, 6 May 2018, Urs Liska wrote:
> 
>> Attached you'll find a simple nobeam.ly and the file nobeam.xml, which is 
>> the result from exporting with the current master of python-ly. This will be 
>> opened without beams in MuseScore 2.
> 
> I am getting beams in MuseScore 2.2.1, Linux Fedora 28.
> 
>> nobeam-withbeams.xml is the result of exporting from the branch 
>> xml-handle-beams (my current pull request).
> 
> Looks the same to me in MuseScore. I am getting four 1/8 notes in a 4/4 time 
> bar. BTW: Does anyone know how to insert more notes in that bar in MuseScore? 
> If I try, it jumps to the next bar, thus creating an anacrusis?
> 
> When using musicxml2ly to convert back to lilypond, I can see the difference 
> between the two files though.
> 
> -- 
> 
> MT


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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Martin Tarenskeen



On Sun, 6 May 2018, Jacques Menu Muzhic wrote:

musicsml2ly and Finale 2014 behave as expected, but MuseScore 2.2.1 
produces beams in both cases, i.e. even when there are no beams in the 
MusicXML data.


Strange…


My guess is that MuseScore does things it isn't supposed to do. Which can 
sometimes be pleasant but still incorrect.


--

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Martin Tarenskeen



On Sun, 6 May 2018, Urs Liska wrote:

Attached you'll find a simple nobeam.ly and the file nobeam.xml, which is the 
result from exporting with the current master of python-ly. This will be 
opened without beams in MuseScore 2.


I am getting beams in MuseScore 2.2.1, Linux Fedora 28.

nobeam-withbeams.xml is the result of exporting from the branch 
xml-handle-beams (my current pull request).


Looks the same to me in MuseScore. I am getting four 1/8 notes in a 4/4 
time bar. BTW: Does anyone know how to insert more notes in that bar in 
MuseScore? If I try, it jumps to the next bar, thus creating an anacrusis?


When using musicxml2ly to convert back 
to lilypond, I can see the difference between the two files though.


--

MT

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Jacques Menu Muzhic
Hello Urs,

musicsml2ly and Finale 2014 behave as expected, but MuseScore 2.2.1 produces 
beams in both cases, i.e. even when there are no beams in the MusicXML data.

Strange…

JM

> Le 6 mai 2018 à 11:09, Urs Liska  a écrit :
> 
> Hello Jacques,
> 
> 
> Am 06.05.2018 um 10:11 schrieb Jacques Menu Muzhic:
>> Hello Urs,
>> 
>> I’m doing tests with MusicXML, could you send me an example where MuseScore 
>> doesn’t show any beams after exporting from LilyPond?
> 
> Attached you'll find a simple nobeam.ly and the file nobeam.xml, which is the 
> result from exporting with the current master of python-ly. This will be 
> opened without beams in MuseScore 2.
> nobeam-withbeams.xml is the result of exporting from the branch 
> xml-handle-beams (my current pull request). The XML file I originally sent 
> was also created from that branch.
> 
> Thanks for helping to look into it.
> Urs
> 
>> Thanks!
>> 
>> JM
>> 
>>> Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :
>>> 
>>> Hi Torsten,
>>> 
>>> 5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:
>>> 
 Hi Urs,
 
 Sibelius works fine:
 
 
 
>>> Thanks.
>>> 
 As my Dorico evaluation period has expired, I can't even start it.
 All the others allow testing w/o save/export functionality, but Steinberg 
 is
 much more restrictive in that respect.
 
>>> On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) 
>>> this works too.
>>> 
>>> So my conclusion is: we can export faulty XML, and Finale, Sibelius, 
>>> Dorico, MuseScore and Verovio will still properly handle it.
>>> I find that somewhat embarrassing, but I think it's much better than 
>>> nothing (I was pretty surprised to see that MusesScore didn't show *any* 
>>> beams after exporting a small example from LilyPond ...)
>>> 
>>> Thanks to all who responded.
>>> Urs
>>> 
 All the best,
 Torsten
 
 --
 Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
 
 ___
 lilypond-user mailing list
 lilypond-user@gnu.org
 https://lists.gnu.org/mailman/listinfo/lilypond-user
>>> ___
>>> lilypond-user mailing list
>>> lilypond-user@gnu.org
>>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 


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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
I andrew, thanks for your help!


Andrew Bernard wrote
> How is your Scheme coding skill?

Very low... but I'm learning!

Your exemple was a big help, especially because the order of appearence of
the elements in my function wasn't good and didn't allowed me to add a
variable in the original markup...

So now I can add all the parameters I wanted:

\version "2.19.81"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n)
   (define-event-function (direction on-line lenght offset)
   (direction? boolean? number? pair?)
   (let* ((self-al (if on-line 0 0.31))
(self-al (if (= direction 1) (- self-al) self-al))
(hook-markup #{
  \markup \path #0.12 #`((moveto 0 0)
  (rlineto -0.85 0)
  (rlineto 0 ,lenght))
  #})
)
   #{
 \tweak self-alignment-Y $self-al
 \tweak extra-offset #offset
 \tweak extra-spacing-width #'(-0.5 . 0)
 \finger \markup \scale #(cons 1 direction) #hook-markup
   #})))


\layout {
  \context {
\Voice
fingeringOrientations = #'(left)
  }
}

\relative {
  4 

}

I have two questions though:

1) As can see, the markup is centered aligned. If the lenght is higher, it
moves further from the note head. I can adjust it with my Y-offset command,
but I think there is a way to make it by default top aligned, no?

2) This solution adds a lot of numbers after the initial \hook command.
Isn't there a way to tell the function some default values for the "lenght"
and "offset" parameters I have added, and just tweak them if necessary in
the score?




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Urs Liska

Hello Jacques,


Am 06.05.2018 um 10:11 schrieb Jacques Menu Muzhic:

Hello Urs,

I’m doing tests with MusicXML, could you send me an example where MuseScore 
doesn’t show any beams after exporting from LilyPond?


Attached you'll find a simple nobeam.ly and the file nobeam.xml, which 
is the result from exporting with the current master of python-ly. This 
will be opened without beams in MuseScore 2.
nobeam-withbeams.xml is the result of exporting from the branch 
xml-handle-beams (my current pull request). The XML file I originally 
sent was also created from that branch.


Thanks for helping to look into it.
Urs


Thanks!

JM


Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :

Hi Torsten,

5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:


Hi Urs,

Sibelius works fine:




Thanks.


As my Dorico evaluation period has expired, I can't even start it.
All the others allow testing w/o save/export functionality, but Steinberg is
much more restrictive in that respect.


On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) this 
works too.

So my conclusion is: we can export faulty XML, and Finale, Sibelius, Dorico, 
MuseScore and Verovio will still properly handle it.
I find that somewhat embarrassing, but I think it's much better than nothing (I 
was pretty surprised to see that MusesScore didn't show *any* beams after 
exporting a small example from LilyPond ...)

Thanks to all who responded.
Urs


All the best,
Torsten

--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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

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


\version "2.19.80"

{
  c'8 [ d' e' f' ]
}
http://www.musicxml.org/dtds/partwise.dtd;>

  

  python-ly 0.9.5
  2018-05-06

  
  

  

  
  

  
2

  4
  4


  G
  2

  
  

  C
  4

1
1
eighth
  
  

  D
  4

1
1
eighth
  
  

  E
  4

1
1
eighth
  
  

  F
  4

1
1
eighth
  

  


http://www.musicxml.org/dtds/partwise.dtd;>

  

  python-ly 0.9.5
  2018-05-06

  
  

  

  
  

  
2

  4
  4


  G
  2

  
  

  C
  4

1
1
eighth
begin
  
  

  D
  4

1
1
eighth
continue
  
  

  E
  4

1
1
eighth
continue
  
  

  F
  4

1
1
eighth
end
  

  

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


Re: Layout of a (piano) hand indicator

2018-05-06 Thread Andrew Bernard
Hello foxfanfare,

I use this function from Simon a lot.

Here's a way to add extra parameters to this function. As an example, this
lets you specify the length of the hook.

How is your Scheme coding skill? You'll notice the use of quasiquoting to
get the length value where it is needed in the case.

Adding other parameters as you desire I leave as an exercise for the reader.


Andrew


=

\version "2.19.81"

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
   )

   (define-event-function (direction on-line len)
 (direction? boolean? number?)
 (let* ((self-al (if on-line 0.6 0.31))
(self-al (if (= direction 1) (- self-al) self-al))
(hook-markup #{
  \markup \path #0.175 #`((moveto 0 0)
  (rlineto -0.85 0)
  (rlineto 0 ,len))
  #})
)
   #{
 \tweak self-alignment-Y $self-al
 \tweak extra-spacing-width #'(-.5 . 0)
 \finger \markup \scale #(cons 1 direction) #hook-markup
   #})))


\layout {
  \context {
\Voice
fingeringOrientations = #'(left)
  }
}

{
  4 
}

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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Jacques Menu Muzhic
Hello Urs,

I’m doing tests with MusicXML, could you send me an example where MuseScore 
doesn’t show any beams after exporting from LilyPond?

Thanks!

JM

> Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :
> 
> Hi Torsten,
> 
> 5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:
> 
>> Hi Urs,
>> 
>> Sibelius works fine:
>> 
>>  
>> 
> 
> Thanks.
> 
>> 
>> As my Dorico evaluation period has expired, I can't even start it.
>> All the others allow testing w/o save/export functionality, but Steinberg is
>> much more restrictive in that respect.
>> 
> 
> On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) 
> this works too.
> 
> So my conclusion is: we can export faulty XML, and Finale, Sibelius, Dorico, 
> MuseScore and Verovio will still properly handle it.
> I find that somewhat embarrassing, but I think it's much better than nothing 
> (I was pretty surprised to see that MusesScore didn't show *any* beams after 
> exporting a small example from LilyPond ...)
> 
> Thanks to all who responded.
> Urs
> 
>> All the best,
>> Torsten
>> 
>> --
>> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>> 
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


Re: Need someone testing XML file in Finale and Sibelius (and Dorico)

2018-05-06 Thread Jacques Menu Muzhic
Hello,

Not sure whether this helps:

removing:

continue

from the file, MuseScore 2.2.1 produces:



Finale 2014 produces:




and musicxml2ly produces:


musicxml2ly: Reading MusicXML from 
O5beamWithoutBeamNumberContinue.xml_inter.xml ...
musicxml2ly: Converting to LilyPond expressions...
musicxml2ly: Output to `O5beamWithoutBeamNumberContinue.xml_inter.ly'
musicxml2ly: Converting to current version (2.19.58) notations ...




JM

> Le 5 mai 2018 à 11:50, li...@openlilylib.org a écrit :
> 
> Hi Torsten,
> 
> 5. Mai 2018 11:44, "Torsten Hämmerle"  schrieb:
> 
>> Hi Urs,
>> 
>> Sibelius works fine:
>> 
>>  
>> 
> 
> Thanks.
> 
>> 
>> As my Dorico evaluation period has expired, I can't even start it.
>> All the others allow testing w/o save/export functionality, but Steinberg is
>> much more restrictive in that respect.
>> 
> 
> On the Facebook group I got a screenshot of Dorico, so (not unexpectedly) 
> this works too.
> 
> So my conclusion is: we can export faulty XML, and Finale, Sibelius, Dorico, 
> MuseScore and Verovio will still properly handle it.
> I find that somewhat embarrassing, but I think it's much better than nothing 
> (I was pretty surprised to see that MusesScore didn't show *any* beams after 
> exporting a small example from LilyPond ...)
> 
> Thanks to all who responded.
> Urs
> 
>> All the best,
>> Torsten
>> 
>> --
>> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>> 
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

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


RE: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
(* I forgot the function:

hook =
#(let ((direction? (lambda (n) (= 1 (abs n
(hook-markup #{ \markup \path #0.12 #'((moveto 0 0)
(rlineto -0.85 0)
(rlineto 0 3)) #}))
(define-event-function (direction on-line)
  (direction? boolean?)
  
  (let* ((self-al (if on-line 0 0.31))
 (self-al (if (= direction 1) (- self-al) self-al)))

#{
  \tweak self-alignment-Y $self-al
  \tweak extra-offset #'(0.75 . 0)
  \tweak extra-spacing-width #'(-0.5 . 0)
  \finger \markup \scale #(cons 1 direction) #hook-markup
#})))



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


RE: Layout of a (piano) hand indicator

2018-05-06 Thread foxfanfare
Hi everyone,

I dig up this old topic because I need some help understanding this
function. Simon has posted an interesting function which I would like to
use:



... but I also would like to access some parameters in certain cases (let's
say "rlineto 0 3" and "extra-offset #'(0.75 . 0)" with a simple tweak. For
instance:

2

I tried adding some properties in the original code without success. I still
struggle in working with this language...

Could someone please tell me how I should achieve this?



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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