lilypond-user
[Top][All Lists]
Advanced

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

Automatically transforming a FiguredBass line into a sequence of chords


From: Michael Gerdau
Subject: Automatically transforming a FiguredBass line into a sequence of chords ?
Date: Mon, 23 Nov 2015 23:56:35 +0100
User-agent: KMail/4.14.10 (Linux/4.2.5-1-ARCH; KDE/4.14.14; x86_64; ; )

Hi list,

does someone know of a function or snipped that automatically transforms
some music together with a FigruedBass line into a sequence of chords
like illustrated in the example below ?

%%%%%%%%%%%%%%%
\version "2.19.31"

bcMusic = \relative {
  c2 c | c c | c c | c c |
}

bcFigures = \figuremode {
  \override Staff.BassFigureAlignmentPositioning #'direction = #DOWN
  \bassFigureExtendersOn
  \set figuredBassPlusDirection = #RIGHT
  \set figuredBassAlterationDirection = #RIGHT
  <5 3>2 <5 3> | <6 5+ 2>4 <6 4! 2> <6 4! 2>2 | <6\! 5> <6 5> |
  <9 4>4 <8 3>4 <8 3>2
}

\markup { "Is there a function that transforms this FiguredBass line..." }
<<
  \new Staff {
    \clef bass \bcMusic
  }
  \new FiguredBass \bcFigures
>>

result = \relative {
  <c e g>2 <c e g> | <d gis a>4 <d f a> <d f a>2 |
  <c g' a> <c g' a> | <c f d'>4 <c e c'> <c e c'>2 |
}

\markup { "...automatically into this sequence of chords ?" }
\new Staff { \clef bass \result }

\markup { "(hoping I got it right manually :)" }

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

Kind regards,
Michael
-- 
 Michael Gerdau       email: address@hidden
 GPG-keys available on request or at public keyserver

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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