lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What is the problem with "\relative"? (Was: Do we really offer the f


From: Stephen MacNeil
Subject: Re: What is the problem with "\relative"? (Was: Do we really offer the future?)
Date: Sun, 26 Apr 2015 09:40:54 -0400

it looks like you shortened \transpose not \relative but i like it "I may use it" thanks


Stephen


octave =

#(define-music-function

(parser location octaves music)

(integer? ly:music?)

(_i "Raise or lower @var{music} by a nubmer of @var{octaves}.")

(make-music 'TransposedMusic

'element (ly:music-transpose music (ly:make-pitch octaves 0 0))))


%{\relative c'' {

\new PianoStaff <<

\new Staff { \time 2/4 c4 e | g g, | }

\new Staff { \clef "bass" c,,4 c' | e c | } >> }


%where it could have


\new PianoStaff <<

\new Staff \octave 2 { \time 2/4 c4 e | g g, | }

\new Staff \octave 1 { \clef "bass" c,4 c | e c | } >>

%}


%%%%%%%%%%%%%%

%%%%%%%%%%%%%% as transpose

\new PianoStaff <<

\new Staff \transpose c c''{ \time 2/4 c4^"as transpose" e | g g, | }

\new Staff \transpose c c' { \clef "bass" c,4 c | e c | } >>


%%%%%%%%%%%%%% \relative extended

top = \relative c'' {\time 2/4 c4^"\relative extended" e | g g, | c4 e | g g, | }

bottom = \relative c {c,4 c' | e c | c,4 c' | e c | }

\new PianoStaff

<<

\new Staff {\top}

\new Staff {\clef "bass"\transpose c c'\bottom}

>>


%%%%%%%%%% absolute vesion

top = {\time 2/4 c4^"absolute vesion" e | g g, | c4 e | g g, |}

bottom = {\clef "bass" c,4 c | e c | c,4 c | e c |}

\new PianoStaff

<<

\new Staff {\transpose c c''\top}

\new Staff {\clef "bass"\transpose c c'\bottom}

>>


%%%%%%%%%%%%%% \relative doesn't realy work for relative

top = \octave 2 {\time 2/4 c4^"doesn't realy work for octave as relative" e | g g, | c4 e | g g, | }

bottom = \octave 1 {c,4 c' | e c | c,4 c' | e c | }

\new PianoStaff

<<

\new Staff {\top}

\new Staff {\clef "bass" \bottom}

>>


%%%%%%%%%%%%%%%%% \relative -- for \transpose it does in \relative and absolute

top = \relative c {\time 2/4 c4^"\relative -- for transpose it works" e | g g, | c4 e | g g, |}

bottom = \relative c {c,4 c' | e c | c,4 c' | e c | }

\new PianoStaff

<<

\new Staff {\octave 2 \top}

\new Staff {\clef "bass"\octave 1 \bottom}

>>


%%%%%%%%%% absolute as \transpose

top = {\time 2/4 c4^"absolute version - works" e | g g, | c4 e | g g, |}

bottom = {\clef "bass" c,4 c | e c | c,4 c | e c |}

\new PianoStaff

<<

\new Staff {\octave 2 \top}

\new Staff {\clef "bass" \octave 1 \bottom}

>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]