Re: how to get "h" instead of "b" in notenames

2014-11-04 Thread SoundsFromSound
Stefan Thomas-5 wrote
> Dear community,
> in the below quoted snippet I get "b" instead of the german "h". How can I
> achieve it?
> 
> \version "2.18.2"
> 
> \language "deutsch"
> 
> onthelines = \relative e' { e1 g h d f }
> 
> 
> \score {
> 
> <<
> 
> \new Staff \onthelines
> 
> \new NoteNames \onthelines
> 
>>>
> 
> }
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi Stefan,

I'm confused, I thought the German "include" was setup something like 
deutsch.ly = c d e f g a b h

No?



-
composer | sound designer 
LilyPond Tutorials (for beginners) --> http://bit.ly/bcl-lilypond
--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-get-h-instead-of-b-in-notenames-tp168372p168375.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: how to get "h" instead of "b" in notenames

2014-11-04 Thread Martin Tarenskeen



On Tue, 4 Nov 2014, Stefan Thomas wrote:


Dear community,
in the below quoted snippet I get "b" instead of the german "h". How can I 
achieve it?

\version "2.18.2"

\language "deutsch"
onthelines = \relative e' { e1 g h d f }

\score {
<<
\new Staff \onthelines
\new NoteNames \onthelines
>>
}


Interesting. I would call it a bug, even if it can be fixed with some 
schemish tweaks and overrides.


--

MT


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


Re: how to get "h" instead of "b" in notenames

2014-11-04 Thread Noeck
>> \version "2.18.2"
>> \language "deutsch"
>>
>> onthelines = \relative e' { e1 g h d f }
>>
>> \score {
>> <<
>>   \new Staff \onthelines
>>   \new NoteNames \onthelines
>> >>

> I'm confused, I thought the German "include" was setup something like 
> deutsch.ly = c d e f g a b h


The input is valid with \language "deutsch" and the notes in the Staff
are correct. But the NoteNames show the letter "b" below the 3rd note
which is called "h" in German. He wants the letter "h" there.

Just to clarify what I think Stefan Thomas asked.

I don’t know how to make the NoteNames aware of the (input) language for
its output.

Joram

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


Re: how to get "h" instead of "b" in notenames

2014-11-04 Thread Federico Bruni
2014-11-04 9:42 GMT+01:00 Noeck :

> The input is valid with \language "deutsch" and the notes in the Staff
> are correct. But the NoteNames show the letter "b" below the 3rd note
> which is called "h" in German. He wants the letter "h" there.
>
> Just to clarify what I think Stefan Thomas asked.
>


it should be this bug:
https://code.google.com/p/lilypond/issues/detail?id=1367
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: random notes

2014-11-04 Thread anders . vinjar
Hi Stefan

S> how can I generate pitches with sharp and flats?

Have a look at the docs for ly:make-pitch, esp. the last argument to the
function.

S> How can I change the range of input notes?

You mean register or octave for the generated notes?  Same thing as
above, only check first argument to ly:make-pitch instead.

Getting guile running, w. lilypond loaded is invaluable for
experimenting with things like this.  Eg. (in a terminal):

$ lilypond scheme-sandbox
GNU LilyPond 2.19.16
Processing `/usr/local/share/lilypond/2.19.16/ly/scheme-sandbox.ly'
Parsing...
guile> (ly:make-pitch 2 2 -1/2)
#
guile> 

Good luck!

-anders


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


Re: how to get "h" instead of "b" in notenames

2014-11-04 Thread Jay Vara
Apparently, in the NoteNames context it defaults to Dutch. You can use the
following code to get what you want I think. b has been redefined to h in
the definition of newnames and the myNoteNames override to NoteName.stencil
makes this substitution.
 

%%%
\version "2.18.2"
\language "deutsch"
onthelines = \relative e' { e1 g h d f }


newnames =
#`(("c" . "c")
   ("d" . "d")
   ("e" . "e")
   ("f" . "f")
   ("g" . "g")
   ("a" . "a")
   ("b" . "h")
   )




myNoteNames =
#(lambda (grob)
   (let* (
   ;; bindings
   (default-name (ly:grob-property grob 'text))
   (new-name (assoc-get default-name newnames))
   )
 ;; body
 (ly:grob-set-property! grob 'text new-name)
 (ly:text-interface::print grob)
 )
   )

\score {
  <<
\new Staff \onthelines
\new NoteNames \with { \override NoteName.stencil = #myNoteNames }
{\onthelines}
  >>
}
%

 



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/how-to-get-h-instead-of-b-in-notenames-tp168372p168383.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


Colors in alists

2014-11-04 Thread Urs Liska
I want to store colors in an alist like

#(define types
  '(("one" . "red")
("two" . "blue")))

I can retrieve and display the values with assoc-ref but I don't know how to 
turn the returned string into a color to be used in an override.

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


Re: Colors in alists

2014-11-04 Thread Marc Hohl

Am 04.11.2014 um 11:48 schrieb Urs Liska:

I want to store colors in an alist like

#(define types
'(("one" . "red")
("two" . "blue")))

I can retrieve and display the values with assoc-ref but I don't know
how to turn the returned string into a color to be used in an override.


Untested: maybe you store the color as a symbol, or use string->symbol?

Marc


Any help appreciated.
Urd


___
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: Colors in alists

2014-11-04 Thread Urs Liska


Am 4. November 2014 12:01:22 MEZ, schrieb Marc Hohl :
>Am 04.11.2014 um 11:48 schrieb Urs Liska:
>> I want to store colors in an alist like
>>
>> #(define types
>> '(("one" . "red")
>> ("two" . "blue")))
>>
>> I can retrieve and display the values with assoc-ref but I don't know
>> how to turn the returned string into a color to be used in an
>override.
>
>Untested: maybe you store the color as a symbol, or use string->symbol?

Unfortunately not.
Type check for `color' failed; value `(quote darkgreen)' must be of type `color'

Urs

>
>Marc
>>
>> Any help appreciated.
>> Urd
>>
>>
>> ___
>> 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: Where to Download the New Music Fonts?

2014-11-04 Thread Son_V
Shouldn't the name of the last font in the page be "SCARLATTI"?



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Where-to-Download-the-New-Music-Fonts-tp165035p168388.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: Text uder the score

2014-11-04 Thread Federico Bruni
2014-11-03 19:45 GMT+01:00 Son_V :

> Hi, I should put some instructions at the bottom of a score; I found at
> http://lilypond.org/doc/v2.18/Documentation/notation/writing-text how to
> write some text, but I wasn't able to find HOW to work with the text, how
> to
> put it on the left or right or at the center of the page, how to make
> spaces, how to displace the text vertically, how to make some lines bold or
> italic; I've perused in the online and the pdf manuals with no success
> (maybe in the guide to Lilypond notation from page 650 up, but it confused
> me), nor how to insert a blank line in the example I found. It's not a
> complex work, I just want to insert simple instructions for a child's song.
> What I should be glad to find is a kind of tutorial about this. Anyone can
> help? Thanks.
>
>
Where do you want to put this information?
If you want to enter a few sentences at the beginning of a piece, this is a
minimal example:

\version "2.18.2"

\paper {
  markup-markup-spacing.minimum-distance = 10
  markup-system-spacing.minimum-distance = 12
}

\header {
  title = "song title"
}

\markup {
  \column {
"Simple instructions for this song"
"Another line"
  }
}

\score {
  \new Staff \relative c' { c4 }
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Colors in alists

2014-11-04 Thread Paul Morris
Urs Liska wrote
> Unfortunately not.
> Type check for `color' failed; value `(quote darkgreen)' must be of type
> `color'

I don't know what you've tried.  Have you tried it without the quote?  See
the following:

\version "2.18.2"
#(display "red")
#(newline)
#(display 'red) 
#(newline)
#(display red)
#(newline)
#(display blue)
#(newline)
#(display green)

Without a compilable tiny example I can't try this out though.

Cheers,
-Paul




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168390.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: Colors in alists

2014-11-04 Thread Paul Morris
Here we go: 

\version "2.18.2"
#(display (color? "red"))
#(newline)
#(display (color? 'red))
#(newline)
#(display (color? red))



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168391.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: Colors in alists

2014-11-04 Thread Urs Liska


Am 4. November 2014 14:52:00 MEZ, schrieb Paul Morris :
>Here we go: 
>
>\version "2.18.2"
>#(display (color? "red"))
>#(newline)
>#(display (color? 'red))
>#(newline)
>#(display (color? red))
>
>

Thank you.
But the problem comes when retrieving the value with assoc-ref from an alist 
(as defined in my initial post). It seems that then it's not a color object 
anymore.




>
>--
>View this message in context:
>http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168391.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


Re: Colors in alists

2014-11-04 Thread Jay Anderson
On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska  wrote:
> I want to store colors in an alist like
>
> #(define types
> '(("one" . "red")
> ("two" . "blue")))
>
> I can retrieve and display the values with assoc-ref but I don't know how to
> turn the returned string into a color to be used in an override.

Try quasiquote + unquote:

#(define types
  `(("one" . ,red)
("two" . ,blue)))

#(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))

-Jay

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


Re: Colors in alists

