Auto-Harmonizing Chinese Folk Song with Piano Accompaniment
FENG Yin(冯 寅)
*
, ZHONG Sheng-sheng(钟声声), CHEN Kui (陈 魁)
Inst itut e of Ar tif ic ial Int el lig ence , Dep art ment of Cogni t iv e S ci ence , X iame n Uni v ersi t y , X iamen 361005 , Chi na
Abstract: This paper approaches melody harmonization with piano
accompaniment as a machine learning task, in a probabilistic
framework. An existing sample score set of Chinese folk song with
piano accompaniment is used to build a model of piano
accompaniment process. The model can then be used to harmonize new
melody with piano accompaniment.
Key words : auto-harmoni zat ion ; computer music; algorit hm ic
com position ; int el ligen ce syst em
CLC number: T P18 Document code: A
Article ID: 1672- 5220( 2010) 02- 0152- 05
Introductio n
Resear ch on auto-h ar moni zin g a melody ( e. g. Ch inese f olk
son g) w it h p iano accom panim ent i s trying t o build up a compu ter
syst em wh ich gener ates a 3- voice m usic, piano l ef t- hand voice,
r ight- hand voice and an i nput m elod y voice. The d evelop ment of
some exist ing autom atic harm oniz ation syst em s is main ly based on
const raint sat isfaction techniques
[ 1, 2]
. How ever, as a stand alone
meth od, the systems are too diff icult to extend. T hey become t oo
complicated if w e t ry t o add all t he exception s to the rule and t heir
pr econditions
[3]
. Genet ic algorith m ( G A ) can also be used to
h armonize the melodies. Several systems have applied the G A to
h armonization
[ 4, 5]
. In G A, t he rules are encoded in the form of a
fitness function which is optimiz ed by evolutionary techniques. But,
many i ssues show that the GA approaches have had trouble because it is
h ard t o encode t he knowledge in GA operators that sti ll per mi t a
flexibl e search
[ 6]
. Allan and Williams
[ 7]
designed a harmonization
model for Bach chorales using Hidden M arkov M odels (HM M s) . W hile
gen erating very good musical result, t he model is limited in th e Bach
st yl e 4-voice chorale harmonization with one beat one harmonic state.
Anyway, t hese appr oaches mainly f ocus on a ch ord progr ession
( normally with one beat one chord change) and the note arrangement
w ith in 4-voice. As w e know , any polyphonic music is a mult-i voice
music. A melody with pian o accompaniment, for instance, can be
r egarded as a polyphonic music. In a polyphonic music, the ch ord
pr ogression is not only one topic we have t o t hink about. As an
import ant charact er of a polyphonic music, ther e still is some rhythm
contrast relat ion between a local melodic piece and t he related piano
accompaniment . The structure of a piano accompaniment can be
r epresent ed as a series of piano accompaniment f igures ( see Fig. 1 ) .
For a given melody, h ow can a piano accompaniment figure be select ed
for h armonization and put in a proper position in a context? We think it
depends on: w het her t he modal harmonic charact er of the
accompaniment figure is consist ent wi th the one of th e harmoni zed
Fig. 1 A piano accompaniment fi gure represented in a bar
melodic piece; t he rh ythm cont rast r elation between th e accompani ment
figure and th e harmonized melodic piece; the meter of t he harmonized
melody; th e mode and the modal scale used in th e harmonized melody;
the cadence way at the end of periods in the h armonized melody; and
the t empo of th e harmonized melody.
Therefore, w e set up: a computational model on t he modal
harmonic character of a melodic piece and a piano accompani ment
figure; tw o HM M s respectively for acquiring the parameter s about a
Chinese pentatonic modal chord progression and a rhyt hm-f igur e
progression of t he piano accompani ment f igure on a t rain ing sampl e
scor e set including of Chinese f olk song with piano accompani ment.
In order t o h ar moniz e a C hin ese f olk son g, a pr oper sampl e
data class i s sel ect ed for t raining, i . e. , th e mode, m eter, scal e
an d tem po of th e harm oniz ed Ch inese f olk song sh ould b e th e sam e
or sim ilar as on es of th e trainin g sam ple scores in th e sel ect ed
sam ple data class. In th e f ollow ing t hree sections, w e sh all stat e:
a p rincipl e on tr ai nin g th e param eters o f HM M s on h arm oniz ing
Ch inese f olkson g; t he arch itect ure on auto- harm on izin g C hinese
folkson g w ith pi an o accom panim ent system; and finally th e
evaluat ion of the experim en tal results and di scussion.
1 Principle of HMMs on Harmonizing Chinese
Folk Song
1. 1 Formal description on a note
A duality group ( N V ) h ere is expressed as a n ote. W h ere, N
is an elem en t in a note nam e set {
r
C
m
,
r
D
m
,
r
E
m
,
r
F
m
,
r
G
m
,
r
A
m
,
r
B
m
} or a r est ; m ( = , - 2, - 1, 0, 1, 2, ) stand s f or
wh ich not e group t he n ot e belongs to; r is sharp or f lat or em pty;
V ( = 1( full not e) , = 2( half not e) , = 4( quar ter n ote) , = 8( eight h
not e) , ) stands f or a n ote value. It sh ould be ind icat ed t hat
under diff erent key signat ure i n our syst em , seven basic not e nam e
C
1
, D
1
, E
1
, F
1
, G
1
, A
1
, B
1
w ill cor resp ond t o di f fer en t
position s in th e scor e. F or in stance, und er th e C key their
position s in the score ar e show n as f ollow s.
Wh ile, un der t he A key th ey st an d f or an oth er seven n ot es in
th e score as f ollow in gs.
Based on t hi s, f or any n ote ( N T ) und er a determined key, w e
can easi ly calculate out w hich not e in th e scor e wi ll corr esp ond to.
1. 2 Chinese pentatonic scale and ethnic-styled
Chinese pentatonic based modal harmony
As w e kn ow, do ( 宫) , re ( 商) , mi ( 角) , so ( 徵) ,
la ( 羽) are cal led as Ch inese pent at oni c scale
[8]
. T here are many
melodi es of Ch inese f olk son gs based on C hin ese p en tat onic scale.
The Chinese pent aton ic scale can be ext end ed t o 7-n ote pent aton ic
based scal e by ad ding tw o associat e no tes f a ( 清角) and si ( 变
宫) . Some melod ies o f Chin ese f olk songs include mor e t han 7
different not es. For inst ance, som e m elodies of Chi nese X inJian g
152 J ournal o f Donghua Univ ersity ( Eng . Ed . ) Vol . 27, No . 2 ( 2010)
R ecei ved dat e: 2009- 05- 23
Foun dation i t em : Nat ional N atural Scien ce Foundation of C hin a ( No. 60975076)
* Cor respondence should b e addressed t o FE NG Y i n, A ssociat e P rof essor , E-mail: FengY in @ xmu. edu. cn