Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Sun, 3 Jan 2016 21:36:30 +0100
Simon Albrecht  wrote:

> > No, for the simple reasons that a) noone mentioned on the list there was
> > a tracker item and b) even though I know now, I have been unable to
> > find it.
> >
> > May I kindly request mentioning the URL to the list?  
> 
> 
> You’ll find the link to the Rietveld issue therein.

Ah, thanks.

I was looking in https://code.google.com/p/lilypond/issues/ ...

-- Johan
   http://johan.vromans.org/seasons_greetings.html

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


Re: trying to attach lyrics to global variable in /score

2016-01-03 Thread David Wright
On Sun 03 Jan 2016 at 15:33:39 (-0800), Ryan Michael wrote:
> Thank you for the reminder, so he is a complete, however abridged version of 
> my
> code: 
> 
> viola = \new Voice \relative c' {
> c1 c1 c1
> }
> 
> recorder = \new Voice \relative c' {
> c1 c1 c1
> }
> 
> verseOne = \lyricmode {
>   m -- -- -- 
> }
> 
> \score {
>   \new StaffGroup <<
>    
>    \new Staff <<
>   \new Voice \global
>   \new Voice = "recorder" \recorder
> 
> >>
> \new Lyrics \lyricsto "recorder" \verseOne
>   
> 
> 
>  
> 
>     \new Staff << \global \viola >>
>   >>
> 
>   \layout { }
>   \midi { }
> }
> 
> And I am still getting the same error: 
> 
> cannot find Voice `recorder'

You should write just:

recorder = \relative c' { c1 c1 c1 }

In your version,

\new Voice = "recorder" \recorder

effectively becomes:

\new Voice = "recorder" \new Voice \relative c' { c1 c1 c1 }

which means you've named the wrong Voice context, one with no music in it.

Cheers,
David.

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


Re: trying to attach lyrics to global variable in /score

2016-01-03 Thread David Wright
On Mon 04 Jan 2016 at 00:26:44 (+0100), Simon Albrecht wrote:
[...]
> That said: The following code works for me.
> 
> %%
> \version "2.18.2"
> global = { s1 }
> recorder = { c''1 }
> verseOne = \lyricmode { test }
> \score {
>   \new StaffGroup <<
> 
> \new Staff <<
>   \new Voice \global
>   \new Voice = "recorder" \recorder
> >>
> \new Lyrics \lyricsto "recorder" \verseOne
>   >>
> 
>   \layout { }
>   \midi { }
> }
> %%
> 
> It’s more logical IMO to keep the Lyrics outside the Staff,

... but it does mean that you can't use \addlyrics, and dispense with
naming the context when not required (ie simple cases).

Cheers,
David.

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


Re: Strings as variable names

2016-01-03 Thread David Wright
On Sun 03 Jan 2016 at 16:22:29 (+0100), David Kastrup wrote:
> David Wright  writes:
> 
> > On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote:
> >> 
> >> The strings in Python's regular expression replacements can interpolate
> >> variable values, but those are not part of the string syntax but of the
> >> regexp replacement semantics.
> >
> > Recognising the lack of this construct, python is currently adding string
> > interpolation to the language.
> >
> > https://www.python.org/dev/peps/pep-0498/
> 
> Yes and no: you use an f prefix to such strings (for "formatted", in
> analogy to the r prefix for "raw" strings) to indicate explicitly you
> want to make use of interpolation.

Naturally—this gives you control. One of the difficulties with, for
example, bash's string interpolation ("parameter and variable expansion")
is preventing it happening when you don't want it.

> So there is no interpolation for existing strings.  It's essentially a
> lexical shorthand for Python's % formatting construct.

Existing strings? I don't understand what you mean. Python's strings
are immutable.

> At any rate, its place is in the programming language actually used for
> string manipulation, so if you want to use something like that in
> LilyPond eventually, it makes much more sense asking on the Guile user
> and/or developer list than here.
> 
> And/or try to work on the Guile 2.0 porting task of course, since
> otherwise such changes will not trickle back into LilyPond.

That's not my call.

Cheers,
David.

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


Re: trying to attach lyrics to global variable in /score

2016-01-03 Thread Ryan Michael
Thank you for the reminder, so he is a complete, however abridged version
of my code:


viola = \new Voice \relative c' {
c1 c1 c1
}

recorder = \new Voice \relative c' {
c1 c1 c1
}

verseOne = \lyricmode {
  m -- -- --
}

\score {
  \new StaffGroup <<

   \new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder

>>
\new Lyrics \lyricsto "recorder" \verseOne





\new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}

And I am still getting the same error:

*cannot find Voice `recorder'*

On Sun, Jan 3, 2016 at 3:26 PM, Simon Albrecht 
wrote:

> Hello Ryan,
>
> please always reply on-list. Others may find the solution helpful as well.
> Also, please send complete compilable examples (with a version statement),
> else it’s difficult to figure out the problem.
> That said: The following code works for me.
>
> %%
> \version "2.18.2"
> global = { s1 }
> recorder = { c''1 }
> verseOne = \lyricmode { test }
> \score {
>   \new StaffGroup <<
>
> \new Staff <<
>   \new Voice \global
>   \new Voice = "recorder" \recorder
> >>
> \new Lyrics \lyricsto "recorder" \verseOne
>   >>
>
>   \layout { }
>   \midi { }
> }
> %%
>
> It’s more logical IMO to keep the Lyrics outside the Staff, but both work.
>
> HTH, Simon
>
> On 04.01.2016 00:21, Ryan Michael wrote:
>
>> Hallo Simon,
>> So I have tried to use one of your solutions. specificalyl this one:
>>
>> \score {
>>   \new StaffGroup <<
>>\new Staff <<
>>   \new Voice \global
>>   \new Voice = "recorder" \recorder
>> \new Lyrics \lyricsto "recorder" \verseOne
>> >>
>>
>>
>>
>> \new Staff << \global \viola >>
>>   >>
>>
>>   \layout { }
>>   \midi { }
>> }
>>
>>
>> And I still get this error:
>>
>> *cannot find Voice `recorder'*
>>
>>
>> On Sun, Jan 3, 2016 at 11:49 AM, Simon Albrecht > > wrote:
>>
>> On 03.01.2016 20:40, Ryan Michael wrote:
>>
>> I have the following lilypond code:
>>
>>
>> \score {
>>   \new StaffGroup <<
>>\new Staff << \global \recorder >>
>>
>>\new Lyrics \lyricsto "recorder" {
>>   \verseOne
>> }
>>
>> \new Staff << \global \viola >>
>>   >>
>>
>>   \layout { }
>>   \midi { }
>> }
>>
>>
>> \lyricsto "recorder" means: associate these lyrics with the voice
>> named "recorder". You can create a voice with a name by using \new
>> Voice = "recorder" { … some music … }. The question now is: should
>> \global be in the same voice like \recorder? If yes,
>>
>> <<
>>   \new Staff \new Voice = "recorder" << \global \recorder >>
>>   \new Lyrics \lyricsto "recorder" \verseOne
>> >>
>>
>> – if no, the same with:
>> \new Staff <<
>>   \new Voice \global
>>   \new Voice = "recorder" \recorder
>> >>
>>
>>
>> HTH, Simon
>>
>>
>>
>>
>> --
>> ॐ नमः शिवाय
>>
>
>


-- 
ॐ नमः शिवाय
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: trying to attach lyrics to global variable in /score

2016-01-03 Thread Simon Albrecht

Hello Ryan,

please always reply on-list. Others may find the solution helpful as well.
Also, please send complete compilable examples (with a version 
statement), else it’s difficult to figure out the problem.

That said: The following code works for me.

%%
\version "2.18.2"
global = { s1 }
recorder = { c''1 }
verseOne = \lyricmode { test }
\score {
  \new StaffGroup <<

\new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder
>>
\new Lyrics \lyricsto "recorder" \verseOne
  >>

  \layout { }
  \midi { }
}
%%

It’s more logical IMO to keep the Lyrics outside the Staff, but both work.

HTH, Simon

On 04.01.2016 00:21, Ryan Michael wrote:

Hallo Simon,
So I have tried to use one of your solutions. specificalyl this one:

\score {
  \new StaffGroup <<
   \new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder
\new Lyrics \lyricsto "recorder" \verseOne
>>



\new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}


And I still get this error:

*cannot find Voice `recorder'*


On Sun, Jan 3, 2016 at 11:49 AM, Simon Albrecht 
mailto:simon.albre...@mail.de>> wrote:


On 03.01.2016 20:40, Ryan Michael wrote:

I have the following lilypond code:


\score {
  \new StaffGroup <<
   \new Staff << \global \recorder >>

   \new Lyrics \lyricsto "recorder" {
  \verseOne
}

\new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}


\lyricsto "recorder" means: associate these lyrics with the voice
named "recorder". You can create a voice with a name by using \new
Voice = "recorder" { … some music … }. The question now is: should
\global be in the same voice like \recorder? If yes,

<<
  \new Staff \new Voice = "recorder" << \global \recorder >>
  \new Lyrics \lyricsto "recorder" \verseOne
>>

– if no, the same with:
\new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder
>>


HTH, Simon




--
ॐ नमः शिवाय



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


Re: adding a markup ("sim.") to the end of a SustainPedalBracket

2016-01-03 Thread Paul Morris
> On Dec 27, 2015, at 7:25 PM, David Kastrup  wrote:
> 
>> (2)
>> The doc-string for `stencil-whiteout' implies that @var{thickness} is
>> optional. As far as I understand it's not.

You’re right that the doc-string is misleading.  @var{thickness} is required as 
an argument but if its value is not a number then an appropriate value is 
selected based on @var{style}.  If the user hasn’t explicitly specified a 
number for the thickness of the whiteout, then this procedure is called with an 
empty/null/non-number value for @var{thickness}.

> Should it be?  Would that have saved us from the error?

I don’t think it would have prevented this error but it probably makes sense to 
make it an optional argument.  I’ll prepare a patch for that so the code will 
match the doc string.

-Paul



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


Re: Strings as variable names

2016-01-03 Thread Simon Albrecht

On 03.01.2016 21:34, Johan Vromans wrote:

On Sun, 03 Jan 2016 21:16:27 +0100
David Kastrup  wrote:


Johan Vromans  writes:

Is this going to be taken seriously or can I spare the efforts?

There is a tracker issue for it and some discussion. [..] Have you
followed the discussion in the tracker?

No, for the simple reasons that a) noone mentioned on the list there was
a tracker item and b) even though I know now, I have been unable to find it.

May I kindly request mentioning the URL to the list?



You’ll find the link to the Rietveld issue therein.

Yours, Simon

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


Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Sun, 03 Jan 2016 21:16:27 +0100
David Kastrup  wrote:

> Johan Vromans  writes:
> > Is this going to be taken seriously or can I spare the efforts?  

> There is a tracker issue for it and some discussion. [..] Have you
> followed the discussion in the tracker?

No, for the simple reasons that a) noone mentioned on the list there was 
a tracker item and b) even though I know now, I have been unable to find it.

May I kindly request mentioning the URL to the list?

-- Johan
   http://johan.vromans.org/seasons_greetings.html

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


Re: Strings as variable names

2016-01-03 Thread David Kastrup
Johan Vromans  writes:

> On Mon, 28 Dec 2015 20:28:58 +0100
> Johan Vromans  wrote:
>
>> NR refers to
>> http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables
>> which does not mention the quoted syntax, and explicitly disallows dashes
>> and underscores.
>> 
>> === Suggested replacement text ===
>> ...
>> === end of suggestion ===
>
> Is this going to be taken seriously or can I spare the efforts?

There is a tracker issue for it and some discussion.  The current state
is somewhat misleading as well as inconsistent, so change is desirable.
There does not seem to be a high level of excitement for fixing this
among those who discussed it.  That makes it likely that any action will
take a while before the topic reaches the top of the importance list for
any of the usual suspects.  Have you followed the discussion in the
tracker?

-- 
David Kastrup

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


Re: turn off tab double half note stems

2016-01-03 Thread Marc Hohl

Am 03.01.2016 um 21:05 schrieb Paul Morris:

On Dec 29, 2015, at 11:02 AM, Steve Fullerton mailto:sf...@verizon.net>> wrote:

In tab, lilypond draws a double stem for half notes. This is done
intentionally to distinguish half notes from quarter notes.


I’m curious about these double stems.  Does anyone know if they are a
common/standard way to indicate half notes in tab?  I searched the web
but didn’t turn up any documentation on this.


I am responsible for the double stems in tablature, but I did not invent 
them ;-)


AFAIK, there is no common standard for tablature with stems.

I found the double-stemmed variant in some examples and found it quite
more readable as – for instance – circles drawn around the fret numbers 
to indicate half or whole notes (this looks even more ugly with chords).





Is there a way to turn this feature off so half note stems are drawn
with a single line like quarter notes?


I was looking into the source code and it seems that for completeness
one should also revert the Stem.X-extent:


+1

Marc


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


Re: Strings as variable names

2016-01-03 Thread Johan Vromans
On Mon, 28 Dec 2015 20:28:58 +0100
Johan Vromans  wrote:

> NR refers to
> http://www.lilypond.org/doc/v2.19/Documentation/learning/organizing-pieces-with-variables
> which does not mention the quoted syntax, and explicitly disallows dashes
> and underscores.
> 
> === Suggested replacement text ===
> ...
> === end of suggestion ===

Is this going to be taken seriously or can I spare the efforts?

-- Johan
   http://johan.vromans.org/seasons_greetings.html

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


Re: turn off tab double half note stems

2016-01-03 Thread Paul Morris
> On Dec 29, 2015, at 11:02 AM, Steve Fullerton  wrote:
> 
> In tab, lilypond draws a double stem for half notes. This is done 
> intentionally to distinguish half notes from quarter notes. 

I’m curious about these double stems.  Does anyone know if they are a 
common/standard way to indicate half notes in tab?  I searched the web but 
didn’t turn up any documentation on this.  


> Is there a way to turn this feature off so half note stems are drawn with a 
> single line like quarter notes?

I was looking into the source code and it seems that for completeness one 
should also revert the Stem.X-extent:

\version “2.19.35”

\new TabStaff \with { 
  \tabFullNotation
  \revert Stem.stencil
  \revert Stem.X-extent
}
 { c''2 4 4 }


Cheers,
-Paul___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: guileV2 and Lilypond (was: Strings as variable names)

2016-01-03 Thread Paul Morris
> On Jan 3, 2016, at 11:14 AM, Menu Jacques  wrote:
> 
> A newbie question: what are the expected benefits and challenges of moving 
> from guile 1.8.x to guile 2.y?

As I understand it, guile 2.0 introduced significant performance improvements, 
mainly for compiled scheme, but since LilyPond interprets scheme, and the 
scheme interpreter in guile 2.0 is actually slower than in 1.8 (but faster in 
2.2 than in 2.0)  …just how much of the performance benefits LilyPond will 
enjoy remains to be seen.

One of the immediate benefits is just keeping up with the current guile version 
distributed with gnu/linux distributions.  They don’t want to keep including 
guile 1.8 just for LilyPond’s sake, so LilyPond could get dropped from these 
distributions.

But the big story is the challenges -- mainly that guile 2.0 still has bugs 
that need to be fixed for it to work reliably with LilyPond.

I recently saw this announcement about guile 2.1.1 the "first pre-release in 
what will become the 2.2 stable series”:
http://savannah.gnu.org/forum/forum.php?forum_id=8397

That led me to the redesigned guile website and their mailing list, where I 
found a post that touches on the need for better LilyPond support in guile:
http://lists.gnu.org/archive/html/guile-devel/2015-11/msg5.html

And this follow-up post that clearly lays out the current showstopper bug: 
http://lists.gnu.org/archive/html/guile-devel/2015-11/msg00031.html

Maybe that sheds some light on this.  Clarifications and additions welcome.

-Paul




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


Re: trying to attach lyrics to global variable in /score

2016-01-03 Thread Simon Albrecht

On 03.01.2016 20:40, Ryan Michael wrote:

I have the following lilypond code:


\score {
  \new StaffGroup <<
   \new Staff << \global \recorder >>

   \new Lyrics \lyricsto "recorder" {
  \verseOne
}

\new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}


\lyricsto "recorder" means: associate these lyrics with the voice named 
"recorder". You can create a voice with a name by using \new Voice = 
"recorder" { … some music … }. The question now is: should \global be in 
the same voice like \recorder? If yes,


<<
  \new Staff \new Voice = "recorder" << \global \recorder >>
  \new Lyrics \lyricsto "recorder" \verseOne
>>

– if no, the same with:
\new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder
>>


HTH, Simon

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


trying to attach lyrics to global variable in /score

2016-01-03 Thread Ryan Michael
I have the following lilypond code:


\score {
  \new StaffGroup <<
   \new Staff << \global \recorder >>

   \new Lyrics \lyricsto "recorder" {
  \verseOne
}

\new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}


However I get the error:

*cannot find Voice `recorder'*

