JP3826870B2 - Compressed data structure, waveform generation device, and waveform storage device - Google Patents

Compressed data structure, waveform generation device, and waveform storage device Download PDF

Info

Publication number
JP3826870B2
JP3826870B2 JP2002288783A JP2002288783A JP3826870B2 JP 3826870 B2 JP3826870 B2 JP 3826870B2 JP 2002288783 A JP2002288783 A JP 2002288783A JP 2002288783 A JP2002288783 A JP 2002288783A JP 3826870 B2 JP3826870 B2 JP 3826870B2
Authority
JP
Japan
Prior art keywords
waveform data
frame
compressed
data
bits
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
JP2002288783A
Other languages
Japanese (ja)
Other versions
JP2004126127A (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 JP2002288783A priority Critical patent/JP3826870B2/en
Priority to US10/676,205 priority patent/US7378586B2/en
Publication of JP2004126127A publication Critical patent/JP2004126127A/en
Priority to US11/289,881 priority patent/US7256340B2/en
Application granted granted Critical
Publication of JP3826870B2 publication Critical patent/JP3826870B2/en
Priority to US11/810,872 priority patent/US7692087B2/en
Priority to US11/860,484 priority patent/US7521621B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、楽音生成装置等に用いられる記憶されている圧縮波形データのデータ構造、その圧縮波形データを読み出して楽音を生成する楽音生成装置、および、波形データを圧縮した圧縮波形データを書き込む波形記憶装置に関するものである。
【0002】
【従来の技術】
従来、電子楽器における楽音信号の発生方法の一つとして、自然楽器の楽音波形の瞬時値を逐次サンプリングしてディジタルとされたサンプル波形データとして予めメモリに記憶しておき、楽音の発生時にこのサンプル波形データを読み出して楽音信号を発生するようにしたPCM方式がある。このPCM方式は自然楽器に近い楽音を発生できるという点で優れているが、波形データを記憶しておくメモリの容量が膨大になるという問題がある。これを解決するために、サンプル波形データを圧縮し、この圧縮波形データをメモリに記憶しておき、再生時にはこの圧縮波形データを伸長して楽音信号を形成するようにした楽音信号発生装置が提案されている(特許第2605434号参照)。
【0003】
【発明が解決しようとする課題】
このような楽音信号発生装置においては、サンプル波形データが圧縮されているため、メモリ容量を効率的に使用することができる。また、圧縮波形データは可変長に圧縮処理されており、例えば16サンプルの固定数の圧縮波形データによりフレームが構成されて、このフレーム毎にメモリに記憶されている。このため、フレームの総ビット数は、圧縮処理された1サンプルあたりの圧縮波形データのビット数に応じて可変とされている。
すると、フレームが可変長とされていることからメモリ上においてフレーム毎にフレーム開始位置が異なるようになる。このため、フレームの先頭アドレスを演算して算出する回路が必要となり、圧縮波形データを伸長処理する回路が複雑になると云う問題点があった。
【0004】
そこで本発明は、簡易な構成で伸長処理することができる圧縮データ構造、波形生成装置および波形記憶装置を提供することを目的としている。
【0005】
【課題を解決するための手段】
上記目的を達成するため、本発明にかかる圧縮データ構造、波形生成装置および波形記憶装置においては、フレームを構成する総ビット数を固定としている。これにより、フレームの開始位置が決まった位置となることからフレームの先頭アドレスを容易に得ることができるようになる。したがって、波形データを効率よく記憶することができると共に、伸長処理を行う回路を簡単化することができるようになる。
また、圧縮波形データと共にフレームを構成する副情報には、前記圧縮波形データにおける圧縮関連情報が含まれている。そこで、この圧縮関連情報を利用して圧縮波形データの伸長処理を行うことができる。なお、フレーム内における圧縮波形データの1サンプル当たりのビット数は一定とされている。さらに、可変長とされた1サンプル当たりの圧縮波形データのビット数を、フレームにおける圧縮波形データが格納される固定長のデータ領域のビット数における素数の倍数のビット数とすると、無駄なビットを生じさせることなく効率よく圧縮波形データを記憶することができるようになる。
【0006】
【発明の実施の形態】
本発明の実施の形態にかかる波形記憶装置の概略構成を示すブロック図を図1に示す。
図1に示すように、波形記憶装置は波形記憶部10と制御部4とから構成されている。波形記憶部10は、入力された元波形データを可変長の圧縮波形データに圧縮処理する圧縮処理部1と、圧縮処理された圧縮波形データを副情報と共にフレーム化するフレーム化部2と、フレーム化部2により生成されたフレームが書き込まれて記憶される記憶手段3から構成されている。制御部4は、波形記憶部10における波形記憶処理の制御を行うことにより、圧縮波形データの1サンプル当たりのビット数をフレーム毎に可変制御していると共に、圧縮波形データの1サンプル当たりのビット数をフレーム内において一定とする圧縮処理の制御を行うようにしている。圧縮処理部1においては適用差分符号化(ADPCM)を利用して圧縮処理を行うことができると共に、線形予測符号化(LPC)を利用して圧縮処理を行うことができるようにされている。
【0007】
ここで、ADPCMを利用して圧縮処理を行う圧縮処理部1の構成例を図2に示す。
図2において、元波形データSnは、減算器11に入力されてADPCM予測部17より出力される予測信号◇Snが減算され、残差信号dn(=Sn−◇Sn)が出力される。この残差信号dnは、量子化部12において、まず、信号のレベルを量子化幅信号△nに基づいて量子化(正規化)されつつビット数kを決定され、さらに決定されたビット数kで符号化されてビット数kの圧縮波形データLnに変換される。量子化幅判定部13は、この圧縮波形データLnと過去の圧縮波形データから量子化幅を判定し、最適の量子化幅信号Δnを出力して量子化部12に重みとして供給する。また、圧縮波形データLnは逆量子化部15に供給されて量子化幅信号△nに基づいて逆量子化(逆正規化)され、圧縮波形データLnの復号信号qnとして出力される。復号信号qnは加算器16に供給され、ADPCM予測部17より出力される予測信号◇Snが加算されて再生波形データ◇Xnが再生され、ADPCM予測部17に供給されるようになる。ADPCM予測部17では、過去のp個の再生波形データ◇Xn-p,◇Xn-p+1,・・・◇Xn-1までを用いて現サンプルの予測信号◇Snを生成する。
【0008】
このようにして元波形データの圧縮処理がサンプル毎に行われることにより、圧縮波形データが量子化部12から順次出力されてフレーム化部14に供給される。フレーム化部14においては、総ビット数が固定とされて固定長とされているフレームを、量子化部12から順次出力されてフレーム化部14に供給された圧縮波形データと、ビット数k情報およびその他の副情報からなる副情報とで構成する。この場合、副情報にはフレーム内の固定された副情報領域が割り当てられており、残るフレーム内のデータ領域が圧縮波形データに割り当てられる。圧縮波形データは、順次割り当てられたデータ領域につめこまれて副情報と共にフレームが構成される。このようにして生成されたフレームは、フレーム毎に出力されて記憶手段に書き込まれるようになる。なお、フレーム内における圧縮波形データのビット数は同一とされており、フレーム毎に圧縮波形データのビット数を可変とできるようにされている。
【0009】
このようにフレーム化された圧縮波形データを伸長するデコーダの構成例を図3に示す。
図3において、記憶手段から読み出されたフレームが供給されるデータ取出部21は、フレーム内の固定された副情報領域から副情報を取り出すと共に副情報中のビット数k情報から、圧縮波形データのビット数を決定し、決定されたビット数に基づいてフレーム内のデータ領域から順次圧縮波形データLnを抽出して逆量子化部22に供給している。圧縮波形データLnは、量子化幅判定部23にも供給され、量子化幅判定部23はこの圧縮波形データLnと過去の圧縮波形データから量子化幅を判定し、最適の量子化幅信号Δnを出力して逆量子化部22に重みとして供給する。逆量子化部22は、量子化幅判定部23から出力された量子化幅信号△nに基づいて逆量子化(逆正規化)を行い、圧縮波形データLnの復号信号qnを出力している。加算器24においてこの復号信号qnに、ADPCM予測部25より出力される予測信号◇Snが加算されて再生波形データ◇Xnが再生されて復号波形データとして出力される。また、再生波形データ◇XnはADPCM予測部25に供給されて、過去のp個の再生波形データ◇Xn-p,◇Xn-p+1,・・・◇Xn-1から現サンプルを復元するのに使用される予測信号◇Snが生成される。
【0010】
このようにして、デコーダから出力された復号波形データに基づいて、音を生成することにより再生音を得ることができる。この場合、記憶手段に記憶されているフレーム化された圧縮波形データの元データが楽音波形データであった場合は、出力された復号波形データに基づいて楽音を生成できるようになる。なお、データ取出部21においては、その他の副情報が出力されており、この副情報を音量情報や波形データのループアドレスとすることにより、楽音を生成する際に音量情報や波形データのループアドレスを利用して楽音を生成することができるようになる。
【0011】
次に、LPCを利用して圧縮処理を行う圧縮処理部1の構成を図4に示す。
図4において、元波形データSnは予測係数算出部33に入力され、フレームに対応する所定期間の元波形データのサンプルから自己相関法等の線形予測係数演算によって予測係数Pn(p個の係数、ないし、p個の係数を示すインディクス)が算出されてフレーム判定部34に供給される。また、減算器31に入力された元波形データSnからは、線形予測部38より出力される線形予測信号◇Snが減算され、残差信号dn(=Sn−◇Sn)が出力される。この残差信号dnは、量子化部32において、その信号のレベルを指定された量子化幅信号とビット数とに基づいて量子化(正規化)されつつ符号化され、指定されたビット数の圧縮波形データLnに変換される。また、圧縮波形データLnは逆量子化部36に供給されて指定された量子化幅信号とビット数とに基づいて逆量子化(逆正規化)され、圧縮波形データLnの復号信号qnとして出力される。復号信号qnは加算器37において、線形予測部38より出力される線形予測信号◇Snが加算されて再生波形データ◇Xnが再生されて、線形予測部38に供給されるようになる。線形予測部38では、予測係数Pnと過去のp個の再生波形データ◇Xn-p,◇Xn-p+1,・・・◇Xn-1に基づいて線形予測演算を行い、現サンプルの線形予測信号◇Snを生成している。
【0012】
フレーム判定部34においては、圧縮処理部1による元波形データの1フレーム分の線形予測圧縮を、異なるビット数、予測係数、ないし量子化幅で複数通りに実行させ、その圧縮結果に基づいて各フレームの圧縮のためのビット数、予測係数、量子化幅を決定している。量子化部32は、決定されたビット数および量子化幅信号に基づいて量子化を行い圧縮波形データLnを生成している。この場合、フレーム判定部34において、まず、過去のビット数に基づいてビット数を仮決定し、線形予測係数算出部33から仮決定されたビット数で圧縮する場合の1フレームの元波形データに応じた予測係数Pnを供給する。続いて、フレーム判定部34において、過去の量子化幅に基づいて量子化幅が仮決定され、線形予測部38における予測係数Pnによる線形予測と、量子化部32における仮決定されたビット数と量子化幅に基づく量子化が行われ、圧縮波形データLnが生成される。以上の仮の線形予測圧縮処理における再生波形データ(加算器37から出力される)と元波形データとが対比され、再生波形データの歪率が算出される。そして、複数とおりに行われた仮の線形予測圧縮処理の結果に基づき、歪率が許容範囲に入る範囲で最も圧縮率が良くなるビット数、予測係数、量子化幅の組み合わせがフレーム毎に決定される。
【0013】
このようにしてフレーム毎に決定された予測係数、ビット数および量子化幅によりフレームを構成する元波形データの圧縮処理がサンプル毎に行われて、圧縮波形データが量子化部32から順次出力されてフレーム化部35に供給される。フレーム化部35においては、総ビット数が固定とされて固定長とされているフレームを、量子化部35から順次出力されてフレーム化部35に供給された圧縮波形データと、決定された予測係数、ビット数および量子化幅情報およびその他の副情報からなる副情報とにより構成する。この場合、副情報にはフレーム内の固定された副情報領域が割り当てられており、フレーム内の残るデータ領域が圧縮波形データに割り当てられる。圧縮波形データは、順次割り当てられたデータ領域につめこまれて副情報と共にフレームが構成される。このようにして生成されたフレームは、フレーム毎に出力されて記憶手段に書き込まれるようになる。なお、フレーム毎に圧縮波形データの予測係数、ビット数および量子化幅を可変することができる。
【0014】
このようにしてフレーム化された圧縮波形データを伸長するデコーダの構成例を図5に示す。
図5において、記憶手段から読み出されたフレームが供給されるデータ取出部41は、フレーム内の固定された副情報領域から副情報を取り出すと共に副情報中のビット数情報に基づいてフレーム内の固定されたデータ領域から圧縮波形データLnを順次取り出して逆量子化部42に供給している。さらに、データ取出部41においては副情報から予測係数情報Pnを取り出して線形予測部44に供給すると共に、量子化幅情報を取り出して逆量子化部42に供給している。逆量子化部42は、データ取出部41から供給された量子化幅情報に基づいて圧縮波形データLnの逆量子化(逆正規化)を行い、復号信号qnを出力する。復号信号qnは加算器43において、線形予測部44より出力される予測信号◇Snが加算されて再生波形データ◇Xnが再生されて復号波形データとして出力される。また、再生波形データ◇Xnは線形予測部44に供給され、線形予測部44は、予測係数Pnと過去のp個の再生波形データ◇Xn-p,◇Xn-p+1,・・・◇Xn-1に基づいて線形予測演算を行うことにより現サンプルの線形予測信号◇Snを生成している。
【0015】
このようにして、デコーダから出力された復号波形データに基づいて、音を生成することにより再生音を得ることができる。この場合、記憶手段に記憶されているフレーム化された圧縮波形データの元データが楽音波形データであった場合は、出力された復号波形データに基づいて楽音を生成できるようになる。なお、データ取出部21においては、その他の副情報が出力されており、この副情報を音量情報や波形データのループアドレスとすることにより、楽音を生成する際に音量情報や波形データのループアドレスを利用して楽音を生成することができるようになる。
【0016】
ここで、記憶手段3に記憶される圧縮波形データと副情報から構成されるフレームの本発明にかかるデータ構造の線形予測圧縮を利用した場合の一例を図8に示す。
図8には、1サンプル当たりの圧縮波形データが2ビット、3ビット、4ビット、5ビット、6ビットおよび10ビットとされている場合のフレームのデータ構造が示されている。1サンプル当たりの圧縮波形データが2ビットとされている場合を例に挙げて説明すると、1フレームは、例えば図示するようにアドレスが「00」から「04」の5アドレスに対応するデータの大きさとされており、1アドレスに対応するデータ幅が、例えば16ビットとされていることから、1フレームの総ビット数は80ビットとされている。この1フレームの総ビット数は固定長とされている。また、フレームは先頭から20ビットの固定長の副情報領域と、残る60ビットの圧縮波形データが格納される固定長のデータ領域から構成されている。この場合、副情報領域には11ビットの予測係数情報、5ビットの量子化幅情報および4ビットのビット数情報が格納され、データ領域には1サンプル当たり2ビットに圧縮されているサンプル番号「1」〜「30」の圧縮波形データが30サンプル分格納されている。フレーム内においては圧縮された1サンプル当たりの圧縮波形データのビット数は固定とされている。
【0017】
このように、1フレームの総ビット数が1アドレスに対応するデータ幅を単位とした固定ビット数とされていることから、フレームは決まった位置から開始するようになる。例えば、図8に示すように1フレームが5データ幅とされている場合は、フレームの開始アドレスは「00」から始まり5アドレス毎のアドレス位置から開始するようになる。また、副情報領域は固定長とされていることから圧縮波形データの開始位置も決まった位置となる。したがって、伸長処理する際にフレームを読み出すアドレスを簡易な構成で生成することができるようになる。また、図8に示すように1サンプル当たりの圧縮波形データが3ビット、4ビット、5ビット、6ビットおよび10ビットとされている場合においても1フレームの総ビット数は、1アドレスに対応するデータ幅を単位とした固定ビット数とされている。
【0018】
したがって、図8に示すように1フレームが5データ幅とされている場合において、1サンプル当たりの圧縮波形データが3ビットとされている場合は、20サンプル分の圧縮波形データが1フレームに格納され、4ビットとされている場合は、15サンプル分の圧縮波形データが1フレームに格納される。同様にして、5ビットとされている場合は、12サンプル分の圧縮波形データが1フレームに格納され、6ビットとされている場合は、10サンプル分の圧縮波形データが1フレームに格納され、10ビットとされている場合は、6サンプル分の圧縮波形データが1フレームに格納される。このように、圧縮波形データに割り当てられている60ビットの素数である2,3,5の倍数のビット数とすることにより、無駄を生じることなくフレーム内に圧縮波形データを詰め込むことができるようになる。
なお、ADPCM圧縮された圧縮波形データを記憶する場合には、予測係数や量子化幅の情報を記憶する必要がないので、図8のデータ構造におけるアドレス「00」の領域は不要であり、各フレーム毎に「01」から「04」の4アドレスに対応するデータだけを記憶するようにすればよい。
【0019】
次に、本発明にかかるデータ構造のフレーム化された圧縮波形データが記憶されている記憶手段3を備える本発明にかかる楽音生成装置のブロック図を図6に示す。
図6に示す楽音生成装置50おいて、CPU61は楽音生成に関連する各種プログラムを実行することにより楽音生成装置50における楽音生成の動作を制御する中央処理装置(Central Processing Unit)であり、タイマ64は動作時の経過時間を示したり、特定の間隔でタイマ割込を発生するタイマであり、自動演奏の時間管理等に使用される。フラッシュROM62は、CPU61が実行する楽音生成処理のプログラムや、本願発明にかかるデータ構造のフレーム化された圧縮波形データ等の各種データが格納される書き換え可能なフラッシュROM(Read Only Memory)である。ROM/RAM63は楽音生成装置50におけるメインメモリであり、CPU61のワークエリア等が設定されるRAM(Random Access Memory)と、本願発明にかかる波形記憶装置により、本願発明にかかるデータ構造のフレーム化された圧縮波形データ等のデータが書き込まれているROMからなるメモリシステムである。
【0020】
また、演奏操作子65は鍵盤等の演奏操作子であり、MIDIインタフェース66は、楽音生成装置50内部で作成したMIDIメッセージを外部へ送出したり、外部からのMIDIメッセージを受信するMIDIインターフェースである。パネルスイッチ(パネルSW)67は、楽音生成装置50のパネルに設けられている各種スイッチであり、これを操作することにより楽音生成装置50に各種指示を与えることができる。表示器68は、楽音生成時に各種情報を表示させる表示器である。さらに、表示器68の周囲に設けられている表示器SW69を操作することにより楽音生成装置50に各種指示を与えることができる。ハードディスク70は、本願発明にかかるデータ構造のフレーム化された圧縮波形データを記憶することができると共に、演奏データやユーザ設定データ等を記憶することができる大容量記憶媒体である。
【0021】
音源部71は、フレーム化された圧縮波形データの伸長処理を行う図3や図5に示すような構成のデコーダを備えており、CPU61の制御に基づいて、ROM/RAM63から楽音生成に必要とするフレーム化された圧縮波形データを読み出し、この圧縮波形データの伸長処理を行っている。そして、デコードされた波形データの補間、エンベロープ付与、チャンネル累算(ミキシング)、および効果(エフェクト)付与などの処理を行って、楽音波形データとして出力している。音源部71から出力された楽音波形データは、サウンドシステム72に供給されてアナログ信号に変換され放音されるようになる。なお、各部はバス73を介して接続されている。
【0022】
次に、楽音生成装置50における音源部71の詳細構成を示すブロック図を図7に示す。
楽音生成装置50におけるCPU61は、ノートオンに応じて楽音を発生する際に、音源部の有する複数の発音チャンネルの中から、該ノートオンに応じた楽音生成に使用するチャンネル(割り当てチャンネル)を選択し、制御レジスタ80の割り当てチャンネルに対応する記憶領域に各種音源パラメータを設定し、同チャンネルの発音の開始指示を出す。発音開始指示と共に制御レジスタ80に供給される音源パラメータ情報は、波形メモリ読み出し速度(楽音ピッチに対応)、波形メモリ読み出し区間、エンベロープパラメータ、ミキサ部87に対する設定情報、およびエフェクト用係数等とされる。この内の波形メモリ読み出し区間パラメータは、読み出す圧縮波形データの開始アドレスおよびそのデータ長とされる。
【0023】
アドレス発生部82は、制御レジスタ80から供給されている各発音チャンネルのピッチ情報および読出開始アドレスに基づいて、ROM/RAM63における波形記憶部63aから読み出す圧縮波形データが格納されているフレームを読み出すためのフレームアドレス(FAD)を作成している。具体的には、ピッチ情報であるFナンバを波形データ生成タイミング(サンプリング周期)毎に累算して読み出しアドレスを算出し、その整数部と読出開始アドレスに基づいてフレームアドレス(FAD)を作成している。このフレームアドレスはフレーム読出部81に供給されて、フレームアドレスに対応するフレームが波形記憶部63aから読み出されて、フレームキャッシュ部83に1フレーム分キャッシュされる。この場合、図8に示すようにフレームは1アドレスに対応するデータ幅を単位とする固定長とされて、フレームの先頭アドレスは決まっていることからアドレス発生部82を簡単な構成とすることができる。そして、フレームキャッシュ部83に新たなフレームがキャッシュされた際には、フレームキャッシュ部83から副情報が読み出されて、副情報の内の伸長処理する際に必要な圧縮関連情報がデコーダ84に設定される。例えば、圧縮波形データがADPCMを利用して圧縮処理されている場合は、圧縮されたビット数情報がデコーダ84に設定され、LPCを利用して圧縮処理されている場合は、圧縮されたビット数、線形予測係数、量子化幅情報がデコーダ84に設定される。また、圧縮関連情報以外の副情報は、制御レジスタ80に送られて格納される。
【0024】
さらに、アドレス発生部82において算出された読出アドレスの整数部はフレームキャッシュ部83に供給され、その小数部は補間部85に補間情報として供給される。フレームキャッシュ部83から読出アドレスの整数部に応じて読み出された圧縮波形データはデコーダ84に供給される。この場合、補間部85における補間処理において当該サンプリング周期における読出アドレスの整数部の増加分に対応した数の圧縮波形データのサンプルをフレームキャッシュ部83から読み出すアドレスがアドレス発生部82において作成され、対応する圧縮波形データがデコーダ84に読み出される。デコーダ84においては、フレームキャッシュ部83から読み出された複数の圧縮波形データに、設定された圧縮関連情報とデコーダ84内のバッファに記憶されている伸長されたpサンプルの波形データとに基づいて順次に伸長処理を施して元の波形データを再生しつつ、同バッファに伸長された波形データを保存している。なお、このバッファは、順次伸長される波形データのうちの最新のpサンプル分を保存するよう制御されている。
【0025】
このように、アドレス発生部82においてはサンプリング周期ごとにFナンバを累算して波形データの読み出しアドレスを生成するような通常の波形メモリ音源のアドレスカウンタがそのまま使用することができる。また、圧縮波形データのビット数がフレーム毎に異なる場合でも、フレーム内の固定されたデータ領域から決められたビット数ずつ取り出せばよいので、圧縮波形データを取り出すデータ取出部の構成を極めて簡単にすることができる。例えば、図8に示されるフレームであれば、2ビットと4ビット、3ビットと6ビット、5ビットと10ビットの各組について取り出しのロジックをかなりの部分で共用することができるようになる。
【0026】
ここで、補間部85において2点補間が行われる場合は、デコーダ84内のバッファから、保持されているp個の伸長された波形データのうちの最新の2サンプル(そのnサンプル後の連続した2サンプルでもよい)が供給される。そこで、この2サンプルの圧縮波形データがフレームキャッシュ部83から読み出されて、デコーダ84において伸長されバッファに格納されている。そこで、この2サンプルの伸長された波形データ間を、アドレス発生部82から供給されている波形データ読出アドレスの小数部に基づいて補間処理することにより、補間された波形データを得るようにしている。また、補間部85において4点補間が行われる場合は、デコーダ84内のバッファから同最新の4サンプル(そのnサンプル後の連続した4サンプルでもよい)が供給され、この4サンプルの伸長された波形データと、アドレス発生部82から供給されている波形データ読出アドレスの小数部に基づいて補間処理することにより、補間された波形データを得るようにしている。
【0027】
補間部85から出力された補間された波形データは、音量EG部86において制御レジスタ80から供給されている音量エンベロープデータにしたがって音量制御される。このような処理は、発音チャンネル毎にその処理タイミングにおいて行われており、音量EG部86から出力されたエンベロープ付与された複数の発音チャンネルの波形データが、ミキサ部87においてミキシングされる。ミキサ部87から出力された複数の発音チャンネルがミキシングされた波形データは、DAC88においてアナログ信号に変換されてサウンドシステム72に向けて出力される。また、ミキサ部87において操作子の操作に応じた効果付与処理を行うようにしてもよい。
【0028】
以上の説明においては、1フレームごとに圧縮波形データのビット数を変えることのできる可変長となっていたが、必ずしもそうしなくてもよい。例えば、複数フレームごとにビット数を変えられるようにしてもよいし、あるいは、(フレームごとにはビット数を変えずに)選択される波形データごとにビット数を変えるようにしてもよい。
さらに、上記の説明においては記憶手段の1アドレスに対応するデータ幅は16ビットとされていたが、1データ幅は16ビットに限らず8ビット、24ビット等でもよい。
さらにまた、80ビットからなる1フレームの場合には、副情報に20ビット、圧縮波形データに60ビットを割り当てるようにしたが、1フレームの総ビット数はこれに限るものではなく、1アドレスに対応するデータ幅を単位とする固定長とされていればよく、副情報および圧縮波形データの割り当てもそれぞれ固定長とされていれば任意の割合で割り当てることができるものである。
さらにまた、上記の説明では圧縮波形データのビット数を、格納されるデータ領域のビット数における素数の倍数のビット数としたが、これに限るものではなく任意のビット数としてもよい。この場合においては、フレームにおける最後のサンプルの圧縮波形データを捨てるようにすればよい。
【0029】
【発明の効果】
本発明は以上説明したように、圧縮波形データを記憶するフレームのサイズを固定とし、そのフレーム内の固定された位置に副情報領域とデータ領域とを設け、それぞれ副情報と圧縮波形データのサンプルを記憶する。圧縮波形データのサンプルのビット数が異なる場合でもデータ領域のサイズが変わらないため、記憶する圧縮波形データのサンプルのビット数に応じて、1つのフレームに記憶される圧縮波形データのサンプル数が変化する。これにより、圧縮波形データのサンプルのビット数が異なる場合であっても、フレームの開始位置がメモリアドレス上で一定間隔ごとにきちんと並び、フレームの先頭アドレスを容易に得ることができる。さらに、各フレーム内において副情報と圧縮波形データのサンプルの記憶領域が決まっているので、各データを容易に取り出すことができる。従って、波形データを効率よく記憶することができると共に、伸長処理を行う回路を簡単化することができるようになる。
【図面の簡単な説明】
【図1】 本発明の実施の形態にかかる波形記憶装置の概略構成を示すブロック図である。
【図2】 本発明の実施の形態にかかる波形記憶装置にかかるADPCMを利用して圧縮処理を行う圧縮処理部の構成を示す図である。
【図3】 本発明の実施の形態にかかるフレーム化された圧縮波形データを伸長するADPCMデコーダの構成例を示す図である。
【図4】 本発明の実施の形態にかかる波形記憶装置にかかるLPCを利用して圧縮処理を行う圧縮処理部の構成を示す図である。
【図5】 本発明の実施の形態にかかるフレーム化された圧縮波形データを伸長するLPCデコーダの構成例を示す図である。
【図6】 本発明にかかるデータ構造の圧縮波形データがフレーム毎に記憶されている記憶手段を備える本発明の実施の形態にかかる楽音生成装置のブロック図である。
【図7】 本発明の実施の形態の楽音生成装置にかかる音源部の詳細構成を示すブロック図である。
【図8】 本発明の実施の形態にかかるデータ構造を示す図である。
【符号の説明】
1 圧縮処理部、2 フレーム化部、3 記憶手段、4 制御部、10 波形記憶部、11 減算器、12 量子化部、13 量子化幅判定部、14 フレーム化部、15 逆量子化部、16 加算器、17 ADPCM予測部、21 データ取出部、22 逆量子化部、23 量子化幅判定部、24 加算器、25 ADPCM予測部、31 減算器、32 量子化部、33 予測係数算出部、34フレーム判定部、35 フレーム化部、35 量子化部、36 逆量子化部、37 加算器、38 線形予測部、41 データ取出部、42 逆量子化部、43 加算器、44 線形予測部、50 楽音生成装置、61 CPU、62 フラッシュROM、63 ROM/RAM、63a 波形記憶部、64 タイマ、65 演奏操作子、66 MIDIインタフェース、67 パネルSW、68 表示器、69 表示器SW、70 ハードディスク、71 音源部、72 サウンドシステム、73 バス、80 制御レジスタ、81 フレーム読出部、82アドレス発生部、83 フレームキャッシュ部、84 デコーダ、85 補間部、86 音量EG部、87 ミキサ部、88 DAC
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data structure of stored compressed waveform data used in a musical sound generating device, a musical sound generating device that reads out the compressed waveform data to generate a musical tone, and a waveform in which compressed waveform data compressed from the waveform data is written. The present invention relates to a storage device.
[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 has a problem that the capacity of a memory for storing waveform data becomes enormous. In order to solve this problem, a musical tone signal generating apparatus is proposed in which sample waveform data is compressed, the compressed waveform data is stored in a memory, and the compressed waveform data is expanded during reproduction to form a musical tone signal. (See Japanese Patent No. 2605434).
[0003]
[Problems to be solved by the invention]
In such a musical tone signal generator, the sample waveform data is compressed, so that the memory capacity can be used efficiently. The compressed waveform data is compressed to a variable length. For example, a fixed number of compressed waveform data of 16 samples constitutes a frame and is stored in the memory for each frame. For this reason, the total number of bits of the frame is variable according to the number of bits of the compressed waveform data per sample subjected to the compression process.
Then, since the frame has a variable length, the frame start position differs for each frame on the memory. For this reason, a circuit for calculating and calculating the head address of the frame is required, and there is a problem that the circuit for decompressing the compressed waveform data becomes complicated.
[0004]
Therefore, an object of the present invention is to provide a compressed data structure, a waveform generation device, and a waveform storage device that can be decompressed with a simple configuration.
[0005]
[Means for Solving the Problems]
In order to achieve the above object, in the compressed data structure, waveform generation device, and waveform storage device according to the present invention, the total number of bits constituting the frame is fixed. As a result, since the start position of the frame is a fixed position, the start address of the frame can be easily obtained. Therefore, the waveform data can be stored efficiently and the circuit for performing the decompression process can be simplified.
Further, the sub information constituting the frame together with the compressed waveform data includes compression related information in the compressed waveform data. Therefore, decompression processing of the compressed waveform data can be performed using this compression related information. Note that the number of bits per sample of the compressed waveform data in the frame is constant. Furthermore, if the number of bits of compressed waveform data per sample, which is variable length, is a bit number that is a multiple of the prime number in the number of bits of the fixed-length data area in which the compressed waveform data in the frame is stored, useless bits The compressed waveform data can be stored efficiently without causing it.
[0006]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 1 is a block diagram showing a schematic configuration of a waveform storage device according to an embodiment of the present invention.
As shown in FIG. 1, the waveform storage device includes a waveform storage unit 10 and a control unit 4. The waveform storage unit 10 includes a compression processing unit 1 that compresses input original waveform data into variable-length compressed waveform data, a framing unit 2 that frames the compressed waveform data that has been subjected to compression processing together with sub information, a frame It comprises a storage means 3 in which frames generated by the conversion unit 2 are written and stored. The control unit 4 controls the waveform storage processing in the waveform storage unit 10 to variably control the number of bits per sample of the compressed waveform data for each frame and the bits per sample of the compressed waveform data. The compression process is controlled so that the number is constant within the frame. The compression processing unit 1 can perform compression processing using applied differential coding (ADPCM) and can perform compression processing using linear predictive coding (LPC).
[0007]
Here, FIG. 2 shows a configuration example of the compression processing unit 1 that performs compression processing using ADPCM.
In FIG. 2, the original waveform data S n Is a prediction signal ◇ S input to the subtractor 11 and output from the ADPCM prediction unit 17 n Is subtracted and the residual signal dn (= S n -◇ S n ) Is output. The residual signal dn is first quantized (normalized) by the quantization unit 12 while the signal level is quantized (normalized) based on the quantization width signal Δn, and the determined bit number k is further determined. Is converted into compressed waveform data Ln having a bit number k. The quantization width determination unit 13 determines the quantization width from the compressed waveform data Ln and the past compressed waveform data, outputs the optimum quantization width signal Δn, and supplies it to the quantization unit 12 as a weight. The compressed waveform data Ln is supplied to the inverse quantization unit 15 and is inversely quantized (denormalized) based on the quantization width signal Δn, and is output as a decoded signal qn of the compressed waveform data Ln. The decoded signal qn is supplied to the adder 16 and is output from the ADPCM prediction unit 17 as a prediction signal ◇ S n Is added to the playback waveform data X n Are reproduced and supplied to the ADPCM prediction unit 17. In the ADPCM prediction unit 17, the past p reproduced waveform data ◇ X np , ◇ X n-p + 1 , ... ◇ X n-1 To the current sample prediction signal ◇ S n Is generated.
[0008]
By compressing the original waveform data in this way for each sample, the compressed waveform data is sequentially output from the quantizing unit 12 and supplied to the framing unit 14. In the framing unit 14, the compressed waveform data sequentially output from the quantization unit 12 and supplied to the framing unit 14, and the bit number k information And sub information consisting of other sub information. In this case, a fixed sub information area in the frame is allocated to the sub information, and a data area in the remaining frame is allocated to the compressed waveform data. The compressed waveform data is inserted into a sequentially allocated data area to form a frame together with sub information. The frames generated in this way are output for each frame and written to the storage means. The number of bits of the compressed waveform data in the frame is the same, and the number of bits of the compressed waveform data can be made variable for each frame.
[0009]
FIG. 3 shows a configuration example of a decoder that expands the compressed waveform data framed in this way.
In FIG. 3, the data extraction unit 21 to which the frame read from the storage means is supplied extracts the sub information from the fixed sub information area in the frame, and the compressed waveform data from the bit number k information in the sub information. And the compressed waveform data Ln are sequentially extracted from the data area in the frame based on the determined number of bits and supplied to the inverse quantization unit 22. The compressed waveform data Ln is also supplied to the quantization width determining unit 23. The quantization width determining unit 23 determines the quantization width from the compressed waveform data Ln and the past compressed waveform data, and the optimum quantization width signal Δn. Is supplied to the inverse quantization unit 22 as a weight. The inverse quantization unit 22 performs inverse quantization (inverse normalization) based on the quantization width signal Δn output from the quantization width determination unit 23, and outputs a decoded signal qn of the compressed waveform data Ln. . A prediction signal ◇ S output from the ADPCM prediction unit 25 is added to the decoded signal qn in the adder 24. n Is added to the playback waveform data X n Are reproduced and output as decoded waveform data. Also, playback waveform data X n Is supplied to the ADPCM prediction unit 25 and the past p reproduced waveform data ◇ X np , ◇ X n-p + 1 , ... ◇ X n-1 Prediction signal used to recover current sample from ◇ S n Is generated.
[0010]
In this way, a reproduced sound can be obtained by generating a sound based on the decoded waveform data output from the decoder. In this case, if the original data of the framed compressed waveform data stored in the storage means is musical sound waveform data, a musical tone can be generated based on the output decoded waveform data. The data extraction unit 21 outputs other sub information. By using the sub information as the loop address of the volume information and waveform data, the loop address of the volume information and waveform data is generated when generating the musical sound. Musical sounds can be generated using.
[0011]
Next, FIG. 4 shows the configuration of the compression processing unit 1 that performs compression processing using LPC.
In FIG. 4, the original waveform data S n Is input to the prediction coefficient calculation unit 33 and indicates a prediction coefficient Pn (p coefficients or p coefficients by linear prediction coefficient calculation such as autocorrelation method from a sample of original waveform data of a predetermined period corresponding to the frame. Index) is calculated and supplied to the frame determination unit 34. The original waveform data S input to the subtractor 31 n From the linear prediction signal ◇ S output from the linear prediction unit 38 n Is subtracted and the residual signal dn (= S n -◇ S n ) Is output. The residual signal dn is encoded in the quantization unit 32 while being quantized (normalized) based on the specified quantization width signal and the number of bits in the quantization unit 32, and the specified number of bits. Converted to compressed waveform data Ln. The compressed waveform data Ln is supplied to the inverse quantization unit 36 and is inversely quantized (denormalized) based on the designated quantization width signal and the number of bits, and is output as a decoded signal qn of the compressed waveform data Ln. Is done. The decoded signal qn is added to the linear prediction signal ◇ S output from the linear prediction unit 38 in the adder 37. n Is added to the playback waveform data X n Are reproduced and supplied to the linear prediction unit 38. In the linear prediction unit 38, the prediction coefficient Pn and the past p pieces of reproduced waveform data X np , ◇ X n-p + 1 , ... ◇ X n-1 The linear prediction signal of the current sample ◇ S n Is generated.
[0012]
In the frame determination unit 34, the linear prediction compression for one frame of the original waveform data by the compression processing unit 1 is executed in a plurality of ways with different bit numbers, prediction coefficients, or quantization widths, and each of the frames is determined based on the compression result. The number of bits for frame compression, the prediction coefficient, and the quantization width are determined. The quantization unit 32 performs quantization based on the determined number of bits and the quantization width signal, and generates compressed waveform data Ln. In this case, in the frame determination unit 34, first, the number of bits is provisionally determined based on the past number of bits, and the original waveform data of one frame when compression is performed with the number of bits temporarily determined by the linear prediction coefficient calculation unit 33. A corresponding prediction coefficient Pn is supplied. Subsequently, in the frame determination unit 34, the quantization width is provisionally determined based on the past quantization width, the linear prediction by the prediction coefficient Pn in the linear prediction unit 38, and the provisionally determined number of bits in the quantization unit 32. Quantization based on the quantization width is performed, and compressed waveform data Ln is generated. The reproduced waveform data (output from the adder 37) in the above provisional linear predictive compression process is compared with the original waveform data, and the distortion rate of the reproduced waveform data is calculated. Based on the results of the provisional linear prediction compression process performed in multiple ways, the combination of the number of bits, the prediction coefficient, and the quantization width that gives the best compression ratio within the allowable range of distortion is determined for each frame. Is done.
[0013]
Thus, the compression processing of the original waveform data constituting the frame is performed for each sample by the prediction coefficient, the number of bits, and the quantization width determined for each frame, and the compressed waveform data is sequentially output from the quantization unit 32. To the framing unit 35. In the framing unit 35, the compressed waveform data sequentially output from the quantization unit 35 and supplied to the framing unit 35 with the fixed number of frames having a fixed total number of bits, and the determined prediction It consists of sub-information consisting of coefficient, bit number, quantization width information and other sub-information. In this case, a fixed sub information area in the frame is allocated to the sub information, and the remaining data area in the frame is allocated to the compressed waveform data. The compressed waveform data is inserted into a sequentially allocated data area to form a frame together with sub information. The frames generated in this way are output for each frame and written to the storage means. Note that the prediction coefficient, the number of bits, and the quantization width of the compressed waveform data can be varied for each frame.
[0014]
FIG. 5 shows a configuration example of a decoder that expands the compressed waveform data framed in this way.
In FIG. 5, the data extraction unit 41 to which the frame read from the storage means is supplied extracts the sub-information from the fixed sub-information area in the frame and based on the bit number information in the sub-information The compressed waveform data Ln is sequentially extracted from the fixed data area and supplied to the inverse quantization unit 42. Further, the data extraction unit 41 extracts prediction coefficient information Pn from the sub information and supplies it to the linear prediction unit 44, and also extracts quantization width information and supplies it to the inverse quantization unit 42. The inverse quantization unit 42 performs inverse quantization (inverse normalization) on the compressed waveform data Ln based on the quantization width information supplied from the data extraction unit 41, and outputs a decoded signal qn. The decoded signal qn is added to the prediction signal ◇ S output from the linear prediction unit 44 in the adder 43. n Is added to the playback waveform data X n Are reproduced and output as decoded waveform data. Also, playback waveform data X n Is supplied to the linear prediction unit 44, which uses the prediction coefficient Pn and the past p reproduced waveform data ◇ X np , ◇ X n-p + 1 , ... ◇ X n-1 A linear prediction signal of the current sample by performing a linear prediction operation based on n Is generated.
[0015]
In this way, a reproduced sound can be obtained by generating a sound based on the decoded waveform data output from the decoder. In this case, if the original data of the framed compressed waveform data stored in the storage means is musical sound waveform data, a musical tone can be generated based on the output decoded waveform data. The data extraction unit 21 outputs other sub information. By using the sub information as the loop address of the volume information and waveform data, the loop address of the volume information and waveform data is generated when generating the musical sound. Musical sounds can be generated using.
[0016]
Here, FIG. 8 shows an example in the case of using the linear predictive compression of the data structure according to the present invention of the frame composed of the compressed waveform data stored in the storage means 3 and the sub information.
FIG. 8 shows the data structure of a frame when the compressed waveform data per sample is 2 bits, 3 bits, 4 bits, 5 bits, 6 bits, and 10 bits. The case where the compressed waveform data per sample is 2 bits will be described as an example. One frame is, for example, the size of data corresponding to 5 addresses from “00” to “04” as shown in the figure. Since the data width corresponding to one address is, for example, 16 bits, the total number of bits in one frame is 80 bits. The total number of bits in one frame is a fixed length. The frame is composed of a 20-bit fixed-length sub-information area from the beginning and a fixed-length data area in which the remaining 60-bit compressed waveform data is stored. In this case, 11-bit prediction coefficient information, 5-bit quantization width information, and 4-bit bit number information are stored in the sub information area, and the sample number “2” is compressed to 2 bits per sample in the data area. The compressed waveform data of “1” to “30” is stored for 30 samples. In the frame, the number of compressed waveform data bits per sample is fixed.
[0017]
Thus, since the total number of bits in one frame is a fixed number of bits with the data width corresponding to one address as a unit, the frame starts at a fixed position. For example, when one frame has 5 data widths as shown in FIG. 8, the start address of the frame starts from “00” and starts from the address position for every 5 addresses. Further, since the sub information area has a fixed length, the start position of the compressed waveform data is also a fixed position. Therefore, it is possible to generate an address from which a frame is read out in the decompression process with a simple configuration. Also, as shown in FIG. 8, even when the compressed waveform data per sample is 3 bits, 4 bits, 5 bits, 6 bits, and 10 bits, the total number of bits in one frame corresponds to one address. It is a fixed number of bits with the data width as a unit.
[0018]
Therefore, as shown in FIG. 8, when one frame has 5 data widths and 20 bits of compressed waveform data per sample, 20 samples of compressed waveform data are stored in one frame. In the case of 4 bits, the compressed waveform data for 15 samples is stored in one frame. Similarly, when it is 5 bits, compressed waveform data for 12 samples is stored in one frame, and when it is 6 bits, compressed waveform data for 10 samples is stored in 1 frame, In the case of 10 bits, compressed waveform data for 6 samples is stored in one frame. Thus, by setting the number of bits to a multiple of 2, 3, and 5, which is a prime number of 60 bits allocated to the compressed waveform data, the compressed waveform data can be packed in the frame without waste. become.
Note that when storing compressed waveform data compressed by ADPCM, it is not necessary to store information on prediction coefficients and quantization widths, so the area of the address “00” in the data structure of FIG. Only data corresponding to the four addresses “01” to “04” may be stored for each frame.
[0019]
Next, FIG. 6 shows a block diagram of a musical tone generating apparatus according to the present invention including the storage means 3 in which framed compressed waveform data having a data structure according to the present invention is stored.
In the musical sound generating device 50 shown in FIG. 6, the CPU 61 is a central processing unit (Central Processing Unit) that controls the musical sound generating operation in the musical sound generating device 50 by executing various programs related to musical sound generation. Is a timer that indicates an elapsed time during operation or generates a timer interrupt at a specific interval, and is used for time management of automatic performance. The flash ROM 62 is a rewritable flash ROM (Read Only Memory) in which various data such as a musical sound generation processing program executed by the CPU 61 and framed compressed waveform data having a data structure according to the present invention are stored. The ROM / RAM 63 is a main memory in the musical sound generation device 50. The data structure according to the present invention is framed by a RAM (Random Access Memory) in which the work area of the CPU 61 is set and the waveform storage device according to the present invention. The memory system is composed of a ROM in which data such as compressed waveform data is written.
[0020]
Further, the performance operator 65 is a performance operator such as a keyboard, and the MIDI interface 66 is a MIDI interface that sends out a MIDI message created in the musical tone generator 50 to the outside and receives a MIDI message from the outside. . The panel switch (panel SW) 67 is various switches provided on the panel of the musical tone generation device 50, and various instructions can be given to the musical tone generation device 50 by operating this switch. The display device 68 is a display device that displays various types of information when a musical sound is generated. Furthermore, various instructions can be given to the musical sound generating device 50 by operating the display SW 69 provided around the display 68. The hard disk 70 is a large-capacity storage medium that can store framed compressed waveform data having a data structure according to the present invention, and can also store performance data, user setting data, and the like.
[0021]
The tone generator 71 includes a decoder configured as shown in FIGS. 3 and 5 that performs decompression processing of framed compressed waveform data. The tone generator 71 is necessary to generate musical sounds from the ROM / RAM 63 under the control of the CPU 61. The compressed waveform data that has been framed is read out, and the compressed waveform data is decompressed. Then, processing such as interpolation of the decoded waveform data, envelope addition, channel accumulation (mixing), and effect (effect) addition are performed and output as musical sound waveform data. The musical sound waveform data output from the sound source unit 71 is supplied to the sound system 72, converted into an analog signal, and emitted. Each unit is connected via a bus 73.
[0022]
Next, FIG. 7 shows a block diagram showing a detailed configuration of the sound source unit 71 in the musical sound generating device 50. As shown in FIG.
When generating a musical sound in response to a note-on, the CPU 61 in the musical sound generating device 50 selects a channel (allocated channel) to be used for generating a musical sound in accordance with the note-on from among a plurality of tone generation channels of the sound source unit. Then, various sound source parameters are set in the storage area corresponding to the assigned channel of the control register 80, and a sound generation start instruction for the channel is issued. The sound source parameter information supplied to the control register 80 together with the sound generation start instruction is a waveform memory reading speed (corresponding to a musical tone pitch), a waveform memory reading section, an envelope parameter, setting information for the mixer unit 87, an effect coefficient, and the like. . Of these, the waveform memory read section parameter is the start address and the data length of the compressed waveform data to be read.
[0023]
The address generation unit 82 reads out a frame in which compressed waveform data to be read from the waveform storage unit 63a in the ROM / RAM 63 is stored based on the pitch information and the read start address of each tone generation channel supplied from the control register 80. Frame address (FAD) is created. Specifically, the F number, which is pitch information, is accumulated at every waveform data generation timing (sampling period) to calculate a read address, and a frame address (FAD) is created based on the integer part and the read start address. ing. The frame address is supplied to the frame reading unit 81, and a frame corresponding to the frame address is read from the waveform storage unit 63a and cached for one frame in the frame cache unit 83. In this case, as shown in FIG. 8, the frame has a fixed length with a data width corresponding to one address as a unit, and since the start address of the frame is determined, the address generator 82 can be configured simply. it can. When a new frame is cached in the frame cache unit 83, the sub information is read from the frame cache unit 83, and compression related information necessary for decompression processing of the sub information is sent to the decoder 84. Is set. For example, when the compressed waveform data is compressed using ADPCM, the compressed bit number information is set in the decoder 84, and when the compressed waveform data is compressed using LPC, the number of compressed bits , Linear prediction coefficient, and quantization width information are set in the decoder 84. Sub information other than the compression related information is sent to the control register 80 and stored therein.
[0024]
Further, the integer part of the read address calculated by the address generation unit 82 is supplied to the frame cache unit 83, and the decimal part thereof is supplied to the interpolation unit 85 as interpolation information. The compressed waveform data read from the frame cache unit 83 according to the integer part of the read address is supplied to the decoder 84. In this case, in the interpolation process in the interpolation unit 85, an address for generating the number of compressed waveform data samples corresponding to the increment of the integer part of the read address in the sampling period from the frame cache unit 83 is created in the address generation unit 82. The compressed waveform data to be read is read by the decoder 84. In the decoder 84, a plurality of compressed waveform data read from the frame cache unit 83 is added to the set compression-related information and the expanded p-sample waveform data stored in the buffer in the decoder 84. The expanded waveform data is stored in the buffer while the original waveform data is reproduced by sequentially performing the expansion process. This buffer is controlled so as to store the latest p samples of the waveform data that are sequentially expanded.
[0025]
Thus, in the address generator 82, an address counter of a normal waveform memory sound source that accumulates the F number for each sampling period and generates a waveform data read address can be used as it is. Even if the number of bits of the compressed waveform data varies from frame to frame, it is only necessary to extract the determined number of bits from the fixed data area in the frame, so the configuration of the data extraction unit that extracts the compressed waveform data is extremely simple. can do. For example, in the case of the frame shown in FIG. 8, the extraction logic can be shared in a considerable part for each set of 2 bits, 4 bits, 3 bits, 6 bits, 5 bits, and 10 bits.
[0026]
Here, when two-point interpolation is performed in the interpolation unit 85, the latest two samples of the p expanded waveform data held from the buffer in the decoder 84 (sequential after the n samples) 2 samples may be provided). Therefore, the compressed waveform data of the two samples is read from the frame cache unit 83, decompressed by the decoder 84, and stored in the buffer. Therefore, the interpolated waveform data is obtained by interpolating between the expanded waveform data of the two samples based on the decimal part of the waveform data read address supplied from the address generator 82. . In addition, when four-point interpolation is performed in the interpolation unit 85, the latest four samples (which may be consecutive four samples after the n samples) are supplied from the buffer in the decoder 84, and the four samples are expanded. Interpolated waveform data is obtained by performing interpolation processing based on the waveform data and the decimal part of the waveform data read address supplied from the address generator 82.
[0027]
The interpolated waveform data output from the interpolation unit 85 is subjected to volume control according to the volume envelope data supplied from the control register 80 in the volume EG unit 86. Such processing is performed for each sound generation channel at the processing timing, and the waveform data of a plurality of sound generation channels with envelopes output from the sound volume EG unit 86 is mixed in the mixer unit 87. Waveform data obtained by mixing a plurality of tone generation channels output from the mixer unit 87 is converted into an analog signal by the DAC 88 and output to the sound system 72. Further, the mixer 87 may perform an effect imparting process according to the operation of the operator.
[0028]
In the above description, the length is variable so that the number of bits of the compressed waveform data can be changed for each frame, but this is not necessarily required. For example, the number of bits may be changed for each of a plurality of frames, or the number of bits may be changed for each selected waveform data (without changing the number of bits for each frame).
Further, in the above description, the data width corresponding to one address of the storage means is 16 bits. However, one data width is not limited to 16 bits, and may be 8 bits, 24 bits, or the like.
Furthermore, in the case of one frame of 80 bits, 20 bits are assigned to the sub information and 60 bits are assigned to the compressed waveform data. However, the total number of bits of one frame is not limited to this, and one address is assigned to one frame. It is sufficient that the corresponding data width has a fixed length as a unit, and the sub information and the compressed waveform data can be allocated at an arbitrary ratio as long as they are also fixed lengths.
Furthermore, in the above description, the number of bits of the compressed waveform data is the number of bits that is a multiple of the prime number in the number of bits of the data area to be stored. However, the number of bits is not limited to this and may be any number of bits. In this case, the compressed waveform data of the last sample in the frame may be discarded.
[0029]
【The invention's effect】
As described above, the present invention fixes the size of a frame for storing compressed waveform data, and provides a sub information area and a data area at fixed positions in the frame, and samples the sub information and the compressed waveform data, respectively. Remember. The size of the data area does not change even if the number of compressed waveform data samples differs, so the number of compressed waveform data samples stored in one frame changes according to the number of compressed waveform data sample bits stored. To do. As a result, even when the number of bits of the compressed waveform data samples is different, the start positions of the frames are neatly arranged at regular intervals on the memory address, and the start address of the frame can be easily obtained. Furthermore, since the storage areas for the samples of the sub information and the compressed waveform data are determined in each frame, each data can be easily extracted. Therefore, the waveform data can be stored efficiently, and the circuit for performing the decompression process can be simplified.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of a waveform storage device according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a configuration of a compression processing unit that performs compression processing using ADPCM according to the waveform storage device according to the embodiment of the present invention;
FIG. 3 is a diagram illustrating a configuration example of an ADPCM decoder that decompresses framed compressed waveform data according to the embodiment of the present invention;
FIG. 4 is a diagram illustrating a configuration of a compression processing unit that performs compression processing using LPC according to the waveform storage device according to the embodiment of the present invention;
FIG. 5 is a diagram illustrating a configuration example of an LPC decoder that decompresses framed compressed waveform data according to an embodiment of the present invention;
FIG. 6 is a block diagram of a musical sound generating apparatus according to an embodiment of the present invention including storage means for storing compressed waveform data having a data structure according to the present invention for each frame.
FIG. 7 is a block diagram showing a detailed configuration of a sound source unit according to the musical sound generating apparatus of the embodiment of the present invention.
FIG. 8 is a diagram showing a data structure according to the embodiment of the present invention.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 1 Compression processing part, 2 framing part, 3 memory | storage means, 4 control part, 10 waveform memory | storage part, 11 subtractor, 12 quantization part, 13 quantization width determination part, 14 framing part, 15 dequantization part, 16 adder, 17 ADPCM prediction unit, 21 data extraction unit, 22 inverse quantization unit, 23 quantization width determination unit, 24 adder, 25 ADPCM prediction unit, 31 subtractor, 32 quantization unit, 33 prediction coefficient calculation unit , 34 frame determination unit, 35 framing unit, 35 quantization unit, 36 inverse quantization unit, 37 adder, 38 linear prediction unit, 41 data extraction unit, 42 inverse quantization unit, 43 adder, 44 linear prediction unit 50 musical tone generator, 61 CPU, 62 flash ROM, 63 ROM / RAM, 63a waveform storage unit, 64 timer, 65 performance operator, 66 MIDI interface, 67 panel SW, 68 Indicator, 69 Indicator SW, 70 Hard disk, 71 Sound source part, 72 Sound system, 73 Bus, 80 Control register, 81 Frame reading part, 82 Address generating part, 83 Frame cache part, 84 Decoder, 85 Interpolating part, 86 Volume EG section, 87 mixer section, 88 DAC

Claims (4)

異なるビット数のサンプルに圧縮された圧縮波形データをフレーム毎に記憶する記憶手段における圧縮データ構造であって、
前記フレームのデータサイズは固定されており、前記フレーム内のそれぞれ固定された位置に、当該フレームの圧縮波形データを伸長するための圧縮関連情報を含む副情報を記憶する副情報領域と、1サンプル当たりのビット数が一定とされた前記圧縮波形データを複数サンプル分記憶するデータ領域とが配置されていることを特徴とする圧縮データ構造。
A compressed data structure in storage means for storing compressed waveform data compressed into samples of different number of bits for each frame,
The data size of the frame is fixed, a sub-information area for storing sub-information including compression-related information for decompressing the compressed waveform data of the frame, and one sample at each fixed position in the frame A compressed data structure, wherein a data area for storing a plurality of samples of the compressed waveform data in which the number of bits per unit is constant is arranged.
フレーム分割されていると共に圧縮されている圧縮波形データに基づいて楽音を生成する楽音生成装置であって、
フレーム毎に一定とされたビット数の圧縮波形データのサンプルを複数サンプル分記憶するデータ領域と、前記圧縮波形データを伸長するための圧縮関連情報を含む副情報を記憶する副情報領域とが、固定されたサイズで、かつ、固定された位置に配置されたフレームにフレーム化して記憶する記憶手段と、
各フレームに記憶されている圧縮波形データのサンプルのビット数を指定するビット数指定手段と、
前記記憶手段から前記フレームを順次読み出す読出部と、
該読出部により読み出された前記フレームの前記副情報領域から前記副情報を取り出すと共に、前記データ領域から前記ビット数指定手段により指定されたビット数の前記圧縮波形データのサンプルを取り出すデータ取出部と、
該データ取出部により取り出された前記副情報に含まれている前記圧縮関連情報を利用することにより、取り出された前記圧縮波形データのサンプルを順次伸長するデコード部と、
該デコード部により伸長された波形データのサンプルに基づいて楽音を生成する楽音生成部と、
を備えたことを特徴とする楽音生成装置。
A musical sound generating device that generates musical sound based on compressed waveform data that is divided into frames and compressed,
A data area for storing a plurality of samples of compressed waveform data having a fixed number of bits for each frame, and a sub information area for storing sub information including compression related information for expanding the compressed waveform data, Storage means for storing a frame in a frame arranged in a fixed size and at a fixed position;
A bit number specifying means for specifying the number of bits of the compressed waveform data sample stored in each frame;
A reading section for sequentially reading the frames from the storage means;
A data extracting unit that extracts the sub information from the sub information area of the frame read by the reading unit and extracts a sample of the compressed waveform data having the number of bits specified by the bit number specifying means from the data area When,
A decoding unit that sequentially decompresses the sample of the extracted compressed waveform data by using the compression-related information included in the sub-information extracted by the data extraction unit;
A tone generator for generating a tone based on the sample of waveform data expanded by the decoding unit;
A musical sound generating device comprising:
前記圧縮関連情報はビット数情報であって、前記ビット数指定手段は、該ビット数情報に基づいて前記ビット数を指定するようにしたことを特徴とする請求項2記載の楽音生成装置。3. The musical tone generation apparatus according to claim 2, wherein the compression related information is bit number information, and the bit number designating unit designates the bit number based on the bit number information. 波形データのサンプルを異なるビット数に圧縮処理した圧縮波形データをフレーム化して、記憶手段にフレーム毎に書き込む波形記憶装置であって、
前記圧縮波形データのサンプルのビット数を指定する指定手段と、
前記波形データを圧縮処理する際に、フレーム内において圧縮された1サンプル当たりの圧縮波形データのビット数が、前記指定手段により指定された一定のビット数になるように圧縮処理を行う圧縮処理部と、
前記圧縮波形データにおける圧縮関連情報を含む副情報と、前記圧縮処理部から出力される複数の前記圧縮波形データとを、それぞれ固定された副情報領域とデータ領域とにつめこむことにより、サイズが固定とされている前記フレームを構成するフレーム化部と、
該フレーム化部によりフレーム化された前記圧縮波形データを、フレーム毎に記憶手段に書き込む書込手段と、
を備えるようにしたことを特徴とする波形記憶装置。
A waveform storage device that compresses waveform data samples into different numbers of bits and frames the compressed waveform data and writes it to the storage means for each frame,
Designating means for designating the number of bits of the sample of the compressed waveform data;
A compression processing unit that performs compression processing so that the number of bits of compressed waveform data per sample compressed in a frame becomes a constant number of bits specified by the specifying means when compressing the waveform data When,
The size is fixed by inserting sub information including compression related information in the compressed waveform data and a plurality of the compressed waveform data output from the compression processing unit into a fixed sub information area and a data area, respectively. A framing unit constituting the frame, and
Writing means for writing the compressed waveform data framed by the framing unit into a storage means for each frame;
A waveform storage device characterized by comprising:
JP2002288783A 2002-10-01 2002-10-01 Compressed data structure, waveform generation device, and waveform storage device Expired - Fee Related JP3826870B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2002288783A JP3826870B2 (en) 2002-10-01 2002-10-01 Compressed data structure, waveform generation device, and waveform storage device
US10/676,205 US7378586B2 (en) 2002-10-01 2003-09-30 Compressed data structure and apparatus and method related thereto
US11/289,881 US7256340B2 (en) 2002-10-01 2005-11-29 Compressed data structure and apparatus and method related thereto
US11/810,872 US7692087B2 (en) 2002-10-01 2007-06-06 Compressed data structure and apparatus and method related thereto
US11/860,484 US7521621B2 (en) 2002-10-01 2007-09-24 Compressed data structure and apparatus and method related thereto

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002288783A JP3826870B2 (en) 2002-10-01 2002-10-01 Compressed data structure, waveform generation device, and waveform storage device

Publications (2)

Publication Number Publication Date
JP2004126127A JP2004126127A (en) 2004-04-22
JP3826870B2 true JP3826870B2 (en) 2006-09-27

Family

ID=32281178

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002288783A Expired - Fee Related JP3826870B2 (en) 2002-10-01 2002-10-01 Compressed data structure, waveform generation device, and waveform storage device

Country Status (1)

Country Link
JP (1) JP3826870B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3144926A2 (en) 2015-09-15 2017-03-22 Casio Computer Co., Ltd. Waveform data structure for electronic musical instrument with scalable frame length for coding and storing both transient aperiodic and periodic tones
RU2662633C2 (en) * 2015-09-15 2018-07-26 Касио Компьютер Ко., Лтд Waveform data structure, waveform data storage device, waveform data storing method, waveform data extracting device, waveform data extracting method and electronic musical instrument

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013195646A (en) * 2012-03-19 2013-09-30 Casio Comput Co Ltd Coding device, coding method, and program
US9165563B2 (en) 2012-03-19 2015-10-20 Casio Computer Co., Ltd. Coding device, coding method, decoding device, decoding method, and storage medium
JP2014021162A (en) * 2012-07-12 2014-02-03 Casio Comput Co Ltd Decoding device, decoding method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3144926A2 (en) 2015-09-15 2017-03-22 Casio Computer Co., Ltd. Waveform data structure for electronic musical instrument with scalable frame length for coding and storing both transient aperiodic and periodic tones
EP3144926A3 (en) * 2015-09-15 2017-06-21 Casio Computer Co., Ltd. Waveform data structure for electronic musical instrument with scalable frame length for coding and storing both transient aperiodic and periodic tones
RU2662633C2 (en) * 2015-09-15 2018-07-26 Касио Компьютер Ко., Лтд Waveform data structure, waveform data storage device, waveform data storing method, waveform data extracting device, waveform data extracting method and electronic musical instrument
US10210854B2 (en) 2015-09-15 2019-02-19 Casio Computer Co., Ltd. Waveform data structure, waveform data storage device, waveform data storing method, waveform data extracting device, waveform data extracting method and electronic musical instrument
US10515618B2 (en) 2015-09-15 2019-12-24 Casio Computer Co., Ltd. Waveform data structure, waveform data storage device, waveform data storing method, waveform data extracting device, waveform data extracting method and electronic musical instrument

Also Published As

Publication number Publication date
JP2004126127A (en) 2004-04-22

Similar Documents

Publication Publication Date Title
US7692087B2 (en) Compressed data structure and apparatus and method related thereto
JP4181637B2 (en) Periodic forced filter for pre-processing acoustic samples used in wavetable synthesizers
JP2009157272A (en) Audio playback device
JP3826870B2 (en) Compressed data structure, waveform generation device, and waveform storage device
US4716591A (en) Speech synthesis method and device
US8706506B2 (en) Waveform compressing apparatus, waveform decompressing apparatus, and method of producing compressed data
JP3912304B2 (en) Compressed data structure, waveform generation device, and waveform storage device
KR20060125484A (en) Method for compression and expansion of digital audio data
JPH07199996A (en) Device and method for waveform data encoding, decoding device for waveform data, and encoding and decoding device for waveform data
US5886277A (en) Electronic musical instrument
JP2734323B2 (en) Electronic musical instrument sound generator
CN100538820C (en) A kind of method and device that voice data is handled
JP3933072B2 (en) Wave compressor
JP4107085B2 (en) Waveform data compression method
JP2674161B2 (en) Sound source data compression coding method
JPH0422275B2 (en)
JP4007194B2 (en) Sound generator
JP3933073B2 (en) Waveform expansion device
JP3884131B2 (en) Data compression device and data decompression device
JP3918755B2 (en) Music synthesizer
JP3567766B2 (en) Pitch shift playback device using compressed waveform samples
JP3915725B2 (en) Music synthesizer
JP2004294780A (en) Waveform data compression method, musical sound signal generation method, musical sound signal processor, and program
JPH06180600A (en) Sound and image processor
JPH02137893A (en) Continuous sound source data reproducing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040705

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060601

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: 20060613

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060626

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 3826870

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090714

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100714

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110714

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120714

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130714

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees