Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Simon Albrecht

Am 10.05.2017 um 19:26 schrieb Noeck:

Am 10.05.2017 um 00:03 schrieb Simon Albrecht:

of course you could write a callback:

Thanks Simon,

that's much better than my approach to replace the \clef command with a
\once \override or \tweak and \clef combination.

I'll figure out what the #\F means


It’s a Scheme ‘character’.


  but could someone tell me how I can
find out whether the clef is a CueClef or clef of a clef change?
Is there a property I can access in your callback?


Change clefs can be recognised by the glyph name as well. You can try 
putting some sort of (display glyph-name) in the body of the 
let-expression (on the same level like the actual functionality) to find 
out more.


Best, Simon

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


Re: How can I hide a volta bracket?

2017-05-10 Thread Scaramoucherz
Actually, I figured out one way to display the music as I want. I set the
\repeat volta to 7 (since there really are 7), then used the \markup command
to correct the text. I set up two scores: one for the Refrain, and one for
the Verses. I then set up the output to display the Refrain first, then the
Verses. It looks as I want.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-can-I-hide-a-volta-bracket-tp203068p203072.html
Sent from the User mailing list archive at Nabble.com.

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


program error: mis-predicted force

2017-05-10 Thread Partitura Organum

Hi all,

Every now and again I see this error when engraving a score"program 
error: mis-predicted force" and then a bunch of numbers. But the score 
looks okay so I ignore it. And since the error never comes with a line 
in the music file where the error originates I never know what is 
actually wrong.


Tonight it happened again. This time I have been able to narrow down the 
source of the error to the next snippet (sort of "Minimal Error Throwing 
Example") :


%% start

\version "2.19.59"

#(set-global-staff-size 18)

\score {
  \new Staff
\relative c'' {
  \key bes \major
   es4 d c8 cis d bes
  \grace {a16 c}
  }
}

 end

All elements are needed for the error to occur. With another 
global-staff-size: no error. Remove one of the notes: no error. Remove 
the key signature: no error. Remove a grace note: no error


So, what am I doing wrong here?

Regards,
Auke


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


Re: How can I hide a volta bracket?

2017-05-10 Thread imj-muz...@bluewin.ch
volta 7 ?

Jacques Menu, iPhone

> Le 10 mai 2017 à 19:03, Scaramoucherz  a écrit :
> 
> I am working with a song that is set up as:
> Refrain
>  Ending 1-6
>  Final ending
> Verses
> 
> By setting the \repeat volta 9, I can get the music to show Ending 1-6, and
> Final okay. However, there is a volta bracket over the Verses. How can I
> hide the volta bracket over the verses, so that the music looks correct?
> 
> Thanks
> 
> 
> 
> --
> View this message in context: 
> http://lilypond.1069038.n5.nabble.com/How-can-I-hide-a-volta-bracket-tp203068.html
> Sent from the User mailing list archive at Nabble.com.
> 
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user


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


How can I hide a volta bracket?

2017-05-10 Thread Scaramoucherz
I am working with a song that is set up as:
Refrain
  Ending 1-6
  Final ending
Verses

By setting the \repeat volta 9, I can get the music to show Ending 1-6, and
Final okay. However, there is a volta bracket over the Verses. How can I
hide the volta bracket over the verses, so that the music looks correct?

Thanks



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/How-can-I-hide-a-volta-bracket-tp203068.html
Sent from the User mailing list archive at Nabble.com.

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


Re: ClefModifier tweaks conditional on clef

2017-05-10 Thread Noeck
Am 10.05.2017 um 00:03 schrieb Simon Albrecht:
> of course you could write a callback:

Thanks Simon,

that's much better than my approach to replace the \clef command with a
\once \override or \tweak and \clef combination.

I'll figure out what the #\F means but could someone tell me how I can
find out whether the clef is a CueClef or clef of a clef change?
Is there a property I can access in your callback?

Best,
Joram

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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread David Nalesnik
On Wed, May 10, 2017 at 10:18 AM, David Nalesnik
 wrote:
> Hi,
>
> On Wed, May 10, 2017 at 9:31 AM, David Nalesnik
>  wrote:
>>
>>
>> On Wed, May 10, 2017 at 9:23 AM, daviau ewen  wrote:
>>>
>>> Is that okay ?
>>> http://lilypond.1069038.n5.nabble.com/file/n203059/incdiato82.ly


>>
>> Yes, thank you.
>>
>
> Your original:
>
> % ici on défini les points qu'on fait sur le piano
> #(define (make-dot-list l1)
>(if (null? l1)
>empty-stencil
>(ly:stencil-add
>   (make-dot (ly:pitch-notename (car l1)))
>
>   )))
>
> OK, your function is intended to return a list of dots, but you only
> call make-dot on the first element of the list.
>
> You need to apply make-dot to every element of your pitch list, and
> then combine these into a stencil.  To combine stencils, I use reduce:
> (Documentation here:
> https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/SRFI_002d1-Fold-and-Map.html#index-append_002dmap-3619).
> I found reduce and fold somewhat difficult to grasp at first, but they
> definitely repay study.
>
> My rewrite:
>
> #(define (make-dot-list l1)
>(reduce
> ly:stencil-add
> empty-stencil
> (map
>  (lambda (dl) (make-dot (ly:pitch-notename dl)))
>  l1)))
>
> %
>
> Your original:
>
> #(define-markup-command (complete layout props the-chord)
>(ly:music?)
>
>  (ly:stencil-scale
>   ( ly:stencil-add
> (engrave-back)
> (make-dot-list (map (lambda (m) (ly:music-property m 'pitch))
>   (extract-named-music the-chord 'NoteEvent)))
>  )
>   1
>   1))
>
> Here, the error messages are instructive.  The function ly:stencil-add
> expects its arguments to be individual stencils, but you are providing
> it with *lists* of stencils (the result of calling engrave-back and
> make-dot-list--the latter corrected as I show above, of course!)
>
> The solution once again is to first create a list of stencils, then
> combine them using reduce:
>
> #(define-markup-command (complete layout props the-chord)
>(ly:music?)
>(ly:stencil-scale
> (reduce
>  ly:stencil-add
>  empty-stencil
>  (cons
>   (make-dot-list (map (lambda (m) (ly:music-property m 'pitch))
>(extract-named-music the-chord 'NoteEvent)))
>   (engrave-back)))
> 1 1))
>
> %%
>

Actually, maybe this makes more sense (for the two functions), since
make-dot-list ought to, well, return a list instead of a combined
stencil.  I've just quoted the two functions I adapted:

#(define (make-dot-list l1)
   (map
(lambda (dl) (make-dot (ly:pitch-notename dl)))
l1))

#(define-markup-command (complete layout props the-chord)
   (ly:music?)
   (ly:stencil-scale
(reduce
 ly:stencil-add
 empty-stencil
 (append
  (make-dot-list (map (lambda (m) (ly:music-property m 'pitch))
   (extract-named-music the-chord 'NoteEvent)))
  (engrave-back)))
1 1))

-David

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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread David Nalesnik
Hi,

On Wed, May 10, 2017 at 9:31 AM, David Nalesnik
 wrote:
>
>
> On Wed, May 10, 2017 at 9:23 AM, daviau ewen  wrote:
>>
>> Is that okay ?
>> http://lilypond.1069038.n5.nabble.com/file/n203059/incdiato82.ly
>>>
>>>
>
> Yes, thank you.
>

Your original:

% ici on défini les points qu'on fait sur le piano
#(define (make-dot-list l1)
   (if (null? l1)
   empty-stencil
   (ly:stencil-add
  (make-dot (ly:pitch-notename (car l1)))

  )))

OK, your function is intended to return a list of dots, but you only
call make-dot on the first element of the list.

You need to apply make-dot to every element of your pitch list, and
then combine these into a stencil.  To combine stencils, I use reduce:
(Documentation here:
https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/SRFI_002d1-Fold-and-Map.html#index-append_002dmap-3619).
I found reduce and fold somewhat difficult to grasp at first, but they
definitely repay study.

My rewrite:

#(define (make-dot-list l1)
   (reduce
ly:stencil-add
empty-stencil
(map
 (lambda (dl) (make-dot (ly:pitch-notename dl)))
 l1)))

%

Your original:

#(define-markup-command (complete layout props the-chord)
   (ly:music?)

 (ly:stencil-scale
  ( ly:stencil-add
(engrave-back)
(make-dot-list (map (lambda (m) (ly:music-property m 'pitch))
  (extract-named-music the-chord 'NoteEvent)))
 )
  1
  1))

Here, the error messages are instructive.  The function ly:stencil-add
expects its arguments to be individual stencils, but you are providing
it with *lists* of stencils (the result of calling engrave-back and
make-dot-list--the latter corrected as I show above, of course!)

The solution once again is to first create a list of stencils, then
combine them using reduce:

#(define-markup-command (complete layout props the-chord)
   (ly:music?)
   (ly:stencil-scale
(reduce
 ly:stencil-add
 empty-stencil
 (cons
  (make-dot-list (map (lambda (m) (ly:music-property m 'pitch))
   (extract-named-music the-chord 'NoteEvent)))
  (engrave-back)))
1 1))

%%

Of course, scaling the stencil to 100% is both axes is a bit redundant!

Another observation: the greenish dots are hard to see.

I've attached the whole file (with some formatting changes that helped
me read it better).

Hope this helps,

David
%2) On dessine les points

%--

% ici on défini les points qu'on fait sur le piano
#(define (make-dot-list l1)
   (reduce
ly:stencil-add
empty-stencil
(map
 (lambda (dl) (make-dot (ly:pitch-notename dl)))
 l1)))

% ici on défini i on fait des ronds noirs ou blancs
#(define (make-dot key)
   (ly:stencil-in-color
(ly:stencil-translate
 (make-circle-stencil 0.25 0.1 #f)
 (key-to-pos key))
(car (key-to-color key))
(cadr (key-to-color key))
(caddr (key-to-color key  % pour les ronds noirs


% ici on défini les couleurs R V B associés à chaque notes
#(define (key-to-color key )
   (let ((keycolor (caddr (assq key Color-KEY-LIST
 (if (not keycolor)
 (ly:error (_ "Color diagram error - unkown note '~a'") key)
 (caddr (assq key Color-KEY-LIST)

% ici on défini les positions des points du clavier en y
#(define (key-to-pos key )
   (let ((keypos (assq key KEY-POS-LIST)))
 (if (not keypos)
 (ly:error (_ "keyboard diagram error - unkown note '~a'") key)
 (caddr (assq key KEY-POS-LIST)

#(define KEY-POS-LIST
   '(
  (-8   .  '( 0  . 0))
  (-7   .  '( 0  . 1))
  (-6   .  '( 0  . 2))
  (-5   .  '( 0  . 3))
  (-4   .  '( 1  . 0))
  (-3   .  '( 1  . 1))
  (-2   .  '( 1  . 2))
  (-1   .  '( 1  . 3))
  (0   .  '( 0  . 0))
  (1   .  '( 0  . 1))
  (2   .  '( 0  . 2))
  (3   .  '( 0  . 3))
  (4   .  '( 1  . 0))
  (5   .  '( 1  . 1))
  (6   .  '( 1  . 2))
  (7   .  '( 1  . 3))
  (8   .  '( 0.71  . 1))
  (9   .  '( 0.71  . 1))
  (10  .  '( 0.71  . 1))
  (11  .  '( 0.71  . 1))
  (12  .  '( 0.71  . 1))
  (13  .  '( 0.71  . 1))
  (14  .  '( 0.71  . 1))
  (15  .  '( 0.71  . 1))
  (16  .  '( 0.71  . 1))
  (17  .  '( 0.71  . 1))
  (18  .  '( 0.71  . 1))
  (19  .  '( 0.71  . 1))
  (20  .  '( 0.71  . 1))
  (21  .  '( 0.71  . 1))
  (22  .  '( 0.71  . 1))
  (23  .  '( 0.71  . 1))
  ))


#(define Color-KEY-LIST
   '(
  (-11 .  '( 0.71 11))
  (-10 .  '( 0.71 11))
  (-9  .  '( 0.71 11))
  (-8  .  '( 0.71 11))
  (-7  .  '( 0.71 11))
  (-6  .  '( 0.71   0.2   1))
  (-5  .  '( 0.71   0.2   1))
  (-4  .  '( 0.71   0.2   1))
  (-3  .  '( 0.71   0.2   1))
  (-2  .  '( 0.71   0.2   1))
  (-1  .  '( 0.71   0.2   1))
  (0   .  '( 0.71 11))
  (1   .  '( 0.71

Re: Apply a music-function script to all elements of a list

2017-05-10 Thread David Nalesnik
On Wed, May 10, 2017 at 9:23 AM, daviau ewen  wrote:

> Is that okay ? http://lilypond.1069038.n5.nabble.com/file/n203059/
> incdiato82.ly
>
>>
>>
Yes, thank you.

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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread daviau ewen
Is that okay ?
http://lilypond.1069038.n5.nabble.com/file/n203059/incdiato82.ly


---
http://labodezao.fr/
---
Ewen d'Aviau
11 chemin de berrien
44600 Saint-Nazaire
06-02-37-53-22

2017-05-10 16:21 GMT+02:00 David Nalesnik :

> Hi ewen.
>
>
> On Wed, May 10, 2017 at 8:01 AM, zaord  wrote:
> > Hi Simon,
> >
> > Thanks for your answer. I tryied to add a score in my file to have a
> > bebugging compilable file.
> >
> > I get an error when I compile your code (join file) : Wrong type
> (expecting
> > Stencil): (# # # # incdiato82.ly
> > 
>  >> # # # #)
> >
> > If I take off the 'apply' from 'apply ly:stencil-add , then the lines you
> > add works but not the make-dot-list function, and if I delete it, the
> > make-dot-list works but not the background..
>
> Could you please include an example which can be compiled?
>
> I'd like to try to help, but I need to see all your code in a single
> message, not scattered about a thread.
>
> Best,
>
> David
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread David Nalesnik
Hi ewen.


On Wed, May 10, 2017 at 8:01 AM, zaord  wrote:
> Hi Simon,
>
> Thanks for your answer. I tryied to add a score in my file to have a
> bebugging compilable file.
>
> I get an error when I compile your code (join file) : Wrong type (expecting
> Stencil): (# # # # incdiato82.ly
>   > # # # #)
>
> If I take off the 'apply' from 'apply ly:stencil-add , then the lines you
> add works but not the make-dot-list function, and if I delete it, the
> make-dot-list works but not the background..

Could you please include an example which can be compiled?

I'd like to try to help, but I need to see all your code in a single
message, not scattered about a thread.

Best,

David

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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread Andrew Bernard
Hi Ewen,

I should also mention that Kent Dybvig's text The Scheme Programming
Language is freely available online here:

http://scheme.com/tspl4/

And since lilypond uses guile (1.8 curently) you should also read the
reference manual (which is of course not a tutorial, but essential to know
about):

https://www.gnu.org/software/guile/docs/docs-1.8/guile-ref/


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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread Andrew Bernard
Hi Ewen,

For learning Scheme, this is quite good:

Teach Yourself Scheme in Fixnum Days:

https://ds26gte.github.io/tyscheme/index-Z-H-4.html#node_sec_2.1.4

A surprisingly good resource.

If you want to get serious, then SICP is essential, the text from the
legendary MIT course.

Structure and Interpretation of Computer Programs, by Abelson and Sussman.

Freely available online:

https://mitpress.mit.edu/sicp/

Just having the hardback of this book next to me on my bookshelf makes me
feel good.

There's a 20 video course on Scheme by Abelson on the net somewhere I seem
to recall.

And I think the MIT 6.001 course lectures from 198 or so are now released
on youtube under a Creative Commons licence.


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


Re: Apply a music-function script to all elements of a list

2017-05-10 Thread zaord
Hi Simon,

Thanks for your answer. I tryied to add a score in my file to have a
bebugging compilable file.

I get an error when I compile your code (join file) : Wrong type (expecting
Stencil): (# # # # incdiato82.ly
   # # # #)

If I take off the 'apply' from 'apply ly:stencil-add , then the lines you
add works but not the make-dot-list function, and if I delete it, the
make-dot-list works but not the background...

I never learned Scheme at school and this language is not so obvious, and I
have a lot of problems to understand it. Even with guile documentation I
need to have the basic and actually I didn't found anything which explain
from zero. Do you know any good book or tutorial / course ?

I try to do my best,

Thanks for your help again,

ewen







--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Apply-a-music-function-script-to-all-elements-of-a-list-tp200313p203059.html
Sent from the User mailing list archive at Nabble.com.

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


Re: Fonts different in PDFs with big text issue

2017-05-10 Thread Federico Bruni

I guess that it's the same problem described here:
http://lists.gnu.org/archive/html/bug-lilypond/2017-01/msg00022.html

It depends on the dpi value of $XDG_CONFIG_HOME/fontconfig/fonts.conf 
in your system.





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


Re: Problems with musicxml2ly

2017-05-10 Thread Simon Albrecht

Am 10.05.2017 um 10:08 schrieb Don Gingrich:

I thought(hoped) that we had got past the
days of "Standards aren't":-)


That’s a good thing to hope for. Though… 
Thumbs up to MEI…

Best, Simon

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


Re: How to align bar numbers to the center of a measure?

2017-05-10 Thread Francesco Napoleoni
In data martedì 9 maggio 2017 19:57:39, Kieren MacMillan ha scritto:
> http://lsr.di.unimi.it/LSR/Item?id=932
> That’s a RTFLSR pointer… ;)
> 
> Hope that helps!

It does! Thank you for your quick answer!

ciao
Francesco Napoleoni


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


Re: Problems with musicxml2ly

2017-05-10 Thread Richard Shann
On Wed, 2017-05-10 at 18:08 +1000, Don Gingrich wrote:
> On Wed, 10 May 2017 08:45:40 Richard Shann wrote:
[...]
> And, by the way, the chordnames above the staves vanished
> somewhere in your import.

Denemo's MusicXML import is very crude, it doesn't even try for chord
names, lyrics and probably quite a lot of other things, just
concentrates on reducing the labor of putting in all those dratted notes
and durations again. The upside of this is that it will often get you
*something* while musicxml2ly generally used to give up if it
encountered something bad in the input.
> 
> I've now got two versions that I can try to work with.
> 
> So, thanks for having a go.

Happy to test out musicXML import via Denemo any time, in the hopes of
finding places to improve it.

Richard





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


Re: Problems with musicxml2ly

2017-05-10 Thread Don Gingrich
On Wed, 10 May 2017 08:45:40 Richard Shann wrote:
> On Wed, 2017-05-10 at 13:43 +1000, Don Gingrich wrote:
> > Perhaps cubase does something unusual with the setup
> > of the XML file?
> 
> Unfortunately MusicXML is IMHO just a rag-bag of ideas for fields to
> describe poorly documented music features, every program devises its own
> interpretation of the "standard".

I thought(hoped) that we had got past the
days of "Standards aren't" :-)

Unfortunately it seems not much has changed since my early 
experience in the 80s. 

I only posted this because I thought that it might be useful to
those working on musicxml2ly.

And, by the way, the chordnames above the staves vanished
somewhere in your import.

I've now got two versions that I can try to work with.

So, thanks for having a go.

Cheers,

-Don
> 
> FWIW I imported this via Denemo and it looked ok - not sure what it
> should look like. Attached is the LilyPond source generated and the PDF
> I get.
> 
> Richard



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


Re: Problems with musicxml2ly

2017-05-10 Thread Richard Shann
On Wed, 2017-05-10 at 13:43 +1000, Don Gingrich wrote:
> Perhaps cubase does something unusual with the setup
> of the XML file?

Unfortunately MusicXML is IMHO just a rag-bag of ideas for fields to
describe poorly documented music features, every program devises its own
interpretation of the "standard".

FWIW I imported this via Denemo and it looked ok - not sure what it
should look like. Attached is the LilyPond source generated and the PDF
I get.

Richard


output-Default Score Layout.pdf
Description: Adobe PDF document

%% LilyPond file generated by Denemo version 2.1.3

%%http://www.gnu.org/software/denemo/

\version "2.18.0"

CompactChordSymbols = {}
#(define DenemoTransposeStep 0)
#(define DenemoTransposeAccidental 0)
DenemoGlobalTranspose = #(define-music-function (parser location arg)(ly:music?) #{\transpose c c#arg #})
titledPiece = {}
AutoBarline = {}
AutoEndMovementBarline = \bar "|."

% The music follows

MvmntIVoiceI = {
<> ^\markup \bold {"Levi Jackson Rag" }}






\score
{ %Start of Selection from current movement
  <<

%Start of Staff
\new Staff = "voice 1"  << 
 \new Voice = "MvmntIVoiceI"  { 
  \clef treble\key c \major\time 2/4   \MvmntIVoiceI
} %End of voice

>> %End of Staff

  >>

\header {

}

} %End of Movement



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