"recorder" is defined earlier in the same file as:

recorder = \new Voice \relative c' {

%lorem ipsum note note note%

c1 c1 c1 c1 c1 c1 c1 r4 c1 c1 c1 c1 c2.
}






-- 
ॐ नमः शिवाय
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: guileV2 and Lilypond

2016-01-03 Thread David Kastrup
Menu Jacques  writes:

> Hello folks,
>
> A happy new year 2016 to everybody!
>
> A newbie question: what are the expected benefits and challenges of
> moving from guile 1.8.x to guile 2.y?

The same as last time the topic came up.

-- 
David Kastrup

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


Re: Notation snippets

2016-01-03 Thread Marc Hohl

Am 03.01.2016 um 17:05 schrieb Jayaratna:

Ouch, I thought you could import glyphs from svg: my knowledge of
Metafont is = 0


I did not follow this thread closely, but if you want to add glyphs that
are similar to those that already exist, then working with Metafont
should not be all that hard IMHO.

I cannot promise that I have enough time to help you with this task, but
I did some stuff with Metafont long time ago, so we can give it a try
... ;-)

HTH,

Marc


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


guileV2 and Lilypond (was: Strings as variable names)

2016-01-03 Thread Menu Jacques
Hello folks,

A happy new year 2016 to everybody!

A newbie question: what are the expected benefits and challenges of moving from 
guile 1.8.x to guile 2.y?

JM


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


Re: Notation snippets

2016-01-03 Thread Jayaratna
Ouch, I thought you could import glyphs from svg: my knowledge of Metafont is
= 0 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Notation-snippets-tp185122p185496.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: Strings as variable names

2016-01-03 Thread Paul Morris
> On Jan 3, 2016, at 10:06 AM, David Wright  wrote:
> 
> Recognising the lack of this construct, python is currently adding string 
> interpolation to the language.

Looks like a trend as Javascript also got it in the ECMAscript 2015 
specification:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/template_strings

I mention this only for curiosity’s sake.  "I have no dog in this race", as 
they say, and as David mentioned, LilyPond as a language is not comparable to 
Javascript, Python, Perl, etc… that would be the Scheme/Guile department.

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


Re: Strings as variable names

2016-01-03 Thread David Kastrup
David Wright  writes:

> On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote:
>> 
>> The strings in Python's regular expression replacements can interpolate
>> variable values, but those are not part of the string syntax but of the
>> regexp replacement semantics.
>
> Recognising the lack of this construct, python is currently adding string
> interpolation to the language.
>
> https://www.python.org/dev/peps/pep-0498/

Yes and no: you use an f prefix to such strings (for "formatted", in
analogy to the r prefix for "raw" strings) to indicate explicitly you
want to make use of interpolation.

So there is no interpolation for existing strings.  It's essentially a
lexical shorthand for Python's % formatting construct.

At any rate, its place is in the programming language actually used for
string manipulation, so if you want to use something like that in
LilyPond eventually, it makes much more sense asking on the Guile user
and/or developer list than here.

And/or try to work on the Guile 2.0 porting task of course, since
otherwise such changes will not trickle back into LilyPond.

-- 
David Kastrup

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


Re: Notation snippets

2016-01-03 Thread Thomas Morley
2015-12-29 19:32 GMT+01:00 Jayaratna :
>
> It's only 24 glyphs, not too much work.
> I can export them in svg format, but I'd need two to know on what original
> the petrucci noteheads have been drawn after. I've never made a font, I
> guess the glyphs are to be precisely placed on their font slots. Stems will
> have to be reduced.
>
> 


Maybe the following link is of some help:

http://www.lilypond.org/doc/v2.19/Documentation/contributor/modifying-the-feta-font

Cheers,
  Harm

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


Re: Notation snippets

2016-01-03 Thread Thomas Morley
2015-12-27 22:53 GMT+01:00 Thomas Morley :
> 2015-12-27 21:10 GMT+01:00 Thomas Morley :
>> 2015-12-27 19:19 GMT+01:00 Jayaratna :
>>> Hello, Harm,
>>>
>>> all notehad styles are supported, but petrucci, semipetrucci and
>>> blackpetrucci styles do not give the proper flag: maybe I should post this
>>> on the bugs list.
>>>
>>> 
>>
>>
>>
>> The problem is that we don't have other ancient flags than flags.mensural
>> Right now only (neo-)mensural style-note-heads will get
>> mensural-flags, the other ancient styles default ones.
>> \override #'(flag-style . ) only works for straight/flat-flags 
>> with.
>>
>> Not sure, if we should hardwire all ancient note-head-styles to
>> mensural-flags, but the user should be able to set the flag-style he
>> prefers even for ancient note-heads.
>> So far I'd call it a bug, yes
>>
>> Will have a closer look.
>
> https://sourceforge.net/p/testlilyissues/issues/4716/


In master now, if you don't compile LilyPond yourself, it will be
available with version "2.19.36"

Cheers,
  Harm

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


Re: Strings as variable names

2016-01-03 Thread David Wright
On Mon 28 Dec 2015 at 20:27:22 (+0100), David Kastrup wrote:
> Johan Vromans  writes:
> 
> > On Mon, 28 Dec 2015 19:01:47 +0100
> > Urs Liska  wrote:
> >
> >> > part = cello
> >> > 
> >> > \score {
> >> >   \"bella_melodia_\part"
> >> > }
> >> 
> >> I think something like this should be achievable using a music function
> >> with two string arguments.
> >
> > Yes, but my suggestion was to have a mechanism for interpolation of
> > variables in strings, which is much more generic, flexible and
> > powerful.
> 
> The above is mainly confused.  Remember that \n in a string stands for
> newline.
> 
> > And most programming languages have it.
> 
> Uh what?  Bourne shells can interpolate variables (written with $ rather
> than \ by the way) into _double_-quoted strings.  Maybe some other
> shells can.
> 
> But what _programming_ languages allow interpolating into quoted
> strings?  The C preprocessor can expand #identifier into a string, and
> juxtaposed with other double-quoted strings they combine into a larger
> string I believe.  But that's only for preprocessor constants, and those
> are not really part of the language proper.
> 
> The strings in Python's regular expression replacements can interpolate
> variable values, but those are not part of the string syntax but of the
> regexp replacement semantics.

Recognising the lack of this construct, python is currently adding string
interpolation to the language.

https://www.python.org/dev/peps/pep-0498/

Cheers,
David.

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


Re: A twelve tone matrix engraver

2016-01-03 Thread David Kastrup
Caio Giovaneti de Barros  writes:

> On 02-01-2016 16:18, David Kastrup wrote:
>> It might also be worth taking a look at the facilities provided by
>> issue 4702
>> http://sourceforge.net/p/testlilyissues/issues/4702/> to see
>> how (or whether) they would have helped here. 
> Do you think you could write some small example of what those
> functions do? I didn't understand how they are used. One thing that I
> really wanted is an automatic way for the software to decide what
> notes should be flat and what should be sharp, even if it's not
> perfect. Currently my code only outputs sharps and to be honest this
> is not very natural to read (pun intended).

\version "2.19.35"

