> Message: 1
> Date: Wed, 9 Mar 2016 01:07:47 +0100
> From: Gianmaria Lari <[email protected]>
> To: lilypond-user <[email protected]>
> 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
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user