JPH0764561A - Electronic musical instrument - Google Patents

Electronic musical instrument

Info

Publication number
JPH0764561A
JPH0764561A JP5234235A JP23423593A JPH0764561A JP H0764561 A JPH0764561 A JP H0764561A JP 5234235 A JP5234235 A JP 5234235A JP 23423593 A JP23423593 A JP 23423593A JP H0764561 A JPH0764561 A JP H0764561A
Authority
JP
Japan
Prior art keywords
key
timing
chord
register
performance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP5234235A
Other languages
Japanese (ja)
Other versions
JP2768233B2 (en
Inventor
Atsushi Tougi
温 東儀
Yoshiko Fukushima
由子 福島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP5234235A priority Critical patent/JP2768233B2/en
Priority to US08/270,457 priority patent/US5641928A/en
Publication of JPH0764561A publication Critical patent/JPH0764561A/en
Application granted granted Critical
Publication of JP2768233B2 publication Critical patent/JP2768233B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

PURPOSE:To exactly detect a chord based on performance data generated in a normal performing state without operating any special performance for detecting the chord. CONSTITUTION:An inputting means inputs performance data corresponding to a performance. When data related with keyboard depression and detachment are present in the performance data, the data related with the keyboard depression or the data related with the keyboard detachment are inputted from the inputting means, and the state is always changed. Then, a chord detecting means detects the chord in each rhythm timing corresponding to the prescribed musical note length of automatic accompaniment which is not related with the inputting time of the performance data from the inputting means, and detects the chord in each timing near the rhythm timing and separated from the rhythm timing only in a prescribed time. Thus, when the rhythm timing is not matched with the timing of the performance, that is, even when the performance data are inputted with a little delay from the rhythm timing, the chord can be exactly detected.

Description

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

【0001】[0001]

【産業上の利用分野】この発明は鍵盤楽器等の演奏に応
じて発生した演奏データに基づいて和音を検出する和音
検出機能を有する電子楽器に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic musical instrument having a chord detecting function for detecting chords based on performance data generated in response to performance of a keyboard instrument or the like.

【0002】[0002]

【従来の技術】電子楽器に内蔵された和音検出装置は、
例えば鍵盤等を手弾き演奏(押鍵)することにより発生
した演奏データすなわち各ノートのオン・オフ状態の組
み合わせ(押鍵パターン)に対応した和音の根音及び種
類(タイプ)を検出するものである。従来の和音検出装
置は、押鍵イベントが発生する毎にその押鍵パターンに
基づいて和音を検出したり、又は全鍵離鍵の状態から最
初の押鍵イベントが発生してから所定時間が経過するま
での間に発生した押鍵イベントのパターンに応じて和音
を検出したりしていた。
2. Description of the Related Art A chord detection device built into an electronic musical instrument is
For example, it detects the root note and type of chord corresponding to the performance data generated by playing the keyboard (key pressing), that is, the combination of the on / off states of each note (key pressing pattern). is there. The conventional chord detection device detects a chord each time a key press event occurs based on the key press pattern, or a predetermined time elapses after the first key press event occurs in the state where all keys are released. The chord was detected according to the pattern of the key depression event that occurred until the time.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、従来の
方法は、新たに和音を検出する前に予め全鍵を離鍵状態
にした後でなければ、和音を検出することができないの
で、全鍵が離鍵状態となるように和音検出用の特別の演
奏を行わなければならず、通常の演奏状態(メロディー
演奏等)の下では全鍵が離鍵状態にならない限り、和音
を検出することができないという問題を有する。
However, in the conventional method, the chord cannot be detected unless all the keys are released before the new chord is detected. A special performance for chord detection must be performed so that the keys are released. Under normal performance conditions (melody performance, etc.), chords cannot be detected unless all keys are released. Have the problem.

【0004】この発明は上述の点に鑑みてなされたもの
であり、和音検出のための特別な演奏を行わなくても通
常の演奏状態で発生する演奏データに基づいて和音を正
確に検出することのできる和音検出機能を有する電子楽
器を提供することを目的とする。
The present invention has been made in view of the above points, and can accurately detect chords on the basis of performance data generated in a normal performance state without performing a special performance for detecting chords. It is an object of the present invention to provide an electronic musical instrument having a chord detection function capable of performing.

【0005】[0005]

【課題を解決するための手段】この発明に係る電子楽器
は、演奏に対応した演奏データを入力する入力手段と、
自動伴奏の所定の音符長に従った拍タイミング毎、及び
この拍タイミングの近傍であり、拍タイミングから所定
時間だけ離れたタイミング毎に、前記演奏データに基づ
いて和音を検出する和音検出手段とを具えたものであ
る。
An electronic musical instrument according to the present invention comprises an input means for inputting performance data corresponding to a performance,
Chord detection means for detecting chords based on the performance data at each beat timing according to a predetermined note length of the automatic accompaniment, and at each timing near the beat timing and separated from the beat timing by a predetermined time. It is equipped with.

【0006】[0006]

【作用】従来は、押鍵に関する演奏データが入力した
ら、その入力時刻に同期させて、和音検出処理を行って
いた。ところが、この発明の電子楽器は演奏データの入
力時刻とは無関係に自動伴奏の所定の音符長に従った拍
タイミング毎、及びこの拍タイミングの近傍であり、拍
タイミングから所定時間だけ離れたタイミング毎に、和
音の検出を行っている。すなわち、演奏データの中に
は、押鍵及び離鍵に関するものが存在するので、入力手
段から押鍵に関するデータが入力したり、離鍵に関する
データが入力したりして、その状態は常に変化してい
る。ところが、和音の演奏はだいたい拍タイミング毎に
行われるのが普通なので、その拍タイミングに集中して
押鍵や離鍵が発生する。そこで、和音検出手段は、入力
手段からの演奏データの入力時刻とは無関係の拍タイミ
ング毎に和音を検出している。従って、この拍タイミン
グ毎にその時点における演奏データに基づいて和音を検
出することによって、正確に和音を検出することができ
る。しかし、実際の演奏においては、拍タイミングと演
奏のタイミングとが完全に一致するようなことはなく、
拍タイミングよりも若干遅れて演奏データが入力された
りすることがある。そこで、この発明では、拍タイミン
グ毎に和音を検出すると共にこの拍タイミングの近傍で
あり、拍タイミングから所定時間だけ離れたタイミング
毎でも和音を検出するようにしている。これによって、
より正確に和音を検出することができるようになる。
In the past, when performance data regarding key depression was input, chord detection processing was performed in synchronization with the input time. However, the electronic musical instrument of the present invention has a beat timing according to a predetermined note length of the automatic accompaniment irrespective of the input time of performance data, and a timing near the beat timing, which is a timing separated from the beat timing by a predetermined time. In addition, chords are detected. In other words, among the performance data, there are data related to key depression and key release, so that the state of the key change and the data release related to the key input are constantly changing. ing. However, since chords are usually played at each beat timing, key depression and key release occur concentrated on the beat timing. Therefore, the chord detecting means detects the chord at each beat timing that is unrelated to the input time of the performance data from the input means. Therefore, the chord can be accurately detected by detecting the chord for each beat timing based on the performance data at that time. However, in the actual performance, the beat timing and the performance timing do not completely match,
Performance data may be input slightly later than the beat timing. Therefore, in the present invention, the chord is detected at each beat timing, and the chord is also detected at each timing near the beat timing and separated from the beat timing by a predetermined time. by this,
It becomes possible to detect the chord more accurately.

【0007】[0007]

【実施例】以下、添付図面を参照してこの発明の一実施
例を詳細に説明する。図2はこの発明に係る和音検出装
置を内蔵した電子楽器のハードウェア構成を示すブロッ
ク図である。この実施例の電子楽器は、マイクロプロセ
ッサユニット(CPU)21、プログラムメモリ(RO
M)22、ワーキングメモリ(RAM)23を含むマイ
クロコンピュータの制御の下に各種の処理を実行するよ
うになっている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail below with reference to the accompanying drawings. FIG. 2 is a block diagram showing the hardware configuration of an electronic musical instrument incorporating the chord detection device according to the present invention. The electronic musical instrument of this embodiment includes a microprocessor unit (CPU) 21, a program memory (RO).
M) 22 and working memory (RAM) 23, and various processes are executed under the control of a microcomputer.

【0008】CPU21は、この電子楽器全体の動作を
制御するものである。このCPU21に対して、データ
及びアドレスバス2Cを介してプログラムメモリ22、
ワーキングメモリ23、自動伴奏装置24、押鍵検出回
路25、スイッチ検出回路26、音源回路27が接続さ
れている。
The CPU 21 controls the operation of the electronic musical instrument as a whole. To the CPU 21, a program memory 22, a data and address bus 2C,
A working memory 23, an automatic accompaniment device 24, a key depression detection circuit 25, a switch detection circuit 26, and a tone generator circuit 27 are connected.

【0009】プログラムメモリ22はCPU21のシス
テムプログラム、楽音に関する各種パラメータや各種デ
ータ等を格納しているものであり、リードオンリーメモ
リ(ROM)で構成されている。ワーキングメモリ23
は、CPU21がプログラムを実行する際に発生する各
種のデータやフラグを一時的に記憶するものであり、ラ
ンダムアクセスメモリ(RAM)の所定のアドレス領域
がそれぞれ割り当てられる。自動伴奏装置24は、和音
の根音及び種類(タイプ)に関するデータやベース進行
に関するデータ等を記憶した伴奏パターンメモリを内蔵
しており、これらのデータをタイマ2Bからのテンポク
ロックに応じて順次読み出して自動伴奏音を生成する。
The program memory 22 stores the system program of the CPU 21, various parameters relating to musical sounds, various data, etc., and is composed of a read only memory (ROM). Working memory 23
Is a memory for temporarily storing various data and flags generated when the CPU 21 executes a program, and a predetermined address area of a random access memory (RAM) is allocated to each. The automatic accompaniment device 24 has a built-in accompaniment pattern memory that stores data regarding roots and types of chords, data regarding bass progression, etc., and sequentially reads out these data according to the tempo clock from the timer 2B. To generate an automatic accompaniment sound.

【0010】鍵盤28は、発音すべき楽音の音高を選択
するための複数の鍵を備えており、各鍵に対応したキー
スイッチを有しており、また必要に応じて押圧力検出装
置等のタッチ検出手段を有している。鍵盤28は音楽演
奏のための基本的な操作子であり、これ以外の演奏操作
子でもよいことはいうまでもない。
The keyboard 28 is provided with a plurality of keys for selecting the pitch of a musical tone to be generated, has a key switch corresponding to each key, and if necessary, a pressing force detecting device or the like. It has a touch detection means. The keyboard 28 is a basic operator for playing music, and it goes without saying that other keyboard operators may be used.

【0011】押鍵検出回路25は、発生すべき楽音の音
高を指定する鍵盤28のそれぞれの鍵に対応して設けら
れたキースイッチ回路を含むものである。この押鍵検出
回路25は、鍵盤28の離鍵状態から押鍵状態への変化
を検出してキーオンイベントを出力し、押鍵状態から離
鍵状態への変化を検出してキーオフイベントを出力する
と共にそれぞれのキーオンイベント及びキーオフイベン
トに関する鍵の音高を示すキーコード(ノートナンバ)
を出力する。押鍵検出回路25は、この他にも鍵押し下
げ時の押鍵操作速度や押圧力等を検出してベロシティデ
ータやアフタタッチデータとして出力する。
The key depression detection circuit 25 includes a key switch circuit provided corresponding to each key of the keyboard 28 for designating the pitch of a musical tone to be generated. The key press detecting circuit 25 detects a change of the keyboard 28 from a key release state to a key press state and outputs a key-on event, and detects a change from the key press state to a key release state and outputs a key off event. A key code (note number) indicating the pitch of the key for each key-on event and key-off event
Is output. In addition to this, the key-depression detection circuit 25 detects the key-depression operation speed, the pressure, and the like when the key is depressed and outputs it as velocity data or after-touch data.

【0012】スイッチ検出回路26は、パネルスイッチ
29に設けられた各々の操作子(スイッチ)に対応して
設けられており、各々の操作子の操作状況に応じた操作
データをイベント情報として出力する。パネルスイッチ
29は、自動伴奏のスタート/ストップ、伴奏のスタイ
ル、発生すべき楽音の音色、音量、音高、効果等を選
択、設定、制御するための各種の操作子を含むものであ
る。
The switch detection circuit 26 is provided in correspondence with each operator (switch) provided on the panel switch 29, and outputs operation data corresponding to the operation status of each operator as event information. . The panel switch 29 includes various operators for selecting, setting, and controlling automatic accompaniment start / stop, accompaniment style, tone color of tone to be generated, volume, pitch, effect and the like.

【0013】音源回路27は、複数のチャンネルで楽音
信号の同時発生が可能であり、データ及びアドレスバス
2Cを経由して与えられる演奏データを入力し、それに
基づいたメロディ音や伴奏音等の楽音信号を発生する。
音源回路27における楽音信号発生方式はいかなるもの
を用いてもよい。例えば、発生すべき楽音の音高に対応
して変化するアドレスデータに応じて波形メモリに記憶
した楽音波形サンプル値データを順次読み出すメモリ読
み出し方式、又は上記アドレスデータを位相角パラメー
タデータとして所定の周波数変調演算を実行して楽音波
形サンプル値データを求めるFM方式、あるいは上記ア
ドレスデータを位相角パラメータデータとして所定の振
幅変調演算を実行して楽音波形サンプル値データを求め
るAM方式等の公知の方式を適宜採用してもよい。
The tone generator circuit 27 is capable of simultaneously generating musical tone signals on a plurality of channels, inputs data and performance data given via the address bus 2C, and produces musical tones such as melody sounds and accompaniment tones based on the input data. Generate a signal.
Any tone signal generation method may be used in the tone generator circuit 27. For example, a memory reading method for sequentially reading the musical tone waveform sample value data stored in the waveform memory according to the address data that changes corresponding to the pitch of the musical tone to be generated, or a predetermined frequency with the address data as phase angle parameter data. A well-known method such as an FM method for performing a modulation operation to obtain musical tone waveform sample value data or an AM method for performing a predetermined amplitude modulation operation using the address data as phase angle parameter data to obtain a tone waveform sample value data. You may employ suitably.

【0014】音源回路27から出力される楽音信号はサ
ウンドシステム2A内のデジタル−アナログ変換器(A
DC)、アンプ及びスピーカを介して発音される。タイ
マ2Bは和音検出用の所定時間間隔を計時したり、自動
伴奏のテンポを設定したりするためのテンポクロックパ
ルスを発生するものであり、このテンポクロックパルス
の周波数はパネルスイッチ29上のテンポスイッチ(図
示していない)によって調整される。発生したテンポク
ロックはCPU21や自動伴奏装置24に対してタイマ
割込み命令として与えられ、自動伴奏装置24はタイマ
割込み処理により自動伴奏の各種処理を実行する。
The tone signal output from the tone generator circuit 27 is a digital-analog converter (A) in the sound system 2A.
DC), an amplifier and a speaker. The timer 2B generates a tempo clock pulse for measuring a predetermined time interval for chord detection and setting the tempo of automatic accompaniment. The frequency of this tempo clock pulse is the tempo switch on the panel switch 29. (Not shown). The generated tempo clock is given to the CPU 21 and the automatic accompaniment device 24 as a timer interrupt command, and the automatic accompaniment device 24 executes various automatic accompaniment processes by timer interrupt processing.

【0015】次に、マイクロコンピュータによって実行
される和音検出装置の処理の一例を図1、図3、図4、
図5、図7、図8及び図9のフローチャートに基づいて
説明する。図3は、マイクロコンピュータが処理するメ
インルーチンの一例を示す図である。このメインルーチ
ンはつぎのようなステップで順番に実行される。
Next, an example of the processing of the chord detection device executed by the microcomputer will be described with reference to FIGS.
Description will be made based on the flowcharts of FIGS. 5, 7, 8 and 9. FIG. 3 is a diagram showing an example of a main routine processed by the microcomputer. This main routine is sequentially executed in the following steps.

【0016】ステップ31:まず、電源が投入される
と、CPU21はプログラムメモリ22に格納されてい
る制御プログラムに応じた処理を開始する。そして、こ
の「初期設定」処理では、ワーキングメモリ23内の各
種レジスタやフラグ等を初期化する。 ステップ32:押鍵検出回路25をスキャンして鍵盤2
8が操作され、キーイベントが発生したかどうかを判定
し、キーイベント有り(YES)の場合は次のステップ
33のキーイベント処理を実行してからステップ34に
進み、キーイベント無し(NO)の場合はステップ34
に進む。
Step 31: First, when the power is turned on, the CPU 21 starts the processing according to the control program stored in the program memory 22. Then, in this "initial setting" processing, various registers and flags in the working memory 23 are initialized. Step 32: The keyboard 2 is scanned to scan the keyboard 2
8 is operated and it is determined whether or not a key event has occurred. If there is a key event (YES), the key event process of the next step 33 is executed, then the process proceeds to step 34, and there is no key event (NO). If step 34
Proceed to.

【0017】ステップ33は鍵盤28が操作され、キー
イベントが発生する毎に行われるキーイベント処理であ
る。このキーイベント処理の詳細は図4に示してある。 ステップ34:スイッチ検出回路26をスキャンしてス
タート/ストップスイッチが操作され、そのオンイベン
トが発生したかどうかを判定し、オンイベント有り(Y
ES)の場合はステップ35に進み、オンイベント無し
(NO)の場合はステップ3Aに進む。
Step 33 is a key event process which is performed every time the keyboard 28 is operated and a key event occurs. Details of this key event processing are shown in FIG. Step 34: The switch detection circuit 26 is scanned to determine whether the start / stop switch is operated to generate an on event, and an on event is present (Y
If it is ES), the process proceeds to step 35, and if there is no on-event (NO), the process proceeds to step 3A.

【0018】ステップ35:演奏走行状態フラグRUN
を反転する。すなわち、この実施例では、スタート/ス
トップスイッチが操作される毎に自動伴奏が開始したり
又は停止したりする。 ステップ36:演奏走行状態フラグRUNが『1』かど
うかを判定し、『1』(YES)の場合、すなわち自動
伴奏が開始される場合はステップ37に進み、そうでな
い(NO)場合、すなわち自動伴奏が停止される場合は
ステップ39進む。
Step 35: Performance running state flag RUN
Invert. That is, in this embodiment, the automatic accompaniment starts or stops each time the start / stop switch is operated. Step 36: It is determined whether or not the performance running state flag RUN is "1". If "1" (YES), that is, if automatic accompaniment is started, the process proceeds to step 37. If not (NO), that is, automatic If the accompaniment is stopped, the process proceeds to step 39.

【0019】ステップ37:前のステップ36の処理で
演奏走行状態フラグRUNが反転された結果、それが
『1』であると、すなわち自動伴奏が開始されたと判定
されたので、ここでは自動伴奏装置24にスタート信号
を出力する。 ステップ38:自動伴奏の新たなスタートに対応してテ
ンポクロックレジスタCLKを『0』にリセットする。 ステップ39:同じく前のステップ36の処理で演奏走
行状態フラグRUNが反転された結果、それが『0』で
あると、すなわち自動伴奏が停止されたと判定されたの
で、自動伴奏装置24にストップ信号を出力する。 ステップ3A:パネルスイッチ29におけるその他の操
作子の操作に基づく処理や、その他の音量変更処理等の
種々の処理をおこなう。
Step 37: As a result of the performance running state flag RUN being inverted in the process of the previous step 36, it is determined that it is "1", that is, the automatic accompaniment is started. A start signal is output to 24. Step 38: Reset the tempo clock register CLK to "0" in response to a new start of automatic accompaniment. Step 39: Similarly, as a result of the performance running state flag RUN being inverted in the process of the previous step 36, it is determined that it is "0", that is, the automatic accompaniment is stopped, and therefore the stop signal is sent to the automatic accompaniment device 24. Is output. Step 3A: Various processes such as a process based on the operation of another operator on the panel switch 29 and other volume changing process are performed.

【0020】図4は、マイクロコンピュータが処理する
図3のステップ33のキーイベント処理の一例を示す図
である。このキーイベント処理は鍵盤28が操作され、
キーイベントが発生する毎に、つぎのようなステップで
順番に実行される。
FIG. 4 is a diagram showing an example of the key event processing of step 33 of FIG. 3 processed by the microcomputer. In this key event processing, the keyboard 28 is operated,
Each time a key event occurs, the following steps are executed in sequence.

【0021】ステップ41:キーイベントがキーオンイ
ベントかどうかを判定し、キーオンイベント(YES)
の場合はステップ42に進み、そうでない(NO)場合
はステップ43に進む。 ステップ42:前のステップ41でキーオンイベントと
判定されたので、そのキーオンイベントに対応するキー
コードの発音処理(キーオン処理)をおこなう。 ステップ43:現在押鍵中の全てのキーコードをキーコ
ードリストレジスタKCLSTに格納する。
Step 41: It is judged whether or not the key event is the key-on event, and the key-on event (YES)
If No, the process proceeds to Step 42. If not (NO), the process proceeds to Step 43. Step 42: Since the key-on event is determined in the previous step 41, the tone generation process (key-on process) of the key code corresponding to the key-on event is performed. Step 43: Store all the key codes currently being depressed in the key code list register KCLST.

【0022】ステップ44:前のステップ41でキーオ
フイベントと判定されたので、そのキーオフイベントに
対応するキーコードの消音処理(キーオフ処理)をおこ
なう。 ステップ45:テンポクロックレジスタCLKの値を1
2で除した余り(CLKmod12)が『0』かどうか
を判定し、『0』(YES)の場合は図3のメインルー
チンにリターンし、『0』以外の値(NO)の場合には
ステップ43に進む。 この実施例では、1小節を96分長とし、4分音符を2
4分長、8分音符を12分長としている。テンポクロッ
クレジスタCLKは『0』〜『95』の値を繰り返し累
算しているので、この値を8分音符長の『12』で除し
た余り(CLKmod12)が『0』の場合には、丁度
8分音符の発音タイミングすなわち拍タイミングである
ことを意味する。
Step 44: Since the key-off event is determined in the previous step 41, the mute processing (key-off processing) of the key code corresponding to the key-off event is performed. Step 45: Set the value of tempo clock register CLK to 1
It is determined whether the remainder (CLKmod12) divided by 2 is “0”. If “0” (YES), the process returns to the main routine of FIG. 3, and if it is a value other than “0” (NO), the step is performed. Proceed to 43. In this embodiment, one measure is 96 minutes long, and quarter notes are 2 minutes long.
A quarter note and an eighth note are 12 minutes long. Since the tempo clock register CLK repeatedly accumulates the values of "0" to "95", if the remainder (CLKmod12) obtained by dividing this value by the eighth note length "12" is "0", It means that the timing is exactly the eighth note, that is, the beat timing.

【0023】すなわち、このキーイベント処理では、キ
ーオンイベントが発生した時点で、そのキーオンイベン
トに対応するキーコードをキーコードリストレジスタK
CLSTに格納し、キーオフイベントが発生した時点
で、そのキーオフイベントに対応するキーコードをキー
コードリストレジスタKCLSTから削除するという処
理を行っているが、テンポクロックレジスタCLKの値
を12で除した余り(CLKmod12)が『0』にな
ってから『1』になるまでの間に発生したキーオフイベ
ントに対しては、そのキーオフイベントに対応するキー
コードをキーコードリストレジスタKCLSTから削除
することなくリターンしている。これによって、CLK
mod12が『0』になってから『1』になるまでの間
に押鍵状態であったところのキーコードが全てキーコー
ドリストレジスタKCLSTに格納されることとなる。
That is, in this key event processing, when a key-on event occurs, the key code corresponding to the key-on event is stored in the key code list register K.
The key code corresponding to the key-off event is stored in CLST and the key code corresponding to the key-off event is deleted from the key code list register KCLST. However, the value of the tempo clock register CLK is divided by 12 For a key-off event that occurs between (CLKmod12) becomes "0" and "1", the key code corresponding to the key-off event is returned without being deleted from the key code list register KCLST. ing. This allows CLK
All the key codes that have been in the key-depressed state from the time when the mod12 becomes "0" to the time when it becomes "1" are stored in the key code list register KCLST.

【0024】図5は、1小節当たり96回の割込みで実
行されるタイマ割り込み処理を示す図である。図6は、
図5のタイマ割り込み処理によって実行される和音検出
処理やレガート処理の動作を説明するための図である。
図6において、横軸は時間を示し、縦軸はその時の押鍵
状態を示す。図5のタイマ割り込み処理は1小節当たり
96回の割込みで実行される。これに対応して図6の下
側には、現在の割込みタイミングを示すために、テンポ
クロックレジスタCLKの値(23〜39)が示してあ
る。
FIG. 5 is a diagram showing a timer interrupt process executed by 96 interrupts per bar. Figure 6
FIG. 6 is a diagram for explaining operations of chord detection processing and legato processing executed by the timer interrupt processing of FIG. 5.
In FIG. 6, the horizontal axis represents time and the vertical axis represents the key depression state at that time. The timer interrupt process of FIG. 5 is executed by interrupting 96 times per bar. Corresponding to this, the lower part of FIG. 6 shows the values (23 to 39) of the tempo clock register CLK in order to show the current interrupt timing.

【0025】また、このタイマ割り込み処理では、8分
音符のタイミングを基準にして、その前後1分長におけ
る押鍵状態を検出し、それに応じて和音の検出を行って
いる。これに対応して図6の上側には、テンポクロック
レジスタCLKの値を12で除した余り(CLKmod
12)が『11』の場合を示すプリタイミングPRE、
『0』の場合を示すジャストタイミングJUST、
『1』の場合を示すレイトタイミングLATEがそれぞ
れ示してある。$図6において、キーコードK1のキー
は、割込タイミング24と25の間で押鍵され、割込タ
イミング39と40の間で離鍵されている。キーコード
K2のキーは、割込タイミク23と24の間で押鍵さ
れ、割込タイミング39と40の間で離鍵されている。
キーコードK3のキーは、割込タイミング35と36の
間で押鍵され、割込タイミング39と40の間で離鍵さ
れている。キーコードK4のキーは、割込タイミング2
3と24の間で押鍵され、割込タイミング36と37の
間で離鍵されている。キーコードK5のキーは、割込タ
イミング28で押鍵され、割込タイミング34で離鍵さ
れている。
Further, in this timer interrupt processing, the key-depression state is detected one minute before and after the timing of the eighth note as a reference, and the chord is detected accordingly. Correspondingly, in the upper part of FIG. 6, the remainder of the value of the tempo clock register CLK divided by 12 (CLKmod
12) is a pre-timing PRE that indicates the case of "11",
Just timing JUST indicating the case of "0",
The late timing LATE showing the case of "1" is shown respectively. In FIG. 6, the key with the key code K1 is pressed between the interrupt timings 24 and 25 and released between the interrupt timings 39 and 40. The key with the key code K2 is pressed between the interrupt timings 23 and 24 and released between the interrupt timings 39 and 40.
The key with the key code K3 is pressed between the interrupt timings 35 and 36, and released from between the interrupt timings 39 and 40. The key of key code K4 is interrupt timing 2
The key is pressed between 3 and 24, and the key is released between interrupt timings 36 and 37. The key with the key code K5 is pressed at the interrupt timing 28 and released at the interrupt timing 34.

【0026】図5のタイマ割り込み処理はつぎのような
ステップで順番に実行される。 ステップ51:演奏走行状態フラグRUNが『1』かど
うかを判定し、『1』(YES)の場合、すなわち自動
伴奏が開始される場合はステップ52に進み、そうでな
い(NO)場合、すなわち自動伴奏が停止される場合は
ステップ54に進む。 ステップ52:テンポクロックレジスタCLKの値を1
2で除した余り(CLKmod12)が『11』か、
『0』か、又は『1』であるかどうかを判定し、『1
1』、『0』又は『1』(YES)の場合は次のステッ
プ53に進み、これ以外の値(NO)の場合にはステッ
プ54に進む。 ステップ53:テンポクロックレジスタCLKの値を1
2で除した余り(CLKmod12)が『11』、
『0』及び『1』の場合、すなわち図6のプリタイミン
グPRE(割込タイミング23及び35)、ジャストタ
イミングJUST(割込タイミング24及び36)及び
レイトタイミングLATE(割込タイミング25及び3
7)のそれぞれにおける押鍵状態を検出するための押鍵
状態検出処理を行う。この押鍵状態検出処理の詳細につ
いては後述する。 ステップ54:テンポクロックレジスタCLKの値を
『1』だけインクリメント処理してリターンする。これ
によって、割込タイミングは1ずつ増加する。
The timer interrupt process of FIG. 5 is sequentially executed in the following steps. Step 51: It is determined whether or not the performance running state flag RUN is "1". If "1" (YES), that is, if automatic accompaniment is started, the process proceeds to step 52. If not (NO), that is, automatic If the accompaniment is stopped, the process proceeds to step 54. Step 52: Set the value of tempo clock register CLK to 1
Is the remainder (CLKmod12) divided by 2 "11"?
It is judged whether it is "0" or "1", and "1"
If it is "1", "0" or "1" (YES), the process proceeds to the next step 53, and if it is any other value (NO), the process proceeds to step 54. Step 53: Set the value of tempo clock register CLK to 1
The remainder (CLKmod12) divided by 2 is "11",
In the case of "0" and "1", that is, the pre-timing PRE (interrupt timing 23 and 35), the just timing JUST (interrupt timing 24 and 36) and the late timing LATE (interrupt timing 25 and 3) of FIG.
The key-depression state detection processing for detecting the key-depression state in each of 7) is performed. Details of this key-depression state detection processing will be described later. Step 54: Increment the value of the tempo clock register CLK by "1" and return. As a result, the interrupt timing is increased by one.

【0027】図1は、図5のステップ53の押鍵状態検
出処理の詳細を示す図である。この押鍵状態検出処理
は、前述のように、テンポクロックレジスタCLKの値
を12で除した余り(CLKmod12)が『11』
(プリタンミングPRE)、『0』(ジャストタイミン
グJUST)又は『1』(レイトタイミングLATE)
の場合に行われる。この押鍵状態検出処理はつぎのよう
なステップで順番に実行される。 ステップ11:カレントリストレジスタCLST内のキ
ーコードをプリリストレジスタPLSTに格納する。 ステップ12:キーコードリストレジスタKCLST内
のキーコードをカレントリストレジスタCLSTに格納
する。
FIG. 1 is a diagram showing details of the key-depression state detection processing in step 53 of FIG. In the key-depression state detection processing, as described above, the remainder (CLKmod12) obtained by dividing the value of the tempo clock register CLK by 12 is "11".
(Pre-tamming PRE), "0" (just timing JUST) or "1" (late timing LATE)
In case of. This key-depression state detection processing is sequentially executed in the following steps. Step 11: The key code in the current list register CLST is stored in the prelist register PLST. Step 12: The key code in the key code list register KCLST is stored in the current list register CLST.

【0028】ステップ11,12の処理によって、プリ
リストレジスタPLSTには1回前の割込タイミングに
おけるキーコードが格納され、カレントリストレジスタ
CLSTには現在押鍵中の全てのキーコードが格納され
る。なお、図4のステップ45の判定処理によって、テ
ンポクロックレジスタCLKの値を12で除した余り
(CLKmod12)が『0』になってから『1』にな
るまでの間に発生したキーオフイベントに対しては、そ
のキーオフイベントに対応するキーコードをキーコード
リストレジスタKCLSTから削除することなくリター
ンしているので、ジャストタイミングJUSTからレイ
トタイミングLATEまでの間にキーオフイベントが発
生しても、それは無視され、キーオンイベントのみが有
効なものとして、キーコードリストレジスタKCLST
内に追加格納される。例えば、図6ではキーコードK4
のキーが割込タイミング36と37の間で離鍵され、キ
ーコードK3のキーが割込タイミング35と36の間で
押鍵されているキー状態がこれに対応する。
Through the processing of steps 11 and 12, the prelist register PLST stores the key code at the interrupt timing one time before, and the current list register CLST stores all the key codes currently being depressed. . By the determination processing of step 45 of FIG. 4, for the key-off event that occurs between the time when the remainder (CLKmod12) obtained by dividing the value of the tempo clock register CLK by 12 becomes “1”, Since the key code corresponding to the key-off event is returned without being deleted from the key code list register KCLST, even if a key-off event occurs between the just timing JUST and the late timing LATE, it is ignored. , Key code list register KCLST
It is additionally stored in. For example, in FIG. 6, the key code K4
This corresponds to the key state in which the key No. is released between the interrupt timings 36 and 37, and the key with the key code K3 is pressed between the interrupt timings 35 and 36.

【0029】ステップ13:継続フラグCFが『1』か
どうかを判定し、『1』(YES)の場合はステップ1
7に進み、『0』(NO)の場合はステップ14に進
む。この継続フラグCFは、ステップ14及び15の処
理で共にYESと判定された場合にステップ16で
『1』に設定され、ステップ17の処理でNOと判定さ
れた場合に『0』に設定される。例えば、図6では、ス
テップ13の判定は割込タイミング36ではYESとな
り、これ以外の割込タイミング23、24、25、35
及び37ではNOとなる。
Step 13: It is judged whether the continuation flag CF is "1", and if "1" (YES), the step 1
7. If "0" (NO), proceed to step 14. The continuation flag CF is set to "1" in step 16 when both of the processes of steps 14 and 15 are determined to be YES, and is set to "0" when NO of the process in step 17 is determined. . For example, in FIG. 6, the determination in step 13 is YES at the interrupt timing 36, and other interrupt timings 23, 24, 25, 35.
And 37 are NO.

【0030】ステップ14:前のステップ13で押鍵継
続中でないと判定されたので、このステップではテンポ
クロックレジスタCLKの値を12で除した余り(CL
Kmod12)が『11』(プリタイミングPRE)か
どうかを判定し、『11』(YES)の場合にはステッ
プ15に進み、そうでない(NO)場合はステップ1C
に進む。例えば、図6では、ステップ14の判定は割込
タイミング23及び35ではYESとなり、これ以外の
割込タイミング24、25、37ではNOとなる。
Step 14: Since it was determined in the previous step 13 that key depression is not continuing, in this step, the remainder of the value of the tempo clock register CLK divided by 12 (CL
It is determined whether Kmod12) is "11" (pre-timing PRE). If "11" (YES), the process proceeds to step 15. If not (NO), step 1C is performed.
Proceed to. For example, in FIG. 6, the determination in step 14 is YES at interrupt timings 23 and 35, and NO at other interrupt timings 24, 25, and 37.

【0031】ステップ15:前のステップ14で現在の
割込タイミングがプリタイミングPREであると判定さ
れたということは、ステップ11でプリリストレジスタ
PLSTに前回のレイトタイミングLATEにおけるキ
ーコードが格納され、ステップ12でカレントリストレ
ジスタCLSTに今回のプリタイミングPREにおける
キーコードが格納されているので、このステップ15で
は、カレントリストレジスタCLST内のキーコードが
全てプリリストレジスタPLST内のキーコードに属す
るかどうかを判定し、属する(YES)場合、すなわち
押鍵に継続性がある場合には次のステップ16に進み、
属しない(NO)場合、すなわち押鍵に継続性がない場
合にはステップ1Cに進む。
Step 15: It is determined in the previous step 14 that the current interrupt timing is the pre-timing PRE, which means that the key code at the previous late timing LATE is stored in the pre-list register PLST in step 11. Since the key code at the current pre-timing PRE is stored in the current list register CLST in step 12, it is determined in step 15 whether all the key codes in the current list register CLST belong to the key codes in the pre-list register PLST. If it belongs (YES), that is, if there is continuity in key depression, proceed to the next step 16,
If it does not belong (NO), that is, if there is no continuity in key depression, the process proceeds to step 1C.

【0032】すなわち、カレントリストレジスタCLS
T内のキーコードが全てプリリストレジスタPLST内
のキーコードに属するということは、前回のレイトタイ
ミングLATEにおける押鍵が今回のプリタイミングP
REでも継続している場合を意味し、逆に属しないとい
うことは新たな離鍵又は押鍵が行われたことを意味す
る。例えば、図6では、割込タイミング25(レイトタ
イミングLATE)のキーコードはK1、K2及びK4
であり、割込タイミング35(プリタイミングPRE)
のキーコードはK1、K2及びK4なので、この場合に
は押鍵に継続性があると判定される。従って、図6では
ステップ15の判定は、割込タイミング35ではYES
となり、これ以外の割込タイミング23ではNOとな
る。
That is, the current list register CLS
All the key codes in T belong to the key code in the pre-list register PLST, which means that the key press at the previous late timing LATE is the pre-timing P at this time.
This means that the RE continues, and the fact that it does not belong to the contrary means that a new key release or key depression is performed. For example, in FIG. 6, the key codes of the interrupt timing 25 (late timing LATE) are K1, K2 and K4.
And the interrupt timing 35 (pre-timing PRE)
Since the key codes of K are K1, K2, and K4, it is determined in this case that the key depression is continuous. Therefore, in FIG. 6, the determination at step 15 is YES at the interrupt timing 35.
And becomes NO at other interrupt timings 23.

【0033】ステップ16:前のステップ14で現在の
割込みタイミングがプリタイミングPREであり、ステ
ップ15でカレントリストレジスタCLST内のキーコ
ードが全てプリリストレジスタPLST内のキーコード
に属すると判定されたということは、前回のレイトタイ
ミングLATEにおける押鍵と今回のプリタイミングP
REにおける押鍵との間に継続性が存在することを意味
するので、このステップでは、継続フラグCFに『1』
をセットして、ステップ1Cに進む。従って、図6では
割込タイミング35で継続フラグCFに『1』がセット
される。
Step 16: The current interrupt timing is the pre-timing PRE in the previous Step 14, and it is determined in Step 15 that all the key codes in the current list register CLST belong to the key codes in the prelist register PLST. This means that the key press at the previous late timing LATE and the pre-timing P at this time
This means that there is continuity with the key depression in RE, so in this step, the continuation flag CF is set to "1".
And set to step 1C. Therefore, in FIG. 6, "1" is set to the continuation flag CF at the interrupt timing 35.

【0034】ステップ17:前のステップ13で継続フ
ラグCFが『1』、すなわち押鍵継続中であると判定さ
れたので、このステップではカレントリストレジスタC
LST内のキーコードが全てプリリストレジスタPLS
T内のキーコードに属するかどうかを判定し、属する
(YES)場合にはステップ18に進み、属しない(N
O)場合にはステップ19に進む。すなわち、前のステ
ップ13で押鍵継続中であると判定されたので、前回の
押鍵状態検出処理から今回の押鍵状態検出処理の間でも
依然として押鍵継続中であるかどうかを判定している。
Step 17: Since it is determined in the previous step 13 that the continuation flag CF is "1", that is, key depression is in progress, the current list register C is determined in this step.
All key codes in LST are prelist register PLS
Whether or not it belongs to the key code in T is judged, and if it belongs (YES), the process proceeds to step 18 and does not belong (N
If O), proceed to step 19. That is, since it is determined in the previous step 13 that key depression is continuing, it is determined whether key depression is still continuing between the previous key depression state detection process and the current key depression state detection process. There is.

【0035】カレントリストレジスタCLST内のキー
コードが全てプリリストレジスタPLST内のキーコー
ドに属する(YES)ということは、前回のプリタイミ
ングPREにおける押鍵が今回のジャストタイミングJ
USTでも継続している場合、又は前回のジャストタイ
ミングJUSTにおける押鍵が今回のレイトタイミング
LATEでも継続しているか、又はその間に離鍵された
場合を意味し、逆に属しない(NO)ということは前回
のプリタイミングPREと今回のジャストタイミングJ
USTとの間で新たな押鍵があった場合、又は前回のジ
ャストタイミングJUSTと今回のレイトタイミングL
ATEとの間で新たに押鍵された場合を意味する。例え
ば、図6では、割込タイミング36におけるステップ1
7の判定は属しない(NO)となる。
All the key codes in the current list register CLST belong to the key codes in the pre-list register PLST (YES), which means that the key press at the previous pre-timing PRE is the just timing J at this time.
It means that it continues in UST, or that the key press at the last just timing JUST continues at this late timing LATE, or the key is released during that time, and it does not belong to the contrary (NO). Is the previous pre-timing PRE and this just timing J
If there is a new key press with UST, or just before last timing JUST and this late timing L
This means a case where a new key is pressed with the ATE. For example, in FIG. 6, step 1 at the interrupt timing 36
The determination of 7 does not belong (NO).

【0036】ステップ18:ステップ13で押鍵継続中
と判定され、ステップ17で今回も押鍵継続中であると
判定されたので、このステップではテンポクロックレジ
スタCLKの値を12で除した余り(CLKmod1
2)が『0』かどうか、すなわち割込みタイミングがジ
ャストタイミングJUSTかどうかを判定し、『0』
(YES)の場合には現在の割込みタイミングがジャス
トタイミングJUSTなので、ステップ1Cに進みパー
ト分割処理を行い、そうでない(NO)場合には現在の
割込みタイミングがプリタイミングPRE又はレイトタ
イミングLATEなので、ステップ1Dに進む。
Step 18: Since it is determined in step 13 that key depression is in progress, and in step 17 that key depression is in progress this time as well, in this step the remainder of the value of the tempo clock register CLK divided by 12 ( CLKmod1
It is determined whether 2) is “0”, that is, whether the interrupt timing is just timing JUST, and “0” is determined.
If (YES), the current interrupt timing is the just timing JUST, so the process proceeds to step 1C to perform part division processing. If not (NO), the current interrupt timing is the pre-timing PRE or late timing LATE, so the step Go to 1D.

【0037】ステップ19:ステップ17でカレントリ
ストレジスタCLST内のキーコードが全てプリリスト
レジスタPLST内のキーコードに属しない(NO)と
判定されたので、前回のタイミングから今回のタイミン
グの間に新たな押鍵があったことを意味するので、この
ステップでは、継続フラグCFを『0』にリセットす
る。従って、図6では、割込タイミク36で継続フラグ
CFは『0』にリセットされる。
Step 19: Since it is determined in step 17 that all the key codes in the current list register CLST do not belong to the key codes in the prelist register PLST (NO), a new code is added between the previous timing and the current timing. Since this means that there is a key depression, the continuation flag CF is reset to "0" in this step. Therefore, in FIG. 6, the continuation flag CF is reset to "0" by the interrupt timing 36.

【0038】ステップ1A:テンポクロックレジスタC
LKの値を12で除した余り(CLKmod12)が
『11』かどうか、すなわち割込みタイミングがプリタ
イミングPREかどうかを判定し、『11』(YES)
の場合はステップ1Cに進み、『0』又は『1』(N
O)の場合は次のステップ1Bに進む。
Step 1A: Tempo clock register C
It is determined whether the remainder (CLKmod12) obtained by dividing the value of LK by 12 is "11", that is, whether the interrupt timing is the pre-timing PRE, and "11" (YES).
In the case of, proceed to step 1C, and "0" or "1" (N
In the case of O), proceed to the next step 1B.

【0039】例えば、図6では、割込タイミング36に
おけるステップ1Aの判定はNO(ジャストタイミング
である)となる。
For example, in FIG. 6, the determination at step 1A at the interrupt timing 36 is NO (just timing).

【0040】ステップ1B:押鍵継続中であり、かつ新
たな押鍵があったと判定され、さらに割込みタイミング
がジャストタイミングJUST又はレイトタイミングL
ATEである場合に該当するので、レガート処理を行
う。このレガート処理の詳細は図9に示されている。 ステップ1C:カレントリストレジスタCLST内のキ
ーコードを所定のパートに分割するためのパート分割処
理を行う。このパート分割処理の詳細については図7を
用いて後述する。
Step 1B: It is determined that the key depression is continuing and there is a new key depression, and the interrupt timing is the just timing JUST or the late timing L.
Since it corresponds to the case of ATE, legato processing is performed. The details of this legato processing are shown in FIG. Step 1C: Part division processing for dividing the key code in the current list register CLST into predetermined parts is performed. Details of this part division processing will be described later with reference to FIG. 7.

【0041】ステップ1D:テンポクロックレジスタC
LKの値を12で除した余り(CLKmod12)が
『11』かどうかを判定し、『11』(YES)の場合
には和音検出処理の必要がないので、ステップ1Fに進
み、そうでない(NO)場合は和音検出処理を行うため
に次のステップ1Eに進む。 ステップ1E:前のステップ1Cでそれぞれのパートに
分割されたキーコードに基づいた和音の検出処理を行
う。この和音検出処理の詳細についは、図8を用いて後
述する。 ステップ1F:前のステップ1Bのレガート処理でカレ
ントリストレジスタCLSTの内容が変更された可能生
があるので、ステップ12と同様にキーコードリストレ
ジスタKCLST内のキーコードをカレントリストレジ
スタCLSTに格納しなおす。
Step 1D: Tempo clock register C
It is determined whether the remainder (CLKmod12) obtained by dividing the value of LK by 12 is "11". If "11" (YES), chord detection processing is not necessary, so proceed to step 1F, otherwise (NO). ), The process proceeds to the next step 1E for performing the chord detection process. Step 1E: Perform chord detection processing based on the key code divided into each part in the previous step 1C. Details of the chord detection process will be described later with reference to FIG. Step 1F: Since the contents of the current list register CLST may have been changed by the legato processing of the previous step 1B, the key code in the key code list register KCLST is stored again in the current list register CLST as in step 12. .

【0042】図7は、図1のステップ1Cのパート分割
処理の詳細を示す図である。このパート分割処理は、カ
レントリストレジスタCLSTに格納されているキーコ
ードを各パート(メロディパート、ベースパート、コー
ドパート)にそれぞれ分割する。このパート分割処理は
つぎのようなステップで順番に実行される。
FIG. 7 is a diagram showing details of the part division processing in step 1C of FIG. In this part division processing, the key code stored in the current list register CLST is divided into each part (melody part, bass part, chord part). This part division processing is sequentially executed in the following steps.

【0043】ステップ71:カレントリストレジスタC
LSTの構成要素(キーコード)の数が2音以下かどう
かを判定し、2音以下(YES)の場合はステップ72
に進み、3音以上(NO)の場合はステップ73に進
む。 ステップ72:前のステップ71でカレントリストレジ
スタCLSTの構成要素(キーコード)の数が2音以下
だと判定されたので、カレントリストレジスタCLST
内のキーコードの属する音域(例えば、鍵盤を3分割し
た場合の高音域をメロディパート、中音域をコードパー
ト、低音域をベースパートとする)に応じて、各パート
(メロディパート、ベースパート、コードパート)に分
類し、それを各メロディパートレジスタM、ベースパー
トレジスタB及びコードパートレジスタCに2音又は1
音を格納する。
Step 71: Current list register C
It is determined whether or not the number of components (key code) of LST is two tones or less, and if two tones or less (YES), step 72
If three or more tones (NO), go to step 73. Step 72: Since it is determined in the previous step 71 that the number of constituent elements (key code) of the current list register CLST is two or less, the current list register CLST
According to the tone range to which the key chord belongs (for example, the treble range when the keyboard is divided into three is the melody part, the middle tone range is the chord part, and the bass range is the bass part) (melody part, bass part, Chord part) and assign it to each melody part register M, bass part register B and chord part register C with two notes or one.
Store the sound.

【0044】ステップ73:カレントリストレジスタC
LSTの構成要素(キーコード)の数が3音かどうかを
判定し、3音(YES)の場合はステップ74に進み、
4音以上(NO)の場合はステップ75に進む。 ステップ74:前のステップ73でカレントリストレジ
スタCLSTの構成要素(キーコード)の数が3音だと
判定されたので、カレントリストレジスタCLST内の
キーコードはコードパートに対応するとして、メロディ
パートレジスタM及びベースパートレジスタBにはそれ
ぞれ空集合φを格納し、コードパートレジスタCにカレ
ントリストレジスタCLST内の3つの構成要素(キー
コード)を格納する。
Step 73: Current list register C
It is determined whether or not the number of LST components (key code) is three tones, and if three tones (YES), the process proceeds to step 74.
If four or more sounds (NO), the process proceeds to step 75. Step 74: Since it is determined in the previous step 73 that the number of constituent elements (key chords) of the current list register CLST is three tones, it is assumed that the key chord in the current list register CLST corresponds to the chord part. An empty set φ is stored in each of M and the base part register B, and three constituent elements (key codes) in the current list register CLST are stored in the code part register C.

【0045】ステップ75:カレントリストレジスタC
LSTの構成要素(キーコード)の数が4音かどうかを
判定し、4音(YES)の場合はステップ76に進み、
5音以上(NO)の場合はステップ79に進む。 ステップ76:前のステップ75でカレントリストレジ
スタCLSTの構成要素(キーコード)の数が4音だと
判定されたので、カレントリストレジスタCLST内の
最上音のキーコードがキーコードナンバC4以上の音高
かどうかを判定し、C4以上(YES)の音高の場合は
ステップ77に進み、C4より低い音高の場合はステッ
プ78に進む。
Step 75: Current list register C
It is determined whether the number of LST components (key code) is four tones, and if four tones (YES), the process proceeds to step 76.
If there are five or more tones (NO), the process proceeds to step 79. Step 76: Since it is determined in the previous step 75 that the number of constituent elements (key code) of the current list register CLST is four tones, the key code of the highest tone in the current list register CLST is a tone of key code number C4 or more. It is determined whether the pitch is high or not. If the pitch is C4 or higher (YES), the process proceeds to step 77, and if the pitch is lower than C4, the process proceeds to step 78.

【0046】ステップ77:前のステップ76でカレン
トリストレジスタCLST内の最上音のキーコードがキ
ーコードナンバC4以上の音高だと判定されたので、こ
のステップでは、その最上音(1音)のキーコードをメ
ロディパートレジスタMに格納し、残りの3音をコード
パートレジスタCに格納し、ベースパートレジスタBに
は空集合φを格納する。 ステップ78:前のステップ76でカレントリストレジ
スタCLST内の最上音のキーコードがキーコードナン
バC4より低い音高だと判定されたので、このステップ
では、その最下音(1音)のキーコードをベースパート
レジスタBに格納し、残りの3音をコードパートレジス
タCに格納し、メロディパートレジスタMには空集合φ
を格納する。
Step 77: Since the key code of the highest note in the current list register CLST is judged to be the pitch higher than the key code number C4 in the previous step 76, the highest note (one note) of this note is selected in this step. The key code is stored in the melody part register M, the remaining three tones are stored in the chord part register C, and the empty set φ is stored in the bass part register B. Step 78: Since it was determined in the previous step 76 that the key code of the highest note in the current list register CLST has a pitch lower than the key code number C4, in this step, the key code of the lowest note (one note). Is stored in the bass part register B, the remaining three notes are stored in the chord part register C, and the empty set φ is stored in the melody part register M.
To store.

【0047】ステップ79:前のステップ75でカレン
トリストレジスタCLSTの構成要素(キーコード)の
数が5音以上だと判定されたので、そのカレントリスト
レジスタCLST内の最上音(1音)のキーコードをメ
ロディパートレジスタMに格納し、その最下音(1音)
のキーコードをベースパートレジスタBに格納し、最上
音及び最下音以外の残りの音の下から3音又は全部の音
をコードパートレジスタCに格納する。
Step 79: Since it is determined in the previous step 75 that the number of constituent elements (key code) of the current list register CLST is five or more tones, the key of the highest tone (one note) in the current list register CLST is determined. The chord is stored in the melody part register M, and the lowest note (1 note)
The key code is stored in the bass part register B, and the three tones or all the remaining tones other than the highest and lowest tones are stored in the chord part register C.

【0048】図8は、図1のステップ1Eの和音検出処
理の詳細を示す図である。この和音検出処理は、図7の
パート分割処理で分割されたコードパートレジスタC及
びベースパートレジスタB内のキーコードに応じて行わ
れる。この和音検出処理はつぎのようなステップで順番
に実行される。 ステップ81:コードパートレジスタCの集合が空集合
φかどうかを判定し、空集合φ(YES)の場合はステ
ップ8Bに進み、空集合φでない(NO)場合はステッ
プ82に進む。 ステップ82:ベースパートレジスタBの集合が空集合
φかどうかを判定し、空集合φ(YES)の場合はステ
ップ87に進み、空集合φでない(NO)場合はステッ
プ83に進む。
FIG. 8 is a diagram showing details of the chord detection process in step 1E of FIG. The chord detection process is performed according to the key code in the chord part register C and the bass part register B divided by the part division process of FIG. This chord detection process is sequentially executed in the following steps. Step 81: Determine whether the set of code part registers C is an empty set φ. If it is an empty set φ (YES), proceed to step 8B. If it is not an empty set φ (NO), proceed to step 82. Step 82: It is judged whether or not the set of the base part register B is the empty set φ. If it is the empty set φ (YES), the process proceeds to step 87. If it is not the empty set φ (NO), the process proceeds to step 83.

【0049】ステップ83:前のステップ81及び83
で共にコードパートレジスタC及びベースパートレジス
タBが空集合φでないと判定されたので、このステップ
では、コードベースレジスタCBにコードパートレジス
タC及びベースパートレジスタB内のキーコードを格納
する。 ステップ84:コードベースレジスタCBに格納されて
いる構成要素(キーコード)に基づいて和音を検出す
る。
Step 83: Previous Steps 81 and 83
Since it is determined that both the code part register C and the base part register B are not the empty set φ, the key codes in the code part register C and the base part register B are stored in the code base register CB in this step. Step 84: Detect a chord based on the component (key code) stored in the chord base register CB.

【0050】ステップ85:前のステップ84で和音を
検出することができたかどうかを判定し、検出できた
(YES)場合はステップ86に進み、検出できなかっ
た(NO)場合はステップ87に進む。 ステップ86:ベースレジスタBSに空集合φを意味す
る16進数の『F』(図ではFHで表示してある)を格
納する。 ステップ87:コードパートレジスタCにはキーコード
が格納されているがステップ82でベースパートレジス
タBには空であると判定された場合、又はステップ85
でコードベースレジスタCB内の構成要素(キーコー
ド)に基づいて和音が検出されなかったと判定された場
合なので、コードパートレジスタC内の構成要素(キー
コード)に基づいて和音を検出する。
Step 85: It is judged whether or not the chord can be detected in the previous step 84. If it can be detected (YES), the procedure proceeds to step 86, and if it cannot be detected (NO), the procedure proceeds to step 87. . Step 86: The hexadecimal number "F" (indicated by FH in the figure) meaning the empty set φ is stored in the base register BS. Step 87: When the key code is stored in the code part register C but it is determined in step 82 that the base part register B is empty, or step 85
Since it is determined that the chord is not detected based on the component (key code) in the chord base register CB, the chord is detected based on the component (key code) in the chord part register C.

【0051】ステップ88:前のステップ87で和音を
検出することができたかどうかを判定し、検出できた
(YES)場合はステップ89に進み、検出できなかっ
た(NO)場合は図1のステップ1Fにリターンする。 ステップ89:前のステップ87で和音が検出されたの
で、このステップでは、ベースレジスタBSにベースパ
ートレジスタBの構成要素(キーコード)を12で除し
た余り、すなわち音名を格納する。なお、ベースパート
レジスタBが空の時には空集合φを意味する16進数の
『F』(図ではFHで表示してある)を格納する。
Step 88: It is judged whether or not the chord can be detected in the previous step 87, and if it can be detected (YES), the procedure proceeds to step 89, and if it cannot be detected (NO), the step of FIG. Return to 1F. Step 89: Since a chord has been detected in the previous step 87, in this step, the remainder obtained by dividing the component (key code) of the bass part register B by 12 is stored in the bass register BS, that is, the note name. When the base part register B is empty, a hexadecimal number "F" (indicated by FH in the figure) meaning an empty set φ is stored.

【0052】ステップ8A:検出された和音の根音を根
音レジスタRTに格納し、検出された和音の種類を和音
タイプレジスタTPに格納する。 ステップ8B:根音レジスタRT、和音タイプレジスタ
TP及びベースレジスタBSにそれぞれ格納されている
根音、和音の種類及びベース音を自動伴奏装置24に出
力する。これによって、自動伴奏装置24は検出された
和音に基づいた伴奏を行う。なお、ベースレジスタBS
の格納値が『FH』の場合には、検出された和音に対応
したベース音を自動伴奏装置24側で生成して伴奏す
る。
Step 8A: The root note of the detected chord is stored in the root note register RT, and the detected chord type is stored in the chord type register TP. Step 8B: The root note, chord type, and bass note stored in the root note register RT, the chord type register TP, and the bass register BS are output to the automatic accompaniment device 24. As a result, the automatic accompaniment device 24 performs accompaniment based on the detected chord. The base register BS
When the stored value of is "FH", the bass sound corresponding to the detected chord is generated and accompanied by the automatic accompaniment device 24 side.

【0053】図9は、図1のステップ1Bのレガート処
理の詳細構成を示す図である。このレガート処理は、図
7のパート分割処理でコードパートレジスタC及びメロ
ディパートレジスタMにそれぞれ分割格納されたキーコ
ードに応じて行われる。例えば、図6では、割込タイミ
ング36でこのレガート処理が行われる。このレガート
処理はつぎのようなステップで順番に実行される。 ステップ91:コードメロディレジスタCMにコードパ
ートレジスタC及びメロディパートレジスタMのキーコ
ードを格納する。 ステップ92:コードメロディレジスタCMに格納され
ているキーコードの中で最も音高の低い音(最下音)を
コードボトムレジスタCBotに格納し、最も音高の高
い音(最上音)をコードトップレジスタCTopに格納
する。
FIG. 9 is a diagram showing the detailed structure of the legato processing in step 1B of FIG. This legato processing is performed according to the key code divided and stored in the chord part register C and the melody part register M in the part division processing of FIG. For example, in FIG. 6, this legato processing is performed at the interrupt timing 36. This legato processing is sequentially executed in the following steps. Step 91: The key codes of the chord part register C and the melody part register M are stored in the chord melody register CM. Step 92: The lowest pitched note (bottom note) of the key chords stored in the chord melody register CM is stored in the chord bottom register CBot, and the highest pitched note (top note) is chorded top. Store in register CTtop.

【0054】ステップ93:コードパートレジスタCが
空集合φかどうかを判定し、空集合φ(YES)の場合
はステップ94に進み、空集合φでない(NO)場合は
ステップ96に進む。 ステップ94:カレントリストレジスタCLST中でコ
ードボトムレジスタCBotのキーコード以上の音高を
有する音列(キーコード列)をカレントオーバラップコ
ードレジスタCOCBotに格納する。 ステップ95:カレントオーバラップコードレジスタC
OCBotに格納されているキーコードが、コードメロ
ディレジスタCMに格納されているキーコードとコード
トップレジスタCTopに対して上下6度以内の音(キ
ーコード)とを加算したものに等しいかどうかを判定
し、等しい(YES)場合、すなわち押鍵状態がレガー
ト状態である場合にはステップ99に進み、等しくない
(NO)場合、すなわち押鍵状態がレガート状態でない
場合には図1のステップ1Cにリターンする。
Step 93: It is judged whether the code part register C is an empty set φ. If it is an empty set φ (YES), the process proceeds to step 94. If it is not the empty set φ (NO), the process proceeds to step 96. Step 94: In the current list register CLST, a tone string (key chord string) having a pitch equal to or higher than the key code of the chord bottom register CBot is stored in the current overlap chord register COCBot. Step 95: Current overlap code register C
It is determined whether the key code stored in OCBot is equal to the sum of the key code stored in the chord melody register CM and the sound (key code) within 6 degrees above and below the chord top register CTop. However, if they are equal (YES), that is, if the key depression state is the legato state, the routine proceeds to step 99. If they are not equal (NO), that is, if the key depression state is not the legato state, the routine returns to step 1C of FIG. To do.

【0055】ステップ96:前のステップ93でコード
パートレジスタCが空集合φだと判定されたので、この
ステップでは、メロディパートレジスタMが空集合φか
どうかを判定し、空集合φ(YES)の場合は押鍵がメ
ロディパート及びコードパートに対応する押鍵が存在し
なかったことを意味するので、図1のステップ1Cにリ
ターンし、空集合φでない(NO)場合、メロディパー
トに関する押鍵が存在した場合はステップ96に進む。 ステップ97:カレントリストレジスタCLST中でメ
ロディパートレジスタMのキーコードに対して上下6度
以内の音列(キーコード列)をカレントオーバラップメ
ロディレジスタCOMに格納する。 ステップ98:カレントオーバラップメロディレジスタ
COMに格納されているキーコードが、コードメロディ
レジスタCMに格納されているキーコードとメロディパ
ートレジスタMに対して上下6度以内の音(キーコー
ド)とを加算したものに等しいかどうかを判定し、等し
い(YES)場合、すなわち押鍵状態がレガート状態で
ある場合にはステップ99に進み、等しくない(NO)
場合、すなわち押鍵状態がレガート状態でない場合には
図1のステップ1Cにリターンする。
Step 96: Since it was determined in the previous step 93 that the chord part register C is the empty set φ, it is determined in this step whether the melody part register M is the empty set φ, and the empty set φ (YES). In the case of, it means that there is no key depression corresponding to the melody part and the chord part. Therefore, the process returns to step 1C of FIG. Is present, the process proceeds to step 96. Step 97: In the current list register CLST, a tone sequence (key code sequence) within 6 degrees above and below the key code of the melody part register M is stored in the current overlap melody register COM. Step 98: The key code stored in the current overlap melody register COM adds the key code stored in the chord melody register CM and the sound (key code) within 6 degrees above and below the melody part register M. If it is equal (YES), that is, if the key depression state is the legato state, the process proceeds to step 99 and is not equal (NO).
In the case, that is, when the key depression state is not the legato state, the process returns to step 1C of FIG.

【0056】上述の実施例では電子楽器について説明し
たが、自動伴奏処理をおこなうシーケンサモジュール
と、押鍵検出回路や音源回路からなる音源モジュールと
がそれぞれ別々に構成され、各モジュール間のデータの
授受を周知のMIDI規格でおこなうように構成された
ものにも同様に適用できることは言うまでもない。ま
た、上述の実施例では、ジャストタイミングJUSTか
らレイトタイミングLATEまでの間でキーオフイベン
トが発生しても、そのキーコードをキーコードリストレ
ジスタKCLSTから削除しない場合について説明した
が、プリタイミングPREからレイトタイミングLAT
Eまでの間でキーオフイベントが発生した場合でも同様
に処理してもよい。さらに、上述の実施例では、図7の
パート分割処理と図8の和音検出処理とを同じタイミン
グで行う場合について説明したが、パート分割処理だけ
を和音検出処理のタイミングよりも細かく行うようにし
てもよい。すなわち、和音検出処理を8分音符長のタイ
ミングで行い、パート分割処理を32分音符長のタイミ
ングで行うようにしてもよい。
Although the electronic musical instrument has been described in the above embodiments, a sequencer module for performing automatic accompaniment processing and a tone generator module including a key-depression detection circuit and a tone generator circuit are separately configured, and data is exchanged between the modules. It is needless to say that the same can be applied to a device configured to comply with the well-known MIDI standard. Further, in the above-described embodiment, the case where the key code is not deleted from the key code list register KCLST even if a key-off event occurs between the just timing JUST and the late timing LATE has been described. Timing LAT
Similar processing may be performed even when a key-off event occurs up to E. Further, in the above-described embodiment, the case where the part division process of FIG. 7 and the chord detection process of FIG. 8 are performed at the same timing has been described, but only the part division process is performed finer than the timing of the chord detection process. Good. That is, the chord detection process may be performed at the timing of the eighth note length, and the part division process may be performed at the timing of the 32nd note length.

【0057】[0057]

【発明の効果】この発明によれば、和音検出のための特
別な演奏を行わなくても通常の演奏状態で発生する演奏
データに基づいて和音を正確に検出することができると
いう効果がある。
According to the present invention, there is an effect that a chord can be accurately detected based on performance data generated in a normal performance state without performing a special performance for detecting the chord.

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

【図1】 図5のタイマ割込み処理における押鍵状態検
出処理の詳細を示す図である。
FIG. 1 is a diagram showing details of key-depression state detection processing in the timer interrupt processing of FIG.

【図2】 この発明に係る和音検出機能を有する電子楽
器のハード構成を示すブロック図である。
FIG. 2 is a block diagram showing a hardware configuration of an electronic musical instrument having a chord detection function according to the present invention.

【図3】 マイクロコンピュータが処理するメインルー
チンの一例を示す図である。
FIG. 3 is a diagram showing an example of a main routine processed by a microcomputer.

【図4】 鍵盤が操作される毎にマイクロコンピュータ
が処理する図3のキーイベント処理の一例を示す図であ
る。
FIG. 4 is a diagram showing an example of the key event process of FIG. 3, which is processed by the microcomputer every time the keyboard is operated.

【図5】 1小節当たり96回の割り込みで実行される
タイマ割込み処理の詳細を示す図である。
FIG. 5 is a diagram showing details of timer interrupt processing executed by interrupting 96 times per bar.

【図6】 図5のタイマ割り込み処理によって実行され
る和音検出処理やレガート処理の動作を説明するための
図である。
FIG. 6 is a diagram for explaining operations of chord detection processing and legato processing executed by the timer interrupt processing of FIG.

【図7】 図5のタイマ割込み処理におけるパート分割
処理の詳細を示す図である。
7 is a diagram showing details of part division processing in the timer interrupt processing of FIG.

【図8】 図5のタイマ割込み処理における和音検出処
理の詳細を示す図である。
FIG. 8 is a diagram showing details of chord detection processing in the timer interrupt processing of FIG.

【図9】 図5のタイマ割込み処理におけるレガート処
理の詳細を示す図である。
9 is a diagram showing details of legato processing in the timer interrupt processing of FIG.

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

21…CPU、22…プログラムメモリ、23…ワーキ
ングメモリ、24…自動伴奏装置、25…押鍵検出回
路、26…スイッチ検出回路、27音源回路、28…鍵
盤、29…パネルスイッチ、2A…サウンドシステム、
2B…タイマ、2C…データ及びアドレスバス
21 ... CPU, 22 ... Program memory, 23 ... Working memory, 24 ... Automatic accompaniment device, 25 ... Key detection circuit, 26 ... Switch detection circuit, 27 tone generator circuit, 28 ... Keyboard, 29 ... Panel switch, 2A ... Sound system ,
2B ... timer, 2C ... data and address bus

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 演奏に対応した演奏データを入力する入
力手段と、 自動伴奏の所定の音符長に従った拍タイミング毎、及び
この拍タイミングの近傍であり、拍タイミングから所定
時間だけ離れたタイミング毎に、前記演奏データに基づ
いて和音を検出する和音検出手段とを具えたことを特徴
とする電子楽器。
1. Input means for inputting performance data corresponding to a performance, each beat timing according to a predetermined note length of an automatic accompaniment, and a timing near the beat timing and separated from the beat timing by a predetermined time. An electronic musical instrument characterized by comprising chord detection means for detecting a chord based on the performance data.
JP5234235A 1993-07-07 1993-08-26 Electronic musical instrument Expired - Fee Related JP2768233B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP5234235A JP2768233B2 (en) 1993-08-26 1993-08-26 Electronic musical instrument
US08/270,457 US5641928A (en) 1993-07-07 1994-07-05 Musical instrument having a chord detecting function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5234235A JP2768233B2 (en) 1993-08-26 1993-08-26 Electronic musical instrument

Publications (2)

Publication Number Publication Date
JPH0764561A true JPH0764561A (en) 1995-03-10
JP2768233B2 JP2768233B2 (en) 1998-06-25

Family

ID=16967814

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5234235A Expired - Fee Related JP2768233B2 (en) 1993-07-07 1993-08-26 Electronic musical instrument

Country Status (1)

Country Link
JP (1) JP2768233B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012022095A (en) * 2010-07-13 2012-02-02 Yamaha Corp Electronic musical instrument
JP2012098481A (en) * 2010-11-01 2012-05-24 Yamaha Corp Chord detection device and program
JP2012098480A (en) * 2010-11-01 2012-05-24 Yamaha Corp Chord detection device and program
JP2012189941A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method
JP2012189942A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method
JP2012189943A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01177089A (en) * 1987-12-29 1989-07-13 Yamaha Corp Automatic accompanying device
JPH05108072A (en) * 1991-10-16 1993-04-30 Casio Comput Co Ltd Automatic accompaniment device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01177089A (en) * 1987-12-29 1989-07-13 Yamaha Corp Automatic accompanying device
JPH05108072A (en) * 1991-10-16 1993-04-30 Casio Comput Co Ltd Automatic accompaniment device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012022095A (en) * 2010-07-13 2012-02-02 Yamaha Corp Electronic musical instrument
JP2012098481A (en) * 2010-11-01 2012-05-24 Yamaha Corp Chord detection device and program
JP2012098480A (en) * 2010-11-01 2012-05-24 Yamaha Corp Chord detection device and program
JP2012189941A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method
JP2012189942A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method
JP2012189943A (en) * 2011-03-14 2012-10-04 Yamaha Corp Chord detection device and program for realizing chord detection method

Also Published As

Publication number Publication date
JP2768233B2 (en) 1998-06-25

Similar Documents

Publication Publication Date Title
JP2562370B2 (en) Automatic accompaniment device
JPH079586B2 (en) Automatic musical instrument accompaniment device
JPH0651761A (en) Automatic playing device
JPH0634170B2 (en) Automatic musical instrument accompaniment device
JPH0584920B2 (en)
JP2768233B2 (en) Electronic musical instrument
US5641928A (en) Musical instrument having a chord detecting function
JPH04274497A (en) Automatic accompaniment player
JPH0769698B2 (en) Automatic accompaniment device
US5418326A (en) Automatic accompaniment instrument for automatically performing an accompaniment that is based on a chord progression formed by a sequence of chords
JP2998527B2 (en) Automatic accompaniment device
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP2943560B2 (en) Automatic performance device
US5159142A (en) Electronic musical instrument with lone modification for polyphonic effect
US5541355A (en) Electronic musical instrument having an automatic peformance function
JPH05273971A (en) Electronic musical instrument
JP2570562B2 (en) Automatic performance device and automatic accompaniment device
JPH0631964B2 (en) Electronic musical instrument
JPH0464073B2 (en)
JP3033393B2 (en) Automatic accompaniment device
JP2629564B2 (en) Chord detector
JP3097382B2 (en) Chord detector
JP3055352B2 (en) Accompaniment pattern creation device
JP2619237B2 (en) Automatic accompaniment device for electronic musical instruments
JPH0758434B2 (en) Automatic accompaniment device

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090410

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090410

Year of fee payment: 11

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100410

Year of fee payment: 12

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110410

Year of fee payment: 13

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120410

Year of fee payment: 14

FPAY Renewal fee payment (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130410

Year of fee payment: 15

LAPS Cancellation because of no payment of annual fees