lilypond-user
[Top][All Lists]
Advanced

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

modaltranspose & scheme function


From: Gianmaria Lari
Subject: modaltranspose & scheme function
Date: Thu, 19 Mar 2020 12:20:34 +0100

Long time ago with the help of the people in this forum I have been able to write (to collect) this simple code

\version "2.19.82"
\include "changePitch.ly"

multiModal =
#(define-music-function (scale patternRhytmic patternMelodic) (ly:music? ly:music? ly:music?)
   #{
     #@(map(lambda (p)
     #{ \changePitch $patternRhytmic \modalTranspose c #(ly:make-pitch -1 p) $scale $patternMelodic #})
     (iota 8))
   #})

scalex = \fixed c' {c d e f g a b}
{ \multiModal \scalex {4 8 8} {c' d' e'} }

generating this:

c4 d8 e
d4 e8 f
e4 f8 g
etc.

I would like to modify it so that the generated output would be:

c4 d8 e
b'4 c8 d
a'4 b'8 c
etc.

Any help?
Thank you, g.

Attachment: Annotation 2020-03-19 121413.jpg
Description: JPEG image


reply via email to

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