JPH01112294A - Average calculation device with hysteresis characteristics - Google Patents
Average calculation device with hysteresis characteristicsInfo
- Publication number
- JPH01112294A JPH01112294A JP63151943A JP15194388A JPH01112294A JP H01112294 A JPH01112294 A JP H01112294A JP 63151943 A JP63151943 A JP 63151943A JP 15194388 A JP15194388 A JP 15194388A JP H01112294 A JPH01112294 A JP H01112294A
- Authority
- JP
- Japan
- Prior art keywords
- data
- calculation
- output
- digital signal
- average
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Electrophonic Musical Instruments (AREA)
Abstract
(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.
Description
【発明の詳細な説明】
〔発明の技術分野〕
本発明は、連続的に変化するデジタル信号の平均値、特
にヒステリシス特性をもつ平均値を算出するようにした
平均演算装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Technical Field of the Invention] The present invention relates to an average calculation device that calculates an average value of a continuously changing digital signal, particularly an average value having hysteresis characteristics.
従来より連続的に変化するデジタル信号について量子化
時の誤差、デジタル信号自体のゆらぎなどの原因により
、デジタル値が激しく変動してしまうといった問題があ
る。例えば、スレソシュホ−ルドレベル近くの信号を量
子化した場合、デジタル信号が値nと値n+1 (n
、n+1は特定の値)とをランダムにくり返してしまう
ことが起こり得る。Conventionally, there has been a problem with digital signals that change continuously, such that the digital values fluctuate drastically due to causes such as errors during quantization and fluctuations in the digital signal itself. For example, if a signal near the threshold hold level is quantized, the digital signal will have values n and n+1 (n
, n+1 is a specific value) may be repeated randomly.
このような木来望ましくないデジタル値の変化を抑止す
るために、例えば2つのスレッシュホールドレベルを準
備し、過去のデジタル値に依存してこの2つのスレッシ
ュホールドレベルを選択的に切換えることなどが考えら
れている。具体的には、過去に値nと決定したら、値n
+1と値nとの間のスレッシュホールドレベルとしてよ
り高いものを選択し、逆に過去に値n+1と決定したら
値n+1と値nとの間のスレッシュホールドレベルとし
てより低いものを選択するといったようにである。この
ようにすれば、上述したデジタル信号の無意味な変化が
低減される。しかるにこの場合は、2つのスレッシュホ
ールドレベルを各レベル間でもっておかねばならぬ、例
えばROMに記憶しておかねばならぬという問題が生じ
る。また、過去にとった値がnなのかn+1なのかを判
定して、スレッシュホールドレベルを切換えるための回
路構成が必要となる。In order to suppress such undesirable changes in digital values, for example, it is possible to prepare two threshold levels and selectively switch between these two threshold levels depending on past digital values. It is being Specifically, if the value n was determined in the past, the value n
A higher threshold level is selected between +1 and the value n, and conversely, if the value n+1 was determined in the past, a lower threshold level is selected between the value n+1 and the value n. It is. In this way, the above-mentioned meaningless changes in the digital signal are reduced. However, in this case, a problem arises in that two threshold levels must be maintained between each level, for example, they must be stored in a ROM. Further, a circuit configuration is required to determine whether the value taken in the past is n or n+1 and to switch the threshold level.
本発明は、上記問題点を解決するためになされたもので
、簡単な構成で上記例と同様のヒステリシス特性をもつ
デジタル出力を得ることができる平均演算装置を提供す
ることを目的とする。The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide an average calculation device that can obtain a digital output having a hysteresis characteristic similar to that of the above-mentioned example with a simple configuration.
すなわち、本発明は上記目的を達成すべく、デジタル信
号出力手段が出力するデジタル信号を新しい順に所定個
数記憶手段が書き替えながら記taするようにし、この
内容と以前に得た計算結果との平均を演算手段で計算す
るようにし、供給手段は、前記演算手段にて得られる計
算結果を新たなデジタル信号として出力するとともに、
再度前記演算手段に前記以前に得た計算結果として供給
するようにしたことを要点とする。That is, in order to achieve the above object, the present invention records a predetermined number of digital signals output by the digital signal output means while rewriting them in order of newest, and averages the contents of the digital signals and the previously obtained calculation results. is calculated by the calculation means, and the supply means outputs the calculation result obtained by the calculation means as a new digital signal, and
The key point is that the previously obtained calculation result is supplied to the calculation means again.
従って、前記供給手段が出力する前記新たなデジタル信
号は、前記デジタル信号出力手段が出力する前記デジタ
ル信号に対してヒステリシス特性=3−
をもつ平均値となっている。そのため、デジタル信号が
上述したような(i:nと、値fi+lとを繰り返しと
ってしまうといったことが解消される。Therefore, the new digital signal outputted by the supplying means is an average value having a hysteresis characteristic of 3- with respect to the digital signal outputted by the digital signal outputting means. Therefore, the above-mentioned situation in which the digital signal repeatedly takes (i:n and the value fi+l) is eliminated.
以下、この発明をピンチ抽出機能を有する電子楽器に適
用した場合の、具体的にはピッチデータとしてヒステリ
シス特性をもつ平均値を使用する一実施例につき以下に
詳述する。Hereinafter, an example in which the present invention is applied to an electronic musical instrument having a pinch extraction function, specifically, an average value having a hysteresis characteristic is used as pitch data will be described in detail.
第1図は実施例の回路構成図であり、音声入力に対応し
て楽音を発生ずる電子楽器の構成を示している。音声を
電気信号に変換するマイクロホン1の出力は前処理部2
に加わる。前処理部2の出力はピンチ抽出部3に接続さ
れる。ピンチ抽出部3の出力はラッチ4を介してプロセ
ッサ(CP U)5に加わる。プロセッサ5の出力はピ
ンチ抽出部3、記1.W部6、エラー除去部7、移動平
均演算部8、フラグ作成部9に接続されている。記憶部
6の出力はエラー除去部7とピッチデータ制御部10に
、エラー除去部7の出力は平均演算、例えば移動平均演
算を行う移動平均演算部8とビワチデ−タ制御部10に
それぞれ加わる。移動平均演算部8の出力はピッチデー
タ制御部10とコードジェネレータ11に接続される。FIG. 1 is a circuit configuration diagram of an embodiment, showing the configuration of an electronic musical instrument that generates musical tones in response to audio input. The output of the microphone 1, which converts audio into electrical signals, is processed by the preprocessing unit 2.
join. The output of the preprocessing section 2 is connected to the pinch extraction section 3. The output of the pinch extractor 3 is applied to a processor (CPU) 5 via a latch 4. The output of the processor 5 is sent to the pinch extraction unit 3, described in 1. It is connected to the W section 6, the error removal section 7, the moving average calculation section 8, and the flag creation section 9. The output of the storage section 6 is applied to an error removal section 7 and a pitch data control section 10, and the output of the error removal section 7 is applied to a moving average calculation section 8 and a pitch data control section 10 for performing an average calculation, for example, a moving average calculation. The output of the moving average calculation section 8 is connected to a pitch data control section 10 and a code generator 11.
またピッチデータ制御部10の出力もコードジェネレー
タ11に接続される。コードジェネレータ11の出力は
楽音発生部12に接続され、その楽音発生部12の出力
は電気信号を音に変換するスピーカ13に接続される。Further, the output of the pitch data control section 10 is also connected to the code generator 11. The output of the code generator 11 is connected to a musical tone generator 12, and the output of the musical tone generator 12 is connected to a speaker 13 that converts an electrical signal into sound.
マイクロホン1で電気信号に変換された音声信号は前処
理部2に加わり、前処理がなされる。この前処理は第1
には例えばローパスフィルタ(1,。The audio signal converted into an electrical signal by the microphone 1 is applied to a preprocessing section 2, where it is preprocessed. This pretreatment is the first
For example, a low-pass filter (1,.
PF)等によって帯域外の信号の除去を行なう。PF) etc. to remove out-of-band signals.
この帯域外の除去は次段によってなされるピンチ抽出の
誤動作を防止するためになされるのである。This out-of-band removal is done to prevent malfunctions in the pinch extraction performed by the next stage.
さらに前処理は第2にはオートマチックゲインコントロ
ール回路によって帯域外が除去された入力音声信号を特
定の振幅値になるように増幅する。Furthermore, the second step of the preprocessing is to amplify the input audio signal from which out-of-band components have been removed by an automatic gain control circuit to a specific amplitude value.
第3には前述の特定の振幅値となった入力音声信号をア
ナログ/デジタル変換回路によってデジタルデータに変
換する。前述の特定の振幅値になるような増幅は、この
アナログ/デジタル変換回路の出力ビット数を有効にす
るためになされるものである。Third, the input audio signal having the above-mentioned specific amplitude value is converted into digital data by an analog/digital conversion circuit. The aforementioned amplification to achieve the specific amplitude value is performed in order to make the number of output bits of this analog/digital conversion circuit effective.
前処理部2で処理された音声信号即ちデジタル音声信号
はピンチ抽出部3に加わる。ピンチ抽出部3はプロセッ
サ(CPU)5の制御によって入力音声信号の基本周波
数のピッチを抽出する。ピンチ抽出部3は例えば特願昭
58−31284号、特願昭58−31285号、特願
昭58−31286号の各公報に詳細が記載されている
が音声データ量子化回路、音階抽出回路、3値相関処理
回路を有し、これらの回路によってピッチ抽出を行なう
。データ量子化回路は音声デジタルデータの最大値と最
小値を特定時間に亘って順次求め、その最大値、最小値
を用いて例えば3値化するためのそれぞれのスレッシホ
ールドレヘルを決定する。そしてそのスレッシホールド
で入力信号を3値化する。音声抽出回路は前述の音声デ
ジタルデータを用いて3値化した音声3値化データを抽
出する音階に対応させて遅延させ、その遅延データと入
力データとを乗算する回路である。この回路によって時
間に関する相関が取られる。このデータは単に遅延デー
タと入カデ°−夕との単なる時間に関する相関を表わす
ものであり、このデータを更に処理してピッチの抽出を
行なう。この抽出を行なうのが前述した3値相関処理回
路である。3値相関処理回路はピッチ抽出を行なうため
のウィンド処理等を行なう回路である。即ち、抽出する
音階に対応して前述の音階抽出回路より複数のデータが
出力されるので、この3値相関処理回路でその複数のデ
ータをウィンド処理、換言するならば音階に関係して重
み付けを行ない、さらにそれを特定時間(1フレーム)
累算する。そして、その累算値(遅延時間に対応した累
算値)の中から最大値を求め、その最大値に対応した遅
延時間よりピンチを求め出力する。この出力は入力した
音声(音調波を含む)の基本波のピンチに関係したデー
タである。The audio signal processed by the preprocessing section 2, that is, the digital audio signal, is applied to the pinch extraction section 3. The pinch extractor 3 extracts the pitch of the fundamental frequency of the input audio signal under the control of the processor (CPU) 5. The pinch extraction unit 3 includes an audio data quantization circuit, a scale extraction circuit, etc., details of which are described in, for example, Japanese Patent Application No. 58-31284, Japanese Patent Application No. 58-31285, and Japanese Patent Application No. 58-31286. It has a ternary correlation processing circuit and performs pitch extraction using these circuits. The data quantization circuit sequentially obtains the maximum and minimum values of the audio digital data over a specific period of time, and uses the maximum and minimum values to determine respective threshold levels for ternarization, for example. Then, the input signal is ternarized using that threshold. The audio extraction circuit is a circuit that delays audio ternary data obtained by ternarizing audio data using the aforementioned audio digital data in correspondence with the scale to be extracted, and multiplies the delayed data by input data. This circuit provides time correlation. This data simply represents the temporal correlation between the delay data and the input data, and is further processed to perform pitch extraction. The above-mentioned ternary correlation processing circuit performs this extraction. The ternary correlation processing circuit is a circuit that performs window processing and the like for pitch extraction. That is, since a plurality of pieces of data are outputted from the above-mentioned scale extraction circuit corresponding to the scale to be extracted, the plurality of data are subjected to window processing in this ternary correlation processing circuit, in other words, they are weighted in relation to the scale. and then repeat it for a specific time (1 frame)
Accumulate. Then, the maximum value is determined from the accumulated values (accumulated values corresponding to the delay times), and the pinch is determined and output from the delay time corresponding to the maximum value. This output is data related to the pinch of the fundamental wave of the input audio (including tonic waves).
前述のピンチ抽出部3より出力されたピッチデータはラ
ッチ4、プロセッサ5を介して記憶部6に格納される。The pitch data output from the pinch extraction section 3 described above is stored in the storage section 6 via the latch 4 and the processor 5.
エラー除去部7は記憶部6に格納されたデータを用いて
特定なピッチデータの変化特に1フレームにおいてのみ
例えば1オクタ一ブ以上の変化を検出し、その変化が検
出された時はそのデータを変化する前のデータにもどす
ための回路である。尚、急激な音階の変化もありうるが
、この時には1フレーム後にデータが変化するようにな
されている。エラー除去部7においてエラー除去された
データは移動平均演算部8において平均がなされる。こ
の平均は例えば現在までの平均と6フレームにわたるデ
ータとを重み付けを行なった加算平均である。さらに詳
しく説明すると、この演算部8では、順次入力するフレ
ーム単位でのピンチデータをシフトレジスタに格納して
フレーム単位でシフトし、その6段のシフトデータと平
均値とをセレクタによって1フレ一ム期間内で選択して
累算し、下位ビットを例えば切り捨てることによって平
均を行なっている。The error removal unit 7 uses the data stored in the storage unit 6 to detect a change in specific pitch data, especially a change of one octave or more in only one frame, and when the change is detected, the data is This is a circuit to restore the data to the state before it changed. Incidentally, there may be a sudden change in the scale, but in this case the data changes after one frame. The data from which errors have been removed in the error removal section 7 is averaged in a moving average calculation section 8. This average is, for example, a weighted average of the average up to now and data over six frames. To explain in more detail, this calculation unit 8 stores sequentially input pinch data in frame units in a shift register and shifts them in frame units, and the six stages of shift data and the average value are transferred to one frame by a selector. The average is performed by selecting and accumulating within a period and truncating the lower bits, for example.
平均化されたデータは移動平均演算部8より出力され、
ピッチデータ制御部10に加わり楽音を発生するための
処理がなされる。換言するならば前述したエラー除去部
7は外部雑音等によってピンチ抽出の誤動作を検出し、
除去する回路であり、ピッチ抽出の誤動作の結果による
ステップ的な大きなデータの変化を除去するものもある
。そして移動平均演算部は入力音声等の微妙なピンチ変
化によるピンチの誤抽出のデータの微妙変化をヒステリ
シス効果を有し平均を行なってデータを安定化させるた
めの回路である。The averaged data is output from the moving average calculation unit 8,
It is added to the pitch data control section 10 and performs processing for generating musical tones. In other words, the error removal unit 7 described above detects a malfunction in pinch extraction due to external noise, etc.
There are also circuits that remove large, step-like data changes resulting from pitch extraction malfunctions. The moving average calculation unit is a circuit that has a hysteresis effect and averages subtle changes in data due to pinch errors caused by subtle pinch changes in input audio, etc., to stabilize the data.
人間の声は歌に限らず子音、母音を有している。The human voice is not limited to singing; it also has consonants and vowels.
母音の基本波のピンチは多く含まれているが、子音にお
いては非常に少ないものがある。この為、子音のみを発
生している間(例えば“SA”を発生する場合には“S
”を発生している間)は基本波のピッチは誤って抽出さ
れることがある。これらの誤抽出による楽音の誤動作を
なくし、入力した音声の音階になるようにするのがピン
チデータ制御部である。そしてこの制御部は音声パワー
や音声入力検出等のデータを用いて、記憶部6に格納さ
れているデータやエラー除去部7の出力データあるいは
移動平均演算部8の出力データを選択して出力する。There are many pinches of the fundamental wave in vowels, but there are very few pinches in consonants. For this reason, while only consonants are being produced (for example, when producing "SA", "S"
”), the pitch of the fundamental wave may be extracted incorrectly.The pinch data control unit eliminates malfunctions of musical tones due to these incorrect extractions and ensures that the pitch corresponds to the pitch of the input voice. Then, this control section selects the data stored in the storage section 6, the output data of the error removal section 7, or the output data of the moving average calculation section 8, using data such as audio power and audio input detection. and output it.
コードジェネレータ11は前述のピンチ制御8′■部1
0の出力を楽音発生部12において発生すべき楽音のコ
ード即ち楽音データに変換する回路である。The code generator 11 is the pinch control section 1 of the aforementioned pinch control 8'■
This circuit converts the output of 0 into the code of the musical tone to be generated by the musical tone generating section 12, that is, musical tone data.
前述したピッチ抽出部3、記憶部6、エラー除去部7、
移動平均演算部8はプロセッサ5の制御によってなされ
る。またピッチデータ制御部10、コードジェネレータ
11はフラグ作成部9を介してプロセッサ5によって制
御される。換言するならば、プロセッサ5によってフラ
グ作成部9にフラグ等がセットされ、そのフラグによっ
て前述のピッチデータ制御部10、コードジェネレータ
11が動作する。The pitch extraction unit 3, storage unit 6, error removal unit 7,
The moving average calculation unit 8 is controlled by the processor 5. Further, the pitch data control section 10 and the code generator 11 are controlled by the processor 5 via the flag generation section 9. In other words, the processor 5 sets a flag in the flag generation section 9, and the pitch data control section 10 and code generator 11 described above operate according to the flag.
コードジェネレータ11の出力即ち変換データは楽音発
生部12に加わり、スピーカ13により出力されるべく
楽音の指定を行なう。換言するならば、楽音発生部12
ではコードジェネレータ11の変換データによって指定
される楽音電気信号(アナログ)を発生し、スピーカ1
3にそれを加える。その結果、スピーカ13より入力音
声に対応した楽音が発生するのである。The output of the code generator 11, ie, the converted data, is applied to the musical tone generator 12, and specifies the musical tone to be output by the speaker 13. In other words, the musical tone generator 12
Then, a musical tone electrical signal (analog) specified by the conversion data of the code generator 11 is generated, and the signal is output from the speaker 1.
Add that to 3. As a result, the speaker 13 generates a musical tone corresponding to the input voice.
第1図に示した回路は音声入力に対応して楽音を発生す
る電子楽器の構成を表したものであり、以下にさらに本
発明の移動平均演算装置を詳述する。The circuit shown in FIG. 1 represents the configuration of an electronic musical instrument that generates musical tones in response to audio input, and the moving average calculation device of the present invention will be further detailed below.
第2図は第1図の移動平均演算部8を更に詳細に表した
回路図である。FIG. 2 is a circuit diagram showing the moving average calculating section 8 of FIG. 1 in more detail.
エラー除去部7の出力はラッチ14を介してシフトレジ
スタ15に加わる。シフI・レジスタ15とランチ16
の出力はセレクタ17に加わる。またクロックφ。が加
わる8進カウンタ18の出力もセレクタ17に加わる。The output of the error removing section 7 is applied to the shift register 15 via the latch 14. Schiff I register 15 and lunch 16
The output is applied to the selector 17. Also clock φ. The output of the octal counter 18 is also added to the selector 17.
アダー19の第1の入力には前述のセレクタ17の出力
が、第2の入力にはラッチ20を介してアダー19の出
力がそれぞれ加わる。さらに、アダー19の出力はラッ
チ20を介してラッチ21に加わる。ラッチ21の上位
8ビツト出力はアダーの第1の入力に加わり、ラッチ2
1の9ビツト目の出力はアダー22のキャリー人力に加
わる。そしてアダーの出力はラノチ23を介してラッチ
16に加わるとともに次段のカウンタ即ちピッチデータ
制’4NrJ部10に出力される。The output of the selector 17 described above is applied to the first input of the adder 19, and the output of the adder 19 is applied to the second input via the latch 20. Further, the output of adder 19 is applied to latch 21 via latch 20. The upper 8-bit output of latch 21 is applied to the first input of the adder, and the output of latch 21 is
The output of the 9th bit of 1 is added to the carry power of the adder 22. The output of the adder is applied to the latch 16 via the latch 23 and is also output to the next stage counter, that is, the pitch data system '4NrJ section 10.
エラー除去部7によってエラー除去されたピッチデータ
例えば8ビツトのデータは1フレ一ム間のデータとして
ラッチ14に格納される。このラッチ14は、エラー除
去した結果をフレーム単位で処理する為に、フレームク
ロックφ、でデータを取り込む。The pitch data, for example 8-bit data, from which errors have been removed by the error removing section 7 is stored in the latch 14 as data for one frame. This latch 14 takes in data at the frame clock φ in order to process the error removed result in units of frames.
シフトレジスタ15は8ビツトのパラレルデータのシフ
トを行なうレジスタであり、フレームクロックφ、でシ
フトする。即ち、ランチに格納されたデータはフレーム
単位で順次シフトレジスタに格納され、シフトする。換
言するならばシフトレジスタ15は平均を求めるために
現在のデータより前の6データを記jlする回路である
。The shift register 15 is a register for shifting 8-bit parallel data, and is shifted in response to a frame clock φ. That is, the data stored in the launch is sequentially stored in a shift register in units of frames and shifted. In other words, the shift register 15 is a circuit that records six data preceding the current data in order to obtain an average.
一方、ランチ16は2組のランチ回路であり、このラッ
チ16にばこの移動平均演算部8の出力と同じデータが
加わる。そして、2組のランチには同じデータが格納さ
れる。セレクタ17は前述のシフトレジスタ15内に格
納されている6バイト(1バイトには8ビツト)のデー
タとラッチ16に格納されている向し2バイトを1フレ
ーム内で順次選択し、出力する。尚、この選択の指示は
1フレ一ム間においては8クロツクを有するクロックφ
。によって歩進する8進カウンク18のカウンタ値によ
ってなされる。On the other hand, the launch 16 is two sets of launch circuits, and the same data as the output of the moving average calculating section 8 of the tobacco is applied to this latch 16. The same data is stored in the two lunches. The selector 17 sequentially selects and outputs the 6-byte data (8 bits per byte) stored in the shift register 15 and the 2-byte data stored in the latch 16 within one frame. Note that this selection instruction is given by the clock φ having 8 clocks during one frame.
. This is done by the counter value of the octal counter 18, which is incremented by .
アダー19の出力はランチ20を介して第2の入力に加
わっているので、この回路の出力即ちランチ20の出力
はアダー19の第1の入力に加わるデータを順次φ。で
累算する累算力うンタを構成する。尚、このラッチ20
は1フレームの終了で発生するりセットクロックφ□で
リセソ1−されるのでフレーム単位での累算となる。Since the output of the adder 19 is applied to the second input via the launch 20, the output of this circuit, that is, the output of the launch 20, sequentially transfers the data applied to the first input of the adder 19 to φ. Configure a cumulative power counter that accumulates with . Furthermore, this latch 20
is generated at the end of one frame and is reset to 1- by the set clock φ□, so it is accumulated in units of frames.
そして、アダー19の第1の入力には前述したセレクタ
17によって順次クロックφ。に対応してシフトレジス
タ15、ラッチ16の内容が選択されて加わるので、前
述した累算回路の累算出力は6フレームにわたった累算
と、現在出力しているデータの2倍の値とが加算された
値となる。即ち、シフトレジスタ15に格納されている
データをり。+ 1 ”’ D 、、。6、ラッチ23
より出力されているデータをD9とするならば、前述し
た累算回路の累算出力DXは
DX −Σ Drl+ノ + 2 ・ Dsl=+
となる。The first input of the adder 19 is sequentially supplied with a clock φ by the selector 17 described above. Since the contents of the shift register 15 and latch 16 are selected and added in accordance with is the added value. That is, the data stored in the shift register 15 is read. + 1 ”' D, . 6, latch 23
If the data being outputted from the D9 is D9, the accumulated output DX of the above-mentioned accumulating circuit becomes DX - Σ Drl+ノ + 2 · Dsl=+.
このアダーによって平均値に重み付けをした値と6デー
タとの累算がなされ新しい平均値を求めるための累算値
が得られる。新しい即ち次のフレームクロックに対応し
た平均値を求めるデータとして今までの平均値に重み付
けをしたデータを用いるのは、近接した音階例えば音声
の“C゛に対して“B”や“CI′”がピンチ抽出のエ
ラー等によって多く発生しランダムにデータが振れるこ
とがあるので、その近接したデータを一定とするためで
ある。アダー19の第1の入力に加わるデータは8ビツ
トであるので前述の累算出力は11ビツトデータとなる
。その出力をすわなちD x / 8を求めるのが次の
ラッチ21とアダー22である。With this adder, the value obtained by weighting the average value and the six data are accumulated, and an accumulated value for determining a new average value is obtained. The data that weights the previous average value is used as the data for calculating the average value corresponding to the new, ie, next frame clock. This is to keep adjacent data constant since data often fluctuates randomly due to errors in pinch extraction etc. Since the data added to the first input of the adder 19 is 8 bits, the above-mentioned The cumulative output becomes 11-bit data.The next latch 21 and adder 22 calculate the output, that is, D x /8.
累算出力をラッチ21が格納し、上位8ビツトをアダー
22の入力に加える。そして9ビツト目をアダー22の
キャリー人力に加える。9ビツト目をアダー22に加え
るのは、単に11ビットデータの下位3ビツトを切り捨
てるのではなく、9ビツト目を考慮する為である。即ち
、9ビツト目が“1”の時には上位8ビツトのデータに
1を加えて平均出力とし、00時には加えず、下位3ビ
ツトを切り捨てて出力する。このラッチ21とアダー2
2は前述したように平均値を精度よく出力するだめの回
路であり、高精度を要求しない場合には必要としない。Latch 21 stores the accumulated output and adds the upper 8 bits to the input of adder 22. Then add the 9th bit to Adder 22's carry power. The reason why the 9th bit is added to the adder 22 is to consider the 9th bit rather than simply truncating the lower three bits of the 11-bit data. That is, when the 9th bit is "1", 1 is added to the data of the upper 8 bits to obtain the average output, and at 00, no addition is made, and the lower 3 bits are discarded and output. This latch 21 and adder 2
As mentioned above, 2 is a circuit for outputting the average value with high precision, and is not required if high precision is not required.
アダー22の出力はラッチ23に格納される。The output of adder 22 is stored in latch 23.
このラッチ23は、その出力が次のフレーム間次段なら
びに累算において使用されるので、そのフレーム間デー
タを一定とするための回路である。This latch 23 is a circuit for keeping the interframe data constant, since its output is used in the next stage and accumulation during the next frame.
まとめると、第2図における回路は平均値をさらに入力
データの一部として使用することによって平均動作にヒ
ステリシス効果を発生し、データの下位ビットの変化に
対してすぐに応答することを防止する回路である
第3図は本発明の実施例における各回路のタイミングク
ロックを示すタイミング図である。このタイミング図を
用いて第2図の動作をさらに説明する。フレームクロッ
クφ、は1フレームの先頭でクロックを発生し、必要と
するデータの格納ならびにデータのシフトを行なうクロ
ックである。In summary, the circuit in Figure 2 uses the average value as part of the input data to create a hysteresis effect on the average operation, preventing it from responding too quickly to changes in the lower bits of the data. FIG. 3 is a timing diagram showing timing clocks of each circuit in the embodiment of the present invention. The operation shown in FIG. 2 will be further explained using this timing diagram. The frame clock φ is a clock that is generated at the beginning of one frame and is used to store necessary data and shift data.
第2図においてはラッチ14.16、シフトレジスタ1
5がそのクロックで動作する。このクロックが発生する
ことによってランチ等の格納データが1フレ一ム間固定
される。そして次にクロックφ。が順次Iフレーム間で
8回出力される。このクロックは8進カウンタ18を歩
進させセレクタ17によって人力している8データを1
フレーム内で順次選択するためのものである。さらに、
累算するためのクロックでもある。即ち、クロックψ。In Figure 2, latch 14,16, shift register 1
5 runs on that clock. By generating this clock, stored data such as lunch is fixed for one frame. And then clock φ. is sequentially output eight times between I frames. This clock increments the octal counter 18 and converts the 8 data manually input by the selector 17 into 1.
This is for sequential selection within a frame. moreover,
It is also a clock for accumulating. That is, the clock ψ.
の立ち上がりで8進カウンタ18が歩進し、データを選
択する。そしてアダー19にその選択データが加わる。At the rising edge of , the octal counter 18 increments and selects data. Then, the selected data is added to the adder 19.
この時アダー19には選択されたデータと今までの加算
データとが入力しており、このアダーによって加算即ち
累算される。そしてクロックφ。の立ち下がりでラッチ
φ。はそのデータを格納する。この動作は1フレ一ム間
で8回行なわれ累算される。尚、この累算は前述したよ
うに過去の6データとそれ以前のデータの平均値の2倍
の加算である。8番目のクロックの発生後にクロックφ
5が発生し、累算値がラッチ21に格納される。この格
納とほぼ同時にアダー22に累算値が加わるのでアダー
は前述したキャリーとの加算を行ない出力する。この出
力が即ち平均値となる。この処理は次に発生ずるクロッ
クφ。5Tの前になされ、クロックφ。ulによってラ
ッチ23が平均値を格納し出力する。そしてクロックφ
、によってラッチ20の格納がリセットされる。このク
ロックψ1は1フレ一ム単位での累算を行なうためのク
ロックである。At this time, the selected data and the added data up to now are input to the adder 19, and are added, that is, accumulated, by this adder. and clock φ. Latch φ at the falling edge of . stores that data. This operation is performed eight times per frame and accumulated. Note that, as described above, this accumulation is an addition of twice the average value of the past six data and the previous data. After generation of the 8th clock, the clock φ
5 is generated and the accumulated value is stored in latch 21. Almost at the same time as this storage, the accumulated value is added to the adder 22, so the adder performs addition with the carry mentioned above and outputs it. This output becomes the average value. This process is performed by the next clock φ. Done before 5T, clock φ. The latch 23 stores and outputs the average value by ul. and clock φ
, resets the storage of the latch 20. This clock ψ1 is a clock for performing accumulation in units of one frame.
以上、本発明の一実施例を詳細に説明した。One embodiment of the present invention has been described above in detail.
上述の実施例は前述した6データと平均値の2倍を累算
して新しい平均値を求める回路を有するが、これは6デ
ータとは限らずさらには平均値の2倍とは限らない。尚
、実施例以外のデータ数又は平均値の倍数を変化させた
場合にはそれに対応した割算回路が必要である。The above-described embodiment has a circuit that calculates a new average value by accumulating the above-mentioned 6 data and twice the average value, but this is not limited to 6 data and is not necessarily twice the average value. Note that when the number of data or the multiple of the average value is changed other than in the embodiment, a corresponding division circuit is required.
以上述べたように本発明は、デジタル信号出力手段が出
力するデジタル信号を新しい順に所定個数記憶手段が書
き替えながら記憶するようにし、この記憶手段の記憶内
容と以前に得た計算結果との平均を演算手段で計算し、
供給手段は、前記演算手段にて得られる計算結果を新た
なデジタル信号として出力するとともに、再度前記演算
手段に前記以前に得た計算結果として供給するようにし
たことにより、ヒステリシス特性をもつ平均値としての
デジタル信号を得ることが簡単な構成で達成できる。As described above, in the present invention, the storage means stores a predetermined number of digital signals output by the digital signal output means while rewriting them in chronological order, and averages the stored contents of the storage means and previously obtained calculation results. Calculate with arithmetic means,
The supply means outputs the calculation result obtained by the calculation means as a new digital signal, and also supplies the calculation result to the calculation means again as the previously obtained calculation result, thereby producing an average value having hysteresis characteristics. It is possible to obtain a digital signal with a simple configuration.
従って、デジタル信号が量子化時の誤差やデジタル信号
自体のゆらぎ等によって、好ましくない変化をとってし
まうつまり、値nとn+1との間をランダムに交互に変
化してしまうといった現象が抑制できるという効果があ
る。Therefore, it is possible to suppress the phenomenon in which the digital signal takes undesirable changes due to errors during quantization or fluctuations in the digital signal itself, in other words, it randomly changes alternately between the values n and n+1. effective.
第1図は本発明の実施例の回路構成図、第2図は第1図
の移動平均演算部のさらに詳細な回路図、
第3図は本発明の実施例のタイミングクロック図である
。
8・・・移動平均演算部、
14.16.20.21.23・・・ラッチ、15・・
・シフトレジスタ、
17・・・セレクタ、
18・・・カウンタ、
19.22・・・アダー。
特許出願人 カシオ計算機株式会社FIG. 1 is a circuit configuration diagram of an embodiment of the present invention, FIG. 2 is a more detailed circuit diagram of the moving average calculation section of FIG. 1, and FIG. 3 is a timing clock diagram of the embodiment of the present invention. 8...Moving average calculation unit, 14.16.20.21.23...Latch, 15...
・Shift register, 17...Selector, 18...Counter, 19.22...Adder. Patent applicant Casio Computer Co., Ltd.
Claims (2)
ル信号出力手段と、このデジタル信号出力手段から出力
するデジタル信号を新しい順に所定個数書替えながら記
憶する記憶手段と、この記憶手段に記憶された前記所定
個数のデジタル信号と以前に計算した計算結果との平均
を計算する演算手段と、この演算手段にて得られる計算
結果を新たなデジタル信号として出力するとともに、再
度前記演算手段に前記以前に計算した計算結果として供
給する供給手段と、を具備し、前記供給手段が出力する
前記新たなデジタル信号は、前記デジタル信号出力手段
が出力する前記デジタル信号に対してヒステリシス特性
をもつ平均値となっていることを特徴とするヒステリシ
ス特性をもつ平均演算装置。(1) Digital signal output means for outputting a continuously changing digital signal; storage means for storing a predetermined number of digital signals outputted from the digital signal output means while rewriting them in order of newest; a calculation means for calculating the average of a predetermined number of digital signals and a previously calculated calculation result; and outputting the calculation result obtained by this calculation means as a new digital signal, and outputting the calculation result obtained by the calculation means again to the calculation means from the previous calculation. supply means for supplying the calculated result, and the new digital signal outputted by the supply means is an average value having a hysteresis characteristic with respect to the digital signal outputted by the digital signal output means. An averaging device with hysteresis characteristics.
出力する前記デジタル信号を新しい順に複数個書替えな
がら記憶し、前記演算手段は、この複数個のデジタル信
号と前記以前に計算した計算結果との平均を計算するこ
とによって、ヒステリシス特性をもつ移動平均値を計算
するようにしたことを特徴とする特許請求の範囲第1項
記載のヒステリシス特性をもつ平均演算装置。(2) The storage means stores a plurality of the digital signals output from the digital signal output means while rewriting them in order of newest, and the calculation means stores the plurality of digital signals and the previously calculated calculation results. 2. The average calculation device having hysteresis characteristics according to claim 1, wherein a moving average value having hysteresis characteristics is calculated by calculating the average.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63151943A JPH01112294A (en) | 1988-06-20 | 1988-06-20 | Average calculation device with hysteresis characteristics |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP63151943A JPH01112294A (en) | 1988-06-20 | 1988-06-20 | Average calculation device with hysteresis characteristics |
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP59013075A Division JPH0652480B2 (en) | 1983-02-27 | 1984-01-27 | Input device for electronic musical instruments |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH01112294A true JPH01112294A (en) | 1989-04-28 |
Family
ID=15529601
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP63151943A Pending JPH01112294A (en) | 1988-06-20 | 1988-06-20 | Average calculation device with hysteresis characteristics |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH01112294A (en) |
-
1988
- 1988-06-20 JP JP63151943A patent/JPH01112294A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4633748A (en) | Electronic musical instrument | |
| US20050143981A1 (en) | Compressing method and apparatus, expanding method and apparatus, compression and expansion system, recorded medium, program | |
| EP0217357B1 (en) | Waveform normalizer for electronic musical instrument | |
| JP3194135B2 (en) | Digital audio processor | |
| US5995546A (en) | Digital integrator for pulse-density modulation using an adder carry or an integrator overflow | |
| JPH01112294A (en) | Average calculation device with hysteresis characteristics | |
| JP3147562B2 (en) | Audio speed conversion method | |
| US5329062A (en) | Method of recording/reproducing waveform and apparatus for reproducing waveform | |
| JPS60158492A (en) | Running mean computing unit | |
| JP2699570B2 (en) | Electronic musical instrument | |
| JPS60192993A (en) | Musical sound generator by inputting voice | |
| JPS60158493A (en) | Error removal device | |
| JP3223555B2 (en) | Waveform reading device | |
| JP3200940B2 (en) | Music control device | |
| JPS5898793A (en) | Voice synthesizer | |
| JP3252298B2 (en) | Sampling rate converter | |
| JPH01112295A (en) | error removal device | |
| JP2900076B2 (en) | Waveform generator | |
| JPH0456494B2 (en) | ||
| JP4164183B2 (en) | Noise removing apparatus and noise removing method | |
| JPS6347917Y2 (en) | ||
| JP3097324B2 (en) | Digital sound data output device | |
| JP3044890B2 (en) | Envelope generator | |
| JP3136735B2 (en) | Effect adding device | |
| JPH0139146B2 (en) |