Re: indent-ly

2009-10-22 Thread Bertalan Fodor (LilyPondTool)
Now, the real problem I see with this approach is that no perfect 
formatting (which is not the same as indentation) can be done without 
actually parsing the input.
Complete parsing of LilyPond input is _impossible_ without LilyPond 
itself. For example you need to format LilyPond code _inside_ Scheme 
code (remember the #{ construct used in define-music-function)
So a standard formatting engine can only be written inside LilyPond, or 
at least using LilyPond to generate metadata describing the structure of 
the input.


Bert

Martin Tarenskeen wrote:



On Wed, 21 Oct 2009, Graham Percival wrote:

- it would be nice to have an option to replace the file directly 
instead of

having to copy/paste the resulting file


Definitely!


Done in latest version. Use -m (--modify)
Be careful: This version overwrites the original file without making a 
backup ( infile.ly~ )first. Maybe I should add that in the next version.





- scheme code is not handled (or indented uniformly)


Yes, scheme code should be formatted in the scheme way.
I know very very little about scheme. Some example lilypond files with 
much scheme code might help.



- if within brackets there are tabs after the code and before the
end-bracket they are replaced by a bunch of blanks


Hmm, I'm not certain how often this would come into play.
I use tabs sometimes for indenting lines, but I haven't seen anyone 
using tabs in the middle of a line of lilypond code


- in my programming style i prefer to have the endbracket aligned 
with the

code above - maybe with an additional option this could be solved!?



I'd argue against this -- the point of a unified style /
indentation scheme is that it's *standard*.

...

I don't think we should have many options at all.

I agree
B

One more item to consider: whitespace at the ends of lines should
be stripped.


I thought I already did that ? I'll look in to it.






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


Re: indent-ly

2009-10-22 Thread David Kastrup
"Bertalan Fodor (LilyPondTool)"  writes:

> Now, the real problem I see with this approach is that no perfect
> formatting (which is not the same as indentation) can be done without
> actually parsing the input.

I don't see that.

> Complete parsing of LilyPond input is _impossible_ without LilyPond
> itself.

There are very few things actually affecting input syntax (redefining
note names is one of those).  Chord and lyrics mode, too, but I don't
think that the subtleties are actually important for formatting and
indentation.  It is perfectly acceptable to just break on spaces, and
indent according to >> } > nesting.  After discounting quoted strings,
-> \> \< and similar articulation.

> For example you need to format LilyPond code _inside_ Scheme code
> (remember the #{ construct used in define-music-function)

Yes, but it is not like there are multiple arbitrary ways in which this
can happen.  It is actually just #{ IIRC.

> So a standard formatting engine can only be written inside LilyPond,
> or at least using LilyPond to generate metadata describing the
> structure of the input.

I think that view is overly pessimistic.

-- 
David Kastrup



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


Re: indent-ly

2009-10-22 Thread Bertalan Fodor (LilyPondTool)



So a standard formatting engine can only be written inside LilyPond,
or at least using LilyPond to generate metadata describing the
structure of the input.



I think that view is overly pessimistic.

Ok, but I'm talking about a standard formatter, and not just indentation.
But for that as well, you certainly need at least a limited parser, at 
least to find where Scheme parts start and begin.


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


Converting note name language

2009-10-22 Thread Akira
I want to convert a English note name ly file into a German one.

I got a ly file of a piece from the Mutopia Project to transcribe into
woodwind quintet.
The ly file uses English note name(c-d-e-f-g-a-b) though I want to use
German one(c-d-e-f-g-a-h).

I tried to replace "b" for "h" and "bes" for "b" with a text editor,
but it didn't work.

How can I convert the note name language using convert-ly or something?


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


Re: Converting note name language

2009-10-22 Thread Francisco Vila
2009/10/22 Akira :
> I want to convert a English note name ly file into a German one.
>
> I got a ly file of a piece from the Mutopia Project to transcribe into
> woodwind quintet.
> The ly file uses English note name(c-d-e-f-g-a-b) though I want to use
> German one(c-d-e-f-g-a-h).
>
> I tried to replace "b" for "h" and "bes" for "b" with a text editor,
> but it didn't work.

write

   \include "deutsch.ly"

at the top, and please read

http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Writing-pitches.html#Note-names-in-other-languages

-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org
www.csmbadajoz.com


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


Re: Converting note name language

2009-10-22 Thread Akira
2009/10/22 Francisco Vila :
> 2009/10/22 Akira :
>> I want to convert a English note name ly file into a German one.
>>
>> I got a ly file of a piece from the Mutopia Project to transcribe into
>> woodwind quintet.
>> The ly file uses English note name(c-d-e-f-g-a-b) though I want to use
>> German one(c-d-e-f-g-a-h).
>>
>> I tried to replace "b" for "h" and "bes" for "b" with a text editor,
>> but it didn't work.
>
> write
>
>   \include "deutsch.ly"
>
> at the top, and please read
>
> http://lilypond.org/doc/v2.12/Documentation/user/lilypond/Writing-pitches.html#Note-names-in-other-languages
>
> --
> Francisco Vila. Badajoz (Spain)
> www.paconet.org
> www.csmbadajoz.com
>

Thank you, but what I'm trying to mean is not to write a new music in
German but to convert ly file already written in English into German,
for example:
--
\include "english.ly"
c8 d e f g a b c | bes2 des |
b4 b b b|
\bar "|."
---
|
|
   V
--
\include ‘deutsch.ly’
c8 d e f g a h c | b2 des |
h4 h h h|
\bar "|."
---
I'd like to know how to convert the former file to the latter
automatically, not manually.


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


Re: Converting note name language

2009-10-22 Thread Francisco Vila
2009/10/22 Akira :
> I'd like to know how to convert the former file to the latter
> automatically, not manually.


Ah. Frescobaldi does this. http://www.frescobaldi.org/


-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org
www.csmbadajoz.com


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


Re: Converting note name language

2009-10-22 Thread -Eluze


Pikachu-3 wrote:
> 
> 
> Thank you, but what I'm trying to mean is not to write a new music in
> German but to convert ly file already written in English into German,
> for example:
> --
> \include "english.ly"
> c8 d e f g a b c | bes2 des |
> b4 b b b|
> \bar "|."
> ---
> |
> |
>V
> --
> \include ‘deutsch.ly’
> c8 d e f g a h c | b2 des |
> h4 h h h|
> \bar "|."
> ---
> I'd like to know how to convert the former file to the latter
> automatically, not manually.
> 
this should do it:

\include "deutsch.ly"
mel={
  c 8 d e f g a b c | b 2 des |
  b 4 b b b|
  \bar "|."
}
\include "english.ly"
\displayLilyMusic {
  \mel
}

just change the input/output language and the input notes!
-- 
View this message in context: 
http://www.nabble.com/Converting-note-name-language-tp26008301p26009335.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: chordnames tweaking again

2009-10-22 Thread Henning Hraban Ramm
2009/10/21 Carl Sorensen :
>> I don't understand enough Scheme to avoid "ees" - do you?
> I assume you want to get Es for E flat major and es for e flat minor.
> (I'm not sure about this -- I'm totally american in my chord experience).

Yes, exactly.


>>         (cond
>             ((and (= alteration FLAT) (= (car n-a) 2)) (make-simple-markup
> "s"))
>>            ((= alteration FLAT) (make-simple-markup "es"))
> Note: code above is untested, but it illustrates the principle.

Thank you! I'll check it as soon as I get to my own computer...

>> (2) Different, probably easier problem:
>> I must display some alterations as follows:
>> f:dim => f-
>> f:aug => f5+
>> f:maj7 => f7+
>>
> Probably the easiest way to do these is to use a custom chord name
> exceptions list.  See the snippet Chord name exceptions in Customizing chord
> names of section 2.7.2 of the docs.
>
>  #Customizing-chord-names>

Of course I found this in the docs, but it looks like the exceptions
mechanism is only meant for your own additions, not for overriding
defaults?

I'll try.

Greetlings, Hraban


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


Re: chordnames tweaking again

2009-10-22 Thread Carl Sorensen



On 10/22/09 7:30 AM, "Henning Hraban Ramm"  wrote:

> 2009/10/21 Carl Sorensen :
> 
>>> (2) Different, probably easier problem:
>>> I must display some alterations as follows:
>>> f:dim => f-
>>> f:aug => f5+
>>> f:maj7 => f7+
>>> 
>> Probably the easiest way to do these is to use a custom chord name
>> exceptions list.  See the snippet Chord name exceptions in Customizing chord
>> names of section 2.7.2 of the docs.
>> 
>> > #Customizing-chord-names>
> 
> Of course I found this in the docs, but it looks like the exceptions
> mechanism is only meant for your own additions, not for overriding
> defaults?

chord-name-exceptions overrides defaults.  If you make a complete exceptions
list, you'll have a complete chord-name scheme.

Thanks,

Carl



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


Re: chordnames tweaking again

2009-10-22 Thread Henning Hraban Ramm
2009/10/22 Carl Sorensen :
>>> >> #Customizing-chord-names>
>> Of course I found this in the docs, but it looks like the exceptions
>> mechanism is only meant for your own additions, not for overriding
>> defaults?
> chord-name-exceptions overrides defaults.  If you make a complete exceptions
> list, you'll have a complete chord-name scheme.

Good, I'll try.
Perhaps we could make the docs a tiny bit clearer about that.

Another approach: Is there a possibility to "just print" any
modification, regardless if it has any meaning, like

f:m{stuff}

?

Greetlings, Hraban


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


Re: Converting note name language

2009-10-22 Thread Henning Hraban Ramm
2009/10/22 Akira :
> I want to convert a English note name ly file into a German one.
>
> I got a ly file of a piece from the Mutopia Project to transcribe into
> woodwind quintet.
> The ly file uses English note name(c-d-e-f-g-a-b) though I want to use
> German one(c-d-e-f-g-a-h).
>
> I tried to replace "b" for "h" and "bes" for "b" with a text editor,
> but it didn't work.
>
> How can I convert the note name language using convert-ly or something?

Without changing your input, just use
\germanChords
within your ChordNames context.

Greetlings, Hraban


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


Re: Converting note name language

2009-10-22 Thread Valentin Villenave
On Thu, Oct 22, 2009 at 2:51 PM, -Eluze  wrote:
> this should do it:

That *is* brilliant. Could you add it to the LSR please?

(I did know about the command, I just never thought about using it!)

One limitation though: IIRC it can't output \relative mode.

Cheers,
Valentin


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


Re: problems with routine to adjust inner points of slur

2009-10-22 Thread David Nalesnik
Thank you so much, Neil--this works perfectly!

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


Re: Converting note name language

2009-10-22 Thread Gilles THIBAULT



I'd like to know how to convert the former file to the latter
automatically, not manually.


Something like that seems to work

%%
\include "italiano.ly"

music = { do8 re mi fa sol la si do | sib2 mib |
si4 si si si|
\bar "|."   }

\include "deutsch.ly"

\displayLilyMusic \music

%%
The output gives notes in deutsch (and with a good indentation ...)
{
 c8 d e f g a h c |
 b2 es |
 h4 h h h |
 \bar "|."  
}

You just have to redirect the output.

Gilles



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


Re: bad musicxml2ly output

2009-10-22 Thread Reinhold Kainhofer
Am Mittwoch, 21. Oktober 2009 12:30:25 schrieb Stefan Thomas:
> Dear community,
> I also experienced problems with muscxml2ly. I guess it has to do with
> full-bar rest, when You have a 58-timesignature.
> Then I get mostly:
> \time 5/8 R2..
> instead of: \time 5/8 R8*5

Ah, right, that was a stupid bug in the transformation between duration and 
lilypond notation. Fixed in the latest development version.

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org


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


Re: bad musicxml2ly output

2009-10-22 Thread Reinhold Kainhofer
Am Dienstag, 20. Oktober 2009 14:52:57 schrieb hhpmu...@163.com:
> Dear Reinhold,
>   I meant to convert this song to view the lyrics, but the console gave
>  lots of "encountering unprocessed blah blah", and the lyrics are very
>  terribly ordered. What's wrong with it?

There's nothing wrong with the song. But there are many problems with 
musicxml2ly:

1) That song uses "modern" beaming, where a beam does not indicate a melisma 
(i.e. multiple notes to the same syllable). By default, musicxml2ly uses 
manual beaming, where two beamed notes belong to the same syllable. In that 
case, the lyrics for the second note will be ignored. You can get around this 
by using "musicxml2ly --no-beaming feelings.xml". Then, however, all beaming 
information from the xml file will be lost. I don't see any way around this, 
since lilypond handles beaming and lyrics quite different from Finale.

2) The "unprocessed EndingSpanner" warning messages come from the fact that 
the song contains lots of more or less nested repeats with alternatives, which 
are not correctly handled by musicxml2ly :(

3) Even if you use --no-beaming, musicxml2ly seems to ignore lyrics extender 
lines (or rather, they are not present in the .xml file), and it will put the 
chord names below the staff instead of above.

4) The lyrics "bra -  zos" in measure 31 are wrongly put into measure 19...

etc.

Cheers,
Reinhold
-- 
--
Reinhold Kainhofer, reinh...@kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org


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


Re: Converting note name language

2009-10-22 Thread -Eluze


Valentin Villenave wrote:
> 
> 
> That *is* brilliant. Could you add it to the LSR please?
>  done - "translating notes from one language to another"


> (I did know about the command, I just never thought about using it!)
> 
> One limitation though: IIRC it can't output \relative mode.
>  is that a limitation - i thought relative mode is for easy input in
> certain cases?!

-- 
View this message in context: 
http://www.nabble.com/Converting-note-name-language-tp26008301p26012111.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.



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


Re: chordnames tweaking again

2009-10-22 Thread Carl Sorensen



On 10/22/09 7:50 AM, "Henning Hraban Ramm"  wrote:

> 2009/10/22 Carl Sorensen :
 

>>> Of course I found this in the docs, but it looks like the exceptions
>>> mechanism is only meant for your own additions, not for overriding
>>> defaults?
>> chord-name-exceptions overrides defaults.  If you make a complete exceptions
>> list, you'll have a complete chord-name scheme.
> 
> Good, I'll try.
> Perhaps we could make the docs a tiny bit clearer about that.

Patches gratefully accepted.  I thought it was quite clear, since the
default maj7 symbol is replaced with an exception in the snippet.  But if
you can provide improved text, we can get it changed.

> 
> Another approach: Is there a possibility to "just print" any
> modification, regardless if it has any meaning, like
> 
> f:m{stuff}

No, I don't think so.  But you might be able to use

f:m\markup{stuff}

to get what you want.

Carl



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


Funny partcombine behaviour

2009-10-22 Thread Peter Chubb

I'm trying to combine some parts, and see funny behaviour.  

This input (lily 2.12.2):
-
\version "2.12.0"

accomp=\relative c' {
  4. r8 r2
}

voice= \relative c'' {
  g4. r8 r2
}

\score {
  \context Staff {
\partcombine \voice \accomp
  }
}
---
produces this:

<>

The idea is to merge a vocal line into a piano accompaniment.  The
pianist can choose to play the top note, or not, as s/he feels is most
appropriate.  (actually, most of my pianist friends treat the written
accompaniment  as a guideline, rather than something to play verbatim)

More complex examples sometimes merge the note-heads, but add extra dots.

I've solved my problem at the moment by explicitly notating the
tune (where it doesn't follow the top line of the accompaniment exactly) in the 
piano
part, and putting the tune into a Devnull context for the lyrics to
match to.  But is there a neater way to get what I want?

--
Dr Peter Chubb  peter DOT chubb AT nicta.com.au
http://www.ertos.nicta.com.au   ERTOS within National ICT Australia
All things shall perish from under the sky/Music alone shall live, never to die
___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Funny partcombine behaviour

2009-10-22 Thread Bill Mooney

Hi Peter,
I cut and pasted your code into jEdit and ran it with lptool and got the 
attached... ! :)

Hope this helps - I know it isn't a solution, but...

Cheers
Bill
<>___
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user


Funny partcombine behaviour

2009-10-22 Thread Bill Mooney
... on the other hand, if I swap the order of "\voice \accomp" to 
"\accomp \voice" I get your result !?!


Cheers
Bill
--
43 Main St
Weston
Oamaru 9401
New Zealand
(064)(03) 4349478


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


Re: chordnames tweaking again

2009-10-22 Thread fiëé visuëlle

Am 2009-10-22 um 18:34 schrieb Carl Sorensen:


Another approach: Is there a possibility to "just print" any
modification, regardless if it has any meaning, like

f:m{stuff}


No, I don't think so.  But you might be able to use

f:m\markup{stuff}

to get what you want.



No, I checked that - you can't use \markup in this context.


Your chord namer patch works BTW - thank you again!


Greetlings from Lake Constance
---
fiëé visuëlle
Henning Hraban Ramm
http://www.fiee.net
http://angerweit.tikon.ch/lieder/
https://www.cacert.org (I'm an assurer)




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