JP3003559B2 - Music generation method - Google Patents

Music generation method

Info

Publication number
JP3003559B2
JP3003559B2 JP7299185A JP29918595A JP3003559B2 JP 3003559 B2 JP3003559 B2 JP 3003559B2 JP 7299185 A JP7299185 A JP 7299185A JP 29918595 A JP29918595 A JP 29918595A JP 3003559 B2 JP3003559 B2 JP 3003559B2
Authority
JP
Japan
Prior art keywords
channel
sound
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
JP7299185A
Other languages
Japanese (ja)
Other versions
JPH0944160A (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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=26475669&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JP3003559(B2) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP7299185A priority Critical patent/JP3003559B2/en
Publication of JPH0944160A publication Critical patent/JPH0944160A/en
Application granted granted Critical
Publication of JP3003559B2 publication Critical patent/JP3003559B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、演算処理装置を備
える汎用処理装置により楽音を生成できるようにした楽
音生成方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for generating musical tones by a general-purpose processing unit having an arithmetic processing unit.

【0002】[0002]

【従来の技術】従来の楽音生成装置は、通常、MIDI
(Musical Instrument Digital Interface)、鍵盤、あ
るいはシーケンサ等からの演奏情報を入力する演奏入力
部、楽音波形を生成する音源部、入力した演奏情報に応
じて前記音源部を制御するマイクロプロセッサ(CP
U)等から構成されていた。CPUは、入力した演奏情
報に応じて、チャンネルアサイン、パラメータ変換等の
音源ドライバ処理(演奏処理)を実行し、音源部の割り
当てたチャンネルに変換したパラメータと発音開始指示
(ノートオン)を音源部に供給する。音源部は、LSI
(Large Scale Integrated circuit)等の電子回路(ハ
ードウェア)で構成され、供給されたパラメータに基づ
いて楽音波形を生成する。このため、楽音生成装置は楽
音を生成するための専用機器となってしまい、楽音を生
成する時には専用の楽音生成装置を用意する必要があっ
た。
2. Description of the Related Art A conventional musical sound generating apparatus is usually provided with 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 sound waveforms, and a microprocessor (CP) for controlling the sound source section in accordance with the input performance information.
U) etc. The CPU executes sound source driver processing (performance processing) such as channel assignment and parameter conversion in accordance with the input performance information, and outputs the parameters converted to the channels assigned by the sound source section and the sound generation start instruction (note on) to the sound source section. To supply. The sound source section is an LSI
(Large Scale Integrated circuit) and other electronic circuits (hardware), and generates musical tone waveforms based on the supplied parameters. 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】そこで、これを解決するために、CPUに
よりアプリケーションプログラムを実行し、アプリケー
ションプログラムに基づいて楽音を生成する楽音生成方
法が提案されている。この楽音生成方法においては、楽
音を生成するアプリケーションプログラムのほかに他の
アプリケーションプログラムを実行させることができ、
他の機能も実行させることのできる汎用の演算処理装置
により実行することができるものである。
To solve this problem, there has been proposed a tone generation method in which an application program is executed by a CPU and a tone is generated based on the application program. In this musical sound generation method, other application programs can be executed in addition to the application program for generating musical sounds.
It can be executed by a general-purpose processing unit capable of executing other functions.

【0004】[0004]

【発明が解決しようとする課題】ところで、演算処理装
置(CPU)を備える汎用の装置によりアプリケーショ
ンプログラムを実行させて楽音を生成する場合、従来は
1サンプリング周期(デジタル・アナログ変換器の変換
タイミング)毎に各チャンネルの楽音波形サンプルを発
音チャンネル分演算生成するようにしている。従って、
CPUは各発音チャンネルの処理を行う場合、まず、前
回の当該発音チャンネルの演算に用いた各種レジスタ値
をメモリからCPUのレジスタに読み出す等の準備処理
が行われる。また、当該発音チャンネルの楽音生成処理
後には次回の処理のため、前記レジスタ値をメモリに書
き込む必要がある。すなわち、各発音チャンネルの楽音
波形サンプルの演算処理を1サンプルずつ生成するよう
にしていたため、楽音を生成する楽音生成処理以外の、
準備処理に多くのCPUの演算時間が費やされ(オーバ
ヘッドが大きくなる)、演算効率が悪くなり応答や楽音
生成処理が遅くなるという問題点があった。
When a musical tone is generated by executing an application program by a general-purpose device having an arithmetic processing unit (CPU), one sampling period (conversion timing of a digital / analog converter) is conventionally used. Each time, a tone waveform sample of each channel is calculated and generated for each sounding channel. Therefore,
When the CPU performs the processing of each sounding channel, first, preparation processing such as reading various register values used for the previous calculation of the sounding channel from the memory to the register of the CPU is performed. After the tone generation process for the tone generation channel, the register value needs to be written to the memory for the next process. That is, since the arithmetic processing of the musical tone waveform samples of each sounding channel is generated one by one, the processing other than the musical sound generating processing for generating musical tones is performed.
There is a problem that a lot of calculation time of the CPU is spent for the preparation processing (overhead becomes large), the calculation efficiency is reduced, and the response and the tone generation processing are delayed.

【0005】また、上記楽音生成方法において、演奏処
理とは、入力した演奏情報に基づき、生成される楽音を
制御する制御情報を作成する処理である。他方、音源処
理とは、作成された制御情報に基づき楽音の波形データ
を生成する処理である。例えば、通常は押鍵検出等の演
奏処理を実行し、この演奏処理に対して各サンプリング
周期で音源処理を割り込み実行して、1サンプル分の波
形データを生成した後、演奏処理に復帰するようにして
いる。
[0005] In the above tone generation method, the performance process is a process of creating control information for controlling the generated tone based on the input performance information. On the other hand, the tone generator process is a process of generating waveform data of a musical tone based on the created control information. For example, normally, a performance process such as a key press detection is executed, a tone generator process is interrupted at each sampling period for the performance process, waveform data for one sample is generated, and then the process returns to the performance process. I have to.

【0006】演奏情報(MIDI)は、演奏者の演奏操
作やシーケンサでのイベントの再生により発生し、演奏
情報が発生した場合には演奏処理により演奏情報が処理
される。つまり、演奏情報の発生した時点では、CPU
は、通常の音源処理に加えて演奏処理を実行しなければ
ならないため、非定期的に発生する演奏情報により、演
算量が一時的に増加することになる。しかしながら、従
来の楽音生成方法においてはこれに対応しておらず、音
源処理は、演奏情報のあるなしにかかわらず定期的に優
先実行され、場合によっては演奏処理が遅れてしまうと
いう問題点があった。なお、このような演奏処理の遅れ
を防止するために、演奏処理の優先度を上げることが考
えられるが、このようにすると今度は、一時的に発音数
が減少したり、楽音波形が途切れてしまうという問題が
発生することになる。
[0006] Performance information (MIDI) 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 a performance process. In other words, when the performance information is generated, the CPU
Must perform performance processing in addition to normal sound source processing, so that the amount of calculation temporarily increases due to 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. Was. In order to prevent such a delay in the performance process, it is conceivable to raise the priority of the performance process. However, in this case, the number of sounds temporarily decreases or the musical sound waveform is interrupted. The problem that it ends up occurs.

【0007】そこで、本発明はCPUのオーバヘッドを
少なくすることのできる楽音生成方法を提供することを
目的としている。また、本発明は一時的に処理量が増加
しないようにした楽音生成方法を提供することを目的と
している。
SUMMARY OF THE INVENTION It is an object of the present invention to provide a tone generation method capable of reducing the overhead of a CPU. Another object of the present invention is to provide a musical sound generation method in which the processing amount is not temporarily increased.

【0008】[0008]

【課題を解決するための手段】前記目的を解決するため
に、本発明の音生成方法は、指定された音を発生するた
めの発生命令を発行する第1のステップと、指定された
音を複数の発音チャンネルの1つに割り当て、割り当て
たチャンネルに対応して該指定された音の制御データを
レジスタに記憶する第2のステップと、所定時間間隔で
演算開始命令を発行する第3のステップと、各演算開始
命令に応じて、前記レジスタに記憶された制御データに
基づき各チャンネル毎の波形データの複数サンプルをま
とめて算術的に生成するように前記各チャンネルで音生
成演算を実行する第4のステップであって、この音生成
演算は、生成すべき該複数サンプル分のサンプリング周
期を合計した時間よりも短い時間内で行われることと
個々のチャンネルで生成された波形データのサンプルを
各サンプル点毎に混合し、該各サンプル点毎の混合サン
プルデータを生成する第5のステップと、各サンプリン
グ周期毎に順次サンプル点の前記混合サンプルデータを
順次出力する第6のステップとを具備するようにしたも
のである。
In order to achieve the above object, a sound generating method according to the present invention is provided for generating a designated sound.
A first step of issuing generation instructions because, designated
Assign and assign sounds to one of multiple sound channels
Control data of the specified sound corresponding to the channel
A second step of storing in the register, and a third step of issuing calculation start command at a predetermined time interval, the start of each operation
According to the instruction, the control data stored in the register
Multiple samples of waveform data for each channel based on
Sound generation on each of the above channels to generate arithmetically
A fourth step of performing a synthetic operation,
The calculation is based on the sampling cycle for the plurality of samples to be generated.
Less than the total time ,
Samples of waveform data generated by individual channels
Mix at each sample point and mix at each sample point.
A fifth step of generating a pull data, each sampling
The mixed sample data of the sample points are sequentially
It is obtained so as to include a sixth step of sequentially outputting.

【0009】また、前記音生成方法において、前記各発
生命令に応じて、第1の途中演算開始命令を発行する第
1の途中演算開始命令発行ステップをさらに備え、前記
第4のステップにおいて、前記第3のステップによる所
定時間間隔の演算開始命令の発行と前記第1の途中演算
開始命令発行ステップによる第1の途中演算開始命令の
発行とに応答して、生成済の波形データの末尾から前記
演算開始命令あるいは前記第1の途中演算開始命令の発
時点までの区間に対応する複数サンプルの波形データ
を生成するようにしたものである。さらにまた、前記音
生成方法において、前記第3のステップで演算開始命令
が発行される時間間隔を複数に分割し、該分割された時
間間隔で第2の途中演算開始命令を発行する第2の途中
演算開始命令発行ステップをさらに備え、前記第4のス
テップにおいて、前記第2の途中演算開始命令の発行に
応答して複数サンプルの波形データを生成するようにし
たものである。
In the above-mentioned sound generation method, each of the above
Issue a first intermediate operation start instruction in response to a raw instruction
The method further comprises the step of:
In the fourth step, the place according to the third step
Issuing a calculation start instruction at a fixed time interval and the first halfway calculation
Of the first intermediate operation start instruction in the start instruction issue step
In response to the issue and, from said trailing Seeded waveform data
Issuing an operation start instruction or the first intermediate operation start instruction
The waveform data of a plurality of samples corresponding to the section up to the line time is generated. Furthermore, the sound
In the generation method, in the third step, an operation start instruction
Is divided into a plurality of time intervals at which
The second halfway of issuing the second halfway operation start instruction at an interval
An operation start instruction issuance step, wherein the fourth step
In the step, the second intermediate operation start instruction is issued.
Respond to generate multiple samples of waveform data
It is a thing.

【0010】次に、本発明の他の楽音生成方法は、複数
の指定楽音を発生するための発生命令を発行する第1の
ステップと、各指定楽音を複数の発音チャンネルの中か
ら指定されたいずれかの発音チャンネルに割り当て、該
指定楽音の制御データを各指定された発音チャンネルの
チャンネルレジスタに書き込んで記憶させる第2のステ
ップと、所定時間間隔で演算開始命令を発行する第3の
ステップと、前記第3のステップで発行された各演算開
始命令に応じて、前記チャンネルのチャンネルレジスタ
に記憶された制御データに基づき各指定された発音チャ
ンネル毎に複数サンプル分の波形データを算術的に生成
する第4のステップと、前記第4のステップで指定され
た発音チャンネルにつき生成された波形データを、各サ
ンプル毎に混合し、前記複数サンプルの各々についての
混合サンプルデータを生成する第5のステップと、該複
数サンプル分の混合サンプルデータを、サンプリング周
期毎にアナログ信号に変換する第6のステップとからな
り、前記第4のステップでは、他のチャンネルよりも大
きな音量を持つ楽音を発生している少なくとも1つのチ
ャンネルを優先する所定の条件に従って、波形データの
算術的生成を行うようにしたものである。
[0010] Next, another tone generating method of the present invention, a plurality
Issue a generation instruction for generating a designated musical tone
Step and whether each specified musical tone is in multiple sound channels
Assigned to one of the specified sound channels, and
The control data of the specified musical tone is
Second step for writing and storing in the channel register
And a third instruction for issuing an operation start instruction at predetermined time intervals.
Step and each operation opening issued in the third step.
The channel register of the channel according to the start command
Each specified pronunciation chord based on the control data stored in the
Arithmetic generation of waveform data for multiple samples for each channel
A fourth step of performing
The waveform data generated for each sound channel.
Mixed for each sample, and
A fifth step of generating mixed sample data;
The mixed sample data of several samples
The sixth step of converting to an analog signal every period.
Therefore, in the fourth step, the channel is larger than the other channels.
At least one channel generating a tone with a loud volume.
According to the predetermined conditions that prioritize the channel,
It is intended to perform arithmetic generation .

【0011】次に、本発明のさらに他の楽音生成方法
は、1または複数の指定された楽音を発生するための1
または複数の発生命令を受け取る第1のステップと、
記発生命令に応答して、各指定された楽音を複数の発音
チャンネルのうちの各1つに割り当て、該指定された楽
音の制御データを各指定された楽音が割り当てられた各
発音チャンネルに対応するチャンネルレジスタに書き込
第2のステップと、各発音チャンネルで発生すべき楽
音の重要度を決定する第3のステップと、演算開始命令
を順次発行する第4のステップと、前記第4のステップ
で発行される演算開始命令の各々に応答して、前記チャ
ンネルレジスタに記憶された制御データに基づき、かつ
前記第3のステップで決定した重要度に従って、前記複
数の発音チャンネルのうちの任意数のチャンネルにつき
複数サンプル分の波形データを生成する第5のステップ
と、前記第5のステップで各発音チャンネルにつき生成
されたチャンネル別波形データを、前記複数サンプルの
各サンプル毎に混合し、混合サンプルデータを生成する
第5のステップとを具備するようにしたものである。
Next, still another tone generating method according to the present invention is a method for generating one or a plurality of designated musical tones.
Or a first step of receiving a plurality of generation instructions, before
Each specified musical tone in response to a note generation instruction
Assigned to each one of the channels,
The sound control data is assigned to each specified tone.
Write to the channel register corresponding to the sound channel
No and a second step, easy to be generated in each tone generation channel
A third step of determining the importance of the sound, and a calculation start instruction
A fourth step of sequentially issuing, the fourth step
In response to each of the operation start instructions issued by
Based on the control data stored in the channel register, and
The duplication is performed according to the importance determined in the third step.
A fifth step of generating waveform data for a plurality of samples for an arbitrary number of the sounding channels, and generating the waveform data for each sounding channel in the fifth step.
The divided waveform data for each channel is
Mixed for each sample, it is obtained so as to comprise a <br/> fifth step of generating a mixed sample data.

