Re: Line numbers in editor window

2015-09-17 Thread ClausRogge
AFAIK, the Mac version is the only one that comes with it's own editor and I
used that for nearly ten years, gravely missing the line numbering. Finally
discovered Frescobaldi which is a fantastic editor! It helps you to keep an
eye on all these brackets as well



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Line-numbers-in-editor-window-tp181221p181245.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: Line numbers in editor window

2015-09-17 Thread Blöchl Bernhard
As Simon explained with a click on the error message the cursor jumps to 
the code ...
But if you still want line numbers you can get it with a mark in an 
option field in the view pull down menu.



Am 16.09.2015 19:24, schrieb Simon Albrecht:

On 16.09.2015 18:05, David Kastrup wrote:

Urs Liska  writes:


Am 16.09.2015 um 17:39 schrieb Erich Neuwirth:

When compiling, error messages come with line numbers.
Is there a way of displaying the line numbers in the editor window?

of which editor?


The, debugging would be easier.

Indeed.
But still easier is having the editor configured to make use of
LilyPond's point-and-click feature, so you can click on the error
message (or on the result in the PDF) and have the editor jump to the
right place.

point-and-click is not related to error messages.  All that LilyPond
does with regard to error messages is formatting them in a standard 
way
so that if you run it from some IDE or at least somewhat 
compiler-aware

editor the error messages might be useful for navigation.


At any rate, Frescobaldi  allows to click the
location in the error message and jumps to the code in question.

Yours, Simon

___
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: Rendering cropped SVG

2015-09-17 Thread potoroo
Apparently I don't clearly understand the mechanism. Why can't the program 
write the cropped pdf to the same file?


> Am 17.09.2015 um 03:08 schrieb David Wright :
> 
> I wrote earlier:
 After all, in your script you have:
 pdfcrop --margins 1 '$file_base_name.pdf' '$file_base_name.pdf'
 where the output filename is the same as the input filename.
> 
> Well I'm still worried about the line I quoted above, which I think is
> inviting trouble (unless you clearly understand the mechanism that is
> being used). Bear in mind, in my script I used an intermediate file:
> $ pdfcrop --margins 1 foo.pdf bar.pdf
> 
> Cheers,
> David.


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


Chords and what they mean

2015-09-17 Thread 70147persson
First I will declare, that I am not 100 percent sure this is a bug, but 
friends of mine, musicians, say it probably is. Also, as I am not an 
expert, I have tried to learn by searching on among others Wikipedia.


It is about chords, a few of them. It started when I should clean write 
a score from a manuscript. In one measure there were noted two chords, 
C5 and C. Obviously not the same, as they stood just beside of each 
other. A search on Wikipedia also told me, and this was also confirmed, 
the author's intention, that C5 means C(no 3), hence , while the 
chord C means . But LilyPond treats these two the same and 
produces the same notes. This is also clearly said e.g. in Appendices 
A.1 and A.2 of Notation Reference, as well as in the text part. However 
even if possibly a correct procedure, is it a correct practise?


Another such discrepancy is about Csus, which Wikipedia (and my friends) 
says is equivalent to Csus4, hence . But LilyPond produces , 
hence what should come from the notation C5 as in the previous paragraph.


So, what is the truth?
Kaj

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


PDF portfolio of 2.19.27 docs

2015-09-17 Thread Nick Payne
A fully indexed portfolio of the 2.19.25 PDF docs is available at 
https://www.dropbox.com/s/4l5k73n9ywmfxlq/lilydoc-2.19.27.pdf?dl=0 (39Mb).


Needs Adobe Reader for the indexing to work - I haven't found a 3rd 
party PDF viewer that can use the index in PDF portfolios.


Nick

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


Re: Chords and what they mean

2015-09-17 Thread BB

May be I misunderstood ...

c:5 does not have a 3rd and is therefore indifferent - not minor not 
major and therefore is not really a chord. ( i know it with the nick 
name "hollow fifths") It is not equal to the c chord but has a special 
quality with a "hollow" or crypt sound. It is frequently used in metal 
genre, some metal groups use it exclusively.


c:5+

is in use as
Caug, Eaug/C, G#aug/C

c:5-

is seldom used and is
Cb5

On 17.09.2015 11:13, David Kastrup wrote:

... c:5 is not likely to be in much use exactly because it is equal to c
on its own.  However, it would beg the question of how to interpret c:5+
and c:5- then.  Those aren't redundant.


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


Re: Chords and what they mean

2015-09-17 Thread BB

A bug?

\version "2.18.0"

harmonies =

\chordmode {

\set chordNameExceptions =

#(append

powerChordExceptions

ignatzekExceptions)

c:1.5

c^3

c c^3

}

<<

\new ChordNames {

\set chordChanges = ##t

\harmonies

}

\new Staff {

\relative c' { \harmonies }

\break

}

>>



On 17.09.2015 11:33, Thomas Morley wrote:

chrds =
\chordmode {
 \set chordNameExceptions =
   #(append
  powerChordExceptions
  ignatzekExceptions)
 c:1.5
 c^3
}

<<


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


Re: Chords and what they mean

2015-09-17 Thread Simon Albrecht

On 17.09.2015 13:30, lilyp...@andis59.se wrote:

On 2015-09-17 13:14, Brett Duncan wrote:


@Kaj, Lilypond's format for /inputting/ chords is described at
http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode/
and I would suggest reading through this carefully to get a clearer 
understanding of the results you are seeing, particularly where 
Lilypond's format differs from the conventions that you are used to.



The link doesn't work.


Remove the terminal / and it works.
Yours, Simon
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Access grob name?

2015-09-17 Thread Simon Albrecht

Hello,

I’ve written a music function which applies some tweaks on dynamics to 
offset them. Unfortunately, it’s not possible to use the offset music 
function on X-offset, because it is a mutable property. Thus I have to 
add a displacement for DynamicText so that it is not aligned to its 
baseline, but to the ‘center’ like normally.
Now, it would help if the music function could find out by itself 
whether to apply this displacement, depending on which grob it is 
applied to. As an example (attached also):

%%
\version "2.19.27"

test =
#(define-music-function (ev) (ly:music?)
   (tweak 'color red ev))

{
  c''-\test \> g'-\test \f
}
%%
How can I modify the function so that only the DynamicText is colored, 
the Hairpin isn’t?


TIA, Simon
\version "2.19.27"

test =
#(define-music-function (ev) (ly:music?)
   (tweak 'color red ev))

{
  c''-\test \> g'-\test \f
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: PDF portfolio of 2.19.27 docs

2015-09-17 Thread Nick Payne

On 17/09/2015 19:06, Nick Payne wrote:
A fully indexed portfolio of the 2.19.25 PDF docs is available at 
https://www.dropbox.com/s/4l5k73n9ywmfxlq/lilydoc-2.19.27.pdf?dl=0 (39Mb).


That should have read "A fully indexed portfolio of the 2.19.27 PDF docs"...



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


Re: Chords and what they mean

2015-09-17 Thread Kaj Persson

Den 2015-09-17 11:33, skrev Thomas Morley:

2015-09-17 11:13 GMT+02:00 David Kastrup :

Thomas Morley  writes:


2015-09-17 10:47 GMT+02:00 Simon Albrecht :

Hello Kaj,

On 17.09.2015 09:27, 70147pers...@telia.com wrote:

First I will declare, that I am not 100 percent sure this is a bug, but
friends of mine, musicians, say it probably is. Also, as I am not an expert,
I have tried to learn by searching on among others Wikipedia.

It is about chords, a few of them. It started when I should clean write a
score from a manuscript. In one measure there were noted two chords, C5 and
C. Obviously not the same, as they stood just beside of each other. A search
on Wikipedia also told me, and this was also confirmed, the author's
intention, that C5 means C(no 3), hence , while the chord C means . But LilyPond treats these two the same and produces the same notes. This
is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
as well as in the text part. However even if possibly a correct procedure,
is it a correct practise?

Another such discrepancy is about Csus, which Wikipedia (and my friends)
says is equivalent to Csus4, hence . But LilyPond produces ,
hence what should come from the notation C5 as in the previous paragraph.

So, what is the truth?

There are others who are more into the subject, but I may say:
There is no ‘truth’. With chord names, there are so many different
conventions and fiercely defended convictions that it’s impossible to define
a single ‘standard’ naming scheme. (Edit: just like the NR says)

Very true.
It's a mess, but LilyPond can handle it. ;)


Many things in the chords rendering may be overridden in LilyPond. In case
you’re not aware yet, check out

and perhaps the LSR . If that doesn’t cover your
wishes, you may come back with a code example, I’d suggest.

HTH, Simon

chrds =
\chordmode {
 \set chordNameExceptions =
   #(append
  powerChordExceptions
  ignatzekExceptions)
 c:1.4.5
 c:1.5
 \notemode {
 
 
 }
}

<<
 \new Staff \chrds
 \new ChordNames \chrds
If it's not sufficient you can set your own 'exceptions' for
chord-naming, see the links Simon provided.

I think you are talking past each other.  Kaj complained about how
LilyPond converts \chordmode input into notes, you explain how to change
LilyPond's conversion of notes to markups in a ChordNames context.

We could create an exception for c:5 (like we do for c:13 which drops
the 11th step).  I think that's a reasonable suggestion on its surface
and c:5 is not likely to be in much use exactly because it is equal to c
on its own.  However, it would beg the question of how to interpret c:5+
and c:5- then.  Those aren't redundant.

--
David Kastrup

Obviously I still don't understand.

For me the following looks as wished for Staff and ChordName context:


chrds =
\chordmode {
 \set chordNameExceptions =
   #(append
  powerChordExceptions
  ignatzekExceptions)
 c:1.5
 c^3
}

<<
 \new Staff \chrds
 \new ChordNames \chrds

@Kaj
Could you provide an example to illustrade?

Cheers,
   Harm
Well, an example is not that easy, since what I got was a sheet with 
just a piano staff and a line of chords above it. It might be 
illustrated like this:




where C5 should mean (according to the author/composer)  and Csus 
.


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


Re: Chords and what they mean

2015-09-17 Thread pls
Thomas Morley  writes:

> 2015-09-17 10:47 GMT+02:00 Simon Albrecht :
>> Hello Kaj,
>>
>> On 17.09.2015 09:27, 70147pers...@telia.com wrote:
>>>
>>> First I will declare, that I am not 100 percent sure this is a bug, but
>>> friends of mine, musicians, say it probably is. Also, as I am not an expert,
>>> I have tried to learn by searching on among others Wikipedia.
>>>
>>> It is about chords, a few of them. It started when I should clean write a
>>> score from a manuscript. In one measure there were noted two chords, C5 and
>>> C. Obviously not the same, as they stood just beside of each other. A search
>>> on Wikipedia also told me, and this was also confirmed, the author's
>>> intention, that C5 means C(no 3), hence , while the chord C means >> g>. But LilyPond treats these two the same and produces the same notes. This
>>> is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
>>> as well as in the text part. However even if possibly a correct procedure,
>>> is it a correct practise?
>>>
>>> Another such discrepancy is about Csus, which Wikipedia (and my friends)
>>> says is equivalent to Csus4, hence . But LilyPond produces ,
>>> hence what should come from the notation C5 as in the previous paragraph.
>>>
>>> So, what is the truth?
>>
>>
>> There are others who are more into the subject, but I may say:
>> There is no ‘truth’. With chord names, there are so many different
>> conventions and fiercely defended convictions that it’s impossible to define
>> a single ‘standard’ naming scheme. (Edit: just like the NR says)
>
> Very true.
> It's a mess, but LilyPond can handle it. ;)
>
>>
>> Many things in the chords rendering may be overridden in LilyPond. In case
>> you’re not aware yet, check out
>> 
>> and perhaps the LSR . If that doesn’t cover your
>> wishes, you may come back with a code example, I’d suggest.
>>
>> HTH, Simon
>
> chrds =
> \chordmode {
> \set chordNameExceptions =
>   #(append
>  powerChordExceptions
>  ignatzekExceptions)
> c:1.4.5
> c:1.5
> \notemode {
> 
> 
> }
> }
>
> <<
> \new Staff \chrds
> \new ChordNames \chrds
>>>
>
> If it's not sufficient you can set your own 'exceptions' for
> chord-naming, see the links Simon provided.
>
> HTH,
>   Harm

It's not necessary to define power chord exceptions.  They are already
defined. All you have to do is:

chrds = {
  \powerChords
  % e.g.
  \chordmode { c,:1.5 }
  % or e.g.
  
  }

<<  
  \new Staff \chrds
  \new ChordNames \chrds
>>

BTW: The power chord examples here:
http://lilypond.org/doc/v2.19/Documentation/notation/common-chord-modifiers
are not complete. The chord names are missing.

hth
patrick


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


Re: Chords and what they mean

2015-09-17 Thread lilyp...@andis59.se

On 2015-09-17 13:14, Brett Duncan wrote:


@Kaj, Lilypond's format for /inputting/ chords is described at
http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode/
and I would suggest reading through this carefully to get a clearer 
understanding of the results you are seeing, particularly where 
Lilypond's format differs from the conventions that you are used to.


The link doesn't work. I guessing someone changed the link-system so the 
link may be this one instead

http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode.en.html

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


Re: Chords and what they mean

2015-09-17 Thread Brett Duncan

On 17/09/15 7:56 PM, BB wrote:


A bug?



My reading of the OP is that Kaj is expecting LP's chordmode to be 
equivalent to the chord notations that he is used to seeing, which it is 
not.


@Kaj, Lilypond's format for /inputting/ chords is described at
 http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode/
and I would suggest reading through this carefully to get a clearer 
understanding of the results you are seeing, particularly where 
Lilypond's format differs from the conventions that you are used to.


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


Re: Chords and what they mean

2015-09-17 Thread Simon Albrecht

Hello Kaj,

On 17.09.2015 09:27, 70147pers...@telia.com wrote:
First I will declare, that I am not 100 percent sure this is a bug, 
but friends of mine, musicians, say it probably is. Also, as I am not 
an expert, I have tried to learn by searching on among others Wikipedia.


It is about chords, a few of them. It started when I should clean 
write a score from a manuscript. In one measure there were noted two 
chords, C5 and C. Obviously not the same, as they stood just beside of 
each other. A search on Wikipedia also told me, and this was also 
confirmed, the author's intention, that C5 means C(no 3), hence , 
while the chord C means . But LilyPond treats these two the 
same and produces the same notes. This is also clearly said e.g. in 
Appendices A.1 and A.2 of Notation Reference, as well as in the text 
part. However even if possibly a correct procedure, is it a correct 
practise?


Another such discrepancy is about Csus, which Wikipedia (and my 
friends) says is equivalent to Csus4, hence . But LilyPond 
produces , hence what should come from the notation C5 as in the 
previous paragraph.


So, what is the truth?


There are others who are more into the subject, but I may say:
There is no ‘truth’. With chord names, there are so many different 
conventions and fiercely defended convictions that it’s impossible to 
define a single ‘standard’ naming scheme. (Edit: just like the NR says)


Many things in the chords rendering may be overridden in LilyPond. In 
case you’re not aware yet, check out 
 
and perhaps the LSR . If that doesn’t cover your 
wishes, you may come back with a code example, I’d suggest.


HTH, Simon

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


Re: Chords and what they mean

2015-09-17 Thread Thomas Morley
2015-09-17 10:47 GMT+02:00 Simon Albrecht :
> Hello Kaj,
>
> On 17.09.2015 09:27, 70147pers...@telia.com wrote:
>>
>> First I will declare, that I am not 100 percent sure this is a bug, but
>> friends of mine, musicians, say it probably is. Also, as I am not an expert,
>> I have tried to learn by searching on among others Wikipedia.
>>
>> It is about chords, a few of them. It started when I should clean write a
>> score from a manuscript. In one measure there were noted two chords, C5 and
>> C. Obviously not the same, as they stood just beside of each other. A search
>> on Wikipedia also told me, and this was also confirmed, the author's
>> intention, that C5 means C(no 3), hence , while the chord C means > g>. But LilyPond treats these two the same and produces the same notes. This
>> is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
>> as well as in the text part. However even if possibly a correct procedure,
>> is it a correct practise?
>>
>> Another such discrepancy is about Csus, which Wikipedia (and my friends)
>> says is equivalent to Csus4, hence . But LilyPond produces ,
>> hence what should come from the notation C5 as in the previous paragraph.
>>
>> So, what is the truth?
>
>
> There are others who are more into the subject, but I may say:
> There is no ‘truth’. With chord names, there are so many different
> conventions and fiercely defended convictions that it’s impossible to define
> a single ‘standard’ naming scheme. (Edit: just like the NR says)

Very true.
It's a mess, but LilyPond can handle it. ;)

>
> Many things in the chords rendering may be overridden in LilyPond. In case
> you’re not aware yet, check out
> 
> and perhaps the LSR . If that doesn’t cover your
> wishes, you may come back with a code example, I’d suggest.
>
> HTH, Simon

chrds =
\chordmode {
\set chordNameExceptions =
  #(append
 powerChordExceptions
 ignatzekExceptions)
c:1.4.5
c:1.5
\notemode {


}
}

<<
\new Staff \chrds
\new ChordNames \chrds
>>

If it's not sufficient you can set your own 'exceptions' for
chord-naming, see the links Simon provided.

HTH,
  Harm

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


Re: Chords and what they mean

2015-09-17 Thread BB

\version "2.18.0"

chExceptionMusic = {

%1-\markup { \super "5" }

%1-\markup { \super "5" }

%1-\markup { "5" }

1-\markup { "5" }

}

chExceptions = #(append

(sequential-music-to-chord-exceptions

chExceptionMusic #t)

ignatzekExceptions)

harmonies = \chordmode {

\set chordNameExceptions = #chExceptions

c1 c1^3 g^3 c:m c:sus4 c1:/f

}

<<

\new ChordNames {

\set chordChanges = ##t

\harmonies

}

\new Staff {

\relative c' { \harmonies }

\break

}

>>



On 17.09.2015 09:27, 70147pers...@telia.com wrote:
First I will declare, that I am not 100 percent sure this is a bug, 
but friends of mine, musicians, say it probably is. Also, as I am not 
an expert, I have tried to learn by searching on among others Wikipedia.


It is about chords, a few of them. It started when I should clean 
write a score from a manuscript. In one measure there were noted two 
chords, C5 and C. Obviously not the same, as they stood just beside of 
each other. A search on Wikipedia also told me, and this was also 
confirmed, the author's intention, that C5 means C(no 3), hence , 
while the chord C means . But LilyPond treats these two the 
same and produces the same notes. This is also clearly said e.g. in 
Appendices A.1 and A.2 of Notation Reference, as well as in the text 
part. However even if possibly a correct procedure, is it a correct 
practise?


Another such discrepancy is about Csus, which Wikipedia (and my 
friends) says is equivalent to Csus4, hence . But LilyPond 
produces , hence what should come from the notation C5 as in the 
previous paragraph.


So, what is the truth?
Kaj

___
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: Chords and what they mean

2015-09-17 Thread Thomas Morley
2015-09-17 11:13 GMT+02:00 David Kastrup :
> Thomas Morley  writes:
>
>> 2015-09-17 10:47 GMT+02:00 Simon Albrecht :
>>> Hello Kaj,
>>>
>>> On 17.09.2015 09:27, 70147pers...@telia.com wrote:

 First I will declare, that I am not 100 percent sure this is a bug, but
 friends of mine, musicians, say it probably is. Also, as I am not an 
 expert,
 I have tried to learn by searching on among others Wikipedia.

 It is about chords, a few of them. It started when I should clean write a
 score from a manuscript. In one measure there were noted two chords, C5 and
 C. Obviously not the same, as they stood just beside of each other. A 
 search
 on Wikipedia also told me, and this was also confirmed, the author's
 intention, that C5 means C(no 3), hence , while the chord C means >>> g>. But LilyPond treats these two the same and produces the same notes. 
 This
 is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
 as well as in the text part. However even if possibly a correct procedure,
 is it a correct practise?

 Another such discrepancy is about Csus, which Wikipedia (and my friends)
 says is equivalent to Csus4, hence . But LilyPond produces ,
 hence what should come from the notation C5 as in the previous paragraph.

 So, what is the truth?
>>>
>>> There are others who are more into the subject, but I may say:
>>> There is no ‘truth’. With chord names, there are so many different
>>> conventions and fiercely defended convictions that it’s impossible to define
>>> a single ‘standard’ naming scheme. (Edit: just like the NR says)
>>
>> Very true.
>> It's a mess, but LilyPond can handle it. ;)
>>
>>>
>>> Many things in the chords rendering may be overridden in LilyPond. In case
>>> you’re not aware yet, check out
>>> 
>>> and perhaps the LSR . If that doesn’t cover your
>>> wishes, you may come back with a code example, I’d suggest.
>>>
>>> HTH, Simon
>>
>> chrds =
>> \chordmode {
>> \set chordNameExceptions =
>>   #(append
>>  powerChordExceptions
>>  ignatzekExceptions)
>> c:1.4.5
>> c:1.5
>> \notemode {
>> 
>> 
>> }
>> }
>>
>> <<
>> \new Staff \chrds
>> \new ChordNames \chrds

>>
>> If it's not sufficient you can set your own 'exceptions' for
>> chord-naming, see the links Simon provided.
>
> I think you are talking past each other.  Kaj complained about how
> LilyPond converts \chordmode input into notes, you explain how to change
> LilyPond's conversion of notes to markups in a ChordNames context.
>
> We could create an exception for c:5 (like we do for c:13 which drops
> the 11th step).  I think that's a reasonable suggestion on its surface
> and c:5 is not likely to be in much use exactly because it is equal to c
> on its own.  However, it would beg the question of how to interpret c:5+
> and c:5- then.  Those aren't redundant.
>
> --
> David Kastrup

Obviously I still don't understand.

For me the following looks as wished for Staff and ChordName context:


chrds =
\chordmode {
\set chordNameExceptions =
  #(append
 powerChordExceptions
 ignatzekExceptions)
c:1.5
c^3
}

<<
\new Staff \chrds
\new ChordNames \chrds
>>


@Kaj
Could you provide an example to illustrade?

Cheers,
  Harm

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


Re: Chords and what they mean

2015-09-17 Thread David Kastrup
Thomas Morley  writes:

> 2015-09-17 10:47 GMT+02:00 Simon Albrecht :
>> Hello Kaj,
>>
>> On 17.09.2015 09:27, 70147pers...@telia.com wrote:
>>>
>>> First I will declare, that I am not 100 percent sure this is a bug, but
>>> friends of mine, musicians, say it probably is. Also, as I am not an expert,
>>> I have tried to learn by searching on among others Wikipedia.
>>>
>>> It is about chords, a few of them. It started when I should clean write a
>>> score from a manuscript. In one measure there were noted two chords, C5 and
>>> C. Obviously not the same, as they stood just beside of each other. A search
>>> on Wikipedia also told me, and this was also confirmed, the author's
>>> intention, that C5 means C(no 3), hence , while the chord C means >> g>. But LilyPond treats these two the same and produces the same notes. This
>>> is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
>>> as well as in the text part. However even if possibly a correct procedure,
>>> is it a correct practise?
>>>
>>> Another such discrepancy is about Csus, which Wikipedia (and my friends)
>>> says is equivalent to Csus4, hence . But LilyPond produces ,
>>> hence what should come from the notation C5 as in the previous paragraph.
>>>
>>> So, what is the truth?
>>
>> There are others who are more into the subject, but I may say:
>> There is no ‘truth’. With chord names, there are so many different
>> conventions and fiercely defended convictions that it’s impossible to define
>> a single ‘standard’ naming scheme. (Edit: just like the NR says)
>
> Very true.
> It's a mess, but LilyPond can handle it. ;)
>
>>
>> Many things in the chords rendering may be overridden in LilyPond. In case
>> you’re not aware yet, check out
>> 
>> and perhaps the LSR . If that doesn’t cover your
>> wishes, you may come back with a code example, I’d suggest.
>>
>> HTH, Simon
>
> chrds =
> \chordmode {
> \set chordNameExceptions =
>   #(append
>  powerChordExceptions
>  ignatzekExceptions)
> c:1.4.5
> c:1.5
> \notemode {
> 
> 
> }
> }
>
> <<
> \new Staff \chrds
> \new ChordNames \chrds
>>>
>
> If it's not sufficient you can set your own 'exceptions' for
> chord-naming, see the links Simon provided.

I think you are talking past each other.  Kaj complained about how
LilyPond converts \chordmode input into notes, you explain how to change
LilyPond's conversion of notes to markups in a ChordNames context.

We could create an exception for c:5 (like we do for c:13 which drops
the 11th step).  I think that's a reasonable suggestion on its surface
and c:5 is not likely to be in much use exactly because it is equal to c
on its own.  However, it would beg the question of how to interpret c:5+
and c:5- then.  Those aren't redundant.

-- 
David Kastrup

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


Re: Access grob name?

2015-09-17 Thread David Kastrup
Simon Albrecht  writes:

> Hello,
>
> I’ve written a music function which applies some tweaks on dynamics to
> offset them. Unfortunately, it’s not possible to use the offset music
> function on X-offset, because it is a mutable property.

What does that mean?  Any relation to issue 4516 here?

> Thus I have to add a displacement for DynamicText so that it is not
> aligned to its baseline, but to the ‘center’ like normally.  Now, it
> would help if the music function could find out by itself whether to
> apply this displacement, depending on which grob it is applied to. As
> an example (attached also): %% \version "2.19.27"
>
> test =
> #(define-music-function (ev) (ly:music?)
>(tweak 'color red ev))
>
> {
>   c''-\test \> g'-\test \f
> }
> %%
> How can I modify the function so that only the DynamicText is colored,
> the Hairpin isn’t?

Uh, (tweak '(DynamicText color) red ev) maybe?  Seems rather
straightforward.

-- 
David Kastrup

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


Re: Access grob name?

2015-09-17 Thread Simon Albrecht

On 17.09.2015 14:20, David Kastrup wrote:

Simon Albrecht  writes:


Hello,

I’ve written a music function which applies some tweaks on dynamics to
offset them. Unfortunately, it’s not possible to use the offset music
function on X-offset, because it is a mutable property.

What does that mean?  Any relation to issue 4516 here?


Obviously. I try to work around the technical limitation that you 
described in your last comment there.

Sorry for describing a superficial point of view again:
1. I need to tweak Y-offset of e.g. DynamicText.
2. If I use \tweak, the default calculation is _replaced_ by the new 
value. This makes it unpredictable, because the resulting offset, 
relative to the position without a tweak, is not equal to the value 
which I used in tweaking.
3. Thus I’d like to use \offset, so my offset is _added_ to the value 
returned by the default calculation.


But IIUC, the latter is impossible (? currently?) because the 
calculation is done only after the \offset could be applied. Is that 
anywhere near correct?





Thus I have to add a displacement for DynamicText so that it is not
aligned to its baseline, but to the ‘center’ like normally.  Now, it
would help if the music function could find out by itself whether to
apply this displacement, depending on which grob it is applied to. As
an example (attached also): %% \version "2.19.27"

test =
#(define-music-function (ev) (ly:music?)
(tweak 'color red ev))

{
   c''-\test \> g'-\test \f
}
%%
How can I modify the function so that only the DynamicText is colored,
the Hairpin isn’t?

Uh, (tweak '(DynamicText color) red ev) maybe?  Seems rather
straightforward.


Oh, of course. My example was too simple then. Let’s say: I want to 
color all objects red, only DynamicText should be blue :-) Coined on 
offsets: Both need to be offset, but DynamicText needs an additional 
displacement.


Yours, Simon

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


Re: Chords and what they mean

2015-09-17 Thread Brett Duncan

On 17/09/15 9:40 PM, Simon Albrecht wrote:

On 17.09.2015 13:30, lilyp...@andis59.se wrote:

On 2015-09-17 13:14, Brett Duncan wrote:


@Kaj, Lilypond's format for /inputting/ chords is described at
�http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode/
and I would suggest reading through this carefully to get a clearer 
understanding of the results you are seeing, particularly where 
Lilypond's format differs from the conventions that you are used to.



The link doesn't work.


Remove the terminal / and it works.
Yours, Simon


Sorry about that, I thought I did a straight cut-and-paste from the 
browser's address bar, so I'm not sure where the extra / came from.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Access grob name?

2015-09-17 Thread David Nalesnik
Hi Simon,

On Thu, Sep 17, 2015 at 7:20 AM, David Kastrup  wrote:

> Simon Albrecht  writes:
>
> > Hello,
> >
> > I’ve written a music function which applies some tweaks on dynamics to
> > offset them. Unfortunately, it’s not possible to use the offset music
> > function on X-offset, because it is a mutable property.
>
> You can use \offset on DynamicText.X-offset.

{
  c''\> g' -\offset DynamicText.X-offset 3 \f
}

Any property that accepts a number, number-pair, or number-pair-list and
has a default value listed in the grob's page in the Internals Reference is
offset-able.  (This documentation is taken directly from define-grobs.scm.)

Unofrtunately, DynamicLineSpanner has no default value; thus, there's
nothing for offset to work with.

>
> > Thus I have to add a displacement for DynamicText so that it is not
> > aligned to its baseline, but to the ‘center’ like normally.  Now, it
> > would help if the music function could find out by itself whether to
> > apply this displacement, depending on which grob it is applied to. As
> > an example (attached also): %% \version "2.19.27"
> >
> > test =
> > #(define-music-function (ev) (ly:music?)
> >(tweak 'color red ev))
> >
> > {
> >   c''-\test \> g'-\test \f
> > }
> > %%
> > How can I modify the function so that only the DynamicText is colored,
> > the Hairpin isn’t?


If you do need the name, try:

test =
#(define-music-function (ev) (ly:music?)
   (if (eq? (ly:music-property ev 'name) 'AbsoluteDynamicEvent)
   (tweak 'color red ev)
   ev))

{
  c''-\test \> g'-\test \f
}


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


Re: Rendering cropped SVG

2015-09-17 Thread David Wright
> > Am 17.09.2015 um 03:08 schrieb David Wright :
> > 
> > I wrote earlier:
>  After all, in your script you have:
>  pdfcrop --margins 1 '$file_base_name.pdf' '$file_base_name.pdf'
>  where the output filename is the same as the input filename.
> > 
> > Well I'm still worried about the line I quoted above, which I think is
> > inviting trouble (unless you clearly understand the mechanism that is
> > being used). Bear in mind, in my script I used an intermediate file:
> > $ pdfcrop --margins 1 foo.pdf bar.pdf

Quoting poto...@posteo.de (poto...@posteo.de):
> Apparently I don't clearly understand the mechanism.
> Why can't the program write the cropped pdf to the same file?

When you're lucky, the program will read a small input file and, if
you're really lucky, close it before opening the output file, doing
the processing and then writing the output.

In general, programs aren't designed to do that because it limits the
quantity of input to what will fit in memory. pdfcrop is designed to
handle arbitrarily large input files and, indeed, it will handle
input from a pipe (which means it has no idea how much input there
will eventually be). Also consider what happens if you press ^C
halfway through the process: you've destroyed the input file.

That's dealing with only a tiny part of the file-handling
implications, and doesn't even consider file-locking on some OSes
which will prevent your opening a file for writing when it's already
open for reading. But now look at it from a naive point of view. You
assume that less data has been written than has been read at *all*
times during the process (as well by the end). Can you guarantee that?

These filesizes might surprise you (they did me):

Input file, the moderately-sized Lua Reference Manual,
obviously output from the TeX family
474818  refman-5.0.pdf

Output from   $ pdfcrop --margins 1 refman-5.0.pdf via-file
4709449 via-file

Output from   $ pdfcrop --margins 1 - via-pipe < refman-5.0.pdf
4709378 via-pipe

So with your script, you're likely to come a cropper one day.
(Sorry, had to get that in!) If you're going to write a script,
always use the most conservative assumptions, not short-cuts.
And before you try to debug a script with a possible race-condition,
you need to remove any obvious potential sources for the problem.

Cheers,
David.

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


Re: Re: Chords and what they mean

2015-09-17 Thread 70147persson
Well, time to thank you all for your efforts to get me understand what I 
am doing. As (almost) usual there already exists a solution in LilyPond, 
but it is  hidden by so much else, so you do not find it. In my country 
we sometimes say that "you do not see the forest because of all the 
trees" (in a home made ugly translation!).


I had already discovered the "chordnameexceptions", but as I do not know 
the Scheme language (yet), I had not seen exactly how to use it. And the 
explanation in the Notation Reference is really not very exhaustive. So 
the construct with "powerChordExceptions" was new to me, as well as that 
with "\powerChords". Even if I had already come in contact with power 
chords and roughly understand what they mean, it was first after 
following your advice, I found them in the "Guitar" section. I had 
really not looked there, as my target was a piece of piano music.


But thank you everybody for your contribution to my new knowledge.
/Kaj

On 2015-09-17 13:29, pls wrote:

Thomas Morley  writes:


2015-09-17 10:47 GMT+02:00 Simon Albrecht :

Hello Kaj,

On 17.09.2015 09:27, 70147pers...@telia.com wrote:

First I will declare, that I am not 100 percent sure this is a bug, but
friends of mine, musicians, say it probably is. Also, as I am not an expert,
I have tried to learn by searching on among others Wikipedia.

It is about chords, a few of them. It started when I should clean write a
score from a manuscript. In one measure there were noted two chords, C5 and
C. Obviously not the same, as they stood just beside of each other. A search
on Wikipedia also told me, and this was also confirmed, the author's
intention, that C5 means C(no 3), hence , while the chord C means . But LilyPond treats these two the same and produces the same notes. This
is also clearly said e.g. in Appendices A.1 and A.2 of Notation Reference,
as well as in the text part. However even if possibly a correct procedure,
is it a correct practise?

Another such discrepancy is about Csus, which Wikipedia (and my friends)
says is equivalent to Csus4, hence . But LilyPond produces ,
hence what should come from the notation C5 as in the previous paragraph.

So, what is the truth?


There are others who are more into the subject, but I may say:
There is no ‘truth’. With chord names, there are so many different
conventions and fiercely defended convictions that it’s impossible to define
a single ‘standard’ naming scheme. (Edit: just like the NR says)

Very true.
It's a mess, but LilyPond can handle it. ;)


Many things in the chords rendering may be overridden in LilyPond. In case
you’re not aware yet, check out

and perhaps the LSR . If that doesn’t cover your
wishes, you may come back with a code example, I’d suggest.

HTH, Simon

chrds > \chordmode {
 \set chordNameExceptions >   #(append
  powerChordExceptions
  ignatzekExceptions)
 c:1.4.5
 c:1.5
 \notemode {
 
 
 }
}

<<
 \new Staff \chrds
 \new ChordNames \chrds
If it's not sufficient you can set your own 'exceptions' for
chord-naming, see the links Simon provided.

HTH,
   Harm

It's not necessary to define power chord exceptions.  They are already
defined. All you have to do is:

chrds =
   \powerChords
   % e.g.
   \chordmode { c,:1.5 }
   % or e.g.
   
   }

<<
   \new Staff \chrds
   \new ChordNames \chrds
BTW: The power chord examples here:
http://lilypond.org/doc/v2.19/Documentation/notation/common-chord-modifiers
are not complete. The chord names are missing.

hth
patrick






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


Re: Re: Chords and what they mean

2015-09-17 Thread 70147persson

 On 2015-09-17 13:40, Simon Albrecht wrote:

On 17.09.2015 13:30, lilyp...@andis59.se wrote:

On 2015-09-17 13:14, Brett Duncan wrote:


@Kaj, Lilypond's format for /inputting/ chords is described at
http://www.lilypond.org/doc/v2.18/Documentation/notation/chord-mode/
and I would suggest reading through this carefully to get a clearer 
understanding of the results you are seeing, particularly where 
Lilypond's format differs from the conventions that you are used to.



The link doesn't work.


Remove the terminal / and it works.
Yours, Simon


Or: remove the initial (after http://) "www." and it works.
/Kaj
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Chords and what they mean

2015-09-17 Thread Noeck
Hi,

why is the number 5 larger than other numbers?
Does Csus4 3 make sense?

\version "2.19.21"
x = \chordmode {
  \powerChords
   c1:1.5
   c1:1.4
   c1:4.5
}

<<
  \new ChordNames \x
  \new Staff \x
>>

Cheers,
Joram

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


Re: Extract notes from chords, with silence when there are none

2015-09-17 Thread Gilles THIBAULT
> Wrap the whole expression in event-chord-wrap! before handling it.  The
> LSR issue is probably from before issue 2240 changed the representation
> of single notes.
> 
No, it is because "chord.ly" deals only with chords and keeps notes unchanged. 
But yes, event-chord-wrap! is a quick way here to avoid to change all the 
code...

So Chris, the last change you have to make in the code is to change 

line 73 (in \extractNote definition)
(extract-note music n))

by

(extract-note (event-chord-wrap! music) n))

You'll get a { r2 r2 } in Staff 2 and 3 of the snippet.
Well, no very beautiful for a score but will be perfect for Midi.
 
-- 
Gilles

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


Re: Chords and what they mean

2015-09-17 Thread Malte Meyn

Am 17.09.2015 um 20:17 schrieb Noeck:

Hi,

why is the number 5 larger than other numbers?


\powerChords from ly/chord-modifiers-init.ly uses \normal-size-super 
instead of \super but I’ve no idea why.



Does Csus4 3 make sense?



I’ve seen that once in Cm^sus4 for  but it doesn’t make sense 
to me; I would prefer Cm^add4 (or perhaps Cm^add11). LilyPond prints es f g> as C^sus4♭3.


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


Re: Chords and what they mean

2015-09-17 Thread Blöchl Bernhard
If it makes sense in my opinion only just depends on the harmonic 
context and on your musical purpose.

Other "names" for Csus4 3 (c e f g) are
Cadd4 (4 is the g in this case),
Em#5addF/C (#5 here is c, f is added and c is the bass note),
Fmaj7 would be f a c e, but
Fmaj7sus2/C is c e f g
(normally f is root, the 3rd is suspended and the 2nd added, would be an 
a but is suspended, instead there is added the 2 = g. c is added as the 
bass note  - a kind of chord inversion)

If you play jazz that is your "dailybread"!

The "name" and function ALWAYS just depend on the context.



Am 17.09.2015 20:17, schrieb Noeck:


Does Csus4 3 make sense?


 ___

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: Chords and what they mean

2015-09-17 Thread Blöchl Bernhard
With Cm^sus4 for  I have some problems. 4 of cm is f - is it? 
But it is not suspended but f is added for the suspended f? Does that 
make sense?


 I would call (always depending on the context) Cmadd4, 
F7sus2/C, D#6no5add2/C.


But C^sus4♭3   is not necessarily wrong (in my oppinion), 
as 3 (=e) is suspended and set f instead. b3 will be added -> b3 = es.


Always consider the harmonic context!!!


Am 17.09.2015 21:24, schrieb Malte Meyn:

Am 17.09.2015 um 20:17 schrieb Noeck:



I’ve seen that once in Cm^sus4 for  but it doesn’t make
sense to me; I would prefer Cm^add4 (or perhaps Cm^add11). LilyPond
prints  as C^sus4♭3.

___
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: Chords and what they mean

2015-09-17 Thread Blöchl Bernhard

Sorry. got something wrong. Here a correction:
... f is added for the suspended es?

es = 3, sus4 means suspend 3 = es and set f instead ...


3 of cm is es.

Am 17.09.2015 23:06, schrieb Blöchl Bernhard:

With Cm^sus4 for  I have some problems. 4 of cm is f - is
it? But it is not suspended but Does
that make sense?

 I would call (always depending on the context) Cmadd4,
F7sus2/C, D#6no5add2/C.

But C^sus4♭3   is not necessarily wrong (in my
oppinion), as 3 (=e) is suspended and set f instead. b3 will be added
-> b3 = es.

Always consider the harmonic context!!!


Am 17.09.2015 21:24, schrieb Malte Meyn:

Am 17.09.2015 um 20:17 schrieb Noeck:



I’ve seen that once in Cm^sus4 for  but it doesn’t make
sense to me; I would prefer Cm^add4 (or perhaps Cm^add11). LilyPond
prints  as C^sus4♭3.

___
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: Chords and what they mean

2015-09-17 Thread mskala
On Thu, 17 Sep 2015, Blöchl Bernhard wrote:
>  I would call (always depending on the context) Cmadd4, F7sus2/C,
> D#6no5add2/C.

> Always consider the harmonic context!!!

What exactly does the "harmonic context" mean?  What would be specific
examples of contexts where it could make sense to call this set of notes
Cmadd4, and contexts where it would be better to call it F7sus2/C, etc.?

If we are hoping to teach a computer program, i.e. LilyPond, to assign
correct names to chords, then we have to really say what the
considerations are that lead one name to be correct over another.

I'd like to think it could be as simple as looking at the current key
signature for a clue, but I realize that's only likely to actually give
the right results in limited cases, and to highlight whatever errors
remain.  Maybe a smarter solution could involve a language model (hidden
Markov, context-free grammar, etc.) that could assign a likelihood to each
chord name for a set of notes depending on the ones before and after it -
like the standard techniques for determining which words in a sentence are
nouns and verbs and so on, even though any single word may be ambiguous.

It sure would be useful if there were a system of descriptive names for
sonorities *in isolation* that could be understood as giving a single name
to the set of notes not commenting on anything else except which notes are
and are not present, but I realize that's not the information
conventional chord names are intended to convey.

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Access grob name?

2015-09-17 Thread Simon Albrecht

On 17.09.2015 14:51, David Nalesnik wrote:

Hi Simon,

On Thu, Sep 17, 2015 at 7:20 AM, David Kastrup > wrote:


Simon Albrecht > writes:

> Hello,
>
> I’ve written a music function which applies some tweaks on
dynamics to
> offset them. Unfortunately, it’s not possible to use the offset
music
> function on X-offset, because it is a mutable property.

You can use \offset on DynamicText.X-offset.


Silly me.
Of course; the problem was that I overlooked the \version 2.19.23 in my 
test file, which is the /last/ version in which this does /not/ work. 
Since David K’s fix (thanks a lot!) for issue 4516, it has been working.

Sorry!




If you do need the name, try:

test =
#(define-music-function (ev) (ly:music?)
   (if (eq? (ly:music-property ev 'name) 'AbsoluteDynamicEvent)


And thanks for that, nevertheless.

Find attached what I’ve now got as a result, however intermediary it may 
prove. The example is of course far from any actual use case, but it 
demonstrates the functionality well.


Yours, Simon
\version "2.19.24"

off =
#(define-music-function
  (spec event)
  (pair? ly:music?)
  "
Shift grobs using X- and Y-offset, with outside-staff-priority unset by default.

Provides dedicated input modes for Dynamics in order to handle the tricky 
interaction with DynamicLineSpanner and both settings of outside-staff-priority.
"
  ;; default values
  (define item-x-off 0)
  (define item-y-off #f)
  (define span-y-off 0)
  (define inside-staff? #t)
  (define dynamic? #f)

  (define (spec-type? spec symbol-list)
(and (list? spec)
 (member (car spec) symbol-list)))

  ;; Apply tweak only if cond? is true
  (define (cond-tweak cond? prop val arg)
(if cond? (tweak prop val arg) arg))
  (define (cond-offset cond? prop offs item)
(if cond? (offset prop offs item) item))

  ;; differentiate between spec-types
  (cond
   ;; no further complications: proper pair for input
   ((not (list? spec))
(set! item-x-off (car spec))
(set! item-y-off (cdr spec)))
   ;; Offset DynamicText or Hairpin
   ;; input: three-element list '(spec-type x y)
    1. at the beginning of a DynamicLineSpanner
   ((spec-type? spec '(dynamic-line-spanner dls))
(set! dynamic? #t)
(set! item-x-off (second spec))
(set! span-y-off (third spec)))
    2. when a DynamicLineSpanner is already active
   ((spec-type? spec '(dynamic d))
(set! dynamic? #t)
(set! item-x-off (second spec))
(set! item-y-off (third spec))
;(format #t "item-y-off is ~a" item-y-off)
)
   (else (ly:warning "Cannot read specification for offset - using default 
values.")))

  (cond-tweak inside-staff? 'outside-staff-priority #f
(cond-tweak item-x-off 'X-offset item-x-off
  (cond-offset item-y-off 'Y-offset item-y-off
(cond-tweak
 (and dynamic? inside-staff?)
 '(DynamicLineSpanner outside-staff-priority)
 #f
 (cond-tweak dynamic? '(DynamicLineSpanner Y-offset) span-y-off 
event))\version "2.19.24"
\include "offII.ily"

\relative {
  \hideNotes
  \dynamicUp
  b'2-\off #'(dls 0 -1) \< 2-\off #'(d 0 0) \f\>
  2 2-\off #'(d 0 -.5) \<
  2\f 2-\off #'(dls 2 -2) \f
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Extract notes from chords, with silence when there are none

2015-09-17 Thread mskala
On Thu, 17 Sep 2015, Gilles THIBAULT wrote:
> So Chris, the last change you have to make in the code is to change
>
> line 73 (in \extractNote definition)
> (extract-note music n))
>
> by
>
> (extract-note (event-chord-wrap! music) n))

Assuming you mean me...

I just found a message I thought I'd already sent, in my "postponed
drafts" folder.  Most likely I started to write it, then saw more mail
coming in on this thread, stopped to read that in case it could answer my
problem, and never got back to the original message.  That message is now
obsolete, but in it I described how making your first change just resulted
in the error message "fatal error: cannot find music object: RestEvent
'duration".

Now, I made your second change and continued getting the "fatal error:
cannot find music object: RestEvent 'duration" message.  Then I tried
downloading the file and making the change again, exactly as before, and
got different error messages.  I ran a diff on the files and got this
(as part of longer output)...

40c40
< (make-music 'RestEvent 'duration (ly:music-property note 
'duration
---
> (make-music 'RestEvent 'duration (ly:music-property note 
> 'duration

...which is utterly bizarre!  Apparently the same identical line of code,
reported by diff as being different.

However, that was a clue.  After some digging around with hex dump, it
appears that the issue is when I copied and pasted from your message into
the file the first time, some invisible HTML-related garbage (namely, 0xA0
characters) was copied too.  Those characters *look* like spaces, but
LilyPond neither recognizes them as such nor reports them as errors.  It
just produces an incorrect parse.  Probably, the same issue is what causes
all your messages to appear double-spaced on my screen, making them hard
to read.

I wish people would stop using HTML for email.

Anyway, with the second change and the removal of the HTML garbage, the
script seems to do what I was hoping for.  Thanks!

-- 
Matthew Skala
msk...@ansuz.sooke.bc.ca People before principles.
http://ansuz.sooke.bc.ca/

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