2014-11-04 Thread R. Mattes
On Tue, 04 Nov 2014 12:18:33 +0100, Urs Liska wrote
> Am 4. November 2014 12:01:22 MEZ, schrieb Marc Hohl :
> >Am 04.11.2014 um 11:48 schrieb Urs Liska:
> >> I want to store colors in an alist like
> >>
> >> #(define types
> >> '(("one" . "red")
> >> ("two" . "blue")))
> >>
> >> I can retrieve and display the values with assoc-ref but I don't know
> >> how to turn the returned string into a color to be used in an
> >override.
> >
> >Untested: maybe you store the color as a symbol, or use string->symbol?
>
> Unfortunately not.
> Type check for `color' failed; value `(quote darkgreen)' must be of
> type `color'

Classic layer 8 error :-)
You're not storing a symbol, you are storing a list in the cdr of the
assoc. Hint:

 '(("one" . 'red)
   ("two" . 'blue))

Quotes the entire list, and "'x" is a syntactic shortcut to "(quote x)",
so your list evaluates to:

(list (cons "one" (quote red))
  (cons "two" (quote blue)))

Write

 '(("one" . red)
   ("two" . blue))

if you want symbols as the values of the assoc.

HTH Ralf Mattes

--
R. Mattes -
Hochschule fuer Musik Freiburg
r...@mh-freiburg.de


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


Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Mark Veltzer
Hello all,

Just moved to ubuntu 14.10 (utopic) and got lilypond 2.18.2 instead of
2.16.2 that was installed on ubuntu 14.04 (trusty). This broke all of my
tunes (I have about 150 of them since I do a big lilypond project).

The problem: \score { << \new Voice="foo" \relative { c d e f g } >> }

produces different outputs in the two versions. because I do not specify an
absolute note in the '\relative' syntax the first note inside the score is
supposed to be taken as absolute and therefore it is supposed to be middle c.
In lilypond 2.16 this is the case.
In lilypond 2.18 this is not the case. The first c in this example is drawn
as the c below middle c. I really don't know why.

I really don't care what the default of lilypond behavior as far as
\relative without a note outside the score is as long as it stays the same
across versions of lilypond. I now have to manually edit 150 files...:(

Trying to compile on 2.18.2 with \version "2.16.2" did not help me as I did
not get 2.16 behavior.

Hope this helps and I did not come off sounding harsh. I love lilypond
greatly, its just that I'm pissed at having to edit 150 files and I'm
wondering if I'll have to do this again in a half a year or a year...:)

Mark


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


Re: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Matthias Böhringer

Hello Mark,

you do know about convert-ly?

HTH, Matthias

Am 04.11.2014 um 16:15 schrieb Mark Veltzer:

Hello all,

Just moved to ubuntu 14.10 (utopic) and got lilypond 2.18.2 instead of
2.16.2 that was installed on ubuntu 14.04 (trusty). This broke all of my
tunes (I have about 150 of them since I do a big lilypond project).

The problem: \score { << \new Voice="foo" \relative { c d e f g } >> }

produces different outputs in the two versions. because I do not specify an
absolute note in the '\relative' syntax the first note inside the score is
supposed to be taken as absolute and therefore it is supposed to be middle c.
In lilypond 2.16 this is the case.
In lilypond 2.18 this is not the case. The first c in this example is drawn
as the c below middle c. I really don't know why.

I really don't care what the default of lilypond behavior as far as
\relative without a note outside the score is as long as it stays the same
across versions of lilypond. I now have to manually edit 150 files...:(

Trying to compile on 2.18.2 with \version "2.16.2" did not help me as I did
not get 2.16 behavior.

Hope this helps and I did not come off sounding harsh. I love lilypond
greatly, its just that I'm pissed at having to edit 150 files and I'm
wondering if I'll have to do this again in a half a year or a year...:)

Mark


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




--
Matthias Böhringer
Brunnenstraße 6
72296 Schopfloch-Unteriflingen

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


Re: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Joram
> I really don't care what the default of lilypond behavior as far as
> \relative without a note outside the score is as long as it stays the same
> across versions of lilypond. I now have to manually edit 150 files...:(

Do you know convert-ly? That is exactly to automate such syntax changes.
No need to be angry.

Cheers,
Joram

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


Re: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Shane Brandes
from command line in a folder you want your lilies changed issue:
convert-ly *.ly

very easy. No muddling around.

regards

Shane

On Tue, Nov 4, 2014 at 10:26 AM, Joram  wrote:
>> I really don't care what the default of lilypond behavior as far as
>> \relative without a note outside the score is as long as it stays the same
>> across versions of lilypond. I now have to manually edit 150 files...:(
>
> Do you know convert-ly? That is exactly to automate such syntax changes.
> No need to be angry.
>
> Cheers,
> Joram
>
> ___
> 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: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Mark Veltzer
Unfortunately I cannot use convert-ly, since on a large project such as I am
working on I am using an extra pre-processor before handing out the output
to lilypond.
This means that my "source" files are not in lilypond format but only
contain snipplets of lilypond code.
I actually imagine that every large scale lilypond project would do
something like this.
You can check this out at https://github.com/veltzer/openbook
What I'm basically saying here is that the whole approach of convert-ly is
dubious since it assumes that people are using lilypond a certain
straightforward way.
I understand the motivation of convert-ly: it allows you guys to break
backwards compatibility. But you are still breaking backwards compatibility
and it hurts.
A better way would have been to make the new lilypond support more features
but retain old behaviour until old behavior goes away gradually.
If that was the case I would not need to edit my files.

Cheers,
   Mark


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


Re: Lilypond 2.16 and 2.18 incompatibility for \relative without absolutenote outside the score

2014-11-04 Thread Trevor Daniels

Mark Veltzer wrote Tuesday, November 04, 2014 3:15 PM

> Just moved to ubuntu 14.10 (utopic) and got lilypond 2.18.2 instead of
> 2.16.2 that was installed on ubuntu 14.04 (trusty). This broke all of my
> tunes (I have about 150 of them since I do a big lilypond project).
> 
> The problem: \score { << \new Voice="foo" \relative { c d e f g } >> }
> 
> produces different outputs in the two versions. because I do not specify an
> absolute note in the '\relative' syntax the first note inside the score is
> supposed to be taken as absolute and therefore it is supposed to be middle c.
> In lilypond 2.16 this is the case.
> In lilypond 2.18 this is not the case. The first c in this example is drawn
> as the c below middle c. I really don't know why.

c is actually the note an octave below middle C.  c' is middle C.  As others
have noted, convert-ly should help with the conversion.

I'm sorry this has caused you grief, but, in our defence, the following has been
in the section on \relative in the Notation Reference in every release of 
LilyPond
since release 2.11.35 in 2007:

"If no startpitch is specified for \relative, then c' is assumed. However, this 
is a deprecated option and may disappear in future versions, so its use is 
discouraged."

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


Re: Lilypond 2.16 and 2.18 incompatibility for \relative withoutabsolute note outside the score

2014-11-04 Thread Trevor Daniels

Mark Veltzer wrote Tuesday, November 04, 2014 4:02 PM


> Unfortunately I cannot use convert-ly, since on a large project such as I am
> working on I am using an extra pre-processor before handing out the output
> to lilypond.
> This means that my "source" files are not in lilypond format but only
> contain snipplets of lilypond code.
> [snip]
> A better way would have been to make the new lilypond support more features
> but retain old behaviour until old behavior goes away gradually.
> If that was the case I would not need to edit my files.

LilyPond _does_ still support the old \relative syntax with an absolute
pitch prefixing the music, but it no longer supports the feature that
has been deprecated for 7 years.

Perhaps your pre-processor or a simple editor will be able to change
all instances of "\relative" to "\relative c'", assuming you have used the
deprecated syntax consistently.

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


Re: Colors in alists

2014-11-04 Thread Urs Liska


Am 04.11.2014 15:47, schrieb Jay Anderson:

On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska  wrote:

I want to store colors in an alist like

#(define types
'(("one" . "red")
("two" . "blue")))

I can retrieve and display the values with assoc-ref but I don't know how to
turn the returned string into a color to be used in an override.

Try quasiquote + unquote:

#(define types
   `(("one" . ,red)
 ("two" . ,blue)))

#(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))

-Jay


Hi Jay,

thanks, that was it. Still a mystery, this all ...

I would be extremely happy if someone could take the time and write a 
slow-paced tutorial about this on Scores of Beauty!


Best
Urs

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


Re: barnumber | post-event in music function

2014-11-04 Thread Urs Liska

Hi David,

thank you very much, actually it *did* help me a lot.

First to understand why my previous approaches just *could* not work. 
Then (hopefully) to understand how it can work.


I had a hard time to incorporate it into my real function because I 
didn't realize that LilyPond can't distinguish between a symbol and a 
string/markup for the first arguments: I had a markup? argument as 
second argument, and Lily took this for the first argument. However, 
moving the markup? argument behind the context-mod argument solved that too.


I'll eventually post the final file, although I'm afraid it's slightly 
too project specific to even be included in openlilylib (at least 
without some fundamental changes.


Best
Urs

Am 03.11.2014 22:07, schrieb David Nalesnik:

Hi Urs,

I'll try to address your first problem--which is pretty tricky!

On Mon, Nov 3, 2014 at 11:06 AM, Urs Liska > wrote:


Hi Scheme wizards, can you help me?

I have two unrelated questions regarding the attached file.
It is a very much stripped down version of a function actually in use.

It takes an annotation from the input file, produces a clickable
message on the console and colors the affected object. (In reality
it does and will do more, but that's what's necessary for the
example/question).

###
The first question should be quite simple, but I don't seem to
find a solution on my own: How can I make the function be able to
affect only selected items, e.g. only one note of the chord in the
example (or only a specific tie etc.)


This is hard to explain, and I'm afraid I'm not going to do a good job 
of it.


The issue here is that your function needs to be able to distinguish 
between tweaks and overrides.  Ideally, it should also be able to 
handle basic and directed tweaks.


The predicate for the last argument, ly:symbol-list-or-music?, is 
there to distinguish between tweak and override, and it is used in 
several functions for this purpose (\shape, \offset, and \alterBroken 
are those I know about).  If what follows is music, we get a tweak, if 
there is a symbol-list we get an override.


Since that variable needs to be fed either NoteHead in your example or 
a music expression, and you need NoteHead to specify the grob you want 
in a directed tweak, I added an optional variable, for use with the 
directed tweak form.  For a regular tweak, you just leave out that 
initial NoteHead.


This makes for a bit of awkwardness when you want to specify the 
object of your tweak and not let LilyPond determine it for you, but I 
don't see any other way.


Hope this helps,
David

%

\version "2.18.2"

annotate =
#(define-music-function (parser location name properties item)
   ((symbol?) ly:context-mod? symbol-list-or-music?)
   ;; annotates a musical object for use with lilypond-doc
   (let
(
  ;; create dummy alist (is that necessary?)
  (props '( )))

;; Add or replace props entries taken from the properties argument
(map (lambda (mod) (set! props
 (assoc-set! props
   (symbol->string (cadr mod)) (caddr mod
  (ly:get-context-mods properties))
;; produce a clickable message
(ly:input-message location "Annotation")

;; Print a message with all properties to the console
(map (lambda (prop)
   (ly:message (format "~a: ~a" (car prop) (cdr prop
  props)
(ly:message "\n"))

   ;; Color the affected grob
   (cond
((and (ly:music? item) (symbol? name))
 #{
   \tweak #`(,name color) #darkgreen #item
 #})
((ly:music? item)
 #{
   \tweak color #darkgreen #item
 #})
(else
 #{
   \once \override #item #'color = #darkgreen
 #})))


%%
% Usage examples

% OVERRIDE SYNTAX
{
  \annotate \with {
author = "Urs Liska"
message = "Important information"
  } NoteHead
  -> d' e'
}

% BASIC TWEAK

{
  -> d' e'
}

% DIRECTED TWEAK

{
  -> d' e'
}



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


Re: Colors in alists

2014-11-04 Thread Paul Morris
Jay Anderson wrote
> Try quasiquote + unquote:
> 
> #(define types
>   `(("one" . ,red)
> ("two" . ,blue)))
> 
> #(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))
> 
> -Jay

That does it, or you can use "list" and "cons".  Allow me to provide a tiny
example:

%
\version "2.18.2"

#(define types
   `(("one" . ,red)
 ("two" . ,blue)))

#(define typesB
   (list
(cons "one" red)
(cons "two" blue)))

#(display (color? (assoc-ref types "one")))

#(newline)

#(display (color? (assoc-ref typesB "one")))

%

This displays: 
#t
#t

With either of these the red and blue are not quoted which seems to have
been the problem before.  

-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168405.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: Colors in alists

2014-11-04 Thread Paul Morris
Urs Liska wrote
> I would be extremely happy if someone could take the time and write a 
> slow-paced tutorial about this on Scores of Beauty!

Meanwhile here's a slow-paced video tutorial on quoting in scheme (although
it doesn't get to quasi-quoting-and-un-quoting):
https://www.youtube.com/watch?v=ZoKozeeYsWk

The whole series of videos is good.

Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Colors-in-alists-tp168384p168406.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: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Mark Veltzer
Unfortunately I cannot use convert-ly, since on a large project such as I
am working on I am using an extra pre-processor before handing out the
output to lilypond.
This means that my "source" files are not in lilypond format but only
contain snipplets of lilypond code.
I actually imagine that every large scale lilypond project would do
something like this.
You can check this out at https://github.com/veltzer/openbook
What I'm basically saying here is that the whole approach of convert-ly is
dubious since it assumes that people are using lilypond a certain
straightforward way.
I understand the motivation of convert-ly: it allows you guys to break
backwards compatibility. But you are still breaking backwards compatibility
and it hurts.
A better way would have been to make the new lilypond support more features
but retain old behaviour until old behavior goes away gradually.
If that was the case I would not need to edit my files.

Cheers,
   Mark

On Tue, Nov 4, 2014 at 5:25 PM, Matthias Böhringer <
matthiasboehrin...@t-online.de> wrote:

> Hello Mark,
>
> you do know about convert-ly?
>
> HTH, Matthias
>
> Am 04.11.2014 um 16:15 schrieb Mark Veltzer:
>
>> Hello all,
>>
>> Just moved to ubuntu 14.10 (utopic) and got lilypond 2.18.2 instead of
>> 2.16.2 that was installed on ubuntu 14.04 (trusty). This broke all of my
>> tunes (I have about 150 of them since I do a big lilypond project).
>>
>> The problem: \score { << \new Voice="foo" \relative { c d e f g } >> }
>>
>> produces different outputs in the two versions. because I do not specify
>> an
>> absolute note in the '\relative' syntax the first note inside the score is
>> supposed to be taken as absolute and therefore it is supposed to be
>> middle c.
>> In lilypond 2.16 this is the case.
>> In lilypond 2.18 this is not the case. The first c in this example is
>> drawn
>> as the c below middle c. I really don't know why.
>>
>> I really don't care what the default of lilypond behavior as far as
>> \relative without a note outside the score is as long as it stays the same
>> across versions of lilypond. I now have to manually edit 150 files...:(
>>
>> Trying to compile on 2.18.2 with \version "2.16.2" did not help me as I
>> did
>> not get 2.16 behavior.
>>
>> Hope this helps and I did not come off sounding harsh. I love lilypond
>> greatly, its just that I'm pissed at having to edit 150 files and I'm
>> wondering if I'll have to do this again in a half a year or a year...:)
>>
>> Mark
>>
>>
>> ___
>> lilypond-user mailing list
>> lilypond-user@gnu.org
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>
> --
> Matthias Böhringer
> Brunnenstraße 6
> 72296 Schopfloch-Unteriflingen
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Lilypond 2.16 and 2.18 incompatibility for \relative without absolute note outside the score

2014-11-04 Thread Jim Long
If you need to make lots of edits to instances of \relative in
your source code, then:

1) sed(1) is your friend;

2) that's what DEFINE's are for.


On Tue, Nov 04, 2014 at 04:02:21PM +, Mark Veltzer wrote:
> Unfortunately I cannot use convert-ly, since on a large project such as I am
> working on I am using an extra pre-processor before handing out the output
> to lilypond.
> This means that my "source" files are not in lilypond format but only
> contain snipplets of lilypond code.
> I actually imagine that every large scale lilypond project would do
> something like this.
> You can check this out at https://github.com/veltzer/openbook
> What I'm basically saying here is that the whole approach of convert-ly is
> dubious since it assumes that people are using lilypond a certain
> straightforward way.
> I understand the motivation of convert-ly: it allows you guys to break
> backwards compatibility. But you are still breaking backwards compatibility
> and it hurts.
> A better way would have been to make the new lilypond support more features
> but retain old behaviour until old behavior goes away gradually.
> If that was the case I would not need to edit my files.
> 
> Cheers,
>Mark
> 
> 
> ___
> 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 PPA for Ubuntu/other related OS?

2014-11-04 Thread Ryan McClure
I'm about to switch to Elementary OS soon as my default OS...I'm not enjoying
my Arch Linux experience as of late. On Arch, I have access to the AUR for
Arch that allows me to have access to the most recent build of LilyPond. I
would like this for Elementary OS. However, I would prefer a package that I
can update through the package manager rather than installing it from the
command line into a directory...package managers are much cleaner in my
opinion. 

So, I'm wondering if there is a PPA that allows me to have the most
up-to-date version of LilyPond? I am about to install Elementary based on
14.04, but in the default repos the most recent version is 2.16 according to
my research. If anything, I'd like 2.18 at least.

Does anyone know if such a PPA exists? If not, I wouldn't mind creating a
PPA for this, but I don't know at all how to create one. Thanks all!



-
Ryan McClure

Music Education Major, Shepherd University
Luna Music Engraving
www.lunamusicengraving.com
--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/LilyPond-PPA-for-Ubuntu-other-related-OS-tp168412.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: LilyPond PPA for Ubuntu/other related OS?

2014-11-04 Thread David Bellows
I'm using Kubuntu (Ubuntu with KDE) and have just helped a friend, a Linux
newbie, transition his Lilypond approach on his Linux box. My sincere
advice is to just download the software from the website and use that. The
installation is super easy and even easier to upgrade (once you've
installed it once you then know how to upgrade it). The distros are
notoriously bad about keeping Lilypond up-to-date so you are much better
off doing it yourself. If you want a more detailed explanation hit me up
and I'll go into more detail. But seriously, it is a far better, easier,
and less messy method of using Lilypond.

As for your question, I am unaware of any PPA for Lilypond. There is one
serious gotcha with PPAs which is that when you upgrade your distribution
to a new version I think most/many/all(?) of your custom PPAs get disabled
requiring you to enable the ones you want to use. And there might be some
weird incompatibilities introduced as well. And it requires the PPA
maintainer to keep maintaining their repository which for a smaller program
like Lilypond might not actually happen.

Oops, there I was, once again, extolling the virtues of installing it
yourself. Sorry.

Dave

On Tue, Nov 4, 2014 at 11:57 AM, Ryan McClure 
wrote:

> I'm about to switch to Elementary OS soon as my default OS...I'm not
> enjoying
> my Arch Linux experience as of late. On Arch, I have access to the AUR for
> Arch that allows me to have access to the most recent build of LilyPond. I
> would like this for Elementary OS. However, I would prefer a package that I
> can update through the package manager rather than installing it from the
> command line into a directory...package managers are much cleaner in my
> opinion.
>
> So, I'm wondering if there is a PPA that allows me to have the most
> up-to-date version of LilyPond? I am about to install Elementary based on
> 14.04, but in the default repos the most recent version is 2.16 according
> to
> my research. If anything, I'd like 2.18 at least.
>
> Does anyone know if such a PPA exists? If not, I wouldn't mind creating a
> PPA for this, but I don't know at all how to create one. Thanks all!
>
>
>
> -
> Ryan McClure
>
> Music Education Major, Shepherd University
> Luna Music Engraving
> www.lunamusicengraving.com
> --
> View this message in context:
> http://lilypond.1069038.n5.nabble.com/LilyPond-PPA-for-Ubuntu-other-related-OS-tp168412.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


Re: Colors in alists

2014-11-04 Thread Thomas Morley
2014-11-04 19:05 GMT+01:00 Urs Liska :
>
> Am 04.11.2014 15:47, schrieb Jay Anderson:
>>
>> On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska  wrote:
>>>
>>> I want to store colors in an alist like
>>>
>>> #(define types
>>> '(("one" . "red")
>>> ("two" . "blue")))
>>>
>>> I can retrieve and display the values with assoc-ref but I don't know how
>>> to
>>> turn the returned string into a color to be used in an override.
>>
>> Try quasiquote + unquote:
>>
>> #(define types
>>`(("one" . ,red)
>>  ("two" . ,blue)))
>>
>> #(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))
>>
>> -Jay
>
>
> Hi Jay,
>
> thanks, that was it. Still a mystery, this all ...
>
> I would be extremely happy if someone could take the time and write a
> slow-paced tutorial about this on Scores of Beauty!
>
> Best
> Urs
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user

As others pointed out it's a matter of quote/unquote/quasiquote,
though for completeness, there is some lilypond function which can
make your initial approach work:


#(define clrs
'(("one" . "red")
  ("two" . "blue")))

#(display (color? (x11-color (assoc-get "one" clrs
#(display (x11-color (assoc-get "one" clrs)))


Cheers,
  Harm

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


Changing thickness of ParenthesesItem

2014-11-04 Thread Thomas Morley
Hi all,

maybe I'm too tired, though, is there no better way to change the
thickness of a ParenthesesItem, than scaling their stencils?

\version "2.19.13"

paren-thick =
#(define-music-function (parser location x music)(number? ly:music?)
#{
  \tweak ParenthesesItem.stencils
  #(lambda (grob)
  (map
(lambda (stil) (ly:stencil-scale stil x 1))
(parentheses-item::calc-parenthesis-stencils grob)))
  $music
#})

{
  <
   b''
   \paren-thick #3 \parenthesize b'
   b
  >4
}


-Harm

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


Re: Changing thickness of ParenthesesItem

2014-11-04 Thread tisimst
Harm,

The parentheses are static glyphs from the music font, so there's no 
way that I know of to simply make it bolder (i.e., there's no bold 
version of emmentaler). You might be able to change this by setting the 
font-encoding to latin1 and using another font for the parentheses that 
has a bold variant, but that's the best I can think of right now. Not 
sure how to do this in a \tweak, though. Anyone else?

HTH,
Abraham

On Tue, Nov 4, 2014 at 4:44 PM, Thomas Morley-2 [via Lilypond] 
 wrote:
> Hi all, 
> 
> maybe I'm too tired, though, is there no better way to change the 
> thickness of a ParenthesesItem, than scaling their stencils? 
> 
> \version "2.19.13" 
> 
> paren-thick = 
> #(define-music-function (parser location x music)(number? ly:music?) 
> #{ 
>   \tweak ParenthesesItem.stencils 
>   #(lambda (grob) 
>   (map 
> (lambda (stil) (ly:stencil-scale stil x 1)) 
> (parentheses-item::calc-parenthesis-stencils grob))) 
>   $music 
> #}) 
> 
> { 
>   < 
>b'' 
>\paren-thick #3 \parenthesize b' 
>b 
>   >4 
> } 
> 
> 
> -Harm 
> 
> ___ 
> lilypond-user mailing list 
> [hidden email] 
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 
> If you reply to this email, your message will be added to the 
> discussion below:
> http://lilypond.1069038.n5.nabble.com/Changing-thickness-of-ParenthesesItem-tp168415.html
> To start a new topic under User, email 
> ml-node+s1069038n...@n5.nabble.com 
> To unsubscribe from Lilypond, click here.
> NAML




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Changing-thickness-of-ParenthesesItem-tp168415p168416.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: Changing thickness of ParenthesesItem

2014-11-04 Thread Thomas Morley
2014-11-05 1:03 GMT+01:00 tisimst :
> Harm,
>
> The parentheses are static glyphs from the music font, so there's no way
> that I know of to simply make it bolder (i.e., there's no bold version of
> emmentaler). You might be able to change this by setting the font-encoding
> to latin1 and using another font for the parentheses that has a bold
> variant, but that's the best I can think of right now. Not sure how to do
> this in a \tweak, though. Anyone else?
>
> HTH,
> Abraham
>
>
> On Tue, Nov 4, 2014 at 4:44 PM, Thomas Morley-2 [via Lilypond] <[hidden
> email]> wrote:
>
> Hi all,
>
> maybe I'm too tired, though, is there no better way to change the
> thickness of a ParenthesesItem, than scaling their stencils?
>
> \version "2.19.13"
>
> paren-thick =
> #(define-music-function (parser location x music)(number? ly:music?)
> #{
>   \tweak ParenthesesItem.stencils
>   #(lambda (grob)
>   (map
> (lambda (stil) (ly:stencil-scale stil x 1))
> (parentheses-item::calc-parenthesis-stencils grob)))
>   $music
> #})
>
> {
>   <
>b''
>\paren-thick #3 \parenthesize b'
>b
>   >4
> }
>
>
> -Harm

Hi Abraham,

thanks for your reply, sounds logical.
OTOH, we have functions like 'make-bezier-sandwich-stencil', which is
used in 'make-parenthesis-stencil' and finally in
'parenthesize-stencil'
They are not used here ofcourse, though it might be worth a thought.
(only row brainstorming...)

Thanks,
  Harm

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


Re: Changing thickness of ParenthesesItem

2014-11-04 Thread David Nalesnik
Hi Harm,

On Tue, Nov 4, 2014 at 6:16 PM, Thomas Morley 
wrote:

>
> Hi Abraham,
>
> thanks for your reply, sounds logical.
> OTOH, we have functions like 'make-bezier-sandwich-stencil', which is
> used in 'make-parenthesis-stencil' and finally in
> 'parenthesize-stencil'
> They are not used here ofcourse, though it might be worth a thought.
> (only row brainstorming...)
>
>
I think this would be great!   That way there could be a unified approach
to parenthesizing entire chords (instead of note-by-note).  Scaling for
those would be really clunky.

Arpeggio draws a slur shape for ly:arpeggio::brew-chord-slur, and I ended
up using Bezier curves  for my experiment with full-chord parentheses here:
http://www.mail-archive.com/lilypond-user%40gnu.org/msg69435.html (which
will need to be updated to work with current versions, I'm afraid).

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


Re: Where to Download the New Music Fonts?

2014-11-04 Thread tisimst
Nope.  By majority vote, the name changed from Amadeus to Scorlatti, in honor 
of the SCORE notation system, the inspiration of the font. 

Did you see somewhere on the website that said Scarlatti instead?

-Abraham

Sent from my iPhone

> On Nov 4, 2014, at 6:09 AM, Son_V [via Lilypond] 
>  wrote:
> 
> Shouldn't the name of the last font in the page be "SCARLATTI"? 
> 
> If you reply to this email, your message will be added to the discussion 
> below:
> http://lilypond.1069038.n5.nabble.com/Where-to-Download-the-New-Music-Fonts-tp165035p168388.html
> To start a new topic under User, email ml-node+s1069038n...@n5.nabble.com 
> To unsubscribe from Lilypond, click here.
> NAML




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Where-to-Download-the-New-Music-Fonts-tp165035p168419.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


brass fingering charts

2014-11-04 Thread Paul Scott
1. Is it possible to print woodwind-diagrams horizontally?

2. Has anyone considered doing brass fingering charts/diagrams?

I need to put trumpet fingerings under notes for some young players.

I imagine everything I need can be derived from the .scm files.

Thanks for any thoughts,

Paul Scott





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


Re: Colors in alists

2014-11-04 Thread Urs Liska


Am 05.11.2014 00:02, schrieb Thomas Morley:

2014-11-04 19:05 GMT+01:00 Urs Liska :

Am 04.11.2014 15:47, schrieb Jay Anderson:

On Tue, Nov 4, 2014 at 3:48 AM, Urs Liska  wrote:

I want to store colors in an alist like

#(define types
'(("one" . "red")
("two" . "blue")))

I can retrieve and display the values with assoc-ref but I don't know how
to
turn the returned string into a color to be used in an override.

Try quasiquote + unquote:

#(define types
`(("one" . ,red)
  ("two" . ,blue)))

#(display types) => ((one 1.0 0.0 0.0) (two 0.0 0.0 1.0))

-Jay


Hi Jay,

thanks, that was it. Still a mystery, this all ...

I would be extremely happy if someone could take the time and write a
slow-paced tutorial about this on Scores of Beauty!

Best
Urs


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

As others pointed out it's a matter of quote/unquote/quasiquote,
though for completeness, there is some lilypond function which can
make your initial approach work:


#(define clrs
'(("one" . "red")
   ("two" . "blue")))

#(display (color? (x11-color (assoc-get "one" clrs
#(display (x11-color (assoc-get "one" clrs)))


Cheers,
   Harm


Thanks for that hint. I *did* try that function but only in the 
definition, where it didn't work.


Urs

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


Re: random notes

2014-11-04 Thread Stefan Thomas
Dear Anders,
thanks for Your help. It looks complicated to me but I will try to figure
it out!

Hi Stefan
>
> S> how can I generate pitches with sharp and flats?
>
> Have a look at the docs for ly:make-pitch, esp. the last argument to the
> function.
>
> S> How can I change the range of input notes?
>
> You mean register or octave for the generated notes?  Same thing as
> above, only check first argument to ly:make-pitch instead.
>
> Getting guile running, w. lilypond loaded is invaluable for
> experimenting with things like this.  Eg. (in a terminal):
>
> $ lilypond scheme-sandbox
> GNU LilyPond 2.19.16
> Processing `/usr/local/share/lilypond/2.19.16/ly/scheme-sandbox.ly'
> Parsing...
> guile> (ly:make-pitch 2 2 -1/2)
> #
> guile>
>
> Good luck!
>
> -anders
>
>
>
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: how to get "h" instead of "b" in notenames

2014-11-04 Thread Stefan Thomas
Dear Jay,
thanks!
The code does exactly what I want!

> Apparently, in the NoteNames context it defaults to Dutch. You can use the
> following code to get what you want I think. b has been redefined to h in
> the definition of newnames and the myNoteNames override to NoteName.stencil
> makes this substitution.
>
>
> %%%
> \version "2.18.2"
> \language "deutsch"
> onthelines = \relative e' { e1 g h d f }
>
>
> newnames =
> #`(("c" . "c")
>("d" . "d")
>("e" . "e")
>("f" . "f")
>("g" . "g")
>("a" . "a")
>("b" . "h")
>)
>
>
>
>
> myNoteNames =
> #(lambda (grob)
>(let* (
>;; bindings
>(default-name (ly:grob-property grob 'text))
>(new-name (assoc-get default-name newnames))
>)
>  ;; body
>  (ly:grob-set-property! grob 'text new-name)
>  (ly:text-interface::print grob)
>  )
>)
>
> \score {
>   <<
> \new Staff \onthelines
> \new NoteNames \with { \override NoteName.stencil = #myNoteNames }
> {\onthelines}
>   >>
> }
>
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user