JP3918755B2 - Music synthesizer - Google Patents

Music synthesizer Download PDF

Info

Publication number
JP3918755B2
JP3918755B2 JP2003087292A JP2003087292A JP3918755B2 JP 3918755 B2 JP3918755 B2 JP 3918755B2 JP 2003087292 A JP2003087292 A JP 2003087292A JP 2003087292 A JP2003087292 A JP 2003087292A JP 3918755 B2 JP3918755 B2 JP 3918755B2
Authority
JP
Japan
Prior art keywords
frame
loop
value
flag
waveform data
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
JP2003087292A
Other languages
Japanese (ja)
Other versions
JP2004294778A (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 JP2003087292A priority Critical patent/JP3918755B2/en
Publication of JP2004294778A publication Critical patent/JP2004294778A/en
Application granted granted Critical
Publication of JP3918755B2 publication Critical patent/JP3918755B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、波形データをフレーム圧縮して記憶し、当該波形データを演奏情報に基づいて再生する音源装置に用いて好適な楽音合成装置に関する。
【0002】
【従来の技術】
波形メモリ音源装置における波形データの記憶容量を削減するために、波形データを所定のフレーム単位に区切って符号化することにより圧縮する技術が知られている。波形データの符号化方法には種々の方法があるが、「線形予測方式」は圧縮効率が高く、再生時における処理負荷も少ないために多用されている。なお、線形予測方式とは、ある注目サンプルより過去の数個のサンプリング値と所定の生成多項式とに基づいて、当該注目サンプルの予測値を求め、その予測値と実際値との差(残差値)をデータとして記録してゆく方式である。
【0003】
波形データを再生するにあたっては、波形データの最初部分すなわちアタック区間を1回だけ再生し、その後は残りの部分すなわちループ区間を繰り返し再生することが一般的である。このため、一連のフレーム中、ループ区間の最初のフレームであるループスタートフレームおよびループ区間の最終フレームであるループエンドフレームを特定しておく必要がある。
【0004】
特許文献1においては、レジスタにループスタートフレームおよびループエンドフレームの各フレーム番号を記憶させ、これによってフレームの読出し制御を行う技術が開示されている。また、特許文献2においては、各フレームに2ビットのフラグ(ループスタートフラグおよびループエンドフラグ)を追加し、これらのフラグによってループ区間を識別する技術が開示されている。すなわち、ループスタートフラグが“1”であれば当該フレームがループスタートフレームであり、ループエンドフラグが“1”であれば当該フレームがループエンドフレームである。
【0005】
【特許文献1】
特公平07−076873号公報
【特許文献2】
特許第2674161号公報
【0006】
【発明が解決しようとする課題】
しかし、特許文献1記載の技術においては、「フレーム番号」によってループスタートフレームおよびループエンドフレームを管理しているため、例えばフレームの増減が発生した場合等において管理が煩雑になる。また、特許文献2記載の技術においては、各フレームに2ビットのフラグを設ける必要がある。これでは、フレーム数が増大するとフラグの情報量も膨大になり、波形メモリの所要記憶容量が増大するという問題があった。
この発明は上述した事情に鑑みてなされたものであり、データの管理が容易であり、かつ、波形メモリの所要記憶容量を削減できる楽音合成装置を提供することを目的としている。
【0007】
【課題を解決するための手段】
上記課題を解決するため本発明にあっては、下記構成を具備することを特徴とする。なお、括弧内は例示である。
請求項1記載の楽音合成装置にあっては、一フレームまたは連続した複数のフレームでなる波形データ(図3)を複数記憶する波形メモリ(図2)であって、前記一フレームは各々にアドレスが付与された複数のサブフレームから構成され、一の前記サブフレームは一または複数の圧縮サンプルから成るnビットの圧縮サンプル部とmビットの副情報とから構成され、前記一フレームに渡る副情報には、少なくとも前記圧縮サンプルを伸長するための伸長情報と前記波形データのループ区間を示すループフラグ(Lフラグ)とを含む、波形メモリ(2)と、発音開始の指示に応じて、前記ループフラグの初期値として、前記波形メモリに記憶された複数の波形データのうち読み出すべき波形データに対応した第1の論理値(“0”)または第2の論理値(“1”)を設定するループフラグ設定手段(段落0038)と、前記発音開始の指示以降、サンプルアドレスを変化させつつ前記サブフレーム単位で前記波形データを読み出すことにより、前記圧縮サンプルと、前記副情報とを逐次読み出す読出し手段(102)と、新たに読み出された圧縮サンプルと、過去に読み出された伸長情報とに基づいて発音チャンネル毎に前記波形データのサンプリング値を逐次再生する再生手段(110,112)と、前記ループフラグの初期値が前記第2の論理値(“1”)であった場合は、先頭のフレームをループスタートフレームに設定し、また、前記ループフラグの初期値が前記第1の論理値(“0”)であった場合は、前記副情報中の前記ループフラグ(Lフラグ)が読み出される毎に、該ループフラグの値が直前に読み出された他のフレームのループフラグの値から変化したか否かを監視し、該ループフラグが前記第1の論理値(“0”)から前記第2の論理値(“1”)に変化すると、変化が生じたフレームの次のフレームをループスタートフレームに設定する一方、前記ループフラグが前記第2の論理値(“1”)から前記第1の論理値(“0”)に変化すると、その変化が生じたフレームをループエンドフレームとして特定し、該ループエンドフレームの全サブフレームの読み出し後、前記ループスタートフレームの読み出しが開始されるように前記サンプルアドレスを設定するループ制御手段(SP20〜SP42)とを有することを特徴とする。
【0008】
【発明の実施の形態】
1.実施形態におけるデータ構造
1.1.波形データの全体構造
次に本発明の一実施形態について説明するが、最初に本実施形態において採用されている波形データを波形メモリに記憶するためのデータ構造を、図2〜図3を参照し説明する。まず、図2において200は波形データファイルであり、その内部には各種の楽音波形が格納される波形データ領域204,206,……が設けられている。202は管理領域であり、これら波形データ領域204,206,……のデータサイズ、波形の名称等の管理情報が格納される。また、一の波形データ領域は、複数のフレーム211〜21nと、ヘッダ部210とから構成されている。
【0009】
1.2.フレーム構造
本実施形態においては、線形予測形式により圧縮された波形データが上記各フレームに記憶されている。すなわち、過去の数サンプルにおけるサンプリング値に対して所定の生成多項式を施すことによって注目サンプルの予測値が予め求められ、実際のサンプリング値からこの予測値を減算した減算結果が「残差符号」として各フレームに記憶されている。その詳細を図3を参照し説明する。
【0010】
図3(a)は「1」フレーム内におけるデータ構造を示す。図において「1」フレームは「160」ビットから成り、「16」ビット毎に「10」個のサブフレームに分割されている。これらサブフレームは、波形メモリの各アドレスに記憶されるデータであって、フレーム内のアドレスSFADに対応させて「00」〜「09」のサブフレーム番号が付与されている。一のサブフレームの先頭「4」ビットは副情報であり、残り「12」ビットは残差符号が格納されている。「1」フレーム中の副情報中において、第00サブフレームにおいては残差符号のビット数bn(「1」,「2」,「3」,「4」,「6」または「12」)が記憶される。なお、「1」フレーム中ではこのビット数bnは共通である。次に、第01〜第05サブフレームの副情報においては、上記生成多項式において用いられる予測係数が記憶される。
【0011】
また、第06,第07サブフレームの副情報には、量子化幅すなわちサンプリング結果の最下位ビットに対応するレベル幅が記憶される。また、第08,第09サブフレームの副情報において各々先頭「1」ビットには、LフラグおよびEフラグが各々記憶される。なお、これらフラグの意味については後述する。そして、これら第08,第09サブフレームの副情報の他のビットには、その他の情報が記憶される。ここで、各フレームに含まれる副情報は、「当該フレームの次に読み出されるフレーム内の残差符号に対する副情報」である。
【0012】
例えば、図3(a)の例においては一の残差符号のビット数bnは「4」ビットであるから、このフレームの前に読み出されるフレームにおいて、第00サブフレームの副情報には「4」が記憶されることになる。これは、本実施形態においては「1」フレーム内の各サブフレームが必要な数だけ順次読み出され、楽音信号が再生されるため、最初の(第00サブフレーム)の残差符号が読み出される前に上記各副情報を確定させておく必要があることに鑑みてである。このため、最初の第1フレームに対する副情報はヘッダ部210に記憶されている。但し、繰り返しループ再生される区間(ループ区間)の最後のフレームであるループエンドフレームにおいては、該区間の最初のフレームであるループスタートフレームに対する副情報が記憶される。
【0013】
次に、復号化される各サブフレームのストリームを図3(b)に示す。図において第Kフレームを構成する第K_00〜第K_09サブフレームが順次読み出されることによって、これらサブフレームに含まれる残差符号がデコードされ、楽音波形が逐次再生される。各フレームにおいて残差符号のビット数bnは各々異なるが、これは「楽音波形の変化の大きさ」および求められる精度に応じて、符号化時に最適なビット幅が選択された結果である。換言すれば、本実施形態においては、求められる精度に応じて残差符号のビット数bnは種々変化するが、「1」フレームのデータ長はビット数bnに拘らず常に一定(160ビット)である。
【0014】
2.実施形態のハードウエア構成
2.1.全体構成
次に、本実施形態による電子楽器のハードウエア構成を図1を参照し説明する。なお、本実施形態の電子楽器は、汎用パーソナルコンピュータと、該パーソナルコンピュータ上で動作するアプリケーションプログラムとによって構成されている。
図において、100は音源部であり、パーソナルコンピュータに挿入されるカードとして構成されている。2はRAMであり、パーソナルコンピュータにおいて使用される各種データおよびプログラムが記憶されている。特に、RAM2には、音源部100において使用される波形データが記憶されている。波形データのデータ構造は先に図2,図3において説明した通りである。このように、パーソナルコンピュータが元々装備しているRAMの一部を波形メモリとして使用することにより、音源部100自体が装備すべきメモリ容量を削減することが可能になる。
【0015】
4はフラッシュメモリであり、パーソナルコンピュータのイニシャルプログラムローダ等が格納される。6はCPUであり、後述するプログラムに基づいて、バスライン14を介して各部を制御する。8は操作子であり、パーソナルコンピュータとして元々装備すべきキーボード、マウス等の操作子の他、演奏用のキーボード等も含まれる。10は表示器であり、ユーザに対して各種情報を表示する。12は通信I/O部であり、ローカルエリアネットワークを介して他の機器との間で波形データ等のやりとりを行う。16はサウンドシステムであり、音源部100から供給された楽音信号を放音する。
【0016】
音源部100の内部において120は制御レジスタであり、音源部100を制御するために、CPU6によって種々のパラメータが書き込まれる。102はフレーム読出し部であり、合成フレームアドレスGFADに応じて、RAM2の波形メモリ領域から必要とする残差符号を含むサブフレームを「1」サブフレーム単位で読み出す。104はアドレス発生部であり、制御レジスタ120に書き込まれたfナンバ(記録時の楽音信号のピッチと出力すべき楽音信号のピッチとの比)と、当該フレームのサンプリング周期とに応じて、合成フレームアドレスGFADと、サンプルアドレスSCNTとを出力する。ここで、合成フレームアドレスGFADとは、読み出すべきフレームを示すフレームアドレスFADと、当該フレーム内において読み出すべきサブフレームを示すサブフレームアドレスSFADとを合成して成る信号である。また、サンプルアドレスSCNTは、整数部SCNTiと小数部SCNTfから成る。整数部SCNTiは「1」フレーム内における残差符号の番号を示し、小数部SCNTfはその前後の波形サンプル値に対する補間係数を示す。ここで、サブフレームアドレスSFADは、サンプルアドレスSCNTの整数部が各サブフレームに記憶された残差符号の数だけ増加する毎に、「1」増加する。
【0017】
106は副情報デコード部であり、フレーム読出し部102が読み出したサブフレームのうち副情報部分が入力され、これを各フレームの期間にわたり蓄積することにより、その次のフレームに対する副情報をデコードし、次のフレーム期間、該フレームの残差符号の復号化等のために音源部100の各ブロックに供給する。108は残差情報キャッシュ部であり、フレーム読出し部102が読み出したサブフレームのうちの残差符号部分が入力され、そこに含まれる最新の数サンプルの残差符号を記憶するとともに、サンプルアドレス整数部SCNTiの進行量に相当する数の残差符号を逐次出力する。残差情報キャッシュ部108から出力すべき残差符号が足りなくなるタイミングで、アドレス発生部104から次のサブフレームを示す合成フレームアドレスGFADがフレーム読出し部102に供給され、対応するサブフレームが読み出されることにより、該サブフレームに含まれる残差符号が残差情報キャッシュ部108に記憶される。110はデコーダ部であり、残差情報キャッシュ部108から残差符号が出力される毎に、副情報デコード部106からの副情報に含まれる予測係数や量子化幅を用いて該残差符号をデコードすることによって波形データのサンプル値を求め、求めたサンプル値をデコーダ部110の内部に設けられているキャッシュメモリに逐次格納してゆく。
【0018】
112は補間部であり、デコーダ部110において得られた最新の「2」サンプル値に対して、サンプルアドレス小数部SCNTfに基づく補間演算を施す。114は音量EG部であり、この補間されたサンプル値に対して、所定の音量エンベロープを付与する。ここで、上記構成要素102〜114は、複数発音チャンネルの楽音信号を合成するためにサンプリング周期毎に時分割で駆動される。すなわち、サンプリング周期を発音チャンネル数で分割した時分割のスロット毎に全く異なる発音チャンネルの処理が行われる。また、後述する各レジスタ、バッファ等も発音チャンネル毎に設けられている。116はミキサ部であり、各サンプリング周期毎に、音量EG部114から出力された複数発音チャンネルの楽音信号をミキシングし、ステレオの楽音信号として出力する。118はDAコンバータであり、このステレオの楽音信号をアナログ信号に変換する。このアナログ信号の楽音信号は、サウンドシステム16を介して発音されることになる。
【0019】
2.2.アドレス発生部104の構成
次に、アドレス発生部104の構成を図4を参照し説明する。図において144は1/3サンプル累算器であり、1サンプリング周期毎に、fナンバの「1/3」の値を逐次累算する。150は乗算器であり、この累算結果ACに「3」を乗算する。すなわち、この乗算結果はfナンバをサンプリング周期毎に累積した値に等しいものであり、該乗算結果はサンプルアドレスSCNTとして出力される。
【0020】
148は変換器であり、累算器144の累算結果ACと、残差符号のビット数bnとに基づいて、サブフレームアドレスSFAD=AC・bn/4を出力する。ここで、変換器148において用いられる「ビット数bn」は、通常は副情報デコード部106から逐次供給されるビット数bnである。ここで、例えば、ビット数bnが最大値「12」であったと仮定すると、サブフレームアドレスSFADは累算結果ACの3倍すなわちサンプルアドレスSCNTに等しくなる。従って、サンプルアドレスSCNTが「1」増加する毎に「1」サブフレームが読み出されることになる。また、ビット数bnが「4」であったと仮定すると、サブフレームアドレスSFADは累算結果ACすなわち、サンプルアドレスSCNTの「1/3」に等しくなる。従って、サンプルアドレスSCNTが「3」増加する毎に「1」サブフレームが読み出されることになる。
【0021】
以上の動作は、ビット数bnが「12」または「4」以外の値であった場合も同様である。このように、サブフレームアドレスSFADは、サンプルアドレスSCNTが各サブフレームに含まれる残差符号のサンプル数だけ増加する毎に、「1」づつ増加する。各ビット数bnに対する「1」フレームあたりのサンプル数と、サブフレームアドレスSFADとの関係を以下に列挙しておく。

Figure 0003918755
【0022】
このように、本実施形態においては、累算器144の累算単位をサンプルアドレスSCNTの「1/3」にしたため、サンプルアドレスSCNTに対応するサブフレームアドレスSFADを算出するための演算は、「1/4」または「1/2」を除数とする除算と、乗算の組み合わせにより実現できる。ここで、「1/4」または「1/2」を除数とする除算はシフト演算によって実行可能であり、乗算は加算器とシフタとによって実現できるため、変換器148はシフタおよび加算器等によって実現することができ、除算器等は不要である。これにより、変換器148の構成をきわめて簡易にすることができる。
【0023】
さて、変換器148においては、サブフレームアドレスSFADが「9」(第09サブフレームに対応する)に達した後に桁上りすると、フレーム終了パルスFENDが累算器144に供給される。累算器144においては、フレーム終了パルスFENDが供給されると、累算結果から「今回のフレームにおける残差符号数/3」に相当する値が減算され、累算が続行される。次に、142はフレームカウンタであり、制御レジスタ120内に記憶された開始フレームアドレスを初期値として、上記フレーム終了パルスFENDが供給される毎にカウント結果を「1」フレーム分のアドレス数(この場合は「10」)づづインクリメントする。このカウント結果がフレームアドレスFADとして出力される。146は合成部であり、上記フレームアドレスFADとサブフレームアドレスSFADとを合成し、その結果を合成フレームアドレスGFADとして出力する。
【0024】
141はループ制御回路であり、制御レジスタ120からループスタートフレームアドレスLSを受信するとともに、副情報デコード部106からループエンドフレーム指示信号LEを受信し、フレームカウンタ142のループ制御を行う。すなわち、副情報デコード部106から当該フレームがループエンドフレームであることを示す該指示信号LEが供給されると、ループ制御回路141においては、次にフレーム終了パルスFENDが供給された時にフレームアドレスFADが強制的にループスタートフレームアドレスLSに設定されることになる。
【0025】
2.3.デコーダ部110の構成
次に、デコーダ部110の詳細構成を図5を参照し説明する。
図において160は逆量子化部であり、残差符号と量子化幅とに基づいて、予測値と実際値の残差である残差値を出力する。162は線形予測部であり、過去の「2」サンプリング周期におけるサンプリング値D1,D2と予測係数とに対して所定の生成多項式を適用することにより、最新のサンプリング周期におけるサンプリング値の予測値を算出する。164は加算器であり、この予測値と残差値とを加算することにより、最新のサンプリング周期におけるサンプリング値を算出する。なお、ここでのサンプリング周期は、音源部100の各ブロックが動作の基準としているサンプリング周期ではなく、波形メモリに記憶されている波形データの各サンプルの記録順としてのサンプリング周期である。
【0026】
168はループスタートサンプリング値バッファであり、ループスタートフレームアドレスLSの直前フレームにおける最後の「2」サンプリング値を記憶する。166は波形データキャッシュメモリであり、算出されたサンプリング値を複数周期に渡って記憶するとともに、過去の「2」サンプリング周期におけるサンプリング値D1,D2を上記線形予測部162に供給する。
【0027】
但し、現在のサンプリング周期がループスタートフレームの最初のサンプリング周期である場合は、ループスタートサンプリング値バッファ168に記憶された「2」サンプリング値がD1,D2として線形予測部162に供給される。また、現在のサンプリング周期がループスタートフレームの第2番目のサンプリング周期である場合は、ループスタートフレームの最初のサンプリング値がD1として、値バッファ168に記憶された最後の「1」サンプリング値がD2として線形予測部162に供給される。これは、アタック区間からループ区間に移行した時と、ループ区間の繰り返し再生を行っている時とにおいて、ループ区間の再生結果を一致させるためである。
【0028】
以上の本実施形態では、楽音のピッチに応じた速さで増加するサンプルアドレスSCNTに応じて、残差情報キャッシュ部108から順次残差符号を取り出してデコードしている。そして、残差情報キャッシュ部108内にサンプルアドレスSCNTに対応する残差符号が無ければ、その残差符号を含むサブフレームのアドレスGFADがアドレス発生部104からフレーム読出し部102に供給され、該アドレスGFADにより読み出されたサブフレームの残差符号が残差情報キャッシュ部108に補充される。読み出されたサブフレームに含まれる副情報は、同時に副情報デコード部106にも供給され、フレーム毎に副情報が再生される。
【0029】
残差符号を復号するためには各フレームの副情報が必要であるが、本実施形態では残差符号のために読み出されたサブフレームから副情報が再生されるので、別途RAM2をアクセスして副情報を読み出す必要が無い。そのため、伸長に必要な副情報を供給する回路の構成をきわめて簡単にすることができる。また、本実施形態では、CPU6等の他のデバイスと共有されたバスライン14を使用して波形メモリをアクセスしているが、各発音チャンネル毎の波形メモリへのアクセス頻度が略一定であり、あまり変動しないので、他のデバイスの動作に与える悪影響が少ない。
【0030】
3.実施形態の動作
3.1.ノートオンイベント処理
次に、本実施形態の動作について説明する。本実施形態においては、パーソナルコンピュータ内のシーケンサプログラム等によってMIDIイベントを発生させることが可能であり、通信I/O部12を介して外部からMIDI信号を入力することも可能である。これらによってノートオンイベントが発生すると、図7に示すノートオンイベント処理ルーチンが起動される。図において処理がステップSP1に進むと、当該ノートオンイベントにおけるパート番号、ノート番号およびベロシティが各々変数PT、NNおよびVLに代入される。また、音量エンベロープ評価値MEなる変数には、所定の最大値MEmaxが代入される。
【0031】
次に、処理がステップSP2に進むと、制御レジスタ120内において現在のところ発音のために割り当てられていない空きチャンネルが検索される。この空きチャンネルには、ノートオフされた後に音量が減衰して音量レベルが「0」となって解放された発音チャンネルが含まれる。次に、処理がステップSP3に進むと、空きチャンネルが存在するか否かが判定される。存在すれば「YES」と判定され処理はステップSP4に進む。ここでは、当該空きチャンネルのチャンネル番号が変数ASに格納される。
【0032】
次に、処理がステップSP5に進むと、上記パート番号PT、ノート番号NN、ベロシティVLに応じた楽音制御パラメータおよび音量エンベロープ評価値MEが制御レジスタ120内のチャンネル番号ASに対応する領域に書き込まれる。次に、処理がステップSP6に進むと、チャンネル番号ASに対して発音開始コマンドが書き込まれる。これにより、当該チャンネル番号ASに係る楽音合成処理が開始される。なお、詳細は後述するが、チャンネル番号ASに対応する領域に書き込まれた評価値ME(AS)は、副情報デコード部106によって、時間の経過とともに徐々に低下するように更新される。
【0033】
ところで、ノートオンイベントが発生した時に空きチャンネルが無ければ、上記ステップSP3において「NO」と判定され、処理はステップSP7に進む。ここでは、音源部100の全発音チャンネルないし所定のルールで絞り込まれた一部の発音チャンネルについて、制御レジスタ120の各発音チャンネルCHに対応する領域から音量エンベロープ評価値ME(CH)(詳細は後述する)と音量エンベロープEG(CH)とが読み出される。そして、両者は同発音チャンネルCHの音量レベルLVL(CH)として合成され、それらが相互に比較されて該音量レベルLVL(CH)の最も低いチャンネルがトランケートチャンネルに設定される。そして、このトランケートチャンネルの番号がチャンネル番号ASに代入される。次に処理がステップSP8に進むと、該トランケートチャンネル番号ASの音量レベルが急速に減衰される。そして、該チャンネル番号ASの音量レベルが「0」になるとステップSP5,SP6が実行され、上述ように当該チャンネル番号ASにおいて、新たなノートオンイベントに基づく楽音合成処理が開始される。
【0034】
3.2.フレーム読出し処理
ある発音チャンネルCHにおいて楽音合成処理が開始されると、サンプルアドレスSCNTの進行に応じて、前記開始フレームアドレスの示すフレームから、各フレームを構成するサブフレームが順次読み出される。そして、1つのフレームの全サブフレームの読み出しが終了すると、次のフレームのサブフレームの読み出しへと移行するが、このとき、副情報デコード部106では、読み終わったフレームの副情報が次のフレームの副情報として音源部100の各ブロックに供給される。一方、各フレームの第08,第09サブフレームが読み出されたときには、副情報デコード部106にて、図8に示すフレーム読出しルーチンが起動される。この処理は、副情報デコード部106の動作を制御するマイクロプログラム、ないし、副情報デコード部106内の対応するロジック回路として実装される。図8において処理がステップSP20に進むと、指定されたフレームがRAM2からフレーム読出し部102に転送される。
【0035】
次に、処理がステップSP22に進むと、この読み終わったフレーム内のEフラグが“1”であるか否かが判定される。ここで「YES」と判定されると、制御レジスタ120内の当該発音チャンネルCHに係る音量エンベロープ評価値ME(以下、発音チャンネルCHを添字としてME(CH)という)が「1」だけデクリメントされる。なお、Eフラグが“0”であればステップSP24はスキップされるため、評価値ME(CH)には変化が生じない。このように、音量エンベロープ評価値ME(CH)はフレーム読出しルーチンが起動される毎に減少されるか維持されるかの何れかになり、増加されることは無い。この音量エンベロープ評価値ME(CH)を構成するレジスタは、デクリメント機能の付いた簡単なダウンカウンタで構成できる。
【0036】
ここで、Eフラグの意味について、図6を参照し説明しておく。まず、同図において特性Aは、波形データが元々有している(音量EG部114においてエンベロープが付与される前に有している)音量エンベロープ特性の一例である。ここで、「音量エンベロープ特性Aが将来取り得る最大値」は一点鎖線によって示す特性A’のようになる。音量エンベロープ評価値ME(CH)は、この特性A’の時間軸方向を「フレーム」単位に粗くし、レベルを所定の量子化幅単位に粗くしたものに略等しい。
【0037】
但し、評価値ME(CH)の初期値は最大値MEmaxに設定されるため、発音開始から実際に評価値ME(CH)が特性A’に対応する値になるまでには一般的には数フレームの期間を要する。なお、評価値ME(CH)上に付されている数字“1”または“0”は、Eフラグの値である。上述したように、本実施形態においては、トランケートチャンネルは音量エンベロープ特性Aによって決定されるわけではなく、音量エンベロープ評価値MEによって決定される。すなわち、「音量エンベロープ特性Aが将来取り得る最大値」が最も低い発音チャンネルがトランケートチャンネルとして選択されるのである。これにより、音量エンベロープが一時的に低くなっているものの、将来高くなることが確実である発音チャンネルについては、トランケートチャンネルとして選択されることが未然に防止されている。なお、各波形データのヘッダ部210に該波形データの評価値の初期値を記憶しておき、最大値MEmaxに代えて、これを評価値ME(CH)の初期値として用いるようにしてもよい。その場合は、発音直後から評価値ME(CH)は特性A’に対応する値になる。
【0038】
図8に戻り、処理がステップSP26に進むと、当該発音チャンネルCHに係る直前L値PreL(CH)なる変数が“0”であるか否かが判定される。なお、この直前L値PreL(CH)は、当該発音チャンネルCHにおいて前回に読み出されたフレームのLフラグを保持するための変数であるが、ノートオンイベントが発音チャンネルCHに割り当てられた際には、当該発音チャンネルで読み出す波形データのヘッダ部210に記憶された当該波形データのLフラグの初期値に基づいて“1”または“0”に初期化されている。
【0039】
ここで、ステップSP26以後の処理内容を図9(a)〜(d)に示す具体例に基づいて説明する。これらの図において横軸はフレーム、縦軸は音量エンベロープ評価値MEである。横軸に沿って配列された数値“1”または“0”は各フレーム内のLフラグの値であるが、最左端の数値は初期設定された直前L値PreL(CH)の値である。まず、アタック区間とループ区間とが共にある程度の長さを有する一般的な波形として、図9(a)に示す波形を例として説明する。図9(a)の例においては、直前L値PreL(CH)の初期値は“0”である。このため、第1フレームが読み出され、フレーム読出しルーチン(図8)が最初に呼び出された時、ステップSP26においては「YES」と判定され、処理はステップSP36に進む。ここでは、読み出されたLフラグが“1”であるか否かが判定される。ここで「NO」と判定されると、処理はステップSP42に進み、Lフラグの値が直前L値PreL(CH)に代入される。
【0040】
以下、フレームが読み出される度に同様の処理が繰り返される。そして、図9(a)の例においては、第1〜第22フレームに含まれるLフラグが“0”であったのに対して、第23フレームにおいてLフラグが“1”に変更されている。従って、第23フレームの読出しに伴ってフレーム読出しルーチン(図8)が実行され、ステップSP26を介して処理がステップSP36に進むと、ここでは「YES」と判定され処理はステップSP39に進む。なお、ステップSP36における「YES」の判定は、次のフレームがループスタートフレームであることを示している。ステップSP39では、ループスタート設定が既に実行済みであるか否かが判定される。ここでは、未だループスタートの設定が実行されていないために「NO」と判定され、、処理はステップSP40に進む。
【0041】
ステップSP40においては、ループスタート設定処理が実行される。すなわち、第23フレームにおいてLフラグが“0”から“1”に切り替わったならば、次の第24フレームのフレームアドレスがループスタートフレームアドレスLSとして制御レジスタ120に書き込まれる。また、ループスタートサンプリング値バッファ168は、現在のフレーム(第23フレーム)の最後の2サンプリング値を保持するように制御される。すなわち、バッファ168には、ループスタートサンプルの直前2サンプルのサンプリング値が記憶されることになる。なお、ループスタートフレームの伸長に必要な情報のうち、ビット数bnと予測係数と量子化幅とに関しては、ループエンドフレームに記憶させる副情報とすることができるので、ここで保存する必要は無い。
【0042】
そして、処理がステップSP42に進むと、直前L値PreL(CH)にLフラグ(“1”)が代入される。以後、フレームが読み出されフレーム読出しルーチン(図8)が起動されると、直前L値PreL(CH)が“1”であるためにステップSP26においては「NO」と判定され、処理はステップSP28に進む。ここでは、ループスタート設定処理が完了しているか否かが判定される。今回の例においては、先にステップSP40が実行された際にループスタート設定処理が実行されたため、「YES」と判定され処理はステップSP32に進む。
【0043】
ステップSP32においては、読み出されたLフラグが“1”であるか否かが判定される。ここで「YES」と判定されると、処理はステップSP42に進み、当該Lフラグ(“1”)が直前L値PreL(CH)に代入され、本ルーチンの処理が終了する。以後、Lフラグが“1”であるフレームが継続される限り(図9(a)の例にあっては、第31フレームが読み出されるまで)、同様の処理が繰り返される。
【0044】
次に、第31フレームが読み出されフレーム読出しルーチン(図8)が実行されたとする。当該フレームに含まれるLフラグは“0”であるから、処理がステップSP26,SP28を介してステップSP32に進むと、ここで「NO」と判定され、処理はステップSP33に進む。なお、ステップSP32における「NO」の判定は、当該フレームがループエンドフレームであることを示している。ステップSP33においては、アドレス発生部104のループ制御回路141に対し、読み出し中のフレームがループエンドフレームであることを示すループエンドフレーム指示信号LEを出力する。フレーム読出しルーチン(図8)が実行されるのは各フレームの第09サブフレームが読み出されたタイミングであるため、ステップSP33が実行された場合には、その直後にサブフレームアドレスSFADが「9」から桁上がりしてフレーム終了パルスFENDが発生し、フレームカウンタ142にループスタートフレームアドレスLSが強制設定される。なお、ループスタートフレームへリターンしたとき、そのループスタートフレームでは、直前に読み出されていたループエンドフレームに記憶されていた副情報に含まれるビット数bn、予測係数、量子化幅が副情報デコード部106から供給され、当該フレームの残差符号の伸長に使用される。
【0045】
以後、ループスタートフレーム(第24フレーム)ないしループエンドフレーム(第31フレーム)間のフレームが音源部100より繰り返し指定されると、その度にフレーム読出しルーチン(図8)が呼び出される。この場合、ステップSP36において次のフレームがループスタートフレームであると判定されても、ループスタート設定処理は完了しているので、ステップSP28,SP39においては必ず「YES」と判定され、ループスタート設定処理は実行されない。一方、ステップSP32にて当該フレームがループエンドフレームであると判定されると、ステップSP33のループエンド指示により、ループエンドフレーム指示信号LEがループ制御回路141に出力され、フレームアドレスFADがループスタートフレームに戻される。
【0046】
次に、他の例として、ループ区間がきわめて短い(1フレーム長である)波形データの処理例を図9(b)を参照し説明する。このような短いループ区間は、例えば電気ピアノ等の音色で発生しやすい。同図の例においては、直前L値PreL(CH)の初期値は“0”に設定され、第1〜第8フレームにおけるLフラグも“0”に設定される。このため、第1〜第8フレームにおいては、ステップSP26,ステップSP36,ステップSP42が繰り返し実行され、この期間内における直前L値PreL(CH)は常に“0”に保たれる。
【0047】
次に、第10フレームが読み出されると、ここに含まれるLフラグは“1”であるから、フレーム読出しルーチン(図8)においてはステップSP36,SP39を介して処理がステップSP40に進み、次の第11フレームのフレームアドレスがループスタートフレームアドレスLSに設定され、かつ、現在のフレームの最後の2サンプリング値が保持される。次に、ステップSP42において直前L値PreL(CH)は“1”に設定される。次に、第11フレームが読み出されると、直前L値PreL(CH)は“1”であって該フレームに含まれるLフラグは“0”であるから、図8においてステップSP26,SP28,SP32を順次介して処理はステップSP33に進み、当該Lフラグが含まれる第11フレームにおいてループエンドフレーム指示信号LEが供給される。すなわち、この例においては、ループスタートフレームアドレスLSの示すフレームがループエンドフレームでもあるため、ループ区間は「1」フレーム長のみであり、きわめて短いループ区間が実現できることが解る。
【0048】
次に、他の例として、波形データにアタック区間が無く、ループ区間がきわめて短い(1フレーム長である)波形データの処理例を図9(c)を参照し説明する。このような波形データは、例えばシンセリード等の音色で発生しやすい。同図(c)の例においては、直前L値PreL(CH)の初期値は“1”に設定され、第1フレームにおけるLフラグは“0”に設定される。第1フレームの読出し時にフレーム読出しルーチン(図8)が呼び出されると、ステップSP26において「NO」と判定され、処理はステップSP28に進む。ここで、ループスタート設定処理は完了していないために「NO」と判定され、処理はステップSP30に進む。
【0049】
ステップSP30においては、ループスタート設定処理が実行される。但し、このステップSP30においては、第1フレームからループ区間が開始されるように処理が実行される点で上記ステップSP40の処理とは異なる。すなわち、ループスタートフレームアドレスLSには第1フレームのフレームアドレスが強制的に設定され、ヘッダ部210に記憶されている第1フレームのビット数bnがループスタートビット数レジスタ149に設定されるとともに、ヘッダ部210に記憶されている2つのサンプリング値の初期値が、ループスタートサンプリング値バッファ168に設定される。
【0050】
次に、処理がステップSP32に進むと、Lフラグが“0”であるために「NO」と判定され、処理はステップSP33に進む。ステップSP33においては、ループエンド指示処理が実行される。すなわち、当該Lフラグを含む第1フレームにおいてはループエンドフレーム指示信号LEがループ制御回路141に供給される。すなわち、この例においては、先頭の第1フレームがループスタートフレームでありかつループエンドフレームでもある。
【0051】
次に、他の例として、波形データにアタック区間が無く、ループ区間が比較的長い波形データの処理例を図9(d)を参照し説明する。このような波形データは、例えばドラム等の音色で発生しやすい。同図の例においては、直前L値PreL(CH)の初期値は“1”に設定され、第1フレームにおけるLフラグは“0”に設定される。第1フレームの読出し時にフレーム読出しルーチン(図8)が呼び出されると、ステップSP26において「NO」と判定され、処理はステップSP28に進む。ここで、ループスタート設定処理は完了していないために「NO」と判定され、処理はステップSP30に進む。
【0052】
ステップSP30においては、上述したように第1フレームをループスタートフレームアドレスLSとするループスタート設定処理が実行される。そして、Lフラグが“1”であるため、ステップSP32においては「YES」と判定され、ステップSP42において直前L値PreL(CH)に“1”が代入される。以後、第2〜第16フレームにおいては、ステップSP26,SP28,SP32,SP42が繰り返し実行され、この期間内における直前L値PreL(CH)は常に“1”に保たれる。次に、第17フレームにおいてはLフラグが“0”になるため、ステップSP32を介して処理はステップSP33に進み、第17フレームにおいてループエンドフレーム指示信号LEが供給される。
【0053】
上述したように、各具体例においてはループスタートフレームにて何れもループスタート設定処理が1回だけ実行されるとともに、ループエンドフレームにて次の読み出しをループスタートフレームに戻すための処理が毎回実行されている。しかし、ループスタート/ループエンドフレーム間のフレームを実際に繰り返し読み出すか否か(ループ制御回路141をアクティブにするか否か)は、音色毎にユーザが自由に設定できる。「繰り返し読み出さない」ように設定されると、各波形データは先頭の第1フレームからループエンドフレームまで順次各1回だけ再生されることになる。
【0054】
4.変形例
本発明は上述した実施形態に限定されるものではなく、例えば以下のように種々の変形が可能である。
(1)上記実施形態においては図2および図3に示した波形データのフォーマットを用いたが、波形データのフォーマットは必要に応じて種々変更してもよい。例えば、各種データの配置を上記実施形態のものとは異なる配置にすることができる。「1」サブフレームの大きさは「16」ビットに限られるものではなく、「12」ビット、「30」ビット等の幅にしてもよい。また、各サブフレームも副情報「4」ビットと残差符号「12」ビットとで構成するものに限られず、副情報「6」ビットと残差符号「24」ビット、あるいは副情報「8」ビットと残差符号「16」ビット等により構成してもよい。同様に「1」フレームの大きさは「10」ワード=「160」ビットに限られるものではなく、「6」ワード、「14」ワード等の大きさにしてもよい。また、残差符号のビット数は「1」,「2」,「3」,「4」,「6」または「12」以外の値、例えば「8」または「16」等であってもよい。
【0055】
(2)上記実施形態においては、2次の線形予測を適用したが、それ以上の高次線形予測を適用してもよく、あるいは複数段の線形予測を適用してもよい。
【0056】
(3)上記実施形態においては、各フレームに記憶されている副情報は全て次のフレームで使用する副情報であったが、一部の情報(例えばビット数bn)を当該フレームのための副情報にしてもよい。
【0057】
(4)上記実施形態においては、フレーム読出しルーチン(図8)はLフラグおよびEフラグが読み出されたタイミングで実行されたが、これに代えて、前のフレームから次のフレームへの移行時に実行されるようにしてもよい。
【0058】
(5)上記各実施形態においては、パーソナルコンピュータ上で動作するアプリケーションプログラムによって電子楽器を実現したが、このアプリケーションプログラムのみをCD−ROM、フレキシブルディスク等の記録媒体に格納して頒布し、あるいは伝送路を通じて頒布することもできる。
【0059】
【発明の効果】
以上説明したように本発明によれば、以上説明したように、本発明によれば、再生手段がサンプルアドレスに従って各サブフレームを読み出してゆくことにより、同時に副情報も取り出すことができる。さらに、一連のフレーム中、ループフラグが第1の論理値から第2の論理値に変化すると、変化が生じたフレームの次のフレームをループスタートフレームに設定するとともに、ループフラグが第2の論理値から第1の論理値に変化すると、その変化が生じたフレームをループエンドフレームに設定するから、各フレーム毎に1ビットの情報によってループ区間を特定することができる。
【図面の簡単な説明】
【図1】 本発明の一実施形態の電子楽器のハードウエアブロック図である。
【図2】 一実施形態における波形データファイル200の構造を示す図である。
【図3】 各フレーム211〜21nのデータ構造を示す図である。
【図4】 アドレス発生部104のブロック図である。
【図5】 残差情報キャッシュ部108のブロック図である。
【図6】 Eフラグに対する一実施形態の動作説明図である。
【図7】 一実施形態におけるノートオンイベント処理ルーチンのフローチャートである。
【図8】 一実施形態におけるフレーム読出しルーチンのフローチャートである。
【図9】 Lフラグに対する一実施形態の動作説明図である。
【符号の説明】
2:RAM、4:フラッシュメモリ、6:CPU、8:操作子、10:表示器、12:通信I/O部、14:バスライン、16:サウンドシステム、100:音源部、102:フレーム読出し部、104:アドレス発生部、106:副情報デコード部、108:残差情報キャッシュ部、110:デコーダ部、112:補間部、114:音量EG部、116:ミキサ部、118:DAコンバータ、120:制御レジスタ、141:ループ制御回路、142:フレームカウンタ、144:1/3サンプル累算器、146:合成部、148:変換器、150:乗算器、160:逆量子化部、162:線形予測部、164:加算器、166:波形データキャッシュメモリ、168:ループスタートサンプリング値バッファ、200:波形データファイル、202:管理領域、210:ヘッダ部、211〜21n:フレーム、204,206,……:波形データ領域。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a musical tone synthesizer suitable for use in a sound source device that stores waveform data by compressing the frame data and reproducing the waveform data based on performance information.
[0002]
[Prior art]
In order to reduce the storage capacity of waveform data in the waveform memory tone generator, a technique is known in which waveform data is compressed by being divided into predetermined frame units and encoded. There are various waveform data encoding methods, but the “linear prediction method” is frequently used because of its high compression efficiency and low processing load during reproduction. Note that the linear prediction method is to obtain a predicted value of a sample of interest based on several sampling values past a certain sample of interest and a predetermined generator polynomial, and to obtain a difference (residual) between the predicted value and the actual value. Value) as data.
[0003]
When reproducing the waveform data, it is common to reproduce the first portion of the waveform data, that is, the attack section only once, and then repeatedly reproduce the remaining portion, that is, the loop section. Therefore, it is necessary to specify a loop start frame that is the first frame of the loop section and a loop end frame that is the final frame of the loop section in the series of frames.
[0004]
Japanese Patent Application Laid-Open No. 2004-151561 discloses a technique for storing a frame number of a loop start frame and a loop end frame in a register and thereby performing frame read control. Patent Document 2 discloses a technique in which a 2-bit flag (a loop start flag and a loop end flag) is added to each frame, and a loop section is identified by these flags. That is, if the loop start flag is “1”, the frame is a loop start frame, and if the loop end flag is “1”, the frame is a loop end frame.
[0005]
[Patent Document 1]
Japanese Patent Publication No. 07-076873
[Patent Document 2]
Japanese Patent No. 2675161
[0006]
[Problems to be solved by the invention]
However, in the technique described in Patent Document 1, since the loop start frame and the loop end frame are managed based on the “frame number”, for example, when the number of frames increases or decreases, the management becomes complicated. In the technique described in Patent Document 2, it is necessary to provide a 2-bit flag for each frame. In this case, when the number of frames increases, the information amount of the flag becomes enormous, and the required storage capacity of the waveform memory increases.
The present invention has been made in view of the above-described circumstances, and an object thereof is to provide a musical tone synthesizer that can easily manage data and can reduce the required storage capacity of a waveform memory.
[0007]
[Means for Solving the Problems]
In order to solve the above problems, the present invention is characterized by having the following configuration. The parentheses are examples.
The musical tone synthesizer according to claim 1, wherein one frame Or consist of multiple consecutive frames Waveform data Multiple (Fig. 3) Waveform memory to memorize (Figure 2) The one frame is composed of a plurality of subframes each assigned an address, and the one subframe includes an n-bit compressed sample portion composed of one or a plurality of compressed samples, and m-bit sub information. The waveform information (2) including at least decompression information for decompressing the compressed sample and a loop flag (L flag) indicating a loop section of the waveform data. , In response to an instruction to start sound generation, as the initial value of the loop flag, the first logical value (“0”) corresponding to the waveform data to be read out of the plurality of waveform data stored in the waveform memory or the second value Loop flag setting means (paragraph 0038) for setting a logical value (“1”), and after the sounding start instruction, By reading the waveform data in units of subframes while changing the sample address, a reading means (102) for sequentially reading the compressed sample and the sub information, a newly read compressed sample, Reproduction means (110, 112) for sequentially reproducing the sampling value of the waveform data for each sound generation channel based on the read decompression information; When the initial value of the loop flag is the second logical value (“1”), the first frame is set as a loop start frame, and the initial value of the loop flag is the first logical value. ("0") Each time the loop flag (L flag) in the sub information is read, it is monitored whether or not the value of the loop flag has changed from the value of the loop flag of the other frame read immediately before. Flag Said From the first logical value (“0”) Said When the second logical value (“1”) is changed, the next frame of the changed frame is set as a loop start frame, while the loop flag is changed from the second logical value (“1”) to the second logical value (“1”). When the value changes to a logical value of 1 (“0”), the frame in which the change has occurred is specified as a loop end frame, and after reading all the subframes of the loop end frame, reading of the loop start frame is started. Loop control means for setting the sample address in ( SP20-SP42 ).
[0008]
DETAILED DESCRIPTION OF THE INVENTION
1. Data structure in the embodiment
1.1. Overall structure of waveform data
Next, an embodiment of the present invention will be described. First, a data structure for storing waveform data employed in the present embodiment in a waveform memory will be described with reference to FIGS. 2, reference numeral 200 denotes a waveform data file, in which waveform data areas 204, 206,... For storing various musical sound waveforms are provided. Reference numeral 202 denotes a management area, in which management information such as the data size of the waveform data areas 204, 206,. One waveform data area is composed of a plurality of frames 211 to 21n and a header section 210.
[0009]
1.2. Frame structure
In the present embodiment, waveform data compressed in a linear prediction format is stored in each frame. That is, the prediction value of the sample of interest is obtained in advance by applying a predetermined generator polynomial to the sampling values in the past several samples, and the subtraction result obtained by subtracting this prediction value from the actual sampling value is the “residual code” Stored in each frame. Details will be described with reference to FIG.
[0010]
FIG. 3A shows a data structure in the “1” frame. In the figure, a “1” frame consists of “160” bits, and is divided into “10” subframes every “16” bits. These subframes are data stored at each address of the waveform memory, and are assigned subframe numbers “00” to “09” corresponding to the address SFAD in the frame. The first “4” bits of one subframe are sub-information, and the remaining “12” bits store residual codes. In the sub information in the “1” frame, the bit number bn (“1”, “2”, “3”, “4”, “6” or “12”) of the residual code is in the 00th subframe. Remembered. The number of bits bn is common in the “1” frame. Next, in the sub information of the 01st to 05th subframes, the prediction coefficients used in the generator polynomial are stored.
[0011]
The sub information of the 06th and 07th subframes stores the quantization width, that is, the level width corresponding to the least significant bit of the sampling result. In addition, in the sub information of the 08th and 09th subframes, the L flag and the E flag are stored in the first “1” bit, respectively. The meaning of these flags will be described later. Other information is stored in the other bits of the sub information of the 08th and 09th subframes. Here, the sub-information included in each frame is “sub-information on the residual code in the frame read out after the frame”.
[0012]
For example, in the example of FIG. 3A, the number of bits bn of one residual code is “4”, so in the frame read before this frame, the sub information of the 00th subframe contains “4”. "Will be memorized. This is because, in this embodiment, each subframe in the “1” frame is sequentially read out as many times as necessary, and the tone signal is reproduced, so the first (00th subframe) residual code is read out. This is because it is necessary to determine each sub-information in advance. For this reason, the sub information for the first first frame is stored in the header section 210. However, in the loop end frame that is the last frame of the section (loop section) that is repeatedly played back by loop, the sub information for the loop start frame that is the first frame of the section is stored.
[0013]
Next, a stream of each subframe to be decoded is shown in FIG. In the figure, by sequentially reading out the K_00 to K_09 subframes constituting the Kth frame, the residual codes included in these subframes are decoded, and the tone waveform is sequentially reproduced. The number of bits bn of the residual code is different in each frame, which is a result of selecting an optimum bit width at the time of encoding according to the “magnitude of change in musical sound waveform” and the required accuracy. In other words, in this embodiment, the number of bits bn of the residual code varies depending on the required accuracy, but the data length of the “1” frame is always constant (160 bits) regardless of the number of bits bn. is there.
[0014]
2. Hardware configuration of the embodiment
2.1. overall structure
Next, the hardware configuration of the electronic musical instrument according to the present embodiment will be described with reference to FIG. Note that the electronic musical instrument of this embodiment includes a general-purpose personal computer and an application program that runs on the personal computer.
In the figure, reference numeral 100 denotes a sound source unit, which is configured as a card inserted into a personal computer. A RAM 2 stores various data and programs used in the personal computer. In particular, the RAM 2 stores waveform data used in the sound source unit 100. The data structure of the waveform data is as described above with reference to FIGS. In this way, by using a part of the RAM originally installed in the personal computer as the waveform memory, it is possible to reduce the memory capacity that the sound source unit 100 itself should be equipped with.
[0015]
A flash memory 4 stores an initial program loader of a personal computer. A CPU 6 controls each unit via the bus line 14 based on a program described later. Reference numeral 8 denotes an operation element, which includes an operation element such as a keyboard and a mouse that should be originally provided as a personal computer, and a performance keyboard. Reference numeral 10 denotes a display that displays various information to the user. A communication I / O unit 12 exchanges waveform data and the like with other devices via a local area network. A sound system 16 emits a musical sound signal supplied from the sound source unit 100.
[0016]
In the sound source unit 100, 120 is a control register, and various parameters are written by the CPU 6 to control the sound source unit 100. Reference numeral 102 denotes a frame reading unit, which reads subframes including a necessary residual code from the waveform memory area of the RAM 2 in units of “1” subframes in accordance with the synthesized frame address GFAD. Reference numeral 104 denotes an address generation unit which performs synthesis according to the f number written in the control register 120 (ratio between the pitch of the tone signal at the time of recording and the pitch of the tone signal to be output) and the sampling period of the frame. A frame address GFAD and a sample address SCNT are output. Here, the combined frame address GFAD is a signal formed by combining a frame address FAD indicating a frame to be read and a subframe address SFAD indicating a subframe to be read in the frame. The sample address SCNT includes an integer part SCNTi and a decimal part SCNTf. The integer part SCNTi indicates the number of the residual code in the “1” frame, and the decimal part SCNTf indicates an interpolation coefficient for the waveform sample values before and after that. Here, the subframe address SFAD increases by “1” every time the integer part of the sample address SCNT increases by the number of residual codes stored in each subframe.
[0017]
106 is a sub information decoding unit, and the sub information portion of the sub frames read out by the frame reading unit 102 is input and accumulated over the period of each frame, thereby decoding the sub information for the next frame, In the next frame period, the block is supplied to each block of the sound source unit 100 for decoding the residual code of the frame. Reference numeral 108 denotes a residual information cache unit, to which the residual code portion of the subframe read by the frame reading unit 102 is input, stores the latest several samples of residual codes included therein, and is a sample address integer. The number of residual codes corresponding to the amount of progress of the part SCNTi is sequentially output. At a timing when there is not enough residual code to be output from the residual information cache unit 108, the combined frame address GFAD indicating the next subframe is supplied from the address generation unit 104 to the frame reading unit 102, and the corresponding subframe is read out. As a result, the residual code included in the subframe is stored in the residual information cache unit 108. A decoder unit 110 outputs a residual code using a prediction coefficient and a quantization width included in the sub information from the sub information decoding unit 106 each time the residual code is output from the residual information cache unit 108. The sample value of the waveform data is obtained by decoding, and the obtained sample value is sequentially stored in a cache memory provided in the decoder unit 110.
[0018]
An interpolation unit 112 performs an interpolation operation based on the sample address decimal part SCNTf on the latest “2” sample value obtained in the decoder unit 110. Reference numeral 114 denotes a volume EG unit, which gives a predetermined volume envelope to the interpolated sample value. Here, the components 102 to 114 are driven in a time-sharing manner for each sampling period in order to synthesize musical tone signals of a plurality of sound generation channels. That is, processing of completely different sound generation channels is performed for each time-division slot obtained by dividing the sampling period by the number of sound generation channels. Further, registers, buffers, and the like, which will be described later, are also provided for each sound generation channel. Reference numeral 116 denotes a mixer unit that mixes the tone signals of a plurality of tone generation channels output from the volume EG unit 114 at each sampling period and outputs the mixed tone signal as a stereo tone signal. Reference numeral 118 denotes a DA converter that converts the stereo tone signal into an analog signal. The analog tone signal is generated via the sound system 16.
[0019]
2.2. Configuration of address generation unit 104
Next, the configuration of the address generator 104 will be described with reference to FIG. In the figure, reference numeral 144 denotes a 1/3 sample accumulator, which sequentially accumulates the value of “1/3” of the f number every sampling period. A multiplier 150 multiplies the accumulated result AC by “3”. That is, the multiplication result is equal to the value obtained by accumulating the f number for each sampling period, and the multiplication result is output as the sample address SCNT.
[0020]
A converter 148 outputs a subframe address SFAD = AC · bn / 4 based on the accumulation result AC of the accumulator 144 and the bit number bn of the residual code. Here, the “bit number bn” used in the converter 148 is usually the bit number bn sequentially supplied from the sub information decoding unit 106. Here, for example, assuming that the number of bits bn is the maximum value “12”, the subframe address SFAD is equal to three times the accumulation result AC, that is, the sample address SCNT. Therefore, every time the sample address SCNT increases by “1”, the “1” subframe is read out. Assuming that the bit number bn is “4”, the subframe address SFAD is equal to the accumulation result AC, that is, “1/3” of the sample address SCNT. Therefore, every time the sample address SCNT increases by “3”, the “1” subframe is read.
[0021]
The above operation is the same when the bit number bn is a value other than “12” or “4”. Thus, the subframe address SFAD increases by “1” every time the sample address SCNT increases by the number of residual code samples included in each subframe. The relationship between the number of samples per “1” frame for each bit number bn and the subframe address SFAD is listed below.
Figure 0003918755
[0022]
Thus, in this embodiment, since the accumulation unit of the accumulator 144 is set to “1/3” of the sample address SCNT, the calculation for calculating the subframe address SFAD corresponding to the sample address SCNT is “ This can be realized by a combination of division and multiplication with 1/4 or 1/2 as a divisor. Here, division with “1/4” or “1/2” as a divisor can be performed by a shift operation, and multiplication can be realized by an adder and a shifter. Therefore, the converter 148 is made by a shifter, an adder, or the like. It can be realized and a divider or the like is not necessary. Thereby, the structure of the converter 148 can be made very simple.
[0023]
In the converter 148, when the subframe address SFAD reaches “9” (corresponding to the 09th subframe) and carries a carry, the frame end pulse FEND is supplied to the accumulator 144. In the accumulator 144, when the frame end pulse FEND is supplied, a value corresponding to “the number of residual codes in the current frame / 3” is subtracted from the accumulation result, and the accumulation is continued. Next, reference numeral 142 denotes a frame counter. The start frame address stored in the control register 120 is used as an initial value, and each time the frame end pulse FEND is supplied, the count result is the number of addresses corresponding to “1” frame (this In this case, it is incremented by “10”). This count result is output as the frame address FAD. A combining unit 146 combines the frame address FAD and the subframe address SFAD and outputs the result as a combined frame address GFAD.
[0024]
Reference numeral 141 denotes a loop control circuit that receives the loop start frame address LS from the control register 120 and also receives the loop end frame instruction signal LE from the sub information decoding unit 106 to perform loop control of the frame counter 142. That is, when the instruction signal LE indicating that the frame is a loop end frame is supplied from the sub information decoding unit 106, the loop control circuit 141 receives the frame address FAD when the frame end pulse FEND is next supplied. Is forcibly set to the loop start frame address LS.
[0025]
2.3. Configuration of decoder unit 110
Next, a detailed configuration of the decoder unit 110 will be described with reference to FIG.
In the figure, reference numeral 160 denotes an inverse quantization unit that outputs a residual value, which is a residual between a predicted value and an actual value, based on a residual code and a quantization width. 162 is a linear prediction unit that calculates a predicted value of a sampling value in the latest sampling period by applying a predetermined generator polynomial to the sampling values D1 and D2 and the prediction coefficient in the past “2” sampling period. To do. Reference numeral 164 denotes an adder, which calculates a sampling value in the latest sampling period by adding the predicted value and the residual value. Here, the sampling period is not a sampling period used as a reference for operation of each block of the sound source unit 100 but a sampling period as a recording order of each sample of waveform data stored in the waveform memory.
[0026]
Reference numeral 168 denotes a loop start sampling value buffer, which stores the last “2” sampling value in the frame immediately before the loop start frame address LS. Reference numeral 166 denotes a waveform data cache memory that stores the calculated sampling values over a plurality of periods and supplies the sampling values D1 and D2 in the past “2” sampling period to the linear prediction unit 162.
[0027]
However, when the current sampling period is the first sampling period of the loop start frame, the “2” sampling values stored in the loop start sampling value buffer 168 are supplied to the linear prediction unit 162 as D1 and D2. When the current sampling period is the second sampling period of the loop start frame, the first sampling value of the loop start frame is D1, and the last “1” sampling value stored in the value buffer 168 is D2. To the linear prediction unit 162. This is to make the reproduction results of the loop section coincide when the transition from the attack section to the loop section is performed and when the loop section is repeatedly reproduced.
[0028]
In the above embodiment, the residual codes are sequentially extracted from the residual information cache unit 108 and decoded in accordance with the sample address SCNT increasing at a speed corresponding to the pitch of the musical sound. If there is no residual code corresponding to the sample address SCNT in the residual information cache unit 108, the address GFAD of the subframe including the residual code is supplied from the address generation unit 104 to the frame reading unit 102, and the address The residual information cache unit 108 is supplemented with the residual code of the subframe read by the GFAD. The sub-information included in the read sub-frame is simultaneously supplied to the sub-information decoding unit 106, and the sub-information is reproduced for each frame.
[0029]
In order to decode the residual code, sub information of each frame is required. However, in this embodiment, the sub information is reproduced from the sub frame read out for the residual code. There is no need to read the sub information. Therefore, the configuration of a circuit that supplies sub information necessary for decompression can be greatly simplified. In this embodiment, the waveform memory is accessed using the bus line 14 shared with other devices such as the CPU 6, but the frequency of access to the waveform memory for each tone generation channel is substantially constant, Since it does not fluctuate so much, there is little adverse effect on the operation of other devices.
[0030]
3. Operation of the embodiment
3.1. Note-on event processing
Next, the operation of this embodiment will be described. In this embodiment, a MIDI event can be generated by a sequencer program or the like in a personal computer, and a MIDI signal can be input from the outside via the communication I / O unit 12. When a note-on event occurs due to these, a note-on event processing routine shown in FIG. 7 is started. In the figure, when the process proceeds to step SP1, the part number, note number, and velocity in the note-on event are substituted into variables PT, NN, and VL, respectively. Also, a predetermined maximum value MEmax is substituted for the variable that is the volume envelope evaluation value ME.
[0031]
Next, when the process proceeds to step SP2, empty channels that are not currently allocated for sound generation are searched in the control register 120. This empty channel includes a sound generation channel that is released after the volume is attenuated and the volume level is “0” after note-off. Next, when the process proceeds to step SP3, it is determined whether or not there is an empty channel. If it exists, “YES” is determined, and the process proceeds to step SP4. Here, the channel number of the empty channel is stored in the variable AS.
[0032]
Next, when the process proceeds to step SP5, the tone control parameter and the volume envelope evaluation value ME corresponding to the part number PT, note number NN, and velocity VL are written in the area corresponding to the channel number AS in the control register 120. . Next, when the process proceeds to step SP6, a sound generation start command is written to the channel number AS. Thereby, the musical tone synthesis process related to the channel number AS is started. Although details will be described later, the evaluation value ME (AS) written in the area corresponding to the channel number AS is updated by the sub information decoding unit 106 so as to gradually decrease with time.
[0033]
By the way, if there is no empty channel when the note-on event occurs, “NO” is determined in step SP3, and the process proceeds to step SP7. Here, the volume envelope evaluation value ME (CH) (details will be described later) from the region corresponding to each sound channel CH of the control register 120 for all sound channels of the sound source unit 100 or some sound channels narrowed down by a predetermined rule. And the volume envelope EG (CH) is read out. Then, both are combined as a volume level LVL (CH) of the same sound generation channel CH, and they are compared with each other, and the channel with the lowest volume level LVL (CH) is set as a truncated channel. The truncated channel number is assigned to the channel number AS. Next, when the process proceeds to step SP8, the volume level of the truncated channel number AS is rapidly attenuated. Then, when the volume level of the channel number AS becomes “0”, steps SP5 and SP6 are executed, and the tone synthesis process based on a new note-on event is started in the channel number AS as described above.
[0034]
3.2. Frame read processing
When the tone synthesis process is started in a certain tone generation channel CH, subframes constituting each frame are sequentially read from the frame indicated by the start frame address in accordance with the progress of the sample address SCNT. When reading of all subframes of one frame is completed, the process proceeds to reading of the subframe of the next frame. At this time, the sub information decoding unit 106 determines that the sub information of the frame that has been read is the next frame. Is supplied to each block of the sound source unit 100 as sub information. On the other hand, when the 08th and 09th subframes of each frame are read, the sub information decoding unit 106 starts the frame reading routine shown in FIG. This processing is implemented as a microprogram for controlling the operation of the sub information decoding unit 106 or a corresponding logic circuit in the sub information decoding unit 106. When the processing proceeds to step SP20 in FIG. 8, the designated frame is transferred from the RAM 2 to the frame reading unit 102.
[0035]
Next, when the process proceeds to step SP22, it is determined whether or not the E flag in the frame that has been read is “1”. If “YES” is determined here, the volume envelope evaluation value ME (hereinafter referred to as ME (CH) with the sound channel CH as a subscript) in the control register 120 for the sound channel CH is decremented by “1”. . If the E flag is “0”, step SP24 is skipped, so that the evaluation value ME (CH) does not change. As described above, the sound volume envelope evaluation value ME (CH) is either decreased or maintained every time the frame reading routine is started and is not increased. The register constituting the volume envelope evaluation value ME (CH) can be constituted by a simple down counter with a decrement function.
[0036]
Here, the meaning of the E flag will be described with reference to FIG. First, the characteristic A in the figure is an example of a volume envelope characteristic that the waveform data originally has (before the volume EG unit 114 has an envelope). Here, the “maximum value that the volume envelope characteristic A can take in the future” is a characteristic A ′ indicated by a one-dot chain line. The sound volume envelope evaluation value ME (CH) is substantially equal to the characteristic A ′ in which the time axis direction is roughened in “frame” units and the level is roughened in predetermined quantization width units.
[0037]
However, since the initial value of the evaluation value ME (CH) is set to the maximum value MEmax, it is generally a number from the start of sounding until the evaluation value ME (CH) actually corresponds to the characteristic A ′. It takes a frame period. The number “1” or “0” given on the evaluation value ME (CH) is the value of the E flag. As described above, in this embodiment, the truncated channel is not determined by the volume envelope characteristic A but by the volume envelope evaluation value ME. That is, the tone generation channel having the lowest “maximum value that the volume envelope characteristic A can take in the future” is selected as the truncated channel. As a result, although the volume envelope is temporarily lowered, a sounding channel that is sure to increase in the future is prevented from being selected as a truncated channel. In addition, the initial value of the evaluation value of the waveform data may be stored in the header portion 210 of each waveform data, and this may be used as the initial value of the evaluation value ME (CH) instead of the maximum value MEmax. . In that case, the evaluation value ME (CH) immediately after the pronunciation is a value corresponding to the characteristic A ′.
[0038]
Returning to FIG. 8, when the process proceeds to step SP <b> 26, it is determined whether or not the variable of the immediately preceding L value PreL (CH) related to the sound generation channel CH is “0”. The immediately preceding L value PreL (CH) is a variable for holding the L flag of the previously read frame in the sounding channel CH, but when a note-on event is assigned to the sounding channel CH. Is initialized to “1” or “0” based on the initial value of the L flag of the waveform data stored in the header portion 210 of the waveform data read out by the sound generation channel.
[0039]
Here, the processing contents after step SP26 will be described based on specific examples shown in FIGS. In these figures, the horizontal axis represents the frame, and the vertical axis represents the volume envelope evaluation value ME. The numerical value “1” or “0” arranged along the horizontal axis is the value of the L flag in each frame, but the leftmost numerical value is the value of the immediately preceding L value PreL (CH) that is initialized. First, the waveform shown in FIG. 9A will be described as an example of a general waveform in which both the attack section and the loop section have a certain length. In the example of FIG. 9A, the initial value of the immediately preceding L value PreL (CH) is “0”. Therefore, when the first frame is read and the frame reading routine (FIG. 8) is called for the first time, “YES” is determined in step SP26, and the process proceeds to step SP36. Here, it is determined whether or not the read L flag is “1”. If "NO" is determined here, the process proceeds to step SP42, and the value of the L flag is substituted for the immediately preceding L value PreL (CH).
[0040]
Thereafter, the same processing is repeated every time a frame is read. In the example of FIG. 9A, the L flag included in the first to 22nd frames is “0”, whereas the L flag is changed to “1” in the 23rd frame. . Accordingly, the frame reading routine (FIG. 8) is executed in accordance with the reading of the 23rd frame, and when the process proceeds to step SP36 via step SP26, it is determined as “YES” here, and the process proceeds to step SP39. Note that the determination of “YES” in step SP36 indicates that the next frame is a loop start frame. In step SP39, it is determined whether or not the loop start setting has already been executed. Here, since the loop start setting has not been executed yet, it is determined as “NO”, and the process proceeds to step SP40.
[0041]
In step SP40, a loop start setting process is executed. That is, if the L flag is switched from “0” to “1” in the 23rd frame, the frame address of the next 24th frame is written in the control register 120 as the loop start frame address LS. The loop start sampling value buffer 168 is controlled to hold the last two sampling values of the current frame (the 23rd frame). That is, the buffer 168 stores the sampling values of two samples immediately before the loop start sample. Of the information necessary for the expansion of the loop start frame, the bit number bn, the prediction coefficient, and the quantization width can be sub-information stored in the loop end frame, and need not be saved here. .
[0042]
Then, when the process proceeds to step SP42, the L flag (“1”) is substituted for the immediately preceding L value PreL (CH). Thereafter, when the frame is read and the frame reading routine (FIG. 8) is started, since the immediately preceding L value PreL (CH) is “1”, it is determined as “NO” in step SP26, and the processing is step SP28. Proceed to Here, it is determined whether or not the loop start setting process has been completed. In this example, since the loop start setting process is executed when step SP40 is executed first, “YES” is determined, and the process proceeds to step SP32.
[0043]
In step SP32, it is determined whether or not the read L flag is “1”. If "YES" is determined here, the process proceeds to step SP42, the L flag ("1") is substituted into the immediately preceding L value PreL (CH), and the process of this routine is ended. Thereafter, as long as the frame whose L flag is “1” is continued (in the example of FIG. 9A, until the 31st frame is read), the same processing is repeated.
[0044]
Next, it is assumed that the 31st frame is read and the frame reading routine (FIG. 8) is executed. Since the L flag included in the frame is “0”, when the process proceeds to step SP32 via steps SP26 and SP28, “NO” is determined here, and the process proceeds to step SP33. The determination of “NO” in step SP32 indicates that the frame is a loop end frame. In step SP33, the loop end frame instruction signal LE indicating that the frame being read is a loop end frame is output to the loop control circuit 141 of the address generation unit 104. Since the frame reading routine (FIG. 8) is executed at the timing when the 09th subframe of each frame is read, when step SP33 is executed, the subframe address SFAD is set to “9” immediately after that. The frame end pulse FEND is generated and the loop start frame address LS is forcibly set in the frame counter 142. When returning to the loop start frame, the number of bits bn, the prediction coefficient, and the quantization width included in the sub information stored in the loop end frame read immediately before are returned in the loop start frame. Supplied from the unit 106 and used to expand the residual code of the frame.
[0045]
Thereafter, when a frame between the loop start frame (24th frame) and the loop end frame (31st frame) is repeatedly designated by the sound source unit 100, the frame reading routine (FIG. 8) is called each time. In this case, even if it is determined in step SP36 that the next frame is a loop start frame, since the loop start setting process is completed, it is always determined “YES” in steps SP28 and SP39, and the loop start setting process is performed. Is not executed. On the other hand, if it is determined in step SP32 that the frame is a loop end frame, the loop end frame instruction signal LE is output to the loop control circuit 141 in response to the loop end instruction in step SP33, and the frame address FAD is set to the loop start frame. Returned to
[0046]
Next, as another example, a processing example of waveform data having a very short loop section (one frame length) will be described with reference to FIG. Such a short loop section is likely to occur in a timbre such as an electric piano. In the example shown in the drawing, the initial value of the immediately preceding L value PreL (CH) is set to “0”, and the L flag in the first to eighth frames is also set to “0”. For this reason, in the first to eighth frames, step SP26, step SP36, and step SP42 are repeatedly executed, and the immediately preceding L value PreL (CH) within this period is always kept at “0”.
[0047]
Next, when the 10th frame is read, since the L flag included therein is “1”, the process proceeds to step SP40 via steps SP36 and SP39 in the frame reading routine (FIG. 8). The frame address of the eleventh frame is set to the loop start frame address LS, and the last two sampling values of the current frame are held. Next, in step SP42, the immediately preceding L value PreL (CH) is set to “1”. Next, when the eleventh frame is read, since the immediately preceding L value PreL (CH) is “1” and the L flag included in the frame is “0”, steps SP26, SP28, and SP32 in FIG. The processing proceeds sequentially to step SP33, and the loop end frame instruction signal LE is supplied in the eleventh frame including the L flag. In other words, in this example, since the frame indicated by the loop start frame address LS is also a loop end frame, the loop section is only “1” frame length, and it can be understood that an extremely short loop section can be realized.
[0048]
Next, as another example, a processing example of waveform data in which the waveform data has no attack section and the loop section is very short (one frame length) will be described with reference to FIG. Such waveform data is likely to be generated by a timbre such as a synth lead. In the example of FIG. 5C, the initial value of the immediately preceding L value PreL (CH) is set to “1”, and the L flag in the first frame is set to “0”. When the frame reading routine (FIG. 8) is called at the time of reading the first frame, “NO” is determined in step SP26, and the process proceeds to step SP28. Here, since the loop start setting process is not completed, it is determined as “NO”, and the process proceeds to step SP30.
[0049]
In step SP30, a loop start setting process is executed. However, this step SP30 differs from the process of step SP40 in that the process is executed so that the loop section starts from the first frame. That is, the frame address of the first frame is forcibly set in the loop start frame address LS, the bit number bn of the first frame stored in the header section 210 is set in the loop start bit number register 149, and The initial values of the two sampling values stored in the header part 210 are set in the loop start sampling value buffer 168.
[0050]
Next, when the process proceeds to step SP32, it is determined “NO” because the L flag is “0”, and the process proceeds to step SP33. In step SP33, a loop end instruction process is executed. That is, the loop end frame instruction signal LE is supplied to the loop control circuit 141 in the first frame including the L flag. That is, in this example, the first first frame is a loop start frame and a loop end frame.
[0051]
Next, as another example, a processing example of waveform data in which the waveform data has no attack section and the loop section is relatively long will be described with reference to FIG. Such waveform data is likely to be generated by a timbre such as a drum. In the example shown in the figure, the initial value of the immediately preceding L value PreL (CH) is set to “1”, and the L flag in the first frame is set to “0”. When the frame reading routine (FIG. 8) is called at the time of reading the first frame, “NO” is determined in step SP26, and the process proceeds to step SP28. Here, since the loop start setting process is not completed, it is determined as “NO”, and the process proceeds to step SP30.
[0052]
In step SP30, as described above, the loop start setting process in which the first frame is set to the loop start frame address LS is executed. Since the L flag is “1”, “YES” is determined in step SP32, and “1” is substituted for the immediately preceding L value PreL (CH) in step SP42. Thereafter, in the second to sixteenth frames, steps SP26, SP28, SP32, and SP42 are repeatedly executed, and the immediately preceding L value PreL (CH) within this period is always kept at “1”. Next, since the L flag becomes “0” in the 17th frame, the process proceeds to step SP33 via step SP32, and the loop end frame instruction signal LE is supplied in the 17th frame.
[0053]
As described above, in each specific example, the loop start setting process is executed only once in the loop start frame, and the process for returning the next reading to the loop start frame is executed every time in the loop end frame. Has been. However, the user can freely set for each tone whether or not the frame between the loop start / loop end frames is actually repeatedly read (whether or not the loop control circuit 141 is activated). When set to “not repeatedly read”, each waveform data is sequentially reproduced only once each from the first frame to the loop end frame.
[0054]
Four. Modified example
The present invention is not limited to the above-described embodiment, and various modifications can be made as follows, for example.
(1) Although the waveform data format shown in FIGS. 2 and 3 is used in the above embodiment, the waveform data format may be variously changed as necessary. For example, the arrangement of various data can be different from that of the above embodiment. The size of the “1” subframe is not limited to “16” bits, but may be “12” bits, “30” bits, or the like. Further, each subframe is not limited to the sub information “4” bits and the residual code “12” bits, but the sub information “6” bits and the residual code “24” bits, or the sub information “8”. You may comprise by a bit, residual code "16" bits, etc. Similarly, the size of the “1” frame is not limited to “10” words = “160” bits, but may be “6” words, “14” words, or the like. The number of bits of the residual code may be a value other than “1”, “2”, “3”, “4”, “6” or “12”, for example, “8” or “16”. .
[0055]
(2) Although the second-order linear prediction is applied in the above embodiment, higher-order linear prediction may be applied, or a multi-stage linear prediction may be applied.
[0056]
(3) In the above embodiment, all the sub information stored in each frame is sub information used in the next frame. However, some information (for example, bit number bn) is sub information for the frame. It may be information.
[0057]
(4) In the above embodiment, the frame read routine (FIG. 8) is executed at the timing when the L flag and the E flag are read, but instead, at the time of transition from the previous frame to the next frame. It may be executed.
[0058]
(5) In each of the above embodiments, an electronic musical instrument is realized by an application program that runs on a personal computer. However, only this application program is stored in a recording medium such as a CD-ROM or a flexible disk and distributed or transmitted. It can also be distributed through the road.
[0059]
【The invention's effect】
As described above, according to the present invention, as described above, according to the present invention, the reproduction means reads out each subframe in accordance with the sample address, so that the sub information can be extracted at the same time. In addition, when the loop flag changes from the first logic value to the second logic value in a series of frames, the next frame of the changed frame is set as the loop start frame, and the loop flag is set to the second logic value. When the value changes to the first logical value, the frame in which the change has occurred is set as the loop end frame, so that the loop section can be specified by 1-bit information for each frame.
[Brief description of the drawings]
FIG. 1 is a hardware block diagram of an electronic musical instrument according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating a structure of a waveform data file 200 according to an embodiment.
FIG. 3 is a diagram illustrating a data structure of each frame 211 to 21n.
4 is a block diagram of an address generation unit 104. FIG.
5 is a block diagram of a residual information cache unit 108. FIG.
FIG. 6 is an operation explanatory diagram of an embodiment for an E flag.
FIG. 7 is a flowchart of a note-on event processing routine in one embodiment.
FIG. 8 is a flowchart of a frame reading routine in one embodiment.
FIG. 9 is an operation explanatory diagram of an embodiment for an L flag.
[Explanation of symbols]
2: RAM, 4: Flash memory, 6: CPU, 8: Manipulator, 10: Display, 12: Communication I / O unit, 14: Bus line, 16: Sound system, 100: Sound source unit, 102: Frame reading 104: Address generation unit 106: Sub information decoding unit 108: Residual information cache unit 110: Decoder unit 112: Interpolation unit 114: Volume EG unit 116: Mixer unit 118: DA converter 120 : Control register, 141: loop control circuit, 142: frame counter, 144: 1/3 sample accumulator, 146: synthesis unit, 148: converter, 150: multiplier, 160: inverse quantization unit, 162: linear Prediction unit, 164: adder, 166: waveform data cache memory, 168: loop start sampling value buffer, 200: waveform data file , 202: controlling area, 210: header, 211 to 21n: frame, 204, 206, ...: waveform data area.

Claims (1)

一フレームまたは連続した複数のフレームでなる波形データを複数記憶する波形メモリであって、前記一フレームは各々にアドレスが付与された複数のサブフレームから構成され、一の前記サブフレームは一または複数の圧縮サンプルから成るnビットの圧縮サンプル部とmビットの副情報とから構成され、前記一フレームに渡る副情報には、少なくとも前記圧縮サンプルを伸長するための伸長情報と前記波形データのループ区間を示すループフラグとを含む、波形メモリと、
発音開始の指示に応じて、前記ループフラグの初期値として、前記波形メモリに記憶された複数の波形データのうち読み出すべき波形データに対応した第1の論理値または第2の論理値を設定するループフラグ設定手段と、
前記発音開始の指示以降、サンプルアドレスを変化させつつ前記サブフレーム単位で前記波形データを読み出すことにより、前記圧縮サンプルと、前記副情報とを逐次読み出す読出し手段と、
新たに読み出された圧縮サンプルと、過去に読み出された伸長情報とに基づいて発音チャンネル毎に前記波形データのサンプリング値を逐次再生する再生手段と、
前記ループフラグの初期値が前記第2の論理値であった場合は、先頭のフレームをループスタートフレームに設定し、また、前記ループフラグの初期値が前記第1の論理値であった場合は、前記副情報中の前記ループフラグが読み出される毎に、該ループフラグの値が直前に読み出された他のフレームのループフラグの値から変化したか否かを監視し、該ループフラグが前記第1の論理値から前記第2の論理値に変化すると、変化が生じたフレームの次のフレームをループスタートフレームに設定する一方、前記ループフラグが前記第2の論理値から前記第1の論理値に変化すると、その変化が生じたフレームをループエンドフレームとして特定し、該ループエンドフレームの全サブフレームの読み出し後、前記ループスタートフレームの読み出しが開始されるように前記サンプルアドレスを設定するループ制御手段と
を有することを特徴とする楽音合成装置。
A waveform memory for storing a plurality of waveform data composed of one frame or a plurality of continuous frames, wherein the one frame is composed of a plurality of subframes each assigned an address, and the one subframe is one or a plurality of subframes. The n-bit compressed sample portion consisting of the compressed samples and the m-bit sub-information, and the sub-information over one frame includes at least decompression information for decompressing the compressed sample and the loop section of the waveform data A waveform memory including a loop flag indicating
In response to a sound generation start instruction, the first logical value or the second logical value corresponding to the waveform data to be read out of the plurality of waveform data stored in the waveform memory is set as the initial value of the loop flag. Loop flag setting means;
A reading means for sequentially reading out the compressed sample and the sub information by reading out the waveform data in units of the sub-frame while changing a sample address after the sounding start instruction ;
Reproducing means for sequentially reproducing the sampling value of the waveform data for each sound generation channel based on the newly read compressed sample and the decompressed information read in the past,
When the initial value of the loop flag is the second logical value, the first frame is set as a loop start frame, and when the initial value of the loop flag is the first logical value the each time the loop flag in the sub information is read, the value of the loop flag monitors whether changes from the value of the loop flag other frames read immediately before, the loop flag is the If changes to the second logic value from the first logic value, while setting the next frame of the frame a change occurs in the loop start frame, the first logical said loop flag from said second logic value When the value changes, the frame in which the change has occurred is identified as the loop end frame, and after reading all the subframes of the loop end frame, the loop start frame is read. Out musical tone synthesizing apparatus characterized by having a loop control device for setting the sample address as is started.
JP2003087292A 2003-03-27 2003-03-27 Music synthesizer Expired - Fee Related JP3918755B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003087292A JP3918755B2 (en) 2003-03-27 2003-03-27 Music synthesizer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003087292A JP3918755B2 (en) 2003-03-27 2003-03-27 Music synthesizer

Publications (2)

Publication Number Publication Date
JP2004294778A JP2004294778A (en) 2004-10-21
JP3918755B2 true JP3918755B2 (en) 2007-05-23

Family

ID=33401703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003087292A Expired - Fee Related JP3918755B2 (en) 2003-03-27 2003-03-27 Music synthesizer

Country Status (1)

Country Link
JP (1) JP3918755B2 (en)

Also Published As

Publication number Publication date
JP2004294778A (en) 2004-10-21

Similar Documents

Publication Publication Date Title
US7692087B2 (en) Compressed data structure and apparatus and method related thereto
US6137045A (en) Method and apparatus for compressed chaotic music synthesis
US9040800B2 (en) Musical tone signal generating apparatus
US8706506B2 (en) Waveform compressing apparatus, waveform decompressing apparatus, and method of producing compressed data
JP3918755B2 (en) Music synthesizer
JP3915725B2 (en) Music synthesizer
KR20090130864A (en) Musical instrument digital interface hardware instruction set
JP3826870B2 (en) Compressed data structure, waveform generation device, and waveform storage device
JP3945435B2 (en) Waveform data compression method, tone signal generation method, tone signal processing apparatus, and program
JP3912304B2 (en) Compressed data structure, waveform generation device, and waveform storage device
JP3567768B2 (en) Playback device having long stream playback function
JP4107085B2 (en) Waveform data compression method
JP3137043B2 (en) Waveform memory tone generator and tone generator
JP2790160B2 (en) Waveform generation device and waveform storage device
JP3567766B2 (en) Pitch shift playback device using compressed waveform samples
JP3567767B2 (en) Loop playback device using compressed waveform samples
US5639978A (en) Musical tone signal generating apparatus for electronic musical instrument
JP3933072B2 (en) Wave compressor
JP4007194B2 (en) Sound generator
JP3723973B2 (en) Sound generator
JP2882464B2 (en) Waveform memory sound generator
JP3245617B2 (en) Waveform generator
JP3933073B2 (en) Waveform expansion device
JPH056171A (en) Method of compressing musical note waveform
JPH1152996A (en) Data compression device and data expansion device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050125

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

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070205

R150 Certificate of patent or registration of utility model

Ref document number: 3918755

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120223

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130223

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20140223

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees