JP2526830B2 - Automatic chord adding device - Google Patents

Automatic chord adding device

Info

Publication number
JP2526830B2
JP2526830B2 JP63082885A JP8288588A JP2526830B2 JP 2526830 B2 JP2526830 B2 JP 2526830B2 JP 63082885 A JP63082885 A JP 63082885A JP 8288588 A JP8288588 A JP 8288588A JP 2526830 B2 JP2526830 B2 JP 2526830B2
Authority
JP
Japan
Prior art keywords
melody
chord
data
sound
harmonic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP63082885A
Other languages
Japanese (ja)
Other versions
JPH01255881A (en
Inventor
純一 南高
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP63082885A priority Critical patent/JP2526830B2/en
Priority to US07/335,213 priority patent/US4951544A/en
Publication of JPH01255881A publication Critical patent/JPH01255881A/en
Application granted granted Critical
Publication of JP2526830B2 publication Critical patent/JP2526830B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Auxiliary Devices For Music (AREA)
  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】 [発明の技術分野] 本発明は与えられたメロディに対し自動的にコード
(以下、和音またはコードという)を付加することが可
能な自動コード付加装置(以下、自動和音付加装置また
は自動コード付加装置という)に関する。
TECHNICAL FIELD OF THE INVENTION The present invention relates to an automatic chord adding device (hereinafter, automatic chord) capable of automatically adding a chord (hereinafter, referred to as chord or chord) to a given melody. Addition device or automatic code addition device).

[従来技術] 予め与えられたメロディに対しコードを自動的に付加
する自動コード付加装置は既に知られている。
[Prior Art] An automatic code adding device for automatically adding a code to a given melody is already known.

例えば、特開昭58−87593号に開示される自動コード
付加装置は次のようにしてコードを決定する。
For example, the automatic code adding device disclosed in JP-A-58-87593 determines a code as follows.

(イ)12の調について、 Σ(音階音×音価)−Σ(音階外音×音価) を計算し、最大となる調を採択する。(B) For the 12 tones, calculate Σ (note scale x note value) -Σ (outside note x note value) and select the maximum note.

(ロ)メロディの最終音により長調か短調かを決定する
(なお、(イ)では、平行調、例えばハ長調とイ短調は
区別しない)。
(B) The final note of the melody is used to determine whether the key is a major key or a minor key (note that (a) does not distinguish parallel key, for example, c major and a minor key).

(ハ)上記(イ)、(ロ)により決定された調から7種
のコード(ダイアトニックコード)を選択する(例え
ば、ハ長調の場合、Cmaj、Dmin、Emin、Fmaj、Gmaj、Am
in、Bdimを選択する)。
(C) Select seven chords (diatonic chords) from the keys determined in (A) and (B) above (for example, in C major, Cmaj, Dmin, Emin, Fmaj, Gmaj, Am
Select in, Bdim).

(ニ)ブロック(小節)毎に、7種の各コードの構成音
とメロディの音高との適合度(類似度)を計算する。
(D) For each block (measure), the compatibility (similarity) between the constituent notes of each of the seven chords and the pitch of the melody is calculated.

(ホ)適合度に和音優先順位テーブル(隣り合う2つの
コードの推移頻度)による優先度を乗算する。
(E) The fitness is multiplied by the priority according to the chord priority table (transition frequency of two adjacent chords).

(ヘ)7種のコードのうちで、評価値=適合度×優先度
を最大にするコードを決定する。
(F) Of the seven types of codes, the code that maximizes the evaluation value = the goodness of fit × the priority is determined.

本件出願人も特開昭58−114097号において自動コード
付加装置を開示している。この自動コード付加装置は次
のようにしてコードを付加する。
The applicant of the present application also discloses an automatic code adding device in Japanese Patent Laid-Open No. 58-114097. This automatic code adding device adds a code as follows.

(a)最終音により調性を決定する。(A) Tonality is determined by the final tone.

(b)ブロック(小節)内のメロディにより支配的な音
(主音)を決定する。
(B) The dominant sound (tongue) is determined by the melody in the block (measure).

(c)主音と前回のコードとにより、テーブルを参照し
てコードを決定する。
(C) The chord is determined by referring to the table based on the tonic and the previous chord.

しかし、いずれの従来例も入力されるメロディに対す
る暗黙の限定条件(曲の最後までメロディを入力しなけ
ればならない。曲の途中で転調してはならない)があ
る。また、出力としてのコード進行が1つしかないため
他の有力なコード進行が捨てられることになる。メロデ
ィの音の順序が変っても同一の結果になる、といった問
題点がある。
However, in each of the conventional examples, there is an implicit limiting condition for the melody that is input (the melody must be input until the end of the song. Do not transpose in the middle of the song). In addition, since there is only one chord progression as an output, other influential chord progressions are discarded. There is a problem that the same result is obtained even if the order of the sounds of the melody is changed.

[発明の目的] したがって、本発明の目的は、入力されるメロディに
対する限定条件なしに、また、付加可能な和音を捨てる
ことなくより音楽的な根拠に基づいて和音を付加する自
動和音付加装置を提供することである。
[Object of the Invention] Therefore, an object of the present invention is to provide an automatic chord adding device that adds chords based on a more musical basis without limiting conditions for input melody and without discarding chords that can be added. Is to provide.

[発明の構成] 本発明は上記の目的を達成するため、与えられたメロ
ディに対して自動的に和音を付加する自動和音付加装置
において、上記メロディを構成する音の時系列(以下、
メロディの音列という)を表わすデータを入力するメロ
ディ入力手段と、上記メロディの所定区間に対して和音
の候補を付与する和音候補付与手段と、和音とメロディ
の音列に従ってメロディに含まれる非和声音を分類する
ための音楽知識を記憶する知識記憶手段と、上記所定区
間のメロディと上記和音の候補に対し、上記音楽知識を
適用して、即ち、上記和音の候補を上記所定区間のメロ
ディに対する和音と仮定し、この和音の候補の構成音で
ないメロディ音について非和声音の分類を実行する推論
手段と、上記推論手段の分類結果が所定の分類結果であ
るときは上記和音の候補を上記所定区間のメロディに対
する和音であると判定し、所定の分類結果でないときは
該和音の候補を上記所定区間のメロディに対する和音で
ないと判定する判定手段と、を有することを特徴とする
自動和音付加装置を提供する。
[Configuration of the Invention] In order to achieve the above object, the present invention provides an automatic chord adding device that automatically adds chords to a given melody in a time series of sounds that compose the melody (hereinafter,
A melody input means for inputting data representing a melody tone sequence), a chord candidate assigning means for assigning chord candidates to a predetermined section of the melody, and a non-harmonic included in the melody according to the chord and the melody tone sequence. Knowledge storage means for storing musical knowledge for classifying voices, and applying the music knowledge to the melody and chord candidates in the predetermined section, that is, the chord candidates to the melody in the predetermined section. Assuming that the chord is a chord, an inference means for performing classification of non-harmonic sounds on a melody sound that is not a constituent sound of this chord, and if the classification result of the inference means is a predetermined classification result, the chord candidate is set to the predetermined chord. It is determined that the chord is a chord with respect to the melody of the section, and if the result is not the predetermined classification result, it is determined that the chord candidate is not the chord with respect to the melody of the predetermined section. To provide an automatic chord adding device, characterized in that it comprises a means.

[発明の作用] いま、所定区間のメロディ、即ち評価すべきメロディ
と、和音の候補、即ちコード候補が与えられているとす
る。これに対し、推論手段は知識記憶手段に記憶されて
いる知識を適用して非和声音の分類を実行する。その
際、推論手段は、コード候補の構成音と同音のメロディ
音は和声音と仮定する。この和声音の仮定が正しけれ
ば、知識の適用の結果として所定の分類結果が得られ
る。即ち、残りのメロディ音はそれぞれの非和声音とし
て結論される(メロディ音は和声音と非和声音とで構成
されるため)。しかし、和声音の仮定が正しくなけれ
ば、知識を適用した際に、上記所定の分類結果は得られ
ず、あるメロディ音がいずれの非和声音にも該当しない
音である、といった結論が生じ得る。これは、最初の仮
定すなわち、コード候補が妥当でなかったことに起因す
る。したがって、本発明ではこのような分類結果が得ら
れた場合、判別手段により、コード候補がメロディに付
加できないコードと判定するようにしている。つまり、
所定区間のメロディに対する和音ではないと判定してい
る。
[Operation of the Invention] It is assumed that a melody in a predetermined section, that is, a melody to be evaluated and chord candidates, that is, chord candidates are given. On the other hand, the inference means applies the knowledge stored in the knowledge storage means to perform the classification of non-harmonic sounds. At that time, the inference means assumes that the melody sound that is the same as the constituent sound of the chord candidate is a harmony sound. If this harmony sound assumption is correct, a given classification result is obtained as a result of the application of knowledge. That is, the remaining melody tones are concluded as respective non-harmonic tones (because the melody tones are composed of harmony and non-harmonic tones). However, if the assumption of harmony is not correct, the above classification result cannot be obtained when knowledge is applied, and it can be concluded that a certain melody sound is a sound that does not correspond to any non-harmonic sound. . This is due to the first assumption, namely that the code candidate was not valid. Therefore, in the present invention, when such a classification result is obtained, the determination means determines that the chord candidate cannot be added to the melody. That is,
It is determined that the chord does not correspond to the melody in the predetermined section.

このように本発明では、知識記憶手段に記憶される知
識を利用することより音楽的に理由がつけられるコード
候補(メロディのどの音が和声音で、どの音がどの非和
声音であるかを説明可能にするコード候補)のみがメロ
ディに付加可能なコードとされる。つまり、上記所定の
分類結果をもたらした和音の候補のみが上記所定の区間
のメロディに対する和音(メロディに付加可能なコー
ド)とされる。上記非和声音の分類知識は特定の調には
依存しない知識であるため、従来技術のように入力され
るメロディに限定条件をつけなくともコードを付加可能
である。また、上記知識はメロディ音の順序(音列)を
考慮しているので、メロディラインの特徴に合わせたコ
ード解釈が可能である。さらに、複数のコード進行が付
加可能な場合、そのすべてについて出力可能である。
As described above, according to the present invention, chord candidates that are musically given a reason by using the knowledge stored in the knowledge storage means (which notes of a melody are harmony sounds and which sounds are nonharmonic sounds) Only the chord candidates that can be explained are the chords that can be added to the melody. That is, only the chord candidates that have produced the predetermined classification result are set as chords (codes that can be added to the melody) for the melody in the predetermined section. Since the classification knowledge of non-harmonic sounds does not depend on a specific key, it is possible to add chords without applying a limiting condition to the melody input as in the conventional technique. Further, since the above knowledge considers the order (sound sequence) of the melody sounds, it is possible to interpret the code according to the characteristics of the melody line. Furthermore, when a plurality of chord progressions can be added, it is possible to output all of them.

[実施例] 以下、図面を参照して本発明の一実施例について説明
する。
[Embodiment] An embodiment of the present invention will be described below with reference to the drawings.

<全体構成> 本実施例に係る自動コード付加装置の全体構成を第1
図に示す。1はCPUであり、コード付加のための全体的
な制御を行う。ワークメモリ2はコード付加等の動作時
に、コードデータ等を一時記憶するのに用いられる。入
力装置3はメロディ等の入力に用いられる。メロディ入
力装置としては、例えば鍵盤(リアルタイム入力)が使
用できる。モニター4はCRT、楽音形成回路、サウンド
システム等で構成され、メロディとコード(伴奏)の表
示、出力を行う。メロディデータメモリ5には入力され
たメロディデータが記憶される。コードメモリ6にはコ
ードのセットが記憶され、コード構成音メモリ7には各
コードの構成音のデータが記憶される。プロダクション
ルールデータメモリ8は非和声音を分類する音楽知識を
表現するデータを記憶するものである。動作において、
CPU1はメロディデータメモリ5にある各区間(小節)の
メロディに対し付加可能なコードを決定する。すなわ
ち、コードメモリ6より、仮定したコードを読み出し、
その構成音データとメロディデータに対し、プロダクシ
ョンルールデータメモリ8から読み出した知識を適用す
る。その結果、違法な音が見つかったときは、仮定した
コードを誤りとみて、そのコードを付加不可能なコード
とする。
<Overall Configuration> First, the overall configuration of the automatic code adding apparatus according to the present embodiment will be described.
Shown in the figure. Reference numeral 1 is a CPU, which performs overall control for code addition. The work memory 2 is used to temporarily store code data and the like when an operation such as adding a code is performed. The input device 3 is used to input a melody or the like. As the melody input device, for example, a keyboard (real time input) can be used. The monitor 4 is composed of a CRT, a tone forming circuit, a sound system, etc., and displays and outputs a melody and a chord (accompaniment). The melody data memory 5 stores the input melody data. The chord memory 6 stores a set of chords, and the chord component sound memory 7 stores data of the chord constituent sounds. The production rule data memory 8 stores data expressing music knowledge for classifying nonharmonic sounds. In operation,
The CPU 1 determines chords that can be added to the melody of each section (measure) in the melody data memory 5. That is, the assumed code is read from the code memory 6,
The knowledge read from the production rule data memory 8 is applied to the constituent sound data and the melody data. As a result, when an illegal sound is found, the assumed code is regarded as an error and the code is regarded as a non-addable code.

<全体動作> 第2図にメロディに対する自動コード付加のゼネラル
フローを示す。
<Overall Operation> FIG. 2 shows a general flow of automatic chord addition to a melody.

まず2−1でメロディデータメモリ5からメロディデ
ータを読み込み、2−2で小節カウンタbarを最初の小
節に初期化する。
First, in 2-1 the melody data is read from the melody data memory 5, and in 2-2, the bar counter bar is initialized to the first bar.

そして、2−3に示すように、小節毎に対応するメロ
ディデータを選択する。さらに、非和声音を分類する知
識を表現するプロダクションルールデータを読み込む
(2−4)。次にコードカウンタCCCを初期化し(2−
5)、候補のコードをコードメモリ6から読み込む(2
−6、2−7)。次に、読み込んだメロディデータ、コ
ードデータ、プロダクションルールデータにより非和声
音の分類を実行し、コード付加が可能か否かを判定する
(2−8)。本例では着目している区間のメロディに対
し、すべてのコードを逐次、適用し、各コードの付加の
可否を決めれている(2−6から2−9)。
Then, as shown in 2-3, the melody data corresponding to each bar is selected. Further, production rule data expressing knowledge for classifying non-harmonic sounds is read (2-4). Next, the code counter CCC is initialized (2-
5) Read the candidate code from the code memory 6 (2
-6, 2-7). Next, the non-harmonic sound is classified based on the read melody data, chord data, and production rule data, and it is determined whether chords can be added (2-8). In this example, all chords are sequentially applied to the melody of the section of interest, and it is determined whether or not each chord can be added (2-6 to 2-9).

1小節分のメロディに対するコード付加の可否の評価
が完了したら、次のメロディ区間に進め(2−11)、す
べての小節に対する評価が完了するまで処理を繰り返す
(2−10)。
When the evaluation of whether or not the chord can be added to the melody for one measure is completed, the process proceeds to the next melody section (2-11), and the process is repeated until the evaluation for all measures is completed (2-10).

<データ形式> 後述するフローで用いたデータ形式を第3図に示す。
この例では、メロディデータは音高データと音長データ
の列で表現され、音高データは、16ビット長で上位8ビ
ットがオクターブを表わし、下位8ビットがCを“0"と
して半音ごとに1インクリメントする整数値で表現され
る。音長データは最短の音長を“1"とし、その倍の音長
は“2"というような整数値で表わされる。
<Data Format> The data format used in the flow described later is shown in FIG.
In this example, the melody data is represented by a string of pitch data and pitch length data, and the pitch data is 16 bits long, the upper 8 bits represent an octave, and the lower 8 bits are C for each semitone. It is represented by an integer value that is incremented by 1. In the note length data, the shortest note length is represented by "1", and the doubled note length is represented by an integer value such as "2".

一方、コードデータは16ビット長で上位8ビットが種
類(コードタイプ)を表わし、下位8ビットがコードの
根音を表わす。
On the other hand, the code data is 16 bits long, and the upper 8 bits represent the type (code type) and the lower 8 bits represent the root note of the chord.

<メロディデータ読み込み> 第2図のゼネラルフローの2−1で実行されるメロデ
ィデータの読み込みの詳細を第5図に示す。第4図はメ
ロディデータメモリ5に記憶されるメロディデータ例で
ある。第5図の処理の結果、i番目の音高データはMDi
に格納され、i番目の音長データはMRiに格納され、メ
ロディ音の総数はMDNOに格納される。
<Reading Melody Data> FIG. 5 shows the details of reading the melody data executed in 2-1 of the general flow of FIG. FIG. 4 shows an example of melody data stored in the melody data memory 5. As a result of the processing of FIG. 5, the i-th pitch data is MDi
, The i-th tone length data is stored in MRi, and the total number of melody tones is stored in MDNO.

<メロディ小節の選択> 第2図の2−3で実行されるメロディの小節の選択の
詳細を第6図から第8図に示す。この処理により、Psに
は、着目している小節の最初の音符がメロディデータ
{MDi}、{MRi}の何番目のデータであるかが入り、Pe
には着目している小節の次の小節の最初の音符よりひと
つの前の音符がメロディデータの何番目のデータである
かが入る。このPsとPeの情報は、後述する判定処理2−
8内において、調査すべきメロディデータの範囲を規定
する。
<Selection of Melody Bar> Details of the selection of the measure of the melody executed in 2-3 of FIG. 2 are shown in FIGS. 6 to 8. By this process, Ps contains the number of the melody data {MDi}, {MRi} of the first note of the bar of interest, and Pe
Contains the order of the melody data, which is one note before the first note of the measure next to the measure of interest. The information of Ps and Pe is used for the determination process 2 described later.
8 defines the range of melody data to be investigated.

<プロダクションルールデータの読み込み> ゼネラルフローの2−4で実行されるプロダクション
ルールデータの読み込みの詳細を第9図に示す。同図の
下方にはプロダクションルールデータメモリ8に記憶さ
れるプロダクションルールデータ例が示されている。
<Reading Production Rule Data> Details of reading the production rule data executed in 2-4 of the general flow are shown in FIG. Below the figure, an example of production rule data stored in the production rule data memory 8 is shown.

プロダクションルールの全体は、メロディに含まれる
非和声音を分類するための音楽知識(第10図参照)を表
現したものであり、各プロダクションルールデータは、
ルールの前提部を規定するデータとして下限データLi、
関数の種類を指示する関数指示データXi、上限データUi
を有し、ルールの結論部としてデータYiとNiを有する。
関数は分析するメロディの特徴を数値表現したもので、
その例は後述する第15図に示される。データXiで示され
る関数の値FxiがLi以上でかつUi以下である(Li≦Fxi≦
Ui)というのがプロダクションルールの前提部(命題)
であり、この前提部が成立するときの結論がデータYiで
示され、この前提部が不成立のときの結論がデータNiで
示されている。そして、データYiまたはNiが正の値をも
つときは、その値が後述する前向推論において次に参照
すべきプロダクションルールの番号を示し、負の値をも
つときは、その絶対値によって非和声音の種類が表現さ
れる。前向推論は必ず1つのルールから開始され、この
ルールのことをルートと呼ぶ。負の値をもつ結論Yiまた
はNiをみつけたときに前向推論は終了する。この負の値
のなかに、第9図にillで示す違法な音(どの非和声音
にも該当しない音)を表わすデータが含まれる。後述す
るように、このような違法な音が推論の結論になったと
きは、推論の前提であるコードの仮定により誤りがある
と考えて、そのコードをメロディに付加できないコード
と判定している。
The entire production rule expresses musical knowledge (see FIG. 10) for classifying the non-harmonic sounds included in the melody, and each production rule data is
The lower limit data Li as the data that defines the premise of the rule,
Function instruction data Xi that indicates the type of function, upper limit data Ui
With the data Yi and Ni as the conclusion part of the rule.
The function is a numerical expression of the characteristics of the melody to be analyzed.
An example thereof is shown in FIG. 15 described later. The value Fxi of the function indicated by the data Xi is greater than or equal to Li and less than or equal to Ui (Li ≦ Fxi ≦
Ui) is the premise of a production rule (proposition)
Then, the conclusion when this premise is satisfied is shown by the data Yi, and the conclusion when this premise is not satisfied is shown by the data Ni. When the data Yi or Ni has a positive value, that value indicates the number of the production rule to be referred to next in the forward inference described later, and when it has a negative value, it is not summed by its absolute value. The type of voice sound is expressed. Forward inference always starts with one rule, and this rule is called a root. Forward finding ends when it finds a negative conclusion Yi or Ni. This negative value includes data representing an illegal sound (sound that does not correspond to any non-harmonic sound) indicated by ill in FIG. As will be described later, when such an illegal sound comes to the conclusion of inference, it is considered that there is an error due to the assumption of the chord that is the premise of inference, and it is determined that the chord cannot be added to the melody. .

第9図に示すプロダクションルールデータのアドレス
割当の場合、各プロダクションルールのデータは下限デ
ータLiのアドレスを先頭として5つの連続するアドレス
に、記憶される。詳細には5で割り切れるアドレスにLi
が、5で割った余り1のアドレスにXiが、余り2のアド
レスにUiが、余り3のアドレスにYiが、余り4のアドレ
スにNiのデータが記憶される。
In the case of the address assignment of the production rule data shown in FIG. 9, the data of each production rule is stored in five consecutive addresses starting from the address of the lower limit data Li. For details, Li is an address divisible by 5.
Xi is stored at the address of remainder 1 divided by 5, Ui is stored at the address of remainder 2, Yi is stored at the address of remainder 3, and Ni is stored at the address of remainder 4.

なお、第9図においてrulenoには、プロダクションル
ールの総数がセットされる。
In FIG. 9, ruleno is set to the total number of production rules.

<コードデータの読み込み> ゼネラルフローの2−7で実行されるコードデータの
読み込みの詳細を第11図に示す。第11図の上方にはコー
ドメモリ6に記憶されるコードの例が示される。この例
では0番地よりまずメジャー系のコードがC、C……
Bの順に記憶され、12番地よりマイナー系のコードが
C、C……Bの順に記憶されている。
<Reading Code Data> Figure 11 shows the details of reading the code data executed in 2-7 of the general flow. An example of codes stored in the code memory 6 is shown in the upper part of FIG. In this example, the major chords are C, C #, ...
It is stored in the order of B, and the minor code from the address 12 is stored in the order of C, C # ... B.

(コードカウンタ(CCC)−1)番地から読み込んだ
データをコードの候補としている(29−1)。
The data read from the (code counter (CCC) -1) address is used as a code candidate (29-1).

<判 定> 次に、ゼネラルフローのなかの要部である処理2−8
(コード候補につきメロディの非和声音を分類してコー
ド候補の付加の可否を判定する処理)について詳細に説
明する。処理2−8のフローを第12図に示す。
<Judgment> Next, processing 2-8, which is the main part of the general flow.
(Process of classifying non-harmonic sounds of melody for chord candidates and determining whether or not chord candidates can be added) will be described in detail. The flow of processing 2-8 is shown in FIG.

まず30−1において、コード候補を仮定したときのメ
ロディの非和声音について分類が行われ、レジスタRS1
〜RSRSNOに非和声音または違法音の識別値が記憶され
る。この識別値に対するカウンタrscを“1"に初期化し
(30−2)、RSrscが違法な音(ill)を表わす値である
かどうかチェックする(30−3)。RS1からRSRSNOのな
かに1つでも違法な音が含まれるときは、30−7によ
り、CCCで与えられたコードは使用桁と判定する。RS1
らRSRSNOのすべてが分類された非和声音の識別値をもつ
ときにのみ(30−3〜30−5)、CCCで与えられたコー
ドは使用可能と判定する(30−6)。この判定の記憶は
例えば、 根音(root)=(CCC−1)mod12 タイプ(type)=(int){(CCC−1)/12} に対応するエリアCHORDroottypeに、使用可否の識別
値を書き込むことにより行われる。
First, in 30-1, the non-harmonic sound of the melody when the chord candidate is assumed is classified, and the register RS 1
~ RS RSNO stores the discrimination value of non-harmonic sound or illegal sound. A counter rsc for this identification value is initialized to "1" (30-2), and it is checked whether RS rsc is a value representing an illegal sound (ill) (30-3). If any of RS 1 to RS RSNO contains an illegal sound, the code given by CCC shall be judged to be a use digit according to 30-7. Only when all of RS 1 to RS RSNO have classified non-harmonic discriminant values (30-3 to 30-5), it is judged that the code given by CCC is usable (30-6). The memory of this judgment is, for example, root CH (root) = (CCC-1) mod12 type (type) = (int) {(CCC-1) / 12} corresponding to the area CHORD root , type This is done by writing a value.

<非和声音分類> 第12図の30−1で実行される非和声音の分類の詳細を
第13図に示す。
<Classification of Nonharmonic Sounds> FIG. 13 shows details of the classification of nonharmonic sounds executed in 30-1 of FIG.

まず、33−2で非和声音のカウンタjを初期化し、33
−3でメロディデータの音符カウンタiを着目している
小節の先頭位置Ps(処理2−3で求めた値)に設定す
る。33−4で、着目しているi番目の音符が和声音か否
かを判別する。コード候補の構成音と同音のものは和声
音とされる。和声音でないときは、非和声音カウンタを
インクリメントし(33−5)、着目している音符を中心
とするメロディの特徴要素を表わす関数Fを計算し(33
−6)、プロダクションルールによる前向推論を実行し
て(33−7)、着目音符についての結論をRSjに代入す
る(33−8)。音符カウンタiをインクリメントし(33
−9)、着目している小節の最後の音符に到達するまで
(33−10)、33−4以降の処理を繰り返す。
First, 33-2 initializes the non-harmonic counter j,
At -3, the note counter i of the melody data is set to the head position Ps (value obtained in the process 2-3) of the bar of interest. In 33-4, it is judged whether or not the i-th note of interest is a harmony sound. Harmonic sounds are the same as the constituent sounds of the chord candidate. If it is not a harmony tone, the non-harmonic tone counter is incremented (33-5), and the function F representing the characteristic element of the melody centered on the note of interest is calculated (33
-6), the forward inference based on the production rule is executed (33-7), and the conclusion about the note of interest is substituted into RSj (33-8). The note counter i is incremented (33
-9) Until the last note of the bar of interest is reached (33-10), the processing from 33-4 is repeated.

上記処理33−4の詳細は第14図に示される。34−1で
は、コードデータをコード構成音データに変換してい
る。この変換は、コードデータの種類データをポインタ
として、コード構成音メモリ7からC調で表わされた構
成音データ(例えば、メジャーであれば、00001001000
1)を読み出し、それをコードデータの根音データが示
す数だけ左に転回することで行われる。34−2では、34
−1で生成した構成音データCCと同一形式のデータにメ
ロディ音高データMDiを変換している。CC∧mm(論理
積)の結果が0でないときはコード構成音のなかにメロ
ディ音と同じ音が含まれる。すなわち、MDiは和声音で
ある(34−3、34−5)。CC∧mm=0のときはMDiは非
和声音である(34−3、34−4)。
Details of the process 33-4 are shown in FIG. In 34-1, the chord data is converted into chord component sound data. This conversion is performed by using the type data of the chord data as a pointer, from the chord component tone memory 7 to the component tone data represented in the C tone (for example, 00001001000 in the case of major).
It is performed by reading 1) and turning it left by the number indicated by the root note data of the chord data. 34-2, 34
The melody pitch data MDi is converted into data of the same format as the constituent sound data CC generated in -1. When the result of CC ∧ mm (logical product) is not 0, the same sound as the melody sound is included in the chord constituent sounds. That is, MDi is a harmony sound (34-3, 34-5). When CC∧mm = 0, MDi is a non-harmonic sound (34-3, 34-4).

第13図のFの計算33−6の詳細を第15図に示す。この
例では関数Fとして、 F1:着目している音符(非和声音)の何個先に和声音が
位置するか(後方和声音の位置) F2:着目している音符の何個手前の和声音が位置するか
(前方和声音の位置) F3:前方和声音から後方和声音までにある非和声音の数 F4:前方和声音と後方和声音との音高差 F5:前方和声音と後方和声音との間における非和声音の
高さの分布 F6:前方和声音から後方和声音までのメロディの音高が
単調に変化するか否か F7:後方和声音とその1つ前の音との音高差(後方和声
音への音程進行) F8:前方和声音とその1つの後の者との音高差(前方和
声音からの音程進行) を計算している。この他に、弱拍か強拍かを示す情報、
音長を区別する情報を関数Fのセットに加えてもよい。
個々の関数Fの算出のフローチャート(第16図〜第23
図)はそれ自体の記載から明らかであるので説明は省略
する。
Details of the calculation 33-6 of F in FIG. 13 are shown in FIG. In this example, the function F is as follows: F 1 : how many notes (non-harmonic) the note of interest is before (harmonic position of the rear) F 2 : how many notes before the note of interest Is located (the position of the front chord) F 3 : The number of non-harmonics between the front and rear chords F 4 : The pitch difference between the front and rear chords F 5 : forward harmonic sound and rear harmonic tone height of nonharmonic tones distribution between the F 6: forward harmonic tone from whether high melody sound to the rear harmony sound is changed monotonically F 7: and the rear harmony sound Pitch difference with the preceding sound (pitch progression to the rear harmony) F 8 : Pitch difference between the front harmony and the one after it (pitch progression from the front harmony) ing. Besides this, information indicating weak or strong beats,
Information that distinguishes note lengths may be added to the set of functions F.
Flow chart of calculation of each function F (Figs. 16 to 23)
(Fig.) Is clear from the description of itself, and therefore its explanation is omitted.

第13図は33−7における前向推論の詳細を第24図に示
す。まず、ルールナンバーポインタPを、プロダクショ
ンルールのなかでルートとなっているルールを指示する
“1"にセットする(44−1)。しかる後、ルールナンバ
ーポインタPの示すルールの前提部(Lp≦Fxp≦Up)が
成立するかどうかをチェックし、成立するときはそのル
ールの肯定結論部のデータYpを次のルールへのポインタ
として使用し、不成立のときはそのルールの否定結論部
のデータNpを次のルールへのポインタとして使用する。
ただし、データYp、Npが、負の値のときは、最終結論に
達しているので、その絶対値(−Yp、−Np)を非和声音
の種類の識別子または違法な音の識別子として結論レジ
スタにセットする。フローに従うと、44−3の条件Lp>
Fxpか44−5の条件Fxp>Upが成立するとき、ルールPの
前提部Lp≦Fxp≦Upは不成立であるのでそのルールの否
定結論部のデータNpをaに代入し(44−4、44−6)、
それ以外の場合は前提部成立なので、aにはルールPの
肯定結論部のデータYpが入る(44−2)。このaをPに
代入し(44−7)、Pが正値のときは、次のルールナン
バーポインタとして次のルールの検査に戻り、Pが負の
ときは、−Pの非和声音の分類結果とする(44−8、44
−9)。
FIG. 13 shows the details of forward reasoning in 33-7 in FIG. First, the rule number pointer P is set to "1" indicating the rule that is the root of the production rules (44-1). Then, it is checked whether or not the premise part (Lp ≦ Fxp ≦ Up) of the rule indicated by the rule number pointer P is satisfied. If not, the data Np of the negative conclusion part of the rule is used as a pointer to the next rule.
However, when the data Yp and Np are negative values, the final conclusion has been reached, so the absolute value (−Yp, −Np) is used as the conclusion register as the non-harmonic type identifier or the illegal sound identifier. Set to. According to the flow, the condition Lp of 44-3>
When the condition Fxp> Up of Fxp or 44-5 is satisfied, the premise part Lp ≦ Fxp ≦ Up of the rule P is not satisfied, so the data Np of the negative conclusion part of the rule is substituted into a (44-4, 44 -6),
In other cases, since the premise part is established, the data Yp of the affirmative conclusion part of the rule P is entered in a (44-2). Substituting this a into P (44-7), when P is a positive value, it returns to the inspection of the next rule as the next rule number pointer, and when P is negative, the classification of non-harmonic sounds of -P The result (44-8, 44
-9).

以上で実施例の説明を終えるが、本発明は上記実施例
には限定されず、種々の変形、変更が可能である。
Although the description of the embodiment is completed above, the present invention is not limited to the above embodiment, and various modifications and changes can be made.

例えば、上記実施例ではコードメモリ6にあるコード
を総当りで検査して、メロディに付加可能なコードか否
かを判定しているが、コード候補はユーザーが入力する
ようにしてもよい。この場合、コード付けの学習機が提
供されることになる。その際、入力されたコードが使用
不能なコードであることが非和声音の分類知識により判
明したときに、その説明を表示するようにしてもよい。
本件出願人に係る特願昭62−325178号(昭和62年12月24
日出願)には、非和声音の分類結果に対する説明を行う
技術が示されており(第71図)、この技術が利用でき
る。
For example, in the above-described embodiment, the chords stored in the chord memory 6 are exhaustively examined to determine whether or not the chords can be added to the melody, but the chord candidates may be input by the user. In this case, a learning machine for coding will be provided. At that time, when it is found from the classification knowledge of the non-harmonic sounds that the input chord is an unusable chord, the explanation may be displayed.
Japanese Patent Application No. 62-325178 (December 24, 1987) relating to the applicant
Japanese application) describes a technique for explaining the classification result of non-harmonic sounds (Fig. 71), and this technique can be used.

[発明の効果] 本発明による自動コード付加装置には、メロディとコ
ード候補が与えられた場合に、メロディの音列に従って
メロディに含まれる非和声音を分類する音楽知識を記憶
する知識記憶手段と、与えられたメロディと仮定したコ
ード候補に対し、この音楽知識を適用してメロディに含
まれる非和声音の分類を実行する推論手段と、この推論
手段の分類結果に従って仮定したコード候補がメロディ
に使用可能なコードが否かを判定する判定手段が設けら
れている。したがって、音楽的に説明のつくコード候補
に対してはすべて使用可能と判定されるという利点があ
る。また、与えられるメロディは長さに制限は受けず、
転調を含むようなメロディにも対応できる。
[Effects of the Invention] The automatic chord adding device according to the present invention, when a melody and a chord candidate are given, a knowledge storage means for storing music knowledge for classifying non-harmonic tones included in the melody according to a tone sequence of the melody. , An inference means that applies this musical knowledge to a given chord candidate that is assumed to be a melody to classify non-harmonic sounds included in the melody, and a chord candidate that is assumed according to the result of the inference means is converted into a melody. There is provided a judgment means for judging whether or not there is a usable code. Therefore, there is an advantage that all chord candidates that can be explained musically are determined to be usable. Also, the length of the given melody is not limited,
It can also be used for melodies that include modulation.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明の一実施例に係る自動コード付加装置の
全体構成図、第2図は実施例の動作を示すゼネラルフロ
ー、第3図はメロディとコードのデータ形式の例を示す
図、第4図はメロディデータ例を示す図、第5図はメロ
ディデータの読み込みのフローチャート、第6図は検査
する区間のメロディデータの最初(Ps)と最後(Pe)を
求めるフローチャート、第7図はPsを算出するフローチ
ャート、第8図はPeを算出するフローチャート、第9図
はプロダクションルールの読み込みのフローチャート、
第10図はプロダクションルールの知識の例を示す図、第
11図はコードデータの読み込みのフローチャート、第12
図はコード候補の付加の可否を判定するフローチャー
ト、第13図は非和声音の分類のフローチャート、第14図
は和声音、非和声音の判別のフローチャート、第15図は
分析対象のメロディの状況を表わす関数Fを計算するフ
ローチャート、第16図は関数F1の算出のフローチャー
ト、第17図は関数F2の算出のフローチャート、第18図は
関数F3の算出のフローチャート、第19図は関数F4の算出
のフローチャート、第20図は関数F5の算出のフローチャ
ート、第21図は関数F6の算出のフローチャート、第22図
は関数F7、F8の算出のフローチャート、第23図は計算し
た関数Fを一時記憶するフローチャート、第24図は非和
声音の分類を前向推論により行うフローチャートであ
る。 1……CPU、5……メロディデータメモリ、6……コー
ドメモリ、8……プロダクションルールデータメモリ、
RSi……非和声音の分類結果を示す識別子、ill……違法
な音を表わす識別子。
FIG. 1 is an overall configuration diagram of an automatic chord adding device according to an embodiment of the present invention, FIG. 2 is a general flow showing the operation of the embodiment, and FIG. 3 is a diagram showing an example of a melody and chord data format, FIG. 4 is a diagram showing an example of melody data, FIG. 5 is a flowchart for reading melody data, FIG. 6 is a flowchart for obtaining the first (Ps) and last (Pe) of the melody data in the section to be inspected, and FIG. 7 is 8 is a flowchart for calculating Ps, FIG. 8 is a flowchart for calculating Pe, and FIG. 9 is a flowchart for reading production rules.
Figure 10 shows an example of knowledge of production rules.
Figure 11 is a flow chart for reading code data, No. 12
Figure is a flowchart for judging whether or not chord candidates can be added. Figure 13 is a flowchart for classifying nonharmonic sounds. Figure 14 is a flowchart for distinguishing harmony and nonharmonic sounds. Figure 15 is the situation of the melody to be analyzed. 16 is a flowchart for calculating the function F1, FIG. 17 is a flowchart for calculating the function F2, FIG. 18 is a flowchart for calculating the function F3, and FIG. 19 is a flowchart for calculating the function F4. FIG. 20, FIG. 20 is a flowchart for calculating the function F5, FIG. 21 is a flowchart for calculating the function F6, FIG. 22 is a flowchart for calculating the functions F7 and F8, and FIG. 23 is a temporary storage of the calculated function F. The flowchart, FIG. 24, is a flowchart for classifying nonharmonic sounds by forward inference. 1 ... CPU, 5 ... melody data memory, 6 ... chord memory, 8 ... production rule data memory,
RSi: an identifier indicating the result of classification of non-harmonic sounds, ill an identifier indicating an illegal sound.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】与えられたメロディに対して自動的に和音
を付加する自動和音付加装置において、 上記メロディを構成する音の時系列(以下、メロディの
音列という)を表わすデータを入力するメロディ入力手
段と、 上記メロディの所定区間に対して和音の候補を付与する
和音候補付与手段と、 和音とメロディの音列に従ってメロディに含まれる非和
声音を分類するための音楽知識を記憶する知識記憶手段
と、 上記所定区間のメロディと上記和音の候補に対し、上記
音楽知識を適用して、即ち、上記和音の候補を上記所定
区間のメロディに対する和音と仮定し、この和音の候補
の構成音でないメロディ音について非和声音の分類を実
行する推論手段と、 上記推論手段の分類結果が所定の分類結果であるときは
上記和音の候補を上記所定区間のメロディに対する和音
であると判定し、所定の分類結果でないときは該和音の
候補を上記所定区間のメロディに対する和音でないと判
定する判定手段と、 を有することを特徴とする自動和音付加装置。
1. An automatic chord adding device for automatically adding chords to a given melody, wherein a melody for inputting data representing a time series of notes constituting the melody (hereinafter referred to as a melody tone string). Input means, chord candidate giving means for giving chord candidates to a predetermined section of the melody, and knowledge memory for storing musical knowledge for classifying non-harmonic tones included in the melody in accordance with chords and melody tone strings. Means for applying the musical knowledge to the melody and chord candidates in the predetermined section, that is, assuming that the chord candidate is a chord for the melody in the predetermined section, and is not a constituent sound of the chord candidate. Inference means for performing classification of non-harmonic sounds on melody sounds, and when the classification result of the inference means is a predetermined classification result, the chord candidates are set to the predetermined section. It determines that the chord with respect to the melody, the automatic chord additional apparatus characterized by having a the determining means not chord for melody of the predetermined interval candidate 該和 sound when not predetermined classification results.
JP63082885A 1988-04-06 1988-04-06 Automatic chord adding device Expired - Lifetime JP2526830B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63082885A JP2526830B2 (en) 1988-04-06 1988-04-06 Automatic chord adding device
US07/335,213 US4951544A (en) 1988-04-06 1989-04-06 Apparatus for producing a chord progression available for a melody

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63082885A JP2526830B2 (en) 1988-04-06 1988-04-06 Automatic chord adding device

Publications (2)

Publication Number Publication Date
JPH01255881A JPH01255881A (en) 1989-10-12
JP2526830B2 true JP2526830B2 (en) 1996-08-21

Family

ID=13786727

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63082885A Expired - Lifetime JP2526830B2 (en) 1988-04-06 1988-04-06 Automatic chord adding device

Country Status (1)

Country Link
JP (1) JP2526830B2 (en)

Also Published As

Publication number Publication date
JPH01255881A (en) 1989-10-12

Similar Documents

Publication Publication Date Title
JP2638021B2 (en) Automatic accompaniment device
US5510572A (en) Apparatus for analyzing and harmonizing melody using results of melody analysis
US6747201B2 (en) Method and system for extracting melodic patterns in a musical piece and computer-readable storage medium having a program for executing the method
US5451709A (en) Automatic composer for composing a melody in real time
US5525749A (en) Music composition and music arrangement generation apparatus
JP2671495B2 (en) Melody analyzer
JPS5887593A (en) Chord adding apparatus
JP3132099B2 (en) Scale discriminator
US4472992A (en) Electronic musical instrument
JPH0990952A (en) Chord analyzing device
JP2526830B2 (en) Automatic chord adding device
JP3278886B2 (en) Key detection device
JP3271331B2 (en) Melody analyzer
JP2615722B2 (en) Automatic composer
JP3088919B2 (en) Tone judgment music device
JP2694278B2 (en) Chord detector
JPH05346781A (en) Key detecting device and automatic music arranging device
JPH07111636B2 (en) Automatic code addition device
JP2615720B2 (en) Automatic composer
JPH087589B2 (en) Automatic code addition device
JPH05273976A (en) Key detector for play data
JP3271332B2 (en) Chording device
JP2621266B2 (en) Automatic composer
JP3316547B2 (en) Chording device
JP2615721B2 (en) Automatic composer

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term