JP3117482B2 - Electronic musical instrument assigner - Google Patents

Electronic musical instrument assigner

Info

Publication number
JP3117482B2
JP3117482B2 JP03160096A JP16009691A JP3117482B2 JP 3117482 B2 JP3117482 B2 JP 3117482B2 JP 03160096 A JP03160096 A JP 03160096A JP 16009691 A JP16009691 A JP 16009691A JP 3117482 B2 JP3117482 B2 JP 3117482B2
Authority
JP
Japan
Prior art keywords
task
tone
tone generation
note
event
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP03160096A
Other languages
Japanese (ja)
Other versions
JPH04362997A (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.)
Roland Corp
Original Assignee
Roland 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 Roland Corp filed Critical Roland Corp
Priority to JP03160096A priority Critical patent/JP3117482B2/en
Publication of JPH04362997A publication Critical patent/JPH04362997A/en
Application granted granted Critical
Publication of JP3117482B2 publication Critical patent/JP3117482B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】本発明は電子楽器に関し、さらに
詳しくは新たな楽音の発音に際してその新たな楽音情報
を割り当てる楽音発生チャネルをいわゆるレベルアサイ
ン方式で選定する電子楽器のアサイナに関するものであ
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic musical instrument, and more particularly, to an electronic musical instrument assigner for selecting a tone generation channel to which new tone information is assigned when a new tone is generated by a so-called level assign method.

【0002】[0002]

【従来の技術】一般に電子楽器は複数の楽音発生チャネ
ルを有し、新たな押鍵等に基づく楽音の発音に際して
は、新たな楽音を割り当てるべき楽音発生チャネルをそ
の複数の楽音発生チャネルのうちから選定している。こ
の選定の仕方としては例えば次のようなものがある。 ・発音終了した空いている楽音発生チャネルを選定す
る。 ・最も早く発音を開始(押鍵)した楽音発生チャネルを
選定する。 ・最も早く離鍵した鍵に対応する楽音発生チャネルを選
定する。 ・最も発音量(エンベロープレベルなど)の少ない楽音
発生チャネルを選定する。いわゆるレベルアサイン方式
である。 ・例えば離鍵順−押鍵順などのようにこれらを組み合わ
せて選定する。
2. Description of the Related Art Generally, an electronic musical instrument has a plurality of tone generating channels. When a tone is generated based on a new key depression or the like, a tone generating channel to which a new tone is to be assigned is selected from the plurality of tone generating channels. Has been selected. For example, there is the following method for this selection. • Select a vacant tone generation channel that has finished sounding.・ Select the tone generation channel that started sounding (key pressed) earliest. -Select the tone generation channel corresponding to the key released the earliest.・ Select a tone generation channel with the least amount of sound (envelope level, etc.). This is a so-called level assignment method. -For example, a key release order-a key press order and the like are selected in combination.

【0003】ところで、電子楽器で発音される楽音に
は、ピアノなどの減衰音系の音色の楽音とフルートなど
の持続音系の音色の楽音がある。これら減衰音系と持続
音系とでは押鍵中のエンベロープの推移などが異なるた
め、上述の楽音発生チャネルの選定の仕方も楽音の種類
によって適・不適がある
[0003] By the way, musical tones produced by electronic musical instruments include musical tones of an attenuated tone such as a piano and musical tones of a continuous tone such as a flute. Since the transition of the envelope during key depression is different between the attenuated sound system and the sustained sound system, the above-described method of selecting the tone generation channel is appropriate or inappropriate depending on the type of the tone.

【0004】例えば、減衰音系の楽音は一般に押鍵後の
エンベロープ波形がほぼ一定に決まっていることから、
選定方法としては最も発音量の少ない楽音発生チャネル
を選定するいわゆるレベルアサインによる選定方法が適
している。一方、最も早く押鍵した楽音発生チャネルを
選定する押鍵順などの選定方法は、先に押鍵されたが発
音量が大きく有用な楽音を発生している楽音発生チャネ
ルを、その後に押鍵されたが発音量が小さな楽音を発生
している楽音発生チャネルよりも先に選定してしまい、
このため有用な楽音の発音が停止されて演奏表現上の自
然感が損なわれることがあるので、減衰音系の電子楽器
には不向きである。
[0004] For example, in the case of a musical tone of an attenuated sound system, the envelope waveform after a key is pressed is generally fixed.
As a selection method, a selection method based on a so-called level assignment for selecting a tone generation channel having the smallest sound generation amount is suitable. On the other hand, a selection method such as a key pressing order for selecting a tone generation channel which has been depressed earliest is based on a tone generation channel which has been depressed first but generates a useful tone with a large volume of sound, and then a depressed key. However, it is selected earlier than the tone generation channel that generates the tone with a small sound volume,
For this reason, useful musical tones are stopped from being produced, and the natural feeling in the performance expression may be impaired.

【0005】また、持続音系の楽音は、押鍵中あるいは
ペダルオン中は、いわゆるサスティン期間としてその発
音量がある一定値に維持されるなどのため、離鍵順ある
いは押鍵順などの選定方法が適しており、レベルアサイ
ンによる選定方法は不向きである。
[0005] In addition, since the tone volume of a sustained tone system is maintained at a certain value during a key depression or a pedal on as a so-called sustain period, a method of selecting a key release order or a key depression order is used. Therefore, the selection method by the level assignment is not suitable.

【0006】[0006]

【発明が解決しようとする課題】上述したようにレベル
アサイン方式を用いた電子楽器のアサイナの場合、各楽
音発生チャネルの発音量等を比較して、一般には発音量
の小さい楽音発生チャネルから先に選定しその発音を停
止して新たな楽音情報を割り当てている。
As described above, in the case of an electronic musical instrument assigner using the level assignment method, the tone generation amount of each tone generation channel is compared, and generally, the tone generation channel having a small tone generation amount is compared with the tone generation channel. Is selected, the sound generation is stopped, and new tone information is assigned.

【0007】一方、発音量の小さな楽音発生チャネルの
楽音であっても、演奏者が意図的に押鍵状態を継続させ
たりペダル踏込みを行ったりしている場合には、その楽
音は減衰が緩やかになったり引き延ばされたりすること
になる。一般にこのような楽音はたとえ発音量が小さく
とも演奏者が演奏表現上有用な楽音として意識している
と考えることができる。
On the other hand, even if the tone of the tone generating channel has a small sound volume, the tone is gradually attenuated if the player intentionally continues to press the key or depress the pedal. Will be prolonged or prolonged. In general, it can be considered that such a musical tone is considered to be a useful musical tone in performance expression even if the sound volume is small.

【0008】ところが、レベルアサイン方式を用いた場
合には、このような有用と考えられる楽音であっても、
発音量が小さいため、新たな楽音情報の割当てにあたっ
て、他の楽音発生チャネルの楽音よりも先に選定されて
発音停止されてしまう恐れがある。つまり従来のレベル
アサイン方式は楽音発生チャネルの選定にあたって各楽
音発生チャネルの押鍵等の状態やペダル状態が十分に考
慮されておらず、これにより演奏表現上の自然感が損な
われる恐れがある。
However, when the level assignment method is used, even a musical tone considered to be useful,
Since the tone generation amount is small, there is a possibility that the tone is selected and stopped before the tone of another tone generation channel is assigned in allocating new tone information. In other words, in the conventional level assignment method, the state of the key press or the pedal state of each tone generating channel is not sufficiently considered when selecting the tone generating channel, which may impair the natural feeling in the performance expression.

【0009】また電子楽器には減衰音系と持続音系の楽
音を同時に取り扱ういわゆるマルチティンバ電子楽器が
ある。このマルチティンバ電子楽器においては、減衰音
系と持続音系の楽音が同時的に発音されることになり、
選定対象となる楽音発生チャネルには減衰音系と持続音
系のものが入り混じっている。しかしながら、従来の楽
音発生チャネルの選定方法には、減衰音系と持続音系の
双方に共通に適したものがなく、よって何れの選定方法
による場合にも減衰音系と持続音系の発音態様の相違が
考慮されないことになり、楽音の性格上まだ発音を継続
させておきたい有用な楽音の発音が停止されてしまうな
ど、演奏表現上の自然感が損なわれる恐れがある。この
ためマルチティンバ電子楽器では減衰音系と持続音系に
分けて別々の選定方法で楽音発生チャネルの選定を行う
などの必要があり、その選定処理が非常に複雑になると
いう問題がある。
There is a so-called multi-timbral electronic musical instrument which simultaneously handles attenuated and sustained musical tones. In this multi-timbral electronic musical instrument, the decay tone and the continuous tone are played simultaneously.
The tone generation channels to be selected include attenuated sounds and sustained sounds. However, there is no conventional method for selecting a tone generation channel that is commonly suitable for both the damped sound system and the sustained sound system. Is not taken into account, and there is a possibility that the natural feeling in the performance expression may be impaired, such as the stoppage of the production of useful tones that should be continued to be produced due to the nature of the musical tones. For this reason, in the multi-timbral electronic musical instrument, it is necessary to select a tone generation channel by a separate selection method separately for an attenuated sound system and a sustained sound system, and the selection process becomes very complicated.

【0010】本発明は以上のような問題点に鑑みてなさ
れたものであり、その目的とするところは、いわゆるレ
ベルアサイン方式による電子楽器のアサイナにおいて、
押鍵状態等やペダル状態も反映して新たな楽音情報を割
り当てる楽音発生チャネルを選定できるようにして、演
奏表現上の違和感を軽減することにある。
The present invention has been made in view of the above problems, and an object thereof is to provide an electronic musical instrument assigner using a so-called level assign method.
An object of the present invention is to make it possible to select a tone generation channel to which new tone information is to be assigned while also reflecting a key pressed state and a pedal state, thereby reducing a sense of incongruity in performance expression.

【0011】また本発明の他の目的は、いわゆるレベル
アサイン方式の選定方法を減衰音系と持続音系の楽音に
共通の選定方法としてマルチティンバ電子楽器にも採用
できるようにし、これにより減衰音系と持続音系の発音
態様の相違に基づく不適切な楽音発生チャネルの選定に
より生じる演奏表現上の違和感を軽減することにある。
Another object of the present invention is to allow a so-called level assignment system selection method to be adopted for a multi-timbral electronic musical instrument as a common selection method for the decay sound system and the sustained sound system. An object of the present invention is to reduce a sense of incongruity in performance expression caused by an inappropriate selection of a tone generation channel based on a difference in pronunciation between a system and a continuous sound system.

【0012】[0012]

【課題を解決するための手段】上述の目的を達成するた
めに、本発明に係る電子楽器のアサイナは、第1の形態
として、各楽音発生チャネルの楽音の発音量またはそれ
に相応する値を検出する第1の検出手段と、各楽音発生
チャネルのノートステータスを検出する第2の検出手段
と、第1の検出手段で検出された発音量またはそれに相
応する値に基づき各楽音発生チャネルの評価レベルを演
算する演算手段であって、第2の検出手段で検出された
ノートステータスがノートオンの楽音発生チャネルにつ
いてはその楽音発生チャネルの評価レベルの演算にあた
ってその楽音発生チャネルが選定され難くなるように重
み付けを行いかつその重み付けをそのノートオン状態の
継続の時間経過に従って減じるよう補正するものと、演
算手段で演算された各楽音発生チャネルの評価レベルに
基づき新たな楽音情報を割り当てる楽音発生チャネルの
選定を行う選定手段とを備えたものである。
In order to achieve the above-mentioned object, an electronic musical instrument assigner according to the present invention, as a first form, detects a tone generation amount of each tone generation channel or a value corresponding thereto. First detecting means, a second detecting means for detecting a note status of each musical tone generating channel, and an evaluation level of each musical tone generating channel based on the sound generation amount detected by the first detecting means or a value corresponding thereto. For a tone generation channel whose note status detected by the second detection means is note-on, so that it is difficult to select the tone generation channel in calculating the evaluation level of the tone generation channel. Weighting and correcting the weighting so as to decrease with the lapse of time of the note-on state; It is obtained by a selecting means for performing selection of the musical tone-generating channel to assign a new music information on the basis of the evaluation level of the musical tone-generating channel.

【0013】[0013]

【0014】さらに本発明に係る電子楽器のアサイナ
は、第2の形態として、減衰音系の楽音と持続音系の楽
音を一緒に取り扱うマルチティンバ電子楽器に適用され
て、減衰音系の楽音と持続音系の楽音に対して共通に用
いられるよう構成されたものである。
Further, as a second embodiment, the assigner of the electronic musical instrument according to the present invention is applied to a multi-timbral electronic musical instrument that handles both the decay tone musical tone and the sustain tone musical tone together. It is configured to be used commonly for continuous tone musical tones.

【0015】[0015]

【作用】本発明に係る電子楽器のアサイナの作用を、減
衰音系と持続音系の楽音についてその発音量等と評価レ
ベルの一例を示した図22を参照しつつ以下に説明す
る。図中、〔A〕は減衰音系、〔B〕は持続音系であ
り、破線の波形が発音中の楽音発生チャネルの発音量等
(例えば、発生された楽音の振幅レベル、楽音発生チャ
ネルのエンベロープレベル、あるいは疑似エンベロープ
レベルなど)であり、実線の波形が評価レベルである。
The operation of the assigner of the electronic musical instrument according to the present invention will be described below with reference to FIG. 22, which shows an example of the sound generation amount and the evaluation level of the decay sound system and the continuous sound system. In the figure, [A] is an attenuated sound system, [B] is a sustained sound system, and the waveform indicated by a broken line is the amount of tone generation of the tone generation channel being generated (for example, the amplitude level of the generated tone, the tone generation channel of the tone generation channel). Envelope level or pseudo envelope level), and the solid-line waveform is the evaluation level.

【0016】本発明に係る電子楽器のアサイナは、通常
動作時には、第1の検出手段で各楽音発生チャネルの楽
音の発音量またはそれに相応する値(例えば疑似エンベ
ロープレベル)を検出し、この発音量またはそれに相応
する値に基づいて演算手段で評価レベルを演算する。例
えば発音量の大きさをそのまま評価レベルとするなどす
る。選定手段はこの評価レベルに基づいて、例えば評価
レベルの小さい楽音発生チャネルから順に選定して、そ
の選定した楽音発生チャネルを新たな楽音情報を割り当
てる楽音発生チャネルとする。
In the assigner of the electronic musical instrument according to the present invention, during normal operation, the first detecting means detects the tone volume of each musical tone generating channel or a value corresponding thereto (for example, a pseudo envelope level). Alternatively, the evaluation means calculates the evaluation level based on the value corresponding thereto. For example, the magnitude of the pronunciation amount is directly used as the evaluation level. Based on the evaluation level, the selecting means sequentially selects, for example, the tone generation channels having the lowest evaluation level, and sets the selected tone generation channel as a tone generation channel to which new tone information is assigned.

【0017】第1の形態の電子楽器のアサイナにおいて
は、図22の区間βに示されるように、第2の検出手段
で検出されたノートステータスがノートオンの楽音発生
チャネルについては、演算手段においてその楽音発生チ
ャネルの評価レベルを演算するにあたって、例えばその
発音量またはそれに相応する値に所定の重み付けをした
ものに基づいて評価レベルを演算するなどその楽音発生
チャネルが選定され難くなるように重み付けを行い、か
つその重み付けをノートオン継続の時間経過と共に減じ
てその楽音発生チャネルが次第に選定され易くなるよう
にする。
In the assigner of the electronic musical instrument according to the first embodiment, as shown in a section β in FIG. 22, for the musical tone generation channel whose note status detected by the second detecting means is note-on, the arithmetic processing means In calculating the evaluation level of the musical tone generating channel, weighting is performed so that the musical sound generating channel is hardly selected, for example, the evaluation level is calculated based on the sound generation amount or a value corresponding thereto being weighted in a predetermined manner. In addition, the weighting is reduced with the lapse of time of note-on continuation, so that the tone generation channel is gradually selected.

【0018】これにより、いわゆるレベルアサイン方式
においても楽音発生チャネルの選定を行うにあたり、押
鍵等のノートオンの状態が反映されるようになり、発音
量が小さくとも有用な楽音が他の楽音よりも先に選定さ
れてしまうことを防止できる。また重み付けを時間経過
とともに減じるようにすると、一般に早く押鍵された楽
音はその後で押鍵された楽音よりも早めに離鍵されると
考えうるから、重み付けを時間経過で変えて評価レベル
を次第に下げることで押鍵順位もレベルアサイン方式の
選定において反映されることになり、一層適切な楽音発
生チャネルの選定が可能となって、演奏表現上の違和感
を軽減できる。
In this way, even in the so-called level assignment method, when selecting a musical tone generation channel, the state of note-on such as key depression is reflected, and useful musical tones are smaller than other musical tones even if the sound volume is small. Can be prevented from being selected first. In addition, if the weighting is reduced over time, it is generally considered that a tone that is depressed earlier is released earlier than a tone that is depressed afterwards. By lowering, the key pressing order is also reflected in the selection of the level assignment method, so that a more appropriate tone generation channel can be selected, and the unnatural feeling in the performance expression can be reduced.

【0019】[0019]

【0020】また上述の第1の形態のアサイナをマルチ
ティンバ電子楽器に適用した場合、特に持続音系の楽音
に対してレベルアサイン方式により楽音発生チャネルの
選定を行うものであっても選定に際し押鍵状態も反映さ
れているものであるから不適切な選定方法とはならず、
したがって減衰音系の楽音に対しても持続音系の楽音に
対しても共通に用いることができるから、かかるマルチ
ティンバ電子楽器における選定処理が簡単化され、また
演奏表現上の違和感も軽減することができる。
When the assigner of the first embodiment described above is applied to a multi-timbral electronic musical instrument, a tone generation channel is selected by a level assignment method for a tone of a sustained tone in particular. Since the key state is also reflected, it is not an inappropriate selection method,
Therefore, since the present invention can be used for both attenuated tones and sustained tones, the selection process in such a multi-timbral electronic musical instrument can be simplified, and the feeling of incongruity in performance expression can be reduced. Can be.

【0021】なお、図22における区間αは、楽音発生
チャネルが発音開始してから所定期間(一般には楽音の
特徴を表現するのに重要と考えられるアタック中、ある
いはアクックおよびディケイ中の期間)にわたり、その
評価レベルが大きな値となるようにして、新たな押鍵に
対して、楽音表現に重要な部分を発音中の楽音発生チャ
ネルが発音停止されて割り当てられてしまうことを防止
しているが、もちろん本発明の実施にあたっては、この
ような区間を設けないものであってもよい。
The interval α in FIG. 22 extends over a predetermined period (generally, during an attack considered to be important for expressing the characteristics of a musical tone, or during an attack and a decay) from the start of the tone generation channel. Although the evaluation level is set to a large value, it is possible to prevent a tone generation channel, which is producing an important part in tone expression, from being stopped and assigned to a new key press. Of course, in implementing the present invention, such a section may not be provided.

【0040】[0040]

【実施例】図1には本発明の一実施例としてのアサイナ
が適用される電子楽器が示される。この実施例の電子楽
器は、独立した複数個の音色のパートを有するマルチテ
ィンバ電子楽器についてのものであり、このマルチティ
ンバ電子楽器においては、パートへの演奏情報を各パー
トに対応するMIDIチャネルを使用して供給するよう
になっている。図1において、20はMIDI信号を受
信するMIDI回路である。このMIDI回路は公知の
技術により、図示しない外部の自動演奏装置より図示し
ないMIDIバスを介してMIDIメッセージを受信
し、これを解読して演奏情報などとするとともに、MI
DIメッセージの受信を完了するつどバス21を介して
対応する割込みをCPU22にかける。例えばノートオ
ンおよび/またはノートオフメッセージを受信するとキ
ーデータ受信割込みをかける。ROM23にはCPU2
2の実行するプログラムとともに、各処理に必要なデー
タおよびテーブルなどがあらかじめ記憶されている。R
AM24にはプログラムを実行するに必要な各種レジス
タなどを含むワーキングエリアが設定されている。タイ
マ25は所定時間間隔(1mSec )でCPU22にタイ
マ割込みをかける。前記CPU22は所定プログラムを
実行し、MIDI回路20からの割込みに応じて演奏情
報などを受け取り、RAM24の対応するレジスタに書
き込む。また書き込まれたデータなどに基づき、所定プ
ログラムを実行することにより16個の楽音発生チャネ
ルを有する楽音発生回路26を制御している。楽音発生
回路26では所望の楽音信号を生成し、増幅器27を介
してスピーカ28に送り、楽音を発生させている。な
お、楽音発生チャネルは、CPU22による楽音発生の
指示およびその際に与えられる楽音発生パラメータに基
づき楽音信号を生成して、時間経過に対応して生成する
楽音信号を推移させる。また、楽音発生チャネルは、C
PU22によって与えられる次に到達するエンベロープ
レベルを示す目標値と所定時間当りのエンベロープレベ
ルの変化量を示すレートとに基づいてエンベロープレベ
ルを補間して滑らかなエンベロープを発生させ楽音信号
の振幅を制御するとともに、急速減衰の指示により、エ
ンベロープレベルを所定の急速減衰レートに従って減衰
させ、エンベロープレベルが“0”になると楽音発生回
路26に設けられている急速減衰終了FIFOに楽音発
生チャネル番号を積む。次にRAM24の所定領域に設
定されている各種マップについて図2〜図7を参照して
説明する。なお図2〜図7はこれらマップの一部を示す
ものである。
FIG. 1 shows an electronic musical instrument to which an assigner according to one embodiment of the present invention is applied. The electronic musical instrument of this embodiment is a multi-timbral electronic musical instrument having a plurality of independent timbre parts. In this multi-timbral electronic musical instrument, performance information for the parts is transmitted to a MIDI channel corresponding to each part. It is designed to be used and supplied. In FIG. 1, reference numeral 20 denotes a MIDI circuit for receiving a MIDI signal. This MIDI circuit receives a MIDI message from an external automatic performance device (not shown) via a MIDI bus (not shown) and decodes the MIDI message into performance information and the like.
Each time the reception of the DI message is completed, a corresponding interrupt is issued to the CPU 22 via the bus 21. For example, when a note-on and / or note-off message is received, a key data reception interrupt is generated. The ROM 23 has a CPU 2
2, data and tables required for each process are stored in advance together with the program to be executed. R
A working area including various registers required for executing a program is set in the AM 24. The timer 25 interrupts the CPU 22 at predetermined time intervals (1 mSec). The CPU 22 executes a predetermined program, receives performance information and the like in response to an interrupt from the MIDI circuit 20, and writes the information into a corresponding register of the RAM 24. Further, a tone generation circuit 26 having 16 tone generation channels is controlled by executing a predetermined program based on the written data and the like. The tone generator 26 generates a desired tone signal and sends it to a speaker 28 via an amplifier 27 to generate a tone. The tone generation channel generates a tone signal based on a tone generation instruction from the CPU 22 and tone generation parameters given at that time, and shifts the generated tone signal in accordance with the passage of time. The tone generation channel is C
The smoothing envelope is generated by interpolating the envelope level based on the target value indicating the next envelope level provided by the PU 22 and the rate indicating the amount of change of the envelope level per predetermined time, and the amplitude of the tone signal is controlled. At the same time, according to the instruction of the rapid decay, the envelope level is attenuated in accordance with a predetermined rapid decay rate. Next, various maps set in a predetermined area of the RAM 24 will be described with reference to FIGS. 2 to 7 show some of these maps.

【0041】MIDIチャネルマップ(図2) “0〜15”により16個のMIDIチャネルの種類を
示すMIDIチャネル番号に対応して次のものが記憶さ
れる。 (1) パート番号:16個のパートの種類を“0〜15”
でもって示す.
MIDI Channel Map (FIG. 2) The following items are stored by “0 to 15” in correspondence with MIDI channel numbers indicating the types of 16 MIDI channels. (1) Part number: The type of 16 parts is "0-15"
I will show it.

【0042】パートマップ(図3) “0〜15”により16個のパートの種類を示すパート
番号に対応して次のものが記憶される。 (1) 音色番号:音色を示す. (2) トランケート禁止フェーズ番号:新たな楽音の割当
てを禁止するフェーズの最終番号を示す. すなわちこの
番号までの時間(=フェーズ番号×所定単位時間(5m
Sec ))新たな楽音の割当てを禁止する.本実施例にお
いてはアタックを終了するまでのフェーズ番号である. (3) リザーブ数:新たな楽音の割当てを禁止する楽音発
生チャネル数を示す. (4) 持続音系フラグ:持続音系の楽音を“1”でもっ
て、減衰音系の楽音を“0”でもって示す. (5) ダンパーフラグ:ダンパーオンを“1”でもって、
ダンパーオフを“0”でもって示す.
Part maps (FIG. 3) The following are stored in accordance with the part numbers indicating the types of the 16 parts using "0 to 15". (1) Tone number: Indicates the tone. (2) Truncate prohibition phase number: Indicates the last number of the phase for which the assignment of a new musical tone is prohibited.
Sec)) Prohibit new tone assignment. In this embodiment, it is the phase number until the end of the attack. (3) Reserve number: Indicates the number of tone generation channels for which the assignment of a new tone is prohibited. (4) Sustained sound flag: A sustained tone is indicated by "1" and a damped sound is indicated by "0". (5) Damper flag: Set the damper on to “1”
Damper off is indicated by "0".

【0043】ノートマップ(図4) “0〜15”により示される16個の各パート番号毎に
設けられ、各パート番号のノートマップでは、“0〜1
27”により楽音の音高を示すノート番号に対応して次
のものが記憶される。 (1) ノートステータス:ノートオンを“1”でもって、
ノートオフを“0”でもって示す. (2) ソステヌートステータス:ソステヌートオンを
“1”でもって、ソステヌートオフを“0”でもって示
す.
The note map (FIG. 4) is provided for each of the 16 part numbers indicated by "0 to 15" .
The following are stored in correspondence with the note number indicating the pitch of the musical tone by 27 ". (1) Note status: With note-on being" 1 ",
Note-off is indicated by “0”. (2) Sostenuto status: Shows sostenuto on with “1” and sostenuto off with “0”.

【0044】タスク管理マップ(図6) “1〜7”によりタスクの種類を示すタスク番号に対応
して次のものが記憶される。なお、タスク番号は、
“1”はキーデータ受信タスク、“2”はメインアサイ
ナタスク、“3”は発音タスク、“4”はプリアサイナ
タスク、“5”はエンベロープタスク、“6”はペダル
データ受信タスク、“7”は操作子データ受信タスクで
あり、番号が若いほど優先順位が高い. (1) タイマ処理要求フラグ:タイマ処理が必要なことを
“1”でもって示す. (2) ステータス:タスクの状態がランであることを
“0”でもって、レディであることを“1”でもって、
ウェイトであることを“2”でもって示す. (3) 待ちイベント値:ステータスがウェイトにおける待
ち中のイベントの種類を示す. (4) イベント発生フラグ:タスクの各イベント毎にイベ
ントの発生を“1”でもって示す.
The task management map (FIG. 6) The following items are stored in correspondence with the task numbers indicating the types of tasks according to "1 to 7". The task number is
“1” is a key data receiving task, “2” is a main assigner task, “3” is a sounding task, “4” is a pre-assigner task, “5” is an envelope task, “6” is a pedal data receiving task, 7 "is an operator data reception task, and the lower the number, the higher the priority. (1) Timer processing request flag: Indicates that timer processing is required with “1”. (2) Status: “0” indicates that the task is in the run state, and “1” indicates that the task is ready.
The weight is indicated by “2”. (3) Waiting event value: Indicates the type of waiting event whose status is wait. (4) Event occurrence flag: The occurrence of an event is indicated by “1” for each event of the task.

【0045】楽音発生チャネル管理マップ(図7) “0〜15”の番号により16個の楽音発生チャネルを
示す楽音発生チャネル番号に対応して次のものが記憶さ
れる。 (1) 発音量:現在発音中の楽音の発音量を“0000
H”〜“FFFFH”でもって示す. (2) トランケート禁止フラグ:新たな楽音の割当ての禁
止を“1”でもって示す. (3) 急速減衰中フラグ:従前の楽音を急速減衰中である
ことを“1”でもって示す. (4) 処理待ちフラグ1:発音タスクにおける第1処理の
処理待ちを“1”でもって示す. (5) 処理待ちフラグ2:発音タスクにおける第2処理の
処理待ちを“1”でもって示す. (6) 処理待ちフラグ3:発音タスクにおける第3処理の
処理待ちを“1”でもって示す. (7) ノート番号:楽音の音高を示す. (8) ベロシティ:楽音のベロシティを示す. (9) 楽音発生パラメータ群:楽音発生に関する各種パラ
メータの値を示す. (10)押鍵順位:ノートオン受信順位を“0〜15”でも
って示し、最も古いノートオン受信順位を“0”でもっ
て示す. (11)ノートステータス (12)パート番号
Tone generation channel management map (FIG. 7) The following numbers are stored in correspondence with the tone generation channel numbers indicating the 16 tone generation channels by numbers "0 to 15". (1) Sound volume: The sound volume of the currently sounding musical tone is “0000”.
H ”to“ FFFFH ”(2) Truncate prohibition flag: Indicates the prohibition of allocation of new musical sounds with“ 1 ”(3) Rapid decay flag: The previous musical sound is being rapidly decayed Is indicated by “1.” (4) Processing wait flag 1: Indicates the waiting of the first processing in the sound generation task by “1” (5) Processing wait flag 2: Waits for the second processing in the sound generation task (6) Processing wait flag 3: Indicates the processing wait of the third processing in the sound generation task with “1.” (7) Note number: Indicates the pitch of a musical tone (8) Velocity : Indicates the velocity of the musical tone (9) Musical tone generation parameter group: Indicates the value of various parameters related to musical tone generation (10) Key pressing order: Note-on receiving order is indicated by “0 to 15”, and the oldest note-on The reception order is indicated by “0”. (11) Note status (12) Part number

【0046】エンベロープ管理マップ(図5) 各楽音発生チャネルに対応して“0〜15”の番号によ
り16個のエンベロープチャネルを示すエンベロープチ
ャネル番号に対応して次のものが記憶される。 (1) エンベロープレベル:エンベロープレベルを“00
00H”〜“FFFFH”でもって示す. (2) 目標値:次に到達すべきエンベロープレベルを“0
000H”〜“FFFFH”でもって示す. (3) レート:所定時間(5mSec )当たりのエンベロー
プレベルの変化量を示す.具体的には正負を示す符号ビ
ットと絶対値を“0000H”〜“FFFFH”で示す
データビットより構成される. (4) フェーズ番号:現在のフェーズ番号(楽音発生開始
からの経過段階)を示す. (5) トランケート禁止フェーズ番号:新たな楽音の割当
てを禁止する最終フェーズ番号を示す. (6) エンベロープ生成パラメータ群:楽音のエンベロー
プ生成に関する各種パラメータの値を示す. (7) 補正量:発音状態等を反映する補正量を示す.
Envelope management map (FIG. 5) The followings are stored in correspondence with the envelope channel numbers indicating the 16 envelope channels by numbers "0 to 15" corresponding to each tone generation channel. (1) Envelope level: Set the envelope level to “00”.
00H ”to“ FFFFH ”(2) Target value: The next envelope level to be reached is“ 0 ”.
000H ”to“ FFFFH ”(3) Rate: Indicates the amount of change in the envelope level per a predetermined time (5 mSec). (4) Phase number: Indicates the current phase number (elapsed stage from the start of musical tone generation) (5) Truncate prohibited phase number: Last phase number for which allocation of new musical sounds is prohibited (6) Envelope generation parameter group: Indicates the values of various parameters related to the envelope generation of musical sounds (7) Correction amount: Indicates the correction amount that reflects the sound generation state, etc.

【0047】以上のように構成された電子楽器の動作を
まず概略的に説明する。 この実施例の電子楽器において
は、各種タスク、すなわちキーデータ受信タスク、メイ
ンアサイナタスク、発音タスク、プリアサイナタスク、
エンベロープタスク、ペダルデータ受信タスク、操作子
データ受信タスクの各タスクはモニタプログラムの管理
下に、タスク間の優先処理をしつつマルチタスキングに
よって実行される。ここでモニタプログラムとしてはリ
セットルーチン、イベント待ちモニタコールルーチン、
イベント発生モニタコールルーチン、タイマ割込み処理
ルーチン、キーデータ受信割込み処理ルーチン、ペダル
データ受信割込み処理ルーチン、操作子データ受信割込
み処理ルーチンがある。 キーデータ受信タスク(図1
3)は、MIDI回路20から楽音情報(ノートオンお
よび/またはノートオフメッセージ)を読み込み、ノー
トオンメッセージの時にはノートオン処理をしてメイン
アサイナに起動をかける。 メインアサイナタスク(図1
4)は、プリアサイナタスクで設定される楽音発生チャ
ネルのアサイン順位に従って楽音発生チャネルを選定
し、発音タスクに対して発音要求を行なう。 発音タスク
(図15、図16)は、メインアサイナタスクで選定さ
れた楽音発生チャネルに対して、それが発音中であれば
その発音を停止させる処理を行ない、発音が停止されて
いれば、または停止されると、入力された楽音情報に基
づきその楽音情報を発音するために楽音発生チャネルで
必要な各種のパラメータ等を演算して、その演算したパ
ラメータ等をその楽音発生チャネルに転送して発音開始
を指示する。 プリアサイナタスク(図17)は、タイマ
により定期的に起動されて、楽音発生チャネル管理マッ
プから各楽音発生チャネルの発音量を読み込み、これを
プリアサイナ発音量とし、原則としてこのプリアサイナ
発音量に基づきプリアサイン順位設定ルーチン(図1
8)に従って楽音発生チャネルのプリアサイン順位を設
定しアサイン順位を設定する。なお、リザーブ対象外の
楽音発生チャネルのみが選定対象となる。 楽音発生チャ
ネル管理マップの発音量はエンベロープタスクによって
逐次に更 新される。エンベロープタスク(図19、図2
0)では楽音発生チャネルの発音が終了しているか否か
を調べ、発音を終了しているものについては、発音量を
“0”に設定する。発音終了していないものについては
その楽音が減衰音系か持続音系かを調べ、減衰音系につ
いてはそれにあった減衰音系の発音量の更新(図21)
を行ない、持続音系についてはそれにあった持続音系の
発音量の更新(図22)を行なう。 なお、発音量をほぼ
次のように設定し、ノートオン状態、ペダルオン状態の
楽音発生チャネルを選定され難くしている。 ノート
オンを受信すると急速減衰が必要であれば“FFFF
H”に設定する。 アタック中はアタックレベル/2
+“8000H”に設定する。 アタックを終了しか
つノートオン状態である場合にはエンベロープレベル/
2+補正量に設定する。ここで補正量はノートオン時に
ノートオン初期補正量に設定し、アタックを終了すると
ノートオン状態の継続中は所定時間毎にノートオン減少
量ずつノートオン最小補正量になるまで順次に減少す
る。 ノートオフ状態でかつペダルの状態がオンであ
る場合にもエンベロープレベル/2+補正量に設定す
る。なお、補正量はオン状態であるペダルの種類に応じ
たペダルオン初期補正量に基づいて設定する。 ノー
トオフ状態でかつ全てのペダル状態がオフである場合に
はエンベロープレベル/2に設定する。 次に図8〜図2
2のフローチャートにおいて用いられる各種の変数とし
て以下のものがある。 NSTK 要求元タスク番号:モニタコールをしたタスクの
タスク番号を示す. NSET 要求元イベント値:モニタコールをしたタスクに
おいて次に処理しようとするイベントの種類を示す. NDTK 要求先タスク番号:次に実行を予定するタスクの
タスク番号を示す. NDET 要求先イベント値:次に実行を予定するタスクに
おいて処理しようとするイベントの種類を示す. IEDF 初期設定完了フラグ:全てのタスクにおける初期
設定の完了を“1”でもって示す. TCTN タイマ割込み処理対象番号:タイマ割込み処理対
象のタスク番号を示す. TCNE[N] 第Nタスクタイマカウンタ値:タスク番号が
Nであるタスク用タイマカウンタの値を示す. TCND[N] 第Nタスク時間間隔:タスク番号がNである
タスクに対してタイマイベントを発行する時間間隔を示
す. TCNE[TCTN] 第TCTNタスクタイマカウンタ値:タスク番
号がタイマ割込み処理対象番号TCTNであるタスク用タイ
マカウンタの値を示す. TCND[TCTN] 第TCTNタスク時間間隔:タスク番号がタイ
マ割込み処理対象番号TCTNであるタスクに対してタイマ
イベントを発行する時間間隔を示す.
The operation of the electronic musical instrument configured as described above
First, a brief description will be given. In the electronic musical instrument of this embodiment,
Are various tasks, that is, key data reception task,
Assigner task, pronunciation task, pre-assigner task,
Envelope task, pedal data reception task, operator
Each task of the data reception task manages a monitor program
Below, multitasking with priority processing between tasks
It is executed. Here, the monitor program
Set routine, event wait monitor call routine,
Event occurrence monitor call routine, timer interrupt processing
Routine, key data reception interrupt processing routine, pedal
Data reception interrupt processing routine, operator data reception interrupt
There is only a processing routine. Key data reception task (Fig. 1
3) is the tone information (note-on and
And / or note-off message)
Note-on processing is performed when a message
Launch the assigner. Main Assigner Task (Figure 1
4) is a tone generation channel set in the pre-assigner task.
Select sound generation channel according to channel assignment order
Then, a pronunciation request is made to the pronunciation task. Pronunciation task
(Figs. 15 and 16) are selected by the main assigner task.
If it is sounding for the selected tone generation channel
Performs processing to stop the sound, and stops the sound
If stopped or stopped, the input
To generate the musical information
Calculates various necessary parameters, etc., and calculates the calculated parameters.
Transfer parameters, etc. to the tone generation channel and start sounding
Instruct. The pre-assigner task (Fig. 17) is a timer
Is activated periodically by the
Read the tone volume of each tone generation channel from the
The pre-assigner pronunciation volume, and in principle this pre-assigner
Pre-assignment order setting routine based on sound volume (Fig. 1
Set the pre-assignment order of the tone generation channels according to 8).
And set the assignment order. In addition, reserve
Only the tone generation channel is selected. Tone generator
The sound volume of the flannel management map depends on the envelope task.
It is sequentially updated. Envelope task (Fig. 19, Fig. 2
In 0), whether or not the tone generation channel has finished sounding
And, for those whose pronunciation has ended,
Set to “0”. For those whose pronunciation has not ended
Check whether the musical sound is a decay sound or a sustained sound.
Update of the sound volume of the damping sound system corresponding to that (Fig. 21)
To the continuous sound system,
The pronunciation amount is updated (FIG. 22). In addition, the sound volume
Make the following settings to enable note-on and pedal-on
This makes it difficult to select a tone generation channel. Note
If a rapid decay is required when receiving ON, "FFFF
H ”. Attack level / 2 during attack
+ Set to "8000H". Only end the attack
If one note-on state is selected, the envelope level /
Set to 2 + correction amount. Here, the correction amount is
When the note-on initial correction amount is set and the attack ends
While the note-on state continues, the note-on decreases at predetermined intervals.
Decrease by the amount until the note-on minimum correction amount is reached.
You. Note-off state and pedal state is on
Set to envelope level / 2 + correction amount
You. The amount of correction depends on the type of pedal that is on.
Set based on the pedal-on initial correction amount. No
To the off state and all pedal states are off
Is set to envelope level / 2. Next, FIGS.
Various variables used in the flowchart of 2
There are the following. NSTK request source task number: Indicates the task number of the task that made the monitor call. NSET request source event value: Indicates the type of event to be processed next in the task that made the monitor call. NDTK request destination task number: Execute next Indicates the task number of the task scheduled to be executed. NDET Request destination event value: Indicates the type of event to be processed in the task scheduled to be executed next. IEDF Initialization completion flag: Indicates completion of initialization in all tasks TCTN Timer interrupt processing target number: Indicates the task number of the timer interrupt processing target. TCNE [N] Nth task timer counter value: Indicates the value of the timer counter for the task whose task number is N. TCND [N] Nth task time interval: Indicates the time interval at which a timer event is issued for the task whose task number is N. TCNE [TCTN] TCTN task Ima counter value: Indicates the value of the timer counter for tasks whose task number is timer interrupt processing target number TCTN. TCND [TCTN] TCTN task time interval: Timer for tasks whose task number is timer interrupt processing target number TCTN Indicates the time interval for issuing the event.

【0048】〔キーデータ受信タスク〕 NTNM ノート番号:ノートオンおよび/またはノートオ
フメッセージに基づく演奏情報の音高を示す. NTST ノートステータス:ノートオンメッセージに基づ
く演奏情報であることを“1”でもって、ノートオフメ
ッセージに基づく演奏情報であることを“0”でもって
示す. NTVL ベロシティ:ノートオンメッセージに基づく演奏
情報のベロシティを示す. MCNM MIDIチャネル番号:ノートオンおよび/また
はノートオフメッセージに基づく演奏情報のMIDIチ
ャネル番号を示す. PTNM パート番号
[Key Data Receiving Task] NTNM Note Number: Indicates the pitch of performance information based on the note-on and / or note-off message. NTST Note Status: "1" indicates that the performance information is based on the note-on message. Thus, the performance information based on the note-off message is indicated by "0". NTVL velocity: Indicates the velocity of the performance information based on the note-on message. MCNM MIDI channel number: based on the note-on and / or note-off message Indicates the MIDI channel number of performance information. PTNM part number

【0049】〔メインアサイナタスク〕 MASS[N] 第Nアサイン順位の楽音発生チャネル番号:
アサイン順位が第Nアサイン順位(N番目のアサイン順
位)である楽音発生チャネルの楽音発生チャネル番号を
示す. TASN 対象アサイン順位:アサイン対象のアサイン順位
番号を示す. MAEF メインアサイナ処理中フラグ:メインアサイナタ
スクで新たなアサイン処理をしたことを“1”でもって
示す. MASS[TASN] アサイン順位TASNの楽音発生チャネル番
号:アサイン順位が対象アサイン順位TASNである楽音発
生チャネルの楽音発生チャネル番号をしめす. GACN 割当て可能楽音発生チャネル数:割当てが可能な
楽音発生チャネル数を示す.
[Main Assigner Task] MASS [N] The tone generation channel number of the Nth assignment order:
Indicates the tone generation channel number of the tone generation channel whose assignment order is the Nth assignment order (the Nth assignment order). TASN Target assignment order: Indicates the assignment order number of the assignment target. MAEF Main assigner processing flag: Main assigner Indicates that new assignment processing has been performed by the task with “1”. MASS [TASN] Tone generation channel number of assignment order TASN: The tone generation channel number of the tone generation channel whose assignment order is the target assignment order TASN. GACN Number of assignable tone generation channels: Indicates the number of assignable tone generation channels.

【0060】〔発音タスク〕 GCTN 発音処理対象楽音発生チャネル番号:処理対象の
楽音発生チャネル番号を示す. TDNF 急速減衰未了フラグ:いずれかの楽音発生チャネ
ルが急速減衰中であることを“1”でもって示す.
[Sound Generation Task] GCTN Sound generation processing target tone generation channel number: Indicates the tone generation channel number to be processed. TDNF rapid decay incomplete flag: Indicates that any tone generation channel is undergoing rapid decay with “1”.

【0061】〔プリアサイナタスク〕 GN 楽音発生チャネル番号 PPTN プリアサイナパート番号 PLEV[GN] 楽音発生チャネル番号GNのプリアサイナ発音
量 PACT[GN] 楽音発生チャネル番号GNのプリアサイナ急速
減衰中フラグ PTRN[PPTN] プリアサイナパート番号PPTNのリザーブ数 PTRC[PPTN] プリアサイナパート番号PPTNのリザーブ処
理数 PAIT[GN] 楽音発生チャネル番号GNのプリアサイナトラ
ンケート禁止フラグ PAST[GN] 楽音発生チャネル番号GNのプリアサイナノー
トステータス PAPN[GN] 楽音発生チャネル番号GNのプリアサイナ押鍵
順位 PRCN プリアサイナリザーブオーバ楽音発生チャネル総
数:リザーブ対象外の楽音発生チャネルの総数を示す. N プリアサイン順位 PASS[N] 第Nプリアサイン順位楽音発生チャネル番号:
プリアサイン順位が第N順位である楽音発生チャネルの
楽音発生チャネル番号を示す. PN 処理対象押鍵順位
[Preassigner task] GN Music generation channel number PPTN Preassigner part number PLEV [GN] Preassigner sound volume of music generation channel number GN PACT [GN] Preassigner rapid decay flag PTRN [PPTN] of music generation channel number GN Preassigner part number PPTN reserve number PTRC [PPTN] Preassigner part number PPTN reserve processing number PAIT [GN] Preassigner truncation prohibition flag for musical sound generation channel number GN PAST [GN] Preassigner note status for musical sound generation channel number GN PAPN [GN] Key assignment order of pre-assigner of tone generation channel number GN PRCN Pre-assigner Reserve over total number of tone generation channels: Indicates the total number of tone generation channels not to be reserved. N pre-assigned order PASS [N] N-th pre-assigned order tone generation channel number:
Indicates the tone generation channel number of the tone generation channel whose pre-assignment rank is the Nth rank. PN processing target key press rank

【0062】〔エンベロープタスク〕 ECTN エンベロープ処理対象番号 EPNM エンベロープ処理対象パート番号 ELEN エンベロープレベル ENNM エンベロープ処理対象ノート番号 ECLV 補正量 EVOL 発音量[Envelope task] ECTN envelope processing target number EPNM envelope processing target part number ELEN envelope level ENNM envelope processing target note number ECLV correction amount EVOL sound volume

【0063】[0063]

【0064】まず、モニタプログラムについて図8〜図
12に示されるフローチャートを参照して説明する。
セットルーチン(図8)電源の投入時等においてリセッ
トがかかると実行されるルーチンである。各ステップZ
A1〜ZA3での処理は以下の通りである。 〔ZA1〕 タスク管理マップにおける全てのタスク番
号のステータスを“1:レディ”に設定し、また、タイ
マ処理要求フラグ、待ちイベント値およびイベント発生
フラグを“0”に設定する。さらに、初期設定完了フラ
グIEDFを“0:初期設定未完了”に設定する等の初期設
定を行う。 〔ZA2〕 要求元タスク番号NSTKを“1:キーデータ
受信タスク”に更新するとともに、タスク管理マップに
おけるタスク番号“1:キーデータ受信タスク”のステ
ータスを“0:ラン”に設定する。 〔ZA3〕 キーデータ受信タスクを実行する。
First, FIG. 8 to FIG.
This will be described with reference to the flowchart shown in FIG. Re
Set Routine (FIG. 8) This is a routine that is executed when a reset is applied when the power is turned on or the like. Each step Z
The processing in A1 to ZA3 is as follows. [ZA1] The statuses of all task numbers in the task management map are set to “1: ready”, and the timer processing request flag, the wait event value, and the event occurrence flag are set to “0”. Further, initialization such as setting an initialization completion flag IEDF to “0: initialization not completed” is performed. [ZA2] The request source task number NSTK is updated to “1: key data reception task”, and the status of the task number “1: key data reception task” in the task management map is set to “0: run”. [ZA3] Execute the key data reception task.

【0065】イベント待ちモニタコールルーチン(図9) 実行中のタスクがイベント待ちモニタコールをすると実
行されるルーチンである。各ステップZB1〜ZB5で
の処理は以下の通りである。 〔ZB1〕 タスク管理マップにおける要求元タスク番
号NSTKに対応するタスク番号について、要求元イベント
値NSETの2進数表現における“1”であるビットに対応
するイベント発生フラグのいずれかが“1:イベント発
生”であるか否かを判断する。この対応するイベント発
生フラグのいずれかが“1:イベント発生”である場合
には、イベント待ちモニタコールを行ったタスクに戻
る。なお、イベント発生フラグの判断に際して、例えば
要求元イベント値NSETが“1”である場合には第1イベ
ント発生フラグ、要求元イベント値NSETが“2”である
場合には第2イベント発生フラグ、要求元イベント値NS
ETが“3”である場合には第1および第2イベント発生
フラグを判断する。 〔ZB2〕 ステップZB1における判断において、判
断対象のイベント発生フラグがいずれも“1”でなくて
イベントの発生を示していない場合には、タスク管理マ
ップにおける要求元タスク番号NSTKに対応するタスク番
号のステータスを“2:ウェイト”に設定するととも
に、待ちイベント値を要求元イベント値NSETにする。ま
た処理の再開に備えて要求元タスクにおいて使用中のレ
ジスタ等の内容をスタック領域に退避する等の中断処理
(以下、単に要求元タスクの中断処理と記する)を行
う。 〔ZB3〕 タスク管理マップを調べて、イベント待ち
モニタコールを行ったタスクより優先順位が低くかつ対
応するステータスが“1:レディ”を示すタスクをタス
ク番号順に探す。このレディを示すタスクがない場合に
は、要求元タスク番号NSTKをスリープを示す“8”に設
定してスリープする。なお、スリープからはタイマ25
またはMIDI回路20からのハードウェア割込みに基
づいて、後述するタイマ割込み処理ルーチン、キーデー
タ受信割込み処理ルーチン、ペダルデータ受信割込み処
理ルーチン、または操作子データ受信割込み処理ルーチ
ンが起動される。 〔ZB4〕 ステップZB3において最優先のレディタ
スクを探し出すと、要求元タスク番号NSTKをそのタスク
のタスク番号に更新するとともに、タスク管理マップに
おけるそのタスクのタスク番号のステータスを“0:ラ
ン”に設定する。 〔ZB5〕 要求元タスク番号NSTKに対応するタスクを
実行する。なお、タスクの実行に際しては、そのタスク
の中断処理においてスタック領域に退避したデータ等を
元のレジスタ等に戻す等の再開処理(以下、単に再開処
理と記する)を行う。
Event Waiting Monitor Call Routine (FIG. 9) This routine is executed when the task being executed makes an event waiting monitor call. The processing in each of steps ZB1 to ZB5 is as follows. [ZB1] Regarding the task number corresponding to the request source task number NSTK in the task management map, one of the event generation flags corresponding to the bit “1” in the binary representation of the request source event value NSET is set to “1: event occurrence” Is determined. If any of the corresponding event occurrence flags is "1: event occurrence", the process returns to the task that made the event wait monitor call. In determining the event occurrence flag, for example, if the request source event value NSET is "1", a first event occurrence flag is set, if the request source event value NSET is "2", a second event occurrence flag is set. Requester event value NS
When ET is "3", the first and second event occurrence flags are determined. [ZB2] In the determination in step ZB1, if none of the event occurrence flags to be determined is “1” and does not indicate that an event has occurred, the task number corresponding to the request source task number NSTK in the task management map is determined. The status is set to "2: wait" and the wait event value is set to the request source event value NSET. Also, in preparation for the resumption of the process, an interrupting process such as saving the contents of the registers and the like used in the requesting task to the stack area (hereinafter simply referred to as a requesting task interrupting process) is performed. [ZB3] The task management map is examined, and a task having a lower priority than the task that has made the event wait monitor call and having a corresponding status of "1: ready" is searched in order of task number. If there is no task that indicates this ready, the request source task number NSTK is set to “8” indicating sleep, and the process goes to sleep. It should be noted that, from sleep, the timer 25
Alternatively, based on a hardware interrupt from the MIDI circuit 20, a timer interrupt processing routine, a key data reception interrupt processing routine, a pedal data reception interrupt processing routine, or an operator data reception interrupt processing routine to be described later is started. [ZB4] When the highest priority ready task is found in step ZB3, the request source task number NSTK is updated to the task number of the task, and the status of the task number of the task in the task management map is set to "0: run". I do. [ZB5] Execute the task corresponding to the request source task number NSTK. When the task is executed, resumption processing (hereinafter, simply referred to as resumption processing) such as returning data and the like saved in the stack area to the original register or the like in the interruption processing of the task is performed.

【0066】イベント発生モニタコールルーチン(図10) 実行中のタスクがイベント発生モニタコールをすると実
行されるルーチンである。各ステップZC1〜ZC7で
の処理は以下の通りである。 〔ZC1〕 タスク管理マップにおける要求先タスク番
号NDTKに対応するタスク番号について、要求先イベント
値NDETの2進数表現における“1”であるビットに対応
するイベント発生フラグを“1”に設定する。 例えば要求先イベント値NDETが“1”である場合には第
1イベント発生フラグを、要求先イベント値NDETが
“2”である場合には第2イベント発生フラグを“1”
に設定する。 〔ZC2〕 タスク管理マップにおける要求先タスク番
号NDTKに対応するタスク番号のステータスが“2:ウェ
イト”でかつ待ちイベント値が要求先イベント値NDETに
対応しているか否かを判断する。このステータスが
“2:ウェイト”でなく、または待ちイベント値が要求
先イベント値NDETに対応しない場合には、このモニタコ
ールを行ったタスクに戻る。 なお、待ちイベント値が要求先イベント値NDETに対応し
ているか否かの判断は、待ちイベント値の2進数表現に
おける“1”であるビットに対応する要求先イベント値
NDETの2進数表現におけるビットのいずれかのビットが
“1”であるか否かで判断する。例えば待ちイベント値
が“1”である場合には要求先イベント値NDETの第1ビ
ットが“1”、待ちイベント値が“2”である場合には
要求先イベント値NDETの第2ビットが“1”、待ちイベ
ント値が“3”である場合には要求先イベント値NDETの
第1または第2ビットが“1”であるときに対応してい
ると判断する。 〔ZC3〕 ステップZC2における判断において、判
断対象のステータスが“2:ウェイト”でかつ待ちイベ
ント値が要求先イベント値NDETに対応する場合には、こ
のステータスを“1:レディ”に設定する。 〔ZC4〕 要求先タスク番号NDTKが要求元タスク番号
NSTK未満か否かにより要求先タスクの優先順位が要求元
タスクの優先順位より高いか否かを判断する。この要求
先タスク番号NDTKが要求元タスク番号NSTK未満でなくて
要求先タスクの優先順位が高くない場合には、このモニ
タコールを行ったタスクに戻る。 〔ZC5〕 ステップZC4における判断において、要
求先タスク番号NDTKが要求元タスク番号NSTK未満で要求
先タスクの優先順位が高い場合には、タスク管理マップ
における要求元タスク番号NSTKに対応するタスク番号の
ステータスを“1:レディ”に設定するとともに、処理
の再開に備えて要求元タスクの中断処理を行う。 〔ZC6〕 要求元タスク番号NSTKを要求先タスク番号
NDTKに更新するとともに、タスク管理マップにおける要
求先タスク番号NDTKに対応するタスク番号のステータス
を“0:ラン”に設定する。 〔ZC7〕 要求先タスク番号NDTKに対応するタスク番
号のタスクを実行する。なお、タスクの実行に際しては
そのタスクの再開処理を行う。
Event Occurrence Monitor Call Routine (FIG. 10) This routine is executed when an executing task makes an event occurrence monitor call. The processing in each of steps ZC1 to ZC7 is as follows. [ZC1] For the task number corresponding to the requested task number NDTK in the task management map, the event occurrence flag corresponding to the bit of "1" in the binary representation of the requested event value NDET is set to "1". For example, if the requested event value NDET is "1", the first event occurrence flag is set to "1". If the requested event value NDET is "2", the second event occurrence flag is set to "1".
Set to. [ZC2] It is determined whether the status of the task number corresponding to the request destination task number NDTK in the task management map is "2: wait", and whether the waiting event value corresponds to the request destination event value NDET. If the status is not “2: wait” or the wait event value does not correspond to the request destination event value NDET, the process returns to the task that made this monitor call. Whether the wait event value corresponds to the request destination event value NDET is determined by the request destination event value corresponding to the bit “1” in the binary representation of the wait event value.
The determination is made based on whether any one of the bits in the binary representation of NDET is “1”. For example, when the wait event value is "1", the first bit of the request destination event value NDET is "1", and when the wait event value is "2", the second bit of the request destination event value NDET is "1". If the wait event value is "1" and the first or second bit of the request destination event value NDET is "1", it is determined that this corresponds. [ZC3] In the determination in step ZC2, if the status to be determined is “2: wait” and the wait event value corresponds to the request destination event value NDET, this status is set to “1: ready”. [ZC4] Requested task number NDTK is the requesting task number
It is determined whether or not the priority of the request destination task is higher than the priority of the request source task based on whether or not it is less than NSTK. If the requested task number NDTK is not less than the requested task number NSTK and the priority of the requested task is not high, the process returns to the task that made this monitor call. [ZC5] In the determination in step ZC4, if the requested task number NDTK is less than the requested task number NSTK and the priority of the requested task is high, the status of the task number corresponding to the requested task number NSTK in the task management map Is set to "1: ready", and the requesting task is suspended in preparation for the resumption of the processing. [ZC6] Request source task number NSTK is requested task number
While updating to NDTK, the status of the task number corresponding to the requested task number NDTK in the task management map is set to “0: run”. [ZC7] The task of the task number corresponding to the requested task number NDTK is executed. When the task is executed, the task is restarted.

【0067】タイマ割込み処理ルーチン(図11) このタイマ割込み処理ルーチンにおいては、タイマ25
からタイマ割込みがかかると、まず各タスクに対応する
タイマカウンタを調べ、その値が“1”を超えている場
合にはタイマカウンタを“1”だけデクリメントし、
“1”を超えていない場合にはタスク管理マップにおけ
るそのタスク番号の第1イベント発生フラグを“1:イ
ベント発生”に設定するとともに、そのタスクのステー
タスが“2:ウェイト”であるときにはステータスを
“1:レディ”に設定する。次に、優先順位の高いタス
クから順次に、タスクを実行すべきか否かを判断して最
初に条件を満たすタスクを実行させる。各ステップZD
1〜ZD16での処理は以下の通りである。 〔ZD1〕 初期設定完了フラグIEDFが“1:初期設定
完了”であるか否かを判断する。この初期設定完了フラ
グIEDFが“1”でない場合には、全てのタスクの初期設
定がいまだ終了していないので、タイマ割込み処理を終
了してタイマ割込み前の処理に戻り、“1”である場合
には後述する各タスクの初期設定を全て終了しているの
で次のステップZD2に進む。 〔ZD2〕 タイマ割込み処理対象のタスク番号を示す
タイマ割込み処理対象番号TCTNを“7”に設定する。 〔ZD3〕 タスク管理マップにおけるタイマ割込み処
理対象番号TCTNに対応するタスク番号のタイマ処理要求
フラグが“1:要求有り”であるか否かを判断する。こ
のタイマ処理要求フラグが“1”でない場合には、ステ
ップZD8に進む。 〔ZD4〕 ステップZD3における判断において、判
断対象のタイマ処理要求フラグが“1:要求有り”であ
る場合には、第TCTNタスクタイマカウンタ値TCNE[TCTN]
が“1”を超えているか否かを判断する。第TCTNタスク
タイマカウンタ値TCNE[TCTN]が“1”を超えている場合
には、ステップZD10に進む。
Timer Interrupt Processing Routine (FIG. 11) In this timer interrupt processing routine, the timer 25
When a timer interrupt occurs, the timer counter corresponding to each task is checked first, and if the value exceeds “1”, the timer counter is decremented by “1”.
If it does not exceed “1”, the first event occurrence flag of the task number in the task management map is set to “1: event occurrence”, and if the status of the task is “2: wait”, the status is changed to “1”. Set to “1: Ready”. Next, it is determined whether tasks should be executed in order from a task having a higher priority, and a task that satisfies a condition is executed first. Each step ZD
The processing in 1 to ZD16 is as follows. [ZD1] It is determined whether or not the initial setting completion flag IEDF is "1: initial setting completed". If the initial setting completion flag IEDF is not “1”, the initial setting of all tasks has not been completed yet, so the timer interrupt processing is terminated and the processing returns to the processing before the timer interrupt. Since the initial setting of each task described below has been completed, the process proceeds to the next step ZD2. [ZD2] The timer interrupt processing target number TCTN indicating the task number of the timer interrupt processing target is set to “7”. [ZD3] It is determined whether or not the timer processing request flag of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is "1: Requested". If the timer processing request flag is not "1", the process proceeds to step ZD8. [ZD4] In the determination in step ZD3, if the timer processing request flag to be determined is “1: request”, the TCTN task timer counter value TCNE [TCTN]
Is greater than or equal to “1”. If the TCTN task timer counter value TCNE [TCTN] exceeds "1", the flow proceeds to step ZD10.

【0068】〔ZD5〕 ステップZD4における判断
において、第TCTNタスクタイマカウンタ値TCNE[TCTN]が
“1”を超えていない場合には、まず第TCTNタスクタイ
マカウンタ値TCNE[TCTN]に第TCTNタスク時間間隔TCND[T
CTN]を加算して、この値を新たな第TCTNタスクタイマカ
ウンタ値TCNE[TCTN]とする。次に、タスク管理マップに
おけるタイマ割込み処理対象番号TCTNに対応するタスク
番号の第1イベント発生フラグを“1:イベント発生”
に設定する。 〔ZD6〕 タスク管理マップにおけるタイマ割込み処
理対象番号TCTNに対応するタスク番号のステータスが
“2:ウェイト”でかつそのタスクの待ちイベント値の
2進数表現における第1ビットが“1”(例えば待ちイ
ベント値が“1”,“3”)であるか否かを判断する。
このステータスが“2:ウェイト”でないまたは待ちイ
ベント値の2進数表現における第1ビットが“1”でな
い場合には、ステップZD8に進む。 〔ZD7〕 ステップZD6における判断において、判
断対象のステータスが“2:ウェイト”でかつ判断対象
の待ちイベント値の2進数表現における第1ビットが
“1”である場合には、タスク管理マップにおけるタイ
マ割込み処理対象番号TCTNに対応するタスク番号のステ
ータスを“1:レディ”に設定する。 〔ZD8〕 タイマ割込み処理対象番号TCTNが“1”を
超えているか否かを判断する。このタイマ割込み処理対
象番号TCTNが“1”を超えていない場合には、イベント
発生フラグの設定処理が全て終了したので、ステップZ
D11に進む。 〔ZD9〕 ステップZD8における判断において、タ
イマ割込み処理対象番号TCTNが“1”を超えている場合
には、タイマ割込み処理対象番号TCTNを“1”だけデク
リメントしてステップZD3に戻る。 〔ZD10〕 ステップZD4における判断において、
第TCTNタスクタイマカウンタ値TCNE[TCTN]が“1”を超
えている場合には、第TCTNタスクタイマカウンタ値TCNE
[TCTN]を“1”だけデクリメントしてステップZD8に
進む。
[ZD5] If it is determined in step ZD4 that the TCTN task timer counter value TCNE [TCTN] does not exceed “1”, first the TCTN task timer counter value TCNE [TCTN] is added to the TCTN task time. Interval TCND [T
CTN] is added, and this value is set as a new TCTN task timer counter value TCNE [TCTN]. Next, the first event occurrence flag of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is set to “1: event occurrence”.
Set to. [ZD6] The status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is “2: wait”, and the first bit in the binary representation of the wait event value of the task is “1” (for example, wait event It is determined whether the value is “1”, “3”).
If the status is not “2: wait” or the first bit in the binary representation of the wait event value is not “1”, the process proceeds to step ZD8. [ZD7] In the determination in step ZD6, if the status to be determined is “2: wait” and the first bit in the binary representation of the wait event value to be determined is “1”, the timer in the task management map The status of the task number corresponding to the interrupt processing target number TCTN is set to “1: ready”. [ZD8] It is determined whether or not the timer interrupt processing target number TCTN exceeds "1". If the timer interrupt processing target number TCTN does not exceed "1", all the event occurrence flag setting processes have been completed.
Proceed to D11. [ZD9] If it is determined in step ZD8 that the timer interrupt processing target number TCTN exceeds “1”, the timer interrupt processing target number TCTN is decremented by “1” and the process returns to step ZD3. [ZD10] In the determination in step ZD4,
If the TCTN task timer counter value TCNE [TCTN] exceeds “1”, the TCTN task timer counter value TCNE
[TCTN] is decremented by "1", and the flow advances to step ZD8.

【0069】〔ZD11〕 タイマ割込み処理対象番号
TCTNがこのルーチンにおいてはタイマ割込み発生前の処
理を示す要求元タスク番号NSTK未満であるか否かを判断
する。このタイマ割込み処理対象番号TCTNが要求元タス
ク番号NSTK未満でない場合には、タイマ割込み発生時に
実行していたタスクの優先順位が処理対象番号TCTNに対
応するタスクの優先順位より低くないので、タイマ割込
み処理を終了してそのタスクに戻る。 〔ZD12〕 ステップZD11における判断におい
て、タイマ割込み処理対象番号TCTNが要求元タスク番号
NSTK未満である場合には、タスク管理マップにおけるタ
イマ割込み処理対象番号TCTNに対応するタスク番号のス
テータスが“1:レディ”であるか否かを判断する。こ
のステータスが“1”でない場合には、ステップZD1
6に進む。 〔ZD13〕 ステップZD12における判断におい
て、判断対象のステータスが“1:レディ”である場合
には、タスク管理マップにおける要求元タスク番号NSTK
に対応するタスク番号のステータスを“1:レディ”に
設定するとともに、処理の再開に備えて要求元タスク番
号NSTKに対応するタスクの中断処理を行う。 〔ZD14〕 要求元タスク番号NSTKをタイマ割込み処
理対象番号TCTNに更新するとともに、タスク管理マップ
におけるタイマ割込み処理対象番号TCTNに対応するタス
ク番号のステータスを“0:ラン”に設定する。 〔ZD15〕 タイマイベントを発生する。すなわち、
タイマ割込み処理対象番号TCTNに対応するタスク番号の
タスクを実行する。なお、タスクの実行に際してはその
タスクの再開処理を行う。 〔ZD16〕 ステップZD12における判断におい
て、判断対象のステータスが“1:レディ”でない場合
には、タイマ割込み処理対象番号TCTNを“1”だけイン
クリメントしてステップZD11に戻る。
[ZD11] Timer interrupt processing target number
In this routine, the TCTN determines whether or not the request source task number NSTK indicating the processing before the occurrence of the timer interrupt is less than NSTK. If the timer interrupt processing target number TCTN is not less than the request source task number NSTK, the priority of the task executed at the time of occurrence of the timer interrupt is not lower than the priority of the task corresponding to the processing target number TCTN. Ends processing and returns to the task. [ZD12] In the determination in step ZD11, the timer interrupt processing target number TCTN is the request source task number.
If it is less than NSTK, it is determined whether or not the status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is “1: ready”. If this status is not "1", then step ZD1
Proceed to 6. [ZD13] In the determination in step ZD12, if the status of the determination target is “1: ready”, the request source task number NSTK in the task management map
, The status of the task number corresponding to the task number NSTK is set to “1: ready”, and the task corresponding to the request source task number NSTK is suspended in preparation for the resumption of the process. [ZD14] The request source task number NSTK is updated to the timer interrupt processing target number TCTN, and the status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is set to “0: run”. [ZD15] A timer event is generated. That is,
Executes the task with the task number corresponding to the timer interrupt processing target number TCTN. When the task is executed, the task is restarted. [ZD16] If it is determined in step ZD12 that the status to be determined is not “1: ready”, the timer interrupt processing target number TCTN is incremented by “1” and the process returns to step ZD11.

【0080】キーデータ受信割込み処理ルーチン(図12) MIDI回路20から割込みがかかると実行されてキー
データ受信イベントを発生するルーチンである。各ステ
ップZE1〜ZE6での処理は以下の通りである。 〔ZE1〕 初期設定完了フラグIEDFが“1:完了”で
あるか否かを判断する。この初期設定完了フラグIEDFが
“1”でない場合には、全てのタスクの初期設定がいま
だ終了していないので、キーデータ受信割込み処理を終
了してキーデータ受信割込み発生前の処理に戻る。 〔ZE2〕 ステップZE1における判断において初期
設定完了フラグIEDFが“1:完了”である場合には、タ
スク管理マップにおけるタスク番号“1:キーデータ受
信タスク”の第1イベント発生フラグを“1:発生”に
設定する。 〔ZE3〕 タスク管理マップにおけるタスク番号
“1:キーデータ受信タスク”のステータスが“2:ウ
ェイト”でかつ待ちイベント値が“1:キーデータ受信
イベント待ち”であるか否かを判断する。このステータ
スが“2:ウェイト”でない、または待ちイベント値が
“1:キーデータ受信イベント待ち”でない場合には、
キーデータ受信割込み処理を終了してキーデータ受信割
込み発生前の処理に戻る。 〔ZE4〕 ステップZE3における判断において、判
断対象のステータスが“2”でかつ待ちイベント値が
“1”でキーデータ受信イベント待ちである場合には、
このルーチンにおいてはキーデータ受信割込み発生前の
処理を示す要求元タスク番号NSTKが“8”未満であるか
否かを判断する。要求元タスク番号NSTKが“8” 未満
である場合にはタスク管理マップにおける要求元タスク
番号NSTKに対応するタスク番号のステータスを“1:レ
ディ”に設定するとともに、処理の再開に備えてタイマ
割込み発生前のタスクの中断処理を行う。なお、“8”
未満でない場合には格別の処理は不要である。 〔ZE5〕 要求元タスク番号NSTKをタスク番号“1:
キーデータ受信タスク”に更新するとともに、タスク管
理マップにおけるタスク番号“1:キーデータ受信タス
ク”のステータスを“0:ラン”に設定する。 〔ZE6〕 キーデータ受信イベントを発生する。すな
わち、キーデータ受信タスクを実行する。なおタスクの
実行に際してはキーデータ受信タスクの再開処理を行
う。
Key Data Reception Interrupt Processing Routine (FIG. 12) This routine is executed when an interrupt is received from the MIDI circuit 20, and generates a key data reception event. The processing in each of the steps ZE1 to ZE6 is as follows. [ZE1] It is determined whether or not the initialization completion flag IEDF is "1: completed". If the initial setting completion flag IEDF is not "1", the initial setting of all tasks has not been completed yet, so that the key data reception interrupt processing ends and the processing returns to the processing before the key data reception interrupt occurred. [ZE2] If it is determined in step ZE1 that the initial setting completion flag IEDF is "1: completed", the first event occurrence flag of the task number "1: key data receiving task" in the task management map is set to "1: generated". Set to "". [ZE3] It is determined whether the status of the task number "1: key data reception task" in the task management map is "2: wait" and the wait event value is "1: key data reception event wait". If this status is not “2: wait” or the wait event value is not “1: key data reception event wait”,
The key data reception interrupt processing ends, and the processing returns to the processing before the occurrence of the key data reception interrupt. [ZE4] In the determination in step ZE3, if the status of the determination target is “2”, the wait event value is “1”, and the key data reception event is waiting,
In this routine, it is determined whether or not the request source task number NSTK indicating the processing before the occurrence of the key data reception interrupt is less than "8". If the requesting task number NSTK is less than “8”, the status of the task number corresponding to the requesting task number NSTK in the task management map is set to “1: ready”, and a timer interrupt is prepared in order to resume the processing. Suspend the task before occurrence. Note that "8"
If not, no special processing is required. [ZE5] The request source task number NSTK is changed to the task number "1:
In addition to updating to "key data receiving task", the status of task number "1: key data receiving task" in the task management map is set to "0: run" [ZE6] A key data receiving event is generated, that is, a key is generated. The data receiving task is executed, and the key data receiving task is restarted when the task is executed.

