Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3246312B2 - Musical sound generating method and apparatus - Google Patents
[go: Go Back, main page]

JP3246312B2 - Musical sound generating method and apparatus - Google Patents

Musical sound generating method and apparatus

Info

Publication number
JP3246312B2
JP3246312B2 JP02332396A JP2332396A JP3246312B2 JP 3246312 B2 JP3246312 B2 JP 3246312B2 JP 02332396 A JP02332396 A JP 02332396A JP 2332396 A JP2332396 A JP 2332396A JP 3246312 B2 JP3246312 B2 JP 3246312B2
Authority
JP
Japan
Prior art keywords
waveform
data
waveform data
tone
generating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP02332396A
Other languages
Japanese (ja)
Other versions
JPH09146556A (en
Inventor
元一 田邑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP02332396A priority Critical patent/JP3246312B2/en
Priority to EP96107770A priority patent/EP0743631B1/en
Priority to DE69619587T priority patent/DE69619587T2/en
Priority to CN 200510116175 priority patent/CN1763838B/en
Priority to US08/649,168 priority patent/US5895877A/en
Priority to CN 200510116176 priority patent/CN1763839B/en
Priority to CNB031251706A priority patent/CN100495532C/en
Priority to CN96100281A priority patent/CN1129110C/en
Priority to KR1019960016767A priority patent/KR100421589B1/en
Publication of JPH09146556A publication Critical patent/JPH09146556A/en
Priority to US09/222,395 priority patent/US6184455B1/en
Application granted granted Critical
Publication of JP3246312B2 publication Critical patent/JP3246312B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、CPUやDSPな
どのプログラマブルな演算装置上において、楽音生成プ
ログラムを実行することにより楽音波形を生成する、楽
音発生方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a musical sound generating method for generating a musical sound waveform by executing a musical sound generating program on a programmable arithmetic device such as a CPU or a DSP.

【0002】[0002]

【従来の技術】従来の楽音発生装置は、通常、MIDI
(Musical Instrument Digital Interface)、鍵盤ある
いはシーケンサなどからの演奏情報を入力する演奏入力
部、楽音波形を発生する音源部、入力された演奏情報に
応じて前記音源部を制御する中央処理装置(CPU)な
どから構成されていた。ここで、CPUは、入力された
演奏情報に応じて、チャンネルアサイン、パラメータ変
換などの音源ドライバ処理(演奏処理)を実行し、音源
部の割り当てたチャンネルに変換したパラメータと発音
開始指示(ノートオン)を供給する。また、音源部は供
給されたパラメータに基づいて楽音波形を生成するもの
であり、この音源部としては電子回路などのハードウエ
アが採用されていた。このため、楽音発生装置は楽音を
発生するための専用機器となってしまい、楽音を発生す
るときには専用の楽音発生装置を準備することが必要で
あった。
2. Description of the Related Art Conventional tone generators are usually MIDI.
(Musical Instrument Digital Interface), a performance input section for inputting performance information from a keyboard or a sequencer, a sound source section for generating musical tone waveforms, a central processing unit (CPU) for controlling the sound source section in accordance with the input performance information And so on. Here, the CPU executes sound source driver processing (performance processing) such as channel assignment and parameter conversion according to the input performance information, and converts the parameters converted to the channels assigned to the sound source section and the sound generation start instruction (note-on). ). The tone generator generates a musical tone waveform based on the supplied parameters, and hardware such as an electronic circuit has been employed as the tone generator. For this reason, the tone generator becomes a dedicated device for generating a tone, and it is necessary to prepare a dedicated tone generator when generating a tone.

【0003】そこで、パーソナルコンピュータなどの汎
用コンピュータにおいて、MIDIイベントなどの演奏
情報を入力データとし、対応する波形データを演算生成
するアプリケーションプログラム、いわゆるソフトウエ
ア音源を使用して楽音を生成する楽音発生方法が提案さ
れている。この音源処理を行うプログラムを使用するこ
とにより、専用の楽音発生装置を用いることなく、CP
Uとソフトウエアの他にはDA変換用のチップだけを備
えるだけで、楽音を発生させることが可能となる。
Therefore, in a general-purpose computer such as a personal computer, a musical tone generating method for generating musical tones using a so-called software sound source using an application program for calculating performance of corresponding waveform data using performance information such as MIDI events as input data. Has been proposed. By using a program that performs this sound source processing, CPs can be used without using a dedicated tone generator.
A musical tone can be generated only by providing a DA conversion chip in addition to U and software.

【0004】ところで、楽音を発生させるためには、サ
ンプリング周期、すなわち、DAC(Digtal Analog Co
nverter )における変換タイミング毎に波形サンプルを
DACに供給することが必要である。このために、従来
のソフトウエア音源においては、1サンプリング周期毎
に各発音チャンネルの楽音波形サンプルを発音チャンネ
ル分演算生成するようにしていた。したがって、CPU
は、各サンプリング周期において各発音チャンネルの演
算処理を行うときに、まず、前回の当該発音チャンネル
の演算に用いた各種のデータをメモリからレジスタに復
帰させること、および、当該波形生成演算終了後に次回
の処理のために前記レジスタの内容をメモリに退避する
ことが必要であり、本来の波形生成演算以外の処理に多
くの処理時間を必要としていた。そこで、本出願人は、
所定期間(フレーム時間)ごとに該所定期間に対応する
複数サンプルの波形データをまとめて生成演算すること
により、演算効率を向上させたソフトウエア音源による
楽音生成方法を提案している(特願平7−144159
号)。
In order to generate a musical tone, a sampling period, that is, a DAC (Digital Analog Co
It is necessary to supply a waveform sample to the DAC at each conversion timing in (nverter). For this reason, in the conventional software sound source, a musical tone waveform sample of each sounding channel is calculated and generated for each sounding channel every sampling period. Therefore, CPU
When performing the arithmetic processing of each sounding channel in each sampling period, first, various data used in the previous calculation of the sounding channel are returned from the memory to the register, and the next time after the completion of the waveform generation calculation, It is necessary to save the contents of the register to the memory for the above processing, and much processing time is required for processing other than the original waveform generation calculation. Therefore, the applicant has
A musical tone generation method using a software tone generator with improved computation efficiency by collectively generating and calculating waveform data of a plurality of samples corresponding to the predetermined period for each predetermined period (frame time) has been proposed (Japanese Patent Application No. Hei 10-214,1992). 7-144159
issue).

【0005】[0005]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のソフトウエア音源は、汎用OS(OperatingS
ystem)の上で動作するアプリケーションプログラムと
して提供されている。また、このソフトウエア音源に対
してMIDIイベントなどの演奏情報を供給するMID
Iシーケンサやゲームソフトウエアなどのソフトウエア
も、同じ汎用OSの上で動作するアプリケーションプロ
グラムである。したがって、非完全マルチタスク方式
(プリエンプティブでないマルチタスク方式)のOSの
制御下においては、実行中のタスクがOSに制御を戻さ
ない限り他のタスクは実行されないため、当該ソフトウ
エア音源が所定時間ごとに実行されないことがあり、楽
音波形サンプルをDACに1サンプリング周期毎に安定
して出力させることができない場合があった。
However, such a conventional software sound source is a general-purpose OS (Operating System).
ystem), and is provided as an application program that runs on it. An MID that supplies performance information such as MIDI events to the software sound source
Software such as I-sequencer and game software are also application programs that operate on the same general-purpose OS. Therefore, under the control of the OS of the non-perfect multitask system (multitask system which is not preemptive), other tasks are not executed unless the executing task returns control to the OS. In some cases, the tone waveform sample cannot be output stably to the DAC every sampling cycle.

【0006】また、前述したような、波形バッファ上に
複数サンプル分の波形データをまとめて演算生成して、
演算効率を向上させる方法を採用したソフトウエア音源
においては、波形再生部(DAC)からの波形生成の要
求が発生したとき、所定の期間内に速やかに波形データ
を受け渡すことが要求されるが、そのときに多数のイベ
ントが発生していたりすると、速やかに波形データの受
け渡しを行うことができなくなり、やはり、安定した楽
音の発生が困難となる。さらに、パーソナルコンピュー
タなどの汎用コンピュータにおいては音声入力用のAD
C(Analog Digital Converter)やデジタル波形入力ボ
ードなどが備えられている場合が多いが、これらからの
波形データ入力に対し、ソフトウエア音源が備えている
音色制御処理機能を施すことができなかった。
Further, as described above, waveform data for a plurality of samples are collectively calculated and generated on a waveform buffer,
In a software tone generator that adopts a method for improving computational efficiency, when a request for generating a waveform is issued from a waveform reproducing unit (DAC), it is required to promptly transfer waveform data within a predetermined period. If a large number of events occur at that time, it is not possible to immediately transfer the waveform data, and it is also difficult to generate a stable musical sound. Further, in general-purpose computers such as personal computers, AD for voice input is used.
In many cases, a C (Analog Digital Converter) or a digital waveform input board is provided, but the timbre control processing function provided in the software sound source cannot be applied to the input of waveform data from these.

【0007】さらにまた、上記したCPUにより音源処
理と演奏処理を実行する楽音発生方法において、演奏処
理とは入力した演奏情報に基づき生成される楽音を制御
するための制御情報を作成する処理であり、他方、音源
処理とは前記演奏処理により作成された制御情報に基づ
き楽音の波形データを生成する処理である。そこで、例
えば、通常は押鍵検出などの演奏処理を実行し、該演奏
処理に対して各サンプリング周期で音源処理を割り込み
実行し、1サンプル分の波形データを生成した後、演奏
処理に復帰するようにしている。
Further, in the musical tone generating method in which the CPU executes the tone generator process and the performance process, the performance process is a process of creating control information for controlling a tone generated based on the input performance information. On the other hand, the tone generator process is a process for generating waveform data of musical tones based on the control information created by the performance process. Therefore, for example, normally, performance processing such as key depression detection is executed, sound source processing is interrupted at each sampling cycle for the performance processing, waveform data for one sample is generated, and then the processing returns to the performance processing. Like that.

【0008】演奏情報(MIDIイベント)は、演奏者
の演奏操作やシーケンサでのイベントの再生により発生
し、該演奏情報が発生した場合には前記演奏処理により
処理される。つまり、演奏情報の発生した時点では、C
PUは通常の音源処理に加えて演奏処理を実行しなけれ
ばならないため、非定期的に発生する演奏情報により演
算量が一時的に増加することになる。しかしながら、従
来の楽音発生方法においてはこれに対応しておらず、音
源処理は演奏情報のあるなしに関わらず定期的に優先実
行され、場合によっては演奏処理が遅れてしまうことが
あった。なお、このような演奏処理の遅れを防止するた
めに、逆に演奏処理の優先度を上げることが考えられる
が、このようにすると今度は、一時的に発音数が減少し
たり、あるいは、楽音波形が途切れてしまうなど、音源
処理の動作が不安定になるという問題が発生することに
なる。
The performance information (MIDI event) is generated by a performance operation of a player or the reproduction of an event by a sequencer. When the performance information is generated, the performance information is processed by the performance processing. That is, when the performance information is generated, C
Since the PU must perform the performance process in addition to the normal sound source process, the amount of calculation temporarily increases due to the performance information generated irregularly. However, the conventional tone generation method does not support this, and the sound source processing is periodically executed with priority regardless of the presence or absence of the performance information, and the performance processing may be delayed in some cases. In order to prevent such a delay in the performance processing, it is conceivable to raise the priority of the performance processing. However, in this case, the number of sounds temporarily decreases, or This causes a problem that the operation of the sound source processing becomes unstable, for example, the waveform is interrupted.

【0009】そこで、本発明は、波形生成演算を安定し
て実行することができ、また、波形再生部から波形要求
があったときに速やかに波形データを出力することがで
き、さらに、入力された波形データをソフトウエア音源
の一連の処理の途中に供給して音色制御処理を行うこと
ができる楽音発生方法を提供することを目的とする。ま
た、演奏情報が発生した時点で処理が増加しても、安定
した音源処理を行うことを目的としている。さらにま
た、波形生成のための演算量を可能な限り少なくするこ
とを目的としている。
Therefore, according to the present invention, it is possible to stably execute a waveform generation operation, to output waveform data promptly when a waveform is requested from a waveform reproducing unit, and to input and output waveform data. It is an object of the present invention to provide a musical tone generation method capable of performing tone color control processing by supplying the generated waveform data in the middle of a series of processing of a software tone generator. It is another object of the present invention to perform stable sound source processing even if the processing is increased when performance information is generated. Still another object of the present invention is to minimize the amount of calculation for generating a waveform.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明の楽音発生方法は、(1)所定のオペレーテ
ィングシステムを実行するシステムステップ、(2)前
記所定のオペレーティングシステム上で実行されるアプ
リケーションプログラムからの指示に基づいて、複数の
サンプリング周期にわたる所定期間に対応する複数サン
プルの波形データを演算生成する波形生成ステップ、
(3)前記波形生成ステップにおいて演算生成された波
形データをサンプリング周期毎に1サンプルずつ出力す
る出力ステップ、および、(4)前記所定期間内に、前
記出力ステップからの要求に応じて前記システムステッ
プと前記波形生成ステップとの間でタスク切換を行う制
御ステップを含むことを特徴とする、演算装置において
実行される楽音発生方法である。また、本発明の他の楽
音発生方法は、(1)所定のオペレーティングシステム
を実行するシステムステップ、(2)前記所定のオペレ
ーティングシステム上で実行されるアプリケーションプ
ログラムからの指示に基づいて、複数のサンプリング周
期にわたる所定期間に対応する複数サンプルの波形デー
タを演算生成する波形生成ステップ、(3)前記波形生
成ステップにおいて演算生成された波形データをサンプ
リング周期毎に1サンプルずつ出力する出力ステップ、
および、(4)前記所定期間内に、前記出力ステップか
らの要求に応じて前記システムステップと前記波形生成
ステップとの間でタスク切換を行う制御ステップを含
み、前記波形生成ステップは、前記複数サンプルの波形
データを演算生成するときに、それに用いる楽音制御パ
ラメータの更新処理を複数の波形サンプルを生成する毎
に実行するようになされていることを特徴とする、演算
装置において実行される楽音発生方法である。さらに、
本発明のさらに他の楽音発生方法は、(1)演奏情報を
入力する入力ステップ、(2)複数のサンプリング周期
にわたる所定期間内に入力された前記演奏情報に基づい
て、該所定期間に対応する複数サンプルの波形データを
演算生成する波形生成ステップ、(3)波形データをサ
ンプリング周期毎に1サンプルずつ出力する出力ステッ
プ、(4)前記波形生成ステップにおいて演算生成され
た前記複数サンプルの波形データを、前記出力ステップ
に受け渡しする受け渡しステップ、および、(5)前記
出力ステップに受け渡された波形データの出力が進行し
たことを検出して、波形データの受け渡しを要求する要
求ステップを含み、前記波形生成ステップは、前記複数
サンプルの波形データを演算生成するときに、それに用
いる楽音制御パラメータの更新処理を複数の波形サンプ
ルを生成する毎に実行するようになされており、また、
前記要求ステップからの要求に応じて、前記受け渡しス
テップが実行され、その後に前記波形生成ステップが実
行されることを特徴とする、演算装置において実行され
る楽音発生方法である。
In order to achieve the above object, a musical tone generating method according to the present invention comprises: (1) a system step for executing a predetermined operating system; and (2) a system step for executing the predetermined operating system. A waveform generating step of calculating and generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods, based on an instruction from the application program.
(3) an output step of outputting the waveform data calculated and generated in the waveform generation step one sample at a time for each sampling period; and (4) the system step in response to a request from the output step within the predetermined period. And a control step of performing task switching between the waveform generation step and the waveform generation step. Further, another musical sound generating method of the present invention includes: (1) a system step of executing a predetermined operating system; and (2) a plurality of sampling steps based on an instruction from an application program executed on the predetermined operating system. A waveform generation step of calculating and generating waveform data of a plurality of samples corresponding to a predetermined period over a cycle; (3) an output step of outputting the waveform data calculated and generated in the waveform generation step one sample at a time in each sampling cycle;
And (4) a control step of performing task switching between the system step and the waveform generation step in response to a request from the output step within the predetermined period, wherein the waveform generation step includes: A method of generating a musical tone performed by an arithmetic device, wherein, when calculating and generating the waveform data, an update process of a musical tone control parameter used for the waveform data is performed every time a plurality of waveform samples are generated. It is. further,
According to still another musical tone generating method of the present invention, (1) an input step of inputting performance information, and (2) a performance period corresponding to the predetermined period based on the performance information input within a predetermined period over a plurality of sampling periods. A waveform generating step of calculating and generating waveform data of a plurality of samples; (3) an output step of outputting waveform data one sample at a time in each sampling cycle; and (4) a waveform data of the plurality of samples calculated and generated in the waveform generating step. A delivery step of delivering the waveform data to the output step; and (5) a request step of requesting the delivery of the waveform data by detecting that the output of the waveform data passed to the output step has progressed, The generating step includes, when calculating and generating the waveform data of the plurality of samples, a tone control parameter used for the calculation. Being adapted to perform the update processing of the over data each time to generate a plurality of waveform samples, also,
A musical tone generating method executed in an arithmetic unit, wherein the delivering step is executed in response to a request from the requesting step, and thereafter the waveform generating step is executed.

【0011】[0011]

【0012】[0012]

【0013】さらにまた、本発明のさらに他の楽音発生
方法は、(1)演奏情報を入力する入力ステップ、
(2)複数のサンプリング周期にわたる所定期間内に入
力された前記演奏情報に基づいて、該所定期間に対応す
る複数サンプルの波形データを演算生成する波形生成ス
テップ、(3)前記所定期間に対応する複数サンプルの
外部波形データを入力して、前記波形生成ステップにお
いて演算生成された前記複数サンプルの波形データと合
成する波形合成ステップ、(4)前記波形合成ステップ
において合成された波形データに対して信号処理を施す
波形処理ステップ、および、(5)前記波形処理ステッ
プにおいて信号処理が施された波形データをサンプリン
グ周期毎に1サンプルずつ出力する出力ステップを含
み、前記波形生成ステップは、前記複数サンプルの波形
データを演算生成するときに、それに用いる楽音制御パ
ラメータの更新処理を複数の波形サンプルを生成する毎
に実行するようになされていることを特徴とする、演算
装置において実行される楽音発生方法である。さらにま
た、本発明のさらに他の楽音発生方法は、(1)演奏情
報を入力する入力ステップ、(2)複数のサンプリング
周期にわたる所定期間内に入力された前記演奏情報に基
づいて、該所定期間に対応する複数サンプルの波形デー
タを演算生成する波形生成ステップ、および、(3)前
記波形生成ステップにおいて演算生成された波形データ
をサンプリング周期毎に1サンプルずつ出力する出力ス
テップを含み、前記波形生成ステップは、前記複数サン
プルの波形データを演算生成するときに、それに用いる
楽音制御パラメータの更新処理を複数の波形サンプルを
生成する毎に実行するようになされていることを特徴と
する、演算装置において実行される楽音発生方法であ
る。さらにまた、本発明のさらに他の楽音発生方法は、
1または複数の指定された楽音を発生するための1また
は複数の演奏情報を受け取る第1のステップと、前記演
奏情報に応答して、各指定された楽音を複数の発音チャ
ンネルのうちの各1つに割り当て、該指定された楽音に
対応する楽音制御パラメータを割り当てられた各発音チ
ャンネルに対して設定する第2のステップと、前記各発
音チャンネル毎に設定された楽音制御パラメータに基づ
き、各発音チャンネル毎に複数のサンプリング周期にわ
たる所定期間に対応する複数サンプルの波形データを生
成するステップであって、該複数サンプルの波形データ
を生成するときに、それに用いるエンベロープ値につい
ては複数の波形サンプルを生成する毎に更新するように
なされた第3のステップと、前記第3のステップにおい
て生成された各発音チャンネルの波形データを混合し
て、混合波形データを生成する第4のステップと、前記
混合波形データをサンプリング周期毎に1サンプルずつ
出力する第5のステップとを具備することを特徴とする
楽音発生方法である。
Still another musical tone generating method according to the present invention comprises: (1) an input step of inputting performance information;
(2) a waveform generating step of calculating and generating waveform data of a plurality of samples corresponding to the predetermined period based on the performance information input within a predetermined period over a plurality of sampling periods; and (3) corresponding to the predetermined period. A waveform synthesizing step of inputting external waveform data of a plurality of samples and synthesizing with the waveform data of the plurality of samples calculated and generated in the waveform generating step; (4) a signal for the waveform data synthesized in the waveform synthesizing step A waveform processing step of performing processing; and (5) an output step of outputting the waveform data on which the signal processing has been performed in the waveform processing step, one sample at a time for each sampling period. Update processing of musical tone control parameters used for calculating and generating waveform data Characterized in that it is adapted to execute each time to generate a plurality of waveform samples, a tone generating method executed in the arithmetic unit. Still another musical tone generating method according to the present invention comprises: (1) an input step of inputting performance information; and (2) a predetermined period based on the performance information input within a predetermined period over a plurality of sampling periods. And (3) outputting the waveform data calculated and generated in the waveform generating step one sample at a time for each sampling cycle, and generating the waveform data. The method according to claim 1, wherein, when calculating and generating the waveform data of the plurality of samples, the musical tone control parameters used for the calculation are updated each time a plurality of waveform samples are generated. The tone generation method to be executed. Still further, still another musical sound generating method of the present invention is as follows.
A first step of receiving one or a plurality of pieces of performance information for generating one or a plurality of designated musical tones; A second step of setting tone control parameters corresponding to the designated tone for each assigned tone channel; and setting each tone generation parameter based on the tone control parameter set for each tone channel. Generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods for each channel, and generating a plurality of waveform samples for an envelope value used when generating the waveform data of the plurality of samples. A third step that is updated every time a call is made, and each source generated in the third step. Generating a mixed sound waveform data by mixing the waveform data of the channels; and outputting a mixed sound waveform data one sample at each sampling period. Is the way.

【0014】さらにまた、本発明のさらに他の楽音発生
方法は、1または複数の指定された楽音を発生するため
の1または複数の演奏情報を受け取る第1のステップ
と、前記演奏情報に応答して、各指定された楽音を複数
の発音チャンネルのうちの各1つに割り当て、該指定さ
れた楽音に対応する楽音制御パラメータを割り当てられ
た各発音チャンネルに対して設定する第2のステップ
と、前記各発音チャンネル毎に設定された楽音制御パラ
メータに基づき、各発音チャンネル毎に複数のサンプリ
ング周期にわたる所定期間に対応する複数サンプルの波
形データを生成する第3のステップと、前記第3のステ
ップにおいて生成された各発音チャンネルの波形データ
をそれぞれ少なくとも2系列に分岐し、それぞれのレベ
ルを独立に制御して各系列ごとに混合することにより、
少なくとも第1及び第2の波形データを得る第4のステ
ップと、前記第1及び第2の波形データをサンプリング
周期毎にそれぞれ1サンプルずつ出力する第5のステッ
プとを具備することを特徴とする楽音発生方法である。
さらにまた、本発明のさらに他の楽音発生方法は、1ま
たは複数の指定された楽音を発生するための1または複
数の演奏情報を受け取る第1のステップと、前記演奏情
報に応答して、各指定された楽音を複数の発音チャンネ
ルのうちの各1つに割り当て、該指定された楽音に対応
する楽音制御パラメータを割り当てられた各発音チャン
ネルに対して設定する第2のステップと、前記各発音チ
ャンネル毎に設定された楽音制御パラメータに基づき、
各発音チャンネル毎に複数のサンプリング周期にわたる
所定期間に対応する複数サンプルの波形データを生成す
る第3のステップと、前記第3のステップにおいて生成
された各発音チャンネルの波形データをそれぞれ少なく
とも2系列に分岐し、それぞれのレベルを独立に制御し
て各系列ごとに混合することにより、少なくとも第1及
び第2の波形データを得る第4のステップと、前記第2
の波形データに対して信号処理を施す第5のステップ
と、前記第1の波形データと信号処理の施された前記第
2の波形データとを混合して、混合波形データを得る第
6のステップと、前記混合波形データをサンプリング周
期毎にそれぞれ1サンプルずつ出力する第7のステップ
とを具備することを特徴とする楽音発生方法である。さ
らにまた、本発明のさらに他の楽音発生方法は、1また
は複数の指定された楽音を発生するための1または複数
の演奏情報を受け取る第1のステップと、前記演奏情報
に応答して、各指定された楽音を複数の発音チャンネル
のうちの各1つに割り当て、該指定された楽音に対応す
る楽音制御パラメータを割り当てられた各発音チャンネ
ルに対して設定する第2のステップと、前記各発音チャ
ンネル毎に設定された楽音制御パラメータに基づき、各
発音チャンネル毎に複数のサンプリング周期にわたる所
定期間に対応する複数サンプルの波形データを生成する
第3のステップと、前記第3のステップにおいて生成さ
れた各発音チャンネルの波形データを混合して、第1の
混合波形データを生成する第4のステップと、前記第4
のステップにおいて生成された第1の混合波形データと
外部から入力された外部波形サンプルデータとを混合し
て、第2の混合波形データを生成する第5のステップ
と、前記第2の混合波形データをサンプリング周期毎に
1サンプルずつ出力する第6のステップとを具備するこ
とを特徴とする楽音発生方法である。
Still another aspect of the present invention is a musical tone generating method, comprising: a first step of receiving one or a plurality of pieces of performance information for generating one or a plurality of designated musical tones; and responding to the performance information. Assigning each designated tone to each one of the plurality of tone channels, and setting tone control parameters corresponding to the designated tone to each assigned tone channel; A third step of generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods for each sounding channel based on the tone control parameters set for each sounding channel; The generated waveform data of each sound channel is branched into at least two streams, and each level is independently controlled to control each level. By mixing for each column,
A fourth step of obtaining at least first and second waveform data; and a fifth step of outputting the first and second waveform data by one sample each for each sampling period. This is a method for generating musical sounds.
Furthermore, still another musical sound generating method of the present invention includes a first step of receiving one or a plurality of pieces of performance information for generating one or a plurality of designated musical sounds, and responding to the performance information, A second step of assigning the designated musical tone to each of the plurality of tone generation channels and setting tone control parameters corresponding to the designated musical tone to each of the assigned tone generation channels; Based on the tone control parameters set for each channel,
A third step of generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods for each sounding channel; and converting the waveform data of each sounding channel generated in the third step into at least two series. A fourth step of obtaining at least first and second waveform data by branching and independently controlling the respective levels and mixing for each stream;
A fifth step of performing signal processing on the first waveform data and a sixth step of mixing the first waveform data and the second waveform data subjected to the signal processing to obtain mixed waveform data And a seventh step of outputting the mixed waveform data one sample at a time for each sampling period. Furthermore, still another musical sound generating method of the present invention includes a first step of receiving one or a plurality of pieces of performance information for generating one or a plurality of designated musical sounds, and responding to the performance information, A second step of assigning the designated musical tone to each of the plurality of tone generation channels and setting tone control parameters corresponding to the designated musical tone to each of the assigned tone generation channels; A third step of generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods for each sounding channel based on the tone control parameters set for each channel; and A fourth step of mixing waveform data of each sounding channel to generate first mixed waveform data;
A fifth step of mixing the first mixed waveform data generated in the step and the external waveform sample data input from the outside to generate second mixed waveform data, and the second mixed waveform data And a sixth step of outputting one sample at each sampling period.

【0015】さらにまた、本発明の楽音発生装置は、コ
ンピュータと、前記コンピュータに接続され、前記コン
ピュータから出力される波形データをアナログ音信号に
変換するデジタル/アナログ変換器とを備え、受け取っ
た波形データおよび演奏情報に基づいて楽音波形データ
を合成してアナログ音信号として出力する楽音発生装置
であって、前記コンピュータは、(a)アプリケーショ
ンプログラムからの波形データを、複数のサンプリング
周期にわたる所定期間に対応する複数サンプルずつ読み
込む読込みプログラム、(b)アプリケーションプログ
ラムからの演奏情報に基づいて、前記所定期間に対応す
る複数サンプルの波形データを生成する音源プログラ
ム、および、(c)前記読込みプログラムにより読み込
んだ波形データと前記音源プログラムにより生成された
波形データとを合成して、サンプリング周期毎に1サン
プルずつ前記デジタル/アナログ変換器に出力する合成
処理プログラムにしたがって処理を行なうものである。
さらにまた、本発明の他の楽音発生装置は、コンピュー
タと、前記コンピュータに接続され、前記コンピュータ
から出力される波形データをアナログ音信号に変換する
デジタル/アナログ変換器とを備え、受け取った波形デ
ータおよび演奏情報に基づいて楽音波形データを合成し
てアナログ音信号として出力する楽音発生装置であっ
て、前記コンピュータは、(a)アプリケーションプロ
グラムからの整数形式の波形データを浮動小数点データ
に変換する第1のデータ変換プログラム、(b)アプリ
ケーションプログラムからの演奏情報に基づいて整数形
式の波形データを生成する音源プログラム、(c)前記
音源プログラムからの波形データを浮動小数点データに
変換する第2のデータ変換プログラム、(d)前記第1
のデータ変換プログラムの出力する浮動小数点データと
前記第2のデータ変換プログラムの出力する浮動小数点
データを合成する合成プログラム、(e)前記合成プロ
グラムにより合成された浮動小数点データに対して信号
処理を施す波形処理プログラム、および、(f)前記波
形処理プログラムにより信号処理の施された浮動小数点
データを整数形式のデータに変換して前記デジタル/ア
ナログ変換器に出力する第3のデータ変換プログラムに
したがって処理を行なうものである。
Still further, the musical sound generating apparatus of the present invention includes a computer, and a digital / analog converter connected to the computer and converting waveform data output from the computer into an analog sound signal. A musical sound generating apparatus for synthesizing musical tone waveform data based on data and performance information and outputting as an analog sound signal, wherein the computer (a) converts waveform data from an application program into a predetermined period over a plurality of sampling periods. A reading program for reading a plurality of corresponding samples at a time, (b) a sound source program for generating waveform data of a plurality of samples corresponding to the predetermined period based on performance information from an application program, and (c) a reading program read by the reading program Waveform data and previous And a waveform data generated by the sound source program are combined, in which one sample at each sampling cycle performs processing in accordance with synthesizing program to be output to the digital / analog converter.
Still further, another musical sound generating apparatus of the present invention includes a computer, and a digital / analog converter connected to the computer and converting waveform data output from the computer into an analog sound signal. And a musical tone generating apparatus for synthesizing musical tone waveform data based on performance information and outputting it as an analog sound signal, wherein the computer (a) converts integer waveform data from an application program into floating point data. 1) a data conversion program, (b) a sound source program for generating waveform data in an integer format based on performance information from an application program, and (c) second data for converting waveform data from the sound source program into floating point data. A conversion program, (d) the first
A combining program for combining the floating-point data output by the data conversion program with the floating-point data output by the second data conversion program, and (e) performing signal processing on the floating-point data synthesized by the combining program. Processing according to a waveform processing program, and (f) a third data conversion program for converting floating-point data signal-processed by the waveform processing program into integer format data and outputting the converted data to the digital / analog converter Is performed.

【0016】演奏情報の発生時に演奏処理を優先的に行
い、演奏処理の空き時間に音源処理を継続的に行うよう
にしているので、演奏情報が発生した時点で処理量が増
加して音源処理があまり実行されなくても、それ以外の
時間でその穴埋めをすることができるので、音源処理を
安定して実行することができる。また、演奏情報の発生
時に演奏情報の受入処理を行い、受け入れた演奏情報に
基づく楽音制御あるいは波形生成は、該受入処理の空き
時間に行われるようにしたので、演奏情報が発生した時
点での処理の増加分を前記空き時間内に分散させること
ができ、一時的な処理の増加を防止することができる。
The performance processing is performed with priority when the performance information is generated, and the sound source processing is continuously performed during the idle time of the performance processing. Can be filled in at other times even if is not performed so much, so that sound source processing can be executed stably. In addition, when performance information is generated, performance information reception processing is performed, and tone control or waveform generation based on the received performance information is performed during idle time of the reception processing. The increase in processing can be dispersed within the free time, and a temporary increase in processing can be prevented.

【0017】[0017]

【発明の実施の形態】図1に本発明の楽音発生方法がそ
の上で実行される楽音発生装置の構成を示す。この図に
おいて、1はアプリケーションプログラムや楽音波形サ
ンプルの生成等の各種演算処理を行うマイクロプロセッ
サなどの中央処理装置(CPU)、2はプリセット音色
データ等が記憶されているリードオンリメモリ(RO
M)、3はCPU1のワークメモリエリアや音色データ
エリア、チャンネルレジスタエリア、出力バッファエリ
ア等の記憶エリアを有するランダムアクセスメモリ(R
AM)、4は時刻を指示すると共に、タイマ割り込み処
理のタイミングをCPU1に指示するタイマ、5はMI
DIイベントが入力されると共に、生成されたMIDI
イベントを出力するMIDIインターフェース、6は英
字、かな、数字、記号などのキーと備えるいわゆるパソ
コン用のキーボードである。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows a configuration of a musical tone generating apparatus on which a musical tone generating method of the present invention is executed. In FIG. 1, reference numeral 1 denotes a central processing unit (CPU) such as a microprocessor for performing various arithmetic processes such as generation of application programs and musical tone waveform samples, and 2 denotes a read-only memory (RO) storing preset tone color data and the like.
M), 3 is a random access memory (R) having a storage area such as a work memory area of the CPU 1, a tone color data area, a channel register area, an output buffer area, and the like.
AM), 4 designates a time and a timer which designates the timing of timer interrupt processing to the CPU 1;
When a DI event is input, the generated MIDI
A MIDI interface 6 for outputting an event is a so-called personal computer keyboard provided with keys such as alphabets, kana, numbers, and symbols.

【0018】7はユーザが楽音発生装置と対話するため
のディスプレイ(モニタ)装置、8は楽音を発生するシ
ーケンサソフトやゲームソフトなどの各種アプリケーシ
ョンプログラムが格納されているとともに、楽音波形サ
ンプルを生成するために使用する波形データ等が記憶さ
れているハードディスク(HDD)である。また、9
は、その内部にデジタルアナログ変換器(DAC)、ア
ナログデジタル変換器(ADC)などが設けられている
コーデック(CODEC)であり、該DACには演算生
成された楽音波形データが1サンプリングクロック毎に
供給され、また、前記ADCを介して外部オーディオ信
号入力端子からのオーディオ入力信号を取り込む。10
は前記コーデック9内のDACの出力に接続されたサウ
ンドシステムであり、DACから1サンプリング周期毎
に出力されるアナログ信号に変換された楽音信号を増幅
し外部に出力するものである。なお、フロッピィディス
ク装置やCD- ROM駆動装置、MO駆動装置などの上
記した以外の外部記憶装置が接続されている場合もあ
る。以上の構成はパソコン、ワークステーション等と同
等であり、それらの上で本発明の楽音発生方法を実施す
ることができる。
Reference numeral 7 denotes a display (monitor) device for allowing a user to interact with the musical sound generating device. Reference numeral 8 stores various application programs such as sequencer software and game software for generating musical sounds, and generates musical sound waveform samples. A hard disk (HDD) in which waveform data and the like used for this purpose are stored. Also, 9
Is a codec (CODEC) in which a digital-to-analog converter (DAC), an analog-to-digital converter (ADC), and the like are provided, and the DAC stores arithmetically generated musical sound waveform data every sampling clock. An audio input signal supplied from an external audio signal input terminal is supplied through the ADC. 10
A sound system connected to the output of the DAC in the codec 9 amplifies a tone signal converted from an analog signal output from the DAC every sampling cycle and outputs the amplified signal to the outside. An external storage device other than the above, such as a floppy disk device, a CD-ROM drive device, or an MO drive device, may be connected. The above configuration is equivalent to a personal computer, a workstation or the like, on which the tone generating method of the present invention can be implemented.

【0019】本発明においては、このような汎用演算処
理装置において、シーケンサソフトやゲームソフトなど
のアプリケーションプログラムがその上で動作する汎用
のOSをマルチタスク管理プログラムの上で動作させる
ようにし、また、ソフトウエア音源は、アプリケーショ
ンプログラムとはせずに、該マルチタスク管理プログラ
ムの制御の元で動作させているようにしている。これに
より、ソフトウエア音源を実時間処理に必要な時間間隔
で確実に実行させることができ、また、該ソフトウエア
音源の処理が実行されない時間に前記汎用のOSが動作
され、該OS上のアプリケーションプログラムの処理が
実行されることとなる。
According to the present invention, in such a general-purpose arithmetic processing device, a general-purpose OS on which an application program such as sequencer software or game software operates operates on a multitask management program. The software sound source is operated under the control of the multitask management program, not the application program. As a result, the software sound source can be reliably executed at a time interval required for real-time processing, and the general-purpose OS is operated at a time when the processing of the software sound source is not executed, and the application on the OS is executed. The processing of the program will be executed.

【0020】図2に本発明の一実施の形態におけるソフ
トウエアモジュール構成を示す。なお、この図において
は、説明を簡略にするため、実時間の処理が必要なオー
ディオ信号処理に関係する部分、すなわち、ソフトウエ
ア音源および波形データの処理に関係する部分のみが示
してある。図2に示すように、最上位層にはアプリケー
ションプログラム群が位置しており、11は音源ミキサ
ー制御ソフトウエア、12はMIDIシーケンサソフト
ウエア、13はゲームソフトなどのソフトウエア、およ
び14は波形再生ソフトウエアである。次は、システム
ソフトウエア群であり、15はアプリケーションプログ
ラムがシステムソフトウエア群が提供する各種のサービ
スを利用するためのインターフェース、16は、MID
I音源ドライバとして機能し、後述するトーンジェネレ
ータタスク20を生成する音源MIDIドライバ、17
はウェーブ入出力デバイスをオープンする機能を提供す
るWAVE入出力ドライバ、18は音源MIDIドライ
バ16およびWAVE入出力ドライバ17とカーネル
(Ring0)とのインタフェース、また、25は外部MI
DIドライバである。以上の各プログラムは、プロセッ
サのユーザ・モード(Ring3)において実行される。
FIG. 2 shows a software module configuration according to an embodiment of the present invention. In this figure, for simplicity of description, only a portion related to audio signal processing that requires real-time processing, that is, a portion related to software tone generator and waveform data processing is shown. As shown in FIG. 2, an application program group is located at the top layer, 11 is a sound source mixer control software, 12 is a MIDI sequencer software, 13 is software such as game software, and 14 is a waveform reproduction. It is software. The next is a group of system software, 15 is an interface for application programs to use various services provided by the group of system software, and 16 is an MID.
A sound source MIDI driver 17 that functions as an I sound source driver and generates a tone generator task 20 described later;
Is a WAVE input / output driver that provides a function of opening a wave input / output device, 18 is an interface between the sound source MIDI driver 16 and the WAVE input / output driver 17 and the kernel (Ring0), and 25 is an external MIDI driver.
DI driver. Each of the above programs is executed in the user mode (Ring 3) of the processor.

【0021】また、19はタスクディスパッチャ、20
はトーンジェネレータタスク、21はウェーブタスク、
22はミキサタスク、23は複数のオーディオストリー
ムの混合、分割、サンプルレート変換あるいはフォーマ
ット変換などを行うためのサブルーチン群であるライブ
ラリ、24はコーデックドライバであり、これらのプロ
グラムは、プロセッサのカーネルモード(Ring0)にお
いて実行される。
Reference numeral 19 denotes a task dispatcher;
Is a tone generator task, 21 is a wave task,
22 is a mixer task, 23 is a library which is a group of subroutines for performing mixing, division, sample rate conversion or format conversion of a plurality of audio streams, 24 is a codec driver, and these programs are in the kernel mode (Ring0) of the processor. ).

【0022】タスクディスパッチャ19は、複数の実行
可能状態にあるタスク(プロセス)の中から次に実行を
開始されるタスクを選択してプロセッサ上で実行される
ように制御を行うモジュールであり、本発明において
は、タスクの実行中においてもタイマなどからの割込を
許可し、現在処理中のタスクの処理を中断して別のタス
クの処理を開始することを許す、いわゆるプリエンプテ
ィブ方式(完全マルチタスク方式)のタスクスケジュー
リングを行うものである。
The task dispatcher 19 is a module for selecting a task to be executed next from a plurality of tasks (processes) in an executable state and controlling the task to be executed on the processor. In the present invention, a so-called preemptive method (complete multitasking) that permits interruption from a timer or the like even during execution of a task, and allows processing of a task currently being processed to be started and processing of another task is started. ) Task scheduling.

【0023】また、トーンジェネレータタスク20は、
その詳細は後述するが、音源MIDIドライバ16によ
り生成され、該音源MIDIドライバ16から供給され
る楽音制御パラメータTGparamsに基づいて最大32チ
ャンネル分の波形テーブル合成機能とリバーブなどの音
色制御処理機能とを提供するものである。さらに、ウェ
ーブタスク21およびミキサタスク22はWAVE入出
力ドライバ17によりオープンされるウェーブ入出力デ
バイスに対応して生成されるタスクである。
Also, the tone generator task 20
As will be described later in detail, a waveform table synthesizing function for up to 32 channels and a tone color control processing function such as reverb based on a musical tone control parameter TGparams generated by the tone generator MIDI driver 16 and supplied from the tone generator MIDI driver 16. To provide. Further, the wave task 21 and the mixer task 22 are tasks generated corresponding to the wave input / output device opened by the WAVE input / output driver 17.

【0024】さらに、26は波形データを入出力するた
めのA/D変換器およびD/A変換器を有するコーデッ
ク回路、27はMIDIインタフェース(MIDI I/O)で
ある。なお、図示していないが、上記システムプログラ
ム群には、通常の汎用OSに含まれているデバイスドラ
イバ群およびメモリ管理、ファイルシステム、ユーザイ
ンターフェースなどのプログラム群が含まれている。
Reference numeral 26 denotes a codec circuit having an A / D converter and a D / A converter for inputting / outputting waveform data, and 27 denotes a MIDI interface (MIDI I / O). Although not shown, the system program group includes a device driver group included in an ordinary general-purpose OS and a program group such as a memory management, a file system, and a user interface.

【0025】図3を参照して、タスク(プロセス)の実
行状態について説明する。タスクはcreate命令を実行す
ることによって生成され、生成されたタスクはまず実行
可(READY )状態とされて待ち行列につながれる。タス
クディスパッチャ19は、待ち行列につながれている実
行可(READY )状態のタスクの中から所定の優先順位に
従って処理を開始すべきタスクを選択し、これにより、
当該タスクは実行中(RUNNING )状態とされる。この状
態において、タイマからのタイムスライス割込などが発
生すると実行中のタスクはその処理を中断され、実行可
(READY )状態とされて再び待ち行列につながれる。そ
して、タスクディスパッチャ19は、所定の優先順位に
従って、待ち行列につながれているタスクの中から次に
実行すべきタスクを選択し、該選択したタスクを実行さ
せるように制御する。
Referring to FIG. 3, the execution state of the task (process) will be described. A task is created by executing a create instruction, and the created task is first placed in a ready (READY) state and placed in a queue. The task dispatcher 19 selects a task whose processing is to be started according to a predetermined priority from tasks in a ready state (READY) connected to the queue.
The task is set to the RUNNING state. In this state, when a time slice interrupt or the like occurs from the timer, the task being executed is interrupted, the task is made ready (READY), and the task is re-queued. Then, the task dispatcher 19 selects a task to be executed next from the tasks in the queue according to a predetermined priority, and controls the selected task to be executed.

【0026】したがって、他のタスクを実行中であって
も、所定の間隔で発生するタイムスライス割込などによ
りそのタスクの処理を強制的に中断することができ、ト
ーンジェネレータタスク20の優先順位を高くしておく
ことにより、所定時間間隔でトーンジェネレータタスク
20を確実に実行することが可能となる。また、ウェー
ブタスク21などの実時間処理が必要とされるタスクに
ついても同様に実行させることができ、汎用コンピュー
タ上において実時間処理を可能とすることができる。そ
して、該所定の時間間隔のうち実時間処理が行われてい
ない期間には、汎用のOSをタスクの1つとして動作さ
せ、該OS上で動作するアプリケーションプログラムを
前記実時間処理と並列的に実行することが可能である。
Therefore, even if another task is being executed, the processing of the task can be forcibly interrupted by a time slice interrupt or the like occurring at a predetermined interval, and the priority of the tone generator task 20 can be changed. By setting it high, the tone generator task 20 can be reliably executed at predetermined time intervals. In addition, tasks requiring real-time processing such as the wave task 21 can be similarly executed, and real-time processing can be performed on a general-purpose computer. Then, during the period in which the real-time processing is not performed in the predetermined time interval, the general-purpose OS is operated as one of the tasks, and the application program operating on the OS is executed in parallel with the real-time processing. It is possible to do.

【0027】なお、タスクが実行中(RUNNING )状態に
あるときに、sleep 命令あるいはpend命令のような特定
の事象の発生を待つ命令が実行されたときはそのタスク
は待ち状態(BLOCKED )とされ、他のタスクがディスパ
ッチされる。そして、待ち状態(BLOCKED )とされてい
たタスクは、当該特定の事象が発生したときに再び実行
可(READY )状態とされて待ち行列につながれる。さら
に、exit命令やdelete命令などが実行されたときは、タ
スクは終了(TERMINATED)状態となる。
When an instruction for waiting for a specific event such as a sleep instruction or a pend instruction is executed while the task is in a running state (RUNNING), the task is set to a waiting state (BLOCKED). , Other tasks are dispatched. Then, the task which has been in the waiting state (BLOCKED) is again set to the ready state (READY) when the specific event occurs, and is placed in the queue. Further, when an exit instruction, a delete instruction, or the like is executed, the task enters a terminated (TERMINATED) state.

【0028】さて、このような構成において、音源MI
DIドライバ16、トーンジェネレータタスク20、コ
ーデックドライバ24およびコーデック回路26により
本発明のソフトウエア音源が実現される。音源MIDI
ドライバ16は、MIDIシーケンサソフトウエア12
などから、インターフェース15を介してMIDI信号
の入力イベントがあったときに起動される。起動される
と、音源MIDIドライバ16は、入力されたMIDI
信号に応じて、ノートオン、ノートオフ、プログラムチ
ェンジ、コントロールチェンジ、システムエクスクルー
シブなどの処理を行う。ノートオンイベントの場合は、
新規な発音を音源であるトーンジェネレータタスク20
の発音チャンネルに割り当て、該割り当てたチャンネル
に設定するための楽音制御パラメータとノートオンを用
意する。用意される楽音制御パラメータは、MIDIチ
ャンネルごとに選択されている音色の音色パラメータを
ノートオンイベントに付随するノートナンバ、演奏タッ
チに応じて加工処理したパラメータである。なお、この
用意された楽音制御パラメータはトーンジェネレータタ
スク20の起動時にトーンジェネレータタスク20の音
源レジスタに転送される。
Now, in such a configuration, the sound source MI
The DI sound source, the tone generator task 20, the codec driver 24, and the codec circuit 26 realize the software sound source of the present invention. Sound source MIDI
The driver 16 is a MIDI sequencer software 12
For example, it is activated when there is an input event of a MIDI signal via the interface 15. When activated, the sound source MIDI driver 16 receives the input MIDI
According to the signal, processing such as note-on, note-off, program change, control change, and system exclusive is performed. For note-on events,
Tone generator task 20, which is a new sound source
And a tone control parameter and a note-on for setting the assigned channel are prepared. The prepared tone control parameters are parameters obtained by processing the tone color parameters of the tone color selected for each MIDI channel according to the note number attached to the note-on event and the performance touch. The prepared tone control parameters are transferred to the tone generator register of the tone generator task 20 when the tone generator task 20 is activated.

【0029】トーンジェネレータタスク20は、最大3
2chの波形テーブル合成機能と、モノラル入力ステレ
オ出力のリバーブ機能を有しており、コーデックドライ
バ24とコーデック回路26とからなる出力デバイスか
らの波形データ要求に応じて、1フレーム時間ごとに起
動される。このトーンジェネレータタスク20は、外部
オーディオ入力を受け付け、自ら生成する波形テーブル
合成データと該外部オーディオ入力とに対してリバーブ
処理を行い、処理結果であるオーディオ波形を出力デバ
イスに出力する。
The tone generator task 20 has a maximum of 3
It has a 2ch waveform table synthesizing function and a monaural input stereo output reverb function, and is activated every frame time in response to a waveform data request from an output device including a codec driver 24 and a codec circuit 26. . The tone generator task 20 receives an external audio input, performs reverb processing on the waveform table synthesized data generated by itself and the external audio input, and outputs an audio waveform as a processing result to an output device.

【0030】トーンジェネレータタスク20における処
理の全体構造を示す等価回路図を図4に示す。この図に
おいて、41は最大32チャンネルの波形テーブル合成
処理、点線で囲んだ42は外部ステレオオーディオ信号
入力処理、43はリバーブ処理を表している。また、4
4は波形データメモリ、50は補間演算部、51および
65はデータ変換部、52、53および54は乗算部、
55は整数形式で入力されるステレオオーディオ入力信
号を受け取り、浮動小数点形式のデータに変換するとと
もに、左チャンネル信号L、右チャンネル信号Rおよび
両者の和L+R信号を出力するデータ変換部、56、5
7、59および62は加算部、58および64はインタ
ーリーブを行うための加算部、60、61、63、66
および67はバッファ、65は浮動小数点形式のデータ
を整数形式のデータに変換するデータ変換部である。な
お、データ変換部55に入力されるステレオオーディオ
入力信号は、コーデック26からの入力あるいは波形再
生ソフトウエア14からWAVE入出力ドライバ17を
介しての入力のいずれであってもよい。
FIG. 4 is an equivalent circuit diagram showing the overall structure of the processing in the tone generator task 20. In this figure, reference numeral 41 denotes a waveform table synthesis process for up to 32 channels, reference numeral 42 denotes an external stereo audio signal input process, and reference numeral 43 denotes a reverb process. Also, 4
4 is a waveform data memory, 50 is an interpolation operation unit, 51 and 65 are data conversion units, 52, 53 and 54 are multiplication units,
A data converter 55 receives a stereo audio input signal input in an integer format, converts the signal into floating-point format data, and outputs a left channel signal L, a right channel signal R, and a sum L + R signal of the two.
7, 59 and 62 are adders, 58 and 64 are adders for performing interleaving, 60, 61, 63, 66
And 67, a buffer; and 65, a data conversion unit for converting floating point data into integer data. The stereo audio input signal input to the data conversion unit 55 may be either an input from the codec 26 or an input from the waveform reproduction software 14 via the WAVE input / output driver 17.

【0031】従来のハードウエア音源においては1サン
プル毎に波形を生成し、順にD/A変換処理を行ってい
るが、本ソフトウエア音源およびオーディオ入出力にお
いては、波形データはフレーム単位で処理される。フレ
ームとは、あるまとまった処理を行う単位であり、本ソ
フトウエア音源およびオーディオ入出力においては5m
s程度の再生時間に相当するサンプル数分のバッファを
確保し、これを1フレームの単位としている。このバッ
ファのサイズは波形計算周波数(サンプル周波数)によ
って変化する。図4における各バッファ60、61、6
3、66および67は、いずれも、1フレーム分の容量
を有するバッファである。
In the conventional hardware tone generator, a waveform is generated for each sample and the D / A conversion processing is sequentially performed. In the present software tone generator and audio input / output, waveform data is processed in frame units. You. A frame is a unit for performing a certain set of processing, and is 5 m for this software sound source and audio input / output.
A buffer for the number of samples corresponding to the reproduction time of about s is secured, and this is set as a unit of one frame. The size of this buffer changes according to the waveform calculation frequency (sample frequency). Each buffer 60, 61, 6 in FIG.
Reference numerals 3, 66, and 67 denote buffers each having a capacity of one frame.

【0032】また、図4において、太い矢印は32ビッ
トの浮動小数点形式で表されたデータを示し、細い矢印
は16ビット整数データを表している。さらに、太い四
角で囲まれたバッファ60、61および63は32ビッ
ト浮動小数点形式のデータを格納するバッファを表して
おり、細い四角で囲まれたバッファ66および67は1
6ビット整数データを格納するバッファを表している。
なお、このシステムにおいて使用しているCPUにおい
ては、浮動小数点乗算の方が整数乗算よりも高速に実行
されるので、信号処理は極力浮動小数点形式で行うよう
になされている。ただし、波形データメモリ44上の波
形データはほとんど8ビットの整数データであるため
に、補間演算部50においては、整数で乗算を実行し、
その後にデータ変換部50において浮動小数点形式に変
換して実行時間を短縮している。
In FIG. 4, thick arrows indicate data represented in a 32-bit floating point format, and thin arrows indicate 16-bit integer data. Furthermore, buffers 60, 61 and 63 surrounded by thick squares represent buffers for storing data in 32-bit floating point format, and buffers 66 and 67 surrounded by thin squares represent 1 buffers.
This represents a buffer for storing 6-bit integer data.
In the CPU used in this system, the floating point multiplication is executed at a higher speed than the integer multiplication, so that the signal processing is performed in the floating point format as much as possible. However, since the waveform data in the waveform data memory 44 is almost 8-bit integer data, the interpolation operation unit 50 performs multiplication by an integer,
Thereafter, the data conversion unit 50 converts the data into a floating-point format to reduce the execution time.

【0033】さて、波形テーブル合成処理41は、基本
的に波形補間とゲイン調整とからなっている。波形デー
タメモリ44から読み出した波形データは補間演算部5
0により音源MIDIドライバ16から供給されるピッ
チ情報を用いて補間され、データ変換部51により浮動
小数点形式に変換される。この出力は3つの出力系列、
すなわち、左チャンネル信号L、右チャンネル信号R、
および、リバーブ入力信号L+Rに分けられて、それぞ
れ、乗算部52、53および54において音源MIDI
ドライバ16から供給されるVolume情報(各発音チャン
ネルの音量エンベロープ信号にそれぞれ上記3系列の各
出力毎のレベルを乗じたデータ)が乗算される。この各
発音チャンネルから出力される波形データは、それぞ
れ、加算部56、57および62において互いに加算さ
れる。各加算部56、57および62には、それぞれ、
データ変換部55から外部ステレオオーディオ入力信号
の左チャンネル信号L、右チャンネル信号Rおよび和の
信号L+Rも供給されており、生成された全発音チャン
ネルの波形データの和と外部オーディオ入力信号とのミ
キシングが行われる。
The waveform table synthesizing process 41 basically includes waveform interpolation and gain adjustment. The waveform data read from the waveform data memory 44
0 is interpolated using the pitch information supplied from the sound source MIDI driver 16 and converted into a floating point format by the data converter 51. This output has three output series:
That is, the left channel signal L, the right channel signal R,
And a reverb input signal L + R.
Volume information supplied from the driver 16 (data obtained by multiplying the volume envelope signal of each sounding channel by the level of each of the three series of outputs) is multiplied. The waveform data output from each sounding channel is added to each other in adders 56, 57 and 62, respectively. Each of the adders 56, 57 and 62 has
A left channel signal L, a right channel signal R, and a sum signal L + R of the external stereo audio input signal are also supplied from the data conversion unit 55, and the sum of the generated waveform data of all tone generation channels is mixed with the external audio input signal. Is performed.

【0034】加算器56および57の出力は、それぞ
れ、DryLバッファ60およびDryRバッファ61に格納さ
れ、また、加算器62の出力はリバーブ用バッファRev
63に格納される。バッファRev 63に格納されたL+
Rデータはリバーブ処理43に入力されてリバーブ演算
が行われ、生成されたリバーブ出力データ(反響音デー
タ)は、LとR独立にゲイン調整された後、DryLバッフ
ァ60およびDryRバッファ61に格納されているデータ
にそれぞれ加算され、さらにデータ変換部65において
整数形式に変換された後、バッファ66および67を介
してオーディオ出力データとしてコーデック26のD/
A変換器に出力されることとなる。
The outputs of the adders 56 and 57 are stored in a DryL buffer 60 and a DryR buffer 61, respectively, and the output of the adder 62 is a reverb buffer Rev.
63. L + stored in buffer Rev 63
The R data is input to a reverberation process 43, where a reverb operation is performed, and the generated reverb output data (echo sound data) is subjected to gain adjustment independently for L and R, and then stored in a DryL buffer 60 and a DryR buffer 61. After the data is converted into an integer format by the data conversion unit 65, the D / D of the codec 26 is output as audio output data via the buffers 66 and 67.
It will be output to the A converter.

【0035】これらの処理の処理タイミングを図5を用
いて説明する。この図において、横軸は時間軸であり、
時間軸の上方に記載されている[A]は音源MIDIド
ライバ16の処理を示し、時間軸の下に記載されている
[B]はトーンジェネレータタスク20における処理を
示している。また、最下部の2行はオーディオ入出力ス
トリームを表しており、オーディオ入力デバイスはライ
ブラリ23に用意されているコーデック回路26からの
A/D波形データ入力ルーチン、オーディオ出力デバイ
スは同じくコーデック回路へのD/A変換するための波
形データ出力ルーチンである。
The processing timing of these processes will be described with reference to FIG. In this figure, the horizontal axis is the time axis,
[A] described above the time axis indicates the processing of the tone generator MIDI driver 16, and [B] described below the time axis indicates the processing in the tone generator task 20. The bottom two lines represent audio input / output streams, the audio input device is an A / D waveform data input routine from the codec circuit 26 prepared in the library 23, and the audio output device is a signal to the codec circuit. This is a waveform data output routine for D / A conversion.

【0036】このシステム全体は、3種類の優先順位を
もつ処理単位に大きく分けられる。最も優先順位の高い
処理は、タイマ割り込みによるMIDI信号の発生によ
って起動される音源MIDIドライバ16の処理であ
り、MIDI信号から楽音制御パラメータへの変換が当
該割り込み処理中において実行される。ただし、タイマ
割り込みではなくアプリケーションから直接MIDI出
力した場合には、最も低い優先順位とされる。次の優先
順位は、トーンジェネレータタスク20であり、このト
ーンジェネレータタスク20は、オーディオ入出力バッ
ファからのreadyッセージ(オーディオ出力デバイスが
次のデータを要求するときに出すoutput readyメッセー
ジおよびオーディオ入力デバイスがデータ送出可能のと
きに出すinput ready メッセージ)、音源MIDIドラ
イバ16が新しい楽音制御パラメータを送るときに出す
TG params receivedメッセージおよび音源MIDIドラ
イバ16が波形をロードするときに出すwave load requ
est メッセージによって起動される。MIDIシーケン
サなどのその他のアプリケーションは、最も優先順位の
低い処理とされている。
The whole system is roughly divided into processing units having three kinds of priorities. The process with the highest priority is the process of the tone generator MIDI driver 16 activated by the generation of the MIDI signal due to the timer interrupt, and the conversion from the MIDI signal to the tone control parameter is executed during the interrupt process. However, when MIDI is directly output from the application instead of the timer interrupt, the lowest priority is given. The next priority is the tone generator task 20, which generates a ready message from the audio input / output buffer (the output ready message issued when the audio output device requests the next data and the audio input device outputs the message). Input ready message when data transmission is possible), and when the tone generator MIDI driver 16 sends new tone control parameters.
TG params received message and wave load requ issued when MIDI driver 16 loads waveform
Invoked by an est message. Other applications, such as a MIDI sequencer, are considered the lowest priority processes.

【0037】図5のトーンジェネレータタスク20にお
ける処理[B]において、1フレーム分に相当するデー
タの処理は、(1)オーディオ入力データを読む、
(2)楽音制御パラメータを処理する、(3)32ch分
の波形を演算生成する、(4)必要に応じて強制ダンプ
を行う、(5)音源ステータスを送る、(6)リバーブ
計算を行う、(7)データをオーディオ出力する、とな
る。これらのうちで、最もCPU負荷が大きく、かつ、
変動の激しいものは(3)の32ch波形生成処理であ
り、1フレームの間に計算が完了しない可能性がある。
したがって、処理の順番としては、不確定なものを一番
最後にもっていくことが合理的であるため、処理は上記
(1)から始めるのではなく、上記(5)から始めるよ
うになされている。
In the process [B] in the tone generator task 20 shown in FIG. 5, processing of data corresponding to one frame includes (1) reading audio input data,
(2) process musical tone control parameters, (3) calculate and generate waveforms for 32 channels, (4) perform forced dump if necessary, (5) send sound source status, (6) perform reverb calculation, (7) Audio output of data. Of these, the CPU load is the largest, and
The one that fluctuates greatly is the 32ch waveform generation processing of (3), and the calculation may not be completed during one frame.
Therefore, it is reasonable to bring the uncertainties to the end as the order of processing, and the processing is not started from the above (1) but started from the above (5). .

【0038】上記(5)〜(7)は、一連の処理とされ
ており、オーディオ出力デバイスからのoutput readyメ
ッセージにより起動される。このメッセージが受信さ
れ、トーンジェネレータタスク20が起動されると、ま
ず、処理(5)において音源MIDIドライバ16に対
し、トーンジェネレータタスク20の動作状況である音
源ステータス(TG status )を送出し、音源MIDIド
ライバ16のコールバック関数が呼ばれる。音源MID
Iドライバ16はこのコールバック関数中でTG status
を読み、トーンジェネレータタスク20に対して用意さ
れている発音チャンネルの楽音制御パラメータおよびノ
ートオン信号などからなるTG params をトーンジェネレ
ータタスク20の音源レジスタに設定する。続いて、ト
ーンジェネレータタスク20は(6)のリバーブ演算の
実行を開始し、バッファ63に格納されている波形デー
タを入力としてリバーブ演算処理を実行するとともに、
その出力をそれぞれ1フレーム分のDryLバッファ60お
よびDryRバッファ61に足し込む。そして、(7)のオ
ーディオデータ出力処理を開始し、各バッファ60およ
び61に格納されている波形データを出力ドライバ用の
1フレーム分の波形データに変換して出力ドライバに受
け渡しして当該一連の処理を終了する。
The above (5) to (7) are a series of processes and are started by an output ready message from the audio output device. When this message is received and the tone generator task 20 is started, first, in a process (5), a tone generator status (TG status), which is an operation status of the tone generator task 20, is sent to the tone generator MIDI driver 16 to generate a tone generator task. The callback function of the MIDI driver 16 is called. Sound source MID
The I driver 16 uses TG status in this callback function.
And sets TG params including tone control parameters and note-on signals of tone generation channels prepared for the tone generator task 20 in the tone generator register of the tone generator task 20. Subsequently, the tone generator task 20 starts executing the reverberation operation of (6), executes the reverb operation process by using the waveform data stored in the buffer 63 as an input, and
The output is added to the DryL buffer 60 and DryR buffer 61 for one frame. Then, the audio data output process of (7) is started, and the waveform data stored in each of the buffers 60 and 61 is converted into waveform data for one frame for an output driver, transferred to the output driver, and transmitted to the output driver. The process ends.

【0039】次に行われる一連の処理は(1)のオーデ
ィオ入力処理である。この処理はinput ready メッセー
ジによって起動される。実際には、図5に図示するよう
に、input はoutputよりも先にready になっているため
に、上記(7)の処理の後に続けて処理(1)が呼び出
されることとなる。このオーディオ入力処理(1)にお
いては、オーディオ入力デバイスあるいはWAVE入出
力ドライバ17から1フレーム分の入力データが読み込
まれる。
The next series of processing is the audio input processing (1). This process is triggered by an input ready message. Actually, as shown in FIG. 5, since the input is ready before the output, the process (1) is called after the process (7). In the audio input process (1), one frame of input data is read from the audio input device or the WAVE input / output driver 17.

【0040】最後の一連の処理は(2)〜(4)であ
る。これらはTG params の受信メッセージにより起動さ
れる。実際には、前述したように、処理(6)よりも前
にTG params は受信されているために、前記処理(1)
のあとに続けてこの一連の処理が読み出される。ここで
は、まず、処理(2)において、音源MIDIドライバ
16により音源レジスタに設定されている楽音制御パラ
メータ、ノートオン信号などのTG params が解釈され、
波形生成演算用のデータに変換される。続いて、処理
(3)において、前記(2)において準備されたパラメ
ータやデータなどに基づいて、最大32ch分の波形生成
処理が行われる。この波形生成処理は、前述したよう
に、波形データメモリ44のアドレスを楽音ピッチに応
じた速さで進めながら波形データを読み出し、読み出さ
れたサンプル間の補間を行い、音量エンベロープ(AEG)
などのvolume情報に基づく音量制御を行うことにより、
1ch分の波形データを生成し、これを最大32ch分繰り
返すことにより行われる。また、音量制御は左チャンネ
ルL、右チャンネルRおよびリバーブ用のL+Rの3系
列独立に行われ、生成された1フレーム×3系列分の波
形データは、各バッファ60、61および63に足し込
まれる。
The last series of processing is (2) to (4). These are activated by the received message of TG params. Actually, as described above, since the TG params have been received before the processing (6), the processing (1)
This series of processing is read out after. Here, first, in processing (2), the tone generator MIDI driver 16 interprets the tone control parameters set in the tone generator register and the TG params such as the note-on signal.
It is converted into data for waveform generation calculation. Subsequently, in a process (3), a waveform generation process for up to 32 channels is performed based on the parameters and data prepared in the above (2). As described above, this waveform generation processing reads the waveform data while advancing the address of the waveform data memory 44 at a speed corresponding to the musical tone pitch, performs interpolation between the read samples, and generates a volume envelope (AEG).
By performing volume control based on volume information such as
This is performed by generating waveform data for one channel and repeating this for up to 32 channels. The volume control is performed independently for the three channels of the left channel L, the right channel R, and L + R for reverb, and the generated waveform data of one frame × 3 sequences is added to each of the buffers 60, 61, and 63. .

【0041】この処理(3)が終了したときに、当該フ
レームの処理は終了し、次のoutputreadyメッセージが
受信されるまでの時間は、汎用のOSが動作されること
となる。なお、図5の(ロ)に示すように、次のoutput
readyメッセージが来ても、上記(3)の波形生成処理
が終了していないときには、該波形生成処理は打ち切ら
れることとなるが、このとき未計算チャンネルに対して
強制ダンプ処理(4)が行われて、クリックノイズが発
生しないようになされている。なお、上述した最大32
チャンネル分の波形生成処理は、上記打ち切りが行われ
た場合に影響が目立つチャンネル、例えば現在のレベル
が大きいチャンネル、から順に行われるようになってい
る。
When this processing (3) is completed, the processing of the frame is completed, and the general-purpose OS is operated until the next outputready message is received. In addition, as shown in FIG.
Even if the ready message arrives, if the waveform generation processing of (3) is not completed, the waveform generation processing is terminated. At this time, the forced dump processing (4) is performed on the uncalculated channel. Therefore, the click noise is prevented from being generated. In addition, the above-mentioned maximum 32
The waveform generation processing for the channels is performed in order from the channel that has a noticeable effect when the above-mentioned truncation is performed, for example, the channel with the highest current level.

【0042】また、上述したトーンジェネレータタスク
20の実行中に、より優先順位の高いタイマ割り込みに
よるMIDIイベントが発生したときには、制御は強制
的に音源MIDIドライバ16に移され、そこで対応す
る処理が行われる。この様子は、図5の[A]に矢印で
示されている。この図には7個のMIDIイベントが発
生した様子が示されている。
When a MIDI event occurs due to a timer interrupt having a higher priority during the execution of the tone generator task 20, the control is forcibly transferred to the tone generator MIDI driver 16, where the corresponding processing is performed. Is This is indicated by an arrow in [A] of FIG. This figure shows a state in which seven MIDI events have occurred.

【0043】以上説明したトーンジェネレータタスク2
0を図6〜7のフローチャートによりさらに詳細に説明
する。まず、図6のステップS100において、このト
ーンジェネレータタスク20が生成される。トーンジェ
ネレータタスク20はステップS100において生成さ
れた後、ステップS101においてスリープ状態にされ
る。該スリープ状態にあるときに、メッセージの受信な
どのイベントが発生してアウェイクされてレディ状態と
なり、タスクディスパッチャによりディスパッチされる
と、ステップS102に移り、イベントが判定される。
すなわち、(a)オーディオ入/出力デバイスからのre
ady であるのか、(b)音源MIDIドライバ16から
の波形データロード要求wave load request であるの
か、それとも、(c)音源MIDIドライバ16からの
TG params の受信メッセージであるのかが判定される。
The tone generator task 2 described above
0 will be described in more detail with reference to the flowcharts of FIGS. First, in step S100 in FIG. 6, the tone generator task 20 is generated. After being generated in step S100, the tone generator task 20 is put to sleep in step S101. In the sleep state, when an event such as the reception of a message occurs and is awakened to be in the ready state, and dispatched by the task dispatcher, the process proceeds to step S102, and the event is determined.
That is, (a) re from the audio input / output device
ady, (b) a waveform data load request from the sound source MIDI driver 16, or (c) a waveform data load request from the sound source MIDI driver 16.
It is determined whether the received message is TG params.

【0044】この判定結果が、(a)のオーディオ入/
出力デバイスからのready メッセージの受信であるとき
は、ステップS103に進み、該メッセージが、オーデ
ィオ出力デバイスからのoutput readyであるのか、オー
ディオ入力デバイスからのinput ready であるのかが判
定される。この判定結果がオーディオ出力デバイスから
のoutput readyメッセージであるときは、ステップS1
04においてtriggerラグを「1」とし、次にステップ
S105において音源MIDIドライバ16に対してTG
status を送出する(図5における処理(5))。そし
て、ステップS106において、リバーブがオンとされ
ているか否かを判定し、該判定結果がYESのときはス
テップS107においてリバーブ計算処理(図5におけ
る処理(6))を行った後に、また、該判定結果がNO
のときは直接ステップS108に進む。そして、ステッ
プS108においてオーディオデータを出力(図5にお
ける処理(7))し、前記ステップS101に戻り、ス
リープ状態となる。
The result of the judgment is that the audio input /
If it is a reception of a ready message from the output device, the process proceeds to step S103, and it is determined whether the message is output ready from the audio output device or input ready from the audio input device. If the result of this determination is an output ready message from the audio output device, step S1
04, the trigger lag is set to “1”, and then in step S105, the TG
The status is sent (process (5) in FIG. 5). Then, in step S106, it is determined whether or not reverb is turned on. If the result of the determination is YES, the reverb calculation process (process (6) in FIG. 5) is performed in step S107, and Judgment result is NO
In the case of, the process proceeds directly to step S108. Then, in step S108, audio data is output (process (7) in FIG. 5), and the process returns to step S101 to be in the sleep state.

【0045】一方、前記ステップS103における判定
結果がオーディオ入力デバイスからのinput ready メッ
セージであるときには、ステップS109に進み、trig
gerラグの状態が判定される。この判定の結果、trigger
=1のときはステップS110に進み、オーディオ入
力データの読み込み(図5における処理(1))を行っ
た後、前記ステップS101に戻りスリープ状態とな
る。また、trigger =0のときは前記ステップS101
に戻りスリープ状態となる。ここで、trigger フラグ
は、(3)波形生成処理が終了したときに「0」とさ
れ、output readyメッセージが受信されたときに「1」
にセットされるフラグである。したがって、このステッ
プS109においてtrigger フラグの状態を判定するこ
とにより、output readyメッセージに対する処理よりも
先にinput ready メッセージに対する処理が行われるこ
とがないようになされている。
On the other hand, if the result of the determination in step S103 is an input ready message from the audio input device, the flow advances to step S109 to trigger
The state of the ger lag is determined. As a result of this judgment, the trigger
If = 1, the process proceeds to step S110 to read audio input data (process (1) in FIG. 5), and then returns to step S101 to be in the sleep state. If trigger = 0, the process proceeds to step S101.
To return to the sleep state. Here, the trigger flag is set to “0” when the (3) waveform generation processing is completed, and is set to “1” when the output ready message is received.
Is a flag that is set to Therefore, by determining the state of the trigger flag in step S109, the processing for the input ready message is not performed prior to the processing for the output ready message.

【0046】さて、前記ステップS102における判定
結果が(b)の音源MIDIドライバ16からの波形デ
ータロード要求wave load request メッセージであると
きは、ステップS111に進み、該ステップS111に
おいて波形データを読み込んでメモリに格納する処理を
行い、前記ステップS101に戻ってスリープ状態とな
る。なお、この波形データロード要求は、トーンジェネ
レータタスク20の初期化時などに音源MIDIドライ
バ16から波形データを送るために出されるメッセージ
である。
If the result of the determination in step S102 is a "wave load request" message from the tone generator MIDI driver 16 shown in (b), the flow advances to step S111 to read the waveform data in step S111 and store it in the memory. And returns to step S101 to enter the sleep state. This waveform data load request is a message issued to transmit waveform data from the tone generator MIDI driver 16 when the tone generator task 20 is initialized.

【0047】前記ステップS102における判定結果が
(c)のTG params の受信メッセージであるときはステ
ップS112に進み、該ステップS112において、音
源MIDIドライバ16により音源レジスタに設定され
ている楽音制御パラメータTGparams の処理(図5にお
ける処理(2))が行われる。具体的には、受信した楽
音制御パラメータTG params から波形データメモリアド
レス、ピッチ情報、EGパラメータ、パンデータ、LF
O制御データなどの音源制御パラメータが決定される。
続いて、ステップS113に進みTG EXIT であるか否か
が判定され、該判定結果がYESのときは、ステップS
116に進みタスクは終了する。該判定結果がNOのと
きはステップS114に進み、該ステップS114にお
いて最大32チャンネル分の波形生成処理(図5の処理
(3))を行う。この処理の詳細については、図7
(a)および(b)を参照して後述する。この波形生成
処理が終了した後は、ステップS115に進みtrigger
フラグを「0」にリセットして、前記ステップS101
に戻り、スリープ状態となる。
If the result of the determination in step S102 is a received message of (c) TG params, the process proceeds to step S112, where the tone control parameter TGparams set in the tone generator register by the tone generator MIDI driver 16 is determined. The process (process (2) in FIG. 5) is performed. Specifically, from the received tone control parameter TG params, the waveform data memory address, pitch information, EG parameter, pan data, LF
Sound source control parameters such as O control data are determined.
Subsequently, the process proceeds to step S113, where it is determined whether or not TG EXIT is determined. If the determination result is YES, the process proceeds to step S113.
Proceeding to 116, the task ends. If the determination result is NO, the process proceeds to step S114, where a waveform generation process for up to 32 channels (process (3) in FIG. 5) is performed. For details of this processing, see FIG.
This will be described later with reference to (a) and (b). After this waveform generation processing is completed, the process proceeds to step S115, where the trigger
The flag is reset to "0", and the process proceeds to step S101.
Return to sleep mode.

【0048】前記ステップS114の32ch分の波形
生成処理について、図7の(a)および(b)を参照し
て説明する。前記ステップS114の波形生成処理が図
7の(a)のステップS200において開始されると、
まず、ステップS201において、新しいキーオンデー
タが発生したか否かが判定される。ここで、新しいキー
オンデータ有りと判定されると、ステップS202に進
み、発音チャンネルの演算順序の並べ替えが行われる。
これは、複数チャンネルの波形生成演算を行っている途
中で前述したようにoutput ready requestが発生して該
演算を途中で打ち切らなければならなくなる場合があ
り、重要なチャンネルについては先に演算を完了してお
くようにするために行われる処理である。なお、cは発
音チャンネル数である。
The waveform generation processing for 32 channels in step S114 will be described with reference to FIGS. 7 (a) and 7 (b). When the waveform generation processing in step S114 is started in step S200 in FIG.
First, in step S201, it is determined whether new key-on data has occurred. Here, if it is determined that there is new key-on data, the process proceeds to step S202, and the calculation order of the sounding channels is rearranged.
This is because the output ready request may occur during the waveform generation calculation for multiple channels as described above, and the calculation must be terminated in the middle, and the calculation for important channels must be completed first. This is a process performed in order to keep it. Here, c is the number of sounding channels.

【0049】このステップS202が終了した後、ある
いは、前記ステップS201において新しいキーオンデ
ータの発生がないと判定されたときには、ステップS2
03が実行される。このステップS203においては、
演算チャンネル数をカウントするカウンタiに「0」を
セットして該カウンタiをリセットし、変数vNumに
発音チャンネル数cと同時発音許可チャンネル数rのう
ちの小さい方の値をセットする。この変数vNumは演
算すべきチャンネルの数を表す変数である。続いて、ス
テップS204に進み、カウンタiの値が変数vNum
よりも小さいか否かを判定する。この判定結果がNO、
すなわち、カウンタiの値が演算すべきチャンネル数v
Numよりも大きいか等しいときには、ステップS20
9に進み、この波形生成処理を終了する。
After step S202 is completed, or when it is determined in step S201 that no new key-on data is generated, step S2 is executed.
03 is executed. In this step S203,
The counter i for counting the number of operation channels is set to "0", the counter i is reset, and the smaller value of the number of sounding channels c and the number of simultaneous sounding permitted channels r is set in a variable vNum. This variable vNum is a variable representing the number of channels to be calculated. Subsequently, the process proceeds to step S204, where the value of the counter i is set to the variable vNum.
It is determined whether it is smaller than. If the determination result is NO,
That is, the number of channels v on which the value of the counter i should be calculated
If it is greater than or equal to Num, step S20
Proceeding to step S9, the waveform generation processing ends.

【0050】ステップS204の判定結果がYES、す
なわち、カウンタiの値が変数vNumよりも小さいと
きには、ステップS205に進みoutput ready request
が発生しているか否かが判定される。この判定結果がY
ESのときはステップS206に進み、そのチャンネル
iの発音信号の強制ダンプ処理(図5における(4))
が行われる。一方、この判定結果がNOのときは、ステ
ップS207において、第iチャンネルの波形生成演算
が行われる。この詳細は図7の(b)を参照して後述す
る。第iチャンネルについての強制ダンプ処理206あ
るいは波形生成演算207が終了すると、ステップS2
08に進みカウンタiをインクリメントして、再びステ
ップS204に戻り、今度はその次のチャンネルi+1
に対して前記ステップS204からステップS208の
処理が繰り返される。
If the decision result in the step S204 is YES, that is, if the value of the counter i is smaller than the variable vNum, the flow advances to a step S205 to output ready request
Is determined. This determination result is Y
In the case of ES, the process proceeds to step S206, in which the sound signal of the channel i is forcibly dumped ((4) in FIG. 5).
Is performed. On the other hand, if the determination result is NO, in step S207, the waveform generation calculation of the i-th channel is performed. The details will be described later with reference to FIG. When the forced dump processing 206 or the waveform generation calculation 207 for the i-th channel is completed, step S2
08, the counter i is incremented, and the process returns to step S204 again.
Are repeated from step S204 to step S208.

【0051】前記ステップS207の第iチャンネルの
波形生成演算の詳細について図7の(b)を参照して説
明する。この波形生成演算処理は、ステップS211〜
S218の一連の処理により第iチャンネルの1サンプ
ル分の波形データが生成され、この一連の処理を複数回
繰り返すことにより、複数サンプル分の波形データ生成
されるようになされている。
The details of the i-th channel waveform generation calculation in step S207 will be described with reference to FIG. This waveform generation calculation processing is performed in steps S211 to S211.
Waveform data for one sample of the i-th channel is generated by a series of processes in S218, and by repeating this series of processes a plurality of times, waveform data for a plurality of samples is generated.

【0052】第iチャンネルの波形生成演算S207が
ステップS210において開始されると、まず、ステッ
プS211において、前回の波形生成演算時におけるス
テップS214において既に算出されている読出アドレ
ス(readPtr )の整数部に応じて、波形データメモリか
ら補間に必要な数の波形サンプルを読み出し、前記読出
アドレスの小数部に応じて該波形サンプル間の補間演算
が行われる。これにより一つの補間サンプルが生成され
る。次に、ステップS212においてdryLバッファ6
0、dryRバッファ61およびrev バッファ63に足し込
まれる各データの音量データ(ボリュームレベル)の計
算が行われる。これは、音量エンベロープAEG 、音量vo
l 、変調AM、パンPan 、先述した3系列の各レベルSend
Level の各パラメータを加算することにより行われる。
続いて、ステップS213において、ステップS212
において求められた3系列の各ボリュームレベルをそれ
ぞれ対応する補間演算結果データ(補間サンプル)と乗
算し、その結果を各系列に対応するバッファに足し込
む。
When the waveform generation operation S207 of the i-th channel is started in step S210, first, in step S211, the integer part of the read address (readPtr) already calculated in step S214 in the previous waveform generation operation is set. Accordingly, a required number of waveform samples for interpolation are read from the waveform data memory, and an interpolation operation between the waveform samples is performed according to the decimal part of the read address. As a result, one interpolated sample is generated. Next, in step S212, the dryL buffer 6
0, calculation of volume data (volume level) of each data added to the dryR buffer 61 and the rev buffer 63 is performed. This is the volume envelope AEG, volume vo
l, modulation AM, pan Pan, each of the three levels Send described above
This is performed by adding each parameter of Level.
Subsequently, in step S213, step S212
Are multiplied by the corresponding interpolation calculation result data (interpolated samples), and the results are added to the buffers corresponding to the respective sequences.

【0053】続いて、ステップS214に進み、fナン
バー(ピッチ情報)を加算して波形データメモリ44の
新たな読み出しアドレスreadPtr を作成する。このよう
に、波形データメモリの読み出しアドレスreadPtr をF
ナンバーに応じた速度で増加させていくことにより、波
形データメモリ(波形テーブル)からFナンバーに比例
したピッチ(音高)を有する波形が読み出されることと
なる。また、Fナンバが小数部を有するデータであると
きは、より精密なピッチの制御を行なうことができる。
Subsequently, the flow advances to step S214 to add a f-number (pitch information) to create a new read address readPtr of the waveform data memory 44. Thus, the read address readPtr of the waveform data memory is set to F
By increasing at a speed corresponding to the number, a waveform having a pitch (pitch) proportional to the F-number is read from the waveform data memory (waveform table). Further, when the F number is data having a decimal part, more precise pitch control can be performed.

【0054】次に、ステップS215に進み、音量エン
ベロープAEG の更新を行う。次いで、ステップS216
において該更新した音量エンベロープAEG がkeyoffLeve
l よりも小さい値であるか否かが判定される。この判定
結果がNOのときはステップS217に進んでLFO の更
新処理を行い、次いでステップS218において音量パ
ラメータvol とパンパラメータpan の平滑化処理(補間
処理)を行う。(これら、ステップS215、S217
およびS218の詳細については後述する。)次に、ス
テップS219に進み、このチャンネルについて生成す
べき波形サンプルがまだ残っているか、すなわち、この
チャンネルについて1フレームに相当する数のサンプル
の波形の生成が終わっていないかどうかを判定し、その
判定結果がYES、すなわち、演算生成すべきサンプル
があるときは再びステップS211に戻る。この判定結
果がNOのときは該チャンネルの全てのサンプルについ
ての波形演算処理が終了したのであるから、ステップS
221に進み、ステップS207の当該チャンネルの波
形生成演算を終了する。
Next, the process proceeds to step S215, where the volume envelope AEG is updated. Next, step S216
The updated volume envelope AEG is keyoffLeve
It is determined whether the value is smaller than l. If the determination result is NO, the process proceeds to step S217 to perform an LFO update process, and then performs a smoothing process (interpolation process) of the volume parameter vol and the pan parameter pan in step S218. (These steps S215 and S217
The details of S218 will be described later. Next, proceeding to step S219, it is determined whether or not waveform samples to be generated for this channel still remain, that is, whether or not waveform generation of a number of samples corresponding to one frame has been completed for this channel. If the result of the determination is YES, that is, if there is a sample to be calculated, the process returns to step S211. If the result of this determination is NO, it means that the waveform calculation processing has been completed for all the samples of the channel.
Proceeding to 221, the waveform generation calculation for the channel in step S 207 is terminated.

【0055】また、先のステップS216の判定におい
て、更新された音量パラメータの値がkeyoffLevel より
も小さく、判定結果がYESとなったときは、ステップ
S220においてkeyoff処理を行い当該チャンネルを消
音状態に設定した後、ステップS221に進んで、この
チャンネルの波形生成演算207を終了する。
If the updated value of the volume parameter is smaller than keyoffLevel in the determination in step S216 and the determination result is YES, keyoff processing is performed in step S220 to set the channel to the mute state. After that, the process proceeds to step S221, and the waveform generation calculation 207 of this channel is ended.

【0056】ここで、前述したエンベロープ波形および
LFO波形について、図13を参照して説明する。図1
3の(a)はエンベロープ(EG)波形の典型的な例を
示すものであり、周知のように、アタック(ATTACK)、
ディケイ(DECAY )、サスティン(SUSTAIN )およびリ
リース(RELEASE )の4つのセグメントからなってい
る。すなわち、キーオン(keyon )が発生すると、アタ
ックレート(ATKrate )の傾きをもって最大レベル(EG
MAXlevel)まで一気に上昇し(アタックセグメント)、
次いで、該最大レベルからサステインレベルまでディケ
イレート(DCrate)の傾きで減衰する(ディケイセグメ
ント)。そして、サステインレベル(SUSlevel)で一定
時間定常状態となり(サステインセグメント)、キーオ
フ(keyoff)が入力されると、リリースレート(RLSrat
e )の傾きで減衰する。そして、レベルが人間の耳には
聞こえない程度のキーオフレベル(keyofflevel )に達
すると、ダンプレート(DMPrate )によりクリックノイ
ズが発生しない程度に急速に減衰させる。
Here, the above-described envelope waveform and LFO waveform will be described with reference to FIG. FIG.
3 (a) shows a typical example of an envelope (EG) waveform, and as is well known, an attack (ATTACK),
It consists of four segments: DECAY, SUSTAIN, and RELEASE. That is, when key-on (keyon) occurs, the maximum level (EG) has a slope of the attack rate (ATKrate).
MAXlevel) at a stretch (attack segment),
Next, the signal is attenuated from the maximum level to the sustain level at a gradient of a decay rate (DC rate) (decay segment). Then, a steady state is maintained for a certain time at the sustain level (SUSlevel) (sustain segment), and when a key-off (keyoff) is input, a release rate (RLSrat) is set.
e) Decay at the slope of e). When the level reaches a key-off level that is inaudible to human ears, it is rapidly attenuated by a damping rate (DMPrate) to such an extent that no click noise occurs.

【0057】また、LFO(Low Frequency Oscillato
r)波形は、楽音波形に対する変調波形を得るために用
いられるもので、図13の(b)に示すように、傾きLF
Orateより決定されるLFO周期を有する鋸歯状波とな
っている。このLFO波形を用いてテーブル参照や演算
により、例えば、正弦波などの必要な変調波形を得るこ
とができる。
Also, LFO (Low Frequency Oscillato)
r) The waveform is used to obtain a modulation waveform for the tone waveform, and has a slope LF as shown in FIG.
This is a sawtooth wave having an LFO cycle determined by Orate. A required modulation waveform such as a sine wave can be obtained by referring to a table or calculating using the LFO waveform.

【0058】このようなEG波形やLFO波形は楽音波
形のサンプリング周期に比して非常にゆっくりと変化す
るものである。上記した図7(b)に示した第iチャン
ネルの波形生成演算においては、各サンプル毎にこの振
幅EGの更新(S215)、LFOの更新(S217)
およびボリュームおよびパンの補間演算(S218)を
行なっているが、EG波形やLFO波形の変化はサンプ
リング周期に比してゆっくりとしたものであるから、こ
れらの演算処理を各サンプリング周期毎に実行する必要
はなく、複数サンプリング周期毎に実行するようにして
も、なんら不都合は生じない。そして、このようにする
ことにより、波形生成演算における演算量を少なくする
ことが可能となる。
The EG waveform and the LFO waveform change very slowly as compared with the sampling period of the musical tone waveform. In the waveform generation calculation of the i-th channel shown in FIG. 7B, the amplitude EG is updated for each sample (S215), and the LFO is updated (S217).
And the volume and pan interpolation calculations (S218) are performed, but since the changes in the EG waveform and LFO waveform are slower than the sampling cycle, these calculation processes are executed for each sampling cycle. There is no necessity, and no inconvenience arises even if it is executed every plural sampling periods. By doing so, the amount of calculation in the waveform generation calculation can be reduced.

【0059】このようにした第iチャンネル波形生成演
算処理の他の実施の形態を図8に示す。この図に示した
実施の形態においては、8サンプル演算毎にAEGの更
新処理、LFOの更新処理およびボリュームとパンの補
間演算処理を行なうものである。なお、これらの演算処
理の頻度は、8サンプル毎とする必要はなく、使用する
CPUの処理速度やCPUの負荷状態に応じて最適な頻
度を選択すればよい。図8において、ステップS230
で第iチャンネルの波形生成演算が開始されると、ま
ず、ステップS231においてサンプル番号をカウント
するカウンタsnの内容を「0」にリセットする。次い
で、ステップS232において、前述したS211(図
7(b))と同様に、波形データメモリから必要な波形
サンプルを読み出し、補間演算が行なわれる。次に、前
回の波形生成演算時におけるステップS250において
既に算出されている各ボリュームレベルをそれぞれ対応
する補間演算結果データと乗算し、その結果を各系列に
対応するバッファに足し込む。次に、ステップS234
において、波形データメモリの新たな読出アドレスを作
成する。
FIG. 8 shows another embodiment of the i-th channel waveform generation operation processing described above. In the embodiment shown in this figure, AEG update processing, LFO update processing, and volume and pan interpolation calculation processing are performed every eight sample calculations. Note that the frequency of these arithmetic processes does not need to be every eight samples, and an optimal frequency may be selected according to the processing speed of the CPU to be used and the load state of the CPU. In FIG. 8, step S230
When the waveform generation calculation of the i-th channel is started, first, in step S231, the content of the counter sn for counting the sample number is reset to "0". Next, in step S232, a necessary waveform sample is read from the waveform data memory and interpolation calculation is performed as in step S211 (FIG. 7B). Next, in step S250 at the time of the previous waveform generation operation, each volume level already calculated is multiplied by the corresponding interpolation operation result data, and the result is added to the buffer corresponding to each series. Next, step S234
, A new read address of the waveform data memory is created.

【0060】次に、ステップS235において、サンプ
ル番号カウンタsnの内容が0あるいは8の倍数である
か否かが判定される。この判定の結果がYESのときは
EGやLFOの演算を実行すべきサンプルであるから、
ステップS236に進み、振幅EG(AEG)の更新処
理が行なわれ、その後ステップS237に進む。一方、
このS235の判定結果がNOのときはAEGの更新を
行なうことなくステップS237に進む。S237にお
いて、現在のAEGの値がキーオフレベルよりも小さい
ものであるか否かが判定され、その結果がNOのとき
は、ステップS238に進み、前記S235と同様にこ
のサンプルがLFOの更新処理などを行なうべきサンプ
ルであるか否かの判定が行なわれる。この判定の結果が
YESのときは、ステップS239においてLFOの更
新処理を行ない、次いでステップS240においてボリ
ュームとパンの補間演算を行なった後、S241におい
て3系列の各データのボリュームレベルの更新処理が行
なわれ、このサンプル分の波形生成処理が終了されたこ
ととなり、ステップS242に進む。
Next, in step S235, it is determined whether or not the content of the sample number counter sn is 0 or a multiple of 8. When the result of this determination is YES, it is a sample on which the calculation of EG or LFO should be executed,
Proceeding to step S236, an update process of the amplitude EG (AEG) is performed, and then proceeding to step S237. on the other hand,
If the determination result in S235 is NO, the process proceeds to step S237 without updating the AEG. In step S237, it is determined whether or not the current value of the AEG is smaller than the key-off level. If the result is NO, the process proceeds to step S238, in which the sample is updated with the LFO as in step S235. Is determined as to whether or not the sample is to be performed. If the result of this determination is YES, an LFO update process is performed in step S239, then a volume and pan interpolation operation is performed in step S240, and then a volume level update process of each of the three series of data is performed in S241. This means that the waveform generation processing for this sample has been completed, and the flow proceeds to step S242.

【0061】また、前記S238の判定結果がNOであ
るときには、LFOの更新処理などを実行すべきサンプ
ルではないために、この時点でこのサンプル分の波形生
成処理が終了したこととなり、ステップS242に進
む。ステップS242においては、全てのサンプルの処
理が終了したか否かを判定し、処理すべきサンプルが残
っているときには、ステップS243においてサンプル
番号カウンタをインクリメントして前述したステップS
232以降の処理が繰り返される。さらに、前記ステッ
プS237において、AEGがキーオフレベル(keyoff
level )よりも小さいものと判定されたときには、ステ
ップS244のキーオフ処理に進み、波形をダンプレー
ト(図13(a))で急速に減衰させて、このチャンネ
ルiの波形生成処理を終了する。
If the result of the determination in S238 is NO, the waveform generation processing for this sample has been completed at this time because the sample is not a sample for which the LFO update processing is to be executed. move on. In step S242, it is determined whether or not processing of all the samples has been completed. If there are any remaining samples to be processed, the sample number counter is incremented in step S243, and the processing in step S243 is performed.
The process after 232 is repeated. Further, in step S237, the AEG sets the key-off level (keyoff level).
When it is determined that the waveform is smaller than the level (i.e., level), the process proceeds to the key-off process in step S244, the waveform is rapidly attenuated by the damping plate (FIG. 13A), and the waveform generation process for this channel i is terminated.

【0062】この図8に示した実施の形態によれば、S
236のAEGの更新処理、S239のLFOの更新処
理、S240のボリュームとパンの補間処理およびS2
41のボリュームレベルの計算処理が8サンプル毎に実
行されるようになり、前述した図7に示した実施の形態
の場合よりもCPUの演算負荷量を軽減することができ
る。
According to the embodiment shown in FIG.
A236 update processing, S239 LFO update processing, S240 volume and pan interpolation processing, and S2
The calculation processing of the volume level 41 is executed every eight samples, and the calculation load of the CPU can be reduced as compared with the case of the embodiment shown in FIG.

【0063】第iチャンネルの波形生成演算のさらに他
の実施の形態を図9に示す。この図9における各ステッ
プS261〜S266は、それぞれ、図8におけるステ
ップS231〜S236と同一内容であり、また、図9
のステップS267〜S269はそれぞれ図8のステッ
プS239〜S241と同一内容であり、さらに、図9
のステップS270は図8のステップS237と、図9
のステップS271〜S273は図8のステップS24
2〜S244と、それぞれ同一内容であるから、図9に
おける各ステップの処理内容についての詳細な説明は省
略する。
FIG. 9 shows still another embodiment of the waveform generation calculation of the i-th channel. Steps S261 to S266 in FIG. 9 have the same contents as steps S231 to S236 in FIG. 8, respectively.
Steps S267 to S269 are the same as steps S239 to S241 in FIG. 8, respectively.
Step S270 of FIG. 8 corresponds to step S237 of FIG.
Steps S271 to S273 correspond to step S24 in FIG.
Since the contents are the same as those in steps S <b> 2 to S <b> 244, a detailed description of the processing in each step in FIG. 9 is omitted.

【0064】この図9に示した実施の形態においては、
ステップS265において当該サンプルがEGやLFO
の演算を行なわないサンプルであると判定されたときに
ステップS270に進み、AEGの値がキーオフレベル
よりも小さいものであるか否かを判定する。また、前記
ステップS265の判定の結果演算を行なうべきサンプ
ルであるときには、ステップS266のAEG更新処
理、S267のLFO更新処理、S268のボリューム
とパンの補間処理およびS269のボリュームレベルの
計算処理を順次行なうようになされている。
In the embodiment shown in FIG.
In step S265, the sample is determined to be EG or LFO.
When it is determined that the sample does not perform the calculation of (1), the process proceeds to step S270, and it is determined whether or not the value of AEG is smaller than the key-off level. If the result of determination in step S265 is that the sample is to be operated, AEG update processing in step S266, LFO update processing in S267, volume and pan interpolation processing in S268, and volume level calculation processing in S269 are sequentially performed. It has been made like that.

【0065】すなわち、上述した図8の実施の形態にお
いては、ステップS236のAEGの更新演算をLFO
更新演算(S239)、ボリュームおよびパンの補間演
算(S240)およびボリュームレベル計算(S24
1)と分離して、AEGの更新演算終了後にAEGの値
がキーオフレベルよりも小さいか否かの判定を行なって
いたが、この図9に示した実施の形態においては、これ
らの演算処理をまとめて行なうようにし、その後にAE
G値の判定を行なうようにしたものである。これによ
り、CPUの演算量は図8の場合と比べて若干増加する
ものの、前述した図7(b)の場合よりは減少してい
る。
That is, in the embodiment of FIG. 8 described above, the update calculation of the AEG in step S236 is performed by the LFO
Update operation (S239), volume and pan interpolation operation (S240), and volume level calculation (S24)
Separately from 1), it is determined whether or not the value of the AEG is smaller than the key-off level after the end of the AEG update calculation. However, in the embodiment shown in FIG. So that they work together, then AE
The determination of the G value is performed. As a result, although the amount of calculation by the CPU slightly increases as compared with the case of FIG. 8, it decreases compared with the case of FIG. 7B described above.

【0066】なお、これらの実施の形態においては、A
EG、LFOなどの更新処理の頻度を所定サンプル毎と
することにより演算量を軽減しているが、このほかに、
当該サンプルがEGにおけるどのセグメントにあるかに
応じてEG演算を行なうか否かを決定するようにしても
よい。例えば、アタックセグメントおよびディケイセグ
メントにおいてはEG演算を実行するがサステインセグ
メントにおいては定常状態にあるのであるからEG演算
を省略することができる。このようにEG波形のセグメ
ントに応じてEG演算を省略することにより、演算頻度
を実質的に低下させることも可能である。
In these embodiments, A
The amount of calculation is reduced by setting the frequency of update processing of EG, LFO, etc. for each predetermined sample.
Whether or not to perform the EG calculation may be determined according to which segment in the EG the sample is in. For example, the EG operation is executed in the attack segment and the decay segment, but the EG operation can be omitted in the sustain segment because the EG operation is in a steady state. Thus, by omitting the EG calculation according to the segment of the EG waveform, it is possible to substantially reduce the calculation frequency.

【0067】次に、AEGの更新処理(図7(b)のス
テップS215、図8のS236および図9のS26
6)の詳細について図10を参照して説明する。AEG
更新処理が開始されると、まず、ステップS301にお
いて、EGパラメータ(EGPARM)、振幅EGの現在の値
(aeg )および演奏タッチ情報(touch )が読み込まれ
る。このEG制御情報は当該発音チャンネルにおいて生
成される楽音に対応するEG波形の各セグメントの継続
時間、目標値(EGMAXlevel、SUSlevel) およびアタック
レート(ATKrate )、ディケイレート(DCrate)、リリ
ースレート(RLSrate )などからなる。
Next, the AEG updating process (step S215 in FIG. 7B, S236 in FIG. 8, and S26 in FIG. 9)
Details of 6) will be described with reference to FIG. AEG
When the updating process is started, first, in step S301, the EG parameter (EGPARM), the current value (aeg) of the amplitude EG, and the performance touch information (touch) are read. The EG control information includes the duration, target value (EGMAXlevel, SUSlevel), attack rate (ATKrate), decay rate (DCrate), and release rate (RLSrate) of each segment of the EG waveform corresponding to the tone generated in the sounding channel. Etc.

【0068】次にステップS302に進み、現在キーオ
ン中であるか否かが判定される。この判定の結果がNO
であるときは、キーオフであるからステップS303に
進み、リリースセグメントに移行する。また、キーオン
中であるときはそのままステップS304に進む。この
ステップS304において、現在のセグメントがサステ
インセグメントでないか否かが判定される。この判定結
果がNO、すなわち、サステインセグメントであるとき
は、AEGは定常状態であるから、このままAEG更新
処理は終了される。また、S304の判定結果がYES
のときは、ステップS305以下に進み、AEGの更新
が行なわれることとなる。
Then, the process proceeds to a step S302, where it is determined whether or not the key is currently on. If the result of this determination is NO
If so, the process proceeds to step S303 because of key-off, and shifts to the release segment. If the key is on, the process directly proceeds to step S304. In this step S304, it is determined whether or not the current segment is not a sustain segment. If the result of this determination is NO, that is, if it is a sustain segment, the AEG is in a steady state, and the AEG updating process is terminated as it is. Also, the determination result of S304 is YES
In this case, the process proceeds to step S305 and the subsequent steps, and the AEG is updated.

【0069】EGの各セグメントのレート値などのEG
パラメータは実数値で記憶されているが、本発明におい
ては、EG値を整数として取り扱っているため、AEG
の更新は、次のようにして行なわれている。すなわち、
対応するセグメントにおけるレート値をrateとして、そ
の整数部をn、小数部をfとする。そして、f>0のと
きはm=n+1、k=rate/(n+1)、f=0のとき
はm=n、k=rate/n=1とする。そして、kを累算
し、その値が1を越える毎に現在のAEG値aeg に整数
値mを加算することにより、AEGを更新するようにし
ている。このようにすることにより、レート値rateの小
数切り上げ値mをrate/mの確率で加算することがで
き、結局はm・(rate/m)=rateを現在値aeg に加算
してAEGの更新をしていることとなる。
EG such as the rate value of each segment of EG
Although the parameter is stored as a real value, in the present invention, since the EG value is treated as an integer, the AEG
Is updated as follows. That is,
Let the rate value in the corresponding segment be rate, its integer part be n, and its decimal part be f. When f> 0, m = n + 1 and k = rate / (n + 1). When f = 0, m = n and k = rate / n = 1. Then, the AEG is updated by accumulating k and adding an integer value m to the current AEG value aeg every time the value exceeds 1. By doing so, the fractional rounded value m of the rate value rate can be added with a probability of rate / m, and eventually, m · (rate / m) = rate is added to the current value aeg to update the AEG. That you are doing.

【0070】このために、まずステップS305におい
て、aegフラクションレジスタ(aegfrac reg )に前
述したkの値を足し込む。このaegfrac reg は、前述し
たkを累算するためのレジスタである。そして、ステッ
プS306において、該aegfrac reg の内容が1よりも
大きくなったか否かを判定する。この判定の結果がNO
のときは、前述したように、現在のAEG値の更新をし
ないのであるから、そのままこの処理を終了する。ま
た、aegfrac reg の内容が1を越えてS306の判定結
果がYESとなったときは、ステップS307に進み、
現在のAEG値aeg にm=(当該セグメントのレート値
rateの整数部n+1)を加算して新たなaeg とし、該新
たなaeg に演奏タッチ情報TOUCH を乗算して、更新され
たAEG値を求める。
For this purpose, first, in step S305, the value of k described above is added to the aeg fraction register (aegfrac reg). The aegfrac reg is a register for accumulating k described above. Then, in step S306, it is determined whether or not the content of the aegfrac reg has become greater than one. If the result of this determination is NO
In this case, as described above, since the current AEG value is not updated, this process is terminated. If the content of the aegfrac reg exceeds 1 and the result of the determination in S306 is YES, the process proceeds to step S307,
In the current AEG value aeg, m = (the rate value of the corresponding segment
An integer part (n + 1) of the rate is added to obtain a new aeg, and the new aeg is multiplied by the performance touch information TOUCH to obtain an updated AEG value.

【0071】次に、ステップS308においてaegfrac
reg の内容から1を減算し、次回のkの累算に備える。
続いて、ステップS309において、aeg は目標値(ア
タックセグメントのときはEGMAXlevel、ディケイセグメ
ントのときはSUSlevel)に達したか否かが判定され、そ
の判定結果がYESのときはステップS310において
次のセグメントに移行し、NOのときはそのまま、この
回のAEG更新処理を終了する。
Next, in step S308, aegfrac
Subtract 1 from the contents of reg to prepare for the next accumulation of k.
Subsequently, in step S309, it is determined whether or not aeg has reached the target value (EGMAXlevel for an attack segment, SUSlevel for a decay segment). Then, if NO, the current AEG updating process is terminated.

【0072】次に、LFO更新処理(図7(b)のS2
17、図8のS239および図9のS267)の詳細に
ついて説明する。このLFO制御データも上述したEG
パラメータと同様に実数値で記憶されているが、実際の
LFOパラメータは整数で取り扱っているために、上述
したEG値と同様に確率的な演算により更新されてい
る。 まず、ステップS321において、記憶されてい
るLFO制御データ、すなわちLFOレート(LFOrate
)と、現在のLFO位相値(lfop)を読み込む。ここ
で、上述したEGの場合と同様に、読み出されたLFO
レート値(LFOrate )の整数部をn、小数部をfとし
て、f>0のときはm=n+1、k=LFOrate /(n+
1)、f=0のときはm=n、k=LFOrate /n=1と
する。そして、kを累算し、その値が1を越える毎に現
在のLFO値lfopに整数値mを加算することにより、L
FO値を更新するようにしている。
Next, the LFO update processing (S2 in FIG. 7B)
17, S239 in FIG. 8 and S267 in FIG. 9 will be described in detail. This LFO control data is also stored in the EG described above.
Like the parameters, they are stored as real values, but since the actual LFO parameters are handled as integers, they are updated by probabilistic calculations, like the EG values described above. First, in step S321, the stored LFO control data, that is, the LFO rate (LFOrate)
) And the current LFO phase value (lfop). Here, as in the case of the EG described above, the read LFO
The integer part of the rate value (LFOrate) is n and the decimal part is f. When f> 0, m = n + 1 and k = LFOrate / (n +
1) When f = 0, m = n and k = LFOrate / n = 1. Then, by accumulating k and adding an integer value m to the current LFO value lfop each time the value exceeds 1, L
The FO value is updated.

【0073】すなわち、ステップS322において、l
foフラクションレジスタ(lfofrac reg )にkを足し
込み、その値が1を越えたか否かをステップS323に
おいて判定する。この判定の結果がNOのときはこの回
のLFO更新処理を終了する。また、YESのときは、
ステップS324において、LFOの現在位相値lfopに
m(=LFOrate の整数値n+1)を加算して、新たな現
在位相値lfopに更新する。続いて、ステップS325に
おいてlfofrac reg の内容から1を減算して次回の処理
に備え、ステップS326に進む。S326において現
在位相値lfopが目標値lfopdistに達したか否かを判定す
る。この判定結果がNOのときはそのままステップS3
28に進む。一方、lfopが目標値lfopdistに到達し、S
326の判定結果がYESとなったときは、ステップS
327においてlfopを0にリセットする。これにより、
図13(b)に示したように鋸波状波のLFO値が生成
されることとなる。次にステップS328が実行され、
現在のLFO位相値lfopの値に基づいて、テーブル参照
あるいは演算により所定のLFO波形の振幅値lfo求め
られる。以上、図13(b)のような鋸歯状波のLFO
値を発生して変調波形として用いたり、あるいはこの鋸
歯状波LFO値に基づいて各種変調波形を発生する方法
を実施例として挙げて説明したが、他に直接的な演算に
よって所望の変調波形のLFO値を求めるようにしても
よいし、また単純に順次、所定の変調波形テーブルを参
照するようにしてもよい。
That is, in step S322, l
k is added to the fo fraction register (lfofrac reg), and it is determined in step S323 whether or not the value has exceeded 1. If the result of this determination is NO, this LFO update process is terminated. If YES,
In step S324, m (= integer value n + 1 of LFOrate) is added to the current phase value lfop of the LFO and updated to a new current phase value lfop. Subsequently, in step S325, 1 is subtracted from the content of lfofrac reg to prepare for the next processing, and the flow advances to step S326. In S326, it is determined whether or not the current phase value lfop has reached the target value lfopdist. If the result of this determination is NO, step S3 is left as it is.
Proceed to 28. On the other hand, lfop reaches the target value lfopdist and S
If the decision result in the step 326 is YES, a step S is executed.
At 327, lfop is reset to zero. This allows
As shown in FIG. 13B, an LFO value of a sawtooth wave is generated. Next, step S328 is executed,
Based on the current value of the LFO phase value lfop, the amplitude value lfo of a predetermined LFO waveform is obtained by referring to a table or by calculation. As described above, the LFO of the sawtooth wave as shown in FIG.
A method of generating a value and using it as a modulation waveform, or a method of generating various modulation waveforms based on this sawtooth wave LFO value has been described as an embodiment. The LFO value may be obtained, or a predetermined modulation waveform table may be referred to simply and sequentially.

【0074】次に、図12に基づいて、ボリュームおよ
びパンの計算処理(図7(b)におけるS218、図8
のS240および図9のS268)について説明する。
なお、このボリューム情報およびパン情報はユーザーの
操作により設定されるものである。まず、ステップS3
31においてボリューム情報の現在値vol がユーザーに
よってセットされた目標値に等しくなっていないかどう
かかを判定する。vol目標値と等しくなっており、この
判定結果がNOとなったときは、ステップS332に進
む。また、目標値と等しくないときはステップS332
に進み、vol データの補間処理を行ない補間されたデー
タをあらたなvol データとする。
Next, based on FIG. 12, the volume and pan calculation processing (S218 in FIG. 7B, FIG.
S240 of FIG. 9 and S268 of FIG. 9 will be described.
The volume information and the pan information are set by a user operation. First, step S3
At 31, it is determined whether the current value vol of the volume information is not equal to the target value set by the user. If it is equal to the vol target value, and the determination result is NO, the process proceeds to step S332. If it is not equal to the target value, step S332
Then, interpolation processing of vol data is performed, and the interpolated data is set as new vol data.

【0075】次に、ステップS332において、パンデ
ータの現在値pan がユーザーにより設定された目標値と
等しくないか否かを判定する。pan が目標値と等しく、
この判定結果がNOとなったときは、このままでボリュ
ームおよびパンの計算処理を終了する。一方、S333
のYESとなったときは、ステップS334においてパ
ンデータの補間処理を行ない、補間後のデータを新たな
pan データとする。
Next, in step S332, it is determined whether or not the current value pan of the pan data is not equal to the target value set by the user. pan is equal to the target value,
If the result of this determination is NO, the volume and pan calculation processing is terminated. On the other hand, S333
Is YES, the interpolation processing of the pan data is performed in step S334, and the data after the interpolation is replaced with the new data.
Use pan data.

【0076】なお、上記した実施の形態においては、ト
ーンジェネレータタスク20を出力ドライバの1フレー
ム分の再生終了時に発生されるoutput readyメッセージ
により起動しているが、必ずしもこれに限られることは
ない。トーンジェネレータタスク20における(5)〜
(7)の処理は1フレーム時間に比べて短時間で終了す
るものであるから、トーンジェネレータタスク20を1
フレームの再生時間の中程で起動するようにしてもよ
い。また、一定時間長の各フレーム毎に起動するように
しなくても、出力ドライバにセットされた波形データが
少なくなったことを検出した時点で起動するようにして
もよい。
In the above-described embodiment, the tone generator task 20 is activated by the output ready message generated when the reproduction of one frame of the output driver is completed. However, the present invention is not limited to this. (5)-in tone generator task 20
Since the processing of (7) is completed in a shorter time than one frame time, the tone generator task 20
You may make it start in the middle of the reproduction time of a frame. Further, instead of starting each frame of a fixed time length, it may be started at the time when it is detected that the waveform data set in the output driver has decreased.

【0077】また、波形データの受け渡し要求(output
readyメッセージ)があったときにまず、波形データの
受け渡しを行い、その後に波形生成演算をおこなうとい
う、本発明の波形生成方法は、ソフトウエア音源の場合
に限らず、電子楽器などに内蔵された専用の楽音発生装
置にも適用することができる。さらに、生成した波形デ
ータと外部から入力された波形データを合成すること、
および、外部から入力された波形データを複数ステージ
の波形生成演算処理の途中のステージに挿入すること
も、ソフトウエア音源の場合に限らず、専用の楽音発生
装置の場合にも適用することができる。
Further, a waveform data transfer request (output
The waveform generation method according to the present invention, in which the waveform data is first transferred when a ready message is received, and then the waveform generation operation is performed, is not limited to the case of the software sound source, but is incorporated in an electronic musical instrument or the like. The present invention can also be applied to a dedicated tone generator. Furthermore, combining the generated waveform data with the waveform data input from the outside,
Also, the insertion of waveform data input from the outside into stages in the middle of waveform generation calculation processing of a plurality of stages can be applied not only to a software tone generator but also to a dedicated tone generator. .

【0078】さらにまた、上記においては、前記したよ
うに処理(5)、(6)、(7)、(1)、(2)、
(3)の順で一連の処理を行っているが、処理の順序は
必ずしもこれに限られることはない。さらにまた、上記
実施の形態においては、波形生成演算処理(3)を連続
して行っているが、必ずしもこれに限られることはな
く、複数個に分割して行うようにしてもよい。
Further, in the above, the processing (5), (6), (7), (1), (2),
Although a series of processes are performed in the order of (3), the order of the processes is not necessarily limited to this. Furthermore, in the above embodiment, the waveform generation operation processing (3) is performed continuously, but the present invention is not necessarily limited to this, and the waveform generation calculation processing (3) may be performed by dividing into plural pieces.

【0079】さらにまた、上記においては、MIDIイ
ベントの割込処理において発音割当および音源レジスタ
の設定までまとめて実行するようになっていたが、この
割込処理において発音割当処理のみを実行するようにし
たり、あるいは、同割込処理では単に発生したMIDI
イベントをバッファに取り込む取込処理のみを実行する
ようにしてもよい。この場合には、MIDI割込処理か
ら発音割当ないし音源レジスタの設定を省略するかわり
に、同様の処理を例えば音源処理中で実行すればよいの
である。または、さらに、タイマなどで別の割込要因を
設定し、その割込処理で実行することも可能である。
Further, in the above description, in the interrupt processing of the MIDI event, the sound generation assignment and the setting of the tone generator register are collectively executed. Or simply generated MIDI in the interrupt processing
Only the capturing process for capturing the event into the buffer may be executed. In this case, instead of omitting the tone generation assignment or the setting of the tone generator register from the MIDI interrupt process, a similar process may be executed during the tone generator process, for example. Alternatively, it is also possible to set another interrupt factor using a timer or the like and execute the same in the interrupt processing.

【0080】さらにまた、上記割込処理は、上述したよ
うな割当処理や取込処理に限定されるものではなく、楽
音生成につながる演奏情報処理に関するものならばどの
ような処理でもよい。さらにまた、楽音生成方法は上述
した実施の形態のような波形メモリ方式に限定されるこ
とはなく、FM方式、物理モデル方式、ADPCM方式
など、どのような方式のものであってもよい。
Further, the above-mentioned interruption processing is not limited to the above-described assignment processing and capture processing, but may be any processing relating to performance information processing leading to musical tone generation. Furthermore, the musical sound generation method is not limited to the waveform memory method as in the above-described embodiment, but may be any method such as the FM method, the physical model method, and the ADPCM method.

【0081】[0081]

【発明の効果】本発明によれば、任意の汎用のOSと並
列的に波形生成演算を安定して実行することが可能とな
る。また、波形再生部から要求があったときに速やかに
波形データを出力することができ、データの受け渡しが
遅れる危険性をなくすことができる。さらに、外部から
入力された波形データに対して、ソフトウエア音源の音
色制御処理を施すことが可能となる。
According to the present invention, it is possible to stably execute a waveform generation operation in parallel with an arbitrary general-purpose OS. Further, when there is a request from the waveform reproducing unit, the waveform data can be output quickly, and the risk of delay in data transfer can be eliminated. Further, it is possible to perform a tone color control process of a software sound source on waveform data input from the outside.

【0082】さらにまた、演奏情報が発生した時点で処
理が増えて音源処理があまり実行できなくても、それ以
外の時点でその穴埋めをすることができるので、音源処
理を安定化することができる。さらにまた、演奏情報が
発生した時点での処理の増加分を空き時間内に分散化さ
せることができ、一時的な処理の増加を防止することが
できる。さらにまた、EG波形演算やLFO演算を間欠
的に行なうことにより、波形生成のための演算量を少な
くすることが可能となり、波形生成による処理負担を軽
減することができる。
Further, even if the number of processes increases at the time when the performance information is generated and the sound source processing cannot be executed much, the gap can be filled at other times, so that the sound source processing can be stabilized. . Furthermore, the increase in the processing at the time when the performance information is generated can be dispersed within the free time, and a temporary increase in the processing can be prevented. Furthermore, by intermittently performing the EG waveform calculation and the LFO calculation, the amount of calculation for generating the waveform can be reduced, and the processing load due to the waveform generation can be reduced.

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

【図1】 本発明の楽音発生方法が実行される処理装置
の一般的な構成を示すブロック図である。
FIG. 1 is a block diagram showing a general configuration of a processing device in which a musical sound generating method of the present invention is executed.

【図2】 本発明におけるソフトウエアモジュール構成
を示す図である。
FIG. 2 is a diagram showing a software module configuration according to the present invention.

【図3】 タスクの実行状態を説明するための図であ
る。
FIG. 3 is a diagram for explaining an execution state of a task.

【図4】 トーンジェネレータタスクの機能を説明する
ための図である。
FIG. 4 is a diagram for explaining a function of a tone generator task.

【図5】 楽音発生に関する各処理の実行タイミングを
説明するための図である。
FIG. 5 is a diagram for explaining an execution timing of each process related to generation of a musical tone.

【図6】 トーンジェネレータタスクのフローチャート
である。
FIG. 6 is a flowchart of a tone generator task.

【図7】 波形生成演算のフローチャートである。FIG. 7 is a flowchart of a waveform generation operation.

【図8】 波形生成演算の他の実施の形態を示すフロー
チャートである。
FIG. 8 is a flowchart showing another embodiment of the waveform generation operation.

【図9】 波形生成演算のさらに他の実施の形態を示す
フローチャートである。
FIG. 9 is a flowchart showing still another embodiment of the waveform generation operation.

【図10】 EG波形計算のフローチャートである。FIG. 10 is a flowchart of EG waveform calculation.

【図11】 LFO波形計算のフローチャートである。FIG. 11 is a flowchart of LFO waveform calculation.

【図12】 ボリュームおよびパンの補間演算のフロー
チャートである。
FIG. 12 is a flowchart of volume and pan interpolation calculation.

【図13】 EG波形およびLFO波形の例を示す図で
ある。
FIG. 13 is a diagram showing an example of an EG waveform and an LFO waveform.

【符号の説明】 1 CPU、2 ROM、3 RAM、4 タイマ、
5、27 MIDIインターフェース、6 キーボー
ド、7 ディスプレイ装置、8 ハードディスク装置、
9、26 コーデック回路、10 サウンドシステム、
11 音源ミキサ制御ソフト、12 MIDIシーケン
サソフト、13 ゲームソフトなど、14波形再生ソフ
ト、15、18 インタフェース、16 音源MIDI
ドライバ、17 WAVEドライバ、19 タスクディ
スパッチャ、20 トーンジェネレータタスク、21
ウェーブタスク、22 ミキサタスク、23 ライブラ
リ、24 コーデックドライバ、25 外部MIDIド
ライバ、41 波形テーブル合成処理、42 外部ステ
レオオーディオ信号入力処理、43 リバーブ処理、4
4 波形データメモリ、50 補間演算部、51、5
5、65 データ変換部、52、53、54 乗算部、
56、57、58、59、62、64 加算部、60、
61、63、66、67 バッファ、
[Description of Signs] 1 CPU, 2 ROM, 3 RAM, 4 timer,
5, 27 MIDI interface, 6 keyboard, 7 display device, 8 hard disk device,
9, 26 codec circuit, 10 sound system,
11 sound source mixer control software, 12 MIDI sequencer software, 13 game software, etc. 14 waveform reproduction software, 15, 18 interface, 16 sound source MIDI
Driver, 17 WAVE Driver, 19 Task Dispatcher, 20 Tone Generator Task, 21
Wave task, 22 mixer task, 23 library, 24 codec driver, 25 external MIDI driver, 41 waveform table synthesis processing, 42 external stereo audio signal input processing, 43 reverb processing, 4
4 Waveform data memory, 50 interpolation calculator, 51, 5
5, 65 data conversion unit, 52, 53, 54 multiplication unit
56, 57, 58, 59, 62, 64 adder, 60,
61, 63, 66, 67 buffers,

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G10H 7/02 G10H 1/02 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G10H 7/02 G10H 1/02

Claims (11)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 (1)所定のオペレーティングシステム
を実行するシステムステップ (2)前記所定のオペレーティングシステム上で実行さ
れるアプリケーションプログラムからの指示に基づい
て、複数のサンプリング周期にわたる所定期間に対応す
る複数サンプルの波形データを演算生成する波形生成ス
テップ、 (3)前記波形生成ステップにおいて演算生成された波
形データをサンプリング周期毎に1サンプルずつ出力す
る出力ステップ、および、 (4)前記所定期間内に、前記出力ステップからの要求
に応じて前記システムステップと前記波形生成ステップ
との間でタスク切換を行う制御ステップを含むことを特
徴とする、演算装置において実行される楽音発生方法。
(1) a system step of executing a predetermined operating system ; (2) a system step corresponding to a predetermined period over a plurality of sampling periods based on an instruction from an application program executed on the predetermined operating system .
Multiple samples of waveform generation step of computation generates waveform data that, (3) an output step of outputting the waveform data Oite operations generated the waveform generating step one sample every sampling period, and, (4) the A control step of switching a task between the system step and the waveform generation step in response to a request from the output step within a predetermined period.
A method for generating a musical tone executed in an arithmetic unit.
【請求項2】 (1)所定のオペレーティングシステム
を実行するシステムステップ、 (2)前記所定のオペレーティングシステム上で実行さ
れるアプリケーションプログラムからの指示に基づい
て、複数のサンプリング周期にわたる所定期間に対応す
る複数サンプルの波形データを演算生成する波形生成ス
テップ、 (3)前記波形生成ステップにおいて演算生成された波
形データをサンプリング周期毎に1サンプルずつ出力す
る出力ステップ、および、 (4)前記所定期間内に、前記出力ステップからの要求
に応じて前記システムステップと前記波形生成ステップ
との間でタスク切換を行う制御ステップを含み、 前記波形生成ステップは、前記複数サンプルの波形デー
タを演算生成するときに、それに用いる楽音制御パラメ
ータの更新処理を複数の波形サンプルを生成する毎に
行するようになされていることを特徴とする、演算装置
において実行される楽音発生方法。
(2) a system step of executing a predetermined operating system; (2) a system step corresponding to a predetermined period over a plurality of sampling periods based on an instruction from an application program executed on the predetermined operating system .
Multiple samples of waveform generation step of computation generates waveform data that, (3) an output step of outputting the waveform data calculated generated in the waveform generation step one sample every sampling period, and, (4) the predetermined period And a control step of performing task switching between the system step and the waveform generation step in response to a request from the output step, wherein the waveform generation step includes the waveform data of the plurality of samples.
Parameters to be used when generating
A tone generating method executed in the arithmetic unit, wherein the data updating process is performed every time a plurality of waveform samples are generated .
【請求項3】 (1)演奏情報を入力する入力ステッ
プ、 (2)複数のサンプリング周期にわたる所定期間内に入
力された前記演奏情報に基づいて、該所定期間に対応
る複数サンプルの波形データを演算生成する波形生成ス
テップ、 (3)波形データをサンプリング周期毎に1サンプルず
つ出力する出力ステップ、 (4)前記波形生成ステップにおいて演算生成された前
複数サンプルの波形データを、前記出力ステップに受
け渡しする受け渡しステップ、および、 (5)前記出力ステップに受け渡された波形データの出
力が進行したことを検出して、波形データの受け渡しを
要求する要求ステップを含み、 前記波形生成ステップは、前記複数サンプルの波形デー
タを演算生成するときに、それに用いる楽音制御パラメ
ータの更新処理を複数の波形サンプルを生成する毎に
行するようになされており、 また、前記要求ステップからの要求に応じて、前記受け
渡しステップが実行され、その後に前記波形生成ステッ
プが実行されることを特徴とする、演算装置において実
行される楽音発生方法。
Wherein (1) an input step of inputting performance information, on the basis of the performance information inputted within a predetermined time period over a plurality of sampling periods (2), to respond to the predetermined period
That a plurality of samples of waveform generation step of calculating generates waveform data, (3) outputting step of the waveform data to output one sample every sampling period, (4) the waveform generating step the plurality of samples of the waveform computed produced in A transfer step of transferring data to the output step; and (5) a request step of detecting that the output of the waveform data transferred to the output step has progressed, and requesting the transfer of the waveform data, The waveform generating step includes a step of generating the waveform data of the plurality of samples.
Parameters to be used when generating
Data updating process is performed each time a plurality of waveform samples are generated . In addition, in response to a request from the requesting step, the delivery step is performed, and thereafter, the A method for generating a musical tone performed in an arithmetic unit, wherein a waveform generating step is performed.
【請求項4】 (1)演奏情報を入力する入力ステッ
プ、 (2)複数のサンプリング周期にわたる所定期間内に入
力された前記演奏情報に基づいて、該所定期間に対応
る複数サンプルの波形データを演算生成する波形生成ス
テップ、 (3)前記所定期間に対応する複数サンプルの外部波形
データを入力して、前記波形生成ステップにおいて演算
生成された前記複数サンプルの波形データと合成する波
形合成ステップ、 (4)前記波形合成ステップにおいて合成された波形デ
ータに対して信号処理を施す波形処理ステップ、およ
び、 (5)前記波形処理ステップにおいて信号処理が施され
た波形データをサンプリング周期毎に1サンプルずつ出
力する出力ステップを含み、 前記波形生成ステップは、前記複数サンプルの波形デー
タを演算生成するときに、それに用いる楽音制御パラメ
ータの更新処理を複数の波形サンプルを生成する毎に
行するようになされていることを特徴とする、演算装置
において実行される楽音発生方法。
4. An input step for inputting performance information, and (2) an input step corresponding to the predetermined period based on the performance information input within a predetermined period over a plurality of sampling periods .
Multiple samples of waveform generation step of calculating generates waveform data that, (3) the input the external waveform data of a plurality of samples corresponding to a predetermined period, the plurality of samples of waveforms Oite operation generated the waveform generation step waveform synthesis step of combining the data, (4) the waveform processing step of applying signal processing to the synthesized waveform data in the waveform synthesis step, Oyo
And (5) outputting the waveform data on which the signal processing has been performed in the waveform processing step, one sample at a time for each sampling period, and the waveform generation step includes :
Parameters to be used when generating
A tone generating method executed in the arithmetic unit, wherein the data updating process is performed every time a plurality of waveform samples are generated .
【請求項5】 (1)演奏情報を入力する入力ステッ
プ、 (2)複数のサンプリング周期にわたる所定期間内に入
力された前記演奏情報に基づいて、該所定期間に対応す
る複数サンプルの波形データを演算生成する波形生成ス
テップ、および、 (3)前記波形生成ステップにおいて演算生成された波
形データをサンプリング周期毎に1サンプルずつ出力す
る出力ステップを含み、 前記波形生成ステップは、前記複数サンプルの波形デー
タを演算生成するときに、それに用いる楽音制御パラメ
ータの更新処理を複数の波形サンプルを生成する毎に実
行するようになされていることを特徴とする、演算装置
において実行される楽音発生方法。
5. An input step of inputting performance information. 2. A waveform data of a plurality of samples corresponding to the predetermined period is inputted based on the performance information input within a predetermined period over a plurality of sampling periods. A waveform generating step for calculating and generating; and (3) an outputting step of outputting the waveform data calculated and generated in the waveform generating step one sample at a time for each sampling period, wherein the waveform generating step includes the waveform data of the plurality of samples. Wherein a tone generation control parameter used in the calculation is updated each time a plurality of waveform samples are generated.
【請求項6】 1または複数の指定された楽音を発生す
るための1または複数の演奏情報を受け取る第1のステ
ップと、 前記演奏情報に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音に対応する楽音制御パラメータを割り当てられた各
発音チャンネルに対して設定する第2のステップと、 前記各発音チャンネル毎に設定された楽音制御パラメー
に基づき各発音チャンネル毎に複数のサンプリング
周期にわたる所定期間に対応する複数サンプルの波形デ
ータを生成するステップであって、該複数サンプルの波
形データを生成するときに、それに用いるエンベロープ
値については複数の波形サンプルを生成する毎に更新す
るようになされた第3のステップと、 前記第3のステップにおいて生成された各発音チャンネ
ルの波形データを混合し、混合波形データを生成する
第4のステップと 前記混合波形データをサンプリング周期毎に1サンプル
ずつ出力する第5のステップと を具備することを特徴と
する楽音発生方法。
6. A first step of receiving one or a plurality of performance information for generating one or a plurality of designated musical tones, and, in response to the performance information, transmitting each of the designated musical tones to a plurality of sounding channels. A second step of assigning a tone control parameter corresponding to the designated tone to each assigned tone channel; and setting tone control parameters set for each tone channel.
Based on data, a plurality of sampling for each sound channel
And generating a waveform data of a plurality samples corresponding to a predetermined time period over period, the wave of said plurality of samples
When generating the shape data, the third step and the third of each sound channel generated in step adapted to update each time generating the waveform samples more than about envelope value for use therein
Engaged mixing Le waveform data, and a fourth step of generating a mixed waveform data, one sample the mixed waveform data for each sampling period
And a fifth step of outputting a tone each time .
【請求項7】 1または複数の指定された楽音を発生す
るための1または複数の演奏情報を受け取る第1のステ
ップと、 前記演奏情報に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音に対応する楽音制御パラメータを割り当てられた各
発音チャンネルに対して設定する第2のステップと、 前記各発音チャンネル毎に設定された楽音制御パラメー
に基づき各発音チャンネル毎に複数のサンプリング
周期にわたる所定期間に対応する複数サンプルの波形デ
ータを生成する第3のステップと、 前記第3のステップにおいて生成された各発音チャンネ
ルの波形データをそれぞれ少なくとも2系列に分岐し、
それぞれのレベルを独立に制御して各系列ごとに混合す
ることにより、少なくとも第1及び第2の波形データ
得る第4のステップと 前記第1及び第2の波形データをサンプリング周期毎に
それぞれ1サンプルずつ出力する第5のステップと を具
備することを特徴とする楽音発生方法。
7. A first step of receiving one or a plurality of performance information for generating one or a plurality of designated musical tones, and, in response to the performance information, transmitting each of the designated musical tones to a plurality of sounding channels. A second step of setting a tone control parameter corresponding to the designated tone for each assigned tone channel; and a tone control parameter set for each tone channel.
Based on data, a plurality of sampling for each sound channel
A third step of generating waveform data of a plurality samples corresponding to a predetermined time period over period, the sound generated in the third step channel
Each of the waveform data into at least two series,
Control each level independently and mix for each series
The Rukoto, a fourth step of obtaining at least first and second waveform data, the first and second waveform data at every sampling period
And a fifth step of outputting one sample each .
【請求項8】 1または複数の指定された楽音を発生す
るための1または複数の演奏情報を受け取る第1のステ
ップと、 前記演奏情報に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音に対応する楽音制御パラメータを割り当てられた各
発音チャンネルに対して設定する第2のステップと、 前記各発音チャンネル毎に設定された楽音制御パラメー
タに基づき、各発音チャンネル毎に複数のサンプリング
周期にわたる所定期間に対応する複数サンプルの波形デ
ータを生成する第3のステップと、 前記第3のステップにおいて生成された各発音チャンネ
ルの波形データをそれぞれ少なくとも2系列に分岐し、
それぞれのレベルを独立に制御して各系列ごとに混合す
ることにより、少なくとも第1及び第2の波形データを
得る第4のステップと、 前記第2の波形データに対して信号処理を施す第5のス
テップと、 前記第1の波形データと信号処理の施された前記第2の
波形データとを混合して、混合波形データを得る第6の
ステップと、 前記混合波形データをサンプリング周期毎にそれぞれ1
サンプルずつ出力する第7のステップとを具備すること
を特徴とする楽音発生方法。
8. A first step of receiving one or a plurality of performance information for generating one or a plurality of designated musical tones, and responding to the performance information by converting each of the designated musical tones to a plurality of sounding channels. A second step of assigning a tone control parameter corresponding to the designated tone to each assigned tone channel; and setting a tone control parameter set to each tone channel. A third step of generating waveform data of a plurality of samples corresponding to a predetermined period over a plurality of sampling periods for each sounding channel, based on Branch into two lines,
A fourth step of obtaining at least first and second waveform data by independently controlling the respective levels and mixing for each stream; and a fifth step of performing signal processing on the second waveform data. A step of mixing the first waveform data and the second waveform data subjected to signal processing to obtain mixed waveform data; and a step of mixing the mixed waveform data for each sampling cycle. 1
And outputting a sample.
【請求項9】 1または複数の指定された楽音を発生す
るための1または複数の演奏情報を受け取る第1のステ
ップと、 前記演奏情報に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音に対応する楽音制御パラメータを割り当てられた各
発音チャンネルに対して設定する第2のステップと、 前記各発音チャンネル毎に設定された楽音制御パラメー
に基づき各発音チャンネル毎に複数のサンプリング
周期にわたる所定期間に対応する複数サンプルの波形デ
ータを生成する第3のステップと、 前記第3のステップにおいて生成された各発音チャンネ
ルの波形データを混合し第1の混合波形データを生
成する第4のステップと、 前記第4のステップにおいて生成された第1の混合波形
データと外部から入力された外部波形サンプルデータ
を混合して、第2の混合波形データを生成する第5のス
テップと 前記第2の混合波形データをサンプリング周期毎に1サ
ンプルずつ出力する第6のステップと を具備することを
特徴とする楽音発生方法。
9. A first step for receiving one or a plurality of pieces of performance information for generating one or a plurality of specified musical tones, and responding to the performance information, A second step of assigning a tone to each of a plurality of tone channels and setting tone control parameters corresponding to the designated tone to each assigned tone channel; Set tone control parameters
Based on data, a plurality of sampling for each sound channel
A third step of generating waveform data of a plurality samples corresponding to a predetermined time period over period, the sound generated in the third step channel
Le waveform data combined mixing, a fourth step and said first mixing the waveform data and the external waveform sample data inputted from the outside, which is generated in the fourth step of generating a first mixed waveform data When
Were mixed, and the fifth step of generating a second mixed waveform data, 1 support the second mixed waveform data for each sampling period
And a sixth step of outputting each sample .
【請求項10】 コンピュータと、前記コンピュータに
接続され、前記コンピュータから出力される波形データ
をアナログ音信号に変換するデジタル/アナログ変換器
とを備え、受け取った波形データおよび演奏情報に基づ
いて楽音波形データを合成してアナログ音信号として出
力する楽音発生装置であって、 前記コンピュータは、次のプログラム(a)〜(c)に
したがって処理を行なうことを特徴とする楽音発生装
置: (a)アプリケーションプログラムからの波形データ
、複数のサンプリング周期にわたる所定期間に対応す
る複数サンプルずつ読み込む読込みプログラム、 (b)アプリケーションプログラムからの演奏情報に基
づいて、前記所定期間に対応する複数サンプルの波形デ
ータを生成する音源プログラム、 (c)前記読込みプログラムにより読み込んだ波形デー
タと前記音源プログラムにより生成された波形データと
を合成して、サンプリング周期毎に1サンプルずつ前記
デジタル/アナログ変換器に出力する合成処理プログラ
ム。
10. A computer which is connected to the computer and which converts a waveform data output from the computer into an analog sound signal, wherein the digital / analog converter converts the waveform data into an analog sound signal. A tone generator for synthesizing data and outputting it as an analog sound signal, wherein said computer performs processing according to the following programs (a) to (c): (a) application Waveform data from the program corresponds to a predetermined period over a plurality of sampling periods.
A reading program for reading a plurality of samples at a time , (b) based on performance information from an application program.
A sound source program for generating waveform data of a plurality of samples corresponding to the predetermined period ; (c) synthesizing the waveform data read by the reading program and the waveform data generated by the sound source program, and And a synthesizing program for outputting to the digital / analog converter one sample at a time.
【請求項11】 コンピュータと、前記コンピュータに
接続され、前記コンピュータから出力される波形データ
をアナログ音信号に変換するデジタル/アナログ変換器
とを備え、受け取った波形データおよび演奏情報に基づ
いて楽音波形データを合成してアナログ音信号として出
力する楽音発生装置であって、 前記コンピュータは、次のプログラム(a)〜(f)に
したがって処理を行なうことを特徴とする楽音発生装
置: (a)アプリケーションプログラムからの整数形式の波
形データを浮動小数点データに変換する第1のデータ変
換プログラム、 (b)アプリケーションプログラムからの演奏情報に基
づいて整数形式の波形データを生成する音源プログラ
ム、 (c)前記音源プログラムからの波形データを浮動小数
点データに変換する第2のデータ変換プログラム、 (d)前記第1のデータ変換プログラムの出力する浮動
小数点データと前記第2のデータ変換プログラムの出力
する浮動小数点データを合成する合成プログラム、 (e)前記合成プログラムにより合成された浮動小数点
データに対して信号処理を施す波形処理プログラム、 (f)前記波形処理プログラムにより信号処理の施され
た浮動小数点データを整数形式のデータに変換して前記
デジタル/アナログ変換器に出力する第3のデータ変換
プログラム。
11. A computer comprising: a computer; a digital / analog converter connected to the computer for converting waveform data output from the computer into an analog sound signal; a tone waveform based on the received waveform data and performance information; A tone generator for synthesizing data and outputting as an analog sound signal, wherein said computer performs processing according to the following programs (a) to (f): (a) application A first data conversion program for converting integer-format waveform data from a program into floating-point data; (b) a tone generator program for generating integer-format waveform data based on performance information from an application program; (c) the tone generator Convert waveform data from program to floating point data (D) a combining program for combining floating-point data output from the first data conversion program and floating-point data output from the second data conversion program; (e) combining using the combining program And (f) converting the floating-point data subjected to signal processing by the waveform processing program into integer format data and outputting the converted data to the digital / analog converter. A third data conversion program to perform.
JP02332396A 1995-05-19 1996-01-17 Musical sound generating method and apparatus Expired - Lifetime JP3246312B2 (en)

Priority Applications (10)

Application Number Priority Date Filing Date Title
JP02332396A JP3246312B2 (en) 1995-09-20 1996-01-17 Musical sound generating method and apparatus
DE69619587T DE69619587T2 (en) 1995-05-19 1996-05-15 Method and device for sound generation
EP96107770A EP0743631B1 (en) 1995-05-19 1996-05-15 Tone generating method and device
US08/649,168 US5895877A (en) 1995-05-19 1996-05-17 Tone generating method and device
CN 200510116176 CN1763839B (en) 1995-05-19 1996-05-17 Tone generating method and device
CNB031251706A CN100495532C (en) 1995-05-19 1996-05-17 Tone generation method and apparatus
CN 200510116175 CN1763838B (en) 1995-05-19 1996-05-17 Tone generating method and device
CN96100281A CN1129110C (en) 1995-05-19 1996-05-17 Noise generating method and device
KR1019960016767A KR100421589B1 (en) 1995-05-19 1996-05-18 Tone generating method and apparatus thereof
US09/222,395 US6184455B1 (en) 1995-05-19 1998-12-29 Tone generating method and device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP7-264629 1995-09-20
JP26462995 1995-09-20
JP02332396A JP3246312B2 (en) 1995-09-20 1996-01-17 Musical sound generating method and apparatus

Publications (2)

Publication Number Publication Date
JPH09146556A JPH09146556A (en) 1997-06-06
JP3246312B2 true JP3246312B2 (en) 2002-01-15

Family

ID=26360663

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02332396A Expired - Lifetime JP3246312B2 (en) 1995-05-19 1996-01-17 Musical sound generating method and apparatus

Country Status (1)

Country Link
JP (1) JP3246312B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7663046B2 (en) * 2007-03-22 2010-02-16 Qualcomm Incorporated Pipeline techniques for processing musical instrument digital interface (MIDI) files

Also Published As

Publication number Publication date
JPH09146556A (en) 1997-06-06

Similar Documents

Publication Publication Date Title
EP0743631B1 (en) Tone generating method and device
US5703310A (en) Automatic performance data processing system with judging CPU operation-capacity
US5691493A (en) Multi-channel tone generation apparatus with multiple CPU&#39;s executing programs in parallel
JP2970689B2 (en) Audio synthesizer
EP0750290B1 (en) Method and device for forming a tone waveform by combined use of different waveform sample forming resolutions
JP3324672B2 (en) Real-time digital speech reverberation system
US6326537B1 (en) Method and apparatus for generating musical tone waveforms by user input of sample waveform frequency
EP1005015B1 (en) Tone waveform generating method and apparatus based on software
JP2924745B2 (en) Musical sound generating apparatus and method
JP3246312B2 (en) Musical sound generating method and apparatus
US5920843A (en) Signal parameter track time slice control point, step duration, and staircase delta determination, for synthesizing audio by plural functional components
JP3269361B2 (en) Musical sound generating method and apparatus
JP3137043B2 (en) Waveform memory tone generator and tone generator
JP3246405B2 (en) Musical sound generating method, musical sound generating device, and recording medium recording musical sound generating program
EP0954846B1 (en) Music chip
JP3141789B2 (en) Sound source system using computer software
JP3725247B2 (en) Music generation processing method
CN1763838B (en) Tone generating method and device
JP3285137B2 (en) Musical sound generating apparatus and musical sound generating method, and storage medium storing program according to the method
JP3275678B2 (en) Musical sound generating method and apparatus
JP3148803B2 (en) Sound source device
JP3632744B2 (en) Sound generation method
JPH10207465A (en) Method of generating musical sound and device therefor
JP2797138B2 (en) Processing equipment for electronic musical instruments
JPH0659678A (en) Electronic musical instrument

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20011002

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20071102

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20081102

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20081102

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20091102

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20101102

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20111102

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20111102

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20121102

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20121102

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20131102

Year of fee payment: 12

EXPY Cancellation because of completion of term