JPH05346781A - Key detecting device and automatic music arranging device - Google Patents

Key detecting device and automatic music arranging device

Info

Publication number
JPH05346781A
JPH05346781A JP4180436A JP18043692A JPH05346781A JP H05346781 A JPH05346781 A JP H05346781A JP 4180436 A JP4180436 A JP 4180436A JP 18043692 A JP18043692 A JP 18043692A JP H05346781 A JPH05346781 A JP H05346781A
Authority
JP
Japan
Prior art keywords
key
data
music data
memory
music
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.)
Granted
Application number
JP4180436A
Other languages
Japanese (ja)
Other versions
JP2715816B2 (en
Inventor
Eiichiro Aoki
栄一郎 青木
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.)
Yamaha Corp
Original Assignee
Yamaha Corp
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 Yamaha Corp filed Critical Yamaha Corp
Priority to JP4180436A priority Critical patent/JP2715816B2/en
Publication of JPH05346781A publication Critical patent/JPH05346781A/en
Application granted granted Critical
Publication of JP2715816B2 publication Critical patent/JP2715816B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To enable automatic music arrangement without any inconvenience even in the case of modulation by detecting a modulated key and a modulation position even if music data contains modulation data and arranging music according to the key and position. CONSTITUTION:A disk controller 2 to which a floppy disk device 1 is connected, a CPU 3, a program memory 4, a working memory 5, a parameter memory 6, a melody memory 7, a key memory 8, a priority order table 9, an accompaniment data memory 10, a chord memory 11, a pattern memory 12, etc., are connected to one another through a bus line 14. Then a key detecting means analyzes music data stored in the music data storage means 7 and detects the key and modulation position. The key storage means 8 is stored with the key and its variation state so that they correspond to the position of the music data. The music data generating means 3 generates musical performance information on a performance part other than data stored in the music data storage means 7 according to the stored key data and the modulation position in the case of the modulation, and performs automatic music arrangement.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、旋律等の音楽情報から
調を検出する調検出装置および該音楽情報に編曲を施す
自動編曲装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a key detecting device for detecting a key from music information such as a melody, and an automatic music arranger for performing a music arrangement on the music information.

【0002】[0002]

【従来の技術】従来より、旋律などの音楽情報に自動編
曲を施すことを目的として、その前提となる音楽情報の
調を調べる技術が研究されている。例えば、全ての調に
おいてその調の音階音の音名と旋律の構成音の音名との
一致する割合算出し、最も高い一致度を持った調をその
調とするようにした方法が従来より知られている。
2. Description of the Related Art Conventionally, for the purpose of automatically arranging music information such as a melody, a technique for investigating the key of the music information, which is the premise, has been studied. For example, in all keys, the ratio of the pitch name of the scale note of the key and the pitch name of the constituent notes of the melody is calculated, and the key with the highest degree of matching is used as the key. Are known.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、基とな
る音楽情報に転調が含まれている場合、転調したことの
事実を知ることが出来ないばかりか、返って誤った調が
検出されてしまい、不都合な自動編曲がなされるという
問題があった。
However, when the underlying music information includes a key modulation, it is not possible to know the fact that the key has been modulated, and the wrong key is detected in return. There was a problem that inconvenient automatic arrangement was performed.

【0004】請求項1記載の本発明の目的は、転調があ
る場合にも不都合のない自動編曲を行えるようにするこ
とにある。
An object of the present invention according to claim 1 is to enable automatic arrangement without inconvenience even when there is a modulation.

【0005】また、請求項2記載の本発明の目的は、正
確に転調の位置を検出できるようにすることにある。
Another object of the present invention is to enable accurate detection of the modulation position.

【0006】[0006]

【課題を解決するための手段】上記目的を達成するため
請求項1記載の発明は、音楽データを記憶する音楽デー
タ記憶手段と、前記音楽データを分析して該音楽データ
の調とその調が転調していた場合の転調位置を検出する
調検出手段と、前記調を表す調データを記憶する調記憶
手段であって、前記音楽データが転調していた場合に
は、順次変化する調に対応する調データを前記音楽デー
タの位置に対応して記憶するものと、前記調記憶手段に
記憶されている調データに基づいて、転調されている場
合には順次変化する前記調が対応して記憶されている音
楽データの位置にも基づいて前記音楽データとともに演
奏されるべき他の音楽データを生成する音楽データ生成
手段とを備える。
In order to achieve the above-mentioned object, the invention according to claim 1 is a music data storage means for storing music data, and a key of the music data and its key are analyzed by analyzing the music data. Key detecting means for detecting a key position when a key is being transposed, and key storing means for storing key data representing the key, which corresponds to a key that changes sequentially when the music data is keyed. Storing the key data corresponding to the position of the music data, and storing the key corresponding to the key data stored in the key storage means, the key changing sequentially when the key is transposed. Music data generating means for generating other music data to be played together with the music data based on the position of the music data being played.

【0007】請求項2記載の発明は、音符データを含む
音楽データを供給する音楽データ供給手段と、前記音楽
データの所定区間を順次特定する区間特定手段と、該特
定された所定区間内の音符データの音名と調内音階音の
音名との一致度を求める一致度演算手段と、前記所定区
間を、隣接する区間と重複部分を有するように順次特定
する特定手段と、順次特定される区間に対して順演算さ
れる一致度に応じて転調を検出する転調手段とを備え
る。
According to a second aspect of the present invention, music data supplying means for supplying music data including note data, section specifying means for sequentially specifying a predetermined section of the music data, and notes within the specified predetermined section. A coincidence degree calculating means for obtaining a coincidence degree between the note name of the data and the note name of the in-tone scale, and an identifying means for sequentially identifying the predetermined section so as to have an overlapping portion with an adjacent section are sequentially identified. And a modulation unit that detects a modulation in accordance with the degree of coincidence that is sequentially calculated for the section.

【0008】[0008]

【作用】請求項1記載の発明においては、音楽データ記
憶手段が記憶している音楽データを調検出手段が分析し
て、該調と転調位置とを検出する。調記憶手段は、前記
調とその変化の様子を音楽データの位置に対応して記憶
する。音楽データ生成手段は、記憶されている調データ
と転調がある場合の転調位置とに基づいて音楽データ記
憶手段に記憶されている以外の演奏パートの演奏情報を
生成して、自動編曲を行う。
According to the first aspect of the invention, the key detecting means analyzes the music data stored in the music data storing means to detect the key and the transposition position. The key storage means stores the key and its change state in correspondence with the position of the music data. The music data generation means generates performance information of performance parts other than those stored in the music data storage means based on the stored key data and the modulation position when there is a modulation, and performs automatic arrangement.

【0009】請求項2記載の発明では、音符データと調
内音との一致度が所定区間ごとに算出され、一致度に応
じて調が選択される。一致度算出の単位となる所定区間
は、隣接する区間と重複部分を有するように順次特定さ
れ、それにつれて一致度も順次算出される。その一致度
の変化に基づいて転調が検出される。
According to the second aspect of the present invention, the degree of coincidence between the note data and the intone is calculated for each predetermined section, and the key is selected according to the degree of coincidence. The predetermined section, which is a unit for calculating the degree of coincidence, is sequentially specified so as to have an overlapping portion with the adjacent section, and the degree of coincidence is sequentially calculated accordingly. Modulation is detected based on the change in the degree of coincidence.

【0010】[0010]

【実施例】以下本発明の実施例を図面を参照して説明す
る。
Embodiments of the present invention will be described below with reference to the drawings.

【0011】図1は本発明の一実施例に係る調検出装置
の構成を含む自動編曲装置の全体構成を示すブロック図
である。同図において、フロッピーディスク装置1が接
続されたディスク制御装置2、中央処理装置(CPU)
3、プログラムメモリ4、ワーキングメモリ5、パラメ
ータメモリ6、メロディメモリ7、調メモリ8、優先順
位テーブル9、伴奏データメモリ10、和音メモリ1
1、パターンメモリ12及び出力インタフェース13が
バスライン14を介して相互に接続されている。
FIG. 1 is a block diagram showing the overall structure of an automatic arrangement device including the structure of a key detection device according to an embodiment of the present invention. In the figure, a disk controller 2 to which a floppy disk device 1 is connected, a central processing unit (CPU)
3, program memory 4, working memory 5, parameter memory 6, melody memory 7, key memory 8, priority table 9, accompaniment data memory 10, chord memory 1
1, the pattern memory 12 and the output interface 13 are connected to each other via a bus line 14.

【0012】フロッピーディスク装置1は、フロッピー
ディスクに記録された旋律の楽譜データを読み出し、デ
ィスク制御装置2を介してメロディメモリ7へ供給す
る。楽譜データは、図2(a)に示すように、音高を示
すキーコードMKCm及び継続時間を示すデュレーショ
ンタイムMDTm(m=0,1,2,…)の組み合わせ
(以下「音符データ」といい、mを「音符データ番号」
という)と、小節の切れ目を示す小節線コードと、旋律
の終了を示すエンドコードとから構成されており、図示
した形式でメロディメモリ7に格納される。
The floppy disk device 1 reads the musical score data of the melody recorded on the floppy disk and supplies it to the melody memory 7 via the disk control device 2. As shown in FIG. 2A, the musical score data is a combination of a key code MKCm indicating a pitch and a duration time MDTm (m = 0, 1, 2, ...) Indicates a duration (hereinafter referred to as “note data”). , M is “note data number”
,) And a bar line code indicating the break of a bar, and an end code indicating the end of the melody, and are stored in the melody memory 7 in the illustrated format.

【0013】メロディメモリ7はRAM(Random
Access Memory)であり、処理速度を高
めるために用いている。
The melody memory 7 is a RAM (Random).
Access Memory) and is used to increase the processing speed.

【0014】CPU3は、上述した音符データの読み込
みの制御及び読み込んだ音符データに基づく調検出、さ
らに該音符データに対して編曲を行う。プログラムメモ
リ4及びパラメータメモリ6は、ROM(Read O
nly Memory)であり、それぞれCPU3を作
動させるプログラム及び必要な制御パラメータを格納す
るものである。ワーキングメモリ5はRAMであり、C
PU3が演算途中のデータの一時的な記憶に用いられ
る。
The CPU 3 controls the reading of the note data, detects the key based on the read note data, and arranges the note data. The program memory 4 and the parameter memory 6 are ROM (Read O
nly Memory), which stores a program for operating the CPU 3 and necessary control parameters. The working memory 5 is a RAM, and C
PU3 is used for temporary storage of data during calculation.

【0015】調メモリ8はRAMであり、CPU3が判
定した調が格納される。調メモリ8に格納されるデータ
(以下「調データ」という)は、図2(b)に示すよう
に、小節番号MEj、調の主音TNj及びモード(メジ
ャー又はマイナー)MDj(j=1,2,3,…、以下
「調データ番号」という)によって構成される。ただ
し、j=0のデータ、即ち最初のデータは、小節番号は
不要であるため主音TN0及びモードMD0のみから成
る。
The key memory 8 is a RAM and stores keys determined by the CPU 3. As shown in FIG. 2B, the data stored in the key memory 8 (hereinafter referred to as “key data”) is bar number MEj, key note TNj, and mode (major or minor) MDj (j = 1, 2). , 3, ..., Hereinafter referred to as “key data number”). However, the data of j = 0, that is, the first data is composed of only the tonic TN0 and the mode MD0 because the measure number is unnecessary.

【0016】優先順位テーブル9は、図3に示すように
転調する可能性の高い調(近親調)を、可能性の高い順
に並べたテーブルであり、ROMに格納されている。同
図において、例えば前調がCメジャー(C)であればF
メジャー(F)に転調する可能性が最も高く、次いでG
メジャー(G)、Aマイナー(Am)、…、Cマイナー
(Cm)となる。
The priority table 9 is a table in which the keys (proximity keys) that are likely to be transposed as shown in FIG. 3 are arranged in the order of high possibility, and are stored in the ROM. In the same figure, for example, if the first tone is C major (C), then F
Most likely to change to major (F), then G
Major (G), A minor (Am), ..., C minor (Cm).

【0017】このテーブルは、後述するように調検出に
おいて転調を正確に検出するために使用される。
This table is used to accurately detect modulation in key detection, as will be described later.

【0018】伴奏データメモリ10及び和音メモリ11
は、RAMであり、それぞれ自動編曲実行時に小節毎に
付与された和音とその小節番号の一時的な記憶および選
択され変形された伴奏パターンを音符データに直したも
のの一時的な記憶に使用される。
Accompaniment data memory 10 and chord memory 11
Is a RAM, which is used for temporary storage of chords and bar numbers assigned to each bar during execution of automatic arrangement, and temporary storage of note data of the selected and modified accompaniment pattern. ..

【0019】パターンメモリ12は、ROMであり、ベ
ース等の各パート別にパターン番号に対応した伴奏パタ
ーンのデータが格納されており、自動編曲時の基礎デー
タとして使われる。
The pattern memory 12 is a ROM, in which data of accompaniment patterns corresponding to pattern numbers is stored for each part such as bass, and is used as basic data at the time of automatic arrangement.

【0020】図4は、各調の調内音(ダイアトニックノ
ート)の音名データ構成を示す図であり、調番号n=0
はCメジャー(C)及びAマイナー(Am)、n=1は
C#メジャー(C#)及びB♭マイナー(B♭m)にそ
れぞれ対応し、n=11のBメジャー(B)及びG#マ
イナー(B#m)に至るまで、n=0〜11に対応して
24の調が割当てられている。音名データをSCALE
n(k)で表わすことにすると、例えばSCALE0
(0)=0,SCALE1(3)=5となる。この音名
データの値はCメジャーの主音、即ちSCALE0
(0)を値0とし、半音上がるごとに値1を加算して他
の音名データの値を設定している。ただし値12は値0
にもどる、すなわち値12で割った余りの値を用いる
(以下このような値を用いる場合には「mod12」を
付して示す)。
FIG. 4 is a diagram showing the note name data structure of the in-tone (diatonic note) of each tone, with the tone number n = 0.
C major (C) and A minor (Am), n = 1 corresponds to C # major (C #) and B ♭ minor (B ♭ m) respectively, and n = 11 B major (B) and G #. Up to the minor (B # m), 24 tones are assigned corresponding to n = 0 to 11. SCALE the note name data
When represented by n (k), for example, SCALE0
(0) = 0 and SCALE1 (3) = 5. The value of this note name data is the major note of C major, that is, SCALE0
The value of (0) is set to 0, and the value of 1 is added each time a semitone is raised to set the value of other note name data. However, the value 12 is the value 0
Return, that is, the remainder value divided by the value 12 is used (hereinafter, when such a value is used, it is indicated by adding "mod12").

【0021】本実施例は、この調内音の音名データSC
ALEn(k)と調検出の対象となる旋律の音名との一
致度を検出区間ごとに算出し、この一致度に基づいて調
検出を行うものである。例えば、図9に示すように4小
節を1検出区間とし、その検出区間を1小節ずつ移動さ
せて一致度を算出する、即ち隣接する検出区間が3小節
の重複部分を有するように移動させて一致度を算出する
ようにしている。図9の例では、検出区間の区間長ME
Nは4、シフト長(検出区間の移動量)SMEは1であ
る。
In the present embodiment, the note name data SC of this intone is
The degree of coincidence between ALen (k) and the note name of the melody to be detected is calculated for each detection section, and key detection is performed based on this degree of coincidence. For example, as shown in FIG. 9, four bars are set as one detection section, and the detection sections are moved one bar at a time to calculate the degree of coincidence, that is, the adjacent detection sections are moved so as to have an overlapping portion of three bars. The degree of coincidence is calculated. In the example of FIG. 9, the section length ME of the detection section
N is 4 and shift length (movement amount of the detection section) SME is 1.

【0022】以下図5〜図8を参照して、CPU3で実
行される調検出処理の内容を説明する。
The contents of the key detection processing executed by the CPU 3 will be described below with reference to FIGS.

【0023】図5は、調検出処理及び自動編曲処理のメ
インルーチンのフローチャートである。
FIG. 5 is a flowchart of the main routine of the key detection process and the automatic arrangement process.

【0024】ステップSM1では、図6に示す調検出サ
ブルーチンを実行し、次にステップSM2では、図11
に示す自動編曲サブルーチンを実行し、ステップSM3
では、調検出の結果が書き込まれた調メモリ8の内容を
フロッピーディスクに記録し、本ルーチンを終了する。
In step SM1, the key detection subroutine shown in FIG. 6 is executed, and in step SM2, the key detection subroutine shown in FIG.
Execute the automatic arrangement subroutine shown in step SM3
Then, the contents of the key memory 8 in which the key detection result is written are recorded on the floppy disk, and this routine is ended.

【0025】図6は、メインルーチンのステップSM1
で示される調検出処理のサブルーチンのフローチャート
である。
FIG. 6 shows the step SM1 of the main routine.
7 is a flowchart of a subroutine of the key detection processing shown by.

【0026】ステップS1では、フロッピーディスクに
記録された音譜データをメロディメモリ7に書き込み、
次いで検出区間の先頭の小節番号iを値1に設定して
(ステップS2)、図7に示す初期調検出のサブルーチ
ンを実行する(ステップS3)。
In step S1, the musical score data recorded on the floppy disk is written in the melody memory 7,
Then, the bar number i at the beginning of the detection section is set to the value 1 (step S2), and the initial tone detection subroutine shown in FIG. 7 is executed (step S3).

【0027】ステップS4では、検出区間の先頭の小節
番号iをシフト長SMEだけインクリメントするととも
に、調データ番号j(図2(b)のjに対応する)を値
1とする。
In step S4, the bar number i at the beginning of the detected section is incremented by the shift length SME, and the key data number j (corresponding to j in FIG. 2B) is set to the value 1.

【0028】次に、図8に示す一致度算出サブルーチン
及び図8に示す調判定サブルーチンを実行し(ステップ
S5,S6)、小節番号iをシフト長SMEだけインク
リメントし(ステップS7)、(i+MEN−1)が全
小節数TMEを越えたか否かを判別する(ステップS
8)。(i+MEN−1)がTMEを越えていなければ
(ステップS8の答が否定(NO))、ステップS5に
もどり、越えていれば(ステップS8の答が肯定(YE
S))、本ルーチンを終了する。
Next, the coincidence degree calculation subroutine shown in FIG. 8 and the key judgment subroutine shown in FIG. 8 are executed (steps S5 and S6), the measure number i is incremented by the shift length SME (step S7), and (i + MEN-). It is determined whether or not 1) exceeds the total number of measures TME (step S).
8). If (i + MEN-1) does not exceed TME (the answer in step S8 is negative (NO)), the process returns to step S5, and if it exceeds (the answer in step S8 is affirmative (YE).
S)), and this routine ends.

【0029】図7は、図6のステップS3で実行される
初期調検出サブルーチンのフローチャートであり、ステ
ップS10では図6のステップS5と同様に一致度算出
サブルーチンを実行する。そこで先ず、図8に示す一致
度算出サブルーチンの内容を説明する。
FIG. 7 is a flow chart of the initial tone detection subroutine executed in step S3 of FIG. 6. In step S10, the coincidence degree calculation subroutine is executed as in step S5 of FIG. Therefore, first, the contents of the matching degree calculation subroutine shown in FIG. 8 will be described.

【0030】図8のステップS31では、小節数で表わ
した検出区間長MENの長さを8分音符を値1とした長
さに換算し、その換算値を換算区間長SUMとする。図
10の例では、4小節の区間長は8分音符32個分に相
当するのでSUM=32となる。
In step S31 of FIG. 8, the length of the detected section length MEN represented by the number of measures is converted into a length with an eighth note as the value 1, and the converted value is set as the converted section length SUM. In the example of FIG. 10, the section length of 4 bars corresponds to 32 eighth notes, so SUM = 32.

【0031】次に、調番号nを値0とし(ステップS3
2)、検査区間の先頭の小節(小節番号iの小節)の最
初の音符データ番号m0を音符データ番号mの初期値に
設定するとともに、調内音と一致する音符データのデュ
レーションタイムを積算するためのパラメータである一
致データ長SAMEを値0として初期化する(ステップ
S33)。例えば、図11の例でi=1のときは、m0
=0なので、m=0とされ、i=3のときはm0=11
なので、m=11とされる。
Next, the key number n is set to 0 (step S3).
2) The first note data number m0 of the first measure (measure number i) of the inspection section is set to the initial value of the note data number m, and the duration time of the note data that matches the in-tone is integrated. The matching data length SAME which is a parameter for initialization is initialized to a value of 0 (step S33). For example, in the example of FIG. 11, when i = 1, m0
Since m = 0, m = 0, and when i = 3, m0 = 11
Therefore, m = 11.

【0032】ステップS34では、キーコードMKCm
をmod12で表わしたもの、即ち音高データを音名デ
ータに変換したMKCmmod12と調内音の音名デー
タSCALEn(0)〜SCALEn(6)(図4)と
が一致するか否かを判別し、一致するものが無ければ直
ちにステップS36に進み、一致するものが有れば一致
データ長SAMEにデュレーションタイムMDTmを加
算して(ステップS35)、ステップS36に進む。ス
テップS36では、音符データ番号mを値1だけインク
リメントし、キーコードMKCmが現在調検出の対象し
ている検出区間内のデータか否か(小節番号iから(i
+MEN−1)までの区間内のデータか否か)を判別す
る(ステップS37)。この答が肯定(YES)のとき
には、ステップS34にもどり、否定(NO)のときは
次式(1)により、一致度LRATE2(n)を算出す
る。
In step S34, the key code MKCm
Is expressed by mod12, that is, MKCmmod12 obtained by converting pitch data into pitch name data and the pitch name data SCALEn (0) to SCALEn (6) (Fig. 4) of the internal tone are discriminated. If there is no match, the process immediately proceeds to step S36. If there is a match, the duration time MDTm is added to the match data length SAME (step S35), and the process proceeds to step S36. In step S36, the note data number m is incremented by the value 1, and whether or not the key code MKCm is data within the detection section currently targeted for key detection (measure number i to (i
It is determined whether the data is within the section up to + MEN-1)) (step S37). When this answer is affirmative (YES), the process returns to step S34, and when negative (NO), the degree of coincidence RATE2 (n) is calculated by the following equation (1).

【0033】 LRATE2(n)=SAME/SUM …(1) 次に、調番号nを値1だけインクリメントし(ステップ
S39)、n=12でなければ(ステップS40の答が
否定(NO))、ステップS33にもどり、n=12で
あれば(ステップS40の答が肯定(YES))、本ル
ーチンを終了する。
RATE2 (n) = SAME / SUM (1) Next, the key number n is incremented by the value 1 (step S39), and if n = 12 is not satisfied (the answer to step S40 is negative (NO)), Returning to step S33, if n = 12 (the answer to step S40 is affirmative (YES)), this routine ends.

【0034】図8のサブルーチンにより、1検出区間内
における音符データの音名と調内音の音名との一致度L
RATE2(n)(n=0〜11)が算出される。な
お、一致度LRATE2は、8分音符を一単位とした一
致データ長SAMEを区間長SUMで除算して算出され
るので(式(1))、音符の長さによる重みづけがなさ
れた一致度となる。
According to the subroutine of FIG. 8, the degree of coincidence L between the note name of the note data and the note name of the intone within one detection section
RATE2 (n) (n = 0 to 11) is calculated. Since the coincidence RATE2 is calculated by dividing the coincidence data length SAME with an eighth note as a unit by the section length SUM (Equation (1)), the coincidence degree weighted by the note length is given. Becomes

【0035】図7にもどり、ステップS10で一致度L
RATE2(n)を算出した後、そのLRATE2
(n)の値をLRATE1(n)とする(ステップS1
2)。LRATE1(n)は、後述する図9の調判定サ
ブルーチンで一致度の変化の傾向をみるために設けたパ
ラメータである。なお本ルーチンでは、LRATE1
(n)とLRATE2(n)は同一の値となるので、L
RATE1(n)を用いて処理を行っている。
Returning to FIG. 7, in step S10, the degree of coincidence L
After calculating RATE2 (n), the RATE2 (n) is calculated.
Let the value of (n) be RATE1 (n) (step S1
2). RATE1 (n) is a parameter provided for observing the tendency of change in the degree of coincidence in the key determination subroutine of FIG. 9 described later. In this routine, LRATE1
(N) and LRATE2 (n) have the same value, so L
Processing is performed using RATE1 (n).

【0036】ステップS13では、LRATE1(0)
〜(11)の中で、最大となるLRATE1(n)のn
の値を選択候補調番号LSCLN(p)とし、nの個数
を選択候補調数LNとする。これは、一致度が最大とな
る調は複数となる可能性があることを考慮したものであ
り、パラメータpは0から(LN−1)までの整数値値
をとる。すなわち、例えば一致度LRATE1が最大と
なる調の調番号が0と5であればLN=2,Pは0と1
であるからLSCLN(0)=0,LSCLN(1)=
5となる。
In step S13, LRATE1 (0)
~ N of LRATE1 (n) which is the maximum among (11)
Is set as the selection candidate key number LSCLN (p), and the number of n is set as the selection candidate key number LN. This takes into consideration that there may be a plurality of keys with the highest degree of coincidence, and the parameter p takes an integer value from 0 to (LN-1). That is, for example, if the key numbers of the key with the maximum degree of coincidence LRATE1 are 0 and 5, LN = 2 and P are 0 and 1.
Therefore, LSCLN (0) = 0, LSCLN (1) =
It becomes 5.

【0037】ステップS13では、選択候補調番号LS
CLN(p)をメジャー調番号LTN(p)とマイナー
調番号LTN(p+LN)とに分ける。図4に示すよう
に、一つの調番号nに対してメジャー調及びマイナー調
一つずつが対応する(例えばn=0は、Cメジャー及び
Aマイナーに対応する)からである。ここでメジャー調
番号LTN(p)は、選択候補調番号LSCLN(p)
をそのまま用い、マイナー調番号LTN(p+LN)
は、{LSCLN(p)+9}mod12に設定する。
これは、メジャー調と同一の調内音を有するマイナー調
は、半音9個分上の音を主音とすることを考慮したもの
である。
In step S13, the selection candidate key number LS
CLN (p) is divided into a major key number LTN (p) and a minor key number LTN (p + LN). This is because, as shown in FIG. 4, one major key and one minor key correspond to one key number n (for example, n = 0 corresponds to C major and A minor). Here, the major key number LTN (p) is the selection candidate key number LSCLN (p).
Is used as is, minor key number LTN (p + LN)
Is set to {LSCLN (p) +9} mod12.
This is because the minor tone having the same internal tone as that of the major tone takes into account the tone which is nine semitones higher.

【0038】LMD(p)はモードパラメータであり、
LMD(p)はメジャー調であることを示す値(例えば
0)に設定し、LMD(p+LN)はマイナー調である
ことを示す値(例えば1)に設定する。
LMD (p) is a mode parameter,
LMD (p) is set to a value indicating a major tone (for example, 0), and LMD (p + LN) is set to a value indicating a minor tone (for example, 1).

【0039】ステップS14では、マイナー調に表われ
る可能性の高いその調の長6度及び長7度の音をそれぞ
れ第1及び第2の特徴音CHR1(p),CHR2
(p)とする。すなわち、{LTN(l+LN)+9}
mod12が長6度の音(Aマイナーの場合のF#)で
あり、{LTN(l+LN)+11}mod12が長7
度の音(Aマイナーの場合のG#)に相当する。
In step S14, the major 6th and major 7th notes of the key, which are likely to appear in the minor key, are first and second characteristic sounds CHR1 (p) and CHR2, respectively.
(P). That is, {LTN (l + LN) +9}
mod12 is a major sixth tone (F # in the case of A minor), and {LTN (l + LN) +11} mod12 is a major seven.
It corresponds to the sound of degree (G # in the case of A minor).

【0040】ステップS15では、MKCppmod1
2(pp=1〜(小節番号MJNの小節の最後の音の楽
譜データ番号))の中に第1の特徴音CHR1(p)又
は第2の特徴音CHR2(p)があるか否かを判別し、
あればメジャー調番号LTN(p)(p=0〜LN−
1)及び対応するモードパラメータLMD(p)(p=
0〜LN−1)を削除する。すなわち、最初の検出区間
内にマイナー調に特徴的な音が含まれていれば、メジャ
ー調は削除する。ここで、メジャー調番号LTN(p)
(p=0〜LN−1)が削除された場合には、マイナー
調番号のみ残るので、マイナー調番号LTN(p+L
N)及びモードパラメータLMD(p+LN)を繰り上
げて、LTN(p),LMD(p)(p=1〜LN−
1)とする。なお、CHR1(p)又はCHR2(p)
が含まれていないときは、何もしない。
In step S15, MKCppmod1
2 (pp = 1 to (the score data number of the last sound of the bar of the bar number MJN)) has the first characteristic sound CHR1 (p) or the second characteristic sound CHR2 (p). Discriminate,
If there is a major key number LTN (p) (p = 0 to LN-
1) and the corresponding mode parameter LMD (p) (p =
0 to LN-1) are deleted. That is, if the characteristic sound of the minor key is included in the first detected section, the major key is deleted. Here, major key number LTN (p)
When (p = 0 to LN-1) is deleted, only the minor key number remains, so the minor key number LTN (p + L
N) and the mode parameter LMD (p + LN) are advanced to LTN (p), LMD (p) (p = 1 to LN-
1). CHR1 (p) or CHR2 (p)
If is not included, do nothing.

【0041】ステップS16では、調番号LTN(p
n)が複数残っているか否かを判別する。ここでLTN
(pn)は、LTN(p)又はLTN(p+LN)を包
括的に表示するために用いている。LTN(pn)が一
つのみ残っているときにはステップS20に進み、複数
残っているときには、ステップS17に進み、該区間の
メロディ音が主音を最も多く含む調のみ選択される。す
なわちMKCppmod12=LTN(pn)が成立す
るキーコードMKCppの個数が最大となる調番号LT
N(pn)及び対応するモードパラメータLMD(p
n)のみ残し、これら以外は削除する(ステップS1
7)。ここで、削除されるLTN(pn)がある場合に
は、パラメータpnを順次繰り上げる。例えば、LN=
2であって、調番号LTN(0),LTN(1),LT
N(2),LTN(3)が残っていた場合に、LTN
(0)が削除されたときには、LTN(1),LTN
(2),LTN(3)がそれぞれLTN(0),LTN
(1),LTN(2)となる。
In step S16, the key number LTN (p
It is determined whether a plurality of n) remain. LTN here
(Pn) is used to comprehensively display LTN (p) or LTN (p + LN). When only one LTN (pn) remains, the process proceeds to step S20, and when a plurality of LTN (pn) remains, the process proceeds to step S17, and only the key containing the most tones of the melody sounds in the section is selected. That is, the key number LT that maximizes the number of key codes MKCpp for which MKCppmod12 = LTN (pn) holds.
N (pn) and the corresponding mode parameter LMD (p
Only n) is left and the others are deleted (step S1).
7). Here, if there is an LTN (pn) to be deleted, the parameter pn is sequentially advanced. For example, LN =
2 and key numbers LTN (0), LTN (1), LT
When N (2) and LTN (3) remain, LTN
When (0) is deleted, LTN (1), LTN
(2) and LTN (3) are LTN (0) and LTN, respectively.
(1) and LTN (2).

【0042】ステップS18では、調番号LTN(p
n)が複数残っているか否かを判別し、LTN(pn)
が一つのみ残っているときにはステップS20に進み、
複数残っているときには、ステップS19に進み、属音
を最も多く含む調のみ選択されステップS20に進む。
すなわちMKCppmod12=LTN(pn)+7が
成立するキーコードMKCppの個数が最大となる調番
号LTN(pn)及びこれに対応するモードパラメータ
LMD(pn)のみ残し、これら以外は削除する(ステ
ップS19)。削除される調番号がある場合には、ステ
ップS17と同様にパラメータpnの繰り上げが行われ
る。
In step S18, the key number LTN (p
n), it is discriminated whether or not a plurality of them remain, and LTN (pn)
If only one remains, go to step S20,
When there are a plurality of remaining tones, the process proceeds to step S19, and only the key containing the largest number of belonging tones is selected and the process proceeds to step S20.
That is, only the key number LTN (pn) and the mode parameter LMD (pn) corresponding to the maximum number of key codes MKCpp for which MKCppmod12 = LTN (pn) +7 are satisfied are left, and the others are deleted (step S19). If there is a key number to be deleted, the parameter pn is advanced as in step S17.

【0043】ステップS19の選択の結果、まだ複数の
調番号LTN(pn)が残っている場合でも、ステップ
S20に進み、強制的に調番号LTN(0)及びモード
パラメータLMD(0)を、それぞれ調の主音TN0及
びモードMD0とし、調メモリ8に格納する。
Even if a plurality of key numbers LTN (pn) still remain as a result of the selection in step S19, the process proceeds to step S20, and the key number LTN (0) and the mode parameter LMD (0) are forcibly set, respectively. The keynote TN0 and the mode MD0 are set and stored in the key memory 8.

【0044】次いで、主音TN0及びモードMD0に対
応した調番号をカレント調番号CSCLNとし(ステッ
プS21)、本ルーチンを終了する。
Next, the key number corresponding to the tonic TN0 and the mode MD0 is set as the current key number CSCLN (step S21), and this routine is ended.

【0045】初期調検出サブルーチンによれば、調検出
を行うべき旋律の最初の検出区間について一致度LRA
TE2(n)が算出され、この一致度に基づいて調検出
が行われる。より具体的には、先ず一致度が最大となる
選択候補調番号LSCLN(p)が求められ(ステップ
S12)、更にマイナー調に特徴的な音の有無(ステッ
プS13〜16)、主音及び属音の数(ステップS17
〜19)に基づく選択が行われ、最初の検出区間の調が
検出される。
According to the initial key detection subroutine, the degree of coincidence LRA is detected for the first detection section of the melody for key detection.
TE2 (n) is calculated, and key detection is performed based on this degree of coincidence. More specifically, first, the selection candidate key number LSCLN (p) that maximizes the degree of coincidence is obtained (step S12), and the presence or absence of a note characteristic of the minor note (steps S13 to 16), the tonic note, and the group note. Number (step S17
-19), the key of the first detection section is detected.

【0046】次に、図6のステップS6で実行される調
判定サブルーチンを、図9を参照して説明する。
Next, the key determination subroutine executed in step S6 of FIG. 6 will be described with reference to FIG.

【0047】ステップS51では、一致度LRATE2
(n)が所定値R(例えば90%)を越えるLRATE
2(n)のnの値を選択候補調番号LSCLN(p)と
し、nの個数を選択候補調数LNとする。ここでパラメ
ータpは0から(LN−1)までの整数値をとる。
In step S51, the degree of coincidence LRATE2
LRATE in which (n) exceeds a predetermined value R (for example, 90%)
The value n of 2 (n) is the selection candidate key number LSCLN (p), and the number of n is the selection candidate key number LN. Here, the parameter p takes an integer value from 0 to (LN-1).

【0048】ステップS52では、選択候補調番号LS
CLN(p)(p=0〜LN−1)の中に、カレント調
番号(1つ前の検出区間において検出された調の番号)
CSCLNと同じものがあるか否かを判別し、同じもの
があれば(ステップS52の答が肯定(YES))、今
回の検出区間の調番号はカレント調番号CSCLNと同
一である(転調していない)と判定し、直ちに本ルーチ
ンを終了する。カレント調番号CSCLNと同じものが
選択候補調番号LSCLN(p)の中になければ(ステ
ップS52の答が否定(NO))、LSCLN(p)
(p=0〜LN−1)の中に、LRATE1(n)>L
RATE2(n)が成立する調番号nと同一の番号があ
れば、LSCLN(p)=nである選択候補調番号LS
CLN(p)を削除するとともに、選択候補調数LNを
削除した数だけ減少させる(ステップS53)。ここで
LRATE1(n)は、前回の検出区間の一致度であ
り、ステップS53により、一致度が減少した選択候補
調番号LSCLN(p)は、選択候補から除かれる。除
かれる調番号がある場合には、図7のルーチンと同様に
パラメータpの繰り上げが行われる。
In step S52, the selection candidate key number LS
The current key number (the key number detected in the preceding detection section) in CLN (p) (p = 0 to LN-1)
It is determined whether or not there is the same key as CSCLN, and if there is the same key (the answer in step S52 is affirmative (YES)), the key number of the detected section this time is the same as the current key number CSCLN (the key is transposed). No)), and this routine is immediately terminated. If the same one as the current key number CSCLN is not in the selection candidate key number LSCLN (p) (the answer to step S52 is negative (NO)), LSCLN (p).
In (p = 0 to LN-1), LRATE1 (n)> L
If there is the same number as the key number n for which RATE2 (n) holds, the selection candidate key number LS for which LSCLN (p) = n
CLN (p) is deleted and the selection candidate key number LN is decreased by the deleted number (step S53). Here, RATE1 (n) is the degree of coincidence in the previous detection section, and the selection candidate key number LSCLN (p) whose degree of coincidence has decreased is removed from the selection candidates in step S53. If there is a key number to be removed, the parameter p is advanced as in the routine of FIG.

【0049】ステップS54では、選択候補調番号LS
CLN(p)が残っているか否かを判別し、残っていな
ければ(ステップS54の答が否定(NO))、転調し
ていないと判定し、直ちに本ルーチンを終了する。選択
候補調番号LSCLN(p)が残っているときには(ス
テップS54の答が肯定(YES))、図3の優先順位
テーブルを用いてLSCLN(p)(p=0〜LN−
1)に対応する調の中から、転調する可能性(優先順
位)の最も高い調を求める。図3の優先順位テーブルの
前調が、カレント調番号CSCLNに対応する調(TN
j−1,MDj−1)である。
In step S54, the selection candidate key number LS
It is determined whether or not CLN (p) remains, and if it does not remain (the answer in step S54 is negative (NO)), it is determined that there is no modulation, and this routine is immediately terminated. When the selection candidate key number LSCLN (p) remains (the answer in step S54 is affirmative (YES)), LSCLN (p) (p = 0 to LN- is used by using the priority table of FIG.
Among the keys corresponding to 1), the key with the highest possibility of being transposed (priority order) is obtained. The first key of the priority table of FIG. 3 is the key (TN) corresponding to the current key number CSCLN.
j-1, MDj-1).

【0050】ステップS56では、優先順位テーブルに
該当するものがあるか否かを判別し、該当するものがな
ければ(ステップS56の答が否定(NO))、転調し
ていないと判定して直ちに本ルーチンを終了する。該当
するものがあるときには(ステップS56の答が肯定
(YES))、今回検出の対象となっている検出区間の
最初の小節の小節番号i、優先順位テーブルの該当する
調の主音及びモードをそれぞれ調メモリに記憶する小節
番号MEj、主音TNj及びモードMDjとするととも
に、TNj及びMDjに対応する調番号をカレント調番
号CSCLNとする(ステップS57)。次いで、調デ
ータ番号jを値1だけインクリメントし(ステップS5
8)、一致度の今回算出値LRATE2(n)(n=0
〜11)をLRATE1(n)として(ステップS5
9)、本ルーチンを終了する。
In step S56, it is determined whether or not there is a corresponding one in the priority table, and if there is no corresponding one (the answer in step S56 is negative (NO)), it is determined immediately that no modulation is performed. This routine ends. When there is a corresponding one (the answer in step S56 is affirmative (YES)), the bar number i of the first bar of the detection section which is the target of the current detection, the tonic of the corresponding key and the mode of the priority table are respectively set. The bar number MEj, the tonic TNj, and the mode MDj stored in the key memory are set, and the key number corresponding to TNj and MDj is set as the current key number CSCLN (step S57). Then, the key data number j is incremented by 1 (step S5
8), the current calculated value of the degree of coincidence LRATE2 (n) (n = 0
~ 11) as LRATE1 (n) (step S5
9), this routine is ended.

【0051】図9の調判定サブルーチンによれば、調内
音との一致度LRATE2(n)が所定値Rを越える調
が、選択候補調とされ、この中に前調と同一のものがあ
れば転調していないと判定される。同一のものがなけれ
ば、先ず一致度が減少したものが候補から除かれ、それ
でも候補が残っている場合には、優先順位テーブルにあ
る転調の可能性の最も高い調に転調したと判定される。
According to the key determination subroutine of FIG. 9, a key whose degree of coincidence LRATE2 (n) with the in-tone exceeds a predetermined value R is selected as a candidate key for selection, and some of these keys are the same as the previous key. If it is not transposed, it is determined. If there is no match, the one whose degree of coincidence decreases is removed from the candidates, and if there are still candidates, it is determined that the key with the highest possibility of modulation in the priority table has been transposed. ..

【0052】次に図11及び図12を参照して、上述し
た調検出手法を説明する。
Next, the above-mentioned key detection method will be described with reference to FIGS.

【0053】図11の例では、検出区間の区間長MEN
=4,シフト長SME=1であり、また一致度は上位の
2つのみ示している。また、図12は一致度の推移を示
している。
In the example of FIG. 11, the section length MEN of the detection section
= 4, the shift length SME = 1, and the degree of coincidence is shown only in the upper two. Further, FIG. 12 shows the transition of the degree of coincidence.

【0054】先ず第1検出区間(第1〜第4小節)につ
いては、図7の初期調検出サブルーチンによって調検出
が行われる。一致度LRATE1(n)が最大となるの
は、Cメジャー又はAマイナーに対応するLRATE1
(0)のみであるため、選択候補調番号LSCLN
(0)=0,選択候補調数LN=1となる。
First, regarding the first detection section (first to fourth measures), key detection is performed by the initial key detection subroutine of FIG. The degree of coincidence LRATE1 (n) is the maximum when LRATE1 corresponding to C major or A minor
Since it is only (0), the selection candidate key number LSCLN
(0) = 0 and the selection candidate key number LN = 1.

【0055】第1検出区間内には、Aマイナー調の主音
Aから長6度又は長7度の音(F#,G#)はないの
で、図7のステップS15でCメジャーは削除されな
い。第1の検出区間内には、Cメジャーの主音Cは4
個、Aマイナーの主音Aは3個あるので、図7のステッ
プS17でAマイナーが候補から除かれ、第1検出区間
の調はCメジャーと検出される。
Since there is no major 6th or major 7th note (F #, G #) from the A minor tonic A in the first detection section, C major is not deleted in step S15 of FIG. In the first detection section, the tonic C of C major is 4
Since there are three main tones A of the A minor, the A minor is removed from the candidates in step S17 of FIG. 7, and the key of the first detection section is detected as C major.

【0056】第2検出区間(第2〜第5小節)では、所
定値Rを90%とすると、選択候補調番号LSCLN
(0)=0,LSCLN(1)=5,選択候補調数LN
=2となる。ここで、カレント調番号CSCLN=0で
あるので、図9のステップS52の答が肯定(YES)
となり、転調していないと判定される。
In the second detection section (second to fifth measures), if the predetermined value R is 90%, the selection candidate key number LSCLN
(0) = 0, LSCLN (1) = 5, selection candidate key number LN
= 2. Here, since the current key number CSCLN = 0, the answer in step S52 in FIG. 9 is affirmative (YES).
Therefore, it is determined that the key is not transposed.

【0057】第3及び第4検出区間(第3〜第6小節、
第4〜第7小節)も、第2検出区間と同様に判定され
る。
Third and fourth detection sections (third to sixth measures,
The fourth to seventh measures) are also determined in the same manner as the second detection section.

【0058】第5検出区間(第5〜第8小節)では、選
択候補調番号はLSCLN(0)=5(F)のみとな
り、図8のステップS52の答が否定(NO)となる。
LSCLN(0)=5の一致度は前回(97%)と同一
であるため、図9のステップS53で削除されず、図3
の優先順位テーブルに前調Cメジャーから最も転調し易
い調としてFメジャーがあるので、ステップS56の答
が肯定(YES)となり、Fメジャーに転調したと判定
される。従って、第5検出区間の最初の小節である第5
小節からFメジャーに転調したことが検出される。
In the fifth detection section (5th to 8th measures), the selection candidate key number is only LSCLN (0) = 5 (F), and the answer to step S52 in FIG. 8 is negative (NO).
Since the matching degree of LSCLN (0) = 5 is the same as the previous time (97%), it is not deleted in step S53 of FIG.
Since there is F major as the key that is most easily transposed from the previous major C major in the priority table of No. 2, the answer in step S56 is affirmative (YES), and it is determined that the major major has been transposed. Therefore, the fifth measure which is the first measure of the fifth detection section
It is detected that the measure has changed to F major.

【0059】以上のように本実施例によれば、検出区間
を比較的長く設定し(例えば4小節とし)、シフト長を
短く設定する(例えば1小節とする)ことにより、転調
する部分を含む旋律の調を正確に検出し、転調箇所を高
い分解能で特定することができる。
As described above, according to the present embodiment, the detection section is set to be relatively long (for example, 4 bars), and the shift length is set to be short (for example, 1 bar) to include a portion to be transposed. It is possible to accurately detect the melody key and specify the transposed point with high resolution.

【0060】なお、調内音との一致度の算出において、
音符データが強拍か否かに応じた重み付けをするように
してもよい。
In calculating the degree of coincidence with the in-tone,
Weighting may be performed according to whether or not the note data is a strong beat.

【0061】また、楽譜データの供給は、フロッピーデ
ィスク等の外部記憶装置等によるものに限らず、演奏者
によってリアルタイムライト又はステップライトされる
ようにしてもよい。
The supply of the musical score data is not limited to the external storage device such as a floppy disk or the like, and may be performed by the performer in real time or in step writing.

【0062】また、楽譜データはメロディに限らず、伴
奏音等でもよい。
The musical score data is not limited to a melody, but may be an accompaniment sound or the like.

【0063】図10は、メインルーチンのステップSM
2で示される自動編曲処理のサブルーチンのフローチャ
ートである。
FIG. 10 shows step SM of the main routine.
6 is a flowchart of a subroutine of automatic arrangement processing shown by 2.

【0064】まず、ステップS61では、ロック、ディ
スコ、ジャズ、タンゴ、ルンバ等の編曲スタイルをユー
ザーが入力するのを受け付ける。次に、ステップS62
では、調検出ルーチンで小節番号MEjとともに記憶さ
れているTNjとMDjを先頭から順に調べ、先頭から
初めて調の変化のある小節の1つ前の小節までを1区間
として、1小節毎に和音を付与する。和音を付与すると
き、その区間の調を基に、その調に良く用いるメジャー
調の場合の主要6和音(I,IIm,IIIm,IV,V,VI
m)、マイナー調の場合の主要8和音(Im,III,IV,IV
m,V,Vm,VI,VII)の構成音の音名とメロディ中の音名
の一致度を算出し、最も高いものを選ぶ方式がとられ
る。一致度の同じものがあれば、適切な優先順位を持っ
て決定する。この優先順位は、音楽理論上、編曲のスタ
イルによって様々に異なるようにする方が望ましい。
First, in step S61, the user receives an input of an arrangement style such as rock, disco, jazz, tango, or rumba. Next, step S62.
Then, in the key detection routine, TNj and MDj stored together with the bar number MEj are searched in order from the beginning, and a chord is recorded for each bar from the beginning to the bar immediately preceding the bar having the key change for the first time. Give. When adding chords, the six major chords (I, IIm, IIIm, IV, V, VI) in the major tones that are often used for the tones are based on the tones of the section.
m), major 8 chords in the case of minor tone (Im, III, IV, IV
m, V, Vm, VI, VII) is calculated by calculating the degree of coincidence between the note names of the constituent notes and the note names in the melody and selecting the highest one. If they have the same degree of coincidence, they are decided with appropriate priority. According to music theory, it is desirable that the priority order be varied depending on the style of arrangement.

【0065】こうして小節毎に付与された和音は、小節
番号とともに和音メモリ11に記憶される。
The chords added to each bar in this way are stored in the chord memory 11 together with the bar numbers.

【0066】次に、初めて調の変化があった小節位置か
ら次に変化がある小節の1つ前の小節までを1区間とし
て、同様に1小節毎に和音を付与し、小節番号とともに
和音メモリ11に記憶していく。以降、メロディデータ
の最後に至るまで同様の動作を行う。
Next, a section from the bar position at which there is a change in key for the first time to the bar immediately before the bar at which there is a next change is set as a section, and a chord is similarly added to each bar, and a chord memory is stored together with the bar number. I will remember it in 11. After that, the same operation is performed until the end of the melody data.

【0067】ステップS63では、ステップS61で入
力された編曲スタイルに基づき、これと対応するパター
ンメモリ12内のリズムパターンナンバを小節に対応さ
せて伴奏演奏データメモリ10に記憶させる。同じ編曲
スタイルでもさまざまなバリエーションがあるので、そ
れらの中からランダムに選ぶ。
In step S63, the rhythm pattern number in the pattern memory 12 corresponding to the arrangement style input in step S61 is stored in the accompaniment performance data memory 10 in correspondence with the measure. There are many variations in the same arrangement style, so choose from them at random.

【0068】次に、ステップS64,S65に進み、そ
れぞれのステップでは前記スタイルに対応するパターン
メモリ12内のベースパターン、またはバッキングパタ
ーンを繰返し読出し、和音に対応する音高に変換して音
符データとして伴奏演奏データメモリ10に記憶する。
これらパターンも同じ編曲スタイルに対してさまざまな
バリエーションがあるので、その中からランダムに選び
音符データに直して記憶する。
Next, in steps S64 and S65, in each step, the base pattern or backing pattern in the pattern memory 12 corresponding to the style is repeatedly read, converted into a pitch corresponding to a chord, and converted into note data. It is stored in the accompaniment performance data memory 10.
Since these patterns also have various variations with respect to the same arrangement style, they are randomly selected from them and converted into note data and stored.

【0069】最後に、ステップS66では、メロディに
対し短3度下又は長3度下又は完全4度下のハーモニー
音を調データと和音に基づいて選択し、音符データとし
て同様に伴奏演奏データメモリ10に記憶する。
Finally, in step S66, a harmony tone which is 3 degrees below or 3 degrees below or 4 degrees below the melody is selected based on the key data and the chord, and is similarly stored as accompaniment performance data memory as note data. Store in 10.

【0070】以上のようにして、調検出サブルーチンに
より求められたデータに基づき自動編曲が行なわれる。
この後、メインルーチンに復帰し、編曲された伴奏演奏
の全パートデータがフロッピーディスクに転送される。
As described above, automatic arrangement is performed based on the data obtained by the key detection subroutine.
After that, the process returns to the main routine and all the arranged part data of the accompaniment performance is transferred to the floppy disk.

【0071】なお、編集し終わった後、視聴するサブル
ーチンを設けても良い。この場合、図1に記載した出力
インタフェース13から伴奏演奏データメモリ10及び
メロディメモリ7内に記憶されている音符データを出力
し、また、パターンシーケンスデータとして記憶されて
いるリズムパターンに対しては、パターンメモリ12を
参照して音符データに変換して出力するようにして、そ
の出力インタフェース13に接続された音源装置によっ
て楽音を発生させ視聴すると良い。
It should be noted that a subroutine for viewing after editing may be provided. In this case, the note data stored in the accompaniment performance data memory 10 and the melody memory 7 is output from the output interface 13 shown in FIG. 1, and for the rhythm pattern stored as the pattern sequence data, The pattern memory 12 may be referred to so as to be converted into musical note data and outputted, and a musical tone may be generated and viewed by a sound source device connected to the output interface 13.

【0072】また、視聴後気に入らなかった部分につい
て、選択パターンを他の候補に差し替えるような修正ル
ーチンを設けても良い。
Further, a correction routine may be provided for replacing the selection pattern with another candidate for a portion which the viewer does not like after viewing.

【0073】また、編曲後のフロッピディスクを同一フ
ォーマットの自動演奏装置にセットし、自動演奏させて
も良い。
Alternatively, the arranged floppy disk may be set in an automatic performance device of the same format and automatically played.

【0074】[0074]

【発明の効果】以上詳述したように、請求項1記載の発
明によれば、音楽データに転調が含まれていても、その
転調された調と転調位置を検出し、その調と位置に基づ
いて編曲するので、転調を含む音楽データに対しても不
都合のない編曲を行うことができる。
As described above in detail, according to the first aspect of the invention, even if the music data contains a modulation, the modulated key and the modulation position are detected, and the key and the position are detected. Since the music is arranged on the basis of the arrangement, it is possible to arrange the music data including the modulation without any inconvenience.

【0075】請求項2記載の発明によれば、音符データ
と調内音の一致度に基づいて調検出が行われ、一致度算
出の単位となる所定区間は、隣接する区間と重複部分を
有するように特定されるので、転調する部分を含む旋律
の調を正確に検出し、転調箇所を高い分解能で特定する
ことができる。
According to the second aspect of the present invention, the key detection is performed based on the degree of coincidence between the note data and the intone, and the predetermined section as a unit for calculating the degree of coincidence has an overlapping portion with an adjacent section. Since it is specified as described above, it is possible to accurately detect the key of the melody including the part to be transposed, and to specify the transposition location with high resolution.

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

【図1】本発明の一実施例に係る調検出装置の全体構成
を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of a key detection device according to an embodiment of the present invention.

【図2】メロディメモリ及び調メモリに格納されるデー
タの形式を示す図である。
FIG. 2 is a diagram showing a format of data stored in a melody memory and a tone memory.

【図3】転調した調を判定するために使用する優先順位
テーブルを示す図である。
FIG. 3 is a diagram showing a priority order table used to determine a key that has been transposed.

【図4】調番号(n)と調内音の音名データ構成を示す
図である。
FIG. 4 is a diagram showing a note number data structure of a key number (n) and a key note.

【図5】調検出処理及び自動編曲処理メインルーチンの
フローチャートである。
FIG. 5 is a flowchart of a main routine of key detection processing and automatic music arrangement processing.

【図6】調検出処理のサブルーチンのフローチャートで
ある。
FIG. 6 is a flowchart of a subroutine of key detection processing.

【図7】初期調検出を行うサブルーチンのフローチャー
トである。
FIG. 7 is a flowchart of a subroutine for performing initial tone detection.

【図8】音符データと調内音との一致度を検出するサブ
ルーチンのフローチャートである。
FIG. 8 is a flowchart of a subroutine for detecting the degree of coincidence between note data and intones.

【図9】旋律の途中で転調したか否かを判定するサブル
ーチンのフローチャートである。
FIG. 9 is a flowchart of a subroutine for determining whether or not a transposition is performed during a melody.

【図10】自動編曲処理のサブルーチンのフローチャー
トである。
FIG. 10 is a flowchart of a subroutine of automatic arrangement processing.

【図11】楽譜データの例を示す図である。FIG. 11 is a diagram showing an example of musical score data.

【図12】図9のデータ例における一致度の推移を示す
図である。
FIG. 12 is a diagram showing the transition of the degree of coincidence in the data example of FIG. 9.

【符号の説明】[Explanation of symbols]

1 フロッピーディスク装置 2 ディスク制御装置 3 中央処理装置(CPU) 7 メロディメモリ 8 調メモリ 9 優先順位テーブル 10 伴奏演奏データメモリ 11 和音メモリ 12 パターンメモリ 1 floppy disk device 2 disk control device 3 central processing unit (CPU) 7 melody memory 8 tone memory 9 priority table 10 accompaniment performance data memory 11 chord memory 12 pattern memory

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 音楽データを記憶する音楽データ記憶手
段と、前記音楽データを分析して該音楽データの調とそ
の調が転調していた場合の転調位置を検出する調検出手
段と、前記調を表す調データを記憶する調記憶手段であ
って、前記音楽データが転調していた場合には、順次変
化する調に対応する調データを前記音楽データの位置に
対応して記憶するものと、前記調記憶手段に記憶されて
いる調データに基づいて、転調されている場合には順次
変化する前記調が対応して記憶されている音楽データの
位置にも基づいて前記音楽データとともに演奏されるべ
き他の音楽データを生成する音楽データ生成手段とを備
える自動編曲装置。
1. A music data storage means for storing music data, a key detection means for analyzing the music data and detecting a key of the music data and a key position where the key is transposed, the key detection means. A key storage means for storing key data representing, wherein when the music data is transposed, key data corresponding to sequentially changing keys is stored in correspondence with the position of the music data, On the basis of the key data stored in the key storage means, when the key is transposed, the key that sequentially changes is played together with the music data also based on the position of the corresponding music data stored. An automatic arrangement device including a music data generation unit that generates other music data to be reproduced.
【請求項2】 音符データを含む音楽データを供給する
音楽データ供給手段と、前記音楽データの所定区間を順
次特定する区間特定手段と、該特定された所定区間内の
音符データの音名と調内音階音の音名との一致度を求め
る一致度演算手段と、前記所定区間を、隣接する区間と
重複部分を有するように順次特定する特定手段と、順次
特定される区間に対して順演算される一致度に応じて転
調を検出する転調手段とを備える調検出装置。
2. Music data supply means for supplying music data including note data, section specifying means for sequentially specifying a predetermined section of the music data, and note names and notes of note data in the specified predetermined section. A coincidence degree calculating means for obtaining a degree of coincidence with a note name of an internal scale note, a specifying means for sequentially specifying the predetermined section so as to have an overlapping portion with an adjacent section, and a forward calculation for the sequentially specified section. And a modulation means for detecting modulation according to the degree of coincidence.
JP4180436A 1992-06-15 1992-06-15 Key detection device and automatic arrangement device Expired - Fee Related JP2715816B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4180436A JP2715816B2 (en) 1992-06-15 1992-06-15 Key detection device and automatic arrangement device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4180436A JP2715816B2 (en) 1992-06-15 1992-06-15 Key detection device and automatic arrangement device

Publications (2)

Publication Number Publication Date
JPH05346781A true JPH05346781A (en) 1993-12-27
JP2715816B2 JP2715816B2 (en) 1998-02-18

Family

ID=16083212

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4180436A Expired - Fee Related JP2715816B2 (en) 1992-06-15 1992-06-15 Key detection device and automatic arrangement device

Country Status (1)

Country Link
JP (1) JP2715816B2 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008116870A (en) * 2006-11-08 2008-05-22 Casio Comput Co Ltd Musical piece structure analyzing device and musical piece structure analysis processing program
JP2008129032A (en) * 2006-11-16 2008-06-05 Casio Comput Co Ltd Practice procedure generator and practice procedure generation processing program
JP2011138153A (en) * 2011-02-18 2011-07-14 Casio Computer Co Ltd Musical piece structure analyzing device and musical piece structure analysis processing program
JP2018054854A (en) * 2016-09-28 2018-04-05 カシオ計算機株式会社 Code analysis device, method, and program

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006062064A1 (en) 2004-12-10 2006-06-15 Matsushita Electric Industrial Co., Ltd. Musical composition processing device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6365159A (en) * 1986-09-08 1988-03-23 Honda Motor Co Ltd Electronic control fuel injection device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6365159A (en) * 1986-09-08 1988-03-23 Honda Motor Co Ltd Electronic control fuel injection device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008116870A (en) * 2006-11-08 2008-05-22 Casio Comput Co Ltd Musical piece structure analyzing device and musical piece structure analysis processing program
JP2008129032A (en) * 2006-11-16 2008-06-05 Casio Comput Co Ltd Practice procedure generator and practice procedure generation processing program
JP2011138153A (en) * 2011-02-18 2011-07-14 Casio Computer Co Ltd Musical piece structure analyzing device and musical piece structure analysis processing program
JP2018054854A (en) * 2016-09-28 2018-04-05 カシオ計算機株式会社 Code analysis device, method, and program

Also Published As

Publication number Publication date
JP2715816B2 (en) 1998-02-18

Similar Documents

Publication Publication Date Title
JP3541706B2 (en) Automatic composer and storage medium
US20160148604A1 (en) Automatic composition apparatus, automatic composition method and storage medium
JP3528654B2 (en) Melody generator, rhythm generator, and recording medium
US6100462A (en) Apparatus and method for generating melody
US7956275B2 (en) Music performance training apparatus and method
JP2002023747A (en) Automatic musical composition method and device therefor and recording medium
US6323411B1 (en) Apparatus and method for practicing a musical instrument using categorized practice pieces of music
JPH05346781A (en) Key detecting device and automatic music arranging device
US6809248B2 (en) Electronic musical apparatus having musical tone signal generator
JP2900753B2 (en) Automatic accompaniment device
JP2012098480A (en) Chord detection device and program
JP3013648B2 (en) Automatic arrangement device
JP3278886B2 (en) Key detection device
JP6604307B2 (en) Code detection apparatus, code detection program, and code detection method
Muñoz-Lago et al. SymPlot: A web-tool to visualise symbolic musical data
JP3531507B2 (en) Music generating apparatus and computer-readable recording medium storing music generating program
JP2004171019A (en) Automatic composing device and memory medium
JP2615722B2 (en) Automatic composer
JP3591444B2 (en) Performance data analyzer
JP2856025B2 (en) Automatic accompaniment device
JP3818298B2 (en) Available note scale determining apparatus and recording medium
JP3565107B2 (en) Melody generation device, chord progression data generation device, and recording medium
JP3807333B2 (en) Melody search device and melody search program
JP3163654B2 (en) Automatic accompaniment device
JP3334809B2 (en) Automatic accompaniment device

Legal Events

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