JP2661468B2 - Automatic performance device - Google Patents

Automatic performance device

Info

Publication number
JP2661468B2
JP2661468B2 JP4184186A JP18418692A JP2661468B2 JP 2661468 B2 JP2661468 B2 JP 2661468B2 JP 4184186 A JP4184186 A JP 4184186A JP 18418692 A JP18418692 A JP 18418692A JP 2661468 B2 JP2661468 B2 JP 2661468B2
Authority
JP
Japan
Prior art keywords
tone
channel
register
processing
sound
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP4184186A
Other languages
Japanese (ja)
Other versions
JPH0627943A (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 JP4184186A priority Critical patent/JP2661468B2/en
Priority to US08/089,091 priority patent/US5345035A/en
Publication of JPH0627943A publication Critical patent/JPH0627943A/en
Application granted granted Critical
Publication of JP2661468B2 publication Critical patent/JP2661468B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

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 for generating a plurality of tones and performing an automatic performance.

【0002】[0002]

【従来の技術】複数の音色の楽音を同時に発音する電子
楽器が種々開発されている。この種の電子楽器には、ト
ーンジェネレータを時分割に切り換えて複数音を同時発
音する時分割処理タイプと、複数のトーンジェネレータ
を同時に起動して複数音同時発音を行う非時分割タイプ
とがある。いずれの場合であっても、音色の決定はその
音色を特定するための音色データをトーンジェネレータ
に設定することにより行われる。
2. Description of the Related Art Various electronic musical instruments that simultaneously produce a plurality of musical tones have been developed. This type of electronic musical instrument includes a time-division processing type in which a tone generator is switched to time-division to simultaneously generate a plurality of sounds, and a non-time-division type in which a plurality of tone generators are simultaneously activated to simultaneously generate a plurality of sounds. . In either case, the tone color is determined by setting tone color data for specifying the tone color in the tone generator.

【0003】図28は、時分割処理タイプの電子楽器の
構成を示すブロック図である。図において、1は演奏情
報入力部であり、例えば、複数の鍵を有したキーボード
や、曲の進行に従って演奏情報を出力するシーケンサ等
である。この演奏情報入力部1からは、鍵のオン/オフ
情報、音高情報、音色指定情報など(以下、楽音情報と
いう:cf演奏情報はキー情報のみ)が出力される。3
はチャンネル割当部2を介して供給される楽音情報に基
づいて楽音信号を発生するトーンジェネレータである。
このトーンジェネレータ3は、複数の発音チャンネルを
時分割で切り換えるようになっている。また、チャンネ
ル割当部2は、演奏情報入力部1から供給される楽音情
報を各チャンネルに割り当てるようになっている。
FIG. 28 is a block diagram showing a configuration of a time-division processing type electronic musical instrument. In the figure, reference numeral 1 denotes a performance information input unit, for example, a keyboard having a plurality of keys, a sequencer for outputting performance information as the music progresses, and the like. The performance information input unit 1 outputs key on / off information, pitch information, tone color designation information, and the like (hereinafter referred to as tone information: cf performance information is only key information). 3
Is a tone generator that generates a tone signal based on tone information supplied via the channel allocating unit 2.
The tone generator 3 switches a plurality of sound channels in a time-division manner. The channel allocating unit 2 allocates the tone information supplied from the performance information input unit 1 to each channel.

【0004】4−1〜4−nは、各々音色データを記憶
する音色データメモリであり、各メモリ内の音色データ
は1つの音色に対応している。また、各音色メモリ4−
1〜4−n内の音色データは、時分割のタイミングに合
わせて、トーンジェネレータ3内の対応する音色の発音
チャンネルにおいて使用されるようになっている。
Reference numerals 4-1 to 4-n denote timbre data memories for storing timbre data. The timbre data in each memory corresponds to one timbre. Each tone memory 4-
The timbre data within 1 to 4-n is used in the tone generator 3 for the corresponding timbre in the tone generator 3 in accordance with the time division timing.

【0005】次に、図29は複数のトーンジェネレータ
を有する電子楽器の構成を示すブロック図である。この
図に示す電子楽器においては、n個のトーンジェネレー
タTG1〜TGnが設けられており、各トーンジェネレ
ータTG1〜TGnには音色データを記憶するためのバ
ッファBUF1〜BUFnが併設されている。この場
合、トーンジェネレータとバッファとの組合わせによっ
て発音チャンネルCH1〜チャンネルCHnが構成され
ている。6は、音色データ転送制御部であり、チャンネ
割当部2のチャンネル割当処理に伴い、楽音情報が指
示する音色に応じた音色データメモリ4−1〜4−
選択し、その音色データを対応するチャンネルのバッフ
ァBUF1〜BUFnに転送する。
FIG. 29 is a block diagram showing a configuration of an electronic musical instrument having a plurality of tone generators. In the electronic musical instrument shown in this figure, n tone generators TG1 to TGn are provided, and buffers BUF1 to BUFn for storing timbre data are provided in each of the tone generators TG1 to TGn. In this case, the tone generator CH1 to the channel CHn are configured by a combination of the tone generator and the buffer. Reference numeral 6 denotes a timbre data transfer control unit, which selects timbre data memories 4-1 to 4- m corresponding to the timbres indicated by the tone information and performs the corresponding timbre data in accordance with the channel assignment processing of the channel assignment unit 2. Is transferred to the buffers BUF1 to BUFn of the corresponding channel.

【0006】以上の構成によれば、キーオンがあると、
そのキーに対応する楽音の発生がチャンネルCH1〜C
Hnのいずれかに割り当てられるとともに、音色データ
転送制御部6によって当該キーに対応する音色データが
割当チャンネルのバッファに転送される。こにより、割
当チャンネルのトーンジェネレータは対応するバッファ
内の音色データに応じた音色の楽音信号を作成する。
According to the above configuration, when there is a key-on,
The generation of musical tones corresponding to the keys is performed on channels CH1 to C1.
Hn, and the timbre data transfer controller 6 transfers the timbre data corresponding to the key to the buffer of the assigned channel. As a result, the tone generator of the assigned channel creates a tone signal of a tone corresponding to the tone data in the corresponding buffer.

【0007】[0007]

【発明が解決しようとする課題】ところで、図28に示
す電子楽器においては、時分割処理を行っている各発音
チャンネルに、チャンネル切り換えタイミングに応じ
て、音色データメモリ4−1〜4−n内の音色データを
転送しなければならないため、極めて高速の処理速度が
要求され、実際にはキーオンの変化に追従することが困
難である。特に、トーンジェネレータにおいて、自然楽
器をシミュレートするようなアルゴリズムによって発音
処理を行う場合などは、音色データとしてマイクロプロ
グラム等を転送するため、転送データ量が多くなり、上
述した問題は一層顕著になった。
By the way, in the electronic musical instrument shown in FIG. 28, the tone data memories 4-1 to 4-n are assigned to each of the tone generation channels for which the time-division processing is being performed, according to the channel switching timing. Must be transferred, an extremely high processing speed is required, and it is actually difficult to follow a change in key-on. In particular, in the case where tone generation processing is performed by an algorithm that simulates a natural musical instrument in a tone generator, since a microprogram or the like is transferred as timbre data, the amount of transferred data increases, and the above-described problem becomes more prominent. Was.

【0008】また、図29に示す電子楽器においては、
並列に動作する複数のトーンジェネレータを具備してい
るので、一旦音色データをバッファに転送した後は、各
チャンネルにおいて高速の処理が要求されることはな
い。しかしながら、キーオンが生じる毎に、バッファB
UF1〜BUFnに音色データを転送する必要があるた
め、図28に示すものと同様に、音色データの量が多い
場合には、キーオンに対するレスポンスが悪化して、実
用的でない。
In the electronic musical instrument shown in FIG.
Since a plurality of tone generators that operate in parallel are provided, high-speed processing is not required in each channel after the tone color data is once transferred to the buffer. However, each time a key-on occurs, buffer B
Since it is necessary to transfer timbre data to UF1 to BUFn, as in the case of FIG. 28, when the amount of timbre data is large, the response to key-on deteriorates, which is not practical.

【0009】そこで、図30に示すように、各チャンネ
ルについて音色の数だけのバッファを用意し、予め全て
の音色データを各チャンネルに転送しておくことが考え
られる。このような構成によれば、例えば、トーンジェ
ネレータTG1は、併設されたバッファBUF1−1〜
BUF1−mから直接音色データを読むことができるの
で、キーオン毎に音色データメモリ4−1〜4−mから
音色データを転送する必要がない。そして、他のトーン
ジェネレータTG2〜TGnも同様に動作するので、キ
ーオンについてのレスポンスは良くなる。しかしなが
ら、バッファの容量は、各チャンネル毎に必要とする全
ての音色データに応じて設定しなければならないので、
メモリ容量が膨大になるという問題が生じた。また、自
動演奏を行う場合には、記憶装置から順次楽音情報が読
み出されるが、各音色の楽音情報を効率よく発音チャン
ネルに割り当てる必要がある。例えば、図30に示す装
置のように各発音チャンネルのバッファの数を多くして
おけば、同時発音数が多い音色についても良好に発音す
ることができるが、メモリ容量が膨大になるという問題
が生じ、逆に、バッファの数を少なくすると、同時発音
数が多い音色については発音数が足りなくなるという不
都合が生じる。
Therefore, as shown in FIG. 30, it is conceivable to prepare as many buffers as the number of timbres for each channel and transfer all timbre data to each channel in advance. According to such a configuration, for example, the tone generator TG1 includes the buffers BUF1-1 to BUF1-1 provided in parallel.
Since the timbre data can be read directly from the BUF1-m, there is no need to transfer the timbre data from the timbre data memories 4-1 to 4-m every key-on. Since the other tone generators TG2 to TGn operate in the same manner, the response to key-on is improved. However, since the buffer capacity must be set according to all the tone data required for each channel,
There is a problem that the memory capacity becomes enormous. When performing an automatic performance, musical tone information is sequentially read from the storage device, but it is necessary to efficiently assign musical tone information of each timbre to a tone generation channel. For example, if the number of buffers for each sounding channel is increased as in the apparatus shown in FIG. 30, a tone with a large number of simultaneous sounds can be sounded well, but the memory capacity becomes enormous. Conversely, if the number of buffers is reduced, there is a disadvantage that the number of sounds is insufficient for a tone having a large number of simultaneous sounds.

【0010】この発明は、上述した事情に鑑みてなされ
たもので、バッファの容量を増大させることがなく、し
かも、キーオンレスポンスを極めて良くすることがで
き、また、自動演奏に際して楽音情報の音色割当を効率
的に行うことができる自動演奏装置を提供することを目
的としている。
SUMMARY OF THE INVENTION The present invention has been made in view of the above-mentioned circumstances, and does not increase the capacity of a buffer. Further, the key-on response can be extremely improved. It is an object of the present invention to provide an automatic performance device that can efficiently perform the performance.

【0011】[0011]

【課題を解決するための手段】上記課題を解決するため
に、楽音情報記憶手段に記憶された複数の楽音情報を読
み出し、前記楽音情報に応じた音色の楽音信号を発生
て自動演奏する自動演奏装置において、所定の音色の楽
音信号を発生するための音色データを記憶するm個のバ
ッファを各々所有し、前記バッファに記憶された前記音
色データに基づき楽音信号を発生する複数の発音チャン
ネルと、前記楽音情報記憶手段から前記楽音情報が読み
出される毎に、前記複数の発音チャンネルの中から、該
読み出された楽音情報に対応する、音色の楽音信号を発
生するための前記音色データが前記バッファに記憶され
た当該発音チャンネルを検出し、前記当該楽音チャンネ
ルに前記読み出された楽音情報を割当てて、前記当該発
音チャンネルで前記読み出された楽音情報に対応する音
色の楽音信号を発生させる制御手段と、前記音色データ
をn(n>m)個、記憶する音色データ記憶手段と、
楽音情報記憶手段から前記楽音情報を読み出し、各音
色について同時発音数を検出する同時発音数検出手段
と、前記同時発音数検出手段で検出された各音色の同時
発音数に基づいて、前記複数の発音チャンネルの各バッ
ファへ前記音色データ記憶手段から転送すべき音色デー
タを指示する割当指示手段と、前記割当指示手段の指示
従い、前記音色データ記憶手段に記憶された音色デー
タを前記複数の発音チャンネルの各バッファ転送する
転送手段とを具備することを特徴とする。
In order to solve the above problems SUMMARY OF THE INVENTION, it reads a plurality of musical tone information stored in tone information storing means, and generates tone signals of tone color corresponding to the musical tone information
In the automatic performance device for automatic performance Te, easy predetermined timbre
M buffers for storing timbre data for generating a sound signal
Each owning the buffer and storing the sound stored in the buffer.
Multiple pronunciation channels that generate tone signals based on color data
And the tone information is read from the tone information storage means.
Each time the sound is output,
Generates a tone tone signal corresponding to the read tone information.
The tone data to be generated is stored in the buffer.
The tone channel is detected and the tone channel is detected.
The read tone information is assigned to the
Sound corresponding to the read tone information in the sound channel
And control means for generating a color tone signal, said tone color data
The n (n> m) number, and tone color data storage means for storing, reading out the musical tone information from the music information storage means, and polyphony detecting means for detecting the simultaneous polyphony For each tone, the polyphony Simultaneous playback of each tone detected by the number detection means
Based on the number of sound, the allocation instruction unit that instructs the tone color data to be transferred from said tone color data storage means to the respective buffers of said plurality of tone generation channels, follow the instructions <br/> of the assignment instruction means, Transfer means for transferring the timbre data stored in the timbre data storage means to each buffer of the plurality of tone generation channels .

【0012】[0012]

【作用】各発音チャンネルは、バッファ内の音色データ
を用いて楽音発生を行い、また各バッファには、転送手
段によって音色データ記憶手段の音色データが転送され
る。そして、割当指示手段により、同時発音数に基づい
て、複数の発音チャンネルの各バッファへ音色データ記
憶手段から転送すべき音色データが指示される。したが
って、各発音チャンネルに全ての音色データを用意して
おかなくとも、必要とされる音色の音色データを予め各
バッファに転送しておくことにより、所望の楽音信号を
発生することができる。さらに、同時発音数検出手段に
よって自動演奏における各音色について同時発音数が検
出され、この検出結果に応じて当指示手段が指示内容
を設定するので、効率的な音色割当を行うことができ
る。
[Action] Each sound channel performs tone generation using the tone color data in the buffer, and in each buffer, tone color data of the tone color data storage means is transferred by the transfer means. Then, based on the number of simultaneous sounds,
To store tone data in each buffer of multiple sounding channels.
The timbre data to be transferred is designated from the storage means. Therefore, it is possible to generate a desired tone signal by transferring tone color data of a required tone color to each buffer in advance without preparing all tone color data for each tone generation channel. Furthermore, simultaneous polyphony For each tone is detected in the automatic performance by polyphony detection means, since the assignment instruction means for setting the instruction content in accordance with the detection result, is possible to perform efficient tone assignment it can.

【0013】[0013]

【実施例】以下、図面を参照してこの発明の実施例につ
いて説明する。 A:この発明が適用される楽音発生装置の構成 図1は、この発明が適用される楽音発生装置の構成を示
すブロック図であり、図において、10は外部のMID
I機器である。MIDI機器10としては、例えば、キ
ーボードなどがあり、キーのオン/オフを示すノートオ
ン/ノートオフ情報(NON/NOFF情報)、キーの
音高を示すノートコードNCおよびキーの押下速度を示
すベロシティNV等の楽音情報を出力する。この楽音情
報は、MIDIインターフェイス11を介してCPU1
2に供給されるようになっており、CPU12は供給さ
れた楽音情報に対して後述するような種々の処理を行う
とともに、装置各部を制御する。
Embodiments of the present invention will be described below with reference to the drawings. A: Configuration of a Musical Tone Generator Applied to the Present Invention FIG. 1 is a block diagram showing a configuration of a musical tone generator to which the present invention is applied. In FIG.
I device. The MIDI device 10 includes, for example, a keyboard and the like. Note-on / note-off information (NON / NOFF information) indicating on / off of a key, a note code NC indicating a pitch of a key, and a velocity indicating a pressing speed of a key. Outputs tone information such as NV. This musical sound information is transmitted to the CPU 1 via the MIDI interface 11.
The CPU 12 performs various processes, which will be described later, on the supplied musical tone information, and controls each unit of the apparatus.

【0014】15はCPU12の制御の下に、楽音の発
生を行う楽音合成回路であり、図3に示すようにトーン
ジェネレータTG0〜TG7を有している。また、各ト
ーンジェネレータTG0〜TG7には、各々2つのバッ
ファBUF0−1,0−2〜BUF7−1,7−2が設
けられており、各バッファには異なる音色の音色データ
(マイクロプログラム)が書き込まれるようになってい
る。この場合、サフィックス1のバッファの方が優先し
て使用されるように設定されている。また、各トーンジ
ェネレータTG0〜TG7は対応する2つのバッファB
UF0−1,0−2〜BUF7−1,7−2とともに発
音チャンネルCH0〜CH7を構成している。
Reference numeral 15 denotes a tone synthesis circuit for generating a tone under the control of the CPU 12, and has tone generators TG0 to TG7 as shown in FIG. Also, each of the tone generators TG0 to TG7 is provided with two buffers BUF0-1, 0-2 to BUF7-1, 7-2, respectively, and each buffer stores tone data (microprogram) of different tone colors. It is written. In this case, the buffer with the suffix 1 is set to be used preferentially. Each of the tone generators TG0 to TG7 has two corresponding buffers B
Sound generation channels CH0 to CH7 are configured together with UF0-1, 0-2 to BUF7-1, 7-2.

【0015】各トーンジェネレータTG0〜TG7によ
って形成された楽音信号は、サウンドシステム16に供
給され、ここで、増幅された後にスピーカ17から発音
される。次に、20はROMであり、CPU12で用い
られるプログラムや音色データが記憶されている。この
実施例においては、音色データは100種類程度が記憶
されている。21はRAMであり、種々のレジスタ、フ
ラグが設けられるとともに、作業領域が設定されてい
る。また、RAM21内には、図2に示す音色アサイン
バッファ23が設定されている。この音色アサインバッ
ファ23は、上述したバッファBUF0−1,0−2〜
BUF7−1,7−2に書き込むべき音色データを指定
するものである。図2に示す例の場合は、チャンネルC
H0については、バッファBUF0−1およびバッファ
BUF0−2に各々ブラス(BRASS)およびピアノ
(PIANO)の音色データの転送が指示される。
The tone signal generated by each of the tone generators TG0 to TG7 is supplied to a sound system 16, where it is amplified and then emitted from a speaker 17. A ROM 20 stores programs used by the CPU 12 and timbre data. In this embodiment, about 100 types of timbre data are stored. Reference numeral 21 denotes a RAM, in which various registers and flags are provided and a work area is set. Further, a tone color assignment buffer 23 shown in FIG. The tone color assignment buffer 23 includes the above-mentioned buffers BUF0-1, 0-2,.
This specifies the tone color data to be written to the BUFs 7-1 and 7-2. In the case of the example shown in FIG.
For H0, transfer of tone data of brass (BRASS) and piano (PIANO) is instructed to buffers BUF0-1 and BUF0-2, respectively.

【0016】次に、25は、音色を設定する音色設定ス
イッチやその他の種々スイッチ等が設けられている操作
パネルであり、その操作信号はパネルインターフェイス
26を介してCPU12に供給される。音色設定スイッ
チが操作されると、CPU12は、その操作信号に従っ
て音色アサインバッファ23の内容を書き換えるように
なっている。そして、この音色アサインバッファ23の
内容に従ってROM20内音色データをバッファBUF
0−1,0−2〜BUF7−1,7−2に転送するよう
になっている。
Reference numeral 25 denotes an operation panel provided with tone color setting switches for setting tone colors and other various switches. The operation signals are supplied to the CPU 12 via the panel interface 26. When the timbre setting switch is operated, the CPU 12 rewrites the contents of the timbre assignment buffer 23 according to the operation signal. The tone data in the ROM 20 is stored in a buffer BUF according to the contents of the tone assignment buffer 23.
0-1 and 0-2 to BUF 7-1 and 7-2.

【0017】B:図1に示す楽音発生装置の動作 次に、上述した構成による楽音発生装置の動作について
説明する。 (イ)メイン処理 図4は、この実施例のメイン処理を示すフローチャート
であり、まず、ステップSP1において、装置各部をイ
ニシャライズし、次いで、MIDI処理、パネル処理お
よび発音チャンネル処理を行う(ステップSP2,3,
4)。以後は、ステップSP2,3,4の処理を循環す
る。これらのうちステップSP3のパネル処理において
は、操作パネル25の各スイッチのオン/オフ状態をス
キャンし、これらのオン/オフ状態に応じた設定(音色
設定等)を行う。この処理は、一般の電子楽器で行われ
ている処理と同様であるので、詳細説明を省略し、以下
に、ステップSP2,4の処理内容およびこれらの処理
に用いられる各種サブルーチンについて詳述する。
B: Operation of the Musical Tone Generator shown in FIG. 1 Next, the operation of the musical sound generator having the above-described configuration will be described. (A) Main Processing FIG. 4 is a flowchart showing the main processing of this embodiment. First, in step SP1, each unit of the apparatus is initialized, and then, MIDI processing, panel processing, and sound generation channel processing are performed (step SP2). 3,
4). Thereafter, the processing of steps SP2, SP3, SP4 is circulated. Of these, in the panel processing of step SP3, the on / off state of each switch of the operation panel 25 is scanned, and setting (tone setting, etc.) according to these on / off states is performed. This processing is the same as the processing performed in a general electronic musical instrument, and thus detailed description is omitted, and the processing contents of steps SP2 and SP4 and various subroutines used in these processing will be described in detail below.

【0018】(ロ)MIDI処理 図5は、MIDI処理の内容を示すフローチャートであ
る。まず、ステップSPa1においては、MIDIバッ
ファのスキャンが行われる。MIDIバッファは、RA
M21内に設定されているバッファである。ここで、M
IDIインターフェイス11は外部MIDI機器10か
ら受け取ったMIDI信号をMIDIバッファに転送す
るようになっている。そして、ステップSPa2に進
み、スキャンの結果からイベントがあったか否かを判定
する。ここで、イベントとは、演奏操作子の変化、例え
ば、キーボードのキーのオフからオンへの変化、および
オンからオフへの変化をいう。
(B) MIDI processing FIG. 5 is a flowchart showing the contents of the MIDI processing. First, in step SPa1, the MIDI buffer is scanned. The MIDI buffer is RA
This is a buffer set in M21. Where M
The IDI interface 11 transfers a MIDI signal received from the external MIDI device 10 to a MIDI buffer. Then, the process proceeds to step SPa2, and it is determined whether or not there is an event from the scan result. Here, an event refers to a change in a performance operation element, for example, a change of a key on a keyboard from off to on and a change from on to off.

【0019】ステップSPa2の判断結果が「NO」の
場合は、直ちにリターンし、「YES」の場合は、ステ
ップSPa3に進む。ステップSPa3においては、オ
フからオンへの変化を示すノートオンデータNON、ま
たは、オンからオフへの変化を示すノートオフデータN
OFFがレジスタEVに書き込まれる。また、音高を示
すノートコードがレジスタNCに、キーを操作する早さ
に対応したベロシティがレジスタNVに書き込まれる。
次に、ステップSPa4に進み、レジスタEVの内容が
ノートオンデータNONであるか否かが判定される。こ
の判定が「YES」であればステップSPa5のノート
オン処理に進み、また、「NO」であればステップSP
a6のノートオフ処理に進む。
If the result of the determination at step SPa2 is "NO", the routine immediately returns, and if "YES", the process proceeds to step SPa3. In step SPa3, note-on data NON indicating a change from off to on or note-off data N indicating a change from on to off
OFF is written to the register EV. The note code indicating the pitch is written in the register NC, and the velocity corresponding to the key operation speed is written in the register NV.
Next, the routine proceeds to step SPa4, where it is determined whether or not the content of the register EV is the note-on data NON. If this determination is "YES", the flow proceeds to the note-on process in step SPa5, and if "NO", step SPa5 is performed.
The process proceeds to a6 note-off process.

【0020】(i)ノートオン処理の概要 図6は、ノートオン処理の概要を示すフローチャートで
ある。まず、ステップSPb1において、イベントの検
出されたMIDIチャンネルの番号をレジスタMCHに
書き込む。次いで、ステップSPb2のチャンネル割当
処理に進む。この処理は、ノートオンのあった音を、楽
音合成回路15内のトーンジェネレータTG0〜TG7
(図3参照)、すなわち、発音チャンネルCH0〜CH
7に割り当てる処理であり、詳細については後述する
が、割り当てるべき発音チャンネルが見つかった場合は
レジスタFOUNDの値を1にするとともに、レジスタ
ACHに割り当てるべき発音チャンネルの番号を書き込
む。また、割り当てる発音チャンネルが見つからない場
合は、レジスタFOUNDの内容を0にする。
(I) Outline of Note-On Process FIG. 6 is a flowchart showing an outline of the note-on process. First, in step SPb1, the number of the MIDI channel for which an event has been detected is written to the register MCH. Next, the process proceeds to a channel assignment process in step SPb2. In this process, the note-on sound is converted into tone generators TG0 to TG7 in the tone synthesis circuit 15.
(See FIG. 3), that is, sounding channels CH0 to CH
7 is a process of assigning the details will be described later, together with the sound channel and if found to the value of the register FOUND 1 to be assigned, writing the number of tone generation channels to be assigned to the register ACH. If the sound channel to be assigned cannot be found, the content of the register FOUND is set to 0.

【0021】そして、ステップSPb3に進み、レジス
タFOUNDの値が「1」か否かが判定される。この判
定が「NO」の場合は、割り当てるべきチャンネルがな
いので、キーオン処理は行わず、リターンする。一方、
ステップSPb3の判定が「YES」となった場合は、
ステップSPb4に進み、レジスタST(ACH)に1
を書き込む。ここで、ACHは、レジスタACHの内容
を意味する。すなわち、割り当てるべきチャンネルの番
号である。また、レジスタST(ACH)は、各発音チ
ャンネルの状態を示すためのレジスタであり、値「0」
のときが空きチャンネル、値「1」のときが押鍵中、値
「2」のときが離鍵中を示す。
Then, the process proceeds to a step SPb3, where it is determined whether or not the value of the register FOUND is "1". If this determination is "NO", there is no channel to be assigned, and the process returns without performing key-on processing. on the other hand,
If the determination in step SPb3 is “YES”,
Proceed to step SPb4, and set 1 in the register ST (ACH).
Write. Here, ACH means the contents of the register ACH. That is, the number of the channel to be assigned. The register ST (ACH) is a register for indicating the state of each sounding channel, and has a value “0”.
Indicates a free channel, a value of “1” indicates that the key is being pressed, and a value of “2” indicates that the key is being released.

【0022】次に、ステップSPb5に進み、レジスタ
ANC(ACH)にレジスタNC内のノートコードを書
き込む。そして、ステップSPb6に進み、ACH番チ
ャンネルにレジスタNC内のノートコード、レジスタN
V内のノートベロシティおよびノートオン情報NONを
転送する。この結果、楽音合成回路15内の対応するチ
ャンネルにおいて楽音信号の合成が開始される。なお、
各チャンネルCH0〜CH7におけるバッファBUF
(ACH)−1、BUF(ACH)−2の選択は、チャ
ンネル割当処理(ステップSPb2)において行われる
が、これについては後述する。
Next, the process proceeds to step SPb5, and writes the note code in the register NC to the register ANC (ACH). Then, the process proceeds to a step SPb6, where the note code in the register NC, the register N
The note velocity and note-on information NON in V are transferred. As a result, the synthesis of the tone signal is started in the corresponding channel in the tone synthesis circuit 15. In addition,
Buffer BUF in each channel CH0 to CH7
The selection of (ACH) -1 and BUF (ACH) -2 is performed in the channel assignment process (step SPb2), which will be described later.

【0023】(ii)ノートオフ処理 次に、ノートオフ処理について図7を参照して説明す
る。まず、ステップSPc1において、レジスタMCH
にキーオフイベントが検出されたMIDIチャンネル番
号を書き込む。次に、ステップSPc2に移り、レジス
タTCにレジスタATC(MCH)の内容を書き込む。
レジレスタATC(0)〜(7)の内容は、MIDIチ
ャンネル番号に対するトーンコード(音色を示すコー
ド)が予め割り当てられており、例えば、レジスタAT
C(1)にはピアノ、レジスタATC(2)にはバイオ
リンのトーンコードが格納されている。このステップS
Pc2においては、イベントがあったMIDIチャンネ
ル番号に対応するレジスタATC(MCH)内のトーン
コードが、レジスタTCに転送される。
(Ii) Note Off Processing Next, note off processing will be described with reference to FIG. First, in step SPc1, the register MCH
Is written with the MIDI channel number at which the key-off event is detected. Next, the process proceeds to step SPc2, and writes the contents of the register ATC (MCH) to the register TC.
As for the contents of the register ATCs (0) to (7), tone codes (codes indicating timbres) corresponding to MIDI channel numbers are assigned in advance.
C (1) stores a tone code of a piano, and register ATC (2) stores a tone code of a violin. This step S
In Pc2, the tone code in the register ATC (MCH) corresponding to the MIDI channel number where the event occurred is transferred to the register TC.

【0024】次に、ステップSPc3において、各チャ
ンネルの状態をチャンネルCH0からCH7までスキャ
ンして調べるために、スキャン中のチャンネル番号を示
すレジスタCHの内容をクリアする。そして、ステップ
SPc4に移り、レジスタST(CH)の内容が「1」
か否か、すなわち、押鍵中か否かの判定を行う。この判
定が「NO」の場合、すなわち、「0」(空きチャンネ
ル)または「2」(離鍵中)の場合は、すでにノートオ
フされているので、新たなノートオフ処理の対象とせ
ず、スキャンのチャンネル番号を1インクリメントして
(ステップSPc5)、ステップSPc6に進む。ステ
ップSPc6では、レジスタCHの内容が「8」か否
か、すなわち、スキャン処理が全てのチャンネルについ
て行われたか否かが判定され、「NO」であれば、ステ
ップSPc4に戻る。
Next, in step SPC3, in order to examine to scan the status of each channel from the channel CH 0 to CH 7, clears the contents of the register CH indicating the channel number during the scan. Then, the flow shifts to step SPc4, where the content of the register ST (CH) is “1”.
It is determined whether or not the key is being depressed. If this determination is “NO”, that is, if “0” (empty channel) or “2” (during key release), note-off has already been performed, so that the note-off processing is not performed and new scan-off processing is not performed. Is incremented by 1 (step SPc5), and the process proceeds to step SPc6. In step SPc6, it is determined whether or not the content of the register CH is "8", that is, whether or not the scan processing has been performed for all the channels. If "NO", the process returns to step SPc4.

【0025】一方、ステップSPc4の判定が「YE
S」の場合は、ステップSPc7に進み、レジスタAN
C(CH)の内容がキーオフイベントのあったキーのノ
ートコードと等しいか否かが判定され、「NO」であれ
ば、別の音についてキーオフがあった場合であるので、
当該音についてはノートオフ処理を行わず、ステップS
Pc5に進む。すなわち、スキャンチャンネル番号を1
インクリメントして再度ステップSPc4の判定を行
う。ステップSPc7の判定で「YES」となった場合
は、レジスタSEL(CH)の内容が1で、かつ、レジ
スタATC1(CH)の内容がレジスタTCの内容(ス
テップSPc2で書き込まれたトーンコード)と同じで
あるか否かが判定される。ここで、レジスタSEL(C
H)は、そのチャンネルが図2に示すグループ1または
2のいずれの音色(パラメータ)によって発音している
かを示すレジスタである。また、レジスタATC1(C
H)は、グループ1について各チャンネルの音色が記憶
されるレジスタである。
On the other hand, the determination in step SPc4 is "YE
In the case of "S", the process proceeds to step SPc7,
It is determined whether or not the content of C (CH) is equal to the note code of the key for which the key-off event has occurred. If "NO", it means that another key has been key-off.
The note-off process is not performed for the sound, and step S
Proceed to Pc5. That is, the scan channel number is set to 1
The value is incremented and the determination in step SPc4 is performed again. If "YES" is determined in the step SPc7, the contents of the register SEL (CH) are 1 and the contents of the register ATC1 (CH) are the contents of the register TC (the tone code written in step SPc2). It is determined whether they are the same. Here, the register SEL (C
H) is a register indicating which tone (parameter) of the group 1 or 2 shown in FIG. The register ATC1 (C
H) is a register in which the timbre of each channel for group 1 is stored.

【0026】ステップSPc8で「YES」となる場合
は、キーオフされた音が当該チャンネル(CH)のグル
ープ1の音色で発音されている場合であり、ステップS
Pc10へ進む。ステップSPc8で「NO」となる場
合は、ステップSPc9へ進み、レジスタSEL(C
H)の内容が2で、かつ、レジスタATC2(CH)の
内容がレジスタTCの内容と等しいか否かが判定され
る。レジスタATC2(CH)は、レジスタATC1
(CH)と同様のレジスタであり、グループ2について
各チャンネルの音色が記憶されるレジスタである。ステ
ップSPc9で「YES」の場合は、キーオフされた音
が当該チャンネル(CH)のグループ2の音色で発音さ
れている場合であり、ステップSPc10へ進む。SP
c9において「NO」と判定された場合は、チャンネル
番号を1インクリメントしてステップSPc4の判定を
行う。
If "YES" is determined in step SPc8, it means that the key-off sound is produced by the tone of the group 1 of the channel (CH), and the step Sc8 is performed.
Proceed to Pc10. If “NO” is determined in the step SPc8, the process proceeds to a step SPc9, and the register SEL (C
It is determined whether the content of H) is 2 and the content of register ATC2 (CH) is equal to the content of register TC. The register ATC2 (CH) is the register ATC1
This register is the same register as (CH) and stores the tone color of each channel for group 2. If "YES" in the step SPc9, it means that the key-off sound is generated in the tone color of the group 2 of the channel (CH), and the process proceeds to the step SPc10. SP
If “NO” is determined in c9, the channel number is incremented by 1 and the determination in step SPc4 is performed.

【0027】一方、ステップSPc8またはステップS
Pc9のいずれかにおいて「YES」判定されると、ス
テップSPc10に進み、レジスタST(CH)に離鍵
中を示す「2」を書き込み、次いで、ステップSPc1
1に進んで、CHチャンネルにノートオフ情報NOFF
を出力する。これにより、該当するチャンネルの発音が
終了する。そして、ステップSPc11の処理の後はリ
ターンする。また、全てのチャンネルについてスキャン
してもノートオフさせるべきチャンネルが見つからなか
った場合は、ステップSPc6において「YES」と判
定されてリターンする。
On the other hand, step SPc8 or step S
If “YES” is determined in any of Pc9, the process proceeds to step SPc10, and writes “2” indicating that the key is being released to the register ST (CH), and then proceeds to step SPc1.
Proceed to 1 to set note-off information NOFF to the CH channel.
Is output. Thereby, the sound generation of the corresponding channel ends. Then, the process returns after the processing of step SPc11. If a channel to be turned off is not found even after scanning all channels, "YES" is determined in step SPc6 and the process returns.

【0028】(ハ)発音チャンネル処理 次に、発音チャンネル処理について、図8を参照して説
明する。この処理は、発生した楽音信号の振幅が0とな
っているチャンネルを見つけ、空きチャンネルとして設
定する処理であり、全部のチャンネルをスキャンして振
幅0のチャンネルをサーチする。まず、全チャンネルス
キャンのために、ステップSPd1ではチャンネルカウ
ント用のレジスタCHを0にし、ステップSPd7では
レジスタCHをインクリメントし、また、ステップSP
d8では全てのチャンネルをスキャンしたか否かを判定
する処理を行う。そして、ステップSP8からステッ
プSP2へ戻るループにより、全チャンネルがスキャ
ンされる。
(C) Sound Channel Processing Next, sound channel processing will be described with reference to FIG. In this process, a channel in which the amplitude of the generated tone signal is 0 is found, and the channel is set as an empty channel. All channels are scanned to search for a channel having an amplitude of 0. First, in order to scan all the channels, the register CH for channel counting is set to 0 in step SPd1, the register CH is incremented in step SPd7, and
In d8, a process is performed to determine whether all channels have been scanned. Then, the loop returning from step SP d 8 to step SP d 2, all the channels are scanned.

【0029】次に、ステップSPd2においては、レジ
スタST(CH)の内容が「2」であるか否か、すなわ
ち、離鍵されているか否かを判定する。この判定が「N
O」の場合は、まだ発音中であって離鍵されていない場
合であるので、空きチャンネルとして設定することはせ
ず、次のチャンネルの処理へ進む(ステップSPd
7)。一方、ステップSPd2の判定が「YES」の場
合は、ステップSPd3に進んでレジスタENVに当該
チャンネルの楽音信号のその時点のエンベロープ値を書
き込む。そして、ステップSPd4に進んで、レジスタ
ENVに書き込まれたエンベロープ値が「0」か否かが
判断される。この判断が「NO」の場合は、離鍵はされ
ているが未だ発音を終了していない場合(減衰中の場
合)であるので、空きチャンネルとして設定せず、次の
チャンネルの処理へ進む。
Next, in step SPd2, it is determined whether or not the content of the register ST (CH) is "2", that is, whether or not the key has been released. This judgment is "N
In the case of “O”, since the sound is still being generated and the key has not been released, the process is not set as an empty channel and the process proceeds to the next channel (step SPd)
7). On the other hand, if the determination in step SPd2 is "YES", the flow advances to step SPd3 to write the current envelope value of the tone signal of the channel into the register ENV. Then, the process proceeds to step SPd4, where it is determined whether or not the envelope value written in the register ENV is “0”. If this determination is “NO”, it means that the key has been released but the sound generation has not yet ended (in the case of attenuation), so that the process proceeds to the processing of the next channel without setting it as an empty channel.

【0030】一方、ステップSPd4の判定が「YE
S」の場合は、ステップSPd5において状態を示すレ
ジスタST(CH)に空きチャンネルを示す値「0」を
書き込み、さらに、ステップSPd6においてノードコ
ードを記憶するレジスタANC(CH)に「0」を書き
込んで、次のチャンネルの処理へ進む。なお、「0」
は、ノートコードにはない値である。上述の処理を全チ
ャンネルについて行った後は、ステップSPd8を介し
て、メインルーチンへリターンする。
On the other hand, the determination in step SPd4 is "YE
In the case of "S", a value "0" indicating an empty channel is written in a register ST (CH) indicating a state in step SPd5, and "0" is written in a register ANC (CH) storing a node code in step SPd6. Then, the process proceeds to the next channel. Note that "0"
Is a value not found in the note code. After performing the above-described processing for all the channels, the process returns to the main routine via step SPd8.

【0031】(ニ)ノートオン処理の詳細(チャンネル
割当処理) 次に、チャンネル割当処理について図9を参照して説明
する。このチャンネル割当処理はキーオンされた音の発
音を空きチャンネルに割り当てる処理であり、空きチャ
ンネルが見つからない場合は、後述するトランケート処
理を行う。また、チャンネル割当処理は、前述のように
ノートオン処理(図6のステップSPb2参照)から起
動される処理である。まず、ステップSPe1におい
て、レジスタATC(MCH)の内容をレジスタTCに
転送する。ここで、MCHの値は、ノートオン処理にお
いてイベントの検出されたMIDIチャンネルの番号に
なっているから(図6のステップSPb1参照)、ステ
ップSPe1の処理によってレジスタTCにイベントの
あったMIDIチャンネルの番号に対応するトーンコー
ドが転送されることになる。
(D) Details of Note-On Process (Channel Assignment Process) Next, the channel assignment process will be described with reference to FIG. This channel allocation process is a process of allocating the sound of the key-on sound to an empty channel. If no empty channel is found, a truncation process described later is performed. The channel allocation process is a process started from the note-on process (see step SPb2 in FIG. 6) as described above. First, in step SPe1, the contents of the register ATC (MCH) are transferred to the register TC. Here, the value of MCH is the number of the MIDI channel at which the event was detected in the note-on process (see step SPb1 in FIG. 6). The tone code corresponding to the number will be transferred.

【0032】次に、ステップSPe2に進み、空きチャ
ンネルが見つかったか否かを示すフラグFOUNDをク
リアしする。次いで、このチャンネル割当処理について
も、全チャンネルをスキャンして調べるために、ステッ
プSPe3でチャンネルカウント用のレジスタCHを0
にし、ステップSPe8でレジスタCHをインクリメン
トし、また、ステップSPe9で全てのチャンネルをス
キャンしたか否かを判定する処理を行う。したがって、
最適な発音チャンネルが見つかった場合を除くほか、ス
テップSPe9からステップSPe4へ戻るループを繰
り返す。
Next, the process proceeds to step SPe2, where a flag FOUND indicating whether or not an empty channel has been found is cleared. Next, in this channel assignment process, the channel count register CH is set to 0 in step SPe3 in order to scan and check all the channels.
In step SPe8, the register CH is incremented, and in step SPe9, it is determined whether all the channels have been scanned. Therefore,
Except for the case where an optimal sounding channel is found, a loop returning from step SPe9 to step SPe4 is repeated.

【0033】さて、ステップSPe4においては、チャ
ンネルの発音状態を示すレジスタST(CH)の内容が
0か否か、すなわち、空きチャンネルか否かを判定し、
「NO」の場は、チャンネル割当ができないためステッ
プSPe8、SPe9を介してステップSPe4に戻
る。一方、ステップSPe4において、「YES」と判
定された場合は、ステップSPe5に進み、レジスタA
TC2(CH)内のトーンコードとレジスタTC内のト
ーンコードとが等しいか否かが判定される。すなわち、
当該チャンネルについてグループ2(図2参照)に設定
されている音色とキーオンされた音色とが等しいか否か
が判定される。この判定が「NO」の場合は、ステップ
SPe10に移り、上記と同様に、当該チャンネルにつ
いてグループ1(図2参照)に設定されている音色とキ
ーオンされた音色とが等しいか否かが判定される。この
ステップSPe10で「YES」と判定された場合は、
ステップSPe11〜SPe13の処理を行い、当該チ
ャンネルにその音色を割り当てる。すなわち、ステップ
SPe11においてレジスタSEL(CH)の内容を
「1」にしてグループ1の音色が選択されたことを示
し、ステップSPe12においてフラグFOUNDの値
を「1」にして空きチャンネルが見つかったことを示
し、さらに、ステップSPe13に進んで、レジスタA
CHに当該空きチャンネルの番号であるレジスタCHの
内容を書き込む。そして、CPU12は、レジスタSE
L(CH)、ACHの内容に基づいて、チャンネルAC
Hに対し、グループ1のバッファ、すなわち、バッファ
BUF(ACH)−1を選択する。次いで、ステップS
Pe13の処理の後は、図6に示すノートオン処理に戻
り、ステップSPb4,5,6の処理の処理によって楽
音の発生がなされる。
In step SPe4, it is determined whether or not the content of the register ST (CH) indicating the sounding state of the channel is 0, that is, whether or not the channel is an empty channel.
In the case of "NO", the channel returns to step SPe4 via steps SPe8 and SPe9 because the channel cannot be allocated. On the other hand, if “YES” is determined in step SPe4, the process proceeds to step SPe5, and the register A
It is determined whether the tone code in TC2 (CH) is equal to the tone code in register TC. That is,
It is determined whether the timbre set in group 2 (see FIG. 2) for the channel is equal to the key-on timbre. If this determination is "NO", the process moves to step SPe10, and similarly to the above, it is determined whether the tone set in group 1 (see FIG. 2) for the channel is equal to the key-on tone. You. If "YES" is determined in this step SPe10,
The processing of steps SPe11 to SPe13 is performed, and the timbre is assigned to the channel. That is, in step SPe11, the content of the register SEL (CH) is set to "1" to indicate that the tone of group 1 has been selected, and in step SPe12, the value of the flag FOUND is set to "1" to indicate that an empty channel has been found. And further proceeds to step SPe13 to
The content of the register CH, which is the number of the empty channel, is written to CH. Then, the CPU 12 sets the register SE
L (CH), channel AC based on the contents of ACH
For H, select the buffer of group 1, i.e., buffer BUF (ACH) -1. Then, step S
After the processing of Pe13, the process returns to the note-on processing shown in FIG. 6, and a musical tone is generated by the processing of steps SPb4, 5, and 6.

【0034】一方、ステップSPe5、SPe10の双
方において「NO」と判定された場合は、空きチャンネ
ルがグループ1およびグループ2のいずれの音色におい
ても見つからなかった場合であるので、ステップSPe
8、SPe9を介してステップSPe4に進み、次のチ
ャンネルについての処理を開始する。また、ステップS
Pe5において「YES」と判定された場合は、グルー
プ2の音色において空きチャンネルが見つかった場合で
あり、ステップSPe6においてレジスタFOUNDを
1にし、ステップSPe7においてレジスタTEMPに
そのチャンネルの番号を示すレジスタCHの値を転送す
る。レジスタTEMPは、空きチャンネルがグループ2
の音色において見つかった場合に、そのチャンネルの番
号を一時的に記憶するためのレジスタである。
On the other hand, if the determination in step SPe5 or SPe10 is "NO", it means that an empty channel has not been found in any of the group 1 and group 2 timbres.
8, the process proceeds to step SPe4 via SPe9, and starts processing for the next channel. Step S
If "YES" is determined in Pe5, it means that an empty channel has been found in the tone color of group 2, the register FOUND is set to 1 in step SPe6, and in step SPe7, the register CH indicating the channel number is indicated in the register TEMP. Transfer the value. The register TEMP indicates that an empty channel is group 2
This register is used to temporarily store the number of the channel when the channel number is found in the timbre.

【0035】ステップSPe7の処理の後は、ステップ
SPe8,SPe9を介してステップSPe4に戻る。
以後は、上述した処理をチャンネル7に至るまで行う
が、グループ1の音色において空きチャンネルが検出さ
れた場合は、ステップSPe10〜SPe13の処理を
行ってノートオン処理に移り、発音処理がなされる。こ
のように、グループ1に設定されている音色について空
きチャンネルが見つかった場合は、直ちに、チャンネル
割当を行って発音処理を行う。これは、グループ1の音
色におけるチャンネル割当を優先させているためであ
る。
After the processing in step SPe7, the processing returns to step SPe4 via steps SPe8 and SPe9.
Thereafter, the above-described processing is performed up to the channel 7. If a vacant channel is detected in the tone color of the group 1, the processing of steps SPe10 to SPe13 is performed, and the processing shifts to the note-on processing, and the sound generation processing is performed. As described above, when an empty channel is found for the tone color set in the group 1, the channel is immediately allocated and the sound generation process is performed. This is because priority is given to channel assignment for the tone color of group 1.

【0036】次に、グループ1の音色については空きチ
ャンネルはなかったが、グループ2の音色については空
きチャンネルが検出された場合は、ステップSPe9、
SPe15を介してステップSPe16に進み、レジス
タSEL(TEMP)の値を「2」にしてグループ2の
音色が選択されたことを示した後に、ステップSPe1
7においてレジスタACHに当該チャンネルの番号であ
るレジスタTEMPの内容を書き込む。そして、CPU
12は、レジスタSEL(CH)、ACHの内容に基づ
いて、チャンネルACHに対し、グループ2のバッフ
ァ、すなわち、バッファBUF(ACH)−2を選択す
る。次いで、ステップSPe17の処理の後は、図6に
示すノートオン処理に戻り、楽音の発生がなされる。
Next, if there is no empty channel for the tone of group 1 but an empty channel is detected for the tone of group 2, step SPe9,
Proceeding to step SPe16 via SPe15, the value of the register SEL (TEMP) is set to "2" to indicate that the tone of group 2 has been selected, and then to step SPe1.
At 7, the contents of the register TEMP, which is the number of the channel, are written to the register ACH. And CPU
Reference numeral 12 selects a buffer of Group 2 for the channel ACH, that is, a buffer BUF (ACH) -2, based on the contents of the registers SEL (CH) and ACH. Next, after the process of step SPe17, the process returns to the note-on process shown in FIG. 6, and a tone is generated.

【0037】一方、グループ1およびグループ2のいず
れにおいても空きチャンネルが検出されなかった場合
は、ステップSPe9、SPe15を介してステップS
Pe18のトランケート処理に至る。トランケート処理
は、発音中の楽音のうちエンベロープの最も小さい音
(最小音量の音)を発音しているチャンネルを探し、そ
のチャンネルを強制的に空きチャンネルにして新しい音
の発音を割り当てるという処理である。詳細については
後述するが、このトランケート処理によって空きチャン
ネルに設定されたチャンネルの番号はレジスタTCHに
書き込まれるようになっている。そして、ステップSP
e19において、レジスタACHにレジスタTCHの内
容を書き込み、図6に示すノートオン処理に戻って楽音
の発生がなされる。
On the other hand, if no vacant channel is detected in either group 1 or group 2, step SPe9 and step SPe15 are followed by step Se15.
It reaches the truncation processing of Pe18. The truncation process is a process of searching for a channel that is producing the smallest envelope sound (smallest volume sound) among the musical tones being produced, and forcibly setting that channel to an empty channel and assigning the production of a new sound. . Although details will be described later, the channel number set as an empty channel by this truncation processing is written in the register TCH. And step SP
At e19, the contents of the register TCH are written to the register ACH, and the process returns to the note-on processing shown in FIG. 6 to generate a musical tone.

【0038】(i)トランケート処理 次に、トランケート処理について図10および図11を
参照して説明する。図10に示す処理は、ノートオンさ
れた音の音色がグループ1に設定される音色である場合
は、現時点においてグループ2の音色で発音しているチ
ャンネルのなかから最もエンベロープの小さいものを検
出して割り当てる処理である。図10に示す処理におい
ては、まず、ステップSPf1でスキャンのためのレジ
スタCHをクリアした後、ステップSPf2でレジスタ
MINにエンベロープの最値を書き込む。レジスタM
INは、最小エンベロープ値を探すためのレジスタであ
り、各チャンネルのエンベロープ値と比較され、より小
さいエンベロープ値が検出されると、その値に書き換え
られるようになっている。
(I) Truncate Processing Next, the truncation processing will be described with reference to FIG. 10 and FIG. When the tone of the note-on sound is the tone set to group 1, the process shown in FIG. 10 detects the channel with the smallest envelope among the channels currently sounding with the tone of group 2 at present. This is the process of assigning. In the processing shown in FIG. 10, first, after clearing the register CH for scanning at step SPf1, writes the minimum value of the envelope in the register MIN at step SPf2. Register M
IN is a register for searching for the minimum envelope value. The register is compared with the envelope value of each channel, and when a smaller envelope value is detected, it is rewritten to that value.

【0039】次に、ステップSPf3においては、レジ
スタTC内のトーンコード(ノートオンされた音のトー
ンコード)がレジスタATC1(CH)内のトーンコー
ドか否か、すなわち、グループ1の当該チャンネルCH
に設定されているトーンコードか否かが判定される。こ
の判定が「YES」の場合は、ステップSPf4に進ん
でレジスタSEL(CH)が1か否かが判定される。こ
の判定は、当該チャンネルがグループ1の音色で現に発
音を行っているかの判定である。このステップSPf4
で「NO」と判定されると、ステップSPf5に進み、
レジスタENVに当該チャンネルのエンベロープ値を書
込み、次いで、ステップSPf6に進んで、レジスタE
NVの値がレジスタMINより小さいか否かが判定され
る。この判定が「YES」の場合は、レジスタMINに
レジスタENVの内容を書き込み、レジスタTCHに当
該チャンネルの番号を示すレジスタCHの内容を書き込
む。レジスタTCHは、強制的に割当を行うチャンネ
ル、すなわち、トランケートチャンネルの番号を記憶す
るレジスタである。次に、ステップSPf9に進み、フ
ラグFOUNDの値を「1」にして、空きチャンネルが
検出されたことを示す。
Next, at step SPf3, it is determined whether or not the tone code (tone code of the note-on sound) in the register TC is a tone code in the register ATC1 (CH), that is, the corresponding channel CH of the group 1
It is determined whether or not the tone code is set to. If this determination is "YES", the flow advances to step SPf4 to determine whether or not the register SEL (CH) is 1. This determination is a determination as to whether the channel is actually generating a tone in group 1. This step SPf4
If "NO" is determined in step SPf5, the process proceeds to step SPf5.
The envelope value of the channel is written into the register ENV, and then the process proceeds to step SPf6, where the register EV
It is determined whether the value of NV is smaller than the register MIN. If this determination is "YES", the contents of the register ENV are written into the register MIN, and the contents of the register CH indicating the channel number are written into the register TCH. The register TCH is a register for storing the number of the channel to which the assignment is forcibly performed, that is, the number of the truncated channel. Next, the process proceeds to step SPf9, in which the value of the flag FOUND is set to “1” to indicate that an empty channel has been detected.

【0040】ステップSPf9の後は、ステップSPf
10に進んでレジスタCHの内容をインクリメントし、
ステップSPf11において全チャンネルについてのス
キャンが済んだか否かが判定される。全チャンネルにつ
いてのスキャンが済んでいなければ、ステップSPf3
に戻って上述の処理を繰り返す。上述の処理の繰り返し
において、エンベロープのより小さいチャンネルが検出
されれば、レジスタMINおよびレジスタTCHの内容
が書き換えられ、検出されなければ前回値が保持される
(ステップSPf6→SPf10)。
After step SPf9, step SPf
Proceeding to 10, increment the contents of the register CH,
In step SPf11, it is determined whether or not scanning has been completed for all channels. If scanning has not been completed for all channels, step SPf3
And the above processing is repeated. In the repetition of the above processing, if a channel having a smaller envelope is detected, the contents of the register MIN and the register TCH are rewritten, and if not detected, the previous value is held (step SPf6 → SPf10).

【0041】一方、ステップSPf3で「NO」と判定
された場合は、ノートオンされた音の音色がチャンネル
CHについてはグループ1に設定された音色ではないの
で、トランケート処理を行わずに、直ちに、次のチャン
ネルの処理に移る(ステップSPf3→SPf10)。
また、ステップSPf4で「YES」と判定された場合
は、当該チャンネルCHは、優先側であるグループ1の
音色で発音を行っているので、新たな音の発音を強制的
に割り当てることをせずに、次のチャンネルの処理に進
む(ステップSPf4→SPf10)。
On the other hand, if "NO" is determined in the step SPf3, since the tone color of the note-on sound is not the tone color set in the group 1 for the channel CH, the truncation process is not performed, and immediately The process moves to the next channel (step SPf3 → SPf10).
If “YES” is determined in step SPf4, since the channel CH is sounding with the tone color of group 1 on the priority side, the sound of the new sound is not forcibly assigned. Then, the process proceeds to the next channel (step SPf4 → SPf10).

【0042】さて、上述した処理でトランケートチャン
ネルが検出された場合は、ステップSPf11、SPf
12を介してステップSPf13に進み、レジスタSE
L(TCH)の内容を1に書き換える(それまでは、グ
ループ2の音色で発音をしていたため)。そして、ステ
ップSPf14に進み、レジスタTCHで示される番号
のチャンネルについて強制的に消音処理を行い、図9に
示すフローチャートに戻る。さらに、図9に示すステッ
プSPe19を介して図6に示す処理に進んで、ノート
オンされた音の発音がなされる(ステップSPb3〜S
Pb6参照)。
If a truncated channel is detected in the above-described processing, steps SPf11, SPf
12 to step SPf13 via the register SE
The content of L (TCH) is rewritten to 1 (because the tone was previously produced in the tone of group 2). Then, the process proceeds to step SPf14 to forcibly mute the channel of the number indicated by the register TCH, and returns to the flowchart shown in FIG. Further, the processing proceeds to the processing shown in FIG. 6 via step SPe19 shown in FIG. 9, and the note-on sound is generated (steps SPb3 to SPb).
Pb6).

【0043】一方、図10に示すステップSPf3〜S
Pf11のループにおいて、トランケートチャンネルが
検出されなかった場合は、ステップSPf11、SPf
12を介してステップSP15のトランケート処理2へ
進む。トランケート処理2は、図11に示す処理になっ
ており、ステップSPg4を除いては図10に示すステ
ップSPf1〜SPf11までの処理と同様の処理であ
る。
On the other hand, steps SPf3 to SPf shown in FIG.
If no truncated channel is detected in the loop of Pf11, steps SPf11 and SPf
Then, the process proceeds to the truncation process 2 of step SP15 via the program 12. Truncate process 2 is a process shown in FIG. 11, and is the same process as steps SPf1 to SPf11 shown in FIG. 10 except for step SPg4.

【0044】図11に示すステップSPg4は、図10
に示すステップSPf4に対して「YES」、「NO」
の分岐が逆になっている。すなわち、ステップSPg4
は、当該チャンネルがグループ1の音色で発音している
場合にトランケートを行うようにする処理である。した
がって、図11に示す処理によって、グループ1の音色
で発音を行っているチャンネルのち最もエンベロープの
小さいチャンネルがトランケートチャンネルとして検出
される。
Step SPg4 shown in FIG.
"YES", "NO" to step SPf4 shown in FIG.
Branch is reversed. That is, step SPg4
Is a process for performing truncation when the channel is sounding in the tone color of group 1. Therefore, by the processing shown in FIG. 11, the channel having the smallest envelope among the channels that are sounding in the tone color of group 1 is detected as a truncated channel.

【0045】図11の処理の後は、図10に示すステッ
プSPf16に進み、フラグFOUNDが1か否かが判
定され、「YES」であれば、上述の場合と同様に、ス
テップSPf14を介して図9に示すフローチャートに
戻り、さらに、図9に示すステップSPe19を介して
図6に示す処理に進んでノートオンされた音の発音がな
される(ステップSPb3〜SPb6参照)。一方、ス
テップSPf16で「NO」と判定された場合、すなわ
ち、トランケートチャンネルが検出されなかった場合
は、図9に示すルーチンを介して図6に示すルーチンに
リターンしてもステップSPb3において「NO」と判
断されるため、ステップSPb4〜SPb6の発音処理
は行われない。
After the process in FIG. 11, the process proceeds to step SPf16 shown in FIG. 10, and it is determined whether the flag FOUND is 1 or not. If "YES", the process proceeds to step SPf14 via step SPf14 in the same manner as described above. Returning to the flowchart shown in FIG. 9, the process proceeds to the process shown in FIG. 6 via step SPe19 shown in FIG. 9 to generate a note-on sound (see steps SPb3 to SPb6). On the other hand, if “NO” is determined in step SPf16, that is, if a truncated channel is not detected, the process returns to the routine shown in FIG. 6 via the routine shown in FIG. 9 and returns “NO” in step SPb3. Therefore, the sound generation processing of steps SPb4 to SPb6 is not performed.

【0046】C:上記楽音発生装置の動作の総括 以上のようにして、発音割当に際しては、グループ1の
音色を優先的に割当、また、同様にトランーケートに際
してもグループ1の音をなるべく残すようしている。し
たがって、音楽的に重要な音や重なりの多い音をグルー
プ1に割り当ておけば、不自然さのない再生楽音が得ら
れる。
C: Summary of the Operation of the Musical Tone Generator As described above, the tone of group 1 is preferentially assigned at the time of tone generation, and the sound of group 1 is also left as much as possible at the time of truncation. ing. Therefore, if a musically important sound or a sound with many overlaps is assigned to the group 1, a reproduced musical sound without unnaturalness can be obtained.

【0047】D:実施例の構成 次に、この発明の実施例について説明する。図12は、
この発明の実施例の構成を示すブロック図である。な
お、この図において前述した図1と対応する部分には同
一の符号を付してその説明を省略する。この図に示す構
成が前述した楽音発生装置と異なる部分は、シーケンサ
30および記憶媒体31が設けられている点である。記
憶媒体31は、例えば、フロッピーディスクなどであ
り、楽曲の進行に従った楽音情報が記憶されている。シ
ーケンサ30は、記憶媒体31内の楽音情報を読み出
し、これに応じて自動演奏の制御を行う。
D: Configuration of Embodiment Next, an embodiment of the present invention will be described. FIG.
FIG. 1 is a block diagram illustrating a configuration of an embodiment of the present invention. In this figure, parts corresponding to those in FIG. 1 described above are denoted by the same reference numerals, and description thereof is omitted. The configuration shown in this figure differs from the above-described tone generator in that a sequencer 30 and a storage medium 31 are provided. The storage medium 31 is, for example, a floppy disk or the like, and stores tone information according to the progress of music. The sequencer 30 reads out the tone information in the storage medium 31 and controls the automatic performance according to the read tone information.

【0048】E:実施例の動作 次に、実施例の動作について説明する。 (イ)上記楽音発生装置と共通する動作 前述した図3〜図11に示す処理は、この実施例におい
ても同様に行われるので、その説明を省略する。そし
て、以下においては、シーケンサ30の制御に基づくこ
の実施例固有の動作について説明する。
E: Operation of Embodiment Next, the operation of the embodiment will be described. (A) Operations common to the above-described tone generating apparatus The above-described processing shown in FIGS. 3 to 11 is performed in the same manner in this embodiment, and therefore, the description thereof is omitted. In the following, an operation unique to this embodiment based on the control of the sequencer 30 will be described.

【0049】(ロ)パネル処理 まず、ステップSPh1において操作パネル2にある
各種スイッチの状態をスキャンする。そして、ステップ
SPh2において、パネルイベントがあったか否か、す
なわち、操作パネル上のいずれかのスイッチの状態に変
化があったか否かが判定される。この判定が「NO」の
場合は、なにもせずにリターンし、「YES」の場合
は、ステップSPh3に進んで、シーケンサに関連する
処理の指示であったか否かが判定される。この判定が
「NO」であれば、その他のパネル処理を行い(ステッ
プSPh4)、「YES」であれば、ステップSPh5
のシーケンサ関連処理を行う。
(B) Panel processing First, in step SPh1, the state of various switches on the operation panel 25 is scanned. Then, in step SPh2, it is determined whether or not a panel event has occurred, that is, whether or not the state of any switch on the operation panel has changed. If the determination is "NO", the process returns without doing anything. If the determination is "YES", the process proceeds to step SPh3 to determine whether or not the instruction is a process related to the sequencer. If this determination is "NO", other panel processing is performed (step SPh4), and if "YES", step SPh5
Performs sequencer related processing.

【0050】(ハ)シーケンサ関連処理 シーケンサ関連処理は、図14に示すようになってお
り、ステップSPi1、SPi2、およびSPi3にお
いて、各々スタートスイッチSTART・SWがオンと
なったか、ストップスイッチSTOP・SWがオンにな
ったか、およびアサインスイッチASSIGN・SWが
オンになったかが判定される。そして、各ステップで
「YES」と判定された場合は、各々スタート処理(ス
テップSPi4)、ストップ処理(ステップSPi5)
および自動アサイン処理(ステップSPi6)に進む。
これらの各処理については、以下において詳述する。ま
た、ステップSPi1〜SPi3のいずれにおいても
「NO」と判定された場合は、ステップSPi7に進
み、その他のシーケンサ関連処理(例えば、シーケンサ
にデータを入力する等の処理)を行う。
(C) Sequencer-related processing Sequencer-related processing is as shown in FIG. 14. In steps SPi1, SPi2, and SPi3, the start switch START / SW is turned on or the stop switch STOP / SW is turned on. Is turned on, and whether the assign switch ASSIGN.SW is turned on is determined. Then, when it is determined “YES” in each step, the start processing (step SPi4) and the stop processing (step SPi5), respectively.
Then, the process proceeds to an automatic assignment process (step SPi6).
Each of these processes will be described in detail below. If “NO” is determined in any of steps SPi1 to SPi3, the process proceeds to step SPi7 to perform other sequencer-related processing (for example, processing such as inputting data to the sequencer).

【0051】(i)スタート処理 図15は、スタート処理の内容を示すフローチャートで
ある。このスタート処理は、自動演奏のための初期設定
を行う処理である。図に示すステップSPj1において
は、フラグRUNが1か否かが判定される。フラグRU
Nは、シーケンサ30による自動演奏処理が走っている
ときに「1」が設定されるフラグである。この判定が
「NO」の場合はステップSPj2においてフラグRU
Nをセットし、「YES」の場合は何もせずリターンす
る。このステップSPj1の処理は、例えスタートスイ
ッチSTART・SWが2度以上操作されてもスタート
処理が2度実行されるのを防止するための処理である。
(I) Start Process FIG. 15 is a flowchart showing the contents of the start process. This start process is a process for performing initial settings for automatic performance. In step SPj1 shown in the figure, it is determined whether or not the flag RUN is 1. Flag RU
N is a flag that is set to “1” when the automatic performance process by the sequencer 30 is running. If this determination is "NO", the flag RU is determined in step SPj2.
N is set, and if "YES", the process returns without doing anything. The processing in step SPj1 is started even if the start switch START / SW is operated twice or more.
This is a process for preventing the process from being executed twice .

【0052】次に、ステップSPj3においては、シー
ケンサのトラックを指定するためのレジスタTRを0に
する。この実施例においては、シーケンサのトラックは
5個設定されており、各トラックがMIDIチャンネル
の0〜4に対応している。次に、ステップSPj4に進
むと、レジスタRP(TR)に0を書き込む。レジスタ
RPは、各トラック毎に設けられ、対応するトラックの
読み出し位置を示す。各レジスタRP(TR)は、自動
演奏開始時には0に設定し、各トラックの先頭のデータ
から読み出しが行われるようにする必要があるため、ス
テップSPj4においてリセットを行っている。次に、
ステップSPj5においては、イベントとイベントとの
間(楽音情報の時間的間隔)をカウントするカウンタC
OUNT(TR)をリセットする。この実施例において
は、イベント読み出し方式を採っているため、イベント
の間隔は各トラック毎にカウントする必要があり、した
がって、カウンタCOUNTは、各トラック毎に設けら
れている。
Next, at step SPj3, the register TR for designating the track of the sequencer is set to 0. In this embodiment, five tracks of the sequencer are set, and each track corresponds to MIDI channels 0 to 4. Next, when the process proceeds to step SPj4, 0 is written to the register RP (TR). The register RP is provided for each track and indicates a read position of a corresponding track. Each register RP (TR) is set to 0 at the start of the automatic performance, and it is necessary to read from the head data of each track, so that the reset is performed in step SPj4. next,
In step SPj5, a counter C that counts between events (time interval of musical sound information)
OUNT (TR) is reset. In this embodiment, since the event reading method is employed, the interval between events needs to be counted for each track. Therefore, the counter COUNT is provided for each track.

【0053】次に、ステップSPj6、SPj7に移
り、、レジスタTRの値を1インクリメントし、全ての
トラックについて処理されたか否かを判定する。ステッ
プSPj7において「NO」と判定された場合は、ステ
ップSPj4に戻り、全てのトラックについての処理が
終了するまで上述した処理を繰り返す。上述のようにし
て、0〜4トラックについての初期設定処理が終了する
と、ステップSPj7の判定が「YES」となり、ステ
ップSPj8に進んで割込イネーブル処理を行う。シー
ケンサの動作は、タイマによる割り込みによって歩進す
るようになっており、このため、ステップSPj8の処
理がされると、シーケンサの動作が開始される。
Next, the process proceeds to steps SPj6 and SPj7, where the value of the register TR is incremented by one, and it is determined whether or not all the tracks have been processed. If "NO" is determined in the step SPj7, the process returns to the step SPj4, and the above-described processing is repeated until the processing for all the tracks is completed. When the initial setting process for tracks 0 to 4 is completed as described above, the determination in step SPj7 becomes “YES”, and the flow advances to step SPj8 to perform the interrupt enable process. The operation of the sequencer is stepped up by interruption by a timer. Therefore, when the processing in step SPj8 is performed, the operation of the sequencer is started.

【0054】また、上述した各カウンタCOUNTに
は、イベントが読み出される際に次のイベントまでの間
隔を示すデータがロードされ、割込処理が発生する毎に
ダウンカウントされるようになっている。そして、カウ
ント値が0になると、次のイベントが読み出される(詳
細は後述する)。
Each of the counters COUNT described above is loaded with data indicating the interval until the next event when an event is read out, and is decremented every time an interrupt process occurs. When the count value becomes 0, the next event is read (details will be described later).

【0055】(ii)ストップ処理 図16は、ストップ処理の内容を示すフローチャートで
ある。この処理は、自動演奏を終了させるための処理で
ある。まず、ステップSPk1においては、フラグRU
Nが1か否かが判定される。この判定が「YES」の場
合は、割り込みを禁止した後、フラグRUNをリセット
し(ステップSPk2、SPk3)、「NO」の場合は
何もせずリターンする。ステップSPk1の処理は、ス
トップスイッチSTOP・SWを重複して受け付けるこ
とを防止するための処理である。また、ステップSPk
2の処理は割り込みを禁止して、シーケンサ30の動作
を停止させる処理である。
(Ii) Stop Process FIG. 16 is a flowchart showing the contents of the stop process. This process is for terminating the automatic performance. First, in step SPk1, the flag RU
It is determined whether N is 1 or not. If this determination is "YES", interrupts are prohibited, and the flag RUN is reset (steps SPk2 and SPk3). If "NO", the process returns without doing anything. The process in step SPk1 is a process for preventing the stop switches STOP and SW from being received in duplicate. Step SPk
The process 2 is a process in which the interrupt is prohibited and the operation of the sequencer 30 is stopped.

【0056】次に、ステップSPk5〜SPk7の処理
によって、発音中のチャンネルについては、レジスタS
T(CH)の内容を消音を示す「2」に書き換えて消音
を示し、当該チャンネルにノートオフ情報を出力して発
音を停止させる。ステップSPk4、SPk8、SPk
9の処理は、上述した消音処理を全チャンネルについて
行わせるためのものである。
Next, through the processing in steps SPk5 to SPk7, the register S
The content of T (CH) is rewritten to “2” indicating silence, thereby indicating silence, outputting note-off information to the channel, and stopping sound generation. Steps SPk4, SPk8, SPk
The process of No. 9 is for causing the above-described silencing process to be performed for all channels.

【0057】(iii)割込処理 図17は、割込処理を示すフローチャートである。割込
処理は、タイマがインタラプト信号を送出する毎に起動
されるルーチンであり、シーケンサ30の各トラックに
ついて行われる。ステップSPm1においては、トラッ
クをカウントするためのレジスタITRをクリアする。
そして、カウンタCOUNT(ITR)の値を1デクリ
メントし、カウント値が0になったか否かが判定される
(ステップSPm2,SPm3)。ステップSPm3の
判定が「YES」の場合は、ステップSPm4において
イベントデータの読み出しを行い、「NO」の場合は、
まだ次のイベントを読み出すタイミングに達していない
ので、レジスタITRをインクリメントしてステップS
Pm2に戻る。
(Iii) Interrupt processing FIG. 17 is a flowchart showing the interrupt processing. The interrupt process is a routine that is started each time the timer sends an interrupt signal, and is performed for each track of the sequencer 30. In step SPm1, the register ITR for counting tracks is cleared.
Then, the value of the counter COUNT (ITR) is decremented by 1, and it is determined whether or not the count value has become 0 (steps SPm2 and SPm3). If the determination in step SPm3 is “YES”, the event data is read out in step SPm4, and if the determination is “NO”,
Since it is not yet time to read the next event, the register ITR is incremented and the
Return to Pm2.

