Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH087589B2 - Automatic code addition device - Google Patents
[go: Go Back, main page]

JPH087589B2 - Automatic code addition device - Google Patents

Automatic code addition device

Info

Publication number
JPH087589B2
JPH087589B2 JP63125930A JP12593088A JPH087589B2 JP H087589 B2 JPH087589 B2 JP H087589B2 JP 63125930 A JP63125930 A JP 63125930A JP 12593088 A JP12593088 A JP 12593088A JP H087589 B2 JPH087589 B2 JP H087589B2
Authority
JP
Japan
Prior art keywords
chord
melody
section
added
data
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 - Fee Related
Application number
JP63125930A
Other languages
Japanese (ja)
Other versions
JPH01296287A (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 JP63125930A priority Critical patent/JPH087589B2/en
Priority to US07/335,213 priority patent/US4951544A/en
Publication of JPH01296287A publication Critical patent/JPH01296287A/en
Publication of JPH087589B2 publication Critical patent/JPH087589B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】 [発明の技術分野] この発明は与えられたメロディに対して自動的にコー
ド進行を付加する自動コード付加装置に関する。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to an automatic chord adding device for automatically adding chord progression to a given melody.

[背 景] 一般にメロディに対しては複数のコード解釈が可能で
ある。
[Background] Generally, multiple codes can be interpreted for a melody.

この点に鑑みて、本件出願人は妥当な音楽知識を適用
してメロディを分析することによりメロディに対して付
加可能なコード候補を判別する機能を備えた自動コード
付加装置を提案している(昭和63年4月6日特許願
(1)、名称「自動コード付加装置」)。詳細には、こ
の出願の実施例の装置は上記機能として、メロディの各
区間(小節)に対して、仮定したコードのコード構成音
とメロディとのマッチングによるコード付加の可否を判
別する手段と非和声音の分類によるコード付加の可否判
別手段と音階によるコード付加の可否判別手段とを有し
ており、上記3つの判定に合格したコードを各区間に対
して付加可能なコード候補としている。これらのコード
候補はいずれもコード判別手段(メロディ分析手段)に
組み込まれた音楽知識によって解釈可能な意味において
区間ごとに妥当なコードである。
In view of this point, the applicant of the present application has proposed an automatic chord adding device having a function of discriminating chord candidates that can be added to a melody by applying appropriate music knowledge and analyzing the melody ( Patent application (1), April 6, 1988, name "Automatic code addition device"). More specifically, the device of the embodiment of the present application has, as the above-mentioned function, means for determining whether or not chord addition is possible by matching the chord constituent sound of the assumed chord and the melody with respect to each section (bar) of the melody. It has a chord addition possibility determination means based on the classification of chord sounds and a chord addition possibility determination means based on the scale, and the chords that pass the above three judgments are set as chord candidates that can be added to each section. Each of these chord candidates is a valid chord for each section in the meaning that can be interpreted by the musical knowledge incorporated in the chord discriminating means (melody analyzing means).

しかしながら、1つのメロディ区間に対して複数のコ
ード候補が抽出され得るため、使用者にコード候補のな
かから1つを選択するという作業を強いることになる問
題がある。仮にメロディの区間数をXとし、1区間に付
き、N個のコード候補(実際にはNの値は区間のメロデ
ィに依存するが)が抽出されたとすると、メロディに対
して付加可能なコード進行(コードの列)の組み合わせ
の総数はNのX乗であり、X=16、N=2のときで6万
強にもなる。このため音楽的知識の乏しい使用者にとっ
て、そのなかから1つの好ましいコード進行を選択する
作業は著しく困難となる。
However, since a plurality of chord candidates can be extracted for one melody section, there is a problem in that the user is forced to select one chord candidate. If it is assumed that the number of melody sections is X and N chord candidates (in reality, the value of N depends on the melody of the section) are extracted per one section, chord progressions that can be added to the melody. The total number of combinations of (sequence of codes) is N to the Xth power, and when X = 16 and N = 2, it becomes a little over 60,000. Therefore, it becomes extremely difficult for a user with little musical knowledge to select one preferable chord progression among them.

したがって、使用者のコード進行の選択作業を軽減す
るような機能を上述したような自動コード付加装置に付
加することは非常に好ましいことである。その場合、こ
の機能には選択するコード進行の自然さを保証するよう
な能力があることが望まれる。というのは、メロディ分
析手段により抽出された付加可能なコード候補はメロデ
ィ区間を単位としてみた場合には、音楽知識上妥当であ
るものの、それらのコード候補を任意に連結していって
比較的長いメロディに対するコード進行を生成したとす
ると、全体として不自然なコード進行が得られる可能性
があるからである。このような不自然なコード進行は通
常、使用者の望むようなコード進行とは考えられない。
Therefore, it is very preferable to add a function for reducing the chord progression selection work of the user to the above automatic chord adding device. In that case, it is desirable that this function has the ability to guarantee the naturalness of the chord progression to be selected. This is because the addable chord candidates extracted by the melody analyzing means are valid in terms of music knowledge when the melody section is used as a unit, but the chord candidates are relatively long because they are arbitrarily connected. This is because, if a chord progression for a melody is generated, an unnatural chord progression may be obtained as a whole. Such unnatural chord progressions are usually not considered chord progressions as desired by the user.

[発明の目的] したがって、この発明の目的はメロディの分析によっ
て、区間ごとに複数のコード候補を付加可能として判別
する可能性のある自動コード付加装置において、判別さ
れたコード候補の列によって形成される多数のコード進
行の組み合わせの全体としてなかから、自然なコード進
行を自動的に選択することができ、使用者側のコード進
行の選択作業を軽減させることのできる自動コード付加
装置を提供することである。
[Object of the Invention] Therefore, an object of the present invention is to form a sequence of discriminated chord candidates in an automatic chord adding device that may discriminate a plurality of chord candidates can be added for each section by analyzing a melody. To provide an automatic chord adding device capable of automatically selecting a natural chord progression from among a large number of chord progression combinations as a whole and reducing the chord progression selection work on the user side. Is.

[発明の要点] この発明は上記の目的を達成するため、与えられたメ
ロディを分析して、個々のメロディ区間に対して付加可
能なコード候補を判別するメロディ分析手段を備える自
動コード付加装置において、個々のメロディ区間に対し
て付加可能と判別された各コード候補がメロディの調に
対してもつ調性の距離を測定し、その測定結果に従っ
て、コード候補のなかの1つのコードを選択するよにし
たことを特徴とする。
[Summary of the Invention] In order to achieve the above object, the present invention provides an automatic chord adding device provided with a melody analyzing means for analyzing a given melody to determine chord candidates that can be added to each melody section. , Measure the distance of the tonality of each chord candidate determined to be able to be added to each melody section with respect to the melody tone, and select one chord among the chord candidates according to the measurement result. It is characterized by having done.

[発明の作用、展開] 請求項1によれば、距離測定手段により、メロディの
調と各コード候補との調性の距離が測定され、コード決
定手段により、メロディ区間のコード候補のうちで、1
つのコードが距離測定手段の測定結果に基づいて選択さ
れる。したがって、生成されるコード進行(区間当り1
つのコードを次々と連結した情報)は調性の距離の点で
一貫性のあるものとなり、自然さを備えている。このた
め、使用者は多数の組み合わせのなかから1つのコード
進行を選択する作業を行う必要はなくなり、所期の目的
が達成される。
[Operation and Development of the Invention] According to claim 1, the distance measuring means measures the distance between the melody key and the tonality of each chord candidate, and the chord determining means selects one of the chord candidates in the melody section. 1
One code is selected based on the measurement result of the distance measuring means. Therefore, the chord progression generated (1 per interval
The information obtained by connecting one chord to another) is consistent in terms of tonality distance and has naturalness. Therefore, the user does not need to select one chord progression from among many combinations, and the intended purpose is achieved.

請求項2は上記距離測定手段が参照するメロディの調
の情報を提供する手段の好ましい構成例に関している。
それによれば、メロディの調はメロディ分析手段の抽出
したコード候補の全体の分布に基づいて判別される。例
えば、抽出されたコード候補のなかで最も頻度の高いコ
ード候補によりメロディの調が決定される。
The second aspect relates to a preferred configuration example of the means for providing the melody key information referred to by the distance measuring means.
According to this, the tone of the melody is determined based on the entire distribution of the chord candidates extracted by the melody analysis means. For example, the tone of the melody is determined by the chord candidate having the highest frequency among the chord candidates extracted.

メロディの調の情報提供は他の手段でも実現でき、使
用者から直接、メロディの調を入力してもよいし、メロ
ディ分析手段の結果を参照することなく独立に調を判別
する手段によってもよい。ただし、前者の場合は、使用
者から誤ったメロディの調が入力されるおそれがあり、
後者の場合は、調判別手段の処理が複雑になる。
The provision of information about the key of the melody can be realized by other means, and the key of the melody may be directly input from the user, or may be independently determined without referring to the result of the melody analysis means. . However, in the case of the former, the user may input an incorrect melody key,
In the latter case, the processing of the key discrimination means becomes complicated.

請求項3はコード進行の選択のためのより好ましい構
成例に関している。それによれば、メロディの調とメロ
ディの各区間に付加するコードとの調性の距離(第1の
調性距離)を制限する第1パラメータと、前記のコード
間の調性距離(第2の調性距離)を制限する第2パラメ
ータとを入力する入力手段とともに、メロディ分析手段
により抽出された前後のコード候補間の調性距離(第2
の調性距離)を測定する第2距離測定手段とが追加され
る。そして、コード決定手段はコード候補に対し、第1
の調性距離を測定する手段と第2の調性距離を測定する
手段からの測定結果のうちで、上記第1パラメータと第
2パラメータの指定する距離条件に合うような測定結果
をもたらしたコード候補を最終的に付加すべきコードと
して決定する。
Claim 3 relates to a more preferred configuration example for chord progression selection. According to this, a first parameter that limits the tonality distance (first tonality distance) between the melody key and the chord added to each section of the melody, and the tonality distance between the chords (second tonality). The tonality distance between the chord candidates before and after extracted by the melody analysis means (second
And a second distance measuring means for measuring the tonality distance of the. Then, the code determining means selects the first code from the code candidates.
Of the measurement results from the means for measuring the tonality distance and the means for measuring the second tonality distance, a code that yields a measurement result that meets the distance condition specified by the first parameter and the second parameter. The candidate is finally determined as the code to be added.

この構成において、第1パラメータは全体のコード進
行の一貫性に対して寄与し、第2パラメータは前後のコ
ードを連結する場合のつながりの自然さに寄与する。こ
の結果、決定されたコードの列によって規定されるコー
ド進行は全体として自然であるばかりか局所的にも自然
なものになる。
In this configuration, the first parameter contributes to the consistency of the overall chord progression, and the second parameter contributes to the naturalness of the connection when connecting the chords before and after. As a result, the chord progression defined by the determined sequence of chords is not only natural as a whole, but also locally.

さらに、この構成の場合、第1パラメータと第2パラ
メータは使用者にとって極めて簡単なコード進行指示入
力の情報となるので区間ごとにコードを選択するという
面倒な作業から使用者を開放できるとともに、第1パラ
メータと第2パラメータの設定次第によって生成される
コード進行が変わるので、より使用者に適したコード信
号を与えることが可能となる。
Furthermore, in the case of this configuration, since the first parameter and the second parameter serve as extremely simple chord progress instruction input information for the user, the user can be freed from the troublesome work of selecting chords for each section. Since the chord progression generated changes depending on the setting of the first parameter and the second parameter, it becomes possible to provide a chord signal more suitable for the user.

請求項4によれば、距離測定手段により、前のメロデ
ィ区間に対して付加可能とされたコード候補と各コード
候補との調性の距離が測定され、コード決定手段によ
り、メロディ区間のコード候補のうちで、1つのコード
が距離測定手段の測定結果に基づいて選択される。した
がって、生成されるコード進行(区間当り1つのコード
を次々と連結した情報)は調性の距離の点で一貫性のあ
るものとなり、自然さを備えている。このため、使用者
は多数の組み合わせのなかから1つのコード進行を選択
する作業を行う必要はなくなり、所期の目的が達成され
る。
According to claim 4, the distance measuring means measures the tonality distance between each chord candidate and the chord candidate that can be added to the preceding melody section, and the chord deciding means determines the chord candidate in the melody section. Among them, one code is selected based on the measurement result of the distance measuring means. Therefore, the generated chord progression (information in which one chord is successively connected per section) is consistent in terms of tonality distance and has naturalness. Therefore, the user does not need to select one chord progression from among many combinations, and the intended purpose is achieved.

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

<全体構成> 本実施例に係る自動コード付加装置の全体構成を第1
図に示す。1はCPUであり、コード付加のための全体的
な制御を行う。ワークメモリ2はコードデータ等を一時
記憶するのに用いられる。入力装置3はメロディデータ
の入力、調性距離の指定等に用いられる。メロディ入力
装置としては、例えば鍵盤(リアルタイム入力)が使用
できる。モニター4はCRT、楽音形成回路、サウンドシ
ステム等から構成され、メロディとコード(伴奏)の表
示、出力等を行う。入力装置3から入力されたメロディ
データはメロディデータメモリ5に記憶される。プロダ
クションルールデータメモリ6には、コード候補とメロ
ディの特徴(音程の進行、和声音の位置等)が与えられ
たときにメロディに含まれる非和声音を分類する音楽知
識を表現するデータ(プロダクションルール)が記憶さ
れる。コード構成音メモリ7には各コードタイプのコー
ド構成音データが記憶される。
<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. The input device 3 is used for inputting melody data, designating a tonality distance, and 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 melody and chord (accompaniment). The melody data input from the input device 3 is stored in the melody data memory 5. In the production rule data memory 6, data expressing musical knowledge for classifying non-harmonic sounds included in a melody (production rule when a chord candidate and melody characteristics (pitch progression, position of harmonic sound, etc.) are given. ) Is stored. The chord component sound memory 7 stores chord component sound data of each chord type.

本実施例の自動コード付加装置はメロディのそれぞれ
の区間(小節)に対してメロディの分析を行って各区間
のメロディに付加可能なコードを抽出する機能を備えて
いる。具体的には、この機能は非和声音を分類する知識
(プロダクションルールで表現される)を有しており、
メロディの各区間に対して、すべてのコードのそれぞれ
についてのその付加の可否を調べるため、仮定したコー
ドからメロディを和声音(コード構成音)とコード構成
外音とに分け、各コード構成外音の性格(非和声音の種
類)を分析すべく、各コード構成外音の前後のメロディ
の状況を関数で計算し、その状況に非和声音分類知識を
適用する。仮定したコードが正しいとき(付加可能なコ
ード候補のとき)は、すべてのコード構成外音の性格が
特定できるが、正しくないときには分類できない(違法
音)が検出される。したがって、分類できない音が検出
されたときはそのコードの仮定を誤りとすることによ
り、付加できないコードを除外することができる。
The automatic chord adding device of this embodiment has a function of analyzing a melody for each section (bar) of the melody and extracting a code that can be added to the melody of each section. Specifically, this feature has knowledge (expressed in production rules) to classify non-harmonic sounds,
In order to check whether each chord can be added to each section of the melody, the melody is divided into chord sounds (chord constituent tones) and chord constituent tones in order to check whether each chord is added or not. In order to analyze the character (type of non-harmonic sound), the situation of the melody before and after each chord-composing sound is calculated by a function, and the non-harmonic classification knowledge is applied to the situation. When the hypothesized chord is correct (when it is a chord that can be added), the characteristics of all external sounds constituting the chord can be specified, but when it is incorrect, unclassifiable sounds (illegal sounds) are detected. Therefore, when a sound that cannot be classified is detected, it is possible to exclude a code that cannot be added by making an error in the assumption of that code.

このようにして得られる不可能なコード候補の数は1
区間に付き、複数になり得る。したがって、この情報を
自動コード付加装置の最終結果としたのでは、使用者は
コード進行を得るために、コードの選択を区間ごとに行
わなければならず、その作業が大変になる。
The number of impossible code candidates obtained in this way is 1
There can be more than one for each interval. Therefore, if this information is used as the final result of the automatic chord adding device, the user has to select chords for each section in order to obtain chord progression, which makes the work difficult.

そこで本実施例には使用者からの簡単な操作によって
入力される情報を受け、それに従って、1区間に付き1
つのコードをコード候補のなかから自動的に選択する機
能が付加されている。詳細には、上記入力情報として、
入力装置3から、メロディの調と各区間のコードとの調
性距離に対する指示情報(後述するRG)と前後のコード
間の調性距離に対する指示情報(後述するCG)とが入力
される。一方、実施例のCPU1では各区間に対して抽出し
たコード候補のかで最も頻度の高いコード候補に対応す
る調をメロディの調として判別し、この調と各区間のコ
ード候補との調性距離を測定するとともに、前後の区間
に対するコード候補間の調性距離を測定する。そして入
力装置3より指示された調性距離と最もよく一致する調
性距離の測定値を捜し出し、その測定値をもたらしたコ
ード候補を最終結果のコードとして選択するようにして
いる。
Therefore, in the present embodiment, information input by a simple operation from the user is received, and 1 section per section is accordingly received.
A function to automatically select one code from code candidates is added. In detail, as the above input information,
From the input device 3, the instruction information (RG described later) for the tonality distance between the melody key and the chord of each section and the instruction information (CG described later) for the tonality distance between the preceding and following chords are input. On the other hand, in the CPU 1 of the embodiment, the key corresponding to the most frequent code candidate among the chord candidates extracted for each section is determined as the melody key, and the tonality distance between this key and the chord candidate of each section is determined. In addition to the measurement, the tonality distance between the code candidates for the front and back sections is measured. Then, the measurement value of the tonality distance that best matches the tonality distance designated by the input device 3 is searched for, and the code candidate that brings the measurement value is selected as the code of the final result.

<全体動作> 第2図に本実施例のゼネラルフローを示す。まず、2
−1でCPU1はメロディデータメモリ5のメロディデータ
とプロダクションルールデータメモリ6のプロダクショ
ンルールデータをワークメモリ2に読み込む(なお、入
力装置3からの調性距離に関する指示情報RG、CGについ
てはすでに読み取られているものとする)。次に2−2
で小節ごとに非和声音分析を行って、使用可能なコード
候補を判別する。2−3ではこの使用可能と判別された
コード候補に対して、コード別にその出現頻度を算出す
る。続いて2−4で出現頻度のなかで最大頻度をもつコ
ード候補を捜し出してメロディの調を決定する。最後に
2−5で調と各小節のコード候補との測定距離と前後の
コード候補間の測定距離を測定し、その測定値のうち
で、指定されている調性距離のパラメータRG、CGに最も
よく一致する測定値を捜し出し、その測定値を与えたコ
ード候補を1小節毎に1つずつ見つけていってコード進
行を生成する。
<Overall Operation> FIG. 2 shows a general flow of this embodiment. First, 2
At -1, the CPU 1 reads the melody data in the melody data memory 5 and the production rule data in the production rule data memory 6 into the work memory 2 (note that the instruction information RG and CG regarding the tonality distance from the input device 3 has already been read. Be assumed). Next 2-2
The non-harmonic sound analysis is performed for each measure, and the usable chord candidates are determined. In 2-3, the appearance frequency of each code candidate determined to be usable is calculated for each code. Then, in 2-4, the chord candidate having the maximum frequency among the appearance frequencies is searched for to determine the key of the melody. Finally, in 2-5, measure the measurement distance between the chord and the chord candidate of each measure, and the measurement distance between the chord candidates before and after, and use the measured values for the specified tonality distance parameters RG and CG. The chord progression is generated by finding the best matching measurement value, finding the chord candidate given the measurement value one by one.

<データ形式> 第3図は以下のフローで用いるメロディデータとコー
ドデータのフォーマット例を示したものである。この例
では、メロディデータは音高データと音長データの列で
表現され、音高データは、16ビット長で上位8ビットが
オクターブを表わし、下位8ビットがCを“0"として半
音ごとに1インクリメントする整数値で表現される、音
長データは最短の音長を“1"とし、その倍の音長は“2"
というような整数値で表わされる。
<Data Format> FIG. 3 shows a format example of melody data and chord data used in the following flow. 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. Expressed by an integer value that is incremented by 1, the shortest note length is set to "1" and doubled note length is "2".
It is represented by an integer value such as.

一方、コードデータは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 of 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 (a song of Beethoven's joy) stored in the melody data memory 5. As a result of the processing in FIG. 5, the i-th pitch data is stored in MDi, the i-th pitch data is stored in MRi, and the total number of melody sounds is stored in MDNO.

<プロダクションルールデータの読み込み> ゼネラルフローの2−1内で実行されるプロダクショ
ンルールーデータの読み込みの詳細を第7図に示す。第
6図の(a)にはプロダクションルールデータメモリ6
に記憶されるプロダクションルールデータ例が示されて
いる。
<Reading Production Rule Data> Details of reading the production rule data executed in 2-1 of the general flow are shown in FIG. The production rule data memory 6 is shown in FIG.
An example of production rule data stored in FIG.

プロダクションルールの全体は、メロディに含まれる
非和声音を分類するための音楽知識(第6図(b)、
(c)参照)を表現したものであり、各プロダクション
ルールデータは、ルールの前提部を規定するデータとし
て下限データLi、関数の種類を指示する関数指示データ
Xi、上限データUiを有し、ルールの結論部としてデータ
YiとNiを有する。関数は分析するメロディの特徴を数値
表現したもので、その例は後述する第14図に示される。
データXiで示される関数の値FxiがLi以上でかつUi以下
である(Li≦Fxi≦Ui)というのがプロダクションルー
ルの前提部(命題)であり、この前提部が成立するとき
の結論がデータYiで示され、この前提部が不成立のとき
の結論がデータNiで示されている。そして、データYiま
たはNiが正の値をもつときは、その値が後述する前向推
論において次に参照すべきプロダクションルールの番号
を示し、負の値をもつときは、その絶対値によって非和
声音の種類が表現される。前向推論は必ず1つのルール
から開始され、このルールのことをルールと呼ぶ。負の
値をもつ結論YiまたはNiをみつけたときに前向推論は終
了する。この負の値のなかに、第6図(a)にillで示
す違法な音(どの非和声音にも該当しない音)を表わす
データが含まれる。後述するように、このような違法な
音が推論の結論になったときは、推論の前提であるコー
ドの仮定に誤りがあると考えて、そのコードをロディに
付加できないコードと判定している。
The entire production rule is based on music knowledge for classifying non-harmonic sounds included in a melody (Fig. 6 (b),
(See (c)), and each production rule data is the lower limit data Li as the data that defines the preamble of the rule, and the function instruction data that indicates the type of function.
Xi, upper limit data Ui, and data as the conclusion part of the rule
It has Yi and Ni. The function is a numerical representation of the characteristics of the melody to be analyzed, an example of which is shown in FIG. 14 described later.
It is a premise (proposition) of the production rule that the value Fxi of the function represented by the data Xi is equal to or more than Li and equal to or less than Ui (Li ≦ Fxi ≦ Ui), and the conclusion when this premise is satisfied is data It is indicated by Yi, and the conclusion when this premise is not satisfied is indicated by 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 rule. 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. 6 (a). As will be described later, when such an illegal sound comes to the conclusion of inference, it is considered that the assumption of the chord, which is the premise of inference, is incorrect, and it is determined that the chord cannot be added to the rody. .

第6図に示すプロダクションルールデータのアドレス
割当の場合、各プロダクションルールのデータは下限デ
ータ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. 6, 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.
However, the data of Xi is stored in the address of the remainder 2 divided by 5, Ui is stored in the address of the remainder 2, Yi is stored in the address of the remainder 3, and Ni is stored in the address of the remainder 4.

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

<コード判定> 第2図のゼネラルフローの2−2で実行されるコード
判定のフローを第8図に示す。
<Code Judgment> FIG. 8 shows a flow of code judgment executed in 2-2 of the general flow of FIG.

まず25−1で小節の番号BARを“1"に所期化し、25−
2でBARの示す小節のメロディデータの開始位置Psと終
了位置Peを求める。25−3でコードの根音ROOTを所期化
し、25−4でコードのタイプTYPEを所期する。そして、
25−5では小節の開始位置Psから終了位置Peまでのメロ
ディデータに対し、ROOTとTYPEとに規定されるコードを
仮定したときの非和声音分析を行う。この分析結果は25
−6でチェックされ、分析結果のなかに分類不可(違法
音)を示す音が1つも含まれないときOK(付加可能)と
なる。OKのときのみ、スタックCSTKにそのときの根音の
データROOTとタイプのデータTYPEをプッシュしておく
(25−7、25−8)。したがって、付加可能なコードは
スタックCSTKには記録されない。この処理をBARの示す
小節に対してすべてのコードについて繰り返し実行する
(25−9、25−10、25−11、25−12)。1小節のメロデ
ィに対して付加可能なコードをすべて抽出したら、1小
節の区切りを表わす識別マーク(区切りマーク)をスタ
ックCSTKにプッシュしておく(25−13)。そして、以上
の処理をすべての小節に対して行い(25−14、25−1
5)、全小節が完了したら、endマークをスタックにプッ
シュしておく(25−16)。
First, in 25-1, the bar number BAR of the measure is expected to be "1", and 25-
In step 2, the start position Ps and end position Pe of the melody data of the bar indicated by BAR are obtained. In 25-3, the root ROOT of the chord is expected, and in 25-4, the chord type TYPE is expected. And
In 25-5, the non-harmonic sound analysis is performed on the melody data from the start position Ps to the end position Pe of the bar assuming the chords defined by ROOT and TYPE. 25 results
If it is checked in -6 and the analysis result does not include any sound indicating unclassifiable (illegal sound), it is OK (addable). Only when OK, the root ROOT data ROOT and the type data TYPE at that time are pushed to the stack CSTK (25-7, 25-8). Therefore, the appendable code is not recorded in the stack CSTK. This process is repeated for all the chords for the bar indicated by BAR (25-9, 25-10, 25-11, 25-12). When all the chords that can be added to the one-measure melody have been extracted, an identification mark (separation mark) representing the one-measure break is pushed onto the stack CSTK (25-13). Then, the above processing is performed for all measures (25-14, 25-1).
5) When all measures are completed, push the end mark onto the stack (25-16).

この結果、スタックCSTKには先頭から始めて第1小節
に対して付加可能なすべてのコードがROOTとTYPEの対で
順次記憶され、区切りマークを挟んで第2小節に対して
付加可能なコードのデータが続き、以下同様にして、最
後の区切りマークの後、endマークが付いている。
As a result, all codes that can be added to the first measure are sequentially stored in the stack CSTK in pairs of ROOT and TYPE starting from the beginning, and the code data that can be added to the second measure across the delimiter mark. , And so on, followed by the end mark after the last delimiter mark.

<メロディ小節の選択> 第8図の25−2で実行されるメロディの小節位置の選
択の詳細を第9図から第11図に示す。この処理により、
Psには、着目している小節の最初の音符がメロディデー
タ{MDi}、{MRi}の何番目のデータであるかが入り、
Peには着目している小節の次の小節の最初の音符よりひ
とつの前の音符がメロディデータの何番目のデータであ
るかが入る。このPsとPeの情報は、次に述べる非和声音
分析処理25−5内において、調査すべきメロディデータ
の範囲を規定する。
<Selection of Melody Bar> Details of selection of the bar position of the melody executed in 25-2 of FIG. 8 are shown in FIGS. 9 to 11. With this process,
In Ps, the number of the melody data {MDi}, {MRi} of the first note of the bar of interest is entered,
Pe contains the number of the melody data that is one note before the first note of the measure next to the one of interest. The information of Ps and Pe defines the range of the melody data to be investigated in the non-harmonic sound analysis processing 25-5 described below.

<非和声音分析> 第8図の25−5で実行される非和声音の分析の詳細を
第12図に示す。
<Nonharmonic analysis> Fig. 12 shows the details of the nonharmonic analysis performed in 25-5 of Fig. 8.

まず、33−2で非和声音のカウンタjを初期化し、33
−3でメロディデータの音符カウンタiを着目している
小節の先頭位置Psに設定する。33−4で、着目していi
番目の音符が和声音か否かを判別する。コード候補の構
成音と同音のものは和声音とされる。和声音でないとき
は、非和声音カウンタをインクリメントし(33−5)、
着目している音符を中心とするメロディの特徴要素を表
わす関数Fを計算し(33−6)、プロダクションルール
による前向推論を実行して(33−7)、着目音符につい
ての結論をRSjに代入する(33−8)。音符カウンタi
をインクリメントし(33−9)、着目している小節の最
後の音符Peに到達するまで(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 of the bar of interest. 33-4, paying attention
Determine if the th note is a chord. 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),
The function F representing the characteristic element of the melody centering on the note of interest is calculated (33-6), the forward inference by the production rule is executed (33-7), and the conclusion about the note of interest is set to RSj. Substitute (33-8). Note counter i
Is incremented (33-9), and the process from 33-4 onward is repeated until the last note Pe of the measure of interest is reached (33-10).

上記処理33−4の詳細は第13図に示される。34−1で
は、コードデータをコード構成音データに変換してい
る。この変換は、コードデータの種類データTYPEをポイ
ンタとして、コード構成音メモリ7からC調で表わされ
た構成音データ(例えば、メジャーであれば、00001001
0001)を読み出し、それをコードデータの根音データRO
OTが示す数だけ左に転回することで行われる。34−2で
は、34−1で生成した構成音データCCと同一形式のデー
タにメロディ音高データMDiを変換している。CCΛmm
(論理積)の結果が0でないときはコード構成音のなか
にメロディ音と同じ音が含まれる。すなわち、MDiは和
声音である(34−3、34−5)。CCΛmm=0のときはMD
iは非和声音である(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 TYPE of the chord data as a pointer, and from the chord component tone memory 7 to the component tone data expressed in the C tone (for example, 00001001 for major).
0001) and read it as root data RO of chord data.
It is performed by turning to the left by the number indicated by OT. In 34-2, the melody pitch data MDi is converted into data having the same format as the constituent sound data CC generated in 34-1. CCΛmm
When the result of (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). MD when CC Λ mm = 0
i is a non-harmonic sound (34-3, 34-4).

第12図のFの計算33−6の詳細を第14図に示す。この
例では関数Fとして、 F1:着目している音符(非和声音)の何個先に和声音が
位置するか(後方和声音の位置) F2:着目している音符の何個手前に和声音が位置するか
(前方和声音の位置) F3:前方和声音から後方和声音までにある非和声音の数 F4:前方和声音と後方和声音との音高差 F5:前方和声音と後方和声音との間における非和声音の
高さの分布 F6:前方和声音から後方和声音までのメロディの音高が
単調に変化するか否か F7:後方和声音とその1つ前の音との音高差(後方和声
音への音程進行) F8:前方和声音とのそ1つの者との音高差(前方和声音
からの音程進行) を計算している。この他に、弱拍か強拍かを示す情報、
音長を区別する情報を関数Fのセットに加えてもよい。
個々の関数Fの算出のフローチャート(第15図〜第22
図)はそれ自体の記載から明らかであるので説明は省略
する。
Details of calculation 33-6 of F in FIG. 12 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 or harmonic sound is located (position of the front harmonic tones) F 3: number F of nonharmonic tones in the front harmonic tones to the rear harmonic tone 4: pitch difference between the front harmonic sound and rear harmonic tones 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 note (pitch progression to the rear chord) F 8 : Calculate the pitch difference with the other person from the front chord (pitch progression from the front chord) There is. Besides this, information indicating weak or strong beats,
Information that distinguishes note lengths may be added to the set of functions F.
Flowchart of calculation of each function F (Figs. 15 to 22)
(Fig.) Is clear from the description of itself, and therefore its explanation is omitted.

第12図の33−7における前向推論の詳細を第23図に示
す。まず、ルールナンバーポインタ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)。
The details of the forward reasoning in 33-7 of FIG. 12 are shown in FIG. First, the rule number pointer P is set to "1" which indicates the root rule among 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 and values, the final conclusion has been reached, so the absolute value (−Yp, −Np) is used as the conclusion register as an identifier of the type of dissonant sound or an identifier of illegal sound. 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 a rule number pointer, and when P is negative, -P is classified as a non-harmonic sound. The result (44-8, 44
-9).

<頻度カウント、調決定> ゼネラルフロー(第2図)の2−3で行われる付加可
能なコード候補の頻度カウント処理の詳細を第24図に示
す。この処理は2−4で行われる調決定のための前処理
である(本実施例では、処理2−2で得た付加可能なコ
ード候補のうち最大の頻度をもつコード候補をメロディ
の調として決定している)。
<Frequency Counting and Key Determination> FIG. 24 shows details of the frequency counting process of the code candidates that can be added, which is performed in 2-3 of the general flow (FIG. 2). This processing is a pre-processing for key determination performed in 2-4 (in the present embodiment, the chord candidate having the highest frequency among the chord candidates that can be added in the processing 2-2 is set as the melody key. Has been decided).

上述したように、2−3の処理によりスタックCSTK上
はROOTデータの後にTYPEデータが続き、この対でコード
が規定され、TYPEデータの後にはROOTデータ(1小節内
に付加可能なコードが残っている場合)または区切りデ
ータが続き、区切りデータの次にはROOTデータ(次小節
がある場合の次小節に対して付加可能なコードの根音)
またはendマークが続いている。したがって、根音d1
タイd2のコードをカウントするための変数Dd1、d2を用
意しておき、スタックCSTKを先頭からendマークまで走
査し、その間で、ROOTデータとTYPEデータの対を読み取
るごとに対応するカウンタDd1、d2をインクリメントし
ていけば、コード候補の頻度がコード別に得られること
になる。第24図はこれに従ったフローであり、47−4で
NOとなるときは47−2で読んだスタックのデータd1がRO
OTデータのときである。ROOTデータの次は必らずTYPEデ
ータが続くので、これを読み取ったデータd2(47−5)
と先のデータd1で指示されるコードカウンタDd1、d2
インクリメントしている(47−6)。endマークを読み
取ったら、処理完了である(47−3)。
As described above, the TYPE data follows the ROOT data on the stack CSTK by the processing of 2-3, and the code is defined by this pair, and the ROOT data (the code that can be added remains in one bar remains after the TYPE data. If there is a next measure, the ROOT data (if there is a next measure, the root note of the chord that can be added to the next measure)
Or end mark continues. Therefore, the root note d 1 ,
Prepare variables Dd 1 and d 2 for counting the code of tie d 2 , scan the stack CSTK from the beginning to the end mark, and in the meanwhile, correspond to each pair reading of ROOT data and TYPE data. By incrementing Dd 1 and d 2 , the frequency of code candidates can be obtained for each code. Figure 24 shows the flow according to this.
When it becomes NO, the stack data d 1 read in 47-2 is RO
This is for OT data. TYPE data always follows ROOT data, so read data d 2 (47-5)
The code counters Dd 1 and d 2 indicated by the data d 1 are incremented (47-6). When the end mark is read, the processing is complete (47-3).

第25図は以上のようにした得た頻度テーブル
{DROOTTYPE}上で最大の頻度をもつコードを捜し出
して調を決定するフローを示したもので、ゼネラルフロ
ーの処理2−4の詳細である。48−1でmaxを初期化
し、48−2、48−3、48−8、48−9、48−10、48−11
とその関係するループからわかるように、すべての根音
ROOT、タイプTYPEを走査しており、走査の途中で、現在
のROOT、TYPEのコードの頻度カウントDROOTTYPEが、
それまでの最大の頻度maxより高い値を示しておれば(4
8−4)、その値でmaxを更新するとともに(48−5)、
そのときのROOTとTYPEのデータをそれぞれRとTに代入
している。(48−5、48−7)。したがって、第25図の
処理の結果、RとTにはそれぞれ、最大頻度のコードの
根音とタイプの情報が設定され、これによりメロディの
調が決定されたことになる。例えばRがCの音名で、T
がメジャーのタイプを示しているのであれば、Cの長調
がメロディの調であり、RがCでTがマイナーならCの
短調がメロディの調である。
FIG. 25 shows a flow for finding the chord having the maximum frequency on the frequency table {D ROOT , TYPE } obtained as described above and determining the key. Details of the processing 2-4 of the general flow Is. Initialize max at 48-1, 48-2, 48-3, 48-8, 48-9, 48-10, 48-11
And all the root sounds, as you can see from its related loops
Scanning ROOT, type TYPE, and in the middle of scanning, the frequency count D ROOT , TYPE of the code of the current ROOT , TYPE ,
If the value is higher than the maximum frequency max until then (4
8-4), while updating max with that value (48-5),
The ROOT and TYPE data at that time are substituted into R and T, respectively. (48-5, 48-7). Therefore, as a result of the processing of FIG. 25, the root note and type information of the chord with the highest frequency are set in R and T, respectively, and the key of the melody is determined by this. For example, R is the note name of C, and T
Indicates a major type, C major is the melody key, and R is C and T is minor, the C minor is the melody key.

<コード進行決定> ゼネラルフローの2−5で実行されるコード進行の決
定処理の詳細を第26図に示す。
<Chord Progression Decision> FIG. 26 shows details of chord progression decision processing executed in 2-5 of the general flow.

図示のフローに入る段階でスタックCSTKには先頭から
endマークのアドレスの間に、小節線の区切りマークを
挟んで、小節順にそれぞれの小節に対して付加可能と判
定されたすべてのコード候補が、根音ROOTとタイプTYPE
の2つのデータ対の形式で並べられている。また、Rと
Tには調に対応するコード(調決定コード)の根音とタ
イプのデータが設定されている。さらに、RGとCGには入
力装置3から入力された調と各小節のコードとの調性距
離を制限するパラメータと隣り合うコード間の調性距離
を制限するパラメータとがそれぞれ設定されている。図
示のフローはこれらの情報を基に、1通りのコード進行
{CDBAR}を生成するものである。
From the beginning to the stack CSTK at the stage of entering the flow shown in the figure
All chord candidates that are judged to be able to be added to each bar in order of bars with a bar line delimiter between the end mark addresses are root root and type TYPE.
Are arranged in the form of two data pairs. Further, the root note and type data of the chord (key decision code) corresponding to the key are set in R and T. Further, a parameter for limiting the tonality distance between the key input from the input device 3 and the chord of each measure and a parameter for limiting the tonality distance between adjacent chords are set in RG and CG, respectively. The flow shown in the figure generates one chord progression {CD BAR } based on these pieces of information.

第26図において、minは小節のメロディに対して付加
可能なすべてのコード候補のそれぞれについて次の計算 ||dist1|−RG|+||dist2|−CG| を行った場合の最小値を記憶するための変数であり、新
しい小節を調べる都度、初期化される。上記式におい
て、dist1はコード候補の調(R、T)からの調整距離
の測定値であり、dist2は現コード候補の前コードから
の調性距離の測定値である。最小値を与えたときのコー
ド候補の根音d1とタイプd2がそれぞれROOTとTYPEに記憶
され、そのときの小節番号用のコードを記憶するための
変数CDBARに移される。
In FIG. 26, min is the minimum value when the following calculation || dist1 | −RG | + || dist2 | −CG | is performed for each chord candidate that can be added to the melody of the bar. This is a variable to be set and is initialized each time a new measure is checked. In the above equation, dist1 is a measurement value of the adjustment distance from the key (R, T) of the code candidate, and dist2 is a measurement value of the tonality distance from the previous code of the current code candidate. The root note d 1 and the type d 2 of the chord candidate when the minimum value is given are stored in ROOT and TYPE, respectively, and are transferred to the variable CD BAR for storing the chord for the bar number at that time.

説明を加えると、49−7に進むときは、49−4で読ん
だスタックCSTKのデータ(d1に入っている)がendマー
クでも区切りマークでもないときであり、スタックCSTK
上のデータの記憶の順番も考慮すれば、データd1は根音
のデータである。したがって49−7でその次のアドレス
にあるタイプのデータをd2に読みとっている。したがっ
て(d1、d2)によりコード候補が示される。そこで、次
の49−8で調(R、T)とこのコード候補(d1、d2)と
の調性距離を後述の仕方で測定してdist1にセットし、4
9−9で前小節の確定コードと現小節のコード候補
(d1、d2)との調性距離を同様にして測定してdist2に
セットし、40−10で上述した ||dist1|−RG|+||dist2|−CG| を計算してaに代入している。そして、aの値とminの
値を49−11で比較し、今回のaの方向が小さければ、mi
nにaを代入し、そのときの根音d1とタイプd2をそれぞ
れROOTとTYPEに代入する(49−12〜49−14)。
To add to the explanation, when going to 49-7, the data of stack CSTK (in d 1 ) read in 49-4 is neither the end mark nor the delimiter mark.
Considering the storage order of the above data, the data d 1 is root data. Therefore, at 49-7, the data of the type at the next address is read at d 2 . Therefore, (d 1 , d 2 ) indicates a code candidate. Therefore, in the next 49-8, the tonality distance between the key (R, T) and this code candidate (d 1 , d 2 ) is measured by the method described later and set in dist1, and 4
In 9-9, the tonality distance between the definite chord of the previous bar and the chord candidate (d 1 , d 2 ) of the current bar is measured in the same manner and set to dist2, and in the above 40-10, || dist1 |- RG | + || dist2 | -CG | is calculated and assigned to a. Then, the value of a and the value of min are compared in 49-11, and if the direction of a this time is small, mi
Substitute a for n, and substitute root note d 1 and type d 2 at that time for ROOT and TYPE, respectively (49-12 to 49-14).

スタックCSTK上のデータは区切りマークから区切りマ
ークまでの間に1小節に付加可能なすべてのコード候補
のデータが入っている。したがって、49−6で区切りマ
ークが検出された時点で、ROOTとTYPEにはBARで示され
る小節に対して付加可能なすべてのコード候補のうち
で、上述した式の値を最小にするコード候補、すなわ
ち、使用者の指定した調とコードとの調性距離と、前コ
ードからの調性距離に関する指示条件(RG、CG)に最も
よく合うコード候補の根音とタイプのデータが入ってい
る。これは小節番号Barのメロディに対して決定したコ
ードにほかならない。そこで、49−15に進み、次の小節
の検査のためにminを再初期化と、49−16で小節番号Bar
をインクリメントし、ROOTとTYPEのデータを前コードの
根音とタイプとしてOLDROOTとOLDTYPEに移す処理(49−
17、49−18)を実行するとともに、49−19でROOTとTYPE
からコードデータを得、配列の要素CDBAR-1に代入して
いる。
The data on the stack CSTK contains all the code candidate data that can be added to one bar between the delimiter marks. Therefore, when the delimiter mark is detected in 49-6, among the code candidates that can be added to the measure indicated by BAR in ROOT and TYPE, the code candidate that minimizes the value of the above expression. That is, it contains the root note and type data of the chord candidate that best fits the tonality distance between the chord and the chord specified by the user and the instruction condition (RG, CG) regarding the tonality distance from the previous chord. . This is the chord decided for the melody of bar number Bar. So, proceed to 49-15, re-initialize min to check the next measure, and measure the bar number Bar at 49-16.
To move the ROOT and TYPE data to OLDROOT and OLDTYPE as the root note and type of the previous chord (49-
17, 49-18), and at 49-19 ROOT and TYPE
The code data is obtained from and is assigned to the array element CD BAR-1 .

この結果、第26図の処理を完了した時点で配列{CD
BAR}にはメロディの全体に対する1通りのコード進行
を表わす情報が入っていることになる。
As a result, the array {CD
BAR } contains information indicating one chord progression for the entire melody.

<調性の距離の測定> コード進行決定フロー(第26図)の49−8と49−9で
行われる調性の距離の測定の詳細を第27図に示す。第28
図は第27図のフローで使用しているコード間の調性距離
の定義を表わす。この図からわかるように、平行調の関
係にあるコード(例えばAmとc)間の調性距離はゼロで
ある。また、基準から完全5度上のコードの基準からの
調性距離は−2とし、基準から完全5度下のコードの調
性距離は+2としている。
<Measurement of tonality distance> Figure 27 shows the details of the tonality distance measurement performed at steps 49-8 and 49-9 in the chord progression determination flow (Figure 26). 28th
The figure shows the definition of the tonality distance between the chords used in the flow of FIG. As can be seen from this figure, the tonality distance between the chords in parallel relation (for example, Am and c) is zero. Further, the tonality distance from the reference of the code completely 5 degrees above the reference is -2, and the tonality distance of the code 5 degrees below the reference is +2.

第27図の50−1において、stには基準のコードの根音
データが入る。ここに基準のコードとは49−8(第26
図)の場合には、調決定コード(R、T)のことであ
り、49−10の場合には前小節のコード(OLDROOT、OLDTY
PE)のことである。また、50−1ではa1とa2に測定され
るコードの根音データ、すなわち、49−8、49−9で測
定しようとしているコードの根音データd1がセットされ
る。50−5に示すように、a1の根音データは50−3〜50
−6のループ一周するたびに、5度上に転回され、a2
音データは5度下に転回される(第28図に示すリングを
反時計回り、または時計回りすることに相当する)。50
−3において、a1=stが成立するのは測定すべきコード
の根音をi回5度上に転回したときであり、50−4にお
いてa2=stが成立するのは測定すべきコードの根音をi
回5度下に転回したら基準のコードの根音に一致したと
きである。したがって前者に対してはxに調整距離とし
てi×2を入れ(50−7)、後者に対してはxにi×
(−2)を入れる。ここまででxに得られているのは、
基準のコードと測定すべきコードとが共にメジャー系か
共にマイナー系であるときの測定コードの調性距離であ
る。したがって、50−9から50−17までの処理におい
て、両コードの系が異なる場合の距離修正を行ってい
る。例えば基準のコードがAmで測定すべきコードがGmaj
だとすると、50−7によりx=+4になっている。これ
は、第28図の調性距離の定義に例えば、x=−2になら
なければならない。この場合、第28図において、50−10
から50−11、50−13と進み、x=x−6によりx=−2
が得られる。また、基準のコードがCmajで測定すべきコ
ードがBminだとすると、50−8により、x=−10になっ
ているこれは第28図によれば、x=−4にならなければ
ならない。この場合、第50図において、50−14から50−
15、50−17と進み、x=x+6によりx=−4が得られ
る。
In 50-1 of FIG. 27, the root note data of the reference chord is entered in st. The standard code here is 49-8 (26th
In the case of (Fig.), It is the key code (R, T), and in the case of 49-10, the code of the previous measure (OLDROOT, OLDTY).
PE). In 50-1, the root note data of the chord measured in a 1 and a 2 , that is, the root note data d1 of the chord to be measured in 49-8 and 49-9 is set. As shown in 50-5, the root data of a 1 is 50-3 to 50
Each time the loop around -6, is turn on 5 degrees, a 2 root data is turning under 5 degrees (around the ring shown in FIG. 28 counterclockwise, or corresponding to clockwise) . 50
In -3, a 1 = st is satisfied when the root note of the chord to be measured is turned up five times i times, and in 50-4, a 2 = st is satisfied. The root sound of i
It is when it turns to the bottom of the reference chord when turning down 5 times. Therefore, for the former, i × 2 is added to x as the adjustment distance (50-7), and for the latter, i × 2 is added to x.
Insert (-2). Up to this point, what is obtained in x is
It is the tonality distance of the measurement code when the reference code and the code to be measured are both major and minor. Therefore, in the processing from 50-9 to 50-17, distance correction is performed when the systems of both codes are different. For example, the standard code is Am and the code to be measured is Gmaj
If so, x = + 4 due to 50-7. This must be, for example, x = -2 in the definition of the tonality distance in FIG. In this case, in FIG. 28, 50-10
From 50-11 to 50-13, x = -2 by x = x-6
Is obtained. Also, assuming that the reference code is Cmaj and the code to be measured is Bmin, x = -10 is obtained by 50-8. According to FIG. 28, x = -4 must be obtained. In this case, in FIG. 50, 50-14 to 50-
Proceeding to 15, 50-17, x = x + 6 gives x = -4.

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

例えば、メロディの分析として上記実施例では非和声
音の分類知識に基づいて各区間のメロディに対するコー
ドの付加の可否を判別しているが、これと組み合せ、あ
るいはこれの代りに、コードから想定されるアヴェラブ
ルノートスケールと各区間のメロディ構成音との関係に
よってコードの付加の可否を判別する手段、コードの構
成音と区間のメロディの構成音とのマッチングによる手
段等が使用できる。要するに、区間ごときコードの付加
の可否を判別する結果、メロディに付加可能なコードと
して1区間のなかから複数のコード候補を抽出する可能
性をもつ任意のメロディ分析手段に対して本発明を適用
することができる。
For example, as a melody analysis, in the above embodiment, it is determined whether or not a code can be added to the melody of each section based on the classification knowledge of the non-harmonic sounds. However, in combination with this, or in place of this, it is assumed from the chord. It is possible to use a means for determining whether or not a chord can be added based on the relationship between the available note scale and the melody constituent sounds in each section, a means for matching the chord constituent sounds with the section melody constituent sounds, and the like. In short, the present invention is applied to an arbitrary melody analysis unit having a possibility of extracting a plurality of chord candidates from one section as a chord that can be added to a melody as a result of determining whether or not a chord can be added to each section. be able to.

また、上記実施例では、区間のメロディに対して付加
可能と判定されたすべてのコード候補のなかから1つの
コードを自動的に選択するために、メロディの調と各コ
ード候補との調整距離と前後の隣り合うコード候補間の
調性距離とを測定し、これらの調整距離の測定値のうち
で使用者の指定した情報RG、CGに最も良く合う測定値を
与えたコード候補を選択している。これは使用者に希望
するコード進行を容易に提供する上で好ましい構成であ
るが、本発明の上からは上記使用者の指定情報は必ずし
も必要でなく、例えば、RG、CGとして予め定められた値
を用いてもよい。また、調性距離として、前後のコード
の調性距離については考慮しないようにしてもよい。ま
た、メロディの調に関しては、メロディの楽譜等が入手
できる場合には使用者から直接入力するようにしてもよ
いし、あるいは各区間のメロディに付加可能なコード候
補の情報を参照することなしに、調を判別する手段を用
いてもよい。メロディに付加可能なコード候補の情報に
よる調判別手段の別の例として、それぞれのコード候補
を基準と仮定して、残りのコード候補の調整距離を測定
し、プラス側になるコード候補の数とマイナス側になる
コード候補との数が最も良く平衡したときの基準コード
をメロディの調と判定するようにしてもよい。
Further, in the above embodiment, in order to automatically select one chord from all chord candidates determined to be able to be added to the melody of the section, the melody key and the adjustment distance between each chord candidate are set. Measure the tonality distance between adjacent chord candidates before and after, and select the chord candidate that gives the measurement value that best fits the information RG and CG specified by the user from the measured values of these adjustment distances. There is. This is a preferable configuration in order to easily provide the user with a desired chord progression, but the above user specified information is not necessarily required from the viewpoint of the present invention. For example, it is predetermined as RG and CG. You may use the value. Further, as the tonality distance, the tonality distances of the front and rear chords may not be considered. Regarding the tone of the melody, the user may directly input the tone of the melody if the musical score of the melody is available, or without referring to the information of the chord candidates that can be added to the melody of each section. A means for discriminating the key may be used. As another example of the key discrimination means based on the information of the chord candidates that can be added to the melody, assuming each chord candidate as a reference, the adjustment distance of the remaining chord candidates is measured, and the number of chord candidates on the plus side is calculated. The reference chord when the number of chord candidates on the negative side is most balanced may be determined as the melody key.

[発明の効果] 請求項1によれば、与えられたメロディを分析して個
々のメロディ区間に対して付加可能なコード候補を判別
するメロディ分析手段を備える自動コード付加装置にお
いて、付加可能と判定された各コード候補がメロディの
調との間でもつ調性距離を測定し、その測定結果に基づ
き、各コード候補のなかから1メロディ区間に付き1つ
のコードを選択することによってコード進行を得ている
ので、使用者に対し、調性がコントロールされた自然な
コード進行を提供でき、使用者側で行うコード進行の選
択作業を軽減することができるという利点がある。
[Effect of the Invention] According to claim 1, in the automatic chord adding device provided with the melody analyzing means for analyzing the given melody and discriminating chord candidates that can be added to each melody section, it is determined that the chord can be added. The chord progression is obtained by measuring the tonality distance between each chord candidate and the key of the melody and selecting one chord for each melody section from each chord candidate based on the measurement result. Therefore, there is an advantage that the user can be provided with a natural chord progression whose tonality is controlled, and the chord progression selection work performed by the user can be reduced.

請求項2によれば、調判別手段として、上記メロディ
分析手段が付加可能と判別した全コード候補の分布によ
って調を判別する手段を用いているので、請求項1の効
果に加え、調の判別を簡単な構成でしかも確実に得るこ
とができる。
According to the second aspect, since the means for discriminating the key is used as the key discrimination means based on the distribution of all the chord candidates which the melody analyzing means has determined to be addable, in addition to the effect of the first aspect, the discrimination of the key is performed. Can be reliably obtained with a simple configuration.

請求項3によれば、コードとメロディの調との調性距
離を制限するパラメータと前後のコード間の調性距離を
制限するパメータを入力手段から入力可能とし、区間に
対する各コード候補とメロディの調との調性距離を測定
する手段に加え、前後のコード候補間の調性距離を測定
する手段を設け、コード決定手段においては、これらの
測定値のうちで入力された両パラメータの指定する条件
に合うような測定値に対応するコード候補を選択してい
るので、全体的な調性距離だけでなくコード間の調性距
離についても制御された自然で変化に豊むコード進行と
提供することができる。さらには使用者からの極めて簡
単な入力により、生成されるコード進行を変えることが
できるので使用者の希望するようなコード進行を効率的
に提供することが可能となる。
According to the third aspect, the parameter for limiting the tonality distance between the chord and the melody key and the parameter for limiting the tonality distance between the preceding and following chords can be input from the input means, and each chord candidate and melody of the section can be input. In addition to the means for measuring the tonality distance to the key, a means for measuring the tonality distance between the preceding and following chord candidates is provided, and the chord deciding means designates both parameters input from these measured values. By selecting chord candidates that correspond to the measured values that meet the conditions, it provides not only the overall tonal distance but also the tonal distance between chords with controlled and natural chord progression. be able to. Furthermore, since the generated chord progression can be changed by an extremely simple input from the user, it is possible to efficiently provide the chord progression that the user desires.

請求項4によれば、与えられたメロディを分析して個
々のメロディ区間に対して付加可能なコード候補を判別
するメロディ分析手段を備える自動コード付加装置にお
いて、付加可能と判定された各コード候補が前のメロデ
ィ区間に対して付加可能とされたコード候補との間でも
つ調性距離を測定し、その測定結果に基づき、各コード
候補のなかから1メロディ区間に付き1つのコードを選
択することによってコード進行を得ているので、使用者
に対し、調性がコントロールされた自然なコード進行を
提供でき、使用者側で行うコード進行の選択作業を軽減
することができるという利点がある。
According to claim 4, in the automatic chord adding device provided with a melody analyzing means for analyzing a given melody and discriminating chord candidates that can be added to each melody section, each chord candidate determined to be addable Measures the tonality distance with chord candidates that can be added to the previous melody section, and selects one chord for each melody section from each chord candidate based on the measurement result. Since the chord progression is obtained by this, there is an advantage that a natural chord progression whose tonality is controlled can be provided to the user and the chord progression selection work performed by the user can be reduced.

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

第1図はこの発明の一実施例に係る自動コード付加装置
の全体構成図、第2図は実施例の全体動作を示すフロー
チャート、第3図はメロディとコードのデータ形式を示
す図、第4図はメロディデータメモリに記憶されるメロ
ディデータ例を示す図、第5図はメロディデータの読み
込みのフローチャート、第6図はプロダクションルール
データメモリに記憶されるプロダクションデータ例を示
す図、第7図はプロダションルールデータの読み込みの
フローチャート、第8図はメロディを分析して付加可能
なコードを判定するためのフローチャート、第9図は小
節の開始位置(Ps)と終了位置(pe)を算出するフロー
チャート、第10図はPs算出のフローチャート、第11図は
Pe算出のフローチャート、第12図は非和声音分析のフロ
ーチャート、第13図は和声音と非和声音とを判別するフ
ローチャート、第14図は非和声音の前後のメロディ状況
を表わす関数を算出するフローチャート、第15図は、第
16図、第17図、第18図、第19図、第20図、第21図、第22
図は各関数の算出の詳細なフローチャート、第23図はプ
ロダクションルールによる前向推論のフローチャート、
第24図は付加可能と判別されたコード候補の出現頻度を
算出するフローチャート、第25図はメロディの調を決定
するフローチャート、第26図はコード進行を決定するフ
ローチャート、第27図は調性距離を測定するフローチャ
ート、第28図はコード間の調性距離の定義を示す図であ
る。 1……CPU、2……ワークメモリ、3……入力装置、5
……メロディデータメモリ、6……プロダションルール
データメモリ、(R、T)……メロディの調を表わすデ
ータ、dst1……メロディ調とコード候補との調性距離の
測定値、dst2……前コードからの調性距離の測定値、CD
BAR……第BAR小節のメロディに対して決定されたコード
のデータ。
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 flow chart showing the overall operation of the embodiment, FIG. 3 is a diagram showing melody and chord data formats, and FIG. FIG. 6 is a diagram showing an example of melody data stored in the melody data memory, FIG. 5 is a flowchart of reading melody data, FIG. 6 is a diagram showing an example of production data stored in the production rule data memory, and FIG. FIG. 8 is a flowchart for reading production rule data, FIG. 8 is a flowchart for analyzing a melody to determine chords that can be added, and FIG. 9 is a flowchart for calculating a bar start position (Ps) and an end position (pe). , Fig. 10 is a flow chart for Ps calculation, and Fig. 11 is
Flow chart for Pe calculation, FIG. 12 is a flow chart for non-harmonic sound analysis, FIG. 13 is a flow chart for discriminating between harmony and non-harmonic sounds, and FIG. 14 is for calculating a function representing the melody situation before and after the non-harmonic sound. Flow chart, Figure 15
Figure 16, Figure 17, Figure 18, Figure 19, Figure 20, Figure 21, Figure 22
Figure is a detailed flowchart of calculation of each function, Figure 23 is a flowchart of forward inference by production rules,
FIG. 24 is a flowchart for calculating the appearance frequency of chord candidates determined to be addable, FIG. 25 is a flowchart for determining a melody key, FIG. 26 is a flowchart for determining chord progression, and FIG. 27 is a tonality distance. FIG. 28 is a flowchart showing the definition of tonality distance between chords. 1 ... CPU, 2 ... work memory, 3 ... input device, 5
...... Melody data memory, 6 ... Production rule data memory, (R, T) ... Data indicating melody key, dst 1 ... Measured value of tonality distance between melody tone and chord candidate, dst 2 ... … Measured tonality distance from previous code, CD
BAR …… The data of the chord decided for the melody of bar BAR.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】与えられたメロディに対して自動的にコー
ド進行を付加する自動コード付加装置において、 上記メロディを分析して、個々のメロディ区間に対して
付加可能なコード候補を判別するメロディ分析手段と、 上記メロディの調と上記メロディ分析手段により個々の
メロディ区間に対して付加可能と判別された各コード候
補との調性の距離を測定する距離測定手段と、 上記メロディ分析手段により個々のメロディ区間に対し
て付加可能と判別されたコード候補のなかから、1メロ
ディ区間当り1つのコードを上記距離測定手段の測定結
果に従って選択するコード決定手段と、 を有することを特徴とする自動コード付加装置。
1. An automatic chord adding device for automatically adding chord progression to a given melody, wherein the melody is analyzed to determine chord candidates that can be added to each melody section. Means, distance measuring means for measuring the tonality distance between each melody key and each chord candidate determined to be able to be added to each melody section by the melody analysis means, and each melody analysis means Automatic code addition, characterized by: chord determining means for selecting one chord per melody section from chord candidates determined to be able to be added to the melody section according to the measurement result of the distance measuring means. apparatus.
【請求項2】請求項1記載の自動コード付加装置におい
て、 上記メロディ分析手段により上記メロディに対して付加
可能と判別されたコード候補の全体の分布に基づいて、
上記メロディの調を判別し、その情報を上記距離測定手
段に与える調判別手段を更に具備することを特徴とする
自動コード付加装置。
2. The automatic chord adding device according to claim 1, wherein the melody analyzing means determines that chord candidates which can be added to the melody are entirely distributed.
An automatic chord adding device characterized by further comprising a key discrimination means for discriminating the tone of the melody and giving the information to the distance measuring means.
【請求項3】請求項1記載の自動コード付加装置におい
て、 上記メロディの調と上記メロディの各区間に付加される
コードとの調性の距離を制限する第1パラメータと、上
記メロディの前後の区間における前コードと後コードと
の間の調性の距離を制限する第2パラメータとを入力す
る入力手段と、 上記メロディ分析手段により前のメロディ区間に対して
付加可能を判別された前コード候補と後のメロディ区間
に対して付加可能とされた後コード候補との間の調性の
距離を測定する第2距離測定手段と、 を更に具備し、 上記コード決定手段は、上記距離測定手段と上記第2距
離測定手段の測定結果のうちで、上記入力手段から入力
された第1パラメータと第2パラメータの指定する距離
条件に合うような測定結果を与えたコードを選択するこ
とを特徴とする自動コード付加装置。
3. The automatic chord adding device according to claim 1, wherein a first parameter for limiting a tonality distance between the key of the melody and the chord added to each section of the melody, and a parameter before and after the melody. Input means for inputting a second parameter that limits the tonality distance between the preceding chord and the succeeding chord in the section, and the preceding chord candidate for which it is determined by the melody analyzing section that addition is possible for the preceding melody section. Second distance measuring means for measuring the tonality distance between the subsequent chord candidate that can be added to the subsequent melody section, and the chord determining means is the distance measuring means. Of the measurement results of the second distance measuring means, a code giving a measurement result that meets the distance condition specified by the first parameter and the second parameter input from the input means is selected. An automatic code adding device characterized in that
【請求項4】与えられたメロディに対して自動的にコー
ド進行を付加する自動コード付加装置において、 上記メロディを分析して、個々のメロディ区間に対して
付加可能なコード候補を判別するメロディ分析手段と、 上記メロディ分析手段により前のメロディ区間に対して
付加可能を判別された前コード候補と後のメロディ区間
に対して付加可能とされた後コード候補との間の調性の
距離を測定する距離測定手段と、 上記メロディ分析手段により個々のメロディ区間に対し
て付加可能と判別されたコード候補のなかから、1メロ
ディ区間当り1つのコードを上記距離測定手段の測定結
果に従って選択するコード決定手段と、 を有することを特徴とする自動コード付加装置。
4. An automatic chord adding device for automatically adding chord progression to a given melody, wherein the melody is analyzed to determine chord candidates that can be added to each melody section. Means and the tonality distance between the preceding chord candidate determined to be able to be added to the preceding melody section and the succeeding chord candidate that can be added to the succeeding melody section by the melody analysis means. A chord is selected from the distance measuring means and the chord candidates determined by the melody analyzing means that can be added to each melody section according to the measurement result of the distance measuring means. An automatic code adding device comprising:
JP63125930A 1988-04-06 1988-05-25 Automatic code addition device Expired - Fee Related JPH087589B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP63125930A JPH087589B2 (en) 1988-05-25 1988-05-25 Automatic code addition 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
JP63125930A JPH087589B2 (en) 1988-05-25 1988-05-25 Automatic code addition device

Publications (2)

Publication Number Publication Date
JPH01296287A JPH01296287A (en) 1989-11-29
JPH087589B2 true JPH087589B2 (en) 1996-01-29

Family

ID=14922476

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63125930A Expired - Fee Related JPH087589B2 (en) 1988-04-06 1988-05-25 Automatic code addition device

Country Status (1)

Country Link
JP (1) JPH087589B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10062368B2 (en) 2016-09-28 2018-08-28 Casio Computer Co., Ltd. Chord judging apparatus and chord judging method
US10410616B2 (en) 2016-09-28 2019-09-10 Casio Computer Co., Ltd. Chord judging apparatus and chord judging method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10062368B2 (en) 2016-09-28 2018-08-28 Casio Computer Co., Ltd. Chord judging apparatus and chord judging method
US10410616B2 (en) 2016-09-28 2019-09-10 Casio Computer Co., Ltd. Chord judging apparatus and chord judging method

Also Published As

Publication number Publication date
JPH01296287A (en) 1989-11-29

Similar Documents

Publication Publication Date Title
EP1533786B1 (en) Automatic musical composition classification device and method
CN101916568B (en) Information processing apparatus and information processing method
US4982643A (en) Automatic composer
JP5282548B2 (en) Information processing apparatus, sound material extraction method, and program
US9460694B2 (en) Automatic composition apparatus, automatic composition method and storage medium
US9558726B2 (en) Automatic composition apparatus, automatic composition method and storage medium
JP3484986B2 (en) Automatic composition device, automatic composition method, and storage medium
CA2740638A1 (en) Method for analyzing a digital music audio signal
US5285711A (en) Method and apparatus for tuning musical instruments
US5235126A (en) Chord detecting device in an automatic accompaniment-playing apparatus
JP3132099B2 (en) Scale discriminator
US5763802A (en) Apparatus for chord analysis based on harmonic tone information derived from sound pattern and tone pitch relationships
US4472992A (en) Electronic musical instrument
JPH087589B2 (en) Automatic code addition device
JP2900753B2 (en) Automatic accompaniment device
JP3211839B2 (en) Tonality judgment device and automatic accompaniment device
JP2526830B2 (en) Automatic chord adding device
JP5272899B2 (en) Music difficulty calculation device and music difficulty calculation program
JP2615720B2 (en) Automatic composer
JP3088919B2 (en) Tone judgment music device
JP2615722B2 (en) Automatic composer
JP2958794B2 (en) Melody analyzer
JP2615721B2 (en) Automatic composer
JPH05346781A (en) Key detecting device and automatic music arranging device
JPH049893A (en) melody analyzer

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees