JPH06314096A - Device for detecting front code of electronic musical instrument - Google Patents

Device for detecting front code of electronic musical instrument

Info

Publication number
JPH06314096A
JPH06314096A JP5124684A JP12468493A JPH06314096A JP H06314096 A JPH06314096 A JP H06314096A JP 5124684 A JP5124684 A JP 5124684A JP 12468493 A JP12468493 A JP 12468493A JP H06314096 A JPH06314096 A JP H06314096A
Authority
JP
Japan
Prior art keywords
code
chord
key
detected
sound
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.)
Withdrawn
Application number
JP5124684A
Other languages
Japanese (ja)
Inventor
Ikuo Kobayashi
郁夫 小林
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.)
Kawai Musical Instrument Manufacturing Co Ltd
Original Assignee
Kawai Musical Instrument Manufacturing 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 Kawai Musical Instrument Manufacturing Co Ltd filed Critical Kawai Musical Instrument Manufacturing Co Ltd
Priority to JP5124684A priority Critical patent/JPH06314096A/en
Publication of JPH06314096A publication Critical patent/JPH06314096A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

PURPOSE:To surely detect a front code and to improve the responsiveness for a code input by updating the front code by storing a code detected last time as the front code when a prescribed time lapses from last code change when the code change is detected. CONSTITUTION:When the code change is detected, whether the prescribed time lapses from a last code change time or not is detected, and when the prescribed time lapses, the front code is updated by storing the code detected last time as the front code, and when not, no front code is updated. By a CPU 10, a control program is read out from a ROM 11 through a system bus 20 to be interpreted and executed, and prescribed fixed data are read out to be used for various kinds of processings. A timer is incorporated in the CPU 10, and the interruption is generated e.g. at a 1m second interval, and the interruption by the timer is used for measuring the time lapse for detecting the front code.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、電子楽器の自動伴奏装
置に適用され、前回使用されたコード(以下、「前コー
ド」という)を確実に検出する電子楽器の前コード検出
装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic musical instrument accompaniment device for an electronic musical instrument, and relates to a preceding chord detecting device for an electronic musical instrument which surely detects a previously used chord (hereinafter referred to as "previous chord").

【0002】[0002]

【従来の技術】近年、自動伴奏装置を備えた電子楽器が
開発され実用に供されている。かかる電子楽器において
は、一般に、鍵盤の一部がコード検出用、残りが通常演
奏用の領域として定められている。そして、通用演奏領
域の鍵盤が押鍵されると、その押鍵位置等を示す押鍵情
報が生成され、この押鍵情報に基づいて押鍵位置に対応
した音高の楽音が発音される。
2. Description of the Related Art In recent years, electronic musical instruments having an automatic accompaniment device have been developed and put into practical use. In such an electronic musical instrument, a part of the keyboard is generally defined as a region for chord detection, and the rest is a region for normal performance. When the keyboard in the general performance area is depressed, key-depression information indicating the key-depression position or the like is generated, and a tone having a pitch corresponding to the key-depression position is produced based on the key-depression information.

【0003】一方、コード検出領域の鍵盤が押鍵された
場合も、その押鍵位置等を示す押鍵情報が生成される
が、この押鍵情報は押鍵位置に対応した音高の楽音を発
音するための情報としては使用されず、コード検出用の
情報として用いられる。即ち、演奏者がコード検出領域
の鍵盤を押鍵すると、その押鍵パターンに応じたコード
が検出され、この検出されたコードに基づいて所定のリ
ズムパターンに従った伴奏音が発生される。
On the other hand, when the keyboard in the chord detection area is depressed, key depression information indicating the key depression position and the like is generated. This key depression information is a musical tone having a pitch corresponding to the key depression position. It is not used as information for pronouncing, but as information for chord detection. That is, when the performer presses a key in the chord detection area, a chord corresponding to the depressed key pattern is detected, and an accompaniment sound according to a predetermined rhythm pattern is generated based on the detected chord.

【0004】上記コード検出の方法は従来から種々のも
のが知られている。例えば代表的なコード検出の方法と
して以下のものがある。
Various types of code detection methods have been known in the past. For example, the following are typical methods for detecting codes.

【0005】先ず、コード検出領域の鍵盤が押鍵される
と、その押鍵状態(各鍵のオン/オフ状態)を検出す
る。次いで、検出された押鍵状態からオンにされている
鍵の音名を1オクターブ内に集めた押鍵情報を作成す
る。次いで、この1オクターブの押鍵情報と、メジャ
ー、マイナー、セブンス等といったコード種毎の押鍵情
報(Cを根音として作成され、記憶手段に記憶されてい
る)とを順次比較し、一致した場合にそのコード種を検
出されたコードとする。
First, when a key in the chord detection area is depressed, the key depression state (on / off state of each key) is detected. Next, key-depression information is created by collecting the note names of the keys that are turned on from the detected key-depression state within one octave. Next, this one-octave key depression information is sequentially compared with the key depression information for each chord type such as major, minor, sevens, etc. (created with C as the root note and stored in the storage means), and they match. In that case, the code type is the detected code.

【0006】なお、C以外の根音を有するコード種を検
出する場合は、1オクターブの押鍵情報又はコード種毎
の押鍵情報を順次ローテートシフトさせながら比較し、
一致した時のシフト数により根音を決定する。
When detecting a chord type having a root note other than C, the key depression information for one octave or the key depression information for each chord type is sequentially rotated and compared,
The root note is determined by the number of shifts when they match.

【0007】このようにして検出されるコード名(根音
とコード種で構成される)と押鍵状態の一例を、図18
(A)に示す。図18(A)では、Cの鍵のみが押鍵さ
れた状態、C及びEの2鍵が押鍵された状態、C,E及
びGの3鍵が押鍵された状態では、いずれの場合もCメ
ジャーとして検出されることを示している。同様に、C
及びE♭の2鍵が押鍵された状態、C,E♭及びGの3
鍵が押鍵された状態では、いずれの場合もCマイナーと
して検出されることを示している。
FIG. 18 shows an example of chord names (consisting of root note and chord type) and key depression states detected in this way.
It shows in (A). In FIG. 18A, in any of the cases where only the key of C is pressed, the state where two keys of C and E are pressed, and the state where three keys of C, E and G are pressed, Is also detected as C major. Similarly, C
And 2 keys of E ♭ are pressed, 3 of C, E ♭ and G
In the state where the key is pressed, it indicates that the C minor is detected in any case.

【0008】かかるコード検出は、例えば、コード検出
領域の鍵の押鍵イベントを検出したタイミングで行われ
る。押鍵イベントの検出機能は、例えばシフトレジスタ
を用いた論理回路やマイクロプロセッサ等で実現される
が、いずれにしても押鍵イベントは各鍵毎に逐次1鍵ず
つ検出されるようになっている。これは、演奏者が同時
に複数鍵を押鍵したとしても同様である。
The code detection is performed, for example, at the timing when the key depression event of the key in the code detection area is detected. The function of detecting a key-depression event is realized by, for example, a logic circuit using a shift register, a microprocessor, or the like, but in any case, a key-depression event is detected one key after another for each key. . This is the same even if the performer simultaneously presses a plurality of keys.

【0009】従って、コード検出処理も、押下された鍵
の数だけ行われることになる。例えば「C,E♭,G」
の各構成音でなるGマイナーのコードが押鍵された場合
は、コード検出処理も3回行われることになる。このコ
ード検出方式(以下、「第1の従来例」という)は、最
終的にGマイナーという1つのコード名さえ検出すれば
良いのであるから、残りの2回のコード検出処理は無駄
な処理となっているという問題があるが、押鍵イベント
が発生する度にコード検出を行うので、コード入力に対
する応答性は優れている。
Therefore, the code detection process is performed as many times as the number of pressed keys. For example, "C, E ♭, G"
When the G minor chord consisting of each constituent sound is pressed, the chord detection process is also performed three times. Since this code detection method (hereinafter, referred to as "first conventional example") only needs to finally detect one code name G minor, the remaining two code detection processes are wasteful. However, since the code is detected each time a key press event occurs, the responsiveness to code input is excellent.

【0010】この第1の従来例の問題を解決するものと
して、例えば、コード検出領域の鍵が一定数(例えば3
個)押されて初めてコード検出を開始するもの(以下、
「第2の従来例」という)、コード検出領域の鍵が押さ
れてから一定時間の経過後にコード検出を開始するもの
(以下、「第3の従来例」という)等があった。
In order to solve the problem of the first conventional example, for example, a certain number of keys in the code detection area (for example, 3
Those that start code detection only after being pressed (hereinafter,
There is a "second conventional example"), a method in which code detection is started after a certain period of time has elapsed since the key in the code detection area was pressed (hereinafter referred to as "third conventional example").

【0011】これら第2、第3の従来例によれば、無駄
な処理を行うことなく相当の確実性をもって演奏者が意
図するコードを検出できるという利点がある。しかし、
コードを押鍵する操作を開始してから伴奏音が発生され
るまでに時間がかかり、コード入力に対する応答性に劣
るという欠点があった。
According to the second and third conventional examples, there is an advantage that the player can detect the chord intended by the player with considerable certainty without performing unnecessary processing. But,
There is a drawback that it takes time from the start of the operation of pressing the chord to the generation of the accompaniment sound, and the responsiveness to the chord input is poor.

【0012】一方、上記のようにして検出されたコード
は、コード展開という処理によって実際に発音される音
に変換(展開)される。
On the other hand, the chord detected as described above is converted (developed) into a sound to be actually sounded by a process called chord expansion.

【0013】このコード展開は、例えばメジャー、マイ
ナー、セブンス等といったコード種毎に、C、C♯、
D、…、Bといった各音名に対する変換情報を記憶した
音程変換テーブルを予め備えておき、検出されたコード
名が与えられた時に、予め自動伴奏データとして記憶さ
れているパターンデータを読み出し、これを根音及びコ
ード種とに応じて上記音程変換テーブルを参照して所定
の変換を行うことにより、検出されたコードを構成する
音を得る処理である。
This chord expansion is performed by C, C #, and C, for each chord type such as major, minor, and seventh.
A pitch conversion table storing conversion information for each pitch name such as D, ..., B is provided in advance, and when the detected chord name is given, the pattern data stored in advance as automatic accompaniment data is read, Is a process of obtaining a sound forming a detected chord by performing a predetermined conversion with reference to the pitch conversion table according to the root note and the chord type.

【0014】今、例えば図17に示すように、「C,
E,G」の3つの鍵が図示のコードフォームで押下され
たとすると、Cメジャーのコードが検出され、次いで、
コード展開が行われる。コード展開処理では、例えば上
記Cメジャーのコードが検出された場合は、図17
(A)に示すように、根音「C」から高音側へ「C,
E,G」の順番でなる3音に展開される。
Now, for example, as shown in FIG. 17, "C,
If three keys "E, G" are pressed in the chord form shown, the chord of C major is detected, and then
Code expansion is performed. In the chord expanding process, for example, when the chord of the C major is detected, FIG.
As shown in (A), from the root note “C” to the treble side, “C,
It is developed into three sounds in the order of "E, G".

【0015】次いで、演奏者が所定のコードフォームで
押鍵することによりGメジャーのコードが検出される
と、図17(B)に示すように、根音「G」から高音側
へ「G,B,D」の順番でなる3音に展開される。
Next, when the performer presses a key in a predetermined chord form to detect a G major chord, as shown in FIG. 17B, the root note "G" is changed to "G," It is developed into three sounds in the order of "B, D".

【0016】[0016]

【発明が解決しようとする課題】ところで、自動伴奏装
置におけるコード展開においては、検出されたコードの
情報によってコード展開するのみならず、前回使用した
コードの情報をも用いると、人間が伴奏したような自然
な自動伴奏を行うことができることが知られている。
By the way, in the chord expansion in the automatic accompaniment apparatus, not only the chord expansion based on the information of the detected chord but also the information of the chord used the last time is used, it seems that the human accompaniment performed. It is known that a natural automatic accompaniment can be performed.

【0017】そこで、かかる自動伴奏を実現するため
に、前コードを確実に残しておく必要が生じた。しかし
ながら、上述の第1の従来例では、演奏者が意図するコ
ードを検出するまでに複数回のコード検出処理が行われ
るので、直前に検出したコードを前コードとすることは
できない。具体的な例につき、図18(B)を参照しな
がら説明する。
Therefore, in order to realize such automatic accompaniment, it is necessary to surely leave the previous chord. However, in the above-described first conventional example, the chord detection processing is performed a plurality of times until the player detects the chord intended by the performer, so the chord detected immediately before cannot be set as the previous chord. A specific example will be described with reference to FIG.

【0018】例えば、Gマイナーのコードを構成する
「C,E♭,G」の各鍵をほぼ同時に押したとする。な
お、鍵盤イベントは、C→E♭→Gの順番で検出される
ものとし、Gマイナーのコードを押さえる前に検出され
ていたコード、つまり前コードはXであるものとする。
For example, it is assumed that the "C, E ♭, G" keys constituting the G minor code are pressed almost at the same time. It is assumed that the keyboard event is detected in the order of C → E ♭ → G, and the chord detected before the G minor chord is pressed, that is, the previous chord is X.

【0019】先ず、いずれの鍵も押鍵されていない状態
では、コード名Xが検出されている。この状態における
前回検知コード及び欲しい前コードは不定(「−」で示
されている)であるものとする。この状態で鍵Cの押鍵
イベントが検出されると、鍵Cのみの押鍵状態が認識さ
れて、コード名としてCメジャーが検出され、同時に、
前回検知コードとしてXが記憶される。
First, the code name X is detected when none of the keys is depressed. In this state, the previously detected code and the desired previous code are indefinite (indicated by "-"). When a key-depressing event of the key C is detected in this state, the key-depressing state of only the key C is recognized, C major is detected as a code name, and at the same time,
X is stored as the previous detection code.

【0020】次いで、鍵E♭の押鍵イベントが検出され
ると、鍵Cと鍵E♭の押鍵状態が認識されてコード名と
してCマイナーが検出され、同時に前回検知コードとし
てCメジャーが記憶される。更に、鍵Gの押鍵イベント
が検出されると、鍵C、鍵E♭及び鍵Gの押鍵状態が認
識されて、コード名として同じくCマイナーが検出さ
れ、同時に前回検知コードとしてCマイナーが記憶され
る。
Next, when a key depression event of the key E ♭ is detected, the key depression states of the key C and the key E ♭ are recognized, C minor is detected as a code name, and at the same time, C major is stored as a previously detected code. To be done. Further, when the key-depressing event of the key G is detected, the key-depressing states of the key C, the key E ♭ and the key G are recognized, the C-minor is also detected as the code name, and at the same time the C-minor is detected as the previously detected code. Remembered.

【0021】以上の処理によるコード検出では、コード
名としてGマイナーが得られることになるが、直前に検
知した前回検知コードを前コードとすれば、Gマイナー
が前コードとなってしまい、実際に欲しい前コードであ
るXは得られない。
In the code detection by the above processing, the G minor is obtained as the code name. However, if the previously detected code detected immediately before is the previous code, the G minor becomes the previous code. I can't get the desired code, X.

【0022】従来は前コードの概念が無かったので、上
述した第1の従来例で示した技術でコード検出及びコー
ド展開を行っても何等問題はなかった。しかし、演奏者
が意図する前コードを確実に得ようとすると、上記第1
の従来例で示した技術では対応できない。また、上述し
た第2、第3の実施例を用いれば、相当の確実性をもっ
て演奏者が意図する前コードを得ることができるが、上
述したように、コードを押さえる操作を開始してから伴
奏音が発生するまでに時間がかかり、コード入力に対す
る応答性に劣るという欠点がある。
Since there is no concept of the previous code in the related art, there is no problem even if the code detection and the code expansion are performed by the technique shown in the above-mentioned first conventional example. However, if the performer tries to get the intended previous chord without fail,
However, the technology shown in the conventional example cannot be used. Further, by using the above-mentioned second and third embodiments, the pre-chord intended by the performer can be obtained with a certain degree of certainty. However, as described above, the accompaniment is started after the chord holding operation is started. It takes a long time until a sound is generated, and there is a drawback that the response to the chord input is poor.

【0023】本発明は、かかる事情に鑑みなされたもの
で、前コードを確実に検出するとともに、コード入力に
対する応答性を向上させることのできる電子楽器の前コ
ード検出装置を提供することを目的とする。
The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a front chord detection device for an electronic musical instrument capable of surely detecting the front chord and improving the responsiveness to chord input. To do.

【0024】[0024]

【課題を解決するための手段】上記目的を達成するため
に、本発明の電子楽器の前コード検出装置は、今回検出
されたコードと前回検出されたコードとの異同を判断す
る判断手段と、該判断手段で今回検出されたコードと前
回検出されたコードとが相違することが判断された時に
計時を開始して所定時間が計時された場合にその旨を記
憶する計時手段と、前記判断手段で今回検出されたコー
ドと前回検出されたコードとが相違することが検出され
た場合に、前記計時手段が所定時間を計時した旨を記憶
していれば、前回検出されたコードを前コードとして記
憶する制御手段、とを具備したことを特徴とする。
In order to achieve the above object, the front chord detecting device for an electronic musical instrument of the present invention comprises a judging means for judging the difference between the chord detected this time and the chord detected last time, When the judgment means judges that the code detected this time is different from the code detected last time, the time measurement is started, and when the predetermined time is measured, the fact is stored, and the judgment means. If it is detected that the code detected this time is different from the code detected last time, and if the time measuring means stores the fact that the predetermined time is measured, the previously detected code is set as the previous code. And a control means for storing the information.

【0025】[0025]

【作用】本発明は、演奏者が複数鍵を押下することによ
り所定のコードを指定する場合は、各鍵の押鍵タイミン
グに微妙なずれはあっても短時間内で全鍵の押下は完了
するが、コードチェンジを行う場合は、前回の押鍵から
今回の押鍵までにはある程度の時間がかかるという演奏
上の特性を利用したものである。
According to the present invention, when the performer designates a predetermined chord by pressing a plurality of keys, all keys can be pressed within a short time even if there is a slight shift in the key pressing timing. However, when performing a chord change, the performance characteristic that a certain amount of time is required from the previous key depression to the current key depression is used.

【0026】即ち、本発明においては、今回検出された
コードと前回検出されたコードとが相違することが判断
された場合、換言すればコードチェンジが検出された場
合に、前回のコードチェンジ時から所定時間が経過して
いるか否かを調べ、所定時間が経過していれば前回検出
されたコードを前コードとして記憶することにより前コ
ードを更新し、所定時間が経過していなければ、前コー
ドの更新は行わないようにしている。
That is, according to the present invention, when it is determined that the code detected this time and the code detected last time are different, in other words, when a code change is detected, from the time of the previous code change. If the predetermined time has passed, the previous code is updated by storing the previously detected code as the previous code if the predetermined time has passed. If the predetermined time has not passed, the previous code is updated. I am trying not to update.

【0027】上述の図18(B)に示した例を参照して
具体的に説明すると、鍵Cに対する処理時点では、前回
のコード検出から或る程度の時間が経過しているはずで
あるので、前回検出したコードXを前コードとして記憶
する。次いで、鍵E♭に対する処理時点では、「C,E
♭,G」の各鍵をほぼ同時に押したのだから、前回のコ
ード検出(コードCの検出)時点からの時間経過は小さ
いはずであるので、前回検出したコードCは、前コード
として記憶しない。
Explaining in detail with reference to the example shown in FIG. 18B, a certain time should have elapsed from the previous code detection at the time of processing for the key C. , The previously detected code X is stored as the previous code. Next, at the time of processing for the key E ♭, "C, E
Since each key of "♭, G" is pressed almost at the same time, the time elapsed from the previous code detection (detection of code C) should be small, so the previously detected code C is not stored as the previous code.

【0028】同様に、鍵Gに対する処理時点でも、前回
のコード検出(コードCマイナーの検出)時点からの時
間経過は小さいはずであるので、前回検出したコードC
マイナーは、前コードとして記憶しない。従って、演奏
者が意図した最終的なコードであるGマイナーを検出し
た時点での前コードはXとなっており、正しい前コード
が検出できたことになる。
Similarly, at the processing time for the key G, the time elapsed from the previous code detection (detection of the code C minor) should be small, so the code C previously detected is small.
Miners do not remember as pre-code. Therefore, the previous chord is X at the time when the final chord, which is intended by the performer, is detected, and the correct chord has been detected.

【0029】これにより、前コード検出の確実性を向上
させることができるとともに、コード入力に対する応答
性を向上させることができる。
As a result, it is possible to improve the certainty of detecting the preceding code and also improve the responsiveness to the code input.

【0030】[0030]

【実施例】以下、本発明の電子楽器の前コード検出装置
の実施例につき図面を参照しながら詳細に説明する。な
お、以下では、本発明の特徴部分、即ち、前コード検出
に係る構成及び動作を中心に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of a front chord detecting device for an electronic musical instrument of the present invention will be described in detail below with reference to the drawings. In the following, the characteristic part of the present invention, that is, the configuration and operation related to the detection of the preceding code will be mainly described.

【0031】先ず最初に、本発明の理解を容易にするた
めに、本実施例の概要につき説明する。本発明の前コー
ド検出装置が適用される自動伴奏装置においては、「展
開フォーム作成」と「展開音作成」とに分けて考えるこ
とができる。
First, in order to facilitate understanding of the present invention, an outline of the present embodiment will be described. In the automatic accompaniment apparatus to which the pre-chord detection apparatus of the present invention is applied, it can be considered as "creation form creation" and "creation sound creation" separately.

【0032】「展開フォーム作成」では、それまでコー
ド構成音を押さえていた指の形(以下、「前フォーム」
という)と、新たに押さえられたコード(以下、「新コ
ード」という)の構成音とから、新コードの構成音を押
さえる指の形(以下、「展開フォーム」という)を作成
する。この際、新コードが○7 (セブンス:なお、○は
根音を示す。以下同じ)と○7sus4 (セブンスサスフォ
ー)である場合に、展開フォームを作成するために、前
コードが使用されることになる(詳細は後述する)。
In the "form expansion form", the shape of the finger holding the chord constituent sound until then (hereinafter referred to as "former form").
And the constituent sound of the newly pressed chord (hereinafter referred to as "new chord"), a finger shape (hereinafter referred to as "expansion form") for pressing the constituent sound of the new chord is created. At this time, if the new chords are ○ 7 (Sevens: Note that ○ indicates the root note, the same applies below) and ○ 7sus4 (Seventh Susfor), the previous chords are used to create the deployment form. This will be the case (details will be described later).

【0033】展開フォーム作成時のルールの主な点(詳
細は後述する)は、各指の移動可能範囲を2半音に設定
し、2半音で移動できる形を展開フォームとする。な
お、2半音で移動できない場合は、基本フォームを展開
フォームとする。なお、本実施例では、移動可能範囲を
「2半音」に限定して説明しているが、これに限定され
るものではなく、例えば「3半音」以上とすることもで
きる。
The main point of the rule when creating the expansion form (details will be described later) is that the movable range of each finger is set to two semitones, and the form that can be moved in two semitones is the expansion form. If the user cannot move in two semitones, the basic form is the expansion form. In the present embodiment, the movable range is limited to "2 semitones", but the present invention is not limited to this and may be "3 semitones" or more.

【0034】図2に、説明を簡単にするために、前コー
ドを使用しない場合の展開フォームの例、即ち、コード
がCメジャーからGメジャーへ移行する際の展開フォー
ムの例を示している。Cメジャーは、「C,E,G」の
各音で構成されるが、これを2半音以内の移動によりG
メジャーを構成する音「G,B,D」を得るためには、
構成音「B,D」を、図17(B)に示した構成音
「B,D」よりそれぞれ1オクターブ下に移動した展開
フォームを作成すれば良い。
For the sake of simplicity, FIG. 2 shows an example of the expansion form when the preceding code is not used, that is, an expansion form when the code is changed from C major to G major. C major is composed of each sound of "C, E, G", but it is moved to G within 2 semitones.
To get the sounds "G, B, D" that make up the major,
It is sufficient to create a development form in which the constituent sounds "B, D" are moved one octave below the constituent sounds "B, D" shown in FIG. 17B.

【0035】「展開音作成」は、展開フォーム作成で得
られた展開フォームと、自動伴奏データとして記憶され
ているパターンデータの鍵盤番号とから伴奏音として発
音する音、つまり展開音を作成する。例えば、自動伴奏
データとして、図3(A)に示すようなパターンデータ
が記憶されている場合、同図(B)に示すような展開フ
ォームが作成されると、同図(C)に示すような展開音
が得られる。
The "expansion sound creation" creates a sound to be generated as an accompaniment sound, that is, a development sound, from the expansion form obtained by the expansion form creation and the keyboard number of the pattern data stored as the automatic accompaniment data. For example, when the pattern data as shown in FIG. 3A is stored as the automatic accompaniment data, when a development form as shown in FIG. 3B is created, as shown in FIG. You can get the sound of expansion.

【0036】即ち、パターンデータ中のCの音が読み出
されると、1オクターブ下のBが展開音となり、同じく
Eの音が読み出されると、同一オクターブのDが展開音
となり、同じくGの音が読み出される、そのGがそのま
ま展開音とされる。
That is, when the C sound in the pattern data is read out, the B one octave lower becomes the expanded sound, and when the E sound is also read out, the D in the same octave becomes the expanded sound and the G sound is also emitted. The G that is read out is used as the expansion sound as it is.

【0037】従って、例えば図3(A)に示すように、
パターンデータが8音で構成されている場合は、上記と
同様の処理を行うことにより、展開音として図示する8
音が得られ、また、パターンデータが1オクターブを越
えるアルペジオパターンとして構成されていれば、展開
音としても同様の1オクターブを越えるアルペジオパタ
ーンの音が得られる。
Therefore, for example, as shown in FIG.
When the pattern data is composed of 8 sounds, the same processing as above is performed to display 8 sounds as expanded sounds.
If a sound is obtained and the pattern data is configured as an arpeggio pattern exceeding one octave, a similar sound having an arpeggio pattern exceeding one octave can be obtained.

【0038】なお、図3ではアルペジオパターンデータ
が自動伴奏データとして記憶されている場合の展開音の
例を示しているが、通常の和音のパターンデータが自動
伴奏データとして記憶されている場合は、その和音に対
応する展開音が得られることは勿論である。また、図3
には、パターンデータが8音で構成される場合の例が示
されているが、音の数は任意である。
Although FIG. 3 shows an example of the expanded sound when the arpeggio pattern data is stored as the automatic accompaniment data, when the normal chord pattern data is stored as the automatic accompaniment data, It goes without saying that the expanded sound corresponding to the chord can be obtained. Also, FIG.
Shows an example in which the pattern data is composed of eight tones, but the number of tones is arbitrary.

【0039】次に、この発明の特徴に係る「前コード検
出処理」と、上記「展開フォーム作成」及び「展開音作
成」を実現するための構成について説明する。
Next, a configuration for realizing the "previous code detection process" according to the features of the present invention and the above "expansion form creation" and "expansion sound creation" will be described.

【0040】図1は、本発明の自動伴奏装置が適用され
る電子楽器の実施例の概略構成を示すブロック図であ
る。本電子楽器の主要構成要素である、中央処理装置
(以下、「CPU」という)10、ROM11、RAM
12、鍵盤装置13、操作パネル14、及び楽音発生回
路(トーンジェネレータ)15は、システムバス20を
介して相互に接続されている。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an electronic musical instrument to which the automatic accompaniment apparatus of the present invention is applied. Central processing unit (hereinafter referred to as "CPU") 10, ROM 11, RAM, which are the main components of the electronic musical instrument
The keyboard device 13, the keyboard device 13, the operation panel 14, and the tone generation circuit (tone generator) 15 are connected to each other via a system bus 20.

【0041】CPU10は、ROM11に格納されてい
る制御プログラムに従って、当該電子楽器の全体を制御
する。例えば、CPU10は、鍵盤装置13の操作に応
じた発音/消音処理、操作パネル14の操作に応じた音
色変更、音量変更処理等の各種処理を行う。本発明の特
徴に係る前コード検出処理も、このCPU10によって
行われる。
The CPU 10 controls the entire electronic musical instrument according to the control program stored in the ROM 11. For example, the CPU 10 performs various processes such as sound generation / silence processing according to the operation of the keyboard device 13, tone color change and volume change processing according to the operation of the operation panel 14. The previous code detection process according to the features of the present invention is also performed by the CPU 10.

【0042】このCPU10には、専用線を介してMI
DIインタフェース回路19が接続されている。MID
Iインタフェース回路19は、本電子楽器と外部装置と
の間のMIDIデータの受け渡しを制御するものであ
る。外部装置としては、例えばMIDIデータを処理す
る他の電子楽器、シーケンサー、或いはパーソナルコン
ピュータ等を挙げることができる。
The CPU 10 is connected to the MI via a dedicated line.
The DI interface circuit 19 is connected. MID
The I interface circuit 19 controls the transfer of MIDI data between the electronic musical instrument and an external device. The external device may be, for example, another electronic musical instrument that processes MIDI data, a sequencer, or a personal computer.

【0043】また、このCPU10には、図示しないタ
イマが内蔵されており、例えば1ミリ秒間隔で割込を発
生させる。このタイマによる割込は、前コード検出のた
めの時間経過計測に使用される(詳細は後述する)。
Further, the CPU 10 has a timer (not shown) built therein, and generates an interrupt at intervals of 1 millisecond, for example. This timer interrupt is used to measure the elapsed time for detecting the previous code (details will be described later).

【0044】ROM11には、上述したCPU10を動
作させるための制御プログラムが記憶されている他、C
PU10が各種処理に用いる種々の固定データが記憶さ
れている。また、このROM11には、音色を規定する
ための音色パラメータや楽音波形を生成するためのパル
スコード変調(PCM)された波形データが記憶されて
いる。波形データは、複数の音色を実現するべく、各音
色毎に複数種類が用意されている。
The ROM 11 stores a control program for operating the CPU 10 described above, and C
Various fixed data used by the PU 10 for various processes are stored. The ROM 11 also stores tone color parameters for defining tone colors and pulse code modulated (PCM) waveform data for generating tone waveforms. A plurality of types of waveform data are prepared for each tone color in order to realize a plurality of tone colors.

【0045】更に、ROM11には、自動伴奏を行うた
めの自動伴奏データ(パターンデータ)、展開フォーム
を作成する基となる各コード種毎の基本フォームテーブ
ル(詳細は後述する)も記憶されている。
Further, the ROM 11 also stores automatic accompaniment data (pattern data) for performing automatic accompaniment, and a basic form table (details will be described later) for each chord type which is a basis for creating a development form. .

【0046】このROM11の記憶内容は、システムバ
ス20を介してCPU10及び楽音発生回路16により
時分割で読み出される。即ち、CPU10は、システム
バス20を介してROM11から制御プログラム(命
令)を読み出して解釈・実行すると共に、所定の固定デ
ータを読み出して各種処理に使用する。
The contents stored in the ROM 11 are read by the CPU 10 and the tone generation circuit 16 via the system bus 20 in a time division manner. That is, the CPU 10 reads a control program (command) from the ROM 11 via the system bus 20, interprets and executes the control program, and reads predetermined fixed data for use in various processes.

【0047】また、CPU10は、システムバス20を
介してROM11から読み出した音色パラメータに所定
の加工を施して楽音発生回路15に送ることにより、当
該電子楽器で発音される楽音の音色を決定する。更に、
CPU10は、システムバス20を介してROM11か
ら自動伴奏データを読み出し、これに基づいて展開音を
作成し、システムバス20を介して楽音発生回路15に
送ることにより自動伴奏を行う。
Further, the CPU 10 determines the tone color of the musical tone produced by the electronic musical instrument by subjecting the tone color parameter read from the ROM 11 via the system bus 20 to predetermined processing and sending it to the musical tone generating circuit 15. Furthermore,
The CPU 10 performs automatic accompaniment by reading the automatic accompaniment data from the ROM 11 via the system bus 20, creating a developed sound based on the data, and sending the expanded sound to the tone generation circuit 15 via the system bus 20.

【0048】一方、楽音発生回路15は、システムバス
20を介してROM11から波形データを読み出し、エ
ンベロープを付加してデジタル楽音信号を生成する。
On the other hand, the tone generating circuit 15 reads out waveform data from the ROM 11 via the system bus 20 and adds an envelope to generate a digital tone signal.

【0049】上記RAM12は、制御プログラムの実行
に用いる種々のデータを一時記憶するものであり、例え
ばデータバッファ、レジスタ、フラグ等の各領域が定義
されている。このRAM12は、システムバス20を介
してCPU10によりアクセスされる。このRAM12
に定義されるレジスタ、フラグ等については、以下にお
いて必要の都度説明する。
The RAM 12 temporarily stores various data used for execution of the control program, and each area such as a data buffer, a register, a flag is defined. The RAM 12 is accessed by the CPU 10 via the system bus 20. This RAM12
The registers, flags, etc. defined in 1) will be described below as needed.

【0050】操作パネル14は、本電子楽器の各種動作
を指示するために用いられるものであり、自動伴奏の開
始や終了を指示する操作子の他、各種操作子が設けられ
ている。なお、上記各種操作子は本発明とは直接関係し
ないので説明は省略する。
The operation panel 14 is used for instructing various operations of the electronic musical instrument, and is provided with various operators in addition to operators for instructing start and end of automatic accompaniment. It should be noted that the various operators described above are not directly related to the present invention, and a description thereof will be omitted.

【0051】この操作パネル14は、図示しないパネル
スキャン回路を介してCPU10に接続されている。パ
ネルスキャン回路は、上記各種操作子をスキャンし、各
操作子のオン/オフを示すビット列でなるパネルデータ
を生成してCPU10に送る。このパネルデータは、C
PU10の制御の下にRAM12に格納され、パネルイ
ベントの有無の判断に使用される(詳細は後述する)。
The operation panel 14 is connected to the CPU 10 via a panel scan circuit (not shown). The panel scan circuit scans the various operators described above, generates panel data including a bit string indicating ON / OFF of each operator, and sends the panel data to the CPU 10. This panel data is C
It is stored in the RAM 12 under the control of the PU 10 and is used to determine the presence / absence of a panel event (details will be described later).

【0052】鍵盤装置13は、演奏者が楽音の音程又は
コードを指示する鍵と、この鍵に連動して開閉するキー
スイッチ及びキースキャン回路により構成される。キー
スキャン回路は、各鍵をスキャンし、各鍵のオン/オフ
を示すビット列でなるキーデータを生成してCPU10
に送る。このキーデータは、CPU10の制御の下にR
AM12に記憶され、鍵盤イベントの有無の判断に使用
される(詳細は後述する)。
The keyboard device 13 is composed of a key for the performer to specify the pitch or chord of a musical tone, and a key switch and a key scan circuit which open / close in conjunction with this key. The key scan circuit scans each key, generates key data consisting of a bit string indicating ON / OFF of each key, and generates the CPU 10
Send to. This key data is R under the control of the CPU 10.
It is stored in the AM 12 and used to determine the presence / absence of a keyboard event (details will be described later).

【0053】楽音発生回路15は、CPU10から送ら
れてきた音程や音量等を指示する楽音データに従って楽
音信号を生成するものである。この楽音発生回路15
は、同時発音可能な複数のオシレータを有しており、発
音指示に応じて所定のオシレータが割り当てられて発音
に使用される。即ち、発音が割り当てられたオシレータ
は、上記ROM11から波形データを読み出し、これに
エンベロープを付加してデジタル楽音信号を生成する。
この楽音発生回路15で発生されたデジタル楽音信号
は、D/A変換器16に供給される。
The musical tone generating circuit 15 generates a musical tone signal in accordance with musical tone data sent from the CPU 10 for instructing the pitch, volume and the like. This tone generation circuit 15
Has a plurality of oscillators capable of simultaneously producing sounds, and a predetermined oscillator is assigned according to a sounding instruction and used for sounding. That is, the oscillator to which the sound is assigned reads the waveform data from the ROM 11 and adds the envelope to the waveform data to generate a digital musical tone signal.
The digital tone signal generated by the tone generating circuit 15 is supplied to the D / A converter 16.

【0054】D/A変換器16は、入力されたデジタル
信号をアナログ信号に変換して出力する周知のものであ
る。このD/A変換器16でアナログ信号に変換された
楽音信号は増幅器17に送られる。
The D / A converter 16 is a well-known one which converts an input digital signal into an analog signal and outputs it. The tone signal converted into the analog signal by the D / A converter 16 is sent to the amplifier 17.

【0055】増幅器17は、入力されたアナログ楽音信
号を所定の増幅率で増幅して出力する周知のものであ
る。この増幅器17で所定の増幅が行われた楽音信号
は、スピーカ18に供給される。
The amplifier 17 is a well-known amplifier which amplifies the input analog tone signal by a predetermined amplification factor and outputs it. The musical tone signal amplified by the amplifier 17 to a predetermined level is supplied to the speaker 18.

【0056】スピーカ18は、電気信号としてのアナロ
グ楽音信号を音響信号に変換する周知のものである。こ
のスピーカ18により、鍵盤装置13の押鍵/離鍵に対
応した楽音や自動伴奏に伴う楽音が放音されることにな
る。
The speaker 18 is a well-known one which converts an analog musical tone signal as an electric signal into an acoustic signal. The speaker 18 emits a musical sound corresponding to the key depression / key release of the keyboard device 13 and a musical sound associated with the automatic accompaniment.

【0057】次に、上記ROM11に記憶される基本フ
ォームテーブルにつき説明する。この基本フォームテー
ブルの一例を図4及び図5に示す。
Next, the basic form table stored in the ROM 11 will be described. An example of this basic form table is shown in FIGS.

【0058】この基本フォームテーブルは、コード名
(根音とコード種)が与えられた場合に、鍵盤を押さえ
る指の形の基本形を記憶するものである。例えばCメジ
ャーが与えられた場合には、「C,E,G」の順で各音
が押さえられた形が基本フォームとされる。また、Gメ
ジャーの場合は、1オクターブ下の「B」、当該オクタ
ーブの「D,G」の順で各音が押さえられた形が基本フ
ォームとされる。
This basic form table stores the basic shape of the finger pressing the keyboard when a chord name (root note and chord type) is given. For example, when C major is given, the basic form is a form in which the notes are pressed in the order of "C, E, G". Further, in the case of G major, the basic form is a form in which each note is suppressed in the order of "B" one octave below and "D, G" of the octave.

【0059】上記基本フォームテーブルに記憶される基
本フォームは3音を押さえる指の形で構成されるものと
する。なお、上記テーブルで「B♯」は「C」を意味
し、「C♭」とは「B」を意味し、「E♯」は「F」を
意味する。また、上記基本フォームテーブルは、実際は
数値化されて記憶されており、各記号と数値の対応は以
下の通りである。
It is assumed that the basic form stored in the basic form table is in the shape of a finger holding three sounds. In the table, "B #" means "C", "C ♭" means "B", and "E #" means "F". The above basic form table is actually digitized and stored, and the correspondence between each symbol and numerical value is as follows.

【0060】 C (B♯)…12 C♯(D♭)…13 D …14 D♯(E♭)…15 E …16 F (E♯)…17 F♯(G♭)…18 G …19 G♯(A♭)…20 A …21 A♯(B♭)…22 B (C♭)…23C (B #) ... 12 C # (D ♭) ... 13 D ... 14 D # (E ♭) ... 15 E ... 16 F (E #) ... 17 F # (G ♭) ... 18 G ... 19 G # (A ♭) ... 20 A ... 21 A # (B ♭) ... 22 B (C ♭) ... 23

【0061】よって、基本フォームテーブルには、例え
ば、 C ,E ,G →12,16,19 (C ) B ,E♭,G →11,15,19 (CmM7 ) 等
のように記憶されている。なお、「C」を数字の「1
2」に対応させたのは、当該オクターブより下のオクタ
ーブの音をも表現できるようにするためである。
Therefore, in the basic form table, for example, C, E, G → 12, 16, 19 (C) B, E ♭, G → 11, 15, 19 (CmM7) are stored. . Note that "C" is replaced by the number "1".
The reason why it corresponds to "2" is that the sound of the octaves below the relevant octave can be expressed.

【0062】次に、本実施例における展開フォーム作成
では、以下のルールに従って処理される。 (A)コードの変化が4回発生する毎に基本フォームに
戻る。即ち、コード名が4回変わる毎に基本フォームを
展開フォームとする。これは、特定のコード進行によっ
ては、展開フォームが限りなく移動してしまうのを防止
するためである。
Next, in the development form creation in this embodiment, processing is performed according to the following rules. (A) Return to the basic form every time a code change occurs four times. That is, every time the code name changes four times, the basic form is set as the expansion form. This is to prevent the expansion form from moving indefinitely depending on the specific chord progression.

【0063】(B)4つの音で構成されるコードの処理 このシステムでは、全てのコードを3つの音で構成す
る。従って、例えばC7 等の4声和音では、構成音のど
れか1つを省略する必要がある。ベース音は別に展開、
発音させるので通常は根音を省略する。具体的には、以
下に示すルールを適用して省略する音を決定する。図4
及び図5に示した基本フォームテーブルは、下記のルー
ルに従って作成されている。なお、○7と○7sus4は、例
外的に前コードによって省略する音が決定されるので、
CPU10の処理により省略が実現される。
(B) Processing of chords composed of four tones In this system, all chords are composed of three tones. Therefore, for a four-tone chord such as C7, it is necessary to omit one of the constituent tones. Bass sound is developed separately,
Since the pronunciation is made, the root note is usually omitted. Specifically, the following rules are applied to determine sounds to be omitted. Figure 4
The basic form table shown in FIG. 5 is created according to the following rules. In addition, as for ○ 7 and ○ 7sus4, the sound to be omitted is exceptionally decided by the previous chord, so
Omission is realized by the processing of the CPU 10.

【0064】(1)○、○m 、○sus4、○aug は、3声
和音なのでそのまま用いる。 (2)○M7、○m7、○m7-5、○mM7 、○dim は、根音を
抜く。 (3)○6 は、5度音を抜く。 (4)○7、○7sus4は、前コードによって以下のルール
が順番に適用される。 R4−1:前コードと根音が同じ場合、根音を抜く。 R4−2:前コードが、○、○m 、○sus4、○aug 、○
M7、○7 、○7sus4 だった場合は、根音を抜く。 R4−3:前コードが、○6 、○dim だった場合、5度
音を抜く。 R4−4:前コードが、○m7、○m7-5、○mM7 で、且
つ、根音が半音進行している場合、根音を抜く。 R4−5:前コードが、○m7、○m7-5、○mM7 で、且
つ、根音が半音進行していない場合、5度音を抜く。
(1) ◯, ◯ m, ◯ sus4, and ◯ aug are triphonic chords and are used as they are. (2) ○ M7, ○ m7, ○ m7-5, ○ mM7, ○ dim are rooted. (3) ○ 6 skips the fifth note. (4) For ○ 7 and ○ 7sus4, the following rules are applied in order according to the previous code. R4-1: If the previous chord and the root note are the same, remove the root note. R4-2: Previous code is ○, ○ m, ○ sus4, ○ aug, ○
If it is M7, ○ 7, ○ 7sus4, remove the root note. R4-3: If the previous code is ◯ 6 or ◯ dim, skip the fifth note. R4-4: If the previous chord is ◯ m7, ◯ m7-5, ◯ mM7 and the root note is advanced by a semitone, remove the root note. R4-5: If the previous chord is ◯ m7, ◯ m7-5, ◯ mM7 and the root note is not advanced by a semitone, skip the fifth note.

【0065】次に、上記の構成において、本発明に係る
電子楽器の動作につき、図6〜図16に示したフローチ
ャートを参照しながら詳細に説明する。
Next, the operation of the electronic musical instrument according to the present invention having the above structure will be described in detail with reference to the flow charts shown in FIGS.

【0066】図6は本電子楽器の動作を示すメインフロ
ーチャートであり、電源投入により起動されるものであ
る。
FIG. 6 is a main flow chart showing the operation of the electronic musical instrument, which is started by turning on the power.

【0067】即ち、電源が投入されると、先ず初期化処
理が行われる(ステップS10)。この初期化処理で
は、CPU10内部のレジスタやフラグ等のクリア処
理、RAM12内に定義された各種バッファ、レジスタ
及びフラグ等に初期値を設定する処理、楽音発生回路1
5に所定のデータを設定して不要な音が発生されるのを
抑止する処理等が行われる。
That is, when the power is turned on, an initialization process is first performed (step S10). In this initialization processing, clear processing of registers and flags inside the CPU 10, processing of setting initial values in various buffers, registers and flags defined in the RAM 12, tone generation circuit 1
Processing for setting predetermined data in 5 and suppressing generation of unnecessary sounds is performed.

【0068】次いで、パネル処理が行われる(ステップ
S11)。このパネル処理の詳細は、図7のフローチャ
ートに示されている。
Next, panel processing is performed (step S11). Details of this panel processing are shown in the flowchart of FIG.

【0069】パネル処理では、先ず、パネルイベントの
有無が調べられる(ステップS20)。これは、次のよ
うにして行われる。即ち、先ず、操作パネル14のパネ
ルスキャン回路で操作子がスキャンされ、各操作子のオ
ン/オフを示すパネルデータ(以下、これを「新パネル
データ」という)が読み込まれる。
In the panel processing, first, it is checked whether or not there is a panel event (step S20). This is done as follows. That is, first, the operator is scanned by the panel scan circuit of the operation panel 14, and the panel data indicating the on / off of each operator (hereinafter, referred to as "new panel data") is read.

【0070】次いで、前回読み込んで既にRAM12に
記憶されているパネルデータ(以下、「旧パネルデー
タ」という)と上記新パネルデータとが比較され、相違
するビットをオンにしたパネルイベントマップが作成さ
れる。このパネルイベントマップ中にオンになっている
ビットが存在する場合に、パネルイベントがあった旨が
判断されることになる。
Next, the panel data (hereinafter referred to as "old panel data") that has been previously read and already stored in the RAM 12 is compared with the new panel data, and a panel event map in which different bits are turned on is created. It If there is a bit that is turned on in this panel event map, it is determined that there is a panel event.

【0071】上記ステップS20で、パネルイベントが
ないことが判断されると、何等の処理を行うことなく、
このパネル処理ルーチンからリターンする。
If it is determined in step S20 that there is no panel event, no processing is performed and
The process returns from this panel processing routine.

【0072】一方、上記ステップS20で、パネルイベ
ントがあったことが判断されると、該パネルイベント
は、自動伴奏スイッチのイベントであるか否かが調べら
れる(ステップS21)。これは、パネルイベントマッ
プ中の自動伴奏スイッチに対応するビットがオンになっ
ているか否かを調べることにより行われる。
On the other hand, when it is determined in step S20 that there is a panel event, it is checked whether or not the panel event is an event of an automatic accompaniment switch (step S21). This is done by checking whether the bit corresponding to the automatic accompaniment switch in the panel event map is on.

【0073】ここで、自動伴奏スイッチのイベントでな
いことが判断されると、その他の処理が実行される(ス
テップS26)。このその他の処理は、例えば、音色選
択スイッチ、リズム選択スイッチ等のイベントに対する
処理である。その後、このパネル処理ルーチンからリタ
ーンする。
If it is determined that the event is not the automatic accompaniment switch event, other processing is executed (step S26). This other process is, for example, a process for an event such as a tone color selection switch and a rhythm selection switch. After that, the process returns from this panel processing routine.

【0074】一方、上記ステップS21で自動伴奏スイ
ッチのイベントであることが判断されると、そのイベン
トはオンイベントであるか否かが調べられる(ステップ
S22)。これは、新パネルデータ中の自動伴奏スイッ
チに対応するビットがオンになっているか否かを調べる
ことにより行われる。
On the other hand, when it is determined in step S21 that the event is an automatic accompaniment switch event, it is checked whether the event is an on event (step S22). This is done by checking whether the bit corresponding to the automatic accompaniment switch in the new panel data is on.

【0075】ここで、自動伴奏スイッチのオンイベント
でないことが判断されると、自動伴奏フラグが「0」に
クリアされる(ステップS25)。その後、このパネル
処理ルーチンからリターンする。ここに自動伴奏フラグ
は、RAM12に定義されるフラグであり、本電子楽器
が自動伴奏モードにあるか通常演奏モードにあるかを記
憶するものである。この自動伴奏フラグは、本電子楽器
が自動伴奏モードにある時は「1」、通常演奏モードに
ある時は「0」にそれぞれセットされる。
If it is determined that it is not the on event of the automatic accompaniment switch, the automatic accompaniment flag is cleared to "0" (step S25). After that, the process returns from this panel processing routine. The automatic accompaniment flag is a flag defined in the RAM 12 and stores whether the electronic musical instrument is in the automatic accompaniment mode or the normal performance mode. The automatic accompaniment flag is set to "1" when the electronic musical instrument is in the automatic accompaniment mode, and is set to "0" when the electronic musical instrument is in the normal performance mode.

【0076】上記ステップS22で、自動伴奏スイッチ
のオンイベントであることが判断されると、自動伴奏フ
ラグが「1」にセットされる(ステップS23)。次い
で、コード展開初期設定処理が行われる(ステップS2
4)。このコード展開初期設定処理は、操作パネル14
の自動伴奏スイッチが押下されることによって本電子楽
器が自動伴奏モードにされることにより、コード展開処
理を行うための初期値設定を行う処理である。
When it is determined in step S22 that the automatic accompaniment switch is on, the automatic accompaniment flag is set to "1" (step S23). Next, code expansion initial setting processing is performed (step S2).
4). This code expansion initialization process is performed by the operation panel 14
This electronic musical instrument is set to the automatic accompaniment mode by depressing the automatic accompaniment switch, and the initial value setting for the chord expansion processing is performed.

【0077】このコード展開初期値設定処理の詳細は、
図8のフローチャートに示される。即ち、コード展開初
期設定処理では、先ず、コードチェンジ回数カウンタC
CHGが初期化される(ステップS30)。即ち、CC
HGに初期値として「0」がセットされる。ここで、C
CHGは、RAM12内部に設けられるカウンタであ
り、コードチェンジ(コード変化)が発生した回数を記
憶するものである。このCCHGは、上述したように、
コード名が4回変わる毎に展開フォームを基本フォーム
に戻す処理に用いられる。
Details of this code expansion initial value setting process are as follows.
This is shown in the flow chart of FIG. That is, in the code expansion initial setting process, first, the code change counter C
CHG is initialized (step S30). That is, CC
"0" is set to HG as an initial value. Where C
The CHG is a counter provided inside the RAM 12 and stores the number of times a code change has occurred. This CCHG, as described above,
It is used to return the expanded form to the basic form every time the code name changes four times.

【0078】次いで、展開フォームの初期化が行われる
(ステップS31)。この処理は、展開フォームの初期
値として、Cメジャーの構成音を示す3つのデータ{1
2(C)、16(E)、19(G)}を、展開フォーム
記憶用の3つのバッファTNKF1〜TNKF3にセッ
トする。なお、バッファTNKF1〜TNKF3は、R
AM12に設けられる。
Next, the expansion form is initialized (step S31). This process uses three data {1 that indicates the constituent sounds of C major as the initial value of the expansion form.
2 (C), 16 (E), 19 (G)} are set in the three buffers TNKF1 to TNKF3 for storing the expanded form. The buffers TNKF1 to TNKF3 are R
It is provided in AM12.

【0079】以上のコード展開初期設定が終了すると、
このコード展開初期設定処理ルーチンからリターンして
パネル処理ルーチンに戻り、更にパネル処理ルーチンを
もリターンしてメインルーチンに戻る。
When the above code expansion initialization is completed,
The routine returns from this code expansion initialization processing routine to the panel processing routine, and also returns from the panel processing routine to return to the main routine.

【0080】メインルーチンでは、次いで鍵盤処理が行
われる(ステップS12)。この鍵盤処理の詳細イベン
トについては、図10のフローチャートに示されてい
る。
In the main routine, keyboard processing is then carried out (step S12). The detailed event of this keyboard processing is shown in the flowchart of FIG.

【0081】鍵盤処理では、先ず、鍵盤イベントの有無
が調べられる(ステップS50)。これは、次のように
して行われる。即ち、先ず、鍵盤装置13のキースキャ
ン回路でキースイッチがスキャンされ、各鍵の押下状態
を示すキーデータ(各鍵に対応したビット列でなり、こ
れを「新キーデータ」という))が読み込まれる。
In the keyboard processing, first, the presence or absence of a keyboard event is checked (step S50). This is done as follows. That is, first, the key switch circuit of the keyboard device 13 scans the key switches, and the key data indicating the pressed state of each key (a bit string corresponding to each key, which is called "new key data") is read. .

【0082】次いで、前回読み込んで既にRAM12に
記憶されているキーデータ(以下、旧キーデータ」とい
う)と、上記新キーデータとが比較され、相違するビッ
トをオンにしたキーイベントマップが作成される。この
キーイベントマップ中にオンになっているビットが存在
する場合に鍵盤イベントがあった旨が判断されることに
なる。
Next, the key data previously read and stored in the RAM 12 (hereinafter referred to as "old key data") is compared with the new key data, and a key event map in which different bits are turned on is created. It If there is a bit that is turned on in this key event map, it is determined that there is a keyboard event.

【0083】上記ステップS50で鍵盤イベントがなか
ったことが判断されると、何等の処理をも行うことな
く、この鍵盤処理ルーチンからリターンする。
If it is determined in step S50 that there is no keyboard event, the process returns from this keyboard processing routine without performing any processing.

【0084】一方、上記ステップS50で、鍵盤イベン
トがあったことが判断されると、次いで、その鍵盤イベ
ントは、コード検出域の鍵のイベントであるか否かが調
べられる(ステップS51)。即ち、鍵盤装置13の所
定の鍵番号以下の鍵のイベントであるか否かが調べられ
る。
On the other hand, if it is determined in step S50 that there is a keyboard event, then it is checked whether or not the keyboard event is a key event in the chord detection area (step S51). That is, it is checked whether or not it is an event of a key having a predetermined key number of the keyboard device 13 or less.

【0085】ここで、コード検出域の鍵のイベントでな
いことが判断されると、通常演奏における鍵盤イベント
である旨を認識し、その鍵盤イベントが押鍵イベントで
あるか否かが調べられる(ステップS54)。これは、
キーイベントマップ中のオンにされたビットに対応する
新キーデータ中のビットが「1」であるか否かを調べる
ことにより行われる。
If it is determined that the event is not a key event in the chord detection area, it is recognized that it is a keyboard event in normal performance, and it is checked whether or not the keyboard event is a key depression event (step S54). this is,
This is done by checking whether the bit in the new key data corresponding to the turned-on bit in the key event map is "1".

【0086】ここで、押鍵イベントであることが判断さ
れると、発音処理が行われる(ステップS55)。この
処理は、楽音発生回路15中の所定のオシレータに発音
を割り当て、上記オンイベントのあった鍵のキーナン
バ、押鍵の強さ(速度)を示すタッチデータ、及び音色
を示すデータ等でなる楽音データを楽音発生回路15に
送る処理である。これにより、楽音発生回路15の割り
当てられたオシレータにおいて、上記楽音データに基づ
いたデジタル楽音信号が生成され、これがD/A変換器
16、増幅器17及びスピーカ18に順次送られて発音
が行われる。
If it is determined that the event is a key depression event, sounding processing is performed (step S55). In this process, a tone is assigned to a predetermined oscillator in the tone generating circuit 15, and the tone is composed of the key number of the key having the above-mentioned on-event, touch data indicating the strength (speed) of key depression, and data indicating the tone color. This is a process of sending data to the tone generation circuit 15. As a result, in the oscillator to which the musical tone generating circuit 15 is assigned, a digital musical tone signal based on the musical tone data is generated and sequentially sent to the D / A converter 16, the amplifier 17 and the speaker 18 for sound generation.

【0087】一方、上記ステップS54で押鍵イベント
でないことが判断されると離鍵のイベントである旨を認
識し、消音処理が行われる(ステップS56)。即ち、
その離鍵があった鍵に割り当てられている楽音発生回路
15中のオシレータが検索され、リリースのエンベロー
プデータが送られることにより消音が行われる。
On the other hand, if it is determined in step S54 that the event is not the key depression event, it is recognized that the event is the key release event, and the mute processing is performed (step S56). That is,
The oscillator in the tone generation circuit 15 assigned to the key having the released key is searched, and the release envelope data is sent to mute the sound.

【0088】上記ステップS52で、鍵盤イベントがコ
ード検出域の鍵であることが判断されると、コード検出
処理が行われる(ステップS52)。このコード検出処
理は、押鍵パターンからコード名(根音及びコード種)
を検出する処理である。このコード検出方法は、周知の
種々の方法を用いることができる。
If it is determined in step S52 that the keyboard event is a key in the chord detection area, chord detection processing is performed (step S52). This chord detection process uses chord patterns (root note and chord type)
Is a process for detecting. As the code detecting method, various known methods can be used.

【0089】次いで、展開フォーム作成処理が行われる
(ステップS53)。この展開フォーム作成処理の詳細
については後述する。この展開フォーム作成処理が終了
すると、この鍵盤処理ルーチンからリターンし、メイン
ルーチンに戻る。
Then, the expansion form creating process is performed (step S53). Details of this expansion form creation processing will be described later. When this expansion form creating process is completed, the process returns from this keyboard processing routine and returns to the main routine.

【0090】メインルーチンでは、次いで、自動伴奏処
理が行われる(ステップS13)。この自動伴奏処理で
は、当該電子楽器が自動伴奏モードにされており、且つ
発音又は消音タイミングが到来した場合に、ROM11
から読み出した自動伴奏データ(パターンデータ)に応
じて展開音を作成し、発音又は消音を行う処理である。
この発音又は消音処理自体は、上記鍵盤装置13の押鍵
又は離鍵に伴う発音又は消音処理と同じである。なお、
ROM11から読み出した自動伴奏データが自動伴奏の
終了を示す特別のコードである場合、又は自動伴奏モー
ドが解除された場合は、自動伴奏は停止される。この自
動伴奏処理の詳細についても後述する。
Next, in the main routine, automatic accompaniment processing is performed (step S13). In this automatic accompaniment process, when the electronic musical instrument is in the automatic accompaniment mode and the timing of sounding or mute arrives, the ROM 11
This is a process of creating a developed sound in accordance with the automatic accompaniment data (pattern data) read out from and outputting or muting it.
This sounding or muffling process itself is the same as the sounding or muffling process that accompanies the key depression or key release of the keyboard device 13. In addition,
When the automatic accompaniment data read from the ROM 11 is a special code indicating the end of the automatic accompaniment, or when the automatic accompaniment mode is released, the automatic accompaniment is stopped. The details of this automatic accompaniment process will also be described later.

【0091】次いで、その他の処理が行われる(ステッ
プS14)。この「その他の処理」は、例えばMIDI
データの送受信処理等が含まれる。その後ステップS1
1に戻り、以下同様の処理を繰り返す。上記ステップS
11〜S14の繰り返し実行の過程で、パネル操作又は
鍵盤操作に基づくイベントや自動伴奏イベントが発生す
ると、そのイベントに対応する処理が行われることによ
り電子楽器としての各種機能が発揮される。
Next, other processing is performed (step S14). This "other processing" is, for example, MIDI.
Data transmission / reception processing and the like are included. Then step S1
Returning to 1, the same processing is repeated thereafter. Step S above
When an event or an automatic accompaniment event based on a panel operation or a keyboard operation occurs in the process of repeating 11 to S14, various functions as an electronic musical instrument are exhibited by performing a process corresponding to the event.

【0092】以上に説明したメインルーチンの処理と並
行して、タイマによる割込処理が行われる。このタイマ
による割込処理の詳細は、図9のフローチャートに示さ
れている。
In parallel with the processing of the main routine described above, the interrupt processing by the timer is performed. The details of the interrupt processing by this timer are shown in the flowchart of FIG.

【0093】このタイマによる割込処理は、コード検出
処理によりコードが検出された際に、前回検出されたコ
ードを前コードとして記憶するか否かを判断するための
所定時間を計時する処理である。
The interrupt processing by this timer is a processing for measuring a predetermined time for determining whether or not the previously detected code is stored as the previous code when the code is detected by the code detection processing. .

【0094】上記の所定時間は、短かすぎると前コード
を正しく検出できないし、一方、長すぎると素早いコー
ドチェンジに追従できなくなる。従って、上記事情を勘
案して最適の所定時間を得る必要があるが、本実施例で
は、テンポ120の時の16分音符の長さに相当する1
25ミリ秒より少し短い時間ということで100ミリ秒
という固定的な時間を用いた。
If the above predetermined time is too short, the previous code cannot be detected correctly, and if too long, it becomes impossible to follow a quick code change. Therefore, it is necessary to obtain the optimum predetermined time in consideration of the above circumstances, but in the present embodiment, it corresponds to the length of the 16th note at the tempo 120.
A fixed time of 100 ms was used because it was slightly shorter than 25 ms.

【0095】なお、上記所定時間を決定するに当たり、
16分音符の長さを基準としたのは、16分音符の長さ
より短い間隔でコードチェンジが行われることは少ない
であろうこと、及びコードを指示するための複数鍵の押
鍵は16分音符の長さより長い時間を要することは少な
いであろうということに基づく。
In determining the predetermined time,
Based on the length of the 16th note, it is unlikely that chord changes will be performed at intervals shorter than the length of the 16th note, and the key depression of multiple keys for instructing chords is 16 minutes. It is based on the fact that it will rarely take longer than the length of a note.

【0096】なお、上記所定時間は一例であり、100
ミリ秒に限定されるものではない。例えば、リズムや自
動伴奏を走らせているときは、そのテンポでの16分音
符に相当する時間より僅かに短い時間とすることができ
る。かかる構成によれば、楽曲のテンポに応じて最適な
時間を設定できる。
The above-mentioned predetermined time is an example, and 100
It is not limited to milliseconds. For example, when running a rhythm or an automatic accompaniment, the time can be set to be slightly shorter than the time corresponding to a sixteenth note at that tempo. With this configuration, the optimum time can be set according to the tempo of the music.

【0097】また、上記所定時間を複数用意しておき、
所望の値を選択するように構成することもできる。この
構成によれば、例えば上級者は短い時間、初心者は長い
時間を設定するというような使い方ができる。即ち、上
級者はほぼ同時にミスタッチもなく押鍵できるので、短
く設定することによりコードチェンジの応答性を高くし
て演奏することができる。一方、初心者は同時に押鍵で
きなかったりミスタッチの確率も高いので、応答性に少
々劣っても上記所定時間を長くしたほうが使い易いであ
ろう。
In addition, a plurality of the above predetermined times are prepared,
It can also be configured to select the desired value. With this configuration, for example, advanced users can set a short time and beginners can set a long time. That is, since the advanced player can press the keys without touching the keys almost at the same time, it is possible to improve the responsiveness of the chord change by performing the setting with a short setting. On the other hand, since a beginner cannot hit the keys at the same time or has a high probability of mis-touching, it may be easier to use the above predetermined time even if the responsiveness is a little poor.

【0098】上記所定時間を得るための割込処理では、
先ず、タイムアップフラグTIMEUPが「1」である
か否かが調べられる(ステップS40)。このフラグT
IMEUPは、RAM12に定義されるフラグであり、
前コード検出処理で用いる所定時間(100ミリ秒)が
経過したか否かを記憶するために用いられる。
In the interrupt processing for obtaining the above predetermined time,
First, it is checked whether or not the time-up flag TIMEUP is "1" (step S40). This flag T
IMEUP is a flag defined in the RAM 12,
It is used to store whether or not a predetermined time (100 milliseconds) used in the previous code detection process has elapsed.

【0099】ここでフラグTIMEUPが「1」である
ことが判断されると、既に100ミリ秒が経過している
ことを示しているので、以下の処理は行わずに、この割
込処理ルーチンからリターンする。
If it is determined that the flag TIMEUP is "1", it means that 100 milliseconds has already elapsed, and therefore the following processing is not performed and the interrupt processing routine is executed. To return.

【0100】一方、フラグTIMEUPが「1」でない
ことが判断されると、未だ100ミリ秒が経過していな
いことを示しているので、時間経過計数要求フラグCN
TREQが「1」であるか否かが調べられる(ステップ
S41)。このフラグCNTREQは、RAM12に設
けられるフラグであり、時間経過を計数すべきか否かを
記憶するために使用される。
On the other hand, if it is determined that the flag TIMEUP is not "1", it means that 100 milliseconds has not yet elapsed, and therefore the time elapsed counting request flag CN
It is checked whether TREQ is "1" (step S41). The flag CNTREQ is a flag provided in the RAM 12 and is used to store whether or not the elapsed time should be counted.

【0101】ここでフラグCNTREQが「0」である
ことが判断されると、時間経過を計数する必要がないこ
とを認識し、以下の処理は行わずに、この割込処理ルー
チンからリターンする。
When it is determined that the flag CNTREQ is "0", it is recognized that it is not necessary to count the elapsed time, and the following processing is not performed and the routine returns from this interrupt processing routine.

【0102】一方、フラグCNTREQが「1」である
ことが判断されると、時間経過を計数する必要があるこ
とを認識し、時間カウンタCNTTIMの内容がデクリ
メントされる(ステップS42)。即ち、時間カウンタ
CNTTIMの内容は1ミリ秒毎にデクリメントされる
ことになる。ここで、時間カウンタCNTTIMは、R
AM12に設けられるカウンタであり、時間経過を計数
するために使用されるものである。
On the other hand, when it is determined that the flag CNTREQ is "1", it is recognized that the elapsed time needs to be counted, and the content of the time counter CNTTIM is decremented (step S42). That is, the content of the time counter CNTTIM is decremented every 1 millisecond. Here, the time counter CNTTIM is R
It is a counter provided in the AM 12 and is used to count the elapsed time.

【0103】次いで、上記デクリメントの結果、時間カ
ウンタCNTTIMの内容がゼロになったか否かが調べ
られる(ステップS43)。そして、ゼロになっていな
いことが判断されると、この割込処理ルーチンからリタ
ーンする。
Next, it is checked whether or not the content of the time counter CNTTIM has become zero as a result of the decrement (step S43). Then, when it is determined that the value is not zero, the routine returns from this interrupt processing routine.

【0104】一方、上記時間カウンタCNTTIMの内
容がゼロになったことが判断されると、100ミリ秒を
計時したことを認識し、フラグCNTREQを「0」に
クリアする一方、フラグTIMEUPを「1」にセット
する。これにより、後述する展開フォーム処理におい
て、上記所定時間が経過したことを知ることができるよ
うになっている。以上の処理が終了すると、この割込処
理ルーチンからリターンする。
On the other hand, when it is determined that the content of the time counter CNTTIM has become zero, it is recognized that 100 milliseconds has been counted, the flag CNTREQ is cleared to "0", and the flag TIMEUP is set to "1". ”. As a result, it is possible to know that the predetermined time has elapsed in the expansion form processing described later. When the above processing is completed, the routine returns from this interrupt processing routine.

【0105】次に、鍵盤処理ルーチンのステップS53
で行う展開フォーム作成処理について説明する。この展
開フォーム作成処理の詳細については、図11のフロー
チャートに示されている。
Next, step S53 of the keyboard processing routine.
The expansion form creation process performed in step will be described. The details of this expansion form creation processing are shown in the flowchart of FIG.

【0106】展開フォーム作成処理では、先ず、コード
検出処理(図10のステップS52)で検出したコード
は、その時点で使用されているコードと同じであるか否
かが調べられる(ステップS60)。そし、同じである
ことが判断されると、コードチェンジはなかったものと
判断して、何等の処理をも行うことなく、この展開フォ
ーム処理ルーチンからリターンする。
In the expansion form creating process, first, it is checked whether the code detected in the code detecting process (step S52 in FIG. 10) is the same as the code used at that time (step S60). If it is determined that they are the same, it is determined that the code change has not occurred, and the expansion form processing routine returns without performing any processing.

【0107】一方、ステップS60で今までのコードと
同じでない、つまりコードチェンジがあったことが判断
されると、フラグTIMEUPをバッファWTF1にセ
ーブする(ステップS61)。バッファWTF1は、R
AM12に設けられるテンポラリのバッファである。
On the other hand, when it is determined in step S60 that the code is not the same as the code up to now, that is, there is a code change, the flag TIMEUP is saved in the buffer WTF1 (step S61). The buffer WTF1 is R
This is a temporary buffer provided in the AM 12.

【0108】次いで、初期化処理が行われる(ステップ
S62)。即ち、時間カウンタCNTTIMに初期値
「100」がセットされ、フラグTIMEUPが「0」
にクリアされ、また、フラグCNTREQが「1」にセ
ットされる。
Then, initialization processing is performed (step S62). That is, the initial value “100” is set in the time counter CNTTIM and the flag TIMEUP is set to “0”.
And the flag CNTREQ is set to "1".

【0109】カウンタに「100」がセットされること
により、上述した割込処理ルーチンで1ミリ秒が100
回計数されて、100ミリ秒が計測されることになる。
このステップでフラグTIMEUPが「0」にクリアさ
れ、且つフラグCNTREQが「1」にセットされるこ
とにより、次の100ミリ秒の計測が開始される。
By setting "100" in the counter, 1 millisecond becomes 100 in the interrupt processing routine described above.
The number of times is counted to measure 100 milliseconds.
In this step, the flag TIMEUP is cleared to "0" and the flag CNTREQ is set to "1", so that the measurement for the next 100 milliseconds is started.

【0110】次いで、先にセーブされたバッファWTF
1、つまりフラグTIMEUPが「1」であるか否かが
調べられる(ステップS63)。ここで、バッファWT
F1が「1」であることが判断されると、前回のコード
チェンジから100ミリ秒経過した後のコードチェンジ
であることが認識され、前コード作成処理が行われる
(ステップS64)。この前コード作成処理は、或るコ
ードから他のコードへコードチェンジがあった際に、移
行途中において検出された不要コードを排除して、真に
移行前に押されていたコードを検出して前コードとする
処理である。
Next, the previously saved buffer WTF
1, that is, whether the flag TIMEUP is "1" is checked (step S63). Where the buffer WT
When it is determined that F1 is "1", it is recognized that the code change is 100 milliseconds after the previous code change, and the previous code creation process is performed (step S64). This pre-code creation process eliminates unnecessary codes detected during the transition when a code is changed from one code to another code, and detects the code that was actually pressed before the transition. This is the process that uses the previous code.

【0111】なお、バッファWTF1が「1」でないこ
とが判断されると、前コード作成処理はスキップされ
る。このことは、換言すれば、前コード作成処理は、前
回のコードチェンジが発生してから今回のコードチェン
ジが発生するまでに100ミリ秒経過している場合にの
み行われることになる。
If it is determined that the buffer WTF1 is not "1", the previous code creating process is skipped. In other words, the previous code creation processing is performed only when 100 milliseconds have elapsed from the occurrence of the previous code change to the occurrence of the current code change.

【0112】上記前コード作成処理の詳細については、
図12のフローチャートに示されている。前コード作成
処理においては、先ず、コードチェンジ回数カウンタC
CHGがインクリメントされる(ステップS70)。そ
して、インクリメントの結果、「4」以上になったか否
かが調べられる(ステップS71)。
For details of the previous code creating process,
This is shown in the flowchart of FIG. In the previous code creation process, first, the code change counter C
CHG is incremented (step S70). Then, it is checked whether the result of the increment is "4" or more (step S71).

【0113】ここで、「4」以上になったことが判断さ
れると、CCHGの内容はゼロにクリアされ(ステップ
S72)、前コード格納バッファMAECには、定数
「0FFH」(’H’は16進数であることを示す。以
下、同じ)がセットされる(ステップS73)。この定
数「0FFH」は前コードが不定であることを示す。こ
れは、4回コード変化があったら展開フォームを基本フ
ォームに戻すので、前コードは不要であることを記憶す
るために行われる。
If it is determined that the value becomes "4" or more, the content of CCHG is cleared to zero (step S72), and the constant "0FFH"('H' is stored in the previous code storage buffer MAEC). It is a hexadecimal number, and the same applies hereinafter) is set (step S73). This constant “0FFH” indicates that the previous code is indefinite. This is done in order to remember that the previous code is unnecessary because the expanded form is returned to the basic form if there is a code change four times.

【0114】なお、前コード格納バッファMAECはR
AM12に設けられるバッファである。以上の処理が終
了すると、この前コード作成処理ルーチンからリターン
して展開フォーム作成処理ルーチンに戻る。
The previous code storage buffer MAEC is R
This is a buffer provided in the AM 12. When the above process is completed, the process returns from the previous code creating process routine and returns to the expanded form creating process routine.

【0115】上記ステップS71で、CCHGの内容が
「4」より小さいことが判断されると、今までのコード
を前コードとしてMAECに格納する(ステップS7
4)。そして、今までの展開フォームを前フォームとし
て記憶する(ステップS75)。
If it is determined in step S71 that the content of CCHG is smaller than "4", the code up to this point is stored in MAEC as the previous code (step S7).
4). Then, the expansion form so far is stored as the previous form (step S75).

【0116】具体的には、展開フォームの第1音目を記
憶するためのバッファTNKF1の内容を、前フォーム
の第1音目を記憶するためのバッファMAEF1に格納
する。同様に、展開フォームの第2音目を記憶するため
のバッファTNKF2の内容を、前フォームの第2音目
を記憶するためのバッファMAEF2に格納し、展開フ
ォームの第3音目を記憶するためのバッファTNKF3
の内容を、前フォームの第3音目を記憶するためのバッ
ファMAEF3に格納する。
Specifically, the content of the buffer TNKF1 for storing the first note of the expanded form is stored in the buffer MAEF1 for storing the first note of the previous form. Similarly, the content of the buffer TNKF2 for storing the second note of the expanded form is stored in the buffer MAEF2 for storing the second note of the previous form, and the third note of the expanded form is stored. Buffer TNKF3
Is stored in the buffer MAEF3 for storing the third note of the previous form.

【0117】上記バッファTNKF1〜TNKF3及び
MAEF1〜MAEF3は、何れもRAM12に設けら
れるバッファである。以上の処理が終了すると、この前
コード作成処理ルーチンからリターンして展開フォーム
作成処理ルーチンに戻る。
The buffers TNKF1 to TNKF3 and MAEF1 to MAEF3 are all buffers provided in the RAM 12. When the above process is completed, the process returns from the previous code creating process routine and returns to the expanded form creating process routine.

【0118】以上の前コード作成処理により、前回のコ
ード変化が発生してから100ミリ秒経過している場合
にのみ今までのコードを前コードとするので、コードの
移行途中に検出されたコード(前回のコード変化が発生
してから100ミリ秒経過していない場合のコード)は
捨てられ、確実に移行前に押されていたコードを前コー
ドとすることができるようになっている。
By the above pre-code generation processing, the code up to now is set as the pre-code only when 100 milliseconds have elapsed since the previous code change occurred, so the code detected during the code transition (The code when 100 milliseconds have not passed since the previous code change) is discarded, and the code that was pressed before the transition can be reliably set as the previous code.

【0119】展開フォーム作成処理ルーチンでは、次い
で、候補フォーム作成処理が行われる(ステップS6
5)。この候補フォーム作成処理の詳細は、図13のフ
ローチャートに示されている。
In the expanded form creation processing routine, next, candidate form creation processing is performed (step S6).
5). The details of this candidate form creation processing are shown in the flowchart of FIG.

【0120】この候補フォーム作成処理は、前のコード
から新しいコードに移行する際に、新しいコードの構成
音として取り得る可能性のある音を決定する処理であ
る。例えば、図2に示す例では、CメジャーからGメジ
ャーに移行する際に、Gメジャーを構成する音B、D、
G及び1オクターブ下のG、及び1オクターブ上のBが
候補フォームとして選択されることになる。
This candidate form creating process is a process of determining a sound that can be taken as a constituent sound of the new chord when the chord is changed from the previous chord to the new chord. For example, in the example shown in FIG. 2, when shifting from C major to G major, notes B, D,
G and G one octave below and B one octave above will be selected as candidate forms.

【0121】候補フォーム作成処理ルーチンでは、先
ず、新しく検出されたコードを今までのコードとして記
憶する(ステップS80)。
In the candidate form creation processing routine, first, the newly detected code is stored as the existing code (step S80).

【0122】次いで、上記前コード作成処理ルーチンで
作成された前コード(バッファMAECに格納されてい
る)が「0FFH」であるか否かが調べられる(ステッ
プS81)。そして、MAECの内容が「0FFH」で
ある、つまり基本フォームに戻るべきことが判断される
と、新コードの基本フォームが格納されている基本フォ
ームテーブルのアドレスがアドレスレジスタFADRS
に格納される(ステップS89)。アドレスレジスタF
ADRSは、RAM12に設けられるレジスタである。
Then, it is checked whether or not the previous code (stored in the buffer MAEC) created by the previous code creation processing routine is "0FFH" (step S81). When it is determined that the content of MAEC is “0FFH”, that is, it is determined that the basic form should be returned, the address of the basic form table storing the basic form of the new code is set to the address register FADRS.
(Step S89). Address register F
ADRS is a register provided in the RAM 12.

【0123】次いで、候補フォームの作成が行われる
(ステップS90)。即ち、先ずアドレスレジスタFA
DRSの内容に「2」を加えたアドレスから音名が読み
出され、その音名から「12」を引いたものが第1番目
の候補フォームとして、バッファKHOF1に格納され
る。図2に示した例では、アドレスレジスタにはGメジ
ャー(図5参照)のアドレスがセットされるので、音名
Gが読み出され、これから「12」が引かれることによ
り、1オクターブ下の音名Gが第1番目の候補フォーム
としてバッファKHOF1にセットされる。
Next, a candidate form is created (step S90). That is, first, the address register FA
The note name is read from the address obtained by adding "2" to the content of DRS, and the note name minus "12" is stored in the buffer KHOF1 as the first candidate form. In the example shown in FIG. 2, since the address of the G major (see FIG. 5) is set in the address register, the note name G is read, and “12” is subtracted from this, so that the note one octave lower is read. The name G is set in the buffer KHOF1 as the first candidate form.

【0124】次いで、アドレスレジスタFADRSの内
容が示すアドレスから音名が読み出され、それが第2番
目の候補フォームとして、バッファKHOF2に格納さ
れる。図2に示した例では、音名Bが読み出され、これ
が第2番目の候補フォームとしてバッファKHOF2に
セットされる。
Next, the note name is read from the address indicated by the contents of the address register FADRS and stored in the buffer KHOF2 as the second candidate form. In the example shown in FIG. 2, the note name B is read and set as the second candidate form in the buffer KHOF2.

【0125】次いで、アドレスレジスタFADRSの内
容に「1」を加えたアドレスから音名が読み出され、そ
れが第3番目の候補フォームとして、バッファKHOF
3に格納される。図2に示した例では、音名Dが読み出
され、これが第3番目の候補フォームとしてバッファK
HOF3にセットされる。
Next, the note name is read from the address obtained by adding "1" to the content of the address register FADRS, and the note name is read as the third candidate form in the buffer KHOF.
3 is stored. In the example shown in FIG. 2, the note name D is read and this is the buffer K as the third candidate form.
It is set to HOF3.

【0126】次いで、アドレスレジスタFADRSの内
容に「2」を加えたアドレスから音名が読み出され、そ
れが第4番目の候補フォームとして、バッファKHOF
4に格納される。図2に示した例では、音名Gが読み出
され、これが第4番目の候補フォームとしてバッファK
HOF4にセットされる。
Next, the note name is read from the address obtained by adding "2" to the content of the address register FADRS, and the note name is read as the fourth candidate form in the buffer KHOF.
Stored in 4. In the example shown in FIG. 2, the note name G is read out, and this is the buffer K as the fourth candidate form.
It is set to HOF4.

【0127】次いで、アドレスレジスタFADRSの内
容が示すアドレスから音名が読み出され、その音名に
「12」を加えたものが第5番目の候補フォームとし
て、バッファKHOF5に格納される。図2に示した例
では、音名Bが読み出され、これに「12」が加算され
ることにより、1オクターブ上の音名Bが第5番目の候
補フォームとしてバッファKHOF5にセットされる。
なお、上述したバッファKHOF1〜KHOF5は、R
AM12に設けられるバッファである。
Next, the note name is read from the address indicated by the contents of the address register FADRS, and the note name added with "12" is stored in the buffer KHOF5 as the fifth candidate form. In the example shown in FIG. 2, the note name B is read out and "12" is added to this, whereby the note name B one octave higher is set in the buffer KHOF5 as the fifth candidate form.
The buffers KHOF1 to KHOF5 described above are R
This is a buffer provided in the AM 12.

【0128】以上では、コードGに対する候補フォーム
を作成する場合を例にとって説明したが他のコードの場
合も全く同様である。以上の候補フォームの作成が終了
すると、この候補フォーム作成処理ルーチンからリター
ンして展開フォーム作成処理ルーチンに戻る。
In the above, the case of creating a candidate form for the code G has been described as an example, but the same applies to other codes. When the above candidate form creation is completed, the process returns from this candidate form creation processing routine and returns to the expanded form creation processing routine.

【0129】上記ステップS81で、MAECの内容が
「0FFH」でないことが判断されると、次いで、新コ
ードは○7 又は○7sus4 であるか否かが調べられる(ス
テップS82)。ここで、新コードが○7 又は○7sus4
でないことが判断されるとステップS89に分岐し、上
述したと同様の処理により候補フォームが作成される。
If it is determined in step S81 that the content of MAEC is not "0FFH", then it is checked whether or not the new code is ◯ 7 or ◯ 7sus4 (step S82). Here, the new code is ○ 7 or ○ 7sus4
If not, the process branches to step S89, and a candidate form is created by the same process as described above.

【0130】一方、新コードが○7 又は○7sus4 である
ことが判断されると、前コードと根音が同じであるか否
かが調べられる(ステップS83)。そして、同じであ
ることが判断されると、新コードの根音抜き基本フォー
ムが格納されている基本フォームテーブルのアドレスが
アドレスレジスタFADRSに格納される(ステップS
87)。即ち、図5に示した基本フォームテーブルの○
7 又は○7sus4 のアドレスがアドレスレジスタFADR
Sにセットされる。これは、上述したルールR4−1を
実施するものである。その後、ステップS90に分岐
し、上述したと同様の処理により候補フォームが作成さ
れる。
On the other hand, when it is judged that the new chord is ∘7 or ∘7sus4, it is checked whether or not the root note is the same as the preceding chord (step S83). When it is determined that they are the same, the address of the basic form table in which the basic form without the root of the new chord is stored is stored in the address register FADRS (step S
87). That is, ○ in the basic form table shown in FIG.
The address of 7 or ○ 7sus4 is the address register FADR.
Set to S. This implements rule R4-1 described above. After that, the process branches to step S90, and the candidate form is created by the same process as described above.

【0131】上記ステップS83で、前コードと根音が
同じでないことが判断されると、次いで、前コードは○
6 又は○dim であるか否かが調べられる(ステップS8
4)。ここで、前コードは○6 又は○dim であることが
判断されると、新コードの5度音抜き基本フォームが格
納されている基本フォームテーブルのアドレスがアドレ
スレジスタFADRSに格納される(ステップS8
8)。即ち、図5に示した基本フォームテーブルの*○
7 又は*○7sus4 のアドレスがアドレスレジスタFAD
RSにセットされる。これは、上述したルールR4−3
を実施するものである。その後、ステップS90に分岐
し、上述したと同様の処理により候補フォームが作成さ
れる。
If it is determined in step S83 that the root note is not the same as the previous chord, then the previous chord is
It is checked whether or not 6 or ○ dim (step S8).
4). Here, if it is determined that the previous code is ◯ 6 or ◯ dim, the address of the basic form table in which the basic form without fifth note of the new code is stored is stored in the address register FADRS (step S8).
8). That is, * ○ in the basic form table shown in FIG.
The address of 7 or * 7sus4 is the address register FAD
Set to RS. This is rule R4-3 described above.
Is carried out. After that, the process branches to step S90, and the candidate form is created by the same process as described above.

【0132】上記ステップS84で、前コードが○6 又
は○dim でないことが判断されると、次いで、前コード
は○m7又は○m7-5又は○mM7 であるか否かが調べられる
(ステップS85)。ここで、前コードが○m7又は○m7
-5又は○mM7 でない、つまり○、○m 、○sus4、○aug
、○M7、○7 、○7sus4 であることが判断されると、
ステップS87に分岐し、上述した同様の処理が行われ
る。即ち、図5に示した基本フォームテーブルの○7 又
は○7sus4 のアドレスがアドレスレジスタFADRSに
セットされる。これは、上述したルールR4−2を実施
するものである。その後、ステップS90に分岐し、上
述したと同様の処理により候補フォームが作成される。
If it is determined in step S84 that the previous code is not ◯ 6 or ◯ dim, then it is checked whether the previous code is ◯ m7 or ◯ m7-5 or ◯ mM7 (step S85). ). Here, the previous code is ○ m7 or ○ m7
-5 or not ○ mM7, that is, ○, ○ m, ○ sus4, ○ aug
, ○ M7, ○ 7, ○ 7sus4 is judged,
The process branches to step S87 and the same processing as described above is performed. That is, the address of 7 or 7sus4 in the basic form table shown in FIG. 5 is set in the address register FADRS. This implements rule R4-2 described above. After that, the process branches to step S90, and the candidate form is created by the same process as described above.

【0133】上記ステップS85で、前コードが○m7又
は○m7-5又は○mM7 であることが判断されると、次い
で、前コードと根音が半音違いであるか否かが調べられ
る(ステップS86)。ここで、前コードと根音が半音
違いであることが判断されると、ステップS87に進
み、上述した同様の処理が行われる。即ち、図5に示し
た基本フォームテーブルの○7 又は○7sus4 のアドレス
がアドレスレジスタFADRSにセットされる。これ
は、上述したルールR4−4を実施するものである。そ
の後、ステップS90に分岐し、上述したと同様の処理
が行われて候補フォームが作成される。
When it is determined in step S85 that the preceding chord is ◯ m7 or ◯ m7-5 or ◯ mM7, it is then checked whether or not the preceding chord and the root note differ by a semitone (step). S86). Here, if it is determined that the preceding chord and the root note are different in semitones, the process proceeds to step S87, and the same processing as described above is performed. That is, the address of 7 or 7sus4 in the basic form table shown in FIG. 5 is set in the address register FADRS. This implements rule R4-4 described above. After that, the process branches to step S90, and the same processing as described above is performed to create the candidate form.

【0134】上記ステップS86で、前コードと根音が
半音違いでないことが判断されると、ステップS88に
分岐し、上述した同様の処理が行われる。即ち、図5に
示した基本フォームテーブルの*○7 又は*○7sus4 の
アドレスがアドレスレジスタFADRSにセットされ
る。これは、上述したルールR4−5を実施するもので
ある。その後、ステップS90に分岐し、上述したと同
様の処理により候補フォームが作成される。
If it is determined in step S86 that the preceding chord and the root note are not different in semitones, the process branches to step S88 and the same processing as described above is performed. That is, the address of * 7 or * 7sus4 of the basic form table shown in FIG. 5 is set in the address register FADRS. This implements Rule R4-5 described above. After that, the process branches to step S90, and the candidate form is created by the same process as described above.

【0135】以上のようにして作成される候補フォーム
は、基本フォームがバッファKHOF2〜KHOF4に
セットされ、基本フォームの最高音の1オクターブ下の
音がバッファKHOF1にセットされ、最低音の1オク
ターブ上の音がバッファKHOF5にセットされて得ら
れる。この候補フォームの作成が完了すると、この候補
フォーム作成処理ルーチンからリターンし、展開フォー
ム作成処理ルーチンに戻る。
In the candidate forms created as described above, the basic forms are set in the buffers KHOF2 to KHOF4, the sound one octave below the highest note of the basic form is set in the buffer KHOF1, and the lowest note one octave above. Sound is set in the buffer KHOF5 and obtained. When the creation of this candidate form is completed, the process returns from this candidate form creation processing routine and returns to the expanded form creation processing routine.

【0136】展開フォーム作成処理ルーチンでは、次い
で、展開フォーム決定処理が行われる(ステップS6
6)。この展開フォーム決定処理の詳細は、図14のフ
ローチャートに示されている。
In the expanded form creation processing routine, expanded form determination processing is then carried out (step S6).
6). The details of this expansion form determination processing are shown in the flowchart of FIG.

【0137】この展開フォーム作成処理は、先に作成さ
れた候補フォームと前フォームの差が2半音以内にある
か否かを順次調べ、2半音以内にある音を使用して新し
い展開フォームを決定する処理である。
In this expansion form creation processing, it is sequentially checked whether or not the difference between the previously created candidate form and the previous form is within 2 semitones, and a new expansion form is determined using the sound within 2 semitones. It is a process to do.

【0138】この展開フォーム決定処理では、先ず、前
コードは「0FFH」であるか否か、つまりコード変化
が4回目であるか否かが調べられる(ステップS10
0)。ここで、前コードが「0FFH」であることが判
断されると、基本フォームが展開フォームとされる(ス
テップS113)。即ち、候補フォームを記憶するバッ
ファKHOF2〜KHOF4の内容(基本フォーム)が
展開フォームとしてバッファTNKF1〜TNKF3に
セットされる。その後、この展開フォーム決定処理ルー
チンからリターンして展開フォーム作成処理ルーチンに
戻る。
In this expansion form determination processing, it is first checked whether or not the previous code is "0FFH", that is, whether or not the code change is the fourth time (step S10).
0). Here, if it is determined that the previous code is “0FFH”, the basic form is set to the expanded form (step S113). That is, the contents (basic form) of the buffers KHOF2 to KHOF4 storing the candidate forms are set in the buffers TNKF1 to TNKF3 as expansion forms. After that, the process returns from this expansion form determination processing routine and returns to the expansion form creation processing routine.

【0139】一方、前コードが「0FFH」でないこと
が判断されると、前フォームの第1番目の音MAEF1
と候補フォームの第1番目の音KHOF1との差の絶対
値が「2」以下であるか否かが調べられる(ステップS
101)。ここで、「2」以下であることが判断される
と、次いで、前フォームの第2番目の音MAEF2と候
補フォームの第2番目の音KHOF2との差の絶対値が
「2」以下であるか否かが調べられる(ステップS10
2)。ここで、「2」以下であることが判断されると、
次いで、前フォームの第3番目の音MAEF3と候補フ
ォームの第3番目の音KHOF3との差の絶対値が
「2」以下であるか否かが調べられる(ステップS10
3)。ここで、「2」以下であることが判断されると、
候補フォームのバッファKHOF1〜KHOF3の各内
容が展開フォームとしてバッファTNKF1〜TNKF
3にセットされる(ステップS104)。
On the other hand, when it is determined that the preceding code is not "0FFH", the first sound MAEF1 of the previous form is generated.
And the absolute value of the difference between the first sound KHOF1 of the candidate form and "2" or less is checked (step S).
101). Here, if it is determined that it is "2" or less, then the absolute value of the difference between the second sound MAEF2 of the previous form and the second sound KHOF2 of the candidate form is "2" or less. It is checked whether or not (step S10).
2). Here, if it is determined that the value is “2” or less,
Next, it is checked whether or not the absolute value of the difference between the third sound MAEF3 of the previous form and the third sound KHOF3 of the candidate form is "2" or less (step S10).
3). Here, if it is determined that the value is “2” or less,
The contents of the buffers KHOF1 to KHOF3 of the candidate form are expanded forms and are stored in the buffers TNKF1 to TNKF.
3 is set (step S104).

【0140】以上の処理により、展開フォームとして、
何れも2半音以内にある候補フォームの第1〜第3番目
の音が決定されることになる。その後、この展開フォー
ム決定処理ルーチンからリターンして展開フォーム作成
処理ルーチンに戻る。なお、上記ステップS101〜S
103で、差の絶対値が「2」以下でないことが判断さ
れた場合は、ステップS105に進む。
By the above processing, as a development form,
In each case, the first to third sounds of the candidate form that are within two semitones are determined. After that, the process returns from this expansion form determination processing routine and returns to the expansion form creation processing routine. Note that the above steps S101 to S
When it is determined in 103 that the absolute value of the difference is not "2" or less, the process proceeds to step S105.

【0141】ステップS105では、前フォームの第1
番目の音MAEF1と候補フォームの第2番目の音KH
OF2との差の絶対値が「2」以下であるか否かが調べ
られる。ここで、「2」以下であることが判断される
と、次いで、前フォームの第2番目の音MAEF2と候
補フォームの第3番目の音KHOF3との差の絶対値が
「2」以下であるか否かが調べられる(ステップS10
6)。ここで、「2」以下であることが判断されると、
次いで、前フォームの第3番目の音MAEF3と候補フ
ォームの第4番目の音KHOF4との差の絶対値が
「2」以下であるか否かが調べられる(ステップS10
7)。ここで、「2」以下であることが判断されると、
候補フォームのバッファKHOF2〜KHOF4の各内
容が展開フォームとしてバッファTNKF1〜TNKF
3にセットされる(ステップS108)。
In step S105, the first form of the previous form
Second sound MAEF1 and second sound of candidate form KH
It is checked whether or not the absolute value of the difference from OF2 is "2" or less. Here, if it is determined that it is "2" or less, then the absolute value of the difference between the second sound MAEF2 of the previous form and the third sound KHOF3 of the candidate form is "2" or less. It is checked whether or not (step S10).
6). Here, if it is determined that the value is “2” or less,
Next, it is checked whether or not the absolute value of the difference between the third sound MAEF3 of the previous form and the fourth sound KHOF4 of the candidate form is "2" or less (step S10).
7). Here, if it is determined that the value is “2” or less,
The contents of the buffers KHOF2 to KHOF4 of the candidate form are buffered as buffers TNKF1 to TNKF.
3 is set (step S108).

【0142】以上の処理により、展開フォームとして、
何れも2半音以内にある候補フォームの第2〜第4番目
の音が決定されることになる。その後、この展開フォー
ム決定処理ルーチンからリターンして展開フォーム作成
処理ルーチンに戻る。なお、上記ステップS105〜S
107で、差の絶対値が「2」以下でないことが判断さ
れた場合は、ステップS109に進む。
By the above processing, as a development form,
In any case, the second to fourth sounds of the candidate form that are within two semitones are determined. After that, the process returns from this expansion form determination processing routine and returns to the expansion form creation processing routine. Note that the above steps S105 to S
If it is determined in 107 that the absolute value of the difference is not "2" or less, the process proceeds to step S109.

【0143】ステップS109では、前フォームの第1
番目の音MAEF1と候補フォームの第3番目の音KH
OF3との差の絶対値が「2」以下であるか否かが調べ
られる。ここで、「2」以下であることが判断される
と、次いで、前フォームの第2番目の音MAEF2と候
補フォームの第4番目の音KHOF4との差の絶対値が
「2」以下であるか否かが調べられる(ステップS11
0)。ここで、「2」以下であることが判断されると、
次いで、前フォームの第3番目の音MAEF3と候補フ
ォームの第5番目の音KHOF5との差の絶対値が
「2」以下であるか否かが調べられる(ステップS11
1)。ここで、「2」以下であることが判断されると、
候補フォームのバッファKHOF3〜KHOF5の各内
容が展開フォームとしてバッファTNKF1〜TNKF
3にセットされる(ステップS112)。
In step S109, the first form of the previous form
The third sound MAEF1 and the third sound KH of the candidate form
It is checked whether or not the absolute value of the difference from OF3 is "2" or less. Here, if it is determined that it is "2" or less, then the absolute value of the difference between the second sound MAEF2 of the previous form and the fourth sound KHOF4 of the candidate form is "2" or less. It is checked whether or not (step S11).
0). Here, if it is determined that the value is “2” or less,
Then, it is checked whether or not the absolute value of the difference between the third sound MAEF3 of the previous form and the fifth sound KHOF5 of the candidate form is "2" or less (step S11).
1). Here, if it is determined that the value is “2” or less,
The contents of the buffers KHOF3 to KHOF5 of the candidate form are buffers TNKF1 to TNKF as expansion forms.
3 is set (step S112).

【0144】以上の処理により、展開フォームとして、
何れも2半音以内にある候補フォームの第3〜第5番目
の音が決定されることになる。その後、この展開フォー
ム決定処理ルーチンからリターンして展開フォーム作成
処理ルーチンに戻る。
By the above processing, as a development form,
In any case, the third to fifth sounds of the candidate form that are within two semitones are determined. After that, the process returns from this expansion form determination processing routine and returns to the expansion form creation processing routine.

【0145】なお、上記ステップS105〜S107
で、差の絶対値が「2」以下でないことが判断された場
合は、ステップS113に進み、基本フォームが展開フ
ォームとしてバッファTNKF1〜TNKF3にセット
される。
Incidentally, the above steps S105 to S107.
If it is determined that the absolute value of the difference is not "2" or less, the process proceeds to step S113, and the basic form is set in the buffers TNKF1 to TNKF3 as the expanded form.

【0146】以上のようにして展開フォームが決定され
ると、この展開フォーム決定処理ルーチンからリターン
して展開フォーム作成処理ルーチンに戻り、さらに展開
フォーム作成処理ルーチンもリターンしてメインルーチ
ンに戻る。
When the expansion form is determined as described above, the expansion form determination processing routine returns to return to the expansion form creation processing routine, and the expansion form creation processing routine also returns to return to the main routine.

【0147】次に、自動伴奏処理の詳細について、図1
5に示したフローチャートを参照しながら説明する。
Next, the details of the automatic accompaniment process will be described with reference to FIG.
This will be described with reference to the flowchart shown in FIG.

【0148】自動伴奏処理では、先ず、自動伴奏フラグ
が「1」であるか否か、つまり本電子楽器が自動伴奏モ
ードにあるか否かが調べられる(ステップS120)。
そして、自動伴奏モードにないことが判断されると、何
等の処理も行うことなく、この自動伴奏処理ルーチンか
らリターンする。
In the automatic accompaniment process, it is first checked whether or not the automatic accompaniment flag is "1", that is, whether or not the electronic musical instrument is in the automatic accompaniment mode (step S120).
When it is determined that the automatic accompaniment mode is not set, the process returns from the automatic accompaniment processing routine without performing any processing.

【0149】一方、自動伴奏モードであることが判断さ
れると、ROM11から自動伴奏データ(パターンデー
タ)を読み込む(ステップS121)。そして、自動伴
奏イベントの有無が調べられる(ステップS122)。
これは自動伴奏データに含まれるステップタイムが発音
タイミングになったか否かを調べることにより行われ
る。
On the other hand, when it is determined that the automatic accompaniment mode is set, the automatic accompaniment data (pattern data) is read from the ROM 11 (step S121). Then, the presence or absence of an automatic accompaniment event is checked (step S122).
This is performed by checking whether or not the step time included in the automatic accompaniment data has reached the tone generation timing.

【0150】ここで、自動伴奏イベントがないことが判
断されると、以下の処理は行わずにこの自動伴奏処理ル
ーチンからリターンする。一方、自動伴奏イベントがあ
ることが判断されると、展開音作成処理が行われる(ス
テップS123)。この展開音作成処理の詳細について
は、図16のフローチャートに示されている。
When it is determined that there is no automatic accompaniment event, the following processing is not performed and the routine returns from this automatic accompaniment processing routine. On the other hand, if it is determined that there is an automatic accompaniment event, the expanded sound creation process is performed (step S123). The details of this expanded sound creation processing are shown in the flowchart of FIG.

【0151】即ち、展開音作成処理では、先ず、パター
ンデータ中のオクターブ情報を、バッファPOCTにセ
ットする(ステップS130)。オクターブ情報は、パ
ターンデータの鍵盤番号を「12」で割った商として求
められる。
That is, in the expanded sound creating process, first, the octave information in the pattern data is set in the buffer POCT (step S130). The octave information is obtained as a quotient obtained by dividing the keyboard number of the pattern data by “12”.

【0152】次いで、パターンデータ中の音名情報を、
バッファPNOTEにセットする(ステップS13
1)。この音名情報は、パターンデータの鍵盤番号を
「12」で割った余りとして求められる。
Next, note name information in the pattern data is
Set in the buffer PNOTE (step S13
1). This pitch name information is obtained as the remainder when the keyboard number of the pattern data is divided by "12".

【0153】次いで、バッファPOCTに記憶されてい
るオクターブ情報をデクリメントする(ステップS13
2)。これは、展開フォームの値は1オクターブ上の値
になっているので、正規の高さの音に戻すために行うも
のである。
Next, the octave information stored in the buffer POCT is decremented (step S13).
2). This is done in order to restore the sound at the normal pitch, since the value of the expanded form is one octave higher.

【0154】次いで、上記ステップS131で算出して
バッファPNOTEに格納されている音名情報が「3〜
6」の範囲にあるか否かが調べられる(ステップS13
3)。そして、バッファPNOTEの内容が「3〜6」
の範囲にあれば、展開フォームの第2番目の音としてバ
ッファTNKF2に記憶されている値と、オクターブ情
報POCTに「12」を乗じた値とを加算してこれを発
音すべき鍵盤番号としてバッファKYNOに格納する
(ステップS134)。例えば、パターンデータとして
「C,E,G」の各音が記憶されているとすると、E
(=4)が上記の場合に該当するので、上記の処理によ
り展開音の第2番目の音がオクターブ情報を付された鍵
盤番号として生成されることになる。
Next, the note name information calculated in step S131 and stored in the buffer PNOTE is "3 ...
It is checked whether or not it is within the range of "6" (step S13).
3). Then, the content of the buffer PNOTE is "3 to 6".
If it is in the range of, the value stored in the buffer TNKF2 as the second sound of the expanded form and the value obtained by multiplying the octave information POCT by "12" are added and the value is buffered as the keyboard number to be pronounced. The data is stored in KYNO (step S134). For example, if each of the sounds "C, E, G" is stored as the pattern data, E
Since (= 4) corresponds to the above case, the second sound of the expanded sound is generated as the keyboard number with the octave information by the above processing.

【0155】一方、上記ステップS133で、バッファ
PNOTEに格納されている音名情報が「3〜6」の範
囲にないことが判断されると、次いで、バッファPNO
TEに格納されている音名情報が「7〜10」の範囲に
あるか否かが調べられる(ステップS135)。そし
て、バッファPNOTEの内容が「7〜10」の範囲に
あれば、展開フォームの第3番目の音としてバッファT
NKF3に記憶されている値と、オクターブ情報POC
Tに「12」を乗じた値とを加算してこれを発音すべき
鍵盤番号としてバッファKYNOに格納する(ステップ
S136)。例えば、パターンデータとして「C,E,
G」の各音が記憶されているとすると、G(=7)が上
記の場合に該当するので、上記の処理により展開音の第
3番目の音がオクターブ情報を付された鍵盤番号として
生成されることになる。
On the other hand, if it is determined in step S133 that the note name information stored in the buffer PNOTE is not in the range of "3 to 6", then the buffer PNO
It is checked whether the note name information stored in TE is in the range of "7 to 10" (step S135). If the content of the buffer PNOTE is in the range of "7 to 10", the buffer T is set as the third sound of the expansion form.
Value stored in NKF3 and octave information POC
A value obtained by multiplying T by "12" is added and stored as the keyboard number to be sounded in the buffer KYNO (step S136). For example, as pattern data, "C, E,
Assuming that each sound of “G” is stored, G (= 7) corresponds to the above case, and thus the third sound of the expanded sound is generated as a keyboard number with octave information by the above processing. Will be done.

【0156】上記ステップS135で、バッファPNO
TEに格納されている音名情報が「7〜10」の範囲に
ない、つまり「0〜2、11」であることが判断される
と、展開フォームの第1番目の音としてバッファTNK
F1に記憶されている値と、オクターブ情報POCTに
「12」を乗じた値とを加算してこれを発音すべき鍵盤
番号としてバッファKYNOに格納する(テップS13
7)。例えば、パターンデータとして「C,E,G」の
各音が記憶されているとすると、C(=0)が上記の場
合に該当するので、上記の処理により展開音の第1番目
の音がオクターブ情報を付された鍵盤番号として生成さ
れることになる。
In step S135, the buffer PNO
When it is determined that the note name information stored in the TE is not in the range of "7-10", that is, "0-2,11", the buffer TNK is output as the first note of the expansion form.
The value stored in F1 and the value obtained by multiplying the octave information POCT by “12” are added and stored in the buffer KYNO as the keyboard number to be sounded (step S13).
7). For example, if each of the sounds "C, E, G" is stored as the pattern data, C (= 0) corresponds to the above case, and thus the first sound of the expanded sound is obtained by the above processing. It will be generated as a keyboard number with octave information.

【0157】このようにして、発音すべきコードの構成
音が鍵盤番号として得られると、この展開音作成処理ル
ーチンからリターンし、自動伴奏処理ルーチンに戻る。
In this way, when the constituent tones of the chord to be sounded are obtained as the keyboard numbers, the process returns from this expanded tone generation processing routine and returns to the automatic accompaniment processing routine.

【0158】自動伴奏処理ルーチンでは、次いで、発音
/消音処理が行われる(ステップS124)。即ち、展
開音作成処理ルーチンで作成されてバッファKYNOに
格納されている鍵盤番号が楽音発生回路15に送られる
ことにより、その鍵盤番号に対応する発音又は消音が行
われる。この発音又は消音の動作は先に鍵盤処理ルーチ
ンで説明したものと同じであるので、説明は省略する。
In the automatic accompaniment processing routine, sounding / silence processing is then carried out (step S124). That is, the keyboard number stored in the buffer KYNO created in the expanded sound creation processing routine is sent to the musical tone generation circuit 15, so that sounding or muting corresponding to the keyboard number is performed. Since the operation of sounding or muting is the same as that described in the keyboard processing routine, the description thereof will be omitted.

【0159】このようにして、伴奏音の発音又は消音が
終了すると、この自動伴奏処理ルーチンからリターンし
てメインルーチンに戻り、先に説明したように、メイン
ルーチンの実行を繰り返すことになる。
In this way, when the pronunciation or mute of the accompaniment sound ends, the automatic accompaniment processing routine returns to the main routine, and the execution of the main routine is repeated as described above.

【0160】[0160]

【発明の効果】以上詳述したように、この発明によれば
前コードを確実に検出するとともに、コード入力に対す
る応答性を向上させることのできる電子楽器の前コード
検出装置を提供することができる。
As described above in detail, according to the present invention, it is possible to provide a front chord detection device for an electronic musical instrument, which can surely detect the front chord and improve the response to the chord input. .

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

【図1】本発明の自動伴奏装置を適用した電子楽器の実
施例の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an electronic musical instrument to which an automatic accompaniment device of the present invention is applied.

【図2】本発明における展開フォームの例を説明するた
めの図である。
FIG. 2 is a diagram for explaining an example of a development form in the present invention.

【図3】本発音における展開音作成を説明するための図
である。
FIG. 3 is a diagram for explaining the development sound creation in the actual pronunciation.

【図4】本発明に用いる基本フォームテーブルの一例を
示す図である(図5に続く)。
FIG. 4 is a diagram showing an example of a basic form table used in the present invention (continued from FIG. 5).

【図5】本発明に用いる基本フォームテーブルの一例を
示す図である(図4の続き)。
FIG. 5 is a diagram showing an example of a basic form table used in the present invention (continuation of FIG. 4).

【図6】本発明の実施例の動作を示すフローチャート
(メインルーチン)である。
FIG. 6 is a flowchart (main routine) showing the operation of the embodiment of the present invention.

【図7】本発明の実施例の動作を示すフローチャート
(パネル処理ルーチン)である。
FIG. 7 is a flowchart (panel processing routine) showing the operation of the embodiment of the present invention.

【図8】本発明の実施例の動作を示すフローチャート
(コード展開初期値設定処理ルーチン)である。
FIG. 8 is a flow chart (code expansion initial value setting processing routine) showing the operation of the embodiment of the present invention.

【図9】本発明の実施例の動作を示すフローチャート
(割込処理ルーチン)である。
FIG. 9 is a flowchart (interrupt processing routine) showing the operation of the embodiment of the present invention.

【図10】本発明の実施例の動作を示すフローチャート
(鍵盤処理ルーチン)である。
FIG. 10 is a flowchart (keyboard processing routine) showing the operation of the embodiment of the present invention.

【図11】本発明の実施例の動作を示すフローチャート
(展開フォーム作成処理ルーチン)である。
FIG. 11 is a flowchart (expanded form creation processing routine) showing the operation of the embodiment of the present invention.

【図12】本発明の実施例の動作を示すフローチャート
(前コード作成処理ルーチン)である。
FIG. 12 is a flowchart (previous code creation processing routine) showing the operation of the embodiment of the present invention.

【図13】本発明の実施例の動作を示すフローチャート
(候補フォーム作成処理ルーチン)である。
FIG. 13 is a flowchart (candidate form creation processing routine) showing the operation of the embodiment of the present invention.

【図14】本発明の実施例の動作を示すフローチャート
(展開フォーム決定処理ルーチン)である。
FIG. 14 is a flowchart (expanded form determination processing routine) showing the operation of the exemplary embodiment of the present invention.

【図15】本発明の実施例の動作を示すフローチャート
(自動伴奏処理ルーチン)である。
FIG. 15 is a flowchart (automatic accompaniment processing routine) showing the operation of the embodiment of the present invention.

【図16】本発明の実施例の動作を示すフローチャート
(展開音作成処理ルーチン)である。
FIG. 16 is a flowchart (expanded sound creation processing routine) showing the operation of the embodiment of the present invention.

【図17】従来のコード展開処理を説明するための図で
ある。
FIG. 17 is a diagram for explaining a conventional code expansion process.

【図18】従来のコード検出及びその時の前コードを説
明するための図である。
FIG. 18 is a diagram for explaining conventional code detection and the preceding code at that time.

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

10 CPU 11 ROM 12 RAM 13 鍵盤装置 14 操作パネル 15 楽音発生装置 16 D/A変換器 17 増幅器 18 スピーカ 19 MIDIインタフェース回路 20 システムバス 10 CPU 11 ROM 12 RAM 13 Keyboard Device 14 Operation Panel 15 Musical Sound Generator 16 D / A Converter 17 Amplifier 18 Speaker 19 MIDI Interface Circuit 20 System Bus

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 今回検出されたコードと前回検出された
コードとの異同を判断する判断手段と、 該判断手段で今回検出されたコードと前回検出されたコ
ードとが相違することが判断された時に計時を開始して
所定時間が計時された場合にその旨を記憶する計時手段
と、 前記判断手段で今回検出されたコードと前回検出された
コードとが相違することが検出された場合に、前記計時
手段が所定時間を計時した旨を記憶していれば、前回検
出されたコードを前コードとして記憶する制御手段、 とを具備したことを特徴とする電子楽器の前コード検出
装置。
1. A judgment means for judging the difference between a code detected this time and a code detected last time, and the judgment means judges that the code detected this time is different from the code detected last time. When it is detected that the code detected this time and the code detected last time by the judgment means are different from each other, the time measurement means for storing that fact when the predetermined time is timed by starting the time measurement, A front chord detection device for an electronic musical instrument, comprising: control means for storing a chord detected last time as a front chord if the timing means stores the fact that the chord has been counted.
JP5124684A 1993-04-30 1993-04-30 Device for detecting front code of electronic musical instrument Withdrawn JPH06314096A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5124684A JPH06314096A (en) 1993-04-30 1993-04-30 Device for detecting front code of electronic musical instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5124684A JPH06314096A (en) 1993-04-30 1993-04-30 Device for detecting front code of electronic musical instrument

Publications (1)

Publication Number Publication Date
JPH06314096A true JPH06314096A (en) 1994-11-08

Family

ID=14891520

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5124684A Withdrawn JPH06314096A (en) 1993-04-30 1993-04-30 Device for detecting front code of electronic musical instrument

Country Status (1)

Country Link
JP (1) JPH06314096A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004151688A (en) * 2002-10-31 2004-05-27 Roland Europ Spa Electronic instrument
JP2012063502A (en) * 2010-09-15 2012-03-29 Yamaha Corp Electronic musical instrument

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004151688A (en) * 2002-10-31 2004-05-27 Roland Europ Spa Electronic instrument
JP4632646B2 (en) * 2002-10-31 2011-02-16 ローランド エウローペ ソシエタ ペル アチオニ Electronic musical instruments and programs
JP2012063502A (en) * 2010-09-15 2012-03-29 Yamaha Corp Electronic musical instrument

Similar Documents

Publication Publication Date Title
JPH10187157A (en) Automatic performance device
JP2583809B2 (en) Electronic musical instrument
JP3844286B2 (en) Automatic accompaniment device for electronic musical instruments
JPH06348271A (en) Automatic accompaniment device
JPH06314096A (en) Device for detecting front code of electronic musical instrument
JP3192597B2 (en) Automatic musical instrument for electronic musical instruments
JP3476863B2 (en) Automatic accompaniment device for electronic musical instruments
JP3226268B2 (en) Concert magic automatic performance device
JP3192579B2 (en) Automatic performance device and automatic performance method
JP2640992B2 (en) Pronunciation instruction device and pronunciation instruction method for electronic musical instrument
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP3307742B2 (en) Accompaniment content display device for electronic musical instruments
JP3630266B2 (en) Automatic accompaniment device
JPH10319949A (en) Electronic musical instrument
JP2953937B2 (en) Electronic musical instrument volume control device
JP3150580B2 (en) Automatic performance device and automatic performance method
JPH07121172A (en) Accompaniment contents detecting device and automatic accompaniment device
JP2714893B2 (en) Chord information output device
JP3356326B2 (en) Electronic musical instrument
JP3097888B2 (en) Electronic musical instrument volume setting device
JPH07104753A (en) Automatic tuning device of electronic musical instrument
JPH08221072A (en) Automatic accompaniment device
JPH07129177A (en) Automatic accompaniment device of electronic musical instrument
JPH07121176A (en) Accompaniment contents detecting device and automatic accompaniment device
JPH07181973A (en) Automatic accompaniment device of electronic musical instrument

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000704