JPH09269774A - Musical sound generator - Google Patents

Musical sound generator

Info

Publication number
JPH09269774A
JPH09269774A JP8099639A JP9963996A JPH09269774A JP H09269774 A JPH09269774 A JP H09269774A JP 8099639 A JP8099639 A JP 8099639A JP 9963996 A JP9963996 A JP 9963996A JP H09269774 A JPH09269774 A JP H09269774A
Authority
JP
Japan
Prior art keywords
data
waveform
tone
musical tone
waveform data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP8099639A
Other languages
Japanese (ja)
Inventor
Hiroyuki Sato
弘幸 佐藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP8099639A priority Critical patent/JPH09269774A/en
Publication of JPH09269774A publication Critical patent/JPH09269774A/en
Pending legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce the load on a CPU in a software sound source. SOLUTION: Musical sound waveform data corresponding to a MIDI signal to be inputted are arithmetically generated by using waveform data and tone data stored in a hard disk device 13. The generated musical sound waveform data are outputted to a codec 19 and in the codec 19, the multiplying of envelopes and the multiplying of pan coefficients are executed and the waveform data are subjected to a D/A conversion every one sampling cycle to be outputted from a sound system 20 to the outside as a musical sound signal.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】この発明は、演算処理装置に
よる演算により楽音を生成するようにした楽音発生装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a musical tone generating device which generates a musical tone by calculation by a calculation processing device.

【0002】[0002]

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

【0003】また、パーソナルコンピュータなどの汎用
処理装置において楽音を発生させる場合には、装置外部
に専用音源装置を付加したり、あるいは、楽音波形を発
生するための音源チップ、波形データを記憶する波形R
OM、および、A/D変換回路、D/A変換回路、FI
FOバッファおよびインタフェース回路を備えた符号化
復号化回路(CODEC)チップなど、数個のICチッ
プが搭載された拡張ボードを本体内に接続することによ
り、楽音を発生させていた。
Further, when a musical tone is generated in a general-purpose processing device such as a personal computer, a dedicated sound source device is added to the outside of the device, or a sound source chip for generating a musical tone waveform and a waveform for storing waveform data. R
OM, A / D conversion circuit, D / A conversion circuit, FI
A musical tone has been generated by connecting an expansion board, on which several IC chips are mounted, such as an encoding / decoding circuit (CODEC) chip including an FO buffer and an interface circuit, to the main body.

【0004】さらに、最近では、前記ハードウエア音源
の動作をコンピュータプログラムによる音源処理(ソフ
トウエア音源)に置き換え、CPUにより演奏処理と音
源処理とを実行させるようにした楽音発生方法、いわゆ
るソフトウエア音源が提案されている。ここで、演奏処
理とは、前述した音源ドライバ処理に相当する処理であ
って、入力されたMIDIなどの演奏情報に基づき、生
成される楽音を制御するための制御情報を作成する処理
のことである。また、音源処理とは、前記演奏処理にお
いて作成された制御情報に基づき楽音の波形データを生
成する処理のことである。この楽音発生方法によれば、
専用の楽音発生装置や音源ボードを用いることなく、C
PUとソフトウエアのほかにはDA変換用のチップを備
えるだけで、楽音を発生させることが可能となる。
Furthermore, recently, the operation of the hardware sound source is replaced with a sound source process (software sound source) by a computer program, and the CPU executes the performance process and the sound source process, that is, a so-called software sound source. Is proposed. Here, the performance process is a process corresponding to the sound source driver process described above, and is a process of creating control information for controlling a generated musical tone based on input performance information such as MIDI. is there. The sound source processing is processing for generating waveform data of musical sounds based on the control information created in the performance processing. According to this tone generation method,
Without using a special tone generator or sound source board, C
In addition to the PU and software, it is possible to generate musical tones simply by providing a DA conversion chip.

【0005】楽音を発生させるためには、サンプリング
周期、すなわち、DAC(DigitalAnalog Converter)
における変換タイミング毎に演算生成した波形サンプル
をDACに供給することが必要であり、このためにCP
Uにおける演算量は非常に大きいものとなっている。す
なわち、CPUは、楽音を演算生成するために、入力さ
れるMIDIイベントなどの演奏情報から楽音制御情報
を生成する処理および波形生成処理を実行しなければな
らない。
In order to generate a musical tone, a sampling period, that is, a DAC (Digital Analog Converter) is used.
It is necessary to supply the DAC with the waveform samples calculated and generated at each conversion timing in
The calculation amount in U is very large. That is, the CPU has to execute a process of generating musical tone control information from the input performance information such as a MIDI event and a waveform generating process in order to arithmetically generate a musical tone.

【0006】例えば波形メモリ方式の音源の場合には、
この波形生成処理において、演奏情報から生成された楽
音制御情報に基づいて、各発音チャンネル毎に、LFO
(Low Frequency Oscillator)、フィルタEGおよび音
量EGなどの波形演算を実行し、対応する波形メモリ
(波形テーブル)から波形データを読み出し、該読み出
した波形データに対して補間演算を行い、その結果得ら
れた波形データに対して各種EG波形のサンプルを乗算
して当該発音チャンネル分の波形データを演算生成し、
これを全発音チャンネルについて繰り返し実行して各発
音チャンネル分の波形サンプルデータを累算することに
より1サンプリングタイミングに対応する楽音波形デー
タの生成が行われる。
For example, in the case of a waveform memory type sound source,
In this waveform generation process, the LFO is generated for each sound generation channel based on the tone control information generated from the performance information.
(Low Frequency Oscillator), filter EG, volume EG, and other waveform calculations are performed, waveform data is read from the corresponding waveform memory (waveform table), interpolation calculation is performed on the read waveform data, and the result is obtained. The waveform data is multiplied by various EG waveform samples to generate waveform data for the sound channel,
This is repeatedly executed for all sound generation channels to accumulate waveform sample data for each sound generation channel, thereby generating musical tone waveform data corresponding to one sampling timing.

【0007】[0007]

