JP2625800B2 - Automatic performance device - Google Patents

Automatic performance device

Info

Publication number
JP2625800B2
JP2625800B2 JP63000267A JP26788A JP2625800B2 JP 2625800 B2 JP2625800 B2 JP 2625800B2 JP 63000267 A JP63000267 A JP 63000267A JP 26788 A JP26788 A JP 26788A JP 2625800 B2 JP2625800 B2 JP 2625800B2
Authority
JP
Japan
Prior art keywords
data
key
performance
rhythm
tone
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP63000267A
Other languages
Japanese (ja)
Other versions
JPH01179086A (en
Inventor
公太郎 水野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 JP63000267A priority Critical patent/JP2625800B2/en
Publication of JPH01179086A publication Critical patent/JPH01179086A/en
Application granted granted Critical
Publication of JP2625800B2 publication Critical patent/JP2625800B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 以下の順序でこの発明を説明する。DETAILED DESCRIPTION OF THE INVENTION The present invention will be described in the following order.

産業上の利用分野 従来の技術 発明が解決しようとする課題点 問題点を解決するための手段 作用 効果 実施例 第2図の電子楽器の構成説明 第2図の電子楽器の動作説明 (1)通常演奏モード (2)自動演奏記憶モード (3)自動演奏再生モード 他の実施例 [産業上の利用分野] この発明は、メモリに記憶した演奏データに基づいて
自動演奏を行なう自動演奏装置に関し、特に演奏データ
を楽音の発生状態の変化を示すイベントデータの形で記
憶するとともに、再生(自動演奏)時、楽音の発生終了
のデータを自動的に作成することにより、演奏データメ
モリの楽音発生終了データの書込みを省略してメモリ容
量を減少することを可能とし、また、演奏データ記録時
の演奏状態によらない滑らかな自動演奏を可能とした自
動演奏装置に関する。
BACKGROUND OF THE INVENTION Problems to be Solved by the Invention Means for Solving Problems Actions and Effects Example Description of Configuration of Electronic Musical Instrument in FIG. 2 Description of Operation of Electronic Musical Instrument in FIG. 2 (1) Normal Performance mode (2) Automatic performance storage mode (3) Automatic performance playback mode Other embodiments [Industrial application field] The present invention relates to an automatic performance device that performs an automatic performance based on performance data stored in a memory. The performance data is stored in the form of event data indicating a change in the state of generation of musical tones, and data for the end of generation of musical tones is automatically created at the time of reproduction (automatic performance). And an automatic performance device that can reduce the memory capacity by omitting the writing of data, and also enable smooth automatic performance regardless of the performance state when performance data is recorded. That.

[従来の技術] 従来の自動演奏装置として、鍵盤およびパネル操作子
の操作状態の変化を検出し、その変化の内容(操作され
た鍵または操作子の種類および押離鍵の別等)およびタ
イミングを記録し、再生時は所定のテンポで上記タイミ
ングに従って上記変化内容の信号を読み出して元の操作
状態を再生するものが知られている(特開昭58−211191
号公報参照)。このような装置は、例えば1つの鍵操作
に対して押鍵(キーオン)と離鍵(キーオフ)というよ
うに2種類のデータを記録すれば足り、従来の1秒間に
数十回乃至数百回のサンプリングデータの全てを記録す
る方式に比較すれば格段にデータ量を縮小しメモリ容量
を減少させることができる。
[Prior Art] As a conventional automatic performance device, a change in the operation state of a keyboard and a panel operator is detected, and the content of the change (the type of the operated key or the operator and the type of the pressed / released key) and the timing. And reproducing the original operation state by reading out the signal of the change content at a predetermined tempo according to the timing at the time of reproduction (Japanese Patent Laid-Open No. 58-211191).
Reference). In such a device, it is sufficient to record two types of data such as a key press (key on) and a key release (key off) for one key operation, for example, several tens to several hundreds times per second in the related art. In comparison with the method of recording all the sampling data, the data amount can be remarkably reduced and the memory capacity can be reduced.

[発明が解決しようとする課題点] しかしながら、このような自動演奏装置、特に普及形
のものにおいては、メモリ容量をさらに減少させること
が望まれている。
[Problems to be Solved by the Invention] However, in such an automatic performance device, particularly in a popular type, it is desired to further reduce the memory capacity.

また、このような自動演奏装置は、演奏者の鍵操作を
忠実に再現するため、初心者等にありがちな押鍵と押鍵
との間の離鍵時間が長いスタッカートのような弾き方も
そのまま再現されてしまうという不都合があった。
In addition, since such an automatic performance device faithfully reproduces the key operation of the performer, it reproduces the way of playing like a staccato, which is common for beginners etc., with a long key release time between key presses There was the inconvenience of being done.

この発明は、このような従来形における問題点に鑑
み、楽曲の進行に従って演奏データメモリから読み出さ
れる楽音の発生状態の変化を示すイベントデータに基づ
いて楽音を発生する自動演奏装置において、上記演奏デ
ータ量を圧縮してメモリ容量の節約を図ること、および
データを補正して音楽的により好ましい自動演奏を行な
うことを目的とする。
SUMMARY OF THE INVENTION In view of the above-mentioned problems in the conventional type, the present invention relates to an automatic performance device that generates a musical tone based on event data indicating a change in a musical sound generation state read from a musical performance data memory as the music progresses. It is an object to reduce the amount of memory by compressing the amount and to correct the data to perform a musically preferable automatic performance.

[問題点を解決するための手段] 上記問題点を解決するため、この発明の第1の態様で
は、第1図に示すように、楽曲の進行に従って楽音の発
生を制御するための演奏データとして、楽音発生状態の
変化のタイミングと内容を表わすデータを記憶する演奏
データメモリ1と、該演奏データメモリ1に記憶されて
いる演奏データを楽曲の進行に従って順次読み出し、上
記タイミングデータに従って出力するとともに、新たな
楽音の発生を示す押鍵データを読み出したときは現在発
生中の楽音の終了を示す離鍵データを作成し上記押鍵デ
ータより所定時間先行して出力する読出制御手段2とを
具備することを特徴としている。
[Means for Solving the Problems] In order to solve the above problems, in the first embodiment of the present invention, as shown in FIG. A performance data memory 1 for storing data representing the timing and content of a change in musical tone generation state; and performance data stored in the performance data memory 1 sequentially read out as the music progresses, and output in accordance with the timing data. When the key press data indicating the generation of a new musical tone is read out, there is provided read control means 2 for generating key release data indicating the end of the musical tone currently being generated and outputting the key release data a predetermined time earlier than the key press data. It is characterized by:

また、この発明の第2の態様では、さらに、上記演奏
データメモリ1に演奏データを書き込む手段として、鍵
データ入力手段3と、該鍵データ入力手段3から入力さ
れる押鍵および離鍵データのうち離鍵データを省略して
押鍵データのみを上記演奏データメモリに書き込む書込
制御手段4とを付加している。
Further, in the second aspect of the present invention, as means for writing performance data to the performance data memory 1, key data input means 3 and key press and key release data input from the key data input means 3 are stored. A write control means 4 for omitting the key release data and writing only the key press data in the performance data memory is added.

[作用] 上述のように構成したこの発明の第1の態様において
は、読出制御手段2により演奏データメモリ1から楽曲
の進行に従って演奏データが順次読み出され、新たな楽
音発生状態データがタイミングデータに従って出力され
るとともに、例えば新たに発音開始すべき楽音を示す押
鍵データが読み出されたときは先ず現在発音中の楽音の
発音終了を示す離鍵データが出力され、次いで、新たに
発音すべき楽音の押鍵データが上記タイミングデータに
従って出力される。
[Operation] In the first aspect of the present invention configured as described above, performance data is sequentially read from the performance data memory 1 by the read control unit 2 in accordance with the progress of the music, and new musical tone generation state data is converted to timing data. For example, when key press data indicating a tone to be newly started to be read is read out, key release data indicating the end of tone generation of the tone currently being sounded is output, and then a new tone is generated. Key press data of a power tone should be output according to the timing data.

この読出制御手段から出力された押鍵および離鍵デー
タ等の楽音発生状態データは、図示しない従来のものと
同様の楽音発生手段に入力され、この楽音発生手段にお
いてこれらの入力データに基づく楽音が発生される。
The tone generation state data such as key press and key release data output from the readout control means is input to a similar tone generation means (not shown) similar to the conventional one, and the tone generation means generates a tone based on these input data. Generated.

このような自動演奏装置において、演奏データメモリ
は上記押鍵および離鍵データのうち押鍵データのみを記
憶すれば足りる。
In such an automatic performance device, it is sufficient that the performance data memory stores only the key press data of the key press and key release data.

この発明の第2の態様において、書込制御手段は、演
奏データメモリへの記録時、鍵盤や音声入力装置等の鍵
データ入力手段から入力される押鍵および離鍵データの
うち離鍵データを無視または省略して押鍵データのみを
演奏データメモリに書き込む。このようにして演奏デー
タメモリに書き込まれた演奏データは、読出制御手段に
おいて、上記第1の態様におけると同様に、離鍵データ
を付加して出力される。
In the second aspect of the present invention, the writing control means, during recording in the performance data memory, outputs key release data of key press and key release data input from key data input means such as a keyboard or a voice input device. Ignore or omit and write only the key press data to the performance data memory. The performance data written in the performance data memory in this manner is output by the readout control means with key release data added thereto, as in the first embodiment.

[効果] 上記作用説明からも理解できる通り、この発明によれ
ば、演奏データメモリに書き込まれるデータは、押鍵お
よび離鍵データのうち押鍵データのみで足りるので、鍵
データを約半分にしてデータの圧縮またはメモリの節約
を図ることができる。すなわち、同じメモリ容量ならデ
ータ量がほぼ倍の曲を記憶することができ、同じ曲なら
ほぼ半分のメモリ容量でよい。
[Effect] As can be understood from the above description of the operation, according to the present invention, the data written to the performance data memory is only the key pressed data of the key pressed and released data, so that the key data is reduced to about half. Data compression or memory saving can be achieved. In other words, if the memory size is the same, a song whose data amount is almost double can be stored, and if the song is the same, the memory capacity is almost half.

また、離鍵データを次の押鍵データに基づいて作成す
るので、例えばスタッカートのような押鍵(キーオン)
と押鍵との間の離鍵(キーオフ)時間が長い弾き方であ
っても一様にレガートのような、なめらかな演奏入力、
またはあたかも押鍵時間をきちんと守って演奏入力をし
たかのように補正され、初心者が演奏入力しても熟練者
が演奏するような自動演奏音を発生することができる。
Also, since the key release data is created based on the next key press data, for example, a key press such as a staccato (key on)
Even when playing with a long key release (key-off) time between a key press and a key press, a smooth performance input, such as legato,
Or, it is corrected as if the performance input was performed with the key press time kept properly, and an automatic performance sound can be generated as if a beginner played the performance even if a beginner input.

[実施例] 以下、図面によりこの発明の実施例を説明する。第2
図は、この発明の一実施例に係る自動演奏装置を備えた
電子楽器のブロック図を示す。
Hereinafter, embodiments of the present invention will be described with reference to the drawings. Second
FIG. 1 shows a block diagram of an electronic musical instrument provided with an automatic performance device according to one embodiment of the present invention.

この電子楽器は、鍵盤10およびパネル20を備えてい
る。鍵盤10は、楽音を指定する複数の鍵からなり、各鍵
の押離鍵は、鍵スイッチ回路10a内に各鍵に対応して設
けた複数の鍵スイッチの開閉成により検出されるように
なっている。この鍵スイッチ回路10aはバス30に接続さ
れている。
This electronic musical instrument includes a keyboard 10 and a panel 20. The keyboard 10 is composed of a plurality of keys for designating musical tones, and the depressed / released keys of each key are detected by opening and closing a plurality of key switches provided for each key in the key switch circuit 10a. ing. This key switch circuit 10a is connected to the bus 30.

操作パネル20には、第3図に示すように、オートリズ
ムのスタートおよびストップを各々指示するためのリズ
ムスタート操作子21aおよびリズムストップ操作子21b
と、マーチ、ワルツ等のリズム種類を選択するリズム選
択操作子群22と、オートリズムのテンポを各々上昇させ
および下降させるアップ操作子23aおよびダウン操作子2
3bと、自動演奏データの記録開始および再生開始を指示
するための自動演奏書込操作子24aおよび自動演奏読出
操作子24bと、楽音の音色および効果の付与を各々指示
する音色操作子群25aおよび効果操作子群25bと、表示器
26とが配設されている。これらの操作子群の操作は操作
子スイッチ回路20a内に各操作子に対応して設けた複数
の操作子スイッチにより検出されるようになっており、
表示器26は表示制御回路20bにより表示制御御れれよう
になっている。これらの操作子スイッチ回路20aおよび
表示制御回路20bはバス30に接続されている。
As shown in FIG. 3, the operation panel 20 includes a rhythm start operator 21a and a rhythm stop operator 21b for instructing start and stop of the auto rhythm, respectively.
A rhythm selection operator group 22 for selecting a rhythm type such as march, waltz, etc .; an up operator 23a and a down operator 2 for respectively increasing and decreasing the tempo of the auto rhythm.
3b, an automatic performance writing operator 24a and an automatic performance reading operator 24b for instructing a start of recording and reproduction of automatic performance data, and a timbre operator group 25a for instructing the application of a tone and an effect of a musical tone, respectively. Effect controls 25b and display
26 are arranged. The operation of these operator groups is detected by a plurality of operator switches provided for the respective operators in the operator switch circuit 20a.
The display 26 is controlled by a display control circuit 20b. The operator switch circuit 20a and the display control circuit 20b are connected to the bus 30.

さらに、バス30には、テンポ発振器40、リズム音信号
発生回路51、鍵盤用楽音信号発生回路52、自動演奏用楽
音信号発生回路53、データ記憶回路60およびマイクロコ
ンピュータ70が接続されている。テンポ発振器40は設定
されたテンポに従ってリズムインタラプト信号としての
テンポクロック信号をバス30を介してマイクロコンピュ
ータ70に出力する。リズム音信号発生回路51は、シンバ
ル、バスドラム等の打楽器に対応した打楽器音信号を形
成する複数の打楽器音信号形成回路を有し、マイクロコ
ンピュータ70からバス30を介して供給されるリズムパタ
ーンデータに応じて前記打楽器音信号を形成出力する。
鍵盤用楽音信号発生回路52および自動演奏用楽音信号発
生回路53は、各々ピアノ、バイオリン等の楽器に対応し
た楽音信号を形成する複数の楽音信号形成チャンネルを
備えており、鍵盤用楽音信号発生回路52は鍵盤10におけ
る押離鍵、音色操作子群25aの操作および効果操作子群2
5bの操作に応じて、マイクロコンピュータ70からバス30
を介して供給される自動演奏データに基づく楽音信号を
形成出力する。また、自動演奏用楽音信号発生回路53
は、データ記憶回路60に記憶されていてマイクロコンピ
ュータ70により読出されかつバス30を介して供給される
自動演奏データに基づく楽音信号を形成出力する。これ
らのリズム音信号発生回路51、鍵盤用楽音信号発生回路
52および自動演奏用楽音信号発生回路53からの楽音信号
は混合されてアンプ54に供給されるようになっている。
アンプ54の出力はスピーカ55に接続されており、同スピ
ーカ55はアンプ54から供給される楽音信号に対応した楽
音を発音する。
Further, the bus 30 is connected to a tempo oscillator 40, a rhythm sound signal generation circuit 51, a keyboard tone signal generation circuit 52, an automatic performance tone signal generation circuit 53, a data storage circuit 60, and a microcomputer 70. The tempo oscillator 40 outputs a tempo clock signal as a rhythm interrupt signal to the microcomputer 70 via the bus 30 according to the set tempo. The rhythm sound signal generation circuit 51 has a plurality of percussion sound signal formation circuits for forming percussion sound signals corresponding to percussion instruments such as cymbals and bass drums, and rhythm pattern data supplied from the microcomputer 70 via the bus 30. The percussion instrument sound signal is formed and output according to.
The keyboard tone signal generating circuit 52 and the automatic tone signal generating circuit 53 each include a plurality of tone signal forming channels for forming tone signals corresponding to musical instruments such as a piano and a violin. Reference numeral 52 denotes a key press / release key on the keyboard 10, operation of the tone operator group 25a, and effect operator group 2
5b, according to the operation of the microcomputer 70 to the bus 30
And outputs a tone signal based on the automatic performance data supplied via the. Also, a tone signal generating circuit 53 for automatic performance is provided.
Forms and outputs a tone signal based on the automatic performance data stored in the data storage circuit 60, read out by the microcomputer 70, and supplied via the bus 30. These rhythm sound signal generation circuits 51 and tone signal generation circuits for keyboards
The tone signals from the tone signal generating circuit 52 and the tone signal generating circuit 53 for automatic performance are mixed and supplied to the amplifier 54.
The output of the amplifier 54 is connected to a speaker 55, and the speaker 55 emits a tone corresponding to the tone signal supplied from the amplifier 54.

データ記憶回路60は、バス30に各々接続されたリズム
パターンデータメモリ61、演奏データメモリ62およびバ
ッファメモリ63からなる。リズムパターンデータメモリ
61は、ROMで構成されており、リズム音信号発生回路51
における各打楽器音信号の形成出力を指示するリズムパ
ターンデータをリズム種類毎に1小節長に渡って時系列
的に記憶している。演奏データメモリ62は、RAMで構成
され、第12図および第14図に示すような後述するアドレ
スADRによりアドレス指定される多数の記憶位置APM(AD
R)を有する。各記憶位置APM(ADR)には、次のような
各種自動演奏用データが第4図に示すようなデータフォ
ーマットで記憶されるようになっている。終了コードを
除く各データの上位2ビットはデータの種別を示す識別
マークである。
The data storage circuit 60 includes a rhythm pattern data memory 61, a performance data memory 62, and a buffer memory 63 connected to the bus 30, respectively. Rhythm pattern data memory
Reference numeral 61 denotes a ROM, and a rhythm sound signal generation circuit 51.
The rhythm pattern data instructing the formation and output of each percussion instrument sound signal in is stored in time series over one bar length for each rhythm type. The performance data memory 62 is composed of a RAM, and has a large number of storage locations APM (ADs) addressed by addresses ADR described later as shown in FIGS.
R). At each storage location APM (ADR), the following various data for automatic performance is stored in a data format as shown in FIG. The upper two bits of each data excluding the end code are identification marks indicating the type of data.

タイミングデータ……タイミングデータであることを
示す識別マークと、小節の頭からの経過時間を表す時間
データとからなる。この時間データとしては後述するテ
ンポカウンタTCNTの計数値(以上、テンポカウンタ値と
いう)TCNTに相当するデータが書き込まれる。
Timing data: An identification mark indicating the timing data, and time data indicating the elapsed time from the beginning of the bar. As this time data, data corresponding to a count value of a tempo counter TCNT (to be referred to as a tempo counter value hereinafter) TCNT described later is written.

押鍵データ……鍵盤10における押鍵イベントデータで
あることを示す識別マークと、押鍵された鍵を表すキー
コードKCとからなる。
Key press data... The key press data is composed of an identification mark indicating key press event data on the keyboard 10 and a key code KC representing a key pressed.

離鍵データ……鍵盤10における離鍵イベントデータで
あることを示す識別マークと、離鍵された鍵を表すキー
コードKCとからなる。
Key release data... The key release data is composed of an identification mark indicating that the data is key release event data on the keyboard 10 and a key code KC representing a key that has been released.

音色等データ……音色操作子群25aまたは効果操作子
群25bにより各々更新された音色データまたは効果デー
タであることを示す識別マークと、該更新された音色ま
たは効果名を表す音色・効果名データとからなる。
Data such as timbre, etc. An identification mark indicating that the data is timbre data or effect data updated by the timbre operator group 25a or the effect operator group 25b, and timbre / effect name data representing the updated timbre or effect name Consists of

小節コード……自動演奏の進行タイミングが小節の頭
に対応したタイミングであることを示し、識別マークが
タイミングデータに等しく、かつ時間データが小節エン
ドを示すタイミングデータのものに等しいデータであ
る。
Measure code: Indicates that the progress timing of the automatic performance is the timing corresponding to the beginning of the measure, the identification mark is equal to the timing data, and the time data is equal to the timing data indicating the end of the measure.

終了コード……自動演奏の終了タイミングであること
を示す。
End code: Indicates the end timing of the automatic performance.

バッファメモリ63は、RAMで構成され、イベントバッ
ファレジスタIVTBUF、キーバッファレジスタKEYBUFおよ
びアドレスバッファレジスタADRBUFの各バッファレジス
タが設けられている。イベントバッファレジスタIVTBUF
は、後述の自動演奏記録モード時、鍵盤10およびパネル
20の操作に応じて検出されるイベントデータを一時記憶
するためのもので、第12図に示すような後述するアドレ
スADR(I)によりアドレス指定される複数の記憶位置I
VTBUF(ADR)を有する。キーバッファレジスタKEYBUF
は、後述の自動演奏生モード時、演奏データメモリ62か
ら読み出される押鍵データを一時記憶するためのもの
で、第14図に示すような後述するアドレスADR(KEY)に
よりアドレス指定される複数の記憶位置KEYBUF(ADR)
を有する。アドレスバッファレジスタADRBUFは、演奏デ
ータメモリ62の記憶位置APM(ADR)指定用のアドレスデ
ータADRを一時退避するためのものである。
The buffer memory 63 is composed of a RAM, and is provided with buffer registers of an event buffer register IVTBUF, a key buffer register KEYBUF, and an address buffer register ADRBUF. Event buffer register IVTBUF
Indicates the keyboard 10 and panel
This is for temporarily storing event data detected in response to the operation 20. A plurality of storage locations I designated by an address ADR (I) described later as shown in FIG.
Has VTBUF (ADR). Key buffer register KEYBUF
Is for temporarily storing key press data read out from the performance data memory 62 in the automatic performance live mode described later, and a plurality of keys designated by an address ADR (KEY) described later as shown in FIG. Memory location KEYBUF (ADR)
Having. The address buffer register ADRBUF is for temporarily saving the address data ADR for designating the storage location APM (ADR) of the performance data memory 62.

マイクロコンピュータ70は、バス30に各々接続された
プログラムメモリ71、CPU72およびワーキングメモリ73
からなる。プログラムメモリ71は、ROMで構成され、第
5図乃至第11図に示すフローチャートに対応したメイン
プログラム、リズムインタラプトプログラムおよびそれ
らのサブプログラムを記憶している。CPU72は、電源ス
イッチ(図示しない)の投入によりメインプログラムの
実行を開始するとともに同プログラムを電源スイッチの
開成まで繰返し実行し、テンポ発振器40からのテンポク
ロック信号の到来時には前記メインプログラムの実行を
中断してリズムインタラプトプログラムを割込み実行す
る。ワーキングメモリ73は、RAMで構成され、前記プロ
グラムの実行に必要な複数のデータおよびフラグを一時
的に記憶する。これらのデータおよびフラグのうち、主
なものを列挙すると次の通りである。
The microcomputer 70 includes a program memory 71, a CPU 72, and a working memory 73 connected to the bus 30 respectively.
Consists of The program memory 71 is composed of a ROM, and stores a main program, a rhythm interrupt program, and their sub-programs corresponding to the flowcharts shown in FIGS. The CPU 72 starts execution of the main program by turning on a power switch (not shown), and repeatedly executes the program until the power switch is opened, and interrupts the execution of the main program when a tempo clock signal from the tempo oscillator 40 arrives. Interrupts the rhythm interrupt program. The working memory 73 is constituted by a RAM, and temporarily stores a plurality of data and flags necessary for executing the program. Among these data and flags, the main ones are as follows.

リズムランフラグRUN……オートリズムの動作状態を
表すフラグであり、“1"にて動作中を表し、かつ“0"に
て停止中を表す。
Rhythm run flag RUN: This flag indicates the operation state of the auto rhythm. "1" indicates that the rhythm is running, and "0" indicates that the rhythm is stopped.

オートプレイライトフラグAPW……自動演奏の作動状
態を表すフラグであり、“1"にて自動演奏用データを演
奏データメモリ62に書込中(記憶モード)であることを
表し、かつ“0"にて前記記録モード中でないことを表
す。
Auto play light flag APW... This flag indicates the operating state of the automatic performance. "1" indicates that automatic performance data is being written to the performance data memory 62 (memory mode), and "0". Indicates that the recording mode is not being performed.

オートプレイリードフラグAPR……自動演奏の作動状
態を表すフラグであり、“1"にて自動演奏用データを演
奏データメモリ62から読出中(再生モード)であること
を表し、かつ“0"にて前記再生モード中でないことを表
す。
Auto play read flag APR: A flag indicating an operation state of the automatic performance. "1" indicates that automatic performance data is being read from the performance data memory 62 (reproduction mode), and is set to "0". Indicates that the playback mode is not being performed.

テンポカウントTCNT……テンポ発振器40がテンポクロ
ック信号を発生する毎に、「1」ずつ歩進するカウント
値であって、オートリズムの1小節内における進行位置
を表す。
Tempo count TCNT... Each time the tempo oscillator 40 generates a tempo clock signal, the count value increments by “1” and indicates the progress position within one bar of the auto rhythm.

アドレスADR……演奏データメモリ62のアドレスを表
す。
Address ADR... Represents the address of the performance data memory 62.

アドレスADR(I)……イベントバッファレジスタの
アドレスを表す。
Address ADR (I)... Represents the address of the event buffer register.

アドレスADR(KEY)……キーバッファレジスタのアド
レスを表す。
Address ADR (KEY) ... Indicates the address of the key buffer register.

押鍵データ数レジスタSUM1……同時に発生したイベン
トデータのうち既に取出処理された押鍵データ数を表
す。
Key press data number register SUM1... Indicates the number of key press data that has already been extracted from the event data generated at the same time.

リードデータRDDT……演奏データメモリ62から読み出
した自動演奏用データを表す。
Read data RDDT... Represents the automatic performance data read from the performance data memory 62.

リードタイミングデータRDTIM……演奏データメモリ6
2から読み出した自動演奏用データ中、特にタイミング
データのみを表す。
Read timing data RDTIM-Performance data memory 6
Of the automatic performance data read out from 2, only the timing data is particularly shown.

次に、上記のように構成した実施例の動作を、(1)
鍵盤10における押離鍵および操作パネル20の操作に応じ
て単に楽音を発生する通常演奏モード、(2)鍵盤10に
おける押離鍵および操作パネル20の操作に基づくデータ
を自動演奏用データとして演奏データメモリ62に書き込
む自動演奏記録モード、(3)演奏データメモリ62内の
自動演奏用データを読み出して、該読み出した自動演奏
用データに基づき楽音を発生する自動演奏再生モードに
分けて、第5図乃至第11図のフローチャートを参照しな
がら説明する。
Next, the operation of the embodiment configured as described above will be described in (1)
A normal performance mode in which a tone is simply generated in response to a key press and release on the keyboard 10 and an operation on the operation panel 20; (2) performance data as data for automatic performance using data based on the key press and release on the keyboard 10 and operation of the operation panel FIG. 5 shows an automatic performance recording mode for writing to the memory 62, and (3) an automatic performance reproducing mode for reading out the automatic performance data in the performance data memory 62 and generating musical tones based on the read out automatic performance data. This will be described with reference to the flowcharts of FIGS.

(1)通常演奏モード 電源スイッチ(図示しない)が投入されると、CPU72
は第5図のステップ100にてメインプログラムの実行を
開始し、ステップ101にてワーキングメモリ73内の各レ
ジスタをクリアすることにより、マイクロコンピュータ
70を初期状態に設定する。この初期設定後、CPU72はス
テップ102にて鍵スイッチ回路10a内の各鍵スイッチをス
キャンすることにより、鍵盤10に関する押離鍵情報およ
び操作パネル20に関する各操作子の操作情報をバス30を
介して読み込み、ステップ103にて該読み込んだ押離鍵
情報および操作情報に基づきバッファレジスタメモリ63
およびワーキングメモリ73との協働により鍵盤10におけ
る押離鍵イベントまたは操作パネル20における操作イベ
ントの有無を検出する。今、鍵盤10においていずれの鍵
も押離鍵されず、かつ操作パネル20においていずれの操
作子も操作されなければ、CPU72はステップ103にて、
「NO」すなわちイベント無しと判定して、プログラムを
ステップ102に戻し、ステップ102,103からなる循環処理
を実行し続ける。
(1) Normal performance mode When a power switch (not shown) is turned on, the CPU 72
Starts the execution of the main program in step 100 of FIG. 5, and clears the registers in the working memory 73 in step 101, whereby the microcomputer
Set 70 to the initial state. After this initial setting, the CPU 72 scans each key switch in the key switch circuit 10a in step 102, thereby transmitting key press / release information on the keyboard 10 and operation information of each operator on the operation panel 20 via the bus 30. In step 103, the buffer register memory 63 is read based on the read and released key information and operation information.
In cooperation with the working memory 73, the presence / absence of a key press / release event on the keyboard 10 or an operation event on the operation panel 20 is detected. If no key is depressed or released on the keyboard 10 and no operator is operated on the operation panel 20, the CPU 72 proceeds to step 103.
"NO", that is, it is determined that there is no event, the program returns to step 102, and the cyclic processing including steps 102 and 103 is continuously executed.

また、鍵盤10においていずれかの鍵が押離鍵され、ま
たは操作パネル20においていずれかの操作子が操作され
ると、CPU72は上記ステップ103にて「YES」すなわちイ
ベント有りと判定し、プログラムを該イベントの種類を
判定するステップ104の処理に進める。かかる場合、通
常演奏モードにおいては、操作パネル20上の各種操作子
群のうち自動演奏書込操作子24aおよび自動演奏読出操
作子24bが操作されることはないので、これらの操作子
が操作された場合については後述するとして、それら以
外の鍵盤10の各鍵、リズムスタート操作子21、リズムス
トップ操作子21b、リズム選択操作子群22、アップ操作
子23a、ダウン操作子23b、音色操作子群25aまたは効果
操作子群25bが操作された場合について説明する。
When any key is pressed or released on the keyboard 10 or any operation element is operated on the operation panel 20, the CPU 72 determines “YES”, that is, an event is present in the above-described step 103, and executes the program. The process proceeds to step 104 for determining the type of the event. In such a case, in the normal performance mode, since the automatic performance writing operation 24a and the automatic performance reading operation 24b of the various operation groups on the operation panel 20 are not operated, these operations are operated. As will be described later, each key of the keyboard 10, a rhythm start operator 21, a rhythm stop operator 21b, a rhythm selection operator group 22, an up operator 23a, a down operator 23b, and a tone operator group will be described later. The case where the operator 25a or the effect operator group 25b is operated will be described.

最初に、鍵盤10の各鍵、音色操作子群25aまたは効果
操作子群25bのいずれかが操作された場合について説明
する。この場合、CPU72は上記ステップ104の処理により
プログラムをステップ105に進め、ステップ105にて第6
図に詳細に示す鍵・音色イベントルーチンを実行する。
この鍵・音色イベントルーチンにおいては、ステップ20
0にてその実行が開始され、ステップ201にて操作された
鍵および操作子に関する全てのイベントデータがバッフ
ァレジスタメモリ63に設けたイベントバッファレジスタ
内に書き込まれる。ここでは、CPU72がステップ102,103
の循環処理を1回実行する間に検出されるイベントは同
時に発生したものとして扱い、イベントバッファレジス
タ内の前記各記憶位置IVTBUF(ADR)には、同時に発生
したキーイベント(押離鍵)は低音から順に書き込むよ
うになっている。そして、ステップ202にてこれらの全
てのイベントデータはバス30を介して鍵盤用楽音信号発
生回路52に出力され、さらにアドレスADR(I)がイベ
ントバッファレジスタ内の前記各記憶位置IVTBUF(AD
R)のうちイベントデータが記憶されている最大アドレ
ス、すなわち有効最高値にセットされる。鍵盤用楽音信
号発生回路52はこれらのイベントデータを取り込み記憶
すると同時に、該データに基づき楽音信号の発生を制御
する。この場合、該イベントデータが鍵盤10における押
鍵に関するものであれば、鍵盤用楽音信号発生回路52は
押鍵された鍵に対応した鍵音高周波数の楽音信号の形成
を開始して、該形成した楽音信号をアンプ54を介してス
ピーカ55に供給する。その結果、スピーカ55からは、鍵
盤10にて押鍵された鍵に対応した鍵音高周波数の楽音が
発音される。また、前記イベントデータが鍵盤10におけ
る離鍵に関するものであれば、鍵盤用楽音信号発生回路
52は前述のようにして今まで形成中であった離鍵された
鍵に関する楽音信号の形成出力を停止する。その結果、
スピーカ55からは、鍵盤10にて離鍵された鍵に関する楽
音が発音されなくなる。
First, a case will be described in which each key of the keyboard 10, one of the tone operator group 25a and the effect operator group 25b is operated. In this case, the CPU 72 advances the program to step 105 by the processing of step 104, and
The key / tone color event routine shown in detail in the figure is executed.
In this key / tone event routine, step 20
The execution is started at 0, and all the event data relating to the key and the operating element operated at step 201 are written in the event buffer register provided in the buffer register memory 63. Here, the CPU 72 performs steps 102 and 103
The event detected during one execution of the circulating process is regarded as occurring at the same time, and the key event (press / release key) occurring at the same time is stored in the storage location IVTBUF (ADR) in the event buffer register. Write in order from the beginning. Then, in step 202, all these event data are output to the keyboard tone signal generation circuit 52 via the bus 30, and the address ADR (I) is further stored in each of the storage locations IVTBUF (AD) in the event buffer register.
R) is set to the maximum address where event data is stored, that is, the effective maximum value. The keyboard tone signal generation circuit 52 captures and stores these event data and controls the generation of tone signals based on the data. In this case, if the event data is related to a key press on the keyboard 10, the keyboard tone signal generation circuit 52 starts forming a tone signal of a key tone high frequency corresponding to the depressed key, and The generated tone signal is supplied to the speaker 55 via the amplifier 54. As a result, a tone having a key tone high frequency corresponding to the key pressed on the keyboard 10 is generated from the speaker 55. If the event data is related to a key release on the keyboard 10, a keyboard tone signal generating circuit
52 stops the formation and output of the tone signal relating to the released key which has been being formed as described above. as a result,
From the speaker 55, a musical tone related to a key released from the keyboard 10 is not generated.

一方、上記のように鍵盤用楽音信号発生回路52に供給
されたイベントデータが音色操作子群25aまたは効果操
作子群25bに関するものであれば、同発生回路52は、該
供給されたイベントデータに基づき、操作された操作子
に応じて発生楽音信号の音色または同信号に対する効果
付与を制御する。その結果、発音される楽音の音色およ
び同楽音に対する効果付与が音色操作子群25aおよび効
果操作子群25bの操作に応じて制御されるようになる。
On the other hand, if the event data supplied to the keyboard tone signal generation circuit 52 as described above relates to the timbre operator group 25a or the effect operator group 25b, the generator circuit 52 Based on the operated operator, the tone color of the generated musical tone signal or the effect application to the signal is controlled. As a result, the tone color of the musical tone to be produced and the effect imparting to the musical tone are controlled according to the operation of the tone color operator group 25a and the effect operator group 25b.

上記ステップ202の処理後、CPU72はステップ203にて
オートプレイライトフラグAPWが“1"であるか否かを判
定する。かかる場合、当該電子楽器のモードは通常演奏
モードであって同フラグAPWは“0"であるので、ステッ
プ203にて「NO」と判定され、プログラムはステップ204
に進められる。CPU72はこのステップ204にて前記イベン
トバッファレジスタ内の全てのイベントデータをクリア
し、ステップ205にて鍵・音色イベントルーチンの実行
を終了して、プログラムを第5図のステップ102に戻
す。そして、CPU72は再び上記ステップ102,103からなる
循環処理を実行し、該循環処理中、鍵盤10における押離
鍵または音色操作子群25a、効果操作子群25bにおける操
作があると、上記ステップ104,105の処理により上述の
ようにして前記押離鍵または操作に応じて楽音の発生を
制御する。
After the process in step 202, the CPU 72 determines in step 203 whether the auto play write flag APW is “1”. In such a case, the mode of the electronic musical instrument is the normal performance mode, and the flag APW is “0”.
Proceed to The CPU 72 clears all event data in the event buffer register in step 204, terminates execution of the key / tone color event routine in step 205, and returns the program to step 102 in FIG. Then, the CPU 72 executes the circulation process consisting of the above steps 102 and 103 again.During the circulation process, if there is an operation of the key press / release key or the tone operator group 25a on the keyboard 10 and the effect operator group 25b, the processing of the above steps 104 and 105 is performed. As described above, the generation of a musical tone is controlled in accordance with the key press / release or the operation.

次に、リズム選択操作子群22、アップ操作子23aおよ
びダウン操作子23bのうちのいずれかが操作された場合
について説明する。この場合、CPU72は、上記ステップ1
02,103からなる循環処理中、ステップ103にて上記場合
と同様「YES」と判定してプログラムをステップ104に進
め、ステップ104の判定処理によりステップ106の処理を
実行する。このステップ106の処理では、操作された操
作子がリズム選択操作子群22に関するものであれば、ワ
ーキングメモリ73内に記憶されていてオートリズムおけ
るリズム種類を表わすリズム種類データが、操作された
操作子に応じて更新される。また、アップ操作子23aま
たはダウン操作子23bが操作された場合には、ワーキン
グメモリ73内に記憶されていてオートリズムのテンポを
制御するテンポ制御データが、前記操作子23a,23bの操
作時間に応じて更新されると同時に、該更新されたデー
タはバス30を介してテンポ発振器40に供給され、同発振
器40から出力されるテンポクロック信号の周波数が修正
される。このように、リズム選択操作子群22、アップ操
作子23aまたはダウン操作子23bが操作された場合には、
ステップ106の処理により、リズム種類およびリズムテ
ンポが前記操作子22,23a,23bの操作に応じて指定され
る。そして、上記ステップ106の処理後、CPU72はプログ
ラムを再びステップ102に戻し、ステップ102,103からな
る循環処理を続ける。
Next, a case where one of the rhythm selection operator group 22, the up operator 23a, and the down operator 23b is operated will be described. In this case, the CPU 72
During the circulating process consisting of 02 and 103, "YES" is determined in step 103 as in the above case, the program proceeds to step 104, and the process of step 106 is executed by the determination process of step 104. In the process of step 106, if the operated operator is related to the rhythm selection operator group 22, the rhythm type data stored in the working memory 73 and indicating the rhythm type in the auto rhythm is replaced by the operated operation Updated according to child. Further, when the up operator 23a or the down operator 23b is operated, the tempo control data stored in the working memory 73 and controlling the tempo of the auto rhythm is set to the operation time of the operators 23a and 23b. At the same time, the updated data is supplied to the tempo oscillator 40 via the bus 30, and the frequency of the tempo clock signal output from the oscillator 40 is corrected. Thus, when the rhythm selection operator group 22, the up operator 23a, or the down operator 23b is operated,
By the processing of step 106, the rhythm type and the rhythm tempo are specified according to the operation of the operators 22, 23a, and 23b. Then, after the processing in step 106, the CPU 72 returns the program to step 102 again, and continues the circulation processing including steps 102 and 103.

また、かかる循環処理中、リズムスタート操作子21が
操作されると、CPU72は上記と同様ステップ103にて「YE
S」と判定してプログラムをステップ104に進め、ステッ
プ104の判定処理によりステップ107の処理を実行する。
このステップ107の処理においては、リズムランフラグR
UNが“1"に設定されるとともにテンポカウントTCN7が
「0」に初期設定される。このステップ107の処理後、C
PU72は上記場合と同様プログラムをステップ102に戻し
て、ステップ102,103からなる循環処理を再び実行し続
ける。
Further, if the rhythm start operator 21 is operated during the circulation processing, the CPU 72 proceeds to step 103 in the same manner as described above.
After determining "S", the program proceeds to step 104, and the process of step 107 is executed by the determination process of step 104.
In the process of step 107, the rhythm run flag R
UN is set to “1” and the tempo count TCN7 is initialized to “0”. After the processing of this step 107, C
The PU 72 returns the program to step 102 in the same manner as described above, and continues to execute the circulation process including steps 102 and 103 again.

一方、かかる循環処理中、テンポ発振器40からテンポ
クロック信号が発生されると、CPU72は前記プログラム
の実行を中断して第10図のリズムインタラプトプログラ
ムの実行をステップ900から開始し、ステップ901にてリ
ズムランフラグRUNが“1"であるか否かを判定する。か
かる場合、リズムランフラグRUNは前述のステップ107
(第5図)の処理により“1"に設定されているので、前
記ステップ901の判定処理においては、「YES」と判定さ
れ、プログラムはステップ902に進められる。CPU72は、
ステップ902にて、リズムパターンメモリ61を参照し、
上述したようにリズム選択操作子群22の操作により設定
されたリズム種類データおよび上記ステップ107(第5
図)の処理により「0」に初期設定されたテンポカウン
トTCNTに基づき同メモリ61内に記憶されているリズムパ
ターンデータを読み出して該読出データをバス30を介し
てリズム音信号発生回路51に出力する。リズム音信号発
生回路51は前記供給されたリズムパターンデータにより
指定された打楽器音信号を形成し、該信号をアンプ54を
介してスピーカ55に供給する。その結果、スピーカ55か
らはリズムパターンデータに従った打楽器音が発音され
る。
On the other hand, when a tempo clock signal is generated from the tempo oscillator 40 during the circulating process, the CPU 72 suspends the execution of the program and starts executing the rhythm interrupt program of FIG. 10 from step 900. It is determined whether the rhythm run flag RUN is "1". In such a case, the rhythm run flag RUN is set in step 107 described above.
Since it has been set to "1" by the process of FIG. 5 ("YES") in the determination process of step 901, the program proceeds to step 902. CPU72,
In step 902, referring to the rhythm pattern memory 61,
As described above, the rhythm type data set by operating the rhythm selection operator group 22 and the above-described step 107 (fifth
The rhythm pattern data stored in the memory 61 is read out based on the tempo count TCNT initialized to “0” by the processing of FIG. 9 and the read out data is output to the rhythm sound signal generation circuit 51 via the bus 30. I do. The rhythm sound signal generation circuit 51 forms a percussion sound signal specified by the supplied rhythm pattern data, and supplies the signal to a speaker 55 via an amplifier 54. As a result, a percussion instrument sound is generated from the speaker 55 according to the rhythm pattern data.

上記ステップ902の処理後、CPU72はステップ903にて
オートプレイリードフラグAPRが“1"であるか否かを判
定する。かかる場合、当該電子楽器は通常演奏モードに
設定されていてオートプレイリードフラグAPRは“0"で
あるので、前記ステップ903の判定処理においては「N
O」と判定され、プログラムはステップ904に進められ
る。CPU72はこのステップ904にて演算TCNT=TCNT+1の
実行によりテンポカウントTCNTを「1」だけ歩進すなわ
ち「1」に設定して、ステップ905にて該歩進したテン
ポカウントTCNTが小節のエンド値を示すか否かを判定す
る。なお、本実施例においては、4拍子のテンポカウン
トTCNT値を0〜47、3拍子のテンポカウントTCNT値を0
〜35に設定してあり、ステップ904より前のステップに
おける小節エンドに対応する値はそれぞれ47および35で
あるが、ステップ904でテンポカウントTCNTを+1する
結果、ステップ905における小節エンドに対応する値は
それぞれ48および36となっている。今、テンポカウント
TCNTは「0」から「1」に変更された直後であって小節
エンド値を示していないので、前記ステップ905の判定
処理においては「NO」と判定され、プログラムはステッ
プ906に進められて、同ステップ906にてリズムインタラ
プトプログラムの実行が終了される。なお、上述のよう
にリズムスタート操作子21aの操作前であって、リズム
ランフラグRUNが“0"に設定されている状態でも、テン
ポ発振器40からテンポクロック信号が発生された場合に
は、このリズムインタラプトプログラムは実行される
が、かかる場合には上記ステップ901にて“0"に設定さ
れているリズムランフラグRUNに基づき「NO」と判定さ
れてプログラムは上記ステップ902を経ないで上記ステ
ップ906に進められるので、打楽器音が発音されること
はない。
After the processing in step 902, the CPU 72 determines in step 903 whether or not the auto play read flag APR is “1”. In this case, the electronic musical instrument is set to the normal performance mode, and the auto play read flag APR is “0”.
O is determined, and the program proceeds to step 904. In step 904, the CPU 72 sets the tempo count TCNT to “1” by executing the calculation TCNT = TCNT + 1, that is, sets the tempo count TCNT to “1”. Is determined. In this embodiment, the tempo count TCNT value for quadruple is set to 0 to 47, and the tempo count TCNT value for triple time is set to 0.
The value corresponding to the bar end in the step before step 904 is 47 and 35, respectively, but the value corresponding to the bar end in step 905 is obtained as a result of adding +1 to the tempo count TCNT in step 904. Are 48 and 36 respectively. Now the tempo count
Since TCNT is immediately after being changed from “0” to “1” and does not indicate a bar end value, it is determined to be “NO” in the determination processing of the step 905, and the program proceeds to step 906, In step 906, the execution of the rhythm interrupt program is terminated. As described above, even before the rhythm start operator 21a is operated and the rhythm run flag RUN is set to “0”, when the tempo oscillator 40 generates a tempo clock signal, The rhythm interrupt program is executed, but in such a case, it is determined to be “NO” based on the rhythm run flag RUN set to “0” in the above-mentioned step 901 and the program goes through the above-mentioned step 902 without going through the above-mentioned step 902. Since the process proceeds to 906, no percussion sound is emitted.

かかるリズムインタラプトプログラムの終了後、CPU7
2は上記中断したプログラムの実行に移る。そして、テ
ンポ発振器40からテンポクロック信号が発生される毎
に、リズムインタラプトプログラムの上記ステップ900
〜906の処理が実行されて、リズムパターンデータに基
づく打楽器音の自動発音が制御されるとともにテンポカ
ウントTCNTが順次「1」ずつ歩進される。このような動
作中、リズムスタート操作子21aの操作から1小節に対
応した時間が経過すると、リズムパターンデータメモリ
61に記憶されている1小節分のリズムパターンデータの
読み出しが終了すると同時に、テンポカウントTCNTが小
節エンドに対応した値、例えば「48」になる。このと
き、CPU72は、上記ステップ905の判定処理にて、前記テ
ンポカウントTCNTに基づき「YES」と判定し、ステップ9
07にて同テンポカウントTCNTを「0」に初期設定して、
プログラムをステップ908に進める。ステップ908におい
ては、オートプレイライトフラグAPWが“1"であるか否
かが判定されるが、この場合、当該電子楽器は通常演奏
モードにあって同フラグAPWは“0"であるので、CPU72は
同ステップ908にて「NO」と判定し、ステップ906にてこ
のリズムインタラプトプログラムの実行を終了する。こ
れにより、オートリズム演奏は再び小節の頭から実行さ
れるようになる。このようなオートリズム演奏により、
演奏者は、当該モードにおいて、所望の自動リズム演奏
とともに鍵盤10における演奏を行うことができる。
After completion of such a rhythm interrupt program, the CPU 7
Step 2 shifts to execution of the interrupted program. Each time the tempo oscillator 40 generates a tempo clock signal, the above-mentioned step 900 of the rhythm interrupt program is executed.
Steps 906 to 906 are executed to control the automatic sounding of the percussion instrument sound based on the rhythm pattern data, and to increment the tempo count TCNT sequentially by "1". During such an operation, when the time corresponding to one measure has elapsed from the operation of the rhythm start control 21a, the rhythm pattern data memory
At the same time when the reading of the rhythm pattern data for one bar stored in 61 is completed, the tempo count TCNT becomes a value corresponding to the bar end, for example, “48”. At this time, the CPU 72 determines “YES” based on the tempo count TCNT in the determination processing of step 905, and
Initialize the tempo count TCNT to “0” at 07,
The program proceeds to step 908. In step 908, it is determined whether or not the auto play light flag APW is "1". In this case, the electronic musical instrument is in the normal performance mode and the flag APW is "0". Determines "NO" in step 908, and terminates the execution of the rhythm interrupt program in step 906. As a result, the auto rhythm performance is executed again from the beginning of the bar. With such an auto rhythm performance,
In this mode, the player can perform a performance on the keyboard 10 together with a desired automatic rhythm performance.

かかる自動リズム演奏中、リズムストップ操作子21b
が操作されると、CPU72は、上記場合と同様にステップ1
02,103(第5図)からなる循環処理中、ステップ103に
て「YES」と判定し、ステップ104の判定処理によりプロ
グラムをステップ108に進め、ステップ108にて第7図に
詳細に示すリズムストップルーチンを実行する。このリ
ズムストップルーチンにおいては、ステップ300にてそ
の実行が開始され、ステップ301にてバッファレジスタ
メモリ63内のキーバッファKEYBUF(ADR)がクリアさ
れ、続くステップ302にてリズムランフラグRUNが“1"で
あるか否かが判定される。ステップ302では、上述のよ
うに“1"に設定されているリズムランフラグRUNに基づ
き「YES」と判定され、次のステップ303にて同フラグRU
Nが“0"に設定変更される。これにより、以降、テンポ
発振器40からテンポクロック信号が出力されてリズムイ
ンタラプトプログラム(第10図)が実行されても、上述
したように打楽器音は発音されず自動リズム演奏は停止
する。上記ステップ303の処理後、ステップ304,305にて
オートプレイライトフラグAPWおよびオートプレイリー
ドフラグAPRが“1"であるか否かが判定されるが、この
場合、当該電子楽器は通常演奏モードにあって両フラグ
APW,APRは共に“0"に設定されているので、前記両ステ
ップ304,305にて共に「NO」と判定され、ステップ305に
てこのリズムストップルーチンの実行が終了される。な
お、リズムストップ操作子21bが自動リズムの停止中す
なわちリズムランフラグRUNが“0"であるときに操作さ
れても、このリズムストップルーチンはステップ300か
ら実行開始されるが、この場合、ステップ302にて「N
O」と判定され、ステップ306にて同ルーチンの処理が終
了されるので、前記リズムストップ操作子21bの操作は
当該電子楽器の動作に何ら影響を及ぼさない。
During such automatic rhythm performance, the rhythm stop operator 21b
Is operated, the CPU 72 proceeds to step 1 as in the above case.
During the circulation process consisting of 02 and 103 (FIG. 5), "YES" is determined in step 103, the program proceeds to step 108 by the determination process in step 104, and the rhythm stop routine shown in detail in FIG. Execute In the rhythm stop routine, the execution is started in step 300, the key buffer KEYBUF (ADR) in the buffer register memory 63 is cleared in step 301, and the rhythm run flag RUN is set to "1" in the subsequent step 302. Is determined. In step 302, it is determined to be "YES" based on the rhythm run flag RUN set to "1" as described above, and in the next step 303, the flag RU
N is changed to “0”. Thus, even if a tempo clock signal is output from the tempo oscillator 40 and the rhythm interrupt program (FIG. 10) is executed thereafter, the percussion instrument sound is not emitted as described above, and the automatic rhythm performance is stopped. After the processing in step 303, it is determined in steps 304 and 305 whether the auto play write flag APW and the auto play read flag APR are "1". In this case, the electronic musical instrument is in the normal play mode. Both flags
Since APW and APR are both set to “0”, both the steps 304 and 305 are determined to be “NO”, and the execution of the rhythm stop routine is terminated in the step 305. Even if the rhythm stop operator 21b is operated while the automatic rhythm is stopped, that is, when the rhythm run flag RUN is "0", the rhythm stop routine is started from step 300. In this case, step 302 At "N
It is determined to be "O", and the process of the routine is ended in step 306, so that the operation of the rhythm stop operator 21b does not affect the operation of the electronic musical instrument at all.

(2)自動演奏記録モード 次に、自動演奏書込操作子24aの操作によって開始さ
れ、かつリズムストップ操作子21bの操作により停止さ
れる自動演奏記録モードについて説明する。
(2) Automatic performance recording mode Next, an automatic performance recording mode started by operating the automatic performance writing operator 24a and stopped by operating the rhythm stop operator 21b will be described.

上述したステップ102,103(第5図)からなる循環処
理中、自動演奏書込み操作子24aが操作されると、CPU72
はステップ103にて「YES」と判定し、ステップ104の判
定処理によりプログラムをステップ109に進め、ステッ
プ109にて第8図に詳細に示すオートプレイライトルー
チンを実行する。このオートプレイライトルーチンにお
いては、ステップ400にてその実行が開始され、ステッ
プ401にてオートプレイライトフラグAPWおよびリズムラ
ンフラグRUNが各々“1"に設定されるとともに、テンポ
カウントTCNTおよびアドレスADRが各々「0」に初期設
定される。このステップ401の処理後、プログラムはス
テップ404に進められ、同ステップ404にてこのオートプ
レイライトルーチンの実行を終了する。これにより、自
動演奏記録モードにおける初期設定が完了される。この
オートプレイライトルーチンの実行後、CPU72はプログ
ラムをステップ102(第5図)に進め、上記した場合と
同様のステップ102,103からなる循環処理を続ける。
During the circulation process consisting of steps 102 and 103 (FIG. 5), the CPU 72
Determines “YES” in step 103, advances the program to step 109 by the determination processing in step 104, and executes an auto play write routine shown in detail in FIG. 8 in step 109. In this auto play write routine, its execution is started at step 400, and at step 401, the auto play write flag APW and the rhythm run flag RUN are each set to “1”, and the tempo count TCNT and the address ADR are set. Each is initialized to “0”. After the processing of step 401, the program proceeds to step 404, where the execution of the auto play write routine ends. Thus, the initial setting in the automatic performance recording mode is completed. After the execution of the auto play write routine, the CPU 72 advances the program to step 102 (FIG. 5), and continues the circulating process including steps 102 and 103 similar to the above.

かかる状態では、リズムランフラグRUNが“1"に設定
されているので、テンポ発振器40からテンポクロック信
号が発生されると、上述したリズムインタラプトプログ
ラム(第10図)のステップ900〜906からなる処理が実行
されて、ステップ902の打楽器音の発音制御によりオー
トリズム演奏が行なわれる。また、かかる場合、時間経
過に伴いオートリズム演奏の進行が小節の区切りになる
と、CPU72は上記ステップ900〜906からなる処理中のス
テップ905にて上記のように「YES」と判定し、ステップ
907の処理によるテンポカウントTCNTの初期設定後、ス
テップ908にて“1"に設定されているオートプレイライ
トフラグAPWに基づき「YES」と判定し、ステップ909に
て演奏データメモリ62の記憶位置APM(ADR)に、タイミ
ングデータを表す識別データと上記ステップ904以前の
処理における小節エンド値、例えば「47」とからなる小
節コード(第4図参照)を書込み、ステップ910にてADR
=ADR+1の演算の実行によりアドレスADRを「1」だけ
歩進させて、ステップ906にてリズムインタラプトプロ
グラムの実行を終了する。これにより、オートリズム演
奏とともに、同演奏の進行に従って小節の区切りタイミ
ング毎に演奏データメモリ62には小節コードが書き込ま
れていく。
In this state, since the rhythm run flag RUN is set to "1", when a tempo clock signal is generated from the tempo oscillator 40, a process consisting of steps 900 to 906 of the rhythm interrupt program (FIG. 10) described above. Is executed, and an auto rhythm performance is performed by the sound emission control of the percussion instrument sound in step 902. In such a case, if the progress of the auto rhythm performance becomes a bar break with the passage of time, the CPU 72 determines “YES” as described above in step 905 during the processing consisting of steps 900 to 906, and
After the initial setting of the tempo count TCNT by the processing of 907, it is determined "YES" based on the auto play light flag APW set to "1" in step 908, and the storage position APM of the performance data memory 62 is determined in step 909. (ADR), a bar code (see FIG. 4) composed of the identification data representing the timing data and the bar end value in the processing before step 904, for example, “47”, is written.
By executing the operation of = ADR + 1, the address ADR is incremented by "1", and the execution of the rhythm interrupt program is terminated in step 906. As a result, a bar code is written into the performance data memory 62 at each bar break timing in accordance with the progress of the auto-rhythm performance.

かかるオートリズム演奏に従って、鍵盤10にて各鍵が
押離鍵されまたは音色操作子群27aおよび効果操作子群2
7bのいずれかの操作子が操作されると、上述のステップ
102,103(第5図)からなる循環処理を実行中のCPU72
は、ステップ103,104の判定処理によりステップ105の鍵
・音色イベントルーチン(第6図)を実行して鍵演奏に
よる楽音の発音を制御する。この鍵・音色イベントルー
チンの実行においては、オートプレイライトフラグAPW
が“1"に設定されているので、CPU72はステップ203にて
「YES」と判定してプログラムをステップ206〜221から
なる演奏データ書込ルーチンに進める。
According to the auto rhythm performance, each key is pressed and released on the keyboard 10 or the tone operator group 27a and the effect operator group 2
When any of the operators in 7b is operated, the above-described steps are performed.
CPU 72 executing the circulation process consisting of 102 and 103 (FIG. 5)
Executes the key / tone color event routine (FIG. 6) of step 105 through the determination processing of steps 103 and 104 to control the generation of musical tones by key performance. When executing this key / tone event routine, the auto play light flag APW
Is set to "1", the CPU 72 determines "YES" in step 203, and advances the program to a performance data writing routine including steps 206 to 221.

この演奏データ書込ルーチンにおいては、最初、ステ
ップ206にて演奏データメモリ62の記憶位置APM(ADR)
に演奏データとしてタイミングデータが記憶される。こ
のタイミングデータは、第4図に示すように、識別マー
クおよび時間データTCNTからなり、識別マークは該演奏
データがタイミングデータであることを示すコードに設
定され、かつ時間データTCNTはテンポカウントTCNTが示
す値に設定される。これにより、時間データTCNTは小節
の区切りからの時間に対応したタイミングを示すことに
なる。
In this performance data writing routine, first, at step 206, the storage location APM (ADR) of the performance data memory 62
, Timing data is stored as performance data. As shown in FIG. 4, the timing data includes an identification mark and time data TCNT, the identification mark is set to a code indicating that the performance data is timing data, and the time data TCNT is a tempo count TCNT. It is set to the value shown. As a result, the time data TCNT indicates a timing corresponding to the time from the bar break.

上記ステップ206の処理後、CPU72は、ステップ207,20
8にてイベントバッファレジスタ内のアドレスADR(I)
で指定される記憶位置IVTBUF(ADR)に記憶されたイベ
ントデータが押鍵データ、離鍵データまたはそれ以外の
音色等データのいずれのデータであるかを判定する。
After the processing in step 206, the CPU 72 proceeds to steps 207 and 20.
Address ADR (I) in event buffer register at 8
It is determined whether the event data stored in the storage location IVTBUF (ADR) designated by (1) is key press data, key release data, or other data such as timbre.

上記イベントデータが音色等データであれば、両判定
処理にて「NO」と判定し、プログラムをステップ209に
進める。CPU72は、このステップ209にて演奏データメモ
リ62の記憶位置指定用アドレスADRを歩進処理(ADR=AD
R+1)した後、ステップ210にて上記ステップ201の処
理によりイベントバッファレジスタの記憶位置IVTBUF
(ADR)に記憶されたイベントデータを1つだけ取り出
して、該取り出したイベントデータを演奏データとして
演奏データメモリ62の記憶位置APM(ADR)に記憶する
(第12図参照)。かかる場合、前記取り出したイベント
データは音色操作子群25aまたは効果操作子群25bに関す
るものであるから、第4図に示すような音色・効果に関
するデータであることを示す識別マークおよび音色・効
果名を表す音色・効果名データからなる音色等データが
演奏データとして記憶される。
If the event data is tone data or the like, “NO” is determined in both determination processes, and the program proceeds to step 209. In this step 209, the CPU 72 performs a step-by-step process of the storage position specifying address ADR of the performance data memory 62 (ADR = AD
R + 1), at step 210, the storage location of the event buffer register IVTBUF
Only one event data stored in the (ADR) is retrieved and the retrieved event data is stored as performance data in the storage location APM (ADR) of the performance data memory 62 (see FIG. 12). In this case, since the extracted event data relates to the tone operator group 25a or the effect operator group 25b, the identification mark indicating the tone / effect data as shown in FIG. Is stored as performance data.

CPU72は、ステップ210の処理後、プログラムをステッ
プ211に進め、ステップ211にてイベントバッファレジス
タ内の上記ステップ210で取り出したイベントデータを
クリアするとともに、同レジスタの記憶位置指定用アド
レスADR(I)を−1し、ステップ212にて上記イベント
バッファレジスタ内にイベントデータが残っているか否
かを判定する。かかる場合、イベントデータが残ってい
れば上記ステップ210にて「YES」と判定され、CPU72は
プログラムをステップ207に戻す。一方、イベントバッ
ファレジスタ内の残りのイベントデータがなくなると、
CPU72はステップ212にて「NO」と判定し、プログラムを
ステップ213に進める。さらに、このステップ213にてイ
ベントデータ記憶位置指定用アドレスADR(I)をクリ
アし、続くステップ214にて演奏データ記憶位置指定用
アドレスADRを「I」だけ歩進させ、ステップ205の処理
によってこの鍵・音色イベントルーチンの実行を終了す
る。
After the processing of step 210, the CPU 72 advances the program to step 211. In step 211, the CPU 72 clears the event data extracted in step 210 in the event buffer register, and specifies the storage location specifying address ADR (I) of the register. In step 212, it is determined whether or not event data remains in the event buffer register. In this case, if the event data remains, “YES” is determined in step 210, and the CPU 72 returns the program to step 207. On the other hand, when the remaining event data in the event buffer register is exhausted,
The CPU 72 determines “NO” in the step 212, and advances the program to the step 213. Further, in step 213, the address ADR (I) for specifying the event data storage position is cleared, and in step 214, the address ADR for specifying the performance data storage position is advanced by "I". The execution of the key / tone color event routine ends.

上記ステップ207,208における判定の際、上記イベン
トバッファレジスタの記憶位置IVTBUF(ADR)に取り込
まれているデータが押鍵データであれば、上記ステップ
208の判定が「YES」となり、プログラムはステップ215
に進められる。CPU72は、ステップ215にて押鍵データ数
レジスタSUM1を検査する。上記レジスタSUM1が初期設定
状態“0"のままであれば、この判定は「NO」となり、プ
ログラムをステップ216に進める。そして、ステップ216
にて上記レジスタSUM1に“1"を書き込んだ後、プログラ
ムをステップ209に進めて上述したステップ209以下の処
理を実行する。かかる場合、ステップ210にて取り出さ
れるイベントデータは鍵盤10における押鍵に関するもの
であり、第4図に示すような押鍵を表す識別マークおよ
び押鍵された鍵を表すキーコードコードKCからなる押鍵
データが演奏データとして記憶される。上記ステップ20
1で同時に生じたものとしてイベントバッファレジスタ
に取り込まれたイベントデータに少なくとも1つの押鍵
データが含まれており、それが上記ステップ210にて取
り出されている場合、上記レジスタSUM1は、既に上記ス
テップ216にて“1"を書き込まれている。したがって、
この場合ステップ215の判定は「YES」となり、CPU72
は、プログラムを上記ステップ212に進める。この場合
は、記憶位置IVTBUF(ADR)に取り込まれている押鍵デ
ータを演奏データメモリ62に書き込むことなく上記した
ステップ212以下の処理を実行する。
At the time of the determination in the steps 207 and 208, if the data fetched into the storage location IVTBUF (ADR) of the event buffer register is the key press data,
The judgment of 208 is "YES" and the program proceeds to step 215.
Proceed to In step 215, the CPU 72 checks the key press data number register SUM1. If the register SUM1 remains in the initial setting state “0”, this determination is “NO” and the program proceeds to step 216. And step 216
After writing "1" in the register SUM1, the program proceeds to step 209 to execute the above-described processing from step 209. In such a case, the event data extracted in step 210 is related to a key press on the keyboard 10, and includes a key press code KC indicating a key press and an identification mark indicating a key press as shown in FIG. Key data is stored as performance data. Step 20 above
If at least one key press data is included in the event data taken into the event buffer register as occurring at the same time in step 1 and it is taken out in step 210, the register SUM1 has already At 216, “1” is written. Therefore,
In this case, the determination in step 215 is “YES” and the CPU 72
Advances the program to step 212 above. In this case, the processing from step 212 described above is executed without writing the key press data taken in the storage location IVTBUF (ADR) to the performance data memory 62.

なお、当該電子楽器においては、上記ステップ201に
てイベントバッファレジスタの各記憶位置IVTBUF(AD
R)にイベントデータを取り込む際、インベントデータ
バッファアドレスADR(I)を0から順に歩進し、かつ
同時の押鍵データは低音から順に取り込むとともに、上
述したように、ステップ202にてアドレスADR(I)を有
効最高値にセットし、かつステップ211および後述のス
テップ218を実行する度に上記アドレスADR(I)を−1
することによってステップ207,208における押鍵データ
検出および取出処理を上記イベントデータを取り込んだ
ときと逆に順序で実行するようにしている。さらに、上
述のようにステップ215で既に押鍵データを取り出した
か否かを判定し、レジスタSUM1が“0"のときのみステッ
プ210にて押鍵データを取り出して演奏データメモリ62
に書き込むとともに、押鍵データ書込実行後はステップ
216にて押鍵データ数レジスタSUM1を“1"にセットする
ようにしている。これにより、当該電子楽器おいては、
同時に発生した押鍵データのうちの最高音の押鍵データ
が1つだけ記録されるように高音優先の単音選択記録が
行なわれる。第12図は、上記イベントバッファレジスタ
の各記憶位置IVTBUF(ADR)からのイベントデータ取出
および演奏データメモリ62の記憶位置APM(ADR)へのイ
ベントデータ記録の様子を示す。
In the electronic musical instrument, in step 201, each storage location IVTBUF (AD
R), the event data buffer address ADR (I) is incremented in order from 0, and simultaneous key depression data is sequentially acquired from the low tone, and the address ADR ( I) is set to the effective maximum value, and the address ADR (I) is decremented by -1 each time step 211 and step 218 described later are executed.
By doing so, the key press data detection and extraction processing in steps 207 and 208 is executed in the reverse order to that when the event data is imported. Further, as described above, it is determined in step 215 whether or not the key depression data has already been extracted. Only when the register SUM1 is "0", the key depression data is extracted in step 210, and the performance data memory 62
And after writing the key press data
At 216, the key press data number register SUM1 is set to "1". Thereby, in the electronic musical instrument,
Single tone selection recording with high tone priority is performed such that only one key depression data of the highest tone of the key depression data generated at the same time is recorded. FIG. 12 shows how event data is extracted from each storage location IVTBUF (ADR) of the event buffer register and recorded in the storage location APM (ADR) of the performance data memory 62.

上記ステップ207,208における判定の際、上記イベン
トバッファレジスタの記憶位置IVTBUF(ADR)に取り込
まれているデータが離鍵データであれば、上記ステップ
207の判定が「YES」となり、プログラムはステップ217
に進められる。CPU72は、ステップ217にてイベントバッ
ファレジスタ内の上記記憶位置IVTBUF(ADR)に取り込
まれているイベントデータである該離鍵データをクリア
し、ステップ218にて同レジスタの記憶位置指定アドレ
スADR(I)を−1した後、ステップ219にて上記イベン
トバッファレジスタ内に未だ取出およびクリアしてない
イベントデータが残っていないかを判定する。イベント
データが未だ残っていれば、ステップ219にて「YES」と
判定し、プログラムをステップ207に戻す。一方、イベ
ントバッファレジスタ内にイベントデータか残っていな
ければ、ステップ219にて「NO」と判定し、プログラム
をステップ220に進める。このステップ220ではイベント
データ記憶位置指定用アドレスADR(I)をクリアする
とともに演奏データ62の記憶位置指定用アドレスADRを
−1し、続くステップ221にてアドレスADRにより指定さ
れる演奏データ62の記憶位置APM(ADR)に記録されたデ
ータが時間データか否かを判定する。すなわち、このス
テップ221では、演奏データメモリ62に記録された最後
のデータが時間データ以外の有効なデータであるか否か
を判定する。この最後のデータが時間データであれば、
ステップ221の判定は「YES」となる。この場合、CPU72
は、プログラムをステップ205に進め、ステップ205にて
鍵・音色イベントルーチンの実行を終了して、プログラ
ムを第5図のステップ102に戻す。このように、ステッ
プ103にて検出され、ステップ201にて同時に発生したも
のとして取り込まれたイベントデータが離鍵データのみ
である場合、処理はステップ206から、ステップ207およ
び217〜219の循環処理を経て、ステップ220および205の
順序で実行され、演奏データメモリ62は、ステップ220
にて上記時間データが記録された記憶位置に設定された
ままとなるため、次のイベント発生時にそのときのタイ
ミングデータがオーバーライトされて消去されることに
なる。すなわち、当該電子楽器においては、離鍵データ
は記録されず、かつイベントデータが離鍵データのみの
場合にはタイミングデータも記録されない。
At the time of the determination in steps 207 and 208, if the data taken into the storage location IVTBUF (ADR) of the event buffer register is key release data,
The determination in step 207 is “YES”, and the program proceeds to step 217.
Proceed to At step 217, the CPU 72 clears the key release data which is the event data taken into the storage location IVTBUF (ADR) in the event buffer register, and at step 218, stores the storage location designation address ADR (IDR ) Is decremented by one, and in step 219, it is determined whether or not event data that has not yet been extracted and cleared remains in the event buffer register. If event data still remains, "YES" is determined in step 219, and the program returns to step 207. On the other hand, if no event data remains in the event buffer register, “NO” is determined in step 219, and the program proceeds to step 220. In this step 220, the address ADR (I) for specifying the storage position of the event data is cleared, and the address ADR for specifying the storage position of the performance data 62 is decremented by 1. In the following step 221 the storage of the performance data 62 specified by the address ADR is performed. It is determined whether or not the data recorded in the position APM (ADR) is time data. That is, in this step 221, it is determined whether or not the last data recorded in the performance data memory 62 is valid data other than time data. If this last data is time data,
The determination in step 221 is “YES”. In this case, CPU72
Advances the program to step 205, terminates the execution of the key / tone color event routine in step 205, and returns the program to step 102 in FIG. As described above, when the event data detected in step 103 and taken in as being simultaneously generated in step 201 is only the key release data, the processing proceeds from step 206 to the cyclic processing of steps 207 and 217 to 219. The performance data memory 62 is executed in the order of steps 220 and 205.
Since the time data remains set at the storage location where the time data is recorded, the timing data at that time is overwritten and erased when the next event occurs. That is, in the electronic musical instrument, no key release data is recorded, and when the event data is only the key release data, no timing data is recorded.

上述において、演奏データメモリ62に記録された最後
のデータが時間データでなければ、ステップ221の判定
は「NO」となる。この場合、CPU72は、プログラムを上
記ステップ214に進め、ステップ214にて上記アドレスAD
Rを+1して演奏データメモリ62の未記録部の先頭位置
に戻した後、ステップ205にて鍵・音色イベントルーチ
ンの実行を終了して、プログラムを第5図のステップ10
2に戻す。このように、ステップ103にて検出され、ステ
ップ201にて同時に発生したものとして取り込まれたイ
ベントデータが離鍵データ以外の押鍵または音色等のデ
ータを含む場合、それまでに記録されたタイミングデー
タ、および離鍵データ以外のイベントデータは保存さ
れ、次のイベントデータが発生するとさらに連続して記
録されることとなる。
In the above description, if the last data recorded in the performance data memory 62 is not time data, the determination in step 221 is “NO”. In this case, the CPU 72 advances the program to step 214, and in step 214,
After R is incremented by 1 to return to the head position of the unrecorded portion of the performance data memory 62, the execution of the key / timbre event routine is terminated in step 205, and the program is executed in step 10 of FIG.
Return to 2. As described above, when the event data detected in step 103 and captured as occurring simultaneously in step 201 includes data such as a key press or a tone color other than the key release data, the timing data recorded up to that time , And event data other than the key release data are stored, and are recorded more continuously when the next event data occurs.

以上の鍵・音色イベントルーチンを実行することによ
り、鍵盤10における押鍵またはパネル20における音色操
作子群25a、効果操作子群25bの操作があると、同時に操
作された鍵または操作子に関する押鍵データまたは音色
等データがタイミングデータの後に記憶される。但し、
離鍵データは記録されない。また、該タイミングで発生
したイベントデータが離鍵データのみの場合には該タイ
ミングデータも記録されない。
By executing the above key / timbre event routine, if there is a key press on the keyboard 10 or an operation of the tone operator group 25a and the effect operator group 25b on the panel 20, the key press on the key or the operator operated simultaneously is performed. Data or tone data is stored after the timing data. However,
No key release data is recorded. When the event data generated at the timing is only the key release data, the timing data is not recorded.

このような鍵・音色イベントルーチンの上記ステップ
206〜221からなる処理およびリズムインタラプトプログ
ラム(第10図)のステップ908,909の処理により、演奏
データメモリ62内に記憶される演奏データのフォーマッ
トは、第13図に示すように、小節の区切り毎に小節コー
ドが記憶されるとともに、鍵盤10における押鍵、音色操
作子群25aまたは効果操作子群25bに関する演奏データが
タイミングデータを先頭に同時に発生したイベントに関
する分まとめて記憶されることになる。
The above steps of such a key / timbre event routine
As a result of the processing consisting of steps 206 to 221 and the processing of steps 908 and 909 of the rhythm interrupt program (FIG. 10), the format of the performance data stored in the performance data memory 62, as shown in FIG. Along with storing the bar code, the performance data relating to the key depression on the keyboard 10, the tone color operator group 25a or the effect operator group 25b is stored together for the events that occurred simultaneously with the timing data at the top.

次に、該自動演奏記録モードを終了するために、リズ
ムストップ操作子21bが操作されると、上記ステップ10
2,103(第5図)からなる循環処理を実行中のCPU72は、
ステップ103にて上記場合と同様「YES」と判定して、ス
テップ104の判定処理によりプログラムをステップ108に
進め、ステップ108にて第7図に詳細に示すリズムスト
ップルーチンを実行する。この場合も、上述した場合と
同様、リズムストップルーチンの実行がステップ300か
ら開始され、ステップ301〜303の処理によってキーバッ
ファレジスタKEYBUFがクリアされるとともにリズムラン
フラグRUNが“0"に設定されてオートリズム演奏が停止
制御されるが、この場合におけるオートプレイライトフ
ラグAPWは“1"に設定されているので、CPU72は前記ステ
ップ303の処理後のステップ304の判定処理において「YE
S」と判定して、プログラムをステップ307〜322からな
る自動演奏記録モードの終了ルーチンに進める。
Next, when the rhythm stop operator 21b is operated to end the automatic performance recording mode,
The CPU 72 executing the circulation process consisting of 2,103 (FIG. 5)
In step 103, "YES" is determined as in the above case, and the program proceeds to step 108 by the determination processing in step 104. In step 108, the rhythm stop routine shown in detail in FIG. 7 is executed. Also in this case, as in the case described above, the execution of the rhythm stop routine is started from step 300, the key buffer register KEYBUF is cleared by the processing of steps 301 to 303, and the rhythm run flag RUN is set to "0". The auto rhythm performance is controlled to stop. In this case, since the auto play light flag APW is set to “1”, the CPU 72 determines “YE” in the determination processing of step 304 after the processing of step 303.
S ", the program proceeds to an automatic performance recording mode end routine consisting of steps 307 to 322.

この終了ルーチンにおいて、CPU72は、ステップ307に
て演奏データメモリ62の記憶位置APM(ADR)に現テンポ
カウントTCNT値である終了タイミングデータを書き込ん
だ後、先ず、ステップ308〜311にて終了直前のタイミン
グにおける押鍵データを検出する。すなわち、ステップ
308にてアドレスADRを−1し、ステップ309にて終了タ
イミングデータを書き込んだ直前のデータAPM(ADR)が
タイミングデータであるか否かを判定する。かかる場
合、第6図のステップ207〜221の自動演奏データ書込ル
ーチン処理においてタイミングデータとタイミングデー
タとの間には少なくとも1個のイベントデータが書き込
まれているから、ステップ309の判定は「NO」となり、
プログラムはステップ310に進められる。CPU72は、ステ
ップ310にて今度は上記直前データAPM(ADR)が押鍵デ
ータであるか否かを判定する。押鍵データであればステ
ップ311にてデータAPM(ADR)をキーバッファレジスタ
の記憶位置KEYBUF(ADR)に取り込み、キーバッファレ
ジスタの記憶位置指定用アドレスADR(KEY)を歩進した
後、一方、押鍵データでなければこのステップ311をス
キップした直接、プログラムをステップ308に戻す。こ
のステップ308〜311からなる循環処理によって終了直前
のタイミングにおける押鍵データが検出され、キーバッ
ファレジスタに記憶される。
In this end routine, the CPU 72 writes the end timing data, which is the current tempo count TCNT value, into the storage location APM (ADR) of the performance data memory 62 in step 307, and then, in steps 308 to 311, immediately before the end. Key depression data at the timing is detected. That is, step
In step 308, the address ADR is decremented by one, and in step 309, it is determined whether or not the data APM (ADR) immediately before writing the end timing data is timing data. In such a case, at least one event data is written between the timing data in the automatic performance data writing routine processing of steps 207 to 221 in FIG. "
The program proceeds to step 310. At step 310, the CPU 72 determines whether or not the immediately preceding data APM (ADR) is key press data. If it is key press data, the data APM (ADR) is fetched into the key buffer register storage location KEYBUF (ADR) in step 311, and the key buffer register storage location designation address ADR (KEY) is advanced. If it is not key depression data, the program directly returns to step 308, skipping step 311. The key press data at the timing immediately before the end is detected by the cyclic processing including steps 308 to 311 and stored in the key buffer register.

かかるステップ308〜311からなる循環処理を繰り返す
度に、ステップ308にてアドレスADRが−1ずつされ、デ
ータAPM(ADR)としてタイミングデータが検出される
と、ステップ309の判定が「YES」となり、プログラムは
ステップ312に進められる。
Each time the cyclic processing consisting of steps 308 to 311 is repeated, the address ADR is decremented by one in step 308, and if timing data is detected as data APM (ADR), the determination in step 309 becomes "YES", The program proceeds to step 312.

ステップ312,313からなる循環処理において、CPU72
は、上記終了タイミングデータが記憶されている記憶位
置までアドレスADRの歩進を繰り返した後、ステップ314
にプログラムを進める。
In the circulation processing consisting of steps 312 and 313, the CPU 72
After repeating the step of the address ADR to the storage position where the end timing data is stored,
Advance the program to

CPU72は、次に、ステップ314〜320にて演奏データメ
モリ62内の上記直前タイミングデータ記録位置と終了タ
イミングデータ記録位置との間に記録されており、上記
ステップ311にて上記キーバッファに取り込まれた押鍵
データに対応する離鍵データを作成し、上記終了タイミ
ングデータ記録位置に続く記録位置に記憶させる。すな
わち、CPU72は、ステップ314にてアドレスADRを歩進す
る。こりにより、上記終了タイミングデータが記憶され
ている記憶位置の次の記憶位置がアドレス指定される。
続いてステップ315にてキーバッファレジスタKEYBUFに
データが記憶されているか否かを判定する。このレジス
タKEYBUFに記憶されているデータは上記ステップ308〜3
11の処理からも明らかなように押鍵データである。レジ
スタKEYBUFに押鍵データが記憶されていれば、ステップ
316にてレジスタKEYBUFの記憶位置KEYBUF(ADR)に記憶
されている押鍵データを取り出し、該押鍵データの上位
2ビットである識別マークを離鍵コードに書き換えて該
押鍵データに対応する離鍵データを作成し、該離鍵デー
タをステップ317にて演奏データ62の記憶位置APM(AD
R)に記憶させ、さらに、ステップ318にてキーバッファ
レジスタKEYBUFの取出データKEYBUF(ADR)をクリア
し、ステップ319にてキーバッファアドレスADR(KEY)
を−1した後、ステツプ320にてアドレスADR(KEY)が
オール“1"であるか否か、すなわちキーバッファレジス
タKEYBUF(ADR)を全部サーチしたか否かを判定する。
全部をサーチしていなければステップ314に戻って上記
ステップ314〜320の循環処理を繰り返す。
Next, the CPU 72 records the data between the immediately preceding timing data recording position and the end timing data recording position in the performance data memory 62 in steps 314 to 320, and takes in the key buffer in step 311. Key release data corresponding to the depressed key data is created and stored in a recording position subsequent to the end timing data recording position. That is, the CPU 72 advances the address ADR in step 314. As a result, the storage location next to the storage location where the end timing data is stored is addressed.
Subsequently, at step 315, it is determined whether or not data is stored in the key buffer register KEYBUF. The data stored in this register KEYBUF is stored in the above steps 308 to 3
As is clear from the processing in step 11, the key press data. If key press data is stored in register KEYBUF, step
At 316, the key press data stored in the storage location KEYBUF (ADR) of the register KEYBUF is taken out, the upper 2 bits of the key press data are rewritten with the key release code, and the key release data corresponding to the key press data is rewritten. Key data is created, and the key release data is stored at step 317 in the storage location APM (AD
R), and in step 318, the fetch data KEYBUF (ADR) of the key buffer register KEYBUF is cleared. In step 319, the key buffer address ADR (KEY)
After subtracting -1, it is determined in step 320 whether or not the address ADR (KEY) is all "1", that is, whether or not the entire key buffer register KEYBUF (ADR) has been searched.
If the search has not been completed, the process returns to step 314 to repeat the circulating process of steps 314 to 320.

上記ステップ315において、キーバッファレジスタに
データが書き込まれていない場合、すなわち演奏データ
中、上記直前タイミングデータの表すタイミングの押鍵
データが記録されていない場合、上記ステップ315の判
定は「NO」となり、プログラムはステップ321に進めら
れる。また、キーバッファレジスタにデータが書き込ま
れていた場合であって、上記ステップ314〜321からなる
循環処理によってキーバッファレジスタの全部の記憶位
置のサーチを終了した場合、上記ステップ320の判定は
「YES」となり、この場合もプログラムはステップ321へ
進められる。
In step 315, if no data is written in the key buffer register, that is, if the key press data at the timing represented by the immediately preceding timing data is not recorded in the performance data, the determination in step 315 is "NO". The program proceeds to step 321. If the data has been written to the key buffer register and the search for all the storage locations of the key buffer register has been completed by the circulating process including the steps 314 to 321, the determination in the step 320 is “YES”. , And the program proceeds to step 321 also in this case.

ステップ321にて、CPU72は、アドレスADRにより指定
される演奏データメモリ62の記憶位置APM(ADR)に終了
コード(第4図参照)を記憶するとともに、アドレスAD
Rを「0」に初期設定する。これにより、第13図に示す
ように、演奏データ列の最後に終了コードが書込まれる
ことになる。
In step 321, the CPU 72 stores the end code (see FIG. 4) in the storage location APM (ADR) of the performance data memory 62 specified by the address ADR, and
Initialize R to "0". As a result, as shown in FIG. 13, an end code is written at the end of the performance data string.

上記ステップ321の処理後、CPU72はステップ322にて
オートプレイライトフラグAPWを“0"に設定してプログ
ラムをステップ305に進める。このオートプレイライト
フラグAPWの“0"への設定により、上述した(1)の通
常演奏モードのように、鍵盤10における押鍵または音色
操作子群25aもしくは効果操作子群25bの操作があって
も、上記鍵・音色イベントルーチン(第6図)のステッ
プ203にて「NO」と判定され、前記押離鍵または操作に
関する演奏データが演奏データメモリ62に書込まれるこ
とがなくなる。また、かかる状態で、テンポ発振器40か
らのテンポクロック信号の発生に伴いリズムインタラプ
トプログラム(第10図)が実行され、かつテンポカウン
トTCNTが小節エンド値になっても、同プログラムのステ
ップ908にて「NO」と判定され、小節コードが演奏デー
タメモリ62に書込まれることがなくなる。このようにし
て、上記オートプレイライトフラグAPWの“0"への設定
により、自動演奏記録モードの停止が制御される。そし
て、このステップ322(第7図)の処理後、CPU72はステ
ップ305にて、上記(1)の通常演奏モードの場合と同
様“0"に設定されているオートプレイリードフラグAPR
に基づき「NO」と判定して、ステップ306にてリズムス
トップルーチンの実行を終了する。
After the processing in step 321, the CPU 72 sets the auto play write flag APW to “0” in step 322, and advances the program to step 305. When the auto play light flag APW is set to "0", there is a key depression or operation of the tone control group 25a or the effect control group 25b on the keyboard 10, as in the normal performance mode (1) described above. In the key / tone color event routine (FIG. 6), the determination is "NO" in step 203, and the performance data relating to the key press / release or the operation is not written into the performance data memory 62. In this state, even if the rhythm interrupt program (FIG. 10) is executed in response to the generation of the tempo clock signal from the tempo oscillator 40 and the tempo count TCNT reaches the bar end value, the program proceeds to step 908 of the program. It is determined as "NO" and the bar code is not written into the performance data memory 62. In this way, the stop of the automatic performance recording mode is controlled by setting the auto play light flag APW to “0”. Then, after the processing of step 322 (FIG. 7), the CPU 72 determines in step 305 that the auto play read flag APR is set to "0" as in the case of the normal performance mode (1).
Is determined to be “NO” based on the above, and the execution of the rhythm stop routine is terminated in step 306.

(3)自動演奏再生モード 次に、自動演奏読出操作子24bの操作によって開始さ
れ、かつ所定区間の自動演奏の終了またはリズムストッ
プ操作子21bの操作により停止される自動演奏再生モー
ドについて説明する。
(3) Automatic Performance Playback Mode Next, an automatic performance playback mode which is started by the operation of the automatic performance readout operator 24b and stopped by the end of the automatic performance in a predetermined section or the operation of the rhythm stop operator 21b will be described.

上述したステップ102,103(第5図)からなる循環処
理中、自動演奏読出操作子24bが操作されると、CPU72は
ステップ103にて「YES」と判定し、ステップ104の判定
処理によりプログラムをステップ110に進め、ステップ1
10にて第9図に詳細に示すオートプレイリードルーチン
を実行する。このオートプレイリードルーチンにおいて
は、ステップ500にてその実行が開始される。
If the automatic performance reading operator 24b is operated during the circulation processing consisting of steps 102 and 103 (FIG. 5) described above, the CPU 72 determines "YES" in step 103 and executes the program in step 110 by the determination processing in step 104. Proceed to step 1
At 10, an auto play read routine shown in detail in FIG. 9 is executed. In this auto play read routine, its execution is started in step 500.

ステップ504においては、CPU72はオートプレイリード
フラグAPRおよびリズムランフラグRUNを“1"に初期設定
するとともにテンポカウントTCNTを「0」に初期設定す
る。
In step 504, the CPU 72 initializes the auto play read flag APR and the rhythm run flag RUN to “1” and initializes the tempo count TCNT to “0”.

次に、CPU72は、ステップ505にて、前記アドレスADR
により指定される演奏データメモリ62の記憶位置APM(A
DR)に記憶されている演奏データ(タイミングデータ)
を読出して、該読出データをリードタイミングデータRD
TIMとして設定し、さらにステップ506にてアドレスADR
をアドレスバッファレジスタADRBUFに退避させた後、ス
テップ507にてこのオートプレイリードルーチンの実行
を終了する。
Next, the CPU 72 determines in step 505 that the address ADR
Storage location APM (A
Performance data (timing data) stored in the DR)
And read the read data into read timing data RD.
Set as TIM, and in step 506 address ADR
Is saved in the address buffer register ADRBUF, and in step 507, the execution of the auto play read routine ends.

オートプレイリードルーチンの実行終了後、CPU72
は、上記(1)(2)の場合と同様、ステップ102,103
(第5図)からなる循環処理を続ける。かかる場合、鍵
盤10における押離鍵または音色操作子群25a、効果操作
子群25bの操作があれば、上記(1)(2)の場合と同
様にステップ105の処理が実行されて、鍵盤用楽音信号
発生回路52による鍵盤10の押離鍵に応じた楽音の発生が
制御される。一方、テンポ発振器40からテンポクロック
信号が発生された場合には、上記(1)の場合と同様に
リズムインタラプトプログラム(第10図)が実行され、
ステップ900〜908の処理によってリズムパターンメモリ
61およびリズム音信号発生回路51によるオートリズム演
奏が行なわれる。
After the execution of the auto play read routine, the CPU 72
Are the same as steps (1) and (2), steps 102 and 103
The circulation process consisting of (FIG. 5) is continued. In such a case, if there is an operation of the key press / release key or the tone operator group 25a and the effect operator group 25b on the keyboard 10, the process of step 105 is executed in the same manner as in the above (1) and (2), and The generation of a musical tone by the musical tone signal generating circuit 52 in accordance with a key press or release of the keyboard 10 is controlled. On the other hand, when the tempo clock signal is generated from the tempo oscillator 40, the rhythm interrupt program (FIG. 10) is executed in the same manner as in the above (1),
Rhythm pattern memory by processing of steps 900 to 908
An auto rhythm performance is performed by 61 and the rhythm sound signal generation circuit 51.

また、かかる場合、オートプレイリードフラグAPRは
“1"に設定されているので、上記リズムインタラプトプ
ログラムの実行中、CPU72はステップ903にて「YES」と
判定し、ステップ911にて第11図に詳細に示す自動演奏
データ読出ルーチンの処理を実行する。
In such a case, since the auto play read flag APR is set to “1”, the CPU 72 determines “YES” in step 903 during execution of the rhythm interrupt program, and proceeds to step 911 in FIG. The processing of the automatic performance data reading routine shown in detail is executed.

この自動演奏データ読出ルーチンの実行はステップ60
0にて開始され、CPU72は、先ず、ステップ601にてテン
ポカウントTCNT値が上記ステップ505(第9図)の処理
により初期設定されたリードタイミングデータRDTIMま
たは後述するステップ659の処理により次から設定され
るリードタイミングデータRDTIMより1少ない値、すな
わち離鍵タイミング(RDTIM−1)に等しいか否かを判
定する。今、該離鍵タイミング(RDTIM−1)とテンポ
カウントTCNTが等しくなければ、前記ステップ601にお
いては「NO」と判定され、プログラムをステップ651に
進める。一方、テンポカウントTCNTが上昇して前記離鍵
タイミング(RDTIM−1)とテンポカウントTCNTとが等
しくなると、CPU72は同ステップ601にて「YES」と判定
し、ステップ602にてアドレスADRをアドレスバッファレ
ジスタADRBUFに退避させた後、ステップ603〜608のキー
オフルーチンを実行する。すなわち、ステップ603にて
アドレスADRSを「1」だけ歩進させ、該歩進させたアド
レスADRにより指定される演奏データメモリ62の記憶位
置APM(ADR)に記憶されている演奏データを読出して、
該読出した演奏データをリードデータRDDTとして設定す
る。
This automatic performance data reading routine is executed in step 60.
Starting at 0, the CPU 72 first sets the tempo count TCNT value in step 601 from the read timing data RDTIM initialized by the processing in step 505 (FIG. 9) or the processing in step 659 to be described later. It is determined whether the read timing data RDTIM is equal to one less than the read timing data RDTIM, that is, the key release timing (RDTIM-1). If the key release timing (RDTIM-1) is not equal to the tempo count TCNT, "NO" is determined in step 601 and the program proceeds to step 651. On the other hand, when the tempo count TCNT rises and the key release timing (RDTIM-1) becomes equal to the tempo count TCNT, the CPU 72 determines “YES” in step 601 and in step 602 stores the address ADR in the address buffer. After saving to the register ADRBUF, the key-off routine of steps 603 to 608 is executed. That is, in step 603, the address ADRS is incremented by "1", and the performance data stored in the storage position APM (ADR) of the performance data memory 62 specified by the incremented address ADR is read out.
The read performance data is set as read data RDDT.

次に、CPU72は、ステップ605,606の各判定処理によ
り、前記リードデータRDDTがタイミングデータ(小節コ
ードを含む)、押鍵データまたはその他のデータ(離鍵
データ、音色等データまたは終了コード)のいずれのデ
ータであるかを判定する。今、前記リードデータRDDTが
押鍵データであれば、ステップ606の判定処理にて「YE
S」と判定され、ステップ608にて現在発音中の押鍵デー
タに対応した離鍵データを作成して自動演奏用楽音信号
発生回路53へバス30を介して出力する。自動演奏用楽音
信号発生回路53はこの供給された離鍵データに基づき楽
音信号の形成を制御して、現在発音中の楽音信号を停止
させる。これにより、後述するステップ658の処理によ
りスピーカ55から発音されていた楽音は、次の押鍵の一
定時間前、例えば1テンポクロック前にキーオフ処理さ
れる。
Next, the CPU 72 determines whether the read data RDDT is timing data (including a bar code), key press data or other data (key release data, data such as tone color, or end code) by the respective determination processes of steps 605 and 606. Determine whether the data is data. Now, if the read data RDDT is key press data, “YE
In step 608, key release data corresponding to the currently depressed key press data is created and output to the automatic performance tone signal generation circuit 53 via the bus 30. The automatic performance tone signal generation circuit 53 controls the formation of the tone signal based on the supplied key release data, and stops the tone signal currently being generated. As a result, the tone generated by the speaker 55 in the processing of step 658, which will be described later, is subjected to key-off processing a predetermined time before the next key depression, for example, one tempo clock before.

上記ステップ608の処理後、CPU72はプログラムをステ
ップ603に戻し、同ステップ603にてアドレスADRを
「1」だけ歩進させるとともに、該歩進させたアドレス
ADRにより指定される演奏データメモリ62内の記憶位置A
PM(ADR)に記憶されている演奏データをリードデータR
DDTとして再び設定し、さらに、このリードデータRDDT
の種類をステップ605,606の処理により判定する。
After the processing in step 608, the CPU 72 returns the program to step 603. In step 603, the address ADR is incremented by “1”, and the incremented address is set.
Storage location A in the performance data memory 62 specified by ADR
The performance data stored in PM (ADR) is read data R
Set again as DDT, and read data RDDT
Is determined by the processing of steps 605 and 606.

上記リードデータRDDTがその他のデータ(離鍵デー
タ、音色等データまたは終了コード)であれば、ステッ
プ605,606の両判定処理において判定は「NO」と判定さ
れ、CPU72は、ステップ608の処理をスキップしてプログ
ラムをステップ606から直接ステップ603に戻す。この場
合、自動演奏用楽音信号発生回路53に送出されるデータ
は無く、スピーカ55から発音される楽音はリードデータ
RDDTによっては何ら影響されない。
If the read data RDDT is other data (key release data, tone color data, or an end code), the determination is “NO” in both of the determination processes of Steps 605 and 606, and the CPU 72 skips the process of Step 608. To return the program directly from step 606 to step 603. In this case, no data is sent to the automatic performance tone signal generation circuit 53, and the tone generated from the speaker 55 is read data.
Not affected by RDDT.

かかるステップ603〜608からなる循環処理中、上記ス
テップ604にて設定したリードデータRDDTがタイミング
データまたは小節コードになると、CPU72はステップ605
にて「YES」と判定し、プログラムをステップ651に進め
る。
If the read data RDDT set in the above step 604 becomes timing data or a bar code during the cyclic processing consisting of steps 603 to 608, the CPU 72 proceeds to step 605.
Is determined to be "YES", and the program proceeds to step 651.

このステップ651にて、CPU72は、上記ステップ505
(第9図)の処理により初期設定されたリードタイミン
グデータRDTIMまたは後述するステップ659の処理により
次から設定されるリードタイミングデータRDTIMがテン
ポカウントTCNTに等しいか否かを判定する。今、前記リ
ードタイミングデータRDTIMとテンポカウントTCNTが等
しくなければ、前記ステップ651においては「NO」と判
定され、ステップ652にてこの自動演奏データ読出ルー
チンの実行が終了される。一方、テンポカウントTCNTが
上昇して前記リードタイミングデータRDTIMとテンポカ
ウントTCNTとが等しくなると、CPU72は同ステップ651に
て「YES」と判定し、ステップ653にて、上記ステップ60
2またはステップ506(第9図)の処理により退避させて
あったアドレスデータをアドレスADRとして復帰させた
後、ステップ654にて該アドレスADRSを「1」だけ歩進
させるとともに、該歩進させたアドレスADRにより指定
される演奏データメモリ62の記憶位置APM(ADR)に記憶
されている演奏データを読出して、該読出した演奏デー
タをリードデータRDDTとして設定する。
In this step 651, the CPU 72 executes the above step 505
It is determined whether the read timing data RDTIM initially set by the processing of FIG. 9 or the read timing data RDTIM subsequently set by the processing of step 659 described later is equal to the tempo count TCNT. If the read timing data RDTIM is not equal to the tempo count TCNT, "NO" is determined in the step 651, and the execution of the automatic performance data read routine is ended in a step 652. On the other hand, when the tempo count TCNT rises and the read timing data RDTIM becomes equal to the tempo count TCNT, the CPU 72 determines “YES” in the same step 651, and in step 653,
After the address data saved by the processing of step 2 or step 506 (FIG. 9) is restored as the address ADR, the address ADRS is incremented by "1" and incremented in step 654. The performance data stored in the storage location APM (ADR) of the performance data memory 62 specified by the address ADR is read, and the read performance data is set as read data RDDT.

次に、CPU72は、ステップ655,656の各判定処理によ
り、前記リードデータRDDTがタイミングデータ(もしく
は小節コード)、終了コードまたはその他のデータ(押
鍵データ、離鍵データまたは音色等データ)のいずれか
のデータであるかを判定する。今、前記リードデータRD
DTがその他のデータ(押鍵データ、離鍵データ、音色等
データ)であれば、ステップ655および656の各判定処理
にて全て「NO」と判定され、ステップ658にて該リード
データRDDTは自動演奏用楽音信号発生回路53へバス30を
介して出力される。自動演奏用楽音信号発生回路53はこ
れらの供給された押鍵データ、離鍵データまたは音色等
データに基づき楽音信号の形成を制御して、該形成され
た楽音信号をアンプ54を介してスピーカ55に出力し、ス
ピーカ55が同楽音信号に応じた楽音を発音する。これに
より、スピーカ55からは演奏データメモリ62に記憶され
ている演奏データに基づき自動的に楽音が発音されるよ
うになる。
Next, the CPU 72 determines that the read data RDDT is one of the timing data (or bar code), the end code or other data (key press data, key release data or tone color data) by the respective determination processes of steps 655 and 656. Determine whether the data is data. Now, the read data RD
If DT is any other data (key press data, key release data, tone color data, etc.), all the determination processes in steps 655 and 656 are determined to be "NO", and in step 658 the read data RDDT is automatically It is output to the musical tone signal generating circuit 53 for performance via the bus 30. The automatic performance tone signal generation circuit 53 controls the formation of a tone signal based on the supplied key press data, key release data or tone color data, and outputs the formed tone signal to a speaker 55 via an amplifier 54. , And the speaker 55 emits a musical tone corresponding to the musical tone signal. As a result, a musical tone is automatically generated from the speaker 55 based on the performance data stored in the performance data memory 62.

上記ステップ658の処理後、CPU72はプログラムをステ
ップ654に戻し、同ステップ654にてアドレスADRを
「1」だけ歩進させ、ステップ654にて該歩進させたア
ドレスADRにより指定される演奏データメモリ62内の記
憶位置APM(ADR)に記憶されている演奏データをリード
データRDDTとして再び設定し、さらに、このリードデー
タRDDTの種類をステップ655〜657の処理により判定す
る。かかる場合、リードデータRDDTが再び押鍵データ、
離鍵データ、音色等データであれば、再びステップ658
の処理により楽音の発生が制御される。このようにし
て、同一タイミングに記憶されている全ての押鍵デー
タ、離鍵データ、音色等データが演奏データメモリ62か
ら読出されて、自動演奏楽音の発生が制御される。
After the processing in step 658, the CPU 72 returns the program to step 654. In step 654, the address ADR is incremented by "1". In step 654, the performance data memory designated by the incremented address ADR. The performance data stored at the storage location APM (ADR) in 62 is set again as the read data RDDT, and the type of the read data RDDT is determined by the processing of steps 655 to 657. In such a case, the read data RDDT is again depressed key data,
If the data is key release data, tone color, etc., step 658 is performed again.
The generation of the musical tone is controlled by the processing of. In this manner, all key depression data, key release data, tone color data, etc. stored at the same timing are read from the performance data memory 62, and the generation of automatic performance musical tones is controlled.

かかるステップ654〜658からなる循環処理中、上記ス
テップ654にて設定したリードデータRDDTがタイミング
データもしくは小節コードになると、CPU72はステップ6
55にて「YES」と判定し、ステップ659にて同リードデー
タRDDTをリートタイミングデータRDTIMとして設定し
て、ステップ652にて該自動演奏データ読出しルーチン
の実行を終了する。その後、リズムインタラプトプログ
ラムが実行される毎に上記ステップ600〜652からなる処
理が実行され、前記設定したリードタイミングデータRD
TIMがテンポカウントTCNTと等しくなると、CPU72は上記
ステップ654〜658からなる上記処理を実行して自動演奏
楽音の発音を制御する。
If the read data RDDT set in the above step 654 becomes timing data or a bar code during the cyclic processing consisting of steps 654 to 658, the CPU 72 proceeds to step 6.
At 55, "YES" is determined, and at step 659 the read data RDDT is set as the REIT timing data RDTIM, and at step 652, the execution of the automatic performance data reading routine is terminated. After that, every time the rhythm interrupt program is executed, the processing consisting of steps 600 to 652 is executed, and the set read timing data RD is set.
When TIM becomes equal to the tempo count TCNT, the CPU 72 executes the above-mentioned processing consisting of steps 654 to 658 to control the sounding of the automatically-played musical tone.

また、上記ステップ654にて設定したリードデータRDD
Tが終了コードになると、CPU72はステップ655における
「NO」と判定後、ステップ656にて「YES」と判定し、ス
テップ662にて自動演奏再生モードおよびオートリズム
の停止のためにオートプレイリードフラグAPRおよびリ
ズムランフラグを“0"に設定して、ステップ652にて自
動演奏データ読出ルーチンの実行を終了する。
Also, the read data RDD set in step 654 above
When T becomes the end code, the CPU 72 determines “NO” in step 655, then determines “YES” in step 656, and in step 662, sets the auto play read flag to stop the automatic play mode and the auto rhythm. The APR and the rhythm run flag are set to "0", and the execution of the automatic performance data reading routine is terminated in step 652.

一方、上述したように、小演奏データメモリ62から終
了コードが読出される前に、リズムストップ操作子21b
が操作された場合にも自動演奏再生モードは停止する。
すなわち、リズムストップ操作子21bが操作された場合
には、CPU72はリズムストップルーチン(第7図)を実
行し、該ルーチン中のステップ301〜303の処理によって
リズムランフラグRUNは“0"に設定される。また、リズ
ムストップルーチンの上記ステップ305においては、オ
ートプレイリードフラグAPRが“1"であることに基づき
「YES」と判定され、CPU72はステップ323にてオートプ
レイリードフラグAPRを“0"に設定してステップ306にて
該ルーチンの実行を終了する。
On the other hand, as described above, before the end code is read from the small performance data memory 62, the rhythm stop operator 21b
The automatic performance playback mode is also stopped when is operated.
That is, when the rhythm stop operator 21b is operated, the CPU 72 executes a rhythm stop routine (FIG. 7), and sets the rhythm run flag RUN to "0" by the processing of steps 301 to 303 in the routine. Is done. Also, in the above step 305 of the rhythm stop routine, it is determined to be “YES” based on the auto play read flag APR being “1”, and the CPU 72 sets the auto play read flag APR to “0” in step 323. Then, in step 306, the execution of the routine ends.

このように、第2図の電子楽器においては、演奏デー
タの終了コード直前に記録される離鍵データを除けばキ
ーデータとして押鍵データしか記録しないので、演奏デ
ータが約半分に圧縮され、メモリを節約することができ
る。すなわち、同じメモリ容量なら倍の曲が記録でき、
同じ曲ならメモリ容量を半分にすることができる。
As described above, in the electronic musical instrument shown in FIG. 2, only the key depression data is recorded as the key data except for the key release data recorded immediately before the end code of the performance data. Can be saved. In other words, double songs can be recorded with the same memory capacity,
For the same song, the memory capacity can be halved.

また、スタッカートのようなキーオンとキーオンとの
間のキーオフ時間の長い弾き方で演奏データを記録して
も、再生音は、レガートのような滑らかな、すなわちあ
たかも押鍵時間をきちんと守って演奏入力したかのよう
に補正されるので、初心者等が演奏入力しても熟練者が
演奏入力したかのように聞えるという効果がある。
Even if performance data is recorded with a long key-off time between key-ons, such as staccato, the playback sound is as smooth as legato, i.e., as if the key-pressing time was properly protected. As a result, even if a beginner or the like inputs a performance, it is possible to hear as if the expert input the performance.

[他の実施例] なお、上述の実施例においては、テンポカウントTCNT
を小節の区切りごとにセットするようにしたが、イベン
トデータの到来または読出時にリセットするようにして
もよい。すなわち、上記実施例においては、テンポカウ
ントTCNT値が小節内タイミングを示すようにしている
が、各イベント間の時間間隔を示すようにしてもよい。
後者の場合、演奏データ読出時は、イベント時の時間デ
ータをタイマレジスタに取り込み、減算方式にて、この
レジスタの値を1テンポパルス毎に−1ずつカウントダ
ウンして行き、タイマレジスタの計数出力値が0になる
少し前、例えば1〜3のときキーオフ処理を行ない、さ
らに0のとき次のイベントデータの読出を行なうように
してもよい。
[Other embodiments] In the above embodiment, the tempo count TCNT
Is set at each bar break, but may be reset when event data arrives or is read. That is, in the above-described embodiment, the tempo count TCNT value indicates the timing within a bar, but may indicate the time interval between events.
In the latter case, at the time of reading the performance data, the time data at the time of the event is taken into the timer register, and the value of this register is counted down by one every tempo pulse by a subtraction method, and the count output value of the timer register is counted. A short time before, for example, 1 to 3, key-off processing may be performed, and when 0, the next event data may be read.

また、上述の実施例においては、自動演奏記録モード
終了時、演奏データの末尾の終了コードの前に離鍵デー
タを書き込むようにしたが、演奏データとしては離鍵デ
ータを書き込まずに、自動演奏再生モード時、終了コー
ドを読み出した際に、楽音信号発生回路側で発音チヤン
ネルレジスタをすべてクリアすればよい。
In the above-described embodiment, when the automatic performance recording mode is ended, the key release data is written before the end code at the end of the performance data. In the reproduction mode, when the end code is read, all the tone generation channel registers may be cleared on the tone signal generation circuit side.

さらに、上述においては、本願発明を鍵盤10における
押離鍵に関するキーイベントデータのみに適用している
が、本願発明は音色等のパネルイベントデータに関して
も適用可能である。
Further, in the above description, the present invention is applied only to key event data related to a key press and release on the keyboard 10, but the present invention is also applicable to panel event data such as timbre.

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

第1図は、上記特許請求の範囲の記載に対応したクレー
ム対応図、 第2図は、本発明の一実施例に係る自動演奏装置を備え
た電子楽器のブロック図、 第3図は、第2図の操作パネルの詳細を示す外観図、 第4図は、第2図の演奏データメモリに記憶されている
各種演奏データのフオーマット図、 第5〜11図は、第2図のマイクロコンピュータにて実行
されるプログラムの一例に対応したフローチャート、 第12図は、第2図のバッファレジスタメモリ内のイベン
トバッファレジスタから第2図の演奏データメモリへの
イベントデータ転送処理を説明するための説明図、 第13図は、演奏データの一例を示すフォーマット図、そ
して、 第14図は、第2図の電子楽器における自動演奏記録モー
ド終了動作を説明するための説明図である。 10:鍵盤、10a:鍵スイッチ回路、20:操作パネル、24a:オ
ートプレイライト操作子、24b:オートプレイリード操作
子、40:テンポ発振器、53:自動演奏用楽音信号発生回
路、62:演奏データメモリ、70:マイクロコンピュータ。
FIG. 1 is a claim correspondence diagram corresponding to the description of the claims, FIG. 2 is a block diagram of an electronic musical instrument provided with an automatic performance device according to an embodiment of the present invention, and FIG. FIG. 2 is an external view showing details of the operation panel, FIG. 4 is a format diagram of various performance data stored in the performance data memory of FIG. 2, and FIGS. 12 is a flowchart corresponding to an example of a program to be executed. FIG. 12 is an explanatory diagram for explaining an event data transfer process from the event buffer register in the buffer register memory of FIG. 2 to the performance data memory of FIG. FIG. 13 is a format diagram showing an example of performance data, and FIG. 14 is an explanatory diagram for explaining an automatic performance recording mode end operation in the electronic musical instrument of FIG. 10: keyboard, 10a: key switch circuit, 20: operation panel, 24a: auto play write operator, 24b: auto play read operator, 40: tempo oscillator, 53: automatic performance tone signal generation circuit, 62: performance data Memory, 70: microcomputer.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】楽曲の進行に従って楽音の発生を制御する
ための演奏データとして、楽音発生状態の変化のタイミ
ングと内容を表わすデータを記憶する演奏データメモ
リ、 押鍵および離鍵データを発生する鍵データ入力手段、 該鍵データ入力手段から発生された押鍵および離鍵デー
タを一旦格納するバファ手段、 該バファ手段に格納された押鍵および離鍵データのうち
楽曲の最後の楽音の離鍵データ以外の離鍵データを少な
くとも省略して上記演奏データメモリに書き込む書込制
御手段、 上記演奏データメモリに記憶されている演奏データを楽
曲の進行に従って順次読み出し、上記タイミングデータ
に応じて出力するとともに、新たな楽音の発生を示す押
鍵データを読み出したときは現在発生中の楽音の終了を
示す離鍵データを作成し上記新たな押鍵データより所定
時間先行して出力する読出制御手段、および 上記押鍵および離鍵データに基づいて楽音の発生および
停止を制御する音源を具備することを特徴とする自動演
奏装置。
1. A performance data memory for storing data representing the timing and content of a change in the tone generation state as performance data for controlling the generation of musical tones as the music progresses, and a key for generating key press and key release data. Data input means, buffer means for temporarily storing key press and key release data generated from the key data input means, and key release data of the last musical tone of the music among the key press and key release data stored in the buffer means Writing control means for writing in the performance data memory by omitting at least the key release data other than the above, sequentially reading out the performance data stored in the performance data memory in accordance with the progress of the music, and outputting it in accordance with the timing data, When key press data indicating the occurrence of a new tone is read, key release data indicating the end of the tone currently being generated is created, and An automatic performance device comprising: read control means for outputting a predetermined key data before a key pressed data; and a sound source for controlling generation and stop of a musical tone based on the key pressed and key released data.
JP63000267A 1988-01-06 1988-01-06 Automatic performance device Expired - Fee Related JP2625800B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63000267A JP2625800B2 (en) 1988-01-06 1988-01-06 Automatic performance device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63000267A JP2625800B2 (en) 1988-01-06 1988-01-06 Automatic performance device

Publications (2)

Publication Number Publication Date
JPH01179086A JPH01179086A (en) 1989-07-17
JP2625800B2 true JP2625800B2 (en) 1997-07-02

Family

ID=11469135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63000267A Expired - Fee Related JP2625800B2 (en) 1988-01-06 1988-01-06 Automatic performance device

Country Status (1)

Country Link
JP (1) JP2625800B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2713107B2 (en) * 1993-07-09 1998-02-16 ヤマハ株式会社 Automatic performance device
JP5098103B2 (en) 2008-03-19 2012-12-12 本田技研工業株式会社 Headlight support structure for saddle-ride type vehicles

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2625668B2 (en) * 1984-03-06 1997-07-02 カシオ計算機株式会社 Automatic performance device
JPS61212898A (en) * 1985-03-19 1986-09-20 カシオ計算機株式会社 Automatic performer

Also Published As

Publication number Publication date
JPH01179086A (en) 1989-07-17

Similar Documents

Publication Publication Date Title
US4981066A (en) Electronic musical instrument capable of editing chord performance style
JP2620724B2 (en) Performance information recording device
JP3239411B2 (en) Electronic musical instrument with automatic performance function
JPH1069273A (en) Playing instruction device
JP2625800B2 (en) Automatic performance device
JP2522337B2 (en) Automatic playing device
JPH07109553B2 (en) Automatic playing device
JP2556040B2 (en) Automatic playing device
JPH0375874B2 (en)
JP2643277B2 (en) Automatic performance device
JP2713107B2 (en) Automatic performance device
JP3362070B2 (en) Automatic performance device
JP2660471B2 (en) Automatic performance device
JP2601039B2 (en) Electronic musical instrument
JP3120487B2 (en) Electronic musical instrument with automatic accompaniment function
JP3178176B2 (en) Automatic accompaniment device
JP3757664B2 (en) Performance information reproducing apparatus and computer-readable recording medium recording performance information reproducing program
JP2572317B2 (en) Automatic performance device
JP3430894B2 (en) Chord detection method, chord detection device, and recording medium recording chord detection program
JP2760398B2 (en) Automatic performance device
JP2576296B2 (en) Automatic accompaniment device for electronic musical instruments
JP3147111B2 (en) Automatic performance recording and playback device
JP2556639B2 (en) Automatic playing device
JPH0437438B2 (en)
JP2583377B2 (en) Automatic performance device

Legal Events

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