【0081】ペダルデータ受信割込み処理ルーチン MIDI回路20からペダルデータ受信割込みがかかる
と実行されて、ペダルデータ受信イベントの発生などを
する。 〔ZF1〕 初期設定完了フラグIEDFが“1:完了”で
あるか否かを判断する。この初期設定完了フラグIEDFが
“1”でない場合には、全てのタスクの初期設定がいま
だ終了していないので、ペダルデータ受信割込み処理ル
ーチンを終了してペダルデータ受信割込み発生前の処理
に戻る。 〔ZF2〕 ステップZF1における判断において初期
設定完了フラグIEDFが“1:完了”である場合には、タ
スク管理マップにおけるタスク番号“6:ペダルデータ
受信タスク”の第1イベント発生フラグを“1:発生”
に設定する。 〔ZF3〕 タスク管理マップにおけるタスク番号
“6:ペダルデータ受信タスク”のステータスが“2:
ウエィト”でかつ待ちイベント値が“1:ペダルデータ
受信イベント待ち”であるか否かを判断する。このステ
ータスが“2:ウェイト”でない、または待ちイベント
値が“1:ペダルデータ受信イベント待ち”でない場合
にはペダルデータ受信割込み処理を終了してペダルデー
タ受信割込み前の処理に戻る。 〔ZF4〕 ステップZF3における判断において、タ
スク管理マップにおけるタスク番号“6:ペダルデータ
受信タスク”のステータスが“2:ウェイト”でかつ待
ちイベント値が“1”である場合には、このステータス
を“1:レディ”に設定する。 〔ZF5〕 要求元タスク番号NSTKが“6”を超えてい
るか否かにより要求元タスクの優先順位がペダルデータ
受信タスクの優先順位より低いか否かを判断する。要求
元タスク番号NSTKが“6”を超えていなくて要求元タス
クの優先順位がペダルデータ受信タスクの優先順位より
低くない場合には、ペダルデータ受信割込み前に実行し
ていたタスクを示す要求元タスク番号NSTKのタスクに戻
る。 〔ZF6〕 ステップZF5における判断において要求
元タスク番号NSTKが“6”を超えていて要求元タスクの
優先順位がペダルデータ受信割込みタスクの優先順位よ
り低い場合には、このルーチンにおいてはキーデータ受
信割込み発生前の処理を示す要求元タスク番号NSTKが
“8”未満であるか否かを判断する。要求元タスク番号
NSTKが“8”未満である場合には、タスク管理マップに
おける要求元タスク番号NSTKに対応するタスク番号のス
テータスを“1:レディ”に設定するとともに、処理の
再開に備えて要求元タスクの中断処理を行う。なお、
“8”未満でない場合には格別の処理は不要である。 〔ZF7〕 要求元タスク番号NSTKを“6:ペダルデー
タ受信タスク”に更新するとともに、タスク管理マップ
におけるタスク番号“6:ペダルデータ受信タスク”の
ステータスを“0:ラン”に設定する。 〔ZF8〕 ペダルデータ受信イベントを発生する。す
なわち、ペダルデータ受信タスクを実行する。なおタス
クの実行に際してはペダルデータ受信タスクの再開処理
を行う。 なお、ステップZF5における判断においてペダルデー
タ受信割込み前に実行していたタスクに戻った場合に
は、いずれかのタスクにおけるイベント待ちモニタコー
ルに基づくイベント待ちモニタコールルーチンにおいて
条件を満たすとペダルデータ受信タスクを実行する。
The pedal data reception interrupt processing routine is executed when a pedal data reception interrupt is applied from the MIDI circuit 20, and a pedal data reception event is generated. [ZF1] It is determined whether or not the initialization completion flag IEDF is "1: completed". If the initial setting completion flag IEDF is not "1", the initial setting of all tasks has not been completed yet, so that the pedal data reception interrupt processing routine is ended and the processing returns to the processing before the occurrence of the pedal data reception interrupt. [ZF2] If the initial setting completion flag IEDF is "1: completed" in the determination in step ZF1, the first event occurrence flag of the task number "6: pedal data reception task" in the task management map is set to "1: generated". "
Set to. [ZF3] The status of the task number “6: Pedal data reception task” in the task management map is “2:
It is determined whether or not the wait event value is “1: wait for pedal data reception event.” The status is not “2: wait,” or the wait event value is “1: wait for pedal data reception event.” If not, the pedal data reception interrupt process ends and the process returns to the process before the pedal data reception interrupt. [ZF4] In the determination in step ZF3, the status of the task number "6: Pedal data reception task" in the task management map is "ZF4". If the wait event value is “1” and the wait event value is “1”, this status is set to “1: ready.” [ZF5] Depending on whether the request source task number NSTK exceeds “6” or not. It is determined whether the priority of the requesting task is lower than the priority of the pedal data receiving task. If TK does not exceed “6” and the priority of the request source task is not lower than the priority of the pedal data reception task, the request source task number NSTK indicating the task executed before the pedal data reception interrupt [ZF6] If the request source task number NSTK exceeds “6” and the priority of the request source task is lower than the priority of the pedal data reception interrupt task in the determination in step ZF5, It is determined whether or not the request source task number NSTK indicating the processing before the occurrence of the key data reception interrupt is less than “8”.
If NSTK is less than “8”, the status of the task number corresponding to the requesting task number NSTK in the task management map is set to “1: ready”, and the requesting task is suspended in preparation for resuming the processing. Perform processing. In addition,
If it is not less than "8", no special processing is required. [ZF7] The request source task number NSTK is updated to "6: pedal data reception task", and the status of the task number "6: pedal data reception task" in the task management map is set to "0: run". [ZF8] A pedal data reception event is generated. That is, the pedal data receiving task is executed. When the task is executed, the pedal data receiving task is restarted. If the task returns to the task that was being executed before the interruption of the pedal data reception in the determination in step ZF5, the condition is satisfied in the event wait monitor call routine based on the event wait monitor call in any task. Execute

【0082】操作子データ受信割込み処理ルーチン MIDI回路20から操作子データ受信割込みがかかる
と実行され、ペダルデータ受信割込み処理ルーチンに準
じた処理により、操作子データ受信要求イベントの発生
などをする。 〔ZG1〕 初期設定完了フラグIEDFが“1:完了”で
あるか否かを判断する。この初期設定完了フラグIEDFが
“1”でない場合には、全てのタスクの初期設定がいま
だ終了していないので、操作子データ受信割込みルーチ
ンを終了して操作子データ受信割込み発生前の処理に戻
る。 〔ZG2〕 ステップZG1における判断において初期
設定完了フラグIEDFが“1:完了”である場合には、タ
スク管理マップにおけるタスク番号“7:操作子データ
受信タスク”の第1イベント発生フラグを“1:発生”
に設定する。 〔ZG3〕 タスク管理マップにおけるタスク番号
“7:操作子データ受信タスク”のステータスが“2:
ウェイト”でかつ待ちイベント値が“1:操作子データ
受信イベント待ち”であるか否かを判断する。このステ
ータスが“2:ウェイト”でない、または待ちイベント
値が“1:操作子データ受信イベント待ち”でない場合
には操作子データ受信割込み処理を終了して操作子デー
タ受信割込み前の処理に戻る。 〔ZG4〕 ステップZG3における判断において、タ
スク管理マップにおけるタスク番号“7:操作子データ
受信タスク”のステータスが“2:ウェイト”でかつ待
ちイベント値が“1”である場合には、このステータス
を“1:レディ”に設定する。 〔ZG5〕 要求元タスク番号NSTKが“7”を超えてい
るか否かにより要求元タスクの優先順位が操作子データ
受信タスクの優先順位より低いか否かを判断する。要求
元タスク番号NSTKが“7”を超えていなくて要求元タス
クの優先順位が操作子データ受信タスクの優先順位より
低くない場合には、操作子データ受信割込み前に実行し
ていたタスクを示す要求元タスク番号NSTKのタスクに戻
る。 〔ZG6〕 ステップZG5における判断において要求
元タスク番号NSTKが“7”を超えていて要求元タスクの
優先順位が操作子データ受信割込みタスクの優先順位よ
り低い場合には、要求元タスク番号NSTKを“7:操作子
データ受信タスク”に更新するとともに、タスク管理マ
ップにおけるタスク番号“7:操作子データ受信タス
ク”のステータスを“0:ラン”に設定する。 〔ZG7〕 操作子データ受信イベントを発生する。す
なわち、操作子データ受信タスクを実行する。なおタス
クの実行に際しては操作子データ受信タスクの再開処理
を行う。 なお、ステップZG5における判断において操作子デー
タ受信割込み前に実行していたタスクに戻った場合に
は、いずれかのタスクにおけるイベント待ちモニタコー
ルに基づくイベント待ちモニタコールルーチンにおいて
条件を満たすと操作子データ受信タスクを実行する。
Operator data reception interrupt processing routine This is executed when an operator data reception interrupt is received from the MIDI circuit 20, and an operation data reception request event is generated by processing according to the pedal data reception interrupt processing routine. [ZG1] It is determined whether or not the initialization completion flag IEDF is "1: completed". If the initial setting completion flag IEDF is not "1", the initial setting of all the tasks has not been completed yet, so that the operator data receiving interrupt routine is ended and the process returns to the process before the occurrence of the operator data receiving interrupt. . [ZG2] If it is determined in step ZG1 that the initial setting completion flag IEDF is "1: completed", the first event occurrence flag of the task number "7: operator data reception task" in the task management map is set to "1: Outbreak "
Set to. [ZG3] The status of the task number “7: operator data reception task” in the task management map is “2:
It is determined whether the status is “wait” and the wait event value is “1: wait for operator data reception event.” The status is not “2: wait,” or the wait event value is “1: operator data reception event.” If it is not “Waiting”, the controller interrupt processing is terminated and the process returns to the processing before the controller data reception interrupt. If the status of “” is “2: wait” and the wait event value is “1”, this status is set to “1: ready.” [ZG5] The request source task number NSTK exceeds “7” It is determined whether or not the priority of the requesting task is lower than the priority of the controller data receiving task based on whether or not the requesting task number NS If the TK does not exceed “7” and the priority of the requesting task is not lower than the priority of the operator data receiving task, the requesting task number indicating the task executed before the interrupt of the operator data reception Return to the NSTK task [ZG6] If the requesting task number NSTK exceeds “7” in the determination in step ZG5 and the priority of the requesting task is lower than the priority of the operator data reception interrupt task, the request is made. The original task number NSTK is updated to “7: operator data reception task”, and the status of the task number “7: operator data reception task” in the task management map is set to “0: run.” [ZG7] Operation A child data reception event is generated, that is, an operation data reception task is executed. If it is determined in step ZG5 that the task has been executed before the interruption of the operator data reception, the condition is set in the event wait monitor call routine based on the event wait monitor call in one of the tasks. When the condition is satisfied, the operator data reception task is executed.

【0083】次に、各タスクをキーデータ受信タスク、
メインアサイナタスク、発音タスク、プリアサイナタス
ク、エンベロープタスク、ペダルデータ受信タスク、操
作子データ受信タスクの順に説明する。なお、電源の投
入時等においてリセットがかかった後の各タスクでの最
初の処理に際しては、先頭のステップ例えば次に説明す
るキーデータ受信タスクではステップA1より開始す
る。また、あるタスクの処理を中断しその後処理を再開
するに際しては、そのタスクにおいて中断時の処理を継
続するように中断した処理を再開する。例えばキーデー
タ受信タスクのステップA2でイベント待ちモニタコー
ルをし、イベント待ちモニタコールルーチンでの判断に
おいてイベント発生でなく中断処理をした場合には、そ
の後キーデータ受信割込みの発生によりキーデータ受信
割込みルーチンで再開処理をすると、ステップA2のイ
ベント待ちモニタコールに引き続くステップA3より処
理を再開する。
Next, each task is defined as a key data receiving task,
The main assigner task, sounding task, pre-assigner task, envelope task, pedal data receiving task, and operator data receiving task will be described in this order. In the first processing in each task after resetting at power-on or the like, the processing is started from step A1 in the first step, for example, in a key data receiving task described below. Further, when suspending the processing of a certain task and then resuming the processing thereafter, the interrupted processing is resumed so that the processing at the time of interruption is continued in the task. For example, if an event wait monitor call is made in step A2 of the key data reception task, and an interruption is performed instead of an event occurrence in the determination in the event wait monitor call routine, a key data reception interrupt routine is then generated by the occurrence of a key data reception interrupt. Then, the process is restarted from step A3 following the event waiting monitor call of step A2.

【0084】キーデータ受信タスク(図13) キーデータ受信タスクは、キーデータ受信イベントが発
生すると、MIDI回路20からノートオンおよび/ま
たはノートオフメッセージに基づく演奏情報を読み込
み、アサイン要求イベントを発生する。各ステップA1
〜A7での処理は以下の通りである。 〔A1〕 ノートマップをクリヤするとともに、このキ
ーデータ受信タスクで占有する変数等を初期値に設定す
る。 〔A2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。キーデータ受信イベン
トが発生すると、次のステップA3に進む。 〔A3〕 タスク管理マップにおけるタスク番号“1:
キーデータ受信タスク”の第1イベント発生フラグ
“0”に、待ちイベント値を“0”に設定する。 〔A4〕 まず、MIDI回路20からノートオンおよ
び/またはノートオフメッセージに基づく演奏情報を読
み込み、その演奏情報のMIDIチャネル番号、ノート
番号、ノートステータスおよびノートベロシティをそれ
ぞれ対応するところのMIDIチャネル番号MCNM、ノー
ト番号NTNM、ノートステータスNTSTおよびベロシティNT
VLとする。次に、MIDIチャネルマップにおけるMI
DIチャネル番号MCNMに対応するMIDIチャネル番号
のパート番号をパート番号PTNMとする。 〔A5〕 ノートステータスNTSTが“1:ノートオン”
であるか否かを判断する。このノートステータスNTSTが
“1”でない場合には次のステップA6に進み、“1”
である場合にはステップA7に進む。 〔A6〕 ノートオフ処理 まず、楽音発生チャネル管理マップのパート番号および
ノート番号がパート番号PTNMおよびノート番号NTNMでか
つノートステータスが“1”である楽音発生チャネル番
号を押鍵順位の小なる順に探し、押鍵順位の最も小なる
その楽音発生チャネル番号のノートステータスを“0”
に設定する。次にパート番号がパート番号PTNMであるノ
ートマップのノート番号がノート番号NTNMであるノート
ステータスを“0”に更新設定し、ステップA2に戻
る。 〔A7〕 ノートオン処理 まず、パート番号がパート番号PTNMであるノートマップ
のノート番号がノート番号NTNMであるノートステータス
を“1”に設定する。次にアサイン要求イベントを発生
する。すなわち、要求先タスク番号NDTKを“2:メイン
アサイナタスク”に、要求先イベント値NDETを“1”に
設定してイベント発生モニタコールを行う。ステップA
2に戻る。
Key Data Receiving Task (FIG. 13) When a key data receiving event occurs, the key data receiving task reads performance information based on a note-on and / or note-off message from the MIDI circuit 20, and generates an assignment request event. . Each step A1
The processing in A7 is as follows. [A1] The note map is cleared, and variables and the like occupied by the key data receiving task are set to initial values. [A2] The request source event value NSET is set to "1" and an event wait monitor call is performed. When the key data reception event occurs, the process proceeds to the next step A3. [A3] Task number “1:” in the task management map
The first event occurrence flag of the key data receive task "
The wait event value is set to “0” and the wait event value is set to “0”. [A4] First, performance information based on the note-on and / or note-off message is read from the MIDI circuit 20, and the MIDI channel number MCNM corresponding to the MIDI channel number, note number, note status and note velocity of the performance information respectively. , Note number NTNM, note status NTST and velocity NT
VL. Next, MI in the MIDI channel map
Let the part number of the MIDI channel number corresponding to the DI channel number MCNM be the part number PTNM. [A5] Note status NTST is "1: note on"
Is determined. If the note status NTST is not "1", the process proceeds to the next step A6, where "1"
If it is, the process proceeds to step A7. [A6] Note-off processing First, search for the tone generation channel numbers whose part numbers and note numbers in the tone generation channel management map are the part number PTNM and the note number NTNM and the note status is "1" in ascending order of key press. , The note status of the tone generation channel number having the smallest key pressing order is “0”.
Set to. Next, the note status of the note map having the part number PTNM with the part number PTNM is updated to "0" and the process returns to step A2. [A7] Note-on processing First, the note status of the note map having the part number PTNM as the part number PTNM is set to "1". Next, an assignment request event is generated. That is, the request destination task number NDTK is set to “2: main assigner task” and the request destination event value NDET is set to “1”, and an event occurrence monitor call is made. Step A
Return to 2.

【0085】メインアサイナタスク(図14) メインアサイナタスクは、アサイン要求イベントが発生
すると、後述するプリアサイナタスクで設定するアサイ
ン順位に基づいて、楽音発生チャネル管理マップの所定
の領域にノート番号NTNMなどを書き込み、発音要求イベ
ントを発生する。各ステップB1〜B7での処理は以下
の通りである。 〔B1〕 楽音発生チャネル管理マップを初期設定する
と共に、このメインアサイナタスクで占有する変数等を
初期値に設定する。なお、楽音発生チャネル管理マップ
における各楽音発生チャネル番号の押鍵順位をその楽音
発生チャネル番号に設定する。また、第Nアサイン順位
楽音発生チャネル番号MASS[N] (Nは0,1・・・1
5)をそれぞれ対応する“N( =0,1・・・15) ”
に設定する。また対象アサイン順位TASNを“0”に、割
当て可能楽音発生チャネル数GACNを最大数の“16”に
それぞれ設定する。 〔B2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。アサイン要求イベント
が発生すると、次のステップB3に進む。 〔B3〕スク管理マップにおけるタスク番号“2:
メインアサイナタスク”の待ちイベント値を“0”に、
第1イベント発生フラグを“0”に設定する。 〔B4〕 対象アサイン順位TASNが割当て可能楽音発生
チャネル数GACN未満であるか否かを判断する。割当て可
能楽音発生チャネル数GACN未満でない場合には、割り当
てるべき楽音発生チャネルが最早やないためにステップ
B2に戻る。 〔B5〕 ステップB4において未満との判断の場合、
楽音発生チャネル管理マップにおけるアサイン順位TASN
の楽音発生チャネル番号MASS[TASN]に対応する楽音発生
チャネル番号の処理待ちフラグ1、処理待ちフラグ2お
よび処理待ちフラグ3を“1:処理待ち”に、パート
番号をパート番号PTNMに、ノート番号をノート番号NTNM
に、ノートステータスを“1”に、べロシティをベロシ
ティNTVLにそれぞれ設定する。また、メインアサイナ処
理中フラグMAEFを“1:メインアサイナ処理中”に設定
する。 〔B6〕 発音要求イベントを発生する。すなわち要求
先タスク番号NDTKを“3:発音タスク”に、要求先イベ
ント値NDETを“2”に設定してイベント発生モニタコー
ルを行う。 〔B7〕 対象アサイン順位TASNを“1”だけインクリ
メントしてステップB2に戻る。
[0085] The main assigner task (Fig. 14) main assigner task when assignment request event occurs, based on the assignment order be set in later-described Apulian Saina tasks, notes in a predetermined area of the musical tone-generating channel management map Write a number such as NTNM and generate a sounding request event. The processing in each of steps B1 to B7 is as follows. [B1] A tone generation channel management map is initialized, and variables and the like occupied by the main assigner task are set to initial values. Note that the tone generation channel management map
The key press order of each tone generation channel number in
Set to the generation channel number. Also, the N-th assigned order musical tone generation channel number MASS [N] (N is 0, 1,..., 1)
5) respectively correspond to “N (= 0, 1,... 15)”.
Set to. The target assignment order TASN is set to “0”, and the number GACH of assignable musical sound generation channels is set to the maximum number “16”. [B2] The request source event value NSET is set to "1" and an event wait monitor call is performed. When the assignment request event occurs, the process proceeds to the next step B3. [B3] task management map in the task number "2:
Set the wait event value of " Main Assigner Task" to "0",
If set to "0" to the first event occurrence flag. [B4] It is determined whether or not the target assignment rank TASN is less than the number of assignable musical tone generating channels GACN. If the number of assignable musical tone generating channels is not less than GACN, the process returns to step B2 because there are no more musical tone generating channels to be allocated. [B5] If it is determined that it is less than the value in step B4,
Assignment order TASN in the tone generation channel management map
Pending flag 1 of the musical tone-generating channel number corresponding to the musical tone-generating channel number MASS [TASN], a process waiting flag 2 and pending flag 3: "1 during processing wait", the part number in part number PTnM, notes Note Number NTNM Number
, The note status is set to “1”, and the velocity is set to velocity NTVL. In addition, the main assigner
Set the processing flag MAEF to “1: Main assigner processing”
I do. [B6] A sound generation request event is generated. That is, the request destination task number NDTK is set to "3: sounding task" and the request destination event value NDET is set to "2", and an event occurrence monitor call is performed. [B7] The target assignment order TASN is incremented by “1”, and the process returns to step B2.

