Re: Consist engraver within loop

2016-03-09 Thread Urs Liska
*Bump*

Maybe it will be easier to understand the question (and thus provide an
answer) with a more stripped down MWE:


\version "2.19.38"

removeStaffLines =
#(define-scheme-function (ctx)(symbol?)
   #{
 \layout {
   \context {
 % I want to generate the following context def
 % from the ctx symbol? argument
 \Staff
 \remove "Staff_symbol_engraver"
   }
 }
   #})

\removeStaffLines Staff

{
  c'
}


What I ultimately need to base my further work on is a way to replace
the explicit call of \Staff with a procedure that takes the context name
as symbol? and returns the context def that is expected there.

Any ideas?
Thanks
Urs

Am 09.03.2016 um 01:53 schrieb Urs Liska:
> Hi all,
>
> I want to write a wrapper function to "install" an engraver in a number
> of contexts. It works pretty well, but I want to make it better.
>
> This is what I have so far.
>
> \version "2.19.38"
>
> install =
> #(define-scheme-function (contexts)(symbol-list?)
>   
>(if (member 'Score contexts)
>#{
>  \layout {
>\context {
>  \Score
>  \consists "Clef_engraver"
>}
>  }
>#})
>(if (member 'Staff contexts)
>#{
>  \layout {
>\context {
>  \Staff
>  \consists "Clef_engraver"
>}
>  }
>#})
>(if (member 'Voice contexts)
>#{
>  \layout {
>\context {
>  \Voice
>  \consists "Clef_engraver"
>}
>  }
>#}))
>
> \install Staff
>
> {
>   c'
> }
>
> Clef_engraver doesn't make real sense, it's just there to have something
> compilable.
> In order to complete that I would have to repeat the conditional for all
> existing context - and wouldn't even catch custom contexts. So I would
> like to iterate over the symbol list to consist the engraver in a
> non-redundant manner. The problem is, I don't know how to get from the
> symbols like 'Score to the \Score incantation. I think it should go
> something like this:
>
>(for-each
> (lambda (ctx)
>   #{
> \layout {
>   \context {
> % specify context from ctx
> \consists "Clef_engraver"
>   }
> }
>   #}
>   )
> contexts)
>
> This should work once I can "resolve" the comment
>
> Any pointers or solution would be appreciated
> Urs
>
> ___
> 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: Consist engraver within loop

2016-03-09 Thread Jan-Peter Voigt

Hi Urs,

try this line:
#(eval ctx (current-module))

Of course normally eval is evil, but in this case you just evaluate the 
name - the symbol - to the definition, which is stored under that name 
inside the scope of the layout block.


HTH
Jan-Peter

Am 09.03.2016 um 09:02 schrieb Urs Liska:

*Bump*

Maybe it will be easier to understand the question (and thus provide an
answer) with a more stripped down MWE:


\version "2.19.38"

removeStaffLines =
#(define-scheme-function (ctx)(symbol?)
#{
  \layout {
\context {
  % I want to generate the following context def
  % from the ctx symbol? argument
  \Staff
  \remove "Staff_symbol_engraver"
}
  }
#})

\removeStaffLines Staff

{
   c'
}


What I ultimately need to base my further work on is a way to replace
the explicit call of \Staff with a procedure that takes the context name
as symbol? and returns the context def that is expected there.

Any ideas?
Thanks
Urs

Am 09.03.2016 um 01:53 schrieb Urs Liska:

Hi all,

I want to write a wrapper function to "install" an engraver in a number
of contexts. It works pretty well, but I want to make it better.

This is what I have so far.

\version "2.19.38"

install =
#(define-scheme-function (contexts)(symbol-list?)

(if (member 'Score contexts)
#{
  \layout {
\context {
  \Score
  \consists "Clef_engraver"
}
  }
#})
(if (member 'Staff contexts)
#{
  \layout {
\context {
  \Staff
  \consists "Clef_engraver"
}
  }
#})
(if (member 'Voice contexts)
#{
  \layout {
\context {
  \Voice
  \consists "Clef_engraver"
}
  }
#}))

\install Staff

{
   c'
}

Clef_engraver doesn't make real sense, it's just there to have something
compilable.
In order to complete that I would have to repeat the conditional for all
existing context - and wouldn't even catch custom contexts. So I would
like to iterate over the symbol list to consist the engraver in a
non-redundant manner. The problem is, I don't know how to get from the
symbols like 'Score to the \Score incantation. I think it should go
something like this:

(for-each
 (lambda (ctx)
   #{
 \layout {
   \context {
 % specify context from ctx
 \consists "Clef_engraver"
   }
 }
   #}
   )
 contexts)

This should work once I can "resolve" the comment

Any pointers or solution would be appreciated
Urs

___
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: Consist engraver within loop

2016-03-09 Thread Urs Liska


Am 09.03.2016 um 09:25 schrieb Jan-Peter Voigt:
> Hi Urs,
>
> try this line:
> #(eval ctx (current-module))
>
> Of course normally eval is evil, but in this case you just evaluate
> the name - the symbol - to the definition, which is stored under that
> name inside the scope of the layout block.
>
> HTH

Indeed it does help, and you'll soon see it again in a pull request ;-)
(I'm writing a wrapper to consist the new edition-engraver to a
symbol-list? of contexts)

Urs

> Jan-Peter
>
> Am 09.03.2016 um 09:02 schrieb Urs Liska:
>> *Bump*
>>
>> Maybe it will be easier to understand the question (and thus provide an
>> answer) with a more stripped down MWE:
>>
>> 
>> \version "2.19.38"
>>
>> removeStaffLines =
>> #(define-scheme-function (ctx)(symbol?)
>> #{
>>   \layout {
>> \context {
>>   % I want to generate the following context def
>>   % from the ctx symbol? argument
>>   \Staff
>>   \remove "Staff_symbol_engraver"
>> }
>>   }
>> #})
>>
>> \removeStaffLines Staff
>>
>> {
>>c'
>> }
>> 
>>
>> What I ultimately need to base my further work on is a way to replace
>> the explicit call of \Staff with a procedure that takes the context name
>> as symbol? and returns the context def that is expected there.
>>
>> Any ideas?
>> Thanks
>> Urs
>>
>> Am 09.03.2016 um 01:53 schrieb Urs Liska:
>>> Hi all,
>>>
>>> I want to write a wrapper function to "install" an engraver in a number
>>> of contexts. It works pretty well, but I want to make it better.
>>>
>>> This is what I have so far.
>>>
>>> \version "2.19.38"
>>>
>>> install =
>>> #(define-scheme-function (contexts)(symbol-list?)
>>>
>>> (if (member 'Score contexts)
>>> #{
>>>   \layout {
>>> \context {
>>>   \Score
>>>   \consists "Clef_engraver"
>>> }
>>>   }
>>> #})
>>> (if (member 'Staff contexts)
>>> #{
>>>   \layout {
>>> \context {
>>>   \Staff
>>>   \consists "Clef_engraver"
>>> }
>>>   }
>>> #})
>>> (if (member 'Voice contexts)
>>> #{
>>>   \layout {
>>> \context {
>>>   \Voice
>>>   \consists "Clef_engraver"
>>> }
>>>   }
>>> #}))
>>>
>>> \install Staff
>>>
>>> {
>>>c'
>>> }
>>>
>>> Clef_engraver doesn't make real sense, it's just there to have
>>> something
>>> compilable.
>>> In order to complete that I would have to repeat the conditional for
>>> all
>>> existing context - and wouldn't even catch custom contexts. So I would
>>> like to iterate over the symbol list to consist the engraver in a
>>> non-redundant manner. The problem is, I don't know how to get from the
>>> symbols like 'Score to the \Score incantation. I think it should go
>>> something like this:
>>>
>>> (for-each
>>>  (lambda (ctx)
>>>#{
>>>  \layout {
>>>\context {
>>>  % specify context from ctx
>>>  \consists "Clef_engraver"
>>>}
>>>  }
>>>#}
>>>)
>>>  contexts)
>>>
>>> This should work once I can "resolve" the comment
>>>
>>> Any pointers or solution would be appreciated
>>> Urs
>>>
>>> ___
>>> 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


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


Re: music patterns and octave

2016-03-09 Thread Blöchl Bernhard
Obviously does changePitch.ly not understand the construct \tuplet 3/2 { 
a8 a a }.


\include "changePitch.ly"

rhythmPattern = {a16
%\tuplet 3/2 { a8 a a }
a16 a8 a4 a4} % a complex rhythm

scoreViolinI = \relative c'
{
 % \setOctave c' %this command is just an example and it does not exist!
  \changePitch \rhythmPattern {c d d d c b d e}
  f g a b
  c d e f
  %\setOctave c'
  \changePitch \rhythmPattern {c d d d c b d e}
}

scoreViolinII = \relative c'
{
  %\setOctave c'
  \changePitch \rhythmPattern {a b b b a b a a}
  f f a a
  c c f f
  %\setOctave c'
  \relative c' \changePitch \rhythmPattern {a b b b a b a a}
}

\score
{
  <<
\new Staff \scoreViolinI
\new Staff \scoreViolinII
  >>
  \layout { }
}

Am 09.03.2016 01:07, schrieb Gianmaria Lari:

Ciao David,

let's put it in another way. Have a look to the attached image and
please suggest me how you would write the code to generate it.

Then please have a look to the code I *would* like to write to obtain
it. Do you know if does exist anything similar to "setOctave"? Do you
see any logical mistake in trying to write it in this way? Sorry if
the example is not very simple, but I have not been able to make it
better.

version "2.19.35"
include "changePitch.ly"

rhythmPattern = {a16 tuplet 3/2 {a8 a a} a16 a8 a4 a4} % a complex
rhythm

scoreViolinI = relative c'
{
  setOctave c' %this command is just an example and it does not
exist!
  changePitch rhythmPattern {c d d d c b d e}
  f g a b
  c d e f
  setOctave c'  
  changePitch rhythmPattern {c d d d c b d e}
}

scoreViolinII = relative c'
{
  setOctave c' 

  changePitch rhythmPattern {a b b b a b a a}
  f f a a  
  c c f f
  setOctave c' 
  relative c' changePitch rhythmPattern {a b b b a b a a}
}

score
{
  <<
    new Staff scoreViolinI
    new Staff scoreViolinII
  >>
  layout { }
}

On Tue, Mar 8, 2016 at 7:39 PM, David Wright
 wrote:


On Tue 08 Mar 2016 at 17:45:35 (+0100), Gianmaria Lari wrote:

    [...]
    So, more precisely I would write:

      version "2.19.35"
      pattern =
      {
         c16 d e f g a b c
      }
      relative c' 
      {
        pattern d4 d4
        pattern c4 e4
        pattern e4 c4
      }

    But the previous code generate:
    [...]
    So I played a bit with "absolute" and at the end I have been

able to fix

    the issue.


I don't know what the issue is that you "fixed".


    Here it is the code:

      version "2.19.35"
      pattern = absolute
      {
         c'16 d' e' f' g' a' b' c''
      }
      relative c'' 
      {
        pattern d4 d4
        pattern c4 e4
        pattern e4 c4
      }

    Unfortunately this solution does not work well with

"changePitch" (that I

    need).


Now here's a clue as to what you're trying to do. Looking at the
changePitch documentation, patterns are only used as the first
argument to a changePitch function:
changePitch pattern newnotes
Judging by its purpose, I would assume (short of testing it) that
the
pattern has an _implied_ relative{} around it.

What one doesn't do, but you are trying to do, is typeset the
pattern
itself directly into a score. All that your examples here are doing
is to
demonstrate the rules that LilyPond uses to interpret notes within
{ ... } relative { ... } absolute { ... }

So the pattern's notes themselves are never seen in the score:
they're
replaced by the notes in the second argument (newnotes). That does
mean that we expect to see include "changePitch.ly" in any
compilable
examples you post.

Cheers,
David.



___
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: music patterns and octave

2016-03-09 Thread Blöchl Bernhard

Am 09.03.2016 09:52, schrieb Blöchl Bernhard:

Obviously does changePitch.ly not understand the construct \tuplet 3/2
{ a8 a a }.


The use of patterns is completely wrong. Check the documentation how to 
use the construct correctly.

http://gillesth.free.fr/Lilypond/changePitch/changePitch-doc.pdf


You have to change the architecture of your program completely!

\version "2.16.2"
#(define cPCheckForTies #f)
\include "changePitch.ly"

rhythmPattern = {a16
 %\tuplet 3/2 { a8 a a }
 a16 a8 a4 a4} % a complex rhythm

scoreViolinI = \relative c'
{
 % \setOctave c' %this command is just an example and it does not exist!
  %\changePitch \rhythmPattern
  c d d d c b d e
  f g a b
  c d e f
  %\setOctave c'
  %\changePitch \rhythmPattern
  c d d d c b d e
}


\score
{
  <<
\new Staff
{
\rhythmPattern
\scoreViolinI
}
  >>
  \layout { }
}

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


Re: scale durations

2016-03-09 Thread David Kastrup
Craig Dabelstein  writes:

> Sorry gents, here is one more I can't work out.
>
> The piece is in 9/8 but I need one instrument to play in 4/4. I have no
> idea how to work out that fraction:
>
> \set Staff.timeSignatureFraction = 4/4
> \scaleDurations ???/???

Uh, 9/8 / 4/4 = 9/8.  So to spread 4/4 to 9/8, you'd use
\scaleDurations 9/8 ...

-- 
David Kastrup

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


Re: music patterns and octave

2016-03-09 Thread Gianmaria Lari
Dear Carl,

thank you for pointing me out the octave check, didn't know it and now I'm
testing it (even if it looks it doesn't work as I need).

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


Re: Consist engraver within loop

2016-03-09 Thread David Kastrup
Jan-Peter Voigt  writes:

> Hi Urs,
>
> try this line:
> #(eval ctx (current-module))
>
> Of course normally eval is evil, but in this case you just evaluate
> the name - the symbol - to the definition, which is stored under that
> name inside the scope of the layout block.

That's completely gratuitous use of eval.  Also # does not create a
copy, resulting in modifying the _global_ definition, a very bad idea.

This should rather be

$(module-ref (current-module) ctx)

-- 
David Kastrup

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


Re: music patterns and octave

2016-03-09 Thread Gianmaria Lari
Thank you Patrick, this works exactly as I expected. Why it is not
documented? Can we use it or do we risk that it will deprecated?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Text spanner associated start and end notes

2016-03-09 Thread Andrew Bernard
Greetings All,

This is a Scheme question. We are trying to make a callback function for a 
customised text spanner that centres the left and right markup text exactly 
over the centre of the first and last notes the spanner covers. I am doing this 
in Scheme, and all is working, but so far I am unable to determine the actual 
grob for the note that the \startTexSpan is associated with. It appears that 
the left bound of the spanner is a paper column object, not a note. I do not 
know how to go from that to find the note. Why do I want to find the note? So 
that I can find its half width and use that as the offset for the text, the 
point being that different note values have different widths – long white notes 
are wider, for example.

I would very much like to post code here, but it is difficult to post code to 
ask for assistance in this case where I simply have idea no how to proceed. I 
apologise for this. Somewhat problematical. I am looking for conceptual 
guidance on this matter, rather than code assistance.

I have searched LSR a dozen times with many keywords. I have read and reread 
the Scheme function list. I have googled as deeply as I know how. I have 
written many pages of exploratory code in Scheme. I am unable to believe that 
we are the first and only people to want to do this, as I am unable to find any 
examples similar. What am I not understanding or missing? Any help would be 
most appreciated.

Andrew



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


Re: Text spanner associated start and end notes

2016-03-09 Thread Andrew Bernard
Having come to a halt, I think I must be on the entirely wrong track. So I 
thought about engravers, which I have no experience with. The NR Snippets 
section has this topic "Centering markup on note heads automatically”. If you 
compile this under 2.19.37 the markup is certainly not aligned in the centre. 
Why is that? It appears to be correct at 2.18.2.

More importantly, is using an engraver the approach that is required, and 
attempting to do it using grob parents and properties is incorrect and indeed 
impossible?

Andrew


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


Re: Text spanner associated start and end notes

2016-03-09 Thread Thomas Morley
2016-03-09 10:59 GMT+01:00 Andrew Bernard :
> Greetings All,
>
> This is a Scheme question. We are trying to make a callback function for a
> customised text spanner that centres the left and right markup text exactly
> over the centre of the first and last notes the spanner covers. I am doing
> this in Scheme, and all is working, but so far I am unable to determine the
> actual grob for the note that the \startTexSpan is associated with. It
> appears that the left bound of the spanner is a paper column object, not a
> note. I do not know how to go from that to find the note. Why do I want to
> find the note? So that I can find its half width and use that as the offset
> for the text, the point being that different note values have different
> widths – long white notes are wider, for example.
>
> I would very much like to post code here, but it is difficult to post code
> to ask for assistance in this case where I simply have idea no how to
> proceed. I apologise for this. Somewhat problematical. I am looking for
> conceptual guidance on this matter, rather than code assistance.
>
> I have searched LSR a dozen times with many keywords. I have read and reread
> the Scheme function list. I have googled as deeply as I know how. I have
> written many pages of exploratory code in Scheme. I am unable to believe
> that we are the first and only people to want to do this, as I am unable to
> find any examples similar. What am I not understanding or missing? Any help
> would be most appreciated.
>
> Andrew


Hi Andrew,

thinking of suspended NoteHeads you may be better off to rely on the
NoteColumn-extent for aligning.

Nevertheless the below may be of some help:

\version "2.19.36"

foo =
\override TextSpanner.after-line-breaking =
#(lambda (grob)
  (let* ((left-pc
   (ly:grob-array-ref  (ly:grob-object grob 'note-columns) 0))
 (note-heads
   (ly:grob-array->list (ly:grob-object left-pc 'note-heads
(for-each
  (lambda (nh)
(ly:grob-set-property! nh 'color red))
  note-heads)))


\relative c'' {
\foo
1\startTextSpan
d
e\stopTextSpan
}


HTH,
  Harm

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


Re: scale durations, another case

2016-03-09 Thread zzk
Malte Meyn-3 wrote
> Am 09.03.2016 um 05:13 schrieb zzk:
>> Out of curiosity (and maybe for some possible future, more complicated
>> scenarios), is there a solution using \scaleDurations instead?
>>
> 
> A tuplet 7/6 without tuplet number is the same as \scaleDurations with 
> factor 6/7. Or, even simpler, you can scale a duration by putting a 
> *[scaling factor] behind it:
> 
> 
> d32*6/7[ g b d \rh \stemDown g b d]

Malte, thank you for the additional explanation. 

There is so much more for me to learn about Lilypond :) 

Have a nice day,
Zoran



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/scale-durations-another-case-tp188321p188345.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: music patterns and octave

2016-03-09 Thread David Wright
On Wed 09 Mar 2016 at 01:07:47 (+0100), Gianmaria Lari wrote:
>Ciao David,
>let's put it in another way. Have a look to the attached image and please
>suggest me how you would write the code to generate it.

That is attached. I adopted a subtractive approach, using your source
as a base.

>Then please have a look to the code I *would* like to write to obtain it.
>Do you know if does exist anything similar to "\setOctave"? Do you see any
>logical mistake in trying to write it in this way? Sorry if the example is
>not very simple, but I have not been able to make it better.

I find it difficult to know what you're trying achieve. It seems that
you're trying to fight LP's \relative { } construction rather than
just using it. We are left trying to guess your intent.

I see that one of the suggestions you've had is to use \resetRelativeOctave
but I can't quite see the necessity of using that in most static music.
OTOH it could be very useful if you were composing the middle section
of a work in LP and needed to prevent a later section from jumping up
and down an octave each time you changed anything.

>\version "2.19.35"
>\include "changePitch.ly"
>rhythmPattern = {a16 \tuplet 3/2 {a8 a a} a16 a8 a4 a4} % a complex rhythm
>scoreViolinI = \relative c'
>{
>  \setOctave c' %this command is just an example and it does not exist!
>  \changePitch \rhythmPattern {c d d d c b d e}
>  f g a b
>  c d e f
>  \setOctave c'  
>  \changePitch \rhythmPattern {c d d d c b d e}
>}
>scoreViolinII = \relative c'
>{
>  \setOctave c' 
>  \changePitch \rhythmPattern {a b b b a b a a}
>  f f a a  
>  c c f f
>  \setOctave c' 
>  \relative c' \changePitch \rhythmPattern {a b b b a b a a}
>}
>\score
>{
>  <<
>    \new Staff \scoreViolinI
>    \new Staff \scoreViolinII
>  >>
>  \layout { }
>}

Cheers,
David.
\version "2.18.2"
\include "changePitch.ly"
rhythmPattern = { a16 \tuplet 3/2 { a8 a a } a16 a8 a4 a4 } % a complex rhythm
scoreViolinI = \relative {
  \changePitch \rhythmPattern { c' d d d c b d e }
  f g a b
  c d e f
  \changePitch \rhythmPattern { c, d d d c b d e }
}
scoreViolinII = \relative {
  \changePitch \rhythmPattern { a b b b a b a a }
  f f a a
  c c f f
  \changePitch \rhythmPattern { a b b b a b a a }
}
\score {
  <<
\new Staff \scoreViolinI
\new Staff \scoreViolinII
  >>
  \layout { }
}


cp.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: music patterns and octave

2016-03-09 Thread Patrick Karl

> Message: 1
> Date: Wed, 9 Mar 2016 01:07:47 +0100
> From: Gianmaria Lari 
> To: lilypond-user 
> Subject: Re: music patterns and octave
> 
> 
> Then please have a look to the code I *would* like to write to obtain it.
> Do you know if does exist anything similar to "\setOctave"? Do you see any
> logical mistake in trying to write it in this way? Sorry if the example is
> not very simple, but I have not been able to make it better.

I tried this example with the changePitch.ly you cited in a different message 
in this thread, but got a parse error.  But I think you will find that 
\resetRelativeOctave does what you seem to be looking for with your 
hypothetical \setOctave command.  Note that you don’t need the first 
\resetRelativeOctave (or \setOctave) command in each of the relative blocks in 
your example, because the \relative command itself does that.

resetRelativeOctave has been around since at least LilyPond 2.16.2.  It is 
documented with a one-line description in Appendix A (Music Functions) of the 
NR.  I wonder if anyone else uses it.  The Lilypond-user archive contains some 
dozen references to it.  

HTH
Pat

> 
> \version "2.19.35"
> \include "changePitch.ly"
> 
> rhythmPattern = {a16 \tuplet 3/2 {a8 a a} a16 a8 a4 a4} % a complex rhythm
> 
> scoreViolinI = \relative c'
> {
>  \setOctave c' %this command is just an example and it does not exist!
>  \changePitch \rhythmPattern {c d d d c b d e}
>  f g a b
>  c d e f
>  \setOctave c'
>  \changePitch \rhythmPattern {c d d d c b d e}
> }
> 
> scoreViolinII = \relative c'
> {
>  \setOctave c'
>  \changePitch \rhythmPattern {a b b b a b a a}
>  f f a a
>  c c f f
>  \setOctave c'
>  \relative c' \changePitch \rhythmPattern {a b b b a b a a}
> }
> 
> \score
> {
>  <<
>\new Staff \scoreViolinI
>\new Staff \scoreViolinII
>>> 
>  \layout { }
> }
> 


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


Re: music patterns and octave

2016-03-09 Thread David Wright
On Wed 09 Mar 2016 at 07:56:21 (-0600), Patrick Karl wrote:
> 
> > Message: 1
> > Date: Wed, 9 Mar 2016 01:07:47 +0100
> > From: Gianmaria Lari 
> > To: lilypond-user 
> > Subject: Re: music patterns and octave
> > 
> > 
> > Then please have a look to the code I *would* like to write to obtain it.
> > Do you know if does exist anything similar to "\setOctave"? Do you see any
> > logical mistake in trying to write it in this way? Sorry if the example is
> > not very simple, but I have not been able to make it better.
> 
> I tried this example with the changePitch.ly you cited in a different message 
> in this thread, but got a parse error.  But I think you will find that 
> \resetRelativeOctave does what you seem to be looking for with your 
> hypothetical \setOctave command.  Note that you don’t need the first 
> \resetRelativeOctave (or \setOctave) command in each of the relative blocks 
> in your example, because the \relative command itself does that.

Same here, so I looked at its source and it said
%% changePitch.ly version Y/M/D = 2016/01/01
%% for lilypond 2.16 or higher
so I ran it with 2.18.2 instead. There's nothing here that's
beyond its capabilities.

I see this problem as having two orthogonal axes: 1) a
misunderstanding of changePitch.ly in the first posting,
which Gianmaria seems to have fixed (meaning we can
ignore Blöchl Bernhard's two postings), and 2) a
desire to keep adjusting the octavation.

I could kind of understand 2 if you had, say, a riff that
kept recurring exactly at the same pitch, with variable
interludes following each one. This would mean you wouldn't
have to care where each interlude strayed before the next riff.
But the Capture.PNG didn't show that.

So my guess (only a guess) is that the OP is still struggling
with how \relative { } works. How else does one explain

\relative c'
   {
 \setOctave c' ...

and

\relative c'
   {
   ...
 \setOctave c'
 \relative c' \changePitch \rhythmPattern { ...

I'm not even sure of how LP interprets that last \relative.

> resetRelativeOctave has been around since at least LilyPond 2.16.2.  It is 
> documented with a one-line description in Appendix A (Music Functions) of the 
> NR.  I wonder if anyone else uses it.  The Lilypond-user archive contains 
> some dozen references to it.  

Cheers,
David.

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


Re: Wide spacing after extremely long syllable

2016-03-09 Thread Simon Albrecht

On 09.03.2016 03:14, markdblackwell wrote:

After an extremely long syllable in the lyrics, the next measure's spacing is
quite wide, even with ragged-right.

In the tiny example below, the problematic measure (of two eighth notes)
comprises the word, "shine".


First thing I think of would be a completely different route – don’t 
know if it fits into your entire framework:


\version "2.19.37"
\paper {
  left-margin = 5\mm
  right-margin = 5\mm
  ragged-right = ##t
}
\layout {
  \context {
\Staff
\remove "Time_signature_engraver"
  }
}
theLyrics = \lyricmode {
  Rest4 e -- ter -- nal grant un -- to them, O Lord,
  and let light per -- pe -- tu -- al
  \once \override LyricText.self-alignment-X = #LEFT
  shine on
}
notes = \relative c'' {
  \cadenzaOn
  a1*17/4
  \bar "|"
  a8[( c]) \break
  \bar "|"
  a4
}
\score {
  <<
\new Staff
\new Voice = "one" \notes
\new Lyrics \theLyrics
  >>
}

HTH,
Simon

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


Re: Wide spacing after extremely long syllable

2016-03-09 Thread Pierre Perol-Schneider
Nice Simon !

2016-03-09 15:46 GMT+01:00 Simon Albrecht :

> On 09.03.2016 03:14, markdblackwell wrote:
>
>> After an extremely long syllable in the lyrics, the next measure's
>> spacing is
>> quite wide, even with ragged-right.
>>
>> In the tiny example below, the problematic measure (of two eighth notes)
>> comprises the word, "shine".
>>
>
> First thing I think of would be a completely different route – don’t know
> if it fits into your entire framework:
>
> \version "2.19.37"
> \paper {
>   left-margin = 5\mm
>   right-margin = 5\mm
>   ragged-right = ##t
> }
> \layout {
>   \context {
> \Staff
> \remove "Time_signature_engraver"
>   }
> }
> theLyrics = \lyricmode {
>   Rest4 e -- ter -- nal grant un -- to them, O Lord,
>   and let light per -- pe -- tu -- al
>   \once \override LyricText.self-alignment-X = #LEFT
>   shine on
> }
> notes = \relative c'' {
>   \cadenzaOn
>   a1*17/4
>   \bar "|"
>   a8[( c]) \break
>   \bar "|"
>   a4
> }
> \score {
>   <<
> \new Staff
> \new Voice = "one" \notes
> \new Lyrics \theLyrics
>   >>
> }
>
> HTH,
> 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: music patterns and octave

2016-03-09 Thread Gianmaria Lari
Thank you David for your help. I think the behaviour of "\relative" and
"\resetRelativeOctave" are clear. If the latter is not deprecated IMHO
there are cases where it can be very useful. That one you mention
(preventing up
and down octave when changing code) it is just one. For instance, suppose I
start to write a score and I write this musical phrase:

c4 d8 e8 f4


Later I want to use this phrase again, so I copy and paste so that I have
something like this:

c4 d8 e8 f4
%some notes here
%some notes here
c4 d8 e8 f4  % the octave here depends on the last previous note


As I written in the remark, the octave at the end depends on the last
previous note. You could need to change c4 for example in c'4 to obtain the
same behavior as the first phrase. Suppose you do change it, so that you
obtain:

c4 d8 e8 f4
%some notes here
%some notes here
*c'4* d8 e8 f4  % the octave here depends on the last previous note

now the the phrase at the beginning and at then end stops to match and
became differents. This prevent you from easily create a variable and write
the code in the following (nice) way:

fragment = {c4 d8 e8 f4}

{

\fragment
%some notes here
%some notes here

\fragment
}


On the other hand if you write the the beginning of your musical phrases
always prefixing them with \resetRelativeOctave c' like this:


\resetRelativeOctave c' c4 d8 e8 f4

%some notes here

%some notes here

\resetRelativeOctave c' c4 d8 e8 f4


you don't need to worry in case of copy and paste. (And by the way the fact
you see \resetRelativeOctave make you remind you need to think about the
octave.)

In this latter case if you decide to create a variable to reuse your code
you can do three different things:

1) fragment = {c4 d8 e8 f4}

2) fragment = {\resetRelativeOctave  c' c4 d8 e8 f4}

3) fragment = \relative c' {c4 d8 e8 f4}


The first is useful when you need to be able to do not fix the octave. The
following is an example:

fragment = {c4 d8 e8 f4}

{
\resetRelativeOctave c' \fragment
%some notes here
%some notes here
\resetRelativeOctave c, \fragment
}

The second and the third are useful when the fragment in your score occurs
always at the same octave. But the former makes the notes following the
fragment be at the same octave of the (last note) of the fragment while the
latter makes the note following the fragment be at the same octave of the
(last note) preceding the segment.

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


Re: music patterns and octave

2016-03-09 Thread Gianmaria Lari
Ciao Patric,

to use "changePitch.ly" with Lilypond 2.19 you need to convert it. In case
you need you can check at the end of this old thread:

http://lilypond.1069038.n5.nabble.com/changepitch-compilation-error-td187658.html

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


Re: music patterns and octave

2016-03-09 Thread David Kastrup
Gianmaria Lari  writes:

> Thank you David for your help. I think the behaviour of "\relative" and
> "\resetRelativeOctave" are clear. If the latter is not deprecated IMHO
> there are cases where it can be very useful. That one you mention
> (preventing up
> and down octave when changing code) it is just one. For instance, suppose I
> start to write a score and I write this musical phrase:

[...]

> As I written in the remark, the octave at the end depends on the last
> previous note. You could need to change c4 for example in c'4 to obtain the
> same behavior as the first phrase. Suppose you do change it, so that you
> obtain:
>
> c4 d8 e8 f4
> %some notes here
> %some notes here
> *c'4* d8 e8 f4  % the octave here depends on the last previous note
>
> now the the phrase at the beginning and at then end stops to match and
> became differents. This prevent you from easily create a variable and write
> the code in the following (nice) way:
>
> fragment = {c4 d8 e8 f4}

Then write it as

fragment = \relative c' {c4 d8 e8 f4}

and it becomes absolute.  If you want to quote it in a different octave,
you can write

\transpose c c' \fragment

but either way it will just keep its own pitches without interacting
with surrounding phrases.

> In this latter case if you decide to create a variable to reuse your code
> you can do three different things:
>
> 1) fragment = {c4 d8 e8 f4}
>
> 2) fragment = {\resetRelativeOctave  c' c4 d8 e8 f4}
>
> 3) fragment = \relative c' {c4 d8 e8 f4}
>
>
> The first is useful when you need to be able to do not fix the octave. The
> following is an example:
>
> fragment = {c4 d8 e8 f4}
>
> {
> \resetRelativeOctave c' \fragment
> %some notes here
> %some notes here
> \resetRelativeOctave c, \fragment
> }

More cumbersome than

fragment = \relative {c'4 d8 e8 f4}

{
\fragment
%some notes here
%some notes here
\transpose c' c, \fragment
}

And additionally, that way \fragment does not tamper with the relative
octaves of its surroundings.

-- 
David Kastrup

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


Re: music patterns and octave

2016-03-09 Thread Gianmaria Lari
I'm sorry I have not been clear in my old messages, hope my last one it is
clearer.

Regarding:

\relative c'
>{
>...
>  \setOctave c'
>  \relative c' \changePitch \rhythmPattern { ...
>
> I'm not even sure of how LP interprets that last \relative.
>
>
Last "relative" applies only to the whole musical *expression *generated by
"changePitch". You can see it clearly here:

\version "2.19.35"
\include "changePitch.ly"

pattern =
{
   r2 a16 a8 a8 a16
}

\relative c'''
{
  a4 c e g
  \relative c' \changePitch \pattern {a b c d}
  a4 c e g
}

I attached the output.
Ciao, g.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


RE:I'm not smart enough to figure out the math for this.

2016-03-09 Thread Stephen MacNeil
\relative c' {

\time 4/3

\cadenzaOn

c4 c c \bar "|"

c c c \bar "|"

}


HTH

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


fill last measure with rests?

2016-03-09 Thread Jim Tisdall
Does there exist a directive that will automatically fill
the last measure of a voice with rests?

If not, any pointers for programming such would be welcome.

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


Piano_Tab notation; how to disable clef and key engraver?

2016-03-09 Thread Philip Bergwerf
Hello everyone,

i am busy with trying to find a way to make various alternative notations in
lilypond. For now the Piano_Tab Notation. I found some useful information at
musicnotation.org/ and right know i made this: 
_
%Piano_Tab template
\header {
  title = "Piano_Tab chromatic scale"
}

upper =\relative c'' {
  \clef treble
  c, cis d dis e f fis g gis a ais b c1
  \bar"|."
}

\score {
  \new PianoStaff \with {
\remove "Accidental_engraver"
\remove "Key_engraver"
staffLineLayoutFunction = #ly:pitch-semitones
middleCPosition = #-6
clefGlyph = #"clefs.G"
clefPosition = #(+ -6 7)
}
{
 \override Staff.StaffSymbol #'line-positions = #'(21 19 16 14 12 9 7 4
2 0 -2.8 -3 -3.2 -4.8 -5 -5.2 -8
-10 -12 -15 -17 -20 -22
-24 -27 -29)
 \time 4/4 << \upper >>
}
}

Well if you paste this in Frescobaldi you see a Piano_Tab chromatic scale.
Piano_Tab is a chromatic Klavar like notation method. Because there are 12
note positions each octave we don't need accidentals. Also the traditional
Clef is displayed in an other way in this notation. The central "c sharp"
and "d sharp" lines are thicker. My question is: how can i make the
accidentals and clefs disappear? I typed "\remove "Accidental_engraver"" and
"\remove "Clef_engraver" in this .ly". Why does this not work? Where do i
have to place these commands to remove the clef and accidental engravers?

Regards Philip Bergwerf



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Piano-Tab-notation-how-to-disable-clef-and-key-engraver-tp188358.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: Piano_Tab notation; how to disable clef and key engraver?

2016-03-09 Thread Pierre Perol-Schneider
Hi Philip,

Try :

\layout {
  \context {
\Staff
 \remove "Accidental_engraver"
 \remove "Key_engraver"
 \remove "Clef_engraver"
  }
}

Cheers,
Pierre

2016-03-09 18:55 GMT+01:00 Philip Bergwerf :

> Hello everyone,
>
> i am busy with trying to find a way to make various alternative notations
> in
> lilypond. For now the Piano_Tab Notation. I found some useful information
> at
> musicnotation.org/ and right know i made this:
> _
> %Piano_Tab template
> \header {
>   title = "Piano_Tab chromatic scale"
> }
>
> upper =\relative c'' {
>   \clef treble
>   c, cis d dis e f fis g gis a ais b c1
>   \bar"|."
> }
>
> \score {
>   \new PianoStaff \with {
> \remove "Accidental_engraver"
> \remove "Key_engraver"
> staffLineLayoutFunction = #ly:pitch-semitones
> middleCPosition = #-6
> clefGlyph = #"clefs.G"
> clefPosition = #(+ -6 7)
> }
> {
>  \override Staff.StaffSymbol #'line-positions = #'(21 19 16 14 12 9 7 4
> 2 0 -2.8 -3 -3.2 -4.8 -5 -5.2 -8
> -10 -12 -15 -17 -20 -22
> -24 -27 -29)
>  \time 4/4 << \upper >>
> }
> }
> 
> Well if you paste this in Frescobaldi you see a Piano_Tab chromatic scale.
> Piano_Tab is a chromatic Klavar like notation method. Because there are 12
> note positions each octave we don't need accidentals. Also the traditional
> Clef is displayed in an other way in this notation. The central "c sharp"
> and "d sharp" lines are thicker. My question is: how can i make the
> accidentals and clefs disappear? I typed "\remove "Accidental_engraver""
> and
> "\remove "Clef_engraver" in this .ly". Why does this not work? Where do i
> have to place these commands to remove the clef and accidental engravers?
>
> Regards Philip Bergwerf
>
>
>
> --
> View this message in context:
> http://lilypond.1069038.n5.nabble.com/Piano-Tab-notation-how-to-disable-clef-and-key-engraver-tp188358.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


Piano_Tab notation; how to disable clef and key engraver?

2016-03-09 Thread Stephen MacNeil
\omit Accidental

\omit Clef


HTH

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


Re: Piano_Tab notation; how to disable clef and key engraver?

2016-03-09 Thread Philip Bergwerf
Problem solved! thank you

Cheers, Philip



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Piano-Tab-notation-how-to-disable-clef-and-key-engraver-tp188358p188361.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: reduce the beam width

2016-03-09 Thread Noeck
Hi Federico,

> I mean the width of the beam. 

The beam is as wide as the notes (stems) are separated, so you want to
reduce the distance between note heads. Perhaps that seems nitpicking
but it makes clear that you want to change spacings or extents of
noteheads etc. and no beam property.

I have no better solution than you found yourself. Perhaps this is a bit
nicer as the glissando still points to the place where the a is located
on the staff:

 \once \override NoteHead.stencil = #point-stencil
 \once \override TabNoteHead.stencil = #point-stencil

With these lines, the stencil is not ##f (false) as it is by using
\omit, but there is a still a note head without a size.

Cheers,
Joram

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


OT: Help needed to package cross-platform python application

2016-03-09 Thread Abraham Lee
All,

I have developed a couple of python PDF utilities that make certain batch
processing operations a little easier. I'd like to make some binary files
of the utilities so that users can just download and use them without
needing to worry about setting up a python installation on their machines,
but I don't have access to a Mac, just Linux and Windows. Any
thoughts/recommendations are welcome.

Thanks!
- Abraham

P.S. I guess a side question comes to mind: is there a way that I can
create these cross-platform binaries remotely somehow? I'll gladly try that
route if such a thing exists.
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: I'm not smart enough to figure out the math for this.

2016-03-09 Thread David Kastrup
Simon Albrecht  writes:

> On 08.03.2016 22:06, Michael Rivers wrote:
>> Thanks for the solutions. I'm OK with an error message!
>
> Or you can insert
>
> #(ly:expect-warning "strange")
>
> in your source.

Here is a warning-less version:

\version "2.19.28"

show =
#(define-music-function (mup item) (markup? symbol-list-or-music?)
  (propertyTweak 'stencil
   (lambda (grob)
(grob-interpret-markup grob mup))
   item))

\relative c' \new Staff {
  \show \markup \compound-meter #'(4 . 3)
  \time 3/4
  c4 c c | c c c
}

Maybe we should have \show (possibly with a different name) as a nice
supplement to \omit/\hide.

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


Re: music patterns and octave

2016-03-09 Thread David Wright
On Wed 09 Mar 2016 at 17:57:25 (+0100), Gianmaria Lari wrote:

>Last "relative" applies only to the whole musical expression generated by
>"changePitch". You can see it clearly here:
>\version "2.19.35"
>\include "changePitch.ly"
>pattern = 
>{
>   r2 a16 a8 a8 a16
>}
>\relative c''' 
>{
>  a4 c e g  
>  \relative c' \changePitch \pattern {a b c d}
>  a4 c e g  
>}

Hmm. Not nice, in my eyes. I prefer to set my notes (set as in jelly)
early rather than late. The example attached is somewhat artificial
but it illustrates the difference. To run it, you need the scheme code
from page 12 of the Notation Manual (2.19.36), also attached.

Page 14 of the Learning Manual says:
"Accidentals are totally ignored in the calculation of relative position."
Setting the notes early makes the result less surprising in this case,
thereby following the Principle of Least Astonishment/Surprise.

Cheers,
David.
\version "2.19.36" \paper { #(set-paper-size "a6") }
\include "scheme-code-from-page-12-of-the-NM"

{ c' geses }

{ \relative { c' geses } }

{ \naturalizeMusic \relative { c' geses } }

{ \relative \naturalizeMusic { c' geses } }

{ \relative c' { c geses } }

{ \naturalizeMusic \relative c' { c geses } }

{ \relative c' \naturalizeMusic { c geses } }


relative.pdf
Description: Adobe PDF document
#(define (naturalize-pitch p)
   (let ((o (ly:pitch-octave p))
 (a (* 4 (ly:pitch-alteration p)))
 ;; alteration, a, in quarter tone steps,
 ;; for historical reasons
 (n (ly:pitch-notename p)))
 (cond
  ((and (> a 1) (or (eq? n 6) (eq? n 2)))
   (set! a (- a 2))
   (set! n (+ n 1)))
  ((and (< a -1) (or (eq? n 0) (eq? n 3)))
   (set! a (+ a 2))
   (set! n (- n 1
 (cond
  ((> a 2) (set! a (- a 4)) (set! n (+ n 1)))
  ((< a -2) (set! a (+ a 4)) (set! n (- n 1
 (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7
 (if (> n 6) (begin (set! o (+ o 1)) (set! n (- n 7
 (ly:make-pitch o n (/ a 4

#(define (naturalize music)
   (let ((es (ly:music-property music 'elements))
 (e (ly:music-property music 'element))
 (p (ly:music-property music 'pitch)))
 (if (pair? es)
 (ly:music-set-property!
  music 'elements
  (map (lambda (x) (naturalize x)) es)))
 (if (ly:music? e)
 (ly:music-set-property!
  music 'element
  (naturalize e)))
 (if (ly:pitch? p)
 (begin
   (set! p (naturalize-pitch p))
   (ly:music-set-property! music 'pitch p)))
 music))

naturalizeMusic =
#(define-music-function (m)
   (ly:music?)
   (naturalize m))
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Alternative notation and lilypond

2016-03-09 Thread Philip

Hello everyone,

i am busy with trying to find a way to make various alternative 
notations in lilypond. I found some usefull information at 
musicnotation.org/. Well and right know made this:

_
%Piano_Tab template
\header {
 title = "Piano_Tab chromatic scale"
}

upper =\relative c'' {
 \clef treble
 c, cis d dis e f fis g gis a ais b c1
 \bar"|."
}

\score {
 \new PianoStaff \with {
   \remove "Accidental_engraver"
   \remove "Key_engraver"
   staffLineLayoutFunction = #ly:pitch-semitones
   middleCPosition = #-6
   clefGlyph = #"clefs.G"
   clefPosition = #(+ -6 7)
   }
   {
\override Staff.StaffSymbol #'line-positions = #'(21 19 16 14 12 9 
7 4 2 0 -2.8 -3 -3.2 -4.8 -5 -5.2 -8
   -10 -12 -15 -17 -20 
-22 -24 -27 -29)

\time 4/4 << \upper >>
   }
}

Well if you paste this in Frescobaldi you see a Piano_Tab chromatic 
scale. Piano_Tab is a chromatic Klavar like notation method. Because 
there are 12 note position each actave we don't need accidentals.


Also the traditional Clef is displayed in an other way in this method. 
The central "c sharp" and "d sharp" line thicknes is thicker. My 
question is: how can i make the accidentalls disapear? I typed "\remove 
"Accidental_engraver"" and "\remove "Clef_engraver"". Why does this not 
work? Where do i have to place these commands?


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


Re: Alternative notation and lilypond

2016-03-09 Thread Jan-Peter Voigt

Hello Philip,

the engravers are consisted in different contexts. You can remove them 
in a layout block in the Staff context (not PianoStaff).


HTH
Jan-Peter


\version "2.19.38"

%Piano_Tab template
\header {
  title = "Piano_Tab chromatic scale"
}

; remove unnecessary engravers from Staff
\layout {
  \context {
\Staff
\remove "Accidental_engraver"
\remove "Key_engraver"
\remove "Clef_engraver"
  }
}

upper =\relative c'' {
  \clef treble
  c, cis d dis e f fis g gis a ais b c1
  \bar"|."
}

\score {
  \new PianoStaff \with {
staffLineLayoutFunction = #ly:pitch-semitones
middleCPosition = #-6
clefGlyph = #"clefs.G"
clefPosition = #(+ -6 7)
  }
  {
\override Staff.StaffSymbol #'line-positions = #'(21 19 16 14 12 9 
7 4 2 0 -2.8 -3 -3.2 -4.8 -5 -5.2 -8
   -10 -12 -15 -17 
-20 -22 -24 -27 -29)

\time 4/4 << \upper >>
  }
}


Am 09.03.2016 um 17:11 schrieb Philip:

Hello everyone,

i am busy with trying to find a way to make various alternative
notations in lilypond. I found some usefull information at
musicnotation.org/. Well and right know made this:
_
%Piano_Tab template
\header {
   title = "Piano_Tab chromatic scale"
}

upper =\relative c'' {
   \clef treble
   c, cis d dis e f fis g gis a ais b c1
   \bar"|."
}

\score {
   \new PianoStaff \with {
 \remove "Accidental_engraver"
 \remove "Key_engraver"
 staffLineLayoutFunction = #ly:pitch-semitones
 middleCPosition = #-6
 clefGlyph = #"clefs.G"
 clefPosition = #(+ -6 7)
 }
 {
  \override Staff.StaffSymbol #'line-positions = #'(21 19 16 14 12 9
7 4 2 0 -2.8 -3 -3.2 -4.8 -5 -5.2 -8
 -10 -12 -15 -17 -20
-22 -24 -27 -29)
  \time 4/4 << \upper >>
 }
}

Well if you paste this in Frescobaldi you see a Piano_Tab chromatic
scale. Piano_Tab is a chromatic Klavar like notation method. Because
there are 12 note position each actave we don't need accidentals.

Also the traditional Clef is displayed in an other way in this method.
The central "c sharp" and "d sharp" line thicknes is thicker. My
question is: how can i make the accidentalls disapear? I typed "\remove
"Accidental_engraver"" and "\remove "Clef_engraver"". Why does this not
work? Where do i have to place these commands?

Regards Philip Bergwerf


___
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