lilypond-user
[Top][All Lists]
Advanced

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

nested \relative ?


From: Darren Ng
Subject: nested \relative ?
Date: Fri, 10 Feb 2023 18:46:55 +0800

I want to achieve the following:
(1) $a is respects $x as its "startpitch"
(2) $b is respects $x as its "startpitch"
(3) removing A has no effect on B

  \relative $x {
    %{A%} { $a ... }
    %{B%} { $b ... }
  }

In the example above: (1)=ok (2)=fail (3)=fail

  \relative $x {
    %{A%} \relative { $a ... }
    %{B%} \relative { $b ... }
  }

In the example above: (1)=fail (2)=fail (3)=ok

Idea #1:

  \relative $x {
    %{A%} { \backupCurrentRelativeOctave $a ... \restoreCurrentRelativeOctave }
    %{B%} { $b ... }
  }

Idea #2:

  \relative $x {
    %{A%} {
      c d e f g a b c d e f g a b c d e f g a b c
      % we are aware that the current relative octave has raised by 3
      % drop it back manually
      \ghostNoteWhichDoesNotActuallyAppear { c,,, }
    }
    %{B%} { $b ... }
  }

How to properly make B respect $x instead of the last note in A ?



reply via email to

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