JP3148803B2 - Sound source device - Google Patents
Sound source deviceInfo
- Publication number
- JP3148803B2 JP3148803B2 JP22062096A JP22062096A JP3148803B2 JP 3148803 B2 JP3148803 B2 JP 3148803B2 JP 22062096 A JP22062096 A JP 22062096A JP 22062096 A JP22062096 A JP 22062096A JP 3148803 B2 JP3148803 B2 JP 3148803B2
- Authority
- JP
- Japan
- Prior art keywords
- waveform
- processing
- channel
- circuit
- read
- 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 - Fee Related
Links
Landscapes
- Electrophonic Musical Instruments (AREA)
Description
【0001】[0001]
【発明の属する技術分野】この発明は、ディジタル楽音
波形データを生成出力する音源装置に関し、詳しくは、
1つのDSPを用いて録音用波形処理と再生用波形処理
の両方を並列に実行可能にした音源装置に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tone generator for generating and outputting digital musical tone waveform data.
The present invention relates to a sound source device capable of executing both a recording waveform process and a reproduction waveform process in parallel using one DSP.
【0002】[0002]
【従来の技術】従来より、各種の方式の音源装置が知ら
れている。このような音源装置で生成された楽音は、D
SP(ディジタル・シグナル・プロセッサ)によりエフ
ェクト(効果)付与などを施して放音される。2. Description of the Related Art Various types of tone generators have been known. The tone generated by such a sound source device is D
The sound is emitted after applying an effect by an SP (Digital Signal Processor).
【0003】[0003]
【発明が解決しようとする課題】一方、このような音源
装置では、外部の楽音をサンプリングして波形メモリに
格納(録音)し楽音生成に用いるようにしたものも知ら
れている。楽音のサンプリングのためには、通常、音源
装置に外部の楽音を取り込むためのサンプリング用の回
路を設ける。On the other hand, there has been known such a sound source device in which an external musical tone is sampled, stored (recorded) in a waveform memory, and used for generating a musical tone. To sample musical tones, a tone generator is usually provided with a sampling circuit for taking in external musical tones.
【0004】ところで、近年、音源装置の機能に対する
要求は高度化し、装置の構成は複雑にすることなく音源
装置の機能を向上化させたいという要求がある。しか
し、装置の構成を複雑にすることなく、発音中にサンプ
リングしたり、一旦サンプリングして波形メモリに書き
込んだ波形データを読み出して効果付与などを施した後
に再度波形メモリに書き込むリサンプリングなどを行な
うことはできなかった。すなわち、装置の構成を複雑に
することなく、録音用波形処理と再生用波形処理を共に
行なうことができなかった。[0004] In recent years, there has been a growing demand for functions of the sound source device, and there has been a demand for improving the functions of the sound source device without complicating the structure of the device. However, without complicating the configuration of the apparatus, sampling is performed during sound generation, or waveform data once sampled and written to the waveform memory is read, an effect is applied, and resampling is performed to write the waveform data to the waveform memory again. I couldn't do that. That is, it was not possible to perform both the recording waveform processing and the reproduction waveform processing without complicating the configuration of the apparatus.
【0005】この発明は、各種の方式の音源装置におい
て、装置構成をそれ程複雑にすることなく、録音用波形
処理と再生用波形処理を共に実行できるようにすること
を目的とする。SUMMARY OF THE INVENTION An object of the present invention is to make it possible to perform both recording waveform processing and reproduction waveform processing in a sound source device of various types without making the device configuration so complicated.
【0006】[0006]
【課題を解決するための手段】この目的を達成するた
め、請求項1の発明に係る音源装置は、楽音波形を録音
するための記憶手段と、所定サンプリング周期で複数チ
ャンネル分の楽音波形を供給する波形供給手段と、供給
された楽音信号に対して信号処理を施す信号処理手段
と、前記波形供給手段から供給される複数チャンネル分
の楽音波形および前記信号処理手段から供給される楽音
信号を入力して適宜ミキシングしミキシング結果を得る
処理を複数系列実行することにより、少なくとも第1、
第2、および第3のミキシング結果を得てそれぞれ出力
するミキシング手段と、前記ミキシング手段から出力さ
れる第1のミキシング結果を前記記憶手段に書き込む書
き込み手段と、前記ミキシング手段から出力される第2
のミキシング結果を外部のサウンドシステムに供給する
出力手段とを備えるとともに、前記信号処理手段には前
記第3のミキシング結果の楽音信号が供給され、前記信
号処理手段は該第3のミキシング結果の楽音信号に対し
て録音用の信号処理または再生用の信号処理を行なうこ
とを特徴とする。 To achieve this object, a sound source device according to the first aspect of the present invention records a tone waveform.
And a plurality of channels at a predetermined sampling period.
Waveform supply means for supplying musical tone waveforms for channels, and supply
Processing means for performing signal processing on the selected tone signal
And a plurality of channels supplied from the waveform supply means.
Musical tone waveform and musical tone supplied from the signal processing means
Input signals and mix appropriately to obtain mixing results
By executing the processing in a plurality of series, at least the first,
Obtain and output the second and third mixing results respectively
Mixing means, and an output from the mixing means.
For writing the first mixing result to be stored in the storage means
Writing means, and a second output from the mixing means.
The result of mixing to an external sound system
Output means, and the signal processing means
The tone signal of the third mixing result is supplied,
Signal processing means for the tone signal resulting from the third mixing.
Signal processing for recording or signal processing for playback.
And features.
【0007】[0007]
【0008】[0008]
【0009】[0009]
【0010】[0010]
【0011】[0011]
【発明の実施の形態】以下、図面を用いてこの発明の実
施の形態を説明する。Embodiments of the present invention will be described below with reference to the drawings.
【0012】図1は、この発明に係る音源装置を適用し
た電子楽器の全体のブロック構成を示す。図2は、図1
の音源部の詳細なブロック構成を示す。なお、以下で説
明する各図面において、同一の番号は同一のものを示す
ものとする。FIG. 1 shows the overall block configuration of an electronic musical instrument to which a tone generator according to the present invention is applied. FIG. 2 shows FIG.
2 shows a detailed block configuration of the sound source section of FIG. In the drawings described below, the same reference numerals denote the same components.
【0013】図1を参照して、この電子楽器の全体構成
を説明する。この電子楽器は、鍵盤101、表示部10
2、スイッチ群(SW)103、中央処理装置(CP
U)104、リードオンリメモリ(ROM)105、ラ
ンダムアクセスメモリ(RAM)106、外部記憶装置
107、音源部108、波形メモリ109、外部回路1
10、遅延メモリ111、ディジタルアナログ変換器
(DAC)112、サウンドシステム(SS)113、
およびバスライン114を備えている。鍵盤101、表
示部102、スイッチ群103、CPU104、ROM
105、RAM106、外部記憶装置107、および音
源部108は、バスライン114により相互に接続され
ている。Referring to FIG. 1, the overall configuration of the electronic musical instrument will be described. The electronic musical instrument includes a keyboard 101, a display unit 10
2. Switch group (SW) 103, central processing unit (CP)
U) 104, read-only memory (ROM) 105, random access memory (RAM) 106, external storage device 107, tone generator 108, waveform memory 109, external circuit 1
10, delay memory 111, digital-to-analog converter (DAC) 112, sound system (SS) 113,
And a bus line 114. Keyboard 101, display unit 102, switch group 103, CPU 104, ROM
The 105, the RAM 106, the external storage device 107, and the tone generator 108 are mutually connected by a bus line 114.
【0014】鍵盤101は、ユーザが演奏操作するため
の複数の鍵を備えた鍵盤である。表示部102は、電子
楽器のパネル上に設けられており、各種の情報を表示す
る。スイッチ群103は、パネル上に設けられており、
ユーザはこれを操作することにより電子楽器に対して各
種の指示を与えることができる。CPU104は、この
電子楽器全体の動作を制御する。特に、通常の演奏時に
は、鍵盤101の操作を検出し、その操作に応じて音源
部108に発音の指示を出す。ROM105は、CPU
が実行するプログラム(音源部108を制御するための
音源コントロールプログラムなど)や各種の定数データ
などを格納する。RAM106は、ワークレジスタなど
に用いる。外部記憶装置107には、後述するDRAM
構成の波形メモリ109にロードする波形データなどが
格納されている。The keyboard 101 is a keyboard provided with a plurality of keys for a user to perform a performance operation. The display unit 102 is provided on a panel of the electronic musical instrument and displays various information. The switch group 103 is provided on a panel,
By operating this, the user can give various instructions to the electronic musical instrument. The CPU 104 controls the operation of the entire electronic musical instrument. In particular, during a normal performance, an operation of the keyboard 101 is detected, and a sounding instruction is issued to the sound source unit 108 in accordance with the operation. ROM 105 is a CPU
(A sound source control program for controlling the sound source unit 108) and various constant data are stored. The RAM 106 is used for a work register or the like. The external storage device 107 includes a DRAM described later.
Waveform data to be loaded and the like are stored in the configured waveform memory 109.
【0015】音源部108は、CPU104の指示に応
じて、波形メモリ109から波形データ(波形サンプ
ル)を読み出し、補間、エンベロープ付与(音量変化制
御)、チャンネル累算(ミキシング)、および効果(エ
フェクト)付与などの加工を施して、楽音波形データと
して出力する。音源部108から出力された楽音波形デ
ータは、DAC112によりアナログ信号に変換され、
サウンドシステム113により放音される。The tone generator 108 reads out waveform data (waveform samples) from the waveform memory 109 in accordance with an instruction from the CPU 104, and performs interpolation, envelope addition (volume change control), channel accumulation (mixing), and effect (effect). Processing such as adding is performed and output as musical sound waveform data. The tone waveform data output from the sound source unit 108 is converted into an analog signal by the DAC 112,
The sound is emitted by the sound system 113.
【0016】波形メモリ109は、DRAM(ダイナミ
ックRAM)により構成されている。波形メモリ109
には、所定のレートでサンプリングされた波形サンプル
データが格納されている。1つの波形サンプルは16ビ
ット非圧縮形式であり、アドレスは波形サンプル単位に
付けられている。すなわち、1アクセスで1つの波形サ
ンプルが読み出せる。波形サンプルは、楽音の発音に先
立って外部記憶装置107から読み出して波形メモリ1
09に格納してもよいが、特にこの実施の形態の音源で
は、複数チャンネル分の楽音発生の動作を行なう際に使
用されなかった空きタイムスロットを別の用途に用いる
ことができるようになっているので、楽音発生の動作中
にその空きタイムスロットを用いて波形データを外部記
憶装置107から読み出して波形メモリ109に格納し
てもよい。The waveform memory 109 is constituted by a DRAM (Dynamic RAM). Waveform memory 109
Stores waveform sample data sampled at a predetermined rate. One waveform sample is in a 16-bit uncompressed format, and an address is assigned to each waveform sample. That is, one waveform sample can be read by one access. The waveform samples are read from the external storage device 107 prior to the generation of musical tones and read from the waveform memory 1.
09 may be stored, but in the sound source of this embodiment, in particular, empty time slots that have not been used when performing the operation of generating musical tones for a plurality of channels can be used for another purpose. Therefore, the waveform data may be read out from the external storage device 107 and stored in the waveform memory 109 using the empty time slot during the tone generation operation.
【0017】外部回路110については、後に詳しく説
明する。遅延メモリ111は、音源部108内にある信
号処理回路(DSP)で用いる遅延用のメモリである。
楽音波形に効果付与などの処理を施す際に、例えばある
タイミングであるデータを遅延メモリ111に書き込
み、所定のクロックの後に読み出して演算に用いるとい
うようにして、遅延したデータを得るのに遅延メモリ1
11を用いる。The external circuit 110 will be described later in detail. The delay memory 111 is a delay memory used in a signal processing circuit (DSP) in the sound source unit 108.
When performing a process such as adding an effect to a musical tone waveform, for example, data at a certain timing is written into the delay memory 111 and read out after a predetermined clock and used for calculation. 1
11 is used.
【0018】図2を参照して、音源部108について詳
しく説明する。図2において、音源部108は、制御レ
ジスタ201、読み書き回路202、音量変化制御回路
203、ミキサ204、信号処理回路205、およびイ
ンターフェース206を備えている。この音源部108
は時分割32チャンネルで動作する。音源部108内の
各部には、時分割動作を行なうための基準信号となる制
御クロック信号や0〜31を繰り返しカウントするチャ
ンネルカウント値などの制御信号が供給されている。Referring to FIG. 2, the sound source section 108 will be described in detail. 2, the tone generator 108 includes a control register 201, a read / write circuit 202, a volume change control circuit 203, a mixer 204, a signal processing circuit 205, and an interface 206. This sound source unit 108
Operate on 32 time-division channels. Control signals such as a control clock signal serving as a reference signal for performing a time-division operation and a channel count value for repeatedly counting 0 to 31 are supplied to each unit in the sound source unit 108.
【0019】図2において、制御レジスタ201は、C
PU104から送出された各種の指定情報(音源部10
8に対する命令やパラメータ情報)を格納するための制
御レジスタである。制御レジスタ201内にはXアクセ
ス処理を制御するXアクセス回路304が設けられてい
るが、これについては後に詳述する。CPU104は、
制御レジスタ201に所定の指定情報をセットして発音
の開始指示を出す。セットする指定情報としては、割り
当てチャンネル、波形メモリ読み出しピッチ(周波数ナ
ンバ)、波形メモリ読み出し区間、エンベロープパラメ
ータ、ミキサ204に対する設定情報、およびエフェク
ト用係数などがある。In FIG. 2, the control register 201 stores C
Various kinds of designation information (sound source unit 10
8 is a control register for storing instructions and parameter information for the E.8. An X access circuit 304 for controlling X access processing is provided in the control register 201, which will be described later in detail. The CPU 104
Predetermined specified information is set in the control register 201 and a sound generation start instruction is issued. The designated information to be set includes an assigned channel, a waveform memory read pitch (frequency number), a waveform memory read section, an envelope parameter, setting information for the mixer 204, an effect coefficient, and the like.
【0020】あるチャンネルにおける発音開始指示を受
けると、音源部108は楽音波形の発生の動作を開始す
る。まず、読み書き回路202は、波形メモリ109の
読み出しアドレスを順次発生する。読み出しアドレス
は、指定された読み出し区間の先頭から、指定された読
み出しピッチを順次累算した値である。特に、この音源
部108では、読み書き回路202中に波形サンプルを
バッファリングする波形バッファ(後述する図3の32
7)を備え、波形メモリ109からはチャンネルごとに
必要な数の波形サンプル(波形データ)のみを読み出す
ようになっており、各チャンネルにおける波形メモリア
クセス回数は可変できるようになっている。そこで、読
み書き回路202は、各チャンネルにおいて必要なアク
セス回数に応じた波形サンプルの読み出しアドレスを、
時分割チャンネルタイミングとは異なるタイミングで、
順次連続して出力するようになっている。読み書き回路
202で発生した読み出しアドレスは、波形メモリ10
9に入力し、これにより時分割チャンネルタイミングと
は異なるタイミングで波形サンプルが波形メモリ109
から読み出される。読み書き回路202は、この波形サ
ンプルを受け取り、内部の波形バッファに記憶し、補間
処理を行なって楽音波形データとして出力する。When receiving a sound generation start instruction for a certain channel, the tone generator 108 starts the operation of generating a musical tone waveform. First, the read / write circuit 202 sequentially generates read addresses of the waveform memory 109. The read address is a value obtained by sequentially accumulating the designated read pitch from the beginning of the designated read section. In particular, in the tone generator 108, a waveform buffer (32 in FIG.
7), only the required number of waveform samples (waveform data) are read from the waveform memory 109 for each channel, and the number of times of access to the waveform memory in each channel can be varied. Therefore, the read / write circuit 202 sets the read address of the waveform sample according to the number of accesses necessary for each channel,
At a timing different from the time division channel timing,
They are output sequentially and sequentially. The read address generated by the read / write circuit 202 is stored in the waveform memory 10
9 so that the waveform samples are stored in the waveform memory 109 at a timing different from the time-division channel timing.
Is read from. The read / write circuit 202 receives this waveform sample, stores it in an internal waveform buffer, performs interpolation processing, and outputs it as musical sound waveform data.
【0021】読み書き回路202において、上述したよ
うに波形サンプルをバッファリングする波形バッファを
備え、波形メモリ109からはチャンネルごとに必要な
数の波形サンプルのみを読み出すようになっていること
により、空きタイムスロットが得られる。読み書き回路
202は、この空きタイムスロットにおいて、後述する
Xアクセス処理、すなわちCPU104からの波形メモ
リ109へのアクセス、またはミキサ204からXアク
セス回路304経由で戻ってくる楽音波形データの波形
メモリ109への書き込みなどができるように動作す
る。As described above, the read / write circuit 202 is provided with a waveform buffer for buffering waveform samples, and reads out only a required number of waveform samples from the waveform memory 109 for each channel. You get slots. In the empty time slot, the read / write circuit 202 performs X access processing, which will be described later, that is, accesses the waveform memory 109 from the CPU 104 or returns the tone waveform data returned from the mixer 204 via the X access circuit 304 to the waveform memory 109. It operates so that writing can be performed.
【0022】音量変化制御回路203は、読み書き回路
202から時分割で出力される各チャンネルの楽音波形
データにエンベロープを付与して出力する。どのような
エンベロープを付与するかは、制御レジスタ201を介
してCPU104から与えられたエンベロープパラメー
タに基づいて決定される。図2の音量変化制御回路20
3の出力ライン211に「32」と付してあるのは、音
量変化制御回路203の出力が時分割32チャンネル分
あることを示している。他の各部の入出力ラインに付し
てある数値も、同様にチャンネル数を示すものとする。The volume change control circuit 203 adds an envelope to the tone waveform data of each channel output from the read / write circuit 202 in a time division manner and outputs the resultant data. What kind of envelope is given is determined based on the envelope parameter given from the CPU 104 via the control register 201. Volume change control circuit 20 of FIG.
The addition of “32” to the output line 211 of No. 3 indicates that the output of the volume change control circuit 203 is equivalent to 32 channels in time division. Numerical values attached to the input / output lines of the other units also indicate the number of channels.
【0023】ミキサ204には、音量変化制御回路20
3から出力される32チャンネル分の楽音波形データ、
後述する信号処理回路205から出力される8チャンネ
ル分の楽音波形データ、および後述する外部回路110
から(インターフェース206を介して)出力される8
チャンネル分の楽音波形データが、入力ライン211,
212,213を介して入力する。ミキサ204は、こ
れらの各入力ラインから入力した各チャンネルの楽音波
形データにそれぞれ適宜係数(係数値はCPU104が
制御レジスタ201を介して与える)を乗算してミキシ
ングする。ミキサ204の出力は、8チャンネル分が信
号処理回路205に、8チャンネル分が(インターフェ
ース206を介して)外部回路110に、1チャンネル
分が制御レジスタ201内のXアクセス回路304に、
音源部108の最終的な出力となる2チャンネル(Lお
よびR出力)分がDAC112に、それぞれ出力ライン
221,222,223,224を介して、出力される
ようになっている。ミキサ204は、任意の入力ライン
から入力した任意のチャンネルの楽音波形データに指定
された係数を乗算してミキシングし、そのミキシング結
果を任意の出力ラインの任意のチャンネルに送出でき
る。どの入力ラインのどのチャンネルの入力にどのよう
な係数を乗算し、乗算結果をどのようにミキシングし、
ミキシング結果をどの出力ラインに出力するかは、CP
U104の指定に基づいて決定される。The mixer 204 includes a volume change control circuit 20
Musical sound waveform data for 32 channels output from 3,
Music waveform data for eight channels output from a signal processing circuit 205 described later and an external circuit 110 described later
8 output (via interface 206)
The tone waveform data for the channel is input to the input line 211,
Input via 212 and 213. The mixer 204 multiplies the musical tone waveform data of each channel input from each of these input lines by an appropriate coefficient (the coefficient value is given by the CPU 104 via the control register 201) to perform mixing. The output of the mixer 204 includes eight channels for the signal processing circuit 205, eight channels for the external circuit 110 (via the interface 206), and one channel for the X access circuit 304 in the control register 201.
Two channels (L and R outputs), which are final outputs of the sound source unit 108, are output to the DAC 112 via output lines 221, 222, 223, and 224, respectively. The mixer 204 can multiply the musical tone waveform data of an arbitrary channel input from an arbitrary input line by multiplying it by a designated coefficient and mix the result, and send the mixing result to an arbitrary channel of an arbitrary output line. Multiply the input of which channel of which input line by what coefficient, how to mix the multiplication result,
The output line to output the mixing result depends on the CP
It is determined based on the designation of U104.
【0024】信号処理回路205は、内部のマイクロプ
ログラムメモリにロードされたマイクロプログラムにし
たがって動作するDSPであり、ミキサ204からの楽
音波形データに対してチャンネルごとに独立に信号処理
を行ない処理結果を再びミキサ204に戻す。信号処理
回路205は、信号処理を行なう際に、必要に応じて遅
延メモリ111を用いて遅延したデータを得る。信号処
理回路205が実行するマイクロプログラムはCPU1
04が適宜ロードする。信号処理回路205の機能はロ
ードするマイクロプログラムにより規定されるが、簡単
に言うと、サンプリングやリサンプリングの際の波形処
理、あるいは効果付与などの信号処理を行なうものであ
る。このマイクロプログラムの具体的な設定について
は、図10および図11を参照して後述する。The signal processing circuit 205 is a DSP that operates in accordance with a microprogram loaded in an internal microprogram memory. The signal processing circuit 205 performs signal processing on the tone waveform data from the mixer 204 independently for each channel, and Return to mixer 204 again. When performing signal processing, the signal processing circuit 205 obtains delayed data using the delay memory 111 as necessary. The microprogram executed by the signal processing circuit 205 is the CPU 1
04 loads appropriately. The function of the signal processing circuit 205 is defined by a microprogram to be loaded, but in brief, performs signal processing such as waveform processing at the time of sampling or resampling, or effect addition. The specific setting of the microprogram will be described later with reference to FIGS.
【0025】外部回路110は、例えば、外部から音声
や楽音を取り込むためのアナログ/ディジタル変換器
(ADC)、効果(エフェクト)付与処理を行なう外部
DSP、あるいはディジタルフィルタなどである。ミキ
サ204から外部回路110への出力は8チャンネル
分、外部回路110からミキサ204への入力は8チャ
ンネル分であり、これらは当然独立に使用できるチャン
ネルであるので、複数の外部回路(当然、異なる処理を
行なうものでもよい)110を任意の入出力ラインの任
意のチャンネルに(インターフェース206を介して)
接続可能である。なお、「外部」というのは音源部10
8から見て「外部」であるということであり、外部回路
110は図1の電子楽器中に設けてもよいし、図1の電
子楽器の外部に設けてもよい。The external circuit 110 is, for example, an analog / digital converter (ADC) for taking in voices and musical sounds from the outside, an external DSP for effecting an effect, or a digital filter. The output from the mixer 204 to the external circuit 110 is equivalent to eight channels, and the input from the external circuit 110 to the mixer 204 is equivalent to eight channels. Since these are channels that can be used independently, a plurality of external circuits (of course, different Process 110) to any channel on any input / output line (via interface 206)
Can be connected. Note that “external” refers to the sound source unit 10.
8 means “external”, and the external circuit 110 may be provided in the electronic musical instrument of FIG. 1 or may be provided outside the electronic musical instrument of FIG.
【0026】上述したように、ミキサ204は任意の入
力ライン211〜213から入力した任意のチャンネル
の楽音波形データに指定された係数を乗算してミキシン
グし、そのミキシング結果を任意の出力ライン221〜
224の任意のチャンネルに送出できるようになってい
るから、例えば、以下の〜のような処理を行なうこ
とができることになる。As described above, the mixer 204 multiplies the musical tone waveform data of an arbitrary channel input from any one of the input lines 211 to 213 by a specified coefficient and mixes the resulting data.
Since the data can be transmitted to any channel of H.224, for example, the following processing can be performed.
【0027】外部回路110としてADCを用いて、
マイクロフォンなどから入力したアナログ信号をディジ
タル信号に変換してミキサ204に入力させる。ミキサ
204では、この外部からの楽音信号を、音源部108
内部で波形メモリ109から波形データを読み出して発
生した楽音とミキシングして、DAC112への出力ラ
イン224に出力する。必要に応じてミキサ204の出
力を、DAC112に出力する代わりに一旦信号処理回
路205や他の外部回路110に入力し、信号処理回路
205や他の外部回路110を用いて効果付与処理など
の波形処理を行なった後にDAC112に出力するよう
にしてもよい。Using an ADC as the external circuit 110,
An analog signal input from a microphone or the like is converted into a digital signal and input to the mixer 204. The mixer 204 converts the external tone signal into the sound source unit 108
Internally, waveform data is read out from the waveform memory 109 and mixed with a generated tone and output to an output line 224 to the DAC 112. If necessary, instead of outputting the output of the mixer 204 to the DAC 112, the output is once input to the signal processing circuit 205 or another external circuit 110, and the waveform of the effect imparting process or the like is generated using the signal processing circuit 205 or the other external circuit 110. After the processing is performed, the data may be output to the DAC 112.
【0028】外部の楽音のサンプリングを行なうこと
ができる。すなわち、外部回路110としてADCを用
いて、マイクロフォンなどから入力したアナログ信号を
ディジタル信号に変換してミキサ204に入力させる。
ミキサ204では、この外部からの楽音信号を、例えば
音源部108内部で波形メモリ109から波形データを
読み出して発生した楽音とミキシングして、Xアクセス
回路304への出力ライン223に出力し、読み書き回
路202経由で波形メモリ109に書き込むようにす
る。必要に応じてミキサ204の出力を、Xアクセス回
路304への出力ライン223に出力する代わりに信号
処理回路205や外部回路110に入力し、信号処理回
路205や外部回路110を用いて効果付与処理などの
波形処理を行なった後にXアクセス回路304に出力す
るようにしてもよい。It is possible to sample an external tone. That is, using an ADC as the external circuit 110, an analog signal input from a microphone or the like is converted into a digital signal and input to the mixer 204.
The mixer 204 mixes this external tone signal with a tone generated by reading out waveform data from the waveform memory 109 in the tone generator 108, for example, and outputs the resulting signal to an output line 223 to the X access circuit 304. The data is written to the waveform memory 109 via 202. If necessary, the output of the mixer 204 is input to the signal processing circuit 205 or the external circuit 110 instead of being output to the output line 223 to the X access circuit 304, and the effect imparting processing is performed using the signal processing circuit 205 or the external circuit 110. After performing such waveform processing as described above, the signal may be output to the X access circuit 304.
【0029】リサンプリング(サンプリングなどによ
り波形メモリ109上に用意されている波形に、加工を
施して再び波形メモリ109に書き込む処理)を行なう
ことができる。すなわち、サンプリングなどにより波形
メモリ109に記憶してある波形データを、読み書き回
路202の所定の発音チャンネルを利用して読み出し
て、ミキサ204に入力させる。2つ以上の波形を混合
して再書き込みするリサンプリングの場合もあるので、
ここで読み出す波形データは1ないし複数の波形データ
である。ミキサ204では、この楽音信号を信号処理回
路205や外部回路110に流し、必要に応じて種々の
波形処理を行なわせ、その結果を得る。波形処理が施さ
れた楽音信号を受けたミキサ204は、その楽音信号を
Xアクセス回路304への出力ライン223に出力し、
読み書き回路202経由で波形メモリ109に書き込
む。なお、ミキサ204における最初のミキシング結果
を、信号処理回路205や外部回路110に流さずに、
そのままXアクセス回路304へ供給するようにしても
よい。Resampling (processing of processing a waveform prepared on the waveform memory 109 by sampling or the like and writing the processed waveform into the waveform memory 109 again) can be performed. That is, waveform data stored in the waveform memory 109 by sampling or the like is read out using a predetermined tone generation channel of the read / write circuit 202 and input to the mixer 204. In some cases, resampling involves mixing and rewriting two or more waveforms.
The waveform data read out here is one or more waveform data. In the mixer 204, the tone signal is passed to the signal processing circuit 205 and the external circuit 110, and various waveform processing is performed as necessary, and the result is obtained. The mixer 204 having received the tone signal subjected to the waveform processing outputs the tone signal to an output line 223 to the X access circuit 304,
The data is written to the waveform memory 109 via the read / write circuit 202. Note that the first mixing result in the mixer 204 is not sent to the signal processing circuit 205 or the external circuit 110,
It may be supplied to the X access circuit 304 as it is.
【0030】外部回路110としてDSPやディジタ
ルフィルタを用いて、あるいは信号処理回路205を用
いて、ミキサ204から取り出した楽音波形に効果付与
処理やフィルタリング処理を行ない、処理結果をミキサ
204に戻す。ミキサ204では、処理された楽音波形
を、音源部108内部で発生した楽音とミキシングして
DAC112への出力ライン224やXアクセス回路3
04への出力ライン223に出力する。Using a DSP or a digital filter as the external circuit 110, or using a signal processing circuit 205, effects processing and filtering processing are performed on the musical tone waveform extracted from the mixer 204, and the processing result is returned to the mixer 204. The mixer 204 mixes the processed musical sound waveform with a musical sound generated inside the sound source unit 108, and outputs an output line 224 to the DAC 112 and an X access circuit 3.
04 to the output line 223.
【0031】なお、上記〜は本実施形態において実
現できる処理例を示したものであり、音源部108内の
時分割処理の処理時間が確保でき、必要なマイクロプロ
グラムが信号処理回路205にロードできるならば、上
記〜を含め外部回路110と信号処理回路205の
各種機能を任意に組み合わせて楽音波形に対する処理を
行ない、DAC112に出力したり、Xアクセス回路3
04経由で読み書き回路202に戻して波形メモリ10
9に書き込むようにできる。The above-mentioned is an example of processing that can be realized in the present embodiment. The processing time of the time-division processing in the sound source unit 108 can be secured, and the necessary microprogram can be loaded into the signal processing circuit 205. Then, various functions of the external circuit 110 and the signal processing circuit 205 including the above-mentioned are arbitrarily combined to perform processing on a musical tone waveform, output to the DAC 112, and output to the X access circuit 3.
04 to the read / write circuit 202 to return to the waveform memory 10
9 can be written.
【0032】図3は、音源部108内の制御レジスタ2
01および読み書き回路202の詳細なブロック構成を
示す。なお、図3に示されている回路のうち、制御レジ
スタ201は、制御レジスタのすべてを示したものでな
く、その一部分を示したものである。制御レジスタ20
1には、図3に示したもの以外に、エンベロープパラメ
ータ、ミキサの設定、およびエフェクト用係数などの他
の制御データも記憶されている。FIG. 3 shows the control register 2 in the tone generator 108.
1 shows the detailed block configuration of the read / write circuit 202. In the circuit shown in FIG. 3, the control register 201 does not show all of the control registers, but shows a part of the control registers. Control register 20
1, other control data such as envelope parameters, mixer settings, and effect coefficients are also stored.
【0033】制御レジスタ201は、レジスタ301、
レジスタ302、優先フラグ303、および、Xアクセ
ス回路304を備えている。レジスタ301,302
は、CPU104から楽音生成を指示する際に送出され
る各種指示情報を格納する。具体的には、レジスタ30
1は、例えば波形読み出しのための読み出しアドレス
(相対アドレス)の初期値AS、波形データのループ部
のデータ長LPA、ピッチPITCHなどを格納する。
レジスタ302は、読み出すべき波形データのループ部
の先頭を示す絶対アドレスWAを格納する。なお、読み
出しアドレスの初期値ASは、波形データのループ部の
先頭位置(すなわちアタック部の末尾)を基準とした相
対アドレスであるので、負の値に設定されている。波形
データの読み出しは、絶対アドレスWAより初期値AS
で示される分だけ前の位置からスタートする。波形デー
タのループ部のデータ長LPAは、ループ部末尾位置の
相対アドレス(正値)である。The control register 201 includes a register 301,
It includes a register 302, a priority flag 303, and an X access circuit 304. Registers 301 and 302
Stores various kinds of instruction information transmitted when instructing generation of a musical tone from the CPU 104. Specifically, the register 30
1 stores, for example, an initial value AS of a read address (relative address) for reading a waveform, a data length LPA of a loop portion of the waveform data, a pitch PITCH, and the like.
The register 302 stores an absolute address WA indicating the beginning of the loop portion of the waveform data to be read. Note that the initial value AS of the read address is set to a negative value because it is a relative address based on the start position of the loop portion of the waveform data (that is, the end of the attack portion). The waveform data is read from the absolute address WA using the initial value AS.
Start from the previous position by the amount indicated by. The data length LPA of the loop portion of the waveform data is a relative address (positive value) at the end position of the loop portion.
【0034】Xアクセス回路304は、XAレジスタ3
11、セレクタ312、FIFO(First In
First Out(先入れ先出し)の8段のレジス
タ)313、Xフラグ314、およびサンプル数レジス
タ315を備えている。Xアクセス回路304は、後述
するXアクセス処理(CPU104からの波形メモリ1
09のアクセス、およびミキサ204から出力ライン2
23を介して送出された楽音波形データの波形メモリ1
09への書き込み)を、楽音発生のための波形メモリ読
み出しと並行して実行するための制御を行なう回路であ
る。優先フラグ303は、Xアクセス処理を優先的に行
ないたい場合にオンされるフラグである。Xアクセス回
路304の動作および機能、並びに、Xアクセス処理お
よび優先フラグ303の使い方については後述する。The X access circuit 304 has an XA register 3
11, selector 312, FIFO (First In)
A first-out (first-in, first-out) register 313, an X flag 314, and a sample number register 315. The X access circuit 304 performs X access processing (waveform memory 1 from the CPU 104) described later.
09 and output line 2 from mixer 204
Waveform memory 1 of musical tone waveform data transmitted via
09) in parallel with the reading of the waveform memory for generating a musical tone. The priority flag 303 is a flag that is turned on when the X access process is to be preferentially performed. The operation and function of the X access circuit 304, and the X access processing and usage of the priority flag 303 will be described later.
【0035】読み書き回路202は、処理A演算回路3
21、アドレスRAM(ARAM)322、アキュムレ
ータ(ACC)323、制御RAM324、処理B演算
回路325、補間回路326、波形バッファ327、取
り込み回路328、およびセレクタ(SEL)329,
330を備えている。The read / write circuit 202 includes a processing A operation circuit 3
21, an address RAM (ARAM) 322, an accumulator (ACC) 323, a control RAM 324, a processing B operation circuit 325, an interpolation circuit 326, a waveform buffer 327, a capture circuit 328, and a selector (SEL) 329.
330 is provided.
【0036】図3の制御レジスタ201および読み書き
回路202では、大きくは、処理A、処理B、取り込み
処理、補間処理、およびXアクセス処理の5つの処理を
行なう。各処理の概要は以下の通りである。処理Aは、
主として処理A演算回路321により実行される処理で
あり、具体的には、楽音生成のために時分割チャンネル
タイミングにしたがって各チャンネルのアドレス(波形
サンプル読み出しアドレス(相対アドレス))を作成す
る処理である。各チャンネルのアドレスは、ARAM3
22に保持される。処理Bは、主として処理B演算回路
325により実行される処理であり、具体的には、楽音
生成のために、時分割チャンネルタイミングとは異なる
タイミングで、アドレスWMA(波形サンプル読み出し
アドレス(絶対アドレス))をセレクタ329を介して
波形メモリ109に向けて送り出す処理である。取り込
み処理は、主として取り込み回路328により実行され
る処理であり、具体的には、処理Bにより波形メモリ1
09に送り出されたアドレスにしたがって読み出された
波形サンプルをセレクタ330を介して取り込み、各チ
ャンネル別に波形バッファ327に書き込む処理であ
る。処理Bと取り込み処理が行なわれるときは、セレク
タ329と330は、処理B演算回路325から出力さ
れるアドレスWMAが波形メモリ109のアドレス端子
に入力して、波形メモリ109から読み出された波形サ
ンプルが取り込み回路328に取り込まれるように、選
択制御される。補間処理は、補間回路326により実行
される処理であり、具体的には、時分割チャンネルタイ
ミングにしたがって、波形バッファ327から各チャン
ネルの波形サンプルを読み出し、補間を行なって補間済
みサンプル(楽音波形データ)を生成出力する処理であ
る。補間回路326から出力された楽音波形データは、
図2の音量変化制御回路203に入力する。Xアクセス
処理は、主としてXアクセス回路304の制御のもとで
実行される処理であり、具体的には、上記処理Bおよび
取り込み処理で波形メモリ109をアクセスするタイム
スロット以外のタイムスロットで、CPU104からの
波形メモリ109のアクセスおよびミキサ204から出
力ライン223を介して送出された楽音波形データの波
形メモリ109への書き込みを行なう処理である。Xア
クセス処理の際には、セレクタ329と330は、XA
レジスタ311に格納されているアドレスが波形メモリ
109のアドレス端子に入力し、波形メモリ109のデ
ータラインがFIFO313に接続するように、選択制
御される。以上の5つの処理の詳細については後述す
る。The control register 201 and the read / write circuit 202 shown in FIG. 3 roughly perform five processes: process A, process B, fetch process, interpolation process, and X access process. The outline of each process is as follows. Process A is
The processing is mainly executed by the processing A arithmetic circuit 321. More specifically, the processing is for generating an address (waveform sample read address (relative address)) for each channel in accordance with time-division channel timing for generating a musical tone. . The address of each channel is ARAM3
22. The process B is a process mainly executed by the process B arithmetic circuit 325. Specifically, for generating a tone, the address WMA (waveform sample read address (absolute address)) is generated at a timing different from the time-division channel timing. ) Is sent to the waveform memory 109 via the selector 329. The capture processing is mainly executed by the capture circuit 328. Specifically, the waveform memory 1
This is a process of taking in a waveform sample read in accordance with the address sent to the address 09 via the selector 330 and writing the sample into the waveform buffer 327 for each channel. When the process B and the capture process are performed, the selectors 329 and 330 determine that the address WMA output from the process B operation circuit 325 is input to the address terminal of the waveform memory 109 and the waveform sample read from the waveform memory 109 Is selected and controlled so as to be captured by the capture circuit 328. The interpolation process is a process executed by the interpolation circuit 326. Specifically, the waveform samples of the respective channels are read from the waveform buffer 327 according to the time-division channel timing, and the interpolation is performed to obtain the interpolated samples (tone waveform data). ) Is generated and output. The tone waveform data output from the interpolation circuit 326 is
It is input to the volume change control circuit 203 of FIG. The X access process is a process mainly executed under the control of the X access circuit 304. More specifically, the CPU 104 uses a time slot other than the time slot for accessing the waveform memory 109 in the process B and the acquisition process. This is a process for accessing the waveform memory 109 from the mixer and writing the tone waveform data transmitted from the mixer 204 via the output line 223 to the waveform memory 109. At the time of X access processing, the selectors 329 and 330
The address stored in the register 311 is input to the address terminal of the waveform memory 109, and the selection is controlled so that the data line of the waveform memory 109 is connected to the FIFO 313. Details of the above five processes will be described later.
【0037】図4は、図3の制御RAM324の構成を
示す。詳しくは後述するが、処理Aでは、各チャンネル
のアドレス作成と並行して、各チャンネルについて読み
出すべき必要サンプル数を求めて制御RAM324に格
納する処理を行なう。そのため、制御RAM324は、
チャンネル番号(CH番号)とそのチャンネルにおいて
読み出すべきサンプル数を格納する領域が複数用意され
て構成される。読み書き回路202内には書き込みポイ
ンタおよび読み出しポインタが備えられており、各チャ
ンネルにおいて読み出すべき必要サンプル数を制御RA
M324に書き込むとき(処理A)は書き込みポインタ
をすすめ、制御RAM324からチャンネル番号とサン
プル数を読み出して当該チャンネルに関する読み出しア
ドレスを送出するとき(処理B)は読み出しポインタを
進める。制御RAM324は、リング状に使用するよう
になっており、書き込みまたは読み出しポインタが制御
RAM324の一方の端に至った場合、その次のポイン
タの位置は制御RAM324の他方の端になる。また、
読み出しポインタの指す位置が書き込みポインタの指す
位置を追いかけるように書き込みおよび読み出しが行な
われるが、書き込みポインタが読み出しポインタを追い
越さない程度の領域の大きさが確保されているものとす
る。書き込みポインタおよび読み出しポインタは、アキ
ュムレータ323と同様に、それぞれ、前半処理用のも
のと後半処理用のものとが別々に設けられている。単
に、書き込みポインタおよび読み出しポインタと呼ぶと
きは、前半処理では前半処理用のもの、後半処理では後
半処理用のものを指すものとする。前半処理は第0〜第
15チャンネルの処理、後半処理は第16〜第31チャ
ンネルの処理である(図8,9で後述する)。なお、図
4のような構成のほか、各チャンネルに1つずつアドレ
スを対応させ、そこに必要サンプル数を書き込むように
してもよい。FIG. 4 shows the configuration of the control RAM 324 of FIG. As will be described in detail later, in the process A, a process of obtaining the required number of samples to be read for each channel and storing it in the control RAM 324 is performed in parallel with the creation of the address of each channel. Therefore, the control RAM 324
A plurality of areas for storing a channel number (CH number) and the number of samples to be read in the channel are prepared. The read / write circuit 202 has a write pointer and a read pointer, and controls the required number of samples to be read in each channel.
When writing to M324 (process A), the write pointer is recommended, and when the channel number and the number of samples are read from the control RAM 324 and a read address for the channel is transmitted (process B), the read pointer is advanced. The control RAM 324 is used in a ring shape. When the write or read pointer reaches one end of the control RAM 324, the position of the next pointer is the other end of the control RAM 324. Also,
Writing and reading are performed so that the position pointed to by the read pointer follows the position pointed to by the write pointer, and it is assumed that a size of an area is secured such that the write pointer does not overtake the read pointer. As with the accumulator 323, the write pointer and the read pointer are provided separately for the first half and for the second half. When simply referred to as a write pointer and a read pointer, the first half processing indicates the one for the first half processing, and the second half processing indicates the one for the second half processing. The first half processing is the processing of the 0th to 15th channels, and the second half processing is the processing of the 16th to 31st channels (described later in FIGS. 8 and 9). In addition to the configuration as shown in FIG. 4, an address may correspond to each channel one by one, and the required number of samples may be written there.
【0038】図5は、図3のARAM322のメモリマ
ップを示す。ARAM322は、処理Aにおいて各チャ
ンネルのアドレスを作成するのに用いる領域である。A
RAM322は、32チャンネル分(第0〜第31チャ
ンネル)の各チャンネルごとの領域からなり、これらの
領域に各チャンネルの現在のアドレス値を記憶する。各
チャンネルの領域はアドレス上位ADH、およびアドレ
ス下位ADLからなる。ADHおよびADLの領域の大
きさはそれぞれ16ビットである。アドレス上位ADH
とアドレス下位ADLとを合わせた32ビットのアドレ
ス値は、アドレス整数部とアドレス小数部とに分けられ
る。アドレス整数部は23ビット、アドレス小数部は9
ビットである。アドレス整数部は、波形メモリ109の
アドレスと対応している。すなわち、アドレス整数部の
1つの値に対応して、波形メモリ109の波形サンプル
が1つ存在する。アドレス小数部は、それよりも細かい
単位を示し、何点かの波形サンプルを用いた補間処理で
用いる情報である。FIG. 5 shows a memory map of the ARAM 322 of FIG. The ARAM 322 is an area used for creating an address of each channel in the process A. A
The RAM 322 is composed of areas for each channel of 32 channels (0th to 31st channels), and stores the current address value of each channel in these areas. The area of each channel is composed of an address upper ADH and an address lower ADL. The size of each of the ADH and ADL areas is 16 bits. Address upper ADH
The 32-bit address value including the address and the lower ADL is divided into an address integer part and an address decimal part. Address integer part is 23 bits, address decimal part is 9
Is a bit. The address integer part corresponds to the address of the waveform memory 109. That is, there is one waveform sample in the waveform memory 109 corresponding to one value of the address integer part. The address decimal part indicates a finer unit and is information used in interpolation processing using some waveform samples.
【0039】図6は、図3の波形バッファ(サンプルR
AM)327の構成を示す。波形バッファ327は、各
チャンネルごとの4つの再生サンプル格納領域からな
る。4つの再生サンプル格納領域はリング状に使用す
る。すなわち、各チャンネルごとにポインタを設け、波
形サンプルを書き込むときは、そのポインタで指す位置
に書き込み、ポインタを1つ進める。ポインタは、例え
ば図6の第iチャンネルなら、再生サンプル1→2→3
→4→1→2→…というように進める。FIG. 6 shows the waveform buffer (sample R) of FIG.
AM) 327 is shown. The waveform buffer 327 includes four reproduction sample storage areas for each channel. The four reproduction sample storage areas are used in a ring shape. That is, a pointer is provided for each channel, and when writing a waveform sample, writing is performed at the position indicated by the pointer, and the pointer is advanced by one. For example, if the pointer is the i-th channel in FIG.
→ 4 → 1 → 2 → ...
【0040】次に、図3の制御レジスタ201および読
み書き回路202で実行する上記5つの処理について詳
しく説明する。始めにこれらの処理を実行するタイミン
グについて説明し、その後、各処理それぞれの詳細を説
明する。Next, the above five processes executed by the control register 201 and the read / write circuit 202 in FIG. 3 will be described in detail. First, the timing of executing these processes will be described, and then details of each process will be described.
【0041】図3、図8、および図9を参照して、読み
書き回路202の要部の処理のタイミングの概要につい
て説明する。図8において、「処理A」は、図3の主と
して処理A演算回路321により実行される処理Aを行
なう区間を示す。「処理BおよびXアクセス処理」は、
図3の主として処理B演算回路325により実行される
処理B、およびXアクセス回路304の制御のもとで実
行されるXアクセス処理を行なう区間を示す。「取り込
み処理およびXアクセス処理」は、図3の主として取り
込み回路328により実行される取り込み処理、および
Xアクセス回路304の制御のもとで実行されるXアク
セス処理を行なう区間を示す。「補間処理」は、図3の
補間回路326により補間処理を行なう区間を示す。Referring to FIGS. 3, 8, and 9, an outline of the processing timing of the main part of the read / write circuit 202 will be described. In FIG. 8, “Process A” indicates a section in which the process A mainly performed by the process A operation circuit 321 in FIG. 3 is performed. "Process B and X access process"
FIG. 3 mainly shows a section in which the processing B executed by the processing B arithmetic circuit 325 and the X access processing executed under the control of the X access circuit 304 are performed. The “acquisition process and X access process” indicate a section in which the acquisition process mainly executed by the acquisition circuit 328 in FIG. 3 and the X access process executed under the control of the X access circuit 304 are performed. “Interpolation processing” indicates a section in which the interpolation processing is performed by the interpolation circuit 326 in FIG.
【0042】「処理A」および「補間処理」の処理区間
は、1サンプリング周期を前半区間と後半区間に分け、
前半区間で第0〜第15チャンネルの処理を行ない、後
半区間で第16〜第31チャンネルの処理を行なうよう
になっている。すなわち、前半区間(処理A前半区間)
801で第0〜第15チャンネルに関する処理Aを、後
半区間(処理A後半区間)811で第16〜第31チャ
ンネルに関する処理Aを、前半区間(補間前半区間)8
06で第0〜第15チャンネルに関する補間処理を、後
半区間(補間後半区間)816で第16〜第31チャン
ネルに関する補間処理を、それぞれ実行する。「処理B
およびXアクセス処理」の処理区間では、1サンプリン
グ周期を前半区間と後半区間に分けたそれぞれの区間の
前側区間802,812で処理Bを行ない、後側区間8
03,813でXアクセス処理を行なう。第0〜第15
チャンネルの処理Bを行なう処理B前半区間802は、
当該チャンネルの処理Aを行なう処理A前半区間801
が終了した直後から開始され、必要な処理Bが行なわれ
た後の空き時間の区間803でXアクセス処理が行なわ
れる。同様に、第16〜第31チャンネルの処理Bを行
なう処理B後半区間812は、当該チャンネルの処理A
を行なう処理A後半区間811が終了した直後から開始
され、必要な処理Bが行なわれた後の空き時間の区間8
13でXアクセス処理が行なわれる。取り込み処理は、
処理Bのアドレス送り出しのタイミングにしたがって行
なわれるから、取り込み処理についても同様に、1サン
プリング周期を前半区間と後半区間に分けたそれぞれの
区間の前側区間804,814で取り込み処理を行な
い、後側区間805,815でXアクセス処理を行な
う。取り込み処理の後、各チャンネルの波形サンプルが
波形バッファ327に揃うことが保証されるタイミング
で開始される区間806,816で時分割チャンネルタ
イミングにしたがって各チャンネルの補間処理を行な
う。The processing section of "processing A" and "interpolation processing" divides one sampling cycle into a first half section and a second half section.
Processing of the 0th to 15th channels is performed in the first half section, and processing of the 16th to 31st channels is performed in the second half section. That is, the first half section (the first half section of the processing A)
At 801, processing A for the 0th to 15th channels is performed. For second half section (processing A second half section) 811, processing A for the 16th to 31st channels is performed at the first half section (first half section of interpolation) 8.
In 06, the interpolation process for the 0th to 15th channels is performed, and in the latter half section (interpolation latter half section) 816, the interpolation processing for the 16th to 31st channels is executed. "Process B
And X access processing ”, processing B is performed in front sections 802 and 812 of each section obtained by dividing one sampling cycle into a first half section and a second half section, and a rear section 8
At 03 and 813, X access processing is performed. 0th to 15th
The first half section 802 of the processing B for performing the processing B of the channel includes:
The first half section 801 of the processing A for performing the processing A of the channel
Is started immediately after the end of the processing, and the X access processing is performed in the interval 803 of the idle time after the necessary processing B is performed. Similarly, the second half section 812 of the processing B for performing the processing B of the 16th to 31st channels is the processing A of the channel.
A, which starts immediately after the second half section 811 of the processing A is completed, and the section 8 of the idle time after the necessary processing B is performed.
At 13, an X access process is performed. The import process is
Since the processing B is performed in accordance with the address sending timing, the capture processing is also performed in the front sections 804 and 814 of each section obtained by dividing one sampling period into the first half section and the second half section, and the rear section is performed. In steps 805 and 815, X access processing is performed. After the capturing process, the interpolation process of each channel is performed according to the time-division channel timing in sections 806 and 816, which are started at timings at which it is guaranteed that the waveform samples of each channel are aligned in the waveform buffer 327.
【0043】図9は、図8の前半処理の各処理中のチャ
ンネルの様子を示す。図9の「処理A前半ch」は、図
8の区間801におけるチャンネルの様子を示す。図9
の「処理B前半chおよびXアクセス処理」は、図8の
区間802,803におけるチャンネルの様子を示す。
図9の「取り込み前半chおよびXアクセス処理」は、
図8の区間804,805におけるチャンネルの様子を
示す。図9の「補間前半ch」は、図8の区間806に
おけるチャンネルの様子を示す。後半処理も同様であ
る。なお、図9では各チャンネルタイミングを縦に並べ
て揃えて記載しているが、実際には各処理のタイミング
は図8に示すようにずれている。FIG. 9 shows the state of the channel during each processing of the first half processing of FIG. “Processing A first half ch” in FIG. 9 indicates the state of the channel in the section 801 in FIG. FIG.
“Processing B first half channel and X access processing” indicates the state of channels in sections 802 and 803 in FIG.
“Import first half channel and X access processing” in FIG.
FIG. 9 shows the state of channels in sections 804 and 805 in FIG. “First half channel of interpolation” in FIG. 9 indicates the state of the channel in the section 806 in FIG. The same applies to the latter half processing. In FIG. 9, the respective channel timings are vertically aligned and described, but actually, the timings of the respective processes are shifted as shown in FIG.
【0044】この実施の形態では、図9からも分かるよ
うに、処理A演算回路321によるアドレス作成の処理
Aと補間回路326による補間処理は、それぞれ、1サ
ンプリング周期を等分割した時分割チャンネルタイミン
グにしたがって順番にチャンネルごとの処理が行なわれ
る。一方、処理B演算回路325からのアドレス送り出
しの処理Bと取り込み回路328による波形データの取
り込みの処理は、時分割チャンネルタイミングとは独立
したタイミングで動作する。In this embodiment, as can be seen from FIG. 9, the processing A for creating an address by the processing A operation circuit 321 and the interpolation processing by the interpolation circuit 326 are respectively performed by time division channel timings obtained by equally dividing one sampling period. , The processing for each channel is performed in order. On the other hand, the processing B for sending an address from the processing B arithmetic circuit 325 and the processing for capturing waveform data by the capture circuit 328 operate at a timing independent of the time division channel timing.
【0045】例えば、図8および図9において、処理A
前半区間801では、処理A演算回路321により、第
0〜第15チャンネルについて時分割チャンネルタイミ
ングにしたがって順番に各チャンネルのアドレスを作成
している。処理B前半区間802では、処理B演算回路
325により、時分割チャンネルタイミングとは異なる
タイミングで、第0チャンネルのアドレスを1つ、第2
チャンネルのアドレスを3つ、第5チャンネルのアドレ
スを1つ、…というように、第0〜第15チャンネルの
アドレスの送り出しを行なっている。1アドレス送り出
しを行なう区間の時間幅は、時分割チャンネルタイミン
グで1チャンネル分の処理を行なう区間の時間幅の1/
4である。したがって、1チャンネル分の処理を行なう
時間幅で波形メモリを4アクセスできる。各チャンネル
で送り出すアドレスの個数が区々であるのは、波形バッ
ファ(サンプルRAM)327に過去の波形データ(再
生サンプル)が保持されており各チャンネルごとに必要
な個数の波形データのみ読み出せば充分なため、あるい
は発音する必要がなくアドレスの送り出しが不要なチャ
ンネルがあるためである。ここ(図9)では、それぞ
れ、第0チャンネルは1アクセス、第2チャンネルは3
アクセス、第5チャンネルは1アクセス、第7チャンネ
ルは2アクセス分の波形メモリからの読み出しが必要な
場合を示している。その他のチャンネルは、発音してい
ないか、既に読み出して波形バッファ327に記憶され
たサンプルのみで楽音が生成できるチャンネルである。
なお、発音していないチャンネルとは、音量変化制御回
路203などで音量レベルの下げられたチャンネルであ
り、そのチャンネルに関しては処理Bにおける波形メモ
リのアクセスタイミングを使用しないように、制御がな
されている。For example, in FIG. 8 and FIG.
In the first half section 801, the processing A arithmetic circuit 321 sequentially creates addresses of the 0th to 15th channels in accordance with the time division channel timing. In the first half section 802 of the processing B, the processing B arithmetic circuit 325 assigns one address of the 0th channel and the second address at a timing different from the time division channel timing.
The addresses of the 0th to 15th channels are sent out, for example, three channel addresses, one fifth channel address, and so on. The time width of the section in which one address is sent out is 1 / th of the time width of the section in which processing for one channel is performed at the time-division channel timing.
4. Therefore, four accesses to the waveform memory can be made within a time width for performing processing for one channel. The number of addresses to be sent out for each channel is different if the waveform buffer (sample RAM) 327 holds the past waveform data (reproduced samples) and only the required number of waveform data for each channel is read out. This is because there is a sufficient channel, or there is a channel that does not need to be sounded and does not need to send an address. In this case (FIG. 9), the 0th channel is 1 access and the 2nd channel is 3 access, respectively.
The fifth channel shows the case where one access is required, and the seventh channel is the case where it is necessary to read from the waveform memory for two accesses. The other channels are channels that are not sounding or can generate musical tones using only the samples that have already been read and stored in the waveform buffer 327.
The channel that is not sounding is a channel whose volume level has been lowered by the volume change control circuit 203 or the like, and the channel is controlled so as not to use the access timing of the waveform memory in the process B. .
【0046】取り込み前半区間804では、処理B前半
区間802のアドレス送り出しのタイミングにしたがっ
て波形メモリ109から読み出された波形データを取り
込んでいる。補間回路326は、補間前半区間806で
時分割チャンネルタイミングにしたがって、波形バッフ
ァ327のデータを用いて第0〜第15チャンネルに関
する補間処理を行なう。あるチャンネルについて補間を
行なう時点で、補間を行なうために必要な当該チャンネ
ルの波形データは波形バッファ327に用意されている
ようになっている。In the first half section 804, waveform data read from the waveform memory 109 is fetched in accordance with the address sending timing of the first half section 802 of the processing B. The interpolation circuit 326 performs interpolation processing on the 0th to 15th channels using the data of the waveform buffer 327 in the interpolation first half section 806 according to the time division channel timing. At the time of performing interpolation on a certain channel, the waveform data of the channel required for performing the interpolation is prepared in the waveform buffer 327.
【0047】以上のようなタイミングで、第0〜第15
チャンネルの楽音波形データが生成される。後半の区間
を用いて処理される第16〜第31チャンネルについて
も同様である。At the above timing, the 0th to 15th
The musical tone waveform data of the channel is generated. The same applies to the 16th to 31st channels processed using the latter half section.
【0048】処理B演算回路325におけるアドレス送
り出しの処理Bおよび取り込み回路328における波形
データ取り込みの処理が必要なアクセス数だけ時分割チ
ャンネルタイミングとは異なるタイミングで行なわれる
ことにより、空きタイムスロットが出現する。図9の
「処理B前半chおよびXアクセス処理」および「取り
込み前半chおよびXアクセス処理」の区間中、「−c
h」は何れのチャンネルのサンプル読み出しにも使用さ
れていない空きタイムスロットを示す。この空きタイム
スロットの区間803,805は、任意に使用可能であ
る。そこで、処理B演算回路325は、この空きタイム
スロットの区間でセレクタ329,330を切り替え、
Xアクセス処理(Xアクセス回路304の制御のもとで
行なわれるCPU104による波形メモリ109へのア
クセス処理、およびミキサ204から出力ライン223
を介して戻ってくる楽音波形データの波形メモリ109
への書き込み処理)が行なわれるようにする。Processing B The processing B of address sending in the arithmetic circuit 325 and the processing of waveform data capture in the capture circuit 328 are performed at timings different from the time-division channel timing by the required number of accesses, so that an empty time slot appears. . In the section of “processing B first half channel and X access processing” and “capture first half channel and X access processing” in FIG.
"h" indicates an empty time slot that is not used for sample reading of any channel. The sections 803 and 805 of the empty time slots can be used arbitrarily. Therefore, the processing B arithmetic circuit 325 switches the selectors 329 and 330 in this empty time slot section,
X access processing (access processing to the waveform memory 109 by the CPU 104 performed under the control of the X access circuit 304, and output from the mixer 204 to the output line 223)
Waveform memory 109 of musical tone waveform data returned via
Write process to the memory).
【0049】なお、処理A演算回路321や処理B演算
回路325を始めとして図3の制御レジスタ201およ
び読み書き回路220の各部には、不図示のクロック発
生部からの制御クロックが入力している。このクロック
を基準として各部が動作することにより、図8,9に示
すようなタイミングで各処理が実行される。A control clock from a clock generator (not shown) is input to the control register 201 and the read / write circuit 220 shown in FIG. Each unit operates with reference to this clock, so that each process is executed at timings shown in FIGS.
【0050】次に、図3の制御レジスタ201および読
み書き回路202による5つの処理について、以下の
(1)〜(5)で詳細に説明する。Next, five processes by the control register 201 and the read / write circuit 202 in FIG. 3 will be described in detail in the following (1) to (5).
【0051】(1)処理A演算回路321で実行する処
理Aについて詳しく説明する。あるチャンネルで楽音の
発音開始が指示されると、当該チャンネルに関する処理
Aが処理A演算回路321で実行開始される。処理A
は、図8,9で説明したように時分割チャンネルタイミ
ングで実行される。まず、1番始めの当該チャンネルの
タイムスロット(ノートオン立上がり直後)で、処理A
演算回路321は、当該チャンネルに対応するARAM
322(図5)のアドレス格納領域(ADHとADL)
を初期化する。初期値は、読み出すべき波形データの先
頭アドレスAS(波形データのループ部の先頭位置を基
準とした相対アドレスであるので負値)であり、CPU
104が図3のレジスタ301を介して指定する。次回
以降の当該チャンネルのタイムスロットで、処理A演算
回路321は、当該チャンネルに対応するARAM32
2のアドレス格納領域の現アドレス値に、当該チャンネ
ルにおけるアドレスの進み値(周波数ナンバ)であるピ
ッチPITCHを加算する。加算結果は、元のARAM
322のアドレス格納領域に格納される。ピッチPIT
CHは、CPU104が図3のレジスタ301を介して
指定する。(1) Process A The process A executed by the arithmetic circuit 321 will be described in detail. When a tone generation start instruction is given on a certain channel, the processing A operation circuit 321 starts executing the processing A for the channel. Processing A
Is executed at the time-division channel timing as described with reference to FIGS. First, in the first time slot of the corresponding channel (immediately after the rise of note-on), the processing A
The arithmetic circuit 321 includes an ARAM corresponding to the channel.
322 (FIG. 5) address storage area (ADH and ADL)
Is initialized. The initial value is the start address AS of the waveform data to be read (negative value because it is a relative address based on the start position of the loop portion of the waveform data).
104 is designated via the register 301 of FIG. In the time slot of the channel after the next time, the processing A operation circuit 321 sets the ARAM 32 corresponding to the channel.
The pitch PITCH, which is the advance value (frequency number) of the address in the channel, is added to the current address value of the address storage area of No. 2. The addition result is the original ARAM
322 is stored in the address storage area. Pitch PIT
The CH is designated by the CPU 104 via the register 301 in FIG.
【0052】この加算は、具体的には、当該チャンネル
の現アドレス値のアドレス小数部にピッチPITCHを
加算し、加算結果のうちアドレス小数部のビット数より
上位に溢れた値を現アドレス値のアドレス整数部に加算
することにより行なう。この溢れ値は、新たに読み出す
べき波形サンプルの数になっている。読み書き回路20
2では波形バッファ327にそれまでに読み出した波形
サンプルが保持されており、上記溢れ値が波形メモリ上
での読み出しアドレスの進み量になっているからであ
る。先述した図9は、溢れ値が、第0チャンネルで1、
第2チャンネルで3、第5チャンネルで1、第7チャン
ネルで2の場合である。なお、その他のチャンネルは、
発音していない、または、溢れ値が0のチャンネルであ
る。More specifically, the pitch PITCH is added to the address decimal part of the current address value of the channel, and a value overflowing from the number of bits of the address decimal part in the addition result is calculated as the current address value. This is performed by adding to the address integer part. This overflow value is the number of waveform samples to be newly read. Read / write circuit 20
In No. 2, the waveform sample read so far is held in the waveform buffer 327, and the overflow value is the advance amount of the read address on the waveform memory. In FIG. 9 described above, the overflow value is 1 in the 0th channel,
This is the case where the second channel is 3, the fifth channel is 1, and the seventh channel is 2. For other channels,
The channel is not pronounced or the overflow value is 0.
【0053】なお、波形メモリ109上の波形データは
アタック部とそれに引き続くループ部とから構成され、
波形データのループ部の先頭位置(すなわちアタック部
の末尾)を基準として、読み出しアドレスの初期値AS
(負値)およびループ部末尾位置の相対アドレスLPA
(正値)が設定されている。波形サンプルのアクセスは
アタック部の先頭から開始され(すなわち現アドレス
が、負の相対アドレスASからスタートして徐々に増加
する)、アタック部の読み出しが終わると現アドレス値
が正の値になりループ部に入る。以後は必要に応じてル
ープ部の波形サンプルを繰り返し読み出す。そのため、
現アドレス値がループ部末尾位置(=相対アドレスLP
A)を越えたときは、現アドレス値から値LPAを減算
し、減算結果を新たな現アドレス値として設定する処理
を行なう。現アドレス値には、後に波形データのループ
部の先頭を示す絶対アドレスWAを加算する。処理A演
算回路321は、上述のアドレスを作成する処理中で、
このようなアドレスをループ部先頭付近に戻す処理も行
なっている。The waveform data on the waveform memory 109 is composed of an attack part and a loop part following the attack part.
The initial value AS of the read address is based on the start position of the loop portion of the waveform data (that is, the end of the attack portion).
(Negative value) and relative address LPA at the end of the loop
(Positive value) is set. The access of the waveform sample is started from the head of the attack part (that is, the current address starts from a negative relative address AS and gradually increases). Enter the department. Thereafter, the waveform samples of the loop portion are repeatedly read as necessary. for that reason,
The current address value is at the end of the loop (= relative address LP
If the value exceeds A), a process of subtracting the value LPA from the current address value and setting the result of the subtraction as a new current address value is performed. The absolute address WA indicating the beginning of the loop portion of the waveform data is later added to the current address value. The process A operation circuit 321 is in the process of creating the above-described address,
A process of returning such an address to near the beginning of the loop is also performed.
【0054】以上のように、当該チャンネルのタイムス
ロットで、ARAM322上の現アドレスにピッチ(周
波数ナンバ)を累算していき、当該チャンネルに関する
順次アドレスをARAM322上に生成する。As described above, the pitch (frequency number) is accumulated in the current address on the ARAM 322 in the time slot of the channel, and the sequential address for the channel is generated on the ARAM 322.
【0055】処理Aでは、上述した各チャンネルのアド
レスを作成する処理の他、制御RAM324(図4)内
の書き込み位置を指す書き込みポインタを1つ進め、各
チャンネルごとの必要サンプル数を、制御RAM324
の書き込みポインタで指す位置に格納する処理を行な
う。各チャンネルごとの必要サンプル数は、上述の現ア
ドレス値のアドレス小数部にピッチPITCHを加算し
た加算結果のうちアドレス小数部のビット数より上位に
溢れた値に一致しているから、この溢れ値を得てチャン
ネル番号とともに制御RAM324に格納する。In the process A, in addition to the above-described process of creating the address of each channel, the write pointer pointing to the write position in the control RAM 324 (FIG. 4) is advanced by one, and the required number of samples for each channel is stored in the control RAM 324.
Is stored at the position indicated by the write pointer. Since the required number of samples for each channel matches the value overflowing above the bit number of the address decimal part in the result of adding the pitch PITCH to the address decimal part of the above-mentioned current address value, this overflow value And stores it in the control RAM 324 together with the channel number.
【0056】さらに、処理Aでは、上述の各チャンネル
のアドレス作成、および各チャンネルに関する必要サン
プル数の格納の処理の他、所定の複数のチャンネルごと
に必要な波形メモリアクセス数(この実施の形態ではサ
ンプル数とアクセス数とは一致する)を累算する処理を
も行なう。具体的には、処理A演算回路321で、第0
〜第15チャンネルのアドレス作成(前半処理)と並行
してこれらのチャンネルについて読み出すべき必要なサ
ンプル数を累算し、さらに第16〜第31チャンネルの
アドレス作成(後半処理)と並行してこれらのチャンネ
ルについて読み出すべき必要なサンプル数を累算する。Further, in the process A, in addition to the above-described processes of creating the address of each channel and storing the required number of samples for each channel, the number of waveform memory accesses required for each of a plurality of predetermined channels (in this embodiment, A process of accumulating (the number of samples matches the number of accesses) is also performed. Specifically, the processing A operation circuit
The required number of samples to be read for these channels is accumulated in parallel with the address creation of the 15th channel (first half processing), and further, in parallel with the address creation of the 16th to 31st channels (second half processing). Accumulate the required number of samples to be read for the channel.
【0057】アキュムレータ(ACC)323は、この
累算を行なうためのアキュムレータである。読み書き回
路202では、前半処理と後半処理に分けて累算を行な
うため、アキュムレータ323は実際には前半アキュム
レータと後半アキュムレータとの2つのアキュムレータ
からなる。単に、アキュムレータ323というときは、
前半処理では前半アキュムレータ、後半処理では後半ア
キュムレータのことを指すものとする。An accumulator (ACC) 323 is an accumulator for performing this accumulation. The accumulator 323 is actually composed of two accumulators, a first half accumulator and a second half accumulator, because the read / write circuit 202 performs accumulation in the first half processing and the second half processing separately. When simply referring to the accumulator 323,
The first half processing refers to the first half accumulator, and the second half processing refers to the second half accumulator.
【0058】具体的に累算の処理は、以下のように行な
う。まず、前半処理および後半処理の開始時点でアキュ
ムレータ323を初期設定(ゼロクリア)する。以後
は、前半処理および後半処理の最後のチャンネルまで、
必要なサンプル数(すなわち、アクセス数)をアキュム
レータ323に累算していく。各チャンネルについて読
み出すべき必要なサンプル数は、上記制御RAM324
に書き込む際に分かる。More specifically, the accumulation process is performed as follows. First, the accumulator 323 is initialized (cleared to zero) at the start of the first half process and the second half process. After that, until the last channel of the first half processing and the second half processing,
The required number of samples (that is, the number of accesses) is accumulated in the accumulator 323. The required number of samples to be read for each channel is determined by the control RAM 324.
You can tell when you write to.
【0059】さらに処理Aでは、上記のように累算した
結果であるアクセス回数累算値が、実際にアクセスを実
行する処理Bの前半区間または後半区間における最大ア
クセス可能数(アクセスの制限回数)を超えていないか
判定し、その結果に応じて各チャンネルごとのアクセス
回数および補間次数を決定する。以下、これについて説
明する。まず前半処理の区間に着目して説明する。前半
処理の区間は1サンプリング周期の半分の時間区間であ
り、その区間で第0〜第15チャンネルに関する処理B
(および多少の遅れ時間の後に実行される取り込み処
理)を行なう。また、処理Bで1アドレス送り出しを行
なう区間の時間幅は時分割チャンネルタイミングで1チ
ャンネル分の処理を行なう区間の時間幅の1/4であ
る。したがって、もしXアクセス処理を当該区間内で行
なわないなら(すなわち図8,9の区間803,805
がない場合)、前半区間では64アクセスが可能であ
る。この実施の形態では、各チャンネルで4点補間を行
なうので、前半区間で処理する16チャンネルのすべて
で4点の波形サンプルを読み出す必要がある場合でも、
4点×16ch=64アクセスであるから、Xアクセス
処理を行なわずに前半区間のすべてを処理Bおよび取り
込み処理に使用すれば、すべてのチャンネルで4点補間
を行なうことができる。ただし、優先フラグ(次の処理
Bの説明で詳述する)303がオンされているときは前
半区間のXアクセス処理で所定回(この実施の形態では
1回)のアクセスを優先的に実行しなければならないた
め、前半区間の処理Bおよび取り込み処理による最大ア
クセス可能数は64から上記Xアクセス処理のアクセス
数を減算した値となる。したがって、上述したようにア
キュムレータ323で累算したアクセス回数累算値が前
半区間における最大アクセス可能数を超えることが考え
られる。この場合は、制御RAM324に書き込んだ各
チャンネルのサンプル数をすべてアクセスすることはで
きないので、アクセス回数の多い(例えば3回あるいは
4回)チャンネルの中の何れかのチャンネルのアクセス
回数を削減し補間次数を落とす。補間次数を落とすとい
うのは、例えば、4点補間の処理を3点補間あるいは2
点補間(直線補間)に変更する、ということである。ア
クセス回数を削減するチャンネルの決定方法としては、
例えば下記のおよびのような方法がある。Further, in the process A, the accumulative value of the number of accesses as a result of the accumulation as described above is the maximum accessible number (access limit number) in the first half or the second half of the process B for actually executing the access. Is determined, and the number of accesses and the interpolation order for each channel are determined according to the result. Hereinafter, this will be described. First, a description will be given focusing on the section of the first half processing. The first half processing section is a time section that is half of one sampling period, and processing B relating to the 0th to 15th channels is performed in that section.
(And a fetch process performed after some delay time). In addition, the time width of the section in which one address is sent out in the process B is の of the time width of the section in which the processing for one channel is performed at the time-division channel timing. Therefore, if X access processing is not performed in the section (ie, sections 803 and 805 in FIGS. 8 and 9).
), 64 accesses are possible in the first half section. In this embodiment, four-point interpolation is performed for each channel. Therefore, even when it is necessary to read out four-point waveform samples from all 16 channels to be processed in the first half section,
Since 4 points × 16 ch = 64 accesses, if all of the first half section is used for processing B and fetching processing without performing X access processing, 4-point interpolation can be performed on all channels. However, when the priority flag (to be described in detail in the following process B) 303 is turned on, a predetermined number of (one in this embodiment) access is preferentially executed in the X access process in the first half section. Therefore, the maximum accessible number by the process B and the fetch process in the first half section is a value obtained by subtracting the access number of the X access process from 64. Therefore, it is conceivable that the accumulative access count accumulated by accumulator 323 exceeds the maximum accessible number in the first half section as described above. In this case, it is not possible to access the entire number of samples of each channel written in the control RAM 324. Therefore, the number of accesses of any of the channels having a large number of accesses (for example, three or four times) is reduced and interpolation is performed. Decrease order. Reducing the interpolation order means, for example, that the processing of four-point interpolation is three-point interpolation or two-point interpolation.
That is, change to point interpolation (linear interpolation). As a method of determining the channel to reduce the number of accesses,
For example, there are the following methods.
【0060】チャンネル順に片端からアクセス回数を
削減する。 その時点で音量レベルの小さいチャンネルからアクセ
ス回数を削減する。このようにすると楽音への影響が小
さい。各チャンネルの音量レベルは、エンベロープ値か
ら分かる。The number of accesses is reduced from one end in channel order. At that time, the number of accesses is reduced from the channel having the lower volume level. In this way, the influence on the musical sound is small. The volume level of each channel is known from the envelope value.
【0061】なお、この実施の形態では前半区間で64
アクセス可能で補間は4点補間であり、実際には第0〜
第15のすべてのチャンネルで4点の読み出しを行なう
場合はきわめて稀であると考えられるから、アクセス回
数を累算して最大アクセス可能数と比較した結果から各
チャンネルのアクセス回数と補間次数を決定する機能は
設けなくとも実用上はほとんど問題がない。ただし、4
点補間でなく例えば各チャンネルで6点補間を行なう場
合や、優先フラグ303がオンのときにXアクセス処理
に優先的に確保するアクセス数が多い場合などでは、有
効な機能である。以上、前半区間に着目して説明したが
後半区間でも同様である。In this embodiment, 64 is used in the first half section.
It is accessible and the interpolation is 4-point interpolation.
Since it is considered very rare to read four points in all the fifteenth channels, the number of accesses and the interpolation order of each channel are determined from the result of accumulating the number of accesses and comparing with the maximum accessible number. There is almost no problem in practical use even if no function is provided. However, 4
This is an effective function when, for example, 6-point interpolation is performed on each channel instead of point interpolation, or when the number of accesses to be preferentially secured in the X access processing when the priority flag 303 is on is large. Although the description has been given focusing on the first half section, the same applies to the second half section.
【0062】(2)次に、処理B演算回路325で実行
する処理Bについて詳しく説明する。処理B演算回路3
25は、時分割チャンネルタイミングとは異なるタイミ
ングで、処理B、すなわちアドレスを波形メモリ109
に向けて送り出す処理を行なう。図9で説明したよう
に、時分割チャンネルタイミングの1チャンネル当りの
時間内で4アクセス(4サンプルの読み出し)が可能で
ある。処理Bの波形メモリアクセス処理は、処理Aの時
分割チャンネルタイミングにしたがった処理とは関係が
なく、読み出しが必要な各チャンネルについて順次連続
して行なわれる。読み出しが必要なチャンネルとサンプ
ル数は、上述の処理Aで決定され、制御RAM324に
セットされている。また、図8,9で説明したように、
あるチャンネルについて処理Bを行なうときには既に当
該チャンネルに関する処理Aは実行済みであり、当該チ
ャンネルのアドレス値がARAM322にセットされて
いる。(2) Next, the processing B executed by the processing B arithmetic circuit 325 will be described in detail. Processing B operation circuit 3
Reference numeral 25 denotes processing B, that is, an address which is different from the time-division channel timing, that is, the
The process of sending out to is performed. As described with reference to FIG. 9, four accesses (reading of four samples) are possible within the time per channel of the time division channel timing. The waveform memory access process of the process B has no relation to the process of the process A according to the time-division channel timing, and is sequentially and continuously performed for each channel that needs to be read. The channels that need to be read and the number of samples are determined in the above-described process A and set in the control RAM 324. Also, as described with reference to FIGS.
When the process B is performed for a certain channel, the process A for the channel has already been executed, and the address value of the channel has been set in the ARAM 322.
【0063】アドレス送り出しの処理を説明する。ま
ず、図4に示す制御RAM324内の読み出し位置を指
す読み出しポインタの値が、当該チャンネルに関する処
理A前半または後半処理の終了時点の書き込みポインタ
の値と一致しているか否か判定する。例えば、当該チャ
ンネルの処理Bが図8の処理B前半区間802内の処理
である場合は、読み出しポインタの値を、処理A前半区
間801の終了時点の書き込みポインタの値と比較する
ということである。これが一致すれば、その処理Bの区
間で読み出すべきサンプルはもう無いということだか
ら、当該区間の処理Bは終えて、残った空きスロットで
後述するXアクセス処理を行なうように制御する。The address sending process will be described. First, it is determined whether or not the value of the read pointer indicating the read position in the control RAM 324 shown in FIG. 4 matches the value of the write pointer at the end of the first half or the second half of the processing A for the channel. For example, when the process B of the channel is a process in the first half section 802 of the process B in FIG. 8, the value of the read pointer is compared with the value of the write pointer at the end of the first half section 801 of the process A. . If this coincides, it means that there is no more sample to be read in the section of the process B, so that the process B of the section is completed and control is performed so that X access processing described later is performed in the remaining empty slot.
【0064】読み出しポインタの値が上記書き込みポイ
ンタの値に一致していないときは、読み出しポインタを
1つ進めて、読み出しポインタが指すチャンネル番号と
サンプル数を制御RAM324から読み出す。そして、
そのサンプル数分の当該チャンネル番号に関するアドレ
スを波形メモリ109に送り出す。具体的には、ARA
M322から当該チャンネルの現アドレス整数部を読み
出し、必要なサンプル数のサンプルを順次アクセスする
ための複数のオフセットを加算し、さらに波形データの
ループ部の先頭を示す絶対アドレスWAを加算して(処
理Aで作成したアドレスは相対アドレスであるので、絶
対アドレスに変換するためWAを加算する)、最終的な
読み出しアドレスWMAを求め、セレクタ329がこの
アドレスWMAを選択出力するように制御する。これに
より1アドレスが波形メモリ109に送り出される。加
算するオフセットは、例えば図9の例では、第0チャン
ネルでは0、第2チャンネルの1回目が−2、2回目が
−1、3回目が0、第5チャンネルの1回目が−1、2
回目が0などとなる。以上のようにして、図8,9で説
明したアドレス送り出しのタイミングで、読み出しポイ
ンタを進めながらアドレスを連続的に送り出していく。When the value of the read pointer does not match the value of the write pointer, the read pointer is advanced by one, and the channel number and the number of samples indicated by the read pointer are read from the control RAM 324. And
The addresses corresponding to the channel numbers corresponding to the number of samples are sent to the waveform memory 109. Specifically, ARA
The current address integer part of the channel is read from M322, a plurality of offsets for sequentially accessing a required number of samples are added, and an absolute address WA indicating the head of the loop part of the waveform data is added (processing Since the address created in A is a relative address, WA is added to convert the address to an absolute address), a final read address WMA is obtained, and the selector 329 is controlled to select and output this address WMA. Thus, one address is sent to the waveform memory 109. For example, in the example of FIG. 9, the offset to be added is 0 for the 0th channel, −2 for the first time of the second channel, −1 for the second time, −1 for the third time, and −1,2 for the first time of the fifth channel.
The number of times is 0 or the like. As described above, at the address sending timing described with reference to FIGS.
【0065】図8,9でも説明したように、上記アドレ
ス送り出しの処理は必要な回数だけ時分割チャンネルタ
イミングとは異なるタイミングで行なわれるので、アク
セス余り時間としての空きタイムスロットが出現する。
そこで、アドレス送り出しの処理の後、処理B演算回路
325はXAレジスタ311からのアドレスが選択出力
されるようにセレクタ329を切り替え(さらに、波形
メモリ109のデータラインがFIFO313に接続す
るようにセレクタ330を切り替える)、Xアクセス回
路304の制御のもとでこの余り時間を利用してXアク
セス処理が行なわれるようにする。As described above with reference to FIGS. 8 and 9, the address sending process is performed a necessary number of times at a timing different from the time-division channel timing, so that an empty time slot as an extra access time appears.
Therefore, after the address sending process, the process B arithmetic circuit 325 switches the selector 329 so that the address from the XA register 311 is selectively output (further, the selector 330 such that the data line of the waveform memory 109 is connected to the FIFO 313). Is switched), and the X access processing is performed using the extra time under the control of the X access circuit 304.
【0066】優先フラグ303は、CPU104が適宜
オン/オフする。優先フラグ303がオンされていると
き、処理B演算回路325は楽音発生のための各チャン
ネルの波形データ読み出しの状態にかかわらず、Xアク
セス処理に最低1回(複数回でもよい。確保するスロッ
ト数は任意に指定できる。)のアクセススロットを確保
する(すなわち、図8、9において、前半処理では区間
803,805を、後半処理では区間813,815
を、それぞれ最低限1アクセス分だけは確保する)。こ
れにより、CPU104からの波形メモリ109へのア
クセス処理、またはミキサ204から出力ライン223
を介して戻ってくる楽音波形データの波形メモリ109
への書き込み処理を、1アクセスだけ必ず入れることが
できる。The priority flag 303 is appropriately turned on / off by the CPU 104. When the priority flag 303 is turned on, the processing B arithmetic circuit 325 performs at least one (or a plurality of times, the number of slots to be reserved) for the X access processing regardless of the state of reading the waveform data of each channel for generating a tone. 8 and 9 are secured (that is, in FIGS. 8 and 9, sections 803 and 805 are used in the first half processing, and sections 813 and 815 are used in the second half processing).
Are secured for at least one access each). Thereby, the access process from the CPU 104 to the waveform memory 109 or the output line 223 from the mixer 204 is performed.
Waveform memory 109 of musical tone waveform data returned via
Can always be included in only one access.
【0067】(3)次に、取り込み回路328で実行す
る取り込み処理について説明する。取り込み回路328
は、処理B演算回路325から送り出されたアドレスW
MAにより読み出された波形サンプルを取り込み、波形
バッファ327に書き込む。このときセレクタ330
は、処理B演算回路325の制御のもとで、波形メモリ
109のデータラインを取り込み回路328に接続す
る。波形サンプル取り込みの結果、波形バッファ327
には、基本的に各チャンネル4サンプルが用意されるこ
とになる。ただし、処理Aで補間次数を落としたチャン
ネルがある場合は、当該チャンネルについては、次数を
落とした補間で必要なサンプルが波形バッファ327に
用意される。なお、波形メモリ109に格納されている
波形サンプルが圧縮されている場合は、取り込み回路3
28でデコードを行なうようにする。(3) Next, the fetch process executed by the fetch circuit 328 will be described. Capture circuit 328
Is the address W sent from the processing B operation circuit 325.
The waveform sample read by the MA is captured and written to the waveform buffer 327. At this time, the selector 330
Connects the data line of the waveform memory 109 to the fetch circuit 328 under the control of the processing B arithmetic circuit 325. As a result of capturing the waveform sample, the waveform buffer 327
, Basically 4 samples are prepared for each channel. However, if there is a channel whose interpolation order is lowered in the process A, the waveform buffer 327 prepares samples necessary for the channel by the interpolation whose order is lowered. If the waveform samples stored in the waveform memory 109 are compressed, the acquisition circuit 3
At 28, decoding is performed.
【0068】取り込み処理は処理Bによるアドレス送り
出しと同期して行なわれるので、処理Bで説明したよう
に、アクセス余り時間としての空きタイムスロットが出
現する。そこで、取り込み処理の後、処理B演算回路3
25は波形メモリ109のデータラインとFIFO31
3とが接続されるようにセレクタ330を切り替え、X
アクセス回路304の制御のもとでこの余り時間を利用
してXアクセス処理が行なわれるようにする。Since the fetching process is performed in synchronization with the address sending by the process B, an empty time slot as an extra access time appears as described in the process B. Therefore, after the capture processing, the processing B operation circuit 3
25 is a data line of the waveform memory 109 and the FIFO 31
3 is switched so that X.3 is connected to X.
Under the control of the access circuit 304, this extra time is used to perform the X access processing.
【0069】(4)次に、補間回路326で実行する補
間処理について詳しく説明する。補間回路326は、時
分割チャンネルタイミングにしたがって、チャンネルご
とに順に補間処理を行なう。1つのチャンネルに関する
補間処理は、以下のとおりである。まず、波形バッファ
327から当該チャンネルの4つの波形サンプルを順次
読み出す。そして、各サンプルに所定の補間係数を乗算
して累算する。各サンプルに乗算する補間係数は、当該
チャンネルのアドレス小数部FRACに基づいて決定す
る。アドレス小数部FRACは、ARAM322から処
理B演算回路325経由で入力する。以上により、補間
済みの楽音波形データが生成出力される。なお、上述し
た波形メモリのアクセス回数削減により補間次数を落と
したチャンネルについては、落とした次数での補間を行
ない補間済みの楽音波形データを得る。(4) Next, the interpolation processing executed by the interpolation circuit 326 will be described in detail. The interpolation circuit 326 performs an interpolation process for each channel in order according to the time division channel timing. The interpolation process for one channel is as follows. First, four waveform samples of the channel are sequentially read from the waveform buffer 327. Then, each sample is multiplied by a predetermined interpolation coefficient and accumulated. The interpolation coefficient by which each sample is multiplied is determined based on the address decimal part FRAC of the channel. The address decimal part FRAC is input from the ARAM 322 via the processing B operation circuit 325. As described above, the interpolated musical tone waveform data is generated and output. Note that, for channels whose interpolation order has been reduced by reducing the number of accesses to the waveform memory described above, interpolation is performed at the reduced order to obtain interpolated tone waveform data.
【0070】(5)次に、Xアクセス処理について詳し
く説明する。上述したように、処理Bおよび取り込み処
理で必要な各チャンネルについて順次連続してアドレス
送り出しを行ない波形サンプルを波形バッファ327に
読み出した後、空きタイムスロットがあるときには、処
理B演算回路325は、その空きタイムスロットの区間
でXアクセス処理を行なうようにセレクタ329と33
0を切り替える。具体的には、図8,9の区間803,
813においてXAレジスタ311が波形メモリ109
のアドレスラインに接続されるようにセレクタ329を
切り替え、区間805,815においてFIFO313
が波形メモリ109のデータラインに接続されるように
セレクタ330を切り替える。処理B演算回路325
は、このようにセレクタ329,330を切り替えると
ともに、Xアクセス処理が可能になった旨をXアクセス
回路304に伝える。これにより、Xアクセス回路30
4は(CPU104から指示されていた場合)Xアクセ
ス処理を開始する。また、処理B演算回路325は、X
アクセス処理終了時(1サンプリング周期の半分の時間
幅である前半区間および後半区間の終了時)に再びセレ
クタ329,330を切り替えて、次の処理Bおよび取
り込み処理が可能になるようにする。なお、波形メモリ
109へのアドレスの入力と当該アドレスのデータアク
セスとは若干のタイミングのずれがある(例えば図8の
取り込み前半区間804は処理B前半区間802から若
干遅れている)ので、セレクタ329の切り替えのタイ
ミングとセレクタ330の切り替えのタイミングとは若
干ずれることになるが、その切り替えの制御は処理B演
算回路325により適正に行なわれるようになってい
る。(5) Next, the X access processing will be described in detail. As described above, after successively sending addresses for each channel necessary for the processing B and the acquisition processing, and reading out waveform samples to the waveform buffer 327, if there is an empty time slot, the processing B arithmetic circuit 325 The selectors 329 and 33 are set so that X access processing is performed in an empty time slot section.
Switch 0. Specifically, sections 803 and 803 in FIGS.
At 813, the XA register 311 stores the waveform memory 109
The selector 329 is switched so as to be connected to the address line of the FIFO 313 in the sections 805 and 815.
Is switched to connect the selector 330 to the data line of the waveform memory 109. Processing B operation circuit 325
Switches the selectors 329 and 330 in this way, and informs the X access circuit 304 that the X access processing is enabled. Thereby, the X access circuit 30
4 starts the X access processing (if instructed by the CPU 104). Further, the processing B operation circuit 325
At the end of the access processing (at the end of the first half section and the second half section, which are half the time width of one sampling period), the selectors 329 and 330 are switched again so that the next processing B and the fetch processing can be performed. Note that there is a slight timing difference between the input of an address to the waveform memory 109 and the data access of the address (for example, the first half section 804 of FIG. 8 is slightly delayed from the first half section 802 of the processing B), so that the selector 329 is used. The timing of the switching of the selector 330 slightly deviates from the timing of the switching of the selector 330, but the switching is controlled appropriately by the processing B arithmetic circuit 325.
【0071】Xアクセス処理は、具体的には、CPU1
04から波形メモリ109に波形データを書き込む処
理、CPU104により波形メモリ109から波形デー
タを読み出す処理、およびミキサ204から出力ライン
223を介して戻ってくる波形データの波形メモリ10
9への書き込み処理の3つがある。以下、それぞれにつ
いて説明する。The X access process is executed by the CPU 1
04, a process of writing waveform data from the waveform memory 109 to the waveform memory 109, a process of reading waveform data from the waveform memory 109 by the CPU 104, and a waveform memory 10 of waveform data returned from the mixer 204 via the output line 223.
There are three types of write processing for writing data to Nin. Hereinafter, each will be described.
【0072】CPU104から波形メモリ109にデー
タを書き込む場合、まずCPU104はセレクタ312
を切り替えて、CPU104が接続されているデータバ
スとFIFO313とが接続されるようにする。そし
て、CPU104は、XAレジスタ311に書き込みア
ドレス(先頭アドレス)をセットし、書き込むべき波形
サンプルデータの数をサンプル数レジスタ315にセッ
トし、書き込むべき波形サンプルデータの始めの8サン
プルをセレクタ312を介して8段のFIFO313に
順にセットして、Xアクセス回路304に書き込みスタ
ートを指示する。以後、CPU104は、適宜Xフラグ
314を参照し、Xフラグ314がオンされているとき
は、FIFO313に、書き込むべき波形サンプルデー
タの残りを順次書き込む。Xフラグ314はFIFO3
13の空きの状態を示すフラグであり、CPU104か
らのデータ書き込みの際には、FIFO313に空きが
あるとき自動的にオンとなり、FIFO313に空きが
ないとき自動的にオフとなる。したがって、CPU10
4はXフラグ314がオフとなるまでFIFO313に
書き込みデータを送ってよい。When writing data from the CPU 104 to the waveform memory 109, first, the CPU 104
Is switched so that the data bus to which the CPU 104 is connected and the FIFO 313 are connected. Then, the CPU 104 sets a write address (head address) in the XA register 311, sets the number of waveform sample data to be written in the sample number register 315, and sets the first eight samples of the waveform sample data to be written via the selector 312. Then, it is sequentially set in the FIFOs 313 of eight stages, and the X access circuit 304 is instructed to start writing. Thereafter, the CPU 104 appropriately refers to the X flag 314 and, when the X flag 314 is turned on, sequentially writes the remaining waveform sample data to be written to the FIFO 313. X flag 314 is FIFO3
13 is a flag indicating an empty state. When writing data from the CPU 104, the flag is automatically turned on when there is an empty space in the FIFO 313, and is automatically turned off when there is no empty space in the FIFO 313. Therefore, the CPU 10
4 may send write data to the FIFO 313 until the X flag 314 is turned off.
【0073】図7(a)は、CPU104からFIFO
313にデータを書き込む際のFIFOの使用方法を示
す。矩形701,702はFIFO313を示し、斜線
部分はデータが書き込まれている部分、白抜き部分は空
きの部分を示す。701ではFIFO313の8段の領
域すべてにデータが書き込まれておりXフラグがオフさ
れている。このときCPU104はデータをFIFO3
13に書き込むことができない。Xアクセス処理でFI
FO313のデータが読み出され波形メモリ109に書
き込まれると、702に示すようにFIFO313に空
きができXフラグがオンされる。このときCPU104
は、Xフラグのオンを検出して次の書き込みデータをF
IFO313に書き込むことができる。FIG. 7A shows a case where the CPU 104
313 shows how to use the FIFO when writing data. The rectangles 701 and 702 indicate the FIFO 313, the hatched portion indicates a portion where data is written, and the white portion indicates an empty portion. At 701, data is written in all of the eight stages of the FIFO 313, and the X flag is turned off. At this time, the CPU 104 stores the data in FIFO3
13 cannot be written. FI in X access processing
When the data of the FO 313 is read and written into the waveform memory 109, the FIFO 313 becomes empty as indicated by 702, and the X flag is turned on. At this time, the CPU 104
Detects that the X flag is on and returns the next write data to F
It can be written to IFO 313.
【0074】書き込むべき波形サンプルデータをすべて
FIFO313に送ったら、CPU104から見ると書
き込み終了である。そこで、CPU104は、Xアクセ
ス回路304にCPU書き込みストップ処理を指示して
書き込み処理を終了する。When all the waveform sample data to be written has been sent to the FIFO 313, the writing is completed when viewed from the CPU 104. Therefore, the CPU 104 instructs the X access circuit 304 to perform a CPU write stop process, and ends the write process.
【0075】一方、CPU104からの書き込みスター
ト指示を受けたXアクセス回路304は、処理B演算回
路325から空きタイムスロットである旨の指示がある
区間(区間803,813,805,815)の各タイ
ムスロットで、FIFO313内の波形サンプルデータ
を波形メモリ109に書き込む処理を行なう。1つのタ
イムスロットで行なう処理は、以下の通りである。まず
XAレジスタ311に格納されているアドレスを波形メ
モリ109に送出する。次に、FIFO313から波形
サンプルデータを1つ取り出し、波形メモリ109に送
出して上記アドレス位置に書き込む。その後、XAレジ
スタ311のアドレスをインクリメントする。Xアクセ
ス回路304内には、書き込みスタート指示でゼロクリ
アされ、波形サンプルデータを1つ波形メモリ109に
書き込むとカウントアップされるカウンタが備えられて
おり、Xアクセス回路304は書き込みの度にこのカウ
ンタの値とサンプル数レジスタ315のサンプル数を比
較する。カウンタの値がサンプル数レジスタ315のサ
ンプル数に至ったら、指示されたデータをすべて書き込
んだということであるから、書き込み処理を終了する。
また、CPU104からCPU書き込みストップ処理の
指示があったときは、FIFO313に残っているデー
タをすべて波形メモリ109に書き込んで、処理を終了
する。なお、サンプル数レジスタ315を設けることな
く、Xアクセス回路304では、CPU104からのC
PU書き込みストップ処理の指示があるまでFIFO3
13にデータがあれば波形メモリ109に書き込むこと
としてもよい。On the other hand, when the X access circuit 304 receives the write start instruction from the CPU 104, the X access circuit 304 determines the time in each of the sections (sections 803, 813, 805, and 815) in which the processing B operation circuit 325 indicates that it is an empty time slot. In the slot, a process of writing the waveform sample data in the FIFO 313 to the waveform memory 109 is performed. The processing performed in one time slot is as follows. First, the address stored in the XA register 311 is sent to the waveform memory 109. Next, one piece of waveform sample data is taken out from the FIFO 313, sent to the waveform memory 109, and written to the above-mentioned address position. Thereafter, the address of the XA register 311 is incremented. The X access circuit 304 includes a counter that is cleared to zero by a write start instruction and counts up when one piece of waveform sample data is written to the waveform memory 109. The value is compared with the number of samples in the sample number register 315. When the value of the counter reaches the number of samples in the sample number register 315, it means that all the specified data has been written, and the writing process ends.
When the CPU 104 instructs a CPU write stop process, all data remaining in the FIFO 313 is written into the waveform memory 109, and the process ends. In addition, without providing the sample number register 315, the X access circuit 304
FIFO3 until PU write stop processing is instructed
If there is data in 13, it may be written in the waveform memory 109.
【0076】波形メモリ109からCPU104にデー
タを読み出す場合、まずCPU104はセレクタ312
を切り替えて、CPU104が接続されているデータバ
スとFIFO313とが接続されるようにする。そし
て、CPU104は、XAレジスタ311に読み出しア
ドレス(先頭アドレス)をセットし、読み出すべき波形
サンプルデータの数をサンプル数レジスタ315にセッ
トして、Xアクセス回路304に読み出しスタートを指
示する。以後、CPU104は、適宜Xフラグ314を
参照し、Xフラグ314がオンされているときは、FI
FO313から波形サンプルデータを順次読み出す。X
フラグ314はFIFO313の空きの状態を示すフラ
グであり、CPU104によるデータ読み出しの際に
は、FIFO313に波形メモリ109からの読み出し
データがあるとき自動的にオンとなり、FIFO313
に読み出しデータがないとき自動的にオフとなる。When reading data from the waveform memory 109 to the CPU 104, first, the CPU 104
Is switched so that the data bus to which the CPU 104 is connected and the FIFO 313 are connected. Then, the CPU 104 sets a read address (head address) in the XA register 311, sets the number of waveform sample data to be read in the sample number register 315, and instructs the X access circuit 304 to start reading. Thereafter, the CPU 104 refers to the X flag 314 as appropriate, and when the X flag 314 is turned on, the FI
The waveform sample data is sequentially read from the FO 313. X
The flag 314 is a flag indicating an empty state of the FIFO 313. When reading data by the CPU 104, the flag 314 is automatically turned on when there is data read from the waveform memory 109 in the FIFO 313.
Automatically turns off when there is no read data.
【0077】図7(b)は、CPU104によりFIF
O313からデータを読み出す際のFIFOの使用方法
を示す。矩形703,704はFIFO313を示し、
斜線部分は読み出したデータを格納した部分、白抜き部
分は空きの部分を示す。703ではFIFO313の8
段の領域はすべて空きでありXフラグがオフされてい
る。このときFIFO313には読み出しデータが未だ
ないからCPU104はデータを読み出すことができな
い。Xアクセス処理で波形メモリ109からデータが読
み出されFIFO313に書き込まれると、704に示
すようにXフラグがオンされる。このときCPU104
は、Xフラグのオンを検出してFIFO313から読み
出しデータを読み出すことができる。FIG. 7B shows that the CPU 104
The following describes how to use the FIFO when reading data from O313. Rectangle 703,704 shows FIFO313,
The hatched portion indicates the portion storing the read data, and the white portion indicates the empty portion. In 703, 8 of FIFO 313
All the areas in the row are empty and the X flag is turned off. At this time, since there is no read data in the FIFO 313, the CPU 104 cannot read the data. When data is read from the waveform memory 109 and written to the FIFO 313 in the X access processing, the X flag is turned on as indicated by 704. At this time, the CPU 104
Can detect the ON of the X flag and read the read data from the FIFO 313.
【0078】Xフラグ314はFIFO313に読み出
しデータがあるか否かを示すとともに、Xフラグ314
がオフのときはサンプル数レジスタ315で指定された
数だけの波形サンプルを読み出したか否かを判別できる
ようになっている。そこで、CPU104は、Xフラグ
314がオフのとき、サンプル数レジスタ315で指定
した数だけの波形サンプルデータを読み出したか否かを
判別し、読み出していたらXアクセス回路304にCP
U読み出しストップ処理を指示して読み出し処理を終了
する。The X flag 314 indicates whether or not there is read data in the FIFO 313, and the X flag 314
Is off, it is possible to determine whether or not the number of waveform samples specified by the sample number register 315 has been read. Therefore, when the X flag 314 is off, the CPU 104 determines whether or not the number of waveform sample data specified by the sample number register 315 has been read out.
U read stop processing is instructed, and the read processing ends.
【0079】一方、CPU104からの読み出しスター
ト指示を受けたXアクセス回路304は、処理B演算回
路325から空きタイムスロットである旨の指示がある
区間(区間803,813,805,815)の各タイ
ムスロットで、波形メモリ109から波形サンプルデー
タを読み出してFIFO313に書き込む処理を行な
う。1つのタイムスロットで行なう処理は、以下の通り
である。まずXAレジスタ311に格納されているアド
レスを波形メモリ109に送出する。次に、当該アドレ
スの波形サンプルデータを波形メモリ109から1つ読
み出し、FIFO313に書き込む。その後、XAレジ
スタ311のアドレスをインクリメントする。Xアクセ
ス回路304内には、読み出しスタート指示でゼロクリ
アされ、波形サンプルデータを1つ波形メモリ109か
らFIFO313に読み出すとカウントアップされるカ
ウンタが備えられており、Xアクセス回路304は読み
出しの度にこのカウンタの値とサンプル数レジスタ31
5のサンプル数を比較する。カウンタの値がサンプル数
レジスタ315のサンプル数に至ったら、指示された数
のデータを読み出したということであるから、読み出し
処理を終了する。また、CPU104からCPU読み出
しストップ処理の指示があったときは、処理を終了す
る。なお、サンプル数レジスタ315を設けることな
く、Xアクセス回路304では、CPU104からのC
PU読み出しストップ処理の指示があるまで波形メモリ
109からFIFO313へのデータ読み出しを続ける
こととしてもよい。On the other hand, upon receiving the read start instruction from the CPU 104, the X access circuit 304 determines the time in each of the sections (sections 803, 813, 805, and 815) in which the processing B operation circuit 325 indicates that it is an empty time slot. In the slot, a process of reading waveform sample data from the waveform memory 109 and writing the sample data to the FIFO 313 is performed. The processing performed in one time slot is as follows. First, the address stored in the XA register 311 is sent to the waveform memory 109. Next, one waveform sample data at the address is read from the waveform memory 109 and written into the FIFO 313. Thereafter, the address of the XA register 311 is incremented. The X access circuit 304 includes a counter that is cleared to zero by a read start instruction and counts up when one waveform sample data is read from the waveform memory 109 to the FIFO 313. Counter value and sample number register 31
Compare 5 sample numbers. When the value of the counter reaches the number of samples in the sample number register 315, it means that the specified number of data has been read, and the reading process ends. When the CPU 104 instructs the CPU reading stop process, the process ends. In addition, without providing the sample number register 315, the X access circuit 304
Data reading from the waveform memory 109 to the FIFO 313 may be continued until an instruction to stop PU reading is given.
【0080】ミキサ204から出力ライン223を介し
て戻ってくる波形データを波形メモリ109に書き込む
場合、まずCPU104はセレクタ312を切り替え
て、ミキサ204からの出力ライン223とFIFO3
13とが接続されるようにする。そして、CPU104
は、XAレジスタ311に書き込みアドレス(先頭アド
レス)をセットし、書き込むべき波形サンプルデータの
数をサンプル数レジスタ315にセットして、Xアクセ
ス回路304に書き込みスタートを指示する。以後、サ
ンプリング周期ごとにミキサ204から出力ライン22
3を介して波形サンプルデータが送出されてくるので、
Xアクセス回路304は、その送られてきたデータをF
IFO313に書き込む。なお、ミキサ204から戻っ
てくるデータの書き込みの場合、上述のCPU104か
らのデータ書き込みの場合のようにXフラグ314がオ
ンのときデータをFIFO313に書き込むというよう
なことができず、ミキサ204から送られてくるデータ
はサンプリング周期ごとに送られてくるので、送られて
きたデータはすぐにFIFO313に書き込まなければ
ならない。その時点でFIFO313に空きがないとき
は、ミキサ204から送られてきたデータは捨てられ
る。ただし、既に述べたように、1サンプリング周期の
間にXアクセス処理のスロットが1つも取れないほど楽
音発生のための波形メモリアクセスが混むという事態は
ほとんど無いと考えられるので、上記の場合にミキサ2
04から送られてきたデータを捨てることにしても実用
上はほとんど問題はない。また、優先フラグ303をオ
ンしておけば、1サンプリング周期の間にXアクセス処
理のスロットを少なくとも1回は確保できるので、ミキ
サ204から送られてきたデータは必ず波形メモリ10
9に書き込めることになる。When writing the waveform data returned from the mixer 204 via the output line 223 into the waveform memory 109, the CPU 104 first switches the selector 312 to connect the output line 223 from the mixer 204 to the FIFO3.
13 is connected. And the CPU 104
Sets the write address (head address) in the XA register 311, sets the number of waveform sample data to be written in the sample number register 315, and instructs the X access circuit 304 to start writing. Thereafter, the mixer 204 outputs the output line 22
Since the waveform sample data is sent out via 3
X access circuit 304 stores the transmitted data in F
Write to IFO 313. In the case of writing the data returned from the mixer 204, it is not possible to write the data to the FIFO 313 when the X flag 314 is on as in the case of the data writing from the CPU 104 described above. Since the received data is sent at each sampling period, the sent data must be written to the FIFO 313 immediately. If there is no free space in the FIFO 313 at that time, the data sent from the mixer 204 is discarded. However, as described above, it is considered that there is almost no situation in which waveform memory accesses for generating musical tones are so crowded that no slot for the X access processing can be taken during one sampling period. 2
Even if the data sent from 04 is discarded, there is almost no problem in practical use. Further, if the priority flag 303 is turned on, the slot for the X access processing can be secured at least once during one sampling period.
9 can be written.
【0081】一方、CPU104からの書き込みスター
ト指示を受けたXアクセス回路304は、処理B演算回
路325から空きタイムスロットである旨の指示がある
区間(区間803,813,805,815)の各タイ
ムスロットで、FIFO313内の波形サンプルデータ
を波形メモリ109に書き込む処理を行なうが、この処
理は上記CPU104からの波形データ書き込みで説明
したのと同じであるので、説明を省略する。On the other hand, the X access circuit 304, which has received the write start instruction from the CPU 104, sets each time in the section (section 803, 813, 805, 815) in which the processing B operation circuit 325 indicates that it is an empty time slot. In the slot, the processing of writing the waveform sample data in the FIFO 313 to the waveform memory 109 is performed. This processing is the same as that described for the writing of the waveform data from the CPU 104, and thus the description is omitted.
【0082】以上で図3の制御レジスタ201および読
み書き回路202による5つの処理の詳細な説明を終わ
る。The detailed description of the five processes by the control register 201 and the read / write circuit 202 in FIG. 3 has been completed.
【0083】図10および図11は、図2の信号処理回
路(DSP)205およびミキサ204の設定の具体例
を示す。FIGS. 10 and 11 show specific examples of setting of the signal processing circuit (DSP) 205 and the mixer 204 of FIG.
【0084】図10(a)は、サンプリングを行なう際
の設定の例を示す。ブロック1001,1005は、図
2のミキサ204によるミキシング処理(以下、単にM
IXとする)を示す。ブロック1002,1003,1
004は、図2の信号処理回路205で実行する処理
(信号処理回路205に設定されたマイクロプログラム
に対応する)を示す。矢印は信号の流れを示し、FIF
O1006は図3のXアクセス回路304内のFIFO
313に相当する。MIX1001への「ADC入力」
は、図2の外部回路(ADC)110からインタフェー
ス206および入力ライン213を介して入力する外部
からの楽音信号である。このADC入力は、ミキサ20
4への入力の8チャンネルの内の一つを用いる。FIG. 10A shows an example of a setting for performing sampling. Blocks 1001 and 1005 correspond to a mixing process (hereinafter simply referred to as M
IX). Blocks 1002, 1003, 1
Reference numeral 004 indicates processing (corresponding to a microprogram set in the signal processing circuit 205) executed by the signal processing circuit 205 in FIG. Arrows indicate signal flow,
O1006 is a FIFO in the X access circuit 304 of FIG.
313. "ADC input" to MIX1001
Is an external tone signal input from the external circuit (ADC) 110 of FIG. 2 via the interface 206 and the input line 213. This ADC input is connected to the mixer 20
One of the eight channels of input to 4 is used.
【0085】MIX1001の出力は、図2のミキサ2
04から出力ライン221を介して信号処理回路205
に出力される8チャンネルの内の一つである。信号処理
回路205では図10(a)のブロック1002〜10
04に示す処理を行なう。すなわち、MIX1001か
らの出力に対し、エンベロープ抽出処理1003によっ
てエンベロープを抽出し、エンベロープの立ち上がりで
ゲート1002を開くようにする。ゲート1002が開
かれると、サンプリング周期毎にMIX1001の出力
すなわち外部から入力した楽音波形が波形処理1004
へと送出される。波形処理1004では、入力した楽音
波形に対して各種の波形処理を施す。例えば、直流分を
カットするDCカット処理、入力レベルが小のときにミ
ュートをかけるノイズミュート処理、エンベロープのレ
ベルがある所定値以上の場合にゲインを下げるコンプレ
ッサ処理、入力波形のレベルが小さい場合によりそのレ
ベルを小さくするエキスパンダ処理、および高いサンプ
リング周波数で外部から入力した楽音波形を低いサンプ
リング周波数に落としたり逆にサンプリング周波数を上
げたりすためのFs(サンプリング周波数)変換処理な
どである。The output of the MIX 1001 is the mixer 2 of FIG.
04 via the output line 221 to the signal processing circuit 205
Out of the eight channels output to In the signal processing circuit 205, the blocks 1002 to 1002 in FIG.
04 is performed. That is, the envelope is extracted from the output from the MIX 1001 by the envelope extraction processing 1003, and the gate 1002 is opened at the rising edge of the envelope. When the gate 1002 is opened, the output of the MIX 1001, that is, the tone waveform input from the outside, is subjected to the waveform processing 1004 every sampling period.
Sent to. In the waveform processing 1004, various waveform processing is performed on the input musical sound waveform. For example, DC cut processing for cutting DC components, noise mute processing for muting when the input level is low, compressor processing for lowering the gain when the level of the envelope is above a certain value, and when the level of the input waveform is low. An expander process for reducing the level and an Fs (sampling frequency) conversion process for lowering the tone waveform input from the outside at a high sampling frequency to a low sampling frequency or conversely increasing the sampling frequency.
【0086】波形処理1004の出力は再びMIX10
05に戻る。これは、図2の信号処理回路205の処理
結果を入力ライン212のうちの1チャンネルを使って
ミキサ204に戻す部分に相当する。そして、MIX1
005からFIFO1006に楽音波形を出力し波形メ
モリ1009に書き込む。これは、ミキサ204から出
力ライン223を介して制御レジスタ201内のFIF
O313に波形データを書き込む部分を示す。FIFO
313に書き込まれたデータは既に説明したように波形
メモリ109に書き込まれる。The output of the waveform processing 1004 is again MIX10
Return to 05. This corresponds to a portion in which the processing result of the signal processing circuit 205 in FIG. 2 is returned to the mixer 204 using one channel of the input line 212. And MIX1
From 005, the tone waveform is output to the FIFO 1006 and written to the waveform memory 1009. This corresponds to the FIFO in the control register 201 from the mixer 204 via the output line 223.
O313 indicates a portion where waveform data is written. FIFO
The data written to 313 is written to the waveform memory 109 as described above.
【0087】図10(b)は、リサンプリング用のマイ
クロプログラムおよびミキサの設定の例(その1)を示
す。図10(a)と同様に、MIX1011,1014
は図2のミキサ204に対応し、FIFO1015は図
3のFIFO313に対応する。ブロック1012,1
013は、図2の信号処理回路205に設定するマイク
ロプログラムに対応する。MIX1011への「ch出
力」は、図2の音量変化制御回路203から入力ライン
211を介して入力する楽音信号であり、サンプリング
などによりあらかじめ波形メモリ109上に用意されて
いる波形データを読み出して生成した楽音波形である。
この「ch出力」は、32チャンネルのうちの一つでも
よいし、複数チャンネルでもよい。すなわち、複数の発
音チャンネルで複数の波形データを読み出し、読み出さ
れた複数の波形データをMIX1011でミキシングす
るようにしてもよい。FIG. 10B shows an example (1) of setting of a microprogram for resampling and a mixer. As in FIG. 10A, MIX 1011 and 1014
Corresponds to the mixer 204 in FIG. 2, and the FIFO 1015 corresponds to the FIFO 313 in FIG. Block 1012, 1
013 corresponds to the microprogram set in the signal processing circuit 205 of FIG. The “ch output” to the MIX 1011 is a tone signal input from the volume change control circuit 203 of FIG. It is a musical sound waveform.
This “ch output” may be one of the 32 channels or a plurality of channels. That is, a plurality of waveform data may be read from a plurality of tone generation channels, and the read plurality of waveform data may be mixed by the MIX 1011.
【0088】MIX1011の出力は、図2のミキサ2
04から出力ライン221を介して信号処理回路205
に出力される8チャンネルの内の一つである。信号処理
回路205ではブロック1012,1013に示す処理
を行なう。すなわち、MIX1001からの出力に対
し、分離フィルタ1012による成分分離を施し周期成
分と非周期成分とを取り出す。インターリーブ1013
は、この周期成分と非周期成分とを交互にMIX101
4に出力しFIFO1015に書き込むようにする。こ
れにより、サンプリングなどによりあらかじめ波形メモ
リ上に用意されている楽音波形に対し成分分離を施して
再び波形メモリに戻すリサンプリングが行なわれる。な
お、分離フィルタ1012から出力される周期成分につ
いては例えばLPC圧縮などを施してもよい。The output of MIX 1011 is the mixer 2 of FIG.
04 via the output line 221 to the signal processing circuit 205
Out of the eight channels output to The signal processing circuit 205 performs the processing shown in blocks 1012 and 1013. That is, the output from the MIX 1001 is subjected to component separation by the separation filter 1012 to extract a periodic component and an aperiodic component. Interleave 1013
MIX101 alternates the periodic component and the non-periodic component.
4 to be written to the FIFO 1015. As a result, resampling is performed in which the tone waveform prepared in advance in the waveform memory is subjected to component separation by sampling or the like and returned to the waveform memory again. The periodic component output from the separation filter 1012 may be subjected to, for example, LPC compression.
【0089】図10(c)は、リサンプリング用のマイ
クロプログラムおよびミキサの設定の例(その2)を示
す。図10(a)と同様に、MIX1021,1023
は図2のミキサ204に対応し、FIFO1024は図
3のFIFO313に対応する。ブロック1022は、
図2の信号処理回路205に設定するマイクロプログラ
ムに対応する。MIX1021への「ch出力」は、図
2の音量変化制御回路203から入力ライン211を介
して入力する楽音信号であり、サンプリングなどにより
あらかじめ波形メモリ109上に用意されている波形デ
ータを読み出して生成した楽音波形である。この「ch
出力」は、32チャンネルのうちの一つでもよいし、複
数チャンネルでもよい。すなわち、複数の発音チャンネ
ルで複数の波形データを読み出し、読み出された複数の
波形データをMIX1021でミキシングするようにし
てもよい。FIG. 10C shows an example (part 2) of setting a microprogram for resampling and a mixer. As in FIG. 10A, the MIXs 1021, 1023
Corresponds to the mixer 204 in FIG. 2, and the FIFO 1024 corresponds to the FIFO 313 in FIG. Block 1022 is
This corresponds to a micro program set in the signal processing circuit 205 in FIG. The “ch output” to the MIX 1021 is a tone signal input from the volume change control circuit 203 in FIG. It is a musical sound waveform. This "ch
The “output” may be one of the 32 channels or a plurality of channels. That is, a plurality of waveform data may be read from a plurality of tone generation channels, and the read plurality of waveform data may be mixed by the MIX 1021.
【0090】MIX1021の出力は、図2のミキサ2
04から出力ライン221を介して信号処理回路205
に出力される8チャンネルの内の一つである。信号処理
回路205ではブロック1022に示す波形処理を行な
う。この波形処理1022としては、例えば、イコライ
ザ、モジュレーション(変調)、波形圧縮、Fs変換、
物理モデル音源、およびリバーブ付与の処理などがあ
る。物理モデル音源というのは、ミキサ1021からの
出力を駆動信号として物理モデル音源を働かせてその結
果の波形を出力するということである。波形処理102
2の結果は、MIX1023を介してFIFO1024
に書き込まれ、再び波形メモリ109に録音される。こ
れにより、サンプリングなどにより波形メモリ上に存在
する楽音波形に対し各種の波形処理を施して再び波形メ
モリに戻すリサンプリングが行なわれる。The output of the MIX 1021 is the mixer 2 of FIG.
04 via the output line 221 to the signal processing circuit 205
Out of the eight channels output to The signal processing circuit 205 performs the waveform processing shown in block 1022. The waveform processing 1022 includes, for example, equalizer, modulation (modulation), waveform compression, Fs conversion,
There is a physical model sound source and a process of adding reverb. The physical model sound source means that the physical model sound source is operated using the output from the mixer 1021 as a drive signal, and the resulting waveform is output. Waveform processing 102
2 are stored in the FIFO 1024 via MIX1023.
And recorded in the waveform memory 109 again. As a result, resampling is performed by performing various waveform processing on the musical tone waveform existing on the waveform memory by sampling or the like and returning the waveform to the waveform memory again.
【0091】図11(a)は、楽音発生用のマイクロプ
ログラムおよびミキサの設定の例(その1)を示す。ま
た、図11(b)は、楽音発生用のマイクロプログラム
およびミキサの設定の例(その2)を示す。図10
(a)と同様に、MIX1101,1103,1111
〜1113,1117は図2のミキサ204に対応す
る。DAC1104,1118は図1のDAC112に
対応する。図11(a)ではブロック1102が、図1
1(b)ではブロック1114〜1116が、それぞ
れ、図2の信号処理回路205に設定するマイクロプロ
グラムに対応する。各MIX1101,1111〜11
13へ入力している「ch出力」は、それぞれ、図2の
音量変化制御回路203から入力ライン211を介して
入力する楽音信号(32チャンネルのうちの一つでもよ
いし、複数チャンネルでもよい)である。各MIX11
01,1111〜1113の出力は、それぞれ、図2の
ミキサ204から出力ライン221を介して信号処理回
路205に出力される8チャンネルの内の一つである。FIG. 11 (a) shows an example (1) of setting of a microprogram for generating a musical tone and a mixer. FIG. 11B shows an example (part 2) of setting of a microprogram and a mixer for generating a musical tone. FIG.
As in (a), MIX1101, 1103, 1111
Reference numerals 1113 and 1117 correspond to the mixer 204 in FIG. DACs 1104 and 1118 correspond to DAC 112 in FIG. In FIG. 11A, the block 1102 corresponds to FIG.
In FIG. 1B, blocks 1114 to 1116 respectively correspond to microprograms set in the signal processing circuit 205 in FIG. Each MIX1101, 1111-11
The “ch output” input to 13 is a tone signal (one of 32 channels or a plurality of channels) input from the volume change control circuit 203 of FIG. 2 via the input line 211, respectively. It is. Each MIX11
Outputs 01, 1111 to 1113 are one of eight channels output from the mixer 204 of FIG. 2 to the signal processing circuit 205 via the output line 221.
【0092】図11(a)の場合、信号処理回路205
ではMIX1101の出力に対してリバーブ処理110
2を施し、MIX1103を介してDAC1104に出
力し放音する。図11(b)の場合、信号処理回路20
5ではMIX1111〜1113のの出力に対してそれ
ぞれコーラス処理1114、リバーブ処理1115、お
よびバリエーション1116を施し、その処理結果をM
IX1117でミキシングしてDAC1104に出力し
放音する。In the case of FIG. 11A, the signal processing circuit 205
Now, the reverb processing 110 is performed on the output of the MIX 1101.
2 is output to the DAC 1104 via the MIX 1103 to emit sound. In the case of FIG. 11B, the signal processing circuit 20
5, the chorus processing 1114, the reverb processing 1115, and the variation 1116 are performed on the outputs of the MIXs 1111 to 1113, respectively.
The signal is mixed by IX1117 and output to DAC 1104 for sound emission.
【0093】なお、図10および図11の各設定例にお
いて、MIXのブロックには図示した入力以外の他の楽
音波形を入力させてミキシングを行なうようにしてもよ
い。また、これらのマイクロプログラムの設定例は、信
号処理回路205のマイクロプログラムメモリの容量に
応じて適宜並行して実行するように設定することもでき
る。例えば、図10(a)のサンプリング用のマイクロ
プログラムと図11(a)の楽音発生用のマイクロプロ
グラムとを同時に実行するようなことも可能である。ま
た、MIX1103,1117のミキシング結果を、D
AC1104,1118に出力するとともに、ライン2
23を通じてFIFO313に出力し、波形メモリ10
9へ書き込むようにしてもよい。これは、演奏された波
形データをそのまま録音する、フレーズ録音である。In each of the setting examples shown in FIGS. 10 and 11, mixing may be performed by inputting a tone waveform other than the illustrated input to the MIX block. Further, the setting examples of these microprograms can be set so as to be executed in parallel as appropriate in accordance with the capacity of the microprogram memory of the signal processing circuit 205. For example, it is possible to simultaneously execute the sampling microprogram of FIG. 10A and the tone generation microprogram of FIG. 11A. The mixing results of MIX1103 and 1117 are represented by D
AC1104, 1118 and line 2
23 to the FIFO 313 and output to the waveform memory 10
9 may be written. This is a phrase recording in which the played waveform data is recorded as it is.
【0094】次に、フローチャートを用いて、上述の電
子楽器のCPU104の処理手順を説明する。Next, the processing procedure of the CPU 104 of the electronic musical instrument will be described with reference to a flowchart.
【0095】図12(a)は、CPU104の制御プロ
グラムのうちメインルーチンの処理手順を示す。この電
子楽器の電源がオンされると、まずステップ1201
で、各種の初期設定を行なう。次にステップ1202で
何らかの起動要因があるか否かチェックし、ステップ1
203で起動要因があればステップ1204に進む。起
動要因がなければ再び1202に戻る。ステップ120
4では発生している起動要因の種類を判別しそれぞれの
処理に分岐する。起動要因が鍵盤101の鍵操作イベン
トであるとき(外部からのMIDIイベントを受け付け
ることができるようになっている場合は、MIDIイベ
ント発生も同等である)は、ステップ1205の鍵盤処
理を行ない、その後再びステップ1202に戻る。起動
要因がパネルスイッチ103の操作イベントであるとき
は、ステップ1206のパネルスイッチ処理を行ない、
ステップ1202に戻る。起動要因がXフラグ314に
関するイベントであるときは、ステップ1207でフラ
グ処理を行ない、ステップ1202に戻る。起動要因が
その他の要因(例えば後述するソフト音源の波形生成ト
リガーなど)であるときは、ステップ1208でその他
の処理を行ない、ステップ1202に戻る。起動要因が
電源スイッチの操作イベントであるときは、ステップ1
204で終了処理を行なった後、処理を終了する。FIG. 12A shows the procedure of the main routine in the control program of the CPU 104. When the power of the electronic musical instrument is turned on, first, in step 1201.
Then, various initial settings are performed. Next, in step 1202, it is checked whether or not there is any activation factor.
If there is an activation factor in step 203, the process proceeds to step 1204. If there is no activation factor, the process returns to 1202 again. Step 120
In step 4, the type of the activation factor that has occurred is determined, and the process branches to each process. When the activation factor is a key operation event of the keyboard 101 (if an external MIDI event can be accepted, the occurrence of the MIDI event is also equivalent), the keyboard processing of step 1205 is performed, and thereafter, The process returns to step 1202 again. If the activation factor is an operation event of the panel switch 103, the panel switch process of step 1206 is performed, and
It returns to step 1202. If the activation factor is an event related to the X flag 314, a flag process is performed in step 1207, and the process returns to step 1202. If the activation factor is another factor (for example, a waveform generation trigger of a software sound source to be described later), other processing is performed in step 1208, and the process returns to step 1202. If the activation factor is an operation event of the power switch, step 1
After performing the termination processing in 204, the processing is terminated.
【0096】図12(b)は、図12(a)のステップ
1205の鍵盤処理のうち鍵盤101のキーオンイベン
トがあったときに実行されるキーオンイベント処理の手
順を示す。まずステップ1211で、キーオンされた鍵
のノートナンバをレジスタNNに、キーオン時のベロシ
ティをレジスタVDに、それぞれ設定する。次に、ステ
ップ1212で、発音チャンネル(第0〜第31チャン
ネル)の割り当てを行ない、割り当てたチャンネルナン
バをレジスタiに設定する。ステップ1213で、現在
設定されている音色のノートナンバNNに対応する波形
データのアドレスなどの情報を制御レジスタ(具体的に
は図3のレジスタ301や302)201に設定する。
ステップ1214では、現在設定されている音色のエン
ベロープパラメータやミキサの混合比などの設定をやは
り制御レジスタ201に対して行なう。その後、ステッ
プ1215で第iチャンネルに対しノートオン(音源1
08に対する発音指示)を送出し、既に説明したような
音源部108の楽音発生の動作を開始させる。FIG. 12B shows a procedure of a key-on event process executed when there is a key-on event of the keyboard 101 in the keyboard process of step 1205 in FIG. 12A. First, in step 1211, the note number of the key that has been turned on is set in the register NN, and the velocity at key-on is set in the register VD. Next, in step 1212, sounding channels (0th to 31st channels) are assigned, and the assigned channel numbers are set in the register i. In step 1213, information such as the address of the waveform data corresponding to the note number NN of the currently set tone is set in the control register (specifically, the registers 301 and 302 in FIG. 3) 201.
In step 1214, settings such as the currently set envelope parameter of the tone color and the mixing ratio of the mixer are also made in the control register 201. Then, in step 1215, note-on (sound source 1) for the i-th channel
08 is generated, and the tone generation operation of the tone generator 108 as described above is started.
【0097】図13(a)は、図12(a)のステップ
1206のパネルスイッチ処理のうちサンプリングスイ
ッチ(SW)がオンされたときに実行されるサンプリン
グSWイベント処理の手順を示す。ユーザは、あらかじ
め外部回路110として外部音を入力してA/D変換す
るADCを接続しておき、サンプリングを行なうときサ
ンプリングSWをオンする。サンプリングSWがオンさ
れると、まずステップ1301で、CPU104は、R
OM105、RAM106、または外部記憶装置107
などから入力波形処理用マイクロプログラムを読み出
し、信号処理回路205内のマイクロプログラムメモリ
にロードする。ここでロードするマイクロプログラム
は、例えば図10(a)のブロック1002〜1004
で説明したような処理を行なうマイクロプログラムであ
る。次に、ステップ1302で、ADC(外部回路11
0)の動作の設定およびミキサ204の混合比などの設
定を行なう。ステップ1303では、波形メモリ109
内の書き込み領域のアドレスおよびサンプル数を設定す
る。これは、図3のXAレジスタ311に書き込み領域
のアドレスを設定し、サンプル数レジスタ315に書き
込むべきサンプルの数を設定することに相当する。ステ
ップ1304では、信号処理回路205の書き込み処理
をスタートさせ、さらにADCをスタートさせる。これ
により、図10(a)で説明したようなサンプリングの
処理が実行される。FIG. 13A shows a procedure of a sampling SW event process executed when the sampling switch (SW) is turned on in the panel switch process in step 1206 of FIG. 12A. The user connects in advance an ADC for inputting an external sound and performing A / D conversion as the external circuit 110, and turns on the sampling SW when performing sampling. When the sampling SW is turned on, first, in step 1301, the CPU 104
OM 105, RAM 106, or external storage device 107
An input waveform processing microprogram is read out from, for example, and loaded into a microprogram memory in the signal processing circuit 205. The microprogram to be loaded here is, for example, blocks 1002 to 1004 in FIG.
This is a microprogram for performing the processing described above. Next, in step 1302, the ADC (external circuit 11
The setting of operation 0) and the setting of the mixing ratio of the mixer 204 are performed. In step 1303, the waveform memory 109
Set the address of the writing area and the number of samples. This corresponds to setting the address of the write area in the XA register 311 in FIG. 3 and setting the number of samples to be written in the sample number register 315. In step 1304, the writing process of the signal processing circuit 205 is started, and the ADC is further started. As a result, the sampling process described with reference to FIG.
【0098】図13(b)は、図12(a)のステップ
1206のパネルスイッチ処理のうちリサンプリングS
Wがオンされたときに実行されるリサンプリングSWイ
ベント処理の手順を示す。ユーザによりリサンプリング
SWがオンされると、まずステップ1311で、CPU
104は、ROM105、RAM106、または外部記
憶装置107などからリサンプリング用マイクロプログ
ラムを読み出し、信号処理回路205内のマイクロプロ
グラムメモリにロードする。ここでロードするマイクロ
プログラムは、例えば図10(b)および(c)で説明
したブロック1012,1013またはブロック102
2のような処理を行なうマイクロプログラムである。次
に、ステップ1312で、発音チャンネルの割り当てを
行ない割り当てたチャンネルナンバをレジスタiに設定
する。次に、ステップ1313で読み出し波形のアドレ
スを設定し、ステップ1314でエンベロープパラメー
タやミキサ204の混合比などを設定する。これは制御
レジスタ201の各種の情報を設定することに相当す
る。ステップ1315では、リサンプリングした結果の
波形データを書き込むべき波形メモリ109内のアドレ
スおよびサンプル数を設定する。これは制御レジスタ2
01のXAレジスタ311およびサンプル数レジスタ3
15を設定することに相当する。その後、ステップ13
16で信号処理回路205の書き込みをスタートし、ノ
ートオンを送出して処理を終了する。ノートオンを送出
するのは、ステップ1313で設定したアドレスから波
形データを読み出す処理を開始するためである。以上に
より、図10(b)または図10(c)に示したような
信号の流れでリサンプリングが実行される。FIG. 13B shows the resampling S in the panel switch processing in step 1206 of FIG.
The procedure of the resampling SW event process executed when W is turned on will be described. When the user turns on the resampling switch, first in step 1311, the CPU
The 104 reads a microprogram for resampling from the ROM 105, the RAM 106, the external storage device 107, or the like, and loads the resampled microprogram into the microprogram memory in the signal processing circuit 205. The microprogram to be loaded here is, for example, the block 1012 or 1013 or the block 102 described with reference to FIGS.
This is a microprogram that performs processing such as 2. Next, in step 1312, sounding channels are assigned, and the assigned channel numbers are set in the register i. Next, in step 1313, the address of the read waveform is set, and in step 1314, the envelope parameters, the mixing ratio of the mixer 204, and the like are set. This is equivalent to setting various information in the control register 201. In step 1315, an address in the waveform memory 109 to which the resampled waveform data is to be written and the number of samples are set. This is control register 2
01 XA register 311 and sample number register 3
15 is equivalent to setting. Then, step 13
At 16, the writing of the signal processing circuit 205 is started, a note-on is sent, and the process is terminated. The reason why the note-on is transmitted is to start the process of reading the waveform data from the address set in step 1313. As described above, resampling is performed in a signal flow as shown in FIG. 10B or 10C.
【0099】なお、ステップ1312で複数チャンネル
を割り当て、それらのチャンネルで読み出した楽音波形
をミキシングして所定の処理の後に波形メモリに書き込
んでもよいし(図10(b)や(c)でMIX101
1,1021に複数チャンネル出力が入力する場合)、
各チャンネルごとに所定の処理を行なった後にミキシン
グして波形メモリに書き込んでもよい(図10(b)で
複数チャンネルの各チャンネルそれぞれで1011〜1
013の処理を行ないそれらの複数系列をMIX101
4でミキシングする場合、あるいは図10(c)で複数
チャンネルの各チャンネルそれぞれで1021〜102
2の処理を行ないそれらの複数系列をMIX1023で
ミキシングする場合)。複数チャンネルをミキシングす
る場合は、各チャンネルで波形のスタート位置をずらし
てミキシングすることもできる。その場合は、ステップ
1316で、各チャンネルの波形のスタート位置のずら
し方に応じてノートオンを複数回送出する必要がある。
ただし、FIFOの書き込みスタートは1番最初のノー
トオンからである。In step 1312, a plurality of channels may be allocated, and the tone waveforms read out from these channels may be mixed and written into the waveform memory after predetermined processing (see MIX101 in FIGS. 10B and 10C).
1,1021 when multiple channel outputs are input),
After performing a predetermined process for each channel, the data may be mixed and written into the waveform memory (in FIG. 10B, 1011 to 1 for each of a plurality of channels).
013 is performed and the plurality of streams are
4 or in FIG. 10C, 1021 to 1022 for each of a plurality of channels.
(2) When a plurality of streams are mixed by the MIX 1023 by performing the processing of step 2). When mixing a plurality of channels, the mixing can be performed by shifting the start position of the waveform in each channel. In this case, note-on needs to be transmitted a plurality of times in step 1316 in accordance with how to shift the start position of the waveform of each channel.
However, the writing of the FIFO starts from the first note-on.
【0100】図14(a)は、図12(a)のステップ
1206のパネルスイッチ処理のうち波形読み出しSW
(または波形書き込みSW)がオンされたときに実行さ
れる波形読み出し(書き込み)SWイベント処理の手順
を示す。なお、波形読み出しSWイベント処理と波形書
き込みSWイベント処理とは「読み出し」と「書き込
み」とを入れ替えるだけでほとんど同様の処理であるの
で、同じ図14(a)を用いて説明する。始めに波形読
み出しSWイベント処理について説明し、次に波形書き
込みSWイベント処理について説明する。FIG. 14A shows a waveform read SW in the panel switch processing in step 1206 of FIG.
The procedure of a waveform read (write) SW event process executed when the (or waveform write SW) is turned on will be described. Note that the waveform read SW event process and the waveform write SW event process are almost the same process except that “read” and “write” are interchanged, and therefore will be described with reference to FIG. First, the waveform read SW event process will be described, and then the waveform write SW event process will be described.
【0101】波形読み出しSWイベント処理では、まず
ステップ1401で、波形メモリ109内の読み出し領
域のアドレスおよび読み出すサンプル数をXAレジスタ
311およびサンプル数レジスタ315に設定する。次
にステップ1402で、波形メモリ109から読み出し
たデータを書き込むべきRAM106内の書き込み領域
のアドレスを設定する。次にステップ1403で、CP
U104は、図3のXアクセス回路304に読み出しス
タートを指示して(ステップ1404は波形書き込みS
Wイベント処理のときのみ使用)、処理を終了する。以
上により、先述したXアクセス処理が開始され、楽音波
形の生成と平行して波形メモリ109からの波形データ
が図3のFIFO313に順次読み出されてくるので、
CPU104は後述するXフラグ読み出しイベント処理
(図14(b))によりFIFO313のデータを取り
出す。このような波形データの読み出し処理は、サンプ
リングやリサンプリングで波形メモリに書き込んだ波形
データを読み出して外部記憶装置に格納(リアルタイム
・ハードディスク・レコーディング)したり、読み出し
た波形にCPUで加工を施して再び波形メモリに書き込
む場合などに用いる。In the waveform read SW event processing, first, in step 1401, the address of the read area in the waveform memory 109 and the number of samples to be read are set in the XA register 311 and the sample number register 315. Next, in step 1402, an address of a write area in the RAM 106 to which data read from the waveform memory 109 is to be written is set. Next, at step 1403, the CP
U104 instructs the X access circuit 304 of FIG. 3 to start reading (step 1404 is a waveform writing S
Used only for W event processing), and terminates the processing. As described above, the X access processing described above is started, and the waveform data from the waveform memory 109 is sequentially read out to the FIFO 313 in FIG. 3 in parallel with the generation of the musical tone waveform.
The CPU 104 extracts the data of the FIFO 313 by an X flag read event process (FIG. 14B) described later. Such reading processing of the waveform data is performed by reading the waveform data written in the waveform memory by sampling or resampling and storing it in an external storage device (real-time hard disk recording), or processing the read waveform by a CPU. Used when writing to the waveform memory again.
【0102】波形書き込みSWイベント処理では、まず
ステップ1401で、波形メモリ109内の書き込み領
域のアドレスおよび書き込むサンプル数をXAレジスタ
311およびサンプル数レジスタ315に設定する。次
にステップ1402で、波形メモリ109に書き込むべ
き波形データが用意されているRAM106内の読み出
し領域のアドレスを設定する。次にステップ1403
で、CPU104は、図3のXアクセス回路304に書
き込みスタートを指示する。またステップ1404で、
前準備としてRAM106内の読み出し領域の最初の8
サンプルを読み出してFIFO313に書き込んで、処
理を終了する。以上により、先述したXアクセス処理が
開始され、楽音波形の生成と平行して図3のFIFO3
13の波形データが波形メモリ109の書き込み領域に
書き込まれるので、CPU104は後述するXフラグ書
き込みイベント処理(図14(c))によりFIFO3
13に波形データを書き込む。このような波形データの
書き込みは、外部記憶装置の波形データを波形メモリに
書き込んだり、読み出した波形にCPUで加工を施して
再び波形メモリに書き込む場合などに用いる。また、後
述するソフト音源における波形書き込みでも用いる。さ
らに、波形メモリ上にバッファ領域を設け、発音チャン
ネルによる該バッファ領域の波形データのループ再生を
しつつ、該領域に外部記憶装置の波形データを順次供給
すれば、外部記憶装置に記憶された長時間波形データの
ダイレクト再生も可能である。In the waveform write SW event process, first, in step 1401, the address of the write area in the waveform memory 109 and the number of samples to be written are set in the XA register 311 and the sample number register 315. Next, in step 1402, the address of the read area in the RAM 106 where the waveform data to be written in the waveform memory 109 is prepared is set. Next, step 1403
Then, the CPU 104 instructs the X access circuit 304 in FIG. 3 to start writing. In step 1404,
The first 8 of the read area in the RAM 106 as preparation
The sample is read out and written into the FIFO 313, and the process ends. As described above, the X access processing described above is started, and in parallel with the generation of the musical tone waveform, the FIFO3 of FIG.
13 is written to the write area of the waveform memory 109, and the CPU 104 performs FIFO flag write event processing (FIG. 14C) described below to execute FIFO3.
13 is written with waveform data. Such writing of the waveform data is used when writing the waveform data in the external storage device to the waveform memory, or processing the read waveform by the CPU and writing the processed waveform again into the waveform memory. It is also used for writing a waveform in a software sound source to be described later. Further, by providing a buffer area on the waveform memory and sequentially supplying the waveform data of the external storage device to the area while performing loop reproduction of the waveform data of the buffer area by the tone generation channel, the length stored in the external storage device is obtained. Direct reproduction of time waveform data is also possible.
【0103】図14(b)は、図12(a)のステップ
1207のフラグ処理のうちXフラグ読み出しイベント
処理の手順を示す。これは、CPU104による波形メ
モリ109からの読み出し処理がスタートしていた場合
(図14(a)の波形読み出しSWイベント処理が実行
されていた場合)においてXフラグがオンである(すな
わち波形メモリ109から読み出したデータがFIFO
313に存在する)ときに実行される処理である。まず
ステップ1411で、FIFO313にセットされてい
る波形データを読み出して、RAM106の書き込み領
域に書き込む。次にステップ1412で、サンプル数レ
ジスタ315のサンプル数と実際に波形メモリ109か
ら読み出してRAM106に書き込んだ波形サンプルの
数とを比較することにより読み出しが終了かどうかを判
定する。読み出し終了に至ったときは、ステップ141
3で、CPU104は読み出しストップ処理を行ない処
理を終了する。ステップ1412で未だ終了に至ってい
ないときは処理を継続する。ステップ1412の読み出
しストップ処理は、図14(a)の波形読み出しSWイ
ベント処理で設定された読み出し処理の状態を解除する
処理である。FIG. 14B shows the procedure of the X flag read event process in the flag process of step 1207 in FIG. 12A. This is because the X flag is ON when the reading process from the waveform memory 109 by the CPU 104 is started (when the waveform reading SW event process of FIG. Read data is FIFO
313). First, in step 1411, the waveform data set in the FIFO 313 is read and written in the write area of the RAM 106. Next, in step 1412, it is determined whether the reading is completed by comparing the number of samples in the sample number register 315 with the number of waveform samples actually read from the waveform memory 109 and written into the RAM 106. When the reading is completed, step 141
In 3, the CPU 104 performs a read stop process and ends the process. If the processing has not been completed yet in step 1412, the processing is continued. The read stop process in step 1412 is a process for releasing the state of the read process set in the waveform read SW event process in FIG.
【0104】図14(c)は、図12(a)のステップ
1207のフラグ処理のうちXフラグ書き込みイベント
処理の手順を示す。これは、CPU104による波形メ
モリ109への書き込み処理がスタートしていた場合
(図14(a)の波形書き込みSWイベント処理が実行
されていた場合)においてXフラグがオンである(すな
わちFIFO313に空きがある)ときに実行される処
理である。まずステップ1421で、RAM106の読
み出し領域から次に書き込むべき波形データを読み出し
てFIFO313の空き領域に書き込む。次にステップ
1422で、サンプル数レジスタ315のサンプル数と
実際にRAM106からFIFO313に書き込んだ波
形サンプルのサンプル数とを比較し、書き込むべきサン
プル数をすべて書き込んだか否かを判定する。すべての
データを書き込んだときは終了ということであるから、
ステップ1423で、CPU104は書き込みストップ
処理を行ない処理を終了する。ステップ1422で未だ
終了条件が満たされていないときは処理を継続する。ス
テップ1423の書き込みストップ処理により、FIF
O313に残っているデータが波形メモリ109へ書き
込まれる。FIG. 14C shows a procedure of an X flag write event process in the flag process of step 1207 of FIG. 12A. This is because the X flag is ON when the CPU 104 has started the writing process to the waveform memory 109 (when the waveform writing SW event process of FIG. 14A has been executed) (that is, when the FIFO 313 has an empty space). This is a process that is executed at some time. First, in step 1421, waveform data to be written next is read from the read area of the RAM 106 and written to a free area of the FIFO 313. Next, in step 1422, the number of samples in the sample number register 315 is compared with the number of waveform samples actually written from the RAM 106 to the FIFO 313, and it is determined whether all the samples to be written have been written. When all the data has been written, it means the end.
In step 1423, the CPU 104 performs a write stop process and ends the process. If the termination condition has not been satisfied in step 1422, the processing is continued. By the write stop processing of step 1423,
The data remaining in O313 is written to the waveform memory 109.
【0105】以上説明したこの実施の形態の電子楽器に
よれば、サンプルバッファを備えているため、チャンネ
ル発音に使用されない余り時間が生じるので、該余り時
間のタイムスロットを用いて、チャンネル発音以外の目
的で波形メモリアクセス(例えば、CPUアクセスやミ
キサから戻ってくる波形データの書き込みなど)を発音
中に行なうことができる。特に、波形メモリ109のア
クセス状況を検出する機能を持つXアクセス回路304
が備えられているのでので、CPU104は、Xフラグ
314を参照してそれがオンのときはどんどんデータの
読み書きができ発音中であっても高速なアクセスが可能
になる。さらに、Xアクセス処理のバッファとしてFI
FO313が備えられているので、アクセスは非常に高
速で行なえる。なお、CPU104からXフラグ314
を参照してそれがオンのときにデータを読み書きする処
理は、上記実施の形態では割り込みを用いずにCPU1
04のループ処理中で行なっているが、割り込みを用い
て実行するようにしてもよい。すなわち、FIFO31
3に空きがある(CPUからの書き込み時)、またはF
IFO313に読み出しデータがある(CPUによる読
み出し時)とき、割り込みでそれをCPU104に知ら
せ、それに応じてCPU104がFIFO313にアク
セスに行くようにしてもよい。According to the electronic musical instrument of this embodiment described above, since the sample buffer is provided, a surplus time not used for sounding the channel is generated. For the purpose, waveform memory access (for example, CPU access or writing of waveform data returned from the mixer) can be performed during sound generation. In particular, the X access circuit 304 having a function of detecting the access status of the waveform memory 109
Is provided, the CPU 104 refers to the X flag 314, and when it is on, can read and write data more and more and can access at high speed even during sound generation. Further, FI is used as a buffer for X access processing.
Since the FO 313 is provided, access can be performed at a very high speed. Note that the X flag 314 is sent from the CPU 104.
The process of reading and writing data when it is on with reference to
Although the processing is performed during the loop processing of step 04, the processing may be performed using an interrupt. That is, the FIFO 31
3 has free space (when writing from CPU) or F
When there is read data in the IFO 313 (during reading by the CPU), it may be notified to the CPU 104 by an interrupt, and the CPU 104 may access the FIFO 313 accordingly.
【0106】また、この実施の形態の電子楽器によれ
ば、波形メモリアクセスをチャンネルタイミングと独立
にしているので、アクセス回数に制限を加えるときに下
記のような利点がある。すなわち、発音数が少なけれ
ば、該制限による影響は無く、発音しているチャンネル
はすべて高次の補間(上記の例では4点補間)を実行で
きる。発音数が多くなり、アクセス回数が制限に引っ掛
かるようになると、全発音数のうちの一部のチャンネル
の補間次数を落として、補間次数は落ちるものの発音数
を減らさずに済ませることができる。According to the electronic musical instrument of this embodiment, since the waveform memory access is made independent of the channel timing, there are the following advantages when the number of accesses is limited. In other words, if the number of sounds is small, there is no effect of the limitation, and all the sounding channels can execute higher-order interpolation (four-point interpolation in the above example). When the number of sounds increases and the number of times of access becomes restricted, it is possible to reduce the interpolation order of some channels of the total number of sounds and to reduce the number of sounds although the interpolation order is reduced.
【0107】さらに、この実施の形態の電子楽器では、
波形メモリのアクセス回数を合計値で管理しているの
で、例えば、Xアクセスの要求として、全アクセス時間
の1/3使用したい、あるいは1/4使用したい、とい
うような場合に、アクセス制御が非常に簡単に行なえ
る。Further, in the electronic musical instrument of this embodiment,
Since the number of accesses to the waveform memory is managed by the total value, access control is extremely difficult when, for example, a request for X access requires use of 1/3 or 1/4 of the total access time. Easy to do.
【0108】この実施の形態の電子楽器によれば、DS
Pをサンプリングやリサンプリングの処理に兼用するよ
うにしているので、装置構成をそれ程複雑にすることな
く、外部から入力した楽音のサンプリングや既に波形メ
モリに格納されている波形データを読み出してエフェク
ト付与などの処理を施した後に再度波形メモリに書き込
むリサンプリングを行なうことができる。DSPでは効
果付与などの再生用の波形処理とサンプリングやリサン
プリングなどの録音用の波形処理とを並列に行なうこと
ができるので、再生と録音とを並行して実施できる。According to the electronic musical instrument of this embodiment, DS
Since P is also used for sampling and resampling processing, it is possible to add effects by sampling externally input musical tones or reading waveform data already stored in the waveform memory without complicating the device configuration. After performing such processing, resampling for writing to the waveform memory can be performed again. In the DSP, the waveform processing for reproduction, such as effect addition, and the waveform processing for recording, such as sampling and resampling, can be performed in parallel, so that reproduction and recording can be performed in parallel.
【0109】なお、上記波形メモリのアクセス動作(処
理Bおよび取り込み処理)を、各時分割チャンネルのタ
イミング(固定)の中で行なうようにしてもよい。この
場合、すべての発音チャンネルについて、1チャンネル
当たり4つのアクセススロットがあるので、その中で各
発音チャンネルは0回〜4回のサンプル読み出しと、残
りのスロットで4回〜0回のXアクセスを行なうように
する。The access operation (process B and capture process) of the waveform memory may be performed during the timing (fixed) of each time-division channel. In this case, since there are four access slots per channel for all sounding channels, each sounding channel performs 0 to 4 sample readings and 4 to 0 X accesses in the remaining slots. Do it.
【0110】また、前半区間および後半区間の各64ア
クセスを、処理B(ないし取り込み処理)とXアクセス
処理でどのように分配したら良いかに関しては、上記の
例では、優先フラグ303で、1回のXアクセスを優先
するようにしている。しかし、2アクセス以上優先させ
たい場合もある。例えば、外部記憶手段から波形メモリ
に波形データを転送したり、逆に波形メモリの波形デー
タを外部記憶手段に転送するときは、該外部記憶手段の
データ転送速度に応じて転送を行なうのが効率が良い。
その速度を達成するために必要なXアクセスの回数を優
先にするのがよい。その他の場合でも、波形データをや
り取りする相手の要求速度や最適速度に合わせて、Xア
クセスの優先回数を任意に設定できるようにすればよ
い。Regarding how to distribute the 64 accesses of the first half section and the second half section by the processing B (or the fetch processing) and the X access processing, in the above example, once the priority flag 303 indicates X access is prioritized. However, there are cases where it is desired to give priority to two or more accesses. For example, when transferring the waveform data from the external storage means to the waveform memory, or when transferring the waveform data from the waveform memory to the external storage means, it is efficient to perform the transfer according to the data transfer rate of the external storage means. Is good.
It is better to give priority to the number of X accesses required to achieve the speed. In other cases, the number of times of priority of the X access may be arbitrarily set in accordance with the requested speed and the optimum speed of the other party who exchanges the waveform data.
【0111】次に、この実施の形態の電子楽器におい
て、CPU104によりソフトウェア音源(以下、ソフ
ト音源と呼ぶ)を実現する例について説明する。ソフト
音源とは、CPU104で所定のソフトウェアを実行し
て楽音波形を生成するものである。CPU104で生成
した楽音波形は、音源部108の所定のチャンネルを用
いて放音する。Next, an example in which a software sound source (hereinafter, referred to as a software sound source) is realized by the CPU 104 in the electronic musical instrument of this embodiment will be described. The soft sound source generates a musical sound waveform by executing predetermined software in the CPU 104. The musical tone waveform generated by the CPU 104 is emitted using a predetermined channel of the sound source unit 108.
【0112】なお、ソフト音源はCPU104がROM
105の楽音生成ソフトウェアを実行することにより実
現されるが、該ソフト音源を利用する側から見ると、楽
音生成ソフトウェアをドライバとして登録しておき、該
ドライバを起動した後、所定のソフト音源に係るAPI
(Application Program Interface)に各種演奏入力を
表わすMIDI(Musical Instruments digital Interf
ace)イベントメッセージを出力して楽音生成に関する
各種の処理をソフト音源に行なせる、という手順にな
る。CPU104は汎用の演算処理装置であり、該AP
Iに対して演奏入力を与える処理、すなわちMIDIイ
ベントを該APIに出力する処理など、ソフト音源とは
別の処理も行なっている。CPU104が該APIに対
して演奏入力を与える処理とは、例えば、鍵盤101の
操作に応じてリアルタイムで発生する演奏入力を該AP
Iに出力したり、外部MIDI機器からリアルタイムで
入力したMIDIイベントに応じた演奏入力を該API
に出力したり、RAM106上にMIDIイベントのシ
ーケンスを用意しておき(外部記憶装置107上にある
データを用いてもよい)これを順次演奏入力として該A
PIに出力したり、といった処理である。Note that the software sound source is stored in the ROM by the CPU 104.
The tone generation software is realized by executing the tone generation software 105. From the viewpoint of using the software tone generator, the tone generation software is registered as a driver, and after the driver is started, a predetermined software tone source is executed. API
MIDI (Musical Instruments digital Interface) representing various performance inputs in the (Application Program Interface)
ace) The procedure is to output an event message and perform various processes related to musical sound generation on the software sound source. The CPU 104 is a general-purpose arithmetic processing unit.
A process different from the software sound source is also performed, such as a process of giving a performance input to I, that is, a process of outputting a MIDI event to the API. The process in which the CPU 104 provides a performance input to the API includes, for example, a performance input generated in real time in response to an operation of the keyboard 101.
I or a performance input corresponding to a MIDI event input in real time from an external MIDI device.
Or a sequence of MIDI events is prepared on the RAM 106 (the data on the external storage device 107 may be used).
This is processing such as outputting to a PI.
【0113】図16を参照して、ソフト音源の楽音生成
原理を説明する。図16において、S1〜S4の各区間
は、所定のサンプル数(例えば、128サンプル)分の
再生を行なう単位となる時間フレームを示す。「演奏入
力」のライン上に記載してある下向き矢印は、その時刻
で演奏入力があったことを示す。演奏入力とは、ソフト
音源に係るAPI(Application Program Interface)
に、ノートオン、ノートオフ、アフタタッチ、プログラ
ムチェンジなどの各種のMIDIイベントが入力される
ことである。図16の例では、フレームS1で3つ、S
2で2つ、S3で1つの演奏入力がそれぞれあったとい
うことである。ソフト音源は、複数チャンネル分の複数
楽音を同時生成可能であり、RAM106上に用意され
る複数チャンネル分のソフト音源レジスタで各楽音を制
御するようになっている。ソフト音源は、演奏入力とし
てノートオンイベント(例えば鍵盤101の鍵のノート
オン)を入力したときは、ソフト音源レジスタに関して
発音割り当てを行ない、割り当てたチャンネルに対応す
るソフト音源レジスタに該チャンネルの発音を制御する
各種のデータとノートオンを書き込む。演奏入力として
ノートオフイベントを入力したときは、該当するチャン
ネルに対応するソフト音源レジスタにノートオフを書き
込む。ノートオンやノートオフ以外の演奏入力(例えば
アフタタッチの変更など)についても同様に、該当する
チャンネルに対応するソフト音源レジスタに演奏入力に
応じたデータを書き込む。ある時間フレームでソフト音
源レジスタに書込まれたデータは、データの種類にかか
わりなく、必ず次の時間フレームから波形生成演算に使
用される。Referring to FIG. 16, the principle of generating a musical tone of a soft sound source will be described. In FIG. 16, each section of S1 to S4 indicates a time frame as a unit for performing reproduction of a predetermined number of samples (for example, 128 samples). A downward arrow written on the line of “performance input” indicates that a performance input was made at that time. Performance input means API (Application Program Interface) related to software sound source
, Various MIDI events such as note-on, note-off, after-touch, and program change. In the example of FIG. 16, three frames S1 and S3
2 means that there were two performance inputs, and S3 that there was one performance input. The soft tone generator can simultaneously generate a plurality of musical tones for a plurality of channels, and each tone is controlled by a soft tone generator register for a plurality of channels prepared on the RAM 106. When a note-on event (for example, note-on of a key on the keyboard 101) is input as a performance input, the soft tone generator assigns a tone to the soft tone generator register, and assigns the sound of the channel to the soft tone generator register corresponding to the assigned channel. Write various data to be controlled and note-on. When a note-off event is input as a performance input, note-off is written to the software tone generator register corresponding to the corresponding channel. Similarly, for performance inputs other than note-on and note-off (for example, aftertouch change), data corresponding to the performance input is written to the software tone generator register corresponding to the corresponding channel. The data written to the software tone generator register in a certain time frame is always used for the waveform generation calculation from the next time frame regardless of the type of data.
【0114】図16の「CPUによる波形生成」の矩形
1601〜1604は、CPU104により波形生成演
算を実行する区間を示す。この波形生成演算では、ソフ
ト音源レジスタに設定された複数チャンネル分のデータ
に基づいて複数チャンネル分の楽音波形生成を行なう。
演奏入力に応じてソフト音源レジスタが書き換えられ、
一方、演奏入力のない期間は、ソフト音源レジスタは過
去に書込まれたデータを保持している。したがって、各
波形生成の区間1601〜1604では、直前あるいは
さらに前のフレームで検出した演奏入力に応じた波形生
成演算を実行することになる。フレームが切り替わるタ
イミングでフレーム割り込みが発生するので、各フレー
ムでの波形生成演算はこのフレーム割り込みを契機とし
て(後述の図15(b))実行される。Rectangles 1601 to 1604 of “Waveform generation by CPU” in FIG. 16 indicate sections in which the CPU 104 executes a waveform generation operation. In this waveform generation calculation, a tone waveform for a plurality of channels is generated based on data for a plurality of channels set in a software tone generator register.
The software tone generator register is rewritten according to the performance input,
On the other hand, during the period when there is no performance input, the software tone generator register holds data written in the past. Accordingly, in each of the waveform generation sections 1601 to 1604, a waveform generation calculation corresponding to the performance input detected in the immediately preceding or further previous frame is executed. Since a frame interrupt occurs at the timing of switching frames, the waveform generation calculation in each frame is executed with this frame interrupt as a trigger (FIG. 15B described later).
【0115】例えば、フレームS1で検出された3つの
演奏入力に対しては、次のフレームS2の先頭のフレー
ム割り込みを契機として区間1602で波形生成演算を
行なう。CPU104は、この波形生成演算により、R
AM106上に波形データを生成する。生成した波形デ
ータは、当該フレームの残りの時間区間を用いて波形メ
モリ109上に用意されているバッファ領域に書き込
む。このバッファ領域としては、連続したアドレスに用
意された同じ大きさの2つのバッファ領域PB0とPB
1(2つをまとめてダブルバッファと呼ぶ)を用いる。
バッファ領域への書き込みは、上述したXアクセス処理
(特にCPU104から波形メモリ109への書き込み
処理)によって行なう。また、フレーム毎にバッファP
B0とPB1とを交互に用いるようにする。例えば、フ
レームS1の区間1601で生成した波形データは次の
フレームの開示時点までにRAM106から波形メモリ
109上のバッファ領域PB0に書き込み、フレームS
2の区間1602で生成した波形データはバッファ領域
PB1に書き込み、フレームS3の区間1603で生成
した波形データはバッファ領域PB0に書き込み、フレ
ームS4の区間1604で生成した波形データはバッフ
ァ領域PB1に書き込み、…というように、交互にPB
0とPB1に波形データを書き込む。For example, with respect to three performance inputs detected in the frame S1, a waveform generation operation is performed in a section 1602 triggered by an interruption of the first frame of the next frame S2. The CPU 104 calculates R
Waveform data is generated on the AM 106. The generated waveform data is written into a buffer area prepared on the waveform memory 109 using the remaining time section of the frame. As this buffer area, two buffer areas PB0 and PB0 of the same size prepared at consecutive addresses are used.
1 (the two are collectively called a double buffer).
Writing to the buffer area is performed by the above-described X access processing (particularly, writing processing from the CPU 104 to the waveform memory 109). In addition, the buffer P
B0 and PB1 are used alternately. For example, the waveform data generated in the section 1601 of the frame S1 is written from the RAM 106 to the buffer area PB0 on the waveform memory 109 by the time of disclosure of the next frame,
The waveform data generated in the section 1602 of the frame 2 is written in the buffer area PB1, the waveform data generated in the section 1603 of the frame S3 is written in the buffer area PB0, and the waveform data generated in the section 1604 of the frame S4 is written in the buffer area PB1. ... PB alternately
Write waveform data to 0 and PB1.
【0116】バッファPB0およびPB1に書き込んだ
波形データの読み出し再生は、図16の「読み出し再
生」に示すように、フレーム割り込みを契機として、波
形生成したフレームの次のフレームの区間で行なう。す
なわち、フレームS1で生成しPB0に書き込んだ波形
データは次のフレームS2で、フレームS2で生成しP
B1に書き込んだ波形データは次のフレームS3で、フ
レームS3で生成しPB0に書き込んだ波形データは次
のフレームS4で、…というように、PB0とPB1の
波形データを交互に読み出し再生していく。The reading and reproducing of the waveform data written in the buffers PB0 and PB1 are performed in the section of the frame next to the frame in which the waveform is generated, triggered by the frame interruption, as shown in "Reading and reproducing" in FIG. That is, the waveform data generated in frame S1 and written in PB0 is the next frame S2, and the waveform data generated in frame S2 is PB0.
The waveform data written in B1 is in the next frame S3, the waveform data generated in frame S3 and written in PB0 is in the next frame S4, and so on, and the waveform data of PB0 and PB1 are alternately read and reproduced. .
【0117】図15(a)は、図12(a)のステップ
1206のパネルスイッチ処理のうちソフト音源スター
トSWがオンされたときに実行されるソフト音源スター
トSWイベント処理の手順を示す。ユーザによりソフト
音源スタートSWがオンされると、まずステップ150
1で、ソフト音源で生成した楽音波形を発音するために
用いる発音チャンネル(第0〜第31チャンネル)の割
り当てを行ない、割り当てたチャンネルナンバをレジス
タiに設定する。次に、ステップ1502で、音源部1
08に対して、当該チャンネルiによりダブルバッファ
領域PB0,PB1のループ読み出し再生を行なうよう
に設定する。これは、図16の「読み出し再生」で示し
たように、フレーム割り込みごとにバッファPB0とP
B1とを交互に読み出し再生するように、音源部108
に指示情報を送出して設定する処理である。具体的に
は、ダブルバッファ領域PB0,PB1は連続したアド
レスに用意された同じサイズのバッファ領域であるの
で、領域PB0の先頭アドレスをループのスタートアド
レス(絶対アドレスWA)として設定し、さらに(領域
PB1の末尾アドレス)から(領域PB0の先頭アドレ
ス)を引き算した値をループサイズ(相対アドレスLP
A)として設定し、相対アドレスASを0に設定すれ
ば、ループ読み出しによりPB0〜PB1の領域が繰り
返し読み出される。ステップ1503では、エンベロー
プパラメータやミキサの混合比などの設定を行なう。な
お、ここで設定されるエンベロープパラメータは、単に
ループ読み出しのフェードイン/フェードアウトをする
のに使うだけで、発生する楽音のエンベロープ(楽音音
量の時間的変化)を制御するのではない。ミキサの混合
比も、1楽音の混合比ではなく、ソフト音源で生成した
複数楽音の混合波形の出力先を制御する混合比である。FIG. 15A shows the procedure of the soft sound source start SW event processing executed when the soft sound source start SW is turned on in the panel switch processing in step 1206 of FIG. 12A. When the soft sound source start SW is turned on by the user, first, at step 150
In step 1, a sounding channel (0th to 31st channels) used for sounding a tone waveform generated by a soft sound source is assigned, and the assigned channel number is set in a register i. Next, in step 1502, the sound source unit 1
08 is set so that loop reading and reproduction of the double buffer areas PB0 and PB1 are performed by the channel i. This means that the buffers PB0 and PB0 are
B1 so as to alternately read and reproduce them.
This is a process for sending and setting instruction information to the user. Specifically, since the double buffer areas PB0 and PB1 are buffer areas of the same size prepared at consecutive addresses, the start address of the area PB0 is set as the start address (absolute address WA) of the loop, and The value obtained by subtracting (the start address of the area PB0) from the end address of the PB1 is defined as the loop size (relative address LP).
If it is set as A) and the relative address AS is set to 0, the area of PB0 to PB1 is repeatedly read by loop reading. In step 1503, settings such as an envelope parameter and a mixing ratio of a mixer are performed. It should be noted that the envelope parameters set here are merely used for fading in / out of the loop reading, and do not control the envelope of the generated musical sound (temporal change of the musical sound volume). The mixing ratio of the mixer is not a mixing ratio of one musical tone but a mixing ratio for controlling an output destination of a mixed waveform of a plurality of musical tones generated by a soft sound source.
【0118】次に、ステップ1504で、CPU104
で生成した楽音波形を始めに書き込む書き込み領域を波
形メモリ109内のバッファPB0とするため、図3の
XAレジスタ311に初期値としてバッファPB0の先
頭アドレスを設定し、サンプル数レジスタ315にサン
プル数としてバッファPB0の容量(上記ループサイズ
LPAの1/2)を設定する。ステップ1505で、C
PU104は、波形メモリ109への書き込み処理(X
アクセス処理)の前準備を行ない、ダブルバッファPB
0,PB1をゼロクリアする。ステップ1506で、当
該チャンネルiにノートオンを送出し、図16で説明し
た所定時間間隔のフレーム割り込みを開始させ、処理を
終了する。なお、フレーム割り込みは、バッファPB0
およびPB1をループ読み出しする際のリターン発生時
(すなわちPB1の再生終了時)と、ループ読み出しの
中間点(LPA/2)通過時(すなわちPB0の再生終
了時)に発生する。図示していないが、フレーム割り込
みを発生する割り込み発生回路が音源108の内部に設
けられている。割り込みの代わりに、CPUが「読み出
し再生」用に設定した発音チャンネルのアドレス現在値
をチェックしてフレームの変わるタイミングを検出する
ようにしてもよい。Next, at step 1504, the CPU 104
In order to initially write the musical tone waveform generated in the above as the buffer PB0 in the waveform memory 109, the starting address of the buffer PB0 is set as an initial value in the XA register 311 in FIG. The capacity of the buffer PB0 (1/2 of the loop size LPA) is set. In step 1505, C
The PU 104 performs a write process (X
Preparing for access processing), double buffer PB
0, PB1 is cleared to zero. In step 1506, a note-on is sent to the channel i, a frame interrupt at a predetermined time interval described with reference to FIG. 16 is started, and the process ends. Note that the frame interrupt is sent to the buffer PB0.
This occurs when a return occurs during loop reading of PB1 and PB1 (that is, at the end of reproduction of PB1), and when a loop read intermediate point (LPA / 2) passes (that is, at the end of reproduction of PB0). Although not shown, an interrupt generation circuit for generating a frame interrupt is provided inside the sound source 108. Instead of the interruption, the CPU may check the current value of the address of the tone generation channel set for “reading and reproducing” to detect the timing at which the frame changes.
【0119】図15(b)は、図16で説明した所定時
間の時間フレームごとに発生するフレーム割り込みで実
行するフレーム割り込み処理の手順を示す。フレーム割
り込みが発生すると、まずステップ1511で、現在ソ
フト音源レジスタに設定されている演奏入力に対応する
楽音波形をRAM106上に生成する。これは、図16
において各フレーム割り込みごとに実行する波形生成演
算1601〜1604に相当する。次に、ステップ15
12で該生成した楽音波形を書き込むべき波形メモリ1
09内の書き込み領域のアドレス(PB0またはPB1
の先頭アドレス)および書き込むサンプル数(ループサ
イズLPAの1/2)をXAレジスタ311およびサン
プル数レジスタ315に設定する。図16で説明したよ
うに、この書き込み領域としてはバッファ領域PB0と
PB1とを交互に用いる。次にステップ1513で、C
PU104は、図3のXアクセス回路304に書き込み
スタートを指示する。またステップ1514で、前準備
として楽音波形の最初の8サンプルをFIFO313に
書き込んで、処理を終了する。この後、Xアクセス処理
によりFIFO313のデータが波形メモリに書き込ま
れる毎に(Xフラグが1になって)、図14(c)の処
理と同じような処理により、残りの楽音波形サンプルが
順次FIFOに供給される。FIG. 15B shows a procedure of a frame interrupt process executed by a frame interrupt generated for each time frame of the predetermined time described with reference to FIG. When a frame interrupt occurs, first, in step 1511, a tone waveform corresponding to the performance input currently set in the software tone generator register is generated on the RAM 106. This is shown in FIG.
Corresponds to the waveform generation operations 1601 to 1604 executed for each frame interrupt. Next, step 15
12 is a waveform memory 1 in which the generated tone waveform is to be written.
09 (PB0 or PB1)
) And the number of samples to be written (1 / of the loop size LPA) are set in the XA register 311 and the sample number register 315. As described with reference to FIG. 16, the buffer areas PB0 and PB1 are used alternately as the write area. Next, in step 1513, C
The PU 104 instructs the X access circuit 304 in FIG. 3 to start writing. In step 1514, the first eight samples of the musical sound waveform are written into the FIFO 313 as preparation, and the process ends. Thereafter, every time the data of the FIFO 313 is written to the waveform memory by the X access processing (X flag is set to 1), the remaining musical tone waveform samples are sequentially transferred to the FIFO memory by the processing similar to the processing of FIG. Supplied to
【0120】以上により、先述したXアクセス処理が開
始され、ステップ1511で生成した楽音波形が波形メ
モリ109のバッファ領域PB0またはPB1に書き込
まれる。一方、図15(a)の処理により、図16の
「読み出し再生」に示したようにダブルバッファPB0
とPB1とを交互に読出し再生する処理が開始している
ので、後は図15(b)のようにフレーム割り込みごと
に楽音波形を生成してダブルバッファに書き込めば、そ
の楽音波形が第iチャンネルで発音される。このソフト
音源で発生した楽音は第iチャンネルでミキサ204に
入力するので、上述したように、この楽音に対して信号
処理回路205や外部回路110で効果付与などの信号
処理を施してDAC112に出力したり再び波形メモリ
109に書き込むようにもできる。As described above, the aforementioned X access processing is started, and the musical tone waveform generated in step 1511 is written into the buffer area PB0 or PB1 of the waveform memory 109. On the other hand, according to the process of FIG. 15A, the double buffer PB0
Since the process of alternately reading and reproducing PB1 and PB1 has been started, a tone waveform is generated for each frame interrupt and written in the double buffer as shown in FIG. 15B. Pronounced as The tone generated by the soft tone generator is input to the mixer 204 on the i-th channel. Or write it back to the waveform memory 109.
【0121】また、この第iチャンネルにおけるダブル
バッファPB0とPB1の読み出し処理のFナンバ(図
3の処理Aで用いたピッチPITCH)を調整すること
により、再生ピッチを調整することができ、いわゆるオ
ーバサンプリングを行なうこともできる。例えば、ソフ
ト音源で生成した楽音波形を出力する音源部108の第
iチャンネルは48kHzのサンプリング周波数で動作
するようにし、CPU104はサンプリング周波数24
kHzで楽音波形を生成する場合、第iチャンネルのF
ナンバを0.5に設定すればよい。この場合は、補間回
路326で48kHzのサンプリング周波数でも折り返
しノイズが発生しないように高調波部分をカットして補
間が行なわれる。Also, by adjusting the F number (the pitch PITCH used in the process A of FIG. 3) of the reading process of the double buffers PB0 and PB1 in the i-th channel, the reproduction pitch can be adjusted. Sampling can also be performed. For example, the i-th channel of the tone generator 108 for outputting a musical tone waveform generated by a soft tone generator operates at a sampling frequency of 48 kHz, and the CPU 104
When generating a tone waveform at kHz, the F-th channel
The number may be set to 0.5. In this case, interpolation is performed by the interpolation circuit 326 by cutting off higher harmonic portions so that aliasing noise does not occur even at a sampling frequency of 48 kHz.
【0122】従来のソフト音源では、図16に示したよ
うな読み出し再生のためにサンプリング周期ごとにCP
Uに割り込みをかけて、その割り込みごとにCPUが生
成した楽音波形を音源部にDMA転送するというような
ことを行なっていたので、CPUに対して割り込みが頻
繁にかかっていた。この実施の形態のソフト音源では、
CPU104はフレーム割り込みごとの処理を行なえ
ば、あとはXアクセス処理で自動的に波形メモリ109
に書き込んで再生してくれるので、CPUに対する割り
込み処理が削減できるという効果がある。In a conventional soft tone generator, a CP is used every sampling cycle for reading and reproducing as shown in FIG.
U was interrupted, and the tone waveform generated by the CPU was DMA-transferred to the tone generator unit for each interrupt. Therefore, the CPU was frequently interrupted. In the soft sound source of this embodiment,
When the CPU 104 performs the processing for each frame interrupt, the CPU 104 automatically performs the X access processing thereafter.
Since the data is reproduced by writing to the CPU, the interrupt processing for the CPU can be reduced.
【0123】なお、ソフト音源の機能を用いる場合は、
図16で説明したように所定のフレームの区間における
演奏入力を保持しておく必要があるので、キーオンイベ
ント処理は、図12(b)の代わりに、発生したキーオ
ンイベントを記憶しておく処理を行なうようにする。When using the function of the software sound source,
As described with reference to FIG. 16, it is necessary to hold the performance input in the section of the predetermined frame. Do it.
【0124】図17は、図3のXアクセス回路304の
変形例を示す。図3のXAレジスタ311をXA1レジ
スタ1701、XA2レジスタ1702、およびセレク
タ1703に置き換え、図3のセレクタ312およびF
IFO313をFIFO1704、ラッチ1705、お
よびセレクタ1706に置き換えるものである。他の部
分は上述の実施の形態のままとする。FIG. 17 shows a modification of the X access circuit 304 of FIG. The XA register 311 in FIG. 3 is replaced with an XA1 register 1701, an XA2 register 1702, and a selector 1703, and the selectors 312 and F in FIG.
The FIFO 313 is replaced with a FIFO 1704, a latch 1705, and a selector 1706. Other parts are the same as those in the above-described embodiment.
【0125】XA1レジスタ1701およびFIFO1
704は、Xアクセス処理でCPU104から波形メモ
リ109をアクセスする際の、アクセスアドレスを設定
するレジスタおよびアクセスデータを設定するFIFO
である。XA2レジスタ1702およびラッチ1705
は、Xアクセス処理でミキサ204から出力ライン22
3を介して波形メモリ109に書き込みを行なう際の、
アクセスアドレスを設定するレジスタおよびミキサ20
4からのデータを記憶するラッチである。この構成で、
セレクタ1703,1706をXアクセス処理の区間で
時分割で切り替えるようにして、ミキサ204から戻っ
てくる波形データの波形メモリ109への書き込みと、
CPU104からの波形メモリ109のアクセスとを、
並行して行なうことができるようにする。XA1 register 1701 and FIFO1
Reference numeral 704 denotes a register for setting an access address and a FIFO for setting access data when the CPU 104 accesses the waveform memory 109 in the X access processing.
It is. XA2 register 1702 and latch 1705
Is the output line 22 from the mixer 204 in the X access processing.
3 when writing to the waveform memory 109 via
Register and mixer 20 for setting access address
4 is a latch for storing data from the memory 4. With this configuration,
The selectors 1703 and 1706 are switched in a time-division manner in the section of the X access processing to write the waveform data returned from the mixer 204 into the waveform memory 109,
The access of the waveform memory 109 from the CPU 104 is
Be able to do it in parallel.
【0126】特に、ミキサ204からはサンプリング周
期ごとに波形データが戻ってくるが、その波形データは
捨てる訳にはいかないので、必ずラッチ1705に記憶
することとする。そして、サンプリング周期ごとのXア
クセス処理の区間で必ず1回は、セレクタ1703でX
A2レジスタ1702を選択しセレクタ1706でラッ
チ1705を選択するようにして、ラッチ1705の波
形データをXA2レジスタ1702で指示されたアドレ
スに書き込む。Xアクセス処理のその他の区間では、セ
レクタ1703でXA1レジスタ1701を選択しセレ
クタ1706でFIFO1704を選択するようにし
て、CPU104による波形メモリ109のアクセスを
実行する。XA1レジスタ1701およびXA2レジス
タ1702のアドレスを順次インクリメントする機能
は、図3で説明したのと同じである。なお、Xアクセス
処理の区間では、ラッチ1705の波形データの書き込
みを優先して必ず1回は行なうようにする必要がある
が、Xアクセス処理の区間そのものが確保できない場合
も考えられるので、上述の優先フラグ303をオンして
Xアクセス処理で必ず何回かのアクセスができるように
するとよい。In particular, although waveform data is returned from the mixer 204 every sampling period, the waveform data cannot be discarded, so that it is always stored in the latch 1705. At least once in the X access processing section for each sampling period, the selector 1703 performs the X access processing.
The A2 register 1702 is selected, and the selector 1706 selects the latch 1705, and the waveform data of the latch 1705 is written to the address specified by the XA2 register 1702. In other sections of the X access process, the selector 1703 selects the XA1 register 1701 and the selector 1706 selects the FIFO 1704, so that the CPU 104 accesses the waveform memory 109. The function of sequentially incrementing the addresses of the XA1 register 1701 and the XA2 register 1702 is the same as that described with reference to FIG. In the section of the X access processing, it is necessary to always perform the writing of the waveform data of the latch 1705 with priority once, but it is possible that the section of the X access processing itself cannot be secured. It is preferable that the priority flag 303 be turned on so that the access can be performed several times in the X access processing.
【0127】このような構成により、例えば、サンプリ
ングやリサンプリングした波形をミキサ204からラッ
チ1705経由で波形メモリ109に書き込み、波形メ
モリ109上にある程度溜まったところでCPU104
により当該波形データを読み出して、外部記憶装置(ハ
ードディスクなど)に送れば、リアルタイム・ハードデ
ィスク・レコーディングを行なうことができる。1サン
プリング周期で1回書き込まれるラッチ1705経由の
波形データの処理速度に比較すると、CPU104によ
る読み出し処理の処理速度は速い。特に、FIFOを用
いているので読み出し速度はさらに高速になる。そこ
で、波形メモリ109上に溜まったデータを一気にCP
U104で読み出して、ハードディスクなどに書き込む
ようにできる。With such a configuration, for example, a sampled or resampled waveform is written from the mixer 204 to the waveform memory 109 via the latch 1705, and when the waveform is accumulated on the waveform memory 109 to a certain extent, the CPU 104
By reading the waveform data and sending it to an external storage device (such as a hard disk), real-time hard disk recording can be performed. Compared to the processing speed of the waveform data written once in one sampling cycle and passing through the latch 1705, the processing speed of the read processing by the CPU 104 is faster. Particularly, the reading speed is further increased because the FIFO is used. Therefore, the data accumulated on the waveform memory 109 is immediately
The data can be read in U104 and written to a hard disk or the like.
【0128】なお、上記形態では、図3の読み書き回路
202において処理A演算回路321と処理B演算回路
325とを独立した構成としたが、処理A演算回路32
1と処理B演算回路325とをひとまとめにして、1つ
の演算回路を時分割で共用することにより処理Aと処理
Bとを行なうようにしてもよい。In the above embodiment, the processing A operation circuit 321 and the processing B operation circuit 325 are independent in the read / write circuit 202 in FIG.
Alternatively, the processing A and the processing B may be performed by combining the processing circuit 1 and the processing B operation circuit 325 into one operation circuit in a time-sharing manner.
【0129】上記形態では、波形メモリの波形サンプル
を16ビット非圧縮の形式としたが、他の形式でもよ
い。例えば、1アクセスで16ビットを読み出せること
はそのままにして、8ビット非圧縮または8ビット圧縮
形式にしてもよい。ただし、この場合、サンプル数とア
クセス数とが異なるので、その調整が必要である。ま
た、圧縮形式の場合は、連続してサンプルを読み出して
いかないと再生できなくなるため、飛ばし読みの際に対
処が必要である。In the above embodiment, the waveform samples in the waveform memory are in a 16-bit uncompressed format, but may be in another format. For example, an 8-bit uncompressed format or an 8-bit compressed format may be used while 16 bits can be read with one access. However, in this case, since the number of samples and the number of accesses are different, it is necessary to adjust them. In the case of the compression format, reproduction cannot be performed unless samples are continuously read out, so that it is necessary to take measures in skipping reading.
【0130】波形メモリとしてDRAMを用いた場合
は、必ずリフレッシュが必要であるので、Xアクセス処
理の区間でリフレッシュを行なうようにしてもよい。ま
た、CPUからの波形メモリの読み出し/書き込みは、
その緊急度に応じて対応するとよい。例えば、CPUか
らの波形メモリアクセスの緊急度が低いときは、音源チ
ャンネルで使用されなかった空きタイムスロットを用い
てアクセスを行なう。また、緊急度が高いときは、始め
にCPUからの波形メモリアクセスの分を確保し、残り
を音源チャンネルで使用する。When a DRAM is used as the waveform memory, the refresh is always required, so that the refresh may be performed in the X access processing section. Also, reading / writing of the waveform memory from the CPU is as follows.
It is advisable to respond according to the degree of urgency. For example, when the urgency of the waveform memory access from the CPU is low, the access is performed using an empty time slot not used in the sound source channel. When the degree of urgency is high, a portion for waveform memory access from the CPU is secured first, and the rest is used for the sound source channel.
【0131】また、上記形態では、図8,9に示したよ
うに処理Bおよび取り込みを行なう前半および後半の区
間の前側のスロットで連続した波形メモリのアクセスを
行なっているが、前側でなくてもよい。例えば、前半/
後半区間内の前側のスロットでXアクセス処理を行な
い、後側のスロットで各チャンネルについての連続した
波形メモリのアクセスを行なうようにしてもよい。ただ
しその場合、例えば図8の取り込み前半区間804の処
理が終了して、波形バッファに補間に必要な全サンプル
が用意された後に、補間前半区間806の補間処理が始
まるようにする必要がある(後半処理も同様)。そのた
め、補間を行なう区間をずらす必要がある(取り込み前
半処理が終了した後に補間前半処理を開始し、取り込み
後半処理が終了した後に補間後半処理を開始すれば十
分)。さらに、Xアクセス処理のタイムスロットを前半
区間あるいは後半区間中で分散させてもよい。Further, in the above embodiment, as shown in FIGS. 8 and 9, continuous waveform memory access is performed in the front slot of the first half and the second half of the processing B and the fetch, but not in the front. Is also good. For example, the first half /
X access processing may be performed in the front slot in the latter half section, and continuous waveform memory access for each channel may be performed in the rear slot. However, in this case, for example, after the processing of the first half section 804 of FIG. 8 is completed and all the samples necessary for interpolation are prepared in the waveform buffer, it is necessary to start the interpolation processing of the first half section 806 of the interpolation ( The same applies to the latter half processing). Therefore, it is necessary to shift the section in which interpolation is performed (it suffices to start the interpolation first-half process after the capture first-half process is completed and start the interpolation second-half process after the capture second-half process is completed). Further, the time slots of the X access processing may be distributed in the first half section or the second half section.
【0132】さらに、上記形態では、図8,9に示した
ように各処理を1サンプリング周期を前半と後半に分割
した区間で実行するようにしているが、区間の分け方は
これに限らない。例えば、1サンプリング周期を1/
3,1/4,…に分割し、それらの区間を単位にして各
処理を行なうようにしてもよい。また、等分割でなく、
変則的な区間の分割を行なってもよい。さらに、区間を
分けずに、1サンプリング周期を単位としてもよい。た
だし、処理Bでアドレス送り出しを行なって波形メモリ
をアクセスする前に、処理AによるARAMの書き換え
が行なわれることがないことを、保証する必要がある。
そのためには、例えば区間を分けない場合は、ARAM
を2セット用意し、処理Aによるアドレスの書き換えと
処理Bによるアドレスの送り出しとで、2セットのアド
レスRAMを交互に使用するなどの方法を採る必要があ
る。なお、1サンプリング周期を前半と後半に分けて処
理する方式によれば、1セットのARAMで処理Aと処
理Bとを交互に行なうことができるので、回路構成が簡
易にでき合理的といえる。Further, in the above embodiment, as shown in FIGS. 8 and 9, each processing is executed in a section obtained by dividing one sampling period into a first half and a second half, but the method of dividing the section is not limited to this. . For example, one sampling cycle is 1 /
.. May be divided into 3, 1/4,... And each processing may be performed in units of those sections. Also, instead of equal division,
Irregular sections may be divided. Further, one sampling period may be used as a unit without dividing the section. However, it is necessary to ensure that the ARAM is not rewritten by the process A before the address is sent out in the process B and the waveform memory is accessed.
For that purpose, for example, if you do not divide the section,
It is necessary to adopt a method of preparing two sets of the address RAM and alternately using two sets of the address RAM for rewriting the address in the process A and sending out the address in the process B. According to the method in which one sampling cycle is divided into the first half and the second half, processing A and processing B can be alternately performed by one set of ARAM, so that the circuit configuration can be simplified and rationalized.
【0133】[0133]
【発明の効果】以上説明したように、本発明によれば、
複数チャンネル分の楽音波形のうちの一部のチャンネル
だけを録音することができる。As described above , according to the present invention,
It is possible to record only some of the musical tone waveforms for a plurality of channels.
【図面の簡単な説明】[Brief description of the drawings]
【図1】この発明に係る波形メモリ音源装置を適用した
電子楽器の全体のブロック構成図FIG. 1 is an overall block diagram of an electronic musical instrument to which a waveform memory sound source device according to the present invention is applied.
【図2】この発明に係る波形メモリ音源装置を適用した
音源部のブロック構成図FIG. 2 is a block diagram of a tone generator unit to which the waveform memory tone generator according to the present invention is applied;
【図3】制御レジスタおよび読み書き回路の詳細図FIG. 3 is a detailed diagram of a control register and a read / write circuit.
【図4】制御RAMの構成図FIG. 4 is a configuration diagram of a control RAM.
【図5】アドレスRAMのメモリマップを示す図FIG. 5 is a diagram showing a memory map of an address RAM;
【図6】波形バッファの構成図FIG. 6 is a configuration diagram of a waveform buffer;
【図7】FIFOの使用方法を示す図FIG. 7 is a diagram showing a method of using a FIFO.
【図8】読み書き回路の要部のタイミング図FIG. 8 is a timing chart of a main part of the read / write circuit.
【図9】図8の各処理中のチャンネルの様子を示す図FIG. 9 is a diagram showing a state of a channel during each processing of FIG. 8;
【図10】マイクロプログラムおよびミキサ設定の励
(その1)を示す図FIG. 10 is a diagram showing a microprogram and mixer setting excitation (part 1);
【図11】マイクロプログラムおよびミキサ設定の励
(その2)を示す図FIG. 11 is a diagram showing a microprogram and mixer setting excitation (part 2);
【図12】メインルーチンおよびキーオンイベント処理
ルーチンのフローチャート図FIG. 12 is a flowchart of a main routine and a key-on event processing routine.
【図13】サンプリングSWイベント処理ルーチンおよ
びリサンプリングSWイベント処理ルーチンのフローチ
ャート図FIG. 13 is a flowchart of a sampling SW event processing routine and a resampling SW event processing routine.
【図14】波形読み出し(書き込み)SWイベント処理
ルーチン、Xフラグ(読み出し)イベント処理ルーチ
ン、およびXフラグ(書き込み)イベント処理ルーチン
のフローチャート図FIG. 14 is a flowchart of a waveform read (write) SW event processing routine, an X flag (read) event processing routine, and an X flag (write) event processing routine.
【図15】ソフト音源スタートSWイベント処理ルーチ
ンおよびソフト音源フレーム割り込み処理ルーチンのフ
ローチャート図FIG. 15 is a flowchart of a soft sound source start SW event processing routine and a soft sound source frame interrupt processing routine;
【図16】ソフト音源の楽音生成原理を説明するための
図FIG. 16 is a diagram for explaining the principle of generating a musical tone of a soft sound source.
【図17】Xアクセス回路の変形例を示す図FIG. 17 is a diagram showing a modification of the X access circuit.
101…鍵盤、102…表示部、103…スイッチ群
(SW)、104…中央処理装置(CPU)、105…
リードオンリメモリ(ROM)、106…ランダムアク
セスメモリ(RAM)、107…外部記憶装置、108
…音源部、109…波形メモリ、110…外部回路、1
11…遅延メモリ、112…ディジタルアナログ変換器
(DAC)、113…サウンドシステム(SS)、11
4…バスライン114、201…制御レジスタ、202
…読み書き回路、203…音量変化制御回路、204…
ミキサ、205…信号処理回路、206…インターフェ
ース、301,302…レジスタ、303…優先フラ
グ、304…Xアクセス回路、311…XAレジスタ、
312…セレクタ、313…FIFO(First I
n First Out(先入れ先出し)の8段のレジ
スタ)、314…Xフラグ、315…サンプル数レジス
タ、321…処理A演算回路、322…アドレスRAM
(ARAM)、323…アキュムレータ(ACC)、3
24…制御RAM、325…処理B演算回路、326…
補間回路、327…波形バッファ、328…取り込み回
路、329,330…セレクタ(SEL)。101: keyboard, 102: display unit, 103: switch group (SW), 104: central processing unit (CPU), 105:
Read only memory (ROM), 106: random access memory (RAM), 107: external storage device, 108
... Sound source unit, 109 ... Waveform memory, 110 ... External circuit, 1
11 delay memory, 112 digital-to-analog converter (DAC), 113 sound system (SS), 11
4 Bus lines 114, 201 Control register, 202
... Read / write circuit, 203 ... Volume change control circuit, 204 ...
Mixer, 205: signal processing circuit, 206: interface, 301, 302 ... register, 303: priority flag, 304: X access circuit, 311: XA register,
312 ... selector, 313 ... FIFO (First I
n First Out (first-in, first-out) eight-stage registers), 314: X flag, 315: sample number register, 321: processing A operation circuit, 322: address RAM
(ARAM), 323 ... accumulator (ACC), 3
24: control RAM, 325: processing B operation circuit, 326 ...
Interpolation circuits, 327: Waveform buffer, 328: Capture circuit, 329, 330 ... Selector (SEL).
───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭62−94896(JP,A) 特開 昭63−2097(JP,A) 特開 平1−116594(JP,A) 特開 平5−53572(JP,A) 特開 平4−61097(JP,A) 特開 平7−175477(JP,A) 特開 平7−271363(JP,A) (58)調査した分野(Int.Cl.7,DB名) G10H 7/00 511 ──────────────────────────────────────────────────続 き Continuation of the front page (56) References JP-A-62-94896 (JP, A) JP-A-63-2097 (JP, A) JP-A-1-116594 (JP, A) JP-A-5-95 53572 (JP, A) JP-A-4-61097 (JP, A) JP-A-7-175477 (JP, A) JP-A-7-271363 (JP, A) (58) Fields investigated (Int. Cl. 7 , DB name) G10H 7/00 511
Claims (1)
供給する波形供給手段と、 供給された楽音信号に対して信号処理を施す信号処理手
段と、 前記波形供給手段から供給される複数チャンネル分の楽
音波形および前記信号処理手段から供給される楽音信号
を入力して適宜ミキシングしミキシング結果を得る処理
を複数系列実行することにより、少なくとも第1、第
2、および第3のミキシング結果を得てそれぞれ出力す
るミキシング手段と、 前記ミキシング手段から出力される第1のミキシング結
果を前記記憶手段に書き込む書き込み手段と、 前記ミキシング手段から出力される第2のミキシング結
果を外部のサウンドシステムに供給する出力手段とを備
えるとともに、 前記信号処理手段には前記第3のミキシング結果の楽音
信号が供給され、前記信号処理手段は該第3のミキシン
グ結果の楽音信号に対して録音用の信号処理または再生
用の信号処理を行なうことを特徴とする音源装置。1. A storage means for recording a musical tone waveform, a waveform supplying means for supplying musical tone waveforms for a plurality of channels at a predetermined sampling period, and a signal processing means for performing signal processing on the supplied musical tone signal. By inputting the musical tone waveforms for a plurality of channels supplied from the waveform supply unit and the musical tone signal supplied from the signal processing unit and appropriately mixing them to execute a process of obtaining a mixing result, at least the first and second processes are performed. Mixing means for obtaining and outputting second and third mixing results, respectively; writing means for writing the first mixing result output from the mixing means into the storage means; and second means output from the mixing means. Output means for supplying the result of mixing to an external sound system. The means is supplied with the tone signal of the third mixing result, and the signal processing means performs signal processing for recording or signal processing for reproduction on the tone signal of the third mixing result. Sound source device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP22062096A JP3148803B2 (en) | 1996-08-02 | 1996-08-02 | Sound source device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP22062096A JP3148803B2 (en) | 1996-08-02 | 1996-08-02 | Sound source device |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2000346173A Division JP3723973B2 (en) | 2000-11-14 | 2000-11-14 | Sound generator |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH1049170A JPH1049170A (en) | 1998-02-20 |
JP3148803B2 true JP3148803B2 (en) | 2001-03-26 |
Family
ID=16753832
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP22062096A Expired - Fee Related JP3148803B2 (en) | 1996-08-02 | 1996-08-02 | Sound source device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3148803B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6319336B1 (en) | 1998-07-29 | 2001-11-20 | Dowa Mining Co., Ltd. | Permanent magnet alloy having improved heat resistance and process for production thereof |
-
1996
- 1996-08-02 JP JP22062096A patent/JP3148803B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6319336B1 (en) | 1998-07-29 | 2001-11-20 | Dowa Mining Co., Ltd. | Permanent magnet alloy having improved heat resistance and process for production thereof |
Also Published As
Publication number | Publication date |
---|---|
JPH1049170A (en) | 1998-02-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6180863B1 (en) | Music apparatus integrating tone generators through sampling frequency conversion | |
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 | |
JP3482685B2 (en) | Sound generator for electronic musical instruments | |
JP3137043B2 (en) | Waveform memory tone generator and tone generator | |
JP3148803B2 (en) | Sound source device | |
JP3723973B2 (en) | Sound generator | |
JPH07121181A (en) | Sound information processor | |
JPH08160961A (en) | Sound source device | |
JP4132268B2 (en) | Waveform playback device | |
JP3928725B2 (en) | Music signal generator and legato processing program | |
JP2882464B2 (en) | Waveform memory sound generator | |
JP3095018B2 (en) | Music generator | |
JPH10207465A (en) | Method of generating musical sound and device therefor | |
JP2956552B2 (en) | Musical sound generating method and apparatus | |
JP3275678B2 (en) | Musical sound generating method and apparatus | |
JP3832382B2 (en) | Musical sound generating apparatus and program | |
JP2833485B2 (en) | Tone generator | |
JP2970372B2 (en) | Sound source parameter supply device | |
JP3660379B2 (en) | Sound source control information storage method and sound source control apparatus | |
JP2003280650A (en) | Modulated waveform generator | |
JP2001092450A (en) | Method for generating/processing audio file | |
JP3651675B2 (en) | Electronic musical instruments | |
JP2546464B2 (en) | Electronic musical instrument | |
JPH10187155A (en) | Karaoke device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20090112 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100112 Year of fee payment: 9 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110112 Year of fee payment: 10 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120112 Year of fee payment: 11 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130112 Year of fee payment: 12 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140112 Year of fee payment: 13 |
|
LAPS | Cancellation because of no payment of annual fees |