【0058】ステップSPm4における読み出し処理
は、シーケンサ30のITR番目のトラックからデータ
バイト(楽音情報)およびデュレイションバイト(次の
イベントまでの間隔データ)を読み出すことによって行
われる。そして、読み出したバイト数に応じ、ポインタ
であるレジスタRP(TR)の内容をインクリメントし
(ステップSPm5)、次いで、読み出したデータがエ
ンドマークか否かを判断する(ステップSPm6)。エ
ンドマークは自動演奏データの終了を示すデータであ
り、自動演奏データの最後のデュレイションバイトに設
けられる。
The reading process in step SPm4 is performed by reading a data byte (musical tone information) and a duration byte (interval data until the next event) from the ITR-th track of the sequencer 30. Then, the content of the register RP (TR), which is a pointer, is incremented according to the number of bytes read (step SPm5), and it is determined whether the read data is an end mark (step SPm6). End mark is a data indicating the end of the automatic performance data, are provided at the end of the Duret Issy Yonbaito of the automatic performance data.

【0059】ステップSPm6の判定が「YES」であ
れば、自動演奏を終了させる必要があるため、タイマ割
込を禁止状態にするとともに、フラグRUNをリセット
する(ステップSPm8,9)。一方、ステップSPm
6で「NO」と判定された場合は、デュレイションバイ
トの値に応じてカウンタCOUNT(ITR)の値をセ
ットする。ステップSPm9またはSPm7の処理の後
は、ステップSPm10に進み、データバイト(楽音情
報)をMIDI信号に変換して、ITR番のMIDIチ
ャンネル信号としてMIDIバッファに出力する。そし
て、レジスタITRをインクリメントし、0番〜4番ま
でのトラック全てに対する処理が終了したか否かを判断
し、「NO」であれば上記処理を繰り返し、「YES」
であればリターンする。
If the determination in step SPm6 is "YES", it is necessary to end the automatic performance, so that the timer interrupt is prohibited and the flag RUN is reset (step SPm8, 9). On the other hand, step SPm
If "NO" is determined in step 6, the value of the counter COUNT (ITR) is set according to the value of the duration byte. After the processing in step SPm9 or SPm7, the process proceeds to step SPm10, in which the data bytes (musical sound information) are converted into MIDI signals and output to the MIDI buffer as MIDI channel signals of the ITR number. Then, the register ITR is incremented, and it is determined whether or not the processing for all the tracks 0 to 4 has been completed. If “NO”, the above processing is repeated, and “YES”.
If so, return.

【0060】(iv)自動アサイン処理 次に、自動アサイン処理について図18を参照して説明
する。この処理は、前述した図2のテーブルを自動的に
作成する処理である。また、自動アサイン処理は、図1
8に示すルーチンと、図19、図23、および図24に
各々示す疑似MIDI処理、疑似減衰処理およびチャン
ネル分配処理から構成される。まず、図18のステップ
SPn1においては、フラグRUNが「1」か否かが判
断され、「YES」であればなにもせずにリターンす
る。すなわち、自動演奏中は自動アサイン処理を禁止し
ている。これは、自動演奏が起動されている最中に自動
アサイン処理を行うと、各バッファBUF0−1,0−
2〜BUF7−1,7−2に転送される音色データが変
動し、動作に問題が生じる場合があるためである。
(Iv) Automatic Assignment Processing Next, the automatic assignment processing will be described with reference to FIG. This process is a process for automatically creating the table of FIG. 2 described above. Also, the automatic assignment process is performed as shown in FIG.
8 and the pseudo MIDI processing, pseudo attenuation processing and channel distribution processing shown in FIGS. 19, 23 and 24, respectively. First, in step SPn1 of FIG. 18, it is determined whether or not the flag RUN is "1". If "YES", the process returns without doing anything. That is, the automatic assignment process is prohibited during the automatic performance. This is because if the automatic assignment process is performed while the automatic performance is being activated, the buffers BUF0-1, BUF0-
This is because the timbre data transferred to 2 to BUF 7-1 and 7-2 may fluctuate, causing a problem in operation.

【0061】次に、トラックをカウントするためのレジ
スタTRをクリアした後、所定のレジスタ等をクリアす
る(ステップSPn2、SPn3)。ステップSPn3
において、クリアされるレジスタのうちレジスタSN
(TR)は各トラックにおいて同時に発音される音の数
を記憶するレジスタである。すなわち、以下のステップ
において各トラックの楽音情報を順次読み取ってゆく
が、この際、各時点における当時発音数がレジスタSN
(TR)に書き込まれる。また、レジスタSNMAX
(TR)は、レジスタSN(TR)に書き込まれた値の
うちの最大のものを記憶するレジスタである。なお、レ
ジスタRPおよびカウンタCOUNTERにつては、上
述した通りである。
Next, after clearing the register TR for counting tracks, predetermined registers and the like are cleared (steps SPn2 and SPn3). Step SPn3
, Among the registers to be cleared, the register SN
(TR) is a register that stores the number of sounds that are simultaneously generated in each track. That is, the musical tone information of each track is sequentially read in the following steps.
(TR). Also, register SNMAX
(TR) is a register that stores the largest one of the values written in the register SN (TR). The register RP and the counter COUNTER are as described above.

【0062】次に、ステップSPn4に進んでカウンタ
COUNTER(TR)の値を1デクリメントし、その
後にカウンタCOUNTER(TR)の値が「0」であ
るか否かが判断される。この判定が「NO」の場合は、
イベントデータの読み出しを行わないので直ちにステッ
プSPn10に進み、「YES」の場合は、ステップS
Pn6に進んでデータバイトとデュレイションバイトを
読み出し、デュレイションバイトのデータについてはC
OUNTER(TR)にセットする。。そして、読み出
したバイト数分だけレジスタRP(TR)の値をインク
リメントし、次いで、読み出したデータがエンドマーク
か否かを判定する。この判定が「YES」であれば、そ
のトラックについては全ての楽音情報を読み出したこと
になるので、ステップSPn12に進んで、トラック番
号をインクリメントし、ステップSPn3を介してステ
ップSPn4に戻る。ステップSPn13は、全てのト
ラックについての処理が終了したか否かを判定する処理
であり、この判定が「YES」になると、ステップSP
n14のチャンネル分配処理を行ってリターンする。
Next, the routine proceeds to step SPn4, where the value of the counter COUNTER (TR) is decremented by 1, and thereafter, it is determined whether or not the value of the counter COUNTER (TR) is "0". If this determination is “NO”,
Since the event data is not read out, the process immediately proceeds to step SPn10, and if “YES”, the process proceeds to step SPn10.
Proceeding to Pn6, the data byte and the duration byte are read out.
Set to OUTER (TR). . Then, the value of the register RP (TR) is incremented by the number of read bytes, and then it is determined whether the read data is an end mark. If this determination is "YES", it means that all tone information has been read for that track, so the flow proceeds to step SPn12, increments the track number, and returns to step SPn4 via step SPn3. Step SPn13 is a process of determining whether or not the processes for all the tracks have been completed. If the determination is "YES", the process proceeds to step SPn13.
After performing the channel distribution processing of n14, the process returns.

【0063】一方、読み出したデータがエンドマークで
ない場合は、ステップSPn9に進み、データバイト
(イベントデータ)をMIDI信号に変換して、ITR
番のMIDIチャンネル信号として疑似MIDIバッフ
ァに出力する。疑似MIDIバッファは、RAM21内
に設定されているバッファであり、ステップSPn9の
処理によって転送されたMIDI信号を記憶する。そし
て、疑似MIDI処理および疑似減衰処理を行った後
(ステップSPn10、SPn11)、ステップSPn
に戻る。
On the other hand, if the read data is not the end mark, the process proceeds to step SPn9, where the data byte (event data) is converted into a MIDI signal and
No. MIDI signal is output to the pseudo MIDI buffer. The pseudo MIDI buffer is a buffer set in the RAM 21 and stores the MIDI signal transferred by the processing in step SPn9. Then, after performing the pseudo MIDI processing and the pseudo attenuation processing (steps SPn10 and SPn11), step SPn
Return to 4 .

【0064】疑似MIDI処理 次に、疑似MIDI処理について、図19を参照して説
明する。このサブルーチンは、疑似的にMIDI処理を
行うものである。処理内容は第1の実施例において説明
した図5に示す処理と同様であり、図19に示すステッ
プSPo1〜SPo6が図5に示すステップSPa1〜
SPa6に対応する。ただし、疑似MIDIバッファを
スキャンする点、およびノートオン処理、ノートオフ処
理が疑似的に行われる点が異なっている。
Next, the pseudo MIDI process will be described with reference to FIG. This subroutine performs a pseudo MIDI process. The processing content is the same as the processing shown in FIG. 5 described in the first embodiment, and steps SPo1 to SPo6 shown in FIG. 19 are replaced with steps SPa1 to SPo1 shown in FIG.
This corresponds to SPa6. However, the difference is that the pseudo MIDI buffer is scanned, and the note-on process and the note-off process are performed in a pseudo manner.

【0065】疑似ノートオン処理(ステップSPo5)
は、図20に示すステップにより構成されており、前述
したノートオン処理(図6参照)とほぼ同様になってい
る。すなわち、図20に示すステップSPq1〜SPq
6が図6に示すステップSPb1〜SPb6に対応す
る。ただし、以下のように若干の相違がある。まず、ス
テップSPq1においては、レジスタMCHにレジスタ
TR内のトラック番号が入力される。この場合のトラッ
ク番号は、図19に示す処理においてイベントが検出さ
れたトラックの番号である。また、トラック番号0〜4
は、前述のようにMIDIチャンネルの0〜4に対応し
ている。
Pseudo note-on processing (step SPo5)
Is composed of the steps shown in FIG. 20, and is almost the same as the note-on process (see FIG. 6) described above. That is, steps SPq1 to SPq shown in FIG.
6 corresponds to steps SPb1 to SPb6 shown in FIG. However, there are some differences as follows. First, in step SPq1, the track number in the register TR is input to the register MCH. The track number in this case is the number of the track at which the event was detected in the processing shown in FIG. Also, track numbers 0 to 4
Correspond to MIDI channels 0 to 4 as described above.

【0066】次に、ステップSPq2の疑似チャンネル
割当処理は、図21に示すステップにより構成されてお
り、疑似的に空きチャンネルを検出する。まず、チャン
ネルスキャン用のレジスタCHおよびフラグFOUND
をクリアし(ステップSPr1、SPr2)、当該チャ
ンネルが空きチャンネルか否か、すなわち、レジスタS
T(CH)が0か否かを判断する(ステップSPr
3)。この判定が「YES」の場合は、フラグFOUN
Dを「1」にし、レジスタATCに当該チャンネルの番
号を転送してリターンする(ステップSPr4,SPr
5)。一方、ステップSPr3の判定が「NO」の場合
は、チャンネル番号をインクリメントし、ステップSP
r7を介してステップSPr3に戻る。ステップSPr
7は、最終チャンネルまでスキャンしたか否かを判定す
る処理であり、「YES」になればリターンする。
Next, the pseudo channel allocating process in step SPq2 is constituted by the steps shown in FIG. 21 and detects an empty channel in a pseudo manner. First, a channel scan register CH and a flag FOUND
Is cleared (steps SPr1 and SPr2), and whether the channel is an empty channel, that is, the register S
It is determined whether or not T (CH) is 0 (step SPr)
3). If this determination is "YES", the flag FOUN
D is set to “1”, the channel number is transferred to the register ATC, and the process returns (steps SPr4 and SPr)
5). On the other hand, if the determination in step SPr3 is "NO", the channel number is incremented, and
The process returns to step SPr3 via r7. Step SPr
7 is a process for determining whether or not scanning has been performed up to the last channel. If "YES", the process returns.

【0067】上述した疑似チャンネル割当処理は、疑似
的に簡易にチャンネルを割り当て、同時に発音するチャ
ンネルが幾つあるかを探す処理であるので、トランケー
ト処理等は行わず、現時点で空いているチャンネルが見
つからなければ、空きチャンネル無しとしてフラグFO
UNDを「0」のままにする。そして、フラグFOUN
Dが「1」か否かによって図20に示すステップSPq
3の判定が異なり、「0」の場合は何もせずに図19の
サブルーチンにリターンする。一方、フラグFOUND
が「1」の場合は、ステップSPq4,SPq5(各々
図5のステップSPa3,SPa4に対応)の処理の
後、ステップSPq6の処理を行う。
The pseudo channel allocation process described above is a process of simply allocating channels in a pseudo manner and searching for how many channels sound simultaneously. Therefore, a truncation process or the like is not performed, and a channel available at the present time is found. If not, flag FO indicates that there is no available channel
Leave UND at "0". And the flag FOUN
Step SPq shown in FIG. 20 depends on whether D is “1” or not.
The judgment of 3 is different, and if it is "0", the process returns to the subroutine of FIG. 19 without doing anything. On the other hand, the flag FOUND
Is "1", the processing in step SPq6 is performed after the processing in steps SPq4 and SPq5 (each corresponding to steps SPa3 and SPa4 in FIG. 5).

【0068】ステップSPq6においては、レジスタA
TC(MCH)内のトーンコード、レジスタNV内のノ
ートベロシティおよびレジスタNC内のノートコードに
応じて、レジスタENV(ACH)の値を設定する。こ
のレジスタENV(ACH)は、仮想的なエンベロープ
の値が格納されるレジスタであり、このステップにおい
てはエンベロープの初期値が格納される。また、その値
は主にノートベロシティによって決定される。
In step SPq6, register A
The value of the register ENV (ACH) is set according to the tone code in the TC (MCH), the note velocity in the register NV, and the note code in the register NC. This register ENV (ACH) is a register in which the value of the virtual envelope is stored. In this step, the initial value of the envelope is stored. The value is mainly determined by the note velocity.

【0069】一方、図19のステップSPo6に示す疑
似ノートオフ処理は、図22に示す各ステップから構成
されている。まず、ステップSPt1において、スキャ
ン中のトラックの番号をレジスタMCHに書き込み、次
いで、ステップSPt2においてレジスタCHをクリア
する。そして、ステップSPt3において発音中か否か
の判断を行い、「NO」であれば、何もせずにチャンネ
ル番号をインクリメントしてステップSPt7を介して
ステップSPt3に戻る。一方、ステップSPt4の判
定が「YES」の場合は、ステップSPt5に進んで、
レジスタST(CH)の内容を「2」にし、消音状態で
あることを示す。この処理の後は、リターンし、疑似減
衰処理(図18のステップSPn11)を行う。
On the other hand, the pseudo note-off process shown in step SPo6 of FIG. 19 includes the steps shown in FIG. First, in step SPt1, the number of the track being scanned is written into the register MCH, and then, in step SPt2, the register CH is cleared. Then, in step SPt3, it is determined whether or not sound is being generated. If " NO ", the channel number is incremented without doing anything, and the process returns to step SPt3 via step SPt7. On the other hand, if the determination in step SPt4 is “YES”, the flow proceeds to step SPt5,
The content of the register ST (CH) is set to "2" to indicate that the sound is in the mute state. After this process, the process returns to perform the pseudo attenuation process (step SPn11 in FIG. 18).

【0070】また、ステップSPt7は、全てのチャン
ネルについてスキャンしたか否かを判定する処理であ
り、全チャンネルが発音中である場合には、この判定が
「YES」となってリターンする。以上が疑似MIDI
処理であり、この処理の後には図18に示すステップS
Pn11に進んで疑似減衰処理を行う。
Step SPt7 is a process for determining whether or not scanning has been performed for all the channels. If all the channels are sounding, the determination is "YES" and the process returns. The above is pseudo MIDI
This processing is followed by step S shown in FIG.
Proceeding to Pn11, a pseudo attenuation process is performed.

【0071】疑似減衰処理 図23は、疑似減衰処理を示すフローチャートである。
この処理は、各トラックにおける同時発音数を検出する
処理である。まず、レジスタCHをクリアするととも
に、同時発音数をカウントするためのレジスタSN(T
R)をクリアする(ステップSPu1、SPu2)。そ
して、ステップSPu3に進んで、当該チャンネルが空
き状態か否かが判定され、「YES」であれば、何も処
理せずにチャンネル番号をインクリメントし、ステップ
SPu14を介してステップSPu3に戻る。
FIG. 23 is a flowchart showing the pseudo attenuation process.
This process detects the number of simultaneous sounds in each track. First, while clearing the register CH, the register SN (T
R) is cleared (steps SPu1, SPu2). Then, the process proceeds to step SPu3, where it is determined whether or not the channel is idle. If "YES", the channel number is incremented without performing any processing, and the process returns to step SPu3 via step SPu14.

【0072】一方、ステップSPu3の判定が「NO」
の場合は、ステップSPu4に進んで当該チャンネルが
ノートオン状態か否かが判定され、「YES」であれ
ば、ステップSPu5,SPu6に進んで、減衰レート
DR1を用いたエンベロープ減衰処理を行い、「NO」
(すなわち、ノートオフ状態)と判定された場合は、ス
テップSPu7,SPu8に進んで、減衰レートDR2
を用いたエンベロープ減衰処理を行う。
On the other hand, the determination in step SPu3 is "NO"
In the case of, the process proceeds to step SPu4 to determine whether or not the channel is in the note-on state. If “YES”, the process proceeds to steps SPu5 and SPu6 to perform an envelope attenuation process using the attenuation rate DR1. NO "
If it is determined that the state is the note-off state, the process proceeds to steps SPu7 and SPu8, and the attenuation rate DR2
Performs envelope attenuation processing using.

【0073】ここで、図25はエンベロープパターンの
例であり、同図(a)は持続音系の場合(例えば、オル
ガンなど)を示し、同図(b)は減衰音系の場合(例え
ば、ピアノなど)を示している。これらのエンベロープ
パターンにおいて、区間T1がノートオン期間状態、期
間T2がノートオフ期間であり、減衰レートDR1およ
びDR2は各々期間T1およびT2の減衰レートであ
る。なお、同図(a)に示す持続音系の間T1のエン
ベロープは一定であり、減衰レートDR1は値0になっ
ている。
FIG. 25 shows an example of an envelope pattern. FIG. 25A shows a case of a continuous sound system (for example, an organ), and FIG. 25B shows a case of an attenuation sound system (for example, Piano etc.). In these envelope patterns, the section T1 is the note-on period state, the period T2 is the note-off period, and the attenuation rates DR1 and DR2 are the attenuation rates of the periods T1 and T2, respectively. Note that the envelope of Period T1 sustained sound system shown in the diagram (a) is a constant, the attenuation rate DR1 has become a value 0.

【0074】上記エンベロープパターンは、音色毎に多
数設定されており、トーンコードに応じたパターンが選
択されるようになっている。すなわち、トーンコードに
応じた値の減衰レートDR1,DR2が選択されるよう
になっている。
A large number of envelope patterns are set for each tone color, and a pattern corresponding to a tone code is selected. That is, the attenuation rates DR1 and DR2 having the values corresponding to the tone codes are selected.

【0075】さて、ステップSPu5においては、減衰
レートDR1をレジスタANC(CH)内のノートコー
ドでスケーリングし、その結果を減衰レートDR1’と
する。これは、音高によって減衰レートを異ならせてい
るためである。そして、ステップSPu6においては、
エンベロープ値が書き込まれているレジスタENV(C
H)の内容から減衰レートDR1’を減算し、その結果
を再度レジスタENV(CH)に格納する。すなわち、
エンベロープの値を減衰レートDR1’分小さくする。
また、ステップSPu7、SPu8も上記と同様の処理
であり、各々ステップSPu5、SPu6に対応する。
In step SPu5, the attenuation rate DR1 is scaled by the note code in the register ANC (CH), and the result is set as the attenuation rate DR1 '. This is because the attenuation rate differs depending on the pitch. Then, in step SPu6,
Register ENV (C
The attenuation rate DR1 'is subtracted from the content of H), and the result is stored again in the register ENV (CH). That is,
The value of the envelope is reduced by the attenuation rate DR1 '.
Steps SPu7 and SPu8 are the same processing as described above, and correspond to steps SPu5 and SPu6, respectively.

【0076】次に、ステップSPu9に進み、エンベロ
ープ値が0またはそれ以下になったか否かが判定され、
「NO」であれば、レジスタSN(TR)の内容を1イ
ンクリメントする(ステップSPu10)。これは、エ
ンベロープ値が0でないということは、そのチャンネル
の音が未だ消音していないということであり、したがっ
て、同時発音数を記憶するレジスタの内容をインクリメ
ントする必要があるからである。
Next, the process proceeds to step SPu9, where it is determined whether or not the envelope value has become 0 or less.
If "NO", the content of the register SN (TR) is incremented by 1 (step SPu10). This is because the fact that the envelope value is not 0 means that the sound of the channel has not been muted yet, and therefore it is necessary to increment the contents of the register storing the number of simultaneous sounds.

【0077】一方、ステップSPu9で「YES」と判
定された場合は、当該チャンネルが消音した場合である
ので、状態を示すレジスタST(CH)の内容を「0」
にして空きチャンネルであることを示し、さらに、レジ
スタANC(CH)の内容をクリアする(ステップSP
u11、SPu12)。そして、ステップSPu12ま
たはSPu10の後は、ステップSPu13においてチ
ャンネル番号をインクリメントし、ステップSPu14
を介してステップSPu3に戻る。
On the other hand, if "YES" is determined in step SPu9, it means that the channel is muted, and the content of the register ST (CH) indicating the state is set to "0".
To indicate that the channel is an empty channel, and further clears the contents of the register ANC (CH) (step SP
u11, SPu12). Then, after step SPu12 or SPu10, the channel number is incremented in step SPu13, and step SPu14
And returns to step SPu3.

【0078】ステップSPu14は、全てのチャンネル
のスキャンが終了したか否かを判定する処理であり、こ
の判定が「YES」の場合はステップSPu15に進
み、同時発音数の最大値が、今回のスキャンによって検
出された同時発音数が、今までに検出された同時発音数
の最大値より大きいか否かが判定され、「YES」であ
れば、最大同時発音数を記憶するレジスタSNMAX
(TR)の内容をレジスタSN(TR)の内容に書き換
えてリターンし、図18のステップSPn4に戻る。一
方、ステップSPu15の判定が「NO」であれば、上
記書き換えは行わずにリターンする。以後は、上述の処
理が繰り返され、これにより、レジスタSNMAX(T
R)には、シーケンサの各トラックについての最大同時
発音数が書き込まれる。
Step SPu14 is a process for determining whether or not scanning of all the channels has been completed. If the determination is "YES", the flow advances to step SPu15 to set the maximum value of the number of simultaneous sounds to the current scan. Is determined whether or not the number of simultaneous sounds detected is larger than the maximum value of the number of simultaneous sounds detected so far. If "YES", a register SNMAX storing the maximum number of simultaneous sounds is determined.
The contents of (TR) are rewritten to the contents of the register SN (TR), and the process returns to step SPn4 in FIG. On the other hand, if the determination in step SPu15 is "NO", the process returns without performing the rewriting. Thereafter, the above-described processing is repeated, whereby the register SNMAX (T
In R), the maximum number of simultaneous sounds for each track of the sequencer is written.

【0079】チャンネル分配処理 以上の処理が全てのトラックについて行われると、図1
8に示すステップSPn13の判定が「YES」にな
り、ステップSPu14のチャンネル配分処理が行われ
る。チャンネル配分処理は、図24に示すステップから
成っており、まず、ステップSPv1において、各トラ
ック最大同時発音数(すなわち、レジスタSNMAX
(TR)の内容)に応じ、バッファBUF0−1〜BU
F7−1にデータを転送する。この実施例の場合、転送
されるデータは、トーンジェネレータで用いられるマイ
クロプログラムである。
Channel Distribution Processing When the above processing is performed for all tracks, FIG.
The determination in step SPn13 shown in FIG. 8 is “YES”, and the channel allocation processing in step SPu14 is performed. The channel allocation processing includes the steps shown in FIG. 24. First, in step SPv1, the maximum number of simultaneous sounds for each track (that is, the register SNMAX)
(TR), the buffers BUF0-1 to BUF
The data is transferred to F7-1. In this embodiment, the transferred data is a microprogram used in the tone generator.

【0080】また、分配の方法は、予め定めた配分規則
に基づいて行われる。規則としては、同時発音数の多い
ものや、重要度の高い楽器を優先する方法がある。例え
ば、ピアノの音が最大8音同時発音、ストリングス音が
最大6音同時発音、また、ブラス音およびベース音が各
々1音のみの場合は、バッファBUF0−1〜BUF3
−1にピアノ音のデータ、バッファBUF4−1〜BU
F6−1にストリングス音のデータ、BUF7−1にベ
ース音のデータを各々転送する。さらに、ステップSP
v1においては、各バッファに書き込んだデータの内容
に応じて、図2に示す音色アサインバッファ23のグル
ープ1の内容を書き換え、また、レジスタATC1(C
H)に各音色番号を設定する。
The distribution method is performed based on a predetermined distribution rule. As a rule, there is a method of giving priority to an instrument having a large number of simultaneous sounds or an instrument having a high importance. For example, when a maximum of eight piano sounds are simultaneously generated and a maximum of six strings are simultaneously generated, and each of the brass sound and the base sound is only one sound, the buffers BUF0-1 to BUF3 are used.
-1 to piano sound data, buffers BUF4-1 to BUF
The string sound data is transferred to F6-1, and the base sound data is transferred to BUF7-1. Further, step SP
In v1, the contents of the group 1 of the tone assignment buffer 23 shown in FIG. 2 are rewritten according to the contents of the data written in each buffer, and the register ATC1 (C
Set each tone number in H).

【0081】次に、ステップSPv2に進み、上述のグ
ループ1に割り当てられた数と、各トラックの最大同時
発音数との差が大きいものを優先してグループ2のバッ
ファに割り当てる。例えば、上記の例で言えば、ピアノ
については、8音の中からグループ1に4音割り当てら
れているのでその差は4音であり、ストリングスについ
ては6音の中からグループ1に3音割り当てられている
のでその差は3音である。また、ブラス音については、
割当がなされていないので差は1音である。
Next, the process proceeds to step SPv2, and a buffer having a large difference between the number assigned to the group 1 and the maximum number of simultaneous sounds of each track is preferentially assigned to the buffer of the group 2. For example, in the above example, for a piano, four notes are assigned to group 1 out of eight notes, so the difference is four notes, and for strings, three notes are assigned to group 1 out of six notes. The difference is three tones. For brass sounds,
Since no assignment has been made, the difference is one note.

【0082】このような場合には、バッファBUF0−
2〜BUF3−2にピアノ音のデータ、バッファBUF
4−2〜BUF6−2にストリングス音のデータを各々
転送し、バッファBUF7−2にブラス音のデータを転
送する。さらに、ステップSPv2においては、各バッ
ファに書き込んだデータの内容に応じて、図2に示す音
色アサインバッファ23のグループ2の内容を書き換
え、また、レジスタATC2(CH)に各音色番号を設
定する。
In such a case, the buffer BUF0-
2 to BUF3-2, piano sound data, buffer BUF
4-2 to BUF6-2, respectively, to transfer the string sound data, and to the buffer BUF7-2, to transfer the brass sound data. Further, in step SPv2, the contents of the group 2 of the tone color assignment buffer 23 shown in FIG. 2 are rewritten according to the contents of the data written in each buffer, and each tone color number is set in the register ATC2 (CH).

【0083】ところで、ステップSPv2の処理におい
て、仮にピアノ音の差が5音あったときは、これを優先
して分配するとブラス音の割当がなくなってしまう。そ
こで、このような場合は、ピアノ音の割当を4音にとど
め、ブラス音の割当を確保する。すなわち、鳴らない音
が生じないように分配を調整するように分配規則を設定
する。
By the way, in the process of step SPv2, if there is a difference of five piano sounds, if the difference is preferentially distributed, the brass sound is not allocated. Therefore, in such a case, the allocation of piano sounds is limited to four sounds, and the allocation of brass sounds is ensured. That is, the distribution rule is set so that the distribution is adjusted so that no sound is produced.

【0084】F:変形例 上述した実施例においては、音色データを記憶するた
めのバッファをトーンジェネレータ1つに対し2個ずつ
設けたが、これは2個に限らず多数設けるようにしても
よい。例えば、図26に示す例は、バッファを4個ずつ
設けた例であり、グループは1から4まで設定される。
また、この変形例の場合、トーンジェネレータはTG0
〜TGnまで設けられており、各バッファに転送される
音色データは、音色データメモリ50に100音色分程
度が記憶されている。図26に示す音色データ転送指示
部52は、前述した実施例の音色アサインバッファに対
応する部分であり、図27にその内容の例を示す。そし
て、音色データ転送制御部51が音色データ転送指示部
52の指示を受けると、図27の内容を参照して音色デ
ータメモリ50内の音色データを各バッファに転送す
る。また、図26に示す演奏情報入力部53は、例え
ば、キーボードであり、上述の実施例におけるMIDI
信号と同様の信号を出力する。チャンネル割当部54
は、演奏情報入力部53の出力信号(ノードコード等)
を各トーンジェネレータTGに割り当てる。
F: Modification In the above-described embodiment, two buffers for storing tone color data are provided for each tone generator. However, the number of buffers is not limited to two and may be many. . For example, the example shown in FIG. 26 is an example in which four buffers are provided, and groups from 1 to 4 are set.
In this modification, the tone generator is TG0
The timbre data to be transferred to each buffer is stored in the timbre data memory 50 for about 100 timbres. The tone color data transfer instructing section 52 shown in FIG. 26 is a portion corresponding to the tone color assigning buffer of the above-described embodiment, and FIG. 27 shows an example of the content thereof. When the timbre data transfer control unit 51 receives an instruction from the timbre data transfer instructing unit 52, the timbre data transfer unit 51 transfers the timbre data in the timbre data memory 50 to each buffer with reference to the contents of FIG. The performance information input unit 53 shown in FIG. 26 is, for example, a keyboard,
A signal similar to the signal is output. Channel assignment unit 54
Is the output signal of the performance information input unit 53 (node code, etc.)
Is assigned to each tone generator TG.

【0085】上記に示した例のようにグループを多
数設ける場合において、番号の小さいグループの音色を
優先的に割り当てるようにしたり、あるいは、グループ
1だけを優先して他のグループは同一の優先順位とする
ような割り当てを行うようにしてもよい。
In the case where a large number of groups are provided as in the example shown above, the timbres of the group having the smaller number are preferentially assigned, or only the group 1 is prioritized and the other groups have the same priority. May be assigned.

【0086】上記実施例においては、仮想的にシーケ
ンサを駆動して各トラックにおける重複発音数を検出す
るようにしたが、これに代えて、実際にシーケンサと楽
音合成回路とを駆動して重複発音数を求めるようにして
もよい。この場合にあっては、より正確に重複発音数を
求めることができる。
In the above embodiment, the sequencer is virtually driven to detect the number of duplicate sounds in each track. Instead, the sequencer and the tone synthesis circuit are actually driven to duplicate the sound. The number may be obtained. In this case, the number of duplicate pronunciations can be obtained more accurately.

【0087】また、上記実施例は、音色データとして
マイクロプログラムを転送する場合の例であったが、本
発明の適用は、これに限らず、音色設定用のパラメータ
等を転送する場合にも有効である。
Although the above embodiment is an example in which a microprogram is transferred as timbre data, the present invention is not limited to this, and is also effective in transferring timbre setting parameters and the like. It is.

【0088】[0088]

【発明の効果】以上説明したように、この発明によれ
ば、バッファの容量を増大させることがなく、しかも、
キーオンレスポンスを極めて良くすることができ、ま
た、自動演奏に際して楽音情報の音色割当を効率的に行
うことができる。
As described above, according to the present invention, the capacity of the buffer is not increased, and
The key-on response can be made extremely good, and the tone color of the tone information can be efficiently assigned at the time of automatic performance.

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

【図1】 この発明の実施例が適用される楽音発生装置
の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a tone generator to which an embodiment of the present invention is applied.

【図2】 図1に示す楽音発生装置の音色アサインバッ
ファの内容を示す概念図である。
FIG. 2 is a conceptual diagram showing the contents of a tone color assignment buffer of the tone generator shown in FIG.

【図3】 同楽音発生装置における楽音合成回路15の
内部構成を示すブロック図である。
FIG. 3 is a block diagram showing an internal configuration of a tone synthesis circuit 15 in the tone generator.

【図4】 同楽音発生装置のメインルーチンを示すフロ
ーチャートである。
FIG. 4 is a flowchart showing a main routine of the musical sound generating device.

【図5】 同楽音発生装置におけるMIDI処理を示す
フローチャートである。
FIG. 5 is a flowchart showing MIDI processing in the musical sound generating device.

【図6】 同楽音発生装置におけるノートオン処理を示
すフローチャートである。
FIG. 6 is a flowchart showing a note-on process in the musical sound generating device.

【図7】 同楽音発生装置におけるノートオフ処理を示
すフローチャートである。
FIG. 7 is a flowchart showing a note-off process in the musical sound generator.

【図8】 同楽音発生装置における発音チャンネルを示
すフローチャートである。
FIG. 8 is a flowchart showing sounding channels in the musical sound generating device.

【図9】 同楽音発生装置におけるチャンネル割当処理
動作を示すフローチャートである。
FIG. 9 is a flowchart showing a channel assignment processing operation in the musical sound generating apparatus.

【図10】 同楽音発生装置におけるトランケート処理
を示すフローチャートである。
FIG. 10 is a flowchart showing a truncation process in the musical sound generating device.

【図11】 同楽音発生装置におけるトランケート処理
2を示すフローチャートである。
FIG. 11 is a flowchart showing truncation processing 2 in the musical sound generating device.

【図12】 この発明の一実施例の構成を示すブロック
図である。
FIG. 12 is a block diagram showing a configuration of one embodiment of the present invention.

【図13】 同実施例におけるパネル処理を示すフロー
チャートである。
FIG. 13 is a flowchart showing panel processing in the embodiment.

【図14】 同実施例におけるシーケンサ関連処理を示
すフローチャート出ある。
FIG. 14 is a flowchart showing a sequencer related process in the embodiment.

【図15】 同実施例におけるスタート処理を示すフロ
ーチャートである。
FIG. 15 is a flowchart showing a start process in the embodiment.

【図16】 同実施例におけるストップ処理を示すフロ
ーチャートである。
FIG. 16 is a flowchart showing a stop process in the embodiment.

【図17】 同実施例における割込処理を示すフローチ
ャートである。
FIG. 17 is a flowchart showing an interrupt process in the embodiment.

【図18】 同実施例における自動アサイン処理を示す
フローチャートである。
FIG. 18 is a flowchart showing an automatic assignment process in the embodiment.

【図19】 同実施例における疑似MIDI処理を示す
フローチャートである。
FIG. 19 is a flowchart showing pseudo MIDI processing in the embodiment.

【図20】 同実施例における疑似ノートオン処理を示
すフローチャートである。
FIG. 20 is a flowchart showing a pseudo note-on process in the embodiment.

【図21】 同実施例における疑似チャンネル割当処理
を示すフローチャートである。
FIG. 21 is a flowchart showing a pseudo channel assignment process in the embodiment.

【図22】 同実施例における疑似ノートオフ処理を示
すフローチャート出ある。
FIG. 22 is a flowchart showing a pseudo note-off process in the embodiment.

【図23】 同実施例における疑似減衰処理を示すフロ
ーチャートである。
FIG. 23 is a flowchart showing a pseudo attenuation process in the embodiment.

【図24】 同実施例におけるチャンネル配分処理を示
すフローチャートである。
FIG. 24 is a flowchart showing a channel allocation process in the embodiment.

【図25】 楽音波形のエンベロープの一例を示す波形
図である。
FIG. 25 is a waveform diagram showing an example of a musical tone waveform envelope.

【図26】 この発明の他の実施例の構成を示すブロッ
ク図である。
FIG. 26 is a block diagram showing a configuration of another embodiment of the present invention.

【図27】 図26に示す実施例の音色アサインバッフ
ァの内容を示す概念図である。
FIG. 27 is a conceptual diagram showing the contents of a tone color assignment buffer according to the embodiment shown in FIG. 26;

【図28】 従来装置の構成を示すブロック図である。FIG. 28 is a block diagram illustrating a configuration of a conventional device.

【図29】 従来装置の構成を示すブロック図である。FIG. 29 is a block diagram illustrating a configuration of a conventional device.

【図30】 従来装置の構成を示すブロック図である。FIG. 30 is a block diagram showing a configuration of a conventional device.

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

12……CPU(転送手段、割当制御手段、同時発音数
検出手段、音色割当制御手段)20……ROM(音色デ
ータ記憶部)、23……音色アサインバッファ(音色割
当指示手段)、50……音色データメモリ(音色データ
記憶部)、51……音色データ転送制御部(転送手
段)、52……音色データ転送指示部(音色割当指示手
段)、54……チャンネル割当部(割当制御手段)CH
0〜CH7……発音チャンネル、TG0〜TG7……ト
ーンジェネレータ(楽音信号発生手段)、、BUF0−
1〜BUF7−1,BUF0−2〜BUF7−2……バ
ッファ(第1、第2……第m番のバッファ)。
12 CPU (transfer means, assignment control means, simultaneous tone number detection means, tone color assignment control means) 20 ROM (tone color data storage unit), 23 tone color assignment buffer (tone color assignment instruction means), 50 Timbre data memory (timbre data storage unit), 51 timbre data transfer control unit (transfer unit), 52 timbre data transfer instructing unit (timbre assignment instructing unit), 54 channel allocating unit (assignment control unit) CH
0 to CH7 ... tone generation channels, TG0 to TG7 ... tone generators (musical tone signal generation means), BUF0-
1 to BUF7-1, BUF0-2 to BUF7-2... Buffers (first, second... M-th buffers).

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 楽音情報記憶手段に記憶された複数の
音情報を読み出し、前記楽音情報に応じた音色の楽音信
号を発生して自動演奏する自動演奏装置において、所定の音色の楽音信号を発生するための音色データを記
憶するm個のバッファを各々所有し、前記バッファに記
憶された前記音色データに基づき楽音信号を発生する複
数の発音チャンネルと、 前記楽音情報記憶手段から前記楽音情報が読み出される
毎に、前記複数の発音チャンネルの中から、該読み出さ
れた楽音情報に対応する、音色の楽音信号を発生するた
めの前記音色データが前記バッファに記憶された当該発
音チャンネルを検出し、前記当該楽音チャンネルに前記
読み出された楽音情報を割当てて、前記当該発音チャン
ネルで前記読み出された楽音情報に対応する音色の楽音
信号を発生させる制御手段と、 前記音色データをn(n>m)個、記憶する音色データ
記憶手段と、 前記楽音情報記憶手段から前記楽音情報を読み出し、各
音色について同時発音数を検出する同時発音数検出手段
と、前記同時発音数検出手段で検出された各音色の同時発音
数に基づいて、前記複数の発音チャンネルの 各バッファ
へ前記音色データ記憶手段から転送すべき音色データを
指示する割当指示手段と、前記割 当指示手段の指示に従い、前記音色データ記憶
段に記憶された音色データを前記複数の発音チャンネル
各バッファ転送する転送手段とを具備することを特
徴とする自動演奏装置。
1. A reads a plurality of easy <br/> sound information stored in the music information storage means, the automatic performance apparatus for automatic performance by generating a tone signal of the tone color corresponding to the musical tone information, a predetermined timbre The tone data for generating the tone signal
Own each of the m buffers
A complex for generating a tone signal based on the stored timbre data.
The number of sound channels and the tone information are read from the tone information storage means.
For each of the plurality of sounding channels,
To generate a tone signal corresponding to the tone information
The timbre data stored in the buffer is stored in the buffer.
A sound channel, and
The read musical tone information is assigned, and
The tone corresponding to the tone information read out by the channel.
And control means for generating a signal, the tone color data n (n> m) number, and tone color data storage means for storing, reading out the musical tone information from the music information storage unit, detecting a simultaneous polyphony For each tone Means for detecting the number of simultaneous sounds, and the simultaneous sounding of each tone detected by the means for detecting the number of simultaneous sounds.
A buffer for each of said plurality of sounding channels based on the number
Wherein the assignment instruction means that instructs the tone color data to be transferred from the tone color data storage means, follow the instructions of the assignment instruction means, the tone color data storage hands to
The timbre data stored in the row is stored in the plurality of sound channels.
Automatic performance apparatus characterized by comprising a transfer means for transfer to the buffers.
JP4184186A 1992-07-10 1992-07-10 Automatic performance device Expired - Lifetime JP2661468B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP4184186A JP2661468B2 (en) 1992-07-10 1992-07-10 Automatic performance device
US08/089,091 US5345035A (en) 1992-07-10 1993-07-08 Musical tone generating apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4184186A JP2661468B2 (en) 1992-07-10 1992-07-10 Automatic performance device

Publications (2)

Publication Number Publication Date
JPH0627943A JPH0627943A (en) 1994-02-04
JP2661468B2 true JP2661468B2 (en) 1997-10-08

Family

ID=16148868

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4184186A Expired - Lifetime JP2661468B2 (en) 1992-07-10 1992-07-10 Automatic performance device

Country Status (1)

Country Link
JP (1) JP2661468B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5985214A (en) * 1997-05-16 1999-11-16 Aurora Biosciences Corporation Systems and methods for rapidly identifying useful chemicals in liquid samples
JP7124371B2 (en) 2018-03-22 2022-08-24 カシオ計算機株式会社 Electronic musical instrument, method and program

Also Published As

Publication number Publication date
JPH0627943A (en) 1994-02-04

Similar Documents

Publication Publication Date Title
US5345035A (en) Musical tone generating apparatus
US5422431A (en) Electronic musical tone synthesizing apparatus generating tones with variable decay rates
EP0730260B1 (en) Computerized music apparatus with sound emulation
US4939974A (en) Automatic accompaniment apparatus
CN110299128A (en) Electronic musical instrument, method, storage medium
JP2500489B2 (en) Electronic musical instrument
JPH0381157B2 (en)
JP2661468B2 (en) Automatic performance device
JP2755051B2 (en) Tone generator
US4619176A (en) Automatic accompaniment apparatus for electronic musical instrument
JP3637577B2 (en) Music generation method
JPH11202866A (en) Method and device for musical sound generation
JP3314564B2 (en) Performance data editing device
JPH0638192B2 (en) Musical sound generator
JP3003559B2 (en) Music generation method
JP3296182B2 (en) Automatic accompaniment device
JP3050779B2 (en) Signal processing device
JPH08335082A (en) Electronic musical instrument having automatic playing function
JPS61175693A (en) Automatic rhythm apparatus
JP3241832B2 (en) Music generator
JP3082294B2 (en) Accompaniment sound signal forming device
JPH10198374A (en) Automatic arpeggio playing device
JPH0727382B2 (en) Automatic accompaniment device
JP3307286B2 (en) Automatic performance device
JP3190103B2 (en) Music synthesizer

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: 19970513