【発明が解決しようとする課題】前述した音源ボードを
接続する方法は、音源ボードに搭載されるICチップの
点数が多く、楽音を発生させるためのコストが高くなる
という問題点を有している。また、波形データが波形R
OMに格納されており、発生する楽音の自由度が乏しい
ものであった。また、前述したソフトウエア音源は、楽
音を発生させるために特別のハードウエアを必要としな
いが、1DACサイクル毎に出力すべき波形データを演
算により生成することが必要であるため、この楽音波形
データを演算生成するためのCPUの負荷が非常に大き
くなるという問題点がある。
The above-described method of connecting the sound source board has a problem that the number of IC chips mounted on the sound source board is large and the cost for generating a musical sound is high. . In addition, the waveform data is the waveform R
It was stored in the OM, and the degree of freedom of the generated musical sound was poor. Further, the software sound source described above does not require special hardware to generate a musical tone, but it is necessary to generate waveform data to be output every DAC cycle by calculation, so that the tone waveform data is generated. There is a problem that the load of the CPU for calculating and generating is very large.

【0008】そこで、本発明は、自由度があり、しか
も、CPUの処理負荷が比較的小さい楽音発生装置を提
供することを目的としている。
Therefore, an object of the present invention is to provide a musical tone generating apparatus which has a degree of freedom and has a comparatively small processing load on the CPU.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するため
に、本発明の楽音発生装置は、演算処理装置による演算
により楽音波形データを生成し、該演算生成された楽音
波形データを符号化復号化回路に設けられたデジタルア
ナログ変換器によりアナログ信号に変換して外部出力す
る楽音発生装置において、前記符号化復号化回路は前記
演算処理装置により演算生成された楽音波形データに対
するレベル乗算処理およびパン係数乗算処理を実行する
手段を有するものである。そして、前記符号化復号化回
路は、少なくともエンベロープジェネレータおよびパン
係数発生器のいずれか一方を備えているものである。
In order to achieve the above object, a musical tone generating apparatus of the present invention generates musical tone waveform data by calculation by a calculation processing unit, and encodes and decodes the generated musical tone waveform data. In a tone generating apparatus for converting the signal into an analog signal by a digital-to-analog converter provided in an encoding circuit and outputting it to the outside, the encoding / decoding circuit performs a level multiplication process and a pan for the tone waveform data arithmetically generated by the arithmetic processing unit. It has means for executing coefficient multiplication processing. The encoding / decoding circuit includes at least one of an envelope generator and a pan coefficient generator.

【0010】本発明の楽音発生装置においては、楽音の
発生は演算処理により実行されるため、音源用の特別の
ハードウエアを必要とせず、また、演算生成された楽音
に対する音量制御演算などは符号化復号化回路(COD
EC)においてハード的に実行されているので、楽音発
生のためのCPU負荷が大きくなりすぎることはない。
また、従来のソフト音源においても、D/A変換のため
のCODECは必要とされていたため、CODEC中に
音量制御演算用のハードウエアを設けることによって格
別のコスト増となることはない。
In the musical tone generating apparatus of the present invention, since the musical tone is generated by the arithmetic processing, no special hardware for the sound source is required, and the volume control calculation for the musical tone generated by the calculation is performed by the code. Decoding circuit (COD
Since it is executed by hardware in EC), the CPU load for musical tone generation does not become too large.
Further, even in the conventional soft sound source, the CODEC for the D / A conversion is required, so that the provision of the hardware for the volume control operation in the CODEC does not cause an extra cost increase.

【0011】[0011]

【発明の実施の形態】図1に本発明の楽音発生装置の一
実施の形態の構成を示す。この図において、10は楽音
波形サンプルの生成や各種アプリケーションプログラム
などを実行する中央処理装置(CPU)、11はプリセ
ット音色データなどが記憶されているROM、12は実
行するプログラムやデータが読み込まれるとともに波形
テーブル、各種バッファ領域およびワークエリアとして
使用されるRAM、13は各種の波形データや音色デー
タおよび各種のアプリケーションプログラムなどが記憶
されているハードディスク装置、14は各種のデータや
プログラムなどを記憶したCD−ROMを駆動するCD
−ROM装置、15は外部接続されるMIDIキーボー
ドなどの演奏装置との間で演奏データや制御信号の送受
信を行うためのMIDIインタフェース、16および1
7は、それぞれ、パーソナルコンピュータに一般的なキ
ーボードおよびディスプレイ装置である。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows the configuration of an embodiment of the musical tone generating apparatus of the present invention. In the figure, 10 is a central processing unit (CPU) that executes the generation of tone waveform samples and various application programs, 11 is a ROM that stores preset tone color data, and 12 is a program and data that are executed. A RAM used as a waveform table, various buffer areas and work areas, 13 is a hard disk device in which various waveform data, tone color data and various application programs are stored, and 14 is a CD storing various data and programs. -CD driving ROM
-ROM device, 15 is a MIDI interface for transmitting and receiving performance data and control signals to and from an externally connected performance device such as a MIDI keyboard, and 16 and 1
Reference numerals 7 are a keyboard and a display device, which are commonly used in personal computers.

【0012】18はCPU10を介さずにRAM12内
のサンプルバッファ領域から波形サンプルデータを読み
出して符号化復号化回路19に転送するDMA制御回路
(Direct Memory Access Controller )である。なお、
このDMA制御回路18はバスの転送速度が速いときに
は省略することができる。19は、この波形サンプルデ
ータに対して振幅エンベロープやパン係数の乗算処理を
実行し、得られた楽音波形データをアナログの楽音信号
に変換してサウンドシステム20に出力する符号化復号
化回路(CODEC)であり、その詳細については後述
する。20はCODEC19から出力される楽音信号を
増幅して外部出力するサウンドシステム、21は所定時
間毎にCPU10に対して割込をかけるとともに、CO
DEC19にサンプリングクロックを供給するタイマで
ある。そして、これら各構成要素はバスを介して相互に
接続されている。以上の構成は、通常のパーソナルコン
ピュータやワークステーションなどと同等であり、それ
らの上で本発明の楽音生成方法を実行することができ
る。
Reference numeral 18 is a DMA control circuit (Direct Memory Access Controller) for reading the waveform sample data from the sample buffer area in the RAM 12 without passing through the CPU 10 and transferring it to the encoding / decoding circuit 19. In addition,
The DMA control circuit 18 can be omitted when the transfer rate of the bus is high. Reference numeral 19 denotes a coding / decoding circuit (CODEC) which executes a multiplication process of an amplitude envelope and a pan coefficient on the waveform sample data, converts the obtained musical tone waveform data into an analog musical tone signal, and outputs the analog musical tone signal to the sound system 20. ), And the details thereof will be described later. Reference numeral 20 is a sound system that amplifies the tone signal output from the CODEC 19 and externally outputs the signal. Reference numeral 21 interrupts the CPU 10 at predetermined time intervals, and
A timer that supplies a sampling clock to the DEC 19. Each of these constituent elements is connected to each other via a bus. The above configuration is equivalent to that of an ordinary personal computer or workstation, and the tone generation method of the present invention can be executed on them.

【0013】図2に上記CODEC19の内部構成を示
す。この図において、30は前記バスに接続され各種信
号やデータの授受を行なうインタフェース回路、31は
外部入力端子LLINEおよびRLINEから入力され
るステレオの外部オーディオ信号を所定のサンプリング
周波数でサンプリングしてアナログデジタル変換するA
/D変換回路、32は該A/D変換回路31から出力さ
れるステレオの外部入力データを格納する左右2チャン
ネル分のFIFO(first-in first-out)バッファであ
る。このFIFOバッファ32に格納されたデータは前
記インタフェース回路30を介してCPU10により読
み込まれ、所定の処理が行われる。
FIG. 2 shows the internal structure of the CODEC 19. In the figure, 30 is an interface circuit connected to the bus for exchanging various signals and data, 31 is an analog digital signal obtained by sampling a stereo external audio signal input from external input terminals LLINE and RLINE at a predetermined sampling frequency. Convert A
An A / D conversion circuit 32 is a first-in-first-out (FIFO) buffer for left and right channels for storing stereo external input data output from the A / D conversion circuit 31. The data stored in the FIFO buffer 32 is read by the CPU 10 through the interface circuit 30 and a predetermined process is performed.

【0014】33は前記CPU10により演算生成され
た波形データが格納されるFIFOバッファである。こ
の例においては、前記CPU10は32チャンネル分の
楽音波形サンプルを演算生成するものとされており、前
記FIFOバッファ33は32チャンネルの楽音波形デ
ータをそれぞれ格納することができるように構成されて
いる。
Reference numeral 33 is a FIFO buffer for storing the waveform data calculated and generated by the CPU 10. In this example, the CPU 10 is configured to arithmetically generate musical tone waveform samples for 32 channels, and the FIFO buffer 33 is configured to be able to store 32 channels of musical tone waveform data.

【0015】34は、各チャンネル対応にEG制御デー
タが格納されるレジスタを有し、前記CPU10から供
給される各発音チャンネルのEG制御データに基づいて
音量エンベロープ信号AEG を発生するとともに、該AEG
と同じくCPU10から供給される音量パラメータvol
とを乗算して音量制御データを出力するエンベロープジ
ェネレータEG、35は同じく各チャンネル対応にCP
U10から供給されるパン制御データを格納するレジス
タを有し、該パン制御データpan に基づいてパン係数を
発生するパン係数発生器である。36は前記FIFOバ
ッファ33から出力される各発音チャンネル分の波形デ
ータと前記EG34から出力される当該発音チャンネル
に対応する音量制御データとを乗算する乗算器、37は
前記乗算器36から順次出力される各チャンネルに対応
する楽音波形データと前記パン係数発生器35から出力
される当該チャンネルに対応するパン係数とを乗算する
パン乗算器である。
Reference numeral 34 has a register for storing EG control data corresponding to each channel, generates a volume envelope signal AEG on the basis of the EG control data of each sounding channel supplied from the CPU 10, and outputs the AEG.
Volume parameter vol supplied from CPU10
Envelope generator EG, 35 that multiplies with and outputs volume control data is also CP for each channel.
A pan coefficient generator having a register for storing pan control data supplied from U10 and generating a pan coefficient based on the pan control data pan. Reference numeral 36 is a multiplier for multiplying the waveform data of each sound output channel output from the FIFO buffer 33 by volume control data corresponding to the sound output channel output from the EG 34. 37 is sequentially output from the multiplier 36. Is a pan multiplier for multiplying the tone waveform data corresponding to each channel by the pan coefficient corresponding to the channel output from the pan coefficient generator 35.

【0016】38は前記パン乗算器37から出力される
32チャンネルの各発音チャンネルの楽音波形データを
各サンプリング周期対応に順次加算合計するチャンネル
累算器である。図示するように、このチャンネル累算器
38にA/D変換器31の出力を入力することにより、
外部入力信号と演算生成された楽音波形信号とをミキシ
ングすることができる。39は前記チャンネル累算器3
8から出力される楽音波形データに対してリバーブなど
のエフェクト処理を施すエフェクト回路である。なお、
このエフェクト回路39は場合によっては省略すること
ができる。40は、1DACサイクル毎に前記エフェク
ト回路39から出力される楽音波形サンプル信号をデジ
タルアナログ変換し、LOUTおよびROUTとして前
記サウンドシステム20に出力するデジタルアナログ変
換器である。このように、本発明においては、CODE
C19において音量制御および累算処理が実行されるよ
うになされている。
Reference numeral 38 denotes a channel accumulator for sequentially adding and summing the musical tone waveform data of 32 tone generation channels output from the pan multiplier 37 for each sampling period. As shown, by inputting the output of the A / D converter 31 to the channel accumulator 38,
It is possible to mix the external input signal and the calculated musical tone waveform signal. 39 is the channel accumulator 3
8 is an effect circuit for performing effect processing such as reverb on the musical tone waveform data output from 8. In addition,
This effect circuit 39 can be omitted in some cases. Reference numeral 40 denotes a digital-analog converter that performs digital-analog conversion on the tone waveform sample signal output from the effect circuit 39 for each DAC cycle and outputs the converted signal as LOUT and ROUT to the sound system 20. Thus, in the present invention, CODE
Volume control and accumulation processing are executed at C19.

【0017】次に、本発明の楽音発生装置におけるソフ
トウエア音源について説明する。図3は、このソフトウ
エア音源における処理の時間的な流れを説明する図であ
る。本発明のソフト音源は、例えば25.6kHzのサ
ンプリング周波数(レート)で楽音波形データを発生す
るが、その楽音波形データ生成処理は例えば128サン
プル(1フレーム)時間毎に行うようになされている。
そして、あるフレーム(FL)に対応するタイムスロッ
トに演奏入力があると、次のフレームでその演奏入力に
対応する楽音波形データの算出処理を行い、さらに次の
フレームでこの楽音波形データを25.6kHzの周期
毎に1サンプルずつ読み出して楽音信号を形成する。し
たがって、演奏入力があってから実際に楽音が発音され
るまで(または楽音が消音されるまで)は約2フレーム
の時間ずれが生じることになるが、1フレームが128
サンプル(5ミリ秒)であるため、その時間ずれはわず
かである。なお、この1フレームのサンプル数は任意に
設定することができるが、サンプル数を大きくすると発
音に遅れが生じ、小さくすると時間的マージンが減少し
て一時的な演算量の増加時に応答が悪くなることがあ
る。
Next, the software sound source in the musical tone generating apparatus of the present invention will be described. FIG. 3 is a diagram for explaining the temporal flow of processing in this software sound source. The soft sound source of the present invention generates musical tone waveform data at a sampling frequency (rate) of 25.6 kHz, for example, and the musical tone waveform data generation process is performed every 128 samples (one frame) time, for example.
Then, when there is a performance input in a time slot corresponding to a certain frame (FL), calculation processing of musical tone waveform data corresponding to the performance input is performed in the next frame, and the musical tone waveform data 25. A tone signal is formed by reading out one sample every 6 kHz cycle. Therefore, there is a time lag of about 2 frames from the input of the performance until the actual sound of the musical tone is generated (or until the musical tone is muted).
Since it is a sample (5 milliseconds), the time lag is slight. The number of samples in one frame can be set arbitrarily, but if the number of samples is increased, the sound is delayed, and if it is decreased, the time margin is reduced and the response becomes worse when the amount of calculation is temporarily increased. Sometimes.

【0018】また、本発明においては、前記ハードディ
スク装置13からRAM12上に読み出される波形テー
ブルに記憶された波形サンプルに基づいて楽音を生成す
るいわゆるテーブルルックアップ方式の楽音生成を行っ
ている。
Further, in the present invention, the so-called table look-up tone generation is performed to generate a tone based on the waveform sample stored in the waveform table read from the hard disk device 13 onto the RAM 12.

【0019】図4は前記ソフト音源の動作時にRAM1
2に設定される記憶エリアを説明する図である。同図
(A)は入力バッファを示しており、この入力バッファ
は、MIDIインタフェース15から演奏入力があった
とき、その演奏入力の内容とその発生時刻を記憶するバ
ッファである。このバッファの内容は、後述するMID
I処理で読み出され、対応する処理が実行される。
FIG. 4 shows the RAM 1 when the soft sound source operates.
3 is a diagram illustrating a storage area set to 2. FIG. FIG. 3A shows an input buffer, which is a buffer for storing the contents of the performance input and its generation time when the performance input is received from the MIDI interface 15. The contents of this buffer is the MID described later.
It is read in the I process and the corresponding process is executed.

【0020】同図(B)はサンプルバッファWBを示し
ている。このサンプルバッファWBは32チャンネル分
設けられており、各チャンネルのバッファはそれぞれ1
28サンプル分の波形データ記憶エリア(SDi1〜S
Di128)を備えている。波形データ生成演算は、1
つのチャンネル毎に1フレーム時間分の128サンプル
を演算し、これを最大32チャンネル分(発音している
チャンネル分)繰り返すという手順で行われるが、この
ようにして生成された各チャンネル128サンプルの波
形データを記憶するのがサンプルバッファWBである。
FIG. 3B shows the sample buffer WB. This sample buffer WB is provided for 32 channels, and the buffer for each channel is 1
Waveform data storage area for 28 samples (SDi1-S
Di128). Waveform data generation operation is 1
128 frames of one frame time are calculated for each channel, and the procedure is repeated for a maximum of 32 channels (for the sounding channels). The waveform of 128 samples of each channel generated in this way The sample buffer WB stores the data.

【0021】同図(C)は音色データレジスタである。
この音色データレジスタは、各MIDIチャンネル(演
奏パート)で生成される楽音波形を決定する音色データ
を記憶するレジスタであり、この音色データとして、各
音色の各音域毎に素材とする波形テーブルを指定する波
形指定データ、EG制御データ、パン制御データなどが
記憶されている。
FIG. 1C shows a tone color data register.
This tone color data register is a register that stores tone color data that determines the musical tone waveform generated in each MIDI channel (performance part). As this tone color data, a waveform table that is a material for each tone range of each tone color is specified. Waveform designation data, EG control data, pan control data, etc. are stored.

【0022】同図(D)は音源レジスタである。この音
源レジスタには、各発音チャンネル別に該発音チャンネ
ルで生成される楽音波形を決定するためのデータが記憶
される。このデータとしてはノートナンバ、いずれか1
つの波形テーブルのアドレスを示す波形指定アドレス
(アタックスタートアドレスAS、アタックエンドアド
レスAE、ループスタートアドレスLS、ループエンド
アドレスLE)、ノートオンデータなどが記憶されてい
る。
FIG. 3D shows a tone generator register. The sound source register stores data for determining a tone waveform generated in each sound generation channel for each sound generation channel. As this data, note number, either 1
Waveform designation addresses (attack start address AS, attack end address AE, loop start address LS, loop end address LE) indicating the addresses of two waveform tables, note-on data, and the like are stored.

【0023】次に、フローチャートを参照して本発明の
ソフト音源の動作を説明する。図5(a)はメインルー
チンを示すフローチャートである。プログラムが起動さ
れると、まず、レジスタエリアの確保などの初期設定を
実行(S1)したのち、何らかの起動要因(トリガ)が
あるまで、S2、S3で待機する。起動要因が発生した
場合には、その起動要因をS4で判断して対応する処理
動作を実行する。起動要因としては、(1)入力バッフ
ァにMIDIデータが書き込まれた場合、(2)1フレ
ームに対応する時間毎に発生されるタイマ21などから
の割込、(3)その他パネルやウインドウ画面からのス
イッチイベントの発生、および、(4)終了コマンドの
入力の4種類の要因があり、それぞれの要因に応じて、
MIDI処理(S5)、音源処理(S6)、その他処理
(S7)、および終了処理(S8)が実行される。
Next, the operation of the soft tone generator of the present invention will be described with reference to the flow chart. FIG. 5A is a flowchart showing the main routine. When the program is started, first, initial settings such as securing a register area are executed (S1), and thereafter, the process waits in S2 and S3 until there is any start factor (trigger). When the activation factor occurs, the activation factor is determined in S4 and the corresponding processing operation is executed. The activation factors are (1) when MIDI data is written in the input buffer, (2) an interrupt from the timer 21 generated at each time corresponding to one frame, (3) other panel or window screen There are four types of factors, the occurrence of the switch event of (1) and the input of the end command (4).
MIDI processing (S5), sound source processing (S6), other processing (S7), and end processing (S8) are executed.

【0024】終了処理S8は設定データの退避やレジス
タのクリアなどの処理であり、この処理が終了したのち
動作を終える。その他処理S7は、各種のパネル入力や
コマンド入力に対応する処理である。音源処理(S6)
は、タイマ21から128サンプルクロックをカウント
したことにより発生される割り込みなどによって図3に
おける読み出し再生が次のフレームに進行したのを検出
して実行される処理である。
The ending process S8 is a process of saving the setting data, clearing the register, and the like, and the operation is finished after this process is finished. Other processing S7 is processing corresponding to various panel inputs and command inputs. Sound source processing (S6)
3 is a process that is executed by detecting that the read reproduction in FIG. 3 has progressed to the next frame due to an interrupt or the like generated by counting 128 sample clocks from the timer 21.

【0025】図5の(b)は最優先の割込処理として実
行されるMIDI割込処理のフローチャートである。こ
の割込処理はMIDIインタフェース15からMIDI
データを受信したときに起動されるものであり、当該M
IDIデータを取り込み(S10)、該受信したMID
Iデータとともにその受信時刻データを図4の(A)に
示した入力バッファに書き込む(S11)。
FIG. 5B is a flowchart of the MIDI interrupt process executed as the highest priority interrupt process. This interrupt processing is performed from the MIDI interface 15 to MIDI.
It is activated when data is received, and the M
Importing IDI data (S10), the received MID
The reception time data together with the I data are written in the input buffer shown in FIG. 4 (A) (S11).

【0026】MIDI処理(S5)は、前記入力バッフ
ァにMIDIデータが書き込まれていることが検出され
たときに起動され、書き込まれたMIDIデータに対応
した処理が行われる。図6は、このMIDI処理の1つ
であるノートオンイベント処理における動作を示す図で
ある。この処理は、入力バッファにノートオンイベント
データが書き込まれていたときに実行される。まず、そ
のノートオンイベントデータのノートナンバ、ベロシテ
ィデータ、パート別音色、発生時刻をそれぞれNN、V
EL、t、TMレジスタに記憶する(S20)。次に、
32チャンネルの発音チャンネルのなかからこのノート
オンにかかる楽音を発音する発音チャンネルを割り当
て、この発音チャンネル番号をiに記憶する(S2
1)。このノートオンにかかる音色データTP(t)の
EG制御データをVELに応じて加工する(S22)。
次に、加工されたEG制御データとパン制御データをノ
ートオンを示すデータとともにCODEC19内の第i
チャンネルのレジスタに書き込む(S23)。続いて、
EG制御データおよびパン制御データ以外の音色データ
TP(t)およびFナンバFNをノートオンとともに第
iチャンネルの音源レジスタに書き込む(S24)。
The MIDI process (S5) is started when it is detected that MIDI data is written in the input buffer, and a process corresponding to the written MIDI data is performed. FIG. 6 is a diagram showing an operation in a note-on event process which is one of the MIDI processes. This processing is executed when the note-on event data is written in the input buffer. First, note number of the note-on event data, velocity data, tone color of each part, generation time are NN and V, respectively.
It is stored in the EL, t, and TM registers (S20). next,
Of the 32 channel sound channels, a sound channel for generating the note-on tone is assigned, and this sound channel number is stored in i (S2).
1). The EG control data of the tone color data TP (t) related to the note-on is processed according to VEL (S22).
Next, the processed EG control data and pan control data, together with the data indicating the note-on, are stored in the CODEC 19
Write to the channel register (S23). continue,
The tone color data TP (t) and the F number FN other than the EG control data and the pan control data are written in the tone generator register of the i-th channel together with the note-on (S24).

【0027】図7は1フレーム時間に対応する周期で起
動される音源処理S6を示すフローチャートである。こ
の音源処理動作は32の発音チャンネルについて1フレ
ーム(128サンプル)分の楽音波形データを生成する
処理であるが、演算の途中であってもCPU10の占有
可能時間を経過すると強制的に終了されてしまうため、
演算順が下位のチャンネルほど打ち切られる可能性が高
くなる。したがって、優先度の高いチャンネル(消音さ
れては困るチャンネル)から先に演算するように、ま
ず、32の発音チャンネルの演算順序を決定する(S3
0)。次に、演算順位を示すポインタiに1をセットす
る(S31)。続いて、i番目、すなわち、演算順序第
1番目の発音チャンネルの音源レジスタにアドレスを設
定して該チャンネルのデータを読出可能にするなどの波
形データ演算準備処理(S32)を実行する。次に、指
定された波形テーブルからの波形の読出および補間処理
(S33)を実行する。
FIG. 7 is a flow chart showing the sound source processing S6 started in a cycle corresponding to one frame time. This sound source processing operation is a processing for generating one frame (128 samples) of musical tone waveform data for 32 sounding channels, but is forcibly ended when the occupable time of the CPU 10 has passed even during the calculation. Because
The lower the channel in the calculation order, the higher the possibility that the channel will be terminated. Therefore, the calculation order of the 32 sound generation channels is first determined so that the calculation is performed from the channel with the higher priority (the channel that is difficult to be muted) first (S3).
0). Next, 1 is set to the pointer i indicating the calculation order (S31). Subsequently, a waveform data calculation preparation process (S32) is executed in which an address is set in the tone generator register of the i-th sound generation channel, which is the first in the calculation order, so that the data of the channel can be read. Next, the waveform reading from the designated waveform table and the interpolation processing (S33) are executed.

【0028】波形読出および補間処理(S33)につい
て図8を参照して説明する。この処理ではiで指定され
ている演算順序の発音チャンネルの波形データを1フレ
ーム(128サンプル)分まとめて演算生成する。ま
ず、サンプル数カウンタsに1をセットする(S4
0)。次に、直前の演算のアドレス(この処理チャンネ
ルの前のフレームにおける波形読出で最後に生成したア
ドレス)にFナンバFNを加算してアドレスの更新を行
う(S41)。このとき、通常は整数部と小数部とから
なるアドレスが生成されるため、RAM12の波形指定
データtで指定された波形テーブルからこのアドレスを
含む2サンプル(整数部のアドレスで指定されるサンプ
ルと整数部+1のアドレスで指定されるサンプル)の波
形データを読み出す(S42)。これら2サンプルのデ
ータを小数部の値で直線補間し、その値をIDレジスタ
にセットする(S43)。次にIDレジスタの内容をサ
ンプルバッファWBの対応するチャンネルの波形データ
記憶エリアSDi(s)にセットする(S44)。この
動作をs=1からs=128になるまで繰り返し実行し
(S45、S46)、128回の処理が完了すれば音源
処理(図7)に戻る。
The waveform reading and interpolation processing (S33) will be described with reference to FIG. In this process, the waveform data of the tone generation channels in the calculation order designated by i are collectively calculated for one frame (128 samples). First, the sample number counter s is set to 1 (S4
0). Next, the F number FN is added to the address of the immediately preceding calculation (the address generated last in the waveform reading in the previous frame of this processing channel) to update the address (S41). At this time, an address composed of an integer part and a fractional part is usually generated, so that two samples including this address (the sample specified by the integer part address and the address specified by the waveform specification data t of the RAM 12 are included). The waveform data of the sample designated by the address of the integer part + 1 is read (S42). The data of these two samples is linearly interpolated by the value of the fractional part, and the value is set in the ID register (S43). Next, the contents of the ID register are set in the waveform data storage area SDi (s) of the corresponding channel of the sample buffer WB (S44). This operation is repeatedly executed from s = 1 to s = 128 (S45, S46), and when the process of 128 times is completed, the process returns to the sound source process (FIG. 7).

【0029】波形読出および補間処理S33が終了した
後、全チャンネルについての波形データ演算が終了した
否かを判定する(S34)。終了していないときはiを
i+1にインクリメントして(S36)、次の優先順位
の発音チャンネルについて波形データ演算準備処理(S
32)以降の処理を実行する。また、全チャンネル分の
波形データ演算が終了したときには、生成した波形デー
タの再生を再生部(DMA制御回路18)に再生予約す
る(S35)。この再生予約は、RAM12内のサンプ
ルバッファWBの記憶アドレスをDMA制御回路18に
通知することにより行われる。
After the waveform reading and interpolation processing S33 is completed, it is determined whether the waveform data calculation for all channels is completed (S34). If not completed, i is incremented to i + 1 (S36), and the waveform data calculation preparation process (S36) is performed for the next priority sounding channel.
32) The subsequent processing is executed. When the waveform data calculation for all channels is completed, the reproduction of the generated waveform data is reserved for reproduction in the reproduction unit (DMA control circuit 18) (S35). This reproduction reservation is performed by notifying the DMA control circuit 18 of the storage address of the sample buffer WB in the RAM 12.

【0030】このようにして、ソフトウエア音源処理に
より、サンプルバッファWB(SDi1〜SDi12
8、i=1〜32)に各発音チャンネルについてそれぞ
れ1フレーム時間分の補間サンプルが格納されることと
なる。この補間サンプルに対しCODEC19において
音量制御および累算処理が実行され楽音波形データが生
成される。
In this way, the sample buffer WB (SDi1 to SDi12
8, i = 1 to 32), interpolation samples for one frame time are stored for each tone generation channel. The CODEC 19 performs volume control and accumulation processing on this interpolation sample to generate musical tone waveform data.

【0031】前記サンプルバッファWBに格納された補
間サンプルは、DMA制御回路18により前記CODE
C19内のFIFOバッファ33に転送される。すなわ
ち、前記CODEC19内のFIFOバッファ33に空
が生じたときにDMA制御回路18に対してDMA転送
要求信号が出力され、DMA制御回路18は前記ステッ
プS35(図7)において再生予約されているサンプル
バッファWBから補間サンプルデータを読み出して前記
FIFOバッファ33に転送する。
The interpolated samples stored in the sample buffer WB are coded by the DMA control circuit 18 into the CODE.
It is transferred to the FIFO buffer 33 in C19. That is, when the FIFO buffer 33 in the CODEC 19 becomes empty, a DMA transfer request signal is output to the DMA control circuit 18, and the DMA control circuit 18 makes a sample reserved for reproduction in step S35 (FIG. 7). The interpolated sample data is read from the buffer WB and transferred to the FIFO buffer 33.

【0032】FIFOバッファ33に格納されている各
発音チャンネルの補間サンプルは、サンプリングタイミ
ング毎に順次読み出されてレベル乗算器36に入力され
る。一方、エンベロープジェネレータ34においては、
前記ステップS23(図6)によりレジスタに書き込ま
れたEG制御データおよび音量パラメータに基づいて各
発音チャンネルに対応する音量制御データが順次時分割
で発生される。レベル乗算器36において、前記FIF
Oバッファ33から出力される当該サンプリングタイミ
ングにおける各発音チャンネルの補間サンプルと、前記
エンベロープジェネレータ34から出力される音量制御
データの乗算が実行される。
The interpolated samples of each tone generation channel stored in the FIFO buffer 33 are sequentially read out at each sampling timing and input to the level multiplier 36. On the other hand, in the envelope generator 34,
Based on the EG control data and the volume parameter written in the register in step S23 (FIG. 6), volume control data corresponding to each sound generation channel is sequentially generated in a time division manner. In the level multiplier 36, the FIF
The interpolation sample of each sound generation channel at the sampling timing output from the O buffer 33 is multiplied by the volume control data output from the envelope generator 34.

【0033】また、前記パン係数発生器35において、
前記ステップS23(図6)によりレジスタに書き込ま
れたパン制御データにより各発音チャンネルに対応する
パン係数が時分割で発生される。このパン係数と前記レ
ベル乗算器36から出力される音量制御された波形サン
プルデータがパン乗算器37において乗算され、音像定
位がなされた各発音チャンネルの波形サンプルデータが
時分割で出力される。
In the pan coefficient generator 35,
The pan control data written in the register in step S23 (FIG. 6) causes the pan coefficient corresponding to each sounding channel to be generated in a time division manner. The pan coefficient is multiplied by the volume sampled waveform sample data output from the level multiplier 36 in the pan multiplier 37, and the waveform sample data of each sound generation channel where the sound image is localized is output in a time division manner.

【0034】チャンネル累算器38は、各サンプリング
タイミングに対応する記憶エリアを有しており、前記パ
ン乗算器37から各サンプリングタイミング毎に時分割
で出力される各発音チャンネルの楽音波形サンプルデー
タがチャンネル累算器38の当該サンプリングタイミン
グの記憶エリアに累積加算される。すなわち、このチャ
ンネル累算器38の各記憶エリアに当該サンプリングタ
イミングにおける全発音チャンネルの波形データが加算
される。なお、前述したように、前記A/D変換回路3
1からの出力信号も同時にチャンネル累算器38におい
て加算することにより、入力アナログ信号とのミキシン
グを行なうことができる。
The channel accumulator 38 has a storage area corresponding to each sampling timing, and the musical tone waveform sample data of each sounding channel output from the pan multiplier 37 in a time division manner at each sampling timing. It is cumulatively added to the storage area of the sampling timing of the channel accumulator 38. That is, the waveform data of all sound generation channels at the sampling timing is added to each storage area of the channel accumulator 38. As described above, the A / D conversion circuit 3
By simultaneously adding the output signals from 1 in the channel accumulator 38, mixing with the input analog signal can be performed.

【0035】前記チャンネル累算器38からの出力は、
場合に応じて、エフェクト回路39においてリバーブな
どのエフェクト処理が行なわれ、サンプリングタイミン
グ毎にD/A変換回路40に入力され、アナログの楽音
信号に変換されて左右両チャンネルの出力信号LOUT
およびROUTとして前記サウンドシステム20に出力
される。
The output from the channel accumulator 38 is
Depending on the case, effect processing such as reverb is performed in the effect circuit 39, and is input to the D / A conversion circuit 40 at each sampling timing, converted into an analog musical tone signal, and output signals LOUT of the left and right channels.
And ROUT are output to the sound system 20.

【0036】なお、上記実施の形態においては、COD
EC19内に設けられたエンベロープジェネレータ34
およびパン係数発生器35により音量制御データおよび
パン係数を発生させているが、CPU10の処理能力が
大きいときには、CPU10による演算により音量制御
データおよびパン係数を発生させるようにすることもで
きる。この場合には、前記エンベロープジェネレータ3
4およびパン係数発生器35に代えて前記FIFOバッ
ファ33と同様の音量制御データおよびパン係数格納用
のFIFOバッファを設け、演算生成された音量制御デ
ータおよびパン係数を格納するようにすればよい。
In the above embodiment, the COD
The envelope generator 34 provided in the EC 19
The volume control data and the pan coefficient are generated by the pan coefficient generator 35. However, when the processing capacity of the CPU 10 is large, the volume control data and the pan coefficient can be generated by the calculation by the CPU 10. In this case, the envelope generator 3
4 and a pan coefficient generator 35 may be replaced with a FIFO buffer for storing volume control data and pan coefficient similar to the FIFO buffer 33, and the calculated volume control data and pan coefficient may be stored.

【0037】[0037]

【発明の効果】本発明の楽音発生装置によれば、楽音生
成自体はソフトウエアにより実行し、該演算生成された
楽音に対する音量制御演算はCODECにおいてハード
ウエアにより実行しているので、楽音生成に要する演算
量が少なくなりCPUの負荷を軽減することができる。
また、従来の音源ボードよりも少ないハードウエアを必
要とするだけで楽音を発生させることが可能となる。さ
らに、ハードディスクに格納されている各種の波形デー
タや音色データを用いて楽音を生成することができるの
で、楽音生成の自由度を高くすることができる。
According to the tone generating apparatus of the present invention, the tone generation itself is performed by software, and the volume control calculation for the tone generated by the calculation is performed by the hardware in the CODEC. The amount of calculation required is reduced and the load on the CPU can be reduced.
Further, it becomes possible to generate a musical tone by requiring less hardware than the conventional sound source board. Furthermore, since musical tones can be generated using various waveform data and tone color data stored in the hard disk, the degree of freedom in generating musical tones can be increased.

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

【図1】 本発明の楽音発生装置の構成を示す図であ
る。
FIG. 1 is a diagram showing a configuration of a musical sound generating device of the present invention.

【図2】 本発明におけるCODECの構成を示す図で
ある。
FIG. 2 is a diagram illustrating a configuration of a CODEC according to the present invention.

【図3】 本発明における処理の時間的な流れを説明す
るための図である。
FIG. 3 is a diagram for explaining a temporal flow of processing in the present invention.

【図4】 本発明における各記憶エリアを説明するため
の図である。
FIG. 4 is a diagram for explaining each storage area in the present invention.

【図5】 本発明における処理のフローチャートであ
る。
FIG. 5 is a flowchart of processing according to the present invention.

【図6】 本発明におけるノートオンイベント処理のフ
ローチャートである。
FIG. 6 is a flowchart of note-on event processing according to the present invention.

【図7】 本発明における音源処理のフローチャートで
ある。
FIG. 7 is a flowchart of sound source processing according to the present invention.

【図8】 本発明における波形読出および補間処理のフ
ローチャートである。
FIG. 8 is a flowchart of waveform reading and interpolation processing according to the present invention.

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

10 CPU、11 ROM、12 RAM、13 ハ
ードディスク装置、14 CD−ROM装置、15 M
IDIインタフェース、16 キーボード、17 ディ
スプレイ装置、18 DMA制御回路、19 符号化復
号化回路(CODEC)、20 サウンドシステム、3
0 インタフェース回路、31、A/D変換回路、3
2、33 FIFOバッファ、34 エンベロープジェ
ネレータ、35 パン係数発生器、36、37 乗算
器、38チャンネル累算器、39 エフェクト回路、4
0 D/A変換回路
10 CPU, 11 ROM, 12 RAM, 13 hard disk device, 14 CD-ROM device, 15 M
IDI interface, 16 keyboard, 17 display device, 18 DMA control circuit, 19 encoding / decoding circuit (CODEC), 20 sound system, 3
0 interface circuit, 31, A / D conversion circuit, 3
2, 33 FIFO buffer, 34 envelope generator, 35 pan coefficient generator, 36, 37 multiplier, 38 channel accumulator, 39 effect circuit, 4
0 D / A conversion circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 演算処理装置による演算により楽音波形
データを生成し、該演算生成された楽音波形データを符
号化復号化回路に設けられたデジタルアナログ変換器に
よりアナログ信号に変換して外部出力する楽音発生装置
において、 前記符号化復号化回路は、前記演算処理装置により演算
生成された楽音波形データに対するレベル乗算処理およ
びパン係数乗算処理を実行する手段を有することを特徴
とする楽音発生装置。
1. A musical tone waveform data is generated by calculation by a calculation processing device, and the calculated musical tone waveform data is converted into an analog signal by a digital-analog converter provided in an encoding / decoding circuit and output to an external device. In the musical tone generating apparatus, the encoding / decoding circuit has means for executing level multiplication processing and pan coefficient multiplication processing for the musical tone waveform data arithmetically generated by the arithmetic processing apparatus.
【請求項2】 前記符号化復号化回路は、エンベロープ
ジェネレータあるいはパン係数発生器の少なくとも一方
を備えていることを特徴とする前記請求項1記載の楽音
発生装置。
2. The musical tone generating apparatus according to claim 1, wherein the encoding / decoding circuit includes at least one of an envelope generator and a pan coefficient generator.
JP8099639A 1996-03-29 1996-03-29 Musical sound generator Pending JPH09269774A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8099639A JPH09269774A (en) 1996-03-29 1996-03-29 Musical sound generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8099639A JPH09269774A (en) 1996-03-29 1996-03-29 Musical sound generator

Related Child Applications (2)

Application Number Title Priority Date Filing Date
JP2002219608A Division JP3693045B2 (en) 2002-07-29 2002-07-29 Music generator
JP2002219609A Division JP3693046B2 (en) 2002-07-29 2002-07-29 Music generator

Publications (1)

Publication Number Publication Date
JPH09269774A true JPH09269774A (en) 1997-10-14

Family

ID=14252638

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8099639A Pending JPH09269774A (en) 1996-03-29 1996-03-29 Musical sound generator

Country Status (1)

Country Link
JP (1) JPH09269774A (en)

Similar Documents

Publication Publication Date Title
KR960042327A (en) Method and apparatus for generating tone
JP4025501B2 (en) Music generator
JP3693045B2 (en) Music generator
JPH07121181A (en) Sound information processor
JP3658826B2 (en) Music generation method
JPH09269774A (en) Musical sound generator
JP3693046B2 (en) Music generator
US5939655A (en) Apparatus and method for generating musical tones with reduced load on processing device, and storage medium storing program for executing the method
JP2797142B2 (en) Processing equipment for electronic musical instruments
US6972362B2 (en) Method and device for generating electronic sounds and portable apparatus utilizing such device and method
JP2576616B2 (en) Processing equipment
JP3137043B2 (en) Waveform memory tone generator and tone generator
JPH07325581A (en) Musical sound generation device
JP3610759B2 (en) Digital signal processor
JP3832383B2 (en) Musical sound generating apparatus and program
JPH10207465A (en) Method of generating musical sound and device therefor
JP3832382B2 (en) Musical sound generating apparatus and program
JP3097534B2 (en) Musical tone generation method
JPH02179696A (en) Processor for electronic musical instrument
JP2797138B2 (en) Processing equipment for electronic musical instruments
JP3148803B2 (en) Sound source device
JPH0934449A (en) Musical sound processing device
JPH02179698A (en) Processor for electronic musical instrument
JPH0950279A (en) Sound source device and musical sound generation method
JPS6335994B2 (en)

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20020528