JP3933073B2 - Waveform expansion device - Google Patents
Waveform expansion device Download PDFInfo
- Publication number
- JP3933073B2 JP3933073B2 JP2003082924A JP2003082924A JP3933073B2 JP 3933073 B2 JP3933073 B2 JP 3933073B2 JP 2003082924 A JP2003082924 A JP 2003082924A JP 2003082924 A JP2003082924 A JP 2003082924A JP 3933073 B2 JP3933073 B2 JP 3933073B2
- Authority
- JP
- Japan
- Prior art keywords
- scale factor
- sub
- frame
- sample
- information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000007906 compression Methods 0.000 claims description 33
- 230000006835 compression Effects 0.000 claims description 32
- 238000013139 quantization Methods 0.000 claims description 24
- 230000006837 decompression Effects 0.000 claims description 4
- 238000004364 calculation method Methods 0.000 description 17
- 238000000034 method Methods 0.000 description 15
- 238000010586 diagram Methods 0.000 description 10
- 238000001514 detection method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003111 delayed effect Effects 0.000 description 2
- 230000005236 sound signal Effects 0.000 description 2
- 101100311330 Schizosaccharomyces pombe (strain 972 / ATCC 24843) uap56 gene Proteins 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 230000003044 adaptive effect Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 230000037433 frameshift Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 101150018444 sub2 gene Proteins 0.000 description 1
Images
Landscapes
- Electrophonic Musical Instruments (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、圧縮波形データを伸長する波形伸長装置に関するものである。
【0002】
【従来の技術】
従来、電子楽器における楽音信号の発生方法の一つとして、自然楽器の楽音波形の瞬時値を逐次サンプリングしてディジタルとされたサンプル波形データとして予めメモリに記憶しておき、楽音の発生時にこのサンプル波形データを読み出して楽音信号を発生するようにしたPCM方式がある。このPCM方式は自然楽器に近い楽音を発生できるという点で優れているが、波形データを記憶しておくメモリの容量が膨大になってしまっていた。そこで、波形データ量を低減するために、波形データを圧縮し、この圧縮波形データをメモリに記憶しておき、再生時にはこの圧縮波形データを伸長して楽音信号を形成するようにした楽音信号発生装置が提案されている(例えば、特許文献1参照)。
また、波形圧縮装置により波形データをフレーム単位で線形予測圧縮して、圧縮波形データを得て、この圧縮波形データを波形メモリに記憶しておき、その波形メモリを使用した波形メモリ音源が知られている(例えば、特許文献2参照)。
【0003】
【発明が解決しようとする課題】
上記波形メモリ音源においては、圧縮波形データのデータ量を削減するためにシフトダウンして記憶するようになっているが、そのシフトダウン量は制限ビット長に基づいて制御され、伸長される波形データの品質低下の程度については考慮されていないという問題点があった。また、このシフトダウン量は、フレーム内の残差データのピークを基準にしており、フレーム中にパルス的なノイズが入るとその影響でフレームのシフト量が不当に大きくなってしまい、伸長した際に量子化ノイズが増大してしまうという問題点があった。
【0004】
そこで本発明は、量子化精度を与えるスケールファクタを用いて圧縮した圧縮波形データを伸長した際に、量子化ノイズを低減することのできる波形伸長装置を提供することを目的としている。
【0005】
【特許文献1】
特許第2605434号
【特許文献2】
特許第2727798号
【0006】
【課題を解決するための手段】
上記目的を達成するため、本発明にかかる波形伸長装置は、量子化精度を与えるスケールファクタをフレーム全体で用いられる主スケールファクタと、サブフレームで補助的に用いられる副スケールファクタとからなるようにしたので、圧縮前の元波形データの性質に応じてスケールファクタをサブフレーム毎に調整することができるようになる。これにより、圧縮前の波形データの変化率の局部的な変動に適応することができるようになり、主スケールファクタと副スケールファクタとを用いて伸長した際に量子化ノイズを低減することができるようになる。そして、サブフレーム毎の副スケールファクタの大きさを副情報に含ませたり、サブフレームの位置情報を副情報に含ませて、副スケールファクタを用いるサブフレームを特定するようにしても良い。
【0007】
【発明の実施の形態】
本発明にかかる圧縮波形データを伸長する波形伸長装置を音源部に備える楽音生成装置のブロック図を図1に示す。この楽音生成装置は、本発明において特徴的なデータ構造とされている圧縮波形データを記憶する記憶手段も備えている。
図1に示す楽音生成装置1おいて、CPU10は楽音生成に関連する各種プログラムを実行することにより楽音生成装置1における楽音生成の動作を制御する中央処理装置(Central Processing Unit)である。すなわち、演奏操作子の操作、自動演奏、通信I/Oからの入力などにより発音開始指示(ノートオン)が発生したときには、音源部30に対してその発音開始指示に応じた楽音の生成開始を指示している。ROM(Read Only Memory)11は、例えばフラッシュROMとされており、CPU10が実行する楽音生成処理のプログラムや、各種データが格納されている。RAM(Random Access Memory)12は楽音生成装置1におけるメインメモリであり、本発明において特徴的なデータ構造とされている圧縮波形データが記憶されている波形記憶領域12aを備えていると共に、CPU10のワークエリア等の領域が設定されている書き換え可能な記憶手段である。なお、波形記憶領域12aには複数曲の圧縮波形データを記憶することができる。
【0008】
また、操作子13は、鍵盤等の演奏操作子や各種設定を行うパネルスイッチであり、表示器14は楽音生成時に各種情報を表示させる液晶等からなる表示器である。通信I/O15は、LAN(Local Area Network )やインターネット、電話回線等の通信ネットワークを介してサーバコンピュータに接続するためのネットワークインタフェースである。この通信I/O15を介して、楽音生成装置1内部で作成したMIDIメッセージを外部へ送出したり、外部からのMIDIメッセージを受信することができる。制御レジスタ20は、CPU10から各発音チャンネルの発音パラメータが書き込まれるレジスタである。音源部30は、フレームを単位として圧縮されている圧縮波形データの伸長処理を行うデコーダを備えており、CPU10の制御に基づいて、RAM12の波形記憶領域12aから楽音生成に必要とする圧縮波形データを後述する小フレーム毎に読み出し、読み出した圧縮波形データの伸長処理を行っている。そして、デコードされた波形データの補間、エンベロープ付与、チャンネル累算(ミキシング)、および効果(エフェクト)付与などの処理を行って、楽音波形データとして出力している。音源部30から出力された楽音波形データはアナログ信号に変換されてサウンドシステム40から放音されるようになる。なお、各部はバスライン16を介して接続されている。
【0009】
次に、音源部30について説明する前にRAM12の波形記憶領域12aに記憶されている圧縮波形データのデータ構造を図2を参照して説明する。
波形記憶領域12aに記憶されている圧縮された波形データの1曲分の波形データが図2に示されている。図2に示す圧縮波形データは、圧縮波形データの全体に関する情報が書き込まれているヘッダ情報と、圧縮波形データを収容しているフレーム1ないしフレームnから構成されている。ヘッダ情報は、圧縮波形データである残差符号のサンプルのビット数、読出開始アドレス、読出終了アドレス、ループアドレス、最初のフレームの予測係数およびスケールファクタ、その他データからなる。圧縮波形データである残差符号のサンプルが書き込まれている各フレームのデータ構造は同様とされており、図2には例としてフレーム2のデータ構造が示されている。1フレームは、例えば図示するようにアドレスが「00」から「09」の10アドレスに対応するデータ量とされており、1アドレスに対応するデータ幅を小フレームと定義することができる。すなわち、図2に示す1フレームは、10の小フレームから構成されている。この小フレームは副情報と残差符号からなる。
【0010】
この場合、副情報のビット数は予め定められたビット数とされており、残差符号の1サンプルのビット数は、圧縮する前の元波形データの性質に適するよう波形データ毎に定められた固定のビット数とされている。そして、小フレームのデータ幅を図2に示すように16ビットとすると共に、残差符号の1サンプルのビット数を3ビットに固定した場合は、例えば副情報に4ビットのデータ領域が割り当てられ、残差符号に12ビットのデータ領域が割り当てられて、1小フレームのサンプル数は4となる。また、残差符号の1サンプルのビット数を6ビットに固定すると、図2における残差符号の下段に示されるように1小フレームのサンプル数は2となる。同様に、固定とされている残差符号の1サンプルのビット数を4ビットとすると、図2における残差符号のさらに下段に示されるように1小フレームのサンプル数は3となり、固定とされている残差符号の1サンプルのビット数を2ビットとすると、図2における残差符号のさら下段に示されるように1小フレームのサンプル数は6となる。なお、小フレームのデータ幅を16ビットとした場合は、1フレームを構成するビット数は160ビットとなり、その内の40ビットのデータ領域が副情報の領域となり、残る120ビットのデータ領域が残差符号の領域となる。このように、1フレームあるは1小フレームにおける残差符号のサンプル数は、曲毎に固定とされる残差符号の1サンプルのビット数に応じて変更されるようになる。
【0011】
さらに、1フレームは複数のサブフレームに分割されている。図2に示す例では、第1サブフレーム(サブ1)と第2サブフレーム(サブ2)との2つのサブフレームに分割する例と、第1サブフレーム(サブ1)ないし第4サブフレーム(サブ4)の4つのサブフレームに分割する例とが示されている。ここで、図示するように残差符号のサンプルのビット数が3ビットであった場合は、2つのサブフレームに分割すると、サンプル1ないしサンプル20が第1サブフレームに収容され、サンプル21ないしサンプル40が第2サブフレームに収容されるようになる。また、4つのサブフレームに分割すると、サンプル1ないしサンプル10が第1サブフレームに収容され、サンプル11ないしサンプル20が第2サブフレームに収容され、サンプル21ないしサンプル30が第3サブフレームに収容され、サンプル31ないしサンプル40が第4サブフレームに収容されるようになる。
【0012】
ところで、副情報は、次のフレームの残差符号の伸長に用いる線形予測係数である予測係数情報と、次のフレームの残差符号の伸長に用いるスケールファクタとその他の情報とされている。スケールファクタは、1フレームを構成する複数の残差符号を逆正規化するためのファクタであり、フレーム全体で用いる主スケールファクタと、サブフレームで補助的に用いる副スケールファクタとから構成されている。これは、後述するように圧縮前の元波形データの変化率の局部的な変動に適応させるためであり、スケールファクタを主スケールファクタと副スケールファクタとからなる構成としたことに伴い、フレームを前記したように複数のサブフレームに分割している。この主スケールファクタおよび副スケールファクタを絶対値ではなく、フレーム間の比や対数スケールにおける差で記憶するとビット数に対する情報量の効率を向上することができる。主スケールファクタおよび副スケールファクタをフレーム間の比や対数スケールにおける差とした場合においては、逆量子化時に絶対値に変換されて残差符号に乗算されるようになる。また、その他の情報を、音量情報や波形データのループアドレス等の情報としても良い。
【0013】
次に、音源部30について説明すると、アドレス発生部32は、周波数情報(Fナンバ)を累算するサンプルカウンタと、RAM12における波形記憶領域12aから圧縮波形データを小フレーム毎に読み出す読出アドレスを生成するメモリカウンタを備えている。サンプルカウンタは、指定された音高に対応する波形データのピッチシフト量であるFナンバを累算して整数部と小数部からなるサンプルアドレスを生成し、その内の整数部を残差符号キャッシュ部33に、残る小数部を補間部36にそれぞれ供給する。また、サンプルアドレスの整数部が、小フレームのサンプル数に達するごとに要求パルスを出力する。なお、小フレームのサンプル数は、図2において前述したように残差符号の1サンプルのビット数に応じて異なるようになる。アドレス発生部32のメモリカウンタでは、サンプルカウンタから要求パルスが入力されるごとに、メモリアドレスを1ずつカウントアップすることにより小フレームを読み出す読出アドレスを生成している。
【0014】
フレーム読出部31は、アドレス発生部32のサンプルカウンタから出力される要求パルスが入力されるごとに、RAM12の波形記憶領域12aからアドレス発生部32のメモリカウンタから供給されるメモリアドレスの示す小フレームのデータを読み出す。読み出された小フレームのデータにおける副情報は副情報デコード部34に供給され、読み出された小フレームのデータの残差符号のサンプルは残差符号キャッシュ部33に供給される。副情報デコード部34には、1フレームの期間において、フレーム読出部31から供給される各小フレームの副情報が順次収集され、副情報の各データがデコードされる。そして、そのフレームの次のフレームの期間に、デコードされた予測係数情報およびスケールファクタがデコーダ35に供給されると共に、その他データが音源部30の各ブロックに供給される。すなわち、各フレームの副情報は、当該フレームではなくその次のフレームで使用される副情報となる。
【0015】
残差符号キャッシュ部33には、読み出された小フレームのうちの最新の3つの小フレームがキャッシュに保持される。そして、アドレス発生部32からのサンプルアドレスの整数部に応じて、その整数部の進行量に相当する数の残差符号のサンプルがキャッシュされた3つの小フレームから取り出され、取り出された残差符号のサンプルがデコーダ35に送られる。デコーダ(キャッシュ)35では、残差符号キャッシュ部33から残差符号のサンプルが送られてくる毎に、4次の線形予測伸長により残差符号のサンプルがデコードされて復元波形サンプルを得ている。この復元波形サンプルは、デコーダ35内の波形データキャッシュに、例えば4サンプル保存される。
【0016】
ここで、演奏操作子の操作、自動演奏、通信I/Oからの入力などにより発音開始指示(ノートオン)が発生したときには、CPU10が音源部30に対してその発音開始指示に応じた楽音の生成開始を指示している。この場合の手順は次のようになる。ノートオン(パートPT、音高N、強度V)に応じて、
(1)音源部30の複数発音チャンネルのうちの1つを当該楽音の発生に割当てる。
(2)パートPTで現在選択されている音色データ(RAM12上)に基づいて、波形記憶領域12aに記憶されている波形データの1つを選択し、ピッチシフト量、音量EGパラメータ、LFOパラメータ、出力レベル等を制御レジスタ20の割り当てた発音チャンネル領域に設定する。
(3)選択された波形データのヘッダを読み出し、残差符号のサンプルのビット数、読出開始アドレス、読出終了アドレス、ループアドレス、最初のフレームの予測係数、スケールファクタ、その他データを、上記発音チャンネル領域に設定する。この場合の各アドレスは、フレームを単位としたアドレスでも良い。
(4)上記発音チャンネル領域にノートオンを書き込む。
これにより、音源部30において楽音の生成が開始されるようになる。
【0017】
次に、本発明の実施の形態における波形伸長装置であるデコーダ35の構成を図3に示す。このデコーダ35は音源部30に備えられており、残差符号キャッシュ部33から供給された残差符号のサンプルLnは、デコーダ35における逆量子化部71において残差符号のサンプルのビット数情報に基づいてサンプルLn毎に抽出される。抽出された残差符号のサンプルLnは、量子化精度を与えるスケールファクタSFにおける主スケールファクタに、その残差符号のサンプルLnが属するサブフレームにおける副スケールファクタが加算されたスケールファクタに基づいて各サンプルLnが逆正規化されると共に逆量子化される。これにより、逆量子化部71からは残差符号のサンプルLn毎に復号された復号波形サンプルqnが出力される。復号波形サンプルqnは加算器72に供給されて、線形予測演算部73より出力される線形予測サンプル◇Sn-1が加算されて復元波形サンプル◇Xnが復元される。復元波形サンプル◇Xnは波形データキャッシュ部74にキャッシュされると共に、伸長された波形データである復元波形サンプル◇Xnとして出力される。
【0018】
波形データキャッシュ部74には、現在から過去の4つの復元波形サンプル◇Xn〜◇Xn-3(D1〜D4)がキャッシュされており、このキャッシュされた4つの復元波形サンプルD1〜D4が線形予測演算部73に供給される。線形予測演算部73では、この4つの復元波形サンプルD1〜D4にそれぞれの次数の線形予測係数Pを乗算して加算することにより4次の線形予測を行い、次の復元波形サンプル◇Xn+1を得るための線形予測サンプル◇Snを生成している。なお、残差符号のサンプルLnのビット数情報は、圧縮波形データのヘッダが副情報デコード部34においてデコードされることにより、副情報デコード部34から供給されており、主スケールファクタと副スケールファクタからなるスケールファクタSFおよび線形予測係数Pは前述したように副情報デコード部34においてデコードされて供給されている。
【0019】
図1に戻り、デコーダ35から出力される伸長された復元波形データは、補間部36に供給される。この場合、デコーダ35における波形データキャッシュ部74にキャッシュされている4つの復元波形サンプルD1〜D4が補間部36に供給される。そして、補間部36ではアドレス発生部32からのサンプルアドレスの小数部に基づいて、供給された4つの復元波形サンプルD1〜D4を、例えば4点補間して補間サンプルを生成する。補間部36から出力される補間サンプルは、音量EG部37において制御レジスタ20にノートオン時に設定された音量EGパラメータに基づいて音量制御され、ミキサ38に供給される。ミキサ38では全ての発音チャンネルにおける波形サンプルがチャンネル累算されると共に、効果が付与されて再生タイミング毎に出力される。ミキサ38からの出力は、ディジタル−アナログ変換器(DAC)39に供給されてアナログ信号に変換され、サウンドシステム40から放音されるようになる。
【0020】
以上説明したように、本発明の実施の形態にかかる楽音生成装置1では、波形データが図2に示す形式で波形記憶領域12aに記憶されており、その音源部30が残差符号の再生のためにサブフレームを順次読み出すことにより、各フレームの必要な残差符号のサンプルが順次取り出されると同時に、次のフレームの残差符号を伸長するための副情報が取り出されるようになっている。すなわち、音源部30には、副情報をタイミングよく取り出すための専用の回路が不要とされ、また、各サブフレームの副情報と残差符号のビット数は固定とされているので、そこから副情報と残差符号を取り出すための構成を極めて簡単な構成とすることができる。
【0021】
次に、本発明の波形伸長装置において特徴的なスケールファクタについて図4ないし図7を参照して詳細に説明する。ただし、図4ないし図6にはスケールファクタのデータ構造の異なる例がそれぞれ示されており、図7にはフレームのデータ構造の他の例が示されている。
図4(a)には、フレームの副情報におけるスケールファクタのデータ構造の第1の例が示されている。この場合、フレームは2つのサブフレームに分割されている。このデータ構造では、スケールファクタ領域に、主スケールファクタの大きさの情報(主SF)と、サブフレーム1のデコードに用いる副スケールファクタ1の大きさの情報(副SF1)と、サブフレーム2のデコードに用いる副スケールファクタ2の大きさの情報(副SF2)とが格納されている。図4(b)は主スケールファクタ(主SF)と、副スケールファクタ1(副SF1)および副スケールファクタ2(副SF2)との関係が示されている。
【0022】
図4(b)において、横軸は時間、すなわち残差符号のサンプルS1からサンプルS40までが順次並べられている。1フレームは、サンプルS1ないしサンプル20からなるサブフレーム1と、サンプルS21ないしサンプル40からなるサブフレーム2とに分割されている。この場合、サブフレーム1に該当する元波形データの変化率は、サブフレーム2に該当する元波形データの変化率より大きいため、副スケールファクタ1(副SF1)の大きさが副スケールファクタ2(副SF2)の大きさより大きくされている。このように、副スケールファクタにより圧縮前の元波形データの変化率の局部的な変動に適応することができるようになる。そして、サンプルS1ないしサンプル20(サブフレーム1)をデコードする際には、主スケールファクタ(主SF)と、副スケールファクタ1(副SF1)とを加算したスケールファクタを用いてデコードされ、サンプルS21ないしサンプル40(サブフレーム2)をデコードする際には、主スケールファクタ(主SF)と、副スケールファクタ2(副SF2)とを加算したスケールファクタを用いてデコードされるようになる。
【0023】
また、図5(a)には、フレームの副情報におけるスケールファクタのデータ構造の第2の例が示されている。この場合、フレームは4つのサブフレームに分割されている。このデータ構造では、スケールファクタ領域に、主スケールファクタの大きさの情報(主SF)と、サブフレーム1(サブ1)〜サブフレーム4(サブ4)のいずれかのサブフレームを指定する指定情報(PSFA)と、副スケールファクタの大きさの情報(PSFD)とが格納されている。図5(b)は主スケールファクタ(主SF)と、指定情報(PSFA)で位置指定された副スケールファクタ(PSFD)との関係が示されている。図5(b)において、横軸は時間、すなわち残差符号のサンプルS1からサンプルS40までが順次並べられている。1フレームは、サンプルS1ないしサンプル10からなるサブフレーム1と、サンプルS11ないしサンプル20からなるサブフレーム2と、サンプルS21ないしサンプル30からなるサブフレーム3と、サンプルS31ないしサンプル40からなるサブフレーム4とに分割されている。
【0024】
そして、図5(b)ではサンプルS21ないしサンプル30(サブフレーム3)が指定情報(PSFA)で位置指定されている。すなわち、サブフレーム3に該当する元波形データの変化率が局部的に大きくされていることから、サブフレーム3に副スケールファクタ(PSFD)が設定されている。そこで、このサブフレーム3をデコードする際には、主スケールファクタ(主SF)に、副スケールファクタ(PSFD)を加算したスケールファクタを用いてデコードする。そして、サブフレーム1,サブフレーム2,サブフレーム4をデコードする際には、主スケールファクタ(主SF)のみを用いてデコードする。このように、指定情報(PSFA)で位置指定された副スケールファクタ(PSFD)を用いるようにすると、圧縮前の元波形データの変化率がパルス状の局部的な変動とされても適応することができるようになる。
【0025】
さらに、図6(a)には、フレームの副情報におけるスケールファクタのデータ構造の第3の例が示されている。この場合、フレームは4つのサブフレームに分割されている。このデータ構造では、スケールファクタ領域に、主スケールファクタの大きさの情報(主SF)と、サブフレーム1(サブ1)〜サブフレーム4(サブ4)のいずれかのサブフレームを指定する指定情報(PSFA)と、副スケールファクタの大きさの情報(PSFD)と、各サブフレームに単位副スケールファクタ(Δ副SF)を設定するか否かのフラグF1,F2,F3,F4が格納されている。フラグF1,F2,F3,F4は、”1”あるいは”0”の1ビットの情報であり、フラグF2とフラグF4が”1”とされ、フラグF1とフラグF3が”0”とされているとする。図6(b)は主スケールファクタ(主SF)と、指定情報(PSFA)で位置指定された副スケールファクタ(PSFD)と、フラグF1,F2,F3,F4により設定される単位副スケールファクタ(Δ副SF)との関係が示されている。
【0026】
図6(b)において、横軸は時間、すなわち残差符号のサンプルS1からサンプルS40までが順次並べられている。1フレームは、サンプルS1ないしサンプル10からなるサブフレーム1と、サンプルS11ないしサンプル20からなるサブフレーム2と、サンプルS21ないしサンプル30からなるサブフレーム3と、サンプルS31ないしサンプル40からなるサブフレーム4とに分割されている。そして、図6(b)ではサンプルS21ないしサンプル30(サブフレーム3)が指定情報(PSFA)で位置指定されていると共に、フラグF2とフラグF4が”1”とされてサブフレーム2とサブフレーム4に、単位副スケールファクタ(Δ副SF)が設定されている。すなわち、サブフレーム3に該当する元波形データの変化率が局部的に大きくされていることから、サブフレーム3に副スケールファクタ(PSFD)が設定されていると共に、サブフレーム2,4に該当する元波形データの変化率が局部的に若干大きくされていることから、サブフレーム2,4に単位副スケールファクタ(Δ副SF)が設定されている。そこで、サブフレーム3をデコードする際には、主スケールファクタ(主SF)に、副スケールファクタ(PSFD)を加算したスケールファクタを用いてデコードし、サブフレーム2とサブフレーム4をデコードする際には、主スケールファクタ(主SF)に、単位副スケールファクタ(Δ副SF)を加算したスケールファクタを用いてデコードする。そして、サブフレーム1をデコードする際には、主スケールファクタ(主SF)のみを用いてデコードする。この第3の例においては、圧縮前の元波形データの変化率がパルス状等の種々の局部的な変動をしても適応することができるようになる。
【0027】
図7にはフレームのデータ構造の他の例が示されている。このデータ構造の例においては、副情報は、次のフレームの残差符号の伸長に用いる線形予測係数である予測係数情報と、次のフレームの残差符号の伸長に用いるスケールファクタの情報とその他の情報とされている。スケールファクタは図4(a)に示すデータ構造が例としてあげられており、主スケールファクタ(主SF)と、副スケールファクタ1(副SF1)および副スケールファクタ2(副SF2)から構成されている。副情報は、次のフレームにおける残差符号のサンプルをデコードするために用いられるが、図7のようなデータ構造とするとレジスタの一部を省略することができる。すなわち、あるフレームのサブフレーム1における残差符号のサンプルをデコードしている際には、その1つ前のフレームにおける第1レジスタに格納されている副スケールファクタ1(副SF1)が用いられる。この際に、当該フレームから次のフレームに使用する副スケールファクタ1(副SF1)が読み出されて第3レジスタに格納される。次いで、サブフレーム1のデコードが終了してサブフレーム2のデコードを行う際には、その1つ前のフレームにおける第2レジスタに格納されている副スケールファクタ2(副SF2)が用いられる。この際に、当該フレームから次のフレームに使用する副スケールファクタ2(副SF2)が読み出されるが、第1レジスタに格納されている副スケールファクタ1(副SF1)の使用は終了しているため、第1レジスタに上書きされるようになる。このように、図7に示すデータ構造とすると通常は4つ必要とされるレジスタを3つとすることができるようになる。
【0028】
次に、線形予測を利用して元波形データの圧縮処理を行う波形圧縮装置の構成を図8および図9に示す。
波形圧縮装置は、図8に示す初期SF算出部50と、図9に示すコーダ60とフレーム詰込部67から構成されている。コーダ60には、圧縮された1サンプルのビット数k(固定値)が予め定められて設定されている。すなわち、波形圧縮装置においては元波形データがビット数kに圧縮処理されて、フレーム化されて出力されるようになる。この際に、スケールファクタの探索が波形圧縮装置において行われる。このスケールファクタの探索では、コーダ60においてスケールファクタの値を変更しながら1フレームの区間における複数の元波形データのサンプルを順次量子化部62に供給し、その際に設定されているスケールファクタにおいて得られた1フレームの残差サンプルdnの各レベルが、許容量子化誤差レベルをほとんど超えないようになるスケールファクタの値を探索している。この場合スケールファクタを次第に大きくして適したスケールファクタを探索しているが、スケールファクタを繰り返し設定することから探索時間が長くなってしまうようになる。そこで、元波形データの性質に応じた初期スケールファクタを最初に算出することによりスケールファクタの探索時間が短くなるようにしている。この初期スケールファクタを算出する構成が図8に示す初期SF算出部50とされている。
【0029】
図8に示す初期SF算出部50には波形記憶領域12aから選択された元波形データのサンプル(以下、「元波形サンプル」という)Snが1フレーム分供給される。そして、予測係数算出部51において1フレーム分の元波形サンプルSnに基づいて線形予測係数Pが算出され、算出された線形予測係数Pは線形予測部52に供給される。線形予測部52では遅延手段により遅延された現在から過去の、例えば4サンプルに次数に応じた線形予測係数Pを乗算して加算することにより線形予測サンプル◇Sn-1が生成されている。この線形予測サンプル◇Sn-1は減算器53に供給されて、元波形サンプルSnから減算されて、減算器53から残差サンプルdnが出力される。残差サンプルdnは、残差符号のサンプルのビット数kが与えられているピーク検出およびスケールファクタ算出部54に供給され、残差サンプルdnのピークが求められる。すなわち、1フレーム分の元波形サンプルSnが順次供給されて、1フレーム分の残差サンプルdnがピーク検出およびスケールファクタ算出部54に供給された際に、残差サンプルdnの内のピーク値が検出され、検出されたピーク値の残差サンプルdnを、与えられているビット数kでオーバフローすることなく正規化して量子化することができる大きさの理想的スケールファクタSFPが算出される。このようにして算出された理想的スケールファクタSFPから定数Dが差し引かれて、初期スケールファクタ(初期SF)として初期SF算出部50から出力される。
【0030】
このようにして算出された初期スケールファクタ(初期SF)および予測係数Pは、波形圧縮装置における図9に示すコーダ60の予測係数&スケールファクタ生成部63に設定される。そして、圧縮処理前の元波形サンプルSnが減算器61に入力され、この元波形サンプルSnから線形予測部64より出力される線形予測サンプル◇Sn-1が減算されて、残差サンプルdn(=Sn−◇Sn-1)が出力される。予測係数&スケールファクタ生成部63に設定された線形予測係数Pは線形予測部64に供給され、初期スケールファクタ(初期SF)はスケールファクタSFとして量子化部62および逆量子化部66に供給される。ここで、減算器61から出力された残差サンプルdnは、供給されたスケールファクタSFに基づき量子化部62において正規化された後、量子化され設定されたビット数kにスケーリングされることにより、残差符号のサンプルLnが生成される。
【0031】
この残差符号のサンプルLnは、圧縮波形データとしてコーダ60から出力されてフレーム詰込部67に供給され、フレーム詰込部67において小フレームからなるフレームが生成されて出力される。さらに、残差符号のサンプルLnは逆量子化部66に供給されて、逆正規化されると共に逆量子化されて残差符号のサンプルLnを復号した復号波形サンプルqnが出力される。復号波形サンプルqnは加算器65において、線形予測部64より出力されている線形予測サンプル◇Sn-1が加算されて復元波形サンプル◇Xnが復元されて、線形予測部64に供給されるようになる。線形予測部64では、遅延手段により遅延されている例えば現在から過去の4つの復元波形サンプルに、それぞれの次数の線形予測係数Pが乗算されて加算されることにより4次の線形予測が行われて、次の元波形サンプルSnを圧縮処理するための次の線形予測サンプル◇Snが生成される。フレーム詰込部67には、残差符号のサンプルLnに加えて、線形予測係数PおよびスケールファクタSFとその他情報が供給されている。そして、副情報の領域に線形予測係数PおよびスケールファクタSFとその他情報が格納され、データ領域に残差符号のサンプルが格納されることにより小フレームが構成され、例えば10の小フレームにより図2に示すように1フレームが構成されるようになる。
【0032】
ところで、前述したようにスケールファクタは主スケールファクタと副スケールファクタとから構成されている。そこで、予測係数&スケールファクタ生成部63においては、設定されているスケールファクタを主スケールファクタとし、フレームを分割したサブフレーム毎に残差サンプルdnを解析して残差サンプルdnが小さくなるようにスケールファクタを調整する。このスケールファクタの調整量を副スケールファクタとする。
なお、図8に示すようなフィードバックすることなく残差符号のサンプルを求める方法を、ここではAbS(Analysys by Synthesys)なしと定義し、図9に示すようにフィードバックすることにより残差符号のサンプルを求める方法をAbSありと定義する。
【0033】
次に、本発明の波形圧縮装置において実行される1フレーム分SF探索処理のフローチャートを図10に示す。
図10に示す1フレーム分SF探索処理おいて、スケールファクタの探索が開始されると、ステップS10において波形記憶領域12aから選択された波形データのサンプル(元波形サンプル)が1フレーム分取り出される。次いで、ステップS11にて取り出された1フレーム分のサンプルが、図8に示す初期SF算出部50に供給され線形予測係数Pが算出される。そして、ステップS12においてAbSなし、すなわち図8に示す初期SF算出部50に1フレーム分の元波形サンプルが順次供給されて、線形予測係数Pを用いた元波形データからの線形予測に基づく波形圧縮が行われ、ピーク検出およびスケールファクタ算出部54に1フレーム分の残差サンプルdnが供給される。この残差サンプルdnは予測信号の誤差分に相当し、ステップS13にて1フレーム分の残差サンプルdnの最大振幅が検出され、検出された最大振幅を所定の大きさ以下とできる理想的スケールファクタSFPが求められる。そして、ステップS14において理想的スケールファクタSFPから定数Dを差し引いて初期スケールファクタ(初期SF)を算出する。ここで、定数Dを差し引くのは、理想的スケールファクタSFPより小さめの初期スケールファクタ(初期SF)として万全を期すためである。ただし、スケールファクタは対数で表されているので、ステップS14では理想的スケールファクタSFPが定数Dで除算されることになる。
【0034】
このようにして初期スケールファクタ(初期SF)が算出され、AbSありで線形予測係数Pを用いた線形予測に基づく波形圧縮が行われ、1フレーム分の残差サンプルdnが求められる。この際に、まず、量子化部62および逆量子化部66で初期SFを主スケールファクタとして用いつつAbSありの波形圧縮が行われる。その結果として得られた残差サンプルdnをフレームを分割したサブフレーム毎に解析して、残差サンプルdnの平均レベルあるいはピーク値が大きいサブフレームの副スケールファクタを大きくして、今度は主フレームファクタと副スケールファクタを用いつつAbSありの波形圧縮を行い、再び残差サンプルdnを得る。この残差サンプルdnの解析から残差サンプルdnの生成までを繰り返し行うことにより、残差サンプルdnのレベルが小さくなるよう副スケールファクタの調整が行われる。このようにして調整された副スケールファクタと、主スケールファクタと線形予測係数Pを用いてAbSありの波形圧縮を行い、最終的に1フレーム分の残差サンプルdnと残差符号Lnが求められる。ここで、1フレーム分の残差符号のサンプルLnが求められると、この残差符号のサンプルLnを復号した復元波形サンプルと元波形サンプルとの誤差であるノイズレベルがステップS16にて求められる。次いで、ステップS17にて主スケールファクタSFが最大となっているか否かが判断され、最大となっていない場合はステップS18に進む。そして、ステップS18にて元波形データとの誤差であるノイズレベルが許容量子化誤差レベルとされる閾値より小さいか否かが判断される。ここで、ノイズレベルが閾値より小さいと判断された場合は、適した主および副スケールファクタSFになっているとして1フレーム分SF探索処理は終了する。
【0035】
また、ステップS18にてノイズレベルが閾値より大きいと判断された場合は、スケールファクタが適した大きさとなっていないことからステップS19へ分岐する。ステップS19では、主スケールファクタSFを1段階大きな値に変更するとともに、閾値をその主スケールファクタに対応した値に変更してステップS15に戻るようになる。この新たな主スケールファクタの値に基づいて、ステップS15ないしステップS18の処理を繰り返し行う。そして、ノイズレベルが閾値より小さいとステップS18において判断された際に1フレーム分SF探索処理は終了する。このように、1フレーム分におけるノイズレベルが閾値未満である場合に、適したスケールファクタとなったと判断しているが、ノイズレベルが瞬間的に閾値を超える場合はこれを無視して、ノイズレベルが平均的に閾値未満となる場合に適したスケールファクタになったと判断しても良い。また、閾値の大きさをスケールファクタの大きさに応じて変更するようにしたので、ノイズレベルの大きさをスケールファクタの大きさに応じて許容することができるようになる。なお、ステップS17において主スケールファクタSFが最大値に達している場合には、主スケールファクタをそれ以上に上げることができないので、そのまま1フレーム分SF探索処理は終了する。このようにして探索されたスケールファクタSFを用いて元波形データを圧縮処理した残差符号のサンプルからなるフレーム化された波形データは、記憶手段に記憶されるようになる。
【0036】
波形圧縮装置において実行される1フレーム分SF探索処理においては、以上説明したように初期スケールファクタを算出する際に波形データの1フレーム分のサンプルを最初に初期SF算出部50に供給して、予測係数Pと初期スケールファクタとを算出している。そして、算出した予測係数Pと初期スケールファクタとをコーダ60に設定し、スケールファクタを変更することで元波形サンプルと線形予測サンプルとの誤差であるノイズレベルが許容量子化誤差レベルとされる閾値より小さくなるまで、1フレーム分の元波形サンプルをコーダ60に繰り返し供給するようにしている。このように、波形圧縮装置においては、波形データの1フレーム分のサンプルを繰り返し読み出して処理することにより、当該波形データに適した圧縮処理を行うようにしている。このように、初期SF算出部50において初期スケールファクタを算出するようにしたので、コーダ60におけるスケールファクタを探索する回数を大幅に低減することができる。これにより、圧縮処理を高速に行うことができるようになる。
【0037】
以上の説明では、残差符号のサンプルのビット数は曲毎の波形データにおいては固定としたが、各フレーム毎に残差符号のサンプルのビット数を可変にし、副情報でそのビット数を指定するようにしてもよい。この場合、副情報におけるビット数の情報は、副情報デコード部34からアドレス発生部32や残差符号キャッシュ部33に供給される。
上記した本発明の波形圧縮装置においては、線形予測による圧縮伸長を行うようにしたが、適応差分などの線形予測以外の方式で圧縮伸長を行うようにしてもよい。
【0038】
【発明の効果】
本発明は以上説明したように、量子化精度を与えるスケールファクタをフレーム全体で用いられる主スケールファクタと、サブフレームで補助的に用いられる副スケールファクタとからなるようにしたので、圧縮前の元波形データの性質に応じてスケールファクタをサブフレーム毎に調整することができるようになる。これにより、圧縮前の波形データの変化率の局部的な変動に適応することができるようになり、主スケールファクタと副スケールファクタとを用いて伸長した際に量子化ノイズを低減することができるようになる。
【図面の簡単な説明】
【図1】 本発明の実施の形態にかかる圧縮波形データを伸長する波形伸長装置を音源部に備える楽音生成装置のブロック図である。
【図2】 本発明の実施の形態にかかる圧縮波形データのデータ構造を示す図である。
【図3】 本発明の実施の形態における波形伸長装置であるデコーダの詳細構成を示す図である。
【図4】 本発明の実施の形態にかかる圧縮波形データのデータ構造におけるスケールファクタのデータ構造の第1の例を示す図である。
【図5】 本発明の実施の形態にかかる圧縮波形データのデータ構造におけるスケールファクタのデータ構造の第2の例を示す図である。
【図6】 本発明の実施の形態にかかる圧縮波形データのデータ構造におけるスケールファクタのデータ構造の第3の例を示す図である。
【図7】 本発明の実施の形態にかかる圧縮波形データのデータ構造におけるフレームのデータ構造の他の例を示す図である。
【図8】 波形圧縮装置を構成している初期SF算出部の構成を示す図である。
【図9】 波形圧縮装置を構成しているコーダの構成を示す図である。
【図10】 波形圧縮装置が実行する1フレーム分SF探索処理のフローチャートである。
【符号の説明】
1 楽音生成装置、10 CPU、11 ROM、12 RAM、12a 波形記憶領域、13 操作子、14 表示器、15 通信I/O、16 バスライン、20 制御レジスタ、30 音源部、31 フレーム読出部、32 アドレス発生部、33 残差符号キャッシュ部、34 副情報デコード部、35 デコーダ、36 補間部、37 音量EG部、38 ミキサ、40 サウンドシステム、50 初期SF算出部、51 予測係数算出部、52 線形予測部、53 減算器、54 ピーク検出およびスケールファクタ算出部、60 コーダ、61 減算器、62 量子化部、63 予測係数&スケールファクタ生成部、64 線形予測部、65 加算器、66 逆量子化部、67 フレーム詰込部、71 逆量子化部、72 加算器、73 線形予測演算部、74 波形データキャッシュ部[0001]
BACKGROUND OF THE INVENTION
The present invention decompresses compressed waveform data Waveform expansion device It is about.
[0002]
[Prior art]
Conventionally, as one method of generating a musical sound signal in an electronic musical instrument, the instantaneous value of a musical sound waveform of a natural musical instrument is sequentially sampled and stored in advance as digital sample waveform data, and this sample is generated when a musical sound is generated. There is a PCM system in which waveform data is read to generate a musical sound signal. This PCM method is excellent in that it can generate musical sounds close to natural instruments, but the capacity of the memory for storing waveform data has become enormous. Therefore, in order to reduce the amount of waveform data, the waveform data is compressed, the compressed waveform data is stored in the memory, and the compressed waveform data is expanded during reproduction to generate a musical signal. An apparatus has been proposed (see, for example, Patent Document 1).
Also, a waveform memory sound source using a waveform memory is known in which waveform data is linearly predicted and compressed by a waveform compression device to obtain compressed waveform data, and the compressed waveform data is stored in a waveform memory. (For example, refer to Patent Document 2).
[0003]
[Problems to be solved by the invention]
In the waveform memory sound source, the data is compressed and stored in order to reduce the data amount of the compressed waveform data, but the amount of the shift down is controlled based on the limited bit length and expanded. There was a problem that the degree of quality degradation was not taken into consideration. This shift-down amount is based on the residual data peak in the frame. If pulse-like noise enters the frame, the frame shift amount becomes unreasonably large due to the influence of the noise. However, there is a problem that quantization noise increases.
[0004]
Therefore, the present invention can reduce quantization noise when decompressing compressed waveform data compressed using a scale factor that gives quantization accuracy. Waveform expansion device The purpose is to provide.
[0005]
[Patent Document 1]
Patent No. 2605434
[Patent Document 2]
Japanese Patent No. 2727798
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the waveform expansion apparatus according to the present invention is configured such that a scale factor that gives quantization accuracy is composed of a main scale factor used in the entire frame and a sub scale factor used supplementarily in the subframe. Therefore, the scale factor can be adjusted for each subframe according to the nature of the original waveform data before compression. This makes it possible to adapt to local fluctuations in the rate of change of waveform data before compression, and to reduce quantization noise when decompressing using the main scale factor and subscale factor. It becomes like this. Then, the size of the subscale factor for each subframe may be included in the subinformation, or the subframe position information may be included in the subinformation to specify the subframe using the subscale factor.
[0007]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram of a musical sound generating apparatus provided with a waveform expansion device for expanding compressed waveform data according to the present invention in a sound source section. This musical tone generator is provided in the present invention. Characteristic Storage means for storing compressed waveform data having a data structure is also provided.
In the musical
[0008]
The
[0009]
Next, before describing the
FIG. 2 shows waveform data for one piece of compressed waveform data stored in the
[0010]
In this case, the number of bits of the sub information is a predetermined number of bits, and the number of bits of one sample of the residual code is determined for each waveform data so as to be suitable for the properties of the original waveform data before compression. The number of bits is fixed. When the data width of the small frame is 16 bits as shown in FIG. 2 and the number of bits of one sample of the residual code is fixed to 3 bits, for example, a 4-bit data area is allocated to the sub information. A 12-bit data area is allocated to the residual code, and the number of samples in one small frame is 4. If the number of bits of one sample of the residual code is fixed to 6 bits, the number of samples of one small frame is 2 as shown in the lower stage of the residual code in FIG. Similarly, if the number of bits of one sample of the residual code that is fixed is 4 bits, the number of samples of one small frame is 3 as shown in the lower stage of the residual code in FIG. If the number of bits of one sample of the residual code is 2 bits, the number of samples of one small frame is 6 as shown in the lower stage of the residual code in FIG. When the data width of a small frame is 16 bits, the number of bits constituting one frame is 160 bits, of which 40-bit data area is sub-information area and the remaining 120-bit data area is remaining. This is the difference code area. As described above, the number of samples of the residual code in one frame or one small frame is changed according to the number of bits of one sample of the residual code fixed for each music piece.
[0011]
Further, one frame is divided into a plurality of subframes. In the example illustrated in FIG. 2, an example in which the first subframe (sub1) and the second subframe (sub2) are divided into two subframes, and the first subframe (sub1) to the fourth subframe ( An example of sub-division into four sub-frames of sub 4) is shown. Here, if the number of bits of the residual code sample is 3 bits as shown in the figure, when divided into two subframes,
[0012]
By the way, the sub information includes prediction coefficient information which is a linear prediction coefficient used for decompressing the residual code of the next frame, a scale factor used for decompressing the residual code of the next frame, and other information. The scale factor is a factor for denormalizing a plurality of residual codes constituting one frame, and is composed of a main scale factor used in the entire frame and a subscale factor used supplementarily in the subframe. . This is to adapt to local fluctuations in the rate of change of the original waveform data before compression, as will be described later, and with the scale factor composed of a main scale factor and a subscale factor, As described above, it is divided into a plurality of subframes. If the main scale factor and the subscale factor are stored not as absolute values but as a ratio between frames or a difference in logarithmic scale, the efficiency of the information amount with respect to the number of bits can be improved. When the main scale factor and the subscale factor are ratios between frames or a difference in logarithmic scale, they are converted into absolute values at the time of inverse quantization and multiplied by the residual code. Other information may be information such as volume information and loop address of waveform data.
[0013]
Next, the
[0014]
Each time a request pulse output from the sample counter of the
[0015]
In the residual
[0016]
Here, when a sound generation start instruction (note-on) is generated by operation of the performance operator, automatic performance, input from the communication I / O, or the like, the
(1) One of a plurality of sound generation channels of the
(2) One of the waveform data stored in the
(3) Read the header of the selected waveform data, and read the number of bits of the residual code, the read start address, the read end address, the loop address, the prediction coefficient of the first frame, the scale factor and other data, Set to area. Each address in this case may be an address in units of frames.
(4) Write note-on in the sounding channel area.
As a result, the generation of the musical tone is started in the
[0017]
Next, FIG. 3 shows a configuration of the
[0018]
The waveform
[0019]
Returning to FIG. 1, the decompressed restored waveform data output from the
[0020]
As described above, in the musical
[0021]
Next, the present invention Waveform expansion device The characteristic scale factor will be described in detail with reference to FIGS. However, FIGS. 4 to 6 show different examples of the scale factor data structure, and FIG. 7 shows another example of the frame data structure.
FIG. 4A shows a first example of the data structure of the scale factor in the sub information of the frame. In this case, the frame is divided into two subframes. In this data structure, in the scale factor area, information on the size of the main scale factor (main SF), information on the size of the
[0022]
In FIG. 4B, the horizontal axis indicates time, that is, the residual code samples S1 to S40 are sequentially arranged. One frame is divided into a
[0023]
FIG. 5A shows a second example of the data structure of the scale factor in the sub information of the frame. In this case, the frame is divided into four subframes. In this data structure, information on the size of the main scale factor (main SF) and designation information for designating any subframe of subframe 1 (sub1) to subframe 4 (sub4) in the scale factor area (PSFA) and sub-scale factor size information (PSFD) are stored. FIG. 5B shows the relationship between the main scale factor (main SF) and the sub scale factor (PSFD) whose position is specified by the designation information (PSFA). In FIG. 5B, the horizontal axis indicates time, that is, the residual code samples S1 to S40 are sequentially arranged. One frame includes
[0024]
In FIG. 5B, the positions of samples S21 to 30 (subframe 3) are designated by designation information (PSFA). That is, since the change rate of the original waveform data corresponding to
[0025]
Further, FIG. 6A shows a third example of the data structure of the scale factor in the sub information of the frame. In this case, the frame is divided into four subframes. In this data structure, information on the size of the main scale factor (main SF) and designation information for designating any subframe of subframe 1 (sub1) to subframe 4 (sub4) in the scale factor area (PSFA), sub-scale factor size information (PSFD), and flags F1, F2, F3, F4 indicating whether to set a unit sub-scale factor (Δ sub-SF) in each sub-frame are stored. Yes. The flags F1, F2, F3, and F4 are 1-bit information of “1” or “0”, the flags F2 and F4 are “1”, and the flags F1 and F3 are “0”. And FIG. 6B shows a main scale factor (main SF), a sub scale factor (PSFD) specified by position information (PSFA), and unit sub scale factors (set by flags F1, F2, F3, F4). The relationship with Δ sub SF) is shown.
[0026]
In FIG. 6B, the horizontal axis represents time, that is, the residual code samples S1 to S40 are sequentially arranged. One frame consists of
[0027]
FIG. 7 shows another example of the data structure of the frame. In this example of the data structure, the sub-information includes prediction coefficient information that is a linear prediction coefficient used for decompressing the residual code of the next frame, information on the scale factor used for decompressing the residual code of the next frame, and other information. Information. The scale factor has a data structure shown in FIG. 4A as an example, and is composed of a main scale factor (main SF), a sub scale factor 1 (sub SF1), and a sub scale factor 2 (sub SF2). Yes. The sub information is used for decoding the residual code sample in the next frame, but if the data structure is as shown in FIG. 7, a part of the register can be omitted. That is, when decoding a residual code sample in
[0028]
Next, a configuration of a waveform compression apparatus that performs compression processing of original waveform data using linear prediction is shown in FIGS.
The waveform compression apparatus includes an initial SF calculation unit 50 shown in FIG. 8, a coder 60 and a
[0029]
The initial SF calculation unit 50 shown in FIG. 8 includes a sample of original waveform data selected from the
[0030]
The initial scale factor (initial SF) and the prediction coefficient P calculated in this way are set in the prediction coefficient & scale
[0031]
The residual code sample Ln is output as compressed waveform data from the coder 60 and supplied to the
[0032]
Incidentally, as described above, the scale factor is composed of a main scale factor and a subscale factor. Therefore, the prediction coefficient & scale
Here, the method of obtaining the residual code sample without feedback as shown in FIG. 8 is defined as AbS (Analysys by Synthesys), and the residual code sample is fed back as shown in FIG. Is defined as AbS.
[0033]
Next, FIG. 10 shows a flowchart of the SF search process for one frame executed in the waveform compression apparatus of the present invention.
In the SF search process for one frame shown in FIG. 10, when the search for the scale factor is started, the sample of waveform data (original waveform sample) selected from the
[0034]
In this way, the initial scale factor (initial SF) is calculated, waveform compression based on linear prediction using Ab and the linear prediction coefficient P is performed, and a residual sample dn for one frame is obtained. At this time, first, waveform compression with AbS is performed in the quantization unit 62 and the
[0035]
If it is determined in step S18 that the noise level is greater than the threshold, the process branches to step S19 because the scale factor is not suitable. In step S19, the main scale factor SF is changed to a value larger by one step, the threshold value is changed to a value corresponding to the main scale factor, and the process returns to step S15. Based on the new value of the main scale factor, the processing from step S15 to step S18 is repeated. Then, when it is determined in step S18 that the noise level is smaller than the threshold value, the SF search process for one frame ends. As described above, when the noise level in one frame is less than the threshold, it is determined that the scale factor is suitable. However, if the noise level instantaneously exceeds the threshold, this is ignored and the noise level is ignored. It may be determined that the scale factor is suitable when the average value is less than the threshold value. In addition, since the threshold value is changed according to the scale factor, the noise level can be allowed according to the scale factor. If the main scale factor SF has reached the maximum value in step S17, the main scale factor cannot be increased further, and the SF search process for one frame is finished as it is. The framed waveform data composed of the residual code samples obtained by compressing the original waveform data using the scale factor SF searched in this way is stored in the storage means.
[0036]
In the SF search process for one frame executed in the waveform compression apparatus, as described above, when calculating the initial scale factor, the sample for one frame of the waveform data is first supplied to the initial SF calculation unit 50, A prediction coefficient P and an initial scale factor are calculated. Then, the calculated prediction coefficient P and the initial scale factor are set in the coder 60, and the threshold at which the noise level, which is the error between the original waveform sample and the linear prediction sample, is changed to the allowable quantization error level by changing the scale factor. The original waveform sample for one frame is repeatedly supplied to the coder 60 until it becomes smaller. As described above, in the waveform compression apparatus, compression processing suitable for the waveform data is performed by repeatedly reading and processing the sample for one frame of the waveform data. Thus, since the initial scale factor is calculated in the initial SF calculation unit 50, the number of times the coder 60 searches for the scale factor can be significantly reduced. As a result, the compression process can be performed at high speed.
[0037]
In the above description, the number of bits of the residual code sample is fixed in the waveform data for each song, but the number of bits of the residual code sample is variable for each frame, and the number of bits is specified by the sub information. You may make it do. In this case, information on the number of bits in the sub information is supplied from the sub
In the waveform compression apparatus of the present invention described above, compression / expansion is performed by linear prediction, but compression / expansion may be performed by a method other than linear prediction such as adaptive difference.
[0038]
【The invention's effect】
As described above, according to the present invention, the scale factor giving the quantization accuracy is composed of the main scale factor used in the entire frame and the sub scale factor used supplementarily in the subframe. The scale factor can be adjusted for each subframe according to the nature of the waveform data. This makes it possible to adapt to local fluctuations in the rate of change of waveform data before compression, and to reduce quantization noise when decompressing using the main scale factor and subscale factor. It becomes like this.
[Brief description of the drawings]
BRIEF DESCRIPTION OF DRAWINGS FIG. 1 is a block diagram of a musical sound generation device including a waveform decompression device for decompressing compressed waveform data according to an embodiment of the present invention in a sound source unit.
FIG. 2 is a diagram showing a data structure of compressed waveform data according to the embodiment of the present invention.
FIG. 3 is a diagram showing a detailed configuration of a decoder which is a waveform expansion device according to an embodiment of the present invention.
FIG. 4 is a diagram showing a first example of a scale factor data structure in the compressed waveform data structure according to the embodiment of the present invention;
FIG. 5 is a diagram showing a second example of the data structure of the scale factor in the data structure of the compressed waveform data according to the embodiment of the present invention.
FIG. 6 is a diagram showing a third example of a scale factor data structure in the compressed waveform data structure according to the embodiment of the present invention;
FIG. 7 is a diagram showing another example of the frame data structure in the data structure of the compressed waveform data according to the embodiment of the present invention;
FIG. 8 is a diagram illustrating a configuration of an initial SF calculation unit configuring the waveform compression device.
FIG. 9 is a diagram showing a configuration of a coder constituting the waveform compression device.
FIG. 10 is a flowchart of SF search processing for one frame executed by the waveform compression apparatus.
[Explanation of symbols]
DESCRIPTION OF
Claims (4)
前記フレーム中の副情報をデコードする副情報デコード手段と、
該副情報デコード手段によりデコードされた副情報の少なくとも前記スケールファクタの情報を用いて、前記フレームにおける圧縮符号化されている残差符号のサンプルをデコードする残差符号デコード手段とを備え、
前記フレームは複数のサブフレームに分割されており、前記スケールファクタはフレーム全体で用いられる主スケールファクタと、前記サブフレームで補助的に用いられる副スケールファクタとからなり、前記残差符号デコード手段が残差符号のサンプルをデコードする際に、当該サンプルが属するサブフレームに設定されている前記副スケールファクタと、前記主スケールファクタとに基づいてデコードするようにしたことを特徴とする波形伸長装置。A waveform decompression device that decodes compressed waveform data compressed by a scale factor that gives quantization accuracy that can be different for each frame,
Sub-information decoding means for decoding sub-information in the frame;
Using at least the scale factor information of the sub information decoded by the sub information decoding means, and comprising a residual code decoding means for decoding a sample of the residual code that has been compression encoded in the frame,
The frame is divided into a plurality of subframes, and the scale factor includes a main scale factor used in the entire frame and a subscale factor used supplementarily in the subframe, and the residual code decoding means A waveform expansion apparatus, wherein when decoding a residual code sample, decoding is performed based on the sub-scale factor set in a subframe to which the sample belongs and the main scale factor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003082924A JP3933073B2 (en) | 2003-03-25 | 2003-03-25 | Waveform expansion device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2003082924A JP3933073B2 (en) | 2003-03-25 | 2003-03-25 | Waveform expansion device |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2004294492A JP2004294492A (en) | 2004-10-21 |
JP3933073B2 true JP3933073B2 (en) | 2007-06-20 |
Family
ID=33398550
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2003082924A Expired - Lifetime JP3933073B2 (en) | 2003-03-25 | 2003-03-25 | Waveform expansion device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3933073B2 (en) |
-
2003
- 2003-03-25 JP JP2003082924A patent/JP3933073B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JP2004294492A (en) | 2004-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5744739A (en) | Wavetable synthesizer and operating method using a variable sampling rate approximation | |
US7692087B2 (en) | Compressed data structure and apparatus and method related thereto | |
US6096960A (en) | Period forcing filter for preprocessing sound samples for usage in a wavetable synthesizer | |
EP0680654B1 (en) | Text-to-speech system using vector quantization based speech encoding/decoding | |
JP2002335161A (en) | Signal processor and processing method, signal encoder and encoding method, signal decoder and decoding method | |
JPH10319996A (en) | Efficient decomposition of noise and periodic signal waveform in waveform interpolation | |
US20080167882A1 (en) | Waveform compressing apparatus, waveform decompressing apparatus, and method of producing compressed data | |
JP3933072B2 (en) | Wave compressor | |
JP3933073B2 (en) | Waveform expansion device | |
JP2001508886A (en) | Apparatus and method for approximating exponential decay in a sound synthesizer | |
US20030108108A1 (en) | Decoder, decoding method, and program distribution medium therefor | |
JP3826870B2 (en) | Compressed data structure, waveform generation device, and waveform storage device | |
JP4107085B2 (en) | Waveform data compression method | |
JP4007194B2 (en) | Sound generator | |
JP2796408B2 (en) | Audio information compression device | |
Maher | Wavetable synthesis strategies for mobile devices | |
JP3912304B2 (en) | Compressed data structure, waveform generation device, and waveform storage device | |
JP3603343B2 (en) | Waveform reading device | |
JPH0888525A (en) | Automatic gain controller by detection of silent tone | |
JP3747357B2 (en) | Music signal encoding apparatus and decoding apparatus | |
JP3945435B2 (en) | Waveform data compression method, tone signal generation method, tone signal processing apparatus, and program | |
Maher | Compression and decompression of wavetable synthesis data | |
JP2006080927A (en) | Encoding method, encoding apparatus, decoding method, and decoding apparatus | |
JP6146686B2 (en) | Data structure, data storage device, data retrieval device, and electronic musical instrument | |
JPH056171A (en) | Sound wave compression method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050927 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20060906 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061003 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061110 |
|
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: 20070227 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070312 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 3933073 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110330 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110330 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120330 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130330 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140330 Year of fee payment: 7 |