【0012】本発明のさらに他の楽音生成方法は、1ま
たは複数の指定された楽音を発生するための1または複
数の発生命令を受け取る第1のステップと、前記発生命
令に応答して、前記指定された楽音を複数の発音チヤン
ネルの中から指定された発音チャンネルに割り当て、当
該指定された楽音の制御データを当該指定された楽音が
割り当てられた発音チャンネルに対応するチャンネルレ
ジスタに書き込む第2のステップと、演算開始命令を順
次発行する第3のステップと、各演算開始命令に応答し
て、前記チャンネルのチャンネルレジスタに記憶された
制御データに基づき各発音チャンネル毎に複数サンプル
分の波形データを生成する演算を行う第4のステップ
と、前記第4のステップで各発音チャンネルにつき生成
された波形データを、前記複数サンプルの各サンプル毎
に混合し、混合サンプルデータを生成する第5のステッ
プと、すべての前記指定された発音チャンネルについて
の演算が所定の時間期間内に完了しないだろうと判定さ
れたとき、少なくとも1つの発音チャンネルについての
波形データの生成を変更する命令を発行する第6のステ
ップとを具備するようにしたものである。本発明のさら
に他の楽音生成方法は、1または複数の指定された楽音
を発生するための1または複数の発生命令を受け取る第
1のステップと、前記発生命令に応答して、各指定され
た楽音を複数の発音チャンネルのうちの各1つに割り当
て、該指定された楽音の制御データを各指定された楽音
が割り当てられた各発音チャンネルに対応するチャンネ
ルレジスタに書き込む第2のステップと、演算開始命令
を順次発行する第3のステップと、各演算開始命令に応
答して、前記チャンネルのチャンネルレジスタに記憶さ
れた制御データに基づき各発音チャンネル毎に複数サン
プル分の波形データを生成する第4のステップと、前記
第4のステップで各発音チャンネルにつき生成された波
形データを、前記複数サンプルの各サンプル毎に混合
し、混合サンプルデータを生成する第5のステップとを
具備し、前記第4のステップは、特定の時間期間内で波
形データの生成が可能な発音チャンネルがどれであるか
を判定し、可能であると判定された発音チャンネルにつ
いてのみ前記波形データの生成を行うようにしたもので
ある。 本発明のさらに他の楽音生成方法は、1または複
数の指定された楽音を発生す るための1または複数の発
生命令を受け取る第1のステップと、前記発生命令に応
答して、各指定された楽音を複数の発音チャンネルのう
ちの各1つに割り当て、該指定された楽音の制御データ
を各指定された楽音が割り当てられた各発音チャンネル
に対応するチャンネルレジスタに書き込む第2のステッ
プと、演算開始命令を順次発行する第3のステップと、
各演算開始命令に応答して、前記チャンネルのチャンネ
ルレジスタに記憶された制御データに基づき各発音チャ
ンネル毎に複数サンプル分の波形データを生成する第4
のステップと、前記第4のステップで各発音チャンネル
につき生成された波形データを、前記複数サンプルの各
サンプル毎に混合し、混合サンプルデータを生成する第
5のステップとを具備し、前記第4のステップは、発音
チャンネルについての所定の演算処理順序に従って各発
音チャンネルの複数サンプル分の波形データを生成する
演算を実行し、かつ、該第4のステップによる波形デー
タ生成演算の実行中に、該演算が所定時間内に完了しな
いと判定されたとき、該所定時間の残余の時間では波形
データ生成演算を実行しないようにしたものである。
発明のさらに他の楽音生成方法は、複数の指定楽音を発
生するための発生命令を発行する第1のステップと、各
指定楽音を複数の発音チャンネルの中から指定されたい
ずれかの発音チャンネルに割り当て、該指定楽音の制御
データを各指定された発音チャンネルのチャンネルレジ
スタに書き込んで記憶させる第2のステップと、前記指
定された発音チャンネルで生成する楽音の重要度に応じ
て、各指定された発音チャンネルの演算順序を決定する
第3のステップと、所定時間間隔で演算開始命令を発行
する第4のステップと、前記第4のステップで発行され
た演算開始命令に応じて、前記指定された発音チャンネ
ルのチャンネルレジスタに記憶された制御データに基づ
き複数サンプル分の波形データを算術的に生成する第5
のステップと、該複数サンプルの各サンプル毎に前記各
チャンネルで生成された波形データを混合し、複数サン
プル分の混合サンプルデータを生成する第6のステップ
と、該複数サンプル分の混合サンプルデータを、サンプ
リング周期毎にアナログ信号に変換する第7のステップ
とからなり、前記第5のステップにおいて、前記第3の
ステップにより決定された演算順序に従って各指定され
た発音チャンネル毎の楽音生成を行うと共に、実行中の
楽音生成が間に合わず、前記 第7のステップにおいて変
換された前記アナログ信号が途切れるおそれがある場合
には、前記演算順序の途中の発音チャンネルの時点で該
楽音生成演算を終了することにより、前記アナログ信号
が途切れないようにしたものである。
Still another tone generating method of the present invention, 1 or
Or one or more for generating a plurality of specified musical tones.
A first step of receiving a number of generation instructions, the generation life
In response to the command, the specified musical tone
Channel assigned to the specified sound channel, and
The control data of the specified tone is converted into the specified tone.
Channel level corresponding to the assigned sound channel
The second step of writing to the register and the operation start instruction
In response to the third step issued next and each operation start instruction
And stored in the channel register of the channel.
Multiple samples for each sound channel based on control data
A fourth step of performing an operation to generate minute waveform data, and generating the waveform data for each tone generation channel in the fourth step.
The obtained waveform data is used for each of the plurality of samples.
5th step to mix the
And for all said specified pronunciation channels
Is determined to not complete within a given time period.
When at least one sound channel is
Sixth step for issuing an instruction to change the generation of waveform data
And a tip . Further of the present invention
Another musical tone generation method is one or more specified musical tones.
Receiving one or more generating instructions for generating
Step 1 and in response to the generating instruction,
Music to one of multiple sound channels
The control data of the specified musical tone
Channel corresponding to each sound channel to which is assigned
Second step of writing to a register, and an operation start instruction
And a third step of sequentially issuing
In response, it is stored in the channel register of the channel.
Multiple samples for each sound channel based on the
A fourth step of generating waveform data for the pull,
Waves generated for each pronunciation channel in the fourth step
Shape data is mixed for each of the multiple samples
And a fifth step of generating mixed sample data.
The fourth step comprises the step of providing a wave within a particular time period.
Which pronunciation channels can generate shape data
And select the sound channel determined to be possible.
Only when the waveform data is generated.
is there. Still another tone generation method according to the present invention comprises one or more
One or more originating in order to generate the specified tone number
Receiving a raw instruction, responding to the generated instruction;
Answers each specified musical tone to multiple sound channels.
Control data of the designated musical tone
Each tone channel assigned to each specified tone
The second step of writing to the channel register corresponding to
And a third step of sequentially issuing an operation start instruction;
In response to each operation start command, the channel of the channel
Each sound channel based on the control data stored in the
Fourth generation of waveform data for multiple samples for each channel
Step, and in the fourth step, each sounding channel
The waveform data generated for
Mix each sample and generate mixed sample data
And the fourth step includes a pronunciation step.
Each source is executed according to the predetermined processing order for the channel.
Generate waveform data for multiple samples of sound channel
Performing an operation, and executing the waveform data obtained in the fourth step.
During execution of the data generation operation, the operation is not completed within a predetermined time.
When it is determined that the
The data generation operation is not executed. Book
According to still another tone generation method of the invention, a plurality of designated tones are generated.
A first step of issuing a generate instruction to generate
I want to specify a specified musical tone from multiple pronunciation channels
Assign to one of the sounding channels and control the specified tone
The data is stored in the channel register of each designated sounding channel.
A second step of writing and storing in the
According to the importance of the musical tones generated by the specified pronunciation channel
To determine the calculation order of each specified sound channel
3rd step and issue operation start instruction at predetermined time intervals
A fourth step to be issued and issued in the fourth step
The specified sounding channel in response to the
Based on the control data stored in the channel register of the
Fifth generation of arithmetically generating waveform data for multiple samples
And each of the plurality of samples
Mix the waveform data generated by the channels and
Sixth step of generating mixed sample data for pull
And the mixed sample data of the plurality of samples
Seventh step of converting to an analog signal for each ring cycle
And in the fifth step, the third step
Each specified according to the operation order determined by the step
Music is generated for each sound channel, and
Tone generation too late, varying in the seventh step
When the converted analog signal may be interrupted
At the time of the sounding channel in the middle of the calculation order.
By ending the tone generation operation, the analog signal
Is not interrupted.

【0013】このような本発明によれば、複数の楽音波
形サンプルの演算について1回だけ各発音チャンネルの
準備処理を行えば良いため、オーバヘッドが小さくする
ことができる。このため、生成された楽音の質を向上す
ることができると共に、同時発音チャンネル数を増加す
ることができる。また、楽音波形サンプルの演算をMI
DIイベントが入力される毎に行うようにすると、演算
が分散されるようになり、発音初期処理による発音数の
減少を防止することができる。さらに、生成中の発音チ
ャンネルの内、楽音のレベル(AEG波形)が十分に減
衰したチャンネルは、その時点より演算対象から外され
て、非発音チャンネルとなるようにしている。
According to the present invention, since the preparation process for each tone generation channel only needs to be performed once for the calculation of a plurality of tone waveform samples, the overhead can be reduced. Therefore, the quality of the generated musical sound can be improved, and the number of simultaneously sounding channels can be increased. Also, the calculation of the musical tone waveform sample
If the processing is performed every time a DI event is input, the calculations are dispersed, and a decrease in the number of sounds due to the sound initial processing can be prevented. Further, of the sounding channels that are being generated, channels whose tone levels (AEG waveforms) are sufficiently attenuated are excluded from the calculation target from that point on, and are made non-sounding channels.

【0014】さらにまた、演奏情報の発生時に演奏情報
の受入処理を行い、受け入れた演奏情報に基づく楽音制
御あるいは波形生成が、該受入処理の空き時間に実行さ
れるメインステップに含まれるようにしたので、演奏情
報が発生した時点での処理の増加分を前記空き時間内に
分散させることができ、一時的な処理の増加を防止する
ことができる。
Further, when performance information is generated, a performance information receiving process is performed, and tone control or waveform generation based on the received performance information is included in a main step executed during an idle time of the receiving process. Therefore, an 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.

【0015】[0015]

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

【0016】7はユーザが楽音生成装置と対話するため
のディスプレイ(モニタ)、8は楽音を生成するプログ
ラム等のアプリケーションプログラムがインストールさ
れていると共に、楽音波形サンプルを生成するために使
用する楽音波形データ等が記憶されているハードディス
ク(HDD)、9はRAM3の一部のCPUにより指定
されたエリアに記憶されている楽音波形サンプルのデー
タをCPU1を介することなく直接に受渡を行い、一定
のサンプリング周期(例えば、48kHz)毎にデジタ
ル・アナログ変換器(DAC)10に供給する再生部
(DMA;DirectMemory Access)、10は楽音波形サ
ンプルのデータを受け取りアナログ信号に変換するデジ
タル・アナログ変換器(DAC)、11はDAC10か
ら出力されたアナログ信号に変換された楽音信号を放音
するサウンドシステムである。以上の構成はパソコン、
ワークステーション等と同等であり、それらの上で本発
明の楽音発生方法を実施することができる。
Reference numeral 7 denotes a display (monitor) for allowing a user to interact with the musical sound generating apparatus. Reference numeral 8 denotes a musical tone waveform used for generating musical tone waveform samples while installing an application program such as a musical tone generating program. A hard disk (HDD) 9 in which data and the like are stored transfers data of musical tone waveform samples stored in an area designated by a part of the RAM 3 directly without passing through the CPU 1 and performs a certain sampling. A reproducing unit (DMA; Direct Memory Access) 10 which supplies a digital-to-analog converter (DAC) 10 at every cycle (for example, 48 kHz), a digital-to-analog converter (DAC) 10 which receives the data of the musical tone waveform sample and converts it into an analog signal ) And 11 are analog signals output from the DAC 10 This is a sound system that emits a converted musical sound signal. The above configuration is a personal computer,
It is equivalent to a workstation or the like, on which the tone generating method of the present invention can be performed.

【0017】前記したようにRAM3は種々のデータが
記憶されるエリアを有しているが、その内の音色データ
が記憶されるエリアを図2に、入力バッファのエリアを
図3に、チャンネルレジスタのエリアを図4に、出力バ
ッファのエリアを図5に示す。図2に示すエリアにおい
て、PD1,PD2,・・・,PD16は16種類分の
音色データであり、それぞれの音色データは各音域の波
形を指定するデータ(各音域波形指定)、ビブラート等
をかける時に使用するLFO(Low FrequencyOscillato
r)制御用のデータ(LFO制御OD)、音色フィルタ
特性を制御するフィルタエンベロープの発生制御用のデ
ータ(FEG制御OD)、振幅を制御するエンベロープ
の発生制御用のデータ(AEG制御OD)、ベロシティ
により楽音の立ち上がりの速さ等を変えるタッチ制御用
のデータ(タッチ制御OD)、その他のデータ(その他
OD)からなっている。
As described above, the RAM 3 has an area for storing various data. FIG. 2 shows an area for storing timbre data, FIG. 3 shows an area for an input buffer, and FIG. 4 is shown in FIG. 4, and the area of the output buffer is shown in FIG. In the area shown in FIG. 2, PD1, PD2,..., PD16 are 16 types of timbre data, and each timbre data is applied with data for specifying a waveform of each range (each range waveform specification), vibrato, and the like. LFO (Low Frequency Oscillato)
r) control data (LFO control OD), filter envelope generation control data for controlling the tone color filter characteristics (FEG control OD), envelope generation control data for controlling the amplitude (AEG control OD), velocity The data includes touch control data (touch control OD) that changes the rising speed of a musical tone and other data (other OD).

【0018】なお、ODはオリジナルデータであること
を示しており、発音指示時のタッチデータ,音高データ
等に応じてこれらのオリジナルデータに加工を施して音
源が使用する発音用のデータを作成するようにしてい
る。また、WD1,WD2,・・・,WDnは波形デー
タであり、入力される音高データに応じて、PD1,P
D2,・・・,PD16の音色データにおける各音域波
形指定データによりいずれかの波形データが指定され
る。
Note that OD indicates original data, and the original data is processed in accordance with the touch data, pitch data, and the like at the time of sound generation instruction to generate sound data to be used by the sound source. I am trying to do it. Also, WD1, WD2,..., WDn are waveform data.
D2,..., PD16, any one of the waveform data is designated by each tone range waveform designation data in the tone color data.

【0019】次に図3に示す入力バッファのエリアには
MIDIインターフェース5を介して入力されるノート
オン、ノートオフや各種イベントのMIDIイベントデ
ータID1,ID2,ID3,・・・が順次書き込ま
れ、このMIDIイベントデータID1,ID2,ID
3,・・・が読み出されることによりそのイベント処理
が楽音生成装置内において実行される。このMIDIイ
ベントデータID1,ID2,ID3,・・・は、MI
DIイベントのデータ内容(例えば、データ1内容)
と、そのデータの発生時刻(データ1発生時刻)とによ
り構成される。この発生時刻はMIDIイベントデータ
受信時にタイマ4の現在時刻を取り込むことにより知る
ことができる。
Next, MIDI event data ID1, ID2, ID3,... Of note-on, note-off and various events inputted via the MIDI interface 5 are sequentially written in the area of the input buffer shown in FIG. This MIDI event data ID1, ID2, ID
By reading out 3,..., The event processing is executed in the tone generator. The MIDI event data ID1, ID2, ID3,.
Data content of DI event (for example, data 1 content)
And the data generation time (data 1 generation time). This occurrence time can be known by taking in the current time of the timer 4 when receiving the MIDI event data.

【0020】次に図4に示すエリアは、それぞれ互いに
独立した複数の楽音の生成を制御するためのデータを記
憶するチャンネル(ch)レジスタとして使用され、こ
の例では1ch,2ch,・・・,32chの32チャ
ンネル分のエリアが用意されている。各チャンネルのエ
リアはノートナンバ、波形指定データ(波形指定D)、
LFO制御データ(LFO制御D)、フィルタエンベロ
ープ制御データ(FEG制御D)、振幅エンベロープ制
御データ(AEG制御D)、ノートオンデータ、その他
のデータ(その他D)、およびCPU1がプログラム実
行時に使用するワークエリアからなっている。この波形
指定D、LFO制御D、FEG制御D、AEG制御Dは
前記したオリジナルデータに加工が施された発音用のデ
ータである。
Next, the area shown in FIG. 4 is used as a channel (ch) register for storing data for controlling generation of a plurality of musical tones independent of each other. In this example, 1ch, 2ch,. An area for 32 channels of 32 channels is prepared. The area of each channel is a note number, waveform designation data (waveform designation D),
LFO control data (LFO control D), filter envelope control data (FEG control D), amplitude envelope control data (AEG control D), note-on data, other data (other D), and work used by CPU 1 when executing programs It consists of an area. The waveform designation D, LFO control D, FEG control D, and AEG control D are sounding data obtained by processing the above-described original data.

【0021】次に図5に示すエリアは複数の出力バッフ
ァ用のエリアであり、順次交代して発音波形生成用の出
力バッファXとして使用されている。この出力バッファ
は、後述するように演算処理により生成された各発音チ
ャンネルの楽音波形サンプルデータSD1,SD2,S
D3,・・・が生成される毎にチャンネル累算され格納
される。出力バッファのいずれかが発音波形生成用の出
力バッファXとして指定され、波形生成演算に使用され
る。この出力バッファXは2つ以上用意される。最も簡
単な構成としては出力バッファXを2個とし、片方に格
納されているデータを再生部(DMA)9に渡して再生
している間に、もう片方に演算した次の楽音波形サンプ
ルのデータを格納するダブルバッファ構成とすることが
できる。
Next, the area shown in FIG. 5 is an area for a plurality of output buffers, and is used alternately as an output buffer X for generating a sound waveform. This output buffer stores tone waveform sample data SD1, SD2, S2 of each tone generation channel generated by arithmetic processing as described later.
Every time D3,... Are generated, the channels are accumulated and stored. One of the output buffers is designated as an output buffer X for generating a sound generation waveform, and is used for a waveform generation calculation. Two or more output buffers X are prepared. The simplest configuration is to use two output buffers X and to transfer the data stored in one of them to the reproducing unit (DMA) 9 and reproduce the data of the next musical tone waveform sample calculated in the other while reproducing the data. In a double buffer configuration.

【0022】なお、出力バッファのサイズは、100ワ
ード、500ワード、1Kワード、5Kワード等任意に
設定することができるが、サイズを大きくすると発音に
遅れを生じ、サイズを小さくすると時間的マージンが減
少し、一時的な演算量の増加時に応答が悪くなることに
なる。そこで、リアルタイム性が要求されない、例えば
シーケンサ演奏等の場合は、演奏タイミングを前にずら
すことにより発音遅れを吸収できるため、出力バッファ
のサイズを大きくすることができる。一方、リアルタイ
ムの演奏が必要とされる、例えば鍵盤演奏等の場合は、
発音遅れを防止するため、バッファサイズは100〜2
00ワードとするのが好適である。以上は、再生のサン
プリング周波数が40kHz〜50kHzの場合であ
り、サンプリング周波数を低く設定する場合は、発音遅
れを防止するためもっと小さいサイズにする必要があ
る。
The size of the output buffer can be set arbitrarily, such as 100 words, 500 words, 1K words, 5K words, etc. However, when the size is increased, the sound is delayed, and when the size is reduced, the time margin is reduced. The response decreases when the amount of calculation temporarily decreases. Therefore, in the case of real-time performance is not required, for example, in the case of a sequencer performance or the like, since the sound generation delay can be absorbed by shifting the performance timing forward, the size of the output buffer can be increased. On the other hand, when real-time performance is required, for example, when playing a keyboard,
Buffer size should be 100 ~ 2 to prevent delay of pronunciation
Preferably, it is 00 words. The above is the case where the reproduction sampling frequency is 40 kHz to 50 kHz. When the sampling frequency is set low, it is necessary to make the size smaller in order to prevent delay in sound generation.

【0023】次に、本発明の楽音生成方法の第1の実施
の形態ないし第5の実施の形態を説明するが、各実施の
形態は前記図1に示す楽音生成装置によりそれぞれ実行
することができるものである。本発明の第1の実施の形
態の楽音生成方法は、CPU1が楽音を生成するアプリ
ケーションプログラムを実行する各発音チャンネルの楽
音生成処理において、複数楽音波形サンプル、例えば1
00楽音波形サンプルまとめて生成するようにしたもの
である。すなわち、各発音チャンネルの処理において、
DAC10のサンプリング周期の例えば100サイクル
分まとめて楽音波形サンプルが生成されるようになる。
Next, the first to fifth embodiments of the musical sound generating method of the present invention will be described. Each embodiment can be executed by the musical sound generating apparatus shown in FIG. You can do it. In the musical sound generation method according to the first embodiment of the present invention, in the musical sound generation processing for each sounding channel in which the CPU 1 executes an application program for generating a musical sound, a plurality of musical sound waveform samples, for example, 1
00 sound waveform samples are generated together. That is, in the processing of each sounding channel,
For example, a musical tone waveform sample is generated for one hundred sampling cycles of the DAC 10.

【0024】そして、所定の計算時刻毎に全発音チャン
ネル分の楽音生成処理が実行され、生成された複数の楽
音波形サンプルが100サンプルとされた場合は、DA
C10の100サンプリング周期分のチャンネル累算値
として順次累算され、前記した出力バッファに記憶され
る。出力バッファに記憶された楽音波形サンプルは、全
発音チャンネル分の累算完了後に再生部(DMA)9に
より、前記サンプリング周期毎に1サンプルずつ読み出
され、DAC10に供給されてサウンドシステム11か
ら発音される。なお、計算時刻は、複数の出力バッファ
を交代して用いて楽音生成処理を実行した場合に、楽音
波形サンプルが途切れず読み出し再生できる間隔で発生
されるように制御されている。
When the tone generation processing for all tone generation channels is executed at each predetermined calculation time, and the generated plurality of tone waveform samples are 100 samples, DA
Channel accumulation values for 100 sampling cycles of C10 are sequentially accumulated and stored in the output buffer. The tone waveform samples stored in the output buffer are read out one sample at a time in the sampling period by the reproduction unit (DMA) 9 after the accumulation of all tone generation channels is completed, and supplied to the DAC 10 to generate sound from the sound system 11. Is done. The calculation time is controlled so that, when the tone generation processing is executed by using a plurality of output buffers alternately, the tone waveform samples are generated without interruption and can be reproduced at intervals.

【0025】この第1の実施の形態の楽音生成方法によ
れば、各発音チャンネルの準備処理は、まとめて生成さ
れる複数の楽音波形サンプルの演算について1回だけ行
えば良いため、全体の演算時間の内でこの準備処理に費
やされる演算時間の割合が減少し、オーバヘッドを小さ
くすることができる。このため、生成される楽音波形サ
ンプルの質の向上や同時発音数を増加することができ
る。なお、計算時刻間の1区間(出力バッファのサイズ
に相当)をさらにn等分して、それに対応する時間間隔
で発音波形演算を行い、最後のn個目の演算で完成した
1区間分の楽音波形サンプルを単位として、再生部(D
MA)9が読み出すようにしてもよい。
According to the musical tone generation method of the first embodiment, the preparation process for each tone generation channel only needs to be performed once for a plurality of musical tone waveform samples that are generated together. Within the time, the ratio of the calculation time spent for the preparation processing is reduced, and the overhead can be reduced. Therefore, it is possible to improve the quality of the generated tone waveform sample and increase the number of simultaneous sounds. Note that one section between the calculation times (corresponding to the size of the output buffer) is further divided into n equal parts, sound waveform calculations are performed at time intervals corresponding thereto, and the one section completed by the last n-th calculation is performed. The reproduction unit (D
MA) 9 may be read.

【0026】次に、本発明の第2の実施の形態の楽音生
成方法の説明を行う。本発明の第2の実施の形態の楽音
生成方法は、前記第1実施例と同様にCPU1が楽音を
生成するアプリケーションプログラムを実行する各発音
チャンネルの楽音生成処理において、複数の楽音波形サ
ンプルをまとめて生成するようにしているが、さらに加
えて入力データ、この例ではMIDIイベントがMID
Iインターフェース5において受信される毎に、その時
点までの発音波形演算を行うようにしている。そして、
所定の計算時刻には予め定められた複数の楽音波形サン
プル(1つの出力バッファ分のサンプル)の内、未演算
の楽音波形サンプルのみの発音波形演算を行うようにし
たものである。
Next, a description will be given of a musical sound generation method according to a second embodiment of the present invention. According to the musical sound generation method of the second embodiment of the present invention, a plurality of musical sound waveform samples are collected in a musical sound generation process of each sounding channel in which the CPU 1 executes an application program for generating a musical sound, as in the first embodiment. In addition, the input data, in this example, the MIDI event is the MID
Each time it is received by the I-interface 5, the sound waveform calculation up to that point is performed. And
At a predetermined calculation time, a tone waveform calculation is performed for only uncalculated tone waveform samples among a plurality of predetermined tone waveform samples (samples for one output buffer).

【0027】これは、各発音波形演算では発音している
発音チャンネルについての演算を行うのであるが、その
中の入力データに応じて発音態様が変化するキーオンイ
ベントあるいはキーオフイベント(ピッチベンド,音量
変化)等がある発音チャンネルにおいては、対応を変化
させずに発音を継続する発音チャンネルに比べて多くの
演算処理が必要となる。この場合、一定時間おきの計算
時刻とすると、入力データが増加した時に、演算時間が
発音態様が変化する発音チャンネルに多く占められてし
まうため、結果的に演算できる発音チャンネル数が減少
してしまうことになる。特に、発音を開始する発音チャ
ンネルについては、アドレスカウンタ、各種エンベロー
プ発生器の初期設定、Fナンバ発生等多くの初期設定処
理が必要であり、演算処理時間が多くかかる。
In each sounding waveform calculation, a calculation is performed for a sounding channel that is sounding. A key-on event or a key-off event (pitch bend, volume change) in which the sounding mode changes according to the input data therein. For example, a sound channel having a certain number of operations requires more arithmetic processing than a sound channel that continues sounding without changing the correspondence. In this case, if the calculation time is set at regular intervals, when the input data increases, the calculation time is occupied by the sounding channels whose sounding modes change, and as a result, the number of sounding channels that can be calculated decreases. Will be. In particular, a sounding channel for starting sounding requires many initial setting processes such as an address counter, initial setting of various envelope generators, and generation of an F number, which requires a long calculation processing time.

【0028】この第2の実施の形態を図12に示すタイ
ミングチャートを参照しながらさらに説明すると、出力
バッファは前記したダブルバッファ構成とされており、
この2つの出力バッファがA,Bとされてその読み出し
タイミングが同図(e)に示されている。そして、各バ
ッファA,Bの再生に要する時間がTA およびTB とさ
れており、TA =TB とされている。まず、出力バッフ
ァA用の計算対象となる時刻範囲t0 〜t1 において、
同図(a)に示すように時刻ta でMIDIイベントを
2つMIDI受信部が受信すると、同図(b)に示すよ
うに音源ドライバ部で処理が行われ、さらに同図(c)
に示すように音源部によりt0 〜ta 間の楽音波形サン
プルA1 が計算される。
The second embodiment will be further described with reference to a timing chart shown in FIG. 12. The output buffer has the double buffer configuration described above.
The two output buffers are designated as A and B, and their read timings are shown in FIG. The times required for reproducing the buffers A and B are T A and T B, and T A = T B. First, in the time range t 0 to t 1 to be calculated for the output buffer A,
Upon reception of the MIDI event are two MIDI reception section at time t a as shown in FIG. 6 (a), the processing by the sound source driver section as shown in FIG. 5 (b) is carried out further drawing (c)
Tone waveform samples A 1 between t 0 ~t a is calculated by the tone generator section as shown in.

【0029】なお、MIDI受信部は入力されたMID
Iイベントを受信するMIDIインターフェース5を含
み、前記したようにMIDIイベントのデータを入力バ
ッファに発生時刻と共に書き込む。音源ドライバ部は入
力バッファのデータあるいはパソコンキーボード6より
の入力を受け取り、音源チャンネルアサインおよび入力
に従ってボイシングパラメータから音源パラメータへの
変換を行う。また、音源部は音源パラメータを受け取
り、波形データを加工して実際に発音する楽音波形サン
プルを生成する。LPF部は生成された楽音波形サンプ
ル中の折り返しノイズ成分を除去する。そして、LPF
部の出力が出力バッファA,Bに書き込まれる。なお、
音源ドライブ、音源部、LPF部はCPU1がアプリケ
ーションプログラムを実行することにより実現される機
能である。
It should be noted that the MIDI receiving unit receives the input MID.
It includes a MIDI interface 5 for receiving the I event, and writes the data of the MIDI event together with the occurrence time to the input buffer as described above. The tone generator driver receives the data in the input buffer or the input from the personal computer keyboard 6, and converts the voicing parameters into tone parameters according to the tone channel assignment and the input. Further, the sound source section receives the sound source parameters, processes the waveform data, and generates musical tone waveform samples that actually sound. The LPF section removes aliasing noise components in the generated musical tone waveform sample. And LPF
The output of the unit is written to output buffers A and B. In addition,
The tone generator drive, tone generator, and LPF are functions realized by the CPU 1 executing an application program.

【0030】次いで、時刻時刻tb でMIDIイベント
が1つMIDI受信部において受信されると、同様に音
源ドライバ部で処理が行われ、さらに音源部によりta
〜tb 間の楽音波形サンプルA2 が計算される。その
後、時刻t1 に達すると音源部によりtb 〜t1 間の楽
音波形サンプルA3 が計算される。この場合、時刻t
a ,tb においてキーオンイベントが入力されると、そ
の発音初期処理も含めてこの時刻t1 において演算処理
される。さらに、LPF部においてフィルタ処理が行わ
れて出力バッファA用の楽音波形サンプルの生成が終了
する。
[0030] Then, when the MIDI event at time time t b is received in one MIDI reception section, similar processing by the sound source driver unit is performed further t a the tone generator
Tone waveform samples A 2 between ~t b are calculated. Then, the tone waveform samples A 3 between t b ~t 1 is calculated by the sound source unit reaches the time t 1. In this case, the time t
a, the key-on event is input at t b, it is processing at time t 1 including its sound initial processing. Further, the LPF unit performs the filtering process, and the generation of the tone waveform sample for the output buffer A is completed.

【0031】次に、出力バッファB用の計算対象となる
時刻範囲t1 〜t2 において、同図(a)に示すように
時刻tc で新たなMIDIイベントを3つMIDI受信
部が受信するが、音源部は楽音波形サンプルA3 を計算
中なので、入力データは計算時間が割り当てられるまで
入力バッファにおかれる。そして、楽音波形サンプルA
3 の計算が終了し、さらにLPF部のフィルタ処理も完
了すると、入力バッファ中のデータが音源ドライバ部で
処理されて、音源部によりt1 〜tc 間の入力に対応す
る楽音波形サンプルB1 が計算される。この場合、計算
処理が遅れても入力データの発生時刻も入力バッファに
書き込まれているため、発音タイミングには影響しない
ようになる。
Next, in the time range t 1 to t 2 to be calculated for the output buffer B, the MIDI receiving unit receives three new MIDI events at time t c as shown in FIG. but the sound source section so in calculating tone waveform samples a 3, the input data is placed in the input buffer until the calculated time is allocated. And the musical sound waveform sample A
When the calculation of ( 3 ) is completed and the filter processing of the LPF section is completed, the data in the input buffer is processed by the sound source driver section, and the tone generator section B 1 corresponding to the input between t 1 and t c by the sound source section. Is calculated. In this case, even if the calculation process is delayed, the generation time of the input data is also written in the input buffer, so that the sound generation timing is not affected.

【0032】同様に、楽音波形サンプルB1 の計算時間
中に新たなMIDIイベントを4つ受信するが、この入
力データも楽音波形サンプルB1 の計算終了後に計算さ
れる。これにより、楽音波形サンプルB2 はtc 〜td
間の入力に対応する楽音波形サンプルとなり、楽音波形
サンプルB3 はtd 〜te 間の入力に対応する楽音波形
サンプルとなり、楽音波形サンプルB4 はte 〜t2
の入力に対応する楽音波形サンプルとなる。さらに、楽
音波形サンプルA5 はt2 〜t3 間の入力に対応する楽
音波形サンプルとなる。
Similarly, four new MIDI events are received during the calculation time of the musical tone waveform sample B 1 , and this input data is also calculated after the computation of the musical tone waveform sample B 1 is completed. As a result, the musical sound waveform sample B 2 becomes t c to t d
Becomes the corresponding tone waveform samples to the input of between, the tone waveform samples B 3 becomes tone waveform samples corresponding to the input between t d ~t e, tone waveform samples B 4 is corresponding to the input received during a period t e ~t 2 It becomes a musical sound waveform sample. Furthermore, tone waveform samples A 5 are a tone waveform samples corresponding to the input received during a t 2 ~t 3.

【0033】このように第2の実施の形態は入力データ
が発生した場合は、その時点までの発音波形演算をその
時点で実行するようにしているため、楽音波形サンプル
の計算時間が分散される。従って、所定時間毎に行われ
る計算時間における処理が増加しないため、キーオンイ
ベント等の発音態様を変化させる入力データが多く発生
しても、同時発音数が減少する等の不都合が生じること
を防止することができる。
As described above, in the second embodiment, when input data is generated, the sound waveform calculation up to that time is executed at that time, so that the calculation time of the musical tone waveform sample is dispersed. . Therefore, since the processing in the calculation time performed every predetermined time does not increase, even if a large amount of input data that changes the sound generation mode such as a key-on event is generated, it is possible to prevent a problem such as a decrease in the number of simultaneous sounds. be able to.

【0034】次に、本発明の第3の実施の形態の楽音波
形生成方法の説明を行う。ところで、所定のタイミング
で計算時刻を発生し、所定数の楽音波形サンプルをまと
めて演算生成するようにした場合、連続的に楽音を発生
するためには、過去に生成した波形サンプルの生成終了
以前に、それに続く該所定数の波形サンプルを供給する
必要がある。すると、処理すべき発音チャンネル数が多
くその発音波形演算量が多過ぎる場合、全チャンネル分
演算を実行すると、その楽音波形サンプルの供給が間に
合わず、楽音が途切れてしまうという欠点が生じる。
Next, a description will be given of a musical tone waveform generating method according to a third embodiment of the present invention. By the way, when a calculation time is generated at a predetermined timing and a predetermined number of musical tone waveform samples are collectively calculated and generated, in order to generate musical tones continuously, it is necessary to generate the waveform samples generated before the generation of the previously generated waveform samples. Need to supply the predetermined number of waveform samples that follow. Then, when the number of sounding channels to be processed is large and the amount of calculation of the sounding waveform is too large, if the calculation for all the channels is executed, the supply of the musical tone waveform samples cannot be made in time and the sound is interrupted.

【0035】この第3の実施の形態の楽音波形生成方法
はこの欠点を解決しようとするものであって、楽音波形
サンプルの供給がDAC10の変換タイミングに間に合
うか否かを判定し、間に合わないと判定された場合は、
重要度の低い発音チャンネルから消音する発音チャンネ
ルを選定する。そして、選定された発音チャンネルにつ
いては演算時に、該所定数の波形サンプルのうちの初期
期間に対応するダンプ波形サンプルのみが短時間で演算
される。このように、選定された消音される発音チャン
ネルにおける楽音波形サンプルは、短期間のダンプ波形
しが演算しないので、この発音チャンネルの演算時間が
短縮され、全体として楽音波形サンプルの供給がDAC
10の変換タイミングに間に合うようになる。
The tone waveform generating method according to the third embodiment is intended to solve this drawback. It is determined whether or not the supply of the tone waveform sample is in time for the conversion timing of the DAC 10. If determined,
Select a sound channel to mute from sound channels with low importance. Then, for the selected sounding channel, at the time of calculation, only the dump waveform sample corresponding to the initial period of the predetermined number of waveform samples is calculated in a short time. As described above, since a short-term dump waveform is not calculated for the musical tone waveform sample in the selected tone generation channel to be silenced, the calculation time of this tone generation channel is shortened, and the supply of the tone waveform sample as a whole is performed by the DAC.
10 conversion timings can be met.

【0036】なお、重要な音とは、 (1)その時点で音量の大きい音。 (2)アタック部再生中の発音を開始したばかりの音。 (3)複数パート音演奏されている場合、一番低い音
(ベース音)。 (4)複数パート演奏されている場合、一番高い音(リ
ード音)。 (5)複数パート音演奏されている場合におけるソロの
パート音。 とするのが一般的である。
The important sounds are: (1) a sound with a large volume at that time. (2) Attack part The sound that has just started sounding during playback. (3) The lowest sound (bass sound) when a plurality of part sounds are played. (4) The highest sound (lead sound) when a plurality of parts are played. (5) Solo part sound when a plurality of part sounds are played. In general,

【0037】また、前記第3の実施の形態の変形例を説
明すると、演算する発音チャンネルを発音波形演算に先
立って重要な音から順位付けし、その順位に従って重要
な音から順番に発音演算を行うようにし、発音波形演算
が間に合わない場合に、発音波形演算を途中で打ち切っ
て、その時点までに生成された楽音波形サンプルのみで
発音を行うようにしたものである。このようにすれば、
万が一演算打ち切りをする必要が生じた場合でも、それ
によって音の消えてしまうチャンネルは、重要度の低い
比較的影響の少ない楽音を生成しているチャンネルと云
うことになる。なお、第3の実施の形態およびその変形
例において、入力データが発生する毎に発音波形演算を
行うようにしてもよい。
A description will now be given of a modification of the third embodiment. The sounding channels to be calculated are ranked in order from the important sound prior to the sound waveform calculation, and the sounding calculation is performed in order from the important sound in accordance with the order. When the calculation of the sound waveform cannot be made in time, the calculation of the sound waveform is terminated halfway, and the sound is generated only by the musical tone waveform samples generated up to that point. If you do this,
Even if it is necessary to terminate the operation, the channel whose sound is extinguished is a channel that generates a musical tone of low importance and relatively little effect. Note that, in the third embodiment and its modifications, a sounding waveform calculation may be performed each time input data is generated.

【0038】さらに、入力データが発生する毎に発音波
形演算を行なわず、最後に1区間分まとめて発音波形演
算をするようにしてもよい。この場合、入力データの数
に応じて計算時刻を早めるようにトリガをかけるのが好
適である。または、計算時刻間の1区間をさらにn等分
して、それに対応する時間間隔で発音波形演算を行い、
最後のn個目の演算で完成した1区間分の楽音波形サン
プルを単位として、再生部(DMA)9が読み出すよう
にしてもよい。
Furthermore, the calculation of the sound waveform may not be performed every time the input data is generated, but may be calculated for one section at the end. In this case, it is preferable to trigger so that the calculation time is advanced according to the number of input data. Alternatively, one section between the calculation times is further divided into n equal parts, and sound waveform calculations are performed at corresponding time intervals,
The reproduction unit (DMA) 9 may read the tone waveform samples for one section completed by the last n-th calculation as a unit.

【0039】ところで、所定のタイミングで計算時刻を
発生し、複数の楽音波形サンプルをまとめて演算生成す
るようにした場合、あるいは入力データが発生する毎に
発音波形演算を行なう場合、連続的に楽音を発生するた
めには、過去に生成した波形サンプルの生成終了以前
に、それに続く波形サンプルを供給する必要がある。す
ると、処理すべき発音チャンネル数が多くその発音波形
演算量が多過ぎる場合や、楽音生成処理以外の処理(シ
ーケンサ処理等)に時間が費やされた等の理由でその楽
音波形サンプルの供給が間に合わなかった場合、処理途
中の楽音波形サンプルが読み出されノイズが発音される
可能性があった。そこで、本発明の第4の実施の形態の
楽音発生方法においては、次のようにしてこれを解決し
ている。
When a calculation time is generated at a predetermined timing and a plurality of musical tone waveform samples are collectively calculated and generated, or when a tone generation waveform calculation is performed each time input data is generated, a musical tone is continuously generated. In order to generate the waveform sample, it is necessary to supply the subsequent waveform sample before the generation of the previously generated waveform sample is completed. Then, the supply of the musical tone waveform sample is performed because the number of sounding channels to be processed is too large and the amount of calculation of the sounding waveform is too large, or time is spent for processing other than the tone generation processing (sequencer processing, etc.). If not, there is a possibility that the musical tone waveform sample being processed is read out and noise is generated. Therefore, the tone generation method according to the fourth embodiment of the present invention solves this as follows.

【0040】本発明の第4の実施の形態において、再生
部(DMA)9にはCPU1が出力バッファのデータを
渡す指令を出すようにしている。この場合、生成した所
定数の楽音サンプルを記憶する出力バッファ自体のアド
レスを、一回の読み出し区間として再生部に9に設定し
たり、繰り返し読み出される繰り返し読み出し区間とし
て設定をすることができるが、さらに加えて、該アドレ
スを現在すでに読み出し中の読み出し区間に続けて読み
出せるよう読み出し区間の予約を設定することができ
る。本実施の形態では、この読み出し区間の予約によ
り、楽音波形演算サンプルが生成された後に出力バッフ
ァに予約登録が行われ、すでに読み出し中の波形に続け
てて読み出される。楽音波形サンプルの演算が終了しな
かった場合は、その予約登録が行われないので、処理途
中の楽音波形サンプルが発音されることによるノイズの
発生を防止することができる。
In the fourth embodiment of the present invention, the CPU 1 issues an instruction to the reproduction unit (DMA) 9 to pass the data of the output buffer. In this case, the address of the output buffer itself for storing the generated predetermined number of musical tone samples can be set to 9 in the reproducing unit as one reading section, or can be set as a repeated reading section to be repeatedly read. In addition, it is possible to set a read section reservation so that the address can be read following the read section that is already being read. In the present embodiment, by the reservation of the reading section, the reservation registration is performed in the output buffer after the musical tone waveform calculation sample is generated, and the reading is performed following the waveform that is already being read. If the calculation of the musical tone waveform sample is not completed, the reservation registration is not performed, so that it is possible to prevent generation of noise due to generation of the musical tone waveform sample being processed.

【0041】この場合、発音は一時途切れることになる
が、途切れる時間は、例えば44.1kHzのサンプル
周波数における数サンプル時間に抑えれば影響は小さ
い。数サンプル時間に抑えるには、前述したように発音
されているチャンネル数を制御すればよい。さらに、処
理が完了すると予約登録が行われて発音されるようにな
る。なお、入力データが発生する毎に発音波形演算を行
なわず、最後に1区間分まとめて発音波形演算をするよ
うにしてもよい。この場合、入力データの数に応じて計
算時刻を早めるようにトリガをかけるのが好適である。
または、計算時刻間の1区間をさらにn等分して、それ
に対応する時間間隔で発音波形演算を行い、最後のn個
目の演算で完成した1区間分の楽音波形サンプルの発音
予約を行うようにしてもよい。
In this case, the sound generation is temporarily interrupted, but if the time during which the sound is interrupted is limited to several sample times at a sample frequency of 44.1 kHz, the effect is small. In order to reduce the sampling time to several sample times, the number of sounded channels may be controlled as described above. Further, when the processing is completed, a reservation is registered and sound is generated. Note that the sound waveform calculation may not be performed every time the input data is generated, but may be calculated for one section at the end. In this case, it is preferable to trigger so that the calculation time is advanced according to the number of input data.
Alternatively, one section between the calculation times is further divided into n equal parts, and a sound waveform calculation is performed at a time interval corresponding to the same, and a tone waveform sample for one section completed by the last n-th calculation is reserved. You may do so.

【0042】前述したように、所定のタイミングで計算
時刻を発生し、複数の楽音波形サンプルをまとめて演算
生成するようにした場合、あるいは入力データが発生す
る毎に発音波形演算を行なう場合、連続的に楽音を発生
するためには、過去に生成した波形サンプルの生成終了
以前に、それに続く波形サンプルを供給する必要があ
る。ところで、この計算時刻は、過去に生成した楽音波
形サンプルの終了タイミングに基づいて、発音波形の生
成を実行するのに必要な時間分、その終了タイミングよ
り早いタイミングが指定される。この終了タイミング
は、CPU1が再生部(DMA)9の状態(フラグ)を
確認し、楽音波形サンプルの再生区間が次の区間に移行
したことを検知するようにして検出しているため、再生
部(DMA)9の状態(フラグ)が変化してからCPU
1がそのことを検知するまでに時間遅れが生じることに
なる。さらに、この時間遅れはCPU1が上述した検知
を実行するタイミングによるため、そのタイミングに応
じて不均一な時間遅れとなる。
As described above, when a calculation time is generated at a predetermined timing and a plurality of musical tone waveform samples are collectively calculated and generated, or when a sound waveform calculation is performed every time input data is generated, continuous In order to generate a musical tone, it is necessary to supply subsequent waveform samples before the generation of the previously generated waveform samples is completed. By the way, as the calculation time, a time required for executing the generation of the sound waveform, which is earlier than the end timing, is designated based on the end timing of the musical tone waveform sample generated in the past. Since the CPU 1 checks the state (flag) of the reproduction unit (DMA) 9 to detect that the reproduction section of the musical tone waveform sample has shifted to the next section, the end timing is detected. CPU after the state (flag) of (DMA) 9 changes
There will be a time delay before 1 detects this. Further, since this time delay depends on the timing at which the CPU 1 executes the above-described detection, the time delay becomes uneven according to the timing.

【0043】すると、この不均一な時間遅れの生じてい
るタイミングに基づいて計算時刻を発生するようにする
と、正確な計算時刻が発生することができないこととな
る。特に、1度だけ大きく遅れたタイミングが検出され
ると、それに基づいて発生された計算時刻は演算開始時
刻から発音波形供給までの演算時間が短いことになるた
め、この場合は同時発音数が一時的に減少してしまうこ
とになる。そこで、本発明の第5の実施の形態の楽音生
成方法においては次のようにしてこれを解決している。
If the calculation time is generated based on the timing at which the uneven time delay occurs, an accurate calculation time cannot be generated. In particular, when a timing that is greatly delayed by one time is detected, the calculation time generated based on the detection is short in the calculation time from the calculation start time to the supply of the sounding waveform. It will be reduced. Thus, the tone generation method according to the fifth embodiment of the present invention solves this as follows.

【0044】CPU1は過去に再生部(DMA)9の状
態変化が検出された時刻を複数記憶しておく。この複数
の時刻の時刻間の平均を取ることにより、次の検出時刻
を予測するようにする。この予測された時刻は、再生部
(DMA)9における真の終了タイミングからの検出遅
れが平均化されたものとされるので、予測されたタイミ
ングより所定時間前のタイミングを、ほぼ正確な終了タ
イミングとして検出することができる。そして、この終
了タイミングに基づいて計算時刻を発生するようにす
る。このように、検出される終了タイミングは平均化さ
れたものとなり、ばらつきが少なくなるので、毎計算時
刻に確保される演算時間も均一化され、安定した楽音生
成動作が実行されるようになる。
The CPU 1 stores a plurality of times at which a state change of the reproducing unit (DMA) 9 has been detected in the past. The next detection time is predicted by taking the average between the times. Since the predicted time is obtained by averaging detection delays from the true end timing in the reproducing unit (DMA) 9, a timing that is a predetermined time before the predicted timing is changed to an almost accurate end timing. Can be detected as Then, a calculation time is generated based on the end timing. In this way, the detected end timing is averaged, and the variation is reduced, so that the calculation time secured at each calculation time is also uniformed, and a stable musical sound generation operation is performed.

【0045】なお、入力データが発生する毎に発音波形
演算を行なわず、最後に1区間分まとめて発音波形演算
をするようにしてもよい。この場合、入力データの数に
応じて計算時刻を早めるようにトリガをかけるのが好適
である。または、計算時刻間の1区間をさらにn等分し
て、それに対応する時間間隔で発音波形演算を行い、最
後のn個目の演算で完成した1区間分の楽音波形サンプ
ルの発音予約を行うようにしてもよい。
It should be noted that the tone waveform calculation may not be performed every time the input data is generated, but the tone waveform calculation may be performed for one section at the end. In this case, it is preferable to trigger so that the calculation time is advanced according to the number of input data. Alternatively, one section between the calculation times is further divided into n equal parts, and a sound waveform calculation is performed at a time interval corresponding to the same, and a tone waveform sample for one section completed by the last n-th calculation is reserved. You may do so.

【0046】次に、前記した本発明の第1の実施の形態
ないし第5の実施の形態の要素を1まとめにした楽音生
成方法および装置の動作をフローチャートを参照しなが
ら説明する。図6はメインルーチンのフローチャートを
示す図であり、メインルーチンがスタートされるとステ
ップS10にて初期設定が行われる。初期設定ではタイ
マ4やDMAの設定、全発音チャンネルのクリアや、音
色データおよび波形データ等の準備が行われる。次い
で、ステップS20にてキーボード6からの入力が処理
されるキーボード処理が行われ、ステップS30にて入
力されたMIDIイベントに応じた処理が行われるMI
DI処理が行われる。さらに、ステップS40にて楽音
波形サンプルが生成される発音波形演算等が行われる音
源処理が行われ、ステップS50にてその他の処理が行
われ、ステップS20に戻り、ステップS20ないしス
テップS50の処理が循環して繰返し行われる(定常ル
ープ)。これらの処理は、マルチタスクの方法を用いて
他のソフトと同時に実行される。
Next, the operation of the musical tone generating method and apparatus which combine the elements of the first to fifth embodiments of the present invention will be described with reference to flowcharts. FIG. 6 is a flowchart showing the main routine. When the main routine is started, initialization is performed in step S10. In the initial setting, setting of the timer 4 and DMA, clearing of all tone generation channels, preparation of tone color data, waveform data, and the like are performed. Next, in step S20, a keyboard process for processing input from the keyboard 6 is performed, and in step S30, a process corresponding to the input MIDI event is performed.
DI processing is performed. Further, in step S40, a sound source process for performing a sound waveform calculation or the like for generating a musical tone waveform sample is performed. In step S50, other processes are performed. The process returns to step S20, and the processes in steps S20 to S50 are performed. It is repeated in a loop (steady loop). These processes are executed simultaneously with other software using a multitasking method.

【0047】次に、CPU1の実行するMIDI受信割
込処理のフローチャートを図7に示す。この処理は、M
IDIインタフェース5が外部より何らかのMIDIイ
ベントを受信した際に割込により起動される。このMI
DI受信割込処理は、他の処理より優先して行われる処
理である。このMIDI受信割込処理が開始されると、
ステップS100にてMIDIインターフェース5によ
り受信された受信データが取り込まれ、ステップS11
0にてその受信データは受信された時点の時刻データと
組にして図3に示されるような形式で前述した入力バッ
ファに書き込まれるようにされて、割込発生時の処理へ
リターンされる。これにより、受信したMIDIデータ
は、順次、受信時刻と共に入力バッファに書き込まれる
ようになる。
Next, FIG. 7 shows a flowchart of the MIDI reception interrupt processing executed by the CPU 1. This processing is performed by M
When the IDI interface 5 receives some MIDI event from the outside, it is activated by interruption. This MI
The DI reception interrupt process is a process performed with higher priority than other processes. When the MIDI reception interrupt process is started,
In step S100, the received data received by the MIDI interface 5 is fetched, and step S11
At 0, the received data is written in the above-described input buffer in a format as shown in FIG. 3 in combination with the time data at the time of reception, and the process returns to the process when an interrupt occurs. Thus, the received MIDI data is sequentially written into the input buffer together with the reception time.

【0048】次に、メインルーチンの定常ループでステ
ップS30として実行されるMIDI処理の詳細フロー
チャートを図8に示す。MIDI処理が開始されるとス
テップS200にて入力バッファを読みに行き、未処理
の受信データがあるかどうかの確認を行う。未処理の受
信データがあるとステップS210にて判断されると、
ステップS220に進み、受信データの内容に応じた分
岐を行う。受信データがノートオンイベントの場合は、
ステップS230に分岐されてノートオン処理が実行さ
れる。また、受信データがノートオフの場合は、ステッ
プS240に分岐されてノートオフ処理が実行され、受
信データがその他のデータの場合は、ステップS250
に分岐されてその他処理が実行される。そして、これら
のいずれかの処理が終了すると、MIDI処理は終了す
る。なお、受信データがないとステップS210にて判
断されると、そのままMIDI処理を終了する。
Next, FIG. 8 shows a detailed flowchart of the MIDI processing executed as step S30 in the regular loop of the main routine. When the MIDI process is started, the process goes to step S200 to read the input buffer and confirms whether there is unprocessed received data. If it is determined in step S210 that there is unprocessed received data,
Proceeding to step S220, branching is performed according to the content of the received data. If the received data is a note-on event,
The flow branches to step S230 to execute note-on processing. If the received data is note-off, the process branches to step S240 to execute a note-off process. If the received data is other data, the process proceeds to step S250.
And the other processing is executed. Then, when any of these processes ends, the MIDI process ends. If it is determined in step S210 that there is no received data, the MIDI processing ends.

【0049】次に、前述したMIDI処理において、受
信データがノートオンイベントの場合にステップS23
0にて実行されるノートオン処理のフローチャートを図
9(a)に示す。ノートオン処理が開始されると、ステ
ップS300にて、入力バッファ中のそのノートオンイ
ベントのノートナンバがNNとして、ベロシティがVE
Lとして、それぞれレジスタに取り込まれ、そのノート
オンイベントの発生時刻がTMとしてレジスタに取り込
まれる。次いで、ステップS310にてレジスタに取り
込まれたノートナンバNNの発音割当処理が行われ、割
り当てられたチャンネル(ch)の番号がiとしてレジ
スタに取り込まれる。
Next, in the above-mentioned MIDI processing, if the received data is a note-on event, step S23 is executed.
FIG. 9A shows a flowchart of the note-on process executed at 0. When the note-on process is started, in step S300, the note number of the note-on event in the input buffer is set to NN, and the velocity is set to VE.
Each of them is taken into the register as L, and the occurrence time of the note-on event is taken into the register as TM. Next, in step S310, a tone assignment process of the note number NN taken into the register is performed, and the number of the assigned channel (ch) is taken into the register as i.

【0050】さらに、ステップS320にて図4に示す
chレジスタのうちレジスタに取り込まれたch番号i
のchレジスタに、前記ノートナンバNN,ベロシティ
VELに応じた楽音制御データを設定する。設定される
楽音制御データは、図2に示す16音色分の音色データ
のうち、前記ノートオンイベントを受信したMIDIチ
ャンネルに対応した音色データ(各種OD)を、前記ノ
ートナンバNN,ベロシティVELの値に応じて加工し
て得られる発音用データ(各種D)である。ここで、発
音用データの中の波形指定データDは、図2に示す音色
データ中の音域波形指定データをノートナンバNNで参
照することにより求められ、該ノートナンバNNに対応
した楽音生成に用いるべき波形として、波形データWD
1から波形データWDnのうちのいずれか1つを指定す
る。前記楽音制御データの設定後、ステップS330に
てichのノートオンフラグを立てるようにする。
Further, in step S320, of the ch registers shown in FIG.
The tone register control data corresponding to the note number NN and the velocity VEL is set in the ch register of. The tone control data to be set includes tone data (various ODs) corresponding to the MIDI channel that has received the note-on event, out of the tone data for the 16 tone colors shown in FIG. 2, and the values of the note number NN and the velocity VEL. Is sounding data (various D) obtained by processing according to. Here, the waveform designation data D in the tone generation data is obtained by referring to the tone range waveform designation data in the timbre data shown in FIG. 2 using the note number NN, and is used for generating a tone corresponding to the note number NN. Waveform data WD
1 to one of the waveform data WDn. After setting the tone control data, a note-on flag of ich is set in step S330.

【0051】次に、ステップS340にて発音波形の演
算生成を実行するが、この場合の演算生成は、現在準備
中のバッファXに書き込むべき全波形のうち、時刻TM
以前で、かつ、未計算の波形(部分波形)について実行
され、算出された該部分波形を出力バッファXに書き込
むようにする。ここで、部分波形は、ステップS210
において新たな受信データが検出された時点で(データ
が確定し)演算生成が可能になる範囲の発音波形に相当
する。生成する波形は、受信したノートオンイベントの
発生時刻TMの時点までの発音波形であり、該ノートオ
ンに応じて発音開始する楽音波形は、該発音波形に含ま
れず、以後に生成される発音波形の方に含まれる。この
処理の詳細については、後述する図11に示されてい
る。
Next, in step S340, the calculation of the sound generation waveform is performed. In this case, the calculation is performed at time TM among all the waveforms to be written in the buffer X currently being prepared.
The previously executed and uncalculated waveform (partial waveform) is executed, and the calculated partial waveform is written to the output buffer X. Here, the partial waveform is determined in step S210.
At the time when new received data is detected (data is determined) and corresponds to a sound generation waveform in a range in which calculation and generation can be performed. The generated waveform is a sounding waveform up to the time of the received note-on event occurrence time TM, and the tone waveform that starts sounding in response to the note-on is not included in the sounding waveform, but is a sounding waveform generated thereafter. It is included in the one. The details of this processing are shown in FIG. 11 described later.

【0052】このステップS340およびステップS3
50の処理は、先に図12に関連して説明した楽音波形
1 あるいはA2 等の演算生成処理に対応するが、ステ
ップS350では、前述したステップS320でchレ
ジスタに設定されたichの楽音制御データに基づき、
ichにおける発音の初期設定をchレジスタのワーク
エリアに対して行う。ここで、このワークエリアは、各
発音chの楽音生成に必要な、アドレス現在値、各種エ
ンベロープ現在値および現在ステート、LFO波形現在
値等、各chの波形生成に必要な複数のデータ現在値を
記憶する。この発音初期処理が終了すれば、ノートオン
処理は終了する。なお、初期設定においては、波形読み
出しアドレス現在値へのスタートアドレスの設定、ノー
トナンバNNに応じたFナンバの発生、およびLFO、
フィルタEG、音量EG、補間演算、フィルタ演算等の
各初期設定が行われる。この初期設定は前記したように
演算時間を要する処理である。
This step S340 and step S3
Process 50 is corresponds to the calculation process of generating 2 such tone waveform A 1 or A described in connection with FIG. 12 above, at step S350, the tone of ich set in ch register at step S320 described above Based on the control data,
The initial setting of the sound generation in the ich is performed for the work area of the ch register. Here, the work area stores a plurality of data current values necessary for generating a waveform of each channel, such as an address current value, various envelope current values and current states, and an LFO waveform current value necessary for generating a tone for each sounding channel. Remember. When the sound generation initial process ends, the note-on process ends. In the initial setting, the start address is set to the current value of the waveform read address, the F number is generated according to the note number NN, and the LFO,
Initial settings such as a filter EG, a volume EG, an interpolation calculation, and a filter calculation are performed. This initial setting is a process that requires a calculation time as described above.

【0053】次に、前述したMIDI処理において、受
信データがノートオフイベントの場合にステップS24
0にて実行されるノートオフ処理のフローチャートを図
9(b)に示す。ノートオフ処理が開始されると、ステ
ップS400にて、入力バッファ中のそのノートオフイ
ベントのノートナンバがNNとしてレジスタに取り込ま
れ、ノートオフイベントの発生時刻がTMとしてレジス
タに取り込まれる。次いで、ステップS410にてノー
トナンバNNで発音されている発音チャンネル(ch)
がサーチされ、見つかった発音chの番号がiとしてレ
ジスタに取り込まれる。
Next, in the above-mentioned MIDI processing, if the received data is a note-off event, step S24
FIG. 9B shows a flowchart of the note-off process executed at 0. When the note-off process is started, in step S400, the note number of the note-off event in the input buffer is taken into the register as NN, and the occurrence time of the note-off event is taken as TM in the register. Next, in step S410, the sound channel (ch) sounded with the note number NN.
Is searched, and the number of the found pronunciation ch is taken into the register as i.

【0054】次に、ステップS420にてichのノー
トオンフラグを倒し、ステップS430にて発音波形の
演算生成が実行される。この場合の演算生成処理は、前
述したステップS340と同様の処理であり、時刻TM
以前の未計算波形(部分波形)を算出して出力バッファ
Xに書き込むようにする。さらに、ステップS440に
てichのリリース開始処理が行われてノートオフ処理
は終了する。ここで、ichのリリース開始処理とは、
ワークエリア中のichの各種エンベロープのステート
等を書き換え、ichにおける楽音生成の状態をリリー
ス状態に変化させる処理である。
Next, in step S420, the note-on flag of ich is defeated, and in step S430, calculation and generation of a tone generation waveform are executed. The operation generation processing in this case is the same processing as that in step S340 described above, and the time TM
The previous uncalculated waveform (partial waveform) is calculated and written to the output buffer X. Further, in step S440, the ich release start process is performed, and the note-off process ends. Here, the release start process of ich is
This is a process of rewriting the state and the like of various envelopes of the ich in the work area and changing the state of musical tone generation in the ich to the release state.

【0055】次に、メインルーチンの定常ループでステ
ップS40として実行される音源処理の詳細フローチャ
ートを図10を参照しながら説明する。音源処理が開始
されると、ステップS500にて再生部(DMA)9の
再生状態をチェックし、再生区間が次に進んでいたらス
テップS510に進み、再生区間が進んでいない場合は
ステップS520に進む。DMA9は、CPU1により
指定されたRAM3上の特定エリアの波形サンプルを再
生エリアとして、所定のサンプリング周期毎にその特定
エリアの最初のサンプルから1サンプルづつ順次読み出
し、DAC10に供給し再生する。さらに、DMA9は
その特定エリアを再生しつつ、CPU1から次に再生す
べき別のエリアを指定する予約を受け付ける。予約され
た別の特定エリアの波形サンプルは、再生中の特定エリ
アの再生が完了した後、引き続いてDMA9により同様
に1サンプルづつ順次読み出され、DAC10に供給さ
れ再生される。ここで、再生区間が次に進むというの
は、先に特定エリアとして指定した再生区間の再生が完
了し、次の特定エリアとして予約された別の再生区間に
再生が移ったことを意味する。なお、一度に複数の特定
エリアを再生予約することが可能であり、その場合、複
数の特定エリアは予約した順に順次再生される。
Next, a detailed flowchart of the sound source processing executed as step S40 in the steady loop of the main routine will be described with reference to FIG. When the sound source processing is started, the playback state of the playback unit (DMA) 9 is checked in step S500. If the playback section has advanced to the next step, the process proceeds to step S510. If the playback section has not advanced, the process proceeds to step S520. . The DMA 9 uses a waveform sample of a specific area on the RAM 3 specified by the CPU 1 as a reproduction area, sequentially reads out one sample from the first sample of the specific area at a predetermined sampling cycle, and supplies it to the DAC 10 for reproduction. Further, the DMA 9 receives a reservation for designating another area to be reproduced next from the CPU 1 while reproducing the specific area. After the reproduction of the specified specific area being reproduced is completed, the reserved waveform samples are successively read out one by one by the DMA 9 and supplied to the DAC 10 for reproduction. Here, that the reproduction section advances next means that the reproduction of the reproduction section previously specified as the specific area has been completed and the reproduction has shifted to another reproduction section reserved as the next specific area. Note that a plurality of specific areas can be reserved for reproduction at a time. In this case, the plurality of specific areas are sequentially reproduced in the order of reservation.

【0056】ステップS510にて今回進行が検出され
た時刻(現在時刻)と過去に検出された時刻から次回の
検出時刻を予測し、予測された検出時刻より所定時間前
の時刻を次回の計算時刻として指定する。次回の検出時
刻の予測の仕方としては、現在時刻と過去の検出時刻を
含む複数回の検出時刻に基づき最小二乗法で誤差の少な
い近似値を求めて予測する方法や、複数回の検出時刻の
変化の様子を2次関数等、別の関数で近似して予測する
方法がある。DMA9では進行が発生してからステップ
S510で検出されるまでの時間は、その時々の処理ス
テップ位置、状況の違い等により、一定でない時間遅れ
が生じ、複数回の検出時刻には、一定でないばらつきが
含まれている。従って、前記近似関数の算出には、複数
回の検出時刻のばらつきを平均化する処理が含まれる。
In step S510, the next detection time is predicted from the time at which the current progress is detected (current time) and the time detected in the past, and the time that is a predetermined time before the predicted detection time is calculated as the next calculation time. Specify as As a method of predicting the next detection time, a method of obtaining an approximate value with a small error by the least squares method based on a plurality of detection times including the current time and the past detection time and predicting the same is used. There is a method of estimating the state of change by approximating it with another function such as a quadratic function. In the DMA 9, the time from the occurrence of the progress to the detection in the step S <b> 510 has an irregular time lag due to the processing step position at each time, the difference in the situation, and the like, and the non-uniform variation occurs in a plurality of detection times. It is included. Therefore, the calculation of the approximation function includes a process of averaging a plurality of variations in detection time.

【0057】前記所定時間は、楽音波形を生成するため
に確保される時間であり、どのくらいの長さにするか
は、確保したい発音数、演算のクォリティ等、その演算
生成に必要な演算量に基づいて決定される。前記所定時
間の長さは、固定値でもよいが、キーボード6で設定で
きるようにしたり、同時に走る複数の処理プログラムと
の兼ね合いでCPU1が自動的に決定するようにしても
よい。
The predetermined time is a time secured for generating a musical tone waveform. The length of the predetermined time depends on the amount of calculation required for generating the calculation, such as the number of sounds to be secured, the quality of the calculation, and the like. It is determined based on. The length of the predetermined time may be a fixed value, but may be set by the keyboard 6 or may be automatically determined by the CPU 1 in consideration of a plurality of processing programs running simultaneously.

【0058】次に、ステップS520にて次回の計算時
刻とタイマ4が指示する現在時刻とを比較することによ
り、計算時刻に達したか否かが判断され、計算時刻に達
したと判断された場合はステップS530ないしステッ
プS580の処理を実行する。まず、ステップS530
にて現在発音中の発音チャンネルを、どの順番で演算す
るか決定する。後述するステップS550の波形演算生
成処理では、発音中のチャンネルについて、1チャンネ
ルづつ複数サンプル分の発音波形を生成していくわけで
あるが、その時のチャンネルの処理順をここで決めてい
るわけである。
Next, in step S520, by comparing the next calculation time with the current time indicated by the timer 4, it is determined whether or not the calculation time has been reached, and it is determined that the calculation time has been reached. In this case, the processing from step S530 to step S580 is executed. First, step S530
Determines in which order the currently sounding sounding channel is to be calculated. In the waveform calculation generation processing in step S550 described later, a sounding waveform for a plurality of samples is generated for each channel that is sounding, and the processing order of the channels at that time is determined here. is there.

【0059】ここでは、前記した第3の実施の形態の方
法に従って、音楽的に重要な楽音、消えてしまっては困
る楽音から順番に演算を行うように順番付けをする。次
いで、ステップS540にて発音中の全発音チャンネル
を、予定した演算時間(ステップS510で説明した所
定時間)内に演算可能か否かが判定され、不可能の場合
は演算順序が最後の発音チャンネルから消音すべき発音
チャンネルを1ないし複数チャンネル分指定し、予定し
た演算時間内に演算可能になるよう演算量を削減する。
この処理は、前記した第3の実施の形態の楽音生成方法
に基づく具体的な処理である。次いで、ステップS55
0にて発音波形の演算が行われる。ここでは、現在準備
中の出力バッファXが発音波形データで満たされ、準備
完了となるように、バッファXの未計算分について楽音
波形サンプルが演算されて発音波形が算出され、出力バ
ッファXに書き込まれる。この処理は、先に図12に関
連して説明した発音波形A3 等の演算生成処理に対応す
る。
Here, according to the method of the third embodiment described above, the musical tones that are important in terms of music, and the musical tones that should not be erased, are ordered in order so as to perform calculations in order. Next, in step S540, it is determined whether or not all the sounding channels that are sounding can be calculated within a predetermined calculation time (the predetermined time described in step S510). , One or a plurality of sounding channels to be muted are designated, and the calculation amount is reduced so that the calculation can be performed within a predetermined calculation time.
This process is a specific process based on the tone generation method of the third embodiment. Next, step S55
At 0, the calculation of the sound waveform is performed. Here, the tone waveform sample is calculated for the uncalculated portion of the buffer X, the tone waveform is calculated, and written to the output buffer X so that the currently prepared output buffer X is filled with the tone waveform data and is ready. It is. This process corresponds to the calculation process of generating such sound waveform A 3 described in connection with FIG. 12 above.

【0060】発音波形で満たされ準備完了となったバッ
ファXの各サンプルは、さらに、ステップS560にて
ローパスフィルタ(LPF)処理が施され、高域成分が
カットされる。次いで、ステップS570にて波形再生
部(DMA)9に、LPF処理済の発音波形を記憶する
出力バッファXのエリアが、続いて再生すべき再生波形
を記憶する特定エリアとして予約登録される。これによ
り、現在再生中の特定エリアおよび既に予約されている
特定エリアの発音波形が再生完了した後に再生されるよ
う予約される。そして、ステップS580にて、それま
でバッファXとして使用していた出力バッファとは別の
新規の出力バッファ領域が確保され、全てのサンプル値
がゼロにクリアされて、次の区間の発音波形を作成し準
備するための出力バッファXとして新たに設定され、音
源処理が終了する。なお、ステップS520にて計算時
刻に達していないと判断された場合は、そのまま終了す
る。
Each sample of the buffer X which has been filled with the sound generation waveform and is ready is further subjected to a low-pass filter (LPF) process in step S560 to cut high-frequency components. Next, in step S570, the area of the output buffer X for storing the tone generation waveform after LPF processing is reserved and registered in the waveform reproduction unit (DMA) 9 as a specific area for storing the reproduction waveform to be subsequently reproduced. As a result, it is reserved so that the sound waveforms of the specific area currently being reproduced and the specific area already reserved are reproduced after the reproduction is completed. Then, in step S580, a new output buffer area different from the output buffer previously used as the buffer X is secured, all the sample values are cleared to zero, and a tone waveform in the next section is created. Then, a new output buffer X is prepared for the preparation, and the sound source processing ends. If it is determined in step S520 that the time has not reached the calculation time, the process ends.

【0061】次に、ノートオン処理、ノートオフ処理お
よび音源処理にて実行される発音波形演算処理のフロー
チャートを図11に示す。この処理が行われる場合に
は、既に説明したように前もって発音波形が演算される
発音波形の時間範囲が定められている。すなわち、ノー
トオン処理等のMIDIデータ受信時の処理として本フ
ローを実行する場合は、前記時間範囲とは前述した部分
波形のことであり、音源処理中で本フローを実行する場
合は、バッファXの全サンプルのうち、未計算部分の発
音波形サンプルのことである。なお、MIDIデータ受
信時には、直前の音源処理で決定した演算順序に基づい
て演算を行うため、発音チャンネルの演算順序を新たに
決定していない。新たなノートオンがあった場合は、他
の全発音チャンネルの順位を1つ繰り下げ、その新たな
ノートオンのチャンネルを演算順序の第1番に順次加え
ていく。
Next, FIG. 11 shows a flowchart of the sound waveform calculation processing executed in the note-on processing, the note-off processing and the tone generator processing. When this process is performed, the time range of the sound waveform from which the sound waveform is calculated is determined in advance as described above. That is, when the present flow is executed as a process at the time of receiving MIDI data such as a note-on process, the time range is the partial waveform described above. Is a sound waveform sample of an uncalculated portion of all the samples. At the time of receiving the MIDI data, the calculation is performed based on the calculation order determined in the immediately preceding sound source processing. Therefore, the calculation order of the tone generation channels is not newly determined. If there is a new note-on, the order of all other sounding channels is moved down by one, and the new note-on channel is sequentially added to the first in the calculation order.

【0062】発音波形演算処理が開始されると、ステッ
プS600にて演算順序の1番の発音チャンネル(c
h)の最初の楽音波形サンプルの演算準備が行われる。
演算準備処理とは、前回の読み出しアドレス、各種EG
値、各種EGのステート(アタックやリリース等の状
態)、LFO値等のデータを、ただちに演算に使えるよ
うにアクセス準備したりCPU1の内部レジスタにロー
ドしたりする処理のことである。そして、ステップS6
10にてLFO、フィルタG、音量EGの波形演算を行
い、指定された前記時間範囲の演算に必要なLFO波
形、FEG波形、AEG波形のサンプルを生成する。L
FO波形はFナンバ、FEG波形、AEG波形に加算さ
れ、各データを変調する。また、ステップS540で消
音すべきチャンネルとして指定された発音チャンネルに
関しては、音量EGとして前記範囲内で急速に減衰する
ダンプ用のAEG波形が演算生成される。
When the sounding waveform calculation processing is started, in step S600, the first sounding channel (c
h) The first musical tone waveform sample is prepared for calculation.
The operation preparation processing includes the previous read address, various EG
This is a process for preparing access to data such as values, states of various EGs (states of attack and release, etc.), LFO values, and the like, and loading them into internal registers of the CPU 1 so that they can be used immediately for calculations. Then, step S6
At 10, waveform calculations of the LFO, the filter G, and the volume EG are performed, and samples of the LFO waveform, the FEG waveform, and the AEG waveform necessary for the calculation of the designated time range are generated. L
The FO waveform is added to the F number, FEG waveform, and AEG waveform, and modulates each data. In addition, with respect to the sound generation channel designated as the channel to be silenced in step S540, an AEG waveform for a dump that rapidly attenuates within the above range is calculated and generated as the volume EG.

【0063】次いで、ステップS620にて上記前回の
読み出しアドレスを初期値としてFナンバを繰り返し加
算し前記時間範囲内の各サンプルの読み出しアドレスを
発生し、この読み出しアドレスの整数部に基づいて音色
データ内の波形記憶領域WDより波形サンプルを読み出
すと共に、この読み出しアドレスの小数部に基づいて読
み出された波形サンプル間の補間を行い、前記時間範囲
内の全補間サンプルを算出するようにする。例えば、前
記時間範囲が100サンプル分の時間に相当する場合、
100サンプル分まとめてこのステップにより処理が行
われる。ここで、前記時間範囲内の複数サンプル分の処
理は、読み出しアドレスに対するFナンバの加算と、加
算により生成されたアドレスに基づく読み出しから補間
の処理までの処理を単位処理として、この単位処理を繰
り返して行うようになっているため、読み出しアドレス
のCPUレジスタへの読み込みが全体として1回で済
み、処理が高速化されている。
Next, in step S620, the F number is repeatedly added with the previous read address as an initial value to generate a read address for each sample within the time range. And read out the waveform samples from the waveform storage area WD, and perform interpolation between the read waveform samples based on the decimal part of the read address to calculate all the interpolated samples within the time range. For example, if the time range corresponds to the time for 100 samples,
The processing is performed by this step for 100 samples at a time. Here, in the processing for a plurality of samples within the time range, the addition of the F number to the read address and the processing from reading based on the address generated by the addition to the interpolation processing are unit processing, and this unit processing is repeated. Therefore, the reading of the read address into the CPU register only needs to be performed once as a whole, and the processing speed is increased.

【0064】さらに、ステップS630にて前記時間範
囲内の補間サンプルに対し音色フィルタ処理が行われ、
前記FEG波形に基づいて音色制御が行われ、ステップ
S640にて、フィルタ処理済の前記時間範囲内のサン
プルに対し振幅制御処理が行われ、前記AEGおよび音
量データに基づいて楽音波形サンプルの振幅制御が行わ
れると共に、振幅制御処理された前記時間範囲分の楽音
波形サンプルがそれぞれ出力バッファXの対応するサン
プルに足し込まれる累算書込処理が実行される。この処
理においては、前記時間範囲内の各サンプルについて、
振幅制御とバッファXの対応サンプルへの足し込みを連
続して行うようになっているので、サンプルのCPUレ
ジスタへの取り込み回数が少なくて済み、処理速度が向
上している。
Further, in step S630, timbre filter processing is performed on the interpolated samples within the time range.
Tone control is performed based on the FEG waveform, and in step S640, amplitude control processing is performed on the sample within the time range that has been subjected to the filter processing, and amplitude control of the tone waveform sample is performed based on the AEG and the volume data. Is performed, and an accumulation writing process is performed in which the tone waveform samples for the time range subjected to the amplitude control process are added to the corresponding samples in the output buffer X, respectively. In this process, for each sample within the time range,
Since the amplitude control and the addition of the buffer X to the corresponding sample are performed continuously, the number of samples to be taken into the CPU register can be reduced, and the processing speed is improved.

【0065】上述したように、ステップS620からス
テップS640にかけての楽音波形サンプルの演算生成
処理は、基本的には前記所定時間範囲内の全サンプルを
生成するように行われるわけであるが、ステップS61
0における音量EGの波形演算の結果、AEG波形のレ
ベルが下がり音量が十分減衰した範囲については、演算
の対象からはずされ、その分処理を少なくするようにな
っている。特に、ステップS540の指示により、ダン
プ用AEG波形を生成した発音チャンネルに関しては、
前記所定時間範囲の途中で十分な減衰が得られる場合が
多い。
As described above, the processing for generating the musical tone waveform samples from step S620 to step S640 is basically performed so as to generate all the samples within the predetermined time range.
As a result of the waveform calculation of the volume EG at 0, the range in which the level of the AEG waveform is lowered and the volume is sufficiently attenuated is excluded from the calculation, and the processing is reduced accordingly. In particular, regarding the sounding channel for which the AEG waveform for dump has been generated according to the instruction in step S540,
In many cases, sufficient attenuation is obtained in the middle of the predetermined time range.

【0066】そして、ステップS650にて、波形演算
処理をこのまま続行したい場合にDMA9に対し期限内
に波形を供給できそうか否か判定されて、演算を打ち切
るか否かの判断が行われる。ここで、期限内に波形を供
給するというのは、先に生成された発音波形を記憶する
特定エリアを再生中のDMA9が、そのエリアの再生を
終了してしまう前に、バッファXにそれに引き続く発音
波形を準備し、そのバッファXのエリアを再生予約でき
ることである。そのまま続行すると間に合わなくなる場
合は、演算を打ち切ると判断され、ステップS670に
て打ち切り処理が実行されて、この発音波形演算処理は
終了する。
Then, in step S650, if it is desired to continue the waveform calculation processing as it is, it is determined whether or not the waveform can be supplied to the DMA 9 within the time limit, and it is determined whether or not to stop the calculation. Here, supplying the waveform within the time limit means that the DMA 9 which is reproducing the specific area storing the previously generated sound generation waveform continues to the buffer X before the reproduction of the area ends. That is, a tone generation waveform is prepared, and the area of the buffer X can be reserved for reproduction. If it is not enough to continue the process, it is determined that the calculation is to be terminated. In step S670, the termination process is executed, and the sound waveform calculation process ends.

【0067】また、また演算を続行しても大丈夫と判定
された場合、演算を打ち切る必要がないと判断され、続
くステップS660にて演算すべき全発音チャンネル分
の楽音波形の演算生成が終了したか否かが判断され、全
発音チャンネルの演算が終了したと判断されない場合
は、ステップS680にて次の演算順序を付与された発
音チャンネルの最初の楽音波形サンプルが指定され、次
順の発音チャンネルの楽音チャンネルの楽音波形の演算
生成準備が行われる。準備が完了したら、処理はステッ
プS610に戻り、その発音チャンネルのついて先程と
同様にステップS610ないしステップS640に渡る
楽音生成の処理が実行される。このようにして、全発音
チャンネルの演算が終了するまでステップS610ない
しステップS660の処理が繰り返し行われるようにな
る。各発音チャンネルの処理毎に、生成された前記所定
時間範囲分のサンプルは、ステップS640にてバッフ
ァXの対応するサンプルに順次足し込まれる。
If it is determined that it is safe to continue the calculation, it is determined that it is not necessary to terminate the calculation, and in step S660, the generation of the musical tone waveforms for all the sounding channels to be calculated has been completed. If it is determined that the calculation has not been completed for all sounding channels, the first tone waveform sample of the sounding channel assigned the next calculation order is designated in step S680, and the next sounding channel is specified. Preparation for calculation and generation of the musical tone waveform of the musical tone channel of FIG. When the preparation is completed, the process returns to step S610, and the tone generation process from step S610 to step S640 is executed for the sound channel in the same manner as described above. In this manner, the processing from step S610 to step S660 is repeatedly performed until the calculation for all the tone generation channels is completed. For each process of each sounding channel, the generated samples for the predetermined time range are sequentially added to the corresponding samples of the buffer X in step S640.

【0068】ステップS660で演算生成処理が終了し
たと判定された場合、本発音波形演算を終了する。この
時、バッファXには、演算すべき全発音チャンネルの生
成された楽音波形サンプルを累算した累算値が、前記時
間範囲に対応するサンプル数分、新たに記憶されてい
る。一方、ステップS650で打ち切りを行うと判断さ
れ、ステップS670の打ち切り処理を経て発音波形演
算が終了した場合、バッファXには、演算すべき全発音
チャンネルの内、その時点までに演算生成を完了した発
音チャンネルについての楽音波形サンプルの累算値が、
前記時間範囲に対応するサンプル数分、新たに記憶され
ている。
If it is determined in step S660 that the calculation generation processing has been completed, the main sound generation waveform calculation ends. At this time, an accumulated value obtained by accumulating the generated tone waveform samples of all tone generation channels to be calculated is newly stored in the buffer X for the number of samples corresponding to the time range. On the other hand, if it is determined in step S650 that the sound generation is to be discontinued, and the sound generation waveform calculation is completed through the cutoff processing in step S670, the calculation generation has been completed in the buffer X by that time among all the sound generation channels to be calculated. The cumulative value of the tone waveform sample for the pronunciation channel is
The number of samples corresponding to the time range is newly stored.

【0069】打ち切り以降の演算順序を付与された発音
チャンネルについては楽音の演算生成が行われず、結果
的にそのチャンネルの楽音が消えてしまうわけである
が、ステップS530の処理により、消えてしまった場
合に影響の少ないチャンネルほど後ろの演算順序とされ
ているので、打ち切りによる悪影響は最小限に抑えられ
る。なお、ステップS670の打ち切り処理では、一旦
演算できなかったチャンネルについて、次回以降の発音
波形演算においても消音したままになるよう、chレジ
スタを設定している。
For the sounding channels to which the calculation order after the truncation has been assigned, no musical tone operation is generated, and as a result, the musical tones of the channel disappear, but they disappear by the processing in step S530. In such a case, the lower the influence, the later the calculation order, so that the adverse effect due to the truncation can be minimized. In the termination process of step S670, the ch register is set so that the channel that cannot be calculated once remains muted in the next and subsequent sound generation waveform calculations.

【0070】以上説明した発音波形演算処理が図9
(a)にフローチャートを示すノートオン処理のステッ
プS340にて実行された場合には、上述した発音波形
演算処理が終了すると、該フローチャートのステップS
350の処理が続けて実行されて、ノートオン処理が終
了する。また、発音波形演算処理が図9(b)にフロー
チャートを示すノートオフ処理のステップS430にて
実行された場合には、上述した発音波形演算処理が終了
すると、該フローチャートのステップS440の処理が
続けて実行されて、ノートオフ処理が終了する。
The above-described sound waveform calculation processing is performed as shown in FIG.
In the case where the sound generation waveform calculation process described above is completed in step S340 of the note-on process shown in the flowchart of FIG.
The process of 350 is continuously executed, and the note-on process ends. When the sounding waveform calculation processing is executed in step S430 of the note-off processing shown in the flowchart of FIG. 9B, when the above-described sounding waveform calculation processing ends, the processing of step S440 in the flowchart is continued. And the note-off process ends.

【0071】さらに、発音波形演算処理が図10にフロ
ーチャートを示す音源処理のステップS550にて実行
された場合には、上述した発音波形演算処理が終了する
と、該フローチャートのステップS560以降の処理が
続けて実行されて、ステップS580の処理が終了する
と音源処理が終了する。これらのノートオン処理、ノー
トオフ処理、および音源処理は、図6に示す定常ループ
内において循環して繰り返し行われ、発音される楽音波
形サンプルが順次生成されるようになる。
Further, when the sound waveform calculation processing is executed in step S550 of the sound source processing shown in the flowchart of FIG. 10, when the above sound waveform calculation processing is completed, the processing from step S560 of the flowchart is continued. When the processing in step S580 ends, the sound source processing ends. These note-on processing, note-off processing, and sound source processing are repeatedly performed repeatedly in a stationary loop shown in FIG. 6, so that musical tone waveform samples to be generated are sequentially generated.

【0072】なお、本発明の楽音生成方法において、い
うまでもないことであるが、例えば複数の楽音の発生を
指示するステップと、所定時間時間間隔で演算開始を指
示するステップのように、互いに独立したデータを扱う
ステップについては、前記説明した順番で処理を行う必
要はなく、その処理の順番を入れ替えて実行するように
してもよい。また、本発明の楽音生成方法においては、
前記した楽音生成演算処理の空き時間を利用して他のア
プリケーションソフトから依頼された発音指示を含む処
理を行うことができる。他のアプリケーションソフトと
しては、ゲームソフト、通信ソフト、事務処理ソフト等
がある。
Needless to say, in the musical tone generating method of the present invention, for example, a step of instructing the generation of a plurality of musical tones and a step of instructing the start of calculation at a predetermined time interval are performed. Regarding the step of handling independent data, it is not necessary to perform the processing in the order described above, and the processing order may be changed and executed. In the musical sound generation method of the present invention,
A process including a sounding instruction requested by another application software can be performed using the idle time of the above-described musical tone generation calculation process. Other application software includes game software, communication software, business processing software, and the like.

【0073】以上においては、前記図1に示す楽音生成
装置にて実行されるプログラムとして本発明の楽音生成
方法の説明を行った。また、本発明の楽音生成方法を、
Windows (米マイクロソフト社のパソコン用OS)やそ
の他のオペレーティングシステムの動作する汎用コンピ
ュータ上で、1つのアプリケーションプログラムとし
て、他のアプリケーションプログラムと並列実行させて
もよい。
In the above, the tone generating method of the present invention has been described as a program executed by the tone generating apparatus shown in FIG. In addition, the musical sound generation method of the present invention includes:
One application program may be executed in parallel with another application program on a general-purpose computer that runs Windows (OS for a personal computer of Microsoft Corporation in the United States) or another operating system.

【0074】[0074]

【発明の効果】本発明は以上のように構成されているた
め、複数の楽音波形サンプルの演算について1回だけ各
発音チャンネルの準備処理を行えば良いようになり、オ
ーバヘッドを小さくすることができる。このため、生成
された楽音の質を向上することができると共に、同時発
音チャンネル数を増加することができる。また、楽音波
形サンプルの演算をMIDIイベントが入力される毎に
行うようにすると、演算が分散されるようになり、発音
初期処理による発音数の減少を防止することができる。
Since the present invention is constructed as described above, the preparation process for each tone generation channel only needs to be performed once for the calculation of a plurality of musical tone waveform samples, and the overhead can be reduced. . Therefore, the quality of the generated musical sound can be improved, and the number of simultaneously sounding channels can be increased. Further, if the calculation of the musical tone waveform sample is performed every time a MIDI event is input, the calculations are dispersed, and the number of sounds generated by the sound generation initial process can be prevented from being reduced.

【0075】さらにまた、演奏情報の発生時に演奏情報
の受入処理を行い、受け入れた演奏情報に基づく楽音制
御あるいは波形生成は、該受入処理の空き時間に実行さ
れるメインステップに含まれるようにしたので、演奏情
報が発生した時点での処理の増加分を前記空き時間内に
分散させることができ、一時的な処理の増加を防止する
ことができる。
Further, when performance information is generated, processing for receiving performance information is performed, and tone control or waveform generation based on the received performance information is included in the main step executed during the idle time of the reception processing. Therefore, an 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.

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

【図1】 本発明の楽音生成方法を実行できる楽音生成
装置の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a musical sound generation device capable of executing a musical sound generation method of the present invention.

【図2】 RAM上の音色データエリアを示す図であ
る。
FIG. 2 is a diagram showing a tone color data area on a RAM.

【図3】 RAM上の入力バッファエリアを示す図であ
る。
FIG. 3 is a diagram showing an input buffer area on a RAM.

【図4】 RAM上のchレジスタエリアを示す図であ
る。
FIG. 4 is a diagram showing a ch register area on a RAM.

【図5】 RAM上の出力バッファエリアを示す図であ
る。
FIG. 5 is a diagram showing an output buffer area on a RAM.

【図6】 本発明の楽音生成方法のメインルーチンのフ
ローチャートを示す図である。
FIG. 6 is a diagram showing a flowchart of a main routine of the musical sound generation method of the present invention.

【図7】 本発明の楽音生成方法のMIDI受信割込処
理のフローチャートを示す図である。
FIG. 7 is a diagram showing a flowchart of MIDI reception interrupt processing of the musical sound generation method of the present invention.

【図8】 メインルーチンにおけるMIDI処理のフロ
ーチャートを示す図である。
FIG. 8 is a diagram showing a flowchart of a MIDI process in a main routine.

【図9】 MIDI処理におけるノートオン処理および
ノートオフ処理のフローチャートを示す図である。
FIG. 9 is a diagram showing a flowchart of a note-on process and a note-off process in the MIDI process.

【図10】 メインルーチンにおける音源処理のフロー
チャートを示す図である。
FIG. 10 is a diagram showing a flowchart of a sound source process in a main routine.

【図11】 本発明の楽音生成方法の発音波形演算処理
のフローチャートを示す図である。
FIG. 11 is a diagram showing a flowchart of a tone generation waveform calculation process in the tone generation method of the present invention.

【図12】 本発明の第2の実施の形態におけるタイミ
ング図を示す図である。
FIG. 12 is a diagram showing a timing chart according to the second embodiment of the present invention.

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

1 CPU、2 ROM、3 RAM、4 タイマ、5
MIDIインターフェース、6 キーボード、7 デ
ィスプレイ、8 ハードディスク、9 再生部、10
DAC、11 サウンドシステム
1 CPU, 2 ROM, 3 RAM, 4 timer, 5
MIDI interface, 6 keyboard, 7 display, 8 hard disk, 9 playback unit, 10
DAC, 11 sound system

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平4−58291(JP,A) 特開 平4−155396(JP,A) 特開 平2−179692(JP,A) 特開 昭62−9395(JP,A) 特開 昭60−33600(JP,A) Hal Chamberlin,「M usical Application s of Microprocesso rs」SECOND EDITION, (1987),Hayden Books A Division Howard W.Sams S Co. (58)調査した分野(Int.Cl.7,DB名) G10H 1/02 - 1/16 G10H 1/18 - 1/18 101 G10H 7/00 - 7/12 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-4-58291 (JP, A) JP-A-4-155396 (JP, A) JP-A-2-179692 (JP, A) JP-A-62-1987 9395 (JP, A) JP-A-60-33600 (JP, A) Hal Chamberlin, "Musical Applications of Microprocessors" SECOND EDITION, (1987), Hayden Books AW Division. Sams S Co. (58) Field surveyed (Int. Cl. 7 , DB name) G10H 1/02-1/16 G10H 1/18-1/18 101 G10H 7 /00-7/12

Claims (9)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 指定された音を発生するための発生命令
を発行する第1のステップと、指定された音を複数の発音チャンネルの1つに割り当
て、割り当てたチャンネルに対応して該指定された音の
制御データをレジスタに記憶する 第2のステップと、 所定時間間隔で演算開始命令を発行する第3のステップ
と、各演算開始命令に応じて、前記レジスタに記憶された制
御データに基づき各チャンネル毎の波形データの複数サ
ンプルをまとめて算術的に生成するように前記各チャン
ネルで音生成演算を実行する 第4のステップであって、
この音生成演算は、生成すべき該複数サンプル分のサン
プリング周期を合計した時間よりも短い時間内で行われ
ることと個々のチャンネルで生成された波形データのサンプルを
各サンプル点毎に混合し、該各サンプル点毎の混合サン
プルデータを生成する 第5のステップと、各サンプリング周期毎に順次サンプル点の前記混合サン
プルデータを順次出力する 第6のステップとを具備する
ようにしたことを特徴とする生成方法。
1. A generation instruction for generating a specified sound.
A first step of issuing, assign the designated sound in one of a plurality of tone generation channels
Of the designated sound corresponding to the assigned channel.
A second step of storing control data in a register, a third step of issuing an operation start instruction at a predetermined time interval, and a control stored in the register according to each operation start instruction.
Multiple waveform data for each channel based on
Each of the above channels so that the
A fourth step of performing a sound generation operation on the panel ,
This sound generation calculation is performed for the samples of the plurality of samples to be generated.
Is performed within a time shorter than the total
And sample the waveform data generated on each channel.
Mix at each sample point and mix at each sample point.
A fifth step of generating pull data, and the mixed sample of the sample points sequentially at each sampling period.
; And a sixth step of sequentially outputting a pull data
A sound generation method characterized by doing so .
【請求項2】 前記各発生命令に応じて、第1の途中演
算開始命令を発行する第1の途中演算開始命令発行ステ
ップをさらに備え、前記第4のステップにおいて、前記第3のステップによ
る所定時間間隔の演算開始命令の発行と前記第1の途中
演算開始命令発行ステップによる第1の途中演算開始命
令の発行とに応答して、 生成済の波形データの末尾から
前記演算開始命令あるいは前記第1の途中演算開始命令
の発行時点までの区間に対応する複数サンプルの波形デ
ータを生成することを特徴とする請求項1記載の生成
方法。
2. A method according to claim 1, wherein said first instruction is performed in response to each of said generated instructions.
A first halfway operation start instruction issuance step for issuing a calculation start instruction , wherein the fourth step includes the step of:
Issuance of a calculation start instruction at a predetermined time interval and the first halfway
First intermediate operation start command by operation start instruction issue step
Command from the end of the generated waveform data
The operation start instruction or the first intermediate operation start instruction
2. The sound generation method according to claim 1, wherein waveform data of a plurality of samples corresponding to the section up to the point of issuance is generated.
【請求項3】 前記第3のステップで演算開始命令が発
行される時間間隔を複数に分割し、該分割された時間間
隔で第2の途中演算開始命令を発行する第2の途中演算
開始命令発行ステップをさらに備え、 前記第4のステップにおいて、前記第2の途中演算開始
命令の発行に応答して複数サンプルの波形データを生成
することを特徴とする請求項1記載の音 生成方法。
3. An operation start instruction is issued in the third step.
The time interval to be executed is divided into a plurality of
Second intermediate operation that issues a second intermediate operation start instruction at intervals
A start instruction issuing step, wherein in the fourth step, the second intermediate calculation start is started.
Generate waveform data of multiple samples in response to instruction issuance
The sound generation method according to claim 1, wherein
【請求項4】 複数の指定楽音を発生するための発生命
令を発行する第1のステップと、 各指定楽音を複数の発音チャンネルの中から指定された
いずれかの発音チャンネルに割り当て、該指定楽音の制
御データを各指定された発音チャンネルのチャンネルレ
ジスタに書き込んで記憶させる第2のステップと、 所定時間間隔で演算開始命令を発行する第3のステップ
と、 前記第3のステップで発行された各演算開始命令に応じ
て、前記チャンネルのチャンネルレジスタに記憶された
制御データに基づき各指定された発音チャンネル毎に複
数サンプル分の波形データを算術的に生成する第4のス
テップと、 前記第4のステップで指定された発音チャンネルにつき
生成された波形データを、各サンプル毎に混合し、前記
複数サンプルの各々についての混合サンプルデータを生
成する第5のステップと、 該複数サンプル分の混合サンプルデータを、サンプリン
グ周期毎にアナログ信号に変換する第6のステップとか
らなり、 前記第4のステップでは、他のチャンネルよりも大きな
音量を持つ楽音を発生している少なくとも1つのチャン
ネルを優先する所定の条件に従って、波形データの算術
的生成を行うようにした ことを特徴とする楽音生成方
法。
4. A generation instruction for generating a plurality of designated musical tones.
The first step of issuing a command, and each designated musical tone is designated from a plurality of sounding channels.
Assigned to one of the sound channels to control the specified tone
Control data for each specified sound channel.
A second step of writing and storing the data in a register, and a third step of issuing an operation start instruction at predetermined time intervals
According to each operation start instruction issued in the third step.
And stored in the channel register of the channel.
Based on the control data, multiple
A fourth process for arithmetically generating waveform data for several samples
And step, per the fourth sound channel specified in step
The generated waveform data is mixed for each sample,
Generate mixed sample data for each of multiple samples
And a fifth step of combining the sample data of the plurality of samples.
6th step to convert to analog signal at every clock cycle
And in the fourth step, a larger channel than the other channels
At least one channel generating a musical tone having a volume
Arithmetic operation of waveform data according to the specified conditions that prioritize
Tone generating method being characterized in that to perform the generative.
【請求項5】 1または複数の指定された楽音を発生す
るための1または複数の発生命令を受け取る第1のステ
ップと、前記発生命令に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音の制御データを各指定された楽音が割り当てられた
各発音チャンネルに対応するチャンネルレジスタに書き
込む 第2のステップと、各発音チャンネルで発生すべき楽音の重要度を決定する
第3のステップと、演算開始命令を順次発行する 第4のステップと、前記第4のステップで発行される演算開始命令の各々に
応答して、前記チャンネルレジスタに記憶された制御デ
ータに基づき、かつ前記第3のステップで決定した重要
度に従って、前記複数の発音チャンネルのうちの任意数
のチャンネルに つき 複数サンプル分の波形データを生成
する第5のステップと、前記第5のステップで各発音チャンネルにつき生成され
たチャンネル別波形データを、前記複数サンプルの各サ
ンプル毎に混合し、混合サンプルデータを生成する 第5
のステップとを具備することを特徴とする楽音生成方
法。
5. Generating one or more specified musical tones
A first step of receiving one or more generating instructions for generating a plurality of specified musical tones in response to said generating instructions.
Assigned to each one of the sound channels and the designated
Tone control data is assigned to each specified tone
Write to the channel register corresponding to each sounding channel
A second step of writing, computing a third step of determining the importance of the musical tone to be generated in each tone generation channel, and a fourth step of sequentially issuing the operation start instruction, which is issued by the fourth step For each of the start instructions
In response, the control data stored in the channel register
Important based on the data and determined in the third step
Any number of said plurality of sounding channels according to degree
A fifth step of generating waveform data of a plurality samples per channel, are generated for each sound channel by said fifth step
The waveform data for each channel is
Mixing each sample to generate mixed sample data .
Tone generating method characterized by comprising of the steps.
【請求項6】 1または複数の指定された楽音を発生す
るための1または複数の発生命令を受け取る第1のステ
ップと、前記発生命令に応答して、前記指定された楽音を複数の
発音チヤンネルの中から指定された発音チャンネルに割
り当て、当該指定された楽音の制御データを当該指定さ
れた楽音が割り当てられた発音チャンネルに対応するチ
ャンネルレジスタに書き込む第2の ステップと、演算開始命令を順次発行する第3の ステップと、各演算開始命令に応答して、前記チャンネルのチャンネ
ルレジスタに記憶された制御データに基づき各発音チャ
ンネル毎に複数サンプル分の波形データを生成する演算
を行う第4の ステップと、前記第4のステップで各発音チャンネルにつき生成され
た波形データを、前記複数サンプルの各サンプル毎に混
合し、混合サンプルデータを生成する第5のステップ
と、 すべての前記指定された発音チャンネルについての演算
が所定の時間期間内に完了しないだろうと判定されたと
き、少なくとも1つの発音チャンネルについての波形デ
ータの生成を変更する命令を発行する第6のステップと
を具備することを特徴とする 楽音生成方法。
6. Generating one or more specified musical tones
A first step of receiving one or more generation instructions for generating the specified musical tone in response to the generation instruction.
Assign to the specified sound channel from the sound channel
Control data of the specified musical tone.
Channel corresponding to the sound channel to which the assigned tone is assigned.
A second step of writing to a channel register, a third step of sequentially issuing an operation start instruction, and a channel of the channel in response to each operation start instruction.
Each sound channel based on the control data stored in the
Calculation to generate waveform data for multiple samples for each channel
And a fourth step of generating for each sounding channel in the fourth step.
Mixed waveform data for each of the plurality of samples.
5th step of generating mixed sample data
And the operation for all the specified sounding channels
Is determined not to be completed within a given time period
The waveform data for at least one sound channel.
A sixth step of issuing an instruction to change data generation;
A music sound generating method comprising :
【請求項7】 1または複数の指定された楽音を発生す
るための1または複数の発生命令を受け取る第1のステ
ップと、 前記発生命令に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音の制御データを各指定された楽音が割り当てられた
各発音チャンネルに対応するチャンネルレジスタに書き
込む第2のステップと、 演算開始命令を順次発行する第3のステップと、 各演算開始命令に応答して、前記チャンネルのチャンネ
ルレジスタに記憶された制御データに基づき各発音チャ
ンネル毎に複数サンプル分の波形データを生成する第4
のステップと、 前記第4のステップで各発音チャンネルにつき生成され
た波形データを、前記複数サンプルの各サンプル毎に混
合し、混合サンプルデータを生成する第5のステップと
を具備し、前記第4のステップは、特定の時間期間内で
波形データの生成が可能な発音チャンネルがどれである
かを判定し、可能であると判定された発音チャンネルに
ついてのみ前記波形データの生成を行うことを特徴とす
る楽音生成方法。
7. Generating one or more specified musical tones
A first step of receiving one or more generated instructions for
And a plurality of specified sounds in response to the generation command.
Assigned to each one of the sound channels and the designated
Tone control data is assigned to each specified tone
Write to the channel register corresponding to each sounding channel
And a third step of sequentially issuing an operation start instruction, and in response to each operation start instruction,
Each sound channel based on the control data stored in the
Fourth generation of waveform data for multiple samples for each channel
A step of, are generated for each sound channel by the fourth step
Mixed waveform data for each of the plurality of samples.
5th step of generating mixed sample data
Wherein the fourth step is performed within a specific time period.
Which pronunciation channel can generate waveform data
To the sounding channel determined to be possible
The generation of the waveform data only for the
Musical tone generation method.
【請求項8】 1または複数の指定された楽音を発生す
るための1または複数の発生命令を受け取る第1のステ
ップと、 前記発生命令に応答して、各指定された楽音を複数の発
音チャンネルのうちの各1つに割り当て、該指定された
楽音の制御データを各指定された楽音が割り当てられた
各発音チャンネルに対応するチャンネルレジスタに書き
込む第2のステップと、 演算開始命令を順次発行する第3のステップと、 各演算開始命令に応答して、前記チャンネルのチャンネ
ルレジスタに記憶された制御データに基づき各発音チャ
ンネル毎に複数サンプル分の波形データを生成する第4
のステップと、 前記第4のステップで各発音チャンネルにつき生成され
た波形データを、前記複数サンプルの各サンプル毎に混
合し、混合サンプルデータを生成する第5のステップと
を具備し、前記第4のステップは、発音チャンネルにつ
いての所定の演算処理順序に従って各発音チャンネルの
複数サンプル分の波形データを生成する演算を実行し、
かつ、該第4のステップによる波形データ生成演算の実
行中に、該演算が所定時間内に完了しないと判定された
とき、該所定時間の残余の時間では波形データ生成演算
を実行しないようにしたことを特徴とする楽音生成方
法。
8. Generating one or more specified musical tones
A first step of receiving one or more generated instructions for
And a plurality of specified sounds in response to the generation command.
Assigned to each one of the sound channels and the designated
Tone control data is assigned to each specified tone
Write to the channel register corresponding to each sounding channel
And a third step of sequentially issuing an operation start instruction, and in response to each operation start instruction,
Each sound channel based on the control data stored in the
Fourth generation of waveform data for multiple samples for each channel
A step of, are generated for each sound channel by the fourth step
Mixed waveform data for each of the plurality of samples.
5th step of generating mixed sample data
And the fourth step includes the steps of:
Of each sounding channel according to the predetermined
Performs an operation to generate waveform data for multiple samples,
Further, the execution of the waveform data generation calculation in the fourth step is performed.
During the row, it was determined that the operation was not completed within a predetermined time
In the remaining time of the predetermined time, the waveform data generation calculation
Tone generation method characterized by not executing
Law.
【請求項9】 複数の指定楽音を発生するための発生命
令を発行する第 1のステップと、 各指定楽音を複数の発音チャンネルの中から指定された
いずれかの発音チャンネルに割り当て、該指定楽音の制
御データを各指定された発音チャンネルのチャンネルレ
ジスタに書き込んで記憶させる第2のステップと、 前記指定された発音チャンネルで生成する楽音の重要度
に応じて、各指定された発音チャンネルの演算順序を決
定する第3のステップと、 所定時間間隔で演算開始命令を発行する第4のステップ
と、 前記第4のステップで発行された演算開始命令に応じ
て、前記指定された発音チャンネルのチャンネルレジス
タに記憶された制御データに基づき複数サンプル分の波
形データを算術的に生成する第5のステップと、 該複数サンプルの各サンプル毎に前記各チャンネルで生
成された波形データを混合し、複数サンプル分の混合サ
ンプルデータを生成する第6のステップと、 該複数サンプル分の混合サンプルデータを、サンプリン
グ周期毎にアナログ信号に変換する第7のステップとか
らなり、 前記第5のステップにおいて、前記第3のステップによ
り決定された演算順序に従って各指定された発音チャン
ネル毎の楽音生成を行うと共に、実行中の楽音生成が間
に合わず、前記第7のステップにおいて変換された前記
アナログ信号が途切れるおそれがある場合には、前記演
算順序の途中の発音チャンネルの時点で該楽音生成演算
を終了することにより、前記アナログ信号が途切れない
ようにしたことを特徴とする楽音生成方法。
9. A generation order for generating a plurality of designated musical tones.
The first step of issuing a command, and each designated musical tone is designated from a plurality of sounding channels.
Assigned to one of the sound channels to control the specified tone
Control data for each specified sound channel.
A second step of writing and storing in a register, and the importance of musical tones generated in the specified sounding channel
The order of calculation for each specified sound channel.
And a fourth step of issuing an operation start instruction at predetermined time intervals.
And the operation start instruction issued in the fourth step.
The channel register of the specified sound channel.
Data for multiple samples based on the control data stored in the
A fifth step of arithmetically generating shape data; and generating the shape data in each of the channels for each of the plurality of samples.
The generated waveform data is mixed and mixed for multiple samples.
A sixth step of generating sample data, and combining the sample data of the plurality of samples with a sampler.
7th step to convert to analog signal at every clock cycle
In the fifth step, the third step
Each specified pronunciation channel according to the determined operation order.
Performs tone generation for each channel, and
And converted in the seventh step
If the analog signal may be interrupted,
At the time of the sounding channel in the middle of the calculation order
The analog signal is not interrupted
A method for generating a musical tone, characterized in that:
JP7299185A 1995-05-19 1995-10-23 Music generation method Expired - Lifetime JP3003559B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7299185A JP3003559B2 (en) 1995-05-19 1995-10-23 Music generation method

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP14415995 1995-05-19
JP7-144159 1995-05-19
JP7299185A JP3003559B2 (en) 1995-05-19 1995-10-23 Music generation method

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP28390499A Division JP3627590B2 (en) 1995-05-19 1999-10-05 Sound generation method
JP28390399A Division JP3632744B2 (en) 1995-05-19 1999-10-05 Sound generation method

Publications (2)

Publication Number Publication Date
JPH0944160A JPH0944160A (en) 1997-02-14
JP3003559B2 true JP3003559B2 (en) 2000-01-31

Family

ID=26475669

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7299185A Expired - Lifetime JP3003559B2 (en) 1995-05-19 1995-10-23 Music generation method

Country Status (1)

Country Link
JP (1) JP3003559B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002017294A1 (en) * 2000-08-18 2002-02-28 Yamaha Corporation Musical sound generator, portable terminal, musical sound generating method, and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3293474B2 (en) * 1996-06-06 2002-06-17 ヤマハ株式会社 Tone generation method
US6945784B2 (en) * 2000-03-22 2005-09-20 Namco Holding Corporation Generating a musical part from an electronic music file

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62271147A (en) * 1986-05-20 1987-11-25 Mitsubishi Electric Corp Task control method
JP2869573B2 (en) * 1990-06-28 1999-03-10 カシオ計算機株式会社 Musical sound wave generator
JP3169953B2 (en) * 1990-06-15 2001-05-28 ヤマハ株式会社 Sound source device
JPH0549152A (en) * 1991-08-13 1993-02-26 Nissin Electric Co Ltd Processing circuit for sample data in effective value (r.m.s. value) processing relay
JPH05274788A (en) * 1992-03-26 1993-10-22 Matsushita Electric Ind Co Ltd Method for recording flag and recording and reproducing device
JPH06149594A (en) * 1992-11-10 1994-05-27 Matsushita Electric Ind Co Ltd Multitask executive device
JPH06187169A (en) * 1992-12-18 1994-07-08 Matsushita Electric Ind Co Ltd Multi-task executing device
JP2666667B2 (en) * 1992-12-18 1997-10-22 松下電器産業株式会社 Multitask execution device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Hal Chamberlin,「Musical Applications of Microprocessors」SECOND EDITION,(1987),Hayden Books A Division Howard W.Sams S Co.

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002017294A1 (en) * 2000-08-18 2002-02-28 Yamaha Corporation Musical sound generator, portable terminal, musical sound generating method, and storage medium

Also Published As

Publication number Publication date
JPH0944160A (en) 1997-02-14

Similar Documents

Publication Publication Date Title
KR100421589B1 (en) Tone generating method and apparatus thereof
JP3637578B2 (en) Music generation method
US5831193A (en) Method and device for forming a tone waveform by combined use of different waveform sample forming resolutions
US6326537B1 (en) Method and apparatus for generating musical tone waveforms by user input of sample waveform frequency
JP3293474B2 (en) Tone generation method
JP2924745B2 (en) Musical sound generating apparatus and method
JP2970526B2 (en) Sound source system using computer software
JP3003559B2 (en) Music generation method
US6770806B2 (en) Tone signal processing apparatus with intermittent clock supply
JP3632744B2 (en) Sound generation method
US6040516A (en) Tone generation system using computer software and storage medium storing the computer software
JPH07121181A (en) Sound information processor
JP3637577B2 (en) Music generation method
JP3152198B2 (en) Music sound generation method and music sound generation device
JP3627590B2 (en) Sound generation method
JP3409642B2 (en) Automatic performance device, automatic performance data processing method, and electronic information storage medium
JP3587133B2 (en) Method and apparatus for determining pronunciation length and recording medium
JP3141789B2 (en) Sound source system using computer software
JP2002297139A (en) Playing data modification processor
JPH10207465A (en) Method of generating musical sound and device therefor
JP7159583B2 (en) Musical sound generating device, musical sound generating method, musical sound generating program, and electronic musical instrument
JP3740717B2 (en) Tone generator and musical sound generation method
JP3603638B2 (en) Musical tone generation method
JP3627557B2 (en) Musical sound generating apparatus and method
JP3463547B2 (en) Performance data changing device, performance data changing method, and medium recording program

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

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

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20081119

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20081119

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20091119

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20101119

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20101119

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20111119

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20111119

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20111119

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20121119

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20121119

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20131119

Year of fee payment: 14

EXPY Cancellation because of completion of term