JP4385893B2 - Coefficient interpolation circuit in data processing circuit - Google Patents

Coefficient interpolation circuit in data processing circuit Download PDF

Info

Publication number
JP4385893B2
JP4385893B2 JP2004240707A JP2004240707A JP4385893B2 JP 4385893 B2 JP4385893 B2 JP 4385893B2 JP 2004240707 A JP2004240707 A JP 2004240707A JP 2004240707 A JP2004240707 A JP 2004240707A JP 4385893 B2 JP4385893 B2 JP 4385893B2
Authority
JP
Japan
Prior art keywords
coefficient
output
program
new
circuit
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
Application number
JP2004240707A
Other languages
Japanese (ja)
Other versions
JP2006058626A (en
Inventor
保之 村木
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2004240707A priority Critical patent/JP4385893B2/en
Publication of JP2006058626A publication Critical patent/JP2006058626A/en
Application granted granted Critical
Publication of JP4385893B2 publication Critical patent/JP4385893B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ディジタル楽音信号の生成等に用いて好適なデータ処理回路における係数補間回路に関する。   The present invention relates to a coefficient interpolation circuit in a data processing circuit suitable for use in generating a digital musical tone signal.

楽音信号をディジタル技術によって生成する場合、音源回路によって生成したディジタル楽音信号(PCM(Pulse Code Moduration)データ)や、外部から受けたPCMデータを効果付与回路へ入力し、この効果付与回路においてエフェクト(効果)や立体音響効果を付与することが行われる。この効果付与回路は、FIRフィルタやIIRフィルタ等の複数のディジタルフィルタを有して構成され、通常、各フィルタはDSP(ディジタルシグナルプロセッサ)によって構成される。   When a musical sound signal is generated by digital technology, a digital musical sound signal (PCM (Pulse Code Moduration) data) generated by a tone generator circuit or PCM data received from the outside is input to an effect applying circuit, and an effect ( Effect) and a stereophonic effect. This effect applying circuit is configured to include a plurality of digital filters such as an FIR filter and an IIR filter, and each filter is generally configured by a DSP (digital signal processor).

DSPは、周知のように、内部にプログラムRAM(ランダムアクセスメモリ)、係数RAM、楽音データが一時記憶されるデータRAM、演算回路等を有し、プログラムRAM内のプログラムに基づいてデータRAMから楽音データが読み出され、その楽音データに対し演算回路において、プログラムRAMから読み出されたプログラムおよび係数RAMから読み出された係数に基づいてフィルタ演算が行われる。そして、その演算結果が次段のDAC(ディジタル/アナログコンバータ)によってアナログ信号に変換され、スピーカへ出力される。   As is well known, the DSP has a program RAM (random access memory), a coefficient RAM, a data RAM in which musical tone data is temporarily stored, an arithmetic circuit, and the like, and from the data RAM based on a program in the program RAM. Data is read out, and a filter operation is performed on the musical tone data based on the program read from the program RAM and the coefficient read from the coefficient RAM in the arithmetic circuit. Then, the calculation result is converted into an analog signal by a next-stage DAC (digital / analog converter) and output to a speaker.

なお、本願に関わる従来の技術文献として特許文献1〜3が知られている。
特許第2768241号公報 特許第2727802号公報 特開平8-32385号公報
Patent documents 1 to 3 are known as conventional technical documents related to the present application.
Japanese Patent No. 2768241 Japanese Patent No. 2727802 JP-A-8-32385

ところで、DSPにおけるPCMデータの処理においては、多彩な楽音を生成するため、上述した演算回路の係数をしばしば変化させる。この処理は、外部のCPU(中央処理装置)から出力される係数によって上記の係数RAMを書き換えることによって行われる。しかし、係数RAMをいきなり書き換えると、PCMデータにノイズが乗ってしまう場合がある。そこで、係数RAMを2個設け、書き換えるべき係数を第2の係数RAMに書き込み、現在使用されている第1の係数RAMの係数から第2の係数RAMの係数へ徐々に係数を変化させる係数補間回路が設けられる。しかし、係数変更においては、係数補間回路によって徐々に係数を変化させることが好ましくなく、係数変更を即座に演算に反映させたい場合もある。
また、従来使用されていた乗算器を用いた係数補間回路は回路規模が大きくなる問題があった。
By the way, in the processing of PCM data in the DSP, in order to generate a variety of musical sounds, the coefficient of the arithmetic circuit described above is often changed. This process is performed by rewriting the coefficient RAM with coefficients output from an external CPU (central processing unit). However, if the coefficient RAM is rewritten suddenly, noise may be added to the PCM data. Therefore, two coefficient RAMs are provided, the coefficient to be rewritten is written in the second coefficient RAM, and coefficient interpolation is performed to gradually change the coefficient from the coefficient of the first coefficient RAM currently used to the coefficient of the second coefficient RAM. A circuit is provided. However, in the coefficient change, it is not preferable to gradually change the coefficient by the coefficient interpolation circuit, and there are cases where it is desired to immediately reflect the coefficient change in the calculation.
In addition, the coefficient interpolation circuit using a multiplier conventionally used has a problem that the circuit scale becomes large.

本発明は上記事情を考慮してなされたもので、その目的は、構成が簡単で、しかも係数補間を行う/行わないを選択することができるデータ処理回路における係数補間回路を提供することにある。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide a coefficient interpolation circuit in a data processing circuit that has a simple configuration and can select whether or not to perform coefficient interpolation. .

この発明は上記の課題を解決するためになされたもので、本発明は、外部の制御装置から出力されたプログラムが記憶されたプログラムメモリと、外部の制御装置から出力された係数が記憶された係数メモリと、プログラムカウンタから出力されるアドレスデータに従って、前記プログラムメモリ内のプログラムおよび前記係数メモリ内の係数を順次読み出し、前記プログラムおよび前記係数に従って動作する演算回路とを具備するデータ処理回路において、外部の制御装置から前記係数の変更を指示されると、変更後の新係数が記憶される新係数メモリと、外部の制御装置から前記係数の変更を指示されると、変更前の旧係数が記憶される中間係数メモリと、前記中間係数メモリ内の旧係数から前記新係数メモリ内の新係数に向かって順次変化する係数を生成する係数生成手段と、前記プログラムには係数補間を指示するか否かを示す補間制御情報が含まれており、前記プログラムメモリから読み出されたプログラムに含まれる補間制御情報が係数補間を指示している時は前記係数生成手段の出力を前記演算回路へ出力し、前記補間制御情報が係数補間を指示していない時は前記新係数メモリから読み出される係数を前記演算回路へ出力する選択手段と、を具備し、前記係数生成手段は、前記新係数メモリから読み出された新係数を所定ビット下位方向へシフトしたデータから、前記中間係数メモリから読み出された変更前の旧係数を前記所定ビット下位方向へシフトしたデータを減算する減算手段と、前記減算手段の出力と前記中間係数メモリの出力を加算する加算手段と、前記加算手段の出力を前記中間係数メモリへ書き込む書込手段と、前記減算手段の出力の大きさに対応してビット数N(Nは正の整数)を決定する決定手段を有しており、前記新係数メモリの出力の上位Nビットのデータと前記加算手段の出力の上位Nビットのデータが一致した時、補間終了と判定する終了判定手段と、を具備し、前記選択手段は、前記終了判定手段にて補間終了と判定した時、前記新係数メモリから読み出される係数を前記演算回路へ出力することを特徴とするデータ処理回路における係数補間回路である。 The present invention has been made to solve the above problems, and the present invention stores a program memory storing a program output from an external control device and a coefficient output from the external control device. In a data processing circuit comprising a coefficient memory and an arithmetic circuit that sequentially reads out a program in the program memory and a coefficient in the coefficient memory in accordance with address data output from a program counter, and operates according to the program and the coefficient. When an external control device is instructed to change the coefficient, a new coefficient memory in which the new coefficient after the change is stored, and when an external control device is instructed to change the coefficient, the old coefficient before the change is The stored intermediate coefficient memory, and sequentially from the old coefficient in the intermediate coefficient memory to the new coefficient in the new coefficient memory Coefficient generating means for generating a coefficient to be converted and interpolation control information indicating whether or not to instruct coefficient interpolation is included in the program, and the interpolation control information included in the program read from the program memory is When coefficient interpolation is instructed, the output of the coefficient generation means is output to the arithmetic circuit, and when the interpolation control information does not instruct coefficient interpolation, the coefficient read from the new coefficient memory is output to the arithmetic circuit. Selecting means for outputting, the coefficient generating means from the data obtained by shifting the new coefficient read from the new coefficient memory in a predetermined bit lower direction before the change read from the intermediate coefficient memory A subtracting means for subtracting data obtained by shifting the old coefficient in the lower direction of the predetermined bit; an adding means for adding the output of the subtracting means and the output of the intermediate coefficient memory; Writing means for writing the output of the adding means into the intermediate coefficient memory; and determining means for determining the number of bits N (N is a positive integer) corresponding to the magnitude of the output of the subtracting means, And an end determination means for determining that the interpolation is completed when the upper N bits of the output of the new coefficient memory coincide with the upper N bits of the output of the addition means, and the selection means includes the end determination The coefficient interpolation circuit in the data processing circuit outputs the coefficient read from the new coefficient memory to the arithmetic circuit when it is determined by the means that the interpolation is completed .

請求項2に記載の発明は、上記係数補間回路において、前記減算手段は、前記減算の結果が零であることを示すとき、前記新係数メモリから読み出した新係数と前記中間係数メモリから読み出した係数とを比較し、比較の結果、前記新係数が前記係数より大きい場合は+1、前記新係数が前記係数より小さい場合は−1、を出力することを特徴とする。 According to a second aspect of the present invention, in the coefficient interpolation circuit, the subtracting means reads the new coefficient read from the new coefficient memory and the intermediate coefficient memory when the result of the subtraction indicates zero. As a result of comparison, +1 is output when the new coefficient is larger than the coefficient, and -1 is output when the new coefficient is smaller than the coefficient .

請求項1に記載の発明によれば、プログラムメモリから読み出されたプログラムが係数補間を指示している時は係数生成手段の出力を演算手段へ出力し、プログラムが係数補間を指示していない時は新係数メモリから読み出される係数を演算手段へ出力する選択手段を有しているので、係数補間を行う/行わないを自由に選択することができる効果がある。
また、請求項2に記載の発明によれば、乗算手段を用いることなく補間処理を行うことができ、これにより構成が簡単化できる効果がある。
また、請求項3に記載の発明によれば、補間終了の判定を簡単に行うことができる効果がある。
According to the first aspect of the present invention, when the program read from the program memory instructs the coefficient interpolation, the output of the coefficient generating means is output to the calculating means, and the program does not instruct the coefficient interpolation. In some cases, since the selection means for outputting the coefficient read from the new coefficient memory to the calculation means is provided, it is possible to freely select whether or not to perform the coefficient interpolation.
Further, according to the second aspect of the present invention, the interpolation process can be performed without using the multiplication means, which has the effect of simplifying the configuration.
Further, according to the third aspect of the present invention, there is an effect that it is possible to easily determine whether or not the interpolation is completed.

以下、図面を参照し、この発明の実施の形態について説明する。図1はこの発明の一実施の形態による係数補間回路を用いた楽音信号生成回路Gの構成を示すブロック図、 図2は図1に示す楽音信号生成回路Gを用いた携帯電話機の構成を示すブロック図である。図2において、符号1は回路各部を制御するCPU(中央処理装置)であり、通常の通信、通話処理を行うと共に、ゲームプログラムの処理等を行う。2はCPU1において実行されるプログラム、すなわち、通信・通話処理プログラム、ゲームプログラム、音楽再生処理プログラム等が記憶されたROM(リードオンリメモリ)である。3はデータ記憶用の不揮発性RAM(ランダムアクセスメモリ)であり、CPU1が各処理の過程においてデータを一時記憶させる。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a musical tone signal generation circuit G using a coefficient interpolation circuit according to an embodiment of the present invention, and FIG. 2 shows a configuration of a mobile phone using the musical tone signal generation circuit G shown in FIG. It is a block diagram. In FIG. 2, reference numeral 1 denotes a CPU (central processing unit) that controls each part of the circuit, and performs normal communication and call processing, as well as game program processing. Reference numeral 2 denotes a ROM (read only memory) in which a program executed by the CPU 1, that is, a communication / call processing program, a game program, a music reproduction processing program, and the like are stored. Reference numeral 3 denotes a non-volatile RAM (random access memory) for data storage, and the CPU 1 temporarily stores data during each process.

4は電話番号入力用のテンキー、各種ファンクションキー等が設けられた入力部5は液晶表示器による表示部である。6はアンテナ7を有する通信部であり、送信データによって搬送波を変調してアンテナ7から送信し、また、アンテナ7を介して受信した着信信号を復調してCPU1または音声処理部8へ出力する。音声処理部8はマイクロフォン9から出力された音声信号をディジタルデータに変換し、さらに圧縮し送信データとして通信
部6へ出力し、また、通信部6から出力される圧縮音声データを伸張し、アナログ音声信
号に変換してスピーカ10へ出力する。楽音信号生成回路Gは、着信メロディ、ゲームの
効果音楽、鑑賞用音楽等、各種の楽音信号を生成し、スピーカ16へ出力する。
4 is an input unit provided with a numeric keypad for inputting a telephone number and various function keys , and 5 is a display unit using a liquid crystal display. A communication unit 6 having an antenna 7 modulates a carrier wave with transmission data and transmits it from the antenna 7, and demodulates an incoming signal received via the antenna 7 and outputs it to the CPU 1 or the audio processing unit 8. The audio processing unit 8 converts the audio signal output from the microphone 9 into digital data, further compresses it and outputs it as transmission data to the communication unit 6, and decompresses the compressed audio data output from the communication unit 6, The sound signal is converted and output to the speaker 10. The musical tone signal generation circuit G generates various musical tone signals such as incoming melody, game effect music, and viewing music, and outputs them to the speaker 16.

次に、図1を参照して楽音信号生成回路Gについて詳述する。
図1において、12はCPU1からバスラインBを介して供給される各種のデータおよび制御命令が一時記憶されるバッファレジスタである。13は音源回路であり、CPU1からバッファレジスタ12を介して着信メロディ生成指令を受けて着信メロディのディジタル楽音信号(PCMデータ)を生成して出力する。また、CPU1からゲームの効果音の生成指令を受けた時は、ゲームの効果音のPCMデータを生成して出力する。DSP(データ処理回路)14は、音源回路13から出力されるディジタル楽音信号にエフェクト、立体音響効果(3D)、ワイドステレオ効果を付与してDAC(ディジタル/アナログプロセッサ)15へ出力する。DAC15はDSP14から出力されるディジタル楽音信号をアナログ楽音信号に変換し、スピーカ16へ出力する。
Next, the tone signal generation circuit G will be described in detail with reference to FIG.
In FIG. 1, reference numeral 12 denotes a buffer register in which various data and control commands supplied from the CPU 1 via the bus line B are temporarily stored. A tone generator circuit 13 receives an incoming melody generation instruction from the CPU 1 via the buffer register 12, and generates and outputs a digital musical tone signal (PCM data) of the incoming melody. When receiving a game sound effect generation command from the CPU 1, PCM data of the game sound effect is generated and output. The DSP (data processing circuit) 14 gives an effect, a stereophonic effect (3D), and a wide stereo effect to the digital musical sound signal output from the sound source circuit 13 and outputs the signal to the DAC (digital / analog processor) 15. The DAC 15 converts the digital tone signal output from the DSP 14 into an analog tone signal and outputs the analog tone signal to the speaker 16.

次に、DSP14において、21はデータRAMであり、音源回路13から出力されるPCMデータを一時記憶し、記憶したデータをプログラムRAM22から出力されるプログラムに従って演算回路23へ出力する。演算回路23はデータRAM21から出力されるPCMデータに、プログラムRAM22から出力されるプログラムが指定する演算を行って出力する。この場合、演算係数としてセレクタ43から出力される係数Kが用いられる。24はバッファメモリであり、演算回路23から出力されるPCMデータを一時記憶し、クロックパルスCLK1のタイミングでDAC15へ出力する。ここで、クロックパルスCLK1はPCMデータのサンプリング周波数と同じ周波数(48KHz)のクロックパルスである。   Next, in the DSP 14, 21 is a data RAM, which temporarily stores PCM data output from the tone generator circuit 13, and outputs the stored data to the arithmetic circuit 23 in accordance with a program output from the program RAM 22. The arithmetic circuit 23 performs an operation designated by the program output from the program RAM 22 on the PCM data output from the data RAM 21 and outputs the result. In this case, the coefficient K output from the selector 43 is used as the calculation coefficient. A buffer memory 24 temporarily stores the PCM data output from the arithmetic circuit 23 and outputs it to the DAC 15 at the timing of the clock pulse CLK1. Here, the clock pulse CLK1 is a clock pulse having the same frequency (48 KHz) as the sampling frequency of the PCM data.

プログラムRAM22は、予め、エフェクト用プログラム、立体音響効果用プログラム、ワイドステレオ効果用プログラム等が各々記憶されたRAMであり、各プログラムはCPU1から出力されるプログラムによって書き換え可能である。
また、各プログラムの個々のステップはそれぞれ、データRAM21のアドレス、演算回路23への演算命令および1ビットの補正コントロール信号HCを含んでいる。
The program RAM 22 is a RAM in which an effect program, a stereophonic sound effect program, a wide stereo effect program, and the like are stored in advance, and each program can be rewritten by a program output from the CPU 1.
Each step of each program includes an address of the data RAM 21, an arithmetic instruction to the arithmetic circuit 23, and a 1-bit correction control signal HC.

このプログラムRAM22は、最大768ステップのプログラムが記憶できるもので、各ステップがプログラムカウンタ27から出力されるアドレスデータに従って順次読み出され出力される。例えば、エフェクト用プログラム、立体音響効果用プログラム、ワイドステレオ効果用プログラム等の1つまたは複数が768ステップに記憶されている。アドレス端子へ供給されるプログラムカウンタ27のカウント出力に従って、エフェクト用プログラムが読み出され、これにより、データRAM21から出力されるPCMデータにエフェクトが付与されたり、次に立体音響効果用プログラムが読み出されたり、または、ワイドステレオ効果用プログラムが読み出され、これによりPCMデータにワイドステレオ効果が付与される。プログラムカウンタ27は768進のカウンタであり、次式の周波数のクロックパルスCLK2に従って0〜767のカウント出力を繰り返し出力する。
周波数=48KHz×768=36.864MHz
The program RAM 22 can store a program having a maximum of 768 steps, and each step is sequentially read and output in accordance with address data output from the program counter 27. For example, one or more of an effect program, a stereophonic effect program, a wide stereo effect program, and the like are stored in 768 steps. In accordance with the count output of the program counter 27 supplied to the address terminal, the effect program is read out, whereby an effect is added to the PCM data output from the data RAM 21, or the stereophonic sound effect program is read out next. Or a wide stereo effect program is read out, and thereby the wide stereo effect is added to the PCM data. The program counter 27 is a 768-ary counter, and repeatedly outputs a count output of 0 to 767 in accordance with a clock pulse CLK2 having the following frequency.
Frequency = 48KHz × 768 = 36.864MHz

31〜34はいずれも演算回路23において使用される演算係数が記憶される係数RAMであり、係数RAM(前段)31、係数RAM(新)32、係数RAM(中間)34は各々768ワード(1ワード=16ビット)の記憶容量を有し、係数RAM(旧)33は768バイトの記憶容量を有している。ここで、係数のビット数は16であり、したがって、係数RAM(前段)31、係数RAM(新)32、係数RAM(中間)34は各々768個の係数を記憶可能であり、また、係数RAM(旧)33は768個の係数の上位8ビットが記憶可能である。また、各係数RAM31〜34のアドレス端子にはいずれもプログラムカウンタ27のカウント出力が加えられており、プログラムカウンタ27のカウント出力によって指定されるアドレスに対しデータ書き込み/読み出しが行われる。すなわち、係数RAM31〜34内の各係数は各々プログラムRAM22の各プログラムステップに対応している。   31 to 34 are coefficient RAMs for storing calculation coefficients used in the calculation circuit 23. The coefficient RAM (previous stage) 31, the coefficient RAM (new) 32, and the coefficient RAM (middle) 34 are each 768 words (1 Word = 16 bits) and the coefficient RAM (old) 33 has a storage capacity of 768 bytes. Here, the number of bits of the coefficient is 16, so that the coefficient RAM (previous stage) 31, the coefficient RAM (new) 32, and the coefficient RAM (intermediate) 34 can each store 768 coefficients, and the coefficient RAM (Old) 33 can store the upper 8 bits of 768 coefficients. Further, the count output of the program counter 27 is applied to the address terminals of the coefficient RAMs 31 to 34, and data writing / reading is performed with respect to the address specified by the count output of the program counter 27. That is, each coefficient in the coefficient RAMs 31 to 34 corresponds to each program step of the program RAM 22.

また、係数RAM(前段)31はCPU1から出力される係数によって書き換えられ、また、係数RAM(新)32は係数RAM(前段)31から出力される係数によって書き換えられる。また、係数RAM(旧)33は係数RAM(前段)31またはセレクタ43から出力される係数によって書き換えられる。この場合、セレクタ36によって入力データの切り換えが行われる。また、係数RAM(中間)3は係数RAM(前段)31またはセレクタ43から出力される係数によって書き換えられる。この場合、セレクタ37によって入力データの切り換えが行われる。 Further, the coefficient RAM (previous stage) 31 is rewritten by the coefficient output from the CPU 1, and the coefficient RAM (new) 32 is rewritten by the coefficient output from the coefficient RAM (previous stage) 31. The coefficient RAM (old) 33 is rewritten by the coefficient output from the coefficient RAM (previous stage) 31 or the selector 43. In this case, the input data is switched by the selector 36. The coefficient RAM (intermediate) 3 4 is rewritten by the coefficient output from the coefficient RAM (front) 31 or selector 43. In this case, input data is switched by the selector 37.

41は減算回路であり、係数RAM(新)32の出力の上位8ビットから係数RAM(旧)33の出力を減算する。42は加算回路であり、減算回路41の出力と係数RAM(中間)34の出力とを加算する。セレクタ43は係数RAM(新)32の出力または加算回路42の出力の一方を選択し、係数Kとして演算回路23へ出力する。終了判定回路44は、係数補間の終了を判定する回路である。45はオアゲートであり、終了判定回路44の出力またはアンドゲート55から出力される補間コントロール信号HCをセレクタの選択端子へ出力する。   Reference numeral 41 denotes a subtraction circuit, which subtracts the output of the coefficient RAM (old) 33 from the upper 8 bits of the output of the coefficient RAM (new) 32. An adder circuit 42 adds the output of the subtractor circuit 41 and the output of the coefficient RAM (intermediate) 34. The selector 43 selects one of the output of the coefficient RAM (new) 32 or the output of the adder circuit 42 and outputs it to the arithmetic circuit 23 as the coefficient K. The end determination circuit 44 is a circuit that determines the end of coefficient interpolation. Reference numeral 45 denotes an OR gate which outputs the output of the end determination circuit 44 or the interpolation control signal HC output from the AND gate 55 to the selector selection terminal.

上述した係数RAM32〜34、セレクタ36、37、減算回路41、加算回路42、セレクタ43、終了判定回路44およびオアゲート45が係数補間回路50を構成している。この係数演算回路50は係数変更の場合に、いきなり係数を変更すると、出力されるPCMデータにノイズが含まれる虞があるので、変更前の係数から変更後の係数まで、クロックパルスCLK1の最大255クロックタイムをかけて徐々に係数を変化させるための回路である。 The coefficient RAMs 32 to 34, the selectors 36 and 37, the subtraction circuit 41, the addition circuit 42, the selector 43, the end determination circuit 44, and the OR gate 45 constitute the coefficient interpolation circuit 50. When the coefficient is changed, if the coefficient is changed suddenly, noise may be included in the output PCM data. Therefore, the maximum 255 of the clock pulse CLK1 from the coefficient before the change to the coefficient after the change. This is a circuit for gradually changing the coefficient over a clock time.

51、52は各々スタートレジスタおよびエンドレジスタであり、プログラム変更時において、CPU1から出力される変更すべきプログラムのスタートアドレスおよびエンドアドレスが書き込まれる。例えば、プログラムRAM22のアドレス0〜150に記憶されているエフェクト用プログラムの書き換えが行われる時は、スタートレジスタ51に「0」が、エンドレジスタ52に「150」が書き込まれる。54は比較回路であり、プログラムカウンタ27の出力と、スタートレジスタ51、エンドレジスタ52のデータとを比較し、プログラムカウンタ27の出力がスタートレジスタ51のデータと、エンドレジスタ52のデータとの間にある場合に”1”を、それ以外の場合に”0”を出力する。   Reference numerals 51 and 52 denote a start register and an end register, respectively. When the program is changed, the start address and end address of the program to be changed output from the CPU 1 are written. For example, when the effect program stored in the addresses 0 to 150 of the program RAM 22 is rewritten, “0” is written in the start register 51 and “150” is written in the end register 52. A comparison circuit 54 compares the output of the program counter 27 with the data of the start register 51 and the end register 52. The output of the program counter 27 is between the data of the start register 51 and the data of the end register 52. “1” is output in some cases, and “0” is output in other cases.

55はアンドゲート(プログラムRAM22の出力のビット数分)であり、比較回路54の出力が”1”の時は閉状態となって、データ「0(全ビット”0”)」(NOP命令)を出力し、比較回路54の出力が”0”の時は開状態となって、プログラムRAM22から出力されるプログラムステップをデータRAM21および演算回路23へ出力すると共に、プログラムステップに含まれる補間コントロール信号HCをオアゲート45へ出力する。データ「0」はNOP(No Operation)命令としてあるので、書き換え中の誤動作を防ぐことができる。(NOP命令が「0」でない場合はアンドゲート55はそのビット配列に合わせて変更する。)   55 is an AND gate (for the number of bits of the output of the program RAM 22). When the output of the comparison circuit 54 is "1", it is closed and data "0 (all bits" 0 ")" (NOP instruction) When the output of the comparison circuit 54 is “0”, the circuit is opened, the program step output from the program RAM 22 is output to the data RAM 21 and the arithmetic circuit 23, and the interpolation control signal included in the program step is output. HC is output to the OR gate 45. Since data “0” is a NOP (No Operation) instruction, malfunction during rewriting can be prevented. (If the NOP instruction is not “0”, the AND gate 55 changes it according to the bit arrangement.)

次に、上述した楽音信号生成回路Gの動作を説明する。
まず、プログラムRAM22のアドレス0〜150にエフェクト用プログラムが、アドレス151〜767に立体音響効果用プログラムが記憶されているとする。この場合、係数RAM31、32、34の各アドレス0〜150に各々、同一のエフェクト用プログラムの係数が記憶され、アドレス151〜767に各々、同一の立体音響効果用プログラムの係数が記憶されている。また、係数RAM(旧)33には係数RAM(前段)31内の各係数の上位8ビットが記憶されている。
Next, the operation of the above-described tone signal generation circuit G will be described.
First, it is assumed that an effect program is stored in addresses 0 to 150 of the program RAM 22 and a stereophonic sound effect program is stored in addresses 151 to 767. In this case, the coefficients of the same effect program are stored in the addresses 0 to 150 of the coefficient RAMs 31, 32, and 34, respectively, and the coefficients of the same stereophonic effect program are stored in the addresses 151 to 767, respectively. . The coefficient RAM (old) 33 stores the upper 8 bits of each coefficient in the coefficient RAM (previous stage) 31.

このような状態において、CPU1から、例えば着信メロディ生成指令が音源回路13へ出力されると、音源回路13が着信メロディのディジタル楽音信号(PCMデータ)を生成し、DSP14へ出力する。出力されたPCMデータはデータRAM21に一時記憶され、同時に、プログラムカウンタ27がクロックパルスCLK2のアップカウントを開始する。プログラムカウンタ27がクロックパルスCLK2によってアップカウントを行うと、プログラムRAM22からプログラムステップが順次出力され、アンドゲート55を介してデータRAM21、演算回路23およびオアゲート45へ出力される。   In this state, for example, when an incoming melody generation command is output from the CPU 1 to the tone generator circuit 13, the tone generator circuit 13 generates a digital musical tone signal (PCM data) of the incoming melody and outputs it to the DSP 14. The outputted PCM data is temporarily stored in the data RAM 21, and at the same time, the program counter 27 starts to count up the clock pulse CLK2. When the program counter 27 counts up with the clock pulse CLK 2, program steps are sequentially output from the program RAM 22 and output to the data RAM 21, the arithmetic circuit 23, and the OR gate 45 through the AND gate 55.

一方、プログラムカウンタ27がクロックパルスCLK2のアップカウントを行うと、係数RAM(新)32、係数RAM(旧)33および係数RAM(中間)34から係数が順次読み出され、減算回路41および加算回路42へ出力される。しかし、上述したように、係数変更がない状態では、係数RAM(新)32のデータの上位8ビットと係数RAM(旧)33のデータは同一であり、したがって、減算回路41の出力は「0」となる。この結果、加算回路42から係数RAM(中間)34の出力データが出力され、セレクタ43を介して演算回路23へ供給されると共にセレクタ37を介して係数RAM(中間)34に書き込まれる。   On the other hand, when the program counter 27 counts up the clock pulse CLK2, the coefficients are sequentially read out from the coefficient RAM (new) 32, the coefficient RAM (old) 33, and the coefficient RAM (intermediate) 34, and the subtraction circuit 41 and the addition circuit. 42 is output. However, as described above, in the state where the coefficient is not changed, the upper 8 bits of the data of the coefficient RAM (new) 32 and the data of the coefficient RAM (old) 33 are the same. Therefore, the output of the subtraction circuit 41 is “0”. " As a result, the output data of the coefficient RAM (intermediate) 34 is output from the adder circuit 42, supplied to the arithmetic circuit 23 via the selector 43, and written to the coefficient RAM (intermediate) 34 via the selector 37.

このように、プログラムカウンタ27がクロックパルスCLK2によってアップカウントを行うと、データRAM21および演算回路23へプログラムRAM22から読み出されたプログラムステップが順次加えられ、また、係数RAM(中間)34から読み出された係数が係数補間回路0を介して演算回路23へ加えられる。これにより、エフェクト用プログラム、立体音響効果用プログラムが順次繰り返し実行される。また、係数RAM(中間)34から読み出された係数は再び同係数RAM34に戻され、同じアドレスに書き込まれる。したがって、係数RAM(中間)34のデータに変化はない。 As described above, when the program counter 27 counts up by the clock pulse CLK2, the program steps read from the program RAM 22 are sequentially added to the data RAM 21 and the arithmetic circuit 23, and read from the coefficient RAM (intermediate) 34. coefficients are applied to the arithmetic circuit 23 through the coefficient interpolation circuit 5 0. Thereby, the effect program and the stereophonic sound effect program are repeatedly executed in sequence. The coefficient read from the coefficient RAM (intermediate) 34 is returned to the coefficient RAM 34 again and written to the same address. Therefore, there is no change in the data of the coefficient RAM (intermediate) 34.

次に、係数変更の場合の動作を説明する。
係数変更が行われる場合、まず、CPU1が出力した変更後の係数(新係数という)が係数RAM(前段)31に書き込まれる。例えば、エフェクト用プログラムの係数変更が行われる場合は、CPU1が出力した新係数が係数RAM(前段)31のアドレス0〜150に書き込まれる。
Next, the operation for changing the coefficient will be described.
When the coefficient is changed, first, the changed coefficient (referred to as a new coefficient) output from the CPU 1 is written in the coefficient RAM (previous stage) 31. For example, when the coefficient of the effect program is changed, the new coefficient output by the CPU 1 is written to addresses 0 to 150 of the coefficient RAM (previous stage) 31.

また、係数RAM(新)32内の係数は、プログラムカウンタ27のカウント出力によって読み出される毎に、係数RAM(前段)31から読み出された新係数と比較器により比較され、一致していない場合は係数RAM(新)32内の係数が新係数に書き換えられる。そして、書き換えられた新係数が減算回路41へ出力される。減算回路41はこの新係数の上位8ビットから係数RAM(旧)33から出力される変更前の係数(旧係数という)の8ビットを減算する。減算結果を係数RAM(中間)34の出力(16ビット)の下位8ビットに加算器42で加算する。符号は上位ビットに拡張する。図6に具体的な構成例を示す。減算回路41は入力A(8ビット)から入力B(8ビット)を減算する。出力A−Bは符号(SIGN1ビット)が付加されて9ビットとなる(B>Aの時負の値となるため)。加算器42は入力A(16ビット)と入力B(16ビット)を加算する。入力Aには、減算器41の出力が差分データとして入力される。符号(SIGN)は入力AのMSBから8ビットに入力され、下位はそれ以下の8ビットに入力される。すなわち、加算器42の入力Aは減算器41の出力を下位方向に8ビットシフトした差分データが入力されることになる。ここで、よく知られるように、2進数を下位方向に8ビットシフトすると、その2進数を「256」で割ったことになり、したがって、新係数の上位8ビットから旧係数の上位8ビットを減算し、算器42下位8ビット入力することは、次の差分データを加算器42の入力Aに与えることを意味している。
差分データ=(新係数−旧係数)/256・・・(1)
Each time the coefficient in the coefficient RAM (new) 32 is read by the count output of the program counter 27, it is compared with the new coefficient read from the coefficient RAM (previous stage) 31 by the comparator and does not match. The coefficient in the coefficient RAM (new) 32 is rewritten with a new coefficient. The rewritten new coefficient is output to the subtraction circuit 41. The subtracting circuit 41 subtracts 8 bits of the coefficient before change (referred to as old coefficient) output from the coefficient RAM (old) 33 from the higher 8 bits of the new coefficient. The adder 42 adds the subtraction result to the lower 8 bits of the output (16 bits) of the coefficient RAM (intermediate) 34. The sign is extended to the upper bits. FIG. 6 shows a specific configuration example. The subtraction circuit 41 subtracts the input B (8 bits) from the input A (8 bits). The output A-B is 9 bits by adding a sign (SIGN 1 bit) (because it becomes a negative value when B> A). The adder 42 adds the input A (16 bits) and the input B (16 bits). In the input A, the output of the subtracter 41 is input as difference data. The sign (SIGN) is input to 8 bits from the MSB of input A, and the lower order is input to 8 bits below it. That is, the difference data obtained by shifting the output of the subtracter 41 by 8 bits in the lower direction is input to the input A of the adder 42. Here, as is well known, when a binary number is shifted by 8 bits in the lower direction, the binary number is divided by “256”. Therefore, the upper 8 bits of the old coefficient are changed from the upper 8 bits of the new coefficient. subtraction, the adder 42 lower 8 bits input to means that provide the following difference data to input a of the adder 42.
Difference data = (new coefficient−old coefficient) / 256 (1)

加算回路42は、係数RAM(中間)34から出力される係数に上記の差分データを加算し、次式の加算結果(中間係数という)をセレクタ43の一方の入力端へ出力する。
中間係数=旧係数+差分データ・・・(2)
ここで、プログラムRAM22から出力されるプログラムステップに含まれている補間コントロール信号HCが補間実行を指示する”1”であった場合は、この中間係数がセレクタ43から出力され、演算回路23へ加えられる。またこの時、セレクタ37が切り換えられ、セレクタ43から出力された中間係数が係数RAM(中間)34に書き込まれる。
The adder circuit 42 adds the above difference data to the coefficient output from the coefficient RAM (intermediate) 34 and outputs the addition result of the following equation (referred to as an intermediate coefficient) to one input terminal of the selector 43.
Intermediate coefficient = old coefficient + difference data (2)
If the interpolation control signal HC included in the program step output from the program RAM 22 is “1” instructing execution of interpolation, the intermediate coefficient is output from the selector 43 and added to the arithmetic circuit 23. It is done. At this time, the selector 37 is switched, and the intermediate coefficient output from the selector 43 is written into the coefficient RAM (intermediate) 34.

次に、クロックパルスCLK1の1クロック後(クロックパルスCLK2の768クロック後)、再び係数RAM(新)32から同じ新係数が読み出されると、減算回路4において上記(1)式の減算が行われ、その減算結果に係数RAM(中間)34から読み出された中間係数(旧係数+差分データ)に差分データがさらに加算され、次の中間係数が得られる。
中間係数=旧係数+2×差分データ・・・(3)
そして、この中間係数がセレクタ43を介して演算回路23へ出力されると共に、係数RAM(中間)34に書き込まれる。
Then, (after 768 clock of the clock pulse CLK2) 1 clock after the clock pulse CLK1, the same new coefficients are read from the coefficient RAM (New) 32 Again, the in the subtraction circuit 4 1 (1) subtraction rows The difference data is further added to the intermediate coefficient (old coefficient + difference data) read from the coefficient RAM (intermediate) 34 to the subtraction result, and the next intermediate coefficient is obtained.
Intermediate coefficient = old coefficient + 2 x difference data (3)
The intermediate coefficient is output to the arithmetic circuit 23 via the selector 43 and written to the coefficient RAM (intermediate) 34.

以下、クロックパルスCLK1の1周期が経過する毎に同様の動作が繰り返され、これにより、セレクタ43から出力される中間係数が、図3(a)に示すように、旧係数から新係数まで、クロックパルスCLK1のタイミングで、かつ、上記差分データのピッチで単調に増加(差分データが正の場合)または減少(差分データが負の場合)する。   Thereafter, the same operation is repeated every time one cycle of the clock pulse CLK1 elapses, whereby the intermediate coefficient output from the selector 43 is changed from the old coefficient to the new coefficient as shown in FIG. It increases monotonously (when the difference data is positive) or decreases (when the difference data is negative) at the timing of the clock pulse CLK1 and at the pitch of the difference data.

そして、中間係数と新係数との差が上記(1)式の差分データより小になると、終了判定回路44がそれを検知し、終了信号を出力する。この終了信号が出力されると、セレクタ36、37、43が切り換えられ、係数RAM(新)32内の新係数が係数RAM(旧)33(上位8ビット)および係数RAM(中間)34に書き込まれる。一方、上記終了信号が出力される前にCPU1によって係数RAM(前段)31が書き換えられた場合は、その時点における中間係数の上位8ビットが係数RAM(旧)に書き込まれる。これにより、以後、図3(b)に示すように、その中間係数から新たな新係数(新々係数)に向かって中間係数が逐次変化する。   When the difference between the intermediate coefficient and the new coefficient becomes smaller than the difference data of the above equation (1), the end determination circuit 44 detects this and outputs an end signal. When this end signal is output, the selectors 36, 37 and 43 are switched, and the new coefficient in the coefficient RAM (new) 32 is written into the coefficient RAM (old) 33 (upper 8 bits) and the coefficient RAM (intermediate) 34. It is. On the other hand, when the coefficient RAM (previous stage) 31 is rewritten by the CPU 1 before the end signal is output, the upper 8 bits of the intermediate coefficient at that time are written in the coefficient RAM (old). As a result, thereafter, as shown in FIG. 3B, the intermediate coefficient sequentially changes from the intermediate coefficient toward a new new coefficient (new coefficient).

なお、上記説明は係数RAM31〜34の1つのアドレスについてであるが、他のアドレスの係数についても同様の動作が行われる。すなわち、CPU1によって新係数が、例えば、係数RAM(前段)31のアドレス0〜150に書き込まれた場合、各アドレス0〜150の新係数のそれぞれについて、上述した単調増加または減少による補間処理が行われる。   Although the above description is for one address of the coefficient RAMs 31-34, the same operation is performed for the coefficients of other addresses. That is, when a new coefficient is written by the CPU 1 at, for example, addresses 0 to 150 of the coefficient RAM (previous stage) 31, the above-described interpolation processing by monotonically increasing or decreasing is performed for each of the new coefficients at addresses 0 to 150. Is called.

また、旧係数と新係数の各上位8ビットが一致していた場合は、減算回路41の減算結果(差分データ)が「0」となり、この場合、補間が進まず、補間処理が終わらない。そこで、差分データが「0」の時は、係数RAM(中間)34の中間係数と係数RAM(新)32の新係数の大小比較を行い、その結果にしたがって減算回路41の出力を、次のように、+1または−1に置き換えるようになっている。
新係数中間係数・・・+1
新係数<中間係数・・・−1
この時、補間終了までの時間は、クロックパルスCLK1で1クロックから255クロックの範囲内で変動する。
If the upper 8 bits of the old coefficient and the new coefficient match, the subtraction result (difference data) of the subtraction circuit 41 is “0”. In this case, the interpolation does not proceed and the interpolation process does not end. Therefore, when the difference data is “0”, the intermediate coefficient of the coefficient RAM (intermediate) 34 and the new coefficient of the coefficient RAM (new) 32 are compared, and the output of the subtracting circuit 41 is changed according to the result. Thus, it is replaced with +1 or -1.
New coefficient > Intermediate coefficient +1
New coefficient <intermediate coefficient ...- 1
At this time, the time until the end of interpolation varies within the range of 1 clock to 255 clocks with the clock pulse CLK1.

以上が係数補間回路50における補間処理の詳細であるが、上記の補間処理は、プログラムRAM22内のプログラムの補間コントロール信号を”0”にすれば無効とすることができる。すなわち、補間コントロール信号が”0”の場合は、オアゲート45から”0”信号がセレクタ43へ出力され、これにより、セレクタ43が係数RAM(新)32から出力される係数を選択して演算回路23へ出力する。前述したように、係数RAM(新)32は、常時、最新の係数が書き込まれるRAMであり、したがって、補間コントロール信号が”0”の場合は係数補間が行われず、最新の係数が演算回路23へ供給される。   The above is the details of the interpolation processing in the coefficient interpolation circuit 50. The above-described interpolation processing can be invalidated by setting the program interpolation control signal in the program RAM 22 to "0". That is, when the interpolation control signal is “0”, the “0” signal is output from the OR gate 45 to the selector 43, whereby the selector 43 selects the coefficient output from the coefficient RAM (new) 32, and the arithmetic circuit To 23. As described above, the coefficient RAM (new) 32 is a RAM in which the latest coefficient is always written. Therefore, when the interpolation control signal is “0”, coefficient interpolation is not performed, and the latest coefficient is calculated by the arithmetic circuit 23. Supplied to.

次に、プログラム変更の場合について図4のフローチャートを参照して説明する。プログラムを変更する場合には、通常、係数も変更される。
プログラムおよび係数変更が行われる場合、CPU1が、まず、書き換え範囲を指定するデータを出力する。出力されたデータはスタートレジスタ51およびエンドレジスタ52に書き込まれる(ステップS1)。例えば、エフェクト用プログラムを書き換える場合、CPU1がアドレス0およびアドレス150を出力し、これらのアドレスがスタートレジスタ51およびエンドレジスタ52に書き込まれる。このスタートレジスタ51およびエンドレジスタ52の書き込みが行われると、以後、プログラムカウンタ27の出力がスタートアドレスからエンドアドレスの間の場合に比較回路54から”1”が出力され、これにより、アンドゲート55から全ビット”0”(NOP命令)が出力される(ステップS2)。
Next, the case of program change will be described with reference to the flowchart of FIG. When changing the program, the coefficients are usually changed.
When the program and coefficient are changed, the CPU 1 first outputs data specifying the rewrite range. The output data is written into the start register 51 and the end register 52 (step S1). For example, when the effect program is rewritten, the CPU 1 outputs the address 0 and the address 150, and these addresses are written in the start register 51 and the end register 52. When the start register 51 and the end register 52 are written, “1” is output from the comparison circuit 54 when the output of the program counter 27 is between the start address and the end address. All bits "0" (NOP instruction) are output from (step S2).

また、プログラムおよび係数変更が行われる場合、セレクタ36、37が切り換えられ、係数RAM32〜34の各々に係数RAM(前段)31の出力が書き込まれる状態となる。すなわち、係数補間回路50における係数補間処理が実質的に行われない状態となる(ステップS3)。   When the program and the coefficient are changed, the selectors 36 and 37 are switched, and the output of the coefficient RAM (previous stage) 31 is written in each of the coefficient RAMs 32 to 34. That is, the coefficient interpolation process in the coefficient interpolation circuit 50 is not substantially performed (step S3).

次に、CPU1が新プログラムおよび新係数を出力する。出力された新プログラムはプログラムRAM22に書き込まれ、また、この書き込みの間、アンドゲート55からNOP命令が出力される。したがって、書込みの間演算回路23は異常な出力を出すことはない。また、CPU1から出力された新係数は係数RAM(前段)31に書き込まれ、次いで、係数RAM32〜34に書き込まれる(ステップS4)。係数RAM32〜34の書き込みが終了すると、スタートレジスタ51およびエンドレジスタ52がクリアされ(ステップS5)、以後、新プログラムがアンドゲート55から出力される。また、新プログラムに同期して、係数RAM32〜34から新係数が出力されるが、これらは同じ係数であり、したがって、減算回路41の出力が「0」となり、係数補間回路40における旧係数から新係数への補間処理は行われない。この結果、プログラム変更時において、変更前の係数と変更後の係数との間で補間処理が行われるという不都合を防ぐことができる。   Next, the CPU 1 outputs a new program and a new coefficient. The output new program is written into the program RAM 22, and a NOP instruction is output from the AND gate 55 during this writing. Therefore, the arithmetic circuit 23 does not output an abnormal output during writing. Further, the new coefficient output from the CPU 1 is written in the coefficient RAM (previous stage) 31 and then written in the coefficient RAMs 32 to 34 (step S4). When the writing of the coefficient RAMs 32 to 34 is completed, the start register 51 and the end register 52 are cleared (step S5), and thereafter, a new program is output from the AND gate 55. In addition, new coefficients are output from the coefficient RAMs 32 to 34 in synchronization with the new program, but these are the same coefficients. Therefore, the output of the subtraction circuit 41 becomes “0”, and the old coefficients in the coefficient interpolation circuit 40 are changed. Interpolation to the new coefficient is not performed. As a result, when the program is changed, it is possible to prevent the inconvenience that the interpolation process is performed between the coefficient before the change and the coefficient after the change.

次に、終了判定回路44の動作を図5を参照して詳述する。
前述したように、終了判定回路44は、加算回路42から出力される中間係数と係数RAM(新)32から出力される新係数との差が一定値以下になった時、終了信号をオアゲート45を介してセレクタ43へ出力する。このような終了判定回路44を設けている理由は、減算回路41から出力される差分データが新係数の上位8ビットと旧係数上位8ビットの差であるため、旧係数に差分データを順次加算していった場合に、加算結果がちょうど新係数に一致するとは限らないからである。ここで、上記の一定値は、当然に予測されるように、新係数と旧係数の差である差分データが大きいほど大きい値となり、差分データが小さい場合は小さい値となる。したがって、差分データが大きい時は新係数と中間係数の上位の複数ビットが一致すれば、新係数と中間係数の差が一定値以下になったと判断することができ、一方、差分データが小さい時は、上位から数えてさらに多くのビットが一致しなければ、新係数と中間係数の差が一定値以下になったと判断することはできないことになる。
Next, the operation of the end determination circuit 44 will be described in detail with reference to FIG.
As described above, when the difference between the intermediate coefficient output from the adder circuit 42 and the new coefficient output from the coefficient RAM (new) 32 becomes equal to or less than a predetermined value, the end determination circuit 44 outputs an end signal to the OR gate 45. To the selector 43. The reason why such an end determination circuit 44 is provided is that the difference data output from the subtraction circuit 41 is the difference between the upper 8 bits of the new coefficient and the upper 8 bits of the old coefficient, so that the difference data is sequentially added to the old coefficient. This is because the addition result does not always coincide with the new coefficient. Here, as is naturally predicted, the constant value is larger as the difference data that is the difference between the new coefficient and the old coefficient is larger, and is smaller when the difference data is small. Therefore, when the difference data is large, it can be determined that the difference between the new coefficient and the intermediate coefficient is less than a certain value if the higher bits of the new coefficient and the intermediate coefficient match. If the number of bits counted from the higher order does not match, it cannot be determined that the difference between the new coefficient and the intermediate coefficient has become a certain value or less.

終了判定回路44はこの考えに従って形成されている。すなわち、差分データが+128〜+255の場合は、新係数と中間係数の各上位8ビットが一致すれば、下位8ビットがいかなるデータであっても差分データが+128〜+255以下になり、したがって、終了信号が出力される。差分データが+64〜+127の場合は、新係数と中間係数の各上位9ビットが一致すれば、下位7ビットがいかなるデータであっても差分データが+64〜+127以下になり、終了信号が出力される。図5は、このような差分データと比較ビットとの関係を示している。   The end determination circuit 44 is formed according to this idea. That is, if the difference data is +128 to +255, if the upper 8 bits of the new coefficient and the intermediate coefficient match, the difference data will be +128 to +255 or less regardless of what the lower 8 bits are. A signal is output. If the difference data is +64 to +127, if the upper 9 bits of the new coefficient and the intermediate coefficient match, the difference data will be +64 to +127 or lower regardless of what the lower 7 bits are, and an end signal is output. The FIG. 5 shows the relationship between such difference data and comparison bits.

以上がこの発明の一実施形態の詳細である。
上記実施形態によれば、プログラム中の係数コントロール信号HCによって係数補間を行うか行わないかを指定することができるので、係数の1つ1つに個別に補間するかしないかを設定することが可能となり、係数変更によるノイズを抑制したい処理には係数補間を行い、係数変更時の追従性を高めたい処理には係数補間を行わないという選択を自由に行うことができる。
The above is the details of one embodiment of the present invention.
According to the above embodiment, whether or not to perform coefficient interpolation can be specified by the coefficient control signal HC in the program, so it is possible to set whether or not to interpolate individually for each coefficient. Thus, it is possible to freely select the coefficient interpolation for the process for suppressing the noise due to the coefficient change and not to perform the coefficient interpolation for the process for improving the followability at the time of the coefficient change.

また、係数補間終了後や係数補間せずの場合に、係数RAM(前段)31から係数RAM(旧)33および係数RAM(中間)34への係数転送を停止することや、係数RAM(旧)33、係数RAM(中間)34の係数読み出しを停止することによってパワーセーブをすることが可能となる。   Further, after the coefficient interpolation is completed or when the coefficient interpolation is not performed, the coefficient transfer from the coefficient RAM (previous stage) 31 to the coefficient RAM (old) 33 and the coefficient RAM (middle) 34 is stopped, or the coefficient RAM (old) 33, by stopping the coefficient reading of the coefficient RAM (intermediate) 34, the power can be saved.

また、上記実施形態によれば、乗算器を使用せずに、データシフト後の差分計算によって係数補間を行うようになっている。差分計算後にデータシフトを行う場合は係数長16ビット、補間完了まで256ステップの場合、係数RAMに16ビット分全て記憶しておく必要がある。しかし、データシフト後に差分計算であると、シフト後に破棄されると分かっている下位8ビット分は最初から不要で上位8ビット分の係数だけを持っていればよいことになり、回路削減の効果がある。   Further, according to the above-described embodiment, coefficient interpolation is performed by difference calculation after data shift without using a multiplier. When the data shift is performed after the difference calculation, the coefficient length is 16 bits, and when the interpolation is completed in 256 steps, it is necessary to store all 16 bits in the coefficient RAM. However, if the difference calculation is performed after the data shift, the lower 8 bits that are known to be discarded after the shift are unnecessary from the beginning, and it is only necessary to have the coefficients for the upper 8 bits. There is.

この発明は、携帯端末における着信音やゲームの効果音の生成等に用いられる。   The present invention is used for generating ringtones and game sound effects in a portable terminal.

この発明の一実施形態による係数補間回路を適用した楽音信号生成回路Gの構成を示すブロック図である。It is a block diagram which shows the structure of the musical tone signal generation circuit G to which the coefficient interpolation circuit by one Embodiment of this invention is applied. 同楽音信号生成回路Gを用いた携帯電話機の構成を示すブロック図である。3 is a block diagram showing a configuration of a mobile phone using the musical tone signal generation circuit G. FIG. 同楽音信号生成回路Gの動作を説明するための図である。FIG. 6 is a diagram for explaining the operation of the music signal generation circuit G. 同楽音信号生成回路Gの動作を説明するためのフローチャートである。4 is a flowchart for explaining the operation of the musical tone signal generation circuit G. 同楽音信号生成回路Gにおける終了判定回路44の動作を説明するための図である。It is a figure for demonstrating operation | movement of the completion | finish determination circuit 44 in the same tone signal generation circuit G. 同楽音信号生成回路Gにおける係数RAM32〜34、減算回路41、加算回路42による構成をさらに詳細に示した回路図である。4 is a circuit diagram showing in more detail the configuration of coefficient RAMs 32 to 34, a subtracting circuit 41, and an adding circuit 42 in the musical tone signal generating circuit G. FIG.

符号の説明Explanation of symbols

1…CPU、12…バッファレジスタ、13…音源回路、14…データ処理回路(DSP)、21…データRAM、22…プログラムRAM、23…演算回路、24…バッファメモリ、27…プログラムカウンタ、31…係数RAM(前段)、32…係数RAM(新)、33…係数RAM(旧)、34…係数RAM(中間)、36、37、43…セレクタ、41…減算回路、42…加算回路、44…終了判定回路、50…係数補間回路。 DESCRIPTION OF SYMBOLS 1 ... CPU, 12 ... Buffer register, 13 ... Sound source circuit, 14 ... Data processing circuit (DSP), 21 ... Data RAM, 22 ... Program RAM, 23 ... Arithmetic circuit, 24 ... Buffer memory, 27 ... Program counter, 31 ... Coefficient RAM (previous stage), 32 ... Coefficient RAM (new), 33 ... Coefficient RAM (old), 34 ... Coefficient RAM (middle), 36, 37, 43 ... Selector, 41 ... Subtractor circuit, 42 ... Adder circuit, 44 ... End determination circuit, 50... Coefficient interpolation circuit.

Claims (2)

外部の制御装置から出力されたプログラムが記憶されたプログラムメモリと、
外部の制御装置から出力された係数が記憶された係数メモリと、
プログラムカウンタから出力されるアドレスデータに従って、前記プログラムメモリ内のプログラムおよび前記係数メモリ内の係数を順次読み出し、前記プログラムおよび前記係数に従って動作する演算回路とを具備するデータ処理回路において、
外部の制御装置から前記係数の変更を指示されると、変更後の新係数が記憶される新係数メモリと、
外部の制御装置から前記係数の変更を指示されると、変更前の旧係数が記憶される中間係数メモリと、
前記中間係数メモリ内の旧係数から前記新係数メモリ内の新係数に向かって順次変化する係数を生成する係数生成手段と、
前記プログラムには係数補間を指示するか否かを示す補間制御情報が含まれており、前記プログラムメモリから読み出されたプログラムに含まれる補間制御情報が係数補間を指示している時は前記係数生成手段の出力を前記演算回路へ出力し、前記補間制御情報が係数補間を指示していない時は前記新係数メモリから読み出される係数を前記演算回路へ出力する選択手段と、
を具備し、
前記係数生成手段は、前記新係数メモリから読み出された新係数を所定ビット下位方向へシフトしたデータから、前記中間係数メモリから読み出された変更前の旧係数を前記所定ビット下位方向へシフトしたデータを減算する減算手段と、
前記減算手段の出力と前記中間係数メモリの出力を加算する加算手段と、
前記加算手段の出力を前記中間係数メモリへ書き込む書込手段と、
前記減算手段の出力の大きさに対応してビット数N(Nは正の整数)を決定する決定手段を有しており、前記新係数メモリの出力の上位Nビットのデータと前記加算手段の出力の上位Nビットのデータが一致した時、補間終了と判定する終了判定手段と、
を具備し、
前記選択手段は、前記終了判定手段にて補間終了と判定した時、前記新係数メモリから読み出される係数を前記演算回路へ出力することを特徴とするデータ処理回路における係数補間回路。
A program memory in which a program output from an external control device is stored;
A coefficient memory in which coefficients output from an external control device are stored;
In accordance with address data output from a program counter, a data processing circuit comprising: an operation circuit that sequentially reads out a program in the program memory and a coefficient in the coefficient memory and operates according to the program and the coefficient;
A new coefficient memory for storing a new coefficient after the change when the change of the coefficient is instructed from an external control device;
When instructed to change the coefficient from an external control device, an intermediate coefficient memory in which the old coefficient before the change is stored;
Coefficient generating means for generating a coefficient that sequentially changes from an old coefficient in the intermediate coefficient memory toward a new coefficient in the new coefficient memory;
The program includes interpolation control information indicating whether or not coefficient interpolation is instructed. When the interpolation control information included in the program read from the program memory indicates coefficient interpolation, the coefficient Selecting means for outputting the output of the generating means to the arithmetic circuit, and outputting the coefficient read from the new coefficient memory to the arithmetic circuit when the interpolation control information does not instruct coefficient interpolation;
Equipped with,
The coefficient generation means shifts the old coefficient before change read from the intermediate coefficient memory from the data obtained by shifting the new coefficient read from the new coefficient memory to the predetermined bit lower direction. Subtracting means for subtracting the obtained data;
Adding means for adding the output of the subtracting means and the output of the intermediate coefficient memory;
Writing means for writing the output of the adding means to the intermediate coefficient memory;
Determining means for determining the number of bits N (N is a positive integer) corresponding to the magnitude of the output of the subtracting means; the upper N bits of data of the new coefficient memory; An end determination means for determining the end of interpolation when the upper N bits of output data match,
Comprising
The coefficient interpolating circuit in the data processing circuit , wherein the selecting means outputs the coefficient read from the new coefficient memory to the arithmetic circuit when the end judging means judges that the interpolation is finished .
前記減算手段は、前記減算の結果が零であることを示すとき、前記新係数メモリから読み出した新係数と前記中間係数メモリから読み出した係数とを比較し、比較の結果、前記新係数が前記係数より大きい場合は+1、前記新係数が前記係数より小さい場合は−1、を出力することを特徴とする請求項1に記載のデータ処理回路における係数補間回路。 When the subtraction means indicates that the result of the subtraction is zero, the subtraction unit compares the new coefficient read from the new coefficient memory with the coefficient read from the intermediate coefficient memory. 2. The coefficient interpolation circuit in the data processing circuit according to claim 1, wherein +1 is output when the coefficient is larger than a coefficient, and -1 is output when the new coefficient is smaller than the coefficient.
JP2004240707A 2004-08-20 2004-08-20 Coefficient interpolation circuit in data processing circuit Expired - Fee Related JP4385893B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004240707A JP4385893B2 (en) 2004-08-20 2004-08-20 Coefficient interpolation circuit in data processing circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004240707A JP4385893B2 (en) 2004-08-20 2004-08-20 Coefficient interpolation circuit in data processing circuit

Publications (2)

Publication Number Publication Date
JP2006058626A JP2006058626A (en) 2006-03-02
JP4385893B2 true JP4385893B2 (en) 2009-12-16

Family

ID=36106135

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004240707A Expired - Fee Related JP4385893B2 (en) 2004-08-20 2004-08-20 Coefficient interpolation circuit in data processing circuit

Country Status (1)

Country Link
JP (1) JP4385893B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014204213A (en) * 2013-04-03 2014-10-27 パイオニア株式会社 Digital filter and filter characteristic modification method

Also Published As

Publication number Publication date
JP2006058626A (en) 2006-03-02

Similar Documents

Publication Publication Date Title
JP4636926B2 (en) Multi-bit ΔΣ modulation type DA converter
US8175525B2 (en) Conversion from note-based audio format to PCM-based audio format
JP4385893B2 (en) Coefficient interpolation circuit in data processing circuit
JP4400373B2 (en) Data processing circuit
US20080263268A1 (en) Digital signal processor
US5522010A (en) Pitch control apparatus for setting coefficients for cross-fading operation in accordance with intervals between write address and a number of read addresses in a sampling cycle
JP2950461B2 (en) Tone generator
JP2634561B2 (en) Variable delay circuit
US5956670A (en) Speech reproducing device capable of reproducing long-time speech with reduced memory
CA2568117C (en) Conversion from note-based audio format to pcm-based audio format
JP4545272B2 (en) Digital attenuator and digital attenuation processing method
KR100236786B1 (en) Sound source device
JP3601164B2 (en) Echo suppressor method and echo suppressor device
JP2001154673A (en) Sound source circuit and telephone terminal device using the circuit
JP3383474B2 (en) Sound effect giving device and sound effect giving system
JP2008047223A (en) Audio reproduction circuit
JP2008061053A (en) Signal processing apparatus
JP4306944B2 (en) Music playback device
JPH03201900A (en) Sound field correction device
JP3223555B2 (en) Waveform reading device
KR100729510B1 (en) Mobile phone with different speaker driving modes according to usage
KR840002361B1 (en) Lattice filter for waveform or speech synthesis circuits using digital filter
US5932826A (en) Effect adder circuit with a coefficient smoothing circuit for an electronic musical instrument
JPH04129497A (en) Master slave telephone system and facsimile equipment
JP2007235265A (en) Portable terminal

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070618

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080826

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081027

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090113

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090316

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090819

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090908

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090921

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121009

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131009

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees