JP2639271B2 - Automatic performance device - Google Patents

Automatic performance device

Info

Publication number
JP2639271B2
JP2639271B2 JP4006013A JP601392A JP2639271B2 JP 2639271 B2 JP2639271 B2 JP 2639271B2 JP 4006013 A JP4006013 A JP 4006013A JP 601392 A JP601392 A JP 601392A JP 2639271 B2 JP2639271 B2 JP 2639271B2
Authority
JP
Japan
Prior art keywords
event
channel
midi
data
performance data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP4006013A
Other languages
Japanese (ja)
Other versions
JPH0651763A (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 JP4006013A priority Critical patent/JP2639271B2/en
Publication of JPH0651763A publication Critical patent/JPH0651763A/en
Application granted granted Critical
Publication of JP2639271B2 publication Critical patent/JP2639271B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】この発明は自動演奏用の演奏デー
タおよび自動伴奏用の演奏データを共に録音することが
できる自動演奏装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an automatic performance apparatus capable of recording both performance data for automatic performance and performance data for automatic accompaniment.

【0002】[0002]

【従来の技術】演奏者の演奏による楽音を発音すると共
に、発音される楽音に基づいて演奏の調性を検出し、調
性に応じた伴奏音を自動的に付与する自動伴奏機能を備
えた自動演奏装置が知られている。従来、この種の自動
演奏装置において、演奏データの録音を行う場合、付与
された伴奏音を含むすべての楽音データをメモリに録音
していた。
2. Description of the Related Art An automatic accompaniment function is provided for generating musical tones produced by a performer, detecting the tonality of the performance based on the tones to be produced, and automatically providing accompaniment tones according to the tonality. Automatic performance devices are known. 2. Description of the Related Art Conventionally, when recording performance data in an automatic performance apparatus of this type, all musical sound data including an accompanying accompaniment sound has been recorded in a memory.

【0003】[0003]

【発明が解決しようとする課題】上述のように付与され
た伴奏音を含めてすべての楽音データをメモリに記憶し
た場合、記憶後においてメモリ内の自動伴奏(付与され
た伴奏音)の楽音データの内容を書き換え、所望の伴奏
音に変更することができる。しかし、自動伴奏の楽音デ
ータを含むすべての楽音データを記憶するために記憶容
量の大きなメモリが必要となるという問題があった。こ
の発明は上述した事情に鑑みてなされたものであり、演
奏データの記憶に使用可能なメモリの容量が小さい場合
においても、自動伴奏音形成に必要な演奏データを含む
すべての楽音データの記憶を行うことができる自動演奏
装置を提供することを目的とする。
When all tone data including the accompaniment sound assigned as described above is stored in the memory, the tone data of the automatic accompaniment (assigned accompaniment tone) in the memory after the storage is stored. Can be rewritten and changed to a desired accompaniment sound. However, there is a problem that a memory having a large storage capacity is required to store all musical sound data including musical sound data of automatic accompaniment. The present invention has been made in view of the above-described circumstances, and even when the capacity of a memory that can be used for storing performance data is small, storage of all tone data including performance data necessary for automatic accompaniment tone formation is performed. It is an object of the present invention to provide an automatic performance apparatus that can perform the automatic performance.

【0004】[0004]

【課題を解決するための手段】この発明は、演奏データ
を発生する演奏データ発生手段と、演奏データに従っ
、楽音を発生する楽音発生手段と、演奏データを記憶
する記憶手段と、演奏データを前記記憶手段に書き込む
書込手段と、演奏データを前記記憶手段から読み出す
出手段と、伴奏用の演奏データを形成するために伴奏パ
ターンを記憶する伴奏データ記憶手段と、演奏データ発
生手段から発生された演奏データまたは読出手段により
前記記憶手段から読み出された演奏データに基づいて和
音を特定し、前記伴奏データ記憶手段から伴奏パターン
を読み出して、前記特定された和音に基づいて音高変換
し、演奏データを形成して出力する伴奏データ形成手段
とからなり、前記各手段間における演奏データの授受の
態様として、 (a)前記演奏データ発生手段によって発生される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段によって出力される演奏データが前記書
込手段によって前記記憶手段に書き込まれ、書き込まれ
た演奏データを前記読出手段により読み出して前記楽音
発生手段へと供給する第1の態様と、 (b)前記演奏データ発生手段によって発生される演奏
データが前記書込手段によって前記記憶手段に書き込ま
れるとともに、前記読出手段によって読み出される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段から出力される演奏データが前記楽音発
生手段に供給される第2の態様の両方を備えることを特
徴としている。
According to the present invention, there is provided a performance data generating means for generating performance data , a musical sound generating means for generating a musical tone in accordance with the performance data, a storage means for storing the performance data, and storing the performance data. Write to storage
And writing means, reading for reading the performance data from said storage means
Output means and an accompaniment pattern for forming performance data for accompaniment.
Accompaniment data storage means for storing turns, and performance data generation
By the performance data generated by the raw means or by the reading means
The sum based on the performance data read from the storage means
The sound is specified, and the accompaniment pattern is stored in the accompaniment data storage unit.
And converts the pitch based on the specified chord.
Accompaniment data forming means for forming and outputting performance data
Consists of a, the a mode of transfer of performance data between each unit, output by (a) the performance data generated by the performance data generating means is supplied to the accompaniment data forming means, the accompaniment data forming means the manual performance data
Writing into the storage means by
Read out the playing data by the reading means and
A first aspect supplied to generating means, written to the storage means by the performance data is the writing unit generated by (b) the performance data generating means
And the performance read by the reading means.
Data is supplied to the accompaniment data forming means, performance data output from the accompaniment data forming means the tone onset
It is characterized by having both of the second aspect supplied to the raw means .

【0005】[0005]

【作用】上記構成によれば、第1の態様による演奏デー
タの授受が行われる場合にあっては、演奏データ発生手
段が発生する演奏データに基づいて、伴奏データ形成手
段により伴奏用の演奏データが形成され、書込手段に
り該伴奏用の演奏データが記憶手段に書き込まれ、楽音
発生手段へはその書き込まれた演奏データが読出手段に
よって読み出されて供給される。これに対し、第2の
様による演奏データの授受が行われる場合にあっては、
演奏データ発生手段が発生する演奏データが書込手段に
よって記憶手段に書き込まれ、読出手段によって読み出
されて伴奏データ形成手段に供給され、その供給された
演奏データに基づいて伴奏用の演奏データが形成されて
楽音発生手段へ出力される。
According to the above arrangement, the performance data according to the first aspect is provided.
Data is exchanged , the accompaniment data forming process is performed based on the performance data generated by the performance data generating means.
The performance data for the accompaniment is formed by the steps, and the performance data for the accompaniment is written into the storage means by the writing means .
The written performance data is sent to the reading means to the generating means.
Therefore, it is read and supplied. In contrast, the second state
When performance data is exchanged by
The performance data generated by the performance data generation means is stored in the writing means.
Therefore, it is written to the storage means and read by the reading means.
And supplied to the accompaniment data forming means.
Performance data for accompaniment is formed based on the performance data.
It is output to the tone generator.

【0006】[0006]

【実施例】以下、図面を参照し、本発明の一実施例を説
明する。 <A>実施例の構成 図1はこの発明の一実施例による自動演奏装置の構成を
示すブロック図である。この自動演奏装置は下記機能を
有している。また、下記にも示すように、この自動演奏
装置において、演奏操作子の操作イベント、記憶手段か
ら読み出される演奏データ等はすべてMIDIイベント
に変換されて取り扱われる。 (a)演奏操作子の操作に応答しMIDIイベントを発
生し、該MIDIイベントに基づく演奏を行う演奏機能 (b)演奏操作子の操作に応答し伴奏音用のMIDIイ
ベントを発生し、該MIDIイベントに基づく伴奏を行
う第1の伴奏機能なお、この第1の伴奏機能による動作
が行われる動作モードをPREモードと称する。 (c)上記(a)または(b)の機能によって生じるM
IDIイベントを記憶手段に録音する録音機能 (d)記憶手段から演奏データを読み出し、MIDIイ
ベントとして出力すると共に該MIDIイベントによる
演奏を行う再生機能 (e)上記(d)の機能によって出力されたMIDIイ
ベントのうち特定チャネルのMIDIイベントに基づい
て伴奏音を発生する第2の伴奏機能なお、この第2の伴
奏機能による動作が行われる動作モードをPOSTモー
ドと称する。また、本実施例において、演奏者は第1お
よび第2の伴奏機能を選択することができるが両機能を
共に選択することはできない。また、この自動演奏装置
は、上記機能(a)〜(d)に関し、下記の指定を行う
ことが可能である。 (f)演奏操作子の操作によって発生するMIDIイベ
ントを割り当てるチャネル番号(以下、キーボードチャ
ネルと称する)の指定 (g)記憶手段から再生するMIDIイベントのチャネ
ル番号(以下、再生チャネルと称する)の指定 (h)記憶手段に演奏データとして記憶するMIDIイ
ベントのチャネル番号(以下、録音チャネルと称する)
の指定なお、上記PREモードおよびPOSTモードの
詳細については、後述の本自動伴奏装置全体の動作説明
中で随時説明するが、それぞれのモードにおける動作の
概要を示しておくと以下のようになる。 PREモード 演奏操作子の操作により指定された和音に基づく自動伴
奏音自体の演奏データを記憶手段に記憶し、その記憶し
た演奏データを読み出して楽音を再生することによって
自動伴奏音を発生させる。 POSTモード 演奏操作子の操作に基づく演奏データのみを記憶手段に
記憶し、その記憶した演奏データに基づく和音の演奏デ
ータを形成することによって自動伴奏音を発生させる。
An embodiment of the present invention will be described below with reference to the drawings. <A> Configuration of Embodiment FIG. 1 is a block diagram showing a configuration of an automatic performance device according to an embodiment of the present invention. This automatic performance device has the following functions. Further, as described below, in this automatic performance apparatus, all operation events of performance operators, performance data read from the storage means, and the like are converted into MIDI events and handled. (A) a performance function for generating a MIDI event in response to operation of a performance operator and performing a performance based on the MIDI event; and (b) generating a MIDI event for accompaniment sound in response to operation of the performance operator, and A first accompaniment function for performing an accompaniment based on an event Note that an operation mode in which an operation is performed by the first accompaniment function is referred to as a PRE mode. (C) M generated by the above function (a) or (b)
A recording function for recording an IDI event in the storage means. (D) A performance function for reading performance data from the storage means, outputting the data as a MIDI event, and performing a performance based on the MIDI event. (E) A MIDI function output by the function (d). A second accompaniment function of generating an accompaniment sound based on a MIDI event of a specific channel among the events. An operation mode in which the operation is performed by the second accompaniment function is referred to as a POST mode. Further, in the present embodiment, the player can select the first and second accompaniment functions, but cannot select both functions. Further, the automatic performance device can make the following designations for the functions (a) to (d). (F) Designation of a channel number (hereinafter referred to as a keyboard channel) to which a MIDI event generated by operation of a performance operator is assigned (g) Designation of a channel number (hereinafter referred to as a reproduction channel) of a MIDI event to be reproduced from the storage means (H) MIDI event channel number stored in the storage means as performance data (hereinafter referred to as recording channel)
Note that the PRE mode and POST mode
For details, see the operation of the entire automatic accompaniment device described later.
As will be explained at any time, the operation of each mode
The outline is as follows. Automatic accompaniment based on the chord specified by the operation of the PRE mode performance operator
The performance data of the sound itself is stored in the storage means, and the stored data is stored.
By reading the performance data
Generate an automatic accompaniment sound. Only the performance data based on the operation of the POST mode performance operator is stored in the storage means.
Memorize the chord performance data based on the memorized performance data.
Data to generate an automatic accompaniment sound.

【0007】以下説明する本装置の各構成要素は上記各
機能を実現するための手段として使用される。図1にお
いて、1は演奏操作子としての鍵盤である。また、2は
鍵インターフェイスであり、鍵盤1の各鍵に対してなさ
れる押鍵/離鍵操作を検知し、鍵イベントとして出力す
る。3はCPU(中央処理ユニット)であり、上記機能
(a)〜(e)に係る制御を含む装置全体の制御を行
う。また、4はROM(リードオンリメモリ)であり、
CPU3が実行する各種制御プログラムの他、制御に必
要な制御情報が記憶されている。また、ROM4内の特
定の記憶エリアは自動演奏パターンメモリエリアとなっ
ており、各種リズムのスタイルに対応したリズムパター
ンが記憶されている。また、5はRAMであり、CPU
3が行う制御に使用される制御データの記憶エリアとし
て使用される。また、RAM5内の特定の記憶エリア
は、16トラック分の演奏データを記憶するための演奏
データメモリエリアおよび演奏データの編集の際に使用
する16トラック分のバッファトラックエリアとして使
用される。6はMIDIインターフェイスであり、この
自動演奏装置において再生されるMIDIイベントの外
部装置への送信、および外部装置から供給されるMID
Iイベントの受信を行う。7は音色指定スイッチ等の演
奏操作子を含む各種操作子および表示器が配備された操
作パネルである。8は操作パネルインターフェイスであ
り、操作パネル7の各操作子に対してなされる操作を検
知してパネルイベントとして出力すると共に、CPU3
からの指令に従って操作パネル7の各表示器の表示制御
を行う。また、9は楽音信号を合成する楽音合成回路、
10は楽音合成回路9によって出力された楽音信号を楽
音として発音するサウンドシステムである。B1はMI
DIイベント用バスであり、CPU3、MIDIインタ
ーフェイス6、楽音合成回路9およびサウンドシステム
10を相互に接続し、これら各要素間において行われる
MIDIイベントの授受のための通信経路として使用さ
れる。B2はデータバスであり、鍵インターフェイス
2、CPU3、ROM4、RAM5、操作パネルインタ
ーフェイス8および楽音合成回路9を相互に接続し、こ
れら各要素間において行われるデータの授受のための通
信経路として使用される。例えば鍵インターフェイス2
から出力される押鍵情報はデータバスB2を介してCP
U3に取り込まれ、CPU3によりMIDIイベントに
変換された後、MIDIイベント用バスB1を介し楽音
合成回路9に出力される。
[0007] The components of the apparatus described below are used as means for realizing the above functions. In FIG. 1, reference numeral 1 denotes a keyboard as a performance operator. Reference numeral 2 denotes a key interface, which detects a key press / key release operation performed on each key of the keyboard 1 and outputs it as a key event. Reference numeral 3 denotes a CPU (Central Processing Unit), which controls the entire apparatus including the functions (a) to (e). 4 is a ROM (Read Only Memory),
In addition to various control programs executed by the CPU 3, control information necessary for control is stored. A specific storage area in the ROM 4 is an automatic performance pattern memory area, and stores rhythm patterns corresponding to various rhythm styles. 5 is a RAM, and a CPU
3 is used as a storage area for control data used for the control performed by the control unit 3. The specific storage area in the RAM 5 is used as a performance data memory area for storing performance data for 16 tracks and a buffer track area for 16 tracks used for editing the performance data. Reference numeral 6 denotes a MIDI interface for transmitting a MIDI event to be reproduced by the automatic performance device to an external device, and a MIDI ID supplied from the external device.
The I event is received. Reference numeral 7 denotes an operation panel provided with various operators including a performance operator such as a tone color designation switch and a display. An operation panel interface 8 detects an operation performed on each operation element of the operation panel 7 and outputs the operation as a panel event.
The display control of each display of the operation panel 7 is performed in accordance with the command from. 9 is a tone synthesis circuit for synthesizing a tone signal;
Reference numeral 10 denotes a sound system which generates a tone signal output from the tone synthesis circuit 9 as a tone. B1 is MI
A DI event bus, which interconnects the CPU 3, the MIDI interface 6, the tone synthesis circuit 9, and the sound system 10, and is used as a communication path for transmitting and receiving MIDI events between these elements. A data bus B2 connects the key interface 2, the CPU 3, the ROM 4, the RAM 5, the operation panel interface 8, and the tone synthesis circuit 9 to each other, and is used as a communication path for data exchange between these elements. You. For example, key interface 2
Is output from the CP via the data bus B2.
After being taken into U3 and converted into a MIDI event by the CPU 3, it is output to the tone synthesis circuit 9 via the MIDI event bus B1.

【0008】図2は操作パネル7を示す平面図である。
図2において、21は現在設定されている音色番号を表
示するための表示器である。22は音色設定部であり、
音色番号を入力するためのテンキーおよび入力された音
色番号を増減するためのインクリメントキー、デクリメ
ントキーからなる。23はメトロノーム音の発生を指示
するためのメトロノームスイッチである。メトロノーム
スイッチ23がオン状態とされるとその上部にあるLE
Dランプ24が点灯する。31は現在設定されているテ
ンポを表示するための表示器である。32および33は
現在設定されているテンポの増減を指示するためのイン
クリメントキーおよびデクリメントキーである。41は
レコードスイッチであり、録音開始の指示および上述の
録音チャネルの設定を行う際に押下される。42は自動
演奏の開始を指示するためのスタートスイッチ、43は
自動演奏の停止を指示するためのストップスイッチであ
る。BM1〜BM16は各々キーボードチャネルスイッチ
であり、上述のキーボードチャネルの設定に使用され
る。キーボードチャネルの設定状態はLEDランプLM
1〜LM16により表示される。BQ1〜BM16は各々シー
ケンサチャネルスイッチであり、上述の再生チャネルお
よび録音チャネルの設定に使用される。再生チャネルお
よび録音チャネルの設定状態はLEDランプLQ1〜L
16により表示される。71はABCスイッチであり、
このスイッチが押下されることにより、上記PREモー
ド、POSTモード、および伴奏音の発生を行わないO
FFモードのいずれかが自動伴奏に関する動作モードと
して設定される。LEDランプ72および73は、自動
伴奏に関する動作モードを表示するために設けられたも
のであり、OFFモードの場合はLEDランプ72およ
び73は共に消灯し、PREモードが設定された場合は
LEDランプ72のみが点灯し、POSTモードが設定
された場合はLEDランプ73のみが点灯する。
FIG. 2 is a plan view showing the operation panel 7.
In FIG. 2, reference numeral 21 denotes a display for displaying the currently set tone color number. 22 is a tone setting section,
It consists of a numeric keypad for inputting a tone color number, an increment key for increasing / decreasing the input tone color number, and a decrement key. 23 is a metronome switch for instructing generation of a metronome sound. When the metronome switch 23 is turned on, the LE
The D lamp 24 lights up. Reference numeral 31 denotes a display for displaying the currently set tempo. Numerals 32 and 33 are an increment key and a decrement key for instructing increase / decrease of the currently set tempo. Reference numeral 41 denotes a record switch, which is depressed when a recording start instruction and the above-described recording channel setting are performed. Reference numeral 42 denotes a start switch for instructing start of automatic performance, and reference numeral 43 denotes a stop switch for instructing stop of automatic performance. BM 1 to Bm 16 are each keyboard channel switch, used to set the above-described keyboard channel. Keyboard channel setting status is LED lamp LM
It is displayed by the 1 ~LM 16. BQ 1 to BM 16 are sequencer channel switches, respectively, which are used for setting the above-mentioned reproduction channel and recording channel. Setting state of the playback channels and recording channels LED lamp LQ 1 ~L
It is displayed by Q 16. 71 is an ABC switch,
When this switch is pressed, the PRE mode, POST mode, and O which does not generate the accompaniment sound are set.
One of the FF modes is set as an operation mode relating to automatic accompaniment. The LED lamps 72 and 73 are provided to display an operation mode related to automatic accompaniment. When the mode is OFF, the LED lamps 72 and 73 are turned off. When the PRE mode is set, the LED lamps 72 and 73 are turned off. Only the LED is lit, and when the POST mode is set, only the LED lamp 73 is lit.

【0009】次にRAM5内の記憶エリアを使用して構
成される制御用のレジスタおよびフラグ類を以下説明す
る。 スタートフラグSTART:このスタートフラグSTA
RTは、スタートスイッチ42が押下されることにより
“1”がセットされる。START=“1”となるとR
AM5の演奏データメモリエリアから演奏データが読み
出され、自動演奏が行われる。 レコードフラグREC:このレコードフラグRECは、
レコードスイッチ41とスタートスイッチ42が同時に
押下されることにより“1”がセットされ、この結果、
MIDIイベントの録音が行われる。 MIDIバッファ:このMIDIバッファには、鍵盤演
奏、外部装置からのMIDI信号の受信、操作パネルの
操作、RAM5の演奏データメモリエリアからの演奏デ
ータの読出等の要因によって生じたMIDIイベントが
蓄積される。 チャネルステータスレジスタST(k)(k=1〜2
2):このチャネルステータスレジスタST(k)(k
=1〜22)には、楽音合成回路9における22個の発
音チャネルの発音状態を示す情報が記憶される。すなわ
ち、発音チャネルkが空きチャネルである場合はST
(k)=「0」とされ、発音チャネルkがノートオン状
態の場合はST(k)=「1」とされ、発音チャネルk
がノートオフ状態になるとST(k)=「2」とされ
る。 テンポレジスタTEMPO:このテンポレジスタTEM
POの内容に応じたテンポで自動伴奏が行われる。 ABC用カウントレジスタABCCNT:このABC用
カウントレジスタABCCNTはABC音の発生タイミ
ングを制御するための計時手段として用いられる。 キーボードチャネルレジスタKBSW(k)(k=1〜
LAST)およびチャネル数レジスタLAST:キーボ
ードチャネルレジスタKBSW(k)(k=1〜LAS
T)は可変長のレジスタであり、キーボードチャネルの
番号が記憶される。チャネル数レジスタLASTにはキ
ーボードチャネルレジスタKBSWに記憶されているキ
ーボードチャネルの個数が記憶される。 イベントレジスタEV:このイベントレジスタEVに
は、MIDIバッファから取り出されたMIDIイベン
トが書き込まれる。 MIDIチャネルレジスタMCH:このMIDIチャネ
ルレジスタMCHには、MIDIバッファから取り出さ
れたMIDIイベントのチャネルの番号が書き込まれ
る。 ノートコードレジスタNC:このノートコードレジスタ
NCには、イベントレジスタEVから取り出されたノー
トオンイベントに含まれるノートコードが書き込まれ
る。 ノートベロシティレジスタNV:このノートベロシティ
レジスタNVには、イベントレジスタEVから取り出さ
れたノートオンイベントに含まれるノートベロシティが
書き込まれる。 発音チャネル割当レジスタACH:この発音チャネル割
当レジスタACHには、発音を行わせる楽音合成回路9
の発音チャネルの番号が書き込まれる。 発音チャネル別ノートコードレジスタSTNC(k)
(k=1〜22):発音チャネル別ノートコードレジス
タSTNC(k)には、発音チャネルkによって発音さ
れる楽音のノートコードが記憶される。 発音チャネル別MIDIチャネルレジスタAMC(k)
(k=1〜22):発音チャネル別MIDIチャネルレ
ジスタAMC(k)には、発音チャネルkによって発音
されるノートオンイベントのチャネル番号が記憶され
る。 レコードスイッチフラグRECSW:このレコードスイ
ッチフラグRECSWはレコードスイッチ41が押下さ
れている期間、“1”を保持する。 録音フラグRSW(k)(k=1〜16):これらの録
音フラグRSW(k)(k=1〜16)は、各MIDI
チャネルkが録音チャネルであるか否かを示す値を記憶
するフラグであり、RSW(k)=“1”である場合に
MIDIチャネルkは録音チャネルである。 再生フラグPSW(k)(k=1〜16):これらの再
生フラグPSW(k)(k=1〜16)は、各MIDI
チャネルkが再生チャネルであるか否かを示す値を記憶
するフラグであり、PSW(k)=“1”である場合に
MIDIチャネルkは再生チャネルである。 受信フラグRC(k)(k=1〜16):これらの受信
フラグRC(k)(k=1〜16)は、各MIDIチャ
ネルkについて外部装置からのMIDIイベントの受信
を行うか否かを示す値を記憶するフラグである。RC
(k)=“1”である場合、MIDIチャネルkのMI
DIイベントの受信が許可される。 デュレーションレジスタDT(k)(k=1〜16):
これらのデュレーションレジスタDT(k)(k=1〜
16)には、再生時、演奏データメモリエリアの各トラ
ックkから読み出されるデュレーションデータが書き込
まれる。 モードフラグPREおよびPOST:ABCスイッチ7
1の操作により、これらのフラグの内容が更新される。
また、これらのフラグの内容により、下記に示すよう
に、自動伴奏に関する動作モードが決定される。 PRE=“0”、POST=“0”……OFFモード PRE=“1”、POST=“0”……PREモード PRE=“0”、POST=“1”……POSTモード 根音レジスタROOTおよびコードタイプレジスタTY
PE:これらのレジスタROOTおよびTYPEには、
自動伴奏を行う際に使用する和音の根音およびコードタ
イプを示すデータが記憶される。
Next, control registers and flags configured using the storage area in the RAM 5 will be described below. Start flag START: This start flag STA
RT is set to “1” when the start switch 42 is pressed. When START = "1", R
Performance data is read from the performance data memory area of AM5, and an automatic performance is performed. Record flag REC: This record flag REC is
When the record switch 41 and the start switch 42 are pressed at the same time, “1” is set, and as a result,
Recording of a MIDI event is performed. MIDI buffer: This MIDI buffer stores MIDI events generated by factors such as playing a keyboard, receiving a MIDI signal from an external device, operating an operation panel, and reading performance data from a performance data memory area of the RAM 5. . Channel status register ST (k) (k = 1 to 2)
2): This channel status register ST (k) (k
= 1 to 22) stores information indicating the sounding states of the 22 sounding channels in the tone synthesis circuit 9. That is, if the sound channel k is an empty channel, ST
(K) = “0”, and when the sound channel k is in the note-on state, ST (k) = “1” and the sound channel k
Is in the note-off state, ST (k) = "2". Tempo register TEMPO: This tempo register TEM
Automatic accompaniment is performed at a tempo according to the content of the PO. ABC count register ABCCNT: The ABC count register ABCCNT is used as timekeeping means for controlling the generation timing of the ABC sound. Keyboard channel register KBSW (k) (k = 1 to
LAST) and channel number register LAST: keyboard channel register KBSW (k) (k = 1 to RAS)
T) is a variable-length register in which the number of the keyboard channel is stored. The number of keyboard channels stored in the keyboard channel register KBSW is stored in the channel number register LAST. Event register EV: The MIDI event extracted from the MIDI buffer is written in the event register EV. MIDI channel register MCH: The channel number of the MIDI event extracted from the MIDI buffer is written in the MIDI channel register MCH. Note code register NC: The note code included in the note-on event extracted from the event register EV is written in the note code register NC. Note velocity register NV: The note velocity included in the note-on event extracted from the event register EV is written in the note velocity register NV. Tone generation channel assignment register ACH: The tone generation channel assignment register ACH has a tone synthesis circuit 9 for generating a tone.
Is written. Note code register STNC (k) for each sounding channel
(K = 1 to 22): The note code register STNC (k) for each sounding channel stores note codes of musical tones sounded by the sounding channel k. MIDI channel register AMC (k) for each sounding channel
(K = 1 to 22): The channel number of the note-on event generated by the sound channel k is stored in the sound channel-specific MIDI channel register AMC (k). Record switch flag RECSW: This record switch flag RECSW holds “1” while the record switch 41 is pressed. Recording flag RSW (k) (k = 1 to 16): These recording flags RSW (k) (k = 1 to 16)
A flag for storing a value indicating whether or not the channel k is a recording channel. When RSW (k) = "1", the MIDI channel k is a recording channel. Reproduction flags PSW (k) (k = 1 to 16): These reproduction flags PSW (k) (k = 1 to 16) are
This flag stores a value indicating whether the channel k is a reproduction channel. When PSW (k) = "1", the MIDI channel k is a reproduction channel. Reception flags RC (k) (k = 1 to 16): These reception flags RC (k) (k = 1 to 16) indicate whether or not to receive a MIDI event from an external device for each MIDI channel k. This is a flag that stores the indicated value. RC
If (k) = "1", the MI of the MIDI channel k
The reception of the DI event is permitted. Duration register DT (k) (k = 1 to 16):
These duration registers DT (k) (k = 1 to
16), during playback, duration data read from each track k in the performance data memory area is written. Mode flags PRE and POST: ABC switch 7
The operation of 1 updates the contents of these flags.
In addition, an operation mode related to automatic accompaniment is determined according to the contents of these flags as described below. PRE = "0", POST = "0" ... OFF mode PRE = "1", POST = "0" ... PRE mode PRE = "0", POST = "1" ... POST mode Root register ROOT and Code type register TY
PE: These registers ROOT and TYPE include
Data indicating the root and chord type of a chord used when performing automatic accompaniment is stored.

【0010】<B>実施例の動作 <動作概要>図3はCPU3によって実行される主なル
ーチンと、これら各ルーチン間の関係を説明するもので
ある。なお、図3において、SEQはRAM5内の演奏
データメモリエリアおよびバッファトラックエリアに対
するアクセスの制御を行うシーケンサを示している。ま
た、図4〜図21はCPU3によって実行される各ルー
チンの具体的処理内容を示すフローチャートであり、図
4はメインルーチンのフローチャート、図5〜図18は
メインルーチンの実行に伴って実行される各ルーチンの
フローチャート、図19〜21はCPU3により割込処
理として実行される各ルーチンのフローチャートであ
る。なお、これら各ルーチンの具体的処理内容について
は次項<詳細な動作説明>において詳細に説明し、以下
では、図3を参照し、この自動演奏装置の動作の概要を
説明する。
<B> Operation of the Embodiment <Outline of Operation> FIG. 3 illustrates main routines executed by the CPU 3 and the relationship between these routines. In FIG. 3, SEQ indicates a sequencer for controlling access to the performance data memory area and the buffer track area in the RAM 5. 4 to 21 are flowcharts showing the specific processing contents of each routine executed by the CPU 3, FIG. 4 is a flowchart of a main routine, and FIGS. 5 to 18 are executed with the execution of the main routine. FIGS. 19 to 21 are flowcharts of each routine executed by the CPU 3 as interrupt processing. The specific processing contents of each of these routines will be described in detail in the following section <detailed operation description>, and the outline of the operation of this automatic performance device will be described below with reference to FIG.

【0011】(1)楽器モード(START=“0”R
EC=“0”) この楽器モードにおいては、鍵盤1、操作パネル7上の
操作子等の演奏操作子の操作によって生じるMIDイベ
ント、および外部装置から受信したMIDIイベントに
基づく演奏が行われる。鍵盤1の操作によって生じる鍵
イベントは鍵処理ルーチンによってMIDIイベントに
変換され、キーボードチャネルに対応したMIDIイベ
ントとしてMIDIバッファに蓄積される。また、外部
装置から受信されるMIDIイベントは外部MIDI処
理ルーチンによりMIDIバッファに蓄積される。MI
DIバッファに蓄積されたMIDIイベントは、MID
I処理ルーチンによって逐次取り出され、MIDIイベ
ントにおけるノートイベントはノートイベント処理ルー
チンへ、チャネルイベントはチャネルイベント処理ルー
チンへ引き渡される。そして、ノートイベント処理ルー
チンにより、ノートイベントに基づくパラメータが生成
され、チャネルイベント処理ルーチンにより、音色設
定、ボリューム設定等のためのパラメータが発生され、
各々、楽音合成回路9に供給される。また、PREモー
ドが設定されている場合に鍵盤操作が行われると、鍵処
理ルーチンにより、押鍵イベントに基づいて和音が決定
され、その根音およびコードタイプを指定する情報がA
BC処理ルーチンに引き渡される。そして、ABC処理
ルーチンにより、所定の自動演奏パターンに従った伴奏
音用のノートイベントが順次発生され、MIDIバッフ
ァに蓄積される。MIDIバッファに蓄積された伴奏音
用のノートイベントはノートイベント処理ルーチンに引
き渡され、ノートイベント処理ルーチンにより、該ノー
トイベントによる楽音合成回路の制御が行われ、自動伴
奏が行われる。
(1) Instrument mode (START = "0" R
EC = “0”) In this musical instrument mode, a performance based on an MID event generated by operation of a performance operator such as an operator on the keyboard 1 and the operation panel 7 and a MIDI event received from an external device are performed. A key event generated by operating the keyboard 1 is converted into a MIDI event by a key processing routine, and is stored in a MIDI buffer as a MIDI event corresponding to a keyboard channel. MIDI events received from the external device are stored in a MIDI buffer by an external MIDI processing routine. MI
The MIDI event stored in the DI buffer is the MID
The note event in the MIDI event is delivered to the note event processing routine, and the channel event is delivered to the channel event processing routine. Then, a parameter based on the note event is generated by the note event processing routine, and parameters for tone setting, volume setting, etc. are generated by the channel event processing routine,
Each is supplied to the tone synthesis circuit 9. When a keyboard operation is performed while the PRE mode is set, a chord is determined based on a key press event by a key processing routine, and information specifying the root note and chord type is A.
Delivered to the BC processing routine. Then, note events for accompaniment sounds according to a predetermined automatic performance pattern are sequentially generated by the ABC processing routine, and are stored in the MIDI buffer. The note events for accompaniment sounds stored in the MIDI buffer are transferred to a note event processing routine, and the note event processing routine controls the tone synthesis circuit based on the note events, and performs automatic accompaniment.

【0012】(2)再生モード(START=“1”、
REC=“0”) 一定時間が経過する毎に再生処理ルーチン(図3におい
ては図示略)が実行され、RAM5内の演奏データメモ
リエリアのうち再生チャネルに対応したトラックから演
奏データが順次読み出され、再生チャネルに対応したM
IDIイベントとしてMIDIバッファに書き込まれ
る。また、鍵盤演奏、操作パネル7の操作、外部装置か
らのMIDI信号の受信等があった場合は、それらによ
って生じるMIDIイベントもMIDIバッファに書き
込まれる。そして、上記楽器モードの場合と同様、MI
DIバッファからMIDIイベントが逐次読み出され、
楽音合成回路9の制御が行われる。また、POSTモー
ドが設定されている場合に、特定のMIDIチャネルの
ノートイベントが再生されてMIDIバッファに書き込
まれると、そのノートイベントがMIDI処理ルーチン
の実行によりMIDIバッファから取り出され、ノート
イベント処理ルーチンに引き渡される。そして、ノート
イベント処理ルーチンにより、引き渡されたノートイベ
ントに基づいて和音が決定され、その根音およびコード
タイプを指定する情報がABC処理ルーチンに引き渡さ
れる。そして、ABC処理ルーチンにより、所定の自動
演奏パターンに従った伴奏音用のノートイベントが順次
発生され、ノートイベント処理ルーチンに引き渡され、
ノートイベント処理ルーチンにより該ノートイベントに
よる楽音合成回路9の制御が行われ、自動伴奏が行われ
る。
(2) Reproduction mode (START = "1",
(REC = “0”) Every time a predetermined time elapses, a reproduction processing routine (not shown in FIG. 3) is executed, and the performance data is sequentially read from the track corresponding to the reproduction channel in the performance data memory area in the RAM 5. M corresponding to the playback channel
It is written to the MIDI buffer as an IDI event. If there is a keyboard performance, operation of the operation panel 7, reception of a MIDI signal from an external device, or the like, a MIDI event generated by the operation is also written to the MIDI buffer. Then, as in the case of the musical instrument mode, the MI
MIDI events are sequentially read from the DI buffer,
The control of the tone synthesis circuit 9 is performed. When the POST mode is set, when a note event of a specific MIDI channel is reproduced and written into the MIDI buffer, the note event is taken out of the MIDI buffer by executing the MIDI processing routine, and the note event processing routine is executed. Handed over to Then, the chord is determined by the note event processing routine based on the passed note event, and information specifying the root note and chord type is passed to the ABC processing routine. Then, note events for accompaniment sounds according to a predetermined automatic performance pattern are sequentially generated by the ABC processing routine, and are passed to the note event processing routine.
The note event processing routine controls the tone synthesis circuit 9 based on the note event, and performs automatic accompaniment.

【0013】(3)録音再生モード(START=
“1”、REC=“1”) MIDI処理ルーチンが実行されるのに伴って記録処理
ルーチン(図3においては図示略)が実行される。これ
により、MIDIバッファに蓄積されたMIDIイベン
トのうちチャネル番号が録音チャネルと一致するものが
選択され、RAM5内のバッファトラックエリアのうち
各録音チャネルに対応したトラックに書き込まれる。バ
ッファトラックエリアの内容は、ストップスイッチの押
下により、演奏データメモリエリアの各々対応するトラ
ックに転送される。また、PREモードが設定されてい
る場合には、上述した楽器モードにおける場合と同様、
鍵盤操作によって発生する押鍵イベントに基づいて和音
が決定され、その根音およびコードタイプを指定する情
報がABC処理ルーチンに引き渡される。そして、AB
C処理ルーチンにより、所定の自動演奏パターンに従っ
た伴奏音のノートイベントが順次発生され、MIDIバ
ッファに蓄積される。MIDIバッファに蓄積された伴
奏音のノートイベントはノートイベント処理ルーチンに
引き渡され、ノートイベント処理ルーチンにより、該ノ
ートイベントに対応した楽音が合成され、自動伴奏音が
発音われる。また、POSTモードが設定されている場
合には、鍵盤操作によって発生する押鍵イベントは直接
MIDIバッファに送出され(伴奏鍵域の情報はMID
Iの9チャネル)、MIDI処理、ノートイベント処理
を経て、伴奏鍵域以外の押鍵情報はノート情報について
楽音形成、発音処理がなされる。伴奏鍵域のノート情報
はノートイベント処理ルーチンからABC処理ルーチン
に引き渡され、ここで自動伴奏音が付与される。この
後、この自動伴奏音は伴奏音のノートイベントとしてノ
ートイベント処理ルーチンに再度送出され、楽音形成、
発音処理がなされる。従って、MIDI処理を経てSE
Q(シーケンサ)に記憶されるのは9チャネルに出力さ
れた自動伴奏の基となったノートイベントである。
(3) Recording / playback mode (START =
“1”, REC = “1”) A recording processing routine (not shown in FIG. 3) is executed along with the execution of the MIDI processing routine. As a result, of the MIDI events stored in the MIDI buffer, the one whose channel number matches the recording channel is selected, and is written to the track corresponding to each recording channel in the buffer track area in the RAM 5. The contents of the buffer track area are transferred to the corresponding tracks in the performance data memory area by pressing the stop switch. When the PRE mode is set, similarly to the case of the musical instrument mode described above,
A chord is determined based on a key press event generated by a keyboard operation, and information specifying its root note and chord type is passed to the ABC processing routine. And AB
By the C processing routine, note events of accompaniment sounds according to a predetermined automatic performance pattern are sequentially generated and stored in the MIDI buffer. The note events of the accompaniment sounds stored in the MIDI buffer are transferred to a note event processing routine, and the note event processing routine synthesizes a tone corresponding to the note event, and generates an automatic accompaniment sound. When the POST mode is set, a key press event generated by a keyboard operation is sent directly to the MIDI buffer (information on the accompaniment key range is MID
Through the MIDI processing and the note event processing, the key press information other than the accompaniment key range is subjected to musical tone formation and sound generation processing for the note information. The note information of the accompaniment key range is transferred from the note event processing routine to the ABC processing routine, where an automatic accompaniment sound is added. After that, the automatic accompaniment sound is transmitted again to the note event processing routine as a note event of the accompaniment sound, and the tone formation,
A pronunciation process is performed. Therefore, after MIDI processing, SE
What is stored in Q (sequencer) is the note event that is the basis of the automatic accompaniment output to channel 9.

【0014】(4)エディットモード 操作パネル7における所定の操作子を操作することによ
り、エディットモードが開始される。このエディットモ
ードにおいては、操作パネル7の操作に応じ、RAM5
内の演奏データメモリエリアに記憶された個々の演奏デ
ータが更新される。
(4) Edit Mode By operating a predetermined operation element on the operation panel 7, an edit mode is started. In this edit mode, the RAM 5 is operated in accordance with the operation of the operation panel 7.
The individual performance data stored in the performance data memory area is updated.

【0015】<詳細な動作説明>この自動演奏装置の図
示しない電源スイッチがオン状態にされると、CPU3
は図4にフローを示すメインルーチンを実行する。ま
ず、ステップS401に進み、RAM5内の制御データ
の記憶エリアに初期値を書き込む。次にステップS40
2に進み、図5にフローを示すMIDI処理ルーチンを
開始する。そして、そのステップS501において、M
IDIバッファ内にMIDIイベントがあるか否かを判
断する。この判断結果が「YES」の場合はステップS
502以降の処理を実行してメインルーチンに戻り、
「NO」の場合は何も処理を行わずにメインルーチンに
戻る。次にメインルーチンに戻るとステップS403に
進み、図6にフローを示す外部MIDI処理ルーチンを
開始する。そして、そのステップS601において、M
IDIインターフェイス6を介して外部装置からのMI
DIイベントを受信したか否かを判断する。この判断結
果が「YES」の場合はステップS602以降の処理を
実行してメインルーチンに戻り、「NO」の場合は何も
処理を行わずにメインルーチンに戻る。次にメインルー
チンに戻るとステップS404に進み、図7にフローを
示す鍵処理ルーチンを開始する。そして、そのステップ
S701において、鍵インターフェイス2の出力状態を
走査する。次にステップS702に進み、鍵盤1の鍵が
操作されたことを示す鍵イベントが鍵インターフェイス
2を介して検出されたか否かを判断する。この判断結果
が「YES」の場合はステップS703を実行してメイ
ンルーチンに戻り、「NO」の場合はステップS703
を実行しないでメインルーチンに戻る。次にメインルー
チンに戻るとステップS405に進み、発音チャネル処
理を実行する。この発音チャネル処理は、詳述しない
が、楽音合成回路9の各発音チャネルのうち発音中の楽
音のレベルが所定値以下になった発音チャネルの番号k
を検出し、この検出した発音チャネルに対応したチャネ
ルステータスレジスタST(k)に対し、空きチャネル
を意味する情報「0」を書き込むものである。次にステ
ップS406に進み、図11にフローを示すシーケンス
データエディットルーチンを開始する。そして、そのス
テップS1101において、RAM5内の更新すべき演
奏データを指示するエディトポイントイベントが入力さ
れたか否かを判断する。この判断結果が「Yes」の場
合はステップS1102以降の処理を実行してメインル
ーチンに戻り、「No」の場合はそのままメインルーチ
ンに戻る。次にメインルーチンに戻ると、ステップS4
07に進み、図8にフローを示すパネル処理ルーチンを
開始する。そして、そのステップS801において、操
作パネルインターフェイス8の出力状態を走査する。次
にステップS802に進み、操作パネル7における操作
子が操作されたことを示すパネルイベントが操作パネル
インターフェイス8を介して検出されたか否かを判断す
る。この判断結果が「YES」の場合はステップS80
3に進んで検出されたパネルイベントに対応したルーチ
ンを実行してメインルーチンに戻り、「NO」の場合は
ステップS803を介さずにメインルーチンに戻る。以
後、CPU3はステップS402〜S407を繰り返
す。
<Detailed Description of Operation> When a power switch (not shown) of the automatic performance device is turned on, the CPU 3
Executes a main routine whose flow is shown in FIG. First, the process proceeds to step S401, where an initial value is written to the control data storage area in the RAM 5. Next, step S40
The program proceeds to step 2 to start a MIDI processing routine whose flow is shown in FIG. Then, in step S501, M
It is determined whether or not there is a MIDI event in the IDI buffer. If the result of this determination is "YES", then step S
Execute the processing after 502 and return to the main routine,
If "NO", the process returns to the main routine without performing any processing. Next, when the process returns to the main routine, the process proceeds to step S403, and an external MIDI processing routine whose flow is shown in FIG. 6 is started. Then, in step S601, M
MI from an external device via the IDI interface 6
It is determined whether a DI event has been received. If the result of the determination is "YES", the processing after step S602 is executed and the process returns to the main routine. If "NO", the process returns to the main routine without performing any processing. Next, when the process returns to the main routine, the process proceeds to step S404 to start a key processing routine whose flow is shown in FIG. Then, in step S701, the output state of the key interface 2 is scanned. In step S702, it is determined whether a key event indicating that a key on the keyboard 1 has been operated is detected via the key interface 2. If the result of this determination is "YES", step S703 is executed and the process returns to the main routine; if "NO", step S703 is executed.
Without returning to the main routine. Next, when the process returns to the main routine, the process proceeds to step S405, where a sound channel process is executed. Although not described in detail, this sounding channel processing is not limited to the sounding channel number k of the sounding channel of the sounding synthesizing circuit 9 in which the level of the sounding sound being sounded has fallen below a predetermined value.
Is detected, and information "0" indicating an empty channel is written into the channel status register ST (k) corresponding to the detected sounding channel. Next, the process proceeds to step S406, where a sequence data edit routine whose flow is shown in FIG. 11 is started. Then, in step S1101, it is determined whether or not an edit point event indicating performance data to be updated in the RAM 5 has been input. If the result of this determination is "Yes", the processing after step S1102 is executed and the process returns to the main routine, and if "No", the process returns to the main routine as it is. Next, when returning to the main routine, step S4
In step 07, a panel processing routine whose flow is shown in FIG. 8 is started. Then, in step S801, the output state of the operation panel interface 8 is scanned. Next, the process proceeds to step S802, and it is determined whether or not a panel event indicating that an operator on the operation panel 7 has been operated has been detected via the operation panel interface 8. If the result of this determination is “YES”, step S80
Proceeding to step 3, execute a routine corresponding to the detected panel event and return to the main routine. If "NO", return to the main routine without step S803. Thereafter, the CPU 3 repeats steps S402 to S407.

【0016】CPU3は、一定期間が経過する毎に、そ
の時点において実行中の処理を中断し、図21に示す割
込処理ルーチンを実行する。まず、ステップS2101
に進み、他の割込要求を受け付けないように割込制御用
のフラグに割込不許可に対応した情報を書き込む。次に
ステップS2102に進み、ABC用カウントレジスタ
ABCCNTの内容が「0」になったか否かを判断す
る。この判断結果が「YES」の場合はステップS21
03に進んで図20にフローを示すABC処理ルーチン
を実行しステップS2104に進む。一方、ステップS
2102の判断結果が「NO」の場合はステップS21
03を実行することなくステップS2104に進む。次
にステップS2104に進むと、ABC用カウントレジ
スタABCCNTの内容を「1」だけデクリメントす
る。次にステップS2105に進み、スタートフラグS
TARTの内容が“1”であるか否か、すなわち、自動
演奏中か否かを判断する。この判断結果が「YES」の
場合は、ステップS2106に進んで図21にフローを
示す再生処理ルーチンを実行し、ステップS2107に
進む。一方、ステップS2105の判断結果が「NO」
の場合はステップS2106を実行しないでステップS
2107に進む。次にステップS2107に進むと、割
込制御用のフラグに割込許可に対応した情報を書き込
む。そして、CPU3は、この割込処理ルーチンを終了
し中断していた処理を再開する。
The CPU 3 interrupts the processing being executed at that point of time every time a predetermined period elapses, and executes an interrupt processing routine shown in FIG. First, step S2101
Then, the information corresponding to the non-permission of the interrupt is written into the interrupt control flag so as not to accept another interrupt request. The process advances to step S2102 to determine whether the content of the ABC count register ABCCNT has become "0". If the result of this determination is “YES”, step S21
The program proceeds to 03, executes an ABC processing routine whose flow is shown in FIG. 20, and proceeds to step S2104. On the other hand, step S
If the determination result in 2102 is “NO”, step S21
No. 03, and the process advances to step S2104. Next, in step S2104, the content of the ABC count register ABCCNT is decremented by "1". Next, the process proceeds to step S2105, where the start flag S
It is determined whether or not the content of TART is "1", that is, whether or not the automatic performance is being performed. If the result of this determination is “YES”, the flow proceeds to step S2106 to execute the reproduction processing routine shown in the flow of FIG. 21, and then proceeds to step S2107. On the other hand, the determination result of step S2105 is “NO”
In the case of, step S2106 is not executed and step S2106 is executed.
Proceed to 2107. Next, in step S2107, the information corresponding to the interruption permission is written in the flag for interruption control. Then, the CPU 3 ends this interrupt processing routine and resumes the interrupted processing.

【0017】(1)楽器モード 初期化処理(メインルーチンのステップS401)が実
行されると、スタートフラグSTART、レコードフラ
グRECに共に“0”が書き込まれ、この自動演奏装置
の動作モードは楽器モードとなる。以下、この自動演奏
装置の楽器モード時の動作を説明する。
(1) Musical Instrument Mode When the initialization processing (step S401 of the main routine) is executed, "0" is written to both the start flag START and the record flag REC, and the operation mode of the automatic performance apparatus is set to the musical instrument mode. Becomes The operation of the automatic performance device in the musical instrument mode will be described below.

【0018】キーボードチャネル設定 この自動演奏装置において、鍵盤1から検出される鍵イ
ベントおよび操作パネル7の操作によって生じるパネル
イベントは、キーボードチャネルに対応したMIDIイ
ベントに変換されて取り扱われる。演奏者は、鍵盤演奏
を行うに際し、キーボードチャネル指定スイッチBM1
〜BM16における所望のチャネル番号に対応したスイッ
チを押下し、キーボードチャネルの設定を行う。キーボ
ードチャネル指定スイッチに対する操作が行われると、
その操作に対応したパネルイベントが操作パネルインタ
ーフェイス8によって検出される。この結果、メインル
ーチンのステップS406を介してパネル処理ルーチン
のステップS802に進んだ時、その判断結果が「YE
S」となってステップS803に進む。そして、ステッ
プS803において、図9にフローを示すキーボードチ
ャネルスイッチ処理ルーチンを実行する。まず、ステッ
プS901に進み、現在押下されているキーボードチャ
ネル指定スイッチの他に別のキーボードチャネル指定ス
イッチが押下されているか否かを判断する。演奏者が1
個のキーボードチャネル指定スイッチBMkのみを押下
している場合はステップS901の判断結果は「NO」
となってステップS902に進み、キーボードチャネル
指定用のLEDランプLM1〜LM16をすべて消灯す
る。次にステップS903に進み、チャネル数レジスタ
LASTに「1」を書き込む。次にキーボードチャネル
指定レジスタKBSW(i)(i=1〜NMAX)のう
ちチャネル数レジスタLASTによって指定されるレジ
スタKBSW(LAST)(この場合、KBSW
(1))に対し、押下されたキーボードチャネル指定ス
イッチBMkの番号kを書き込む。このようにして、チ
ャネル番号kがキーボードチャネルの番号として設定さ
れる。次いでステップS906に進み、設定されたキー
ボードチャネルの番号kに対応したLEDランプBMk
を点灯させる。そして、パネル処理ルーチンを介してメ
インルーチンに戻る。
Keyboard Channel Setting In this automatic performance apparatus, key events detected from the keyboard 1 and panel events generated by operating the operation panel 7 are handled by being converted into MIDI events corresponding to the keyboard channels. When performing the keyboard, the player performs a keyboard channel designation switch BM 1
Press the switch corresponding to the desired channel number in BM 16 to set the keyboard channel. When an operation is performed on the keyboard channel designation switch,
A panel event corresponding to the operation is detected by the operation panel interface 8. As a result, when the process proceeds to step S802 of the panel processing routine via step S406 of the main routine, the determination result is “YE
S ”, and proceeds to step S803. Then, in step S803, a keyboard channel switch processing routine whose flow is shown in FIG. 9 is executed. First, the process proceeds to step S901, and it is determined whether or not another keyboard channel designation switch is pressed in addition to the currently pressed keyboard channel designation switch. 1 player
If you are pressed only pieces of the keyboard channel designated switch BM k determination result in step S901 is "NO"
It becomes proceeds to step S902, the turned off all the LED lamp LM 1 to L m 16 for the specified keyboard channel. Next, the process proceeds to step S903, where "1" is written to the channel number register LAST. Next, a register KBSW (LAST) (in this case, KBSW (LAST)) designated by the channel number register LAST among the keyboard channel designation registers KBSW (i) (i = 1 to NMAX)
(1)) to write the number k of the keyboard channel designated switch BM k which has been pressed. In this way, the channel number k is set as the keyboard channel number. Next, in step S906, LED lamp BM k corresponding to the number k of the set keyboard channel
Lights up. Then, the process returns to the main routine via the panel processing routine.

【0019】また、この自動演奏装置においては複数の
MIDIチャネルをキーボードチャネルとして設定する
ことができる。この場合、演奏者は第1番目のキーボー
ドチャネル指定スイッチを押下した後、そのスイッチか
ら指を離す前に第2番目のキーボードチャネル指定スイ
ッチを押下する。この場合、上記の通りキーボードチャ
ネルスイッチ処理ルーチンが実行されることにより、ま
ず、第1番目のキーボードチャネル指定スイッチに対応
したキーボードチャネルの番号がレジスタKBSW
(1)に書き込まれる。その後、キーボードチャネルス
イッチ処理ルーチンに進んだ時に第2番目のキーボード
チャネル指定スイッチが押下されていることからステッ
プS901の判断結果が「YES」となってステップS
904に進み、チャネル数レジスタLASTをインクリ
メントする。そして、ステップS905に進み、第2番
目のキーボードチャネルの番号をレジスタKBSW(L
AST)(この場合、KBSW(2))に書き込む。そ
して、LEDランプBMk(k=1〜16)のうちレジ
スタKBSW(1)およびKBSW(2)の内容に対応
したを各LEDランプを点灯させ(ステップS80
6)、パネル処理ルーチンを介してメインルーチンに戻
る。さらにキーボードチャネルとして設定すべきチャネ
ル番号がある場合、演奏者は現在押下中のキーボードチ
ャネル指定スイッチから指を離す前に新たなキーボード
チャネル指定スイッチを押下するという方法により、所
望のチャネル番号を順次入力する。この結果、上述と同
様の処理が繰り返され、キーボードチャネル指定レジス
タKBSW(k)(k=1〜LAST)に対し、すべて
のキーボードチャネル番号が書き込まれ、それらのチャ
ネル番号に対応したLEDランプが点灯する。
In this automatic performance apparatus, a plurality of MIDI channels can be set as keyboard channels. In this case, after the player presses the first keyboard channel designation switch, he / she presses the second keyboard channel designation switch before releasing his / her finger from the switch. In this case, by executing the keyboard channel switch processing routine as described above, first, the number of the keyboard channel corresponding to the first keyboard channel designation switch is set in the register KBSW.
Written to (1). Thereafter, when the process proceeds to the keyboard channel switch processing routine, the second keyboard channel designation switch is pressed down, so that the determination result in step S901 becomes “YES” and the step S901 is executed.
Proceeding to 904, the channel number register LAST is incremented. Then, the process proceeds to step S905, where the number of the second keyboard channel is set in the register KBSW (L
AST) (in this case, KBSW (2)). Then, among the LED lamps BM k (k = 1 to 16), each LED lamp corresponding to the contents of the registers KBSW (1) and KBSW (2) is turned on (step S80).
6) Return to the main routine via the panel processing routine. Further, when there is a channel number to be set as a keyboard channel, the player sequentially inputs a desired channel number by pressing a new keyboard channel designation switch before releasing the finger from the currently pressed keyboard channel designation switch. I do. As a result, the same processing as described above is repeated, and all keyboard channel numbers are written into the keyboard channel designation register KBSW (k) (k = 1 to LAST), and the LED lamps corresponding to those channel numbers are turned on. I do.

【0020】音色、ボリューム等の設定 操作パネル7における音色設定、ボリューム設定等のた
めの各種操作子が操作されると、その操作に対応したパ
ネルイベントが操作パネルインターフェイス8によって
検出される。この結果、パネル処理ルーチンのステップ
S803において、操作された操作子に対応したルーチ
ンが実行され、音色設定、ボリューム設定等のためのチ
ャネルイベントが作成され、キーボードチャネルに対応
したMIDIイベントとしてMIDIバッファに書き込
まれる。この結果、MIDI処理ルーチンが実行された
時、そのステップS501の判断結果が「YES」とな
り、ステップS502に進む。そして、MIDIバッフ
ァからMIDIイベントを取り出してイベントレジスタ
EVに書き込むと共に取り出したMIDIイベントのチ
ャネル番号をMIDIチャネルレジスタMCHに書き込
む。次にステップS503に進み、イベントレジスタE
V内のMIDIイベントがノートイベントか否かを判断
する。イベントレジスタEV内に音色設定、ボリューム
設定等のためのチャネルイベントが記憶されている場合
はこの判断結果が「NO」となり、ステップS505に
進む。そして、チャネルイベント処理ルーチン(詳細な
フローは図示略)を実行し、イベントレジスタEV内の
チャネルイベントを楽音合成回路9へ送る。このチャネ
ルイベントは楽音合成回路9により、当該MIDIチャ
ネルに対応した楽音制御用のパラメータとして保持さ
れ、以後、当該MIDIチャネルに対応した発音指示が
CPU3から与えられた場合に楽音の制御に使用され
る。チャネルイベント処理ルーチン(ステップS50
5)が終了すると、ステップS506に進み、レコード
フラグRECが“1”か否かを判断する。この判断結果
が「NO」の場合はメインルーチンに戻る。
Setting of tone color, volume, etc. When various controls for tone color setting, volume setting, etc. on the operation panel 7 are operated, a panel event corresponding to the operation is detected by the operation panel interface 8. As a result, in step S803 of the panel processing routine, a routine corresponding to the operated operator is executed, a channel event for tone setting, volume setting, and the like is created, and a MIDI event corresponding to a keyboard channel is stored in the MIDI buffer. Written. As a result, when the MIDI processing routine is executed, the determination result of step S501 becomes “YES”, and the process proceeds to step S502. Then, a MIDI event is extracted from the MIDI buffer and written into the event register EV, and the channel number of the extracted MIDI event is written into the MIDI channel register MCH. Next, the process proceeds to step S503, where the event register E
It is determined whether or not the MIDI event in V is a note event. If a channel event for tone setting, volume setting, etc. is stored in the event register EV, the result of this determination is "NO" and the flow proceeds to step S505. Then, a channel event processing routine (detailed flow is not shown) is executed, and the channel event in the event register EV is sent to the tone synthesis circuit 9. The channel event is held by the tone synthesis circuit 9 as a tone control parameter corresponding to the MIDI channel. Thereafter, when a tone generation instruction corresponding to the MIDI channel is given from the CPU 3, the channel event is used for tone control. . Channel event processing routine (step S50)
When 5) ends, the process advances to step S506 to determine whether the record flag REC is "1". If the determination is "NO", the process returns to the main routine.

【0021】自動伴奏に関する動作モードの設定 演奏者がABCスイッチ71を押下すると、その操作に
対応したパネルイベントが検出され、パネルスイッチ処
理ルーチンのステップS803において図10にフロー
を示すABCスイッチ処理ルーチンが実行される。ま
ず、ステップS1001に進み、モードフラグPREの
内容が“1”か否かを判断する。この判断結果が「N
O」の場合はステップS1002に進み、モードフラグ
POSTの内容が“1”か否かを判断する。この判断結
果が「NO」の場合、すなわち、ABCスイッチ71が
押下される前のABCモードがOFFモード(PRE=
“0”、POST=“0”)であった場合にはステップ
S1003に進み、モードフラグPREに“1”を書き
込む。この結果、ABCモードとしてPREモード(P
RE=“1”、POST=“0”)が設定される。次に
ステップS1004に進み、PREモードに対応したL
EDランプ72を点灯させ、メインルーチンに戻る。P
REモード(PRE=“1”、POST=“0”)が設
定された状態において、ABCスイッチ71が押下され
ると、ABCスイッチ処理ルーチンのステップS100
1の判断結果が「YES」となり、ステップS1007
に進む。そして、モードフラグPREに“0”を、モー
ドフラグPOSTに“1”を書き込むことにより、AB
CモードとしてPOSTモードを設定する。次にステッ
プS1008に進み、LEDランプ72を消灯させると
共にPOSTモードに対応したLEDランプ73を点灯
させ、メインルーチンに戻る。POSTモード(PRE
=“0”、POST=“1”)が設定された状態におい
てABCスイッチ71が押下されると、ABCスイッチ
処理ルーチンにおけるステップS1001の判断結果が
「NO」、ステップS1002の判断結果が「YES」
となってステップS1005に進む。そして、モードフ
ラグPOSTに書き込むことにより、ABCモードとし
てOFFモード(PRE=“0”、POST=“0”)
を設定する。次にステップS1006に進み、LEDラ
ンプ73を消灯させ、メインルーチンに戻る。以後同様
に、ABCスイッチが押下される毎にABCモードはP
RE→POST→OFF→PRE→…というように変化
する。
When the player presses the ABC switch 71, a panel event corresponding to the operation is detected. In step S803 of the panel switch processing routine, the ABC switch processing routine shown in FIG. Be executed. First, the process proceeds to step S1001, where it is determined whether the content of the mode flag PRE is "1". The result of this determination is “N
In the case of "O", the flow proceeds to step S1002, and it is determined whether or not the content of the mode flag POST is "1". If this determination result is “NO”, that is, the ABC mode before the ABC switch 71 is pressed is set to the OFF mode (PRE =
If “0”, POST = “0”), the flow advances to step S1003 to write “1” to the mode flag PRE. As a result, the PRE mode (P
RE = "1", POST = "0") are set. Next, the process proceeds to step S1004, where L corresponding to the PRE mode is set to L.
The ED lamp 72 is turned on, and the process returns to the main routine. P
When the ABC switch 71 is pressed while the RE mode (PRE = "1", POST = "0") is set, step S100 of the ABC switch processing routine is performed.
1 is “YES”, and the result in the step S1007 is increased.
Proceed to. By writing “0” to the mode flag PRE and “1” to the mode flag POST, AB
The POST mode is set as the C mode. Next, in step S1008, the LED lamp 72 is turned off, the LED lamp 73 corresponding to the POST mode is turned on, and the process returns to the main routine. POST mode (PRE
= “0”, POST = “1”), when the ABC switch 71 is pressed, the determination result of step S1001 in the ABC switch processing routine is “NO”, and the determination result of step S1002 is “YES”.
And the process proceeds to step S1005. Then, by writing into the mode flag POST, the OFF mode is set as the ABC mode (PRE = "0", POST = "0").
Set. Next, the process proceeds to step S1006, where the LED lamp 73 is turned off, and the process returns to the main routine. Thereafter, similarly, every time the ABC switch is pressed, the ABC mode is set to P
It changes in the order of RE → POST → OFF → PRE →.

【0022】テンポ設定 演奏者がテンポ設定用のインクリメントキー32あるい
はデクリメントキー33を押下すると、これらのキーが
操作されたことを示すパネルイベントが操作パネルイン
ターフェイス8を介して検出される。この結果、CPU
3はパネル処理ルーチンのステップS802において、
図14にフローを示すテンポ設定ルーチンに進み、イン
クリメントキー32あるいはデクリメントキー33の操
作に応じてテンポレジスタTEMPO内のテンポデータ
を増減させ(ステップS1401)、テンポレジスタT
EMPOの内容を操作パネルインターフェイス8に送っ
て表示器31に表示させる(ステップS1402)。そ
して、テンポ設定ルーチンを終了し、パネル処理ルーチ
ンを介してメインルーチンに戻る。以後、新たにテンポ
レジスタTEMPOに書き込まれたテンポデータに基づ
いて、メトロノーム音の発生タイミングの制御が行われ
る。
Tempo setting When the player presses the increment key 32 or the decrement key 33 for tempo setting, a panel event indicating that these keys have been operated is detected via the operation panel interface 8. As a result, the CPU
3 in step S802 of the panel processing routine
The process proceeds to a tempo setting routine shown in FIG. 14, in which the tempo data in the tempo register TEMPO is increased or decreased according to the operation of the increment key 32 or the decrement key 33 (step S1401).
The contents of the EMPO are sent to the operation panel interface 8 and displayed on the display 31 (step S1402). Then, the tempo setting routine ends, and the process returns to the main routine via the panel processing routine. Thereafter, based on the tempo data newly written to the tempo register TEMPO, the timing of the generation of the metronome sound is controlled.

【0023】鍵盤演奏における動作 演奏者が鍵盤1におけるいずれかの鍵を押下すると、そ
の鍵に対応した押鍵イベントが鍵インターフェイス2を
介して検出される。この結果、メインルーチンのステッ
プS404を介して鍵処理ルーチンに進んだ時、そのス
テップS702の判断結果が「YES」となってステッ
プS703に進む。そして、押鍵イベントに対応したノ
ートオンイベントを、その時点において設定されたすべ
てのキーボードチャネルKBSW(i)(i=1〜LA
ST)について作成し、各々内部MIDIイベントとし
てMIDIバッファに書き込む。次にステップS704
に進み、モードフラグPREの内容が“1”か否かを判
断する。この判断結果が「YES」の場合はステップS
705に進み、現在検知されている押鍵イベントに基づ
いて和音を決定し、その和音の根音およびコードタイプ
を表す各データを根音レジスタROOTおよびコードタ
イプレジスタTYPEに各々書き込み、メインルーチン
に戻る。一方、ステップS704の判断結果が「NO」
の場合はステップS706に進み、POST=“1”で
あり、ステップS703において作成したノートオンイ
ベントが伴奏鍵域のノートオンイベントである場合は、
そのノートイベントをチャネル番号「9」のMIDIイ
ベントとしてMIDIバッファに書き込み、メインルー
チンに戻る。
Operation in Keyboard Performance When a player presses any key on the keyboard 1, a key press event corresponding to the key is detected via the key interface 2. As a result, when the process proceeds to the key processing routine via step S404 of the main routine, the result of the determination in step S702 is “YES” and the process proceeds to step S703. Then, the note-on event corresponding to the key press event is sent to all the keyboard channels KBSW (i) (i = 1 to LA) set at that time.
ST) and writes them to the MIDI buffer as internal MIDI events. Next, step S704
To determine whether the content of the mode flag PRE is "1". If the result of this determination is "YES", then step S
Proceeding to 705, a chord is determined based on the currently detected key press event, each data representing the root and chord type of the chord is written to the root register ROOT and the chord type register TYPE, and the process returns to the main routine. . On the other hand, the determination result of step S704 is “NO”
In step S706, if POST = "1" and the note-on event created in step S703 is a note-on event in the accompaniment key range,
The note event is written to the MIDI buffer as a MIDI event of channel number "9", and the process returns to the main routine.

【0024】このようにしてノートオンイベントがMI
DIバッファに書き込まれると、MIDI処理ルーチン
が起動された時、そのステップS501の判断結果が
「YES」となってステップS502に進む。そして、
MIDIバッファ内の内部MIDIイベントのうち1つ
を取り出してイベントレジスタEVに書き込むと共に、
取り出したMIDIイベントのチャネル番号をMIDI
チャネルレジスタMCHに書き込む。次いでステップS
503に進み、イベントレジスタEVに格納されたイベ
ントがノートイベントか否かを判断する。ステップS5
02においてMIDIバッファからノートオンイベント
を取り出しイベントレジスタEVに書き込んだ場合に
は、ステップS503の判断結果は「YES」となって
ステップS504に進む。そして、図13にフローを示
すノートイベント処理ルーチンを実行する。
As described above, when the note-on event is set to MI
When the data is written into the DI buffer, when the MIDI processing routine is started, the determination result in step S501 becomes “YES” and the process proceeds to step S502. And
While taking out one of the internal MIDI events in the MIDI buffer and writing it to the event register EV,
MIDI channel number of MIDI event
Write to channel register MCH. Then step S
Proceeding to 503, it is determined whether or not the event stored in the event register EV is a note event. Step S5
If the note-on event is extracted from the MIDI buffer and written to the event register EV in 02, the determination result of step S503 becomes "YES" and the process proceeds to step S504. Then, a note event processing routine whose flow is shown in FIG. 13 is executed.

【0025】まず、ステップS1501に進み、イベン
トレジスタEVに格納されたノートオンイベントにおけ
るノートコードをノートコードレジスタNCに書き込
む。次にステップS1502に進み、同ノートオンイベ
ントにおけるノートベロシティをノートベロシティレジ
スタNVに書き込む。次にステップS1503に進み、
イベントレジスタEVに格納されているのがノートオン
イベントか否かを判断する。この場合、ステップS15
03の判断結果は「YES」となってステップS150
4に進み、チャネルステータスレジスタST(k)(k
=1〜28)のうち、内容が「0」であるレジスタがあ
るか否か、すなわち、楽音合成回路9の全発音チャネル
のうち発音を行っていない空きチャネルがあるか否かを
判断する。この判断結果が「YES」の場合はステップ
S1505に進み、「NO」の場合はステップS152
1に進む。次にステップS1505に進むと、空きチャ
ネルのうちいずれか1つのチャネル番号を発音割当レジ
スタACHに書き込む。次いでステップS1506に進
み、発音割当レジスタACHの内容に対応したチャネル
ステータスレジスタST(ACH)に対し、押鍵中のチ
ャネルであることを示す情報「1」を書き込む。次いで
ステップS1507に進み、発音割当レジスタACHに
よって指定される発音チャネル別ノートコードレジスタ
STNC(ACH)にノートコードレジスタNCの内容
を書き込む。次いでステップS1508に進み、発音割
当チャネルレジスタACHによって指定される発音チャ
ネル別MIDIチャネル番号レジスタAMC(ACH)
にMIDIチャネルレジスタMCHの内容を書き込む。
次にステップS1509に進み、CPU3は楽音合成回
路9における前述のACHに対応した発音チャネルに対
し、MIDIチャネルレジスタMCHに格納されたMI
DIチャネル番号、ノートコードレジスタNCに格納さ
れたノートコード、ノートベロシティレジスタNVに格
納されたノートベロシティ、および発音を指示するノー
トオン信号を送る。この結果、楽音合成回路9の発音チ
ャネルACHにより、CPU3から与えられたノートコ
ードおよびノートベロシティに対応した楽音が形成され
発音される。ここで、楽音合成回路9は、前述したよう
に各MIDIチャネル毎に音色およびボリューム等の制
御パラメータを記憶しており、これらの制御パラメータ
のうちCPU3から与えられたMIDIチャネル番号に
対応したものを用いて楽音形成の制御を行う。
First, the flow advances to step S1501 to write the note code in the note-on event stored in the event register EV into the note code register NC. Next, the flow advances to step S1502 to write the note velocity in the note-on event into the note velocity register NV. Next, the process proceeds to step S1503,
It is determined whether or not the event stored in the event register EV is a note-on event. In this case, step S15
03 is "YES", and the result of step S150 is "YES".
4 and the channel status register ST (k) (k
= 1 to 28), it is determined whether or not there is a register whose content is “0”, that is, whether or not there is an empty channel that is not sounding among all sounding channels of the tone synthesis circuit 9. If this determination is "YES", the flow proceeds to step S1505. If "NO", the process proceeds to step S152.
Proceed to 1. Next, in step S1505, any one of the available channels is written to the tone generation assignment register ACH. Next, the process proceeds to step S1506, where information "1" indicating that the channel is being depressed is written to the channel status register ST (ACH) corresponding to the contents of the tone generation assignment register ACH. Next, in step S1507, the contents of the note code register NC are written to the note code register STNC (ACH) for each sounding channel specified by the sounding assignment register ACH. Next, the flow advances to step S1508 to generate a MIDI channel number register AMC (ACH) for each sounding channel specified by the sounding assignment channel register ACH.
Is written in the MIDI channel register MCH.
Next, the process proceeds to step S1509, where the CPU 3 sets the MIDI channel stored in the MIDI channel register MCH for the sound generation channel corresponding to the above-described ACH in the tone synthesis circuit 9.
It sends a DI channel number, a note code stored in the note code register NC, a note velocity stored in the note velocity register NV, and a note-on signal for instructing sound generation. As a result, a tone corresponding to the note code and the note velocity given from the CPU 3 is formed and emitted by the tone generation channel ACH of the tone synthesis circuit 9. Here, the tone synthesis circuit 9 stores control parameters such as timbre and volume for each MIDI channel as described above. To control the formation of musical tones.

【0026】次にステップS1521に進むと、モード
フラグPOSTの内容が“1”か否かを判断する。この
判断結果が「YES」の場合はステップS1522に進
み、「NO」の場合はMIDI処理ルーチンに戻る。次
にステップS1522に進むと、MIDIチャネルレジ
スタMCHの内容が「9」か否かを判断する。この判断
結果が「YES」の場合はステップS1523に進んで
ノートコードレジスタNC内のノートコードに基づいて
和音を決定し、その和音の根音およびコードタイプを表
す各データを根音レジスタROOTおよびコードタイプ
レジスタTYPEに各々書き込む。そして、ノートイベ
ント処理ルーチンを終了してMIDI処理ルーチンに戻
る。一方、ステップS1522の判断結果が「NO」の
場合はステップS1523を実行することなくMIDI
処理ルーチンに戻る。そして、MIDI処理ルーチンに
戻るとそのステップS506において、レコードフラグ
RECの内容が“1”か否かを判断する。この判断結果
が「NO」の場合はメインルーチンに戻る。
Next, in step S1521, it is determined whether or not the content of the mode flag POST is "1". If the determination is "YES", the flow proceeds to step S1522. If the determination is "NO", the flow returns to the MIDI processing routine. Next, in step S1522, it is determined whether the content of the MIDI channel register MCH is "9". If this determination result is "YES", the flow proceeds to step S1523 to determine a chord based on the note code in the note code register NC, and stores each data representing the root and chord type of the chord in the root register ROOT and the chord. Write to each of the type registers TYPE. Then, the note event processing routine is ended and the processing returns to the MIDI processing routine. On the other hand, if the decision result in the step S1522 is "NO", the step S1523 is executed without executing the MIDI.
Return to the processing routine. Then, when returning to the MIDI processing routine, in step S506, it is determined whether or not the content of the record flag REC is "1". If the determination is "NO", the process returns to the main routine.

【0027】次に演奏者が鍵盤1における押下していた
鍵を離すと、その鍵に対応した離鍵イベントが鍵インタ
ーフェイス2を介して検出される。この結果、メインル
ーチンのステップS404から鍵処理ルーチンに進んだ
時、そのステップS702の判断結果が「YES」とな
って、前述の押鍵イベントの場合と同様、ステップS7
03、メインルーチンのステップS402、MIDI処
理ルーチンのステップS501、ステップS502、ス
テップS503を経てステップS504に進み、ノート
イベント処理ルーチンを実行する。そして、イベントレ
ジスタEVに格納されたノートオフイベントのノートコ
ードをノートコードレジスタNCに書き込み(ステップ
S1501)、同ノートオフイベントにおけるノートベ
ロシティをノートベロシティレジスタNVに書き込む
(ステップS1502)。
Next, when the player releases the key pressed on the keyboard 1, a key release event corresponding to the key is detected via the key interface 2. As a result, when proceeding to the key processing routine from step S404 of the main routine, the result of the determination in step S702 is "YES", and step S7 is performed in the same manner as in the case of the key press event described above.
03, step S402 of the main routine, step S501, step S502, and step S503 of the MIDI processing routine, and the process proceeds to step S504 to execute the note event processing routine. Then, the note code of the note-off event stored in the event register EV is written to the note code register NC (step S1501), and the note velocity in the note-off event is written to the note velocity register NV (step S1502).

【0028】ノートオフイベントの場合は、ステップS
1503の判断結果は「NO」となってステップS15
10に進み、発音チャネル別ノートコードレジスタST
NC(k)(k=1〜28)およびチャネルステータス
レジスタST(k)(k=1〜28)の各記憶内容を順
次判定し、STNC(k)=NCであり、かつ、ST
(k)=(1)を満足する番号kがあるか否か、すなわ
ち、ノートコードNCに対応した楽音を発音中であり、
かつ、ノートオン状態にある発音チャネルがあるか否か
を判断する。この判断結果が「YES」の場合はステッ
プS1511に進み、「NO」の場合はステップS15
21に進む。次にステップS1511に進むと、ステッ
プS1510において見つけ出された発音チャネルの番
号kを発音割当レジスタACHに書き込む。次いでステ
ップS1512に進み、発音割当レジスタACHによっ
て指定されるチャネルステータスレジスタST(AC
H)に発音中であるが離鍵されていることを示す情報
「2」を書き込む。次いでステップS1513に進み、
楽音合成回路9における発音割当レジスタACHによっ
て指定される発音チャネルに対し、ノートオフ情報NO
FFを送る。これにより、発音チャネルACHにおいて
消音処理が行われる。
In the case of a note-off event, step S
The result of the determination in 1503 is “NO” and the step S15
Proceeding to step 10, note code register ST for each sounding channel
The storage contents of NC (k) (k = 1 to 28) and the channel status register ST (k) (k = 1 to 28) are sequentially determined, and STNC (k) = NC and ST
(K) = whether there is a number k that satisfies (1), that is, a tone corresponding to the note code NC is being produced,
In addition, it is determined whether or not there is a sounding channel in a note-on state. If this determination is "YES", the flow proceeds to step S1511. If "NO", the flow proceeds to step S15.
Proceed to 21. Next, in step S1511, the number k of the sound channel found in step S1510 is written to the sound assignment register ACH. Next, the process proceeds to step S1512, where the channel status register ST (AC
In H), information “2” indicating that the key is being sounded but the key is released is written. Next, the process proceeds to step S1513,
The note-off information NO for the sounding channel specified by the sounding assignment register ACH in the tone synthesis circuit 9
Send FF. As a result, the mute processing is performed in the sounding channel ACH.

【0029】そして、ステップS1521に進むと、P
OST=“1”であり、かつ、MCH=「9」である場
合はステップS1523に進む。そして、ノートオン状
態にあるノートコードが変化した場合は、新たなノート
コードに基づいて根音レジスタROOTおよびコードタ
イプレジスタTYPEの内容を更新し、ノートイベント
処理ルーチンを終了してMIDI処理ルーチンに戻る。
そして、上述した押鍵が行われた場合と同様、ステップ
S506あるいはさらにステップS507を介してメイ
ンルーチンに戻る。
Then, when the flow advances to step S1521, P
If OST = "1" and MCH = "9", the process proceeds to step S1523. When the note code in the note-on state changes, the contents of the root register ROOT and the code type register TYPE are updated based on the new note code, and the note event processing routine ends and returns to the MIDI processing routine. .
Then, as in the case where the key is pressed, the process returns to the main routine via step S506 or further step S507.

【0030】外来MIDIイベントに対する処理 MIDIインターフェイス6を介して外部装置からのM
IDIイベントを受信すると、メインルーチンのステッ
プS403において外部MIDI処理ルーチンに進んだ
時、そのステップS601の判断結果が「YES」とな
り、ステップS602に進む。そして、受信したMID
Iイベントのチャネル番号をチャネル番号レジスタMC
Hへ書き込む。次にステップS603に進み、チャネル
番号MCHに対応した受信チャネルフラグRC(MC
H)の内容が“1”であるか否か、すなわち、受信した
MIDIイベントがこの自動演奏装置において処理すべ
きものであるか否かを判断する。この判断結果が「YE
S」である場合はステップS604に進み、受信したM
IDIイベントをMIDIバッファに書き込み、メイン
ルーチンに戻る。一方、ステップS603の判断結果が
「NO」である場合はステップS604を実行しないで
メインルーチンに戻る。MIDIバッファに書き込まれ
た受信MIDIイベントは、上述した鍵盤演奏あるいは
操作パネルの操作によって生じたMIDIイベントと同
様、MIDI処理ルーチンが実行された時にMIDIバ
ッファから読み出され、楽音合成回路9の制御に使用さ
れる。
Processing for an External MIDI Event M from an external device via the MIDI interface 6
When the IDI event is received, when the process proceeds to the external MIDI processing routine in step S403 of the main routine, the determination result in step S601 is “YES”, and the process proceeds to step S602. And the received MID
The channel number of the I event is stored in the channel number register MC.
Write to H. Next, proceeding to step S603, the reception channel flag RC (MC
It is determined whether or not the content of H) is "1", that is, whether or not the received MIDI event is to be processed in this automatic performance device. The result of this determination is “YE
S ”, the process proceeds to step S604, and the received M
Write the IDI event to the MIDI buffer and return to the main routine. On the other hand, if the decision result in the step S603 is “NO”, the process returns to the main routine without executing the step S604. The received MIDI event written to the MIDI buffer is read out from the MIDI buffer when the MIDI processing routine is executed, and is used for controlling the musical tone synthesizing circuit 9, similarly to the above-mentioned MIDI event generated by playing the keyboard or operating the operation panel. used.

【0031】伴奏音の発生 自動伴奏に関する動作モードとしてPREモードが設定
されると、押鍵操作に応答して伴奏音のMIDIイベン
トが発生され、自動伴奏が行われる。以下、この場合の
動作を説明する。PREモードにおいて、演奏者によっ
て鍵盤1の鍵が押鍵されると、その押鍵イベントに基づ
いて根音およびコードタイプが決定され、根音レジスタ
ROOTおよびコードタイプレジスタTYPEに書き込
まれる。その後、割込処理ルーチンを介しABC処理ル
ーチンが実行されると、まず、ステップS2201に進
み、現在設定されているスタイルに応じて拍カウントレ
ジスタBEATの内容を更新する。次にステップS22
02に進み、ROM4内の自動演奏パターンメモリエリ
アのうち現在設定されているリズムのスタイルに対応し
たエリアから、拍カウントレジスタBEATによって指
定される拍のイベントデータを読み出す。次にステップ
S2203に進み、ステップS2202において読み出
したイベントデータの音高情報を根音レジスタROOT
およびコードタイプレジスタTYPEの内容に基づいて
変更し、和音を構成する各楽音のノートイベントを作成
する。次にステップS2204に進み、モードフラグP
REの内容が“1”か否かを判断する。PREモードの
場合はこの判断結果が「YES」となり、ステップS2
205に進む。そして、ステップS2203において作
成した各ノートイベントをMIDIバッファに書き込
む。ここで、各ノートイベントはチャネル番号「10」
〜「16」のMIDIイベントとしてMIDIバッファ
に書き込まれる。次にステップS2206に進み、モー
ドフラグPOSTの内容が“1”であるか否かを判断す
る。PREモードの場合には、この判断結果が「NO」
となり、ステップS2208に進む。そして、テンポレ
ジスタTEMPOの内容に応じて決定される値をABC
カウントレジスタABCCNTに書き込み、割込処理ル
ーチンに戻る。このようにしてMIDIバッファに書き
込まれた和音発生用のノートイベントは、MIDI処理
ルーチンが実行される際にMIDIバッファから取り出
され、ノートイベント処理ルーチンに引き渡され、和音
を構成する各楽音に対応したパラメータが楽音合成回路
9へ送られ、和音が発音される。以後、ABC処理ルー
チンが実行される毎に上述と同様な処理が行われ、自動
伴奏が行われる。動作モードとしてOFFモードが設定
された場合は、ABC処理ルーチンにおけるステップS
2205およびS2207の各処理はいずれも実行され
ない。従って、伴奏音は発生されない。
Generation of Accompaniment Sound When the PRE mode is set as an operation mode for automatic accompaniment, a MIDI event of an accompaniment sound is generated in response to a key pressing operation, and automatic accompaniment is performed. Hereinafter, the operation in this case will be described. In the PRE mode, when a player presses a key on the keyboard 1, the root note and chord type are determined based on the key press event, and are written to the root register ROOT and the chord type register TYPE. Thereafter, when the ABC processing routine is executed via the interruption processing routine, the process first proceeds to step S2201, and the contents of the beat count register BEAT are updated according to the currently set style. Next, step S22
In step 02, the event data of the beat specified by the beat count register BEAT is read from the area corresponding to the currently set rhythm style in the automatic performance pattern memory area in the ROM 4. Next, proceeding to step S2203, the pitch information of the event data read out in step S2202 is stored in the root register ROOT.
Then, a note event of each musical tone constituting the chord is created by making a change based on the contents of the chord type register TYPE. Next, the process proceeds to step S2204, where the mode flag P
It is determined whether or not the content of the RE is “1”. In the case of the PRE mode, the result of this determination is "YES", and step S2
Proceed to 205. Then, each note event created in step S2203 is written to the MIDI buffer. Here, each note event has a channel number “10”
1616 ”are written to the MIDI buffer as MIDI events. Next, the process advances to step S2206 to determine whether or not the content of the mode flag POST is "1". In the case of the PRE mode, this determination result is “NO”.
, And the process proceeds to step S2208. The value determined according to the contents of the tempo register TEMPO is set to ABC.
Write to the count register ABCCNT, and return to the interrupt processing routine. The note event for generating a chord written in the MIDI buffer in this manner is taken out of the MIDI buffer when the MIDI processing routine is executed, passed to the note event processing routine, and corresponds to each tone constituting the chord. The parameters are sent to the tone synthesis circuit 9, and a chord is generated. Thereafter, each time the ABC processing routine is executed, the same processing as described above is performed, and the automatic accompaniment is performed. If the OFF mode has been set as the operation mode, step S in the ABC processing routine is performed.
Neither of the processes 2205 and S2207 is executed. Therefore, no accompaniment sound is generated.

【0032】(2)再生モード 再生チャネルの設定 RAM5内の演奏データメモリエリアからMIDIイベ
ントを再生して自動演奏を行うに際し、演奏者は再生チ
ャネルを設定する。レコードスイッチ41が押下されて
いない状態においてレコードスイッチフラグRECSW
の内容は“0”となっている。この状態においては、L
EDランプLQi(i=1〜16)のうち、再生チャネ
ルとして設定されているMIDIチャネルの番号に対応
したLEDランプが点灯する。演奏者は、LEDランプ
LQi(i=1〜16)の点灯状態により、どのMID
Iチャネルが再生チャネルとなっているかを確認する。
(2) Playback Mode Setting of Playback Channel When playing a MIDI event from the performance data memory area in the RAM 5 to perform an automatic performance, the performer sets a playback channel. When the record switch 41 is not pressed, the record switch flag RECSW
Is "0". In this state, L
Among the ED lamps LQi (i = 1 to 16), the LED lamp corresponding to the MIDI channel number set as the reproduction channel is turned on. Depending on the lighting state of the LED lamps LQi (i = 1 to 16), the player can determine which MID
Check whether the I channel is a reproduction channel.

【0033】再生チャネルとなっていないMIDIチャ
ネルを新たに再生チャネルとして設定する場合、演奏者
は、シーケンサチャネルスイッチBMi(i=1〜1
6)のうち再生チャネルとしたいチャネルの番号に対応
したスイッチを押下する。このシーケンサチャネルスイ
ッチのオンイベントが操作パネルインターフェイス8を
介して検出されると、CPU3は、パネル処理ルーチン
のステップS803において図14にフローを示すシー
ケンサチャネルスイッチ処理ルーチンを実行する。ま
ず、ステップS1601において、押下されたシーケン
サチャネルスイッチBMiの番号iを変数レジスタNに
書き込む。次いでステップS1602に進み、レコード
スイッチフラグRECSWの内容が“0”であるか否か
を判断する。演奏者がレコードスイッチ41を押下して
いない場合はRECSW=“0”となっており(理由は
後述)、ステップS1602の判断結果が「YES」と
なってステップS1603に進む。そして、MIDIチ
ャネルNに対応した再生フラグRSW(N)の内容が
“1”であるか否かを判断する。MIDIチャネルNが
再生チャネルとして設定されていない場合にはRSW
(N)=“0”となっており、ステップS1603の判
断結果が「NO」となってステップS1604に進む。
そして、レコードフラグRSW(N)に“1”を書き込
む。次いでステップS1605に進み、LEDランプL
Qi(i=1〜16)のうちMIDIチャネルNに対応
したLEDランプLQNを点灯状態とし、パネル処理ル
ーチンを介してメインルーチンに戻る。
When a MIDI channel that is not a reproduction channel is newly set as a reproduction channel, the performer selects a sequencer channel switch BMi (i = 1 to 1).
In 6), press the switch corresponding to the number of the channel to be set as the reproduction channel. When the ON event of the sequencer channel switch is detected via the operation panel interface 8, the CPU 3 executes a sequencer channel switch processing routine shown in FIG. 14 in step S803 of the panel processing routine. First, in step S1601, the number i of the pressed sequencer channel switch BMi is written to the variable register N. Next, the process proceeds to step S1602, and it is determined whether or not the content of the record switch flag RECSW is “0”. If the player has not pressed the record switch 41, RECSW = "0" (the reason will be described later), the result of the determination in step S1602 is "YES", and the flow advances to step S1603. Then, it is determined whether or not the content of the reproduction flag RSW (N) corresponding to the MIDI channel N is "1". If MIDI channel N is not set as a playback channel, RSW
(N) = “0”, the result of the determination in step S1603 is “NO”, and the flow advances to step S1604.
Then, “1” is written to the record flag RSW (N). Next, the process proceeds to step S1605, where the LED lamp L
Qi of the LED lamp LQ N corresponding to the MIDI channel N of the (i = 1 to 16) and a lighting state, returns to the main routine via the panel processing routine.

【0034】再生チャネルとして設定されたMIDIチ
ャネルを再生チャネルから除外したい場合、演奏者はそ
のMIDIチャネルに対応したシーケンサチャネルスイ
ッチBMiを押下する。ここで、MIDIチャネルiが
再生チャネルとして設定されている場合には、PSW
(i)=“1”となっている。この場合、シーケンサチ
ャネルスイッチBMiの押下によってシーケンサチャネ
ルスイッチ処理ルーチンが実行されると、ステップS1
603の判断結果が「NO」となり、ステップS160
7に進む。そして、再生フラグPSW(N)(=PSW
(i))に“0”を書き込む。次いでステップS160
8に進み、LEDランプLQi(i=1〜16)のうち
MIDIチャネルN(=i)に対応したLEDランプL
Nを点灯状態とし、パネル処理ルーチンを介してメイ
ンルーチンに戻る。
To exclude a MIDI channel set as a reproduction channel from the reproduction channels, the player presses the sequencer channel switch BMi corresponding to the MIDI channel. Here, when MIDI channel i is set as a reproduction channel, PSW
(I) = “1”. In this case, when the sequencer channel switch processing routine is executed by pressing the sequencer channel switch BMi, step S1 is executed.
The determination result of Step 603 is “NO”, and Step S160
Go to 7. Then, the reproduction flag PSW (N) (= PSW)
Write (0) to (i)). Next, step S160
8, and among the LED lamps LQi (i = 1 to 16), the LED lamp L corresponding to the MIDI channel N (= i)
The Q N and a lighting state, returns to the main routine via the panel processing routine.

【0035】自動演奏 以上のようにして再生チャネルの設定が終了すると、演
奏者はスタートスイッチ42を押下する。このスタート
スイッチ42のオンイベントが操作パネルインターフェ
イス8を介して検出されると、CPU3は、パネル処理
ルーチンのステップS803において図15にフローを
示すスタートスイッチ処理ルーチンを実行する。まず、
ステップS1701において、レコードスイッチフラグ
RECSWの内容が“1”であるか否かを判断する。演
奏者がレコードスイッチ41を押下していない場合には
ステップS1701の判断結果は「NO」となってステ
ップS1702に進む。そして、スタートフラグSTA
RTの内容が“0”であるか否かを判断する。この判断
結果が「YES」である場合、ステップS1703に進
み、スタートフラグSTARTに“1”を書き込む。次
にステップS1704に進み、再生のための初期設定処
理を行う。この初期設定処理により、RAM5内の演奏
デーテメモリエリアの各トラックから最初のデュレーシ
ョンデータが読み出され、各MIDIチャネルiに対応
したデュレーションレジスタDT(i)に書き込まれ
る。また、この初期設定処理においては、再生に必要な
その他の各種ポインタの設定が行われる。そして、パネ
ル処理ルーチンを介しメインルーチンに戻る。なお、ス
タートスイッチ42が押下された時点においてSTAR
T=“1”となっていた場合、すなわち、自動演奏中に
スタートスイッチ42が押下された場合には、スタート
スイッチ処理ルーチンのステップS1702に進んだ
時、その判断結果が「NO」となり、ステップS170
3およびS1704を実行することなく、パネル処理ル
ーチンを介してメインルーチンに戻る。
Automatic Performance When the reproduction channel setting is completed as described above, the player presses the start switch 42. When the ON event of the start switch 42 is detected via the operation panel interface 8, the CPU 3 executes a start switch processing routine shown in FIG. 15 in step S803 of the panel processing routine. First,
In step S1701, it is determined whether the content of the record switch flag RECSW is “1”. If the player has not pressed the record switch 41, the determination result in step S1701 is "NO", and the flow advances to step S1702. Then, the start flag STA
It is determined whether or not the content of RT is “0”. If the result of this determination is "YES", the flow proceeds to step S1703 and "1" is written to the start flag START. Next, the flow advances to step S1704 to perform initialization processing for reproduction. By this initial setting process, the first duration data is read from each track of the performance data memory area in the RAM 5 and written to the duration register DT (i) corresponding to each MIDI channel i. In this initial setting process, other various pointers necessary for reproduction are set. Then, the process returns to the main routine via the panel processing routine. Note that when the start switch 42 is pressed,
If T = “1”, that is, if the start switch 42 is pressed during the automatic performance, when the process proceeds to step S1702 of the start switch processing routine, the determination result is “NO”, and S170
Without executing steps 3 and S1704, the process returns to the main routine via the panel processing routine.

【0036】スタートスイッチ42の押下によってST
ART=“1”とされると、以後、割込処理ルーチンが
実行された場合にステップS2105の判断結果が「Y
ES」となり、ステップS2106において図21にフ
ローを示す再生処理ルーチンが実行される。まず、ステ
ップS2301に進み、変数レジスタiに「1」を初期
設定する。次にステップS2302に進み、デュレーシ
ョンレジスタDT(i)の内容が「0」か否かを判断す
る。この判断結果が「No」の場合はステップS230
6に進み、デュレーションレジスタDT(i)の内容を
「1」だけデクリメントする。次いでステップS230
7に進んで変数レジスタiをインクリメントする。次に
ステップS2308に進み、i>16となったか否かを
判断し、判断結果が「No」の場合はステップS230
2に戻る。一方、ステップS2302の判断結果が「Y
es」の場合、すなわち、MIDIチャネルiに対応し
たデュレーションレジスタDT(i)の内容が「0」と
なった場合にはステップS2303に進み、RAM5に
おけるMIDIチャネルiに対応した演奏データメモリ
エリアのトラックから新たなイベントデータおよびデュ
レーションデータを読み出し、デュレーションデータは
デュレーションレジスタDT(i)に書き込む。次にス
テップS2304に進み、再生フラグPSW(i)の内
容が“1”か否か、すなわち、MIDIチャネルiが再
生チャネルか否かを判断する。この判断結果が「Ye
s」の場合はステップS2305に進み、演奏データメ
モリエリアから読み出したイベントデータをMIDIチ
ャネルiに対応したMIDIイベントとしてMIDIバ
ッファに書き込み、ステップS2306に進む。一方、
ステップS2304の判断結果が「No」である場合は
ステップS2305を実行することなくステップS23
06に進む。そして、デュレーションレジスタDT
(i)の内容をデクリメントし(ステップS230
6)、次いで変数レジスタiをデクリメントし(ステッ
プS2307)、i>16でない場合はステップS23
02に戻る。
When the start switch 42 is pressed, ST
When ART = “1”, the determination result of step S2105 becomes “Y” when the interrupt processing routine is executed thereafter.
ES ”, and in step S2106, a reproduction processing routine whose flow is shown in FIG. 21 is executed. First, the process proceeds to step S2301, where "1" is initialized in the variable register i. Next, the process proceeds to step S2302, where it is determined whether the content of the duration register DT (i) is "0". If the result of this determination is “No”, step S230
Proceeding to 6, the content of the duration register DT (i) is decremented by "1". Next, step S230
Proceeding to 7, the variable register i is incremented. Next, the process proceeds to step S2308, where it is determined whether or not i> 16. If the determination result is “No”, step S230 is performed.
Return to 2. On the other hand, if the determination result of step S2302 is “Y
In the case of "es", that is, when the content of the duration register DT (i) corresponding to the MIDI channel i becomes "0", the process proceeds to step S2303, and the track of the performance data memory area in the RAM 5 corresponding to the MIDI channel i , New event data and duration data are read out, and the duration data is written to the duration register DT (i). Next, the flow advances to step S2304 to determine whether or not the content of the reproduction flag PSW (i) is "1", that is, whether or not the MIDI channel i is a reproduction channel. The result of this determination is "Ye
In the case of "s", the flow advances to step S2305 to write the event data read from the performance data memory area to the MIDI buffer as a MIDI event corresponding to the MIDI channel i, and the flow advances to step S2306. on the other hand,
If the decision result in the step S2304 is "No", the step S23 is executed without executing the step S2305.
Proceed to 06. And the duration register DT
The contents of (i) are decremented (step S230)
6) Then, the variable register i is decremented (step S2307). If i> 16 is not satisfied, step S23 is performed.
Return to 02.

【0037】MIDIチャネル「1」〜「16」につい
てステップS2302〜S2307の処理が行われる
と、ステップS2308の判断結果が「Yes」となっ
てステップS2309に進む。そして、MIDIチャネ
ル「1」〜「16」について、MIDIイベントの再生
が終了したか否かを判断する。この判断結果が「NO」
の場合は再生処理ルーチンを終了し、割込処理ルーチン
に戻る。そして、割込処理ルーチンが終了した後、割込
処理によって中断していた処理を再開する。以後、一定
時間が経過する毎に割込処理ルーチンが実行され、上述
と同様な処理が繰り返される。
When the processing of steps S2302 to S2307 is performed for the MIDI channels "1" to "16", the result of the determination in step S2308 is "Yes", and the flow advances to step S2309. Then, for the MIDI channels "1" to "16", it is determined whether or not the reproduction of the MIDI event has been completed. If the result of this determination is "NO"
In the case of, the reproduction processing routine ends, and the processing returns to the interruption processing routine. Then, after the interrupt processing routine ends, the processing interrupted by the interrupt processing is restarted. Thereafter, each time a predetermined time elapses, an interrupt processing routine is executed, and the same processing as described above is repeated.

【0038】RAM5内の演奏データメモリエリアから
イベントデータがすべて読み出されると、再生処理ルー
チンが実行された場合にステップS2309の判断結果
が「YES」となる。この結果、ステップS2310に
進み、スタートフラグSTARTに“0”を書き込み、
割込処理ルーチンに戻る。以後、割込処理ルーチンが実
行されたとしても、START=“0”であるため再生
処理ルーチンは実行されない。このようにして自動演奏
が終了する。
When all the event data is read from the performance data memory area in the RAM 5, the judgment result in the step S2309 becomes "YES" when the reproduction processing routine is executed. As a result, the process proceeds to step S2310, where “0” is written to the start flag START, and
Return to the interrupt processing routine. Thereafter, even if the interrupt processing routine is executed, the reproduction processing routine is not executed since START = "0". Thus, the automatic performance ends.

【0039】自動演奏中あるいは自動演奏終了後に演奏
者がストップスイッチ43を押下すると、そのオンイベ
ントが検出される。この結果、CPU3は、パネル処理
ルーチンを介し、図18に示すストップスイッチ処理ル
ーチンを実行する。まず、ステップS2001に進み、
スタートフラグSTARTの内容が“1”であるか否か
を判断する。この判断結果が「Yes」の場合、すなわ
ち、現在、自動演奏を行っている場合にはステップS2
002に進み、スタートフラグSTARTに“0”を書
き込む。次にステップS2003に進み、現在発音状態
にある発音チャネル、すなわち、各々に対応したチャネ
ルステータスレジスタST(i)の内容が「1」となっ
ているすべての発音チャネルiについて、ノートオフ情
報NOFFを作成し、楽音合成回路9へ供給する。この
結果、楽音合成回路9において発音中であったすべての
楽音の消音処理が行われる。そして、ステップS200
4に進む。一方、自動演奏終了後にストップスイッチ4
3が押下された場合にはステップS2001の判断結果
が「No」となり、ステップS2002およびS200
3を実行することなくステップS2004に進む。次に
ステップS2004に進むと、レコードフラグRECの
内容が“1”であるか否かを判断する。REC=“0”
の場合は、この判断結果が「No」となり、ステップS
2004〜S2007が実行されることなくストップス
イッチ処理ルーチンが終了する。
When the player presses the stop switch 43 during or after the automatic performance, the ON event is detected. As a result, the CPU 3 executes the stop switch processing routine shown in FIG. 18 via the panel processing routine. First, proceed to step S2001,
It is determined whether or not the content of the start flag START is "1". If the result of this determination is “Yes”, that is, if an automatic performance is currently being performed, step S2
In step 002, “0” is written to the start flag START. Next, the process proceeds to step S2003, in which note-off information NOFF is generated for the currently sounding channels, that is, for all sounding channels i whose contents of the channel status registers ST (i) corresponding to the respective sounding channels are "1". It is created and supplied to the tone synthesis circuit 9. As a result, the tone synthesis circuit 9 performs a silencing process for all tones that were being sounded. Then, step S200
Proceed to 4. On the other hand, the stop switch 4
If No. 3 is pressed, the determination result of step S2001 is “No”, and steps S2002 and S200
Then, the process proceeds to Step S2004 without executing Step 3. Next, in step S2004, it is determined whether or not the content of the record flag REC is "1". REC = "0"
In this case, the result of this determination is “No”, and the
The stop switch processing routine ends without performing steps 2004 to S2007.

【0040】伴奏音の発生 自動伴奏に関する動作モードがPOSTモードであり、
かつ、チャネル番号「9」が再生チャネルとして設定さ
れている場合、演奏デーテメモリエリアから再生される
チャネル番号「9」に対応したMIDIイベントに基づ
いて伴奏音が発音される。以下、この場合の動作を説明
する。上述の通り、再生処理ルーチンが実行されること
により演奏データメモリエリアから再生されたノートイ
ベントは、一旦、MIDIバッファに蓄積された後、M
IDI処理ルーチンによって取り出され、イベントレジ
スタEVにセットされてノートイベント処理ルーチンに
引き渡される。そして、POSTモードにおいてノート
イベント処理ルーチンが実行されると、イベントレジス
タEV内のノートイベントのチャネル番号が「9」であ
る場合にステップS1523が実行される。この結果、
イベントレジスタEV内のノートイベントのノートコー
ドによって和音が決定され、その和音の根音およびコー
ドタイプを示すデータが根音レジスタROOTおよびコ
ードタイプレジスタTYPEに各々書き込まれる。そし
て、その後、割込処理ルーチンを介してABC処理ルー
チンが実行されると、ステップS2203において、自
動演奏パターンメモリエリアから読み出したイベントの
音高情報を上記根音レジスタROOTおよびコードタイ
プレジスタTYPEの内容に基づいて変更される。そし
て、ステップS2204の判断結果が「NO」、ステッ
プS2206の判断結果が「YES」となってステップ
S2207が実行され、ステップS2202において自
動演奏パターンメモリエリアから読み出され、ステップ
S2203において音高情報の変更された伴奏音発生の
ためのイベントがイベントレジスタEVに書き込まれ、
ノートイベント処理ルーチンが実行される。この結果、
伴奏音が発生される。
Generation of Accompaniment Sound The operation mode relating to automatic accompaniment is a POST mode,
When the channel number "9" is set as the reproduction channel, the accompaniment sound is generated based on the MIDI event corresponding to the channel number "9" reproduced from the performance data memory area. Hereinafter, the operation in this case will be described. As described above, note events reproduced from the performance data memory area by executing the reproduction processing routine are temporarily stored in the MIDI buffer, and then stored in the MIDI buffer.
It is taken out by the IDI processing routine, set in the event register EV, and delivered to the note event processing routine. Then, when the note event processing routine is executed in the POST mode, if the channel number of the note event in the event register EV is “9”, step S1523 is executed. As a result,
The chord is determined by the note code of the note event in the event register EV, and data indicating the root and chord type of the chord are written in the root register ROOT and the chord type register TYPE, respectively. After that, when the ABC processing routine is executed via the interrupt processing routine, in step S2203, the pitch information of the event read from the automatic performance pattern memory area is stored in the contents of the root register ROOT and the chord type register TYPE. Is changed based on the Then, the judgment result of step S2204 is "NO", the judgment result of step S2206 is "YES", and step S2207 is executed. In step S2202, the pitch information is read from the automatic performance pattern memory area. An event for generating the changed accompaniment sound is written to the event register EV,
A note event processing routine is executed. As a result,
An accompaniment sound is generated.

【0041】(3)再生録音モード 再生録音モードにおいては、RAM5内の演奏データメ
モリエリア内のMIDIイベントの再生処理と、鍵盤演
奏あるいは操作パネルの操作によって生じるMIDIイ
ベントまたは外来のMIDIイベントのRAM5への録
音処理とが並行して実行される。この再生録音モードに
よる処理を実行する前に、演奏者は再生チャネルおよび
録音チャネルの設定を行う。再生チャネルの設定につい
ては既に説明したので、以下では録音チャネルの設定の
ための処理のみについて説明する。
(3) Reproduction / Recording Mode In the reproduction / recording mode, the reproduction process of the MIDI event in the performance data memory area in the RAM 5 and the MIDI event generated by the keyboard performance or the operation of the operation panel or the external MIDI event to the RAM 5. Is performed in parallel with the recording process. Before executing the processing in the reproduction / recording mode, the performer sets the reproduction channel and the recording channel. Since the setting of the reproduction channel has already been described, only the processing for setting the recording channel will be described below.

【0042】録音チャネルの設定 録音を行うに際し、演奏者は、まず、レコードスイッチ
41を押下する。この結果、レコードスイッチ41のオ
ンイベントが操作パネルインターフェイス8を介して検
出され、CPU3は、パネル処理ルーチンのステップS
803において、図16にフローを示すレコードスイッ
チ処理ルーチンを実行する。まず、ステップS1801
において、レコードスイッチ41のオンイベントが検出
されたか否かを判断する。この場合、ステップS180
1の判断結果が「YES」となってステップS1802
に進み、レコードスイッチフラグRECSWに“1”を
書き込む。次いでステップS1803に進み、その時点
における各チャネルに対応したレコードフラグRSW
(i)(i=1〜16)の内容を判定し、RSW(i)
=“1”を満足するすべてのチャネル番号i、すなわ
ち、その時点において既に録音チャネルとして設定され
ているMIDIチャネルの番号を検出する。そして、L
EDランプLQi(i=1〜16)のうち検出したチャ
ネル番号iに対応したLEDランプを点灯する。そし
て、パネル処理ルーチンを介してメインルーチンに戻
る。演奏者はLEDランプLQi(i=1〜16)の点
灯状態により、どのMIDIチャネルが録音チャネルと
なっているかを確認する。
Setting of Recording Channel When recording, the player first presses the record switch 41. As a result, the ON event of the record switch 41 is detected via the operation panel interface 8, and the CPU 3 proceeds to step S of the panel processing routine.
In 803, a record switch processing routine whose flow is shown in FIG. 16 is executed. First, step S1801
In, it is determined whether an ON event of the record switch 41 has been detected. In this case, step S180
The judgment result of step 1 becomes "YES" and step S1802
To write "1" in the record switch flag RECSW. Next, the process proceeds to step S1803, where the record flag RSW corresponding to each channel at that time is
(I) The contents of (i = 1 to 16) are determined, and RSW (i)
All channel numbers i satisfying "1", that is, the numbers of the MIDI channels already set as recording channels at that time are detected. And L
The LED lamp corresponding to the detected channel number i among the ED lamps LQi (i = 1 to 16) is turned on. Then, the process returns to the main routine via the panel processing routine. The player confirms which MIDI channel is the recording channel by checking the lighting state of the LED lamps LQi (i = 1 to 16).

【0043】演奏者がレコードスイッチ41から指を離
すと、レコードスイッチ41のオフイベントが操作パネ
ルインターフェイス8を介して検出され、CPU3は、
パネル処理ルーチンのステップS803において、再び
レコードスイッチ処理ルーチンを実行する。この場合、
レコードスイッチ41のオフイベントが検出されたた
め、ステップS1801、ステップS1804を経てス
テップS1805に進む。そして、レコードスイッチフ
ラグRECSWに“0”を書き込む。次いでステップS
1805に進み、その時点における各チャネルに対応し
た再生フラグPSW(i)(i=1〜16)の内容を判
定し、PSW(i)=“1”を満足するすべてのチャネ
ル番号i、すなわち、その時点において再生チャネルと
して設定されているMIDIチャネルの番号を検出す
る。そして、LEDランプLQi(i=1〜16)のう
ち検出したチャネル番号iに対応したLEDランプを点
灯する。そして、パネル処理ルーチンを介してメインル
ーチンに戻る。このような処理が行われる結果、レコー
ドスイッチフラグRECSWの内容は、レコードスイッ
チ41が押下されている期間のみ“1”、レコードスイ
ッチ41が押下されていない場合は“0”となる。ま
た、レコードスイッチ41が押下されている場合にはL
EDランプLQi(i=1〜16)によって録音チャネ
ルが表示され、押下されていない場合には再生チャネル
が表示されることとなる。
When the player releases his / her finger from the record switch 41, an off event of the record switch 41 is detected via the operation panel interface 8, and the CPU 3
In step S803 of the panel processing routine, the record switch processing routine is executed again. in this case,
Since the off event of the record switch 41 is detected, the process proceeds to step S1805 via steps S1801 and S1804. Then, “0” is written to the record switch flag RECSW. Then step S
Proceeding to 1805, the contents of the reproduction flag PSW (i) (i = 1 to 16) corresponding to each channel at that time are determined, and all channel numbers i satisfying PSW (i) = "1", that is, The MIDI channel number set as the reproduction channel at that time is detected. Then, among the LED lamps LQi (i = 1 to 16), the LED lamp corresponding to the detected channel number i is turned on. Then, the process returns to the main routine via the panel processing routine. As a result of performing such processing, the content of the record switch flag RECSW becomes “1” only while the record switch 41 is pressed, and becomes “0” when the record switch 41 is not pressed. When the record switch 41 is pressed, L
The recording channel is displayed by the ED lamp LQi (i = 1 to 16), and when not pressed, the reproduction channel is displayed.

【0044】録音チャネルとして設定されたMIDIチ
ャネルを録音チャネルから除外したい場合、演奏者はレ
コードスイッチ41を押下した状態で、そのMIDIチ
ャネルに対応したシーケンサチャネルスイッチBMiを
押下する。この場合、シーケンサチャネルスイッチ処理
ルーチンが実行されると、ステップS1608まで進
み、その判断結果が「YES」となる。そして、レコー
ドフラグRSW(N)(=RSW(i))に“0”を書
き込み(ステップS1611)、LEDランプLQN
消灯し(ステップS1611)、パネル処理ルーチンを
介してメインルーチンに戻る。以上のような処理が行わ
れることにより、演奏者が望むMIDIチャネルが録音
チャネルとして設定される。
When it is desired to exclude a MIDI channel set as a recording channel from the recording channel, the player presses the sequencer channel switch BMi corresponding to the MIDI channel while holding down the record switch 41. In this case, when the sequencer channel switch processing routine is executed, the process proceeds to step S1608, and the determination result is "YES". Then, the record flag RSW (N) writes "0" in (= RSW (i)) (step S1611), LED lamp turns off the LQ N (step S1611), returns to the main routine via the panel processing routine. By performing the above processing, the MIDI channel desired by the player is set as the recording channel.

【0045】自動演奏および録音 以上のような処理により再生チャネルおよび録音チャネ
ルの設定が終了すると、演奏者はレコードスイッチ41
とスタートスイッチ42とを共に押下する。この結果、
レコードスイッチ41が押下されたことにより、REC
SW=“1”とされる。また、スタートスイッチ42の
オンイベントが操作パネルインターフェイス8を介して
検出されることにより、CPU3は、スタートスイッチ
処理ルーチンを実行する。この場合、RECSW=
“1”であるため、ステップS1701の判断結果が
「Yes」となり、ステップS1705に進む。そし
て、レコードフラグRECの内容が“0”であるか否か
を判断する。この判断結果が「YES」である場合、ス
テップS1706に進み、スタートフラグSTARTお
よびレコードフラグRECに“1”を書き込む。次にス
テップS1707に進み、録音のための各種ポインタ等
の初期設定処理を行う。そして、パネル処理ルーチンを
介しメインルーチンに戻る。なお、レコードスイッチ4
1が押下された時点においてREC=“1”となってい
た場合、すなわち、録音動作中にスタートスイッチ42
およびレコードスイッチ41が押下された場合には、ス
タートスイッチ処理ルーチンのステップS1705に進
んだ時、その判断結果が「NO」となり、ステップS1
706およびS1707を実行することなく、パネル処
理ルーチンを介してメインルーチンに戻る。
Automatic Performance and Recording When the setting of the reproduction channel and the recording channel is completed by the processing described above, the player switches the record switch 41.
And the start switch 42 are both pressed. As a result,
When the record switch 41 is pressed, REC
SW = "1". Further, the CPU 3 executes a start switch processing routine when an ON event of the start switch 42 is detected via the operation panel interface 8. In this case, RECSW =
Since it is “1”, the result of the determination in step S1701 is “Yes”, and the flow proceeds to step S1705. Then, it is determined whether or not the content of the record flag REC is “0”. If this determination is "YES", the flow proceeds to step S1706, and "1" is written to the start flag START and the record flag REC. Next, the process advances to step S1707 to perform initialization processing of various pointers and the like for recording. Then, the process returns to the main routine via the panel processing routine. The record switch 4
If REC = “1” at the time when “1” is pressed, that is, the start switch 42 during the recording operation
When the record switch 41 is depressed, when the process proceeds to step S1705 of the start switch process routine, the determination result is “NO” and the process proceeds to step S1.
Without executing steps 706 and S1707, the process returns to the main routine via the panel processing routine.

【0046】START=“1”となったことにより、
上述した再生モードの場合と同様、以後、割込処理ルー
チンが実行された場合にそのステップS2105におい
て再生処理ルーチンが実行される。そして、再生処理ル
ーチンの実行により、RAM5の演奏データメモリエリ
アから再生チャネルに対応したMIDIイベントが読み
出されると(ステップS2305)、そのイベントはM
IDIバッファに順次書き込まれる。また、鍵盤操作あ
るいは操作パネルの操作によってMIDIイベントが発
生した場合、または外部装置からMIDIイベントが取
り込まれた場合には、それらのMIDIイベントもMI
DIバッファに順次書き込まれる。このようにしてMI
DIバッファにMIDIイベントが書き込まれる結果、
MIDI処理ルーチンが実行された場合にステップS5
01の判断結果が「Yes」となる。そして、MIDI
バッファからMIDIイベントが取り出されてイベント
レジスタEVに書き込まれると共にそのMIDIイベン
トのMIDIチャネルの番号がチャネル番号レジスタM
CHに書き込まれる(ステップS502)。そして、イ
ベントレジスタEVに取り込まれたMIDIイベントに
基づいてノートイベント処理ルーチン(ステップS50
4)あるいはチャネルイベント処理ルーチン(ステップ
S505)が実行され、イベントレジスタEVに取り込
まれたチャネルイベントに対応したパラメータが楽音合
成回路9へと送られる。このように、RAM5から読み
出されたMIDIイベントと共に、鍵盤操作あるいは操
作パネルの操作によって生じたMIDIイベント、また
は外部装置から供給されたMIDIイベントがMIDI
バッファから取り出され、各々に対応した楽音合成回路
の制御が実行される。
Since START = "1",
As in the case of the above-described reproduction mode, when the interruption processing routine is executed thereafter, the reproduction processing routine is executed in step S2105. When a MIDI event corresponding to the reproduction channel is read from the performance data memory area of the RAM 5 by executing the reproduction processing routine (step S2305), the event is set to M.
The data is sequentially written to the IDI buffer. When a MIDI event occurs due to a keyboard operation or an operation of an operation panel, or when a MIDI event is received from an external device, the MIDI event is also transmitted to the MIDI device.
The data is sequentially written to the DI buffer. Thus, MI
As a result of writing the MIDI event to the DI buffer,
When the MIDI processing routine has been executed, step S5 is executed.
The judgment result of “01” is “Yes”. And MIDI
The MIDI event is extracted from the buffer and written into the event register EV, and the MIDI channel number of the MIDI event is stored in the channel number register M.
It is written to CH (step S502). Then, a note event processing routine (step S50) is performed based on the MIDI event captured in the event register EV.
4) Alternatively, a channel event processing routine (step S505) is executed, and parameters corresponding to the channel event taken into the event register EV are sent to the tone synthesis circuit 9. As described above, the MIDI event read out from the RAM 5 and the MIDI event generated by the keyboard operation or the operation of the operation panel, or the MIDI event supplied from the external device are transmitted.
It is taken out of the buffer and the control of the corresponding tone synthesis circuit is executed.

【0047】次にステップS506に進むと、REC=
“1”であるため、その判断結果が「Yes」となり、
ステップS507において図17にフローを示す記録処
理ルーチンが実行される。まず、ステップS1901に
進み、MIDIチャネルMCHに対応したレコードフラ
グRSW(MCH)の内容が“1”か否か、すなわち、
MIDI処理ルーチンにおいてMIDIバッファから取
り出してイベントレジスタEVに書き込んだMIDIイ
ベントが録音チャネルすべきMIDIイベントであるか
否かを判断する。この判断結果が「Yes」である場合
はステップS1902に進む。そして、RAM5内のM
IDIチャネルMCHに対応したバッファトラックに対
し、それ以前にMIDIイベントを書き込んでから現在
に至るまでの経過時間をデュレーション情報として書き
込み、イベントレジスタEV内のMIDIイベントをイ
ベント情報として書き込む。そして、MIDI処理ルー
チンを介しメインルーチンに戻る。以後、MIDI処理
ルーチンが起動される毎に同様の処理が行われる。
Next, when the flow advances to step S506, REC =
Since it is “1”, the judgment result is “Yes”,
In step S507, a recording processing routine whose flow is shown in FIG. 17 is executed. First, the process proceeds to step S1901 to determine whether or not the content of the record flag RSW (MCH) corresponding to the MIDI channel MCH is “1”, that is,
In the MIDI processing routine, it is determined whether or not the MIDI event taken out of the MIDI buffer and written in the event register EV is a MIDI event to be recorded. If the result of this determination is “Yes”, the flow proceeds to step S1902. And M in RAM5
In the buffer track corresponding to the IDI channel MCH, the elapsed time from the previous writing of the MIDI event to the present is written as duration information, and the MIDI event in the event register EV is written as event information. Then, the process returns to the main routine via the MIDI processing routine. Thereafter, the same processing is performed every time the MIDI processing routine is started.

【0048】RAM5内の演奏データメモリエリアから
再生チャネルのMIDIイベントがすべて読み出される
と、上述した再生モードの場合と同様、再生処理ルーチ
ンのステップS2312が実行され、START=
“0”となり、自動演奏が終了する。また、演奏者がス
トップスイッチ43を押下すると、ストップスイッチ処
理ルーチンが実行され、そのステップS2004まで進
む。そして、REC=“1”である場合は、ステップS
2004の判断結果が「Yes」となってステップS2
004に進み、レコードフラグRECに“0”を書き込
む。次にステップS2006に進み、すべての録音チャ
ネルに対応したバッファトラックに対し、ノートオフ情
報と終了コードを書き込む。次にステップS2007に
進み、各録音チャネルに対応したバッファトラックの内
容を各々MIDIチャネル番号の対応した演奏データメ
モリエリアに書き込む。そして、ストップスイッチ処理
ルーチンを終了し、メインルーチンに戻る。以後、MI
DIバッファに何等かのMIDIイベントが書き込まれ
てMIDI処理ルーチンが実行されたとしても、REC
=“0”であるため記録処理ルーチンは実行されない。
このようにして録音が終了する。自動演奏が終了する前
にストップスイッチ43が押下された場合はストップス
イッチ処理ルーチンのステップS2002およびS20
03が実行された後、ステップS2004以降の処理が
実行され、録音が終了する。
When all the MIDI events of the reproduction channel are read from the performance data memory area in the RAM 5, the reproduction process routine is executed in step S2312, as in the case of the reproduction mode described above, and START =
It becomes "0" and the automatic performance ends. When the player presses the stop switch 43, a stop switch processing routine is executed, and the process proceeds to step S2004. If REC = “1”, step S
The judgment result of 2004 becomes "Yes" and the step S2
In step 004, “0” is written to the record flag REC. Next, the process proceeds to step S2006, where note-off information and an end code are written into buffer tracks corresponding to all recording channels. Next, the process proceeds to step S2007, where the contents of the buffer tracks corresponding to the respective recording channels are written into the performance data memory areas corresponding to the respective MIDI channel numbers. Then, the stop switch processing routine ends, and the process returns to the main routine. Thereafter, MI
Even if any MIDI event is written to the DI buffer and the MIDI processing routine is executed, REC
= "0", the recording processing routine is not executed.
Thus, the recording ends. If the stop switch 43 is pressed before the automatic performance ends, steps S2002 and S20 of the stop switch processing routine are performed.
After step 03, the processing after step S2004 is executed, and the recording ends.

【0049】伴奏音の発生および録音 自動伴奏に関する動作モードがPREモードである場合
の動作を説明する。この場合、演奏者によって鍵盤1の
鍵が押鍵されると、鍵処理ルーチンが実行されることに
より、その押鍵イベントに基づいて根音およびコードタ
イプが決定され、根音レジスタROOTおよびコードタ
イプレジスタTYPEに書き込まれる(ステップS70
5)。そして、「楽器モード」の場合における自動伴奏
の場合と同様、その後、割込処理ルーチンを介しABC
処理ルーチンが実行されることにより、その時点におけ
る拍レジスタBEATの内容に対応したイベントデータ
が自動演奏データメモリエリアから読み出され(ステッ
プS2202)、読み出されたイベントデータと根音レ
ジスタROOTおよびコードタイプレジスタTYPEの
内容に基づいて和音発生のためのノートイベントが作成
され(ステップS2203)、それらのノートイベント
がチャネル番号「10」〜「16」のいずれかに対応し
たMIDIイベントとしてMIDIバッファに書き込ま
れる(ステップS2204)。このようにしてMIDI
バッファに書き込まれた和音発生用のノートイベント
は、MIDI処理ルーチンが実行される際にMIDIバ
ッファから取り出され、ノートイベント処理ルーチンに
引き渡され、和音を構成する各楽音に対応したパラメー
タが楽音合成回路9へ送られ、和音が発音される。ま
た、和音発生用のMIDIイベントのチャネル番号が録
音チャネルとして設定されている場合、和音発生用のM
IDIイベントは書込処理ルーチンが実行されることに
よりRAM5内の演奏データメモリエリアに書き込まれ
る。以後、ABC処理ルーチンが実行される毎に上述と
同様な処理が行われ、自動伴奏が行われると共に自動伴
奏のための演奏データがRAM5内の演奏データメモリ
エリアに録音される。また、新たな鍵が押下された場合
はその押鍵イベントに基づいて根音レジスタROOTお
よびコードタイプレジスタTYPEの内容が更新されて
上述と同様な処理が行われ、新たな和音による伴奏が行
われると共にその伴奏に対応した演奏データが録音され
る。
Generation and Recording of Accompaniment Sound An operation when the operation mode relating to the automatic accompaniment is the PRE mode will be described. In this case, when a key of the keyboard 1 is depressed by the player, a key processing routine is executed to determine a root note and a chord type based on the key depressing event, and a root register ROOT and a chord type are determined. The data is written to the register TYPE (step S70).
5). Then, similarly to the case of the automatic accompaniment in the case of the "instrument mode", the ABC is transmitted via the interrupt processing routine.
By executing the processing routine, the event data corresponding to the content of the beat register BEAT at that time is read from the automatic performance data memory area (step S2202), and the read event data, the root register ROOT and the code A note event for generating a chord is created based on the contents of the type register TYPE (step S2203), and the note event is written to the MIDI buffer as a MIDI event corresponding to any of channel numbers "10" to "16". Is performed (step S2204). In this way MIDI
The note event for generating a chord written in the buffer is extracted from the MIDI buffer when the MIDI processing routine is executed, passed to the note event processing routine, and the parameters corresponding to the respective musical tones constituting the chord are converted to the tone synthesizing circuit. 9 and the chord is pronounced. If the channel number of the MIDI event for generating a chord is set as the recording channel, the M
The IDI event is written to the performance data memory area in the RAM 5 by executing the write processing routine. Thereafter, every time the ABC processing routine is executed, the same processing as described above is performed, and the automatic accompaniment is performed and the performance data for the automatic accompaniment is recorded in the performance data memory area in the RAM 5. When a new key is pressed, the contents of the root register ROOT and the chord type register TYPE are updated based on the key pressing event, and the same processing as described above is performed, and accompaniment with a new chord is performed. At the same time, performance data corresponding to the accompaniment is recorded.

【0050】(4)エディットモード 操作パネル7における演奏データ変更用の操作子(図示
略)が操作され、変更すべきイベントデータを指定する
エディットポイントイベントが入力されると、メインル
ーチンのステップS406においてシーケンスデータエ
ディットルーチンが実行された際にステップS1101
の判断結果が「Yes」となってステップS1102に
進む。そして、入力されたエディットポイントイベント
に基づいて演奏データメモリエリアにおける変更すべき
イベントデータの記憶エリアのトラックおよびアドレス
を指定する。次にステップS1103に進み、ステップ
S1102において指定したトラックおよびアドレスに
対応したイベントと置き換えるべきイベントが入力され
たか否かを判断する。この判断結果が「No」の場合は
メインルーチンに戻る。置き換えるべきイベントが操作
パネル7に操作によって入力されると、ステップS11
03の判断結果が「Yes」となり、ステップS110
4に進む。そして、演奏データメモリエリアにおけるス
テップS1102において指定した記憶エリアに操作パ
ネルの操作によって入力されたイベントを書き込み、メ
インルーチンに戻る。このようにして、RAM5内の演
奏データメモリエリア内の演奏データが書き直される。
演奏者は、以上説明した操作を行うことにより、自動演
奏用の演奏データのみならず、自動伴奏用の演奏データ
をも所望のデータに更新することができる。なお、上述
した本実施例の説明より、PREモード、POSTモー
ドそれぞれにおける動作を整理してまとめると以下のよ
うになる。 PREモード 鍵盤1による押鍵に基づいて和音が決定され、該和音に
応じて自動演奏パターンのノートイベントが作成されて
MIDIバッファに書き込まれる(このとき、伴奏音の
MIDIチャネルは10〜16)。そして、MIDIバ
ッファのデータが楽音合成回路9へ送られ、伴奏音が発
音される。また、シーケンサにおいて、RAM5のトラ
ック10〜16のいずれか(すべてでもよい)が記録モ
ードになっているとき、MIDIバッファに書き込ま
たノートイベントは、記録モードになっているトラック
に書き込まれる。すなわち、PREモードにおいては、
鍵盤操作により指定された和音に基づく自動伴奏音がシ
ーケンサに書き込まれ、これにより、シーケンサを再生
モードにすると、自動伴奏音が発生される。 POSTモード 鍵盤1による押鍵が、MIDIの9チャネルとして直接
MIDIバッファに書き込まれる。そして、シーケンサ
において、RAM5のトラック9が記録モードになって
いるとき、MIDIバッファに書き込まれた押鍵による
ノートイベントがトラック9に書き込まれる。また、シ
ーケンサが再生モードになっているとき、再生された9
チャネルのノートイベントに基づいて和音が決定され、
該和音に応じて自動演奏パターンのノートイベントが作
成されてMIDIバッファに書き込まれる。そして、M
IDIバッファのデータが楽音合成回路9へ送られ、伴
奏音が発音される。すなわち、POSTモードにおいて
は、シーケンサから再生されたノートイベントに基づい
て和音が決定され、該和音に応じて自動伴奏がなされ
る。これにより、シーケンサを再生モードにすると、自
動伴奏音が発生される。また、PREモードとPOST
モードとの違いを整理すると、以下のようになる。 PREモードでは、発生した伴奏音自体をシーケンサ
に記録するので、後に伴奏音の細かいエディットが可能
であるが、メモリ容量を大量に消費する。 POSTモードでは、和音を特定するための押鍵イベ
ントのみをシーケンサに記録するので、消費するメモリ
容量は少なくて済むが、伴奏音の細かいエディットはで
きない。
(4) Edit Mode When an operation element (not shown) for changing performance data on the operation panel 7 is operated and an edit point event designating event data to be changed is input, in step S406 of the main routine, When the sequence data edit routine is executed, step S1101 is executed.
Is "Yes" and the process proceeds to step S1102. Then, the track and address of the event data storage area to be changed in the performance data memory area are designated based on the input edit point event. The process advances to step S1103 to determine whether an event to be replaced with an event corresponding to the track and address specified in step S1102 has been input. If the result of this determination is "No", the process returns to the main routine. When an event to be replaced is input to the operation panel 7 by an operation, step S11
03 is “Yes”, and step S110 is performed.
Proceed to 4. Then, the event input by the operation of the operation panel is written in the storage area specified in step S1102 in the performance data memory area, and the process returns to the main routine. In this way, the performance data in the performance data memory area in the RAM 5 is rewritten.
By performing the operations described above, the player can update not only the performance data for automatic performance but also the performance data for automatic accompaniment to desired data. Note that the above
From the description of the present embodiment, the PRE mode and the POST mode are described.
The following is a summary of the actions in each
Swell. A chord is determined based on a key pressed by the PRE mode keyboard 1, and
A note event of an automatic performance pattern is created
Is written to the MIDI buffer (at this time, the accompaniment sound
MIDI channels are 10-16). And MIDI bar
The buffer data is sent to the tone synthesis circuit 9 and an accompaniment sound is generated.
Be sounded. Also, in the sequencer, the
One of the locks 10 to 16 (or all of them)
Is written to the MIDI buffer when the
Note events are recorded on tracks that are in recording mode.
Is written to. That is, in the PRE mode,
Automatic accompaniment tones based on chords specified by keyboard operation
Is written to the sequencer, thereby playing back the sequencer
In the mode, an automatic accompaniment sound is generated. The key depression by the POST mode keyboard 1 is directly performed as MIDI 9 channel.
Written to the MIDI buffer. And the sequencer
, The track 9 of the RAM 5 is in the recording mode
When the key is written to the MIDI buffer
A note event is written to track 9. Also,
When the sequencer is in playback mode,
Chords are determined based on channel note events,
A note event with an automatic performance pattern is created according to the chord.
And written to the MIDI buffer. And M
The data in the IDI buffer is sent to the tone synthesis circuit 9 and
A performance tone is pronounced. That is, in the POST mode
Is based on note events played from the sequencer
The chord is determined, and automatic accompaniment is performed according to the chord.
You. Thus, when the sequencer is in playback mode,
A moving accompaniment sound is generated. Also, PRE mode and POST
The differences between the modes are as follows. In the PRE mode, the generated accompaniment sound itself is
Recording, so you can edit the accompaniment sound later
However, it consumes a large amount of memory capacity. In the POST mode, a key press event for specifying a chord is performed.
Memory is recorded in the sequencer,
It requires less space, but does not allow for detailed editing of accompaniment sounds.
I can't.

【0051】[0051]

【発明の効果】以上説明したように、この発明によれ
ば、演奏データを発生する演奏データ発生手段と、演奏
データに従って、楽音を発生する楽音発生手段と、演奏
データを記憶する記憶手段と、演奏データを前記記憶手
段に書き込む書込手段と、演奏データを前記記憶手段か
ら読み出す読出手段と、伴奏用の演奏データを形成する
ために伴奏パターンを記憶する伴奏データ記憶手段と、
演奏データ発生手段から発生された演奏データまたは読
出手段により前記記憶手段から読み出された演奏データ
に基づいて和音を特定し、前記伴奏データ記憶手段から
伴奏パターンを読み出して、前記特定された和音に基づ
いて音高変換し、演奏データを形成して出力する伴奏デ
ータ形成手段とからなり、前記各手段間における演奏デ
ータの授受の態様として、 (a)前記演奏データ発生手段によって発生される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段によって出力される演奏データが前記書
込手段によって前記記憶手段に書き込まれ、書き込まれ
た演奏データを前記読出手段により読み出して前記楽音
発生手段へと供給する第1の態様と、 (b)前記演奏データ発生手段によって発生される演奏
データが前記書込手段によって前記記憶手段に書き込ま
れるとともに、前記読出手段によって読み出される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段から出力される演奏データが前記楽音発
生手段に供給される第2の態様の両方を備えることとし
たので、第1の態様では、伴奏データ形成手段により形
成された伴奏用の演奏データ自体が記憶手段に記憶さ
れ、第2の態様では、和音を特定するための演奏データ
のみが記憶手段に記憶される。従って、第1の態様にあ
っては、後に伴奏音の細かいエディットが可能となるが
多くの記憶容量を必要とし、第2の態様にあっては、記
憶容量が少なくて済むが伴奏音の細かいエディットはで
きない。これにより、本発明によれば、このような第1
の態様と第2の態様とを目的に応じて使い分けることが
できるという効果が得られる。
As described above, according to the present invention, performance data generating means for generating performance data , tone generating means for generating a musical tone in accordance with the performance data, and storage means for storing the performance data, The performance data is stored in the memory
A writing means for writing the stage, a reading means for reading the performance data from said storage means, to form a performance data for the accompaniment
Accompaniment data storage means for storing an accompaniment pattern for
The performance data generated by the performance data
Performance data read from the storage means by the output means
A chord based on the accompaniment data storage means
The accompaniment pattern is read out and based on the specified chord.
Accompaniment data that converts the pitch and forms and outputs performance data
Consists of a chromatography data forming means, wherein the mode of transfer of performance data between each unit, (a) the performance data generated by the performance data generating means is supplied to the accompaniment data forming means, the accompaniment data forming means the manual performance data to be output by the
Writing into the storage means by
Read out the playing data by the reading means and
A first aspect supplied to generating means, written to the storage means by the performance data is the writing unit generated by (b) the performance data generating means
And the performance read by the reading means.
Data is supplied to the accompaniment data forming means, performance data output from the accompaniment data forming means the tone onset
And both of the second aspects supplied to the raw means
Therefore, in the first embodiment, the form is
The accompaniment performance data itself is stored in the storage means.
In the second embodiment, performance data for specifying a chord is
Only the information is stored in the storage means. Therefore, in the first mode,
It will be possible to edit the accompaniment sound later.
It requires a lot of storage capacity, and in the second mode,
It requires less storage space, but does not allow for detailed editing of accompaniment sounds.
I can't. Thus, according to the present invention, such a first
And the second aspect can be properly used according to the purpose.
The effect that it can be obtained is obtained.

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

【図1】 この発明の一実施例による自動演奏装置の構
成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of an automatic performance device according to an embodiment of the present invention.

【図2】 同実施例の操作パネルを示す平面図である。FIG. 2 is a plan view showing an operation panel of the embodiment.

【図3】 同実施例において実行される各ルーチンおよ
びそれらの関係を説明する図である。
FIG. 3 is a diagram illustrating each routine executed in the embodiment and a relationship between them.

【図4】 同実施例の動作を説明するフローチャートで
ある。
FIG. 4 is a flowchart illustrating the operation of the embodiment.

【図5】 同実施例の動作を説明するフローチャートで
ある。
FIG. 5 is a flowchart illustrating the operation of the embodiment.

【図6】 同実施例の動作を説明するフローチャートで
ある。
FIG. 6 is a flowchart illustrating the operation of the embodiment.

【図7】 同実施例の動作を説明するフローチャートで
ある。
FIG. 7 is a flowchart illustrating the operation of the embodiment.

【図8】 同実施例の動作を説明するフローチャートで
ある。
FIG. 8 is a flowchart illustrating the operation of the embodiment.

【図9】 同実施例の動作を説明するフローチャートで
ある。
FIG. 9 is a flowchart illustrating the operation of the embodiment.

【図10】 同実施例の動作を説明するフローチャート
である。
FIG. 10 is a flowchart illustrating the operation of the embodiment.

【図11】 同実施例の動作を説明するフローチャート
である。
FIG. 11 is a flowchart illustrating the operation of the embodiment.

【図12】 同実施例の動作を説明するフローチャート
である。
FIG. 12 is a flowchart illustrating the operation of the embodiment.

【図13】 同実施例の動作を説明するフローチャート
である。
FIG. 13 is a flowchart illustrating the operation of the embodiment.

【図14】 同実施例の動作を説明するフローチャート
である。
FIG. 14 is a flowchart illustrating the operation of the embodiment.

【図15】 同実施例の動作を説明するフローチャート
である。
FIG. 15 is a flowchart illustrating the operation of the embodiment.

【図16】 同実施例の動作を説明するフローチャート
である。
FIG. 16 is a flowchart illustrating the operation of the embodiment.

【図17】 同実施例の動作を説明するフローチャート
である。
FIG. 17 is a flowchart illustrating the operation of the embodiment.

【図18】 同実施例の動作を説明するフローチャート
である。
FIG. 18 is a flowchart illustrating the operation of the embodiment.

【図19】 同実施例の動作を説明するフローチャート
である。
FIG. 19 is a flowchart illustrating the operation of the embodiment.

【図20】 同実施例の動作を説明するフローチャート
である。
FIG. 20 is a flowchart illustrating the operation of the embodiment.

【図21】 同実施例の動作を説明するフローチャート
である。
FIG. 21 is a flowchart illustrating the operation of the embodiment.

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

1……鍵盤、3……CPU、5……RAM、9……楽音
合成回路。
1 ... keyboard, 3 ... CPU, 5 ... RAM, 9 ... tone synthesis circuit.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 演奏データを発生する演奏データ発生手
段と、 演奏データに従って、楽音を発生する楽音発生手段と、 演奏データを記憶する記憶手段と、演奏データを前記記憶手段に書き込む書込手段と、 演奏データを前記記憶手段から読み出す読出手段と、 伴奏用の演奏データを形成するために伴奏パターンを記
憶する伴奏データ記憶手段と、 演奏データ発生手段から発生された演奏データまたは読
出手段により前記記憶手段から読み出された演奏データ
に基づいて和音を特定し、前記伴奏データ記憶手段から
伴奏パターンを読み出して、前記特定された和音に基づ
いて音高変換し、演奏データを形成して出力する伴奏デ
ータ形成手段とからなり、 前記各手段間における演奏デ
ータの授受の態様として、 (a)前記演奏データ発生手段によって発生される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段によって出力される演奏データが前記書
込手段によって前記記憶手段に書き込まれ、書き込まれ
た演奏データを前記読出手段により読み出して前記楽音
発生手段へと供給する第1の態様と、 (b)前記演奏データ発生手段によって発生される演奏
データが前記書込手段によって前記記憶手段に書き込ま
れるとともに、前記読出手段によって読み出される演奏
データが前記伴奏データ形成手段に供給され、前記伴奏
データ形成手段から出力される演奏データが前記楽音発
生手段に供給される第2の態様の両方を備えることを特
徴とする自動演奏装置。
1. A performance data generator for generating performance data.
According to the performance data, A tone generating means for generating a tone,  Storage means for storing performance data;Writing means for writing performance data to the storage means;  Performance dataSaidRead from storage meansReading means; Record accompaniment patterns to form performance data for accompaniment.
Accompaniment data storage means to remember The performance data generated by the performance data
Performance data read from the storage means by the output means
A chord based on the accompaniment data storage means
The accompaniment pattern is read out and based on the specified chord.
Accompaniment data that converts the pitch and forms and outputs performance data
Data forming means, Performance data between the above means
Data transfer modeAs(A) a performance generated by the performance data generating means;
The data is the accompaniment dataFormationSupplied to the means, said accompaniment
dataFormationBy meansoutputPerformance dataSaid book
By meansIn the storage meansWritten, written
Read out the playing data by the reading means and
A first mode for supplying to the generating means; (B) by the performance data generating meansOutbreakPerformed
The data isWriting to the storage means by the writing means
And the performance read by the reading means.
The data isThe accompaniment dataFormationSupplied to the means, said accompaniment
dataFormationmeansOutput fromPerformance dataMelody
With both of the second aspects supplied to the raw meansSpecially
Automatic playing device.
JP4006013A 1992-01-16 1992-01-16 Automatic performance device Expired - Fee Related JP2639271B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4006013A JP2639271B2 (en) 1992-01-16 1992-01-16 Automatic performance device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4006013A JP2639271B2 (en) 1992-01-16 1992-01-16 Automatic performance device

Publications (2)

Publication Number Publication Date
JPH0651763A JPH0651763A (en) 1994-02-25
JP2639271B2 true JP2639271B2 (en) 1997-08-06

Family

ID=11626828

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4006013A Expired - Fee Related JP2639271B2 (en) 1992-01-16 1992-01-16 Automatic performance device

Country Status (1)

Country Link
JP (1) JP2639271B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7124371B2 (en) * 2018-03-22 2022-08-24 カシオ計算機株式会社 Electronic musical instrument, method and program

Also Published As

Publication number Publication date
JPH0651763A (en) 1994-02-25

Similar Documents

Publication Publication Date Title
KR930010396B1 (en) Musical sound signal generator
EP1349167B1 (en) Audio system for reproducing plural parts of music in perfect ensemble
JP3407610B2 (en) Musical sound generation method and storage medium
US5668337A (en) Automatic performance device having a note conversion function
JP2639271B2 (en) Automatic performance device
US7358433B2 (en) Automatic accompaniment apparatus and a storage device storing a program for operating the same
JP3237161B2 (en) Automatic performance device
EP0281214A2 (en) Acoustic data control system and method of operation
WO2007015320A1 (en) Tone color storage device, tone color storage method, and computer program for storing tone colors
JPH06202654A (en) Electronic musical instrument
JP3438229B2 (en) Electronic musical instrument
JP3005986B2 (en) Automatic accompaniment device
JP3613062B2 (en) Musical sound data creation method and storage medium
JP2737169B2 (en) Automatic accompaniment device
JP3669335B2 (en) Automatic performance device
JP3379098B2 (en) Performance device and recording medium on which program or data related to the device is recorded
JP3127921B2 (en) Automatic accompaniment device
JPS637396B2 (en)
JP3324318B2 (en) Automatic performance device
JP2947150B2 (en) Automatic performance device
JP4205563B2 (en) Performance device, performance method, and computer program for performance
JPH02161499A (en) Automatic accompaniment device
JP3171436B2 (en) Automatic accompaniment device
JP2734559B2 (en) Automatic accompaniment device
JP3735172B2 (en) Performance information processing method

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 19970325

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090425

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees