JPH056181A - Continuous hit processing device for electronic musical instruments - Google Patents
Continuous hit processing device for electronic musical instrumentsInfo
- Publication number
- JPH056181A JPH056181A JP3203279A JP20327991A JPH056181A JP H056181 A JPH056181 A JP H056181A JP 3203279 A JP3203279 A JP 3203279A JP 20327991 A JP20327991 A JP 20327991A JP H056181 A JPH056181 A JP H056181A
- Authority
- JP
- Japan
- Prior art keywords
- task
- tone generation
- envelope
- event
- processing
- 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
Links
Landscapes
- Electrophonic Musical Instruments (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は複数の楽音発生チャネル
を有する電子楽器に係り、さらに詳しくは同一鍵を連続
的に打鍵するなどのいわゆる連打があった時の処理を行
う連打処理装置に関するものである。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic musical instrument having a plurality of musical tone generating channels, and more particularly to a continuous tapping processing device for performing a so-called continuous tapping operation such as continuous tapping of the same key. Is.
【0002】[0002]
【従来の技術】一般に電子楽器は複数の楽音発生チャネ
ルを有しており、操鍵等により新たな楽音情報が入力さ
れると、所定の選定規則に従って楽音発生チャネルを選
定してその新たな楽音情報を割り当てて、その楽音発生
チャネルにより新たな楽音の発音を行っている。2. Description of the Related Art Generally, an electronic musical instrument has a plurality of musical tone generating channels, and when new musical tone information is input by key operation or the like, the musical tone generating channels are selected according to a predetermined selection rule and the new musical tone generating channels are selected. Information is allotted and a new musical sound is generated by the musical sound generation channel.
【0003】かかる電子楽器において、同一鍵を連続的
に打鍵する連打があった場合(シーケンサ等の場合には
同一ノートの楽音が連続的に入力された場合)、その連
打入力された楽音を全て別々の楽音発生チャネルで発音
することもできるが、この場合、連打により多数の楽音
発生チャネルが同一鍵の楽音に占有されることで、他の
鍵の楽音の発音が疎外されることになって、演奏表現上
好ましくない。そこで連打入力にたいしては何らかの特
別な処理をすることが必要となり、従来、例えば次のよ
うな処理がなされている。In such an electronic musical instrument, if there are repeated taps of the same key (in the case of a sequencer or the like, musical tones of the same note are continuously input), all of the musical tones input continuously Although it is possible to sound on different musical tone generation channels, in this case, by repeatedly striking a large number of musical tone generation channels for musical tones of the same key, the musical tones of other keys are alienated. , It is not preferable for performance expression. Therefore, it is necessary to perform some special processing for the continuous hit input, and conventionally, for example, the following processing is performed.
【0004】 連打に対しては楽音発生チャネルの新
たな割当てを行わない。 先の押鍵によって楽音情報
が割り当てられた楽音発生チャネルにそれと連打関係に
ある新たな押鍵による楽音情報を割り当てる。 新た
な押鍵による楽音情報を別の楽音発生チャネルに割り当
てるとともに、それと連打関係にある先の押鍵に基づく
楽音情報を割り当てていた楽音発生チャネルを強制的に
消音する。 特開平1−198798号公報で提案さ
れるように、発音量の大なる方を優先するなどして同一
鍵で使用する楽音発生チャネル数を1チャネルに制限す
る。 特開昭62−91996号公報で提案されるよ
うに、同一鍵で使用する楽音発生チャネルを所定数に制
限するなどして連打に対して使用する楽音発生チャネル
数を実質的に制限する。 特開平1−235998号
公報で提案されるように、新たな押鍵による楽音情報の
発音量とそれと連打関係にある既に発音中の楽音発生チ
ャネルの発音量とを合成して一つの楽音発生チャネルで
発音させる。No new tone generation channel is assigned to continuous hits. The tone generation channel to which the tone information is assigned by the previous key depression is assigned the tone information by a new key depression having a continuous hitting relationship with the tone generation channel. The musical tone information generated by a new key depression is assigned to another musical tone generation channel, and the musical tone generation channel to which the musical tone information based on the previous key depression, which has a continuous hitting relationship with that, is forcibly muted. As proposed in Japanese Patent Laid-Open No. Hei 1-1198798, the number of tone generation channels used with the same key is limited to one by giving priority to the one having a larger sound generation amount. As proposed in Japanese Unexamined Patent Publication No. 62-91996, the number of tone generation channels used for consecutive hits is substantially limited by limiting the number of tone generation channels used with the same key to a predetermined number. As proposed in Japanese Patent Laid-Open No. 1-235998, one tone generation channel is synthesized by combining the tone generation amount of the tone information by a new key depression and the tone generation amount of the tone generation channel that is already sounding and is in continuous hitting relation with it. To pronounce.
【0005】[0005]
【発明が解決しようとする課題】上述の連打処理方法は
いずれも連打による同一鍵の楽音を発音する楽音発生チ
ャネルの数を実質的に特定数以下に制限するものであ
る。しかし、このように連打に対して使用する楽音発生
チャネルの数を単に制限しただけでは、連打に対してそ
の使用楽音発生チャネルの数が制限数に達すると、他に
割当て可能な空き状態の楽音発生チャネルがあるような
場合でも、既に発音中の連打関係にある楽音発生チャネ
ルを発音停止してしまうなど、演奏表現上の違和感を生
じさせるので好ましくない。In each of the above-described consecutive hitting processing methods, the number of musical tone generation channels for producing musical tones of the same key by consecutive hits is substantially limited to a specific number or less. However, if the number of tone generation channels to be used for consecutive hits is simply limited in this way, when the number of used tone generation channels for the consecutive hits reaches the limited number, the musical tone in the empty state that can be allocated to other strikes is limited. Even when there is a generation channel, it is not preferable because it may cause an uncomfortable feeling in performance expression, such as stopping the tone generation channel that is already being sounded and is in the continuous hitting relationship.
【0006】一方、連打に対し使用する楽音発生チャネ
ル数を全く制限しないと、前述したように連打により多
くの楽音発生チャネルが占有されて他の楽音の発音が疎
外されてしまうので、演奏表現上違和感があり好ましく
ない。On the other hand, if the number of musical tone generation channels used for continuous hits is not limited at all, many musical sound generation channels are occupied by the repeated hits and the pronunciation of other musical sounds is alienated as described above. There is a feeling of strangeness, which is not preferable.
【0007】本発明はかかる事情に鑑みてなされたもの
であり、その目的とするところは、連打入力された楽音
を発音するにあたって演奏表現上の違和感を生じさせな
いようにすることにある。The present invention has been made in view of the above circumstances, and an object of the present invention is to prevent a sense of incongruity in performance expression from being generated when a tone that is repeatedly input is pronounced.
【0008】[0008]
【課題を解決するための手段】上述の問題点を解決する
ために、本発明に係る電子楽器の連打処理装置は、発音
中の楽音発生チャネルのうちから連打関係にありかつそ
の発音の統合が可能な状態にある二以上の楽音発生チャ
ネルを検出する検出手段と、この検出手段で検出された
二以上の楽音発生チャネルについてそのうちの一つに他
の楽音発生チャネルの発音を統合するとともに該他の楽
音発生チャネルの発音を停止する統合手段とを備えたも
のである。ここで上記の検出手段は楽音発生チャネルの
発音量、発音量に相応する値(例えばエンベロープレベ
ル、残存発音量、疑似エンベロープレベルなど)、ある
いは発音からの経過時間を調べることで統合可能な状態
を判定するよう構成することができるIn order to solve the above-mentioned problems, the electronic musical instrument continuous tap processing apparatus according to the present invention has a continuous tapping relationship among the tone generation channels being sounded, and their pronunciations are integrated. Detection means for detecting two or more tone generation channels in a possible state, and integrating one of the two or more tone generation channels detected by this detection means with another tone generation channel And an integrated means for stopping the sound generation of the tone generation channel. Here, the above-mentioned detection means determines the state that can be integrated by checking the tone generation amount of the tone generation channel, the value corresponding to the tone generation amount (for example, the envelope level, the remaining tone generation amount, the pseudo envelope level, etc.) or the elapsed time from the tone generation. Can be configured to determine
【0009】[0009]
【作用】検出手段により、発音中の楽音発生チャネルの
うちから連打関係にありかつその発音が統合可能な状態
にある二以上の楽音発生チャネルを検出する。ここで連
打関係にある二以上の楽音発生チャネルとは、同一鍵
(または同一ノート番号)の楽音情報を発音中の二以上
の楽音発生チャネルであり、発音が統合可能な状態にあ
るとは、アタック等の状態を終了して音色の変化が少な
くなり発音を統合しても聴感上の違和感がない発音状態
になっていることであり、楽音発生チャネルの発音量、
エンベロープレベルなどの発音量に相応する値、あるい
は発音開始からの経過時間などを見ることによって判定
できる。The detecting means detects two or more tone generation channels that are in a continuous hitting relationship and are in a state in which their tones can be integrated from the tone generation channels that are being sounded. Here, the two or more tone generation channels that are in a continuous hit relationship are two or more tone generation channels that are generating tone information of the same key (or the same note number), and the state in which pronunciations can be integrated is It means that there is no discomfort in the sense of hearing even if the tone color change is reduced by terminating the state of attack etc., and the pronunciation amount of the tone generation channel,
It can be determined by observing a value corresponding to the amount of sound generation such as the envelope level or the elapsed time from the start of sound generation.
【0010】次いで、統合手段によって、検出手段で検
出した二以上の楽音発生チャネルのうちの一つに他の残
りの楽音発生チャネルの発音を統合する。統合の仕方と
しては各楽音発生チャネルの発音量またはエンベロープ
レベルをそのまま加算するものであってもよいし、何ら
かの演算を施して加え合わすものであってもよい。そし
て他の残りの楽音発生チャネルについては発音を停止し
て開放状態にし、新たに入力された楽音情報の使用に供
する。Next, the integration means integrates the sound of the other remaining tone generation channels into one of the two or more tone generation channels detected by the detection means. As a method of integration, the tone generation amount or envelope level of each tone generation channel may be added as it is, or some calculation may be performed and added. Then, the sound generation of the other remaining tone generation channels is stopped and opened, and the newly input tone information is used.
【0011】これにより次々に入力される新たな連打楽
音情報に対して割り当てる楽音発生チャネルの数が制限
されることがなくなり、かつ現に発音中の連打関係にあ
る楽音発生チャネルについては統合可能なものが統合さ
れることで連打に対して占有される楽音発生チャネルの
数が実質的に削減されるので、前述したような連打入力
に対する演奏表現上の違和感が軽減される。As a result, the number of tone generation channels to be assigned to new consecutive tone information to be inputted one after another is not limited, and the tone generation channels which are currently in sound and which are in a tone relation can be integrated. Since the number of musical sound generation channels occupied for continuous hits is substantially reduced by integrating the above, the uncomfortable feeling in performance expression with respect to the continuous hit input as described above is reduced.
【0020】[0020]
【実施例】次に、本発明による電子楽器の割当装置を、
減衰音系の楽音を発生する電子楽器に適用した場合の具
体的実施例につき、図面を参照しつつ説明する。まず、
図1において、鍵盤部20は鍵盤および鍵操作検出回路
より構成されるとともに、鍵盤において操作された鍵を
鍵操作検出回路で検出し、この検出された鍵に対応する
キーデータを生成してバス21を介してCPU22に割
込みをかける。また、操作子群23は音色の選択などを
行う複数個の操作子より構成されているとともに、ペダ
ル群24はダンパーペダル、ソステヌートペダルなどよ
り構成されている。さらに、ROM25にはCPU22
の実行するプログラム、各処理に必要なデータおよびテ
ーブルなどが予め記憶されているとともに、RAM26
にはプログラムを実行するに必要な各種レジスタなどを
含むワーキングエリアが設定されている。なお、タイマ
27は、所定時間間隔(1mSec)でCPU22にタイマ
割込みをかける。DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, an electronic musical instrument assigning device according to the present invention will be described.
A specific embodiment in the case of being applied to an electronic musical instrument that generates a musical sound of a damped sound system will be described with reference to the drawings. First,
In FIG. 1, the keyboard unit 20 is composed of a keyboard and a key operation detection circuit, detects a key operated on the keyboard by the key operation detection circuit, and generates key data corresponding to the detected key to generate a bus. The CPU 22 is interrupted via 21. The operator group 23 is composed of a plurality of operators for selecting a tone color, and the pedal group 24 is composed of a damper pedal, a sostenuto pedal and the like. Further, the ROM 25 has a CPU 22.
The programs to be executed by the computer, data and tables necessary for each process are stored in advance, and the RAM 26
A working area including various registers necessary for executing the program is set in the. The timer 27 issues a timer interrupt to the CPU 22 at a predetermined time interval (1 mSec).
【0021】CPU22は所定プログラムを実行し、鍵
盤部20からの割込みに応じて鍵盤部20からキーデー
タを受け取り、このキーデータをRAM26の対応する
レジスタに書き込む。また、タイマ27からのタイマ割
込みに基づき所定時間間隔で操作子群23の操作設定状
態およびペダル群24の操作状態を各操作子検出回路2
8およびペダル検出回路29を制御して検出し、操作子
データ、ペダルデータとしてRAM26の対応するレジ
スタに書き込む。さらに、これら書き込まれたキーデー
タなどに基づき、所定プログラムを実行することにより
16個の楽音発生チャネルを有する楽音発生回路30を
制御する。この楽音発生回路30は、CPU22の制御
のもとに所望の楽音信号を生成し、増幅器31を介して
スピーカ32に送り、楽音を発生させる。The CPU 22 executes a predetermined program, receives key data from the keyboard unit 20 in response to an interrupt from the keyboard unit 20, and writes this key data in a corresponding register of the RAM 26. Also, based on a timer interrupt from the timer 27, the operation setting state of the operator group 23 and the operation state of the pedal group 24 are detected at predetermined time intervals by each operator detection circuit 2.
8 and the pedal detection circuit 29 are controlled and detected, and are written in the corresponding registers of the RAM 26 as operator data and pedal data. Further, the tone generation circuit 30 having 16 tone generation channels is controlled by executing a predetermined program based on the written key data. The tone generation circuit 30 generates a desired tone signal under the control of the CPU 22 and sends it to the speaker 32 via the amplifier 31 to generate a tone.
【0022】楽音発生チャネルは、CPU22による楽
音発生の指示およびその際に与えられる楽音発生パラメ
ータに基づき楽音信号を生成し、この生成される楽音信
号を時間経過に対応して推移させる。また、楽音発生チ
ャネルは、CPU22によって与えられる次に到達する
エンベロープレベルを示す目標値と所定時間当りのエン
ベロープレベルの変化量を示すレートとに基づいてエン
ベロープレベルを補間して滑らかなエンベロープを発生
させて楽音信号の振幅を制御するとともに、急速減衰の
指示によりエンベロープレベルを所定の急速減衰レート
にしたがって減衰させ、エンベロープレベルが“0”に
なると楽音発生回路30に設けられている急速減衰終了
FIFOに楽音発生チャネル番号を積む。次に、RAM
26の所定領域に設定されているノートマップなどの各
種マップについて、図2〜図5を参照して説明する。な
お、図2〜図5は、これらマップの一部を示すものであ
る。The tone generation channel generates a tone signal based on a tone generation instruction from the CPU 22 and a tone generation parameter given at that time, and changes the generated tone signal according to the passage of time. Further, the musical tone generation channel interpolates the envelope level based on the target value given by the CPU 22 indicating the envelope level to be reached next and the rate indicating the amount of change of the envelope level per predetermined time to generate a smooth envelope. Control the amplitude of the musical tone signal, attenuate the envelope level in accordance with a predetermined rapid attenuation rate in response to a rapid attenuation instruction, and when the envelope level becomes "0", the rapid attenuation end FIFO provided in the musical tone generation circuit 30 is controlled. Stack the tone generation channel numbers. Next, RAM
Various maps such as a note map set in 26 predetermined areas will be described with reference to FIGS. 2 to 5. 2 to 5 show a part of these maps.
【0023】ノートマップ(図2)
“0”〜“127”によって楽音の音高を示すノート番
号に対応して、次のものが記憶される。
(1) ノートステータス:ノートオンを“1”でもって、
ノートオフを“0”でもって示す。
(2) ソステヌートステータス:ソステヌートオンを
“1”でもって、ソステヌートオフを“0”でもって示
す。 Note map (FIG. 2) "0" to "127" correspond to the note number indicating the pitch of the musical tone, and the following is stored. (1) Note status: With a note-on of "1",
Note-off is indicated by "0". (2) Sostenuto status: Indicates sostenuto on by "1" and sostenuto off by "0".
【0024】タスク管理マップ(図4)
“1”〜“7”によってタスクの種類を示すタスク番号
に対応して、次のものが記憶される。なお、タスク番号
は、“1”はキーデータ受信タスク、“2”はメインア
サイナタスク、“3”は発音タスク、“4”はプリアサ
イナタスク、“5”はエンベロープタスク、“6”はペ
ダルタスク、“7”は操作子タスクであり、番号が若い
ほど優先順位が高いタスクとなっている。
(1) タイマ処理要求フラグ:タイマ処理が必要なことを
“1”でもって示す。
(2) ステータス:タスクの状態がランであることを
“0”でもって、レディであることを“1”でもって、
ウェイトであることを“2”でもって示す。
(3) 待ちイベント値:ステータスがウェイトにおける待
ち中のイベントの種類を示す。
(4) イベント発生フラグ:タスクの各イベント毎にイベ
ントの発生を“1”でもって示す。 Task management map (FIG. 4) The following items are stored corresponding to the task numbers indicating the types of tasks by "1" to "7". As for the task numbers, "1" is a key data receiving task, "2" is a main assigner task, "3" is a sounding task, "4" is a pre-assigner task, "5" is an envelope task, and "6" is The pedal task, “7”, is an operator task, and the lower the number, the higher the priority. (1) Timer processing request flag: Indicates that timer processing is necessary with "1". (2) Status: "0" indicates that the task status is run, and "1" indicates that the task status is ready.
The weight is indicated by "2". (3) Waiting event value: Indicates the type of waiting event whose status is wait. (4) Event occurrence flag: The event occurrence is indicated by "1" for each event of the task.
【0025】楽音発生チャネル管理マップ(図5)
“0”〜“15”の番号により16個の楽音発生チャネ
ルを示す楽音発生チャネル番号に対応して、次のものが
記憶される。
(1) 発音量:現在発音中の楽音の発音量を“0000
H”〜“FFFFH”でもって示す。
(2) トランケート禁止フラグ:新たな楽音の割当ての禁
止を“1”でもって示す。
(3) 急速減衰中フラグ:従前の楽音を急速減衰中であ
ることを“1”でもって示す。
(4) 処理待ちフラグ1:発音タスクにおける第1処理の
処理待ちを“1”でもって示す。
(5) 処理待ちフラグ2:発音タスクにおける第2処理の
処理待ちを“1”でもって示す。
(6) 処理待ちフラグ3:発音タスクにおける第3処理の
処理待ちを“1”でもって示す。
(7) ノート番号:楽音の音高を示す。
(8) ベロシティ:楽音のベロシティを示す。
(9) 楽音発生パラメータ群:楽音発生に関する各種パラ
メータの値を示す。
(10) 統合禁止フラグ:エンベロープタスクにおける統
合処理の禁止を“1”でもって示す。 Music tone generation channel management map (FIG. 5) The following are stored corresponding to the tone generation channel numbers indicating 16 tone generation channels by the numbers "0" to "15". (1) Pronunciation amount: The pronunciation amount of the musical sound currently being generated is set to "0000."
It is indicated by "H" to "FFFFH". (2) Truncate prohibition flag: Prohibition of allocation of new musical tone is indicated by "1". Is indicated by “1.” (4) Processing wait flag 1: Waiting for the first processing in the sounding task is indicated by “1.” (5) Processing wait flag 2: Waiting for the second processing in the sounding task. Is indicated by “1.” (6) Processing wait flag 3: Waiting for processing of the third processing in the sounding task is indicated by “1.” (7) Note number: Indicates the pitch of a musical tone. (8) Velocity : Indicates the velocity of a musical sound (9) Musical tone generation parameter group: Indicates the values of various parameters related to musical tone generation (10) Integration prohibition flag: Indicates the integration processing prohibition in the envelope task with "1".
【0026】エンベロープ管理マップ(図3)
各楽音発生チャネルに対応して“0”〜“15”の番号
により16個のエンベロープチャネルを示すエンベロー
プチャネル番号に対応して、次のものが記憶される。
(1) エンベロープレベル:エンベロープレベルを“00
00H”〜“FFFFH”でもって示す。
(2) 目標値:次に到達するべきエンベロープレベルを
“0000H”〜“FFFFH”でもって示す。
(3) レート:所定時間(5mSec)当たりのエンベロープ
レベルの変化量を示す。具体的には、正負を示す符号ビ
ットと絶対値を“0000H”〜“FFFFH”で示す
データビットとより構成される。
(4) フェーズ番号:現在のフェーズ番号(楽音発生開始
からの経過段階)を示す。
(5) トランケート禁止フェーズ番号:新たな楽音の割当
てを禁止する最終フェーズ番号を示す。
(6) エンベロープ生成パラメータ群:楽音のエンベロー
プ生成に関する各種パラメータの値を示す。
(7) 旧エンベロープレベル:1フェーズ前のエンベロー
プレベルを示す。
(8) 統合禁止フェーズ番号:エンベロープタスクにおけ
る統合処理を禁止する最終フェーズ番号を示す。 Envelope management map (FIG. 3) The followings are stored corresponding to the envelope channel numbers indicating 16 envelope channels by numbers "0" to "15" corresponding to each tone generation channel . . (1) Envelope level: Envelope level is "00"
00H "to" FFFFH "(2) Target value: The envelope level to be reached next is shown as" 0000H "to" FFFFH "(3) Rate: Envelope level per predetermined time (5 mSec) It indicates the amount of change.Specifically, it is composed of a sign bit indicating positive and negative and a data bit indicating an absolute value from “0000H” to “FFFFH.” (4) Phase number: current phase number (start of tone generation) (5) Truncation prohibition phase number: Indicates the final phase number that prohibits the allocation of new musical tones (6) Envelope generation parameter group: Indicates the values of various parameters related to musical tone envelope generation. (7) Old envelope level: Shows the envelope level before one phase (8) Integration prohibition phase number: In the envelope task Shows the final phase number to prohibit kick integration process.
【0027】以上のように構成された電子楽器の動作を
まず概略的に説明する。この実施例の電子楽器では、各
種タスク、すなわちキーデータ受信タスク、メインアサ
イナタスク、発音タスク、プリアサイナタスク、エンベ
ロープタスク、ペダルタスク、操作子タスクの各タスク
は、モニタプログラムの管理下に、タスク間の優先処理
をしつつマルチタスキングによって実行される。ここで
モニタプログラムとしては、リセットルーチン、イベン
ト待ちモニタコールルーチン、イベント発生モニタコー
ルルーチン、タイマ割込み処理ルーチン、キーデータ受
信割込み処理ルーチンがある。キーデータ受信タスク
(図11)は、鍵盤部20等から楽音情報(キーデー
タ)を読み込み、ノートオンメッセージの時にはノート
オン処理をしてメインアサイナに起動をかける。メイン
アサイナタスク(図12)は、プリアサイナタスクで設
定される楽音発生チャネルのプリアサイン順位に基づき
設定されたアサイン順位に従って楽音発生チャネルを選
定し、発音タスクに対して発音要求を行う。発音タスク
(図13、図14)は、メインアサイナタスクで選定さ
れた楽音発生チャネルに対して、それが発音中であれば
その発音を停止させる処理を行い、発音が停止されてい
れば、または停止されると、入力された楽音情報に基づ
きその楽音情報を発音するために楽音発生チャネルで必
要な各種のパラメータ等を演算して、その演算したパラ
メータ等をその楽音発生チャネルに転送して発音開始を
指示する。The operation of the electronic musical instrument constructed as described above will first be outlined. In the electronic musical instrument of this embodiment, various tasks, that is, the key data receiving task, the main assigner task, the sounding task, the pre-assigner task, the envelope task, the pedal task, the operator task, under the management of the monitor program, It is executed by multitasking while performing priority processing between tasks. Here, the monitor program includes a reset routine, an event wait monitor call routine, an event occurrence monitor call routine, a timer interrupt processing routine, and a key data reception interrupt processing routine. The key data reception task (FIG. 11) reads musical tone information (key data) from the keyboard section 20 or the like, performs note-on processing at the time of a note-on message, and activates the main assigner. The main assigner task (FIG. 12) selects a tone generation channel in accordance with the assigned order set based on the preassigned order of the tone generation channel set in the pre-assigner task, and requests the sounding task to sound. The pronunciation task (FIGS. 13 and 14) performs a process of stopping the tone generation channel selected by the main assigner task if the tone generation channel is being sounded, and if the tone generation is stopped, Or when stopped, it calculates various parameters necessary for the tone generation channel to generate the tone information based on the input tone information, and transfers the calculated parameters to the tone generation channel. Instruct to start pronunciation.
【0028】プリアサイナタスク(図15)は、タイマ
により定期的に起動されて、楽音発生チャネル管理マッ
プから各楽音発生チャネルの発音量を読み込み、これを
プリアサイナ発音量とし、このプリアサイナ発音量を原
則として小なる順に並べることで、各楽音発生チャネル
のプリアサイン順位を設定する。楽音発生チャネル管理
マップの発音量はエンベロープタスクによって逐次に更
新される。エンベロープタスク(図16)では、楽音発
生チャネルが発音終了をしているか否かを調べ、発音終
了していないものについては、原則として、その楽音発
生チャネルの押鍵状態(ノートステータス)やペダル状
態を考慮しつつ発音量の更新を行うとともに連打発音統
合処理を行う。連打発音統合処理(図17)では、発音
中の楽音発生チャネルのうちから連打関係にある二つの
楽音発生チャネルを検出し、それらの発音状態が統合可
能な状態にあるかを判断し、統合可能な状態にあれば、
発音量の小さい楽音発生チャネルを発音量の大きい楽音
発生チャネルに統合するとともに、統合された発音量の
小さい楽音発生チャネルを発音停止して開放する。The pre-assigner task (FIG. 15) is periodically activated by a timer to read the tone generation amount of each tone generation channel from the tone generation channel management map, and set this as the pre-assigner tone generation amount. By arranging in ascending order, the pre-assignment order of each tone generation channel is set. The tone generation amount of the tone generation channel management map is sequentially updated by the envelope task. In the envelope task (Fig. 16), it is checked whether or not the tone generation channel has finished sounding. For those that have not finished tone generation, in principle, the key-depression state (note status) or pedal state of the tone generation channel is checked. In consideration of the above, the amount of sound generation is updated and the continuous tap sound integration processing is performed. In the continuous tone generation integration processing (FIG. 17), two tone generation channels that are in a continuous tone relationship are detected from the tone generation channels that are being sounded, and it is determined whether or not their tone generation states are in a state where they can be synthesized, and integration is possible. If you are in
A tone generation channel with a small pronunciation is integrated with a tone generation channel with a large tone, and the integrated tone generation channel with a small tone is stopped and released.
【0029】次に図6〜図18のフローチャートにおい
て用いられる各種の変数の意味について説明する。
NSTK 要求元タスク番号:モニタコールをしたタスクの
タスク番号を示す。
NSET 要求元イベント値:モニタコールをしたタスクに
おいて次に処理を行おうとするイベントの種類を示す。
NDTK 要求先タスク番号:次に実行を予定するタスクの
タスク番号を示す。
NDET 要求先イベント値:次に実行を予定するタスクに
おいて処理を行おうとするイベントの種類を示す。
IEDF 初期設定完了フラグ:全てのタスクにおける初期
設定の完了を“1”でもって示す。
TCTN タイマ割込み処理対象番号:タイマ割込み処理対
象のタスク番号を示す。
TCNE[N] 第Nタスクタイマカウンタ値:タスク番号が
Nであるタスク用タイマカウンタの値を示す。
TCND[N] 第Nタスク時間間隔:タスク番号がNである
タスクに対してタイマイベントを発行する時間間隔を示
す。
TCNE[TCTN] 第TCTNタスクタイマカウンタ値:タスク番
号がタイマ割込み処理対象番号TCTNであるタスク用タイ
マカウンタの値を示す。
TCND[TCTN] 第TCTNタスク時間間隔:タスク番号がタイ
マ割込み処理対象番号TCTNであるタスクに対してタイマ
イベントを発行する時間間隔を示す。Next, the meanings of various variables used in the flowcharts of FIGS. 6 to 18 will be described. NSTK request source task number: Indicates the task number of the task that made the monitor call. NSET Request source event value: Indicates the type of event to be processed next in the task that made the monitor call. NDTK request destination task number: Shows the task number of the next scheduled task. NDET Request destination event value: Indicates the type of event to be processed in the next scheduled task. IEDF initial setting completion flag: Indicates the completion of initial setting in all tasks with "1". TCTN Timer interrupt processing target number: Indicates the task number of the timer interrupt processing target. TCNE [N] Nth task timer counter value: Indicates the value of the timer counter for the task whose task number is N. TCND [N] Nth task time interval: Indicates the time interval for issuing a timer event to the task with the task number N. TCNE [TCTN] TCTN task timer counter value: Indicates the value of the timer counter for the task whose task number is the timer interrupt processing target number TCTN. TCND [TCTN] TCTN task time interval: Indicates the time interval for issuing a timer event to the task whose task number is the timer interrupt processing target number TCTN.
【0030】〔キーデータ受信タスク〕
NTNM ノート番号:ノートオンメッセージおよび/また
はノートオフメッセージに基づく演奏情報の音高を示
す。
NTST ノートステータス:ノートオンメッセージに基づ
く演奏情報であることを“1”でもって、ノートオフメ
ッセージに基づく演奏情報であることを“0”でもって
示す。
NTVL ベロシティ:ノートオンメッセージに基づく演奏
情報のベロシティを示す。[Key Data Reception Task] NTNM Note Number: Indicates the pitch of performance information based on the note-on message and / or the note-off message. NTST note status: "1" indicates performance information based on the note-on message, and "0" indicates performance information based on the note-off message. NTVL velocity: Indicates the velocity of performance information based on the note-on message.
【0031】〔メインアサイナタスク〕
MASS[N] 第Nアサイン順位の楽音発生チャネル番号:
アサイン順位が第Nアサイン順位(N番目のアサイン順
位)である楽音発生チャネルの楽音チャネル番号を示
す。
TASN 対象アサイン順位:アサイン対象のアサイン順位
番号を示す。
MAEF メインアサイナ処理中フラグ:メインアサイナタ
スクにおいて新たなアサイン処理を行ったことを“1”
でもって示す。
MASS[TASN] アサイン順位TASNの楽音発生チャネル番
号:アサイン順位が対象アサイン順位TASNである楽音発
生チャネルの楽音発生チャネル番号を示す。
GACN 割当て可能楽音発生チャネル数:割当てが可能な
楽音発生チャネル数を示す。[Main Assigner Task] MASS [N] N-th assigned tone generation channel number:
The musical tone channel number of the musical tone generation channel whose assignment order is the Nth assigned order (Nth assigned order) is shown. TASN Target assignment order: Indicates the assignment order number of the assignment target. MAEF Main assigner processing flag: “1” indicates that new assign processing was performed in the main assigner task
I will show you. MASS [TASN] Musical tone generation channel number of assignment order TASN: Indicates the tone generation channel number of the tone generation channel whose assignment order is the target assignment order TASN. GACN Number of assignable tone generation channels: Indicates the number of assignable tone generation channels.
【0032】〔発音タスク〕
GCTN 発音処理対象楽音発生チャネル番号:処理対象の
楽音発生チャネル番号を示す。
TDNF 急速減衰未了フラグ:いずれかの楽音発生チャネ
ルが急速減衰中であることを“1”でもって示す。[Sound Generation Task] GCTN Sound Generation Channel Number for Sound Generation Processing: Indicates the sound generation channel number for processing. TDNF Rapid decay incomplete flag: Indicates by one that one of the tone generation channels is undergoing rapid decay.
【0033】〔プリアサイナタスク〕
GN 楽音発生チャネル番号
PLEV[GN] 楽音発生チャネル番号GNのプリアサイナ発音
量
N プリアサイン順位
PASS[N] 第Nプリアサイン順位楽音発生チャネル番号:
プリアサイン順位が第N順位である楽音発生チャネルの
楽音発生チャネル番号を示す。
PACN プリアサイナ割当て可能楽音発生チャネル数:プ
リアサイナタスクにおいて割当て可能な楽音発生チャネ
ル数を示す。[Pre-Assigner Task] GN Musical Sound Generation Channel Number PLEV [GN] Musical Sound Generation Channel Number GN Pre-Assigner Sound Generation Amount N Preassigned PASS [N] Nth Preassigned Musical Sound Generation Channel Number:
The tone generation channel number of the tone generation channel having the pre-assigned rank Nth is shown. PACN Number of assignable tone generation channels for pre-signer: Indicates the number of assignable tone generation channels in the pre-assigner task.
【0034】〔エンベロープタスク〕
ECTN エンベロープ処理対象番号
ENNM エンベロープ処理対象ノート番号
FCTN 統合比較対象番号
FLEV 統合比較対象エンベロープレベル
ELEV 統合対象エンベロープレベル
TLEV 統合エンベロープレベル
TDLV 統合目標値
〔ペダルタスク〕
DMPV ダンパー値
次に各フローチャートのフローについて詳細に説明す
る。まずモニタプログラムについて図6〜図10に示さ
れるフローチャートを参照して説明する。[Envelope task] ECTN Envelope processing target number ENNM Envelope processing target note number FCTN Integration comparison target number FLEV Integration comparison target envelope level ELEV Integration target envelope level TLEV Integration envelope level TDLV integration target value [Pedal task] DMPV damper value Next The flow of each flowchart will be described in detail below. First, the monitor program will be described with reference to the flowcharts shown in FIGS.
【0035】リセットルーチン(図6)
電源の投入時などにおいてリセットがかかると実行され
るルーチンである。各ステップZA1、ZA2において
の処理は、次の通りである。
〔ZA1〕 タスク管理マップにおける全てのタスク番
号のステータスを“1:レディ”に設定し、またタイマ
処理要求フラグ、待ちイベント値およびイベント発生フ
ラグを“0”に設定する。さらに、初期設定完了フラグ
IEDFを“0:初期設定未完了”に設定するなどの初期設
定を行う。
〔ZA2〕 要求元タスク番号NSTKを“1:キーデータ
受信タスク”に更新するとともに、タスク管理マップに
おけるタスク番号“1:キーデータ受信タスク”のステ
ータスを“0:ラン”に設定する。
〔ZA3〕 キーデータ受信タスクを実行する。 Reset Routine (FIG. 6) This routine is executed when a reset is applied when the power is turned on. The processing in each step ZA1 and ZA2 is as follows. [ZA1] The statuses of all task numbers in the task management map are set to "1: ready", and the timer processing request flag, the wait event value, and the event occurrence flag are set to "0". In addition, the initialization completion flag
Make the initial settings such as setting IEDF to “0: Incomplete initial settings”. [ZA2] The request source task number NSTK is updated to "1: key data reception task", and the status of the task number "1: key data reception task" in the task management map is set to "0: run". [ZA3] The key data reception task is executed.
【0036】イベント待ちモニタコールルーチン(図
7)
実行中のタスクがイベント待ちモニタコールを行うと実
行されるルーチンである。各ステップZB1〜ZB5に
おいての処理は、次の通りである。
〔ZB1〕 タスク管理マップにおける要求元タスク番
号NSTKに対応するタスク番号について、要求元イベント
値NSETの2進数表現における“1”であるビットに対応
するイベント発生フラグのいずれかが“1:イベント発
生”であるか否かを判断する。この対応するイベント発
生フラグのいずれかが“1:イベント発生”である場合
には、イベント待ちモニタコールを行ったタスクに戻
る。なお、イベント発生フラグの判断に際して、例えば
要求元イベント値NSETが“1”である場合には第1イベ
ント発生フラグ、要求元イベント値NSETが“2”である
場合には第2イベント発生フラグ、要求元イベント値NS
ETが“3”である場合には第1および第2イベント発生
フラグを判断する。
〔ZB2〕 ステップZB1における判断において、判
断対象のイベント発生フラグがいずれも“1”でなくて
イベントの発生を示していない場合には、タスク管理マ
ップにおける要求元タスク番号NSTKに対応するタスク番
号のステータスを“2:ウェイト”に設定するととも
に、待ちイベント値を要求元イベント値NSETとする。ま
た、処理の再開に備えて要求元タスクにおいて使用中の
レジスタなどの内容をスタック領域に退避するなどの中
断処理(以下、単に要求元タスクの中断処理と記する)
を行う。
〔ZB3〕 タスク管理マップを調べて、イベント待ち
モニタコールを行なったタスクより優先順位が低くかつ
対応するステータスが“1:レディ”を示す“レディ”
タスクをタスク番号順に探す。このステータスが“1:
レディ”を示す“レディ”タスクがない場合には、要求
元タスク番号NSTKをスリープを示す“8”に設定してス
リープする。なお、スリープからはタイマ27または鍵
操作検出回路からのハードウェア割込みに基づいて、後
述するタイマ割込み処理ルーチン、またはキーデータ受
信割込み処理ルーチンが起動される。
〔ZB4〕 ステップZB3において最優先の“レデ
ィ”タスクを探し出すと、要求元タスク番号NSTKをその
最優先の“レディ”タスクのタスク番号に更新するとと
もに、タスク管理マップにおけるその最優先の“レデ
ィ”タスクのタスク番号のステータスを“0:ラン”に
設定する。
〔ZB5〕 要求元タスク番号NSTKに対応するタスクを
実行する。なお、タスクの実行に際しては、タスクの中
断処理においてスタック領域に退避したデータなどを元
のレジスタなどに戻すなどの再開処理(以下、単に再開
処理と記する)を行う。 Event wait monitor call routine (Fig.
7) This routine is executed when the task under execution makes an event wait monitor call. The processing in each step ZB1 to ZB5 is as follows. [ZB1] For the task number corresponding to the request source task number NSTK in the task management map, one of the event occurrence flags corresponding to the bit that is “1” in the binary representation of the request source event value NSET is “1: event occurrence”. It is determined whether or not it is ". If any of the corresponding event generation flags is "1: event generation", the process returns to the task that made the event wait monitor call. In determining the event occurrence flag, for example, if the request source event value NSET is “1”, the first event occurrence flag, if the request source event value NSET is “2”, the second event occurrence flag, Request source event value NS
When ET is "3", the first and second event occurrence flags are determined. [ZB2] In the determination in step ZB1, when none of the determination target event occurrence flags is “1” and does not indicate the occurrence of an event, the task number corresponding to the request source task number NSTK in the task management map Set the status to "2: wait" and set the wait event value to the request source event value NSET. In addition, interruption processing such as saving the contents of registers in use in the request source task to the stack area in preparation for resumption of processing (hereinafter simply referred to as request source task interruption processing)
I do. [ZB3] Examine the task management map and have a lower priority than the task that made the event wait monitor call, and the corresponding status indicates "1: ready""ready"
Search for tasks in task number order. This status is "1:
If there is no "ready" task indicating "ready", the request source task number NSTK is set to "8" indicating sleep, and sleeps from the timer 27 or a hardware interrupt from the key operation detection circuit. A timer interrupt processing routine or a key data reception interrupt processing routine, which will be described later, is started based on the above [ZB4] When the highest priority "ready" task is found in step ZB3, the request source task number NSTK is assigned the highest priority. The task number of the “ready” task is updated, and the status of the task number of the highest priority “ready” task in the task management map is set to “0: run.” [ZB5] Corresponding to the request source task number NSTK Executes the task.When executing the task, save it in the stack area during task suspension processing. The restart processing (hereinafter simply referred to as the restart processing) such as returning the data etc. to the original register is performed.
【0037】イベント発生モニタコールルーチン(図
8)
実行中のタスクがイベント発生モニタコールを行うと実
行されるルーチンである。各ステップZC1〜ZC7お
いての処理は、次の通りである。
〔ZC1〕 タスク管理マップにおける要求先タスク番
号NDTKに対応するタスク番号について、要求先イベント
値NDETの2進数表現における“1”であるビットに対応
するイベント発生フラグを“1”に設定する。例えば、
要求先イベント値NDETが“1”である場合には第1イベ
ント発生フラグを、要求先イベント値NDETが“2”であ
る場合には第2イベント発生フラグを“1”に設定す
る。
〔ZC2〕 タスク管理マップにおける要求先タスク番
号NDTKに対応するタスク番号のステータスが“2:ウェ
イト”でかつ待ちイベント値が要求先イベント値NDETに
対応しているか否かを判断する。このステータスが
“2:ウェイト”でなく、または待ちイベント値が要求
先イベント値NDETに対応しない場合には、このモニタコ
ールを行ったタスクに戻る。なお、待ちイベント値が要
求先イベント値NDETに対応しているか否かの判断は、待
ちイベント値の2進数表現における“1”であるビット
に対応する要求先イベント値NDETの2進数表現における
ビットのいずれかのビットが“1”であるか否かによっ
て行う。例えば、待ちイベント値が“1”である場合に
は要求先イベント値NDETの第1ビットが“1”、待ちイ
ベント値が“2”である場合には要求先イベント値NDET
の第2ビットが“1”、待ちイベント値が“3”である
場合には要求先イベント値NDETの第1または第2ビット
が“1”であるときに対応していると判断する。 Event occurrence monitor call routine (Fig.
8) This routine is executed when the task under execution makes an event occurrence monitor call. The processing in each step ZC1 to ZC7 is as follows. [ZC1] For the task number corresponding to the requested task number NDTK in the task management map, the event occurrence flag corresponding to the bit that is "1" in the binary representation of the requested event value NDET is set to "1". For example,
When the requested event value NDET is "1", the first event occurrence flag is set, and when the requested event value NDET is "2", the second event occurrence flag is set to "1". [ZC2] It is determined whether or not the status of the task number corresponding to the requested task number NDTK in the task management map is "2: wait" and the wait event value corresponds to the requested event value NDET. If the status is not “2: wait” or the wait event value does not correspond to the request destination event value NDET, the task that made this monitor call is returned to. It should be noted that whether or not the wait event value corresponds to the request destination event value NDET is determined by the bit in the binary representation of the request destination event value NDET corresponding to the bit that is "1" in the binary representation of the wait event value. This is performed depending on whether or not any one of the bits is "1". For example, when the wait event value is "1", the first bit of the request destination event value NDET is "1", and when the wait event value is "2", the request destination event value NDET
If the second bit of "1" is "1" and the wait event value is "3", it is determined that the request destination event value NDET corresponds to the first or second bit "1".
【0038】〔ZC3〕 ステップZC2における判断
において、判断対象のステータスが“2:ウェイト”で
かつ待ちイベント値が要求先イベント値NDETに対応する
場合には、このステータスを“1:レディ”に設定す
る。
〔ZC4〕 要求先タスク番号NDTKが要求元タスク番号
NSTK未満か否かにより要求先タスクの優先順位が要求元
タスクの優先順位より高いか否かを判断する。この要求
先タスク番号NDTKが要求元タスク番号NSTK未満でなくて
要求先タスクの優先順位が高くない場合には、このモニ
タコールを行ったタスクに戻る。
〔ZC5〕 ステップZC4における判断において、要
求先タスク番号NDTKが要求元タスク番号NSTK未満で要求
先タスクの優先順位が高い場合には、タスク管理マップ
における要求元タスク番号NSTKに対応するタスク番号の
ステータスを“1:レディ”に設定するとともに、処理
の再開に備えて要求元タスクの中断処理を行う。
〔ZC6〕 要求元タスク番号NSTKを要求先タスク番号
NDTKに更新するとともに、タスク管理マップにおける要
求先タスク番号NDTKに対応するタスク番号のステータス
を“0:ラン”に設定する。
〔ZC7〕 要求先タスク番号NDTKに対応するタスク番
号のタスクを実行する。なお、タスクの実行に際しては
そのタスクの再開処理を行う。[ZC3] In the determination in step ZC2, when the status of the determination target is "2: wait" and the waiting event value corresponds to the requested event value NDET, this status is set to "1: ready". To do. [ZC4] Request destination task number NDTK is the request source task number
Whether or not the priority of the requested task is higher than that of the requested task is determined by whether or not it is less than NSTK. If the request destination task number NDTK is not less than the request source task number NSTK and the priority of the request destination task is not high, the task that made this monitor call is returned to. [ZC5] If it is determined in step ZC4 that the requested task number NDTK is less than the requested task number NSTK and the requested task has a high priority, the status of the task number corresponding to the requested task number NSTK in the task management map. Is set to “1: ready”, and the request source task is interrupted in preparation for the resumption of processing. [ZC6] Request source task number NSTK to request destination task number
While updating to NDTK, the status of the task number corresponding to the requested task number NDTK in the task management map is set to "0: run". [ZC7] The task having the task number corresponding to the requested task number NDTK is executed. When executing a task, the task is restarted.
【0039】タイマ割込み処理ルーチン(図9)
タイマ27からタイマ割込みがかかると、まず各タスク
に対応するタイマカウンタを調べ、このタイマカウンタ
の値が“1”を超えている場合にはそのタイマカウンタ
の値を“1”だけデクリメントし、“1”を超えていな
い場合にはタスク管理マップにおける当該タスクのタス
ク番号の第1イベント発生フラグを“1:イベント発
生”に設定するとともに、このタスク番号のステータス
が“2:ウェイト”であるときにはそのステータスを
“1:レディ”に設定し、次に優先順位の高いタスクか
ら順次に、タスクを実行するべきか否かを判断して最初
に条件を満たすタスクを実行させるルーチンである。各
ステップZD1〜ZD16においての処理は、次の通り
である。
〔ZD1〕 初期設定完了フラグIEDFが“1:初期設定
完了”であるか否かを判断する。この初期設定完了フラ
グIEDFが“1”でない場合には、全てのタスクの初期設
定がいまだ終了していないために、タイマ割込み処理を
終了してタイマ割込み前の処理に戻り、“1”である場
合には後述する各タスクの初期設定を全て終了している
ために、次のステップZD2に進む。
〔ZD2〕 タイマ割込み処理対象のタスク番号を示す
タイマ割込み処理対象番号TCTNを“7”に設定する。
〔ZD3〕 タスク管理マップにおけるタイマ割込み処
理対象番号TCTNに対応するタスク番号のタイマ処理要求
フラグが“1:要求有り”であるか否かを判断する。こ
のタイマ処理要求フラグが“1”でない場合には、ステ
ップZD8に進む。
〔ZD4〕 ステップZD3における判断において、判
断対象のタイマ処理要求フラグが“1:要求有り”であ
る場合には、第TCTNタスクタイマカウンタ値TCNE[TCTN]
が“1”を超えているか否かを判断する。この第TCTNタ
スクタイマカウンタ値TCNE[TCTN]が“1”を超えている
場合には、ステップZD10に進む。 Timer Interrupt Processing Routine (FIG. 9) When a timer interrupt is issued from the timer 27, the timer counter corresponding to each task is checked first, and if the value of this timer counter exceeds "1", that timer counter is processed. The value of is decremented by "1", and if it does not exceed "1", the first event occurrence flag of the task number of the task in the task management map is set to "1: event occurrence" and this task number When the status of the task is "2: wait", the status is set to "1: ready", and the task with the next highest priority is judged sequentially to determine whether the task should be executed or not. It is a routine that executes the tasks to be satisfied. The processing in each of the steps ZD1 to ZD16 is as follows. [ZD1] It is determined whether or not the initialization completion flag IEDF is "1: initialization completed". If the initialization completion flag IEDF is not "1", the initialization of all tasks has not been completed yet, so the timer interrupt processing is terminated and the processing before the timer interrupt is returned to "1". In this case, since the initial setting of each task, which will be described later, has been completed, the process proceeds to the next step ZD2. [ZD2] The timer interrupt processing target number TCTN indicating the task number of the timer interrupt processing target is set to "7". [ZD3] It is determined whether or not the timer process request flag of the task number corresponding to the timer interrupt process target number TCTN in the task management map is "1: request". If the timer processing request flag is not "1", the process proceeds to step ZD8. [ZD4] In the determination in step ZD3, if the timer processing request flag to be determined is “1: request”, the TCTN task timer counter value TCNE [TCTN]
It is determined whether or not exceeds "1". When the TCTN task timer counter value TCNE [TCTN] exceeds "1", the process proceeds to step ZD10.
【0040】〔ZD5〕 ステップZD4における判断
において、第TCTNタスクタイマカウンタ値TCNE[TCTN]が
“1”を超えていない場合には、まず第TCTNタスクタイ
マカウンタ値TCNE[TCTN]に第TCTNタスク時間間隔TCND[T
CTN]を加算して、この加算した値を新たな第TCTNタスク
タイマカウンタ値TCNE[TCTN]とする。次に、タスク管理
マップにおけるタイマ割込み処理対象番号TCTNに対応す
るタスク番号の第1イベント発生フラグを“1:イベン
ト発生”に設定する。
〔ZD6〕 タスク管理マップにおけるタイマ割込み処
理対象番号TCTNに対応するタスク番号のステータスが
“2:ウェイト”でかつそのタスク番号の待ちイベント
値の2進数表現における第1ビットが“1”(例えば、
待ちイベント値が“1”,“3”)であるか否かを判断
する。このステータスが“2:ウェイト”でないまたは
待ちイベント値の2進数表現における第1ビットが
“1”でない場合には、ステップZD8に進む。
〔ZD7〕 ステップZD6における判断において、判
断対象のステータスが“2:ウェイト”でかつ判断対象
の待ちイベント値の2進数表現における第1ビットが
“1”である場合には、タスク管理マップにおけるタイ
マ割込み処理対象番号TCTNに対応するタスク番号のステ
ータスを“1:レディ”に設定する。
〔ZD8〕 タイマ割込み処理対象番号TCTNが“1”を
超えているか否かを判断する。このタイマ割込み処理対
象番号TCTNが“1”を超えていない場合には、イベント
発生フラグの設定処理が全て終了したために、ステップ
ZD11に進む。
〔ZD9〕 ステップZD8における判断において、タ
イマ割込み処理対象番号TCTNが“1”を超えている場合
には、タイマ割込み処理対象番号TCTNを“1”だけデク
リメントしてステップZD3に戻る。
〔ZD10〕 ステップZD4における判断において、
第TCTNタスクタイマカウンタ値TCNE[TCTN]が“1”を超
えている場合には、第TCTNタスクタイマカウンタ値TCNE
[TCTN]を“1”だけデクリメントしてステップZD8に
進む。
〔ZD11〕 タイマ割込み処理対象番号TCTNが当該ル
ーチンにおいてはタイマ割込み発生前の処理を示す要求
元タスク番号NSTK未満であるか否かを判断する。このタ
イマ割込み処理対象番号TCTNが要求元タスク番号NSTK未
満でない場合には、タイマ割込み発生時に実行していた
タスクの優先順位が処理対象番号TCTNに対応するタスク
の優先順位より低くないために、タイマ割込み処理を終
了してそのタスクに戻る。[ZD5] If it is determined in step ZD4 that the TCTN task timer counter value TCNE [TCTN] does not exceed "1", first the TCTN task timer counter value TCNE [TCTN] is set to the TCTN task time. Interval TCND [T
CTN] is added, and the added value is set as a new TCTN task timer counter value TCNE [TCTN]. Next, the first event generation flag of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is set to "1: event generation". [ZD6] The status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is "2: wait", and the first bit in the binary representation of the wait event value of that task number is "1" (for example,
It is determined whether or not the wait event value is "1", "3"). If the status is not "2: wait" or the first bit in the binary representation of the wait event value is not "1", the process proceeds to step ZD8. [ZD7] In the determination in step ZD6, when the status of the determination target is “2: wait” and the first bit in the binary representation of the wait event value of the determination target is “1”, the timer in the task management map Set the status of the task number corresponding to the interrupt processing target number TCTN to "1: ready". [ZD8] It is determined whether the timer interrupt processing target number TCTN exceeds "1". If the timer interrupt processing target number TCTN does not exceed "1", the process of setting the event occurrence flag is completed, and the process proceeds to step ZD11. [ZD9] In the determination in step ZD8, if the timer interrupt processing target number TCTN exceeds "1", the timer interrupt processing target number TCTN is decremented by "1" and the process returns to step ZD3. [ZD10] In the determination in step ZD4,
If the TCTN task timer counter value TCNE [TCTN] exceeds "1", the TCTN task timer counter value TCNE
Decrement [TCTN] by "1" and proceed to step ZD8. [ZD11] It is determined whether or not the timer interrupt processing target number TCTN is less than the request source task number NSTK indicating the processing before the timer interrupt is generated in the routine. If the timer interrupt processing target number TCTN is not less than the request source task number NSTK, the priority of the task being executed when the timer interrupt occurred is not lower than the priority of the task corresponding to the processing target number TCTN. Terminates interrupt processing and returns to the task.
【0041】〔ZD12〕 ステップZD11における
判断において、タイマ割込み処理対象番号TCTNが要求元
タスク番号NSTK未満である場合には、タスク管理マップ
におけるタイマ割込み処理対象番号TCTNに対応するタス
ク番号のステータスが“1:レディ”であるか否かを判
断する。このステータスが“1”でない場合には、ステ
ップZD16に進む。
〔ZD13〕 ステップZD12における判断におい
て、判断対象のステータスが“1:レディ”である場合
には、タスク管理マップにおける要求元タスク番号NSTK
に対応するタスク番号のステータスを“1:レディ”に
設定するとともに、処理の再開に備えて要求元タスク番
号NSTKに対応するタスクの中断処理を行う。
〔ZD14〕 要求元タスク番号NSTKをタイマ割込み処
理対象番号TCTNに更新するとともに、タスク管理マップ
におけるタイマ割込み処理対象番号TCTNに対応するタス
ク番号のステータスを“0:ラン”に設定する。
〔ZD15〕 タイマイベントを発生する。言い換えれ
ば、タイマ割込み処理対象番号TCTNに対応するタスク番
号のタスクを実行する。なお、タスクの実行に際しては
そのタスクの再開処理を行う。
〔ZD16〕 ステップZD12における判断におい
て、判断対象のステータスが“1:レディ”でない場合
には、タイマ割込み処理対象番号TCTNを“1”だけイン
クリメントしてステップZD11に戻る。[ZD12] If it is determined in step ZD11 that the timer interrupt processing target number TCTN is less than the request source task number NSTK, the status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is " 1: determine whether or not it is “ready”. If the status is not "1", the process proceeds to step ZD16. [ZD13] In the determination in step ZD12, if the determination target status is “1: ready”, the request source task number NSTK in the task management map
The status of the task number corresponding to is set to "1: ready", and the task corresponding to the request source task number NSTK is interrupted in preparation for restarting the processing. [ZD14] The request source task number NSTK is updated to the timer interrupt processing target number TCTN, and the status of the task number corresponding to the timer interrupt processing target number TCTN in the task management map is set to "0: run". [ZD15] A timer event is generated. In other words, the task with the task number corresponding to the timer interrupt processing target number TCTN is executed. When executing a task, the task is restarted. [ZD16] In the determination in step ZD12, if the determination target status is not "1: ready", the timer interrupt processing target number TCTN is incremented by "1" and the process returns to step ZD11.
【0042】キーデータ受信割込み処理ルーチン(図1
0)
鍵操作検出回路から割込みがかかると実行されてキーデ
ータ受信イベントを発生するルーチンである。各ステッ
プZE1〜ZE6おいての処理は、次の通りである。
〔ZE1〕 初期設定完了フラグIEDFが“1:完了”で
あるか否かを判断する。この初期設定完了フラグIEDFが
“1”でない場合には、全てのタスクの初期設定がいま
だ終了していないために、キーデータ受信割込み処理を
終了してキーデータ受信割込み発生前の処理に戻る。
〔ZE2〕 ステップZE1における判断において初期
設定完了フラグIEDFが“1:完了”である場合には、タ
スク管理マップにおけるタスク番号“1:キーデータ受
信タスク”の第1イベント発生フラグを“1:発生”に
設定する。
〔ZE3〕 タスク管理マップにおけるタスク番号
“1:キーデータ受信タスク”のステータスが“2:ウ
ェイト”でかつ待ちイベント値が“1:キーデータ受信
イベント待ち”であるか否かを判断する。このステータ
スが“2:ウェイト”でない、または待ちイベント値が
“1:キーデータ受信イベント待ち”でない場合には、
キーデータ受信割込み処理を終了してキーデータ受信割
込み発生前の処理に戻る。
〔ZE4〕 ステップZE3における判断において、判
断対象のステータスが“2”でかつ待ちイベント値が
“1”でキーデータ受信イベント待ちである場合には、
当該ルーチンにおいてキーデータ受信割込み発生前の処
理を示す要求元タスク番号NSTKが“8”未満であるか否
かを判断する。この要求元タスク番号NSTKが“8”未満
である場合にはタスク管理マップにおける要求元タスク
番号NSTKに対応するタスク番号のステータスを“1:レ
ディ”に設定するとともに、処理の再開に備えてタイマ
割込み発生前のタスクの中断処理を行う。なお、“8”
未満でない場合には格別の処理は不要である。 Key data reception interrupt processing routine (see FIG. 1)
0) This routine is executed when a key operation detection circuit is interrupted to generate a key data reception event. The processing in each step ZE1 to ZE6 is as follows. [ZE1] It is determined whether or not the initialization completion flag IEDF is "1: complete". If the initialization completion flag IEDF is not "1", the initialization of all the tasks has not been completed yet, so the key data reception interrupt process is terminated and the process returns to the process before the generation of the key data reception interrupt. [ZE2] If the initial setting completion flag IEDF is "1: complete" in the determination at step ZE1, the first event occurrence flag of the task number "1: key data reception task" in the task management map is "1: occurred". Set to ". [ZE3] It is determined whether or not the status of the task number "1: key data reception task" in the task management map is "2: wait" and the wait event value is "1: wait for key data reception event". If this status is not "2: wait" or the wait event value is not "1: wait for key data reception event",
The key data reception interrupt process is terminated and the process returns to the process before the key data reception interrupt occurred. [ZE4] In the determination in step ZE3, when the determination target status is “2”, the waiting event value is “1”, and the key data reception event is waiting,
In the routine, it is determined whether the request source task number NSTK indicating the processing before the key data reception interrupt is generated is less than “8”. If the request source task number NSTK is less than "8", the status of the task number corresponding to the request source task number NSTK in the task management map is set to "1: ready" and a timer is provided in preparation for restarting the process. Performs interrupt processing of the task before the interrupt occurred. In addition, "8"
If it is not less than, no special processing is required.
【0043】〔ZE5〕 要求元タスク番号NSTKをタス
ク番号“1:キーデータ受信タスク”に更新するととも
に、タスク管理マップにおけるタスク番号“1:キーデ
ータ受信タスク”のステータスを“0:ラン”に設定す
る。
〔ZE6〕 キーデータ受信イベントを発生する。言い
換えれば、キーデータ受信タスクを実行する。なお、タ
スクの実行に際してはキーデータ受信タスクの再開処理
を行う。次に、各タスクをキーデータ受信タスク、メイ
ンアサイナタスク、発音タスク、プリアサイナタスク、
エンベロープタスク、ペダルタスク、操作子タスクの順
に説明する。なお、電源の投入時などにおいてリセット
がかかった後の各タスクでの最初の処理に際しては、先
頭のステップ、例えば次に説明するキーデータ受信タス
クではステップA1より開始する。また、あるタスクの
処理を中断しその後処理を再開するに際しては、このタ
スクにおける中断時の処理を継続するように中断した処
理を再開する。例えば、キーデータ受信タスクのステッ
プA2でイベント待ちモニタコールをし、イベント待ち
モニタコールルーチンでの判断においてイベント発生で
なく中断処理を行った場合には、その後キーデータ受信
割込みの発生によりキーデータ受信割込みルーチンにお
いて再開処理を行うと、ステップA2のイベント待ちモ
ニタコールに引き続くステップA3より処理を再開す
る。[ZE5] The request source task number NSTK is updated to the task number "1: key data receiving task", and the status of the task number "1: key data receiving task" in the task management map is changed to "0: run". Set. [ZE6] Generate a key data reception event. In other words, the key data reception task is executed. When executing the task, the key data receiving task is restarted. Next, each task is a key data receiving task, a main assigner task, a pronunciation task, a pre-assigner task,
The envelope task, the pedal task, and the operator task will be described in this order. In addition, at the time of the first processing in each task after the reset is applied at the time of turning on the power, etc., it starts from the first step, for example, the key data receiving task described below from step A1. Further, when interrupting the processing of a certain task and restarting the processing thereafter, the interrupted processing is restarted so that the processing at the time of interruption in this task is continued. For example, if an event wait monitor call is made in step A2 of the key data reception task and interrupt processing is performed instead of an event occurrence in the judgment in the event wait monitor call routine, then key data reception interrupt occurs and the key data reception When the restart processing is performed in the interrupt routine, the processing is restarted from step A3 following the event waiting monitor call in step A2.
【0044】キーデータ受信タスク(図11)
キーデータ受信イベントが発生すると、鍵操作検出回路
からキーデータを読み込み、アサイン要求イベントを発
生するタスクである。各ステップA1〜A7においての
処理は、次の通りである。
〔A1〕 ノートマップをクリヤするとともに、当該キ
ーデータ受信タスクで占有する変数などを初期値に設定
する。
〔A2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。キーデータ受信イベン
トが発生すると、次のステップA3に進む。
〔A3〕 タスク管理マップにおけるタスク番号“1:
キーデータ受信タスク”の第1イベント発生フラグと待
ちイベント値とを“0”に設定する。
〔A4〕 鍵操作検出回路からキーデータを読み込み、
このキーデータのノート番号、ノートステータスおよび
ノートベロシティを各対応するところのノート番号NTN
M、ノートステータスNTSTおよびベロシティNTVLとす
る。
〔A5〕 ノートステータスNTSTが“1:押鍵”である
か否かを判断する。このノートステータスNTSTが“1”
でない場合には次のステップA6に進み、“1”である
場合にはステップA7に進む。
〔A6〕 離鍵処理
まず、ノートマップにおけるノート番号NTNMに対応する
ノート番号のノートステータスを“0”に設定し、ステ
ップA2に戻る。
〔A7〕 押鍵処理
まず、ノートマップにおけるノート番号NTNMに対応する
ノート番号のノートステータスを“1”に設定する。次
に、アサイン要求イベントを発生する。言い換えれば、
要求先タスク番号NDTKを“2:メインアサイナタスク”
に、要求先イベント値NDETを“1”に設定してイベント
発生モニタコールを行う。そして、ステップA2に戻
る。 Key data receiving task (FIG. 11) When a key data receiving event occurs, the key data is read from the key operation detecting circuit and an assignment request event is generated. The processing in each of the steps A1 to A7 is as follows. [A1] Clear the note map and set variables and the like occupied by the key data receiving task to initial values. [A2] The request source event value NSET is set to "1" and an event wait monitor call is made. When the key data reception event occurs, the process proceeds to the next step A3. [A3] Task number “1:” in the task management map
The first event occurrence flag and the wait event value of the "key data reception task" are set to "0". [A4] The key data is read from the key operation detection circuit,
The note number, note status and note velocity of this key data corresponds to the note number NTN
M, note status NTST and velocity NTVL. [A5] It is determined whether or not the note status NTST is "1: key depression". This note status NTST is "1"
If not, the process proceeds to the next step A6, and if it is "1", the process proceeds to step A7. [A6] Key Release Process First, the note status of the note number corresponding to the note number NTNM in the note map is set to "0", and the process returns to step A2. [A7] Key Depressing Process First, the note status of the note number corresponding to the note number NTNM in the note map is set to "1". Next, an assign request event is generated. In other words,
Requested task number NDTK is "2: Main assigner task"
Then, the requested event value NDET is set to "1" and an event occurrence monitor call is made. Then, the process returns to step A2.
【0045】メインアサイナタスク(図12)
アサイン要求イベントが発生すると、後述するプリアサ
イナタスクで設定するアサイン順位に基づいて、楽音発
生チャネル管理マップの所定の領域にノート番号NTNMな
どを書き込み、発音要求イベントを発生するタスクであ
る。各ステップB1〜B7においての処理は、次の通り
である。
〔B1〕 楽音発生チャネル管理マップをクリヤすると
ともに、このメインアサイナタスクで占有する変数など
を初期値に設定する。また、第Nアサイン順位楽音発生
チャネル番号MASS[N] (Nは0,1,〜15)を各対応する
“N( =0,1,〜15) ”に設定する。また、対象アサイン
順位TASNを“0”に、割当て可能楽音発生チャネル数GA
CNを最大数の“16”に設定する。
〔B2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、アサイン要求イ
ベントが発生すると、次のステップB3に進む。
〔B3〕 タスク管理マップにおけるタスク番号“2:
メインアサインタスク”の待ちイベント値と第1イベン
ト発生フラグとを“0”に設定する。
〔B4〕 対象アサイン順位TASNが割当て可能楽音発生
チャネル数GACN未満であるか否かを判断する。この対象
アサイン順位TASNが割当て可能楽音発生チャネル数GACN
未満でない場合には、割当てるべき楽音発生チャネルが
最早やないためにステップB2に戻る。
〔B5〕 ステップB4における判断において対象アサ
イン順位TASNが割当て可能楽音発生チャネル数GACN未満
である場合、楽音発生チャネル管理マップにおけるアサ
イン順位TASNの楽音発生チャネル番号MASS[TASN]に対応
する楽音発生チャネル番号の処理待ちフラグ1、処理待
ちフラグ2および処理待ちフラグ3を“1:処理待ち
中”に、ノート番号をノート番号NTNMに、ノートステー
タスを“1”に、べロシティをベロシティNTVLに設定す
る。またメインアサイナ処理中フラグMAEFを“1:メイ
ンアサイナ処理中”に設定する。
〔B6〕 発音要求イベントを発生する。言い換えれ
ば、要求先タスク番号NDTKを“3:発音タスク”に、要
求先イベント値NDETを“2”に設定してイベント発生モ
ニタコールを行う。
〔B7〕 対象アサイン順位TASNを“1”だけインクリ
メントしてステップB2に戻る。 Main assigner task (Fig. 12) When an assign request event occurs, note number NTNM is written in a predetermined area of the tone generation channel management map based on the assign order set in the pre-assigner task, which will be described later. It is a task that generates a request event. The processing in each of the steps B1 to B7 is as follows. [B1] Clear the tone generation channel management map and set the variables occupied by this main assigner task to initial values. Further, the N-th assigned musical tone generation channel number MASS [N] (N is 0, 1, to 15) is set to each corresponding "N (= 0, 1, to 15)". In addition, the target assignment order TASN is set to "0", and the number of assignable tone generation channels GA
Set CN to the maximum number of "16". [B2] The request source event value NSET is set to "1" and an event wait monitor call is made. When an assign request event occurs, the process proceeds to the next step B3. [B3] Task number “2: in task management map”
The wait event value of the "main assign task" and the first event occurrence flag are set to "0". [B4] It is determined whether or not the target assign order TASN is less than the number of allocatable tone generation channels GACN. Assign order TASN can be assigned Number of tone generation channels GACN
If it is not less than this, the tone generation channel to be assigned is no longer present, and the process returns to step B2. [B5] If the target assignment order TASN is less than the allocatable tone generation channel number GACN in the determination in step B4, the tone generation channel number corresponding to the tone generation channel number MASS [TASN] of the assignment order TASN in the tone generation channel management map. The processing wait flag 1, the processing wait flag 2, and the processing wait flag 3 are set to "1: waiting for processing", the note number to the note number NTNM, the note status to "1", and the velocity to the velocity NTVL. Further, the main assigner processing flag MAEF is set to "1: main assigner processing". [B6] A sounding request event is generated. In other words, the request generation task number NDTK is set to "3: sounding task" and the request destination event value NDET is set to "2" to make an event occurrence monitor call. [B7] The target assignment order TASN is incremented by "1" and the process returns to step B2.
【0046】発音タスク(図13、図14)
発音要求イベントが発生すると新たな楽音を発生する楽
音発生チャネルにおいて前の発音が終了していない場合
には急速減衰の開始を指示し(第1処理)、またノート
番号NTNMなどに基づいて楽音発生に関するパラメータを
演算して設定し(第2処理)、さらに発音が終了してい
た、または終了した場合には楽音発生チャネルに新たな
発音を指示する(第3処理)タスクである。各ステップ
C1〜C27においての処理は、次の通りである。
〔C1〕 当該タスクで占有する変数などを初期値に設
定するとともに、急速減衰を終了した楽音発生チャネル
番号を記憶する急速減衰終了FIFOをクリヤするなど
するとともに、楽音発生回路30を初期化する。また、
第3タスクタイマカウンタ値TCNE[3] と、第3タスク時
間間隔TCND[3] とを“0”に設定するとともに、タスク
管理マップにおけるタスク番号“3:発音タスク”のタ
イマ処理要求フラグを“1:要求有り”に設定する。
〔C2〕 要求元イベント値NSETを“2”に設定してイ
ベント待ちモニタコールを行う。なお、発音要求イベン
トが発生すると、次のステップC3に進む。
〔C3〕 まず、タスク管理マップにおけるタスク番号
“3:発音タスク”の待ちイベント値と第2イベント発
生フラグとを“0”に設定して、次に発音処理対象楽音
発生チャネル番号GCTNを“0”に設定する。
〔C4〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1が“1:処理待ち中”で
あるか否かを判断する。この処理待ちフラグ1が“1”
である場合には次のステップC5に進み、“1”でなく
て第1処理(ステップC5〜C7)が不要である場合に
はステップC8に進む。
〔C5〕 エンベロープ管理マップにおける発音処理対
象楽音発生チャネル番号GCTNに対応するエンベロープチ
ャネル番号のエンベロープレベルが“0”であるか否か
を判断する。このエンベロープレベルが“0”でない場
合には次のステップC6に進み、“0”で急速減衰処理
が不要である場合にはステップC7に進む。 Pronunciation task (FIGS. 13 and 14) A new tone is generated when a tone generation request event occurs. If the previous tone generation is not finished in the tone generation channel, the start of rapid attenuation is instructed (first process). ), And calculates and sets the tone generation parameter based on the note number NTNM and the like (second process), and when the tone generation is completed, or when it is terminated, a new tone generation is instructed to the tone generation channel. (Third processing) This is a task. The processing in steps C1 to C27 is as follows. [C1] The variables occupied by the task are set to initial values, the rapid decay end FIFO storing the tone generation channel number for which rapid decay is finished is cleared, and the tone generation circuit 30 is initialized. Also,
The third task timer counter value TCNE [3] and the third task time interval TCND [3] are set to "0", and the timer processing request flag of the task number "3: sounding task" in the task management map is set to " 1: Requested ”is set. [C2] The request source event value NSET is set to "2" and an event wait monitor call is performed. When a sound generation request event occurs, the process proceeds to the next step C3. [C3] First, the waiting event value of the task number “3: Sounding task” and the second event occurrence flag in the task management map are set to “0”, and then the tone generation target tone generation channel number GCTN is set to “0”. Set to ". [C4] It is determined whether or not the processing wait flag 1 of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is "1: waiting for processing". This processing wait flag 1 is "1"
If it is, the process proceeds to the next step C5, and if it is not "1" and the first process (steps C5 to C7) is unnecessary, the process proceeds to step C8. [C5] It is determined whether or not the envelope level of the envelope channel number corresponding to the tone generation target tone generation channel number GCTN in the envelope management map is "0". If the envelope level is not "0", the process proceeds to the next step C6, and if "0" does not require the rapid attenuation process, the process proceeds to step C7.
【0047】〔C6〕 楽音発生チャネル管理マップに
おける発音処理対象楽音発生チャネル番号GCTNに対応す
る楽音発生チャネル番号の急速減衰中フラグを“1:急
速減衰中”に、発音量を急速減衰中を示す“FFFF
H" に設定するとともに、対応する楽音発生チャネルに
急速減衰を指示する。なお、急速減衰の指示に際しては
目標値を“0”に、レートを急速減衰用のレートに設定
して対応する楽音発生チャネルに転送する。
〔C7〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1を”0”に設定する。
〔C8〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この楽音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
には次のステップC9に進み、“15”未満でなくて全
ての楽音発生チャネルについて第1処理を終えている場
合にはステップC10に進む。
〔C9〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントし、次の楽音発生チャネルの
処理の準備を行ってステップC4に戻る。
〔C10〕 発音処理対象楽音発生チャネル番号GCTNを
“0”に設定する。
〔C11〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の処理待ちフラグ2が“1:処理待ち中”
であるか否かを判断する。この処理待ちフラグ2が
“1”である場合には次のステップC12に進み、
“1”でなくて第2処理(ステップC12)が不要であ
る場合にはステップC13に進む。
〔C12〕 発音処理対象楽音発生チャネル番号GCTNに
対応する楽音発生チャネルの、楽音の発生と楽音のエン
ベロープ生成とに関する各種パラメータの値を、楽音発
生チャネル管理マップにおける発音処理対象楽音発生チ
ャネル番号GCTNに対応する楽音発生チャネル番号のノー
ト番号、ベロシティおよび後述する操作子データ受信タ
スクのステップG4において設定される音色パラメータ
群より演算して、これら演算された各種パラメータの値
を、楽音発生チャネル管理マップにおける発音処理対象
楽音発生チャネル番号GCTNに対応する楽音発生チャネル
番号の楽音発生パラメータ群およびエンベロープ管理マ
ップにおける発音処理対象楽音発生チャネル番号GCTNに
対応するエンベロープチャネル番号のエンベロープ生成
パラメータ群の対応するパラメータに設定する。同時
に、処理待ちフラグ2を”0”に設定する。[C6] The rapid decay flag of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is set to "1: rapid decay" to indicate that the tone generation amount is rapidly decayed. "FFFF
Set to H "and instruct the corresponding tone generation channel to perform rapid attenuation. When instructing rapid attenuation, set the target value to" 0 "and set the rate to the rapid attenuation rate to generate the corresponding tone. Transfer to the channel [C7] Set the processing wait flag 1 of the tone generation channel number corresponding to the tone generation channel number GCTN of the tone generation channel management map to "0" [C8] Generate the tone processing target tone It is determined whether or not the channel number GCTN is less than “15.” If this tone generation channel number GCTN for musical tone processing is less than “15”, the process proceeds to the next step C9, and is not less than “15”. If the first processing has been completed for all tone generation channels, the process proceeds to step C10 [C9] The tone generation target tone generation channel number GCTN is set to "1". And then returns to step C4 [C10] Sets tone generation target tone generation channel number GCTN to "0" [C11] Sound generation process in tone generation channel management map The processing wait flag 2 of the tone generation channel number corresponding to the target tone generation channel number GCTN is "1: waiting for processing"
Or not. If the processing wait flag 2 is "1", the process proceeds to the next step C12,
If it is not "1" and the second process (step C12) is unnecessary, the process proceeds to step C13. [C12] The values of various parameters relating to the generation of musical tones and the envelope generation of musical tones of the musical tone generation channel corresponding to the musical tone generation channel number GCTN to be pronounced are set to the musical tone generation channel number GCTN to be pronounced in the musical tone generation channel management map The note number and velocity of the corresponding tone generation channel number and the tone color parameter group set in step G4 of the operator data reception task described later are calculated, and the values of the various calculated parameters are set in the tone generation channel management map. Corresponding to the tone generation parameter group of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN and the envelope generation parameter group of the envelope channel number corresponding to the tone generation target tone generation channel number GCTN in the envelope management map To set the parameters. At the same time, the processing wait flag 2 is set to "0".
【0048】〔C13〕 発音処理対象楽音発生チャネ
ル番号GCTNが“15”未満であるか否かを判断する。こ
の発音処理対象楽音発生チャネル番号GCTNが“15”未
満である場合には次のステップC14に進み、“15”
未満でない場合にはステップC15に進む。
〔C14〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントしてステップC11に戻る。
〔C15〕 急速減衰未了フラグTDNFと発音処理対象楽
音発生チャネル番号GCTNとを“0”に設定する。
〔C16〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の処理待ちフラグ3が“1:処理待ち中”
であるか否かを判断する。この処理待ちフラグ3が
“1”である場合には次のステップC17に進み、
“1”でなくて第3処理(ステップC17,C18,C
21)が不要である場合にはステップC19に進む。
〔C17〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の急速減衰中フラグが“1:急速減衰中”
であるか否かを判断する。この急速減衰中フラグが
“1”でない場合には次のステップC18に進み、
“1”である場合には割当てるべき楽音発生チャネルに
おける従前に割当てられていた楽音の発音がいまだ終了
していないために、ステップC21に進む。[C13] It is determined whether or not the tone generation target tone generation channel number GCTN is less than "15". If the tone generation channel number GCTN to be sounded is less than "15", the process proceeds to the next step C14, and is "15".
If it is not less than, it proceeds to step C15. [C14] The tone generation channel number GCTN to be sounded is incremented by "1" and the process returns to step C11. [C15] The rapid-decay incomplete flag TDNF and the tone-generation target tone generation channel number GCTN are set to "0". [C16] The processing wait flag 3 of the tone generation channel number corresponding to the tone generation channel number GCTN to be sounded in the tone generation channel management map is set to "1: waiting for processing".
Or not. When the processing wait flag 3 is "1", the process proceeds to the next step C17,
Not the "1" but the third process (steps C17, C18, C
If step 21) is unnecessary, the process proceeds to step C19. [C17] The rapid decay flag of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is set to "1: rapid decay"
Or not. When the rapid decay flag is not "1", the process proceeds to the next step C18,
If the value is "1", the tone generation of the tone previously assigned in the tone generation channel to be assigned has not been finished yet, so the routine proceeds to step C21.
【0049】〔C18〕 エンベロープ管理マップにお
ける発音処理対象楽音発生チャネル番号GCTNに対応する
エンベロープチャネル番号のエンベロープ生成パラメー
タ群に基づいて第1フェーズの目標値、レート、トラン
ケート禁止フェーズ番号および統合禁止フェーズ番号を
演算してそれらの値などにエンベロープ管理マップの目
標値、レート、トランケート禁止フェーズ番号および統
合禁止フェーズ番号を設定するとともに、フェーズ番号
を“1”に、エンベロープレベルを“0”に設定する。
なおトランケート禁止フェーズ番号は発音開始直後の演
奏表現に大きな影響を与える期間、例えばアタックを終
了するフエーズ番号に設定し、統合禁止フェーズ番号は
それ以降の音色の変化が少なくなり、連打関係にある楽
音発生チャネルとの統合にさいしては音量のみ考慮すれ
ば良くなり始めるフエーズ番号に設定する。なお、楽音
発生チャネル管理マップにおける発音処理対象楽音発生
チャネル番号GCTNに対応する楽音発生チャネル番号の発
音量を、エンベロープ生成パラメータ群に含まれるアタ
ックレベルの上位15ビットに“8000H”を加算し
た値に、トランケート禁止フラグを“1:トランケート
禁止”に、統合禁止フラグを“1:統合禁止”に設定す
る。また、楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の楽音発生パラメータ群とエンベロープ管理
マップにおける発音処理対象楽音発生チャネル番号GCTN
に対応するエンベロープチャネル番号の目標値およびレ
ートを、楽音発生回路30における発音処理対象楽音発
生チャネル番号GCTNに対応する楽音発生チャネルに転送
する。また、処理待ちフラグ3を“0”に設定するとと
もに、対応する楽音発生チャネルに楽音発生の開始を指
示する。
〔C19〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この発音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
には次のステップC20に進み、“15”未満でない場
合にはステップC22に進む。
〔C20〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントしてステップC16に戻る。
〔C21〕 急速減衰未了フラグTDNFを“1:未了”に
設定してステップC19に進む。[C18] Target value, rate, truncation prohibition phase number and integration prohibition phase number of the first phase based on the envelope generation parameter group of the envelope channel number corresponding to the tone generation channel number GCTN to be sounded in the envelope management map Is calculated to set the target value, rate, truncation prohibition phase number and integrated prohibition phase number of the envelope management map to these values, the phase number is set to "1", and the envelope level is set to "0".
Note that the truncate prohibition phase number is set to a period that has a great influence on the performance expression immediately after the start of sounding, for example, the phase number that ends the attack, and the integrated prohibition phase number reduces the change in tone color after that, resulting in a continuous hit-related musical tone. When integrating with the generation channel, set it to the phase number that starts to improve when only the volume is considered. Note that the pronunciation amount of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is set to a value obtained by adding “8000H” to the upper 15 bits of the attack level included in the envelope generation parameter group. Set the truncate prohibition flag to "1: truncate prohibition" and the integration prohibition flag to "1: integration prohibition". Also, the tone generation parameter group of the tone generation channel number GCTN corresponding to the tone generation target tone generation channel number in the tone generation channel management map and the tone generation target tone generation channel number GCTN in the envelope management map
The target value and rate of the envelope channel number corresponding to are transferred to the tone generation channel corresponding to the tone generation target tone generation channel number GCTN in the tone generation circuit 30. In addition, the processing wait flag 3 is set to "0", and the corresponding tone generation channel is instructed to start tone generation. [C19] It is determined whether or not the tone generation channel number GCTN to be sounded is less than "15". If the tone generation target tone generation channel number GCTN is less than "15", the process proceeds to the next step C20, and if it is not less than "15", the process proceeds to step C22. [C20] The tone generation channel number GCTN to be sounded is incremented by "1" and the process returns to step C16. [C21] The rapid decay incomplete flag TDNF is set to "1: incomplete", and the process proceeds to step C19.
【0050】〔C22〕 急速減衰未了フラグTDNFが
“1:未了”であるか否かを判断する。この急速減衰未
了フラグTDNFが“1”である場合には次のステップC2
3に進み、“1”でなく全ての発音処理が終了している
場合にはステップC2に戻る。
〔C23〕 要求元イベント値NSETを“3”に設定して
イベント待ちモニタコールを行う。なお、発音要求イベ
ントまたは発音タスクに対するタイマイベントのいずれ
かが発生すると、次のステップC24に進む。
〔C24〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第2イベント発生フラグが“1”
であるか否かを判断する。この第2イベント発生フラグ
が“1”でない場合には次のステップC25に進み、
“1”である場合には発音要求イベントの発生であるた
めに、ステップC3に戻る。
〔C25〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第1イベント発生フラグが“1”
であるタイマイベントの発生であるために、まずタスク
管理マップにおけるタスク番号“3:発音タスク”の待
ちイベント値と第1イベント発生フラグとを“0”に設
定する。
〔C26〕 楽音発生回路30に設けられている急速減
衰終了FIFOが“空”であるか否か判断する。この急
速減衰終了FIFOが“空”である場合にはステップC
23に戻り、“空”でない場合には次のステップC27
に進む。
〔C27〕 急速減衰終了FIFOから急速減衰処理に
よりエンベロープレベルが“0”になった楽音発生チャ
ネルの楽音発生チャネル番号を順次に降ろし、この降ろ
した楽音発生チャネル番号に対応する楽音発生チャネル
管理マップにおける楽音発生チャネル番号の急速減衰中
フラグを“0”に設定する。そして、ステップC15に
戻る。[C22] It is determined whether or not the rapid decay incomplete flag TDNF is "1: incomplete". When the rapid decay incomplete flag TDNF is "1", the next step C2
If it is not "1" and all tone generation processing has been completed, the procedure returns to step C2. [C23] The request source event value NSET is set to "3" and an event wait monitor call is performed. When either the sound generation request event or the timer event for the sound generation task occurs, the process proceeds to the next step C24. [C24] The second event occurrence flag of the task number "3: Sounding task" in the task management map is "1".
Or not. When the second event occurrence flag is not "1", the process proceeds to the next step C25,
If it is "1", it means that a sound generation request event has occurred, and therefore the process returns to step C3. [C25] The first event occurrence flag of the task number “3: Sounding task” in the task management map is “1”
Therefore, the wait event value of the task number “3: sounding task” and the first event occurrence flag in the task management map are set to “0”. [C26] It is determined whether or not the rapid attenuation end FIFO provided in the musical sound generating circuit 30 is “empty”. If this rapid decay end FIFO is "empty", step C
23, and if it is not "empty", the next step C27
Proceed to. [C27] The tone generation channel numbers of the tone generation channels whose envelope levels have become “0” by the rapid decay processing are sequentially lowered from the rapid decay end FIFO, and the tone generation channel management map corresponding to the lowered tone generation channel management map The rapid decay flag of the tone generation channel number is set to "0". Then, the process returns to step C15.
【0051】プリアサイナタスク(図15)
プリアサイナタスクに対応するタイマイベントが発生す
ると実行を開始し、発音量に基づいてアサイン順位を更
新するタスクである。各ステップD1〜D12において
の処理は、次の通りである。
〔D1〕 エンベロープ管理マップをクリヤするととも
に、このプリアサイナタスクで占有する変数などを初期
値に設定する。また、第4タスクタイマカウンタ値TCNE
[4] を“5”に、第4タスク時間間隔TCND[4] を“4”
に設定する。さらに、タスク管理マップにおけるタスク
番号“4:プリアサイナタスク”のタイマ処理要求フラ
グを“1:要求有り”に設定する。
〔D2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、プリアサイナタ
スクに対するタイマイベントが発生すると、次のステッ
プD3に進む。
〔D3〕 タスク管理マップにおけるタスク番号“4:
プリアサイナタスク”の待ちイベント値と第1イベント
発生フラグとを“0”に設定する。
〔D4〕 第Nプリアサイン順位楽音発生チャネル番号
PASS[N]を各対応する“N( =0,1,・・・・15) ”に設定す
る。ここで、第Nプリアサイン順位楽音発生チャネル番
号PASS[N] は第Nプリアサイン順位の楽音発生チャネル
の楽音発生チャネル番号を示す。
〔D5〕 メインアサイナ処理中フラグMAEFを“0”に
設定する。
〔D6〕 発音タスクのステップC6,C18で設定さ
れて後述するエンベロープタスクのステップE15にお
いて更新されるところのエンベロープ管理マップの各楽
音発生チャネル番号の発音量を、楽音発生チャネル番号
GNのプリアサイナ発音量PLEV[GN]とするとともに、発音
量が“8000H" 未満である楽音発生チャネル(言い
換えれば、いわゆるADSR表現におけるアタックを終
了していてかつ急速減衰中ではない楽音発生チャネル)
の数を調べて、プリアサイナ割当て可能楽音発生チャネ
ル数PACNとする。 Pre-assigner task (FIG. 15) This task starts execution when a timer event corresponding to the pre-assigner task occurs, and updates the assignment order based on the tone generation amount. The processing in each step D1 to D12 is as follows. [D1] The envelope management map is cleared and the variables occupied by this pre-assigner task are set to initial values. Also, the fourth task timer counter value TCNE
[4] is set to “5” and the fourth task time interval TCND [4] is set to “4”
Set to. Further, the timer processing request flag of the task number “4: pre-assigner task” in the task management map is set to “1: request”. [D2] The request source event value NSET is set to "1" and an event wait monitor call is made. When a timer event for the pre-assigner task occurs, the process proceeds to the next step D3. [D3] Task number “4: in task management map”
The wait event value of the "pre-signer task" and the first event occurrence flag are set to "0". [D4] N-th pre-assigned order musical tone generation channel number
Set PASS [N] to the corresponding "N (= 0,1, ... 15)". Here, the Nth preassigned musical tone generation channel number PASS [N] indicates the musical tone generation channel number of the Nth preassigned musical tone generation channel. [D5] The main assigner processing flag MAEF is set to "0". [D6] The tone generation amount of each tone generation channel number of the envelope management map, which is set in steps C6 and C18 of the tone generation task and is updated in step E15 of the envelope task described later, is defined as the tone generation channel number.
GN pre-assigner sound volume PLEV [GN] and sound volume less than "8000H" (in other words, sound sound generation channel that ends attack in so-called ADSR expression and is not in rapid decay)
The number of musical sound generation channels that can be assigned to pre-assigners is defined as PACN.
【0052】〔D7〕 第Nプリアサイン順位楽音発生
チャネル番号PASS[N] を楽音発生チャネル番号GNのプリ
アサイナ発音量PLEV[GN]の小なる順に並べ換える。例え
ば、プリアサイナ発音量PLEV[GN]がPLEV[3] <PLEV[5]
<PLEV[2] ・・・の順であれば、第Nプリアサイン順位
楽音発生チャネル番号PASS[N] はPASS[0] =3、PASS
[1] =5、PASS[2] =2・・・とする。
〔D8〕 タスクロックをかける。言い換えれば、鍵操
作検出回路、タイマ回路27からの割込みを禁止する。
このタスクロックが解除されるまで他のタスクの実行は
禁止され、当該タスクの実行の継続は保証される。
〔D9〕 メインアサイナ処理中フラグMAEFが“0:非
処理中”であるか否かを判断する。このメインアサイナ
処理フラグMAEFが“0”である場合にはステップD11
に進む。
〔D10〕 ステップD9の判断においてメインアサイ
ナ処理中フラグMAEFが“0”でない場合、言い換えれば
ステップD6〜D8の処理中に鍵盤部における新たな鍵
操作などに基づく一連の処理によりメインアサイナタス
クが実行されると、楽音発生チャネルの発音態様がステ
ップD6の開始時と異なっているために、タスクロック
を解除して再設定をするべくステップD4に戻る。
〔D11〕 まず、第Nプリアサイン順位楽音発生チャ
ネル番号PASS[N] を各対応する第Nアサイン順位楽音発
生チャネル番号MASS[N] とするとともに、対象アサイン
順位TASNを“0”に設定する。また、プリアサイナ割当
て可能楽音発生チャネル数PACNを割当て可能楽音発生チ
ャネル数GACNとする。
〔D12〕 タスクロックを解除してステップD2に戻
る。なお、タスクロック中に発生した割込みはタスクロ
ック解除後に実行される。[D7] The N-th pre-assigned order tone generation channel number PASS [N] is rearranged in the ascending order of the pre-assigner tone generation amount PLEV [GN] of the tone generation channel number GN. For example, the pre-acina pronunciation amount PLEV [GN] is PLEV [3] <PLEV [5]
If the order is <PLEV [2] ..., Nth preassigned musical tone generation channel number PASS [N] is PASS [0] = 3, PASS
[1] = 5, PASS [2] = 2 ... [D8] Lock the task. In other words, the interrupt from the key operation detection circuit and the timer circuit 27 is prohibited.
Execution of other tasks is prohibited until the task lock is released, and the continuation of execution of the task is guaranteed. [D9] It is determined whether or not the main assigner processing flag MAEF is "0: not processing". If this main assigner processing flag MAEF is "0", step D11
Proceed to. [D10] If the main assigner processing flag MAEF is not “0” in the determination of step D9, in other words, the main assigner task is executed by a series of processing based on a new key operation on the keyboard during the processing of steps D6 to D8. Then, since the tone generation mode of the tone generation channel is different from that at the start of step D6, the process returns to step D4 to release the task lock and reset. [D11] First, the N-th pre-assigned tone generation channel number PASS [N] is set to the corresponding N-th assigned tone generation channel number MASS [N], and the target assignment order TASN is set to "0". Also, the number PACN of musical tone generation channels that can be assigned by pre-assigner is the number GACN of musical tone generation channels that can be assigned. [D12] The task lock is released and the process returns to step D2. An interrupt that occurs during task lock is executed after task lock is released.
【0053】エンベロープタスク(図16)
当該タスクに対するタイマイベントが発生すると実行を
開始し、各エンベロープチャネルのエンベロープレベル
および発音量を順次に更新するとともに、ノートステー
タス、ソステヌートステータス、ダンパー値およびエン
ベロープ生成パラメータに基づいて新たな目標値および
レートを演算し、楽音発生回路30の楽音発生チャネル
への転送を行うタスクである。各ステップE1〜E16
においての処理は、次の通りである。
〔E1〕 当該タスクで占有する変数などを初期値に設
定する。また、第5タスクタイマカウンタ値TCNE[5] を
“4”に、第5タスク時間間隔TCND[5] を“4”に設定
する。さらに、タスク管理マップにおけるタスク番号
“5:エンベロープタスク”のタイマ処理要求フラグを
“1:要求有り”に設定する。
〔E2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、エンベロープタ
スクタイマイベントが発生すると、次のステップE3に
進む。
〔E3〕 タスク管理マップにおけるタスク番号“5:
エンベロープタスク”の待ちイベント値と第1イベント
発生フラグとを“0”に設定するとともに、エンベロー
プ処理対象番号ECTNを“0”に設定する。
〔E4〕 タスクロックをかける。
〔E5〕 エンベロープ管理マップにおけるエンベロー
プ処理対象番号ECTNに対応するエンベロープチャネル番
号の目標値が“0”であり、かつそのエンベロープレベ
ルが“0”であるか否かを判断する。この目標値が
“0”でかつエンベロープレベルが“0”である場合に
は発音を終了しているためにステップE16に進み、い
ずれかが“0”でない場合にはステップE6に進む。
〔E6〕 楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号の急速減衰中フラグが“1:急速減衰中”であるか否
かを判断する。この急速減衰中フラグが“1”でない場
合には次のステップE7に進み、“1”である場合には
当該タスクによるエンベロープ処理は不要なために、ス
テップE16に進む。 Envelope task (FIG. 16) Execution starts when a timer event for the task occurs, and the envelope level and sound level of each envelope channel are updated in sequence, and note status, sostenuto status, damper value, and envelope generation parameter are also set. Is a task of calculating a new target value and rate based on the above, and transferring the new target value and rate to the tone generation channel of the tone generation circuit 30. Steps E1 to E16
The processing in is as follows. [E1] A variable occupied by the task is set to an initial value. Further, the fifth task timer counter value TCNE [5] is set to "4" and the fifth task time interval TCND [5] is set to "4". Further, the timer processing request flag of the task number “5: envelope task” in the task management map is set to “1: request”. [E2] Set the request source event value NSET to "1" and make an event wait monitor call. When the envelope task timer event occurs, the process proceeds to the next step E3. [E3] Task number “5: in task management map”
The waiting event value of the "envelope task" and the first event occurrence flag are set to "0" and the envelope processing target number ECTN is set to "0". [E4] Task lock is applied. [E5] Envelope management map It is determined whether the target value of the envelope channel number corresponding to the envelope processing target number ECTN in "0" is "0" and the envelope level is "0". Is "0", the sound generation has ended, so the process proceeds to step E16, and if either is not "0", the process proceeds to step E6. [E6] Envelope processing target number in the tone generation channel management map Determines whether the rapid decay flag of the tone generation channel number corresponding to ECTN is "1: Rapid decay" That. This rapid when the damping flag is not "1", the process proceeds to the next step E7, "1" if it is for an envelope processing is not necessary according to the task, the process proceeds to step E16.
【0054】〔E7〕 エンベロープ管理マップにおけ
るエンベロープ処理対象番号ECTNに対応するエンベロー
プチャネル番号のエンベロープレベルを旧エンベロープ
レベルとし、エンベロープレベルとレートとを加算して
新たなエンベロープレベルとし、フェーズ番号を“1”
だけインクリメントするとともに、楽音発生チャネル管
理マップにおけるエンベロープ処理対象番号ECTNに対応
する楽音発生チャネル番号のノート番号を読み出してエ
ンベロープ処理対象ノート番号ENNMとする。
〔E8〕 ノートマップにおけるエンベロープ処理対象
ノート番号ENNMに対応するノート番号のノートステータ
スが“1:押鍵”であるか否かを判断する。このノート
ステータスが“1”でない場合には次のステップE9
に、“1”である場合にはステップE11に進む。
〔E9〕 ノートマップにおけるエンベロープ処理対象
ノート番号ENNMに対応するノート番号のソステヌートス
テータスが“1:ソステヌートオン”であるか否かを判
断する。このソステヌートステータスが“1”である場
合にはステップE11に進む。
〔E10〕 ステップE9の判断においてソステヌート
ステータスが“1”でない場合には、既に離鍵していて
かつ後述するペダルタスクのステップF4において説明
するようにソステヌートペダルが踏み下げられていない
かまたはソステヌートペダルが踏み下げられていても踏
み下げ時にすでに離鍵していたために、離鍵に対応する
エンベロープ処理を行う。言い換えれば、エンベロープ
管理マップにおけるエンベロープ処理対象番号ECTNに対
応するエンベロープチャネル番号の目標値およびレート
などをダンパー値DMPVおよびエンベロープ生成パラメー
タなどに基づき演算して更新するとともに、目標値およ
びレートを楽音発生回路30の対応する楽音発生チャネ
ルに転送する。また、処理を終了するとステップE12
に進む。
〔E11〕 ステップE8の判断においてノートステ
ータスが“1:押鍵”であるか、またはステップE9の
判断においてソステヌートステータスが“1:ソステヌ
ートオン”である場合には、いまだ押鍵中であるか、ま
たは離鍵していてもソステヌートペダルが踏み下げられ
ていてかつ踏み下げ時に押鍵中であったために、押鍵中
に対応するエンベロープ処理を行う。言い換えれば、エ
ンベロープ管理マップにおけるエンベロープ処理対象番
号ECTNに対応するエンベロープチャネル番号の目標値お
よびレートなどを最大値としたダンパー値およびエンベ
ロープ生成パラメータなどに基づき演算して更新すると
ともに、目標値およびレートを楽音発生回路30の対応
する楽音発生チャネルに転送する。[E7] The envelope level of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is set to the old envelope level, the envelope level and the rate are added to form a new envelope level, and the phase number is set to "1". ”
And the note number of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is read as the envelope processing target note number ENNM. [E8] It is determined whether or not the note status of the note number corresponding to the envelope processing target note number ENNM in the note map is "1: key depression". If this note status is not "1", the next step E9
If it is "1", the process proceeds to step E11. [E9] It is determined whether the sostenuto status of the note number corresponding to the envelope processing target note number ENNM in the note map is “1: sostenuto on”. If the sostenuto status is "1", the process proceeds to step E11. [E10] If the sostenuto status is not "1" in the determination at step E9, the key has already been released and the sostenuto pedal has not been depressed as described in step F4 of the pedal task described later, or the sostenuto pedal has not been depressed. Even if the key is depressed, the key is already released when the pedal is depressed, so the envelope process corresponding to the key release is performed. In other words, the target value and rate of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is calculated and updated based on the damper value DMPV and the envelope generation parameter, and the target value and rate are generated by the tone generation circuit. Transfer to 30 corresponding tone generation channels. Further, when the processing is completed, step E12
Proceed to. [E11] If the note status is "1: key depression" in the judgment of step E8, or if the sostenuto status is "1: sostenuto on" in the judgment of step E9, is it still being depressed? Alternatively, since the sostenuto pedal is depressed even when the key is released and the key is being depressed when the pedal is depressed, the envelope processing corresponding to the key depression is performed. In other words, the target value and rate of the envelope channel number corresponding to the target number ECTN of the envelope processing in the envelope management map are calculated and updated based on the damper value and the envelope generation parameter that have the maximum value. It is transferred to the corresponding tone generation channel of the tone generation circuit 30.
【0055】〔E12〕 エンベロープ管理マップにお
けるエンベロープ処理対象番号ECTNに対応するエンベロ
ープチャネル番号のフェーズ番号が、トランケート禁止
フェーズ番号を超えているか否かを判断する。このフェ
ーズ番号がトランケート禁止フェーズ番号を超えていな
い場合にはステップE16に進み、発音量を更新しな
い。また、このフェーズ番号がトランケート禁止フェー
ズ番号を超えている場合にはステップE13に進む。
〔E13〕、〔E14〕 エンベロープ管理マップにお
けるエンベロープ処理対象番号ECTNに対応するエンベロ
ープチャネル番号のフェーズ番号が、統合禁止フェーズ
番号を超えているか否かを判断し、このフェーズ番号が
統合禁止フェーズ番号を超えている場合には楽音発生チ
ャネル管理マップにおけるエンベロープ処理対象番号EC
TNに対応する楽音発生チャネル番号の統合禁止フラグを
“0”に設定する。
〔E15〕 楽音発生チャネル管理マップにおけるエン
ベロープ処理対象番号ECTNに対応する楽音発生チャネル
番号の発音量をエンベロープレベルの上位15ビット
に、トランケート禁止フラグを“0”に設定する。
〔E16〕 タスクロックを解除する。
〔E17〕 エンベロープ処理対象番号ECTNが“15”
未満であるか否かを判断する。このエンベロープ処理対
象番号ECTNが“15”未満でない場合には、ステップE
17に進む。
〔E18〕 エンベロープ処理対象番号ECTNを“1”だ
けインクリメントしてステップE4に戻る。
〔E19〕 連打発音統合処理をする。この処理の内容
は図17のフローチャートを参照して後に詳しく説明す
る。処理を終了するとステップE2に戻る。[E12] It is determined whether the phase number of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map exceeds the truncation prohibition phase number. If this phase number does not exceed the truncate prohibition phase number, the process proceeds to step E16, and the tone generation amount is not updated. If the phase number exceeds the truncate prohibition phase number, the process proceeds to step E13. [E13], [E14] It is determined whether or not the phase number of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map exceeds the integrated prohibition phase number, and this phase number indicates the integrated prohibition phase number. If it exceeds, the envelope processing target number EC in the tone generation channel management map
The integration prohibition flag of the tone generation channel number corresponding to TN is set to "0". [E15] The tone generation amount of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is set to the upper 15 bits of the envelope level, and the truncation prohibition flag is set to "0". [E16] The task lock is released. [E17] Envelope processing target number ECTN is "15"
It is determined whether it is less than. If the envelope processing target number ECTN is not less than "15", step E
Proceed to 17. [E18] The envelope processing target number ECTN is incremented by "1" and the process returns to step E4. [E19] Perform continuous tap sound integration processing. The details of this processing will be described later in detail with reference to the flowchart of FIG. When the process is completed, the process returns to step E2.
【0056】連打発音統合処理(図17)
連打関係にある発音を統合する処理である。各ステップ
E1901〜E1919においての処理は、次の通りで
ある。
〔E1901〕 エンベロープ処理対象番号ECTNを
“0”に設定するとともにタスクロックをかける。
〔E1902〕 エンベロープ処理対象番号ECTNが“1
4”未満であるか否か判断する。“14”未満でなけれ
ばエンベロープ統合処理が終了したので、タスクロック
を解除してステップE2に戻る。
〔E1903〕 エンベロープ管理マップにおけるエン
ベロープ処理対象番号ECTNに対応するエンベロープチャ
ネル番号の目標値が“0”でかつエンベロープレベルが
“0”であるか否かを判断する。目標値が“0”でかつ
エンベロープレベルが“0”である場合には次のステッ
プE1904に進み、いずれかが“0”でない場合には
発音を終了していないため、ステップE1905に進
む。
〔E1904〕 エンベロープ処理対象番号ECTNを
“1”だけインクリメントし、ステップE1902に戻
る。
〔E1905〕 楽音発生チャネル管理マップにおける
エンベロープ処理対象番号ECTNに対応する楽音発生チャ
ネル番号の急速減衰中フラグが“1:急速減衰中”であ
るか否かを判断する。“1”で急速減衰中である場合に
はエンベロープ統合処理は不要なためステップE190
4に進み、“1”でない場合には次のステップE190
6に進む。Sequential Striking Sound Integration Process (FIG. 17) This process integrates sounds that have a continuous striking relationship. The processing in steps E1901 to E1919 is as follows. [E1901] The envelope processing target number ECTN is set to "0" and the task is locked. [E1902] Envelope processing target number ECTN is "1"
It is determined whether or not it is less than 4 ". If it is not less than" 14 ", the envelope integration processing has ended, so the task lock is released and the process returns to step E2. [E1903] Envelope processing target number ECTN in the envelope management map It is determined whether the target value of the corresponding envelope channel number is “0” and the envelope level is “0.” When the target value is “0” and the envelope level is “0”, The process proceeds to step E1904, and if either is not "0", the sound generation has not ended, so the process proceeds to step E1905. [E1904] The envelope processing target number ECTN is incremented by "1" and the process returns to step E1902. E1905] The music corresponding to the envelope processing target number ECTN in the tone generation channel management map Rapid decay flag generation channel number.: Determines whether or not "1 during a fast decay""1" when it is being rapidly attenuated in order envelope integration processing is not required step E190
4. If it is not "1", go to the next step E190.
Go to 6.
【0057】〔E1906〕 楽音発生チャネル管理マ
ップにおけるエンベロープ処理対象番号ECTNに対応する
楽音発生チャネル番号の統合禁止フラグが“1:統合禁
止”であるか否かを判断する。“1”である場合には統
合禁止中なので、ステップE1904に進み、“1”で
ない場合には次のステップE1907に進む。
〔E1907〕 統合比較対象番号FCTNをエンベロープ
処理対象番号ECTNに“1”を加算した値に設定する。
〔E1908〕 楽音発生チャネル管理マップにおける
エンベロープ処理対象番号ECTNに対応する楽音発生チャ
ネル番号のノート番号と統合比較対象番号FCTNに対応す
る楽音発生チャネル管理マップの楽音発生チャネル番号
におけるノート番号とが同じであるか否かを判断する。
同じでない場合には次のステップE1909に進み、同
じである場合にはステップE1911に進む。
〔E1909〕 統合比較対象番号FCTNが“15”未満
か否かを判断する。“15”未満である場合には次のス
テップE1910に進み、“15”未満でない場合には
ステップE1904に進む。
〔E1910〕 統合比較対象番号FCTNを“1”だけイ
ンクリメントし、ステップE1908に戻る。
〔E1911〕 エンベロープ管理マップにおける統合
比較対象番号FCTNに対応するエンベロープチャネル番号
の目標値が“0”でかつエンベロープレベルが“0”で
あるか否かを判断する。目標値が“0”でかつエンベロ
ープレベルが“0”である場合には発音を終了している
ので、ステップE1909に進み、いずれかが“0”で
ない場合には次のステップE1912に進む。[E1906] It is determined whether or not the integration inhibition flag of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is “1: integration inhibition”. If the value is "1", the integration is prohibited, so the process proceeds to step E1904. If the value is not "1", the process proceeds to step E1907. [E1907] The integrated comparison target number FCTN is set to a value obtained by adding “1” to the envelope processing target number ECTN. [E1908] The note number of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map and the note number in the tone generation channel number of the tone generation channel management map corresponding to the integrated comparison target number FCTN are the same. Determine if there is.
If they are not the same, the process proceeds to the next step E1909, and if they are the same, the process proceeds to step E1911. [E1909] It is determined whether the integrated comparison target number FCTN is less than “15”. If it is less than "15", the process proceeds to the next step E1910, and if it is not less than "15", the process proceeds to step E1904. [E1910] The integrated comparison number FCTN is incremented by "1", and the process returns to step E1908. [E1911] It is determined whether the target value of the envelope channel number corresponding to the integrated comparison target number FCTN in the envelope management map is “0” and the envelope level is “0”. When the target value is "0" and the envelope level is "0", the sound generation has ended, so the process proceeds to step E1909, and if either is not "0", the process proceeds to next step E1912.
【0058】〔E1912〕 楽音発生チャネル管理マ
ップにおける統合比較対象番号FCTNに対応する楽音発生
チャネル番号の急速減衰中フラグが“1:急速減衰中”
であるか否かを判断する。“1”である場合にはステッ
プE1909に進み、“1”でない場合には次のステッ
プE1913に進む。
〔E1913〕 楽音発生チャネル管理マップにおける
統合比較対象番号FCTNに対応する楽音発生チャネル番号
の統合禁止フラグが“1:統合禁止”であるか否かを判
断する。“1”である場合にはいまだ統合禁止中なの
で、ステップE1909に進み、“1”でない場合には
次のステップE1914に進む。
〔E1914〕 エンベロープ管理マップにおけるエン
ベロープ処理対象番号ECTNに対応するエンベロープチャ
ネル番号の目標値および統合比較対象番号FCTNに対応す
るエンベロープチャネル番号の目標値を読み出し加算し
て統合目標値TDLVとする。すなわち、統合により音量が
変化しないように設定する。
〔E1915〕 統合目標値TDLVが“FFFFH”を超
えているか否かを判断する。超えていない場合には次の
ステップE1916に進み、超えている場合には統合で
きないのでステップE1904に進む。
〔E1916〕 エンベロープ管理マップにおけるエン
ベロープ処理対象番号ECTNに対応するエンベロープチャ
ネル番号のエンベロープレベルを統合対象エンベロープ
レベルELEVとし、統合比較対象番号FCTNに対応するエン
ベロープチャネル番号のエンベロープレベルを統合比較
対象エンベロープレベルFLEVとすると共に、統合対象エ
ンベロープレベルELEVと統合比較対象エンベロープレベ
ルFLEVとを加算して統合エンベロープレベルTLEVとす
る。
〔E1917〕 統合対象エンベロープレベルELEVが統
合比較対象エンベロープレベルFLEV未満であるか否かを
判断する。未満である場合にはステップE1919に進
み、未満でない場合には次のステップE1918に進
む。[E1912] The rapid decay flag of the tone generation channel number corresponding to the integrated comparison target number FCTN in the tone generation channel management map is set to “1: rapid decay”.
Or not. If it is "1", the process proceeds to step E1909, and if it is not "1", the process proceeds to next step E1913. [E1913] It is determined whether the integration inhibition flag of the tone generation channel number corresponding to the integrated comparison target number FCTN in the tone generation channel management map is “1: integration prohibited”. If it is "1", the integration is still prohibited, so the process proceeds to step E1909, and if it is not "1", the process proceeds to next step E1914. [E1914] The target value of the envelope channel number corresponding to the envelope processing target number ECTN and the target value of the envelope channel number corresponding to the integrated comparison target number FCTN in the envelope management map are read out and added to obtain the integrated target value TDLV. That is, the volume is set so as not to change due to the integration. [E1915] It is determined whether the integrated target value TDLV exceeds “FFFFH”. If not exceeded, the process proceeds to the next step E1916, and if it is exceeded, the integration cannot be performed, so the process proceeds to step E1904. [E1916] The envelope level of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is set as the integration target envelope level ELEV, and the envelope level of the envelope channel number corresponding to the integration comparison target number FCTN is integrated comparison target envelope level FLEV. At the same time, the integration target envelope level ELEV and the integration comparison target envelope level FLEV are added to obtain the integration envelope level TLEV. [E1917] It is determined whether the integration target envelope level ELEV is less than the integration comparison target envelope level FLEV. If it is less than, it proceeds to step E1919, and if it is not less, it proceeds to next step E1918.
【0059】〔E1918〕 エンベロープ管理マップ
におけるエンベロープ処理対象番号ECTNに対応するエン
ベロープチャネル番号のエンベロープレベルを統合エン
ベロープレベルTLEVに変更し、目標値を統合目標値TDLV
に変更設定し、エンベロープ生成パラメータも対応して
変更し、レートを統合目標値TDLVから旧エンベロープレ
ベルを減算した値に設定すると共に、目標値およびレー
トを対応する楽音発生チャネルに転送する。また楽音発
生チャネル管理マップにおけるエンベロープ処理対象番
号ECTNに対応する楽音発生チャネル番号の発音量を統合
エンベロープレベルTLEVの上位15ビットに更新する。
エンベロープ管理マップにおける統合比較対象番号FCTN
に対応するエンベロープチャネル番号のレートをエンベ
ロープレベルの値に、目標値を“0”に設定すると共
に、目標値およびレートを対応する楽音発生チャネルに
転送する。楽音発生チャネル管理マップにおける統合比
較対象番号FCTNに対応する楽音発生チャネル番号の統合
禁止フラグを“1:統合禁止”に、発音量を“0”に設
定する。そして、ステップE1904に進む。
〔E1919〕 エンベロープ管理マップにおける統合
比較対象番号FCTNに対応するエンベロープチャネル番号
のエンベロープレベルを統合エンベロープレベルTLEVに
変更し、目標値を統合目標値TDLVに変更設定し、エンベ
ロープ生成パラメータも対応して変更し、レートを統合
目標値TDLVから旧エンベロープレベルを減算した値に設
定すると共に、目標値およびレートを対応する楽音発生
チャネルに転送する。楽音発生チャネル管理マップにお
ける統合比較対象番号FCTNに対応する楽音発生チャネル
番号の発音量を統合エンベロープレベルTLEVの上位15
ビットに更新する。エンベロープ管理マップにおけるエ
ンベロープ処理対象番号ECTNに対応するエンベロープチ
ャネル番号のレートをエンベロープレベルの値に、目標
値を“0”に設定すると共に、目標値およびレートを対
応する楽音発生チャネルに転送する。楽音発生チャネル
管理マップにおけるエンベロープ処理対象番号ECTNに対
応する楽音発生チャネル番号の統合禁止フラグを“1:
統合禁止”に、発音量を“0”に設定する。そして、ス
テップE1904に進む。[E1918] The envelope level of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is changed to the integrated envelope level TLEV, and the target value is set to the integrated target value TDLV.
, The envelope generation parameter is also changed correspondingly, the rate is set to a value obtained by subtracting the old envelope level from the integrated target value TDLV, and the target value and rate are transferred to the corresponding tone generation channel. Further, the tone generation amount of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is updated to the upper 15 bits of the integrated envelope level TLEV.
Integrated comparison number FCTN in envelope management map
The rate of the envelope channel number corresponding to is set to the value of the envelope level, the target value is set to "0", and the target value and rate are transferred to the corresponding tone generation channel. The integration inhibition flag of the tone generation channel number corresponding to the integrated comparison target number FCTN in the tone generation channel management map is set to "1: integration prohibited", and the tone generation amount is set to "0". Then, the process proceeds to step E1904. [E1919] The envelope level of the envelope channel number corresponding to the integrated comparison target number FCTN in the envelope management map is changed to the integrated envelope level TLEV, the target value is changed to the integrated target value TDLV, and the envelope generation parameter is also changed correspondingly. Then, the rate is set to a value obtained by subtracting the old envelope level from the integrated target value TDLV, and the target value and rate are transferred to the corresponding tone generation channel. The tone generation amount of the tone generation channel number corresponding to the integrated comparison target number FCTN in the tone generation channel management map is set to the top 15 of the integrated envelope level TLEV.
Update to a bit. The rate of the envelope channel number corresponding to the envelope processing target number ECTN in the envelope management map is set to the value of the envelope level, the target value is set to "0", and the target value and rate are transferred to the corresponding tone generation channel. The integration prohibition flag of the tone generation channel number corresponding to the envelope processing target number ECTN in the tone generation channel management map is set to "1:
The sound generation amount is set to "0" in "integration prohibited", and the process proceeds to step E1904.
【0060】ペダルタスク
当該タスクに対するタイマイベントが発生すると実行を
開始して、ダンパーペダル、ソステヌートペダルなどの
ペダルの設定状態を検出するタスクである。なお、公知
技術であるために要点のみを説明する。各ステップF1
〜F4においての処理は、次の通りである。
〔F1〕 まず、新たなペダルの設定状態をペダル毎に
記憶する新ペダルマップと、前回のペダルの設定状態を
ペダル毎に記憶する旧ペダルマップと、当該タスクで占
有する変数などとを初期値に設定する。次に、第6タス
クタイマカウンタ値TCNE[6] を“11”に、第6タスク
時間間隔TCND[6] を“9”に設定する。さらに、タスク
管理マップにおけるタスク番号“6:ペダルタスク”の
タイマ処理要求フラグを“1”に設定する。
〔F2〕 要求元イベント値NSETを“1”に設定して、
イベント待ちモニタコールを行う。なお、ペダルタスク
タイマイベントが発生すると、次のステップF3に進
む。
〔F3〕 タスク管理マップにおけるタスク番号“6:
ペダルタスク”の待ちイベント値と第1イベント発生フ
ラグとを“0”に設定する。
〔F4〕 公知技術に基づいて各ペダルを所定順次に走
査して設定状態を読み込み、設定状態に変化があったか
否かを判断して変化があれば対応する処理を行う。例え
ば、ダンパーペダルの設定状態が変化していれば、新た
なダンパーの踏込み量をダンパー値DMPVとする。また、
ソステヌートペダルが踏み下げられると、ノートマップ
における各ノート番号のソステヌートステータスを対応
するノートステータスと同じになるように更新する。さ
らに、ソステヌートペダルが戻されると、ノートマップ
における各ノート番号のソステヌートステータスを
“0”に設定する。なお、変化がない場合、または対応
する処理を終了した場合にはステップF2に戻る。 Pedal task This task starts execution when a timer event for the task occurs and detects the setting state of pedals such as damper pedals and sostenuto pedals. Since this is a known technique, only the essential points will be described. Each step F1
The processing from F4 to F4 is as follows. [F1] First, a new pedal map that stores a new pedal setting state for each pedal, an old pedal map that stores the previous pedal setting state for each pedal, and variables that are occupied by the task are initialized. Set to. Next, the sixth task timer counter value TCNE [6] is set to "11" and the sixth task time interval TCND [6] is set to "9". Further, the timer processing request flag of the task number “6: Pedal task” in the task management map is set to “1”. [F2] Set the request source event value NSET to "1",
Make an event wait monitor call. When a pedal task timer event occurs, the process proceeds to the next step F3. [F3] Task number “6: in task management map”
The waiting event value of the "pedal task" and the first event occurrence flag are set to "0". [F4] Based on a known technique, each pedal is scanned in a predetermined sequence to read the setting state, and whether the setting state has changed. If there is a change, the corresponding process is performed.For example, if the setting state of the damper pedal has changed, the stepping amount of the new damper is set as the damper value DMPV.
When the sostenuto pedal is depressed, the sostenuto status of each note number in the note map is updated to be the same as the corresponding note status. Further, when the sostenuto pedal is returned, the sostenuto status of each note number in the note map is set to "0". When there is no change or when the corresponding process is completed, the process returns to step F2.
【0061】操作子タスク(図18)
当該タスクに対するタイマイベントが発生すると実行を
開始して、音色の選択あるいは音色に関するパラメータ
の設定などを行う操作子群23の設定状態を検出するタ
スクである。なお、公知技術であるために要点のみを説
明する。各ステップG1〜G4においての処理は、次の
通りである。
〔G1〕 まず、新たな操作子の設定状態を操作子毎に
記憶する新操作子マップと、前回の操作子の設定状態を
操作子毎に記憶する旧操作子マップと、操作子の操作に
対応して設定される各種パラメータと、この操作子タス
クで占有する変数などとを初期値に設定する。次に、第
7タスクタイマカウンタ値TCNE[7] を“12”に、第7
タスク時間間隔TCND[7] を“9”に設定する。さらに、
タスク管理マップにおけるタスク番号“7:操作子タス
ク”のタイマ処理要求フラグを“1”に設定する。
〔G2〕 要求元イベント値NSETを“1”に設定すると
ともに、初期設定完了フラグを“1”に設定してイベン
ト待ちモニタコールを行う。なお、操作子タスクタイマ
イベントが発生すると、次のステップG3に進む。
〔G3〕 タスク管理マップにおけるタスク番号“7:
操作子タスク”の待ちイベント値と第1イベント発生フ
ラグとを“0”に設定する。
〔G4〕 公知技術に基づいて各操作子を所定順次に走
査して設定状態を読み込み、設定状態に変化があったか
否かを判断して変化があれば対応する処理を行う。例え
ば、音色番号を変更した場合には音色パラメータ群を変
更する。なお、変化がない場合、または対応する処理を
終了した場合にはステップG2に戻る。 Manipulator task (FIG. 18) This task starts execution when a timer event for the task occurs, and detects the setting state of the manipulator group 23 for selecting a tone color or setting parameters relating to a tone color. Since this is a known technique, only the essential points will be described. The processing in each step G1 to G4 is as follows. [G1] First, a new manipulator map that stores a new manipulator setting state for each manipulator, an old manipulator map that stores the previous manipulator setting state for each manipulator, and an operator manipulator Various parameters that are set correspondingly and variables that are occupied by this operator task are set to initial values. Next, the seventh task timer counter value TCNE [7] is set to “12” and the seventh
Set task time interval TCND [7] to "9". further,
The timer processing request flag of the task number “7: operator task” in the task management map is set to “1”. [G2] The request source event value NSET is set to "1", the initialization completion flag is set to "1", and an event wait monitor call is performed. When an operator task timer event occurs, the process proceeds to the next step G3. [G3] Task number “7: in task management map”
The waiting event value of the "operator task" and the first event occurrence flag are set to "0". [G4] Based on a known technique, each operator is scanned in a predetermined sequence to read the setting state and change to the setting state. If there is a change, the corresponding processing is performed. For example, when the timbre number is changed, the timbre parameter group is changed. When there is no change or when the corresponding processing is finished Returns to step G2.
【0062】次に、以上に説明した本実施例の全体的な
動作について説明する。
(1) 初期設定
電源を投入すると、モニタプログラムのリセットルーチ
ンZAによる処理後に(ステップZA1〜ZA3)、キ
ーデータ受信タスク(ルーチンA)、メインアサイナタ
スク(ルーチンB)、発音タスク(ルーチンC)、プリ
アサイナタスク(ルーチンD)、エンベロープタスク
(ルーチンE)、ペダルタスク(ルーチンF)および操
作子タスク(ルーチンG)の初期設定処理がタスク優先
順位にしたがって順次に行われる(ステップA1,A
2、ステップB1,B2、ステップC1,C2、ステッ
プD1,D2、ステップE1,E2、ステップF1,F
2、ステップG1,G2)。
(2) 受信キーデータによる発音処理
鍵盤の鍵を操作し鍵操作検出回路から割込みがかかる
と、モニタプログラムのキーデータ受信割込み処理ルー
チンZEが開始される。
(2の1) キーデータ受信割込み処理ルーチンZEに
おいては、キーデータ受信イベント待ちの状態にあるた
めに(ステップZE1,ZE3)、タスク管理マップに
おけるタスク番号“1:キーデータ受信タスク”のステ
ータスを“0:ラン”に設定する(ステップZE5)。
次に、キーデータ受信タスクを実行して(ステップA2
〜A7)、キーデータを鍵操作検出回路から読み込み、
このキーデータに基づいてノートマップを更新するとと
もに、ノートオンであればイベント発生モニタコールを
行う(ステップA7)。
(2の2) モニタプログラムのイベント発生モニタコ
ールルーチンZCにおいて、タスク管理マップにおける
タスク番号“2:メインアサイナタスク”の第1イベン
ト発生フラグを“1”に設定するとともに(ステップZ
C1)、ステータスを“1:レディ”に設定する(ステ
ップZC2,ZC3)。なお、キーデータ受信タスクは
タスク優先順位がメインアサイナタスクのタスク優先順
位より高いために、キーデータ受信タスクを再び開始し
て(ステップZC4)、このキーデータ受信タスクにお
いてイベント待ちモニタコールを行う(ステップA
2)。
(2の3) モニタプログラムのイベント待ちモニタコ
ールルーチンZBにおいて、キーデータ受信イベントが
発生しているか否かを調べる(ステップZB1)。この
調べた結果、次のキーデータ受信イベントがまだ発生し
ていないために、タスク管理マップにおけるタスク番号
“1:キーデータ受信タスク”のステータスを“2:ウ
ェイト”に設定して(ステップZB2)、タスク管理マ
ップを調べる(ステップZB3)。このタスク管理マッ
プを調べた結果、ステータスが“1:レディ”である最
優先タスクのタスク番号 が“2:メインアサイナタス
ク”であるために、このタスク番号“2:メインアサイ
ナタスク”のステータスを“0:ラン”に設定して(ス
テップZB4)、メインアサイナタスクを実行させる
(ステップZB5)。このメインアサイナタスクにおい
ては、ノート番号NTNMなどを楽音発生チャネル管理マッ
プに書き込む(ステップB2〜B5)。次に、イベント
発生モニタコールを行う(ステップB6)。Next, the overall operation of the above-described embodiment will be described. (1) When the initialization power is turned on, after the processing by the monitor program reset routine ZA (steps ZA1 to ZA3), the key data receiving task (routine A), the main assigner task (routine B), the sounding task (routine C) , Pre-assigner task (routine D), envelope task (routine E), pedal task (routine F) and manipulator task (routine G) are initialized in sequence according to task priority (steps A1, A).
2, steps B1 and B2, steps C1 and C2, steps D1 and D2, steps E1 and E2, steps F1 and F
2, steps G1, G2). (2) Sound Generation Processing by Received Key Data When a key on the keyboard is operated and an interrupt occurs from the key operation detection circuit, the key data reception interrupt processing routine ZE of the monitor program is started. (2-1) Since the key data reception interrupt processing routine ZE is in the state of waiting for the key data reception event (steps ZE1 and ZE3), the status of the task number "1: key data reception task" in the task management map is set. Set to "0: run" (step ZE5).
Next, the key data reception task is executed (step A2
~ A7), read the key data from the key operation detection circuit,
The note map is updated based on this key data, and if the note is on, an event occurrence monitor call is made (step A7). (2-2) In the event generation monitor call routine ZC of the monitor program, the first event generation flag of the task number “2: Main Assigner Task” in the task management map is set to “1” (step Z
C1), the status is set to "1: ready" (steps ZC2 and ZC3). Since the task priority of the key data reception task is higher than the task priority of the main assigner task, the key data reception task is restarted (step ZC4), and an event wait monitor call is made in this key data reception task. (Step A
2). (2-3) In the event waiting monitor call routine ZB of the monitor program, it is checked whether or not a key data reception event has occurred (step ZB1). As a result of this examination, since the next key data reception event has not occurred yet, the status of the task number "1: key data reception task" in the task management map is set to "2: wait" (step ZB2). , Check the task management map (step ZB3). As a result of checking this task management map, since the task number of the highest priority task whose status is "1: ready" is "2: main assigner task", this task number "2: main assigner task" The status is set to "0: run" (step ZB4), and the main assigner task is executed (step ZB5). In this main assigner task, note numbers NTNM and the like are written in the tone generation channel management map (steps B2 to B5). Next, an event occurrence monitor call is made (step B6).
【0063】(2の4) モニタプログラムのイベント
発生モニタコールルーチンZCにおいて、タスク管理マ
ップにおけるタスク番号“3:発音タスク”の第2イベ
ント発生フラグを“1”に設定するとともに、ステータ
スを“1:レディ”に設定する。なお、メインアサイナ
タスクのタスク優先順位が発音タスクのタスク優先順位
より高いために、メインアサイナタスクを再び開始し
て、このメインアサイナタスクにおいて対象アサイン順
位を“1”だけインクリメントして次のアサイン順位に
更新し(ステップB7)、イベント待ちモニタコールを
行う(ステップB2)。
(2の5) モニタプログラムのイベント待ちモニタコ
ールルーチンZBにおいてアサイン要求イベントが発生
しているか否かを調べる。この調べた結果、次のアサイ
ン要求イベントがまだ発生していないために、タスク管
理マップにおけるタスク番号“2:メインアサイナタス
ク”のステータスを“2:ウェイト”に設定してタスク
管理マップを調べる。このタスク管理マップを調べた結
果、ステータスが“1:レディ”である最優先タスクの
タスク番号が“3:発音タスク”であるために、タスク
番号“3:発音タスク”のステータスを“0:ラン”に
設定して、発音タスクを実行させる。この発音タスクに
おいては、楽音発生チャネル管理マップに書き込まれた
ノート番号NTNMなどに基づき楽音発生に関する各種パラ
メータを演算して設定し、発音の開始を指示する(ステ
ップC2〜C27)。次に、イベント待ちモニタコール
を行う(ステップC2)。
(2の6) モニタプログラムのイベント待ちモニタコ
ールルーチンZBにおいて発音要求イベントが発生して
いるか否かを調べる。この調べた結果、次の発音要求イ
ベントがまだ発生していないために、タスク管理マップ
におけるタスク番号“3:発音タスク”のステータスを
“2:ウェイト”に設定してタスク管理マップを調べ
る。このタスク管理マップを調べた結果、全てのタスク
番号のステータスが“2:ウェイト”である場合にはス
リープする。(2-4) In the event generation monitor call routine ZC of the monitor program, the second event generation flag of the task number "3: sounding task" in the task management map is set to "1" and the status is set to "1". : Ready ”. Since the task priority of the main assigner task is higher than the task priority of the pronunciation task, the main assigner task is restarted and the target assign order is incremented by "1" in this main assigner task. (Step B7), and an event waiting monitor call is made (step B2). (2-5) It is checked whether or not an assign request event has occurred in the monitor call event waiting monitor call routine ZB of the monitor program. As a result of this examination, since the next assignment request event has not yet occurred, the task number in the task management map "2: Main assigner task" is set to "2: Wait" and the task management map is examined. . As a result of checking this task management map, the task number of the task number "3: sounding task" is "0: because the task number of the highest priority task whose status is" 1: ready "is" 3: sounding task ". Set to "Run" to perform the pronunciation task. In this tone generation task, various parameters relating to tone generation are calculated and set based on the note number NTNM written in the tone generation channel management map, and the start of tone generation is instructed (steps C2-C27). Next, an event wait monitor call is made (step C2). (2-6) It is checked whether or not a sounding request event has occurred in the monitor call event waiting monitor call routine ZB of the monitor program. As a result of this examination, since the next pronunciation request event has not yet occurred, the task number “3: Sound task” in the task management map is set to “2: Wait” and the task management map is examined. As a result of checking this task management map, if the statuses of all task numbers are "2: wait", the task sleeps.
【0064】(3) プリアサイナタスク(ルーチン
D)は対応するタイマイベントが発生すると、楽音発生
チャネル管理マップの発音量に基づいてアサイン順位を
更新する(ステップD2〜D12)。次に、イベント待
ちモニタコールを行う(ステップD2)。
(4) エンベロープタスク(ルーチンE)は対応する
タイマイベントが発生すると、ノートステータス、ペダ
ルのデータ、楽音発生チャネル管理マップおよびエンベ
ロープ管理マップに基づいて楽音発生チャネル管理マッ
プの発音量およびエンベロープ管理マップのエンベロー
プレベルなどを更新などする(ステップE2〜E1
9)。次に、イベント待ちモニタコールを行う(ステッ
プE2)。(3) When the corresponding timer event occurs, the pre-signer task (routine D) updates the assignment order based on the tone generation amount of the tone generation channel management map (steps D2 to D12). Next, an event wait monitor call is made (step D2). (4) When the corresponding timer event occurs, the envelope task (routine E) generates the tone generation amount and envelope management map of the tone generation channel management map based on the note status, pedal data, tone generation channel management map and envelope management map. Update the envelope level etc. (steps E2-E1)
9). Next, an event wait monitor call is made (step E2).
【0065】以上に説明したように本実施例において
は、連打関係にある楽音発生チャネルが発音開始後所定
時間経過してほぼ同一音色となり統合可能になると統合
している。例えば2つの連打関係にある楽音発生チャネ
ルが統合可能になると、より小なる発音をしている楽音
発生チャネルの発音を終了させるとともに、より大なる
発音をしている楽音発生チャネルにて他方の発音をもさ
せる。なお、統合禁止条件を複数設けて、同じあるいは
隣接する統合禁止条件内の楽音発生チャネルについて統
合するようにしても良い。異なる統合禁止条件の楽音発
生チャネルとの統合に際しては聴感上の違和感を軽減す
るように統合禁止条件による重み付けをした演算をして
も良い。また、統合禁止中の楽音発生チャネルを新たな
楽音の割当てのために解放する場合にも聴感上の違和感
を軽減するように統合禁止条件による重み付けをした演
算をしても良い。また、統合禁止条件を発音の割当て状
況、例えば発音を終了している楽音発生チャネル数ある
いはエンベロープレベルが所定レベル以下の楽音発生チ
ャネル数などに基づいて変更しても良い。本実施例にお
いては、同一音高であれば連打関係にあると判断した
が、一つの楽音を複数個の部分音などで構成する場合に
は、同一音高でかつ同種の部分音などであれば連打関係
にあると判断しても良い。また、マルチティンバ電子楽
器に適用しても良い。この場合に、連打関係の判断条件
に同一パートであることを含めるが必要なら関連するパ
ートを含めても良い。As described above, in the present embodiment, the musical tone generation channels having the continuous hitting relation are integrated so that they can be integrated into almost the same tone color after a predetermined time has elapsed after the start of the sound generation. For example, when two tone generation channels having a continuous hitting relationship can be integrated, the sound generation of the tone generation channel having a smaller sound is terminated and the other tone generation channel having the larger sound is generated. Cause It should be noted that a plurality of integration prohibition conditions may be provided to integrate the tone generation channels within the same or adjacent integration prohibition conditions. When integrating with the tone generation channels of different integration prohibition conditions, weighting may be performed according to the integration prohibition conditions so as to reduce the uncomfortable feeling in hearing. Further, when the tone generation channels for which integration is prohibited are released for allocation of new musical sounds, weighting may be performed according to the integration prohibition condition so as to reduce the feeling of strangeness in hearing. Further, the integration prohibition condition may be changed based on the pronunciation allocation situation, for example, the number of tone generation channels that have finished the tone generation or the number of tone generation channels whose envelope level is below a predetermined level. In the present embodiment, it has been determined that there is a continuous hitting relationship if they have the same pitch, but if one musical tone is composed of a plurality of partial sounds, etc., it may be the same pitch and the same partial sounds. If so, it may be determined that they have a continuous hitting relationship. Further, it may be applied to a multitimba electronic musical instrument. In this case, the judgment condition of the continuous hitting relation includes that it is the same part, but if necessary, the related part may be included.
【0066】いわゆる連打処理を施し連打関係にある楽
音発生チャネルのアサイン順位を小さくしても良い。例
えば、プリアサイナタスクのステップD6の処理を終え
ると同一パートで同一音高の楽音を発生している連打関
係にある楽音発生チャネルを検出し、楽音発生チャネル
番号GNのプリアサイナ発音量PLEV[GN]を次のように変更
してからステップD7に進むようにする。ノートステー
タスがノートオンの楽音発生チャネルと連打関係にある
ノートステータスがノートオフの楽音発生チャネルの楽
音発生チャネル番号GNのプリアサイナ発音量PLEV[GN]を
1/10に、連打関係にある全ての楽音発生チャネルの
ノートステータスがノートオフであれば最も大きい楽音
発生チャネル番号GNのプリアサイナ発音量PLEV[GN]を除
く連打関係にある楽音発生チャネルの楽音発生チャネル
番号GNのプリアサイナ発音量PLEV[GN]を1/10に変更
する。本実施例では、マルチタスク処理による例を示し
たが、シングルタスク処理により実施しても良い。また
アサイン順位を予め設定し、設定したアサイン順位に従
って選定するプリアサイン処理によったが、ノートオン
情報を受信するつど新たな楽音を割り当てる楽音発生チ
ャネルを選定する一般的な処理によっても良い。本発明
は、鍵盤部を有する電子楽器に加えて、鍵盤部を有しな
い他の電子楽器、例えば自動演奏装置などより受信する
演奏情報に基づいて楽音を発生するいわゆる楽音発生装
置、あるいは自動リズムなどにも適用できる。It is also possible to carry out so-called continuous hitting processing to reduce the assigning order of the tone generation channels that are in a continuous hitting relationship. For example, after the processing of step D6 of the pre-assigner task is completed, a tone-generating channel in a continuous hitting relationship that produces musical tones with the same pitch in the same part is detected, and the pre-assigner pronunciation amount PLEV [GN] of the tone-generating channel number GN is detected. Is changed as follows, and the process proceeds to step D7. Note status is in continuous hit relationship with note-on tone generation channel Note status is in note-off tone generation channel Music tone generation channel Pre-assigner sound volume of channel number GN PLEV [GN] is set to 1/10, all tone sounds If the note status of the generation channel is Note Off, the pre-assigner pronunciation amount PLEV [GN] of the tone generation channel number GN of the tone generation channels of the tone generation channels that are related to repeated hits excluding the pre-assigner pronunciation amount PLEV [GN] of the largest tone generation channel number GN Change to 1/10. In this embodiment, an example of multitask processing is shown, but single task processing may be used. Further, although the assign order is set in advance and the pre-assign process is performed according to the set assign order, the general process of selecting the tone generation channel to which a new tone is assigned each time the note-on information is received may be used. The present invention is, in addition to an electronic musical instrument having a keyboard portion, a so-called musical tone generating device that generates musical tones based on performance information received from another electronic musical instrument having no keyboard portion, such as an automatic musical instrument, or an automatic rhythm. Can also be applied to.
【0067】[0067]
【発明の効果】以上に説明したように、本発明によれ
ば、連打入力された楽音を発音するにあたって演奏表現
上の違和感が生じることを軽減できる。As described above, according to the present invention, it is possible to reduce the occurrence of a feeling of strangeness in performance expression when a musical tone that is repeatedly input is pronounced.
【図1】本発明の一実施例としての連打処理装置が適用
される電子楽器の全体構成図である。FIG. 1 is an overall configuration diagram of an electronic musical instrument to which a continuous striking processing apparatus as an embodiment of the present invention is applied.
【図2】ノートマップを示す図である。FIG. 2 is a diagram showing a note map.
【図3】エンベロープ管理マップを示す図である。FIG. 3 is a diagram showing an envelope management map.
【図4】タスク管理マップを示す図である。FIG. 4 is a diagram showing a task management map.
【図5】楽音発生チャネル管理マップを示す図である。FIG. 5 is a diagram showing a tone generation channel management map.
【図6】リセットルーチンを示す流れ図である。FIG. 6 is a flowchart showing a reset routine.
【図7】イベント待ちモニタコールルーチンを示す流れ
図である。FIG. 7 is a flowchart showing an event wait monitor call routine.
【図8】イベント発生モニタコールルーチンを示す流れ
図である。FIG. 8 is a flowchart showing an event occurrence monitor call routine.
【図9】タイマ割込み処理ルーチンを示す流れ図であ
る。FIG. 9 is a flowchart showing a timer interrupt processing routine.
【図10】キーデータ受信割込み処理ルーチンを示す流
れ図である。FIG. 10 is a flowchart showing a key data reception interrupt processing routine.
【図11】キーデータ受信タスクを示す流れ図である。FIG. 11 is a flowchart showing a key data reception task.
【図12】メインアサイナタスクを示す流れ図である。FIG. 12 is a flowchart showing a main assigner task.
【図13】発音タスクの半分を示す流れ図である。FIG. 13 is a flowchart showing half of the pronunciation task.
【図14】発音タスクの残り半分を示す流れ図である。FIG. 14 is a flowchart showing the other half of the pronunciation task.
【図15】プリアサイナタスクを示す流れ図である。FIG. 15 is a flowchart showing a pre-assigner task.
【図16】エンベロープタスクを示す流れ図である。FIG. 16 is a flowchart showing an envelope task.
【図17】連打発音統合処理ルーチンを示す流れ図であ
る。FIG. 17 is a flow chart showing a continuous tapping sound integration processing routine.
【図18】操作子タスクを示す流れ図である。FIG. 18 is a flowchart showing an operator task.
20 鍵盤部 21 バス 22 中央処理装置(CPU) 23 操作子群 24 ペダル群 25 ROM(読出し専用メモリ) 26 RAM(ランダムアクセスメモリ) 27 タイマ 28 操作子検出回路 29 ペダル検出回路 30 楽音発生回路 31 増幅器 32 スピーカ 20 keyboard 21 bus 22 Central Processing Unit (CPU) 23 Operator group 24 pedals 25 ROM (read-only memory) 26 RAM (random access memory) 27 timers 28 Operator detection circuit 29 Pedal detection circuit 30 tone generation circuit 31 Amplifier 32 speakers
─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───
【手続補正書】[Procedure amendment]
【提出日】平成3年11月5日[Submission date] November 5, 1991
【手続補正1】[Procedure Amendment 1]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0035[Correction target item name] 0035
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0035】リセットルーチン(図6)
電源の投入時などにおいてリセットがかかると実行され
るルーチンである。各ステップZA1〜ZA3において
の処理は、次の通りである。
〔ZA1〕 タスク管理マップにおける全てのタスク番
号のステータスを“1:レディ”に設定し、またタイマ
処理要求フラグ、待ちイベント値およびイベント発生フ
ラグを“0”に設定する。さらに、初期設定完了フラグ
IEDFを“0:初期設定未完了”に設定するなどの初期設
定を行う。
〔ZA2〕 要求元タスク番号NSTKを“1:キーデータ
受信タスク”に更新するとともに、タスク管理マップに
おけるタスク番号“1:キーデータ受信タスク”のステ
ータスを“0:ラン”に設定する。
〔ZA3〕 キーデータ受信タスクを実行する。 Reset Routine (FIG. 6) This routine is executed when a reset is applied when the power is turned on. The processing in each step ZA1 to ZA3 is as follows. [ZA1] The statuses of all task numbers in the task management map are set to "1: ready", and the timer processing request flag, the wait event value, and the event occurrence flag are set to "0". In addition, the initialization completion flag
Make the initial settings such as setting IEDF to “0: Incomplete initial settings”. [ZA2] The request source task number NSTK is updated to "1: key data reception task", and the status of the task number "1: key data reception task" in the task management map is set to "0: run". [ZA3] The key data reception task is executed.
【手続補正2】[Procedure Amendment 2]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0044[Correction target item name] 0044
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0044】キーデータ受信タスク(図11)
キーデータ受信イベントが発生すると、鍵操作検出回路
からキーデータを読み込み、アサイン要求イベントを発
生するタスクである。各ステップA1〜A7においての
処理は、次の通りである。
〔A1〕 ノートマップをクリヤするとともに、当該キ
ーデータ受信タスクで占有する変数などを初期値に設定
する。
〔A2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。キーデータ受信イベン
トが発生すると、次のステップA3に進む。
〔A3〕 タスク管理マップにおけるタスク番号“1:
キーデータ受信タスク”の第1イベント発生フラグを
“0”に、待ちイベント値を“0”に設定する。
〔A4〕 鍵操作検出回路からキーデータを読み込み、
このキーデータのノート番号、ノートステータスおよび
ノートベロシティを各対応するところのノート番号NTN
M、ノートステータスNTSTおよびベロシティNTVLとす
る。
〔A5〕 ノートステータスNTSTが“1:押鍵”である
か否かを判断する。このノートステータスNTSTが“1”
でない場合には次のステップA6に進み、“1”である
場合にはステップA7に進む。
〔A6〕 離鍵処理
まず、ノートマップにおけるノート番号NTNMに対応する
ノート番号のノートステータスを“0”に設定し、ステ
ップA2に戻る。
〔A7〕 押鍵処理
まず、ノートマップにおけるノート番号NTNMに対応する
ノート番号のノートステータスを“1”に設定する。次
に、アサイン要求イベントを発生する。言い換えれば、
要求先タスク番号NDTKを“2:メインアサイナタスク”
に、要求先イベント値NDETを“1”に設定してイベント
発生モニタコールを行う。そして、ステップA2に戻
る。 Key data receiving task (FIG. 11) When a key data receiving event occurs, the key data is read from the key operation detecting circuit and an assignment request event is generated. The processing in each of the steps A1 to A7 is as follows. [A1] Clear the note map and set variables and the like occupied by the key data receiving task to initial values. [A2] The request source event value NSET is set to "1" and an event wait monitor call is made. When the key data reception event occurs, the process proceeds to the next step A3. [A3] Task number “1:” in the task management map
Set the first event occurrence flag of "Key data reception task"
Set the wait event value to "0" and "0". [A4] Read the key data from the key operation detection circuit,
The note number, note status and note velocity of this key data corresponds to the note number NTN
M, note status NTST and velocity NTVL. [A5] It is determined whether or not the note status NTST is "1: key depression". This note status NTST is "1"
If not, the process proceeds to the next step A6, and if it is "1", the process proceeds to step A7. [A6] Key Release Process First, the note status of the note number corresponding to the note number NTNM in the note map is set to "0", and the process returns to step A2. [A7] Key Depressing Process First, the note status of the note number corresponding to the note number NTNM in the note map is set to "1". Next, an assign request event is generated. In other words,
Requested task number NDTK is "2: Main assigner task"
Then, the requested event value NDET is set to "1" and an event occurrence monitor call is made. Then, the process returns to step A2.
【手続補正3】[Procedure 3]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0045[Name of item to be corrected] 0045
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0045】メインアサイナタスク(図12)
アサイン要求イベントが発生すると、後述するプリアサ
イナタスクで設定するアサイン順位に基づいて、楽音発
生チャネル管理マップの所定の領域にノート番号NTNMな
どを書き込み、発音要求イベントを発生するタスクであ
る。各ステップB1〜B7においての処理は、次の通り
である。
〔B1〕 楽音発生チャネル管理マップをクリヤすると
ともに、このメインアサイナタスクで占有する変数など
を初期値に設定する。また、第Nアサイン順位楽音発生
チャネル番号MASS[N] (Nは0,1,〜15)を各対応する
“N( =0,1,〜15) ”に設定する。また、対象アサイン
順位TASNを“0”に、割当て可能楽音発生チャネル数GA
CNを最大数の“16”に設定する。
〔B2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、アサイン要求イ
ベントが発生すると、次のステップB3に進む。
〔B3〕 タスク管理マップにおけるタスク番号“2:
メインアサインタスク”の待ちイベント値を“0”に、
第1イベント発生フラグを“0”に設定する。
〔B4〕 対象アサイン順位TASNが割当て可能楽音発生
チャネル数GACN未満であるか否かを判断する。この対象
アサイン順位TASNが割当て可能楽音発生チャネル数GACN
未満でない場合には、割当てるべき楽音発生チャネルが
最早やないためにステップB2に戻る。
〔B5〕 ステップB4における判断において対象アサ
イン順位TASNが割当て可能楽音発生チャネル数GACN未満
である場合、楽音発生チャネル管理マップにおけるアサ
イン順位TASNの楽音発生チャネル番号MASS[TASN]に対応
する楽音発生チャネル番号の処理待ちフラグ1、処理待
ちフラグ2および処理待ちフラグ3を“1:処理待ち
中”に、ノート番号をノート番号NTNMに、ノートステー
タスを“1”に、べロシティをベロシティNTVLに設定す
る。またメインアサイナ処理中フラグMAEFを“1:メイ
ンアサイナ処理中”に設定する。
〔B6〕 発音要求イベントを発生する。言い換えれ
ば、要求先タスク番号NDTKを“3:発音タスク”に、要
求先イベント値NDETを“2”に設定してイベント発生モ
ニタコールを行う。
〔B7〕 対象アサイン順位TASNを“1”だけインクリ
メントしてステップB2に戻る。 Main assigner task (Fig. 12) When an assign request event occurs, note number NTNM is written in a predetermined area of the tone generation channel management map based on the assign order set in the pre-assigner task, which will be described later. It is a task that generates a request event. The processing in each of the steps B1 to B7 is as follows. [B1] Clear the tone generation channel management map and set the variables occupied by this main assigner task to initial values. Further, the N-th assigned musical tone generation channel number MASS [N] (N is 0, 1, to 15) is set to each corresponding "N (= 0, 1, to 15)". In addition, the target assignment order TASN is set to "0", and the number of assignable tone generation channels GA
Set CN to the maximum number of "16". [B2] The request source event value NSET is set to "1" and an event wait monitor call is made. When an assign request event occurs, the process proceeds to the next step B3. [B3] Task number “2: in task management map”
Set the wait event value of " main assigned task" to "0",
The first event occurrence flag is set to "0". [B4] It is determined whether or not the target assignment order TASN is less than the number of allocatable musical sound generation channels GACN. This target assignment order TASN can be assigned Number of musical sound generation channels GACN
If it is not less than this, the tone generation channel to be assigned is no longer present, and the process returns to step B2. [B5] If the target assignment order TASN is less than the allocatable tone generation channel number GACN in the determination in step B4, the tone generation channel number corresponding to the tone generation channel number MASS [TASN] of the assignment order TASN in the tone generation channel management map. The processing wait flag 1, the processing wait flag 2, and the processing wait flag 3 are set to "1: waiting for processing", the note number to the note number NTNM, the note status to "1", and the velocity to the velocity NTVL. Further, the main assigner processing flag MAEF is set to "1: main assigner processing". [B6] A sounding request event is generated. In other words, the request generation task number NDTK is set to "3: sounding task" and the request destination event value NDET is set to "2" to make an event occurrence monitor call. [B7] The target assignment order TASN is incremented by "1" and the process returns to step B2.
【手続補正4】[Procedure amendment 4]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0046[Correction target item name] 0046
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0046】発音タスク(図13、図14)
発音要求イベントが発生すると新たな楽音を発生する楽
音発生チャネルにおいて前の発音が終了していない場合
には急速減衰の開始を指示し(第1処理)、またノート
番号NTNMなどに基づいて楽音発生に関するパラメータを
演算して設定し(第2処理)、さらに発音が終了してい
た、または終了した場合には楽音発生チャネルに新たな
発音を指示する(第3処理)タスクである。各ステップ
C1〜C27においての処理は、次の通りである。
〔C1〕 当該タスクで占有する変数などを初期値に設
定するとともに、急速減衰を終了した楽音発生チャネル
番号を記憶する急速減衰終了FIFOをクリヤするなど
するとともに、楽音発生回路30を初期化する。また、
第3タスクタイマカウンタ値TCNE[3] と、第3タスク時
間間隔TCND[3] とを“0”に設定するとともに、タスク
管理マップにおけるタスク番号“3:発音タスク”のタ
イマ処理要求フラグを“1:要求有り”に設定する。
〔C2〕 要求元イベント値NSETを“2”に設定してイ
ベント待ちモニタコールを行う。なお、発音要求イベン
トが発生すると、次のステップC3に進む。
〔C3〕 まず、タスク管理マップにおけるタスク番号
“3:発音タスク”の待ちイベント値を“0”に、第2
イベント発生フラグを“0”に設定して、次に発音処理
対象楽音発生チャネル番号GCTNを“0”に設定する。
〔C4〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1が“1:処理待ち中”で
あるか否かを判断する。この処理待ちフラグ1が“1”
である場合には次のステップC5に進み、“1”でなく
て第1処理(ステップC5〜C7)が不要である場合に
はステップC8に進む。
〔C5〕 エンベロープ管理マップにおける発音処理対
象楽音発生チャネル番号GCTNに対応するエンベロープチ
ャネル番号のエンベロープレベルが“0”であるか否か
を判断する。このエンベロープレベルが“0”でない場
合には次のステップC6に進み、“0”で急速減衰処理
が不要である場合にはステップC7に進む。 Pronunciation task (FIGS. 13 and 14) A new tone is generated when a tone generation request event occurs. If the previous tone generation is not finished in the tone generation channel, the start of rapid attenuation is instructed (first process). ), And calculates and sets the tone generation parameter based on the note number NTNM and the like (second process), and when the tone generation is completed, or when it is terminated, a new tone generation is instructed to the tone generation channel. (Third processing) This is a task. The processing in steps C1 to C27 is as follows. [C1] The variables occupied by the task are set to initial values, the rapid decay end FIFO storing the tone generation channel number for which rapid decay is finished is cleared, and the tone generation circuit 30 is initialized. Also,
The third task timer counter value TCNE [3] and the third task time interval TCND [3] are set to "0", and the timer processing request flag of the task number "3: sounding task" in the task management map is set to " 1: Requested ”is set. [C2] The request source event value NSET is set to "2" and an event wait monitor call is performed. When a sound generation request event occurs, the process proceeds to the next step C3. [C3] First, the wait event value of the task number "3: sounding task" in the task management map is set to "0", and the second
The event generation flag is set to "0", and then the tone generation target tone generation channel number GCTN is set to "0". [C4] It is determined whether or not the processing wait flag 1 of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is "1: waiting for processing". This processing wait flag 1 is "1"
If it is, the process proceeds to the next step C5, and if it is not "1" and the first process (steps C5 to C7) is unnecessary, the process proceeds to step C8. [C5] It is determined whether or not the envelope level of the envelope channel number corresponding to the tone generation target tone generation channel number GCTN in the envelope management map is "0". If the envelope level is not "0", the process proceeds to the next step C6, and if "0" does not require the rapid attenuation process, the process proceeds to step C7.
【手続補正5】[Procedure Amendment 5]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0047[Correction target item name] 0047
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0047】〔C6〕 楽音発生チャネル管理マップに
おける発音処理対象楽音発生チャネル番号GCTNに対応す
る楽音発生チャネル番号の急速減衰中フラグを“1:急
速減衰中”に、発音量を急速減衰中を示す“FFFF
H" に設定するとともに、対応する楽音発生チャネルに
急速減衰を指示する。なお、急速減衰の指示に際しては
目標値を“0”に、レートを急速減衰用のレートに設定
して対応する楽音発生チャネルに転送する。
〔C7〕 楽音発生チャネル管理マップにおける発音処
理対象楽音発生チャネル番号GCTNに対応する楽音発生チ
ャネル番号の処理待ちフラグ1を“0”に設定する。
〔C8〕 発音処理対象楽音発生チャネル番号GCTNが
“15”未満であるか否かを判断する。この楽音処理対
象楽音発生チャネル番号GCTNが“15”未満である場合
には次のステップC9に進み、“15”未満でなくて全
ての楽音発生チャネルについて第1処理を終えている場
合にはステップC10に進む。
〔C9〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントし、次の楽音発生チャネルの
処理の準備を行ってステップC4に戻る。
〔C10〕 発音処理対象楽音発生チャネル番号GCTNを
“0”に設定する。
〔C11〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の処理待ちフラグ2が“1:処理待ち中”
であるか否かを判断する。この処理待ちフラグ2が
“1”である場合には次のステップC12に進み、
“1”でなくて第2処理(ステップC12)が不要であ
る場合にはステップC13に進む。
〔C12〕 発音処理対象楽音発生チャネル番号GCTNに
対応する楽音発生チャネルの、楽音の発生と楽音のエン
ベロープ生成とに関する各種パラメータの値を、楽音発
生チャネル管理マップにおける発音処理対象楽音発生チ
ャネル番号GCTNに対応する楽音発生チャネル番号のノー
ト番号、ベロシティおよび後述する操作子データ受信タ
スクのステップG4において設定される音色パラメータ
群より演算して、これら演算された各種パラメータの値
を、楽音発生チャネル管理マップにおける発音処理対象
楽音発生チャネル番号GCTNに対応する楽音発生チャネル
番号の楽音発生パラメータ群およびエンベロープ管理マ
ップにおける発音処理対象楽音発生チャネル番号GCTNに
対応するエンベロープチャネル番号のエンベロープ生成
パラメータ群の対応するパラメータに設定する。同時
に、処理待ちフラグ2を“0”に設定する。[C6] The rapid decay flag of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is set to "1: rapid decay" to indicate that the tone generation amount is rapidly decayed. "FFFF
Set to H "and instruct the corresponding tone generation channel to perform rapid attenuation. When instructing rapid attenuation, set the target value to" 0 "and set the rate to the rapid attenuation rate to generate the corresponding tone. Transfer to the channel [C7] Set the processing wait flag 1 of the tone generation channel number corresponding to the tone generation channel number GCTN of the tone generation channel management map to " 0". It is determined whether or not the channel number GCTN is less than “15.” If this tone generation channel number GCTN for musical tone processing is less than “15”, the process proceeds to the next step C9, and is not less than “15”. If the first processing has been completed for all tone generation channels, the process proceeds to step C10 [C9] The tone generation target tone generation channel number GCTN is set to "1". And prepares for the processing of the next tone generation channel and returns to step C4 [C10] Sets the tone generation target tone generation channel number GCTN to "0" [C11] Sound generation process in the tone generation channel management map The processing wait flag 2 of the tone generation channel number corresponding to the target tone generation channel number GCTN is "1: waiting for processing"
Or not. If the processing wait flag 2 is "1", the process proceeds to the next step C12,
If it is not "1" and the second process (step C12) is unnecessary, the process proceeds to step C13. [C12] The values of various parameters relating to the generation of musical tones and the envelope generation of musical tones of the musical tone generation channel corresponding to the musical tone generation channel number GCTN to be pronounced are set to the musical tone generation channel number GCTN to be pronounced in the musical tone generation channel management map The note number and velocity of the corresponding tone generation channel number and the tone color parameter group set in step G4 of the operator data reception task described later are calculated, and the values of the various calculated parameters are set in the tone generation channel management map. Corresponding to the tone generation parameter group of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN and the envelope generation parameter group of the envelope channel number corresponding to the tone generation target tone generation channel number GCTN in the envelope management map To set the parameters. At the same time, the processing wait flag 2 is set to " 0".
【手続補正6】[Procedure correction 6]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0048[Correction target item name] 0048
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0048】〔C13〕 発音処理対象楽音発生チャネ
ル番号GCTNが“15”未満であるか否かを判断する。こ
の発音処理対象楽音発生チャネル番号GCTNが“15”未
満である場合には次のステップC14に進み、“15”
未満でない場合にはステップC15に進む。
〔C14〕 発音処理対象楽音発生チャネル番号GCTNを
“1”だけインクリメントしてステップC11に戻る。
〔C15〕 急速減衰未了フラグTDNFを“0”に、発音
処理対象楽音発生チャネル番号GCTNを“0”に設定す
る。
〔C16〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の処理待ちフラグ3が“1:処理待ち中”
であるか否かを判断する。この処理待ちフラグ3が
“1”である場合には次のステップC17に進み、
“1”でなくて第3処理(ステップC17,C18,C
21)が不要である場合にはステップC19に進む。
〔C17〕 楽音発生チャネル管理マップにおける発音
処理対象楽音発生チャネル番号GCTNに対応する楽音発生
チャネル番号の急速減衰中フラグが“1:急速減衰中”
であるか否かを判断する。この急速減衰中フラグが
“1”でない場合には次のステップC18に進み、
“1”である場合には割当てるべき楽音発生チャネルに
おける従前に割当てられていた楽音の発音がいまだ終了
していないために、ステップC21に進む。[C13] It is determined whether or not the tone generation target tone generation channel number GCTN is less than "15". If the tone generation channel number GCTN to be sounded is less than "15", the process proceeds to the next step C14, and is "15".
If it is not less than, it proceeds to step C15. [C14] The tone generation channel number GCTN to be sounded is incremented by "1" and the process returns to step C11. [C15] The rapid attenuation incomplete flag TDNF is set to "0", and the tone generation target tone generation channel number GCTN is set to "0". [C16] The processing wait flag 3 of the tone generation channel number corresponding to the tone generation channel number GCTN to be sounded in the tone generation channel management map is set to "1: waiting for processing".
Or not. When the processing wait flag 3 is "1", the process proceeds to the next step C17,
Not the "1" but the third process (steps C17, C18, C
If step 21) is unnecessary, the process proceeds to step C19. [C17] The rapid decay flag of the tone generation channel number corresponding to the tone generation target tone generation channel number GCTN in the tone generation channel management map is set to "1: rapid decay"
Or not. When the rapid decay flag is not "1", the process proceeds to the next step C18,
If the value is "1", the tone generation of the tone previously assigned in the tone generation channel to be assigned has not been finished yet, so the routine proceeds to step C21.
【手続補正7】[Procedure Amendment 7]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0050[Correction target item name] 0050
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0050】〔C22〕 急速減衰未了フラグTDNFが
“1:未了”であるか否かを判断する。この急速減衰未
了フラグTDNFが“1”である場合には次のステップC2
3に進み、“1”でなく全ての発音処理が終了している
場合にはステップC2に戻る。
〔C23〕 要求元イベント値NSETを“3”に設定して
イベント待ちモニタコールを行う。なお、発音要求イベ
ントまたは発音タスクに対するタイマイベントのいずれ
かが発生すると、次のステップC24に進む。
〔C24〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第2イベント発生フラグが“1”
であるか否かを判断する。この第2イベント発生フラグ
が“1”でない場合には次のステップC25に進み、
“1”である場合には発音要求イベントの発生であるた
めに、ステップC3に戻る。
〔C25〕 タスク管理マップにおけるタスク番号
“3:発音タスク”の第1イベント発生フラグが“1”
であるタイマイベントの発生であるために、タスク管理
マップにおけるタスク番号“3:発音タスク”の待ちイ
ベント値を“0”に、第1イベント発生フラグを“0”
に設定する。
〔C26〕 楽音発生回路30に設けられている急速減
衰終了FIFOが“空”であるか否か判断する。この急
速減衰終了FIFOが“空”である場合にはステップC
23に戻り、“空”でない場合には次のステップC27
に進む。
〔C27〕 急速減衰終了FIFOから急速減衰処理に
よりエンベロープレベルが“0”になった楽音発生チャ
ネルの楽音発生チャネル番号を順次に降ろし、この降ろ
した楽音発生チャネル番号に対応する楽音発生チャネル
管理マップにおける楽音発生チャネル番号の急速減衰中
フラグを“0”に設定する。そして、ステップC15に
戻る。[C22] It is determined whether or not the rapid decay incomplete flag TDNF is "1: incomplete". When the rapid decay incomplete flag TDNF is "1", the next step C2
If it is not "1" and all tone generation processing has been completed, the procedure returns to step C2. [C23] The request source event value NSET is set to "3" and an event wait monitor call is performed. When either the sound generation request event or the timer event for the sound generation task occurs, the process proceeds to the next step C24. [C24] The second event occurrence flag of the task number "3: Sounding task" in the task management map is "1".
Or not. When the second event occurrence flag is not "1", the process proceeds to the next step C25,
If it is "1", it means that a sound generation request event has occurred, and therefore the process returns to step C3. [C25] The first event occurrence flag of the task number “3: Sounding task” in the task management map is “1”
For the occurrence of a timer event is, the task number in task management map: wait event value of "3 pronunciation task""0", the first event occurrence flag "0"
Set to. [C26] It is determined whether or not the rapid attenuation end FIFO provided in the musical sound generating circuit 30 is “empty”. If this rapid decay end FIFO is "empty", step C
23, and if it is not "empty", the next step C27
Proceed to. [C27] The tone generation channel numbers of the tone generation channels whose envelope levels have become “0” by the rapid decay processing are sequentially lowered from the rapid decay end FIFO, and the tone generation channel management map corresponding to the lowered tone generation channel management map The rapid decay flag of the tone generation channel number is set to "0". Then, the process returns to step C15.
【手続補正8】[Procedure Amendment 8]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0051[Correction target item name] 0051
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0051】プリアサイナタスク(図15)
プリアサイナタスクに対応するタイマイベントが発生す
ると実行を開始し、発音量に基づいてアサイン順位を更
新するタスクである。各ステップD1〜D12において
の処理は、次の通りである。
〔D1〕 エンベロープ管理マップをクリヤするととも
に、このプリアサイナタスクで占有する変数などを初期
値に設定する。また、第4タスクタイマカウンタ値TCNE
[4] を“5”に、第4タスク時間間隔TCND[4] を“4”
に設定する。さらに、タスク管理マップにおけるタスク
番号“4:プリアサイナタスク”のタイマ処理要求フラ
グを“1:要求有り”に設定する。
〔D2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、プリアサイナタ
スクに対するタイマイベントが発生すると、次のステッ
プD3に進む。
〔D3〕 タスク管理マップにおけるタスク番号“4:
プリアサイナタスク”の待ちイベント値を“0”に、第
1イベント発生フラグを“0”に設定する。
〔D4〕 第Nプリアサイン順位楽音発生チャネル番号
PASS[N]を各対応する“N( =0,1,・・・・15) ”に設定す
る。ここで、第Nプリアサイン順位楽音発生チャネル番
号PASS[N] は第Nプリアサイン順位の楽音発生チャネル
の楽音発生チャネル番号を示す。
〔D5〕 メインアサイナ処理中フラグMAEFを“0”に
設定する。
〔D6〕 発音タスクのステップC6,C18で設定さ
れて後述するエンベロープタスクのステップE15など
において更新されるところの楽音発生チャネル管理マッ
プの各楽音発生チャネル番号の発音量を、楽音発生チャ
ネル番号GNのプリアサイナ発音量PLEV[GN]とするととも
に、発音量が“8000H" 未満である楽音発生チャネ
ル(言い換えれば、いわゆるADSR表現におけるアタ
ックを終了していてかつ急速減衰中ではない楽音発生チ
ャネル)の数を調べて、プリアサイナ割当て可能楽音発
生チャネル数PACNとする。 Pre-assigner task (FIG. 15) This task starts execution when a timer event corresponding to the pre-assigner task occurs, and updates the assignment order based on the tone generation amount. The processing in each step D1 to D12 is as follows. [D1] The envelope management map is cleared and the variables occupied by this pre-assigner task are set to initial values. Also, the fourth task timer counter value TCNE
[4] is set to “5” and the fourth task time interval TCND [4] is set to “4”
Set to. Further, the timer processing request flag of the task number “4: pre-assigner task” in the task management map is set to “1: request”. [D2] The request source event value NSET is set to "1" and an event wait monitor call is made. When a timer event for the pre-assigner task occurs, the process proceeds to the next step D3. [D3] Task number “4: in task management map”
Set the waiting event value of “ Prior Signer Task” to “0”
The 1-event occurrence flag is set to "0". [D4] N-th pre-assigned order tone generation channel number
Set PASS [N] to the corresponding "N (= 0,1, ... 15)". Here, the Nth preassigned musical tone generation channel number PASS [N] indicates the musical tone generation channel number of the Nth preassigned musical tone generation channel. [D5] The main assigner processing flag MAEF is set to "0". [D6] musical tone-generating channel management map of where it is set in step C6, C18 pronunciation task is updated in <br/> such step E15 envelope tasks as described
Pronunciation of each musical tone-generating channel number-flop, with the Puriasaina sound volume PLEV tone generating channel number GN [GN], in other words the tone-generating channel sound volume is less than "8000H" (, attack in a so-called ADSR representation The number of musical sound generation channels that have ended and are not being rapidly attenuated) is determined, and the number of musical sound generation channels that can be assigned by the pre-assigner is defined as PACN.
【手続補正9】[Procedure Amendment 9]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0053[Correction target item name] 0053
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0053】エンベロープタスク(図16)
当該タスクに対するタイマイベントが発生すると実行を
開始し、各エンベロープチャネルのエンベロープレベル
および発音量を順次に更新するとともに、ノートステー
タス、ソステヌートステータス、ダンパー値およびエン
ベロープ生成パラメータに基づいて新たな目標値および
レートを演算し、楽音発生回路30の楽音発生チャネル
への転送を行うタスクである。各ステップE1〜E16
においての処理は、次の通りである。
〔E1〕 当該タスクで占有する変数などを初期値に設
定する。また、第5タスクタイマカウンタ値TCNE[5] を
“4”に、第5タスク時間間隔TCND[5] を“4”に設定
する。さらに、タスク管理マップにおけるタスク番号
“5:エンベロープタスク”のタイマ処理要求フラグを
“1:要求有り”に設定する。
〔E2〕 要求元イベント値NSETを“1”に設定してイ
ベント待ちモニタコールを行う。なお、エンベロープタ
スクタイマイベントが発生すると、次のステップE3に
進む。
〔E3〕 タスク管理マップにおけるタスク番号“5:
エンベロープタスク”の待ちイベント値を“0”に、第
1イベント発生フラグを“0”に設定するとともに、エ
ンベロープ処理対象番号ECTNを“0”に設定する。
〔E4〕 タスクロックをかける。〔E5〕 楽音発生チャネル管理マップにおけるエンベ
ロープ処理対象番号ECTNに対応する楽音発生チャネル番
号の急速減衰中フラグが“1:急速減衰中”であるか否
かを判断する。この急速減衰中フラグが“1”でない場
合には次のステップE6に進み、“1”である場合には
当該タスクによるエンベロープ処理は不要なために、ス
テップE16に進む。 〔E6〕 エンベロープ管理マップにおけるエンベロー
プ処理対象番号ECTNに対応するエンベロープチャネル番
号の目標値が“0”であり、かつそのエンベロープレベ
ルが“0”であるか否かを判断する。この目標値が
“0”でかつエンベロープレベルが“0”である場合に
は発音を終了しているために楽音発生チャネル管理マッ
プにおけるエンベロープ処理対象番号ECTNに対応する楽
音発生チャネル番号の発音量を“0”に、トランケート
禁止フラグを“0”に設定しステップE16に進み、い
ずれかが“0”でない場合には次のステップE7に進
む。 Envelope task (FIG. 16) Execution starts when a timer event for the task occurs, and the envelope level and sound level of each envelope channel are updated in sequence, and note status, sostenuto status, damper value, and envelope generation parameter are also set. Is a task of calculating a new target value and rate based on the above, and transferring the new target value and rate to the tone generation channel of the tone generation circuit 30. Steps E1 to E16
The processing in is as follows. [E1] A variable occupied by the task is set to an initial value. Further, the fifth task timer counter value TCNE [5] is set to "4" and the fifth task time interval TCND [5] is set to "4". Further, the timer processing request flag of the task number “5: envelope task” in the task management map is set to “1: request”. [E2] Set the request source event value NSET to "1" and make an event wait monitor call. When the envelope task timer event occurs, the process proceeds to the next step E3. [E3] Task number “5: in task management map”
"Wait event value of" envelope task "in the first event occurrence flag" 0 "and sets, the envelope processing target number ECTN" 0 is set to 0 ". [E4] make a task lock. [ E5] Envelope in the tone generation channel management map
The tone generation channel number corresponding to the rope processing target number ECTN
Whether the rapid decay flag of the issue is "1: Rapid decay in progress"
To judge. If this rapid decay flag is not "1"
If it is “1”, go to the next step E6
Since envelope processing by the task is not required,
Continue to Step E16. [E6] Envelope in envelope management map
Envelope channel number corresponding to the processing target number ECTN
The target value of the signal is "0" and its envelope level is
It is determined whether the rule is “0”. This target value is
When the envelope level is "0" and "0"
Is a tone generation channel management
Group corresponding to the target number ECTN for envelope processing
Truncate the sound generation channel number to "0"
Set the prohibition flag to "0" and proceed to step E16.
If the deviation is not "0", proceed to the next step E7.
Mu.
【手続補正10】[Procedure Amendment 10]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0060[Correction target item name] 0060
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0060】ペダルタスク
当該タスクに対するタイマイベントが発生すると実行を
開始して、ダンパーペダル、ソステヌートペダルなどの
ペダルの設定状態を検出するタスクである。なお、公知
技術であるために要点のみを説明する。各ステップF1
〜F4においての処理は、次の通りである。
〔F1〕 まず、新たなペダルの設定状態をペダル毎に
記憶する新ペダルマップと、前回のペダルの設定状態を
ペダル毎に記憶する旧ペダルマップと、当該タスクで占
有する変数などとを初期値に設定する。次に、第6タス
クタイマカウンタ値TCNE[6] を“11”に、第6タスク
時間間隔TCND[6] を“9”に設定する。さらに、タスク
管理マップにおけるタスク番号“6:ペダルタスク”の
タイマ処理要求フラグを“1”に設定する。
〔F2〕 要求元イベント値NSETを“1”に設定して、
イベント待ちモニタコールを行う。なお、ペダルタスク
タイマイベントが発生すると、次のステップF3に進
む。
〔F3〕 タスク管理マップにおけるタスク番号“6:
ペダルタスク”の待ちイベント値を“0”に、第1イベ
ント発生フラグを“0”に設定する。
〔F4〕 公知技術に基づいて各ペダルを所定順次に走
査して設定状態を読み込み、設定状態に変化があったか
否かを判断して変化があれば対応する処理を行う。例え
ば、ダンパーペダルの設定状態が変化していれば、新た
なダンパーの踏込み量をダンパー値DMPVとする。また、
ソステヌートペダルが踏み下げられると、ノートマップ
における各ノート番号のソステヌートステータスを対応
するノートステータスと同じになるように更新する。さ
らに、ソステヌートペダルが戻されると、ノートマップ
における各ノート番号のソステヌートステータスを
“0”に設定する。なお、変化がない場合、または対応
する処理を終了した場合にはステップF2に戻る。 Pedal task This task starts execution when a timer event for the task occurs and detects the setting state of pedals such as damper pedals and sostenuto pedals. Since this is a known technique, only the essential points will be described. Each step F1
The processing from F4 to F4 is as follows. [F1] First, a new pedal map that stores a new pedal setting state for each pedal, an old pedal map that stores the previous pedal setting state for each pedal, and variables that are occupied by the task are initialized. Set to. Next, the sixth task timer counter value TCNE [6] is set to "11" and the sixth task time interval TCND [6] is set to "9". Further, the timer processing request flag of the task number “6: Pedal task” in the task management map is set to “1”. [F2] Set the request source event value NSET to "1",
Make an event wait monitor call. When a pedal task timer event occurs, the process proceeds to the next step F3. [F3] Task number “6: in task management map”
Set the wait event value of " Pedal task" to "0"
The event generation flag is set to "0". [F4] Based on a known technique, each pedal is scanned in a predetermined sequence to read the setting state, it is determined whether or not there is a change in the setting state, and if there is a change, a corresponding process is performed. For example, if the setting state of the damper pedal has changed, the stepping amount of the new damper is set as the damper value DMPV. Also,
When the sostenuto pedal is depressed, the sostenuto status of each note number in the note map is updated to be the same as the corresponding note status. Further, when the sostenuto pedal is returned, the sostenuto status of each note number in the note map is set to "0". When there is no change or when the corresponding process is completed, the process returns to step F2.
【手続補正11】[Procedure Amendment 11]
【補正対象書類名】明細書[Document name to be amended] Statement
【補正対象項目名】0061[Correction target item name] 0061
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【0061】操作子タスク(図18)
当該タスクに対するタイマイベントが発生すると実行を
開始して、音色の選択あるいは音色に関するパラメータ
の設定などを行う操作子群23の設定状態を検出するタ
スクである。なお、公知技術であるために要点のみを説
明する。各ステップG1〜G4においての処理は、次の
通りである。
〔G1〕 まず、新たな操作子の設定状態を操作子毎に
記憶する新操作子マップと、前回の操作子の設定状態を
操作子毎に記憶する旧操作子マップと、操作子の操作に
対応して設定される各種パラメータと、この操作子タス
クで占有する変数などとを初期値に設定する。次に、第
7タスクタイマカウンタ値TCNE[7] を“12”に、第7
タスク時間間隔TCND[7] を“9”に設定する。さらに、
タスク管理マップにおけるタスク番号“7:操作子タス
ク”のタイマ処理要求フラグを“1”に設定する。
〔G2〕 要求元イベント値NSETを“1”に設定すると
ともに、初期設定完了フラグを“1”に設定してイベン
ト待ちモニタコールを行う。なお、操作子タスクタイマ
イベントが発生すると、次のステップG3に進む。
〔G3〕 タスク管理マップにおけるタスク番号“7:
操作子タスク”の待ちイベント値を“0”に、第1イベ
ント発生フラグを“0”に設定する。
〔G4〕 公知技術に基づいて各操作子を所定順次に走
査して設定状態を読み込み、設定状態に変化があったか
否かを判断して変化があれば対応する処理を行う。例え
ば、音色番号を変更した場合には音色パラメータ群を変
更する。なお、変化がない場合、または対応する処理を
終了した場合にはステップG2に戻る。 Manipulator task (FIG. 18) This task starts execution when a timer event for the task occurs, and detects the setting state of the manipulator group 23 for selecting a tone color or setting parameters relating to a tone color. Since this is a known technique, only the essential points will be described. The processing in each step G1 to G4 is as follows. [G1] First, a new manipulator map that stores a new manipulator setting state for each manipulator, an old manipulator map that stores the previous manipulator setting state for each manipulator, and an operator manipulator Various parameters that are set correspondingly and variables that are occupied by this operator task are set to initial values. Next, the seventh task timer counter value TCNE [7] is set to “12” and the seventh
Set task time interval TCND [7] to "9". further,
The timer processing request flag of the task number “7: operator task” in the task management map is set to “1”. [G2] The request source event value NSET is set to "1", the initialization completion flag is set to "1", and an event wait monitor call is performed. When an operator task timer event occurs, the process proceeds to the next step G3. [G3] Task number “7: in task management map”
The wait event value of the " operator task" is set to "0", and the first event
The event generation flag is set to "0". [G4] Based on a known technique, each operator is scanned in a predetermined sequence to read the setting state, it is determined whether or not the setting state has changed, and if there is a change, a corresponding process is performed. For example, when the tone color number is changed, the tone color parameter group is changed. When there is no change or when the corresponding process is completed, the process returns to step G2.
【手続補正12】[Procedure Amendment 12]
【補正対象書類名】図面[Document name to be corrected] Drawing
【補正対象項目名】図9[Correction target item name] Figure 9
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【図9】 [Figure 9]
【手続補正13】[Procedure Amendment 13]
【補正対象書類名】図面[Document name to be corrected] Drawing
【補正対象項目名】図16[Correction target item name] Fig. 16
【補正方法】変更[Correction method] Change
【補正内容】[Correction content]
【図16】 FIG. 16
Claims (2)
器に連打入力があった時にこれを処理する連打処理装置
であって、発音中の楽音発生チャネルのうちから連打関
係にありかつその発音の統合が可能な状態にある二以上
の楽音発生チャネルを検出する検出手段と該検出手段で
検出された二以上の楽音発生チャネルについてそのうち
の一つに他の楽音発生チャネルの発音を統合するととも
に該他の楽音発生チャネルの発音を停止する統合手段と
を備えた電子楽器の連打処理装置。1. A continuous-strike processing device for processing a continuous-stroke input to an electronic musical instrument having a plurality of musical-tone generating channels, which is in a continuous-stroke relationship among the musical-tone generating channels being sounded, and its pronunciations are integrated. Detecting means for detecting two or more tone generation channels in a state in which the above-mentioned other tone generation channels are integrated with one of the two or more tone generation channels detected by the detection means. Continuous processing device for an electronic musical instrument, which comprises an integration means for stopping the sound generation of the musical tone generation channel.
量、発音量に相応する値、あるいは発音開始からの経過
時間を調べることで統合可能な状態を判定するように構
成された請求項1記載の電子楽器の連打処理装置。2. The detection means is configured to determine an integrable state by checking a tone generation amount of a tone generation channel, a value corresponding to the tone generation amount, or an elapsed time from the start of tone generation. Electronic musical instrument continuous tap processing device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3203279A JPH056181A (en) | 1990-08-06 | 1991-07-19 | Continuous hit processing device for electronic musical instruments |
Applications Claiming Priority (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2-208654 | 1990-08-06 | ||
| JP20865490 | 1990-08-06 | ||
| JP2-223301 | 1990-08-24 | ||
| JP22330190 | 1990-08-24 | ||
| JP3203279A JPH056181A (en) | 1990-08-06 | 1991-07-19 | Continuous hit processing device for electronic musical instruments |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH056181A true JPH056181A (en) | 1993-01-14 |
Family
ID=27328214
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3203279A Pending JPH056181A (en) | 1990-08-06 | 1991-07-19 | Continuous hit processing device for electronic musical instruments |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH056181A (en) |
-
1991
- 1991-07-19 JP JP3203279A patent/JPH056181A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2002311957A (en) | Resonator, resonance method, and computer program for resonance processing | |
| JP2500489B2 (en) | Electronic musical instrument | |
| US5280129A (en) | Assigning device which assigns new musical tones to tone-generating channels based upon a successive strike relation among the channels | |
| JP3694172B2 (en) | Reverberation resonance apparatus and reverberation resonance method | |
| JP2525853B2 (en) | Continuous hit processing device for electronic musical instruments | |
| JP4258991B2 (en) | Musical sound generator and musical sound generation processing program | |
| JP3117482B2 (en) | Electronic musical instrument assigner | |
| JPH056181A (en) | Continuous hit processing device for electronic musical instruments | |
| JPH0535271A (en) | Electronic musical instrument assigner | |
| JPH0619474A (en) | Assignor of electronic musical instrument | |
| JP3235160B2 (en) | Music control device | |
| JPH05158477A (en) | Electronic musical instrument assigner | |
| JPH05150784A (en) | Assigner for electronic musical instrument | |
| JP3419563B2 (en) | Tone signal level control device | |
| JPH052392A (en) | Electronic musical instrument allocation device | |
| JP3530600B2 (en) | Frequency characteristic control apparatus and frequency characteristic control method for musical tone signal | |
| JPH05134668A (en) | Multitainba electronic musical instrument assigner | |
| JPH05150783A (en) | Assigner for electronic musical instrument | |
| JP3646611B2 (en) | Music generator | |
| JPH0580754A (en) | Electronic musical instrument | |
| JPH04218098A (en) | Assigner of multitimbre electronic musical instrument | |
| JP2715795B2 (en) | Musical sound synthesizer having pronunciation assigning means | |
| JP3087753B2 (en) | Electronic musical instrument | |
| JP3706371B2 (en) | Musical signal frequency characteristic control device and frequency characteristic control method | |
| JP3067145B2 (en) | Envelope generation control device, sound emission form control device, envelope generation control method, and sound emission form control method |