JPH04499A - Electronic musical instrument - Google Patents

Electronic musical instrument

Info

Publication number
JPH04499A
JPH04499A JP2184932A JP18493290A JPH04499A JP H04499 A JPH04499 A JP H04499A JP 2184932 A JP2184932 A JP 2184932A JP 18493290 A JP18493290 A JP 18493290A JP H04499 A JPH04499 A JP H04499A
Authority
JP
Japan
Prior art keywords
task
event
truncation
flag
sound generation
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.)
Pending
Application number
JP2184932A
Other languages
Japanese (ja)
Inventor
Masashi Nishikawa
雅士 西川
Takenori Yamamori
山森 丈範
Takashi Toyomura
豊村 隆
Minoru Fujisawa
實 藤澤
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 JP2184932A priority Critical patent/JPH04499A/en
Publication of JPH04499A publication Critical patent/JPH04499A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To reduce the feeling of incongruity as to performance representation by setting and storing truncation inhibition and permit information in a storage means corresponding to a musical sound generation channel based upon performance information and altering the storage means by an altering means. CONSTITUTION:A setting means 2 stores and sets the truncation and permit information in the storage means 1 corresponding to the musical sound generation channel based upon performance information and controls whether truncation by a truncating means 4 is inhibited or permitted according to the setting contents and the truncation of a channel which exerts large influence upon performance representation is inhibited when a new musical sound is assigned. The inhibition information of the means 1 is freely altered into the permission information through the altering means 3 controlled by a CPU, etc., as the sound generation of the channel musical sound is elapsed. This constitution performs proper truncation inhibition control to reduce the feeling of incongruity as to the performance representation.

Description

【発明の詳細な説明】 (産業上の利用分野) 本発明は、電子楽器に関し、より詳しくは新たな楽音の
発音における楽音発生チャネルへの楽音の割当てに際し
て、発音中の楽音発生チャネルを楽音発生チャネルの不
足によりトランケートさせる場合の技術に関するもので
ある。
Detailed Description of the Invention (Field of Industrial Application) The present invention relates to an electronic musical instrument, and more specifically, when assigning a musical tone to a musical tone generation channel in the generation of a new musical tone, the present invention relates to an electronic musical instrument. This relates to a technique for truncating due to lack of channels.

(従来の技術) 従来、発音中の楽音発生チャネルをトランケートさせる
場合には、例えば最も早く発音を開始した楽音発生チャ
ネルをトランケートして、新たな楽音を割当てるように
している。
(Prior Art) Conventionally, in order to truncate a musical tone generating channel that is currently producing sound, for example, the musical tone generating channel that started producing sound earliest is truncated and a new musical tone is assigned.

また、他には、エンベロープの減衰が進み、最もエンベ
ロープレベルが低い楽音が割当てられている楽音発生チ
ャネルをトランケートして、新たな楽音を割当てるよう
にしている。
Another method is to truncate the musical tone generation channel to which the musical tone with the lowest envelope level is assigned, and to allocate a new musical tone.

(発明が解決しようとする課題) ところで、新たな楽音を割当てるためにトランケートさ
せる楽音発生チャネルとしては、トランケートしても影
響の少ない、言い換えればトランケートによって演奏表
現に与える影響が少ないものが選定されることが望まし
い。
(Problem to be Solved by the Invention) By the way, as the musical tone generation channel to be truncated in order to allocate a new musical tone, one is selected that has little effect even if truncated, or in other words, has little effect on performance expression due to truncation. This is desirable.

