lilypond-user
[Top][All Lists]
Advanced

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

Untransposable music [was Re: Reverting to atonal or open key]


From: Jim Long
Subject: Untransposable music [was Re: Reverting to atonal or open key]
Date: Sun, 1 Sep 2013 12:55:40 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Aug 31, 2013 at 11:05:39PM +0200, David Kastrup wrote:
> 
> Well, you could do something like
> 
> \withMusicProperty #'untransposable ##t \key c\major
> 
> It's not terribly fabulous, but possibly will do the trick.

Oh, but it IS terribly fabulous!  This is what I was looking for
last May when I wrote:

On Sun, May 12, 2013 at 02:10:59PM -0700, Jim Long wrote:
> 
> \version "2.16.2"
> 
> stemOff = { \override Staff.Stem #'transparent = ##t }
> stemOn  = { \revert Staff.Stem #'transparent }
> 
> \score {
>   \new Staff {
>     \relative f' { f4 g a c }
>     \improvisationOn  \stemOff
>     b'4 b' b' b'
>     \improvisationOff \stemOn
>     \relative f' { g4 a b d }
>   }
> }
> 
> Is there either a way to wrap that second measure to
> protect it from being transposed, or a better way altogether?

So the correct answer to my question back then is,

Put the music you wish to be unaffected by \transpose inside a
block of:

\withMusicProperty #'untransposable ##t { ... }

Such as:

\version "2.16.2"

stemOff = { \override Staff.Stem #'transparent = ##t }
stemOn  = { \revert Staff.Stem #'transparent }

\score {
  \new Staff {
    \relative f' { f4 g a c }
    \withMusicProperty #'untransposable ##t {
      \improvisationOn  \stemOff
      b'4 b' b' b'
      \improvisationOff \stemOn
    }
    \relative f' { g4 a b d }
  }
}

\score {
  \transpose ees c'
  \new Staff {
    \relative f' { f4 g a c }
    \withMusicProperty #'untransposable ##t {
      \improvisationOn  \stemOff
      b'4 b' b' b'
      \improvisationOff \stemOn
    }
    \relative f' { g4 a b d }
  }
}





reply via email to

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