Re: Syntax error, unexpected UNSIGNED

2018-05-15 Thread Andrés Westra
I just fund out that it only works with version 2.19. Sorry for the spam, I
was getting crazy.

El mar., 15 de may. de 2018 a la(s) 19:01, Andrés Westra <
westra...@gmail.com> escribió:

> Hi, I,m working in a project an suddenly this error apears. I no longer
> can write:
>
> \version "2.18.2"
> \relative {c4 8 8 8. 16}
>
> This apears in the logs:
>
> error: syntax error, unexpected UNSIGNED
>
> \relative {c4
>
>8 8 8. 16}
>
>
>
> Before I was able to write that, now it only works if I write this:
>
>
> \version "2.18.2"
> \relative {c4 c8 c c8. c16}
>
> Thanks for the help.
>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Syntax error, unexpected UNSIGNED

2018-05-15 Thread Andrés Westra
Hi, I,m working in a project an suddenly this error apears. I no longer can
write:

\version "2.18.2"
\relative {c4 8 8 8. 16}

This apears in the logs:

error: syntax error, unexpected UNSIGNED

\relative {c4

   8 8 8. 16}



Before I was able to write that, now it only works if I write this:


\version "2.18.2"
\relative {c4 c8 c c8. c16}

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


Re: split { {a b} {c' d'} {e' f'} } in multiple expression

2018-05-15 Thread Andrew Bernard
Hi Gianmaria,

>From your posts I suspect you may find a use for Abjad. Have you looked
into it?

Just a suggestion.

Andrew


On 16 May 2018 at 02:43, Gianmaria Lari  wrote:

> I have a musical expression made of several musical expression like the
> following:
>
> { {a b} {c' d'} {e' f'} }
>
>
> I would like to loop on it and generate a different score with each
> sub-expression. Something like this:
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


split { {a b} {c' d'} {e' f'} } in multiple expression

2018-05-15 Thread Gianmaria Lari
I have a musical expression made of several musical expression like the
following:

{ {a b} {c' d'} {e' f'} }


I would like to loop on it and generate a different score with each
sub-expression. Something like this:

{ foreach x in X
\myScore \x
}


How can I do it?
Thank you.

P.S. The following example show how I defined  \myScore and how I use it:

\version "2.19.81"
myScore = #(define-void-function (music) (ly:music?)
 (add-score #{ \score { $music \layout{} }#})
 (add-score #{ \score { \unfoldRepeats $music \midi{}}#})

 )

seqa = {a a}
seqb = {b b}
seqc = {a b}

\book {
  \myScore \seqa
  \myScore \seqb
  \myScore \seqc
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: concatenating notes with a music expression

2018-05-15 Thread Gianmaria Lari
On 15 May 2018 at 15:45, David Kastrup  wrote:

> Gianmaria Lari  writes:
>
> > On 15 May 2018 at 12:10, David Kastrup  wrote:
> >
> >> Malte Meyn  writes:
> >>
> >> > Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:
> >> >> Thank you Gilles I have yet a problem, how can engrave the foo
> >> >> generated list in a score?
> >> >
> >> > You should make a music-function:
> >> >
> >> > \version "2.19.81"
> >> >
> >> > foo =
> >> > #(define-music-function (seq1 seq2) (ly:music? ly:music?)
> >> >(make-sequential-music
> >> > (map (lambda (note)
> >> >(make-sequential-music
> >> > (cons note (ly:music-property seq2 'elements
> >> >   (ly:music-property seq1 'elements
> >> >
> >> > seqI = { c b a }
> >> > seqII = { f g }
> >> >
> >> > \foo \seqI \seqII
> >>
> >> Nope.  You need to write
> >>
> >> (ly:music-deep-copy (ly:music-property seq2 'elements))
> >>
> >> instead of
> >> (ly:music-property seq2 'elements)
>
> [...]
>
> > David I copied and pasted you code but it didn't compile. I changed
> > ly:music-properties to ly:music-property but it doesn't compile anyway.
>
> Well, I used music-clone instead of ly:music-deep-copy for 'elements and
> the former cannot deal with a list.  Sorry for that.  Try


fixed :) Thank you David it works perfectly.

I have one more question about how to split it in multiple score. But I'll
open another thread.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: concatenating notes with a music expression

2018-05-15 Thread David Kastrup
Gianmaria Lari  writes:

> On 15 May 2018 at 12:10, David Kastrup  wrote:
>
>> Malte Meyn  writes:
>>
>> > Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:
>> >> Thank you Gilles I have yet a problem, how can engrave the foo
>> >> generated list in a score?
>> >
>> > You should make a music-function:
>> >
>> > \version "2.19.81"
>> >
>> > foo =
>> > #(define-music-function (seq1 seq2) (ly:music? ly:music?)
>> >(make-sequential-music
>> > (map (lambda (note)
>> >(make-sequential-music
>> > (cons note (ly:music-property seq2 'elements
>> >   (ly:music-property seq1 'elements
>> >
>> > seqI = { c b a }
>> > seqII = { f g }
>> >
>> > \foo \seqI \seqII
>>
>> Nope.  You need to write
>>
>> (ly:music-deep-copy (ly:music-property seq2 'elements))
>>
>> instead of
>> (ly:music-property seq2 'elements)

[...]

> David I copied and pasted you code but it didn't compile. I changed
> ly:music-properties to ly:music-property but it doesn't compile anyway.

Well, I used music-clone instead of ly:music-deep-copy for 'elements and
the former cannot deal with a list.  Sorry for that.  Try

\version "2.19.81"
foo =
#(define-music-function (seq1 seq2) (ly:music? ly:music?)
  (set! (ly:music-property seq1 'elements)
   (map! (lambda (note)
	  (music-clone seq2
	   'elements (cons note
		  (ly:music-deep-copy (ly:music-property seq2
	   'elements)
(ly:music-property seq1 'elements)))
  seq1)

seqI = { c b a }
seqII = { f g }

{\foo \seqI \seqII}


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


Re: concatenating notes with a music expression

2018-05-15 Thread Gianmaria Lari
On 15 May 2018 at 12:10, David Kastrup  wrote:

> Malte Meyn  writes:
>
> > Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:
> >> Thank you Gilles I have yet a problem, how can engrave the foo
> >> generated list in a score?
> >
> > You should make a music-function:
> >
> > \version "2.19.81"
> >
> > foo =
> > #(define-music-function (seq1 seq2) (ly:music? ly:music?)
> >(make-sequential-music
> > (map (lambda (note)
> >(make-sequential-music
> > (cons note (ly:music-property seq2 'elements
> >   (ly:music-property seq1 'elements
> >
> > seqI = { c b a }
> > seqII = { f g }
> >
> > \foo \seqI \seqII
>
> Nope.  You need to write
>
> (ly:music-deep-copy (ly:music-property seq2 'elements))
>
> instead of
> (ly:music-property seq2 'elements)
>
> here or you'll get surprising results whenever the result is changed in
> place (like when transposing the result).
>
> Incidentally, it might make sense to write instead
>
> foo =
> #(define-music-function (seq1 seq2) (ly:music? ly:music?)
>   (set! (ly:music-properties seq1 'elements)
> (map! (lambda (note)
>   (music-clone seq2
>   'elements (cons note (music-clone (ly:music-property seq2
> 'elements)
>   (ly:music-property seq1 'elements)))
>   seq1)
>
> That will take the structure of the respective sequences as templates,
> so you can use <<...>> instead of {...} for either and have this
> reflected in the result.  Also <...> though that will make sense only
> for the inner structure.
>

David I copied and pasted you code but it didn't compile. I changed
ly:music-properties to ly:music-property but it doesn't compile anyway.
This is the complete code:

\version "2.19.81"
foo =
#(define-music-function (seq1 seq2) (ly:music? ly:music?)
  (set! (ly:music-property seq1 'elements)
(map! (lambda (note)
  (music-clone seq2
  'elements (cons note (music-clone (ly:music-property seq2
'elements)
  (ly:music-property seq1 'elements)))
  seq1)

seqI = { c b a }
seqII = { f g }

{\foo \seqI \seqII}

... and this is the error I get

Starting lilypond-windows.exe 2.19.81 [Untitled (9)]...

Processing
`C:/Users/GIANMA~1/AppData/Local/Temp/frescobaldi-f2cfs6t1/tmpj6o5qsf6/
document.ly'

Parsing...C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/music-functions.scm:1063:31
<0>: In procedure ly:music-mutable-properties in expression
(ly:music-mutable-properties music):

C:/Program Files
(x86)/LilyPond/usr/share/lilypond/current/scm/music-functions.scm:1063:31
<1>: Wrong type argument in position 1 (expecting Prob): (#) (duration . #) (origin .
#))((display-methods
#) (name . NoteEvent) (iterator-ctor .
#) (types
event note-event rhythmic-event melodic-event)) >

#) (duration . #)
(origin . #:13>))((display-methods #) (name . NoteEvent)
(iterator-ctor . #) (types event note-event
rhythmic-event melodic-event)) >

)

Exited with return code 1.


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


Re: concatenating notes with a music expression

2018-05-15 Thread Gianmaria Lari
On 15 May 2018 at 11:40, Lukas-Fabian Moser  wrote:

>
> Thank you Gilles I have yet a problem, how can engrave the foo
> generated list in a score?
>
>
Thank you Lukas & Malte. I tried your solutions and they works! Thanks!!!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: concatenating notes with a music expression

2018-05-15 Thread David Kastrup
Malte Meyn  writes:

> Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:
>> Thank you Gilles I have yet a problem, how can engrave the foo
>> generated list in a score?
>
> You should make a music-function:
>
> \version "2.19.81"
>
> foo =
> #(define-music-function (seq1 seq2) (ly:music? ly:music?)
>(make-sequential-music
> (map (lambda (note)
>(make-sequential-music
> (cons note (ly:music-property seq2 'elements
>   (ly:music-property seq1 'elements
>
> seqI = { c b a }
> seqII = { f g }
>
> \foo \seqI \seqII

Nope.  You need to write

(ly:music-deep-copy (ly:music-property seq2 'elements))

instead of
(ly:music-property seq2 'elements)

here or you'll get surprising results whenever the result is changed in
place (like when transposing the result).

Incidentally, it might make sense to write instead

foo =
#(define-music-function (seq1 seq2) (ly:music? ly:music?)
  (set! (ly:music-properties seq1 'elements)
(map! (lambda (note)
  (music-clone seq2
  'elements (cons note (music-clone (ly:music-property seq2 'elements)
  (ly:music-property seq1 'elements)))
  seq1)

That will take the structure of the respective sequences as templates,
so you can use <<...>> instead of {...} for either and have this
reflected in the result.  Also <...> though that will make sense only
for the inner structure.

-- 
David Kastrup

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


Re: concatenating notes with a music expression

2018-05-15 Thread Lukas-Fabian Moser


Thank you Gilles I have yet a problem, how can engrave the foo 
generated list in a score?

#(make-sequential-music (foo seqI seqII))

or with list-splicing:

#@(foo seqI seqII)

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


Re: concatenating notes with a music expression

2018-05-15 Thread Malte Meyn



Am 15.05.2018 um 10:27 schrieb Gianmaria Lari:

Thank you Gilles I have yet a problem, how can engrave the foo
generated list in a score?


You should make a music-function:

\version "2.19.81"

foo =
#(define-music-function (seq1 seq2) (ly:music? ly:music?)
   (make-sequential-music
(map (lambda (note)
   (make-sequential-music
(cons note (ly:music-property seq2 'elements
  (ly:music-property seq1 'elements

seqI = { c b a }
seqII = { f g }

\foo \seqI \seqII

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


Re: LilyPond and FontForge

2018-05-15 Thread foxfanfare
tisimst wrote
> Glad to hear you got something working! Congrats! There are a lot of
> nuances you should be aware of. It's not as cut-and-dry as it appears, but
> getting something working at all is half the battle.
> 
> I'm curious to know how you used TTX to accomplish the task. I can see how
> I would do it, but anyway, I'd be interested to hear yours.
> 
> Best,
> Abraham

Hi Abraham,

Actually, unlike what I thought first, it is only a "semi" victory!... 

First, the problem occured when I exported a new otf font with fontforge.
Even with 8 differents fonts with the right size name, LilyPond cannot use
them as it is missing the SNFT table...

So I tried with TTX, to convert one of your font in XML, and I just
copy-paste the missing table to my new exported font. But this seems to work
smoothly only for little changes in the glyphs.

I then realized that if you change their size, LilyPond doesn't see it and
the result is in certain case "ugly". Look:

 

I also noticed that the LILC / LILF and LILY table were different in each
font... So I guess they are linked to the glyphs inside and I think I'd need
to generate them again for the new font, but I can't find how!

If you can help me a little here, that would be much appreciated! And btw,
your work on the different available fonts is really awesome. I'm trying to
make some little modifications but realize it is way harder than what I did
with my old Sibelius fonts!

Cheers.




--
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: concatenating notes with a music expression

2018-05-15 Thread Gianmaria Lari
On 15 May 2018 at 00:40, Gilles Thibault  wrote:

> Le 2018-05-12 00:16, Sirius Barras a écrit :
>
>> I have a sequence of notes and a music expression.
>> How could be done a function concatenating each element of the sequence
>> with the music expression?
>>
>> For instance, if the sequence is {c b a } and the music expression is { f
>> g
>> }  I would like to obtain
>>
>> c f g
>> b f g
>> a f g
>>
>>
> Don't known what Lilypond version you have. This should work in 2.18 and
> 2.19
>
> %%
>
> #(define (foo seq1 seq2)
> (map (lambda(note)
>;(ly:music-deep-copy ;; if music is re-used
> (make-sequential-music
>   (cons note (ly:music-property seq2 'elements
>  (ly:music-property seq1 'elements)))
>
> seqI = { c b a }
> seqII = { f g }
>
> #(for-each display-lily-music (list seqI seqII))
> #(display "=>\n")
> #(for-each display-lily-music (foo seqI seqII))
>
> %%%
>
> Output :
>
> { c4 b4 a4 }
> { f4 g4 }
> =>
> { c4 f4 g4 }
> { b4 f4 g4 }
> { a4 f4 g4 }
>
>
>
> Good week.
>
> --
> Gilles
>

Thank you Gilles I have yet a problem, how can engrave the foo
generated list in a score?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user