#(define semi->pitch
   (make-semitone->pitch (music-pitches #{ c cis d es e f fis g gis a bes b #})))

{ #@(map (lambda (s) #{ $(semi->pitch s) 2 #})
 (iota 37 (ly:pitch-semitones #{ g #}))) }

% That's usually close to C Major/A Minor, let's try something more
% befitting Fis Major/Dis Minor

#(define femi->pitch (shift-semitone->pitch #{ fis #} semi->pitch))

{ #@(map (lambda (s) #{ $(femi->pitch s) 2 #})
 (iota 37 (ly:pitch-semitones #{ g #}))) }

Note that make-semitone->pitch is a comparatively expensive call so it
makes sense to store the result, here semi->pitch and reuse it.
shift-semitone->pitch is quite cheap in contrast, so storing femi->pitch
is done more to make things more readable rather than out of efficiency
reasons.

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


Re: A twelve tone matrix engraver

2016-01-03 Thread Caio Giovaneti de Barros

Hi Kieren

On 02-01-2016 16:22, Kieren MacMillan wrote:
1. How difficult would it be to add a function which produced a row in 
“traditional format”, i.e., \tonerow #”RI4” would give you [from your 
example] { a’ gs’ c’’ d’’ ds’’ fs’ f’ e’ cs’’ g’ b’ as' } 
Not difficult at all! Try the attached files. Open the 12tone-matrix.ly 
and write at the end of the file:


\writeRow #'RI #3


(don't forget the single quote in the first argument)

You can do this in any file, just include this tree lines at the beginning:

#(define row '(some row))

\include "12tone-calc.scm"

\include"12tone-engravers.ily"


Right now the second argument is mandatory. This means that if you don't 
want any transpositions you need to write #0 as the second argument of 
\writeRow.


2. Can your code be extended easily/quickly to support arbitrary pitch 
sets and row counts? For example, I used a 10-tone row drawn from 
[only] 8 distinct pitch classes in a recent piece, and would love to 
have tools available to help with similar efforts in the future.
Well, that's exactly my intention! In theory it should be very easy to 
extend it this way. I have little time right now, but I'll keep the list 
updated in further implementations.


Cheers,
Caio
%
% Pitch manipulations in Scheme %
%

%% Creating Transpositions and inversions
% Transpositions

#(define (transpose ls int mod)
   (map (lambda (x) (modulo (+ int x) mod)) ls))

% Set first pitch as "0" and maintain interval relations

#(define (zero-pset ls mod)
   (transpose ls (* (car ls) -1) mod))

% Inversion
#(define (invert ls mod)
   (map (lambda (x) (modulo x mod))		 ; keep inside modulos (e.g. 12 for 12-tone rows)
 (map (lambda (y) (+ y (car ls)))		 ; sum the inverted intervals with the first pitch of the original pitch set
   (map (lambda (z) (* z -1)) (zero-pset ls mod) % invert zeroed pitch set signals

% Apply the chosen operation in different ways depending on the number of arguments

#(define (pset-op op pset . ls)
   (cond 
   ((null? ls) (op pset))
   ((null? (cdr ls)) (op pset (car ls)))
   (else (op pset (car ls) (cadr ls)

% 12 tone specific operations (always inside modulos 12)

#(define (12transpose pset n) (transpose pset n 12))

#(define (12invert pset) (invert pset 12))

#(define (12retrograde pset) (reverse pset))

#(define (12retinvert pset) (reverse (invert pset 12)))

#(define (get-row pset type transp)
   (cond
((eqv? type 'O) (pset-op 12transpose pset transp))
((eqv? type 'R) (12retrograde (pset-op 12transpose pset transp)))
((eqv? type 'I) (12invert (pset-op 12transpose pset transp)))
((eqv? type 'RI) (12retinvert (pset-op 12transpose pset transp)))
(else (error "Wrong type of operation. Should be O, R, I or RI"

% Transpose the original 12 tone row according to the intervals of the inverted form

#(define (squareTranspose 12set n)
   (list-ref (invert (zero-pset 12set 12) 12) n))




% Some further pitch manipulations (no used yet)
% List all transpositions

#(define (all-transpositions pset mod)
   (let loop ((x pset) (y '()))
 (if (null? x)
 (reverse y)
 (loop (cdr x) (cons (transpose (zero-pset pset) (car x) mod) y)

% list all transpositions in ascending order

#(define (all-transpositions-order pset mod)
   (let loop ((x pset) (y '()) (z 0))
 (if (null? x)
 (reverse y)
 (loop (cdr x) (cons (transpose pset z mod) y) (+ z 1)

% list all inversions

#(define (all-inversions pset mod)
   (let loop ((x (all-transpositions pset mod)) (y '()))
 (if (null? x)
 (reverse y)
 (loop (cdr x) (cons (invert (car x) mod) y)

% List all inversions in ascending order

#(define (all-inversions-order pset mod)
   (let loop ((x (all-transpositions-order pset mod)) (y '()))
 (if (null? x)
 (reverse y)
 (loop (cdr x) (cons (row-invert (car x) mod) y)\version "2.18.2"

% "square" transpositions linked to the defined row

#(define (squareNumber n) (squareTranspose row n))

% List the rows that will be written

#(define (squareRows n) (pset-op 12transpose row (squareTranspose row n)))

% Convert the numbers in the row to Lilypond pitches

#(define (number->note n)
   (cond
((= n 0) (ly:make-pitch 1 0))
((= n 1) (ly:make-pitch 1 0 1/2))
((= n 2) (ly:make-pitch 1 1))
((= n 3) (ly:make-pitch 1 1 1/2))
((= n 4) (ly:make-pitch 0 2))
((= n 5) (ly:make-pitch 0 3))
((= n 6) (ly:make-pitch 0 3 1/2))
((= n 7) (ly:make-pitch 0 4))
((= n 8) (ly:make-pitch 0 4 1/2))
((= n 9) (ly:make-pitch 0 5))
((= n 10) (ly:make-pitch 0 5 1/2))
((= n 11) (ly:make-pitch 0 6))
(else (error "Pitch not found"

% Write elements (markups or note)

writeElements = #(define-music-function (parser location sym1 sym2 fn1 ls) 
(symbol? symbol? procedure? list?)
   (make-music 'SequentialMusic 'elements
 (let loop ((ls ls))
   (if (n

Re: A twelve tone matrix engraver

2016-01-03 Thread Caio Giovaneti de Barros



On 02-01-2016 16:18, David Kastrup wrote:
It might also be worth taking a look at the facilities provided by 
issue 4702 http://sourceforge.net/p/testlilyissues/issues/4702/> 
to see how (or whether) they would have helped here. 
Do you think you could write some small example of what those functions 
do? I didn't understand how they are used. One thing that I really 
wanted is an automatic way for the software to decide what notes should 
be flat and what should be sharp, even if it's not perfect. Currently my 
code only outputs sharps and to be honest this is not very natural to 
read (pun intended).


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


Re: Adjusting OttavaBracket parameters (was "Re: can't seem to apply tweaks on tweaks")

2016-01-03 Thread Thomas Morley
2016-01-03 0:16 GMT+01:00 David Kastrup :
> Thomas Morley  writes:
>
>> If you do it 'before-line-breaking it works, yes, but can't be changed
>> 'after-line-breaking anymore ...
>>
>> No idea what's happening and why.
>
> Caching?  I don't see you using unpure-pure containers.  Anything else
> is only evaluated once.
>
> --
> David Kastrup

Well, up to now unpure-pure containers are the most cryptic and
ununderstood topic for me.
Over the years I tried to understand them again and again, with little success.

After your hint above I looked through our docs again.
I found:

NR 5.5.6 unpure-pure containers
http://www.lilypond.org/doc/v2.19/Documentation/notation/unpure_002dpure-containers

unpure-pure-container.ly
in /input/regression

CG 10.13 Understanding pure properties
http://www.lilypond.org/doc/v2.19/Documentation/contributor/understanding-pure-properties


I have to say the documentation became better over the years in the
sense of being more verbose and yes, this is an advantage.
But it lacks of examples. The one in the NR works with _and_ without
unpure-pure-container.
So the only compilable and working example (i.e. where
unpure-pure-container make the difference) is the one from the
reg-tests.
Furthermore, almost always the topic is overriding directly
Y-offset/extent or properties affecting those.

Ok, setting OttavaBracket.text may affect Y-spacing, though I've no
idea idea how to do it with a unpure-pure-container.

May I ask you how to do it with this code-example?

{
  \override Staff.OttavaBracket.after-line-breaking =
#(lambda (grob) (ly:grob-set-property! grob 'text "foo"))
  \ottava #1 c''4 4 4 4  4 4 \ottava #0 4 4  \break
  \ottava #1 c''4 4 4 4  4 4 \ottava #0 4 4  \break
  \ottava #1 c''4 4 4 4  \break 4 4 \ottava #0 4 4
}

Cheers,
  Harm

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


Re: changePitch and ties

2016-01-03 Thread Gilles THIBAULT
> I'll try to include it in a next release of changePitch.ly
Done.

http://gillesth.free.fr/Lilypond/changePitch/

Note that, you can deactivate the new automatic tie grouping, for pieces done 
with previous version of changePitch.ly. Please, see the (also new) doc, 
changePitch-doc.pdf (end of chapter 6), in the directory above.

Happy new year to everybody.

-- 
Gilles

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


Re: A twelve tone matrix engraver

2016-01-03 Thread Caio Giovaneti de Barros

Hello!

On 02-01-2016 15:52, Urs Liska wrote:

Hi,

unfortunately I have only *very* limited time right now, but this 
looks absolutely great!



Thanks!


Just one minor suggestion: I'd insert
\accidentalStyle dodecaphonic
in the \layout block.


That's a good idea. The less ambiguity the better.

I think this would be an extremely nice topic for a post on Scores of 
Beauty, if you'd like to write one.


I actually thought about that,  having learned a lot of things from 
there. I'll send you a private message! Thanks, Urs!
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user