しかし、前者によれば、遅く発音を開始したけれども演
奏表現に与える影響が少ない楽音発生チャネルがあるに
もかかわらず、演奏表現に与える影響が大きい早(発音
を開始した楽音発生チャネルがトランケートされ、新た
な楽音が割当てられることがある。この場合には、演奏
表現上において違和感をもたらすという問題点がある。
However, according to the former method, even though there is a musical sound generation channel that starts producing sound later but has little effect on performance expression, the musical sound generation channel that starts producing sound early (which has a large influence on performance expression) is truncated, A new musical tone may be assigned.In this case, there is a problem in that it creates a sense of discomfort in the performance expression.

また、後者によれば、他の楽音との関係、音色等でエン
ベロープレベルは大きいが演奏表現に与える影響が少な
い楽音発生チャネルがあるにもかかわらず、エンベロー
プレベルが小さいけれども演奏表現に与える影響が大き
い楽音発生チャネルがトランケートされ、新たな楽音が
割当てられることがある。この場合にも同様に、演奏表
現上において違和感をもたらすという問題点がある。
According to the latter, there is a musical sound generation channel whose envelope level is large but has little effect on performance expression due to its relationship with other musical sounds, timbre, etc.; A large tone generation channel may be truncated and a new tone assigned. In this case as well, there is a problem in that it gives a sense of discomfort in terms of performance expression.

本発明は、このような問題点を解消することを目的とし
、発音中の楽音発生チャネルを楽音発生チャネルの不足
によりトランゲートするに際し、演奏表現上における違
和感を軽減することができる電子楽器を提供することに
ある。
SUMMARY OF THE INVENTION The present invention aims to solve these problems and provides an electronic musical instrument that can reduce the sense of discomfort in performance expression when transcribing a musical sound generation channel that is currently producing sound due to a lack of musical sound generation channels. It's about doing.

(課題を解決するための手段) 前述された目的を達成するために、本発明による電子楽
器の構成上の特徴は、第1図に示されているように、 (a)  各楽音発生チャネルに対応してトランケート
禁止・許諾に関するトランケート情報を記憶可能な記憶
手段(1)、 (b)  この記憶手段(1)に、演奏情報にもとづき
その演奏情報に対する楽音が割当てられる楽音発生チャ
ネルに対応してトランケート禁止のトランケート情報を
、記憶設定する設定手段(2)、(c)  前記記憶手
段(1)に記憶されるトランケート禁止のトランケート
情報を対応する楽音発生チャネルの楽音の発音の経過に
したがってトランケート許諾のトランケート情報に記憶
変更する変更手段(3)および (d)トランケートに際して、前記記憶手段(1)にト
ランケート許諾のトランケート情報が記憶されている楽
音発生チャネルを対象にしてトランケートさせるトラン
ケート手段(4) を具えることである。
(Means for Solving the Problems) In order to achieve the above-mentioned object, the structural features of the electronic musical instrument according to the present invention are as shown in FIG. Storage means (1) capable of correspondingly storing truncate information regarding truncation prohibition/permission; Setting means (2), (c) for storing and setting truncate information for which truncation is prohibited; and (c) for allowing truncation of truncate information for which truncation is prohibited stored in the storage means (1) according to the progress of sound generation of musical tones of the corresponding musical sound generation channel. and (d) truncation means (4) for truncating a musical tone generation channel for which truncation information indicating truncation permission is stored in the storage means (1) when truncate. It is to have the following.

(作 用) トランケート禁止・許諾に関するトランケート情報を記
憶可能な記憶手段(1)に、演奏情報にもとづいて設定
手段(2)によりその演奏情報にもとづく楽音が割当て
られる楽音発生チャネルに対応させてトランケート禁止
のトランケート情報を記憶設定する。また、変更手段(
3)により、記憶されるトランケート禁止のトランケー
ト情報に対応する楽音発生チャネルの楽音の発音の経過
にしたがってそのトランケート禁止のトランケート情報
をトランケート許諾のトランケート情報に記憶変更する
(Function) The storage means (1) capable of storing truncate information regarding truncation prohibition/permission is truncated based on the performance information by the setting means (2) in accordance with the musical sound generation channel to which the musical sound based on the performance information is assigned. Store and set prohibited truncation information. In addition, the change means (
3), the truncate information that prohibits truncation is stored and changed to truncate information that allows truncation in accordance with the progress of sound generation of musical tones of the musical tone generation channel corresponding to the stored truncate information that prohibits truncation.

トランケートに際しては、記憶手段(1)にトランケー
ト許諾のトランケート情報が記憶されている楽音発生チ
ャネルを対象にしてトランケート手段(4)により新た
な楽音を割当てるようにトランケートする。
At the time of truncation, the truncation means (4) assigns a new musical tone to the musical tone generation channel for which truncation information of truncation permission is stored in the storage means (1).

(発明の効果) したがって、新たな楽音を割当てるに際して演奏情報に
もとづき演奏表現に与える影響の大きな楽音発生チャネ
ルのトランケートが禁止されるようになり、演奏表現上
における違和感を軽減することができる。
(Effects of the Invention) Therefore, when a new musical tone is assigned, truncation of musical tone generation channels that have a large influence on performance expression is prohibited based on performance information, and discomfort in performance expression can be reduced.

(実施例) 次に、本発明による電子楽器の具体的実施例につき、図
面を参照しつつ説明する。
(Embodiments) Next, specific embodiments of the electronic musical instrument according to the present invention will be described with reference to the drawings.

〔第1実施例〕 トランケート禁止フラグにもとづいて所定時間において
トランケートを禁止する場合 まず、第2図において、操作パネル20に設けられてい
るモードの選択、演奏の開始、停止、演奏データの設定
変更等の指示を行なう複数個の操作子の操作状態は、パ
ス21を介して操作子データとしてマイコン22に供給
される。このマイコン22は、所定プログラムを実行す
る中央処理装置(cPU)22Aと、このプログラムお
よび20種類のパターンデータ、楽音発生に関するデー
タ等の各種処理に必要なデータを記憶する読出し専用メ
モリ(ROM)22Bと、演奏データ、操作子データ等
を記憶する各種マツプおよびプログラムを実行するに必
要な各種レジスタ、フラグ、FIFO等を含むワーキン
グエリアが設定されている読出し書込み可能メモリ(R
AM)22Cと、所定時間(1mSeC)間隔でCP 
U22Aにタイマインクラブドをかけるタイマ22Dと
より構成されている。また、操作パネル20における操
作子の操作状態等はマイコン22の制御によって表示回
路23により表示される。
[First Embodiment] When truncating is prohibited for a predetermined time based on the truncate prohibition flag First, in FIG. The operation states of a plurality of operators for giving instructions such as the following are supplied to the microcomputer 22 as operator data via a path 21. This microcomputer 22 includes a central processing unit (cPU) 22A that executes a predetermined program, and a read-only memory (ROM) 22B that stores data necessary for various processes such as this program, 20 types of pattern data, and data related to musical tone generation. A readable/writable memory (R
AM) 22C and CP at predetermined time (1mSeC) intervals.
It is composed of a timer 22D that applies a timer increment to U22A. Further, the operation status of the operators on the operation panel 20 is displayed by the display circuit 23 under the control of the microcomputer 22.

CP U22Aは、RAM22Cに設定されているワー
キングエリアのマツプに記憶されている演奏データ、操
作子データ等にもとづき、ROM22Bに記憶されてい
る所定プログラムを実行することにより、本実施例にお
いては16個の楽音発生チャネルを有する楽音発生回路
24を制御している。そして、所定手段により割当てら
れた楽音発生チャネルにより所望の楽音信号を生成し、
増幅器25を介してスピーカ26から楽音として放音さ
せている。
The CPU 22A executes a predetermined program stored in the ROM 22B based on the performance data, operator data, etc. stored in the working area map set in the RAM 22C. It controls a musical tone generation circuit 24 having musical tone generation channels. Then, a desired musical tone signal is generated by the musical tone generation channel assigned by a predetermined means,
A musical tone is emitted from a speaker 26 via an amplifier 25.

なお、楽音発生チャネルは、楽音発生の指示により楽音
発生パラメータにもとづき楽音信号を生成して時間経過
に対応して生成する楽音信号を推移させる。また、次に
到達するエンベロープレベルを示す目標値と所定時間当
たりのエンベロープレベルの変化を示すレートとを補間
してなめらかなエンベロープレベルを発生させるととも
に、急速減衰の指示によりエンベロープレベルを急速減
衰レートにしたがって減衰させて、エンベロープレベル
が“0”に達するとトランケート終了FIFOに楽音発
生チャネル番号を積む。
Note that the musical tone generation channel generates a musical tone signal based on musical tone generation parameters in response to an instruction to generate a musical tone, and changes the generated musical tone signal in accordance with the passage of time. In addition, a smooth envelope level is generated by interpolating the target value indicating the next envelope level to be reached and the rate indicating the change in envelope level per predetermined time, and the envelope level is changed to a rapid decay rate by a rapid decay instruction. Therefore, it is attenuated, and when the envelope level reaches "0", the musical tone generation channel number is loaded into the truncation end FIFO.

ところで、ROM22Bには、トランケート禁止フラグ
の“l”および“0°゛に対応させて、いずれのステッ
プまで該当楽音発生チャネルのトランケートを禁止する
か否かを定めるトランケート禁止ステップ数が、音色番
号毎に記憶設定されている。なお、トランケート禁止フ
ラグの“1゛はトランケート禁止区間が長く、長いリリ
ースが得られるように設定されるトランケート禁止ステ
ップ数に対応し、またトランケート禁止フラグの“0”
はトランケート禁止区間が短い、短いリリースが得られ
るように設定されるトランケート禁止ステップ数に対応
している。例えば、スネア系の音色は、通常リリースが
余り長くなくても良いために、トランケート禁止フラグ
が“0゛の場合にはアタックを終了してリリースを開始
して間もなくトランケートが可能なトランケート禁止ス
テップ数とし、“1パの場合にはより長いリリースが得
られるようなトランケート禁止ステップ数としている。
By the way, in the ROM 22B, the number of truncate prohibition steps, which determines up to which step truncation of the corresponding musical tone generation channel is prohibited, is stored for each tone number, corresponding to the truncate prohibition flag "l" and "0°". The truncate prohibition flag "1" corresponds to a long truncate prohibition section and the number of truncate prohibition steps set to obtain a long release, and the truncate prohibition flag "0"
corresponds to the number of truncate-prohibited steps set to obtain a short truncate-prohibited section and a short release. For example, snare sounds usually do not require a very long release, so if the truncate prohibition flag is 0, the number of truncate prohibition steps that can be truncated immediately after the attack ends and the release starts. ``In the case of 1 pass, the number of steps in which truncation is prohibited is set such that a longer release can be obtained.

しかし、クラッシュシンバルに対応する音色はできるだ
け長く発音させたいために、他の音色と較べて例えトラ
ンケート禁止フラグが“0”であっても長いリリースが
得られるように、トランケート禁止区間が長いトランケ
ート禁止ステップ数としている。
However, because we want the tone corresponding to a crash cymbal to sound as long as possible, we set the truncate prohibition section to a long truncate prohibition section so that a longer release can be obtained even if the truncate prohibition flag is "0" compared to other tones. This is the number of steps.

次に、RAM22Cのワーキングエリアに設定されてい
るソングデータマツプ、パターンマツプ、タスク管理マ
ツプ、楽音発注チャネル管理マツプおよびエンベロープ
の管理マツプ、さらには演奏データFIFOについて説
明する。なお、第3図には各一部が示されている。
Next, the song data map, pattern map, task management map, tone ordering channel management map, envelope management map, and performance data FIFO set in the working area of the RAM 22C will be explained. Note that a part of each is shown in FIG.

☆ソングデータマツプ(第3図(A))“0〜15”の
16ステツプにわたる各ソングステップ番号に対応して
パターン番号を記憶する。
☆Song data map (Fig. 3(A)) Pattern numbers are stored corresponding to each song step number of 16 steps from "0 to 15".

☆パターンマツプ(第3図(B)) 8パターンを記憶し、各パターンにおけるパターン番号
を記憶するとともに、“0〜7°゛の8パートからなる
各パートのパート番号、さらには各パートのパート番号
に対応して音色を示す音色番号と、4/4拍子の場合の
16分音符(1テンポクロツク)に対応したタイミング
を1パターンステツプとする“0〜15°゛の16ステ
ツプにわたる各パターンステップ番号に応じて各楽音の
強さを示すベロシティおよびトランケート禁止フラグと
を記憶する。
☆Pattern map (Fig. 3 (B)) 8 patterns are memorized, and the pattern number for each pattern is memorized, as well as the part number of each part consisting of 8 parts from 0 to 7°, and the part of each part. Tone color number indicating the tone color corresponding to the number, and each pattern step number covering 16 steps from 0 to 15°, where one pattern step is the timing corresponding to a 16th note (1 tempo clock) in the case of 4/4 time. The velocity and truncate prohibition flag indicating the strength of each musical tone are stored in accordance with the truncation prohibition flag.

☆タスク管理マツプ(第3図(c)) “°1〜8”による各タスクの優先順位を示すタスク番
号に対応して、■“1°゛でもってタイマ処理が必要な
ことを示すタイマ処理要求フラグと、■″0″でもって
タスクがラン、“1″でもってタスクがレディ、“2パ
でもってタスクがウェイトであることを示すステータス
と、■タスクにおける待ち中のイベントを示す待ちイベ
ント値と、■タスクの第1イヘント、第2イベント・・
・の各イベント毎に°1゛でもってイベントの発生を示
すイベント発注フラグとを記憶する。
☆Task management map (Figure 3 (c)) Corresponding to the task number that indicates the priority of each task with "°1~8", ■ "1°" indicates that timer processing is required. Request flag, ■ ``0'' indicates that the task is running, ``1'' indicates that the task is ready, and ``2 pass'' indicates that the task is in wait status, and ■ A wait event that indicates the event that the task is waiting for. The value, and the 1st event and 2nd event of the task...
・For each event, an event order flag indicating the occurrence of the event is stored.

☆楽音発生チャネル管理マツプ(第3図(D))′“0
〜15°゛によって示す各楽音発生チャネルの各楽音発
生チャネル番号に対応して、■各楽音発生チャネルの現
在発音中の楽音の発音レベルを示す現発音しヘルと、■
” 1 ”でもって現在のトランケートの禁止を示す現
トランケート禁止フラグと、■“°1“でもってトラン
ケート中を示すトランケート中フラグと、■各楽音発生
チャネルに新しく前当てられた楽音において“1′′で
もって処理待ちを示す処理待ちフラグと、■音色を示す
音色番号と、■楽音の強さを示すベロシティと、■′“
1パでもってトランケートの禁止を示すトランケート禁
止フラグと、■新たな楽音発生に関する楽音発生パラメ
ータ群と、■新たな楽音のエンベロープ生成に関するエ
ンヘロープ生成パラメータ群とを記憶する。
☆Musical tone generation channel management map (Figure 3 (D))'“0
Corresponding to each musical sound generation channel number of each musical sound generation channel indicated by ~15°゛, ■Current sound generation level indicating the sound generation level of the musical sound currently being generated for each musical sound generation channel;
■The current truncate prohibition flag indicates that truncation is currently prohibited with "1"; ■The truncate flag indicates that truncation is in progress with "°1"; `` A processing waiting flag indicating that processing is pending, ■ A tone number indicating the tone color, ■ Velocity indicating the strength of the musical tone, ■ ′“
A truncate prohibition flag indicating prohibition of truncation in one pass, (1) a group of musical tone generation parameters related to the generation of a new musical tone, and (2) a group of envelope generation parameters related to the generation of an envelope of a new musical tone are stored.

☆エンベローフ管理マン’7” (M3図(E))各楽
音発生チャネルに対応する“0〜15゛によっテ示ス各
エンヘローブチャネルのエンヘロープチャネル番号に対
応して、■現在のエンヘロープレヘルヲ示す現エンヘロ
ープレヘルと、■次に到達するエンベロープタスクを示
す目標値と、■所定単位時間(5mSec)当たりのエ
ンベロープレベルの変化を示すレートと、■目標値およ
びレートに関する現在のステップを示す現ステップ番号
と、■トランケートを禁止するステップ数、言い換えれ
ば時間(−ステップ数×所定単位時間(5mSec))
を示すトランケート禁止ステップ数と、各ステップにお
ける■目標値および■レートとを記憶する。
☆Envelope management man '7' (M3 figure (E)) Corresponding to each musical sound generation channel, the text is indicated by 0 to 15. The current enhero pre-help indicating the en-hero pre-help, ■ the target value indicating the next envelope task to be reached, ■ the rate indicating the change in envelope level per predetermined unit time (5 mSec), and ■ relating to the target value and rate. The current step number indicating the current step, and the number of steps for which truncation is prohibited, in other words, time (-number of steps x predetermined unit time (5 mSec))
The number of steps in which truncation is prohibited, and the target value and rate at each step are stored.

☆演奏データFIFO 演奏データを記憶するとともに、リング状に構成されて
書込みポインタおよび読出しポインタで示されているア
ドレスに対して書込みおよび続出しが行なわれ、書込み
および読出しを行なう毎に各ポインタが進められるよう
に構成されている。
☆Performance data FIFO Stores performance data, and is configured in a ring shape, and writes and continues writing to the addresses indicated by the write pointer and read pointer, and each pointer advances each time it is written or read. It is configured so that

次に、前述のように構成された本発明による電子楽器の
基本的動作について詳述する。
Next, the basic operation of the electronic musical instrument according to the present invention configured as described above will be explained in detail.

本発明による電子楽器においては各タスク(操作子タス
ク、グレイタスク、メインアサイナタスク、発音タスク
、プリアサイナタスク、エンベロープタスク、エデイツ
トタスク、表示タスク)はマルチタスキングに処理され
るとともに、各タスク間の優先処理等はモニタプログラ
ムにより行なわれる。
In the electronic musical instrument according to the present invention, each task (manipulator task, gray task, main assigner task, pronunciation task, pre-assigner task, envelope task, edit task, display task) is multitasked, and each Priority processing between tasks is performed by a monitor program.

まず、モニタプログラムについて第4図および第5図に
示されているフローチャートにもとづき説明する。
First, the monitor program will be explained based on the flowcharts shown in FIGS. 4 and 5.

リセットルーチン(第4図(A)) 電源の投入時等においてリセットがかかると実行する。Reset routine (Figure 4 (A)) Executes when a reset is applied, such as when the power is turned on.

ZA−1タスク管理マツプにおける全てのタスク番号に
関するステータスをレディを示す′“1パに設定し、ま
たタイマ処理要求フラグ、待ちイベント値およびイベン
ト発生フラグを°“O“に設定するとともに、“1゛で
もってタイマインタラブド処理を開始していることを示
すタイマインクラブド処理開始フラグTl5Fを“O”
に設定する等の初期設定する。
The status of all task numbers in the ZA-1 task management map is set to '1' indicating ready, and the timer processing request flag, waiting event value and event occurrence flag are set to 'O'.゛Sets the timer-interrupted processing start flag Tl5F, which indicates that the timer-interrupted processing is started, to “O”.
Perform initial settings such as setting to .

ZA−2モニタコール要求元のタスク番号を示す要求元
タスク番号N5TKを“1”に設定するとともに、タス
ク管理マツプのタスク番号が“1′”のステータスを°
′0′”に設定し、操作子タスクをランさせる。
Set the request source task number N5TK, which indicates the task number of the ZA-2 monitor call request source, to "1" and change the status of the task number "1'" on the task management map.
'0''' and run the manipulator task.

・イベント待ちモニタコールルーチン(第4図(B)) ラン中のタスクがイベント待ちになると実行する。・Event wait monitor call routine (Figure 4 (B)) Executes when a running task is waiting for an event.

ZB−1タスク管理マツプにおける要求元タスク番号N
5TKに対応するタスク番号において、モニタコール要
求イベントの種類を示す要求元イベント値N5ETに対
応するイベント発生フラグの第nイベントがイベントの
発生を示す“°1゛であるか否かを判断する。この第n
イベントが“1°”でイベントの発生を示している場合
にはイベント待ちモニタコールを行なったタスクに復帰
する。なお、要求元イベント値N5ETとイベント発生
フラグの第nイベントとの対応は、例えば要求元イベン
ト値N5ETが“°1”である場合には第1イベントの
、要求元イベント値N5ETが“°2゛である場合には
第2イベントの、要求元イベント値N5ETが“3°゛
である場合には第1イベントまたは第2イベントに対応
するようにして、要求元イベント値N5ETを2進数表
現した場合の各ビットと第nイベントのnとで対応させ
る。
Request source task number N in the ZB-1 task management map
In the task number corresponding to 5TK, it is determined whether the nth event of the event occurrence flag corresponding to the request source event value N5ET indicating the type of monitor call request event is "°1" indicating the occurrence of an event. This nth
If the event is "1°" indicating the occurrence of an event, the task returns to the task that made the event wait monitor call. Note that the correspondence between the request source event value N5ET and the nth event of the event occurrence flag is such that, for example, when the request source event value N5ET is "°1", the request source event value N5ET of the first event is "°2". If the request source event value N5ET is ``, then the request source event value N5ET of the second event is ``3゛'', then the request source event value N5ET is expressed in binary numbers so that it corresponds to the first event or the second event. Each bit of the case is associated with n of the n-th event.

ZB−2ステップZB−1における判断においてイベン
ト発生フラグの第nイベントが“1′”でなくてイベン
トの発生を示していない場合には、要求元タスク番号N
5TKに対応するタスク管理マツプのタスク番号におけ
るステータスをウェイトを示す“2゛に設定し、待ちイ
ベント値を要求元イベント値N5ETとするとともに、
処理の再開に備えて要求元タスクにおいて使用中のレジ
スタ等の内容をスタック領域に退避する等の中断処理を
行なう。
ZB-2 If the nth event of the event occurrence flag is not "1'" and does not indicate the occurrence of an event in the judgment in step ZB-1, the requesting task number N
Set the status in the task number of the task management map corresponding to 5TK to "2" indicating the weight, set the waiting event value to the request source event value N5ET, and
In preparation for resuming processing, interrupt processing is performed such as saving the contents of registers and the like being used by the requesting task to the stack area.

ZB−3タスク管理マツプにおいてイベント待ちモニタ
コールを行なったタスクより優先順位が低くてかつ対応
するステータスが“1”でレディを示すタスクをタスク
番号順に探し、レディを示すタスクがあるか否かを判断
する。
In the ZB-3 task management map, search for tasks that have a lower priority than the task that made the event wait monitor call and whose corresponding status is "1" and indicate ready, in order of task number, and check whether there is a task that indicates ready. to decide.

このレディを示すタスクがない場合には、最早や処理す
るべきタスクがないために、要求元タスク番号N5TK
をスリーブを示す“°9゛に設定してスリーブする。な
お、スリーブからの起動はタイマ等からのハードウェア
割込みによる。
If there is no task indicating this ready status, there is no task to process anymore, so requesting task number N5TK
is set to ``°9'', which indicates a sleeve, and the sleeve is activated.The activation from the sleeve is performed by a hardware interrupt from a timer or the like.

ZB−4ステップZB−3における判断においてレディ
を示すタスクがある場合には、要求元タスク番号N5T
Kをレディを示すタスクのタスク番号にするとともに、
レディを示すタスクのタスク番号に対応するタスク管理
マツプのステータスを“0”に設定し、対応するタスク
をランさせる。なお、ランに際しては該タスクの中断処
理においてスタック領域に退避した内容等を元のレジス
タ等に戻す等の再開処理を行なう。
ZB-4 If there is a task that indicates ready in the judgment in step ZB-3, the requesting task number N5T
Let K be the task number of the task indicating ready, and
The status of the task management map corresponding to the task number of the task indicating ready is set to "0", and the corresponding task is run. Note that during the run, restart processing is performed, such as returning the contents saved in the stack area during the task suspension processing to the original registers.

イベント発生モニタコールルーチン(第4図(c)) タスクにおいてイベントを発生した時に実行する。Event occurrence monitor call routine (Figure 4(c)) Executes when an event occurs in a task.

ZC−1タスク管理マツプにおけるモニタコール要求先
のタスク番号を示す要求先タスク番号NDTKに対応す
るタスク番号において、モニタコール要求先のイベント
値を示す要求先イベント値NDETに対応するイベント
発生フラグの第nイベントを“1゛に設定する。なお、
イベント発生フラグの第nイベントに対する設定に際し
ては、例えば要求先イベント値NDETが“1”である
場合には第1イベントの、要求先イベント値NDETが
“′2”である場合には第2イベントのイベント発注フ
ラグを“1パに設定する。
In the task number corresponding to the request destination task number NDTK indicating the task number of the monitor call request destination in the ZC-1 task management map, the event occurrence flag corresponding to the request destination event value NDET indicating the event value of the monitor call request destination. Set the n event to “1”.
When setting the event occurrence flag for the nth event, for example, if the requested event value NDET is "1", the first event is set, and if the requested event value NDET is "'2", the second event is set. Set the event order flag for “1pa”.

ZC−2要求先タスク番号NDTKに対応するタスク管
理マツプのタスク番号におけるステータスが°゛2゛の
ウェイトでかつ待ちイベント値が要求先イベント値ND
ETに対応して待ち中のイベントであるか否かを判断す
る。このステータスがウェイトでなく、または待ちイベ
ント値が要求先イベント値NDETに対応せず待ち中の
イベントでない場合には、このモニタコールを行なった
タスクに復帰する。なお、待ちイベント値と要求先イベ
ント値N0ETとの対応は、例えば待ちイベント値が“
1°゛である場合には要求先イベント値NDETが“l
゛、待ちイベント値が“2”である場合には要求先イベ
ント値NDETが“t 2 u、待ちイベント値が“3
゛である場合には要求先イベント値NDETが“1”ま
たは“2゛であるときに対応していると判断するように
して、待ちイベント値を2進数表現した場合の各ビット
と要求先イベント値NDETとで対応させる。
ZC-2 The status in the task number of the task management map corresponding to the request destination task number NDTK is a weight of °゛2゛, and the waiting event value is the request destination event value ND.
It is determined whether or not it is a waiting event in response to the ET. If this status is not wait, or if the waiting event value does not correspond to the requested event value NDET and is not a waiting event, the task returns to the task that made this monitor call. Note that the correspondence between the waiting event value and the request destination event value N0ET is, for example, if the waiting event value is “
1°, the request destination event value NDET is “l”.
゛, If the wait event value is "2", the request destination event value NDET is "t 2 u", and the wait event value is "3".
If the request destination event value NDET is ``1'' or ``2'', it is determined that the request destination event value corresponds to ``1'' or ``2''. It is made to correspond with the value NDET.

ZC−3ステップZC−2における判断において要求先
タスク番号NDTKに対応するタスク管理マツプのタス
ク番号におけるステータスが“2゛のウェイトでかつ待
ちイベント値が要求先イベントNDETに対応する待ち
中のイベントである場合には、このステータスをレディ
を示す“1”に設定する。
ZC-3 In the judgment in step ZC-2, the status of the task number in the task management map corresponding to the request destination task number NDTK is "2" weight and the waiting event value is a waiting event corresponding to the request destination event NDET. If so, this status is set to "1" indicating ready.

ZC−4要求先タスク番号NDtKが要求元タスク番号
N、STK未満か否かにより要求先タスクの優先順位が
高いか否かを判断する。要求先タスク番号NDTKが要
求元タスク番号N5TK未満でなくて要求先タスクの優
先順位が低い場合には、このモニタコールを行なった現
タスクに復帰する。
ZC-4 It is determined whether the request destination task has a high priority depending on whether the request destination task number NDtK is less than the request source task number N, STK. If the request destination task number NDTK is not less than the request source task number N5TK and the priority of the request destination task is low, the task returns to the current task that made this monitor call.

ZC−5ステップZC−4における判断において要求先
タスク番号NDTKが要求元タスク番号N5TK未満で
要求先タスクの優先順位が高い場合には、要求元タスク
番号N5TKに対応するタスク管理マツプのタスク番号
におけるステータスをレディを示す“1パに設定すると
ともに、処理の再開に備えて要求元タスクにおいて使用
中のレジスタ等の内容をスタック領域に退避する等の中
断処理を行なう。
ZC-5 In the judgment in step ZC-4, if the requesting task number NDTK is less than the requesting task number N5TK and the priority of the requesting task is high, the task number in the task management map corresponding to the requesting task number N5TK is The status is set to "1pa" indicating ready, and interruption processing such as saving the contents of registers and the like being used by the requesting task to the stack area is performed in preparation for restarting the processing.

ZC−6要求元タスク番号N5TKを要求先タスク番号
NDTKにするとともに、要求先タスク番号NDTKに
対応するタスク管理マツプのタスク番号におけるステー
タスをランを示す′0”に設定し、要求先タスクをラン
させる。なお、ランに際しては該要求先タスクの中断処
理においてスタック領域に退避した内容等を元のレジス
タ等に戻す等の再開処理を行なう。
ZC-6 Set the request source task number N5TK to the request destination task number NDTK, set the status in the task number of the task management map corresponding to the request destination task number NDTK to '0'' indicating run, and set the request destination task to run. Note that during the run, restart processing is performed such as returning the contents saved in the stack area in the interruption processing of the requested task to the original registers.

タイマインクラブド処理ルーチン(第5図)タイマから
タイマインクラブドがかかると、まず各タスクに対応す
るタイマカウンタを調べ、“1″を超えている場合には
1′”だけデクリメントし、“′1°゛を超えていない
場合にはタスク管理マツプのタスク番号におけるイベン
ト発生フラグの対応する(第n)イベントをイベントの
発生を示す“1パに設定するとともに、タイマイベント
待ち中であるときにはステータスをレディを示す“1“
に設定する。次に、優先順位の高いタスクから順次にタ
イマイベントを発生すべきか否かを判断して条件を満た
すタスクをランさせる。
Timer include processing routine (Figure 5) When the timer includes the timer, first check the timer counter corresponding to each task, and if it exceeds "1", decrement it by 1', and If it does not exceed '1°', the corresponding (nth) event of the event occurrence flag for the task number in the task management map is set to '1', which indicates the occurrence of an event, and if the timer event is being waited for, “1” indicates the status is ready.
Set to . Next, it is determined whether or not a timer event should be generated in order from the tasks with the highest priority, and the tasks that meet the conditions are run.

ZD−1タイマインクラブド処理開始フラグTl5Fが
” 1 ”であるか否かを判断する。このタイマインク
ラブド処理開始フラグTl5Fが“1″でない場合には
、全てのタスクの初期設定が未だ終了していないために
、タイマインタラブドを終了してタイマインクラブド発
生時に実行していたタスクに戻る。
It is determined whether the ZD-1 timer included processing start flag Tl5F is "1". If this timer-in-interrupted processing start flag Tl5F is not "1", the initial settings of all tasks have not been completed yet, so the timer-in-interrupted process is terminated and executed when the timer-in-interrupted occurs. Return to task.

ZD−2ステップZD−1における判断においてタイマ
インクラブド処理開始フラグTl5Fが“1“である場
合には、タイマインタラブド処理対象のタスク番号を示
すタイマインクラブド処理対象番号TCTNを“8”に
設定する。
ZD-2 If the timer included processing start flag Tl5F is "1" in the judgment in step ZD-1, the timer included processing target number TCTN indicating the task number of the timer interlinked processing target is set to "8". Set to .

ZD−3タイマインタラブド処理対象番号TCTNに対
応するタスク管理マツプのタスク番号におけるタイマ処
理要求フラグが”1”であるか否かを判断する。このタ
イマ処理要求フラグが“1パでない場合には、ステップ
ZD8に進む。
It is determined whether the timer processing request flag in the task number of the task management map corresponding to the ZD-3 timer interwoven processing target number TCTN is "1". If this timer processing request flag is not "1pa", the process advances to step ZD8.

ZD−4ステップZD−3における判断においてタスク
管理マツプのタスク番号におけるタイマ処理要求フラグ
が“1”である場合には、タイマインクラブド処理対象
番号TCTNに対応するタスクのタイマカウンタの値を
示す第Nタスクタイマカウンタ値TCNE [TCTN
]が“1”を超えているか否かを判断する。この第Nタ
スクタイマカウンタ値TCNE [TCTN]が“1′
′を超えている場合には、ステップZD10に進む。
ZD-4 If the timer processing request flag for the task number in the task management map is "1" in the judgment in step ZD-3, it indicates the value of the timer counter of the task corresponding to the timer included processing target number TCTN. Nth task timer counter value TCNE [TCTN
] is greater than "1". This Nth task timer counter value TCNE [TCTN] is “1”
If it exceeds ', the process advances to step ZD10.

ZD−5ステップZD−4における判断において第Nタ
スクタイマカウンタ値TCNE [TCTN]が“1′
”を超えていない場合には、まず第Nタスクタイマカウ
ンタ値TCNE [TCTN]にタイマインタラブド処
理対象番号TCTNに対応するタスクの時間間隔を示す
第Nタスク時間間隔TCND [TCTN]を加算して
、この値を新たな第Nタスクタイマカウンタ値TCNE
 [TCTN]とする。次に、タイマインクラブド処理
対象番号TCTNに対応するタスク管理マツプのタスク
番号におけるイベント発生フラグの第1イベントを“′
1°゛に設定する。
ZD-5 In the judgment in step ZD-4, the Nth task timer counter value TCNE [TCTN] is “1”.
”, first add the N-th task time interval TCND [TCTN] indicating the time interval of the task corresponding to the timer-interrupted processing target number TCTN to the N-th task timer counter value TCNE [TCTN]. , this value is set as the new Nth task timer counter value TCNE
[TCTN]. Next, set the first event of the event occurrence flag in the task number of the task management map corresponding to the timer included processing target number TCTN as "'
Set to 1°゛.

ZD−6タイマインクラブド処理対象番号TCTNに対
応するタスク管理マツプのタスク番号におけるステータ
スが“2”のウェイトでかつ待ちイベント値が“1”で
第1イベントに対応するか否かを判断する。このタスク
が“2′のウェイトでなく、または第1イベントに対応
しなくタイマイベント待ち中でない場合には、ステップ
ZD−8に進む。
ZD-6 Determine whether the status in the task number of the task management map corresponding to the timer included processing target number TCTN is a weight of "2" and the waiting event value is "1", which corresponds to the first event. . If this task does not have a weight of "2" or does not correspond to the first event and is not waiting for a timer event, the process advances to step ZD-8.

ZD−7ステップZD−6における判断においてタイマ
インタラブド処理対象番号TCTNに対応するタスク管
理マツプのタスク番号におけるステータスが“°2゛°
のウェイトでかつ待ちイベント値が“′lパで第1イベ
ントに対応する場合には、タイマインクラブド処理対象
番号TCTNに対応するタスク管理マツプのタスク番号
におけるステータスをレディを示す“1′に設定する。
ZD-7 In the judgment in step ZD-6, the status of the task number in the task management map corresponding to the timer-interrupted processing target number TCTN is “°2゛°”.
When the wait event value is "1" and corresponds to the first event, the status of the task number in the task management map corresponding to the timer included processing target number TCTN is set to "1" indicating ready. Set.

ZD−8タイマインタラブド処理対象番号TCTNが°
“1′′を超えているか否かを判断する。
ZD-8 timer interrelated processing target number TCTN is °
Determine whether the value exceeds “1''.

このタイマインタラブド処理対象番号TCTNが“1′
”を超えていない場合には、タイマイベント発生フラグ
の更新処理が全て終了したために、ステップZD−11
に進む。
This timer interactive processing target number TCTN is “1”
”, step ZD-11 is performed because all the timer event occurrence flag update processing has been completed.
Proceed to.

ZD−9ステップZD−8における判断においてタイマ
インクラブド処理対象番号TCTNが′1”を超えてい
る場合には、タイマインクラブド処理対象番号TCTN
を“1”だけデクリメントしてステップZD−3に戻る
ZD-9 If the timer-included processing target number TCTN exceeds '1' in the judgment in step ZD-8, the timer-included processing target number TCTN
is decremented by "1" and the process returns to step ZD-3.

ZD−10ステップZD−4における判断において第N
タスクタイマカランタイ直TCNE [TCTN]が“
′1゛を超えている場合には、第Nタスクタイマカウン
タ値TCNE [TCTN]を“1゛だけデクリメント
してステップZD−8に進む。
ZD-10 In the judgment in step ZD-4, the Nth
Task timer direct TCNE [TCTN] is “
If it exceeds '1', the Nth task timer counter value TCNE [TCTN] is decremented by '1' and the process proceeds to step ZD-8.

ZD−11ステップZD−8における判断においてタイ
マインタラブド処理対象番号TCTNが“1゛を超えて
いない場合には、タイマインタラブド処理対象番号TC
TNが要求元タスク番号N5TK未満であるか否かを判
断する。タイマインクラブド処理対象番号TCTNが要
求元タスク番号N5TK未満でない場合には、タイマイ
ンクラブド発生時に実行していたタスクの優先順位が低
くないために、タイマインタラブドを終了してそのタス
クに戻る。
ZD-11 If the timer-interrupted processing target number TCTN does not exceed "1" in the judgment in step ZD-8, the timer-interconnected processing target number TC
It is determined whether TN is less than the requesting task number N5TK. If the timer inclination processing target number TCTN is not less than the requesting task number N5TK, the priority of the task being executed when the timer inclination occurred is not low, so the timer inclination is terminated and the task is returned to that task. return.

ZD−12ステップZD−11における判断においてタ
イマインタラブド処理対象番号TCTNが要求元タスク
番号N5TK未満である場合には、タイマインタラブド
処理対象番号TCTNに対応するタスク管理マツプのタ
スク番号におけるステータスがレディを示す°“1”°
であるか否かを判断する。このステータスが“′1′′
でない場合には、ステップZD−15に進む。
ZD-12 In step ZD-11, if the timer-interrupted processing target number TCTN is less than the requesting task number N5TK, the status of the task number in the task management map corresponding to the timer-interconnected processing target number TCTN is ready. ° “1” °
Determine whether or not. This status is “’1”
If not, proceed to step ZD-15.

ZD−13ステップZD−12における判断においてタ
スク管理マツプのタスク番号におけるステータスがレデ
ィを示す“1”°である場合には、該タイマインタラブ
ド処理ルーチンにおいてタイマインタラブド発生時に実
行していたタスクを示す要求元タスク番号N5TKに対
応するタスク管理マツプのタスク番号におけるステータ
スをレディを示す“l 11に設定するとともに、処理
の再開に備えて要求元タスクにおいて使用中のレジスタ
等の内容をスタック領域に退避する等の中断処理を行な
う。
ZD-13 If it is determined in step ZD-12 that the status of the task number in the task management map is "1" which indicates ready, the task that was being executed when the timer interrupt occurred in the timer-interrupted processing routine is The status of the task number in the task management map corresponding to the requesting task number N5TK is set to "l 11" indicating ready, and the contents of the registers, etc. being used by the requesting task are stored in the stack area in preparation for restarting the process. Perform interruption processing such as evacuation.

ZD−14要求元タスク番号N5TKを要求先タスク番
号NDTKにするとともに、タイマインクラブド処理対
象番号TCTNに対応するタスク管理マツプのタスク番
号におけるステータスをランを示す“0′°に設定し、
タイマイベントを発生させて対応するタスクをランさせ
る。なお、ランに際しては該タスクの中断処理において
スタック領域に退避した内容等を元のレジスタ等に戻す
等の再開処理を行なう。
ZD-14 Set the request source task number N5TK to the request destination task number NDTK, and set the status of the task number in the task management map corresponding to the timer included processing target number TCTN to "0'° indicating run,
Generate a timer event and run the corresponding task. Note that during the run, restart processing is performed, such as returning the contents saved in the stack area during the task suspension processing to the original registers.

ZD−15ステップZD−12における判断においてタ
スク管理マツプのタスク番号におけるステータスがレデ
ィを示す“1パでない場合には、タイマインタラブド処
理対象番号TCTNが“8”未満であるか否かを判断す
る。このタイマインタラブド処理対象番号TCTNが“
8′′未満でない場合には、タイマインクラプトル−チ
ンの処理が全て終了したのでタイマインクラブドを終了
して、スリープする。
ZD-15 If the status of the task number in the task management map is not "1 pass" indicating ready in the judgment in step ZD-12, it is determined whether or not the timer-interrupted processing target number TCTN is less than "8". .This timer interacted processing target number TCTN is “
If it is not less than 8'', all timer interrupt processing has been completed, so the timer interrupt is terminated and goes to sleep.

ZD−16ステップZD−15における判断においてタ
イマインクラブド処理対象番号TCTNが′8°“未満
である場合には、タイマインクラブド処理対象番号TC
TNを“1パだけインクリメントしてステップZD−1
1に戻る。
ZD-16 If the timer-included processing target number TCTN is less than '8°' in the judgment in step ZD-15, the timer-included processing target number TCTN
Increment TN by 1 and go to step ZD-1.
Return to 1.

次に、各タスクをタスク処理の優先順次に説明する。Next, each task will be explained in order of priority of task processing.

○操作子タスク(第6図) 操作子タスクは、操作子タスクタイマイベントが発生す
ると実行を開始して操作パネル20の操作子の操作状態
を検出し、この操作状態に変化がある場合には対応する
イベントを発生する。なお、公知技術であるために要点
のみを説明する。
○Manipulator task (Fig. 6) The manipulator task starts execution when a manipulator task timer event occurs, detects the operating state of the manipulators on the operation panel 20, and if there is a change in this operating state, executes the manipulator task. Raise the corresponding event. Note that since this is a known technique, only the main points will be explained.

A−1まず、新たな操作子の操作状態を操作子毎に記憶
する断操作子マツプと、前回の操作子の操作状態を操作
子毎に記憶する旧操作子マツプと、該操作子タスクで占
有する変数等とを初期値に設定する。なお、モードを自
動演奏の実行、停止等を行なうプレイモードとし、かつ
演奏を停止した状態とする。次に、第1タスクタイマカ
ウンタ値TCNE [1]を“11”°に、第1タスク
時間間隔TCND [1]を“′9°′に設定するとと
もに、タスク管理マツプのタスク番号が“1゛であるタ
イマ処理要求フラグを“1”に設定する。
A-1 First, there is a discontinued control map that stores the new control operation state for each control, an old control map that stores the previous control operation state for each control, and a Set occupied variables to initial values. Note that the mode is set to a play mode in which automatic performance is executed, stopped, etc., and the performance is stopped. Next, the first task timer counter value TCNE [1] is set to “11”°, the first task time interval TCND [1] is set to “9°”, and the task number on the task management map is set to “1”. Set the timer processing request flag to "1".

A−2要求元タスク番号N5TKと要求元イベント値N
5ETとを“1°゛に設定してイベント待ちモニタコー
ルを行なうとともに、操作子タスクタイマイヘントが発
生すると、次のステップA−3に進む。
A-2 Request source task number N5TK and request source event value N
5ET is set to "1°" and an event wait monitor call is made, and when an operator task timer event occurs, the process advances to the next step A-3.

A−3タスク管理マツプのタスク番号が″1゛の待ちイ
ベント値とイベント発生フラグの第1イヘントとを“0
”に設定する。
A-3 Set the waiting event value of the task number "1" in the task management map and the first event of the event occurrence flag to "0".
”.

A−4公知技術にもとづいて各操作子を所定順次に走査
して操作状態を読込み、新たな設定変更等の指示がある
か否かを判断し、次のようにして新たな設定変更等の指
示がある場合には対応する処理を行なう。なお、新たな
設定変更等の指示がない場合、また対応する処理を終了
した場合にはステップA−2に戻る。
A-4 Scan each operator in a predetermined sequence based on publicly known technology to read the operation status, determine whether there is an instruction to change new settings, etc., and issue a new setting change as follows. If there is an instruction, the corresponding process is performed. Note that if there is no new instruction to change settings or the like, or if the corresponding processing has ended, the process returns to step A-2.

☆プレイモードで演奏を停止した状態においてエデイツ
ト操作子が操作されると、まずエデイツトモードフラグ
をエデイツトモードを示す“1°°に設定して演奏デー
タの設定更新を行なうエデイツトモードにするとともに
、要求先タスク番号NDTKを“8”に、要求先イベン
ト値NDETを“1°゛に設定することによりエデイツ
トモード表示要求イベントを発生してイベント発生モニ
タコールを行なう。
☆When the edit controller is operated while the performance is stopped in the play mode, the edit mode flag is first set to "1°°" indicating the edit mode, and the edit mode is entered to update the settings of the performance data. At the same time, by setting the request destination task number NDTK to "8" and the request destination event value NDET to "1", an edit mode display request event is generated and an event occurrence monitor call is performed.

☆エデイツトモードにおいてエデイツトに関する操作子
が操作されると、まず要求先タスク番号NDTKを“7
′′に、要求先イベント値NDETを操作に対応したイ
ベント値に設定することによりエデイツト要求イベント
を発生してイさント発生モニタコールを行なう。次に、
要求先タスク番号NDTKを“8パに、要求先イベント
値NDETを操作に対応したイベント値に設定すること
によりエデイツト表示要求イベントを発生してイベント
発生モニタコールを行なう。
☆When an edit-related operator is operated in edit mode, first the request destination task number NDTK is set to “7”.
'', an edit request event is generated by setting the request destination event value NDET to an event value corresponding to the operation, and an edit generation monitor call is performed. next,
By setting the request destination task number NDTK to "8pa" and the request destination event value NDET to an event value corresponding to the operation, an edit display request event is generated and an event occurrence monitor call is performed.

☆エデイツトモードにおいてプレイ操作子が操作される
と、まず処理中のエディットモ・−Fにおける各種の処
理を中断してエデイツトモードフラグを“O゛に設定し
、プレイモードにする。
☆When the play operator is operated in the edit mode, first, various processes in the edit mode-F being processed are interrupted, the edit mode flag is set to "O", and the play mode is entered.

次に、要求先タスク番号NDTKを“′8“に、要求先
イベント値NDETを゛′2パに設定することによりプ
レイモード表示要求イベントを発生してイベント発生モ
ニタコールを行なう。
Next, by setting the request destination task number NDTK to "'8" and the request destination event value NDET to "'2pa", a play mode display request event is generated and an event occurrence monitor call is performed.

☆プレイモードで演奏を停止した状態において、スター
ト操作子が操作されると、まず“1゛で演奏中を示す演
奏中フラグを“1°“に設定して、次に第2タスクタイ
マカウンタ値TCNE[2]を“1″に設定する。さら
に、要求先タスク番号NDTKをパ2“に、要求先イベ
ント値NDETを°“2°”に設定することによりスタ
ート要求イベントを発生してイベント発生モニタコール
を行ない、続いて要求先タスク番号NDTKを“°8′
°に、要求先イベント値NDETを“′4′に設定する
ことにより演奏中表示要求イベントを発生してイベント
発生モニタコールを行なう。
☆When the start control is operated while the performance is stopped in the play mode, the playing flag, which indicates that the performance is being played at "1", is first set to "1°", and then the second task timer counter value is set to "1°". Set TCNE[2] to "1".Furthermore, by setting the request destination task number NDTK to "P2" and the request destination event value NDET to °"2°", a start request event is generated and the event is generated. Make a monitor call and then set the request destination task number NDTK to "°8'"
By setting the request destination event value NDET to "'4", a performance display request event is generated and an event occurrence monitor call is made.

☆演奏中にストップ操作子が操作されると、まず演奏中
フラグを“′0パに設定し、次に要求先タスク番号ND
TKを“2′”に、要求先イベント値NDETを“4”
に設定することによりストップ要求イベントを発生して
イベント発生モニタコールを行なう。さらに、プレイモ
ード表示要求イベントを発生する。
☆When the stop control is operated during a performance, the playing flag is first set to "'0pa," and then the request destination task number ND is set.
Set TK to "2'" and request destination event value NDET to "4"
By setting this, a stop request event is generated and an event occurrence monitor call is made. Furthermore, a play mode display request event is generated.

☆テンポ設定用操作子が操作されると、まずテンポクロ
ツタの時間間隔を算出して第2タスク時間間隔TCND
[2]とし、次に要求先タスク番号NDTKを“8゛に
、要求先イベント値NDETを“8“に設定することに
よりテンポ表示更新要求イベントを発生してイベント発
生モニタコールを行なう。
☆When the tempo setting operator is operated, first the time interval of the tempo clock is calculated and the second task time interval TCND is calculated.
[2], and then sets the request destination task number NDTK to "8" and the request destination event value NDET to "8" to generate a tempo display update request event and perform an event occurrence monitor call.

○プレイタスク(第7図) プレイタスクは、スタート要求イベントが発生すると実
行を開始し、ソングデータマツプおよびパターンマツプ
より所定順次に演奏データを読出してその演奏データを
演奏データFIFOに積み、アサイン要求イベントを発
生する。また、次のパターンにプレイタスクタイマイベ
ントが発生すると進み、同様に処理する。
○Play task (Figure 7) The play task starts execution when a start request event occurs, reads performance data from the song data map and pattern map in a predetermined order, stores the performance data in the performance data FIFO, and issues an assignment request. Generate an event. Also, when a play task timer event occurs in the next pattern, it advances and is processed in the same way.

B−1該プレイタスクで占有する変数等を初期値に設定
し、第2タスクタイマカウンタ値TCNE[21を“’
500”に、第2タスク時間間隔TCND [2]を“
499”に設定するとともに、タスク管理マツプのタス
ク番号が“2”のタイマ処理要求フラグを“l゛に設定
する。
B-1 Set the variables etc. occupied by the play task to initial values, and set the second task timer counter value TCNE [21 to "'"
500” and the second task time interval TCND [2] is “
At the same time, the timer processing request flag for the task number "2" in the task management map is set to "1".

B−2要求元タスク番号N5TKと要求元イベント値N
5ETとを“2パに設定してイベント待ちモニタコール
を行ない、スタート要求イベントが発生すると、次のス
テップB−3に進む。
B-2 Request source task number N5TK and request source event value N
5ET is set to "2pa", an event wait monitor call is made, and when a start request event occurs, the process advances to the next step B-3.

B−3パターンステップ番号PSTNとソングステップ
番号5STNとを“0”に設定するとともに、タスク管
理マツプのタスク番号が“°2”であるタスク番号にお
ける待ちイベント値とイベント発生フラグの第2イベン
トとを“0′°に設定する。
B-3 Set pattern step number PSTN and song step number 5STN to "0", and set the waiting event value and the second event of the event occurrence flag for the task number whose task number is "°2" in the task management map. is set to “0′°.

B−4ソングデータマツプからソングステップ番号5S
TNのパターン番号を読出してそのパターン番号をパタ
ーン番号PNUFとする。
Song step number 5S from B-4 song data map
The pattern number of TN is read and the pattern number is set as pattern number PNUF.

B−5パターン番号PNUMが演奏の終了を示す°“0
“であるか否かを判断する。このパターン番号PNUM
が“0パである場合には、ステップB−14に進む。
B-5 Pattern number PNUM indicates the end of the performance °“0
“Judge whether this pattern number PNUM
is "0pa", the process advances to step B-14.

B−6ステップB−5における判断においてパターン番
号PNUMが“0°°でない場合には、要求元タスク番
号N5TKを“2°゛に、要求元イベント(iNsET
を“5′”に設定してイベント待ちモニタコールを行な
い、ストップ要求イベントまたはプレイタスクタイマイ
ベントのいずれかが発生すると、次のステップB−71
に進む。
B-6 If the pattern number PNUM is not "0°" in step B-5, the requesting task number N5TK is set to "2°" and the requesting event (iNsET
is set to "5'" and an event wait monitor call is made, and when either a stop request event or a play task timer event occurs, the next step B-71 is executed.
Proceed to.

B−7タスク管理マツプのタスク番号が“2°“である
タスク番号におけるイベント発生フラグの第3イベント
が“1”であるか否かを判断する。この第3イベントが
“1”である場合には、ストップ要求イベントの発生で
あるためにステップB−15に進む。
B-7 It is determined whether the third event of the event occurrence flag for the task number "2°" in the task management map is "1". If this third event is "1", it means that a stop request event has occurred, and the process proceeds to step B-15.

B−8ステップB−7における判断においてタスク管理
マツプのタスク番号が“2′であるタスク番号における
イベント発生フラグの第3イベントが“1゛でない場合
には、このイベント発生フラグの第1イベントが“1゛
でタイマイベントの発生であるために、まずタスク管理
マツプのタスク番号が“2パであるタスク番号における
待ちイベント値とイベント発生フラグの第1イベントと
を“°0″に設定する。次に、パターンの何番目のパー
トかを示すパート番号PATNを“θパに設定する。
B-8 In step B-7, if the third event of the event occurrence flag for the task number "2" in the task management map is not "1", the first event of this event occurrence flag is Since a timer event occurs at "1", first the waiting event value and the first event of the event occurrence flag for the task number whose task number in the task management map is "2" are set to "0". Next, a part number PATN indicating which part of the pattern is set to "θPA".

B−9パターン番号PNUMに対応するパターン番号の
パターンマツプからパート番号がパート番号PATNに
、パターンステップ番号がパターンステップ番号PST
Nに対応するベロシティを読出してそのベロシティをベ
ロシティNTVLとする。
B-9 From the pattern map of the pattern number corresponding to pattern number PNUM, the part number is set to part number PATN, and the pattern step number is set to pattern step number PST.
The velocity corresponding to N is read out and the velocity is set as velocity NTVL.

B−10ベロシティNTVLが“0″であるか否かを判
断する。このベロシティNTVLが“0”である場合に
は、発音しないことを示しているためにステップB−1
2に進む。
It is determined whether B-10 velocity NTVL is "0". If this velocity NTVL is "0", this indicates that no sound will be produced, so step B-1
Proceed to step 2.

B−11ステップB−10における判断においてベロシ
ティNTVLが“0パでない場合には、まずバターン番
号PNUMに対応するパターン番号のパターンマツプか
らパート番号PATNに対応するパート番号における音
色番号を続出してその音色番号を演奏データFIFOに
積み、次にベロシティNTVLを演奏データFIFOに
積む。さらに、パート番号PATNに対応するパート番
号のパターンステップ番号PSTNに対応するパターン
ステップ番号におけるトランケート禁止フラグを読出し
てそのトランケート禁止フラグを演奏データFIFOに
積む。
B-11 If the velocity NTVL is not "0" in the judgment in step B-10, first, from the pattern map of the pattern number corresponding to the pattern number PNUM, the tone numbers in the part number corresponding to the part number PATN are successively determined. The tone number is loaded into the performance data FIFO, and then the velocity NTVL is loaded into the performance data FIFO.Furthermore, the truncate prohibition flag at the pattern step number corresponding to the pattern step number PSTN of the part number corresponding to the part number PATN is read and the truncation is performed. Load the prohibition flag into the performance data FIFO.

B−12パート番号PATNが“7”未満であるか否か
を判断する。このパート番号PATNが“7°゛未満で
ない場合には8パート全てを読出したために、ステップ
B−16に進む。
B-12 Determine whether part number PATN is less than "7". If this part number PATN is not less than "7°", it means that all eight parts have been read, and the process advances to step B-16.

B−13ステップB−12における判断においてパート
番号PATNが“7“未満である場合には、パート番号
PATHを“1′′だけインクリメントし、次のパート
を読出す準備をしてステップB−9に戻る。
B-13 If the part number PATN is less than "7" in step B-12, increment the part number PATH by "1", prepare to read the next part, and proceed to step B-9. Return to

B−14ステップB−5における判断においてパターン
番号PNUMが“0°°である場合には、演奏中フラグ
を“0°゛に設定して演奏終了処理を行ない、ステップ
B−2に戻る。
B-14 If the pattern number PNUM is "0°" in step B-5, the performance flag is set to "0°" to perform the performance end process, and the process returns to step B-2.

B−15ステップB−7における判断においてタスク管
理マツプのタスク番号が“2”であるタスク番号におけ
るイベント発生フラグの第3イヘントが°“l”である
場合には、待ちイベント値およびその第3イベントを“
O”に設定してステップB−2に戻る。
B-15 In step B-7, if the third event of the event occurrence flag for the task number "2" in the task management map is "l", the waiting event value and its third event are Event “
O” and return to step B-2.

B−16ステップB−12における判断においてパート
番号PATNが“7°未満でない場合には、アサイン要
求イベントを発生する。言い換えれば、要求先タスク番
号NDTKを“3°゛に、要求先イベント値NDETを
“1°“に設定してイベント発生モニタコールを行なう
B-16 If the part number PATN is not less than "7°" in step B-12, an assignment request event is generated. In other words, the request destination task number NDTK is set to "3°" and the request destination event value NDET is set to "3°". Set it to “1°” and make an event occurrence monitor call.

B−17パターンステップ番号PSTNが“15゛未満
であるか否かを判断する。このパターンステップ番号P
STNが“15゛未満でなくて全てのパターンステップ
の読出しを終えている場合には、ステップB−19に進
む。
B-17 Determine whether the pattern step number PSTN is less than "15".This pattern step number P
If STN is not less than "15" and all pattern steps have been read out, the process advances to step B-19.

B−18ステップB−17における判断においてパター
ンステップ番号PSTNが“15“未満である場合には
、パターンステップ番号PSTNを°l I I+ タ
はインクリメントし、次のパターンステップの読出し準
備をしてステップB−6に戻る。
B-18 If the pattern step number PSTN is less than "15" in the determination in step B-17, the pattern step number PSTN is incremented, preparations are made to read the next pattern step, and the step is started. Return to B-6.

B−19ステップB−17における判断においてパター
ンステップ番号PSTNが“15”未満でなくて全ての
パターンステップの読出しを終えている場合には、ソン
グステップ番号5STNが“15゛未満であるか否かを
判断する。このソングステップ番号5STNが“15゛
°未満でなくて全てのソングステップの読出しを終えて
いる場合には、ステップB−21に進む。
B-19 In step B-17, if the pattern step number PSTN is not less than "15" and all pattern steps have been read out, it is determined whether the song step number 5STN is less than "15". If this song step number 5STN is not less than 15 degrees and all song steps have been read out, the process advances to step B-21.

B−20ステップB−19における判断においてソング
ステップ番号5STNが“15”未満である場合には、
パターンステップ番号PSTNを“′0″に設定すると
ともに、ソングステップ番号5STNを“1”だけイン
クリメントし、次のソングステップの読出し準備をして
ステップB−4に戻る。
B-20 If the song step number 5STN is less than "15" in the judgment in step B-19,
The pattern step number PSTN is set to "'0", and the song step number 5STN is incremented by "1" to prepare for reading the next song step, and the process returns to step B-4.

B−21ステップB−19における判断においてパター
ンステップ番号PSTNが“15パ未満でない場合には
、演奏中フラグを“0°゛に設定して演奏終了処理を行
ない、ステップB−2に戻る。
B-21 If the pattern step number PSTN is not less than "15" in the judgment in step B-19, the playing flag is set to "0°" to perform a playing end process, and the process returns to step B-2.

○メインアサイナタスク(第8図) メインアサイナタスクは、アサイン要求イベントが発生
すると演奏データを演奏データFIFOより降ろし、こ
の演奏データを後述するプリアサイナタスクで設定する
アサイン順位に対応する楽音発生チャネル管理マツプに
書込むとともに、発音要求イベントを発生する。
○Main Assigner Task (Figure 8) When an assignment request event occurs, the Main Assigner Task unloads performance data from the performance data FIFO, and uses this performance data to generate musical tones corresponding to the assignment order set by the Preassigner Task, which will be described later. It writes to the channel management map and also generates a pronunciation request event.

C−1楽音発生チャネル管理マツプをクリヤするととも
に、該メインアサイナタスクで占有する変数等を初期値
に設定する。なお、第Nアサイン順位の楽音発生チャネ
ル番号を示す第Nアサイン順位楽音発生チャネル番号M
ASS[N]を対応する“N(=0.1.・・・、15
)”に、アサイン対象のアサイン順位を示す対象アサイ
ン順位TASNを“0”に、また割当て可能楽音発生チ
ャネル数を示す割当て可能楽音発生チャネル数GACN
を“16″に設定する。
The C-1 musical tone generation channel management map is cleared, and variables etc. occupied by the main assigner task are set to initial values. Note that the Nth assignment rank musical sound generation channel number M indicates the musical sound generation channel number of the Nth assignment rank.
ASS[N] to the corresponding "N(=0.1...., 15
)”, the target assignment rank TASN indicating the assignment rank of the assignment target is set to “0”, and the number of assignable musical tone generation channels GACN indicating the number of assignable musical tone generation channels is set to “0”.
is set to "16".

C−2要求元タスク番号N5TKを3”に、また要求元
イベント値N5ETを“1°゛に設定してイベント待ち
モニタコールを行なう。アサイン要求イベントが発生す
ると、次のステップC−3に進む。
C-2 An event wait monitor call is made with the request source task number N5TK set to 3'' and the request source event value N5ET set to 1°. When an assignment request event occurs, the process proceeds to the next step C-3.

C−3まず、タスク管理マツプのタスク番号が“3′”
であるタスク番号における待ちイベント値とイベント発
生フラグの第1イベントとを“0”に設定するとともに
、次に“1゛でメインアサイナの処理中を示すメインア
サイナ処理中ソラグMAEFを“1”に設定する。
C-3 First, the task number on the task management map is "3'"
Set the waiting event value and the first event of the event occurrence flag for the task number to "0", and then set the main assigner processing SORAG MAEF to "1", which indicates that the main assigner is being processed with "1". .

C〜4 対象アサイン順位TASNが割当て可能楽音発
生チャネル数GACN未満であるか否かを判断する。割
当て可能楽音発生チャネル数GACN未満でない場合に
は、割当てるべき楽音発生チャネルが最早やないために
ステップC−2に戻る。
C-4 Determine whether the target assignment order TASN is less than the number of allocatable musical tone generation channels GACN. If the number of allocatable musical tone generation channels is not less than GACN, there are no more musical tone generation channels to be allocated, and the process returns to step C-2.

C−5ステップC−4における判断において対象アサイ
ン順位TMSNが割当て可能楽音発生チャネル数GAC
N未満である場合には、演奏データFIFOは空か否か
を書込みポインタおよび続出しポインタを比較して判断
する。空である場合には、演奏データFIFOにおける
全ての演奏データの処理が終了したためにステップC−
2に戻る。
C-5 In the judgment in step C-4, the target assignment order TMSN is the number of allocatable musical tone generation channels GAC
If it is less than N, it is determined whether the performance data FIFO is empty or not by comparing the write pointer and the continuous output pointer. If it is empty, processing of all the performance data in the performance data FIFO has been completed, so step C-
Return to 2.

C−6ステップC−5における判断において演奏データ
FIFOが空でない場合は、演奏データFIFOから音
色番号、ベロシティおよびトランケート禁止フラグを順
次に降ろし、音色番号NTTN、ベロシティNTVLお
よびトランケート禁止フラグNTIFとする。
C-6 If the performance data FIFO is not empty in the determination in step C-5, the tone color number, velocity, and truncate prohibition flag are sequentially removed from the performance data FIFO, and the tone color number NTTN, velocity NTVL, and truncate prohibition flag NTIF are set.

C−7アサイン対象の楽音発生チャネルを示すアサイン
順位Nが対象アサイン順位TASNの第Nアサイン順位
楽音発生チャネル番号MASSENJ、言い換えれば対
象アサイン順位TASNの楽音発生チャネル番号MAS
S [TMSN]に対応する楽音発生チャネル管理マツ
プにおける楽音発生チャネル番号の処理待ちフラグを処
理待ちを示す1”に、音色番号を音色番号NTTNに、
ベロシティをベロシティNTVLに、またトランケート
禁止フラグをトランケート禁止フラグNTIFに設定す
る。
C-7 The assignment rank N indicating the musical tone generation channel to be assigned is the Nth assignment rank musical tone generation channel number MASSENJ of the target assignment rank TASN, in other words, the musical tone generation channel number MAS of the target assignment rank TASN.
S Set the processing wait flag of the musical tone generation channel number in the musical tone generation channel management map corresponding to [TMSN] to 1" indicating waiting for processing, and set the tone number to tone number NTTN.
The velocity is set to velocity NTVL, and the truncate prohibition flag is set to truncate prohibition flag NTIF.

C−8要求先タスク番号NDTKを“4“に、要求先イ
ベント値NDETを“2゛°に設定することにより発音
要求イベントを発生してイベント発注モニタコールを行
なう。
C-8 By setting the request destination task number NDTK to "4" and the request destination event value NDET to "2", a sound generation request event is generated and an event order monitor call is made.

C−9対象アサイン順位TASNを“l”だけインクリ
メントし、次の演奏データの割当ての準備をしてステッ
プC−4に戻る。
C-9 The target assignment order TASN is incremented by "l" to prepare for the next performance data assignment and return to step C-4.

○発音タスク(第9図) 発音タスクは、新たな楽音を発生する楽音発生チャネル
において前の発音が終了していない場合には、トランケ
ートの開始を指示する。次には、楽音発生に関するパラ
メータを演算して設定する。
- Pronunciation Task (Figure 9) The pronunciation task instructs the start of truncation if the previous pronunciation has not been completed in the tone generation channel that generates the new tone. Next, parameters related to musical tone generation are calculated and set.

さらに、発音が終了していたまたは終了した場合には、
楽音発生チャネルに新たな発音を指示する。
Furthermore, if the pronunciation was or has ended,
Instructs the musical sound generation channel to produce a new sound.

D−1該発音タスクで占有する変数等を初期値に設定す
るとともに、トランケートを終了した楽音発生チャネル
番号を記憶するトランケート終了FIFOをクリヤし、
楽音発生回路24を初期化する。また、第4タスクタイ
マカウンタ値TCNE[4]と第4タスク時間間隔TC
ND[4]とを゛0″に設定するとともに、タスク管理
マツプのタスク番号が“4″であるタスク番号における
タイマ処理要求フラグを“1 ”に設定する。
D-1 Set the variables etc. occupied by the sound generation task to initial values, and clear the truncate end FIFO that stores the tone generation channel number that has been truncated;
The musical tone generation circuit 24 is initialized. Also, the fourth task timer counter value TCNE[4] and the fourth task time interval TC
ND[4] is set to "0", and the timer processing request flag for the task number "4" in the task management map is set to "1".

D−2要求元タスク番号N5TKを“4゛に、また要求
元イベント値N5ETを°“2゛に設定してイベント待
ちモニタコールを行なう。発音要求イベントが発生する
と、次のステップD−3に進む。
D-2 An event wait monitor call is made with the requester task number N5TK set to "4" and the requester event value N5ET set to "2". When the sound generation request event occurs, the process advances to the next step D-3.

D−3まず、タスク管理マツプのタスク番号が“4”で
あるタスク番号における待ちイベント値とイベント発生
フラグの第2イベントとを“0”に設定して、次に処理
対象の楽音発生チャネルを示す対象番号GCTNを“°
0゛に設定する。
D-3 First, set the waiting event value and the second event of the event occurrence flag to "0" for the task number whose task number is "4" in the task management map, and then set the musical sound generation channel to be processed. The target number GCTN shown is “°
Set to 0゛.

D−4対象番号GCTNに対応する楽音発生チャネル管
理マツプの楽音発生チャネル番号におけるトランケート
中フラグが“0”でかつ処理待ちフラグが処理待ちを示
す“1“であるか否かを判断する。このトランケート中
フラグが′″0”でなくまたは処理待ちフラグが“1”
でなくて発音処理が不要である場合には、ステップD−
7に進む。
D-4 Determine whether the truncation flag in the musical tone generating channel number of the musical tone generating channel management map corresponding to the target number GCTN is "0" and the processing wait flag is "1" indicating waiting for processing. This truncate flag is not ``0'' or the processing waiting flag is ``1''.
If not, and no pronunciation processing is required, proceed to step D-
Proceed to step 7.

D−5ステップD−4における判断において対象番号G
CTNに対応する楽音発生チャネル管理マツプの楽音発
生チャネル番号における処理待ちフラグが“1″でかつ
トランケート中フラグが“0”である場合には、対象番
号GCTNに対応するエンベロープ管理マツプのエンベ
ロープチャネル番号における現エンベロープレベルが“
0°。
D-5 In the judgment in step D-4, the target number G
If the processing wait flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to CTN is "1" and the truncation flag is "0", the envelope channel number of the envelope management map corresponding to the target number GCTN If the current envelope level at “
0°.

であるか否かを判断する。この現エンベロープレベルが
“0”で急速減衰処理が不要である場合には、ステップ
D−7に進む。
Determine whether or not. If the current envelope level is "0" and rapid attenuation processing is unnecessary, the process proceeds to step D-7.

D−6ステップD−5における判断において対象番号G
CTHに対応するエンベロープ管理マツプのエンベロー
プチャネル番号における現エンベロープレベルが“0゛
でない場合には、対象番号GCTNに対応する楽音発生
チャネル管理マツプの楽音発生チャネル番号における現
発音レベルをトランケートの禁止を示す°“255”に
、現トランケート禁止フラグをトランケートの禁止を示
す“1”に、またトランケート中フラグをトランケート
中を示す“1”に設定するとともに、対応する楽音発生
チャネルに急速減衰を指示する。
D-6 In the judgment in step D-5, the target number G
If the current envelope level in the envelope channel number of the envelope management map corresponding to CTH is not "0", it indicates that truncation of the current sound generation level in the musical tone generation channel number of the musical tone generation channel management map corresponding to the target number GCTN is prohibited. ° "255", the current truncate prohibition flag is set to "1" indicating that truncation is prohibited, the truncate flag is set to "1" indicating that truncation is in progress, and rapid attenuation is instructed to the corresponding tone generating channel.

D−7対象番号GCTNが“15′”未満であるか否か
を判断する。この対象番号GCTNが°“15′゛未満
でなくて全ての楽音発生チャネルの処理を終えている場
合には、ステップD−9に進む。
D-7 Determine whether the target number GCTN is less than "15'". If this target number GCTN is not less than 15' and all tone generation channels have been processed, the process advances to step D-9.

D−8ステップD−7における判断において対象番号G
CTNが“′15°゛未満である場合には、対象番号G
CTNを1°゛だけインクリメントし、次の楽音発生チ
ャネルの処理の準備をしてステップD−4に戻る。
D-8 In the judgment in step D-7, the target number G
If CTN is less than "'15°", target number G
The CTN is incremented by 1°, preparations are made for processing the next musical tone generation channel, and the process returns to step D-4.

D−9対象番号GCTNを“0°゛に設定する。D-9 Set target number GCTN to "0°".

D−10対象番号GCTNに対応する楽音発生チャネル
管理マツプの楽音発生チャネル番号における処理待ちフ
ラグが処理待ちを示す1“であるか否かを判断する。こ
の処理待ちフラグが1゛でなくて発音処理が不要である
場合には、ステップD−12に進む。
D-10 Determine whether or not the processing wait flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to the target number GCTN is 1'', which indicates waiting for processing. If no processing is required, the process advances to step D-12.

D−11ステップD−10における判断において対象番
号GCTNに対応する楽音発生チャネル管理マツプの楽
音発生チャネル番号における処理待ちフラグが“l”で
ある場合には、対象番号GCTNに対応する楽音発生チ
ャネルの楽音発生と、楽音のエンベロープ生成とに関す
る各種パラメータを対応する楽音発生チャネル管理マツ
プの楽音発生チャネル番号における音色番号、ベロシテ
ィおよびトランケート禁止フラグより演算して、これら
演算された各種パラメータおよびトランケート禁止ステ
ップ数を対応する楽音発生チャネル管理マツプの楽音発
生チャネル番号における楽音発生パラメータ群とエンベ
ロープ性成パラメータ群とする。
D-11 In step D-10, if the processing wait flag for the musical tone generation channel number in the musical tone generation channel management map corresponding to the target number GCTN is "l", the process wait flag for the musical tone generation channel number corresponding to the target number GCTN is Various parameters related to musical tone generation and musical tone envelope generation are calculated from the tone number, velocity, and truncate prohibition flag at the musical tone generation channel number of the corresponding musical tone generation channel management map, and the various calculated parameters and the number of truncate prohibition steps are calculated. Let be the musical tone generation parameter group and the envelope property parameter group at the musical tone generation channel number of the corresponding musical tone generation channel management map.

D−12対象番号GCTNが“15′未満であるか否か
を判断する。この対象番号GCTNが“15′゛未満で
なくて全ての楽音発注チャネルの処理を終えている場合
には、ステップD−14に進む。
D-12 Determine whether the target number GCTN is less than "15'". If the target number GCTN is not less than "15'" and all musical tone order channels have been processed, proceed to step D. Proceed to -14.

D−13ステップD−12における判断において対象番
号GCTNが“15”未満である場合には、対象番号G
CTNを“1″だけインクリメントし、ステップD−1
0に戻る。
D-13 If the target number GCTN is less than "15" in the judgment in step D-12, the target number G
Increment CTN by “1” and proceed to step D-1.
Return to 0.

D−14ステップD−12における判断において対象番
号GCTNが“15′゛未満でない場合には、“1”で
いずれかの楽音発生チャネルにおいて急速減衰が未了で
あることを示す急速減衰未了フラグTDNFと、また対
象番号GCTNとを“0”に設定する。
D-14 If the target number GCTN is not less than "15'" in the judgment in step D-12, the rapid decay incomplete flag is set to "1" and indicates that rapid decay has not been completed in any musical tone generation channel. TDNF and target number GCTN are set to "0".

D−15対象番号GCTNに対応する楽音発生チャネル
管理マツプの楽音発生チャネル番号における処理待ちフ
ラグが“1 ++であるか否かを判断する。この処理待
ちフラグが“′l“でない場合には、ステップD−18
に進む。
D-15 Determine whether or not the processing wait flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to the target number GCTN is "1++".If this processing wait flag is not "'l", Step D-18
Proceed to.

D−16ステップD−15における判断において対象番
号GCTNに対応する楽音発生チャネル管理マツプの楽
音発生チャネル番号における処理待ちフラグが処理待ち
を示す“1゛である場合には、この楽音発生チャネル番
号におけるトランケート中フラグがトランケート中を示
す“1″であるか否かを判断する。このトランケート中
フラグが“1”である場合には、割当てるべき楽音発生
チャネルは従前に割当てていた楽音の発音が未だ終了し
ていないために、ステップD−20に進む。
D-16 In the judgment in step D-15, if the processing wait flag for the musical sound generation channel number in the musical sound generation channel management map corresponding to the target number GCTN is "1" indicating waiting for processing, then the Determine whether or not the truncate flag is "1" indicating that truncation is in progress. If the truncate flag is "1", the musical sound generation channel to be assigned is not yet producing the previously assigned musical sound. Since the process has not been completed, the process advances to step D-20.

D−17ステップD−16における判断において対象番
号GCTNに対応する楽音発生チャネル管理マツプの楽
音発生チャネル番号におけるトランケート中フラグが“
°1°′でない場合には、まずその対象番号GCTNに
対応するエンベロープ管理マツプのエンベロープチャネ
ル番号におけるトランケート禁止ステップ数と各ステッ
プの目標値およびレートとをクリヤし、これらトランケ
ート禁止ステップ数と各ステップの目標値およびレート
とを対象番号GCTNに対応する楽音発生チャネル管理
マツプの楽音発生チャネル番号におけるエンベロープ生
成パラメータ群にもとづいて演算して設定するとともに
、次に現ステップ番号を“1”に、目標値およびレート
を第1ステツプの目標値およびレートに、また現エンベ
ロープレベルを“0”に設定する。また、対象番号GC
TNに対応する楽音発生チャネルをリセットしてからそ
の楽音発生チャネルに対応する楽音発生チャネル管理マ
ツプの楽音発生チャネル番号における楽音発生パラメー
タ群および対応するエンベロープ管理マツプのエンベロ
ープチャネル番号における目標値およびレートを転送す
る。さらに、対象番号GCTNに対応する楽音発生チャ
ネル管理マツプの楽音発生チャネル番号における現発音
レベルを“255”に、現トランケート禁止フラグを“
1”に、また処理待ちフラグを“0”に設定して楽音発
生チャネルに楽音発生の開始を指示する。
D-17 In the judgment in step D-16, the truncation flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to the target number GCTN is “
If it is not °1°', first clear the number of truncate prohibited steps and the target value and rate of each step in the envelope channel number of the envelope management map corresponding to the target number GCTN, and then clear the number of truncate prohibited steps and the target value and rate of each step. The target value and rate of are calculated and set based on the envelope generation parameter group at the musical sound generation channel number of the musical sound generation channel management map corresponding to the target number GCTN, and then the current step number is set to "1" and the target value is set. Set the value and rate to the target value and rate of the first step and the current envelope level to "0". Also, target number GC
After resetting the musical sound generation channel corresponding to TN, the musical sound generation parameter group at the musical sound generation channel number of the musical sound generation channel management map corresponding to the musical sound generation channel and the target value and rate at the envelope channel number of the corresponding envelope management map are calculated. Forward. Furthermore, the current sound level at the musical sound generation channel number in the musical sound generation channel management map corresponding to the target number GCTN is set to "255", and the current truncate prohibition flag is set to "255".
1" and the processing wait flag is set to "0" to instruct the musical tone generating channel to start generating musical tones.

D−18対象番号GCTNが“15”未満であるか否か
を判断する。この対象番号GCTNが°“15′未満で
なくて全ての楽音発生チャネルの処理を終えている場合
には、ステップD−21に進む。
D-18 Determine whether the target number GCTN is less than "15". If this target number GCTN is not less than 15' and all musical tone generation channels have been processed, the process advances to step D-21.

D−19ステップD−18における判断において対象番
号GCTNが“15”未満である場合には、対象番号G
CTNを“1”だけインクリメントしてステップD−1
5に戻る。
D-19 If the target number GCTN is less than "15" in the judgment in step D-18, the target number G
Increment CTN by “1” and proceed to step D-1.
Return to 5.

D−20ステップD−16における判断において対象番
号GCTNに対応する楽音発生チャネル管理マツプの楽
音発生チャネル番号におけるトランケート中フラグが“
1′”である場合には、急速減衰未了フラグTDNFを
1“に設定してステップD−18に進む。
D-20 In the judgment in step D-16, the truncation flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to the target number GCTN is “
If the flag is 1', the rapid decay incomplete flag TDNF is set to 1' and the process proceeds to step D-18.

D−21急速減衰未了フラグTDNFが“°1′′であ
るか否かを判断する。この急速減衰未了フラグTDNF
が“′1°′でなくて全ての発音処理が終了している場
合には、ステップD−2に戻る。
D-21 Determine whether or not the rapid decay incomplete flag TDNF is "°1''. This rapid decay incomplete flag TDNF
If it is not "'1°" and all sound generation processing has been completed, the process returns to step D-2.

D−22ステップD−21における判断において急速減
衰未了フラグTDNFが“1°”である場合には、要求
元タスク番号N5TKを“′4゛に、また要求元イベン
ト値N5ETを“′3゛に設定してイベント待ちモニタ
コールを行なう。発音要求イベントまたは発音タスクタ
イマイベントのいずれかが発生すると、次のステップD
−23に進む。
D-22 If the rapid decay unfinished flag TDNF is "1°" in step D-21, the requesting task number N5TK is set to "'4" and the requesting event value N5ET is set to "'3". to perform an event wait monitor call. When either the pronunciation request event or the pronunciation task timer event occurs, the next step D
Proceed to -23.

D−23タスク管理マツプのタスク番号が“4°゛であ
るタスク番号におけるイベント発生フラグの第2イベン
トが“1”′であるか否かを判断する。この第2イベン
トが“1”である場合には、発音要求イベントの発生で
あるためにステップD−3に戻る。
D-23 Determine whether the second event of the event occurrence flag for the task number "4°" in the task management map is "1". This second event is "1". If so, the process returns to step D-3 because a sound generation request event has occurred.

D−24ステップD−23における判断においてタスク
管理マツプのタスク番号が°゛4゛であるタスク番号に
おけるイベント発生フラグの第2イベントが“1°゛で
ない場合には、このタスク番号におけるイベント発生フ
ラグの第1イベントが“1゛であるタイマイベントの発
生であるために、まずタスク管理マツプのタスク番号が
“4パであるタスク番号における待ちイベント値とイベ
ント発生フラグの第1イベントとを“0″に設定する。
D-24 In the judgment in step D-23, if the second event of the event occurrence flag for the task number whose task number in the task management map is °゛4゛ is not “1°”, the event occurrence flag for this task number Since the first event of ``1'' is the occurrence of a timer event, first, the waiting event value of the task number whose task number is ``4'' in the task management map and the first event of the event occurrence flag are set to ``0''. ”.

次に、トランケート終了FIFOから順次にトランケー
トを終了した楽音発生チャネル番号を降ろし、降ろした
楽音発生チャネル番号に対応する楽音発生チャネル管理
マツプの楽音発生チャネル番号におけるトランケート中
フラグを“0″に設定する。そして、ステップD−14
に戻る。
Next, the musical sound generation channel numbers that have been truncated are sequentially removed from the truncate end FIFO, and the truncation flag for the musical sound generation channel number in the musical sound generation channel management map corresponding to the musical sound generation channel number that has been removed is set to "0". . And step D-14
Return to

なお、ステップD−6の急速減衰の指示に際しては目標
値を“0°゛に、またレートを急速減衰用のレートに設
定して転送する。
In addition, when instructing rapid attenuation in step D-6, the target value is set to "0°" and the rate is set to the rate for rapid attenuation, and then transferred.

Oブリアサイナタスク(第10図) ブリアサイナタスクは、ブリアサイナタスクタイマイベ
ントが発生すると実行を開始し、現発音レベルにもとづ
いてアサイン順位を更新する。
O Briasina Task (FIG. 10) The Briasina Task begins execution when a Briasina Task timer event occurs, and updates the assignment order based on the current sound level.

E−1エンベロープ管理マツプの全てをクリヤするとと
もに、該ブリアサイナタスクで占有する変数等を初期値
に設定するとともに、第5タスクタイマカウンタ値TC
NE f 5 Jを“5′”に、また第5タスク時間間
隔TCND [5]を“4”に設定する。さらに、タス
ク管理マツプのタスク番号が5”であるタスク番号にお
けるタイマ処理要求フラグを“1”に設定する。
Clears all of the E-1 envelope management map, sets variables etc. occupied by the Briasina task to initial values, and sets the fifth task timer counter value TC.
NE f 5 J is set to "5'" and the fifth task time interval TCND [5] is set to "4". Furthermore, the timer processing request flag for the task number whose task number is 5 in the task management map is set to "1".

E−2要求元タスク番号N5TKを“5′に、また要求
元イベント値N5ETを°“1”に設定してイベント待
ちモニタコールを行なう。ブリアサイナタスクタイマイ
ベントが発生すると、次のステップE−3に進む。
E-2 Set the requester task number N5TK to "5' and the requester event value N5ET to "1" and perform an event wait monitor call. When the Briasina task timer event occurs, the next step E- Proceed to step 3.

E−3タスク管理マツプのタスク番号が“5゛であるタ
スク番号における待ちイベント値とイベント発生フラグ
の第1イベントとを゛″00パ定する。
E-3 Set the waiting event value and the first event of the event occurrence flag for the task number "5" in the task management map to "00".

E−4第Nブリアサイン順位の楽音発生チャネル番号を
示す第Nプリアサイン順位楽音発生チャネル番号PAS
S[N]を対応する“N“”  (=0゜1、・・・、
15)に設定する。
E-4 Nth preassignment rank musical tone generation channel number PAS indicating the musical tone generation channel number of the Nth preassignment rank
“N”” corresponding to S[N] (=0゜1,...
15).

E−5メインアサイナ処理中フラグMAEFを“0”。E-5 Set main assigner processing flag MAEF to "0".

に設定する。Set to .

E−6楽音発生チャネル管理マツプの各楽音発生チャネ
ル番号における現発音レベルを楽音発生チャネル番号G
Nに対応するブリアサイナ発音レベルPLEV [GN
Jとするとともに、現発音レベルが“127”以下の楽
音発生チャネルの数を調べてブリアサイナタスクにおけ
る割当て可能楽音発生チャネル数を示すブリアサイナ割
当て可能楽音発生チャネル数PACNとする。
E-6 The current sound generation level for each musical sound generation channel number in the musical sound generation channel management map is determined by the musical sound generation channel number G.
Briasina sound level PLEV corresponding to N [GN
J, and the number of tone generation channels whose current sound generation level is "127" or lower is checked to determine the number of tone generation channels PACN that can be assigned to the Briasina task, indicating the number of tone generation channels that can be assigned in the Briasina task.

E−7ブリアサイナ発音レベルPLEV [GNJを小
なる順に並べ換えるとともに、第Nプリアサイン順位楽
音発生チャネル番号PASS[N]も対応して並べ換え
る。言い換えれば、ブリアサイナ発音レベルPLEV 
(GNJがPLEV(3j<PLEVt5j<PLEV
(21・・・の順であればPASS[0]=3、PAS
S [1]=5、PASS[2]=2・・・とする。
E-7 Bria Assignment Sound Generation Level PLEV [GNJ is rearranged in descending order, and the Nth preassignment rank tone generation channel number PASS[N] is also rearranged accordingly. In other words, Briasina pronunciation level PLEV
(GNJ is PLEV (3j<PLEVt5j<PLEV
(If the order is 21..., PASS[0]=3, PASS
S[1]=5, PASS[2]=2...

E−8タスクロックをかけてタスクロックが解除される
まで他のタスクの割込みを禁止する。
E-8 Locks the task and prohibits other tasks from interrupting it until the task lock is released.

E−9メインアサイナ処理中ソラグMAEFが“0°゛
であるか否かを判断する。メインアサイナ処理中フラグ
MAEFが°°0”である場合には、ステップE−11
に進む。
E-9 Determine whether the main assigner processing flag MAEF is "0°". If the main assigner processing flag MAEF is "0°", step E-11
Proceed to.

E−10ステップE−9における判断においてメインア
サイナ処理中フラグMAEFが0°′でない場合には、
ステップE−6、E−7の処理中においてメインアサイ
ナタスクを実行したことから、タスクロックを解除して
再ソートをすべくステップE−4に戻る。
E-10 If the main assigner processing flag MAEF is not 0°' in the judgment at step E-9,
Since the main assigner task was executed during the processing of steps E-6 and E-7, the process returns to step E-4 to release the task lock and re-sort.

E−11ステップE−9における判断においてメインア
サイナ処理中ソラグMAEFが“0”である場合には、
まず順次に第Nプリアサイン順位楽音発生チャネル番号
PASS[N]を第Nアサイン順位楽音発生チャネル番
号MASS[N]とするとともに、次に対象アサイン順
位TASNを0′”に設定する。また、ブリアサイナ割
当て可能楽音発生チャネル数PACNを割当て可能楽音
発生チャネル数GACNとする。
E-11 If the determination in step E-9 is that Solag MAEF during main assigner processing is "0",
First, the Nth preassignment order musical sound generation channel number PASS[N] is sequentially set to the Nth assignment order musical sound generation channel number MASS[N], and then the target assignment order TASN is set to 0'''. Let the number of allocatable musical tone generation channels PACN be the number of allocatable musical tone generation channels GACN.

E−12タスクロックを解除してステップE−2に戻る
E-12 The task lock is released and the process returns to step E-2.

Oエンベロープタスク(第11図) エンベロープタスクは、エンヘロープタスクタイマイベ
ントが発生すると実行を開始し、順次に各エンベロープ
チャネルのエンベロープタスクおよび現発音レベルを更
新するとともに、エンベロープレベルが目標値に達する
と、新たな目標値およびレートへの目標値およびレート
の更新と楽音発生チャネルへの転送とを行なう。
O Envelope Task (Figure 11) The envelope task starts execution when an envelope task timer event occurs, and sequentially updates the envelope task and current sound level of each envelope channel, and waits until the envelope level reaches the target value. Then, the target value and rate are updated to new target values and rates and transferred to the tone generation channel.

F−1該エンベロープタスクで占有する変数等を初期値
に設定するとともに、第6タスククイマカウンタ値TC
NE [6]を“4”に、また第6タスク時間間隔TC
ND[6]を°°4′°に設定する。さらに、タスク管
理マツプのタスク番号が“6゛のタイマ処理要求フラグ
を“1”に設定する。
F-1 Set the variables etc. occupied by the envelope task to initial values, and set the 6th task queue counter value TC.
NE [6] to “4” and the 6th task time interval TC
Set ND[6] to °°4'°. Furthermore, the timer processing request flag for the task number "6" in the task management map is set to "1".

F−2要求元タスク番号N5TKを“6′′に、また要
求元イベント値N5ETを“′1”に設定してイベント
待ちモニタコールを行なう。エンヘロープタスクタイマ
イベントが発生すると、次のステップF−3に進む。
F-2 Set the requester task number N5TK to "6'' and the requester event value N5ET to "'1" and make an event wait monitor call. When the engeloop task timer event occurs, the next step Proceed to F-3.

F−3タスク管理マツプのタスク番号が“6゛であるタ
スク番号における待ちイベント値とイベント発生フラグ
の第1イベントとを“0“に設定するとともに、エンベ
ロープ処理対象番号ECTNを“′0゛に設定する。
The waiting event value and the first event of the event occurrence flag for the task number "6" in the F-3 task management map are set to "0", and the envelope processing target number ECTN is set to "'0". Set.

F−4エンベロープ処理対象番号ECTNに対応する楽
音発生チャネル管理マツプの楽音発生チャネル番号にお
けるトランケート中フラグが“1”であるか否かを判断
する。このトランケート中フラグが“I IIでトラン
ケート中である場合にハ、該エンベロープタスクによる
エンベロープ処理は不要なためにステップF−12に進
む。
F-4 It is determined whether the truncation flag in the musical tone generation channel number of the musical tone generation channel management map corresponding to the envelope processing target number ECTN is "1". If the truncation flag is set to "III" and truncation is in progress, the envelope processing by the envelope task is unnecessary and the process proceeds to step F-12.

F−5ステップF−4における判断においてエンベロー
プ処理対象番号ECTNに対応する楽音発生チャネル管
理マツプの楽音発生チャネル番号におけるトランケート
中フラグが“1°′でない場合には、このエンベロープ
処理対象番号ECTNに対応するエンベロープ管理マツ
プのエンベロープチャネル番号における現エンベロープ
レベルを読出してエンベロープレベルELEVとする。
F-5 In step F-4, if the truncation flag for the musical sound generation channel number in the musical sound generation channel management map corresponding to the envelope processing target number ECTN is not "1°", the truncation flag corresponding to this envelope processing target number ECTN is determined. The current envelope level at the envelope channel number of the envelope management map is read and set as the envelope level ELEV.

F−6まず、エンベロープレベルELEVに、エンベロ
ープ処理対象番号ECTNに対応するエンベロープ管理
マツプのエンベロープチャネル番号におけるレートを加
算して、この値を新たなエンベロープレベルELEVと
する。次に、このエンベロープレベルELEVをエンベ
ロープチャネル番号における現エンベロープレベルとす
る。
F-6 First, the rate at the envelope channel number of the envelope management map corresponding to the envelope processing target number ECTN is added to the envelope level ELEV, and this value is set as the new envelope level ELEV. Next, this envelope level ELEV is set as the current envelope level at the envelope channel number.

F−7エンベロープレベルELEVが、エンベロープ処
理対象番号ECTNに対応するエンベロープ管理マツプ
のエンベロープチャネル番号における目標値に到達した
か否かを判断する。目標値に到達していない場合には目
標値、レートの更新をする必要がないためにステップF
−10に進む。
F-7 It is determined whether the envelope level ELEV has reached the target value in the envelope channel number of the envelope management map corresponding to the envelope processing target number ECTN. If the target value has not been reached, there is no need to update the target value and rate, so step F
-Go to 10.

F−8ステップF−7における判断において目標値に到
達している場合には、エンベロープ処理対象番号ECT
Nに対応するエンベロープ管理マツプのエンベロープチ
ャネル番号における現ステップ番号を“°1°゛だけイ
ンクリメントする。
F-8 If the target value has been reached in the judgment in step F-7, the envelope processing target number ECT
The current step number in the envelope channel number of the envelope management map corresponding to N is incremented by "°1°".

F−9エンベロープ処理対象番号ECTNに対応するエ
ンベロープ管理マツプのエンベロープチャネル番号にお
けるレートおよび目標値を、このエンベロープチャネル
番号における現ステップ番号についてのレートおよび目
標値に更新するとともに、対応する楽音発生チャネルに
転送する。
F-9 Update the rate and target value for the envelope channel number of the envelope management map corresponding to the envelope processing target number ECTN to the rate and target value for the current step number for this envelope channel number, and update the rate and target value for the corresponding musical tone generation channel. Forward.

F−10エンベロープ処理対象番号ECTNに対応する
エンベロープ管理マツプのエンベロープチャネル番号に
おける現ステップ番号と、トランケート禁止ステップ数
とを比較して現ステップ番号の方が大きいか否かを判断
する。この現ステップ番号が大きくなく、いまだトラン
ケート禁止ステップが大きくある場合にはステップF−
12に進み、現発音レベルを“255”に維持する。
The current step number in the envelope channel number of the envelope management map corresponding to the F-10 envelope processing target number ECTN is compared with the number of truncation prohibited steps to determine whether the current step number is larger. If this current step number is not large and there are still large truncation prohibited steps, step F-
Step 12 follows, and the current sound level is maintained at "255".

F−11ステップF−10における判断において現ステ
ップ番号が大きい場合には、エンベロープ処理対象番号
ECTHに対応する楽音発生チャネル管理マツプの楽音
発生チャネル番号における現発音レベルをエンベロープ
レベルELEVに更新するとともに、エンベロープ処理
対象番号ECTNに対応する楽音発生チャネル管理マツ
プの楽音発注チャネル番号における現トランケート禁止
フラグを“O”に設定する。
F-11 If the current step number is large in the judgment in step F-10, the current sound level at the musical tone generation channel number in the musical tone generation channel management map corresponding to the envelope processing target number ECTH is updated to the envelope level ELEV, The current truncate prohibition flag in the musical tone ordering channel number of the musical tone generation channel management map corresponding to the envelope processing target number ECTN is set to "O".

F−12エンベロープ処理対象番号ECTNが“15”
未満であるか否かを判断する。このエンベロープ処理対
象番号ECTNが°“15”未満でなくて全ての楽音発
生チャネルの処理を終えている場合には、ステップF−
2に戻る。
F-12 envelope processing target number ECTN is “15”
Determine whether the value is less than or equal to the value. If this envelope processing target number ECTN is not less than ``15'' and processing for all musical tone generation channels has been completed, step F-
Return to 2.

F−13エンベロープ処理対象番号ECTNを“1″だ
けインクリメントしてステップF−4に戻る。
F-13 The envelope processing target number ECTN is incremented by "1" and the process returns to step F-4.

なお、前述のようにトランケート中およびタイマイベン
ト間のエンベロープレベルの細かな推移に関しては、楽
音発生チャネルで処理する。また、エンベロープレベル
ELEVは16ビツトで表わスカ、現発音レベルはその
うちの上位7ビツトを使用する。
Note that, as described above, detailed changes in the envelope level during truncation and between timer events are processed by the tone generation channel. The envelope level ELEV is represented by 16 bits, and the current sound level uses the upper 7 bits.

○エデイツトタスク エデイツトタスクは、エデイツト要求イベントが発注す
ると実行を開始し、対応する処理を行なう。なお、公知
の技術なために要点のみを説明する。
○Edit Task The edit task starts execution when an edit request event is issued and performs the corresponding processing. Note that since this is a known technique, only the main points will be explained.

G−1該エデイツトタスクで占有する変数等を初期値に
設定する。
G-1 Set variables etc. occupied by the edit task to initial values.

G−2要求元タスク番号N5TKを゛7パに、また要求
元イベント値N5ETを該エデイツトタスクでの全ての
イベント待ちを示す3FFH”に設定してイベント待ち
モニタコールを行なう。エデイツト要求イベントが発生
すると、次のステップG−3に進む。
G-2 Make an event wait monitor call by setting the request source task number N5TK to ``7'' and the request source event value N5ET to 3FFH, which indicates that the edit task is waiting for all events. If this occurs, the process proceeds to the next step G-3.

G−3前述のように“1′に設定されるタスク管理マツ
プにおけるイベント発生フラグに対応した処理を行なう
。例えば、演奏に使用するパターンをROM22Bから
読出してパターンマツプに書込んだり、パターンマツプ
のトランケート禁止フラグを設定または解除したり、ソ
ングデータマツプに使用するパターン番号PNUMの設
定更新等を行なう。必要に応じて表示要求イベントを発
生する。処理を終了するとステップG2に戻る。
G-3 Perform processing corresponding to the event occurrence flag in the task management map set to "1" as described above. For example, read the pattern used for performance from the ROM 22B and write it in the pattern map, or write the pattern in the pattern map. It sets or cancels the truncate prohibition flag, updates the setting of the pattern number PNUM used in the song data map, etc. Generates a display request event as necessary. When the process is completed, the process returns to step G2.

○表示タスク 表示タスクは、表示要求イベントが発生すると実行を開
始し、対応する表示処理を行なう。なお、公知技術なた
めに要点のみを説明する。
○Display Task The display task starts execution when a display request event occurs and performs the corresponding display process. Note that since this is a known technique, only the main points will be explained.

H−1該表示タスクで占有する変数等を初期値に設定す
るとともに、初期状態の表示を行なう。
H-1 Set variables and the like occupied by the display task to initial values, and display the initial state.

H−2タイマインクラブド処理開始フラグ下ISFを“
1゛に設定するとともに、要求元タスク番号N5TKを
“8“に、また要求元イベント値N5ETを該操作子タ
スクでの全てのイベント待ちを示す“405H”に設定
してイベント待ちモニタコールを行なう。表示要求イベ
ントが発生すると、次のステップH−3に進む。
Set the ISF under the H-2 timer included processing start flag to “
1'', set the requesting task number N5TK to "8", and setting the requesting event value N5ET to "405H", which indicates waiting for all events in the operator task, and performs an event wait monitor call. . When a display request event occurs, the process advances to the next step H-3.

H−3前述のように“1′”に設定されているイベント
発生フラグに対応した処理を行なう。例えば、演奏状態
の表示を行なう等する。処理を終了すると、ステップH
−2に戻る。
H-3 Perform processing corresponding to the event occurrence flag set to "1'" as described above. For example, the performance status may be displayed. When the process is finished, step H
- Return to 2.

次に、本実施例の電子楽器の動作についで、概略的に説
明する。
Next, the operation of the electronic musical instrument of this embodiment will be schematically explained.

i)電源を投入すると、まずモニタプログラムのリセッ
ト(ルーチンZA)による処理後に(ステップZA−1
,ZA−2)、タスク優先順位に本実施例においては操
作子タスク(ルーチンA)、プレイタスク(ルーチンB
)、メインアサイナタスク(ルーチンC)、発音タスク
(ルーチンD)、ブリアサイナタスク(ルーチンE)、
エンベロープタスク(ルーチンF)、エデイツトタスク
(ルーチンG)および表示タスク(ルーチンH)の順次
に初期設定処理(ステップA−1,−2、ステップB−
1,−2、ステップC−1,−2、ステップD−1,−
2、ステップE−1,−2、ステップF−1,−2、ス
テップG−1,−2、ステップH−1,−2)を行なう
。次に、スタート操作を行なう。
i) When the power is turned on, first the monitor program is reset (routine ZA) and then (step ZA-1)
, ZA-2), and the task priorities in this embodiment include the operator task (routine A) and the play task (routine B).
), Main Assigner Task (Routine C), Pronunciation Task (Routine D), Brias Assigner Task (Routine E),
The envelope task (routine F), the edit task (routine G), and the display task (routine H) are sequentially initialized (steps A-1, -2, step B-).
1,-2, step C-1,-2, step D-1,-
2. Step E-1, -2, step F-1, -2, step G-1, -2, step H-1, -2). Next, perform the start operation.

ii)所定時間間隔でもって発生するタイマインクラブ
ドがかかると、モニタプログラムのタイマインクラブド
処理(ルーチンZD)を開始する。
ii) When the timer inclination occurs at predetermined time intervals, the timer inclination processing (routine ZD) of the monitor program is started.

■ 当初は、繰作子タスクのタイマイベント発生要件を
満たしているために(ステップZD−1〜ZD−6)、
タスク管理マツプの操作子タスクに対するタスク番号に
おけるステータスをランを示す“OI+に設定して(ス
テップZD−14)タイマイベントを発生させる。
■ Initially, because the timer event generation requirements of the repeater task are satisfied (steps ZD-1 to ZD-6),
The status of the task number for the operator task in the task management map is set to "OI+" indicating run (step ZD-14), and a timer event is generated.

次に、操作子タスク(ルーチンA)を実行しテ(ステッ
プA−2〜A−4)イベントを発生し、イベント発生モ
ニタコール(ルーチンZC)を行なう。
Next, the operator task (routine A) is executed to generate an event (steps A-2 to A-4), and an event occurrence monitor call (routine ZC) is performed.

■ モニタプログラムのイベント発生モニタコール(ル
ーチンZC)において、タスク管理マツプのプレイタス
クに対するタスク番号におけるイベント発生フラグの対
応するイベントを“1″に設定するとともに(ステップ
ZC−1)、ステータスをレディを示す“1゛に設定す
る(ステップZC−2,−3)。なお、操作子タスクの
タスク優先順位がプレイタスクのタスク優先順位より高
いために操作子タスク(ルーチンA)を再び開始して(
ステップZC−4)、この操作子タスク(ルーチンA)
においてタイマイベント待ちしくステップA−2)、イ
ベント待ちモニタコール(ルーチンZB)を行なう。
■ In the event occurrence monitor call (routine ZC) of the monitor program, the event corresponding to the event occurrence flag in the task number for the play task in the task management map is set to "1" (step ZC-1), and the status is set to ready. The control task (routine A) is restarted because the task priority of the control task is higher than the task priority of the play task (steps ZC-2, -3).
Step ZC-4), this operator task (routine A)
In step A-2), an event wait monitor call (routine ZB) is made while waiting for a timer event.

■ モニタプログラムのイベント待ちモニタコール(ル
ーチンZB)において、まだ操作子タスクのタイマイベ
ントが発生していないために(ステップZB−1)、タ
スク管理マツプの操作子タスクに対するタスク番号にお
けるステータスをウェイトを示す“2“に設定して(ス
テップZB−2)タスク管理マツプを調べる(ステップ
ZB−3)。このタスク管理マツプを調べると、ステー
タスがレディを示す“1”である最優先タスクのタスク
番号がプレイタスクのタスク番号であるために、このタ
スク番号におけるステータスをランを示す“0″に設定
してプレイタスク(ルーチンB)をランさせる(ステッ
プZB−4)。
■ In the event wait monitor call (routine ZB) of the monitor program, since the timer event of the operator task has not yet occurred (step ZB-1), the status of the task number for the operator task on the task management map is set to wait. The task management map is set to "2" (step ZB-2) and the task management map is checked (step ZB-3). Examining this task management map, the task number of the highest priority task whose status is "1" indicating ready is the task number of the play task, so the status of this task number is set to "0" indicating run. to run the play task (routine B) (step ZB-4).

このプレイタスク(ルーチンB)において演奏開始設定
して(ステップB−2〜B−5)タイマイベント待ちし
くステップB−6)、イベント待チモニタコール(ルー
チンZB)を行なう。
In this play task (routine B), the performance is set to start (steps B-2 to B-5), a timer event is waited for (step B-6), and an event wait monitor call is made (routine ZB).

■ モニタプログラムのイベント待ちモニタコール(ル
ーチンZB)において、タイマイベントが発生している
か否かを調べ(ステップZB−1)、タイマイベントが
発生しているとプレイタスク(ルーチンB)を再び開始
する。このプレイタスク(ルーチンB)において演奏デ
ータを順次に読出しくステップB6〜B−13)、この
演奏データを読出し終えるとアサイン要求イベントを発
生して(ステップB−16)、イベント発生モニタコー
ル(ルーチンZC)を行なう。
■ In the monitor program's event wait monitor call (routine ZB), check whether a timer event has occurred (step ZB-1), and if a timer event has occurred, restart the play task (routine B). . In this play task (routine B), the performance data is sequentially read out (steps B6 to B-13), and when the performance data has been read out, an assignment request event is generated (step B-16), and an event occurrence monitor call (routine ZC).

■ モニタプログラムのイベント発生モニタコール(ル
ーチンZC)において、タスク管理マツプのメインアサ
イナタスクに対するタスク番号におけるイベント発生フ
ラグの対応するイベントを“1”に設定するとともに(
ステップZC−1)、ステータスをレディを示す“1゛
に設定する(ステップZC−2゜3)。なお、プレイタ
スクのタスク優先順位がメインアサイナタスクのタスク
優先順位より高いためにプレイタスク(ルーチンB)を
再び開始して(ステップZC−4)、このプレイタスク
(ルーチンB)においてタイマイベント待ちしくステッ
プB−6)、イベント待ちモニタコール(ルーチンZB
)を行なう。
■ In the event occurrence monitor call (routine ZC) of the monitor program, set the event corresponding to the event occurrence flag in the task number for the main assigner task in the task management map to "1" and (
Step ZC-1), the status is set to "1" indicating ready (Step ZC-2-3). Note that since the task priority of the play task is higher than the task priority of the main assigner task, the play task ( Routine B) is restarted (step ZC-4), and in this play task (routine B), a timer event wait is executed (step B-6), and an event wait monitor call (routine ZB) is executed.
).

■ モニタプログラムのイベント待ちモニタコール(ル
ーチンZB)において、タイマイベントが発生している
か否かを調べる(ステップZB−1)。このタイマイベ
ントの発生を調べると、次のタイマイベントがまだ発生
していないために、タスク管理マツプのプレイタスクに
対するタスク番号におけるステータスをウェイトを示す
′°2”に設定して(ステップZB−2)タスク管理マ
ツプを調べる(ステップZB−3)。このタスク管理マ
ツプを調べると、ステータスがレディを示す“1”であ
る最優先タスクのタスク番号がメインアサイナタスクの
タスク番号であるために、このタスク番号におけるステ
ータスをランを示す“0”に設定してメインアサイナタ
スク(ルーチンC)をランさせる(ステップZB−4)
。このメインアサイナタスク(ルーチンC)においては
、演奏データを楽音発生チャネル管理マツプに書込む(
ステップC−2〜C−7)。この楽音発生チャネル管理
マツプへの書込みに際しては、アサイン順位にもとづく
とともに、現発音レベルが“127″以下の楽音発生チ
ャネルに書込む。
(2) In the event wait monitor call (routine ZB) of the monitor program, check whether a timer event has occurred (step ZB-1). When we check the occurrence of this timer event, we find that the next timer event has not yet occurred, so we set the status of the task number for the play task in the task management map to ``°2'' indicating the weight (step ZB-2). ) Examine the task management map (step ZB-3). Examining this task management map reveals that the task number of the highest priority task whose status is "1" indicating ready is the task number of the main assigner task. Set the status of this task number to "0" indicating run and make the main assigner task (routine C) run (step ZB-4)
. In this main assigner task (routine C), performance data is written to the musical tone generation channel management map (
Steps C-2 to C-7). When writing to this musical tone generation channel management map, it is based on the assignment order and is written to musical tone generation channels whose current sound generation level is "127" or lower.

次に、発音要求イベントを発生して(ステラ7’C−8
)、イベント発生モニタコール(ルーチンZC)を行な
う。
Next, generate a sound request event (Stella 7'C-8
), performs an event occurrence monitor call (routine ZC).

■ モニタプログラムのイベント発生モニタコール(ル
ーチンZC)において、タスク管理マツプの発音タスク
に対するタスク番号おけるイベント発生フラグの発音要
求イベントに対応するイベントを“1”に設定するとと
もに(ステップZC−1)、ステータスをレディを示す
“1”に設定する(ステップZC−2,−3)。なお、
メインアサイナタスクのタスク優先順位が発音タスクの
タスク優先順位より高いためにメインアサイナタスク(
ルーチンC)を再び開始して(ステップZC4)、この
メインアサイナタスク(ルーチンC)において順次に演
奏データを楽音発生チャネル管理マツプに書込み、この
演奏データの書込み処理が終了すると(ステップC−4
゜−5)タイマイベント待ちしくステップC2)、イベ
ント待ちモニタコール(ルーチンZB)を行なう。
■ In the event occurrence monitor call (routine ZC) of the monitor program, the event corresponding to the sound generation request event of the event occurrence flag in the task number for the sound generation task of the task management map is set to "1" (step ZC-1), The status is set to "1" indicating ready (steps ZC-2, -3). In addition,
The main assigner task (
Routine C) is restarted (step ZC4), and in this main assigner task (routine C), performance data is sequentially written to the musical tone generation channel management map, and when the performance data writing process is completed (step C-4).
-5) Waiting for a timer event In step C2), an event wait monitor call (routine ZB) is made.

■ モニタプログラムのイベント待ちモニタコール(ル
ーチンZB)において、アサイン要求イベントが発生し
ているか否かを調べる(ステップZB−1)。このアサ
イン要求イベントの発生を調べると、次のアサイン要求
イベントがまだ発生していないために、タスク管理マツ
プのメインアサイナタスクに対するタスク番号における
ステータスをウェイトを示す“2″に設定して(ステッ
プZB−2)タスク管理マツプを調べる(ステップZB
3)。このタスク管理マツプを調べると、ステータスが
レディを示す“1°゛である最優先タスクのタスク番号
が発音タスクのタスク番号であるために、このタスク番
号におけるステータスをランを示す“0”に設定して発
音タスク(ルーチンD)をランさせる(ステップZB−
4)。この発音タスク(ルーチンD)においては、楽音
発生チャネル管理マツプに書込まれた演奏データにもと
づきトランケート禁止ステップ数等の楽音発生に関する
各種パラメータを演算して設定し、発音の開始を指示す
る(ステップD−11〜D−17)。なお、現発音レベ
ルを“255”に設定する。次に、発音要求イベント待
ちをして(ステップD−2)、イベント発生モニタコー
ル(ルーチンZB)を行なう。
(2) In the event wait monitor call (routine ZB) of the monitor program, check whether an assignment request event has occurred (step ZB-1). When we check the occurrence of this assignment request event, we find that the next assignment request event has not yet occurred, so the status of the task number for the main assigner task in the task management map is set to "2" indicating the weight (step ZB-2) Examine the task management map (Step ZB
3). Examining this task management map, the task number of the highest priority task whose status is "1°" indicating ready is the task number of the pronunciation task, so the status of this task number is set to "0" indicating run. and run the pronunciation task (routine D) (step ZB-
4). In this sound generation task (routine D), various parameters related to musical sound generation, such as the number of steps in which truncation is prohibited, are calculated and set based on the performance data written in the musical sound generation channel management map, and the start of sound generation is instructed (step D-11 to D-17). Note that the current sound level is set to "255". Next, it waits for a sound generation request event (step D-2) and makes an event occurrence monitor call (routine ZB).

■ モニタプログラムのイベント待ちモニタコール(ル
ーチンZB)において、発音要求イベントが発生してい
るか否かを調べる(ステップZB−1)。この発音要求
イベントの発生を調べると、次の発音要求イベントがま
だ発生していないために、タスク管理マツプの発音タス
クに対するタスク番号におけるステータスをウェイトを
示す′°2”に設定して(ステップZB−2)タスク管
理マツプを調べる(ステップZB−3)。このタスク管
理マツプを調べて全てのタスク番号のステータスがウェ
イトを示す“2”である場合にはスリープする。
(2) In the event wait monitor call (routine ZB) of the monitor program, it is checked whether a sound generation request event has occurred (step ZB-1). When we check the occurrence of this pronunciation request event, we find that the next pronunciation request event has not occurred yet, so the status of the task number for the pronunciation task in the task management map is set to ``°2'' indicating the weight (step ZB -2) Examine the task management map (step ZB-3). Examine this task management map and go to sleep if the status of all task numbers is "2" indicating weight.

ii)ブリアサイナタスク(ルーチンE)は、対応する
タイマイベン、トが発生すると、楽音発生チャネル管理
マツプの現発音レベルにもとづいてアサイン順位を更新
して(ステップE−3〜E−12) 、次のタイマイベ
ント待ちをする(ステップE−2)。
ii) When the corresponding timer event occurs, the Briassigner task (routine E) updates the assignment order based on the current sound level in the tone generation channel management map (steps E-3 to E-12), and then Waits for a timer event (step E-2).

iv)エンベロープタスク(ルーチンF)は、対応する
タイマイベントが発生すると、楽音発生チャネル管理マ
ツプおよびエンベロープ管理マツプにもとづいて楽音発
生チャネル管理マツプにおける現発音レベルおよびエン
ベロープ管理マツプにおけるエンベロープレベルを更新
幕する(ステップF−3〜F−9)。また、エンベロー
プのステップが進んでトランケート禁止ステップ数を超
えると、現発音レベルを“127”以下である現エンベ
ロープレベルに対応する値に更新して、次のタイ1イベ
ント待ちをする(ステップF−2)。したがって、演奏
データのトランケート禁止フラグに対応して設定された
期間において楽音発生チャネルのトランケートを禁止す
る。
iv) When the corresponding timer event occurs, the envelope task (routine F) updates the current sound level in the musical tone generation channel management map and the envelope level in the envelope management map based on the musical tone generation channel management map and the envelope management map. (Steps F-3 to F-9). Also, when the envelope step progresses and exceeds the number of truncate prohibition steps, the current sound level is updated to a value corresponding to the current envelope level that is "127" or less, and the process waits for the next tie 1 event (step F- 2). Therefore, truncation of the tone generation channel is prohibited during the period set corresponding to the truncation prohibition flag of the performance data.

続いて、新たな楽音の発音における楽音発生チャネルへ
の割当てに際して、発音中の楽音発生チャネルをトラン
ケート禁止する本実施例における動作について説明する
Next, an explanation will be given of the operation in this embodiment of prohibiting truncation of the musical tone generating channel that is currently being generated when a new musical tone is to be assigned to the musical tone generating channel.

現発音レベルが“127”以下の楽音発生チャネルをア
サイン順位にもとづいてトランケートして新たな演奏デ
ータを割当てる。この演奏データの割当てに際しては、
当該演奏データのトランヶート禁止フラグにもとづいて
トランケート禁止ステップ数を設定するとともに、現発
音レベルを“255”に設定する。
Tone generation channels whose current sound generation level is "127" or lower are truncated based on the assignment order and new performance data is assigned. When allocating this performance data,
The number of truncate prohibition steps is set based on the truncate prohibition flag of the performance data, and the current sound level is set to "255".

次に、エンベロープが推移して現ステップ番号がトラン
ケート禁止ステップ数を超えると、現発音レベルを“1
27′″以下の現エンベロープレベルに設定する。なお
、ブリアサイナタスクにおいては現発音レベルにもとづ
いて現発音レベルの小さい順にトランケート順位を設定
する。
Next, when the envelope changes and the current step number exceeds the number of truncate prohibited steps, the current sound level is set to “1”.
The current envelope level is set to 27''' or less.In the Briasina task, the truncation order is set in ascending order of the current sound generation level based on the current sound generation level.

したがって、演奏データのトランケート禁止フラグに対
応して設定されたトランケート禁止ステップ数の期間に
亘って楽音発生チャネルのトランケートが禁止される。
Therefore, truncation of the musical sound generation channel is prohibited over a period of the number of truncate prohibition steps set corresponding to the truncation prohibition flag of the performance data.

本実施例においては、トランケート禁止ステップ数を音
色に対応して設定したが、ベロシティ、音高等にももと
づいて設定あるいは重みづけしても良い。さらに、複数
個の構成音(パーシャル)からなる場合には各構成音に
対応する重みづけをすると良い。また、直接ステップ数
を指定するようにしても良い。
In this embodiment, the number of steps for which truncation is prohibited is set in accordance with the timbre, but it may also be set or weighted based on velocity or pitch. Furthermore, when the sound consists of a plurality of constituent sounds (partials), it is preferable to give weights corresponding to each constituent sound. Alternatively, the number of steps may be directly specified.

本実施例においては、個々の音についてトランケート禁
止フラグを設定したが音色あるいは構成音に設定するよ
うにしても良い。
In this embodiment, the truncate prohibition flag is set for each individual note, but it may be set for each tone or constituent note.

なお、ドラムパッド等を用いた手動演奏において実現す
る場合には、フットスイッチ等を用意して、このフット
スイッチ等の操作によって特定のパッドあるいは音色の
トランケート禁止フラグをセットするようにしても良い
In the case of manual performance using a drum pad or the like, a foot switch or the like may be provided, and the truncation prohibition flag for a specific pad or tone may be set by operating the foot switch or the like.

〔第2実施例〕 一発音優先度にもとづいて所定期間においてトランケー
トを抑制する場合 次に、本実施例について具体的に説明するが、第1実施
例と同一符号は同一内容を示すとともに、特に第1実施
例と異なる部分についてのみ説明して重複する部分等の
説明等は省略する。
[Second Embodiment] When suppressing truncation in a predetermined period based on the priority of one pronunciation Next, this embodiment will be explained in detail. Only the parts that are different from the first embodiment will be explained, and the explanation of the overlapping parts will be omitted.

まず、マイコン22のROM22Bには、トランケート
禁止フラグの“0”および“1′′夫々における第1実
施例のトランケート禁止ステップ数に対応して、本実施
例においてはトランケート禁止ステップ数に加えてトラ
ンケート抑制区間のステップ数を示すトランケート抑制
ステップ数が記憶されている。なお、本実施例における
トランケート禁止ステップ数はトランケート禁止フラグ
が“0″の第1実施例におけるトランケート禁止ステッ
プ数に、本実施例におけるトランケート抑制ステップ数
はトランケート禁止フラグが“1“の第1実施例におけ
るトランケート禁止ステップ数にほぼ対応する。
First, in the ROM 22B of the microcomputer 22, in addition to the number of truncate prohibited steps, in this embodiment, in addition to the number of truncate prohibited steps, corresponding to the number of truncate prohibited steps in the first embodiment when the truncate prohibited flag is "0" and "1", respectively. The number of truncate inhibition steps indicating the number of steps in the inhibition section is stored.The number of truncate inhibition steps in this embodiment is the same as the number of truncation inhibition steps in the first embodiment where the truncate inhibition flag is "0". The number of truncate inhibition steps in the first example approximately corresponds to the number of truncation inhibition steps in the first embodiment in which the truncate inhibition flag is "1".

また、マイコン22のRAM22Cにおけるワーキング
エリアに設定されているパターンマツプおよび楽音発生
チャネル管理マツプに関しては、本実施例においては第
1実施例のトランケート禁止フラグの領域が発音の優先
度を示す発音優先度NTPL(〉1)の領域となる。な
お、この発音優先度NTPLは、ステップB−11、ス
テップC−6,C−7およびステップD−11において
第1実施例におけるトランケート禁止フラグNTIFに
置き換わって処理される。また、エンベロープ管理マツ
プにはトランケート抑制ステップ数を記憶する領域が設
けられている。
Regarding the pattern map and musical sound generation channel management map set in the working area of the RAM 22C of the microcomputer 22, in this embodiment, the area of the truncation prohibition flag in the first embodiment is the sound generation priority indicating the priority of sound generation. The area is NTPL (>1). Note that this sound generation priority NTPL is processed in place of the truncate prohibition flag NTIF in the first embodiment in step B-11, steps C-6, C-7, and step D-11. Further, the envelope management map is provided with an area for storing the number of truncation suppression steps.

続いて、各ルーチンにおける第1実施例との相違点につ
いてのみ説明する。
Next, only the differences from the first embodiment in each routine will be explained.

○メインアサイナタスク(ルーチンC)本実施例におい
ては、ステップC−6とステップC−7との間に、次の
ステップC−6°が挿入される。
Main Assigner Task (Routine C) In this embodiment, the next step C-6° is inserted between step C-6 and step C-7.

C−6“ 音色番号NTTNとベロシティNTVLとよ
りアタックレベルを算出し、このアタックレベルに発音
優先度NTPLを乗算した値と、アサイン対象の楽音発
生チャネルを示すアサイン順位Nが対象アサイン順位T
ASNの第Nアサイン順位楽音発生チャネル番号MAS
S[N] 、言い換えれば対象アサイン順位TMSNの
楽音発生チャネル番号MASS [TMSN]に対応す
る楽音発生チャネル管理マツプにおける楽音発生チャネ
ル番号の現発音レベルとを比較する。この現発音レベル
がアタックレベルに発音優先度NTPLを乗算した値未
満である場合にはステップC−7に進み、未満でない場
合には現在の発音を優先させるべくステップC−7〜9
の処理を行なわずにステップC−4に戻る。
C-6 "The attack level is calculated from the tone number NTTN and the velocity NTVL, and the value obtained by multiplying this attack level by the sound generation priority NTPL and the assignment rank N indicating the musical tone generation channel to be assigned is the target assignment rank T.
ASN Nth assignment order musical sound generation channel number MAS
S[N], in other words, the current sound generation level of the musical tone generating channel number in the musical tone generating channel management map corresponding to the musical tone generating channel number MASS[TMSN] of the target assignment order TMSN is compared. If this current sound level is less than the value obtained by multiplying the attack level by the sound generation priority NTPL, proceed to step C-7, and if not, proceed to steps C-7 to C-9 to give priority to the current sound sound.
The process returns to step C-4 without performing the above process.

○発音タスク(ルーチンD) 本実施例においては、ステップD−11に関して、トラ
ンケート禁止ステップ数に加えてトランケート抑制ステ
ップ数も読出し、エンベロープ生成パラメータ群の一部
とする。
- Sound generation task (routine D) In this embodiment, regarding step D-11, in addition to the number of truncation prohibition steps, the number of truncation suppression steps is also read out and made into a part of the envelope generation parameter group.

また、ステップD−17に関して、対象番号GCTNに
対応するエンベロープ管理マツプには、トランケート禁
止ステップ数、各ステップの目標値およびレートに加え
てトランケート抑制ステップ数も対象番号GCTNに対
応する楽音発生チャネル管理マツプの楽音発生チャネル
番号におけるエンベロープ生成パラメータ群にもとづい
て演算されて設定される。
Regarding step D-17, the envelope management map corresponding to the target number GCTN includes the number of truncation inhibition steps, the target value and rate of each step, and the musical sound generation channel management map corresponding to the target number GCTN. It is calculated and set based on the envelope generation parameter group for the tone generation channel number of the map.

Oプリアサイナタスク(ルーチンE) 本実施例においては、ステップE−6に関して、ブリア
サイナタスクにおける割当て可能楽音発生チャネル数を
示すブリアサイナ割当て可能楽音発生チャネル数PAC
Nを現発音レベルが“254”以下の楽音発生チャネル
の数に変更される。
O Preasiner Task (Routine E) In this embodiment, regarding step E-6, the number of musical tone generation channels PAC that can be assigned to the preassigner, which indicates the number of musical tone generation channels that can be assigned in the preassigner task, is
N is changed to the number of tone generation channels whose current sound generation level is "254" or less.

Oエンベロープタスク(ルーチンF) 本実施例においては、ステップF−10とステップF−
11との間に、次のステップF−10’が挿入される。
O envelope task (routine F) In this embodiment, step F-10 and step F-
11, the next step F-10' is inserted.

F−10” エンベロープ処理対象番号ECTNに対応
スルエンベロープ管理マツプのエンベロープチャネル番
号における現ステップ番号と、トランケート抑制ステッ
プ数とを比較して現ステップ番号の方が大きいが否が判
断する。
F-10" The current step number in the envelope channel number of the envelope management map corresponding to the envelope processing target number ECTN is compared with the truncation suppression step number to determine whether the current step number is larger.

この現ステップ番号が大きくなく、いまだトランケート
抑制ステップである場合には、まf現発音レベルをエン
ベロープレベルELEVに発音優先度NTPLを乗算し
た値に更新する。この乗算値が°“254”以上である
場合には“254″としてステップF−12に進む。ま
た、現ステップ番号が大きくてトランケート抑制ステッ
プを終了している場合には、ステップF−11に進む。
If this current step number is not large and it is still a truncate suppression step, the current sound generation level is updated to a value obtained by multiplying the envelope level ELEV by the sound generation priority NTPL. If this multiplied value is greater than or equal to "254", it is determined as "254" and the process proceeds to step F-12. If the current step number is large and the truncation suppression step has been completed, the process advances to step F-11.

Oエデイツトタスク(ルーチンC) 本実施例においては、トランケート禁止フラグの設定、
解除に換えて発音優先度NTPLを変更する。
O edit task (routine C) In this embodiment, setting of the truncate prohibition flag,
Instead of canceling, the sound generation priority NTPL is changed.

以上の本実施例においては、要するに割当てに際しては
、新音の予定するアタックレベルに発音優先度NTPL
を乗算した値と、割当て先の楽音発生チャネルの現発音
レベルとを比較して、新音の値が大きい場合には新音を
割当て、大きくない場合には新音の割当てを断念する。
In the above-described embodiment, when allocating, the pronunciation priority NTPL is set to the planned attack level of the new sound.
The current sound generation level of the musical tone generation channel to which the new tone is to be assigned is compared with the current sound generation level of the tone generation channel to which the new tone is to be assigned.If the new tone value is large, the new tone is assigned, and if it is not, the new tone assignment is abandoned.

この割当てられた楽音はトランケート禁止ステップの期
間に亘ってトランケートされない。そして、トランケー
ト抑制ステップの期間においては、実際のエンベロープ
レベルに発音優先度NTPLを乗算してトランケートを
抑制するものである。
This assigned tone is not truncated during the truncate prohibition step. During the truncate suppression step, truncation is suppressed by multiplying the actual envelope level by the pronunciation priority NTPL.

本実施例においては、発音優先度NTPLをトランケー
ト抑制ステップの期間一定としていたが期間の経過に対
応して変更しても良い。また、演奏データにトランケー
ト抑制期間中のトランケートの抑制度を示すトランケー
ト抑制度を加え、ステップF−10′における現発音レ
ベルの算出に際しては発音優先度NTPLに換えてトラ
ンケートの抑制度を用いるようにしても良い。本実施例
においては、トランケート禁止期間を設けたが単に抑制
するだけにしても良い。なお、エンベロープがいまだア
タックポイントに達していなければ現発音レベルをアタ
ックレベルに発音優先度NTPLを乗算して求める。ま
た、割当てるべき楽音発生チャネルが不足する場合にお
いても、必ずあるいは優先して発音したい音等には優先
発音フラグあるいはその度合いを示す発音順位を設定し
、それにもとづいて楽音発生チャネルに割当てても良い
。例えば、第1パートから順次に演奏データを楽音発生
チャネルへ割当てているが、発音優先フラグが設定され
ているパートあるいは発音順位の高いパートから割当て
るようにしても良い。
In this embodiment, the pronunciation priority NTPL is kept constant during the truncate suppression step, but it may be changed as the period elapses. Furthermore, a truncate suppression degree indicating the degree of truncate suppression during the truncate suppression period is added to the performance data, and the truncate suppression degree is used instead of the pronunciation priority level NTPL when calculating the current sound generation level in step F-10'. It's okay. In this embodiment, a truncation prohibition period is provided, but it may be simply suppressed. Note that if the envelope has not yet reached the attack point, the current sound generation level is determined by multiplying the attack level by the sound generation priority NTPL. Furthermore, even if there is a shortage of musical sound generation channels to be allocated, it is possible to set a priority sound generation flag or a sound generation order indicating the degree of priority sound generation for sounds that should be generated without fail or with priority, and to allocate them to musical sound generation channels based on that. . For example, although the performance data is assigned to the tone generation channels sequentially starting from the first part, the assignment may be made starting from the part for which the sound generation priority flag is set or the part having the highest sound generation order.

第1および第2実施例においては、内部の演奏データを
使用したが、外部の自動リズム演奏装置、電子ドラムの
パッド等から演奏データを供給するようにしても良い。
In the first and second embodiments, internal performance data is used, but performance data may also be supplied from an external automatic rhythm performance device, electronic drum pad, or the like.

第1および第2実施例においては、自動リズム演奏装置
について説明したが、いわゆるシンセサイザー、電子ピ
アノ等、さらにはそれらも対象とする自動演奏装置等に
適宜変更して適用しても良い。
In the first and second embodiments, an automatic rhythm performance device has been described, but the present invention may be applied to a so-called synthesizer, an electronic piano, etc., or an automatic performance device that targets these as well, with appropriate modifications.

第1および第2実施例においては、外部より演奏データ
を受信する場合をも考慮してブリアサイナタスクを所定
時間間隔で実行し、最新のアサイン順位にもとづいてメ
インアサイナタスクを実行するようにしている。ところ
で、自動演奏においては、次に発音すべき発音の演奏デ
ータを既に記憶しているために、事前に演奏データの発
生時期を検知できる。したがって、自動演奏機能等より
演奏データに先立ってブリアサイナタスクの実行指令を
発生させ、ブリアサイナタスクを実行するようにしても
良い。
In the first and second embodiments, the Brias Assigner task is executed at predetermined time intervals in consideration of the case where performance data is received from the outside, and the Main Assigner task is executed based on the latest assignment order. ing. By the way, in automatic performance, since the performance data for the next sound to be produced is already stored, the generation time of the performance data can be detected in advance. Therefore, an execution command for the Briasina task may be generated using an automatic performance function or the like prior to the performance data, and the Briasina task may be executed.

第1および第2実施例はマルチタスク処理による例を示
したが、シングルタスク処理により実施しても良い。そ
の際に、例えばブリアサイナタスクにおける処理はメイ
ンルーチンあるいはタイマインクラブド等のインクラブ
ドにもとづいて実行するようにすると良い。
Although the first and second embodiments show examples using multi-task processing, they may also be implemented using single-task processing. In this case, for example, the processing in the Briasina task may be executed based on the main routine or included items such as timer included items.

第1および第2実施例においてアサイン順位はエンベロ
ープレベルにもとづいたが、同音色でアサイン順位が低
い、言い換えればトランケートされにくい楽音発生チャ
ネルがある場合には、当該楽音発生チャネルのアサイン
順位を高く、言い換えればトランケートしやすくしても
良い。例えば、ブリアサイナタスク処理ルーチンのステ
ップE7の処理後に、ブリアサイン順位順に、次のよう
な■、■の処理を追加すれば良い。
In the first and second embodiments, the assignment order is based on the envelope level, but if there is a musical sound generation channel with the same tone that has a lower assignment order, in other words, it is difficult to be truncated, the assignment order of the musical sound generation channel is set higher, In other words, it may be easier to truncate. For example, after the processing in step E7 of the Briasigner task processing routine, the following processes ① and ② may be added in order of Briassigner ranking.

■i)当該楽音発注チャネルのブリアサイナ発音レベル
PLEV [GN]を調べ、ブリアサイナ発音レベルP
LEν[GN]が”127”以下であって、ii)ブリ
アサイナ発音レベルPLEV [GN]が当該楽音発生
チャネルのブリアサイナ発音レベルPLEV [GN]
より大きい楽音発生チャネルの音色番号を順次に調べ、
当該楽音発生チャネルの音色番号と同じ音色番号が割当
てられている楽音発生チャネルがある場合には、 当該楽音発生チャネルのブリアサイナ発音レベルPLE
V [GN]をその値のl/10に設定変更する。
■i) Check the briasaina pronunciation level PLEV [GN] of the relevant musical tone ordering channel, and check the briasaina pronunciation level P
LEν[GN] is "127" or less, and ii) Briasina sound generation level PLEV [GN] is the Briasina sound generation level PLEV [GN] of the relevant musical tone generation channel.
Sequentially examine the tone numbers of larger musical tone generation channels,
If there is a musical tone generation channel to which the same tone color number as that of the musical tone generation channel is assigned, the Briasina sound generation level PLE of the musical tone generation channel is
Change the setting of V [GN] to 1/10 of that value.

■ 次に、ステップE−7のようにブリアサイナ発音レ
ベルPLEV [GN]にもとづいて並べ換えてブリア
サイン順位を設定し直す。
(2) Next, as in step E-7, the order is rearranged based on the briasaina sound generation level PLEV [GN] and the briasain order is reset.

なお、シンセサイザー等に適用する場合には同音と判断
するのに同一音高であることを加えて判断するようにな
る。
Note that when applied to a synthesizer or the like, the same pitch is added to the same pitch.

第1および第2実施例においてアサイン順位は、エンベ
ロープレベルにもとづ< 現発音レベルにもとづいたが
、特開平1−169496号特許公開公報等に示されて
いる残存発音量にもとづいても良い。また、トランケー
ト禁止中の楽音発生チャネルを除外するのにトランケー
ト禁止を表わす値に現発音レベルを変更して処理したが
、現トランケート禁止フラグを用いて処理するようにし
ても良い。
In the first and second embodiments, the assignment order is based on the envelope level < the current sound level, but it may also be based on the remaining sound volume as shown in JP-A-1-169496, etc. . Further, although the current sound generation level is changed to a value representing truncate prohibition in order to exclude musical tone generation channels for which truncation is prohibited, processing may be performed using the current truncate prohibition flag.

第1および第2実施例においては、ステップ数にもとづ
いて処理したが、時間を設定する等してそれにもとづい
て処理するようにしても良い。
In the first and second embodiments, the processing was performed based on the number of steps, but the processing may be performed based on the number of steps, for example, by setting a time.

なお、メインアサイナタスクにおいて割当てるべき楽音
発生チャネルが不足するような場合にそれを表示するよ
うにしても良い。
Note that this may be displayed if there is a shortage of musical tone generation channels to be assigned in the main assigner task.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は特許請求の範囲に記載した本発明の構成に対応
するブロック図であるとともに、第2図乃至第11図は
本発明による電子楽器の第1実施例を説明するための図
面であって、第2図は概略図、 第3図(A)乃至(E)夫々はRAMに設定されている
ソングデータマツプ、パターンマツプ、タスク管理マツ
プ、楽音発生チャネル管理マツプおよびエンヘロープ管
理マツプの構成図、 第4図および第5図夫々はリセットルーチン、イベント
待ちモニタコールルーチン、イベント発生モニタコール
ルーチンおよびタイマインクラブド処理ルーチンのフロ
ーチャート図、 第6図乃至第11図夫々は操作子タスク、プレイタスク
、メインアサイナタスク、発音タスク、ブリアサイナタ
スクおよびエンベロープタスクのフローチャート図であ
る。 記憶手段 設定手段 変更手段 トランケート手段 操作パネル バス マイコン PU OM AM タイマ 表示回路 楽音発生回路 増幅器 スピーカ
FIG. 1 is a block diagram corresponding to the configuration of the present invention described in the claims, and FIGS. 2 to 11 are drawings for explaining a first embodiment of the electronic musical instrument according to the present invention. Figure 2 is a schematic diagram, and Figures 3 (A) to (E) are configuration diagrams of the song data map, pattern map, task management map, musical sound generation channel management map, and envelope management map set in the RAM. , FIGS. 4 and 5 are flowcharts of the reset routine, event wait monitor call routine, event occurrence monitor call routine, and timer included processing routine, respectively. FIGS. 6 to 11 are flowcharts of the control task and play task, respectively. , a main assigner task, a pronunciation task, a briar assigner task, and an envelope task. Storage means Setting means Changing means Truncation means Operation panel Bus microcomputer PU OM AM Timer display circuit Tone generation circuit Amplifier Speaker

Claims (1)

【特許請求の範囲】 1(a)各楽音発生チャネルに対応してトランケート禁
止・許諾に関するトランケート情報を記憶可能な記憶手
段、 (b)この記憶手段に、演奏情報にもとづきその演奏情
報に対する楽音が割当てられる楽音発生チャネルに対応
してトランケート禁止のトランケート情報を、記憶設定
する設定手段、 (c)前記記憶手段に記憶されるトランケート禁止のト
ランケート情報を対応する楽音発生チャネルの楽音の発
音の経過にしたがってトランケート許諾のトランケート
情報に記憶変更する変更手段および (d)トランケートに際して、前記記憶手段にトランケ
ート許諾のトランケート情報が記憶されている楽音発生
チャネルを対象にしてトランケートさせるトランケート
手段 を具えることを特徴とする電子楽器。
[Scope of Claims] 1(a) A storage means capable of storing truncate information regarding truncation prohibition/permission corresponding to each musical sound generation channel; (b) A musical sound corresponding to the performance information based on the performance information is stored in this storage means. (c) a setting means for storing and setting truncate information in which truncation is prohibited corresponding to an assigned musical sound generation channel; (c) setting means to store and set truncate information in which truncation is prohibited, which is stored in the storage means, in accordance with the progress of sound generation of musical tones of the corresponding musical sound generation channel; Therefore, the present invention is characterized by comprising a changing means for changing the memory to truncate information indicating truncation permission, and (d) truncation means for truncating a musical sound generation channel in which truncation information indicating truncation permission is stored in the storage means at the time of truncation. An electronic musical instrument.
JP2184932A 1990-04-13 1990-07-10 Electronic musical instrument Pending JPH04499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2184932A JPH04499A (en) 1990-04-13 1990-07-10 Electronic musical instrument

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP9907790 1990-04-13
JP2-99077 1990-04-13
JP2184932A JPH04499A (en) 1990-04-13 1990-07-10 Electronic musical instrument

Publications (1)

Publication Number Publication Date
JPH04499A true JPH04499A (en) 1992-01-06

Family

ID=26440238

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2184932A Pending JPH04499A (en) 1990-04-13 1990-07-10 Electronic musical instrument

Country Status (1)

Country Link
JP (1) JPH04499A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5481067A (en) * 1992-03-04 1996-01-02 Yamaha Corporation Electronic musical instrument under control of multiple task requirement
JP2003515452A (en) * 1999-11-17 2003-05-07 アレクサンダーベルク アクチェンゲゼルシャフト Compression molding equipment for bulky items

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5481067A (en) * 1992-03-04 1996-01-02 Yamaha Corporation Electronic musical instrument under control of multiple task requirement
JP2003515452A (en) * 1999-11-17 2003-05-07 アレクサンダーベルク アクチェンゲゼルシャフト Compression molding equipment for bulky items

Similar Documents

Publication Publication Date Title
US5386081A (en) Automatic performance device capable of successive performance of plural music pieces
JP2606235B2 (en) Electronic musical instrument
JPH04499A (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
JP2525853B2 (en) Continuous hit processing device for electronic musical instruments
JP3117482B2 (en) Electronic musical instrument assigner
JP3646611B2 (en) Music generator
JP2008139413A (en) Resonance sound generator
JP3508564B2 (en) Sound source device
JPH052392A (en) Assignment device of electronic musical instrument
JPH04218098A (en) Assigner of multitimbre electronic musical instrument
JP2753765B2 (en) Electronic musical instrument
JPH056181A (en) Beat processing device for electronic musical instrument
JPH05158477A (en) Assigner for electronic musical instrument
JPH0619474A (en) Assignor of electronic musical instrument
JPH07109558B2 (en) Electronic musical instrument
JPH0535271A (en) Assigner for electronic musical instrument
JPH05150784A (en) Assigner for electronic musical instrument
JP3285986B2 (en) Electronic musical instrument assignment device
JP2649975B2 (en) Electronic musical instrument
JP2755051B2 (en) Tone generator
JP3539480B2 (en) Tone signal generator, tone signal generation method, and computer-readable recording medium storing a program for generating tone signals
JP3479134B2 (en) Asina
JP3673388B2 (en) Musical sound channel assignment apparatus and musical sound channel assignment method
JP2513003B2 (en) Electronic musical instrument