[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: music patterns and octave
From: |
Patrick Karl |
Subject: |
Re: music patterns and octave |
Date: |
Wed, 09 Mar 2016 07:56:21 -0600 |
> Message: 1
> Date: Wed, 9 Mar 2016 01:07:47 +0100
> From: Gianmaria Lari <address@hidden>
> To: lilypond-user <address@hidden>
> 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 { }
> }
>
- Re: music patterns and octave, (continued)
Re: music patterns and octave, Thomas Morley, 2016/03/08
Re: music patterns and octave, Patrick Karl, 2016/03/08
Re: music patterns and octave,
Patrick Karl <=
Re: music patterns and octave, Gianmaria Lari, 2016/03/09