【0086】発音タスク(図15、図16) 発音タスクは、発音要求イベントが発生すると新たな楽
音を発生する楽音発生チャネルにおいて前の発音が終了
していない場合には急速減衰の開始を指示する(第1処
理)。また、ノート番号NTNMなどに基づいて楽音発生に
関するパラメータを演算して設定する(第2処理)。発
音が終了していた、または、した場合には楽音発生チャ
ネルに新たな発音を指示する(第3処理)。各ステップ
C1〜C27での処理は以下の通りである。 〔C1〕 この発音タスクで占有する変数等を初期値に
設定するとともに、急速減衰を終了した楽音発生チャネ
ル番号を記憶する急速減衰終了FIFOをクリヤするな
どするとともに、楽音発生回路26を初期化する。ま
た、第3タスクタイマカウンタ値TCNE[3] と、第3タス
ク時間間隔TCND[3] とを“0”に設定するとともに、タ
スク管理マップにおけるタスク番号“3:発音タスク”
のタイマ処理要求フラグを“1:要求有り”に設定す
る。 〔C2〕 要求元イベント値NSETを“2”に設定してイ
ベント待ちモニタコールを行う。発音要求イベントが発
生すると、次のステップC3に進む。 〔C3〕 まず、タスク管理マップにおけるタスク番号
“3:発音タスク”の待ちイベント値を“0”に、第2
イベント発生フラグを“0”に設定して、次に発音処理
対象楽音発生チャネル番号GCTNを“0”に設定する。 〔C4〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1が“1:処理待ち中”で
あるか否かを判断する。この処理待ちフラグ1が“1”
である場合には次のステップC5に進み、“1”でなく
て第1処理(ステップC5〜C7)が不要である場合に
は、ステップC8に進む。 〔C5〕 エンベロープ管理マップにおける発音処理対
象楽音発生チャネル番号GCTNに対応するエンベロープチ
ャネル番号のエンベロープレベルが“0”であるか否か
を判断する。このエンベロープレベルが“0”でない場
合には次のステップC6に進み、“0”で急速減衰処理
が不要である場合には、ステップC7に進む。
The tone generation task (FIGS. 15 and 16) The tone generation task instructs the start of rapid decay if the previous tone generation is not completed in the tone generation channel for generating a new tone when a tone generation request event occurs. (First processing). Further, parameters relating to musical tone generation are calculated and set based on the note number NTNM or the like (second processing). If the sound generation has been completed or has been performed, a new sound generation is instructed to the tone generation channel (third processing). The processing in each of the steps C1 to C27 is as follows. [C1] The variables and the like occupied by the tone generation task are set to initial values, the rapid decay end FIFO for storing the tone generation channel number for which rapid decay has been completed is cleared, and the tone generation circuit 26 is initialized. . Further, the third task timer counter value TCNE [3] and the third task time interval TCND [3] are set to “0”, and the task number “3: sounding task” in the task management map is set.
Is set to "1: Requested". [C2] The request source event value NSET is set to “2” and an event wait monitor call is performed. When the sound generation request event occurs, the process proceeds to the next step C3. [C3] First, the wait event value of the task number “3: sounding task” in the task management map is set to “0”, and the second
The event generation flag is set to “0”, and then the tone generation channel number GCTN to be processed is set to “0”. [C4] It is determined whether or not the processing waiting flag 1 of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map is "1: waiting for processing". This processing waiting flag 1 is "1"
If it is, the process proceeds to the next step C5, and if it is not "1" and the first process (steps C5 to C7) is unnecessary, the process proceeds to step C8. [C5] It is determined whether or not the envelope level of the envelope channel number corresponding to the tone generation channel number GCTN to be processed in the envelope management map is “0”. If the envelope level is not "0", the process proceeds to the next step C6. If the envelope level is "0" and rapid decay processing is not required, the process proceeds to step C7.

【0087】〔C6〕 楽音発生チャネル管理マップに
おける発音処理対象楽音発生チャネル番号GCTNに対応す
る楽音発生チャネル番号の急速減衰中フラグを“1:急
速減衰中”に、発音量を急速減衰中を示す“FFFF
H" に設定するとともに、対応する楽音発生チャネルに
急速減衰の開始を指示する。なお、急速減衰の指示に際
しては目標値を“0”に、レートを急速減衰用のレート
に設定して対応する楽音発生チャネルに転送する。 〔C7〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1を0”に設定する。 〔C8〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この楽音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
には次のステップC9に進み、“15”未満でなくて全
ての楽音発生チャネルについて第1処理を終えている場
合には、ステップC10に進む。 〔C9〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントし、次の楽音発生チャネルの
処理の準備をしてステップC4に戻る。 〔C10〕 発音処理対象楽音発生チャネル番号GCTNを
“0”に設定する。 〔C11〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の処理待ちフラグ2が“1:処理待ち中”
であるか否かを判断する。この処理待ちフラグ2が
“1”である場合には次のステップC12に進み、
“1”でなくて第2処理(ステップC12)が不要であ
る場合には、ステップC13に進む。
[C6] The flag of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map is set to “1: Rapid decay”, indicating that the sound generation amount is being rapidly decayed. “FFFF
H ", and instructs the corresponding tone generation channel to start rapid decay. When the rapid decay is instructed, the target value is set to" 0 "and the rate is set to the rate for rapid decay. [C7] Set the processing waiting flag 1 of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map to 0.” [C8] Target to be processed It is determined whether or not the tone generation channel number GCTN is less than “15.” If the tone processing target tone generation channel number GCTN is less than “15”, the process proceeds to the next step C9, and if it is less than “15”. If the first process has not been completed for all the tone generating channels, the process proceeds to step C10. And prepares for the processing of the next tone generation channel, and returns to step C4. [C10] Set the tone generation channel number GCTN to be processed to “0”. [C11] In the tone generation channel management map The processing wait flag 2 of the tone generation channel number corresponding to the tone processing target tone generation channel number GCTN is "1: waiting for processing"
Is determined. When the processing waiting flag 2 is "1", the process proceeds to the next Step C12,
If the value is not “1” and the second process (step C12) is unnecessary, the process proceeds to step C13.

【0088】〔C12〕 発音処理対象楽音発生チャネ
ル番号GCTNに対応する楽音発生チャネルの、楽音発生と
楽音のエンベロープ生成とに関する各種パラメータの値
を、楽音発生チャネル管理マップにおける発音処理対象
楽音発生チャネル番号GCTNに対応する楽音発生チャネル
番号のノート番号、ベロシティおよびその楽音発生チャ
ネル番号のパート番号に対応するパートマップにおける
パート番号の音色番号に対応するROM23に音色番号
に対応して記憶されている音色パラメータ群より演算し
て、これら演算された各種パラメータの値を、楽音発生
チャネル管理マップにおける発音処理対象楽音発生チャ
ネル番号GCTNに対応する楽音発生チャネル番号の楽音発
生パラメータ群およびエンベロープ管理マップにおける
発音処理対象楽音発生チャネル番号GCTNに対応するエン
ベロープチャネル番号のエンベロープ生成パラメータ群
の対応するパラメータに設定する。これとともに、処理
待ちフラグ2を0”に設定する。またエンベロープ管
理マップにおける発音処理対象楽音発生チャネル番号GC
TNに対応するエンベロープチャネル番号のトランケート
禁止フェーズ番号をパートマップにおける前記パート番
号のトランケート禁止フェーズ番号に設定する。また、
楽音発生チャネル管理マップにおける発音処理対象楽音
発生チャネル番号GCTNに対応する楽音発生チャネル番号
の押鍵順位以上の押鍵順位を次のように更新する。発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の押鍵順位より大きな押鍵順位を“1”だ
けデクリメントするとともに、発音処理対象楽音発生チ
ャネル番号GCTNに対応する楽音発生チャネル番号の押鍵
順位を“15”に設定する。例えば、押鍵順位が“5”
の楽音発生チャネルに新たな楽音を割り当てると、押鍵
順位が“6”〜“15”の楽音発生チャネルの押鍵順位
は“5”〜“14”に設定され、新たな楽音が割り当て
られた楽音発生チャネルの押鍵順位は“15”に設定さ
れる。 〔C13〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この発音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
にはつぎのステップC14に進み、“15”未満でない
場合には、ステップC15に進む。〔C14〕 発音処
理対象楽音発生チャネル番号GCTNを“1”だけインクリ
メントし、ステップC11に戻る。 〔C15〕 急速減衰未了フラグTDNFを“0”に、発音
処理対象楽音発生チャネル番号GCTNを“0”に設定す
る。
[C12] Tone generation target tone generation channel number The values of various parameters related to tone generation and tone envelope generation of the tone generation channel corresponding to the GCTN are stored in the tone generation channel management map in the tone generation channel management map. Note number and velocity of the tone generation channel number corresponding to GCTN, and tone parameters stored in the ROM 23 corresponding to the tone number of the part number in the part map corresponding to the part number of the tone generation channel number corresponding to the tone number From the group, the values of these calculated parameters are applied to the tone generation channel management map in the tone generation channel management map. The tone generation parameter group of the tone generation channel number corresponding to the tone generation channel number GCTN and the tone generation target in the envelope management map Tone generator It is set to the corresponding parameter of the envelope generation parameter group of the envelope channel number corresponding to the channel number GCTN. At the same time, the process waiting flag 2 is set to 0”. In addition, the tone generation channel number GC for sound processing in the envelope management map
The truncation prohibition phase number of the envelope channel number corresponding to TN is set to the truncation prohibition phase number of the part number in the part map. Also,
The key pressing order higher than the key pressing order of the tone generating channel number corresponding to the tone generation channel number GCTN to be processed in the tone generating channel management map is updated as follows. The key press order larger than the key press order of the tone generating channel number corresponding to the tone processing target tone generating channel number GCTN is decremented by “1”, and the tone generating channel number corresponding to the tone processing target tone generating channel number GCTN is depressed. The key order is set to “15”. For example, the key pressing order is “5”
When a new tone is assigned to the tone generation channel of No. 6, the key press order of the tone generation channels with the key press order of “6” to “15” is set to “5” to “14”, and the new tone is assigned. The key pressing order of the tone generation channel is set to “15”. [C13] It is determined whether or not the tone generation channel number GCTN to be processed is less than “15”. If the tone generation channel number GCTN to be processed is less than "15", the flow proceeds to the next step C14, and if not, the flow proceeds to step C15. [C14] The tone generation channel number GCTN to be processed is incremented by "1", and the process returns to step C11. [C15] The rapid decay incompletion flag TDNF is set to "0" and sounded
The processing target tone generation channel number GCTN is set to “0”.

【0089】〔C16〕 楽音発生チャネル管理マップ
における発音処理対象楽音発生チャネル番号GCTNに対応
する楽音発生チャネル番号の処理待ちフラグ3が“1:
処理待ち中”であるか否かを判断する。この処理待ちフ
ラグ3が“1”である場合には次のステップC17に進
み、“1”でなくて第3処理(ステップC17,C1
8,C21)が不要である場合には、ステップC19に
進む。 〔C17〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の急速減衰中フラグが“1:急速減衰中”
であるか否かを判断する。この急速減衰中フラグが
“1”でない場合には次のステップC18に進み、
“1”である場合には、割り当てるべき楽音発生チャネ
ルにおける従前に割り当てられていた楽音の発音がいま
だ終了していないために、ステップC21に進む。 〔C18〕 エンベロープ管理マップにおける発音処理
対象楽音発生チャネル番号GCTNに対応するエンベロープ
チャネル番号のエンベロープ生成パラメータ群に基づい
て第1フェーズの目標値、レートおよび補正量を演算し
てその値にエンベロープ管理マップの目標値、レートお
よび補正量を設定するとともに、フェーズ番号を“1”
に、エンベロープレベルを“0”に設定する。なお、補
正量の最大値は“7FFFH”、最小値は持続音系の楽
音の場合“6000H”、減衰音系の楽音の場合“50
00H”とする。 また、楽音発生チャネル管理マップにおける発音処理対
象楽音発生チャネル番号GCTNに対応する楽音発生チャネ
ル番号の発音量を、エンベロープ生成パラメータ群に含
まれるアタックレベルの上位15ビットに“8000
H”を加えた値に、トランケート禁止フラグを“1:ト
ランケート禁止”にそれぞれ設定する。また、楽音発生
チャネル管理マップにおける発音処理対象楽音発生チャ
ネル番号GCTNに対応する楽音発生チャネル番号の楽音発
生パラメータ群とエンベロープ管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応するエンベロ
ープチャネル番号の目標値およびレートを、楽音発生回
路26における発音処理対象楽音発生チャネル番号GCTN
に対応する楽音発生チャネルに転送する。また処理待ち
フラグ3を“0”に設定するとともに、対応する楽音発
生チャネルに楽音発生の開始を指示する。 〔C19〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この発音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
には次のステップC20に進み、“15”未満でない場
合には、ステップC22に進む。 〔C20〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントして、ステップC16に戻
る。
[C16] The processing waiting flag 3 of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map is set to "1:
It is determined whether or not the status is “waiting for processing.” If the processing waiting flag 3 is “1”, the process proceeds to the next step C17, and the third process (steps C17 and C1)
If (8, C21) is unnecessary, the process proceeds to step C19. [C17] The rapid decay flag of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map is “1: rapid decay”.
Is determined. If the rapid decay flag is not "1", the process proceeds to the next step C18,
If it is "1", the process proceeds to step C21 because the sounding of the previously assigned tone in the tone generating channel to be assigned has not been completed yet. [C18] A target value, a rate, and a correction amount of the first phase are calculated based on the envelope generation parameter group of the envelope channel number corresponding to the tone generation channel number GCTN to be processed in the envelope management map, and the envelope management map is calculated. Set the target value, rate, and correction amount of, and set the phase number to "1".
, The envelope level is set to “0”. Note that the maximum value of the correction amount is “7FFFH”, the minimum value is “6000H” for a sustained tone, and “50” for an attenuated tone.
In addition, the sound generation amount of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map is set to “8000” in the upper 15 bits of the attack level included in the envelope generation parameter group.
In addition, the truncation prohibition flag is set to “1: truncation prohibition” to the value obtained by adding “H.” Also, the tone generation parameter of the tone generation channel number corresponding to the tone generation channel number GCTN to be processed in the tone generation channel management map. The target value and rate of the envelope channel number corresponding to the tone generation channel number GCTN to be processed in the group and the envelope management map are set in the tone generation circuit 26 by the tone generation channel number GCTN to be processed.
To the tone generation channel corresponding to. In addition, the process waiting flag 3 is set to "0", and the start of musical sound generation is instructed to the corresponding musical sound generation channel. [C19] It is determined whether or not the tone generation channel number GCTN to be processed is less than “15”. If the tone generation channel number GCTN to be processed is less than "15", the flow proceeds to the next step C20, and if not, the flow proceeds to step C22. [C20] The tone generation channel number GCTN to be processed is incremented by "1", and the process returns to step C16.

【0100】〔C21〕 急速減衰未了フラグTDNFを
“1:未了”に設定してステップC19に進む。 〔C22〕 急速減衰未了フラグTDNFが“1:未了”で
あるか否かを判断する。この急速減衰未了フラグTDNFが
“1”である場合には次のステップC23に進み、
“1”でなく全ての発音処理が終了している場合にはス
テップC2に戻る。 〔C23〕 要求元イベント値NSETを“3”に設定して
イベント待ちモニタコールを行う。発音要求イベントま
たは発音タスクに対するタイマイベントのいずれかが発
生すると、次のステップC24に進む。 〔C24〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第2イベント発生フラグが“1”
であるか否かを判断する。その第2イベント発生フラグ
が“1”でない場合には次のステップC25に進み、
“1”である場合には、発音要求イベントの発生である
ためにステップC3に戻る。 〔C25〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第1イベント発生フラグが“1”
であるタイマイベントの発生であるために、タスク管理
マップにおけるタスク番号“3:発音タスク”の待ちイ
ベント値を“0”に、第1イベント発生フラグを“0”
に設定する。 〔C26〕 楽音発生回路26に設けられている急速減
衰終了FIFOが空であるか否かを判断する。この急速
減衰終了FIFOが空である場合にはステップC23に
戻り、空でない場合には次のステップC27に進む。 〔C27〕 急速減衰終了FIFOから急速減衰処理に
よりエンベロープレベルが“0”になった楽音発生チャ
ネルの楽音発生チャネル番号を順次に降ろし、降ろした
楽音発生チャネル番号に対応する楽音発生チャネル管理
マップにおける楽音発生チャネル番号の急速減衰中フラ
グを“0”に設定する。そして、ステップC15に戻
る。
[C21] The rapid decay non-completion flag TDNF is set to “1: non-completion”, and the flow advances to step C19. [C22] It is determined whether or not the rapid decay non-completion flag TDNF is "1: non-completion". If the rapid decay non-completion flag TDNF is "1", the process proceeds to the next step C23,
If not all “1” but all the tone generation processes are completed, the process returns to step C2. [C23] The request source event value NSET is set to "3" and an event wait monitor call is performed. When either a sounding request event or a timer event for the sounding task occurs, the process proceeds to the next step C24. [C24] The second event occurrence flag of the task number “3: sounding task” in the task management map is “1”
Is determined. If the second event occurrence flag is not "1", the process proceeds to the next step C25,
If "1", the process returns to step C3 because a sound generation request event has occurred. [C25] The first event occurrence flag of the task number “3: sounding task” in the task management map is “1”
For the occurrence of a timer event is, the task number in task management map: wait event value of "3 pronunciation task""0", the first event occurrence flag "0"
Set to. [C26] It is determined whether or not the quick decay end FIFO provided in the tone generator 26 is empty. If the quick decay end FIFO is empty, the flow returns to step C23, and if not, the flow proceeds to the next step C27. [C27] The tone generation channel numbers of the tone generation channels whose envelope levels have become “0” by the rapid attenuation process from the rapid decay end FIFO are sequentially lowered, and the tone in the tone generation channel management map corresponding to the lowered tone generation channel number. The flag of the occurring channel number during rapid decay is set to “0”. Then, the process returns to step C15.

【0101】プリアサイナタスク(図17) プリアサイナタスクは、プリアサイナタスクに対するタ
イマイベントが発生すると実行を開始し、発音量に基づ
いてアサイン順位を更新する。各ステップD1〜D11
での処理は以下の通りである。 〔D1〕 このプリアサイナタスクで占有する変数等を
初期値に設定する。また、第4タスクタイマカウンタ値
TCNE[4] を“5”に、第4タスク時間間隔TCND[4] を
“4”に設定する。さらに、タスク管理マップにおける
タスク番号“4:プリアサイナタスク”のタイマ処理要
求フラグを“1:要求有り”に設定する。第Nプリアサ
イン順位楽音発生チャネル番号PASS[N] を対応する“N
(=0、1・・・15)”に設定する。 〔D2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。プリアサイナタスクに
対するタイマイベントが発生すると、次のステップD3
に進む。 〔D3〕 タスク管理マップにおけるタスク番号“4:
プリアサイナタスク”の待ちイベント値を“0”に、第
1イベント発生フラグを“0”に設定する。 〔D4〕 メインアサイナ処理中フラグMAEFを“0”に
設定する。 〔D5〕 発音タスクのステップC6,C18で設定さ
れ後述するエンベロープタスクのステップE19、E2
6において更新されるところの楽音発生チャネル管理マ
ップの各楽音発生チャネル番号の発音量を、それぞれ対
応する楽音発生チャネル番号GNのプリアサイナ発音量PL
EV[GN]とする。また楽音発生チャネル管理マップにおけ
る各楽音発生チャネル番号の急速減衰中フラグをそれぞ
れ対応する楽音発生チャネル番号GNのプリアサイナ急速
減衰中フラグPACT[GN]とし、トランケ−ト禁止フラグを
それぞれ対応する楽音発生チャネル番号GNのプリアサイ
ナトランケ−ト禁止フラグPAIT[GN]とし、ノ−トステ−
タスをそれぞれ対応する楽音発生チャネル番号GNのプリ
アサイナノ−トステ−タスPAST[GN]とし、押鍵順位をそ
れぞれ対応する楽音発生チャネル番号GNのプリアサイナ
押鍵順位PAPN[GN]とする。またパートマップにおける各
パート番号のリザーブ数を対応するプリアサイナパート
番号PPTNのプリアイサナリザーブ数PTRN[PPTN]とする。 〔D6〕 プリアサイン順位の設定を行う。この処理の
内容は図18のフローチャートを参照して後に詳しく説
明する。 〔D7〕 タスクロックをかける。すなわち、MIDI
回路20、タイマ回路25からの割込みを禁止する。タ
スクロックが解除されるまで他のタスクの実行は禁止さ
れ、本タスクの実行の継続は保証される。 〔D8〕 メインアサイナ処理中フラグMAEFが“0:非
処理中”であるか否かを判断する。このメインアサイナ
処理中フラグMAEFが“0”である場合にはステップD1
0に進む。 〔D9〕 ステップD8の判断においてメインアサイナ
処理中フラグMAEFが“0”でない場合、すなわちステッ
プD5、D6の処理中にMIDIバスを介して受信した
ノートオンメッセージに基づくMIDI回路20からの
割込みにより生起した一連の処理によりメインアサイナ
タスクが実行されると、楽音発生チャネルの発音態様が
ステップD5の開始時と異なっているので、タスクロッ
クを解除して再設定をすべくステップD4に戻る。 〔D10〕 まず、第Nプリアサイン順位楽音発生チャ
ネル番号PASS[N] をそれぞれ対応する第Nアサイン順位
楽音発生チャネル番号MASS[N] とするとともに、対象ア
サイン順位TASNを“0”に設定する。次にプリアサイナ
リザーブオーバ楽音発生チャネル総数PRCNを割当て可能
楽音発生チャネル数GACNとする。 〔D11 〕 タスクロックを解除してステップD2に戻
る。なお、タスクロック中に発生した割込みは、タスク
ロック解除後に実行される。
Pre-Assigner Task (FIG. 17) The pre-assigner task starts executing when a timer event for the pre-assigner task occurs, and updates the assignment order based on the sound generation amount. Each step D1 to D11
Is as follows. [D1] The variables and the like occupied by the pre-assigner task are set to initial values. Also, the fourth task timer counter value
TCNE [4] is set to “5”, and the fourth task time interval TCND [4] is set to “4”. Further, the timer processing request flag of the task number “4: pre-assigner task” in the task management map is set to “1: requested”. The Nth pre-assigned order tone generation channel number PASS [N]
(= 0, 1,... 15) ". [D2] The request source event value NSET is set to" 1 "and an event wait monitor call is performed. When a timer event for the pre-assigner task occurs, the following occurs. Step D3
Proceed to. [D3] Task number “4: in the task management map”
Set the wait event value of the " pre-assigner task" to "0".
1 Set the event occurrence flag to “0”. [D4] The main assigner processing flag MAEF is set to "0". [D5] Steps E19 and E2 of the envelope task which are set in steps C6 and C18 of the sound generation task and described later.
6, the tone generation amount of each tone generation channel number of the tone generation channel management map is updated by the pre-assigner tone generation amount PL of the corresponding tone generation channel number GN.
EV [GN]. Also, the rapid decay flag of each tone generation channel number in the tone generation channel management map is set to the corresponding pre-assigner rapid decay flag PACT [GN] of the corresponding tone generation channel number GN, and the truncation inhibition flag is set to the corresponding tone generation channel. The pre-assigner truncation prohibition flag PAIT [GN] of the number GN is set, and the note state is set.
Let the status be the pre-assignment status PAST [GN] of the corresponding tone generation channel number GN, and the key press order be the pre-assigner key press order PAPN [GN] of the corresponding tone generation channel number GN. The reserve number of each part number in the part map is defined as the pre-isana reserve number PTRN [PPTN] of the corresponding pre-assigner part number PPTN. [D6] The pre-assignment order is set. The contents of this processing will be described later in detail with reference to the flowchart of FIG. [D7] Lock the task. That is, MIDI
The interrupt from the circuit 20 and the timer circuit 25 is prohibited. Until the task lock is released, execution of other tasks is prohibited, and continuation of execution of this task is guaranteed. [D8] It is determined whether or not the main assigner processing in-progress flag MAEF is "0: non-processing". If the main assigner processing flag MAEF is "0", the process proceeds to step D1.
Go to 0. [D9] If the main assigner processing flag MAEF is not "0" in the determination of step D8, that is, an interrupt from the MIDI circuit 20 based on a note-on message received via the MIDI bus during the processing of steps D5 and D6 has occurred. When the main assigner task is executed by a series of processes, since the tone generation mode of the musical tone generation channel is different from that at the start of step D5, the process returns to step D4 to release the task lock and reset. [D10] First, the N-th pre-assigned order tone generating channel number PASS [N] is set to the corresponding N-th assigned order tone generating channel number MASS [N], and the target assignment order TASN is set to “0”. Next, the total number PRCN of preassigned reserved over tone generating channels is set as the assignable number of tone generating channels GACN. [D11] Release the task lock and return to step D2. Note that an interrupt generated during the task lock is executed after the task lock is released.

【0102】プリアサイン順位設定ルーチン(図18) ステップD6におけるプリアサイン順位設定ルーチンを
図18を参照して以下に説明する。このルーチンにおい
ては、プリアサイン順位を最後位から急速減衰中、
アタック中、押鍵リザーブ中、その他の順に設定
し、かつ〜においては押鍵の新しい順に、におい
てはプリアサイナ発音量の大なる順に設定する。ステッ
プD601〜D606においてノートオン受信順に急速
減衰中の楽音発生チャネルの楽音発生チャネル番号を第
Nプリアサイン順位楽音発生チャネル番号PASS[N] に設
定する。 〔D601〕 プリアサイン順位番号Nおよび処理対象
押鍵順位PNを“15”にするとともに、全てのプリアサ
イナパート番号PPTNのリザーブ処理数PTRC[PPTN]を
“1”にする。 〔D602〕 処理対象押鍵順位PNが“0”を超えてい
るか否かを判断する。“0”を超えていない場合にはス
テップD607に進む。 〔D603〕 処理対象押鍵順位PNと同じ楽音発生チャ
ネル番号GNのプリアサイナ押鍵順位PAPN[GN]の楽音発生
チャネル番号を楽音発生チャネル番号GNとするととも
に、楽音発生チャネル管理マップにおける楽音発生チャ
ネル番号GNに対応する楽音発生チャネル番号のパート番
号をプリアサイナパート番号PPTNとする。 〔D604〕 楽音発生チャネル番号GNのプリアサイナ
急速減衰中フラグPACT[GN]が“1”であるか否かを判断
する。“1”でない場合にはステップD606に進む。 〔D605〕 プリアサイン順位Nの第Nプリアサイン
順位楽音発生チャネル番号PASS[N] と楽音発生チャネル
番号GNに対応する第Nプリアサイン順位 楽音発生チャ
ネル番号PASS[N] とを入れ替える。例えばNが“15”
のPASS[N](PASS[15])が“11”で、PNが“15”のGN
が“9”で、PASS[N] が“9”であるNが“8”すなわ
ち、PASS[8] が“9" である場合には、PASS[15]を
“9”に、PASS[8] を“11”にする。したがって 、
プリアサイン順位Nが“15”の楽音発生チャネル番号
は“9”となる。さらに、プリアサイン順位番号Nを
“1”だけデクリメントするとともに、プリアサイナパ
ート番号PPTNのリザーブ処理数PTRC[PPTN]を“1”だけ
インクリメントする。
Preassignment Order Setting Routine (FIG. 18) The preassignment order setting routine in step D6 will be described below with reference to FIG. In this routine, the pre-assignment order is rapidly decayed from the last place,
During an attack, during a key press reserve, and the like, the order is set in the other order, and is set in a new order of the key press, and is set in an order of increasing the pre-assigner sounding amount in the case of. In steps D601 to D606, the tone generation channel number of the tone generation channel that is rapidly attenuating in the order of note-on reception is set to the Nth preassigned priority tone generation channel number PASS [N]. [D601] The pre-assignment order number N and the key depression order PN to be processed are set to “15”, and the reserve processing numbers PTRC [PPTN] of all pre-assigner part numbers PPTN are set to “1”. [D602] It is determined whether or not the key depression order PN to be processed exceeds “0”. If it does not exceed “0”, the process proceeds to step D607. [D603] The tone generation channel number of the pre-assigner key depression order PAPN [GN] of the same tone generation channel number GN as the key depression order PN to be processed is set as the tone generation channel number GN, and the tone generation channel number in the tone generation channel management map. The part number of the tone generation channel number corresponding to GN is defined as a preassigner part number PPTN. [D604] It is determined whether or not the pre-assigner rapid decay flag PACT [GN] of the tone generation channel number GN is "1". If not “1”, the process proceeds to step D606. [D605] The Nth preassigned order tone generation channel number PASS [N] of the preassigned order N is replaced with the Nth preassigned order tone generation channel number PASS [N] corresponding to the tone generation channel number GN. For example, N is "15"
GN with PASS [N] (PASS [15]) of “11” and PN of “15”
Is "9" and PASS [N] is "9", N is "8", that is, if PASS [8] is "9", PASS [15] is changed to "9" and PASS [8 ] To “11”. Therefore,
The tone generation channel number for the pre-assignment order N of “15” is “9”. Further, the pre-assignment order number N is decremented by “1”, and the reserved processing number PTRC [PPTN] of the pre-assigner part number PPTN is incremented by “1”.

【0103】〔D606〕 処理対象押鍵順位PNを
“1”だけデクリメントし、ステップD602に戻る。
ステップD607〜D613においてノートオン受信順
にアタック中の楽音発生チャネルの楽音発生チャネル番
号を第Nプリアサイン順位楽音発生チャネル番号PASS
[N] に設定する。 〔D607〕 処理対象押鍵順位PNを“15”にする。 〔D608〕 プリアサイン順位Nが“0”を超えてい
るか否かを判断する。“0”を超えていない場合にはス
テップD622に進む。 〔D609、D610〕 ステップD602、D603
と同様の処理をする。 〔D611〕 楽音発生チャネル番号GNのプリアサイナ
トランケート禁止フラグPAIT[GN]が“1”であるかを否
かを判断する。“1”でない場合にはステップD613
に進む。 〔D612、D613〕 ステップD605、D606
と同様の処理をする。ステップD614〜D621にお
いて押鍵リザーブ数までノートオン受信順にノートステ
ータスが“1”の楽音発生チャネルの楽音発生チャネル
番号を第Nプリアサイン順位楽音発生チャネル番号PASS
[N] に設定する。 〔D614〕 処理対象押鍵順位PNを“15”にする。 〔D615〕 プリアサイン順位Nが“0”未満か否か
を判断する。“0”未満である場合にはステップD62
2に進む。 〔D616、D617〕 ステップD602、D603
と同様の処理をする。 〔D618〕 楽音発生チャネル番号GNのプリアサイナ
急速減衰中フラグPACT[GN]および楽音発生チャネル番号
GNのプリアサイナトランケート禁止フラグPAIT[GN]がと
もに“1”でなくかつ楽音発生チャネル番号GNのプリア
サイナノートステータスPAST[GN]が“1”であるか否か
を判断する。PACT[GN]またはPAIT[GN]のいずれかが
“1”である場合またはPAST[GN]が“1”でない場合に
はステップD621に進む。 〔D619〕 プリアサイナパート番号PPTNのリザーブ
処理数PTRC[PPTN]がプリアサイナパート番号PPTNのリザ
ーブ数PTRN[PPTN]を超えているか否かを判断する。超え
ている場合にはステップD621に進む。 〔D620、D621〕 ステップD605、D606
と同様の処理をする。 〔D622〕 プリアサイン順位Nが“0”からNまで
の第Nプリアサイン順位楽音発生チャネル番号PASS[N]
を対応する楽音発生チャネル番号GNのプリアサイナ発音
量PLEV[GN]の小なる順に並べ換える。例えばPASS[0] =
1、PASS[1] =3、PASS[2] =5、・・・、PLEV[1] =
0080H、PLEV[3] =0040H、PLEV[5] =000
0H、・・・であってN=3である場合には、PASS[0]
=5、PASS[1] =3、PASS[2] =1とする。またプリア
サイナリザーブオーバ楽音発生チャネル総数PRCNをN+
1に設定する。処理を終了すると、このプリアサイン順
位設定ルーチンを終了してステップD7に進む。
[D606] The key depression order PN to be processed is decremented by "1", and the flow returns to step D602.
In steps D607 to D613, the tone generation channel number of the tone generation channel being attacked in the order of note-on reception is set to the Nth pre-assigned priority tone generation channel number PASS.
Set to [N]. [D607] The key depression order PN to be processed is set to “15”. [D608] It is determined whether the pre-assignment order N exceeds “0”. If it does not exceed “0”, the process proceeds to step D622. [D609, D610] Steps D602, D603
The same process as is performed. [D611] It is determined whether or not the pre-assigner truncation prohibition flag PAIT [GN] of the tone generation channel number GN is “1”. If not "1", step D613
Proceed to. [D612, D613] Steps D605, D606
The same process as is performed. In steps D614 to D621, the tone generation channel number of the tone generation channel whose note status is "1" is set to the Nth pre-assigned priority tone generation channel number PASS in the order of note-on reception up to the key depression reserve number.
Set to [N]. [D614] The key depression order PN to be processed is set to “15”. [D615] It is determined whether the pre-assignment order N is less than "0". If less than "0", step D62
Proceed to 2. [D616, D617] Steps D602, D603
The same process as is performed. [D618] Pre-assigner rapid decay flag PACT [GN] of tone generation channel number GN and tone generation channel number
It is determined whether the preassigner truncation prohibition flag PAIT [GN] of GN is not both “1” and the preassigner note status PAST [GN] of the musical tone generation channel number GN is “1”. If either PACT [GN] or PAIT [GN] is “1” or if PAST [GN] is not “1”, the process proceeds to step D621. [D619] It is determined whether or not the reserved number PTRC [PPTN] of the pre-assigner part number PPTN exceeds the reserved number PTRN [PPTN] of the pre-assigner part number PPTN. If it exceeds, the process proceeds to Step D621. [D620, D621] Steps D605, D606
The same process as is performed. [D622] Nth preassigned order tone generation channel number PASS [N] in which preassigned order N is from “0” to N
Are rearranged in ascending order of the pre-assigner sound volume PLEV [GN] of the corresponding tone generation channel number GN. For example, PA SS [0] =
1, PA SS [1] = 3, PA SS [2] = 5, ..., PLEV [1] =
0080H, PLEV [3] = 0040H, PLEV [5] = 000
0H,... And N = 3, PA SS [0]
= 5, PA SS [1] = 3, and PA SS [2] = 1. Also, the total number PRCN of pre-assigned reserved over tone generation channels is set to N +.
Set to 1. When the processing ends, the pre-assignment order setting routine ends, and the routine proceeds to step D7.

【0104】エンベロープタスク(図19、図20) エンベロープタスクは、エンベロープタスクに対するタ
イマイベントが発生すると実行を開始し、各エンベロー
プチャネルのエンベロープレベルおよび発音量を順次に
更新するとともに、ノートステータス、ソステヌートス
テータス、ダンパーフラグおよびエンベロープ生成パラ
メータに基づいて新たな目標値およびレートを算出し、
楽音発生回路26の楽音発生チャネルへの転送を行う。
各ステップE1〜E28での処理は以下の通りである。 〔E1〕 エンベロープ管理マップをクリヤし、このエ
ンベロープタスクで占有する変数等を初期値に設定する
とともに、第5タスクタイマカウンタ値TCNE[5] を
“4”に、第5タスク時間間隔TCND[5] を“4”に設定
する。さらにタスク管理マップにおけるタスク番号
“5:エンベロープタスク”のタイマ処理要求フラグを
“1:要求有り”に設定する。 〔E2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。エンベロープタスクタ
イマイベントが発生すると、次のステップE3に進む。 〔E3〕 タスク管理マップにおけるタスク番号“5:
エンベロープタスク”の待ちイベント値を“0”に、第
1イベント発生フラグを“0”に設定するとともに、エ
ンベロープ処理対象番号ECTNを“0”に設定する。 〔E4〕スクロックをかける。 〔E5〕 楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号の急速減衰中フラグが“1:急速減衰中”であるか否
かを判断する。この急速減衰中フラグが“1”でない場
合には次のステップE6に進み、“1”である場合には
このエンベロープタスクによるエンベロープ処理は不要
なのでステップE10に進む。 〔E6〕 楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号のパート番号をエンベロープ処理対象パート番号EPNM
とする。
Envelope Task (FIGS. 19 and 20) The envelope task starts executing when a timer event for the envelope task occurs, sequentially updates the envelope level and sound volume of each envelope channel, and simultaneously executes the note status and sostenuto status. , Calculate a new target value and rate based on the damper flag and the envelope generation parameters,
The transfer to the tone generating channel of the tone generating circuit 26 is performed.
The processing in each of steps E1 to E28 is as follows. [E1] The envelope management map is cleared, variables and the like occupied by the envelope task are set to initial values, the fifth task timer counter value TCNE [5] is set to "4", and the fifth task time interval TCND [5 ] To “4”. Further, the timer processing request flag of the task number “5: Envelope task” in the task management map is set to “1: Requested”. [E2] The request source event value NSET is set to "1" and an event wait monitor call is performed. When the envelope task timer event occurs, the process proceeds to the next step E3. [E3] Task number “5: in the task management map”
Set the wait event value of the “ envelope task” to “0”,
The 1-event occurrence flag is set to “0”, and the envelope processing target number ECTN is set to “0”. [E4] multiplying the data scan clock. [E5] It is determined whether or not the rapid decay flag of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is "1: rapid decay". If the flag during rapid decay is not "1", the process proceeds to the next step E6. If the flag is "1", the process proceeds to step E10 because the envelope processing by the envelope task is unnecessary. [E6] The part number of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is set to the envelope processing target part number EPNM.
And

【0105】〔E7〕 パートマップにおけるエンベロ
ープ処理対象パート番号EPNMの持続音系フラグが“1”
であるか否かを判断する。この持続音系フラグが“1”
でない場合には次のステップE8に進み、“1”である
場合にはステップE9に進む。 〔E8〕 エンベロープ管理マップにおけるエンベロー
プ処理対象番号ECTNに対応するエンベロープチャネル番
号の目標値が“0”であり、かつそのエンベロープレベ
ルが“0”であるか否かを判断する。この目標値が
“0”でかつエンベロープレベルが“0”である場合に
は発音を終了しているので楽音発生チャネル管理マップ
におけるエンベロープ処理対象番号ECTNに対応する楽音
発生チャネル番号の発音量を“0”に、トランケート禁
止フラグを“0”に設定し、ステップE10に進み、い
ずれかが“0”でない場合にはステップE13に進む。 〔E9〕 楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号のノートステータスが“1”でなくかつエンベロープ
管理マップにおけるエンベロープ処理対象番号ECTNに対
応するエンベロープチャネル番号の目標値が“0”でか
つエンベロープレベルが“0”であるか否かを判断す
る。このノートステータスが“1”でなくかつ目標値が
“0”でかつエンベロープレベルが“0”である場合に
は発音を終了しているので楽音発生チャネル管理マップ
におけるエンベロープ処理対象番号ECTNに対応する楽音
発生チャネル番号の発音量を“0”に、トランケート禁
止フラグを“0”に設定し、ステップE10に進み、ノ
ートステータスが“1”でないまたは目標値が“0”で
ないまたはエンベロープレベルが“0”でない場合には
ステップE21に進む。 〔E10〕 タスクロックを解除する。 〔E11〕 エンベロープ処理対象番号ECTNが“15”
未満であるか否かを判断する。このエンベロープ処理対
象番号ECTNが“15”未満である場合には次のステップ
E12に進み、“15”未満でない場合には、ステップ
E2に戻る。 〔E12〕 エンベロープ処理対象番号ECTNを“1”だ
けインクリメントしてステップE4に戻る。 〔E13〕 エンベロープ管理マップにおけるエンベロ
ープ処理対象番号ECTNに対応するエンベロープチャネル
番号のエンベロープレベルとレートとを加算して新たな
エンベロープレベルおよびエンベロープレベルELENと
し、フェーズ番号を“1”だけインクリメントするとと
もに、楽音発生チャネル管理マップにおけるエンベロー
プ処理対象番号ECTNに対応する楽音発生チャネル番号の
ノート番号を読み出してエンベロープ処理対象ノート番
号ENNMとする。 〔E14〕 楽音発生チャネル管理マップにおけるエン
ベロープ処理対象番号ECTNに対応する楽音発生チャネル
番号のノートステータスが“1:ノートオン”であるか
否かを判断する。このノートステータスが“1”でない
場合には次のステップE15に進み、“1”である場合
にはステップE17に進む。
[E7] The sustain tone flag of the part number EPNM to be subjected to envelope processing in the part map is “1”.
Is determined. This sustain sound flag is "1"
If not, the process proceeds to the next step E8, and if "1", the process proceeds to step E9. [E8] It is determined whether the target value of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is “0” and the envelope level is “0”. If this target value is "0" and the envelope level is "0", the tone generation has ended, and the tone generation channel management map
Tones corresponding to envelope processing target number ECTN
Set the sound volume of the generated channel number to "0" and prohibit truncation.
The stop flag is set to "0", and the process proceeds to step E10. If any one is not "0", the process proceeds to step E13. [E9] The note status of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is not “1”, and the target value of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is It is determined whether or not the envelope level is “0” and the envelope level is “0”. If the note status is not "1", the target value is "0", and the envelope level is "0", the tone generation has ended, and the tone generation channel management map
Tones corresponding to envelope processing target number ECTN
Set the sound volume of the generated channel number to "0" and prohibit truncation.
The stop flag is set to "0", and the process proceeds to step E10. If the note status is not "1", the target value is not "0", or the envelope level is not "0", the process proceeds to step E21. [E10] The task lock is released. [E11] Envelope processing target number ECTN is "15"
It is determined whether it is less than. If the envelope processing target number ECTN is less than "15", the process proceeds to the next step E12, and if not, the process returns to step E2. [E12] The envelope processing target number ECTN is incremented by "1", and the process returns to step E4. [E13] The envelope level and the rate of the envelope channel number corresponding to the envelope processing number ECTN in the envelope management map are added to obtain a new envelope level and an envelope level ELEN. The note number of the tone generation channel number corresponding to the envelope processing target number ECTN in the generation channel management map is read out and set as the envelope processing target note number ENNM. [E14] It is determined whether or not the note status of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is "1: note on". If the note status is not "1", the process proceeds to the next step E15, and if it is "1", the process proceeds to step E17.

【0106】〔E15〕 パートマップにおけるエンベ
ロープ処理対象パート番号EPNMに対応するパート番号の
ダンパーフラグが“1:ダンパーオン”であるかまたは
パート番号がエンベープ処理対象パート番号EPNMである
ノートマップにおけるエンベロープ処理対象ノート番号
ENNMに対応するノート番号のソステヌートステータスが
“1:ソステヌートオン”であるか否かを判断する。こ
のダンパーフラグまたはソステヌートステータスのいず
れかが“1”である場合にはステップE17に進み、い
ずれもが“1”でない場合には次のステップE16に進
む。 〔E16〕 ノートオフの発音状態に対応するエンベロ
ープ処理をする。すなわち、エンベロープ管理マップに
おけるエンベロープ処理対象番号ECTNに対応するエンベ
ロープチャネル番号の目標値およびレートをノートステ
ータスがノートオフであることおよびエンベロープ生成
パラメータ群に基づき演算して更新するとともに、目標
値およびレートを楽音発生回路26の対応する楽音発生
チャネルに転送する。また、処理を終了するとステップ
E18に進む。 〔E17〕 ノートオンの発音状態に対応するエンベロ
ープ処理をする。すなわちエンベロープ管理マップにお
けるエンベロープ処理対象番号ECTNに対応するエンベロ
ープチャネル番号の目標値およびレートをノートステー
タスがノートオンであることおよびエンベープ生成パラ
メータに基づき演算して更新するとともに、目標値およ
びレートを楽音発生回路26の対応する楽音発生チャネ
ルに転送する。また、処理を終了すると次のステップE
18に進む。 〔E18〕 エンベロープ管理マップにおけるエンベロ
ープ処理対象番号ECTNに対応するエンベロープチャネル
番号のフェーズ番号が、トランケート禁止フェーズ番号
を超えているか否かを判断する。このフェーズ番号がト
ランケート禁止フェーズ番号を超えていない場合には、
ステップE10に進み、発音量の更新をしない。フェー
ズ番号がトランケート禁止フェーズ番号を超えている場
合にはステップE19に進んで発音量の更新を行う。
[E15] Envelope processing in the note map in which the damper flag of the part number corresponding to the envelope processing target part number EPNM in the part map is “1: damper on” or the part number is the embedding processing target part number EPNM Target note number
It is determined whether the sostenuto status of the note number corresponding to ENNM is “1: sostenuto on”. If either the damper flag or the sostenuto status is "1", the process proceeds to step E17, and if neither is "1", the process proceeds to the next step E16. [E16] Envelope processing corresponding to the note-off sound generation state is performed. That is, the target value and the rate of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map are calculated and updated based on the note status that the note status is note-off and the group of envelope generation parameters, and the target value and the rate are updated. The data is transferred to the corresponding tone generating channel of the tone generating circuit 26. When the processing is completed, the process proceeds to step E18. [E17] Envelope processing corresponding to the note-on sound generation state is performed. In other words, the target value and rate of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map are calculated and updated based on the note status that the note status is note-on and the envelope generation parameter, and the target value and rate are generated as a tone. The signal is transferred to the corresponding tone generation channel of the circuit 26. When the processing is completed, the next step E
Proceed to 18. [E18] It is determined whether or not the phase number of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map exceeds the truncation prohibition phase number. If this phase number does not exceed the no truncation phase number,
Proceeding to step E10, the sound volume is not updated. If the phase number exceeds the truncation prohibition phase number, the process proceeds to step E19 to update the sound volume.

【0107】〔E19〕 楽音発生チャネル管理マップ
におけるエンベロープ処理対象番号ECTNに対応する楽音
発生チャネル番号の発音量を更新する。この処理の内容
は図21のフローチャートを参照して後に詳しく説明す
る。 〔E20〕 楽音発生チャネル管理マップにおけるエン
ベロープ処理対象番号ECTNに対応する楽音発生チャネル
番号のトランケート禁止フラグを“0”に設定し、ステ
ップE10に進む。 〔E21〕 ステップE13と同様の処理をする。 〔E22〕 ステップE14におけると同様の判断をす
る。判断対象のノートステータスが“1”でない場合に
は次のステップE23に進み、“1”である場合にはス
テップE28に進む。 〔E23〕 ステップE15におけると同様の判断をす
る。判断対象のダンパーフラグまたはソステヌートステ
ータスのいずれかが“1”である場合にはステップE2
7に進み、いずれもが“1”でない場合には次のステッ
プE24に進む。 〔E24〕 ステップE16と同様の処理をする。 〔E25〕 ステップE18と同様の判断をする。フェ
ーズ番号がトランケート禁止フェーズ番号を超えている
場合には次のステップE26に進み、超えていない場合
にはステップE10に進む。 〔E26〕 楽音発生チャネル管理マップにおけるエン
ベープ処理対象番号ECTNに対応する楽音発生チャネル番
号の発音量を更新する。この処理の内容は後に詳しく説
明する。処理を終了するとステップE20に進む。 〔E27〕 エンベロープ管理マップにおけるエンベー
プ処理対象番号ECTNに対応するエンベロープチャネル番
号のレートを“0”に設定し、目標値およびレートを楽
音発生回路26の対応する楽音発生チャネルに転送す
る。また、処理を終了するとステップE25に進む。 〔E28〕 ステップE17と同様の処理をする。ま
た、処理を終了するとステップE25に進む。 なお、前述したように、急速減衰中およびタイマイベン
ト間のエンベロープレベルの細かな推移に関する処理
は、楽音発生チャネルで処理する。
[E19] The tone generation amount of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is updated. The contents of this processing will be described later in detail with reference to the flowchart of FIG. [E20] The truncation prohibition flag of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is set to “0”, and the process proceeds to step E10. [E21] The same processing as step E13 is performed. [E22] The same determination as in step E14 is made. If the note status to be judged is not "1", the process proceeds to the next step E23, and if it is "1", the process proceeds to step E28. [E23] The same determination as in step E15 is made. If either the damper flag or the sostenuto status to be determined is "1", step E2 is executed.
The process proceeds to step E7, and if none is "1", the process proceeds to the next step E24. [E24] The same processing as step E16 is performed. [E25] The same determination as in step E18 is made. If the phase number exceeds the truncation prohibition phase number, the process proceeds to the next step E26, and if not, the process proceeds to step E10. [E26] The tone generation amount of the tone generation channel number corresponding to the embedding process target number ECTN in the tone generation channel management map is updated. The details of this processing will be described later. When the process ends, the process proceeds to a step E20. [E27] The rate of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is set to “0”, and the target value and the rate are transferred to the corresponding tone generating channel of the tone generating circuit 26. When the process is completed, the process proceeds to step E25. [E28] The same processing as step E17 is performed. When the process is completed, the process proceeds to step E25. As described above, the processing relating to the fine transition of the envelope level during the rapid decay and between the timer events is performed in the tone generation channel.

【0108】減衰音系の発音量の更新ルーチン(図21) ステップE19における減衰音系の発音量の更新ルーチ
ンにおいては減衰音系の楽音の発音量をノートステータ
ス、ソステヌートステータス、ダンパーフラグ、エンベ
ロープレベルに基づいて演算し更新する。各ステップE
1901〜E1910までの処理は以下の通りである。 〔E1901〕 楽音発生チャネル管理マップにおける
エンベロープ処理対象番号ECTNに対応する楽音発生チャ
ネル番号のノートステータスが“1:ノートオン”であ
るか否かを判断する。ノートステータスが“1”でない
場合には次のステップE1902に進み、1である場合
にはステップE1907に進む。 〔E1902〕 パート番号がエンベロープ処理対象パ
ート番号EPNMであるノートマップにおけるエンベロープ
処理対象ノート番号ENNMに対応するノート番号のソステ
ヌートステータスが“1:ソステヌートオン”であるか
否かを判断する。このソステヌートステータスが“1”
でない場合には次のステップE1903に進み、“1”
である場合にはステップE1910に進む。 〔E1903〕 パートマップにおけるエンベロープ処
理対象パート番号EPNMに対応するパート番号のダンパー
フラグが“1:ダンパーオン”であるか否かを判断す
る。このダンパーフラグが“1”でない場合には次のス
テップE1904に進み、“1”である場合にはステッ
プE1905に進む。 〔E1904〕 補正量ECLVを“0”に設定し、ステッ
プE1906に進む。
Routine for Updating the Amount of Attenuation Sound (FIG. 21) In the routine for updating the amount of attenuation of the decay system in step E19, the volume of the sound of the decay system is calculated based on the note status, sostenuto status, damper flag, and envelope level. Calculate and update based on. Each step E
The processing from 1901 to E1910 is as follows. [E1901] It is determined whether or not the note status of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is “1: note on”. If the note status is not "1", the flow advances to the next Step E1902, and if it is 1, the flow advances to Step E1907. [E1902] It is determined whether or not the sostenuto status of the note number corresponding to the envelope processing target note number ENNM in the note map whose part number is the envelope processing target part number EPNM is "1: sostenuto on". This sostenuto status is "1"
If not, the flow advances to the next Step E1903, where "1" is set.
If so, the process proceeds to step E1910. [E1903] It is determined whether or not the damper flag of the part number corresponding to the envelope processing target part number EPNM in the part map is "1: damper on". If the damper flag is not "1", the flow proceeds to the next step E1904, and if it is "1", the flow proceeds to step E1905. [E1904] The correction amount ECLV is set to “0”, and the flow advances to step E1906.

【0109】〔E1905〕 まず補正量ECLVをダンパ
ーオン初期補正量“2500H”に設定し、ステップE
1906に進む。 〔E1906〕 まずエンベロープレベルELENを“2”
で除算した値に補正量ECLVを加算した値を発音量EVOLと
する。次に楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号の発音量を発音量EVOLに更新設定し、このルーチンを
終了する。 〔E1907〕 エンベロープ管理マップにおけるエン
ベロープ処理対象番号ECTNに対応するエンベロープチャ
ネル番号の補正量を補正量ECLVとする。 〔E1908〕 補正量ECLVがノートオン最小補正量
“3000H”を超えているか否かを判断する。補正量
ECLVが“3000H”を超えている場合には次のステッ
プE1909に進み、“3000H”を超えていない場
合にはステップE1906に進む。 〔E1909〕 まず補正量ECLVをノートオン減少量
“40H”だけデクリメントする。次にエンベロープ管
理マップにおけるエンベロープ処理対象番号ECTNに対応
するエンベロープチャネル番号の補正量を補正量ECLVに
更新設定し、ステップE1906に進む。 〔E1910〕 補正量ECLVをソステヌートオン初期補
正量“3000H”に設定し、ステップE1906に進
む。
[E1905] First, the correction amount ECLV is set to the damper-on initial correction amount "2500H".
Proceed to 1906. [E1906] First, set the envelope level ELEN to “2”
The value obtained by adding the correction amount ECLV to the value obtained by dividing by the Eq. Next, the tone generation amount of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is updated and set to the tone generation amount EVOL, and this routine ends. [E1907] The correction amount of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is set as a correction amount ECLV. [E1908] It is determined whether or not the correction amount ECLV exceeds the note-on minimum correction amount “3000H”. Correction amount
When the ECLV exceeds “3000H”, the process proceeds to the next step E1909, and when the ECLV does not exceed “3000H”, the process proceeds to step E1906. [E1909] First, the correction amount ECLV is decremented by the note-on reduction amount “40H”. Next, the correction amount of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is updated to the correction amount ECLV, and the flow advances to step E1906. [E1910] The correction amount ECLV is set to the sostenuto-on initial correction amount “3000H”, and the flow advances to step E1906.

【0120】持続音系発音量の更新ルーチン ステップE26における持続音系の発音量の更新ルーチ
ンにおいては減衰音系の発音量の更新ルーチンに準じた
処理により持続音系の楽音の発音量を演算し更新する。
この更新ルーチンにおける各ステップでの処理は減衰音
系の発音量の更新ルーチンにおける各ステップE190
1〜1910にそれぞれ対応した同様の処理を行うもの
であるが、以下の点が相違する。ステップE1905に
おいては、補正量ECLVをダンパーオン初期補正量“35
00H”に変更して設定する。ステップE1908にお
いては、補正量ECLVがノートオン最小補正量“4000
H”を超えているか否か判断する。ステップE1910
においては、補正量ECLVをソステヌートオン初期補正量
“4000H”に変更して設定する。
Updating routine of sound volume of continuous sound system In the routine of updating the sound volume of the continuous sound system in step E26, the sound volume of the musical sound of the continuous sound system is calculated by processing according to the routine of updating the sound volume of the damped sound system. Update.
The processing in each step in this update routine is performed in each step E190 in the update routine of the sound volume of the damped sound system.
Although similar processing is performed corresponding to each of Nos. 1 to 1910, the following points are different. In step E1905, the correction amount ECLV is set to the damper-on initial correction amount “35”.
In step E1908, the correction amount ECLV is set to the minimum note-on correction amount “4000”.
H ”is determined. Step E1910
In, the correction amount ECLV is changed and set to the sostenuto-on initial correction amount “4000H”.

【0121】ペダルデータ受信タスク ペダルデータ受信タスクはペダルデータ受信イベントが
発生すると、ペダルデータをMIDI回路20から読み
込み、所定の領域に記憶する。 〔F1〕 このペダルデータ受信タスクで占有する変数
等を初期値に設定する。 〔F2〕 要求元イベント値NSETを“1”に設定して、
イベント待ちモニタコールを行う。ペダルデータ受信イ
ベントが発生すると、次のステップF3に進む。 〔F3〕 タスク管理マップにおけるタスク番号“6:
ペダルデータ受信タスク”の待ちイベント値を“0”
に、第1イベント発生フラグを“0”に設定する。 〔F4〕 MIDI回路20からペダルデータを読み込
み、パートマップおよび/または楽音発生チャネル管理
マップの対応するデータを更新する。ダンパーペダルに
関するデータについては、MIDIチャネルマップにお
いて、読み込んだデータに含まれるMIDIチャネル番
号に対応するMIDIチャネル番号のパート番号を調
べ、パートマップにおいてそのパート番号のダンパーフ
ラグを、読み込んだダンパーペダルデータに更新する。
ソステヌートペダルに関するデータについては、MID
Iチャネルマップにおいて、読み込んだデータに含まれ
るMIDIチャネル番号に対応するMIDIチャネル番
号のパート番号を調べ、ノートマップにおいてそのパー
ト番号のソステヌートステータスを、読み込んだソステ
ヌートペダルデータが“1”でソステヌートペダルの踏
下げを示す場合には対応するノートステータスと同じに
なるように更新し、ソテスヌートペダルデータが“1”
でなくソステヌートペダルを戻したことを示す場合には
“0”に更新する。その機能がダンパーペダルと同機能
であるホールドペダルに関するデータについては、前述
のダンパーペダルに関するデータと同様の処理をする。
その機能がソステヌートペダルと同機能であるホールド
ペダルに関するデータについては、前述のソステヌート
ペダルに関するデータと同様の処理をする。対応する処
理を終了するとステップF2に戻る。
[0121] When the pedal data reception task pedal data receiving task pedal data reception event occurs, reads the pedal data from the MIDI circuit 20, is stored in a predetermined area. [F1] Initialize variables and the like occupied by this pedal data reception task. [F2] Set the request source event value NSET to “1”,
Performs an event wait monitor call. When the pedal data reception event occurs, the process proceeds to the next step F3. [F3] Task number “6: in the task management map”
Wait event value of “ Pedal data reception task” is “0”
, The first event occurrence flag is set to “0”. [F4] The pedal data is read from the MIDI circuit 20, and the corresponding data in the part map and / or the tone generation channel management map is updated. For the data relating to the damper pedal, the MIDI channel map checks the MIDI channel number part number corresponding to the MIDI channel number included in the read data, and sets the damper flag of the part number in the part map to the read damper pedal data. Update.
For data on sostenuto pedals, see MID
In the I channel map, the part number of the MIDI channel number corresponding to the MIDI channel number included in the read data is checked, the sostenuto status of the part number in the note map is read, and the read sostenuto pedal data is “1”, and In the case of depressing, the note status is updated so as to be the same as the corresponding note status, and the Sotesnoot pedal data is set to “1”.
However, if it indicates that the sostenuto pedal has been released, the value is updated to "0". Regarding the data relating to the hold pedal whose function is the same as that of the damper pedal, the same processing as the data relating to the aforementioned damper pedal is performed.
Regarding the data related to the hold pedal whose function is the same as that of the sostenuto pedal, the same processing as the data related to the above-described sostenuto pedal is performed. When the corresponding process ends, the process returns to the step F2.

【0122】操作子データ受信タスク 操作子データ受信タスクは操作子データ受信イベントが
発生すると、操作子データをMIDI回路20から読み
込み、所定の領域に記憶する。 〔G1〕 MIDIチャネルマップおよびパートマップ
とこの操作子データ受信タスクで占有する変数等を初期
値に設定する。 〔G2〕 要求元イベント値NSETを“1”に設定すると
ともに、初期設定完了フラグを“1”に設定して、イベ
ント待ちモニタコールを行う。操作子データ受信イベン
トが発生すると、次のステップG3に進む。 〔G3〕 タスク管理マップにおけるタスク番号“7:
操作子データ受信タスク”の待ちイベント値を“0”
に、第1イベント発生フラグを“0”に設定する。 〔G4〕 MIDI回路20から操作子データを読み込
み、MIDIチャネルマップ、パートマップの対応する
データを更新する。例えば音色番号に関するデータは、
MIDIチャネルマップにおいてそのデータに含まれる
MIDIチャネル番号に対応するMIDIチャネル番号
のパート番号を調べ、パートマップにおけるそのパート
番号に対応するパート番号の音色番号をその音色番号に
関するデータに更新するとともに、音色番号に対応した
トランケート禁止フェーズ番号、リザーブ数および持続
音系フラグをROM25より読み出して対応する領域に
記憶する。対応する処理を終了するとステップG2に戻
る。
[0122] When the operator data reception task operator data reception task operation element data reception event occurs, reads the operator data from the MIDI circuit 20, it is stored in a predetermined area. [G1] The MIDI channel map and part map and variables occupied by the operator data reception task are set to initial values. [G2] The request source event value NSET is set to “1”, and the initial setting completion flag is set to “1”, and an event wait monitor call is performed. When an operator data reception event occurs, the process proceeds to the next step G3. [G3] Task number “7: in the task management map”
The wait event value of the " operator data reception task" is "0"
, The first event occurrence flag is set to “0”. [G4] The controller data is read from the MIDI circuit 20, and the corresponding data of the MIDI channel map and the part map are updated. For example, data on tone number
In the MIDI channel map, the part number of the MIDI channel number corresponding to the MIDI channel number included in the data is checked, and the tone color number of the part number corresponding to the part number in the part map is updated to data relating to the tone number. The truncation prohibition phase number, the reserve number, and the continuous sound flag corresponding to the number are read from the ROM 25 and stored in the corresponding area. When the corresponding process ends, the process returns to the step G2.

【0123】以上に説明した電子楽器の全体的な動作に
ついて説明する。 (1) 初期設定 電源を投入すると、モニタプログラムのリセットルーチ
ンZAによる処理後に(ステップZA1〜ZA3)、キ
ーデータ受信タスク(ルーチンA)、メインアサイナタ
スク(ルーチンB)、発音タスク(ルーチンC)、プリ
アサイナタスク(ルーチンD)、エンベロープタスク
(ルーチンE)、ペダルデータ受信タスク(ルーチン
F)および操作子データ受信タスク(ルーチンG)の初
期設定処理がタスク優先順位に従って順次に行われる
(ステップA1,A2、ステップB1,B2、ステップ
C1,C2、ステップD1,D2、ステップE1,E
2、ステップF1,F2、ステップG1,G2)。 (2) 受信ノートオンメッセージによる発音処理 MIDIバスを介してノートオンメッセージを受信しM
IDI回路20から割込みがかかると、モニタプログラ
ムのキーデータ受信割込み処理ルーチンZEが開始され
る。 (2の1) キーデータ受信割込み処理ルーチンZEで
は、キーデータ受信イベント待ちの状態にあるので(ス
テップZE1,ZE3)、タスク管理マップにおけるタ
スク番号“1:キーデータ受信タスク”のステータスを
“0:ラン”に設定する(ステップZE5)。次に、キ
ーデータ受信タスクを実行して(ステップA2〜A
7)、演奏情報をMIDI回路20から読み込み、その
演奏情報に基づいてノートマップを更新するとともに、
ノートオンであればイベント発生モニタコールを行う
(ステップA7)。 (2の2) モニタプログラムのイベント発生モニタコ
ールルーチンZCにおいて、タスク管理マップにおける
タスク番号“2:メインアサイナタスク”の第1イベン
ト発生フラグを“1”に設定するとともに(ステップZ
C1)、ステータスを“1:レディ”に設定する(ステ
ップZC2,ZC3)。なお、キーデータ受信タスクは
タスク優先順位がメインアサイナタスクのタスク優先順
位より高いので、キーデータ受信タスクを再び開始して
(ステップZC4)、このキーデータ受信タスクにおい
てイベント待ちモニタコールを行う(ステップA2)。
The overall operation of the electronic musical instrument described above will be described. (1) Initial setting When the power is turned on, after processing by the reset routine ZA of the monitor program (steps ZA1 to ZA3), a key data receiving task (routine A), a main assigner task (routine B), and a sound generation task (routine C) , A pre-assigner task (routine D), an envelope task (routine E), a pedal data receiving task (routine F), and an operator data receiving task (routine G) are sequentially performed in accordance with task priorities (step A1). , A2, steps B1, B2, steps C1, C2, steps D1, D2, steps E1, E
2, steps F1 and F2, steps G1 and G2). (2) Sound generation processing based on the received note-on message The note-on message is received via the MIDI bus and
When an interrupt is issued from the IDI circuit 20, a key data reception interrupt processing routine ZE of the monitor program is started. (2-1) Since the key data reception interrupt processing routine ZE is in a state of waiting for a key data reception event (steps ZE1 and ZE3), the status of the task number “1: key data reception task” in the task management map is set to “0”. : Run "(step ZE5). Next, a key data receiving task is executed (steps A2 to A
7), the performance information is read from the MIDI circuit 20, and the note map is updated based on the performance information.
If the note is on, an event occurrence monitor call is made (step A7). (2-2) In the event occurrence monitor call routine ZC of the monitor program, the first event occurrence flag of the task number “2: main assigner task” in the task management map is set to “1” (step Z).
C1), the status is set to "1: ready" (steps ZC2, ZC3). Since the task priority of the key data receiving task is higher than the task priority of the main assigner task, the key data receiving task is started again (step ZC4), and an event wait monitor call is performed in the key data receiving task (step ZC4). Step A2).

【0124】(2の3) モニタプログラムのイベント
待ちモニタコールルーチンZBにおいて、キーデータ受
信イベントが発生しているか否かを調べる(ステップZ
B1)。調べた結果、次のキーデータ受信イベントがま
だ発生していないので、タスク管理マップにおけるタス
ク番号“1:キーデータ受信タスク”のステータスを
“2:ウェイト”に設定して(ステップZB2)、タス
ク管理マップを調べる(ステップZB3)。このタスク
管理マップを調べた結果、ステータスが“1:レディ”
である最優先タスクのタスク番号が“2:メインアサイ
ナタスク”であるために、このタスク番号“2:メイン
アサイナタスク”のステータスを“0:ラン”に設定し
て(ステップZB4)、メインアサイナタスクを実行さ
せる(ステップZB5)。このメインアサイナタスクに
おいては、ノート番号NTNMなどを楽音発生チャネル管理
マップに書き込む(ステップB2〜B)。次にイベン
ト発生モニタコールを行う(ステップB)。 (2の4) モニタプログラムのイベント発生モニタコ
ールルーチンZCにおいて、タスク管理マップにおける
タスク番号“3:発音タスク”の第2イベント発生フラ
グを“1”に設定するとともに、ステータスを“1:レ
ディ”に設定する。なお、メインアサイナタスクのタス
ク優先順位が発音タスクのタスク優先順位より高いの
で、メインアサイナタスクを再び開始して、このメイン
アサイナタスクにおいて対象アサイン順位を“1”だけ
インクリメントして次のアサイン順位に更新し(ステッ
プB)、イベント待ちモニタコールを行う(ステップ
B2)。 (2の5) モニタプログラムのイベント待ちモニタコ
ールルーチンZBにおいてアサイン要求イベントが発生
しているか否かを調べる。調べた結果、次のアサイン要
求イベントがまだ発生していないので、タスク管理マッ
プにおけるタスク番号“2:メインアサイナタスク”の
ステータスを“2:ウェイト”に設定して、タスク管理
マップを調べる。タスク管理マップを調べた結果、ステ
ータスが“1:レディ”である最優先タスクのタスク番
号が“3:発音タスク”であるために、タスク番号
“3:発音タスク”のステータスを“0:ラン”に設定
して、発音タスクを実行させる。この発音タスクにおい
ては、楽音発生チャネル管理マップに書き込まれたノー
ト番号NTNMなどに基づき楽音発生に関する各種パラメー
タを演算して設定し、発音の開始を指示する(ステップ
C2〜C27)。次に、イベント待ちモニタコールを行
う(ステップC2)。
(2-3) In the event waiting monitor call routine ZB of the monitor program, it is checked whether or not a key data reception event has occurred (step Z).
B1). As a result of the examination, since the next key data reception event has not yet occurred, the status of the task number “1: key data reception task” in the task management map is set to “2: wait” (step ZB2), and the task The management map is checked (step ZB3). As a result of checking this task management map, the status is "1: ready"
Since the task number of the highest priority task is "2: main assigner task", the status of this task number "2: main assigner task" is set to "0: run" (step ZB4). The main assigner task is executed (step ZB5). In the main assigner task writes and note number NTNM the tone-generating channel management map (Step B2~B 5). Next, an event occurrence monitor call is performed (step B 6 ). (2-4) In the event occurrence monitor call routine ZC of the monitor program, the second event occurrence flag of the task number "3: sounding task" in the task management map is set to "1", and the status is set to "1: ready". Set to. Since the task priority of the main assigner task is higher than the task priority of the sounding task, the main assigner task is restarted, the target assignment priority is incremented by “1” in the main assigner task, and the next assignment is performed. updates to assign rank (step B 7), waits for an event monitor call (step B2). (2-5) It is checked whether or not an assignment request event has occurred in the event waiting monitor call routine ZB of the monitor program. As a result of the examination, since the next assignment request event has not yet occurred, the status of the task number “2: main assigner task” in the task management map is set to “2: wait”, and the task management map is examined. As a result of examining the task management map, the task number of the highest priority task whose status is "1: ready" is "3: sounding task", so that the status of the task number "3: sounding task" is "0: run". "" To execute the pronunciation task. In this tone generation task, various parameters relating to tone generation are calculated and set based on the note number NTNM and the like written in the tone generation channel management map, and the start of tone generation is instructed (steps C2 to C27). Next, an event wait monitor call is performed (step C2).

【0125】(2の6) モニタプログラムのイベント
待ちモニタコールルーチンZBにおいて発音要求イベン
トが発生しているか否かを調べる。調べた結果、次の発
音要求イベントがまだ発生していないために、タスク管
理マップにおけるタスク番号“3:発音タスク”のステ
ータスを“2:ウェイト”に設定して、タスク管理マッ
プを調べる。タスク管理マップを調べた結果、全てのタ
スク番号のステータスが“2:ウェイト”である場合に
はスリープする。 (3) プリアサイナタスク(ルーチンD)は対応する
タイマイベントが発生すると、楽音発生チャネル管理マ
ップの発音量に基づいてアサイン順位を更新する(ステ
ップD2〜D11)。次に、イベント待ちモニタコール
を行う(ステップD2)。 (4) エンベロープタスク(ルーチンE)は対応する
タイマイベントが発生すると、ノートステータス、ペダ
ルのデータ、楽音発生チャネル管理マップおよびエンベ
ロープ管理マップに基づいて楽音発生チャネル管理マッ
プの発音量およびエンベロープ管理マップのエンベロー
プレベルなどを更新等する(ステップE2〜E28)。
次に、イベント待ちモニタコールを行う(ステップE
2)。
(2-6) It is checked whether or not a sound generation request event has occurred in the event waiting monitor call routine ZB of the monitor program. As a result of the check, since the next sounding request event has not yet occurred, the status of the task number “3: sounding task” in the task management map is set to “2: wait”, and the task management map is checked. As a result of examining the task management map, if the status of all task numbers is “2: wait”, sleep. (3) When a corresponding timer event occurs, the pre-assigner task (routine D) updates the assignment order based on the tone generation amount in the tone generation channel management map (steps D2 to D11). Next, an event wait monitor call is performed (step D2). (4) When the corresponding timer event occurs, the envelope task (routine E) executes the tone generation of the tone generation channel management map and the envelope management map based on the note status, pedal data, the tone generation channel management map, and the envelope management map. Update the envelope level and the like (steps E2 to E28).
Next, an event wait monitor call is made (step E).
2).

【0126】以上に説明したように本実施例の電子楽器
においては、新たな楽音を割り当てる楽音発生チャネル
をリザーブ対象外の楽音発生チャネルから発音量の小な
る順に選定している。発音量をほぼ次のように設定し、
ノートオン状態、ペダルオン状態の楽音発生チャネルを
選定され難くしている。 ノートオンを受信すると急
速減衰が必要であれば“FFFFH”に設定する。
アタック中はアタックレベル/2+“8000H”に設
定する。 アタックを終了しかつノートオン状態であ
る場合にはエンベロープレベル/2+補正量に設定す
る。ここで補正量はノートオン時にノートオン初期補正
量に設定し、アタックを終了するとノートオン状態の継
続中は所定時間毎にノートオン減少量ずつノートオン最
小補正量になるまで順次に減少する。 ノートオフ状
態でかつペダルの状態がオンである場合にもエンベロー
プレベル/2+補正量に設定する。なお、補正量はオン
状態であるペダルの種類に応じたペダルオン初期補正量
に基づいて設定する。 ノートオフ状態でかつ全ての
ペダル状態がオフである場合にはエンベロープレベル/
2に設定する。なお、減衰音系の楽音を発生している楽
音発生チャネルと持続音系の楽音を発生している楽音発
生チャネルとでは異なる重み付けをしたが、同じ重み付
けをしても良い。また初期補正量、減少量、最小補正量
を音色、音高、演奏態様などに応じて変更しても良い。
なお、押鍵中は発音体の振動を抑制するような音色など
の場合には負の補正を行うとよい。またノートオンの補
正量の減少をアタック終了後に開始したが、発音開始後
に開始するようにしても良い。またペダルオン状態の補
正量を一定としたが、ペダルのオン状態への移行時に初
期補正量を設定し、その後に減少を開始してもよい。こ
の場合、減少の開始を初期補正量の設定後の最初のノー
トオフ受信時からとしても良い。またペダルオン時の初
期補正量を所定値としたが、音色、音高などに基づいて
その所定値を変えて設定するようにしてもよい。また重
み付けを加算により行ったが、乗算などにより行っても
良い。また発音量が所定値以下の場合には補正をしない
ようにしてもよい。またエンベロープレベルに換えて、
発音される楽音信号の振幅レベルより検出したエンベロ
ープレベル、あるいはそれをシミュレートしたレベルを
用いても良い。あるいは疑似エンベロープレベルを用い
ても良い。また持続音系の楽音の場合、ノートオン中に
ついてはエンベロープレベルに換えて、アタックレベ
ル、あるいは音色、音高、ベロシティなどに基づいて算
出した値を用いても良い。
As described above, in the electronic musical instrument of this embodiment, the tone generating channels to which new musical tones are assigned are selected from the tone generating channels not to be reserved in order of decreasing sound volume. Set the pronunciation amount almost as follows,
This makes it difficult to select a tone generation channel in the note-on state or the pedal-on state. When a note-on is received, if rapid decay is required, "FFFFH" is set.
During the attack, set to attack level / 2 + "8000H". When the attack is completed and the note is on, the envelope level is set to (envelope level / 2 + correction amount). Here, the correction amount is set to the note-on initial correction amount at the time of note-on, and when the attack ends, the note-on decreasing amount is sequentially reduced by the note-on decreasing amount at predetermined time intervals until the note-on minimum correction amount is reached during the note-on state. Even when the note is off and the pedal is on, the envelope level is set to (envelope level / 2 + correction amount). The correction amount is set based on the pedal-on initial correction amount according to the type of the pedal that is in the ON state. When the note-off state and all pedal states are off, the envelope level /
Set to 2. It should be noted that the tone generation channel generating the attenuated tone and the tone generation channel generating the sustained tone are differently weighted. However, the same weight may be used. The initial correction amount, the reduction amount, and the minimum correction amount may be changed according to the timbre, the pitch , the performance mode, and the like.
Note that a tone that suppresses vibration of the sounding body during key depression
In this case, a negative correction may be performed. Further, the reduction of the note-on correction amount is started after the end of the attack, but may be started after the start of sound generation. Further, although the correction amount in the pedal-on state is fixed, the initial correction amount may be set at the time of transition to the pedal-on state, and thereafter the decrease may be started. In this case, the decrease may be started from the first note-off reception after setting the initial correction amount. Further, the initial correction amount when the pedal is turned on is set to the predetermined value, but the predetermined value may be changed and set based on the tone color, the pitch, and the like. Although the weighting is performed by addition, the weighting may be performed by multiplication or the like. No correction is made if the sound volume is less than the predetermined value.
You may do so. Also, instead of the envelope level,
Envelope detected from the amplitude level of the tone signal to be pronounced
A loop level or a simulated level may be used. Alternatively, a pseudo envelope level may be used. Further, in the case of a continuous tone musical tone, an attack level or a value calculated based on a tone color, a pitch, a velocity, or the like may be used instead of the envelope level during note-on.

【0127】なお、処理を簡略化するためリザーブ処理
を省略し、プリアサイナ発音量のみに基づいてアサイン
順位を設定するなどしても良い。またアタック中および
急速減衰中の楽音発生チャネルへの割当てを禁止しない
で割り当てるようにしても良い。言い換えればステップ
B4の対象アサイン順位TASNが割当て可能楽音発生チャ
ネル数GACNより大きくなると割当てを禁止する処理を削
除する。なお、対象アサイン順位TASNが“15”を超え
た場合には割当てを禁止する。あるいは対象アサイン順
位TASNを“0”に戻すか、アサイン順位を再設定するよ
うにしても良い。この場合に、アタック中の楽音発生チ
ャネルのアサイン順位はアタックを終了した楽音発生チ
ャネルより後順位になり、急速減衰中の楽音発生チャネ
ルのアサイン順位はアタック中の楽音発生チャネルより
も後順位となる。この場合、プリアサイン順位設定ルー
チンではプリアサイナ発音量の小なる順に第Nプリアサ
イン順位楽音発生チャネル番号PASS[N] を設定する処理
のみとする。また急速減衰中の楽音発生チャネルの選定
順位としては押鍵順が望ましいので、急速減衰中の楽音
発生チャネルの発音量として“FFF0H”に押鍵順位
を加算した値にすると良い。また、発音量に基づく並べ
換え処理を簡略化するために、その並べ換え処理に先立
ち発音を終了している楽音発生チャネルをアサイン順位
の小なる順位に設定するようにしても良い。例えば、プ
リアサイン順位設定ルーチンのステップD603〜D6
06の処理に先立ち発音を終了している楽音発生チャネ
ルの楽音発生チャネル番号を第Nプリアサイン順位楽音
発生チャネル番号PASS[N] に順次設定する。また、発音
量が所定レベル以下の楽音発生チャネルのアサイン順位
を、押鍵順、楽音発生チャネル番号順、所定レベル以下
になった順などに設定するようにして発音量に基づくア
サイン順位の設定処理を簡略化してもよい。トランケー
ト禁止フェーズ番号をアタックを終了するフェーズ番号
としたが、発音開始直後の演奏表現に大きな影響を与え
る期間が更に長いなどする場合にはその期間に応じて変
更しても良い。例えばディケイ期間を含めるようにして
もよい。
In order to simplify the processing, the reserve processing may be omitted, and the assignment order may be set based on only the pre-assigner sound generation amount. Alternatively, the assignment to the tone generation channel during the attack and the rapid decay may be performed without prohibiting the assignment. In other words, the process of prohibiting assignment when the target assignment order TASN in step B4 becomes larger than the number of assignable musical tone generating channels GACN is deleted. If the target assignment order TASN exceeds “15”, the assignment is prohibited. Alternatively, the target assignment order TASN may be returned to “0”, or the assignment order may be reset. In this case, the assignment order of the tone generation channel under attack is later than the tone generation channel after the attack is completed, and the assignment order of the tone generation channel under rapid decay is later than the tone generation channel under attack. . In this case, in the pre-assignment order setting routine, only the process of setting the N-th pre-assignment order musical sound generation channel number PASS [N] in order of decreasing pre-assigner sounding amount. Since the order of key depression is desirable as the selection order of the tone generation channels during the rapid decay, it is preferable that the sound generation amount of the tone generation channel under the rapid decay be a value obtained by adding the key depression order to “FFF0H”. Further, in order to simplify the rearrangement process based on the sound generation amount, the tone generation channels whose sound generation has been completed may be set to a smaller order of the assignment order prior to the rearrangement process. For example, steps D603 to D6 of the pre-assignment order setting routine
Prior to the process of step 06, the tone generation channel numbers of the tone generation channels whose tone generation has been completed are sequentially set to the Nth preassigned priority tone generation channel number PASS [N]. In addition, the assigning order of the tone generating channels whose sounding amount is equal to or less than a predetermined level is set in the order of key press, the order of the tone generating channel number, or the order in which the sound amount becomes equal to or lower than the predetermined level. May be simplified. The truncation prohibition phase number is the phase number at which the attack ends, but may be changed according to the period when the period immediately affecting the performance expression immediately after the start of sounding is longer. For example, a decay period may be included.

【0128】いわゆる連打処理を施し連打関係にある楽
音発生チャネルのアサイン順位を早くしても良い。例え
ば、プリアサイナタスクのステップD5の処理を終える
と同一パートで同一音高の楽音を発生している連打関係
にある楽音発生チャネルを検出し、楽音発生チャネル番
号GNのプリアサイナ発音量PLEV[GN]を次のように変更し
てからステップD6に進むようにする。ノートステータ
スがノートオンの楽音発生チャネルと連打関係にあるノ
ートステータスがノートオフの楽音発生チャネルの楽音
発生チャネル番号GNのプリアサイナ発音量PLEV[GN]を1
/10に、連打関係にある全ての楽音発生チャネルのノ
ートステータスがノートオフであれば最も大きい楽音発
生チャネル番号GNのプリアサイナ発音量PLEV[GN]を除く
連打関係にある楽音発生チャネルの楽音発生チャネル番
号GNのプリアサイナ発音量PLEV[GN]を1/10に変更す
る。
[0128] may be early to assign rank of the musical tone-generating channel in the battered relationship subjected to the so-called barrage processing. For example, when the processing of step D5 of the pre-assigner task is completed, a continuous tone-generating tone generating channel that generates a tone of the same pitch in the same part is detected, and the pre-assigner tone volume PLEV [GN] of the tone generating channel number GN is detected. Is changed as follows before proceeding to step D6. The pre-assigner sound volume PLEV [GN] of the tone generation channel number GN of the tone generation channel whose note status is note-off and which has a continuous tapping relationship with the tone generation channel whose note status is note-on is 1
If the note status of all the tone generating channels in the continuous tapping relationship is note-off, the musical tone generating channels of the tone generating channels in the tapping relationship except for the pre-assigner sound volume PLEV [GN] of the largest tone generating channel number GN The pre-assigner sound volume PLEV [GN] of the number GN is changed to 1/10.

【0129】アサイン順位の設定を特開昭64−193
93号公報に示されている技術のようにリンクの設定に
よって行っても良い。マルチティンバ電子楽器について
説明したが、単一の音色の楽音を発音する電子楽器にも
本発明を適用できることは言うまでもない。
The setting of the assignment order is described in JP-A-64-193.
This may be performed by setting a link as in the technology disclosed in Japanese Patent Publication No. 93. Although the multitimbral electronic musical instrument has been described, it goes without saying that the present invention can be applied to an electronic musical instrument that produces a musical tone of a single tone.

【0140】単一の楽音を複数の楽音発生チャネルで発
生する楽音 (構成音) で形成する場合に、発音等の処理
を楽音を単位として行う場合と構成音毎に行う場合があ
る。楽音を単位として行う場合の割当て対象の選定にお
ける発音量の比較に際しては構成音の発音量の総和、ま
たは構成音の重要度による重み付けをした発音量の総
和、または最大発音量、または重要度の高い構成音の発
音量(この構成音についてのみ発音量の演算を行う)を
楽音の発音量として処理すると良い。楽音の発生の開始
の指示は全ての構成音について準備が整うと楽音を単位
として指示する。構成音毎に行う場合においても楽音の
発生の開始の指示は全ての構成音について準備が整うと
楽音を単位として指示し、各構成音が不揃いに発音を開
始することによる不都合を避けるようにすると良い。同
一楽音の構成音であるか否かの判断は、楽音発生チャネ
ル管理マップ等に楽音の識別用エリアを設け、新たな楽
音の割当て時に同一楽音の構成音については同じ識別記
号を設定し、その識別記号によって判断するなどすると
良い。本実施例はマルチタスク処理によったが、シング
ルタスク処理により実施しても良い。またアサイン順位
を予め設定し、設定したアサイン順位に従って選定する
プリアサイン処理によったが、ノートオン情報を受信す
るつど新たな楽音を割り当てる楽音発生チャネルを選定
する一般的な処理によっても良い。鍵盤部を有しない電
子楽器について説明したが、鍵盤部を付した電子鍵盤楽
器、あるいは自動リズムなどにも本発明を適用できるこ
とは言うまでもない。
When a single musical tone is formed by musical tones (constituent tones) generated by a plurality of musical tone generating channels, processing such as sound generation may be performed in units of musical tones or may be performed for each constituent tone. When comparing the sound volume in the selection of the allocation target in the case of performing the musical sound as a unit, the sum of the sound volumes of the constituent sounds, the sum of the sound volumes weighted by the importance of the constituent sounds, or the maximum sound volume or the importance It is preferable to process the sounding amount of a high constituent sound (the sounding amount is calculated only for this constituent sound) as the sounding amount of a musical sound. The instruction to start the generation of musical tones is given in units of musical tones when all constituent sounds are ready. Even in the case of performing for each constituent sound, the start of generation of musical sounds should be instructed in units of musical sounds when all constituent sounds are ready, so that inconvenience caused by irregularly starting each constituent sound is avoided. good. To determine whether a sound is a component of the same tone, an area for discriminating the tone is provided in a tone generation channel management map, etc. It is better to judge by the identification symbol. Although the present embodiment is based on multitask processing, it may be implemented by single task processing. Although the assignment order is set in advance and the pre-assignment process is selected according to the set assignment order, a general process of selecting a tone generation channel to which a new tone is assigned each time note-on information is received may be used. Although an electronic musical instrument without a keyboard has been described, it is needless to say that the present invention can be applied to an electronic keyboard musical instrument with a keyboard, an automatic rhythm, and the like.

【0141】[0141]

【発明の効果】以上に説明したように、本発明によれ
ば、電子楽器において、新たな楽音情報を割り当てる楽
音発生チャネルの選定方法としていわゆるレベルアサイ
ン方式を採用した場合にも、押鍵等のノートオン状態や
ペダル状態がその押鍵順等も含めて選定に際し考慮され
るようになるので、発音量は小さいが押鍵中やペダルオ
ン中の有用と考えられる楽音が無闇に発音停止されるな
どのことがなくなり、これにより選定に起因した演奏表
現上の違和感を軽減できる。またマルチティンバ電子楽
器においては、減衰音系と持続音系にともに適した共通
の評価基準により楽音発生チャネルの選定が行えるよう
になり、選定処理が簡単化されるとともに、選定に起因
した演奏表現上の違和感が軽減される。
As described above, according to the present invention, even when a so-called level assignment method is adopted as a method of selecting a tone generation channel to which new tone information is assigned in an electronic musical instrument, key presses and the like can be performed. The note-on state and pedal state are considered in the selection, including the key press order, etc. This eliminates discomfort in the performance expression caused by the selection. In the case of multi-timbral electronic musical instruments, the tone generation channel can be selected based on a common evaluation criterion that is suitable for both the attenuated sound system and the sustained sound system. The above discomfort is reduced.

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

【図1】本発明の一実施例としてのアサイナが適用され
るマルチティンバ電子楽器の全体構成図である。
FIG. 1 is an overall configuration diagram of a multi-timbral electronic musical instrument to which an assigner as one embodiment of the present invention is applied.

【図2】MIDIチャネルマップを示す図である。FIG. 2 is a diagram showing a MIDI channel map.

【図3】パートマップを示す図である。FIG. 3 is a diagram showing a part map.

【図4】ノートマップを示す図である。FIG. 4 is a diagram showing a note map.

【図5】エンベロープ管理マップを示す図である。FIG. 5 is a diagram showing an envelope management map.

【図6】タスク管理マップを示す図である。FIG. 6 is a diagram showing a task management map.

【図7】楽音発生チャネル管理マップを示す図である。FIG. 7 is a diagram showing a tone generation channel management map.

【図8】リセットルーチンを示す流れ図である。FIG. 8 is a flowchart showing a reset routine.

【図9】イベント待ちモニタコールルーチンを示す流れ
図である。
FIG. 9 is a flowchart showing an event wait monitor call routine.

【図10】イベント発生モニタコールルーチンを示す流
れ図である。
FIG. 10 is a flowchart showing an event occurrence monitor call routine.

【図11】タイマ割込み処理ルーチンを示す流れ図であ
る。
FIG. 11 is a flowchart showing a timer interrupt processing routine.

【図12】キーデータ受信割込み処理ルーチンを示す流
れ図である。
FIG. 12 is a flowchart showing a key data reception interrupt processing routine.

【図13】キーデータ受信タスクを示す流れ図である。FIG. 13 is a flowchart showing a key data reception task.

【図14】メインアサイナタスクを示す流れ図である。FIG. 14 is a flowchart showing a main assigner task.

【図15】発音タスクを示す流れ図の一部である。FIG. 15 is a part of a flowchart showing a sound generation task.

【図16】発音タスクを示す流れ図の一部である。FIG. 16 is a part of a flowchart showing a sound generation task.

【図17】プリアサイナタスクを示す流れ図である。FIG. 17 is a flowchart showing a pre-assigner task.

【図18】プリアサイン順位設定ルーチンを示す流れ図
である。
FIG. 18 is a flowchart showing a pre-assignment order setting routine.

【図19】エンベロープタスクを示す流れ図の一部であ
る。
FIG. 19 is a part of a flowchart showing an envelope task.

【図20】エンベロープタスクを示す流れ図の一部であ
る。
FIG. 20 is a part of a flowchart showing the envelope task.

【図21】減衰音系の発音量の更新ルーチンを示す流れ
図である。
FIG. 21 is a flowchart showing a routine for updating the sound generation amount of the damped sound system.

【図22】本発明に係る電子楽器のアサイナの作用を説
明するための発音量等と評価レベルの関係の一例を示す
図である。
FIG. 22 is a diagram illustrating an example of a relationship between a sound generation amount and the like and an evaluation level for explaining the operation of the assigner of the electronic musical instrument according to the present invention.

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

20 MIDI回路 22 中央処理装置(CPU) 23 ROM(読出し専用メモリ) 24 RAM(ランダムアクセスメモリ) 26 楽音発生回路 Reference Signs List 20 MIDI circuit 22 Central processing unit (CPU) 23 ROM (read only memory) 24 RAM (random access memory) 26 Musical sound generation circuit

フロントページの続き (56)参考文献 特開 昭63−293595(JP,A) 特開 平1−169496(JP,A) 特開 平2−216196(JP,A) 特開 平2−220098(JP,A) 特開 昭58−97092(JP,A) 特公 平1−28397(JP,B2) (58)調査した分野(Int.Cl.7,DB名) G10H 1/18 101 Continuation of the front page (56) References JP-A-63-293595 (JP, A) JP-A-1-169496 (JP, A) JP-A-2-216196 (JP, A) JP-A-2-220098 (JP , A) JP-A-58-97092 (JP, A) JP-B-1-28397 (JP, B2) (58) Fields investigated (Int. Cl. 7 , DB name) G10H 1/18 101

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 各楽音発生チャネルの楽音の発音量また
はそれに相応する値を検出する第1の検出手段と、 各楽音発生チャネルのノートステータスを検出する第2
の検出手段と、 該第1の検出手段で検出された発音量またはそれに相応
する値に基づき各楽音発生チャネルの評価レベルを演算
する演算手段であって、該第2の検出手段で検出された
ノートステータスがノートオンの楽音発生チャネルにつ
いてはその楽音発生チャネルの評価レベルの演算にあた
ってその楽音発生チャネルが選定され難くなるように重
み付けを行いかつその重み付けをそのノートオン状態の
継続の時間経過に従って減じるよう補正するものと、 該演算手段で演算された各楽音発生チャネルの評価レベ
ルに基づき新たな楽音情報を割り当てる楽音発生チャネ
ルの選定を行う選定手段とを備えた電子楽器のアサイ
ナ。
1. A first detecting means for detecting a tone generation amount of each tone generating channel or a value corresponding thereto, and a second detecting means for detecting a note status of each tone generating channel.
And a calculating means for calculating an evaluation level of each musical tone generating channel based on the amount of sound detected by the first detecting means or a value corresponding thereto, and For a tone generating channel whose note status is note-on, weighting is performed so as to make it difficult to select the tone generating channel in calculating the evaluation level of the tone generating channel, and the weight is reduced as time elapses in the note-on state. An assigner for an electronic musical instrument, comprising: a correction unit configured to perform such correction; and a selection unit that selects a tone generation channel to which new tone information is assigned based on the evaluation level of each tone generation channel calculated by the calculation unit.
【請求項2】 減衰音系の楽音と持続音系の楽音を一緒
に取り扱うマルチティンバ電子楽器に適用されて、減衰
音系の楽音と持続音系の楽音に対して共通に用いられる
請求項1記載の電子楽器のアサイナ。
2. The sound of a decay sound and the sound of a continuous sound are combined.
Applied to multi-timbral electronic musical instruments handling, attenuation
Commonly used for tonal and sustained tones
An assigner for an electronic musical instrument according to claim 1.
JP03160096A 1990-08-06 1991-06-03 Electronic musical instrument assigner Expired - Fee Related JP3117482B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03160096A JP3117482B2 (en) 1990-08-06 1991-06-03 Electronic musical instrument assigner

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP20865490 1990-08-06
JP2-223301 1990-08-24
JP2-208654 1990-08-24
JP22330190 1990-08-24
JP03160096A JP3117482B2 (en) 1990-08-06 1991-06-03 Electronic musical instrument assigner

Publications (2)

Publication Number Publication Date
JPH04362997A JPH04362997A (en) 1992-12-15
JP3117482B2 true JP3117482B2 (en) 2000-12-11

Family

ID=27321637

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03160096A Expired - Fee Related JP3117482B2 (en) 1990-08-06 1991-06-03 Electronic musical instrument assigner

Country Status (1)

Country Link
JP (1) JP3117482B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0553488U (en) * 1991-12-27 1993-07-20 株式会社千葉港商事 Konjac

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2943492B2 (en) * 1992-03-19 1999-08-30 ヤマハ株式会社 Electronic musical instrument

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0553488U (en) * 1991-12-27 1993-07-20 株式会社千葉港商事 Konjac

Also Published As

Publication number Publication date
JPH04362997A (en) 1992-12-15

Similar Documents

Publication Publication Date Title
JPH0997064A (en) Automatic musical performance data processor
JP3117482B2 (en) Electronic musical instrument assigner
JP3372124B2 (en) Electronic musical instrument
JP2500489B2 (en) Electronic musical instrument
US5280129A (en) Assigning device which assigns new musical tones to tone-generating channels based upon a successive strike relation among the channels
JP3694172B2 (en) Reverberation resonance apparatus and reverberation resonance method
JP2962217B2 (en) Music generating apparatus and method
JP2525853B2 (en) Continuous hit processing device for electronic musical instruments
JPH05158477A (en) Assigner for electronic musical instrument
JPH05150784A (en) Assigner for electronic musical instrument
JPH056181A (en) Beat processing device for electronic musical instrument
JPH0619474A (en) Assignor of electronic musical instrument
JPH0535271A (en) Assigner for electronic musical instrument
JPH05134668A (en) Assigner of multi-timbre electronic musical instrument
JP3152198B2 (en) Music sound generation method and music sound generation device
JPH04218098A (en) Assigner of multitimbre electronic musical instrument
JPH05150783A (en) Assigner for electronic musical instrument
JPH052392A (en) Assignment device of electronic musical instrument
JP3572847B2 (en) Sound source system and method using computer software
JP2715795B2 (en) Musical sound synthesizer having pronunciation assigning means
JP3646611B2 (en) Music generator
JP2640267B2 (en) Electronic musical instrument
JP3067145B2 (en) Envelope generation control device, sound emission form control device, envelope generation control method, and sound emission form control method
JP3048526B2 (en) Electronic musical instrument
JPH08137469A (en) Frequency characteristic controller for musical tone signal

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees