lilypond-devel
[Top][All Lists]
Advanced

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

Removing 2sd intervals


From: nycgdf
Subject: Removing 2sd intervals
Date: Tue, 25 Apr 2017 12:13:25 -0700 (MST)

Hi everyone,

I would like to write a function (potentially a music-function) that does
the following task:
For every set of notes that are played in the same time, if they are
separated by less than 3 semitones, modal transpose the lower note at a
given scale to one step lower.

Input:
musica = { a4 b4 c'4 d'4 }
musicb = { d'4 c'4 b4 a4 }

both = {
<<
\musica
\musicb
>>
}

output:
<<
{ a4 a4 c'4 d'4 }
{ d'4 c'4 a4 a4 }
>>

I struggle to find a way to iterate on the note of a music:
Ideally, I am looking for a 'for-each' function that I could call on 'both'
that would iterate on the list:
(list #{ << a4 d'4 >> << b4 c'4 >> << c'4 b4 >> << d'4 a4 >> #})

and then I would use ly:pitch-semitones to calculate the difference and do
the transpose.

Thank you for your help






--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Removing-2sd-intervals-tp202646.html
Sent from the Dev mailing list archive at Nabble.com.



reply via email to

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