Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3567768B2 - Playback device having long stream playback function - Google Patents
[go: Go Back, main page]

JP3567768B2 - Playback device having long stream playback function - Google Patents

Playback device having long stream playback function Download PDF

Info

Publication number
JP3567768B2
JP3567768B2 JP33376398A JP33376398A JP3567768B2 JP 3567768 B2 JP3567768 B2 JP 3567768B2 JP 33376398 A JP33376398 A JP 33376398A JP 33376398 A JP33376398 A JP 33376398A JP 3567768 B2 JP3567768 B2 JP 3567768B2
Authority
JP
Japan
Prior art keywords
sample
generated
loop
block
phase information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP33376398A
Other languages
Japanese (ja)
Other versions
JP2000163071A (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 JP33376398A priority Critical patent/JP3567768B2/en
Priority to TW088120167A priority patent/TW457472B/en
Priority to US09/447,204 priority patent/US6242681B1/en
Publication of JP2000163071A publication Critical patent/JP2000163071A/en
Application granted granted Critical
Publication of JP3567768B2 publication Critical patent/JP3567768B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明が属する技術分野】
本発明は、記憶された波形サンプルを読み出して再生する際に、ロングストリームを再生することのできる再生装置に関する。
【0002】
【従来の技術】
従来、実際の楽器音をPCM化してROM(Read Only Memory)等からなる波形メモリに記憶しておき、演奏時に波形メモリにアクセスして読み出し所望の楽器音を再生するようにしたPCM音源が知られている。このPCM音源においてピッチをシフトして波形メモリから読み出す方法として、ピッチ同期タイプとピッチ非同期タイプとが知られている。ピッチ同期タイプのPCM音源では、再生するピッチに対応した周波数のクロックをカウントし、そのカウント値に対応してメモリアドレス値に対応した周期で波形メモリをアクセスし波形サンプルデータを順次に逐一読み出している。また、ピッチ非同期タイプのPCM音源では、一定の所定周期(出力レート)毎に、ピッチに対応した数値の周波数情報を累算し、その累算結果に対応したメモリアドレス値を生成して波形メモリをアクセスし波形サンプルデータを読み出している。
【0003】
ところで、PCM音源はPCM化された楽音波形サンプルをそのまま波形メモリに記憶しており、各音色の楽音波形サンプルは各音色に割り当てられたメモリエリアに記憶されている。従って、打楽器音のような比較的短い時間の音の場合は、最初から最後までの楽音波形サンプルを波形メモリに記憶することができるが、ブラスやストリングス等の持続音の場合は、割り当てられるメモリエリアに限りがあるため最初から最後までの楽音波形サンプルの全てを波形メモリに記憶することはできない。そこで、持続音を発音する際には波形メモリに記憶されている楽音波形サンプルの一部を繰り返し読み出すことにより、持続音を発音するようにしている。このような再生方法をループ再生といっている。
【0004】
【発明が解決しようとする課題】
このように、割り当てられるメモリエリアが限られていても、前記ループ再生を用いることにより持続音を再生することはできる。しかしながら、BGMのような比較的長時間の楽音を再生する際には、ループ再生による再生では再生することができず、割り当てられるメモリエリアが限られている場合には比較的長時間の楽音を再生することはできない。以下、このような比較的長時間の楽音を再生する機能をロングストリーム再生機能ということにする。
そこで、ロングストリーム機能を楽音再生装置に備えさせるために、ロングストリーム再生用データ入力端子を別途備えさせ、そこに入力されるロングストリームの波形サンプルと楽音再生機能部分で再生される楽音波形サンプルとをミキシングして、DA(ディジタル・アナログ変換器)に供給することが、従来考えられている。しかしながら、このようなロングストリーム再生方法では、ロングストリームの波形サンプルを外部から楽音再生装置に供給する際に、楽音再生装置の再生速度に同期してロングストリームの波形サンプルを楽音再生装置に供給しなければならず、ロングストリームの波形サンプルを外部から供給する上位装置の負担が大きいという問題がある。
【0005】
さらに、比較的長時間の楽音を再生するためのロングストリームの波形サンプルは膨大なデータ量となるため、ロングストリームを記憶する記憶装置としては大容量のデータを記憶することのできる記憶装置が必要となる。そこで、限られた記憶容量の記憶装置であってもよいように、記憶装置に圧縮符号化したロングストリームの圧縮波形サンプルを記憶し、ロングストリーム再生機能を圧縮波形サンプルを読み出して行うことが考えられる。しかし、上位装置が再生速度に同期して圧縮波形サンプルを供給しなければならないという点では上記と同様であり、さらに、圧縮符号化しているとロングストリーム再生専用に圧縮波形サンプルを伸長するデコーダが別途必要になり、コスト増が避けられないという問題がある。
【0006】
そこで、本発明は、楽音波形サンプルを割り当ての限られたメモリエリアに記憶するようにした波形サンプル記憶手段を備える再生装置の楽音再生機能を利用して、ロングストリーム再生をすることができると共に、ロングストリームを供給する上位装置の負担を軽くすることのできる再生装置を提供することを第1の目的としている。
また、本発明は、ロングストリームの波形サンプルが圧縮符号化された圧縮波形サンプルとされていても、ロングストリーム再生専用のデコーダを必要としない再生装置を提供することを第2の目的としている。
【0007】
【課題を解決するための手段】
上記第1の目的を達成するために、本発明のロングストリーム再生機能を有する再生装置は、ロングストリームを複数に分割した部分ロングストリームの波形サンプルを読み書き可能な波形サンプル記憶手段と、ループスタート位置情報およびループエンド位置情報を発生するループ位置情報発生手段と、所望の再生ピッチに対応した速度で、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生する位相情報発生手段と、該位相情報発生手段から発生された位相情報に基づいてアドレス信号を生成して、前記波形サンプル記憶手段から部分ロングストリームの波形サンプルを読み出す読出手段と、該読出手段により前記波形サンプル記憶手段から読み出された波形サンプルを出力する出力手段と、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて、ループバックされる前に前記波形サンプル記憶手段に記憶されているループスタート位置からループエンド位置までの既に読み出された部分ロングストリームの波形サンプルを次の部分ロングストリームの波形サンプルで書き換える波形サンプル供給手段とを備えている。
【0008】
また、上記ロングストリーム再生機能を有する再生装置において、前記波形サンプル記憶手段のループスタート位置からループエンド位置までが第1のエリアと第2のエリアに等分されており、前記波形サンプル供給手段は、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて第1のエリアに記憶された波形サンプルが全て読み出されたことが検出された際に、該第1のエリアに次のロングストリームの波形サンプルを書き込み、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいてループエンド位置に達したと検出された際に、第2のエリアに次のロングストリームの波形サンプルを書き込むようにしてもよい。
【0009】
上記第2の目的も達成することのできる本発明の他のロングストリーム再生機能を有する再生装置は、予測値に基づいて圧縮符号化されたロングストリームを複数に分割した部分ロングストリームの圧縮波形サンプルを読み書き可能な波形サンプル記憶手段と、ループスタート位置情報およびループエンド位置情報を発生するループ位置情報発生手段と、所望の再生ピッチに対応した速度で、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生する位相情報発生手段と、該位相情報発生手段から発生された位相情報に基づいてアドレス信号を生成して、前記波形サンプル記憶手段から部分ロングストリームの波形サンプルを読み出す読出手段と、該読出制御手段により前記波形サンプル記憶手段から読み出された圧縮波形サンプルを予測値に基づいて所定周期毎に順次に逐一デコードし、その結果を伸長波形サンプルとして順次出力するデコード手段と、該デコード手段によりデコードされた最新の伸長波形サンプルを含む少なくとも1つの伸長波形サンプルを、一時記憶する一時記憶手段と、前記デコード手段から出力される伸長波形サンプルまたは前記一時記憶手段から出力される伸長波形サンプルのいずれかを予測値として前記デコード手段に選択的に出力すると共に、出力波形サンプルとして出力する出力手段と、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて、ループバックされる前に前記波形サンプル記憶手段に記憶されているループスタート位置からループエンド位置までの既に読み出された部分ロングストリームの圧縮波形サンプルを次の部分ロングストリームの圧縮波形サンプルで書き換える波形サンプル供給手段とを備えている。
【0010】
また、上記ロングストリーム再生機能を有する再生装置において、前記波形サンプル記憶手段のループスタート位置からループエンド位置までが第1のエリアと第2のエリアに等分されており、前記波形サンプル供給手段は、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて第1のエリアに記憶された圧縮波形サンプルが全て読み出されたことが検出された際に、該第1のエリアに次のロングストリームの圧縮波形サンプルを書き込み、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいてループエンド位置に達したと検出された際に、第2のエリアに次のロングストリームの圧縮波形サンプルを書き込むようにしてもよい。
【0011】
さらに、上記ロングストリーム再生機能を有する再生装置において、前記位相情報発生手段で発生する位相情報は整数部と小数部とから成り、前記出力手段は、前記位相情報の整数部に基づき少なくとも2つのサンプルを出力波形サンプルとして選択出力するとともに、選択出力された前記少なくとも2つのサンプルを用いて前記位相情報の小数部に基づき補間演算することにより、前記位相情報に応じた波形サンプルを生成するようにしてもよい。
さらにまた、上記ロングストリーム再生機能を有する再生装置において、前記位相情報発生手段が、前記所望の再生ピッチに対応した速度に代えて、所望のピッチ情報を所定周期毎に累算することにより、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生するようにしてもよい。
さらにまた、上記ロングストリーム再生機能を有する再生装置において、前記波形サンプル記憶手段には、圧縮波形サンプルが1アドレスにつきn(nは2以上の整数)サンプルずつ記憶されており、前記読出制御手段は、前記所定周期毎に、前記波形サンプル記憶手段を1回アクセスするかまたは全くアクセスしないように動作するものであり、前記一時記憶手段には少なくともn個の伸長波形サンプルが記憶されるようにしてもよい。
さらにまた、上記ロングストリーム再生機能を有する再生装置において、前記圧縮波形サンプルが差分符号化あるいは適応差分符号化されていてもよい。
【0012】
このような本発明によれば、楽音を再生することのできる再生装置が従来備えている波形サンプル記憶手段に記憶されている楽音波形サンプルの一部を繰り返し読み出すことにより、持続音を発音するループ再生機能を利用して、ロングストリームの再生を行うことができるようになる。この場合、外部からロングストリームを供給する上位装置は、ロングストリームの波形サンプルをまとめて再生装置に供給すればよく、その再生速度に同期して逐一供給する必要はない。したがって、上位装置の負担を軽減することができる。
また、ロングストリームの波形サンプルが圧縮符号化された圧縮波形サンプルとされていても、再生装置が圧縮符号化された圧縮波形サンプルを再生する際に備えているデコーダを利用して、ロングストリーム圧縮波形サンプルをデコードすることができるため、ロングストリーム再生専用のデコーダを削減することができる。
【0013】
【発明の実施の形態】
本発明のロングストリーム再生機能を有する再生装置を説明する前に、本発明において採用している圧縮符号化の一種である適応差分PCM(ADPCM)の一般的なエンコーダとデコーダについて図1および図2を参照しながら簡単に説明する。
図1はADPCMエンコーダの一般的な構成を示すブロック回路図である。図1において、1サンプル当たり16ビットでPCM化されたn番目のPCMデータS(n)は減算器101に入力され、予測信号S’(n−1)との差分が演算される。減算器101から出力される差分データd(n)は、符号化部102において量子化幅演算部103から出力された量子化幅Δ(n−1)で量子化されて4ビットに圧縮符号化される。
【0014】
圧縮符号化された4ビットからなるADPCMデータD(n)はエンコーダから出力されると共に、量子化幅演算部103および予測部105に供給される。量子化幅演算部103においては、前回に量子化幅演算部103において演算されて生成された量子化幅Δ(n−1)信号と、ADPCMデータD(n)の内のサインビットを除くデータのデータ値に対応する関数との乗算が行われて新たな量子化幅Δ(n)信号が生成される。すなわち、ADPCMデータD(n)をL4(n),L3(n),L2(n),L1()として表すと、L4(n)がサインビットであることから量子化幅演算部103では次の演算が行われる。
Δ(n)=f{L3(n),L2(n),L1(n)}*Δ(n−1) (1)
量子化幅演算部103で生成された量子化幅Δ(n)信号は遅延回路104により1サンプリングタイミング遅延されて、次の入力サンプルS(n+1)を圧縮符号化する際の量子化幅Δ(n)として符号化部102に供給される。
【0015】
また、予測部105では、ADPCMデータD(n)と前回量子化幅演算部103で生成された量子化幅Δ(n−1)信号と前回に予測部105において演算されて生成された予測信号S’(n−1)とが演算されて、新たな予測信号S’(n)が生成される。予測信号S’(n)を生成するための演算式を次に示す。

Figure 0003567768
予測部105で生成された予測信号S’(n)は遅延回路106により1サンプリングタイミング遅延されて、次の入力サンプルS(n+1)を圧縮符号化する際の予測信号として減算器101に供給される。
このようにエンコードされることにより、16ビットのPCMサンプルが圧縮されて4ビットのADPCMサンプルとなる。
【0016】
図2はADPCMデコーダの一般的な構成を示すブロック回路図である。図2において、1サンプル当たり4ビットとなるようADPCM化されたn番目のADPCMサンプルD(n)は復号部201に入力され、量子化幅Δ(n−1)信号と予測信号S’(n−1)と演算されて元の16ビットのPCMサンプルに戻るよう伸長される。伸長された16ビットのPCMサンプルS’(n)は遅延回路202により1サンプリングタイミング遅延されて、次のADPCMサンプルD(n+1)を伸長する際の予測信号として復号部201に供給される。
【0017】
また、入力されたn番目のADPCMサンプルD(n)は量子化幅演算部203に供給され、前回に量子化幅演算部203において演算されて生成された量子化幅Δ(n−1)信号と、ADPCMデータD(n)の内のサインビットを除くデータのデータ値に対応する関数との乗算が行われて新たな量子化幅Δ(n)信号が生成される。すなわち、量子化幅演算部203においても上記(1)式の演算が行われる。量子化幅演算部203で生成された量子化幅Δ(n)信号は遅延回路204により1サンプリングタイミング遅延されて、次のADPCMサンプルD(n+1)を伸長する際の量子化幅Δ(n)信号として復号部201に供給される。
このようにデコードされることにより、4ビットのADPCMサンプルが伸長されて16ビットのPCMサンプルにデコードされる。なお、ADPCMデコーダにおいては、上記説明したように隣接する直前のデコード後のサンプルを予測値としてデコードする必要があるため、ADPCMサンプルを順次に逐一デコードしなければ元の正しいPCMサンプルを得ることができない。
【0018】
本発明のロングストリーム再生機能を有する再生装置に備えられるADPCMデコーダの原理的な構成は前記図2に示すデコーダに示すとおりであり、ADPCMデコーダを備える本発明のロングストリーム再生機能を有する再生装置の実施の形態の全体の構成を回路ブロック図で図3(a)に示す。
図3(a)における各部の詳細構成は後述するが、図3(a)において、1は位相情報発生部(Phase Generator あるいは Pitch Generator:PG)であり、オクターブ情報(OCT)によりシフトされた周波数情報(FN)を一定のサンプリング周期fs毎に累算し、累算値の整数部INTと、その小数部データFRAを出力している。ただし、図3に示す本発明のロングストリーム再生機能を有する再生装置は、64チャンネル分の同時発音が可能とされているので、正確にはサンプリング周波数fsの64倍の64fsの周期(1/64fs)毎にチャンネル毎の累算が実行される。また、累算値は新たなキーオン信号KONPが発生した際に、発音割当されたチャンネルの累算値はリセットされる。
【0019】
2はアドレスポインタ(ADP)であり、RAM(Random Access Memory)6をアクセスするメモリアドレス(MA)と、RAM6をアクセスするタイミングを示すメモリアクセスタイミング(MAT)を発生して、メモリコントローラ5を制御している。なお、RAM6に記憶されるADPCM楽音波形サンプルは、打楽器音のような比較的短い時間の音の場合は、最初から最後までのADPCM楽音波形サンプルを記憶できるが、ブラスやストリングス等の持続音の場合は、割り当てられるメモリ容量に限りがあるため最初から最後までのADPCM楽音波形サンプルの全てを記憶することはできない。そこで、RAM6に記憶されているADPCM楽音波形サンプルの一部を繰り返し読み出して再生するループ再生が用いられている。
【0020】
RAM6に記憶されている各楽器音の最初のADPCM楽音波形サンプルが記憶されているメモリ空間のアドレスがスタートアドレスSAであり、ループ再生を行う際のループの最初のADPCM楽音波形サンプルが記憶されているメモリ空間のアドレスがループスタートアドレス(LSA)であり、また、ループの最後のADPCM楽音波形サンプルが記憶されているメモリ空間のアドレスがループエンドアドレス(LEA)である。ADP2はこれらのアドレスに基づいてアクセスすべきメモリアドレスMA及びメモリアクセスタイミングMATを生成している。なお、スタートアドレスSAは絶対値で表されたメモリアドレスとされ、ループスタートアドレスLSAとループエンドアドレスLEAは、スタートアドレスSAからの相対値アドレスとされている。なお、RAM6に1度アクセスすると16ビット読み出すことができ、1ADPCM楽音波形サンプルは、例えば4ビットとされているので、ADPCM楽音波形サンプルを4サンプル同時に読み出すことができる。すなわち、RAM6における1メモリアドレスに4サンプルのADPCM楽音波形サンプルが対応していることになる。
【0021】
CPU(Central Processing Unit)3は、本発明のロングストリーム再生機能を有する再生装置を制御する上位装置の役割を担うものであり、発音指示に連動して各部にパラメータをセットすると共に、周辺装置4に含まれているCD−ROMからADPCM楽音波形サンプルをメモリコントローラ5を介して読み出し、RAM6に転送している。また、CPU3はロングストリーム再生をする際の波形サンプル供給手段としても機能している。ADPCMデコーダ7は、読み出されたADPCM楽音波形サンプルを元の16ビットのPCM楽音波形サンプルに伸長するよう順次デコードする。そして、位相情報の小数部データFRAに対応する補間された楽音波形サンプルを得るために必要な隣接する2つのPCM楽音波形サンプルS,Sが選択されてADPCMデコーダ7から出力される。隣接するPCM楽音波形サンプルS,Sは、ADP2において生成された2種類の選択制御信号DS0〜3とSDEC1〜3,5〜7により選択されてADPCMデコーダ7から出力される。ADPCMデコーダ7から出力される2つのPCM楽音波形サンプルS,Sは補間器(Interpolator)8に供給されて小数部データFRAに対応した補間サンプルが生成され、楽音波形サンプルSとしてアキュムレータACC9に供給される。
【0022】
アキュムレータACC9では、図3(b)に示すように例えば1/64fsの周期ごとに供給されるチャンネルCH0〜CH63の64チャンネル分の楽音波形サンプルが累算されてサンプリング周期fsごとに図示しないDAC(デジタル−アナログ変換器)へ出力される。DACでアナログ信号に変換された楽音波形信号はサウンドシステムから楽音信号として放音されるようになる。
なお、図3(a)に示す構成においてはCD−ROMドライブを含む周辺装置4が備えられており、イニシャル時においてCD−ROMからRAM6に記憶すべきADPCM楽音波形サンプルが読み出されて、RAM6に記憶される。また、後述するロングストリーム再生時の場合には、分割されたロングストリームデータが順次CD−ROMから読み出されてRAM6の所定記憶エリアに記憶される。
【0023】
ここで、RAM6に記憶されるADPCM楽音波形サンプルについて図4を参照しながら説明する。図4(a)は楽音波形を示しており、波形中のS(0),S(1),・・・S(A)は、楽音波形をサンプルしてそれぞれ16ビットに符号化されたPCM楽音波形サンプルを示している。ただし、カッコ内の数値は16進で示されている。このPCM楽音波形サンプルS(0),S(1),・・・S(A)を、図1に示すようなADPCMエンコーダにより4ビットのADPCM楽音波形サンプルD(0),D(1),・・・D(A)に圧縮符号化されてCD−ROMに記録され、CD−ROMから読み出されてRAM6に記憶される。ここでは、ADPCM楽音波形サンプルD(0),D(1),・・・D(A)をメモリアドレス100番地からRAM6に書き込むものとする。
【0024】
この場合、1メモリアドレスに対応するビット数は16ビットとされていることから、メモリアドレス100番地には、図4(b)に示すようにADPCM楽音波形サンプルD(0),D(1),D(2),D(3)の4サンプルが書き込まれる。また、次のメモリアドレス101番地には続くADPCM楽音波形サンプルD(4),D(5),D(6),D(7)の4サンプルが書き込まれ、次のメモリアドレス102番地には残るADPCM楽音波形サンプルD(8),D(9),D(A)の3サンプルが書き込まれる。
従って、図4(a)に示すPCM楽音波形サンプルS(0),S(1),・・・S(A)のスタートアドレスSAは、100番地となる。また、ループ再生する場合にはループスタートのサンプル値とループエンドのサンプル値とをほぼ等しくするのが好適なことから、例えば、ループスタートのサンプルはS(5)とされ、ループエンドのサンプルはS(A)とされる。ループスタートアドレスLSAはスタートアドレスSAからの相対値で5番地、ループエンドアドレスLEAは同様にA番地となる。なお、このアドレス番地も16進で表されている。
【0025】
次に、図5(a)にPG1の詳細構成を示す。図5(a)に示すように、整数部と小数部で表された周波数情報(FN)はシフタ(Shift)11に入力され、シフタ11にシフト信号として入力されたオクターブ情報(OCT)によりシフトされる。周知のように1ビットMSB側へシフトする毎に、FNは2倍の数値となる。シフタ11によりOCTに対応してシフトされたFNは、第1累算器(ACC1)12および第2累算器(ACC2)13に供給され、チャンネル毎のFNを一定のサンプリング周期(1/64fs)毎に累算する。累算された整数部はデータINTとして、その小数部はデータFRAとして出力されている。なお、サンプリング周波数はfsであるが、本発明のロングストリーム再生機能を有する再生装置は64チャンネル分の同時発音を可能とするように、各部は時分割動作周波数64fsの周期で時分割動作されている。すなわち、PG1では図5(b)に示すように1サンプリング周期(1/fs)が64分割されて1/64fs周期毎にCH0,CH1,・・・CH63のFNの累算が実行されている。
【0026】
また、新たなキーオン信号KONPが発生した際に、ACC1およびACC2にキーオン信号KONPが供給されると、発音割当されたチャンネルの累算値がリセットされる。
図5(c)にはループ再生する際の累算値の変化態様がランプ波形で示されている。ただし、横軸は経過時間、縦軸はACC1およびACC2から出力される累算値である。すなわち、図5(c)に示すようにキーオン信号KONPが発生したタイミングにおいて、対応するチャンネルの累算値はリセットされて「0」からスタートしシフタ11から出力されるキーオンされた音のピッチに対応するFNが1/64fs周期毎に累算されていくようになる。これにより累算値は右肩上がりにリニアに上昇していく。そして、累算値がループエンドアドレスLEAを越えると、このことが検出されて累算値はループスタートアドレスLSAに戻されるようになる。この動作を実行するために、累算値がループエンドアドレスLEAを越えたタイミングを示すリターンタイミングRTNTと、リターン値RTNPがADP2からACC1およびACC2に供給されている。なお、リターン値RTNPはループスタートアドレスLSAに越えた値Aを加算した値とされ、リターンタイミングRTNTが発生した際には、累算値はLSA+Aの値に再セットされる。ループ再生時には、このような動作が繰り返し実行される。
また、ACC2から出力される整数部データINTは、CPU3がモニタしており、後述するロングストリームを再生する際に周辺装置4に装着されたCD−ROMから分割されたロングストリームデータを順次読み出すタイミングを測っている。
【0027】
次に、図6にアドレスポインタ(ADP)2の詳細構成を示す。ADP2において、供給された累算値の整数部データINTは第1加算器(AD1)において「+1」が加算され、データINT+1とされる。これは、データINTで示されるサンプルと、データINT+1で示されるサンプルとを小数部データFRAで補間してFNの累算値に対応するサンプル値を得るためである。データINT+1は第1セレクタ(SEL1)および第2加算器(AD2)に供給される。AD2ではループエンドアドレスLEAからデータINT+1が差し引かれており、その出力のMSBのレベルで、データINT+1がループエンドアドレスLEAを越えたことが検出される。すなわち、データINT+1がループエンドアドレスLEAを越えると、サインビットであるMSBがHレベルとなるので、この信号をリターンタイミングRTNTとしてPG1に供給する。また、ループエンドアドレスLEAからデータINT+1が差し引かれた値は第3加算器(AD3)においてループスタートアドレスLSAが加算されるので、AD3の出力をリターン値RTNPとしてPG1に供給する。
【0028】
AD2のMSB出力はSEL1の入力Bを選択する選択信号SBとされると共に、第1インバータ(INV1)で反転されて入力Aを選択する選択信号SAとされる。これにより、SEL1においてはデータINT+1がループエンドアドレスLEAを越えるまでは、入力Aが選択されてAD1から出力されるデータINT+1が出力され、越えるとAD3が出力するループエンドアドレスLEAからデータINT+1が差し引かれた値にループスタートアドレスLSAが加算された値が出力される。SEL1の出力は第1シフタ(SH1)で2ビットLSB側へシフトされて1/4倍されると共に、LSB側の2ビットが第1デコーダ(DEC1)に入力される。SH1において1/4とされるのは、1メモリアドレス当たり4つのADPCM楽音波形サンプルがRAM6に記憶されているからである。そして、SH1の出力にスタートアドレスSAが第4加算器(AD4)で加算されて、RAM6をアクセスする際のメモリアドレスMAが生成される。
【0029】
また、SEL1のLSB側の2ビットはDEC1において、デコードされて第1選択制御情報DS0〜DS3が発生される。この場合、2ビットが「00」の場合にDS3が発生され、2ビットが「01」の場合にDS0が発生され、2ビットが「10」の場合にDS1が発生され、2ビットが「11」の場合にDS2が発生される。第1選択制御情報DS0〜DS3の持つ意味については後述するが、RAM6を1度アクセスすることにより読み出されて伸長されたADPCMデコード後の4つのPCM楽音波形サンプルの内のいずれが、データINT+1に対応するPCM楽音波形サンプルなのかを示す情報であり、第1選択制御情報DS0〜DS3を用いてデータINT+1に対応するPCM楽音波形サンプルデータSと、データINTに対応するPCM楽音波形サンプルSとを選択して、補間器8に送出している。
【0030】
また、SEL1の出力は第5加算器(AD5)において「+1」だけ減算され、次いで第2シフタ(SH2)において1/4とされる。従って、SH2の出力はデータINTに対応するメモリアドレスとなる。SH1の出力のLSBとSH2の出力のLSBとは、第1エクスクルーシブオアゲート(EX−OR1)に印加され、両LSBが一致しているか不一致かが検出される。一致している場合にはEX−OR1からはLレベルが出力され、従って第1アンドゲート(AND1)出力はLレベルを維持し、不一致の場合はEX−OR1の出力がHレベルとなりAND1の一方にHレベルが印加されると共に、AND1の他方は通常Hレベルとされている(後述するSDEC5が発生される場合のみLレベルとされる)ので、AND1からHレベルのメモリアクセスタイミングMATが出力されるようになる。すなわち、EX−OR1の出力がHレベルとなるのは、データINT+1に対応するメモリアドレスがデータINTに対応するメモリアドレスより1だけインクリメントされた場合であり、この場合にメモリアクセスタイミングMATが出力されるようになる。なお、図3に示す構成の仕様では2オクターブアップまでのピッチシフトとされているので、データINT+1に対応するメモリアドレスがデータINTに対応するメモリアドレスより2以上インクリメントされることはなく、このためLSBのみ比較している。
【0031】
さらに、SH2の出力のLSBは時分割動作サンプリング周波数64fsにおける64周期分遅延する第1ディレイ(DL1)において64周期分遅延されると共に、第2エクスクルーシブオアゲート(EX−OR2)の一方に印加される。EX−OR2の他方にはDL1の出力が印加されており、EX−OR2では同チャンネルにおいてデータINTに対応する今回のメモリアドレスが前回のメモリアドレスよりインクリメントされたか否かを検出している。インクリメントされた場合には、EX−OR2の出力がHレベルとなるため、AND1からHレベルのメモリアクセスタイミングMATが出力されるようになる。このように、必要とするADPCM楽音波形サンプルに対応するメモリアドレスがインクリメントされた時に限り、AND1からHレベルのメモリアクセスタイミングMATが出力されるので、インクリメントされない場合はRAM6にアクセスせず、CPU3の負担を軽くすることができる。なお、インクリメントされない場合に必要なADPCM楽音波形サンプルは、今回までに既に読み出されてADPCMデコードされ、ADPCMデコーダ7に備えられている直前ブロックRAMに格納されている。
【0032】
EX−OR1の出力およびEX−OR2の出力は、第2デコーダ(DE2)に入力されてデコードされ、第2選択制御情報の内のSDEC1,SDEC2,SDEC3が発生されている。この場合、両出力が「00」の場合にSDEC1が発生され、EX−ORの出力がHレベルの「01」の場合にSDEC3が発生され、EX−ORの出力がHレベルの「10」の場合にSDEC2が発生される。なお、第1ゲートアレイ(GA1)は、通常はリターンタイミングRTNTが発生された場合だけ閉じられ、この際には第2選択制御情報SDEC1〜SDEC3の発生を抑制している。このように、第2選択制御情報SDEC1〜SDEC3はループをリターンする以外のタイミングで必要となる情報である。
【0033】
ADP2に入力されたループスタートアドレスLSAは、第3シフタ(SH3)において1/4とされる。従って、SH3の出力はアドレスLSAに対応するサンプルのメモリアドレスとなる。SH3の出力のLSBとSH2の出力のLSBとは、第3エクスクルーシブオアゲート(EX−OR3)に印加され、両LSBが不一致の場合にHレベルが出力される。なお、第2ゲートアレイ(GA2)がリターンタイミングRTNTが発生されたタイミングだけ開くこと、および、第3ゲートアレイ(GA3)は通常は開いていることから、リターンタイミングRTNTが発生された場合だけ、EX−OR3の出力は有効となる。このことから、ループのリターン時にSH2から出力されるデータINTに対応するメモリアドレスが、ループスタートアドレスLSAに対応するサンプルのメモリアドレスを越えた際に、EX−OR3からHレベルが出力されることになる。
【0034】
そして、EX−OR1の出力およびEX−OR3の出力は、第3デコーダ(DEC3)に入力されてデコードされ、第2選択制御情報の内のSDEC5,SDEC6,SDEC7が発生されている。この場合、両出力が「00」の場合にSDEC5が発生され、EX−ORの出力がHレベルの「01」の場合にSDEC7が発生され、EX−ORの出力がHレベルの「10」の場合にSDEC6が発生される。なお、GA2はリターンタイミングRTNTが発生されたタイミングだけ開くこと、および、GA3は通常は開いていることから、リターンタイミングRTNTでのみ第2選択制御情報SDEC5〜SDEC7が発生される。このように、第2選択制御情報SDEC5〜SDEC7はループをリターンするタイミングでのみ必要となる情報である。
【0035】
さらにまた、SH1の出力とSH3の出力とは第4ゲートアレイ(GA4)と第2アンドゲート(AND2)により、全ビットの一致が検出される。すなわち、ループスタートアドレスLSAに対応するサンプルのメモリアドレスに、データINT+1に対応するサンプルのメモリアドレスが一致した際に、Hレベルが出力される。このHレベルの信号は、リターンタイミングRTNTが発生されている場合を除いて開いている第3アンドゲート(AND3)からリターンスタートアドレス検出信号(LSADTCT)として発生される。LSADTCT信号は、ループスタートアドレスLSAに対応するサンプルのメモリアドレスにより読み出された4つのADPCM楽音波形サンプルをデコードして一時記憶する際に利用される。
【0036】
次に、第2選択制御情報SDEC1〜SDEC3,SDEC5〜SDEC7の持つ意味を図7を参照しながら説明する。
第2選択制御情報のSDEC1が発生される場合は、図7(a)に示すようにデータINT+1に対応するサンプルが直前ブロックRAMに記憶されている場合である。この直前ブロックRAMはADPCMデコーダ7に備えられており、前回RAM6にアクセスされた際に読み出された4つのADPCM楽音波形サンプルがADPCMデコーダ7でデコードされて記憶されている。以下、4つのADPCM楽音波形サンプルおよびこれをデコードした4つのPCM楽音波形サンプルを1ブロックという。すなわち、直前ブロックRAMには前回までにデコードされた内の最新の4つのPCM楽音波形サンプル(1サンプルが16ビットに伸長されている)が、それぞれサブブロックSB1〜SB4に記憶されている。この場合には、データINT+1に対応するサンプルが既に直前ブロックRAMに記憶されているので、RAM6にアクセスする必要はない。従って、SDEC1が発生される場合には、メモリアクセスタイミングMAT信号は発生されない。また、図示する例ではデータINT+1に対応するサンプルSがSB3に記憶されており、隣接するデータINTに対応するサンプルSがSB2に記憶されている。
【0037】
第2選択制御情報のSDEC2が発生される場合は、図7(b)に示すようにデータINT+1に対応するサンプルが今回デコードされるブロックの先頭のサブブロックSB1のサンプルとなる場合である。従って、今回デコードブロックのSB1のサンプルがSとされ、隣接する直前ブロックRAMのSB4のサンプルがSとされる。この場合には、データINT+1に対応するサンプルが含まれる今回デコードブロックをRAM6にアクセスしデコードして得る必要があるので、SDEC2が発生される場合には、メモリアクセスタイミングMAT信号が発生される。
第2選択制御情報のSDEC3が発生される場合は、図7(c)に示すようにデータINT+1に対応するサンプルが今回デコードされるブロック内のSB2より後のサブブロックのサンプルとなる場合である。図示する例では、今回デコードブロックのSB2のサンプルがSとされ、隣接する今回デコードブロックのSB1のサンプルがSとされる。この場合には、データINTおよびデータINT+1に対応するサンプルを含む今回デコードブロックをRAM6にアクセスしデコードして得る必要があるので、SDEC3が発生される場合には、メモリアクセスタイミングMAT信号が発生される。
【0038】
第2選択制御情報のSDEC5が発生される場合は、前記したようにループがリターンされる場合であり、図7(d)に示すようにデータINT+1に対応するサンプルがループエンドアドレスLEAに対応するサンプルが含まれるループエンドブロックのSB2以上のサブブロックのサンプルとなると共に、リターン値RTNPに対応するサンプルがループスタートブロックRAM内のサンプルとされている場合である。このループスタートブロックRAMは、ADPCMデコーダ7に備えられており、LSADTCT信号が発生した際に読み出されてデコードされた4つのPCM楽音波形サンプルが一時記憶されるメモリである。このループスタートブロックRAM内にはループスタートアドレスLSAに対応するサンプルが少なくとも記憶されている。図示する例では、ループエンドアドレスLEAに対応するサンプルがループエンドブロックのSB1とされ、データINT+1に対応するサンプルがループエンドブロックのSB2とされると共に、ループスタートアドレスLSAに対応するサンプルがループスタートブロックRAMのSB1とされ、リターンされた際のデータINT+1に対応するサンプルがループスタートブロックRAMのSB2とされている。この場合には、データINTおよびデータINT+1に対応するサンプルをRAM6にアクセスし、デコードして得る必要がないので、SDEC5が発生される場合には、メモリアクセスタイミングMAT信号は発生されない。
【0039】
第2選択制御情報のSDEC6が発生される場合は、ループがリターンされる場合であって、図7(e)に示すようにデータINT+1に対応するサンプルが、ループエンドアドレスLEAに対応するサンプルが含まれるループエンドブロックを越えたサンプルとなると共に、リターン値RTNPに対応するサンプルがループスタートブロックRAMに記憶されているブロックの次の今回デコードブロック内のサンプルとされている場合である。図示する例では、ループエンドアドレスLEAに対応するサンプルがループエンドブロックのSB1とされ、データINT+1に対応するサンプルがループエンドブロックを越えたサンプルとされると共に、ループスタートアドレスLSAに対応するサンプルがループスタートブロックRAMのSB1とされ、リターンされた際のデータINT+1に対応するサンプルがループスタートブロックRAMを越え、今回デコードブロックのサブブロックSB1のサンプルとされている。この場合には、データINT+1に対応するサンプルが含まれる今回デコードデータブロックをRAM6にアクセスし、デコードすることにより得る必要があるので、SDEC6が発生される場合には、メモリアクセスタイミングMAT信号が発生される。
【0040】
第2選択制御情報のSDEC7が発生される場合は、ループがリターンされる場合であって、図7(f)に示すようにデータINT+1に対応するサンプルおよびデータINTに対応するサンプルが、ループエンドアドレスLEAに対応するサンプルが含まれるループエンドブロックを越えたサンプルとなると共に、リターン値RTNPに対応するサンプルがループスタートブロックRAMに記憶されているブロックの次の今回デコードブロック内のサンプルとされている場合である。図示する例では、ループエンドアドレスLEAに対応するサンプルがループエンドブロックのSB1とされ、データINT+1,データINTに対応するサンプルがループエンドブロックを越えたサンプルとされると共に、ループスタートアドレスLSAに対応するサンプルがループスタートブロックRAMのSB1とされ、リターンされた際のデータINT+1,データINTに対応するサンプルがループスタートブロックRAMを越え、今回デコードブロックのサブブロックSB1,SB2のサンプルとされている。この場合には、データINT+1およびデータINTに対応するサンプルが含まれる今回デコードデータブロックをRAM6にアクセスし、デコードすることにより得る必要があるので、SDEC7が発生される場合には、メモリアクセスタイミングMAT信号が発生される。
【0041】
次に、第1選択制御情報DS0〜DS3の持つ意味を図8を参照しながら説明する。第1選択制御情報DS0〜DS3は、データINT+1に対応するサンプルが直前ブロックRAM(あるいはループスタートブロックRAM)および今回デコードブロックのどのサブブロックにあるかを示す情報である。第1選択制御情報のDS0が発生する場合は、データINT+1に対応するサンプルが直前ブロックRAM(あるいはループスタートブロックRAM)のサブブロックSB2のサンプルとされる場合である。第1選択制御情報のDS0は、第2選択制御情報のSDEC1,3,5,7のいずれかと共に発生する。
また、第1選択制御情報のDS1が発生する場合は、データINT+1に対応するサンプルが直前ブロックRAM(あるいはループスタートブロックRAM)のサブブロックSB3のサンプルとされる場合である。第1選択制御情報のDS1も、第2選択制御情報のSDEC1,3,5,7のいずれかと共に発生する。
【0042】
さらに、第1選択制御情報のDS2が発生する場合は、データINT+1に対応するサンプルが直前ブロックRAM(あるいはループスタートブロックRAM)のサブブロックSB4のサンプルとされる場合である。第1選択制御情報のDS2も、第2選択制御情報のSDEC1,3,5,7のいずれかと共に発生する。なお、第1選択制御情報のDS0〜2が発生する場合におけるデータINTに対応するサンプルは、同じブロックの隣接する直前のサブブロックのサンプルとされる。
さらにまた、第1選択制御情報のDS3が発生する場合は、データINT+1に対応するサンプルが今回デコードブロックのサブブロックSB1のサンプルとされる場合である。この場合は、データINTに対応するサンプルは直前ブロックRAM(あるいはループスタートブロックRAM)に含まれ、そのサブブロックSB4のサンプルとされる。第1選択制御情報のDS3は、第2選択制御情報のSDEC2,6のいずれかと共に発生する。
【0043】
次に、図10および図11に分割して示すADPCMデコーダ7の詳細構成を説明するが、説明する際に必要に応じて図9に示すデコード時における直前ブロックRAMとループスタートブロックRAMの制御態様を示す図、図12に示すタイミング図、図13に示す第2選択制御情報SDECと発生される選択信号との関係を示す図表、図14に示す第1選択制御情報DSおよび第2選択制御情報SDECと発生される選択信号との関係を示す図表を参照して説明するものとする。なお、図10および図11に示すADPCMデコーダ7は2つに分割して示されており、図中のラインに付されたイ〜ルはそれぞれ相互に同じラインを示すものとされている。
図10および図11に示すADPCMデコーダ7において、RAM6から同時に読み出された合計16ビットの4つのADPCM楽音波形サンプルは、第10セレクタ(SEL10)の4つの入力A,B,C,Dに1ADPCM楽音波形サンプル(4ビット)ずつ並列に入力される。このSEL10には、入力Aを選択する選択信号SAとして図12(h)に示すタイミング信号TIM01が印加され、入力Bを選択する選択信号SBとして図12(i)に示すタイミング信号TIM23が印加され、入力Cを選択する選択信号SCとして図12(j)に示すタイミング信号TIM45が印加され、入力Dを選択する選択信号SDとして図12(k)に示すタイミング信号TIM67が印加されている。
【0044】
タイミング信号TIM01〜TIM67は、図12(b)に示すように時分割処理用サンプリング周波数64fsの1周期である図12(c)に示す1チャンネルに割り当てられた周期(1/64fs)をさらに8分割(1/64fs*1/8)した図12(d)に示す周期の2周期分の周期を有し、図12(h)〜(k)に示すように相互に重ならないよう順次発生されている。このような、タイミング信号TIM01〜TIM67によりSEL10に並列に入力された4つのADPCM楽音波形サンプルは、入力Aから入力Dに向かって順次選択されて1ADPCM楽音波形サンプルずつ選択出力される。出力されたADPCM楽音波形サンプルD(n)は、ADPCMデコード部70に順次入力され、予測値である隣接する直前のデコード後のサンプルX(n−1)と量子化幅Δ(n−1)信号に基づいてデコードされる。デコードされることにより16ビットに伸長されたPCM楽音波形サンプルX(n)は、第10ラッチ回路(LA10)に第10オアゲート(OR10)を介して印加された図12(e)〜(g)に示すタイミング信号TIM1、TIM3,TIM5,TIM7のそれぞれのタイミングによりラッチされる。タイミング信号TIM1、TIM3,TIM5,TIM7は、タイミング信号TIM01〜TIM67の後半の半周期にそれぞれ該当しており、ADPCMデコード部70によるデコードが完了した後のそれぞれのタイミングでラッチするようにしている。LA10の出力は第12セレクタ(SEL12)の入力Aに入力される。
【0045】
また、SEL10で選択出力されたADPCM楽音波形サンプルD(n)は量子化幅演算部71にも入力され、第14セレクタ(SEL14)から選択出力された量子化幅Δ(n−1)信号と上記(1)式の演算が行われて、新たな量子化幅Δ(n)信号が生成されて出力される。生成された量子化幅Δ(n)信号は、第11ラッチ回路(LA11)に第16オアゲート(OR16)を介して印加されたタイミング信号TIM1、TIM3,TIM5,TIM7のそれぞれのタイミングによりラッチされる。タイミング信号TIM1、TIM3,TIM5,TIM7は、前記したようにタイミング信号TIM01〜TIM67の後半の半周期にそれぞれ該当しており、量子化幅演算部71による演算が完了した後のそれぞれのタイミングでラッチするようにしている。LA11の出力は第14セレクタ(SEL14)の入力Aに入力される。
【0046】
サンプルをADPCMデコードする動作をさらに説明すると、SEL12において入力Aは、第11ナンドゲート(NAND11)、第12ナンドゲート(NAND12)、第13ナンドゲート(NAND13)および第13インバータ(INV13)の作用により発生された選択信号SAで選択される。すなわち入力Aは、タイミング信号TIM01が発生されているタイミングを除いて選択されている。このSEL12から選択出力されるサンプルX(n−1)は予測値としてADPCMデコード部70に供給される。また、SEL14に印加されている選択信号SA,SB,SCは、SEL12と同じ選択信号SA,SB,SCとされているので、その入力Aは、タイミング信号TIM01が発生されているタイミングを除いて選択されている。このSEL14の選択出力は量子化幅Δ(n−1)信号としてADPCMデコード部70に供給される。
【0047】
ここで、SEL10に入力された4つのADPCM楽音波形サンプルをD(0),D(1),D(2),D(3)とすると、タイミング信号TIM23が発生した際には、ADPCMデコード部70にSEL10で選択出力された入力Bの2番目のADPCM楽音波形サンプルD(1)が入力される。同時に、LA10から出力されるADPCMデコード部70においてデコードされた1番目のADPCM楽音波形サンプルD(0)をデコードしたPCM楽音波形サンプルX(0)が予測値としてSEL12から選択出力されてADPCMデコード部70に供給される。さらに、LA11から出力される量子化幅演算部71において演算された量子化幅Δ(0)がSEL14から選択出力されてADPCMデコード部70に供給される。これによりADPCMデコード部70は、隣接する直前のデコード後のサンプル(0)と量子化幅Δ(0)信号を用いて、ADPCM楽音波形サンプルD(1)をデコードすることができる。タイミング信号TIM45,TIM67が発生した際も同様の動作が行われるので、4つのADPCM楽音波形サンプルD(0),D(1),D(2),D(3)は、順次に逐一ADPCMデコードされる。
なお、読み出された最初のサンプルであるADPCM楽音波形サンプルD(0)のデコード動作については後述する。
【0048】
ADPCMデコード部70においてデコードされたPCM楽音波形サンプルX(n)は、第11セレクタ(SEL11)の入力Aにも供給される。このSEL11の入力Bには第17セレクタ(SEL17)の選択出力が供給され、入力Aを選択する選択信号SAは第13オアゲート(OR13)および第14インバータ(INV14)の作用により第2選択制御情報のSDEC5およびSDEC6が発生しているタイミングを除いて発生され、入力Bを選択する選択信号SBはOR13の作用により第2選択制御情報のSDEC5およびSDEC6が発生しているタイミングで発生される。第2選択制御情報SDEC5,SDEC6はリターンタイミングRTNTが発生した際に発生されることから、リターンされないタイミングにおいてはSEL11からは入力Aに入力されたPCM楽音波形サンプルX(n)が選択出力される。
【0049】
SEL11の選択出力は、直前ブロックRAM(RAM10)とループスタートブロックRAM(RAM11)に並列に供給される。直前ブロックRAM10とループスタートブロックRAM11はそれぞれ4つのサブブロックSB1〜SB4に分割されており、それぞれのサブブロックSB1〜SB4には64チャンネル分のサンプルが記憶可能とされている。直前ブロックRAM10のサブブロックSB1のライトイネーブル(WE)信号は第10ゲートアレイ(GA10)の作用により、第2選択制御情報のSDEC3あるいはリターンタイミングRTNT信号が発生されている際のタイミングTIM1で発生される。また、サブブロックSB2のWE信号は、第2選択制御情報のSDEC3あるいはリターンタイミングRTNT信号が発生されている際のタイミングTIM3で発生され、サブブロックSB3のWE信号は、第2選択制御情報のSDEC3あるいはリターンタイミングRTNT信号が発生されている際のタイミングTIM5で発生され、サブブロックSB4のWE信号は、第2選択制御情報のSDEC3あるいはリターンタイミングRTNT信号が発生されている際のタイミングTIM7で発生される。
【0050】
ここで、SDEC3は図7(c)に示すようにデータINT+1に対応するサンプルが今回デコードされるブロック内のサブブロックSB2以降のサンプルとなる場合に発生され、SDEC3が発生されるとこの場合のようにRAM6に対する新たなアクセスを行いADPCM楽音波形サンプルが1ブロック分読み出される。この1ブロックのADPCM楽音波形サンプルは前記したように順次デコードされて、上記のWE信号の発生タイミングで直前ブロックRAM10に順次書き込まれるようになる。なお、直前ブロックRAM10にはチャンネル選択信号SH(0〜63)も印加されており、チャンネル毎に直前ブロックRAM10に書き込まれる。このように、SDEC3の発生とともにRAM6にアクセスした場合には、読み出されてデコードされたPCM楽音波形サンプルにより、直前ブロックRAM10の内容が更新されるようになる。
【0051】
また、リターンタイミングRTNTが発生される場合はSDEC5〜SDEC7のいずれかが発生されることになり、SDEC5が発生される場合は、図7(d)に示すようにデータINT+1に対応するサンプルがループスタートブロックRAM11のサブブロックSB2以上のサンプルとなる場合であるので、SDEC5が発生された場合は、ループスタートブロックRAM11の内容を直前ブロックRAM10に転送して更新する必要がある。さらに、SDEC6が発生される場合は、図7(e)に示すようにデータINTに対応するサンプルがループスタートブロックRAM11のサブブロックSB4のサンプルとなる場合であるので、SDEC6が発生された場合も、ループスタートブロックRAM11の内容を直前ブロックRAM10に転送して更新する必要がある。そこで、SEL11の入力Bに供給されているループスタートブロックRAM11のサンプルを、SEL17を介してSEL11から選択出力して直前ブロックRAM10に供給している。これにより、ループスタートブロックRAM11の内容で直前ブロックRAM10の内容が更新されるようになる。
【0052】
また、SEL11の選択出力が供給されるループスタートブロックRAM11のサブブロックSB1のライトイネーブル(WE)信号は第11ゲートアレイ(GA11)の作用により、ループスタートアドレス検出信号LSADTCTが発生されている際のタイミングTIM1で発生される。また、サブブロックSB2のWE信号はループスタートアドレス検出信号LSADTCTが発生されている際のタイミングTIM3で発生され、サブブロックSB3のWE信号はループスタートアドレス検出信号LSADTCTが発生されている際のタイミングTIM5で発生され、サブブロックSB4のWE信号はループスタートアドレス検出信号LSADTCTが発生されている際のタイミングTIM7で発生される。
【0053】
ここで、LSADTCTは前記したようにループスタートアドレスLSAに対応するサンプルのメモリアドレスに、データINT+1に対応するサンプルのメモリアドレスが一致した際に発生される。したがって、LSADTCT発生中にRAM6に対する新たなアクセスが行われ読み出されて順次デコードされた1ブロックのPCM楽音波形サンプルには、ループスタートアドレスLSAに対応するサンプルが含まれていることになる。そこで、ループスタートブロックRAM11のWE信号を上記の発生タイミングで発生することにより、ループスタートブロックRAM11にループスタートアドレスLSAに対応するサンプルを含む1ブロックのサンプルが書き込まれるようになる。なお、ループスタートブロックRAM11にはチャンネル選択信号SH(0〜63)も印加されており、チャンネル毎にループスタートブロックRAM11に書き込まれる。このように、LSADTCTが発生された場合には、読み出されてデコードされたPCM楽音波形サンプルがループスタートブロックRAM11に書き込まれるようになる。
【0054】
直前ブロックRAM10のサブブロックSB1〜SB4から出力される4つのサンプルは、それぞれ第16セレクタ(SEL16)の入力Aから入力Dに供給され、ループスタートブロックRAM11のサブブロックSB1〜SB4から出力される4つのサンプルは、それぞれ第17セレクタ(SEL17)の入力Aから入力Dに供給される。さらに、直前ブロックRAM10のサブブロックSB4から出力されるサンプルは、SEL12の入力Bに供給され、ループスタートブロックRAM11サブブロックSB4から出力されるサンプルは、SEL12の入力Cに供給される。SEL12の入力Bは、SDEC2あるいはSDEC3のいずれかが発生している際に、タイミング信号TIM01が発生したときに発生される選択信号SBにより選択される。すなわち、図7(b)(c)に示すように、SDEC2あるいはSDEC3が発生している場合には、RAM6にアクセスして読み出されたADPCM楽音波形サンプルをデコードする必要がある。この際のタイミングTIM01の期間において今回デコードブロックの先頭のサブブロックSB1に対応するサンプルのデコードが行われるが、デコード時には予測値としてそのサンプルに隣接する直前のデコード後のサンプルが必要である。この隣接する直前のサンプルは、直前ブロックRAM10のサブブロックSB4に記憶されているので、このサンプルをSEL12で選択し予測値のサンプルX(n−1)としてADPCMデコード部70に供給しているのである。
【0055】
また、SEL12の入力Cは、SDEC6あるいはSDEC7のいずれかが発生している際に、タイミング信号TIM01が発生したときに発生される選択信号SCにより選択される。すなわち、図7(e)(f)に示すように、SDEC6あるいはSDEC7が発生している場合には、リターン時にRAM6にアクセスして読み出されたADPCM楽音波形サンプルをデコードする場合である。この際のタイミングTIM01の期間において今回デコードブロックの先頭のサブブロックSB1に対応するサンプルのデコードが行われるが、デコード時には予測値としてそのサンプルに隣接する直前のデコード後のサンプルが必要である。この隣接する直前のサンプルは、ループスタートブロックRAM11のサブブロックSB4に記憶されているので、このサンプルをSEL12で選択し予測値のサンプルX(n−1)としてADPCMデコード部70に供給しているのである。
【0056】
直前ブロックRAM10およびループスタートブロックRAM11の出力が供給されているSEL16およびSEL17には、共通の選択信号SA,SB,SC,SDが印加されている。なお、入力Aを選択する選択信号SAはタイミング信号TIM67、入力Bを選択する選択信号SBはタイミング信号TIM45、入力Cを選択する選択信号SCはタイミング信号TIM23、入力Dを選択する選択信号SDはタイミング信号TIM01とされている。
すると、SEL16からはタイミング信号TIM01の発生タイミングにおいて直前ブロックRAM10のサブブロックSB1のサンプルが選択出力され、タイミング信号TIM23の発生タイミングにおいて直前ブロックRAM10のサブブロックSB2のサンプルが選択出力され、タイミング信号TIM45の発生タイミングにおいて直前ブロックRAM10のサブブロックSB3のサンプルが選択出力され、タイミング信号TIM67の発生タイミングにおいて直前ブロックRAM10のサブブロックSB4のサンプルが選択出力され、第15セレクタ(SEL15)の入力Bと第18セレクタ(SEL18)の入力Bに供給される。
【0057】
また、SEL17からはタイミング信号TIM01の発生タイミングにおいてループスタートブロックRAM11のサブブロックSB1のサンプルが選択出力され、タイミング信号TIM23の発生タイミングにおいてループスタートブロックRAM11のサブブロックSB2のサンプルが選択出力され、タイミング信号TIM45の発生タイミングにおいてループスタートブロックRAM11のサブブロックSB3のサンプルが選択出力され、タイミング信号TIM67の発生タイミングにおいてループスタートブロックRAM11のサブブロックSB4のサンプルが選択出力され、SEL15の入力CとSEL18の入力Cに供給される。SEL15の入力AにはADPCMデコード部70のデコード出力が直接供給され、SEL15の入力DにはSEL12の選択出力が供給されている。さらに、SEL18の入力Aおよび入力DにはADPCMデコード部70のデコード出力が直接供給されている。
【0058】
SEL15およびSEL18には、共通の選択信号SA,SB,SC,SDが印加されている。そして、この入力Aを選択する選択信号SAは第17オアゲート(OR17)の作用によりSDEC3あるいはSDEC7が発生された際に発生され、入力Bを選択する選択信号SBはSDEC1が発生された際に発生され、入力Cを選択する選択信号SCはSDEC5が発生された際に発生され、入力Dを選択する選択信号SDは第18オアゲート(OR18)の作用によりSDEC2あるいはSDEC6が発生された際に発生される。
ここで、SDEC1が発生される場合は、図9(a)に示すように前回SEL15から選択出力したサンプルS(1)、および、前回SEL18から選択出力したサンプルS(1)と、今回SEL15から選択出力させるサンプルS(2)、および、今回SEL18から選択出力させるサンプルS(2)とが、全て直前ブロックRAM10に記憶されている場合である。したがって、図13のSDEC1の欄に示すようにデータINT+1に対応するサンプルSと、データINTに対応する隣接するサンプルSとして直前ブロックRAM10からのサンプルを選択出力するように、選択信号SBが発生されて直前ブロックRAM10からの出力が入力されているSEL15およびSEL18の入力Bが選択されるのである。
【0059】
また、SDEC2が発生される場合は、図9(b)に示すように前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)と、今回SEL15から選択出力させるサンプルS(2)とが直前ブロックRAM10に記憶されており、今回SEL18から選択出力させるサンプルS(2)が、今回デコードブロックのサブブロックSB1のサンプルとされている場合である。したがって、RAM6に対するアクセスが行われ図13のSDEC2の欄に示すようにデータINT+1に対応するサンプルSを今回デコードブロックから選択出力するように、選択信号SDが発生されてADPCMデコード部70から出力される今回デコードブロックが入力されているSEL18の入力Dが選択される。さらに、データINTに対応する隣接するサンプルSを直前ブロックRAM10のサブブロックSB4から読み出すように、選択信号SDが発生されて直前ブロックRAM10のサブブロックSB4からの出力がSEL12を介して入力されているSEL15の入力Dが選択されるのである。
【0060】
さらにまた、SDEC3が発生される場合は、図9(c)に示すように前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)とが直前ブロックRAM10に記憶されており、今回SEL15から選択出力させるサンプルS(2)と今回SEL18から選択出力させるサンプルS(2)とが、今回デコードブロックに含まれている場合である。したがって、RAM6に対するアクセスが行われ図13のSDEC3の欄に示すようにデータINT+1に対応するサンプルSと、データINTに対応する隣接するサンプルSを今回デコードブロックから選択出力するように、選択信号SAが発生されてADPCMデコード部70から出力される今回デコードブロックが入力されているSEL15およびSEL18の入力Aが選択されるのである。
【0061】
さらにまた、SDEC5が発生される場合は、リターン時であるリターンタイミングRTNT信号が発生されていると共に、図9(d)に示すように前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)とが直前ブロックRAM10に記憶されており、今回SEL15から選択出力させるサンプルS(2)と今回SEL18から選択出力させるサンプルS(2)とが、ループスタートブロックRAM11に記憶されている場合である。したがって、図13のSDEC5の欄に示すようにデータINT+1に対応するサンプルSと、データINTに対応する隣接するサンプルSをループスタートブロックRAM11から選択出力するように、選択信号SCが発生されてループスタートブロックRAM11からの出力がSEL17を介して入力されているSEL15およびSEL18の入力Cが選択されるのである。
【0062】
さらにまた、SDEC6が発生される場合は、リターンタイミングRTNT信号が発生されていると共に、図9(e)に示すように前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)とが直前ブロックRAM10に記憶されており、今回SEL15から選択出力させるサンプルS(2)がループスタートブロックRAM11に記憶されていると共に、今回SEL18から選択出力させるサンプルS(2)が今回デコードブロックのサブブロックSB1とされている場合である。したがって、RAM6に対するアクセスが行われ、図13のSDEC6の欄に示すようにデータINT+1に対応するサンプルSを今回デコードブロックから選択出力するように、選択信号SDが発生されてADPCMデコード部70から出力される今回デコードブロックが入力されているSEL18の入力Dが選択される。さらに、データINTに対応する隣接するサンプルSをループスタートブロックRAM11のサブブロックSB4から読み出すように、選択信号SDが発生されてループスタートブロックRAM11のサブブロックSB4からの出力がSEL12を介して入力されているSEL15の入力Dが選択されるのである。
【0063】
さらにまた、SDEC7が発生される場合は、リターンタイミングRTNT信号が発生されていると共に、図9(f)に示すように前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)とが直前ブロックRAM10に記憶されており、今回SEL15から選択出力させるサンプルS(2)と今回SEL18から選択出力させるサンプルS(2)とが、今回デコードブロックに含まれている場合である。したがって、RAM6に対するアクセスが行われ、図13のSDEC7の欄に示すようにデータINT+1に対応するサンプルSと、データINTに対応する隣接するサンプルSを今回デコードブロックから選択出力するように、選択信号SAが発生されてADPCMデコード部70から出力される今回デコードブロックが入力されているSEL15およびSEL18の入力Aが選択されるのである。
なお、SDEC5およびSDEC6が発生する場合は、ループスタートブロックRAM11の内容が直前ブロックRAM10に転送されてその内容の更新がおこなわれる。このため、ループスタートブロックRAM11の出力が供給されているSEL17の選択出力がSEL11の入力Bに供給され、SDEC5およびSDEC6が発生した際に、SEL11は入力Bを選択してループスタートブロックRAM11からのサンプルを直前ブロックRAM10に供給している。
【0064】
上記したようにSEL18からはデータINT+1に対応するサンプルSが選択出力され、SEL15からはデータINTに対応する隣接するサンプルSが選択出力されるが、タイミングによっては必要でないサンプルがSEL15,SEL18から出力される。そこで、SEL15の後段に第12ラッチ回路(LA12)を設けると共に、SEL18の後段に第14ラッチ(LA14)を設けて必要なサンプルだけを出力するようにしている。
LA12およびLA14の動作を第1選択制御情報DS0〜DS3および第2選択制御情報SDEC1〜SDEC3,SDEC5〜SDEC7の組み合わせで図13、図14および図15を主に参照しながら説明する。
【0065】
SDEC1とDS0が共に発生している場合は、SEL15およびSEL18からは入力Bに供給されている直前ブロックRAM10から出力される図15(c)に示す前回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC1〉に示しているように、第16インバータ(INV16)と第12ゲートアレイ(GA12)と第13ゲートアレイ(GA13)の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14には第14ゲートアレイ(GA14)の作用によりタイミング信号TIM3がラッチ信号として印加される。従って、LA12に前回デコードブロックの先頭サブブロックのサンプルS(−4)がラッチされ、LA14にサンプルS(−3)がラッチされる。すなわち、DS0が発生されているので、図8(a)に示されているように直前ブロックRAM10のサブブロックSB1のサンプルがサンプルSとされ、隣接するサブブロックSB2のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされる第13ラッチ(LA13)および第15ラッチ(LA15)を介して出力される。
【0066】
また、SDEC1とDS1が共に発生される場合は、SEL15およびSEL18からは同様に図15(c)に示す前回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC1〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM3がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM5がラッチ信号として印加される。従って、LA12に前回デコードブロックのサンプルS(−3)がラッチされ、LA14にサンプルS(−2)がラッチされる。すなわち、DS1が発生されているので、図8(b)に示されているように直前ブロックRAM10のサブブロックSB2のサンプルがサンプルSとされ、隣接するサブブロックSB3のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0067】
また、SDEC1とDS2が共に発生される場合は、SEL15およびSEL18からは同様に図15(c)に示す前回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC1〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM5がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM7がラッチ信号として印加される。従って、LA12に前回デコードブロックのサンプルS(−2)がラッチされ、LA14にサンプルS(−1)がラッチされる。すなわち、DS2が発生されているので、図8(c)および図9(a)に示されているように直前ブロックRAM10のサブブロックSB3のサンプルがサンプルSとされ、隣接するサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0068】
SDEC1とDS3が共に発生される場合はなく、DS3はSDEC2と共に発生される。この場合は、SEL15からは入力Dに供給されている図15(b)に示すSEL12から出力される1サンプル遅延された今回デコードブロックが図15(e)に示すタイミングで順次選択出力され、SEL18からは入力Dに供給されている図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC2〉に示しているように、OR18とGA12とGA13の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM1がラッチ信号として印加される。従って、LA14に今回デコードブロックの先頭サブブロックのサンプルS(0)がラッチされ、LA12にサンプルS(0)に隣接する直前のサンプルS(*)がラッチされる。SDEC2はリターン時には発生しないので、S(*)は前回最終デコードサンプルとなる。すなわち、DS3が発生されているので、図8(d)および図9(b)に示されているように今回デコードブロックのサブブロックSB1のサンプルがサンプルSとされ、直前デコードブロック(直前ブロックRAM10)のサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされるLA13およびLA15を介して出力される。
【0069】
次に、SDEC3とDS0が共に発生された場合は、SEL15およびSEL18からは入力Aに供給されているADPCMデコード部70から出力される図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC3〉に示しているように、INV16とGA12とGA13の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM3がラッチ信号として印加される。従って、LA12に今回デコードブロックの先頭サブブロックのサンプルS(0)がラッチされ、LA14に隣接するサンプルS(1)がラッチされる。すなわち、DS0が発生されているので、図8(a)および図9(c)に示されているように今回デコードブロックのサブブロックSB1のサンプルがサンプルSとされ、隣接するサブブロックSB2のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされるLA13およびLA15を介して出力される。
【0070】
また、SDEC3とDS1が共に発生される場合は、SEL15およびSEL18からは同様に図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC3〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM3がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM5がラッチ信号として印加される。従って、LA12に今回デコードブロックのサンプルS(1)がラッチされ、LA14にサンプルS(2)がラッチされる。すなわち、DS1が発生されているので、図8(b)に示されているように今回デコードブロックのサブブロックSB2のサンプルがサンプルSとされ、隣接するサブブロックSB3のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0071】
また、SDEC3とDS2が共に発生される場合は、SEL15およびSEL18からは同様に図15(a)に示す前回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC3〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM5がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM7がラッチ信号として印加される。従って、LA12に今回デコードブロックのサンプルS(2)がラッチされ、LA14にサンプルS(3)がラッチされる。すなわち、DS2が発生されているので、図8(c)に示されているように今回デコードブロックのサブブロックSB3のサンプルがサンプルSとされ、隣接するサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0072】
次に、SDEC5とDS0が共に発生された場合は、SEL15およびSEL18からは入力Cに供給されているループスタートブロックRAM11から出力される図15(d)に示すループスタートブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC5〉に示しているように、INV16とGA12とGA13の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM3がラッチ信号として印加される。従って、LA12にループスタートブロックの先頭サブブロックのサンプルS(−4L)がラッチされ、LA14に隣接するサンプルS(1−4L)がラッチされる。すなわち、DS0が発生されているので、図8(a)に示されているようにループスタートブロックRAM11のサブブロックSB1のサンプルがサンプルSとされ、隣接するサブブロックSB2のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされるLA13およびLA15を介して出力される。
【0073】
また、SDEC5とDS1が共に発生される場合は、SEL15およびSEL18からは同様に図15(d)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC5〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM3がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM5がラッチ信号として印加される。従って、LA12にループスタートブロックのサンプルS(1−4L)がラッチされ、LA14にサンプルS(2−4L)がラッチされる。すなわち、DS1が発生されているので、図8(b)および図9(d)に示されているようにループスタートブロックRAM11のサブブロックSB2のサンプルがサンプルSとされ、隣接するサブブロックSB3のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0074】
また、SDEC5とDS2が共に発生される場合は、SEL15およびSEL18からは同様に図15(d)に示すループスタートブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC5〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM5がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM7がラッチ信号として印加される。従って、LA12にループスタートブロックのサンプルS(2−4L)がラッチされ、LA14にサンプルS(3−4L)がラッチされる。すなわち、DS2が発生されているので、図8(c)に示されているようにループスタートブロックRAM11のサブブロックSB3のサンプルがサンプルSとされ、隣接するサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0075】
SDEC5とDS3が共に発生される場合はなく、DS3はSDEC6と共に発生される。この場合は、SEL15からは入力Dに供給されている図15(b)に示すSEL12から出力される1サンプル遅延された今回デコードブロックが図15(e)に示すタイミングで順次選択出力され、SEL18からは入力Dに供給されている図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC6〉に示しているように、OR18とGA12とGA13の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM1がラッチ信号として印加される。従って、LA14に今回デコードブロックの先頭サブブロックのサンプルS(0)がラッチされ、LA12にサンプルS(0)に隣接する直前のサンプルS(*)がラッチされる。SDEC6が発生するのはリターン時なので、S(*)はループスタートブロックの最終デコードサンプルとなる。すなわち、DS3が発生されているので、図8(d)および図9(e)に示されているように今回デコードブロックのサブブロックSB1のサンプルがサンプルSとされ、ループスタートブロック(ループスタートブロックRAM11)のサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされるLA13およびLA15を介して出力される。
【0076】
次に、SDEC7とDS0が共に発生された場合は、SEL15およびSEL18からは入力Aに供給されているADPCMデコード部70から出力される図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC7〉に示しているように、INV16とGA12とGA13の作用により、LA12にはタイミング信号TIM1がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM3がラッチ信号として印加される。従って、LA12に今回デコードブロックの先頭サブブロックのサンプルS(0)がラッチされ、LA14に隣接するサンプルS(1)がラッチされる。すなわち、DS0が発生されているので、図8(a)および図9(f)に示されているように今回デコードブロックのサブブロックSB1のサンプルがサンプルSとされ、隣接するサブブロックSB2のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは同期して出力されるようタイミングTIM7でラッチされるLA13およびLA15を介して出力される。
【0077】
また、SDEC7とDS1が共に発生される場合は、SEL15およびSEL18からは同様に図15(a)に示す今回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC7〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM3がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM5がラッチ信号として印加される。従って、LA12に今回デコードブロックのサンプルS(1)がラッチされ、LA14にサンプルS(2)がラッチされる。すなわち、DS1が発生されているので、図8(b)に示されているように今回デコードブロックのサブブロックSB2のサンプルがサンプルSとされ、隣接するサブブロックSB3のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0078】
また、SDEC7とDS2が共に発生される場合は、SEL15およびSEL18からは同様に図15(a)に示す前回デコードブロックが図15(e)に示すタイミングで順次選択出力される。この際は図14の〈SDEC7〉に示しているようにGA13の作用により、LA12にはタイミング信号TIM5がラッチ信号として印加され、LA14にはGA14の作用によりタイミング信号TIM7がラッチ信号として印加される。従って、LA12に今回デコードブロックのサンプルS(2)がラッチされ、LA14にサンプルS(3)がラッチされる。すなわち、DS2が発生されているので、図8(c)に示されているように今回デコードブロックのサブブロックSB3のサンプルがサンプルSとされ、隣接するサブブロックSB4のサンプルがサンプルSとされることになる。LA12およびLA14でラッチされたサンプルSとサンプルSとは、タイミングTIM7でLA13およびLA15から出力される。
【0079】
このようにして第1選択制御情報DS0〜DS3および第2選択制御情報SDEC1〜3,5〜7により選択出力されたサンプルSとサンプルSとは、補間器(Interpolator)8に供給されて位相情報の小数部データFRAに対応した補間サンプルが生成され、楽音波形サンプルSとしてアキュムレータACC9に供給される。
【0080】
ここで、図10および図11に戻りADPCMデコーダ7の構成における量子化幅Δ(n−1)信号をADPCMデコード部70に供給するための構成の説明を行う。
前記したように、SEL10で選択出力されたADPCM楽音波形サンプルD(n)は量子化幅演算部71にも入力され、SEL14から選択出力された量子化幅Δ(n−1)信号と上記(1)式の演算が行われて、新たな量子化幅Δ(n)信号が生成されて出力される。生成された量子化幅Δ(n)信号は、LA11にOR16を介して印加されたタイミング信号TIM1,TIM3,TIM5,TIM7のそれぞれのタイミングによりラッチされる。さらに、第13セレクタ(SEL13)の入力Aに供給される。入力AはSDEC5あるいはSDEC6が発生されていない場合に選択されて、SEL13の選択出力は直前量子化幅RAM12およびループスタート量子化幅RAM13に並列に供給される。
【0081】
直前量子化幅RAM12に書き込まれるのはリターンタイミングRTNT信号あるいはSDEC3が発生されているときのタイミングTIM7である。すなわち、直前ブロックRAM10の内容が更新される際に、その最終のサンプルを用いて演算された量子化幅Δが直前量子化幅RAM12に書き込まれるようになる。この直前量子化幅RAM12の出力は、SDEC2あるいはSDEC3が発生されている際のタイミングTIM01にSEL14から選択出力されてADPCMデコード部70に量子化幅Δ(n−1)信号として供給される。この際には、直前ブロックRAM10のサブブロックSB4のサンプルがSEL12から選択出力されてADPCMデコード部70にサンプルX(n−1)として供給されている。
【0082】
また、ループスタート量子化幅RAM13に書き込まれるのはループスタートブロックスタートアドレス検出信号LSDTCTが発生されているときのタイミングTIM7である。すなわち、ループスタートブロックRAM11の内容が更新される際に、ループスタートブロックの最終のサンプルを用いて演算された量子化幅Δ信号がループスタート量子化幅RAM13に書き込まれるようになる。このループスタート量子化幅RAM13の出力は、SDEC6あるいはSDEC7が発生されている際のタイミングTIM01にSEL14から選択出力されてADPCMデコード部70に量子化幅Δ(n−1)信号として供給される。この際には、ループスタートブロックRAM11のサブブロックSB4のサンプルがSEL12から選択出力されてADPCMデコード部70にサンプルX(n−1)として供給されている。
また、ループスタート量子化幅RAM13の出力はSEL13の入力Bにも供給されており、リターンタイミングRTNT信号と共にSDEC5あるいはSDEC6が発生した際には、SEL13から選択出力されたループスタート量子化幅RAM13の出力が直前量子化幅RAM12に転送されて、直前量子化幅RAM12の内容が更新される。この動作は、前記した直前ブロックRAM10の内容がループスタートブロックRAM11の内容で更新される場合と同時に行われる。これにより、必要とする量子化幅Δ(n−1)信号をADPCMデコード部70に常に供給することができるようになる。
【0083】
以上説明した本発明のロングストリーム再生機能を有する再生装置においては、図4に示すような波形のサンプルを繰り返し再生するループ再生を行うことにより楽音等を発生している。このようなループ再生のモードをノーマルループモードということにする。そして、本発明のロングストリーム再生機能を有する再生装置においては、ノーマルループモードの再生だけではなく、ループ再生機能を応用してロングストリームの再生も行うことができる。この再生モードをロングストリームモードということにする。
そこで、本発明のロングストリーム再生機能を有する再生装置におけるロングストリームモードにおける再生について図16を参照しながら次に説明する。なお、ロングストリームモードにおける再生は、64チャンネルのうちの少なくとも1チャンネルを用いて行われる。
【0084】
図16は、図3に示す本発明のロングストリーム再生機能を有する再生装置の構成においてロングストリームモードの再生を行う概略を説明するための図である。ロングストリームモード時には周辺装置4に装着されたCD−ROMに記録されているBGM等のロングストリームが再生される。このロングストリームモード時は、最初にRAM6に用意された同じ大きさのエリアAとエリアBとからなるエリアの記憶容量に対応する大きさの図示するロングストリーム部分1が読み出されて記憶される。この記憶動作は、CPU3がメモリコントローラ5を制御して、CD−ROMから読み出したロングストリーム部分1のADPCM楽音波形サンプルをRAM6のエリアAおよびエリアBに記憶する。エリアAとエリアBとは同じ記憶容量とされ、この例では3ブロック分(12ADPCM楽音波形サンプル分)の記憶容量とされる。なお、ロングストリームモード時には、エリアAの最初のサンプルに対応する先頭アドレスであるスタートアドレスSAとループスタートアドレスLSAとを等しくし、エリアBの最終のブロックの先頭サンプルに対応するアドレスをループエンドアドレスLEAとしている。
【0085】
ついで、メモリコントローラ5はRAM6のエリアAの最初からADPCM楽音波形サンプルを読み出してADPCMデコーダ7に供給し、前記したようにADPCMデコードが行われてPCM楽音波形サンプルS,Sが出力される。PCM楽音波形サンプルサンプルS,Sは、補間器8に供給されて位相情報の小数部データFRAに対応した補間サンプルが生成され、楽音波形サンプルSとしてアキュムレータACC9に供給される。
ここで、再生が進んでデータINTが(LEA−LSA)/2以上となったこと、すなわちエリアAの最終のADPCM楽音波形サンプルが読み出されたことが検出されたときに、CPU3はCD−ROMから前回読み出された最終のブロック(エリアBの最終ブロック)と次の2ブロック分の3ブロック分のロングストリーム部分2Aを読み出してRAM6のエリアAに記憶させる。上記検出は、CPU3がPG1から出力される位相情報の整数部データINTが記憶されているレジスタ10の内容をモニタすることにより行う。そして、エリアBに記憶されているロングストリームのADPCM楽音波形サンプルが順次に逐一読み出されて再生が継続される。
【0086】
さらに、再生が進んでCPU3がデータINTがループエンドアドレスLEA以上となったことを検出すると、CPU3はCD−ROMから前回読み出された最終のブロックの次の3ブロック分のロングストリーム部分2Bを読み出してRAM6のエリアBに記憶させる。この場合には、ADPCMデコード部70からループエンドアドレスLEAを越えた際に発生されるリターンタイミングRTNTおよびリターン値RTNPとがPG1に供給されて、PG1から出力される位相情報はリターン値RTNPに対応した値となる。この際のPG1から出力される位相情報は、エリアAの先頭ブロックアドレスに対応するようになり、続く再生はエリアAに記憶されている次のロングストリーム部分2AのADPCM楽音波形サンプルを読み出すことにより継続されるようになる。
このように、データINTが(LEA−LSA)/2以上となった際にエリアAをすでに読み出されている最終のブロックを重複するよう更新すると共に、データINTがループエンドアドレスLEA以上となった際にエリアBを更新しながらループ再生を繰り返し行うことにより、RAM6のエリアAとエリアBとが交互に所定量毎の新たなロングストリーム部分のADPCM楽音波形サンプルにより更新されていくようになる。これにより、BGM等のRAM6にすべて記憶することのできない大量のサンプルからなるロングストリームを再生することが可能となる。
【0087】
次に、ロングストリームモード時に発生される第1選択制御情報DS0〜DS3および第2選択制御情報SDEC1〜SDEC3が発生された際のADPCMデコーダ7の動作の概略を図17を参照しながら説明する。なお、ロングストリームモード時には、図6を参照すれば明らかなようにSDEC5〜SDEC7はGA3の作用により発生されない。
図17に示す(a)から(c)の動作は、図9に示す(a)から(c)の動作と同様であるので、その説明は省略する。図17(d)に示す動作は、データINT+1がループエンドアドレスLEAを越えた場合のリターン時の動作であり、図17(d)にリターンタイミングRTNTが発生している際にSDEC3とDS0とが共に発生された場合の動作を示している。
【0088】
この場合は、前回選択出力したサンプルS(1)および前回選択出力したサンプルS(1)とが直前ブロックRAM10に記憶されており、今回SEL15から選択出力させるサンプルS(2)と今回SEL18から選択出力させるサンプルS(2)とが、次のブロックのサブブロックSB1,サブブロックSB2のサンプルとされる場合である。このサブブロックSB1のサンプルに対応するアドレスはループエンドアドレスLEAである。したがって、RAM6をアクセスしてエリアBの最終ブロックを読み出せばよいのであるが、この際にはリターンタイミングRTNTが発生されているので、この際に発生されるメモリアドレスMAはループスタートアドレスLSAに対応するエリアAの最初のブロックを指すメモリアドレスになる。すなわち、リターン時はエリアBの最終ブロックとエリアAの最初のブロックとを同一内容として連続するADPCM楽音波形サンプルを読み出す必要がある。このため、図16に示すようにエリアAが更新される際には、エリアBの最終ブロックが先頭ブロックとしてエリアAに重複して書き込まれるのである。このようにしてRAM6のエリアAの先頭のブロックが読み出されて、今回デコードブロックとしてデコードされるようになる。
【0089】
図17(e)に示す動作は、ピッチアップしてロングストリーム再生する際に、データINT+1がループエンドアドレスLEAを越えた場合のリターン時の動作を示している。この場合は、前回選択出力したサンプルS(1)が直前ブロックRAM10に記憶されていると共に、前回選択出力したサンプルS(1)が次のブロックのサブブロックSB1のサンプルとされ、直前ブロックRAM10に記憶されており今回SEL15から選択出力させるサンプルS(2)が次のブロックのサブブロックSB4のサンプルとされると共に、今回SEL18から選択出力させるサンプルS(2)が、さらに次のブロックのサブブロックSB1のサンプルとされる場合である。次のサブブロックSB1のサンプルS(1)に対応するアドレスはループエンドアドレスLEAである。この場合も前述と同様にループスタートアドレスLSAに対応するエリアAの最初のブロックにアクセスされるようになる。この際に、次のブロックを読み出してデコードすることは可能であるが、ハードウェアの制限からその次のブロックにアクセスすることはできない。従って、図17(e)に示すようなピッチアップを伴うことはできないので、このようなピッチアップの再生は制限される。
【0090】
以上説明した本発明のロングストリーム再生機能を有する再生装置においては、楽音を発生するものとして説明したが楽音に限るものではなく、ゲームにおける効果音等を発生するものであってもよい。また、上記の説明においてはピッチ非同期タイプとして説明したが、必ずしもピッチ非同期タイプとすることはなく、必要に応じて本発明のロングストリーム再生機能を有する再生装置をピッチ同期タイプとしてもよい。
さらに、以上説明した本発明のロングストリーム再生機能を有する再生装置においては、64音同時発音可能とされているが、この発音数に限られるものではなく128音同時発音可能にしても、逆に32音同時発音可能であってもよい。さらにまた、1オクターブ以内のピッチアップとしたが、2つ以上のブロックを読み出し可能となるようハードウェアを構成すれば、2オクターブ以上のピッチアップを可能とすることができる。
さらにまた、波形サンプルを圧縮する方式として量子化幅を適応的に制御するADPCM方式を採用したが、この方式に限ることはなく差分PCM(DPCM)方式により圧縮するようにしてもよい。
【0091】
【発明の効果】
本発明は以上のように、楽音を再生することのできる再生装置が従来備えている波形サンプル記憶手段に記憶されている楽音波形サンプルの一部を繰り返し読み出すことにより、持続音を発音するループ再生機能を利用して、ロングストリームの再生を行うことができるようになる。この場合、外部からロングストリームを供給する上位装置は、ロングストリームの波形サンプルをまとめて再生装置に供給すればよく、その再生速度に同期して逐一供給する必要はない。したがって、上位装置の負担を軽減することができる。
また、ロングストリームの波形サンプルが圧縮符号化された圧縮波形サンプルとされていても、再生装置が圧縮符号化された圧縮波形サンプルを再生する際に備えているデコーダを利用して、ロングストリーム圧縮波形サンプルをデコードすることができるため、ロングストリーム再生専用のデコーダを削減することができる。
【図面の簡単な説明】
【図1】ADPCMエンコーダの一般的な構成を示す図である。
【図2】ADPCMデコーダの一般的な構成を示す図である。
【図3】本発明のロングストリーム再生機能を有する再生装置における実施の形態の構成例を示すブロック図である。
【図4】本発明のロングストリーム再生機能を有する再生装置における波形サンプルを圧縮した際にその圧縮波形サンプルを記憶する態様を示す図である。
【図5】本発明のロングストリーム再生機能を有する再生装置の実施の形態における位相情報発生部の構成およびその動作を示す図である。
【図6】本発明のロングストリーム再生機能を有する再生装置の実施の形態におけるアドレスポインタの構成を示す回路図である。
【図7】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第2選択制御情報SDECが発生した際のADPCMデコーダの動作を示す図である。
【図8】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第1選択制御情報DSが発生した際のADPCMデコーダの動作を示す図である。
【図9】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第1選択制御情報DSと第2選択制御情報SDECが共に発生した際のADPCMデコーダの動作を示す図である。
【図10】本発明のロングストリーム再生機能を有する再生装置の実施の形態におけるADPCMデコーダの詳細構成の一部を示す回路図である。
【図11】本発明のロングストリーム再生機能を有する再生装置の実施の形態におけるADPCMデコーダの詳細構成の他の一部を示す回路図である。
【図12】本発明のロングストリーム再生機能を有する再生装置の実施の形態における動作タイミングを示す図である。
【図13】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第2選択制御情報SDECと第15セレクタおよび第18セレクタの選択信号との関係を示す図表である。
【図14】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第2選択制御情報SDECと第12ラッチおよび第14ラッチのラッチ信号との関係を示す図表である。
【図15】本発明のロングストリーム再生機能を有する再生装置の実施の形態における第15セレクタおよび第18セレクタの入力A〜入力Dに供給されるサンプルを示す図である。
【図16】本発明のロングストリーム再生機能を有する再生装置の実施の形態におけるロングストリーム再生の動作を示す図である。
【図17】本発明のロングストリーム再生機能を有する再生装置の実施の形態におけるロングストリーム再生時の第2選択制御情報SDECが発生した際のADPCMデコーダの動作を示す図である。
【符号の説明】
1 位相情報発生部,2 アドレスポインタ,3 CPU,4 周辺装置,5 メモリコントローラ,6 RAM,7 ADPCMデコーダ,8 補間器,9 アキュムレータ,10 レジスタ,11 シフタ,70 ADPCMデコード部,71 量子化幅演算部,100 メモリアドレス,101 メモリアドレス,101 減算器,102 メモリアドレス,102 符号化部,103 量子化幅演算部,104 遅延回路,105 予測部,106 遅延回路,201 復号部,202 遅延回路,203 量子化幅演算部,204 遅延回路,DS0〜DS3 第1選択制御情報,RAM10 直前ブロックRAM,RAM11 ループスタートブロックRAM,RAM12 直前量子化幅RAM,RAM13ループスタート量子化幅RAM,SB1〜SB4 サブブロック,SDEC1〜3,SDEC5〜7 第2選択制御情報[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a reproducing apparatus capable of reproducing a long stream when reading and reproducing stored waveform samples.
[0002]
[Prior art]
Conventionally, a PCM sound source has been known in which an actual instrument sound is converted into PCM and stored in a waveform memory such as a ROM (Read Only Memory), and the waveform memory is accessed and read out to reproduce a desired instrument sound during performance. Have been. As a method of shifting the pitch in the PCM sound source and reading it from the waveform memory, a pitch synchronous type and a pitch asynchronous type are known. A pitch synchronous type PCM tone generator counts clocks of a frequency corresponding to a pitch to be reproduced, accesses a waveform memory at a cycle corresponding to a memory address value corresponding to the count value, and sequentially reads out waveform sample data one by one. I have. Also, in a pitch asynchronous type PCM sound source, frequency information of a numerical value corresponding to the pitch is accumulated at a predetermined period (output rate), and a memory address value corresponding to the accumulation result is generated to generate a waveform memory. And read waveform sample data.
[0003]
By the way, the PCM sound source stores the PCM-converted tone waveform samples in the waveform memory as they are, and the tone waveform samples of each tone are stored in the memory area allocated to each tone. Therefore, in the case of a sound of a relatively short time such as a percussion instrument sound, the musical tone waveform samples from the beginning to the end can be stored in the waveform memory, but in the case of a continuous sound such as brass and strings, the allocated memory is Since the area is limited, it is not possible to store all of the musical tone waveform samples from the beginning to the end in the waveform memory. Therefore, when generating a continuous sound, a continuous sound is generated by repeatedly reading out a part of the musical tone waveform sample stored in the waveform memory. Such a reproduction method is called loop reproduction.
[0004]
[Problems to be solved by the invention]
As described above, even if the allocated memory area is limited, the continuous sound can be reproduced by using the loop reproduction. However, when a relatively long musical tone such as BGM is reproduced, it cannot be reproduced by the loop reproduction, and when the allocated memory area is limited, the relatively long musical tone cannot be reproduced. It cannot be played. Hereinafter, such a function of reproducing a music sound for a relatively long time is referred to as a long stream reproduction function.
Therefore, in order to provide the musical sound reproducing device with the long stream function, a data input terminal for long stream reproduction is separately provided, and a waveform sample of the long stream inputted thereto and a musical sound waveform sample reproduced by the musical sound reproducing function part are provided. Has been conventionally considered to be supplied to a digital-to-analog converter (DA). However, in such a long stream reproducing method, when supplying a long stream waveform sample to the musical sound reproducing apparatus from the outside, the long stream waveform sample is supplied to the musical sound reproducing apparatus in synchronization with the reproduction speed of the musical sound reproducing apparatus. Therefore, there is a problem that a burden on a host device that supplies a long stream waveform sample from outside is large.
[0005]
Further, since a long stream waveform sample for reproducing a relatively long musical tone has a huge data amount, a storage device capable of storing a large amount of data is required as a storage device for storing the long stream. It becomes. Therefore, it is conceivable to store a compressed and encoded long stream compressed waveform sample in the storage device and perform the long stream reproduction function by reading the compressed waveform sample so that the storage device may have a limited storage capacity. Can be However, this is similar to the above in that the higher-level device must supply the compressed waveform samples in synchronization with the playback speed, and furthermore, when compression encoding is performed, a decoder that expands the compressed waveform samples exclusively for long stream playback is used. There is a problem that it is necessary separately and that an increase in cost cannot be avoided.
[0006]
Therefore, the present invention can perform long stream playback by using the tone playback function of a playback device including a waveform sample storage unit configured to store a musical tone waveform sample in a limited memory area. It is a first object of the present invention to provide a playback apparatus capable of reducing the burden on a host apparatus that supplies a long stream.
It is a second object of the present invention to provide a playback apparatus that does not require a decoder dedicated to long stream playback even if the waveform samples of the long stream are compressed and encoded.
[0007]
[Means for Solving the Problems]
In order to achieve the first object, a playback apparatus having a long stream playback function according to the present invention comprises: a waveform sample storage unit capable of reading and writing a waveform sample of a partial long stream obtained by dividing a long stream into a plurality; Loop position information generating means for generating information and loop end position information; and at a speed corresponding to a desired reproduction pitch, generating phase information sequentially increasing to a loop end position via a loop start position, and generating the loop position information. When it is detected that the loop end position has been reached based on the loop end position information generated by the information generation means, the phase information is looped back to the loop start position, and the phase information which sequentially increases again is generated. Means, and an address based on the phase information generated by the phase information generating means. Reading means for generating a signal and reading a waveform sample of the partial long stream from the waveform sample storage means, output means for outputting a waveform sample read from the waveform sample storage means by the reading means, Based on the phase information generated by the generating means or the address signal generated by the reading means, the loop read from the loop start position to the loop end position stored in the waveform sample storage means before the loop back is performed. Waveform sample supply means for rewriting the waveform sample of the partial long stream with the waveform sample of the next partial long stream.
[0008]
Further, in the playback device having the long stream playback function, the portion from the loop start position to the loop end position of the waveform sample storage means is equally divided into a first area and a second area, and the waveform sample supply means When it is detected that all the waveform samples stored in the first area have been read based on the phase information generated by the phase information generating means or the address signal generated by the reading means, When the next long stream waveform sample is written in the area of, when it is detected that the loop end position has been reached based on the phase information generated by the phase information generating means or the address signal generated by the reading means, the second May be written in the next area.
[0009]
A playback apparatus having another long stream playback function according to the present invention that can also achieve the second object is a compressed waveform sample of a partial long stream obtained by dividing a long stream compressed and encoded based on a prediction value into a plurality of pieces. Waveform sample storage means capable of reading and writing, loop position information generating means for generating loop start position information and loop end position information, and a loop corresponding to a desired reproduction pitch, through the loop start position to the loop end position. While generating phase information that sequentially increases, when it is detected that the loop end position has been reached based on the loop end position information generated by the loop position information generating means, the phase information is looped back to the loop start position. Phase information generating means for generating phase information which sequentially increases again and again; Reading means for generating an address signal based on the phase information generated from the stage and reading out the waveform sample of the partial long stream from the waveform sample storage means; and reading out the waveform sample from the waveform sample storage means by the read control means. Decoding means for decoding the compressed waveform samples sequentially one by one at predetermined intervals based on the predicted value and sequentially outputting the results as decompressed waveform samples; and at least one decoding means including the latest decompressed waveform samples decoded by the decoding means. Temporary storage means for temporarily storing an expanded waveform sample; and selectively outputting to the decoding means either a decompressed waveform sample output from the decoding means or an expanded waveform sample output from the temporary storage means as a predicted value. Output means for outputting as an output waveform sample, and Based on the phase information generated by the phase information generating means or the address signal generated by the reading means, before the loop-back, the readout from the loop start position to the loop end position stored in the waveform sample storage means has already been performed. Waveform sample supply means for rewriting the compressed waveform sample of the partial long stream that has been set with the compressed waveform sample of the next partial long stream.
[0010]
Further, in the playback device having the long stream playback function, the portion from the loop start position to the loop end position of the waveform sample storage means is equally divided into a first area and a second area, and the waveform sample supply means When it is detected that all the compressed waveform samples stored in the first area have been read based on the phase information generated by the phase information generating means or the address signal generated by the reading means, When the next long stream compressed waveform sample is written in the area 1 and the loop information is detected to have reached the loop end position based on the phase information generated by the phase information generating means or the address signal generated by the reading means, The next long stream compressed waveform sample may be written in the second area.
[0011]
Further, in the playback device having the long stream playback function, the phase information generated by the phase information generation means includes an integer part and a decimal part, and the output means includes at least two samples based on the integer part of the phase information. As an output waveform sample, and by performing an interpolation operation based on the decimal part of the phase information using the at least two selected and output samples, a waveform sample corresponding to the phase information is generated. Is also good.
Still further, in the playback device having the long stream playback function, the phase information generating means accumulates desired pitch information at predetermined intervals instead of a speed corresponding to the desired playback pitch, thereby forming a loop. Along with generating phase information that sequentially increases to the loop end position via the start position, and when it is detected that the loop end position has been reached based on the loop end position information generated from the loop position information generating means, The phase information may be looped back to the loop start position to generate phase information that sequentially increases again.
Still further, in the playback device having the long stream playback function, the waveform sample storage means stores n (n is an integer of 2 or more) compressed waveform samples per address, and the read control means Operating the waveform sample storage means once or not at all for each of the predetermined periods, wherein at least n expanded waveform samples are stored in the temporary storage means. Is also good.
Furthermore, in the playback device having the long stream playback function, the compressed waveform sample may be differentially coded or adaptively differential coded.
[0012]
According to the present invention, a reproduction apparatus capable of reproducing a musical tone repeatedly reads out a part of a musical tone waveform sample stored in a waveform sample storage means provided in a conventional apparatus, thereby generating a continuous tone. Using the playback function, a long stream can be played back. In this case, the higher-level device that supplies the long stream from the outside may collectively supply the waveform samples of the long stream to the playback device, and does not need to supply the waveform samples one by one in synchronization with the playback speed. Therefore, the burden on the host device can be reduced.
Further, even if the waveform sample of the long stream is a compressed waveform sample that has been compression-encoded, the playback device uses a decoder provided when reproducing the compressed-encoded compressed waveform sample to perform long-stream compression. Since the waveform sample can be decoded, the number of decoders dedicated to long stream reproduction can be reduced.
[0013]
BEST MODE FOR CARRYING OUT THE INVENTION
Before describing a playback apparatus having a long stream playback function according to the present invention, a general encoder and decoder of adaptive differential PCM (ADPCM), which is a type of compression encoding employed in the present invention, will be described with reference to FIGS. This will be briefly described with reference to FIG.
FIG. 1 is a block circuit diagram showing a general configuration of the ADPCM encoder. In FIG. 1, the n-th PCM data S (n) converted to PCM with 16 bits per sample is input to a subtractor 101, and a difference from the prediction signal S ′ (n−1) is calculated. The difference data d (n) output from the subtracter 101 is quantized by the quantization width Δ (n−1) output from the quantization width calculation unit 103 in the encoding unit 102 and compression-coded into 4 bits. Is done.
[0014]
The 4-bit ADPCM data D (n) that has been compression-coded is output from the encoder and supplied to the quantization width calculation unit 103 and the prediction unit 105. In the quantization width calculation unit 103, the quantization width Δ (n−1) signal generated by the previous calculation in the quantization width calculation unit 103 and the data of the ADPCM data D (n) excluding the sign bit are output. Is multiplied by a function corresponding to the data value of, and a new quantization width Δ (n) signal is generated. That is, the ADPCM data D (n) is converted to L4 (n), L3 (n), L2 (n), L1 ( n ), Since L4 (n) is a sign bit, the quantization width calculation unit 103 performs the following calculation.
Δ (n) = f {L3 (n), L2 (n), L1 (n)} * Δ (n-1) (1)
The quantization width Δ (n) signal generated by the quantization width calculation unit 103 is delayed by one sampling timing by the delay circuit 104, and the quantization width Δ (n) when the next input sample S (n + 1) is compression-encoded. n) is supplied to the encoding unit 102.
[0015]
Further, the prediction unit 105 calculates the ADPCM data D (n), the quantization width Δ (n−1) signal generated by the previous quantization width calculation unit 103, and the prediction signal generated by the previous calculation by the prediction unit 105. S ′ (n−1) is calculated to generate a new predicted signal S ′ (n). An arithmetic expression for generating the prediction signal S ′ (n) is shown below.
Figure 0003567768
The prediction signal S ′ (n) generated by the prediction unit 105 is delayed by one sampling timing by the delay circuit 106, and is used as a prediction signal when the next input sample S (n + 1) is compression-coded. Subtractor 101 Supplied to
By being encoded in this manner, the 16-bit PCM sample is compressed into a 4-bit ADPCM sample.
[0016]
FIG. 2 is a block circuit diagram showing a general configuration of the ADPCM decoder. In FIG. 2, an n-th ADPCM sample D (n) that has been ADPCM-formed so as to have 4 bits per sample is input to the decoding unit 201, and a quantization width Δ (n−1) signal and a prediction signal S ′ (n) -1) and decompressed to return to the original 16-bit PCM sample. The expanded 16-bit PCM sample S ′ (n) is delayed by one sampling timing by the delay circuit 202 and supplied to the decoding unit 201 as a prediction signal when the next ADPCM sample D (n + 1) is expanded.
[0017]
Further, the input n-th ADPCM sample D (n) is supplied to the quantization width calculator 203, and the quantization width Δ (n−1) signal generated by the previous calculation by the quantization width calculator 203 is generated. Is multiplied by a function corresponding to the data value of the ADPCM data D (n) excluding the sign bit, to generate a new quantization width Δ (n) signal. That is, the quantization width calculation unit 203 also performs the calculation of the above equation (1). The quantization width Δ (n) signal generated by the quantization width calculation unit 203 is delayed by one sampling timing by the delay circuit 204, and the quantization width Δ (n) when the next ADPCM sample D (n + 1) is expanded. The signal is supplied to the decoding unit 201 as a signal.
By decoding in this way, the 4-bit ADPCM sample is expanded and decoded into a 16-bit PCM sample. As described above, in the ADPCM decoder, since it is necessary to decode the immediately preceding decoded sample as a prediction value, it is necessary to decode the ADPCM samples one by one to obtain the original correct PCM sample. Can not.
[0018]
The principle configuration of the ADPCM decoder provided in the playback device having the long stream playback function of the present invention is as shown in the decoder shown in FIG. 2 above. FIG. 3A is a circuit block diagram showing the entire configuration of the embodiment.
Although the detailed configuration of each unit in FIG. 3A will be described later, in FIG. 3A, reference numeral 1 denotes a phase information generator (Phase Generator or Pitch Generator: PG), and a frequency shifted by octave information (OCT). The information (FN) is accumulated every fixed sampling period fs, and an integer part INT of the accumulated value and its decimal part data FRA are output. However, since the reproducing apparatus having the long stream reproducing function of the present invention shown in FIG. 3 is capable of simultaneously generating 64 channels, a period of 64 fs (1/64 fs) which is 64 times the sampling frequency fs is exactly used. ) Is performed for each channel. The accumulated value is reset when a new key-on signal KONP is generated.
[0019]
Reference numeral 2 denotes an address pointer (ADP), which generates a memory address (MA) for accessing a random access memory (RAM) 6 and a memory access timing (MAT) indicating a timing for accessing the RAM 6 to control the memory controller 5 are doing. Note that the ADPCM musical tone waveform sample stored in the RAM 6 can store the ADPCM musical tone waveform sample from the beginning to the end in the case of a sound of a relatively short time such as a percussion instrument sound. In this case, all of the ADPCM tone waveform samples from the beginning to the end cannot be stored because the allocated memory capacity is limited. Therefore, a loop reproduction for repeatedly reading and reproducing a part of the ADPCM musical tone waveform sample stored in the RAM 6 is used.
[0020]
The address of the memory space where the first ADPCM tone waveform sample of each instrument sound stored in the RAM 6 is stored is the start address SA, and the first ADPCM tone waveform sample of the loop at the time of loop reproduction is stored. The address of the memory space that is present is the loop start address (LSA), and the address of the memory space where the last ADPCM tone waveform sample of the loop is stored is the loop end address (LEA). The ADP 2 generates a memory address MA to be accessed and a memory access timing MAT based on these addresses. Note that the start address SA is a memory address represented by an absolute value, and the loop start address LSA and the loop end address LEA are relative addresses from the start address SA. Note that once the RAM 6 is accessed, 16 bits can be read, and since one ADPCM tone waveform sample is, for example, 4 bits, four ADPCM tone waveform samples can be read simultaneously. In other words, four ADPCM tone waveform samples correspond to one memory address in the RAM 6.
[0021]
The CPU (Central Processing Unit) 3 plays a role of a higher-level device that controls the playback device having the long stream playback function of the present invention. The ADPCM musical tone waveform sample is read from the CD-ROM included in the memory controller 5 via the memory controller 5 and transferred to the RAM 6. Further, the CPU 3 also functions as a waveform sample supply unit when performing long stream reproduction. The ADPCM decoder 7 sequentially decodes the read ADPCM tone waveform samples so as to expand them into original 16-bit PCM tone waveform samples. Then, two adjacent PCM tone waveform samples S necessary to obtain an interpolated tone waveform sample corresponding to the fractional part data FRA of the phase information. 0 , S 1 Is selected and output from the ADPCM decoder 7. Adjacent PCM tone waveform sample S 0 , S 1 Are selected by two types of selection control signals DS0-3 and SDEC1-3, 5-7 generated by the ADP2, and are output from the ADPCM decoder 7. Two PCM tone waveform samples S output from ADPCM decoder 7 0 , S 1 Is supplied to an interpolator (Interpolator) 8 to generate an interpolated sample corresponding to the decimal part data FRA, and is supplied as a musical sound waveform sample S to the accumulator ACC9.
[0022]
In the accumulator ACC9, as shown in FIG. 3B, for example, musical tone waveform samples for 64 channels CH0 to CH63 supplied at intervals of 1/64 fs are accumulated, and a DAC (not shown) is sampled at each sampling interval fs. Digital-analog converter). The tone waveform signal converted into an analog signal by the DAC is emitted from the sound system as a tone signal.
In the configuration shown in FIG. 3A, a peripheral device 4 including a CD-ROM drive is provided. At the time of initialization, ADPCM tone waveform samples to be stored in the RAM 6 are read from the CD-ROM, and read from the RAM 6. Is stored in In the case of the long stream reproduction described later, the divided long stream data is sequentially read from the CD-ROM and stored in a predetermined storage area of the RAM 6.
[0023]
Here, the ADPCM musical tone waveform sample stored in the RAM 6 will be described with reference to FIG. FIG. 4 (a) shows a musical sound waveform, and S (0), S (1),... S (A) in the waveform are PCM samples of the musical sound waveform, each of which is encoded into 16 bits. 8 shows a musical sound waveform sample. However, numerical values in parentheses are shown in hexadecimal. The PCM musical tone waveform samples S (0), S (1),... S (A) are converted into 4-bit ADPCM musical tone waveform samples D (0), D (1), by an ADPCM encoder as shown in FIG. .., D (A) is compression-coded and recorded on a CD-ROM, read from the CD-ROM, and stored in the RAM 6. Here, it is assumed that the ADPCM tone waveform samples D (0), D (1),... D (A) are written into the RAM 6 from the memory address 100.
[0024]
In this case, since the number of bits corresponding to one memory address is 16 bits, the ADPCM tone waveform samples D (0) and D (1) are stored at the memory address 100 as shown in FIG. , D (2) and D (3) are written. Further, the following four samples of the ADPCM tone waveform samples D (4), D (5), D (6) and D (7) are written at the next memory address 101, and remain at the next memory address 102. ADPCM tone waveform samples D (8), D (9) and D (A) are written.
Therefore, the start address SA of the PCM musical tone waveform samples S (0), S (1),... S (A) shown in FIG. Further, in the case of loop reproduction, it is preferable that the sample value at the loop start and the sample value at the loop end are approximately equal, so for example, the sample at the loop start is S (5), S (A). The loop start address LSA is a relative value from the start address SA at address 5, and the loop end address LEA is also an address A. This address is also expressed in hexadecimal.
[0025]
Next, FIG. 5A shows a detailed configuration of the PG1. As shown in FIG. 5A, frequency information (FN) represented by an integer part and a decimal part is input to a shifter (Shift) 11 and shifted by octave information (OCT) input as a shift signal to the shifter 11. Is done. As is well known, each time the data is shifted to the 1-bit MSB side, the FN is doubled. The FN shifted corresponding to the OCT by the shifter 11 is supplied to a first accumulator (ACC1) 12 and a second accumulator (ACC2) 13, and the FN for each channel is set to a fixed sampling period (1/64 fs). ). The accumulated integer part is output as data INT, and the decimal part thereof is output as data FRA. Although the sampling frequency is fs, each unit is time-divisionally operated at a time-divisional operation frequency of 64 fs so that the reproducing apparatus having the long stream reproduction function of the present invention can simultaneously generate 64 channels. I have. That is, in PG1, one sampling period (1 / fs) is divided into 64 as shown in FIG. 5B, and the accumulation of the FNs of CH0, CH1,... CH63 is executed every 1 / 64fs period. .
[0026]
When a new key-on signal KONP is generated and the key-on signal KONP is supplied to ACC1 and ACC2, the accumulated value of the channel to which sound is assigned is reset.
FIG. 5 (c) shows the manner of change of the accumulated value during loop reproduction by a ramp waveform. Here, the horizontal axis is the elapsed time, and the vertical axis is the accumulated value output from ACC1 and ACC2. That is, at the timing when the key-on signal KONP is generated as shown in FIG. 5C, the accumulated value of the corresponding channel is reset to start from “0” and to the pitch of the key-on sound output from the shifter 11. The corresponding FN is accumulated every 1/64 fs cycle. As a result, the accumulated value linearly rises to the right. When the accumulated value exceeds the loop end address LEA, this is detected, and the accumulated value is returned to the loop start address LSA. In order to execute this operation, a return timing RTNT indicating a timing at which the accumulated value exceeds the loop end address LEA and a return value RTNP are supplied from ADP2 to ACC1 and ACC2. The return value RTNP is a value obtained by adding the value A exceeding the loop start address LSA, and when the return timing RTNT occurs, the accumulated value is reset to the value of LSA + A. At the time of loop reproduction, such an operation is repeatedly executed.
In addition, the integer part data INT output from the ACC 2 is monitored by the CPU 3, and is used to read sequential long stream data from a CD-ROM mounted on the peripheral device 4 when reproducing a long stream described later. Is being measured.
[0027]
Next, FIG. 6 shows a detailed configuration of the address pointer (ADP) 2. In the ADP2, "+1" is added to the supplied integer part data INT of the accumulated value in the first adder (AD1) to obtain data INT + 1. This is because the sample indicated by the data INT and the sample indicated by the data INT + 1 are interpolated by the decimal part data FRA to obtain a sample value corresponding to the accumulated value of FN. The data INT + 1 is supplied to a first selector (SEL1) and a second adder (AD2). In AD2, the data INT + 1 is subtracted from the loop end address LEA, and it is detected at the output MSB level that the data INT + 1 has exceeded the loop end address LEA. That is, when the data INT + 1 exceeds the loop end address LEA, the MSB, which is the sign bit, goes high, so that this signal is supplied to the PG1 as the return timing RTNT. Further, the value obtained by subtracting the data INT + 1 from the loop end address LEA is added to the loop start address LSA in the third adder (AD3), so that the output of AD3 is supplied to PG1 as the return value RTNP.
[0028]
The MSB output of AD2 is used as a selection signal SB for selecting the input B of SEL1, and is also inverted by the first inverter (INV1) and used as a selection signal SA for selecting the input A. Thus, in SEL1, until the data INT + 1 exceeds the loop end address LEA, the input A is selected and the data INT + 1 output from the AD1 is output. When the data INT + 1 exceeds the limit, the data INT + 1 is subtracted from the loop end address LEA output by the AD3. A value obtained by adding the loop start address LSA to the obtained value is output. The output of SEL1 is shifted to the LSB side by 2 bits by the first shifter (SH1) and multiplied by 1/4, and the 2 bits on the LSB side are input to the first decoder (DEC1). The reason why SH1 is 1/4 is that four ADPCM tone waveform samples are stored in the RAM 6 per memory address. Then, the start address SA is added to the output of SH1 by the fourth adder (AD4), and a memory address MA for accessing the RAM 6 is generated.
[0029]
The two bits on the LSB side of SEL1 are decoded in DEC1 to generate first selection control information DS0 to DS3. In this case, DS2 is generated when two bits are “00”, DS0 is generated when two bits are “01”, DS1 is generated when two bits are “10”, and two bits are “11”. DS2 is generated. Although the meaning of the first selection control information DS0 to DS3 will be described later, which one of the four PCM tone waveform samples after ADPCM decoding read and expanded by accessing the RAM 6 once is data INT + 1 Indicating whether the sample is a PCM tone waveform sample corresponding to data INT. PCM tone waveform sample data S corresponding to data INT + 1 using the first selection control information DS0 to DS3. 1 And the PCM tone waveform sample S corresponding to the data INT 0 Are sent to the interpolator 8.
[0030]
Further, the output of SEL1 is subtracted by "+1" in the fifth adder (AD5), and then reduced by 1/4 in the second shifter (SH2). Therefore, the output of SH2 is a memory address corresponding to data INT. The LSB of the output of SH1 and the LSB of the output of SH2 are applied to a first exclusive OR gate (EX-OR1), and it is detected whether both LSBs match or do not match. If they match, the L level is output from EX-OR1. Therefore, the output of the first AND gate (AND1) maintains the L level. If they do not match, the output of EX-OR1 becomes H level and one of AND1 Level, and the other of AND1 is normally at H level (L level only when SDEC5 described later is generated), and AND1 outputs H level memory access timing MAT. Become so. That is, the output of EX-OR1 becomes H level when the memory address corresponding to the data INT + 1 is incremented by 1 from the memory address corresponding to the data INT. In this case, the memory access timing MAT is output. Become so. In the specification of the configuration shown in FIG. 3, since the pitch is shifted up to two octaves, the memory address corresponding to the data INT + 1 is not incremented by 2 or more than the memory address corresponding to the data INT. Only LSB is compared.
[0031]
Further, the LSB of the output of SH2 is delayed by 64 cycles in the first delay (DL1) which is delayed by 64 cycles at the time-division operation sampling frequency of 64fs, and is applied to one of the second exclusive OR gates (EX-OR2). You. The output of DL1 is applied to the other of the EX-OR2, and the EX-OR2 detects whether or not the current memory address corresponding to the data INT has been incremented from the previous memory address in the same channel. When the value is incremented, the output of EX-OR2 becomes H level, so that H1 memory access timing MAT is output from AND1. As described above, the H level memory access timing MAT is output from AND1 only when the memory address corresponding to the required ADPCM musical tone waveform sample is incremented. The burden can be reduced. Note that the ADPCM musical tone waveform samples required when the increment is not performed have already been read and ADPCM decoded before this time, and are stored in the immediately preceding block RAM provided in the ADPCM decoder 7.
[0032]
The output of EX-OR1 and the output of EX-OR2 are input to a second decoder (DE2) and decoded, and SDEC1, SDEC2, and SDEC3 of the second selection control information are generated. In this case, if both outputs are "00", SDEC1 is generated and EX-OR 2 Is H level "01", SDEC3 is generated and EX-OR 1 Is "H" level "10", SDEC2 is generated. Note that the first gate array (GA1) is normally closed only when the return timing RTNT is generated, and at this time, the generation of the second selection control information SDEC1 to SDEC3 is suppressed. As described above, the second selection control information SDEC1 to SDEC3 is information required at a timing other than returning from the loop.
[0033]
The loop start address LSA input to ADP2 is reduced to 1/4 in the third shifter (SH3). Therefore, the output of SH3 is the memory address of the sample corresponding to address LSA. The LSB of the output of SH3 and the LSB of the output of SH2 are applied to a third exclusive OR gate (EX-OR3), and when both LSBs do not match, an H level is output. Since the second gate array (GA2) is open only at the timing when the return timing RTNT is generated, and the third gate array (GA3) is normally open, only when the return timing RTNT is generated, The output of EX-OR3 is valid. From this, when the memory address corresponding to the data INT output from the SH2 at the time of the loop return exceeds the memory address of the sample corresponding to the loop start address LSA, the EX-OR3 outputs the H level. become.
[0034]
The output of EX-OR1 and the output of EX-OR3 are input to a third decoder (DEC3) and decoded, and SDEC5, SDEC6, and SDEC7 of the second selection control information are generated. In this case, if both outputs are "00", SDEC5 is generated and EX-OR 3 Is high level "01", SDEC7 is generated and EX-OR 1 Is "H", the SDEC6 is generated. Since GA2 opens only at the timing at which the return timing RTNT is generated, and GA3 is normally open, the second selection control information SDEC5 to SDEC7 is generated only at the return timing RTNT. As described above, the second selection control information SDEC5 to SDEC7 is information necessary only at the timing of returning from the loop.
[0035]
Further, the output of SH1 and the output of SH3 are detected by the fourth gate array (GA4) and the second AND gate (AND2) as coincidence of all bits. That is, when the memory address of the sample corresponding to the data INT + 1 matches the memory address of the sample corresponding to the loop start address LSA, the H level is output. This H-level signal is generated as the return start address detection signal (LSADCT) from the open third AND gate (AND3) except when the return timing RTNT is generated. The LSADTCT signal is used to decode and temporarily store four ADPCM musical tone waveform samples read by the memory address of the sample corresponding to the loop start address LSA.
[0036]
Next, the meaning of the second selection control information SDEC1 to SDEC3 and SDEC5 to SDEC7 will be described with reference to FIG.
The case where the second selection control information SDEC1 is generated is a case where the sample corresponding to the data INT + 1 is stored in the immediately preceding block RAM as shown in FIG. The immediately preceding block RAM is provided in the ADPCM decoder 7. Four ADPCM tone waveform samples read out when the RAM 6 was accessed last time are decoded by the ADPCM decoder 7 and stored. Hereinafter, four ADPCM musical tone waveform samples and four PCM musical tone waveform samples obtained by decoding them are referred to as one block. That is, in the immediately preceding block RAM, the latest four PCM musical tone waveform samples (one sample is expanded to 16 bits) among the previously decoded ones are stored in the sub-blocks SB1 to SB4, respectively. In this case, since the sample corresponding to the data INT + 1 has already been stored in the immediately preceding block RAM, there is no need to access the RAM 6. Therefore, when SDEC1 is generated, the memory access timing MAT signal is not generated. In the illustrated example, the sample S corresponding to the data INT + 1 is sampled. 1 Are stored in SB3, and the sample S corresponding to the adjacent data INT 0 Are stored in SB2.
[0037]
When SDEC2 of the second selection control information is generated, as shown in FIG. 7B, the sample corresponding to the data INT + 1 is the sample of the first sub-block SB1 of the block to be decoded this time. Therefore, the sample of SB1 of the current decoding block is S 1 And the sample of SB4 of the immediately preceding block RAM is S 0 It is said. In this case, it is necessary to access the RAM 6 and decode the current decoding block including the sample corresponding to the data INT + 1, so that when the SDEC2 is generated, the memory access timing MAT signal is generated.
When the SDEC3 of the second selection control information is generated, as shown in FIG. 7C, the sample corresponding to the data INT + 1 is the sample of the sub-block after SB2 in the block to be decoded this time. . In the illustrated example, the sample of SB2 of the current decoding block is S 1 And the SB1 sample of the adjacent current decoding block is S 0 It is said. In this case, it is necessary to access the RAM 6 and decode the current decode block including the samples corresponding to the data INT and the data INT + 1, so that when the SDEC3 is generated, the memory access timing MAT signal is generated. You.
[0038]
When the SDEC5 of the second selection control information is generated, the loop is returned as described above, and the sample corresponding to the data INT + 1 corresponds to the loop end address LEA as shown in FIG. This is a case where the sample is a sample of a sub-block of SB2 or more of a loop end block including a sample, and a sample corresponding to the return value RTNP is a sample in the loop start block RAM. The loop start block RAM is provided in the ADPCM decoder 7 and is a memory for temporarily storing four PCM tone waveform samples read and decoded when the LSADCT signal is generated. The loop start block RAM stores at least a sample corresponding to the loop start address LSA. In the illustrated example, the sample corresponding to the loop end address LEA is set as the loop end block SB1, the sample corresponding to the data INT + 1 is set as the loop end block SB2, and the sample corresponding to the loop start address LSA is set as the loop start address. The sample corresponding to the data INT + 1 at the time of return is SB1 of the loop start block RAM. In this case, since it is not necessary to access the RAM 6 and decode the samples corresponding to the data INT and the data INT + 1, the memory access timing MAT signal is not generated when the SDEC 5 is generated.
[0039]
When the SDEC6 of the second selection control information is generated, the loop is returned, and as shown in FIG. 7E, the sample corresponding to the data INT + 1 is the sample corresponding to the loop end address LEA. This is a case where the sample exceeds the included loop end block and the sample corresponding to the return value RTNP is a sample in the current decoding block next to the block stored in the loop start block RAM. In the illustrated example, the sample corresponding to the loop end address LEA is set as SB1 of the loop end block, the sample corresponding to the data INT + 1 is set as the sample beyond the loop end block, and the sample corresponding to the loop start address LSA is set as SB1. The sample corresponding to the data INT + 1 at the time of return is set as SB1 of the loop start block RAM, and exceeds the loop start block RAM, and is set as the sample of the sub-block SB1 of the current decode block. In this case, the current decoded data block including the sample corresponding to the data INT + 1 must be obtained by accessing the RAM 6 and decoding it. Therefore, when the SDEC 6 is generated, the memory access timing MAT signal is generated. Is done.
[0040]
When the SDEC7 of the second selection control information is generated, the loop is returned, and as shown in FIG. 7F, the sample corresponding to the data INT + 1 and the sample corresponding to the data INT are the loop end. The sample corresponding to the address LEA exceeds the loop end block including the sample, and the sample corresponding to the return value RTNP is set as the sample in the current decoding block next to the block stored in the loop start block RAM. Is the case. In the illustrated example, the sample corresponding to the loop end address LEA is set to SB1 of the loop end block, the samples corresponding to the data INT + 1 and data INT are set to the samples beyond the loop end block, and the sample corresponding to the loop start address LSA. The sample to be executed is defined as SB1 of the loop start block RAM, and the sample corresponding to the data INT + 1 and INT upon return exceeds the loop start block RAM and is defined as a sample of the sub-blocks SB1 and SB2 of the current decode block. In this case, it is necessary to access and decode the currently decoded data block including the sample corresponding to the data INT + 1 and the data INT by accessing the RAM 6. Therefore, when the SDEC 7 is generated, the memory access timing MAT A signal is generated.
[0041]
Next, the meaning of the first selection control information DS0 to DS3 will be described with reference to FIG. The first selection control information DS0 to DS3 is information indicating in which sub-block of the immediately preceding block RAM (or loop start block RAM) and the current decoding block the sample corresponding to the data INT + 1 is located. The case where DS0 of the first selection control information occurs is a case where the sample corresponding to the data INT + 1 is a sample of the sub-block SB2 of the immediately preceding block RAM (or the loop start block RAM). DS0 of the first selection control information is generated together with any of SDEC1, 3, 5, and 7 of the second selection control information.
Further, when DS1 of the first selection control information is generated, the sample corresponding to the data INT + 1 is the sample of the sub-block SB3 of the immediately preceding block RAM (or the loop start block RAM). The first selection control information DS1 is also generated together with any of the second selection control information SDEC1, 3, 5, and 7.
[0042]
Further, when DS2 of the first selection control information is generated, the sample corresponding to the data INT + 1 is a sample of the sub-block SB4 of the immediately preceding block RAM (or the loop start block RAM). The first selection control information DS2 is also generated together with any of the second selection control information SDEC1, 3, 5, and 7. Note that the sample corresponding to the data INT when the first selection control information DS0 to DS2 occurs is a sample of the immediately preceding subblock of the same block.
Furthermore, the case where DS3 of the first selection control information occurs is the case where the sample corresponding to the data INT + 1 is the sample of the sub-block SB1 of the current decoding block. In this case, the sample corresponding to the data INT is included in the immediately preceding block RAM (or the loop start block RAM) and is used as a sample of the sub-block SB4. DS3 of the first selection control information is generated together with one of SDEC2 and SDEC6 of the second selection control information.
[0043]
Next, the detailed configuration of the ADPCM decoder 7 shown separately in FIGS. 10 and 11 will be described. At the time of description, the control of the immediately preceding block RAM and the loop start block RAM at the time of decoding shown in FIG. 12, a timing chart shown in FIG. 12, a chart showing a relationship between the second selection control information SDEC shown in FIG. 13 and the generated selection signal, a first selection control information DS and a second selection control information shown in FIG. This will be described with reference to a table showing the relationship between the SDEC and the generated selection signal. Note that the ADPCM decoder 7 shown in FIGS. 10 and 11 is divided into two parts, and the letters added to the lines in the figures indicate the same line.
In the ADPCM decoder 7 shown in FIGS. 10 and 11, the four ADPCM musical tone waveform samples of 16 bits in total, which are simultaneously read from the RAM 6, are supplied to four inputs A, B, C, and D of the tenth selector (SEL10) by one ADPCM. The tone waveform samples (4 bits) are input in parallel. A timing signal TIM01 shown in FIG. 12H is applied to the SEL 10 as a selection signal SA for selecting the input A, and a timing signal TIM23 shown in FIG. 12I is applied as a selection signal SB for selecting the input B. , A timing signal TIM45 shown in FIG. 12 (j) is applied as a selection signal SC for selecting the input C, and a timing signal TIM67 shown in FIG. 12 (k) is applied as a selection signal SD for selecting the input D.
[0044]
As shown in FIG. 12B, the timing signals TIM01 to TIM67 further have a period (1/64 fs) assigned to one channel shown in FIG. 12C, which is one period of the sampling frequency 64fs for time division processing, of 8 times. The divided (1 / 64fs * 1/8) period has a period corresponding to two periods shown in FIG. 12D, and is sequentially generated so as not to overlap with each other as shown in FIGS. 12H to 12K. ing. The four ADPCM tone waveform samples input to the SEL 10 in parallel by the timing signals TIM01 to TIM67 are sequentially selected from the input A to the input D, and are selectively output one by one ADPCM tone waveform sample. The output ADPCM musical tone waveform sample D (n) is sequentially input to the ADPCM decoding unit 70, and a sample X (n-1) immediately before and adjacent to the predicted value, which is a decoded value X (n-1), is quantized. Decoded based on the signal. The PCM musical tone waveform sample X (n) expanded to 16 bits by being decoded is applied to the tenth latch circuit (LA10) via the tenth OR gate (OR10) as shown in FIGS. Are latched at the respective timings of the timing signals TIM1, TIM3, TIM5 and TIM7 shown in FIG. The timing signals TIM1, TIM3, TIM5, and TIM7 correspond to the latter half cycle of the timing signals TIM01 to TIM67, respectively, and are latched at the respective timings after the decoding by the ADPCM decoding unit 70 is completed. The output of LA10 is input to input A of the twelfth selector (SEL12).
[0045]
The ADPCM tone waveform sample D (n) selected and output by the SEL 10 is also input to the quantization width calculation unit 71, and the quantization width Δ (n-1) signal selectively output from the fourteenth selector (SEL14) is output. The calculation of the above equation (1) is performed, and a new quantization width Δ (n) signal is generated and output. The generated quantization width Δ (n) signal is latched by the respective timings of the timing signals TIM1, TIM3, TIM5, and TIM7 applied to the eleventh latch circuit (LA11) via the sixteenth OR gate (OR16). . The timing signals TIM1, TIM3, TIM5, and TIM7 correspond to the latter half cycle of the timing signals TIM01 to TIM67, respectively, as described above, and are latched at the respective timings after the operation by the quantization width operation unit 71 is completed. I am trying to do it. The output of LA11 is input to input A of the fourteenth selector (SEL14).
[0046]
The operation of ADPCM decoding the sample will be further described. In the SEL12, the input A is generated by the operations of the eleventh NAND gate (NAND11), the twelfth NAND gate (NAND12), the thirteenth NAND gate (NAND13), and the thirteenth inverter (INV13). It is selected by the selection signal SA. That is, the input A is selected except for the timing at which the timing signal TIM01 is generated. The sample X (n-1) selectively output from the SEL 12 is supplied to the ADPCM decoding unit 70 as a predicted value. Further, since the selection signals SA, SB, SC applied to the SEL 14 are the same selection signals SA, SB, SC as the SEL 12, the input A of the input signal A except for the timing at which the timing signal TIM01 is generated. Selected. The selected output of the SEL 14 is supplied to the ADPCM decoding unit 70 as a quantization width Δ (n−1) signal.
[0047]
Here, assuming that the four ADPCM tone waveform samples input to the SEL 10 are D (0), D (1), D (2), and D (3), when the timing signal TIM23 is generated, the ADPCM decoding unit The second ADPCM tone waveform sample D (1) of the input B selected and output by the SEL 10 is input to 70. At the same time, the PCM musical tone waveform sample X (0) obtained by decoding the first ADPCM musical tone waveform sample D (0) decoded by the ADPCM decoding unit 70 output from the LA 10 is selectively output from the SEL 12 as a prediction value, and is output from the ADPCM decoding unit. 70. Further, the quantization width Δ (0) calculated by the quantization width calculation unit 71 output from the LA 11 is selectively output from the SEL 14 and supplied to the ADPCM decoding unit 70. Thus, the ADPCM decoding unit 70 can decode the ADPCM musical tone waveform sample D (1) using the immediately preceding decoded sample (0) and the quantization width Δ (0) signal. Since the same operation is performed when the timing signals TIM45 and TIM67 are generated, the four ADPCM tone waveform samples D (0), D (1), D (2) and D (3) are sequentially ADPCM decoded one by one. Is done.
The decoding operation of the ADPCM musical tone waveform sample D (0), which is the first sample read, will be described later.
[0048]
The PCM tone waveform sample X (n) decoded by the ADPCM decoding unit 70 is also supplied to the input A of the eleventh selector (SEL11). The selection output of the seventeenth selector (SEL17) is supplied to the input B of the SEL11, and the selection signal SA for selecting the input A is the thirteenth. Or The selection signal SB, which is generated by the operation of the gate (OR13) and the fourteenth inverter (INV14) except for the timing when the SDEC5 and SDEC6 of the second selection control information is generated, and selects the input B, is generated by the operation of the OR13. It is generated at the timing when SDEC5 and SDEC6 of the selection control information are generated. Since the second selection control information SDEC5 and SDEC6 are generated when the return timing RTNT is generated, the PCM musical tone waveform sample X (n) input to the input A is selectively output from the SEL 11 at the non-return timing. .
[0049]
The selected output of SEL11 is supplied to the immediately preceding block RAM (RAM10) and the loop start block RAM (RAM11) in parallel. The immediately preceding block RAM 10 and the loop start block RAM 11 are each divided into four sub-blocks SB1 to SB4, and each of the sub-blocks SB1 to SB4 can store samples for 64 channels. The write enable (WE) signal of the sub-block SB1 of the immediately preceding block RAM 10 is generated at the timing TIM1 when the SDEC3 of the second selection control information or the return timing RTNT signal is generated by the operation of the tenth gate array (GA10). You. The WE signal of the sub-block SB2 is generated at SDEC3 of the second selection control information or at the timing TIM3 when the return timing RTNT signal is generated, and the WE signal of the sub-block SB3 is generated at the SDEC3 of the second selection control information. Alternatively, the WE signal of the sub block SB4 is generated at the timing TIM5 when the return timing RTNT signal is generated, and the WE signal of the sub-block SB4 is generated at the timing TIM7 when the return timing RTNT signal is generated. You.
[0050]
Here, SDEC3 is generated when the sample corresponding to the data INT + 1 is a sample after the sub-block SB2 in the block to be decoded this time as shown in FIG. 7C, and when SDEC3 is generated, Thus, new access to the RAM 6 is made, and one block of ADPCM musical tone waveform samples is read. The one-block ADPCM tone waveform samples are sequentially decoded as described above, and are sequentially written to the immediately preceding block RAM 10 at the timing of the generation of the WE signal. Note that a channel selection signal SH (0 to 63) is also applied to the immediately preceding block RAM 10 and is written to the immediately preceding block RAM 10 for each channel. As described above, when the RAM 6 is accessed simultaneously with the occurrence of the SDEC 3, the contents of the immediately preceding block RAM 10 are updated by the read and decoded PCM tone waveform samples.
[0051]
When the return timing RTNT is generated, one of SDEC5 to SDEC7 is generated. When SDEC5 is generated, the sample corresponding to the data INT + 1 is looped as shown in FIG. Since the sample is more than the sub-block SB2 of the start block RAM 11, when the SDEC 5 is generated, it is necessary to transfer the contents of the loop start block RAM 11 to the immediately preceding block RAM 10 and update it. Further, when the SDEC 6 is generated, since the sample corresponding to the data INT is the sample of the sub-block SB4 of the loop start block RAM 11 as shown in FIG. It is necessary to transfer the contents of the loop start block RAM 11 to the immediately preceding block RAM 10 for updating. Therefore, the sample of the loop start block RAM 11 supplied to the input B of the SEL 11 is selectively output from the SEL 11 via the SEL 17 and supplied to the immediately preceding block RAM 10. As a result, the contents of the immediately preceding block RAM 10 are updated with the contents of the loop start block RAM 11.
[0052]
The write enable (WE) signal of the sub-block SB1 of the loop start block RAM11 to which the selected output of the SEL11 is supplied is generated by the operation of the eleventh gate array (GA11) when the loop start address detection signal LSADTCT is generated. It is generated at timing TIM1. The WE signal of the sub-block SB2 is generated at the timing TIM3 when the loop start address detection signal LSAPDTC is generated, and the WE signal of the sub-block SB3 is generated at the timing TIM5 when the loop start address detection signal LSADTCT is generated. And the WE signal of the sub-block SB4 is generated at the timing TIM7 when the loop start address detection signal LSAPDTC is generated.
[0053]
Here, LSADTCT is generated when the memory address of the sample corresponding to the data INT + 1 matches the memory address of the sample corresponding to the loop start address LSA as described above. Therefore, one block of the PCM musical tone waveform sample which is newly accessed to the RAM 6 while the LSADTCT is being generated, read out, and sequentially decoded includes a sample corresponding to the loop start address LSA. Therefore, by generating the WE signal of the loop start block RAM 11 at the above generation timing, one block of samples including the sample corresponding to the loop start address LSA is written in the loop start block RAM 11. Note that a channel selection signal SH (0 to 63) is also applied to the loop start block RAM 11, and is written into the loop start block RAM 11 for each channel. As described above, when the LSADTCT is generated, the read and decoded PCM musical tone waveform sample is written into the loop start block RAM 11.
[0054]
The four samples output from the sub-blocks SB1 to SB4 of the immediately preceding block RAM10 are supplied to the inputs A to D of the sixteenth selector (SEL16), respectively, and are output from the sub-blocks SB1 to SB4 of the loop start block RAM11. The two samples are supplied to inputs A to D of a seventeenth selector (SEL17), respectively. Further, the sub-block of the immediately preceding block RAM 10 SB4 Are supplied to the input B of the SEL12, and the samples output from the loop start block RAM11 sub-block SB4 are supplied to the input C of the SEL12. The input B of the SEL12 is selected by the selection signal SB generated when the timing signal TIM01 is generated when either SDEC2 or SDEC3 is generated. That is, as shown in FIGS. 7B and 7C, when SDEC2 or SDEC3 has occurred, it is necessary to access the RAM 6 and decode the read ADPCM tone waveform sample. At this time, during the period of the timing TIM01, the sample corresponding to the head sub-block SB1 of the current decoding block is decoded. At the time of decoding, the immediately preceding decoded sample adjacent to the sample is required as a prediction value. Since the immediately preceding sample is stored in the sub-block SB4 of the immediately preceding block RAM 10, this sample is selected by the SEL 12 and supplied to the ADPCM decoding section 70 as a sample X (n-1) of the predicted value. is there.
[0055]
The input C of the SEL 12 is selected by the selection signal SC generated when the timing signal TIM01 is generated when either SDEC6 or SDEC7 is generated. That is, as shown in FIGS. 7E and 7F, when the SDEC 6 or the SDEC 7 has occurred, the RAM 6 is accessed at the time of return to decode the read ADPCM tone waveform sample. At this time, during the period of the timing TIM01, the sample corresponding to the head sub-block SB1 of the current decoding block is decoded. At the time of decoding, the immediately preceding decoded sample adjacent to the sample is required as a prediction value. Since the immediately preceding sample is stored in the sub-block SB4 of the loop start block RAM 11, this sample is selected by the SEL 12 and supplied to the ADPCM decoding unit 70 as a sample X (n-1) of the predicted value. It is.
[0056]
Common selection signals SA, SB, SC, and SD are applied to SEL16 and SEL17 to which outputs of the immediately preceding block RAM10 and the loop start block RAM11 are supplied. The selection signal SA for selecting the input A is the timing signal TIM67, the selection signal SB for selecting the input B is the timing signal TIM45, the selection signal SC for selecting the input C is the timing signal TIM23, and the selection signal SD for selecting the input D is The timing signal is TIM01.
Then, the sample of the sub-block SB1 of the immediately preceding block RAM 10 is selectively output from the SEL 16 at the timing of the generation of the timing signal TIM01, and the sample of the sub-block SB2 of the immediately preceding block RAM 10 is selectively output at the timing of the generation of the timing signal TIM23. The sample of the sub-block SB3 of the immediately preceding block RAM 10 is selected and output at the generation timing of the previous block RAM 10, and the sample of the sub-block SB4 of the immediately preceding block RAM 10 is selectively output at the generation timing of the timing signal TIM67. It is supplied to the input B of the 18 selector (SEL18).
[0057]
The sample of the sub-block SB1 of the loop start block RAM11 is selectively output from the SEL17 at the timing of the generation of the timing signal TIM01, and the sample of the sub-block SB2 of the loop start block RAM11 is selectively output at the timing of the generation of the timing signal TIM23. At the generation timing of the signal TIM45, the sample of the sub-block SB3 of the loop start block RAM11 is selectively output, and at the generation timing of the timing signal TIM67, the sample of the sub-block SB4 of the loop start block RAM11 is selectively output. It is provided to input C. The input A of the SEL 15 is directly supplied with the decoded output of the ADPCM decoding unit 70, and the input D of the SEL 15 is supplied with the selected output of the SEL 12. Further, the decoded output of the ADPCM decoding unit 70 is directly supplied to the input A and the input D of the SEL 18.
[0058]
Common selection signals SA, SB, SC, and SD are applied to SEL15 and SEL18. The selection signal SA for selecting the input A is generated when SDEC3 or SDEC7 is generated by the operation of the seventeenth OR gate (OR17), and the selection signal SB for selecting the input B is generated when SDEC1 is generated. The selection signal SC for selecting the input C is generated when SDEC5 is generated, and the selection signal SD for selecting the input D is generated when SDEC2 or SDEC6 is generated by the operation of the eighteenth OR gate (OR18). You.
Here, when SDEC1 is generated, as shown in FIG. 0 (1) and sample S selected and output from SEL18 last time 1 (1) and sample S to be selectively output from SEL15 this time 0 (2) and sample S to be selectively output from SEL 18 this time 1 (2) is the case where all the data is stored in the immediately preceding block RAM 10. Therefore, as shown in the column of SDEC1 in FIG. 1 And the adjacent sample S corresponding to the data INT 0 The selection signal SB is generated and the input B of the SEL15 and SEL18 to which the output from the immediately preceding block RAM 10 is input is selected so that the sample from the immediately preceding block RAM 10 is selectively output.
[0059]
Further, when SDEC2 is generated, as shown in FIG. 0 (1) and sample S selected and output last time 1 (1) and sample S to be selectively output from SEL15 this time 0 (2) is stored in the immediately preceding block RAM 10 and the sample S to be selectively output from the SEL 18 this time 1 (2) is a case where the sample is the sub-block SB1 of the current decoding block. Therefore, the access to the RAM 6 is performed, and as shown in the column of SDEC2 in FIG. 1 Is selected from the current decoding block, the selection signal SD is generated, and the input D of the SEL 18 to which the current decoding block output from the ADPCM decoding unit 70 is input is selected. Further, an adjacent sample S corresponding to the data INT 0 Is selected from the sub-block SB4 of the immediately preceding block RAM 10, the selection signal SD is generated, and the input D of the SEL 15 to which the output from the sub-block SB4 of the immediately preceding block RAM 10 is input via the SEL 12 is selected.
[0060]
Furthermore, when SDEC3 is generated, as shown in FIG. 0 (1) and sample S selected and output last time 1 (1) is stored in the immediately preceding block RAM 10, and the sample S to be selectively output from the SEL 15 this time 0 (2) and sample S to be selectively output from SEL18 this time 1 (2) is a case in which the current decoding block includes this. Therefore, the access to the RAM 6 is performed, and as shown in the column of SDEC3 in FIG. 1 And the adjacent sample S corresponding to the data INT 0 Is selected from the current decoding block, the selection signal SA is generated and the input A of the SEL15 and SEL18 to which the current decoding block output from the ADPCM decoding unit 70 is input is selected.
[0061]
Furthermore, when SDEC5 is generated, the return timing RTNT signal at the time of return is generated, and the sample S selected and output last time is output as shown in FIG. 0 (1) and sample S selected and output last time 1 (1) is stored in the immediately preceding block RAM 10, and the sample S to be selectively output from the SEL 15 this time 0 (2) and sample S to be selectively output from SEL18 this time 1 (2) is a case where the data is stored in the loop start block RAM11. Therefore, as shown in the column of SDEC5 in FIG. 1 And the adjacent sample S corresponding to the data INT 0 Is selected from the loop start block RAM 11, the selection signal SC is generated, and the input C of SEL 15 and SEL 18 to which the output from the loop start block RAM 11 is input via the SEL 17 is selected.
[0062]
Further, when SDEC6 is generated, the return timing RTNT signal is generated, and the sample S selected and output last time is output as shown in FIG. 0 (1) and sample S selected and output last time 1 (1) is stored in the immediately preceding block RAM 10, and the sample S to be selectively output from the SEL 15 this time 0 (2) is stored in the loop start block RAM 11 and the sample S to be selectively output from the SEL 18 this time. 1 (2) is a case where the current block is the sub-block SB1 of the decoding block. Therefore, the access to the RAM 6 is performed, and as shown in the column of SDEC6 in FIG. 1 Is selected from the current decoding block, the selection signal SD is generated, and the input D of the SEL 18 to which the current decoding block output from the ADPCM decoding unit 70 is input is selected. Further, an adjacent sample S corresponding to the data INT 0 Is read from the sub-block SB4 of the loop start block RAM11, the input D of the SEL15 to which the output from the subblock SB4 of the loop start block RAM11 is input via the SEL12 is selected. is there.
[0063]
Furthermore, when SDEC7 is generated, the return timing RTNT signal is generated, and the sample S selected and output last time is output as shown in FIG. 0 (1) and sample S selected and output last time 1 (1) is stored in the immediately preceding block RAM 10, and the sample S to be selectively output from the SEL 15 this time 0 (2) and sample S to be selectively output from SEL18 this time 1 (2) is a case in which the current decoding block includes this. Therefore, the access to the RAM 6 is performed, and as shown in the column of SDEC7 in FIG. 1 And the adjacent sample S corresponding to the data INT 0 Is selected from the current decoding block, the selection signal SA is generated and the input A of the SEL15 and SEL18 to which the current decoding block output from the ADPCM decoding unit 70 is input is selected.
When SDEC5 and SDEC6 occur, the contents of the loop start block RAM 11 are transferred to the immediately preceding block RAM 10 and the contents are updated. For this reason, the selected output of the SEL 17 to which the output of the loop start block RAM 11 is supplied is supplied to the input B of the SEL 11, and when SDEC 5 and SDEC 6 occur, the SEL 11 selects the input B and outputs the signal from the loop start block RAM 11. The sample is supplied to the immediately preceding block RAM 10.
[0064]
As described above, the sample S corresponding to the data INT + 1 is output from the SEL 18. 1 Is selected and output from SEL15. The adjacent sample S corresponding to the data INT is output from SEL15. 0 Are selected and output, but unnecessary samples are output from SEL15 and SEL18 depending on the timing. Therefore, a twelfth latch circuit (LA12) is provided at the subsequent stage of the SEL15, and a fourteenth latch (LA14) is provided at the subsequent stage of the SEL18 so as to output only necessary samples.
The operation of LA12 and LA14 will be described with reference to FIGS. 13, 14, and 15 mainly by a combination of first selection control information DS0 to DS3 and second selection control information SDEC1 to SDEC3, SDEC5 to SDEC7.
[0065]
When both SDEC1 and DS0 are generated, the previous decode block shown in FIG. 15C output from the immediately preceding block RAM 10 supplied to the input B from SEL15 and SEL18 is the timing shown in FIG. Are sequentially selected and output. At this time, as shown in <SDEC1> of FIG. 14, the timing signal TIM1 is latched in the LA12 by the operation of the sixteenth inverter (INV16), the twelfth gate array (GA12), and the thirteenth gate array (GA13). The timing signal TIM3 is applied as a latch signal to the LA 14 by the operation of the fourteenth gate array (GA14). Therefore, the sample S (−4) of the first sub-block of the previous decoding block is latched in the LA 12, and the sample S (−3) is latched in the LA 14. That is, since DS0 is generated, as shown in FIG. 8A, the sample of the sub-block SB1 of the immediately preceding block RAM 10 is changed to the sample S. 0 And the sample of the adjacent sub-block SB2 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output in synchronization with the thirteenth latch (LA13) and the fifteenth latch (LA15) latched at the timing TIM7 so as to be output in synchronism.
[0066]
When both SDEC1 and DS1 are generated, the previous decoding block shown in FIG. 15C is similarly sequentially output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC1> of FIG. 14, the timing signal TIM3 is applied as a latch signal to the LA12 by the action of the GA13, and the timing signal TIM5 is applied as a latch signal to the LA14 by the action of the GA14. . Therefore, the sample S (−3) of the previous decoded block is latched in the LA 12, and the sample S (−2) is latched in the LA 14. That is, since DS1 is generated, as shown in FIG. 8B, the sample of the sub-block SB2 of the immediately preceding block RAM 10 is the sample S2. 0 And the sample of the adjacent sub-block SB3 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0067]
When both SDEC1 and DS2 are generated, the previous decoding block shown in FIG. 15C is similarly sequentially output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC1> in FIG. 14, the timing signal TIM5 is applied as a latch signal to the LA12 by the action of the GA13, and the timing signal TIM7 is applied as a latch signal to the LA14 by the action of the GA14. . Therefore, the sample S (−2) of the previous decoded block is latched in the LA 12, and the sample S (−1) is latched in the LA 14. That is, since DS2 has been generated, as shown in FIGS. 8C and 9A, the sample of the sub-block SB3 of the immediately preceding block RAM 10 is the sample S3. 0 And the sample of the adjacent sub-block SB4 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0068]
There is no case where SDEC1 and DS3 are generated together, and DS3 is generated together with SDEC2. In this case, the one-sample-delayed current decoding block output from the SEL 12 shown in FIG. 15B and supplied to the input D from the SEL 15 is sequentially selected and output at the timing shown in FIG. After that, the current decoding block shown in FIG. 15A supplied to the input D is sequentially selected and output at the timing shown in FIG. In this case, as shown in <SDEC2> in FIG. 14, the timing signal TIM1 is applied to LA12 as a latch signal by the action of OR18, GA12, and GA13, and the timing signal TIM1 is latched to LA14 by the action of GA14. Applied as a signal. Therefore, the sample S (0) of the first sub-block of the current decoding block is latched in the LA 14, and the sample S (*) immediately before the sample S (0) adjacent to the sample S (0) is latched in the LA 12. Since SDEC2 does not occur at the time of return, S (*) is the last last decoded sample. That is, since DS3 is generated, as shown in FIGS. 8D and 9B, the sample of the sub-block SB1 of the current decode block is the sample S3. 1 The sample of the sub-block SB4 of the immediately preceding decode block (the immediately preceding block RAM 10) is the sample S 0 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output via LA13 and LA15 which are latched at timing TIM7 so as to be output in synchronization with.
[0069]
Next, when both SDEC3 and DS0 are generated, the current decoding block shown in FIG. 15A output from the ADPCM decoding unit 70 supplied to the input A from the SEL15 and SEL18 is the current decoding block shown in FIG. Are sequentially output at the timing shown in FIG. At this time, as shown in <SDEC3> in FIG. 14, the timing signal TIM1 is applied to LA12 as a latch signal by the action of INV16, GA12 and GA13, and the timing signal TIM3 is latched to LA14 by the action of GA14. Applied as a signal. Therefore, the sample S (0) of the head sub-block of the current decoding block is latched in the LA12, and the sample S (1) adjacent to the LA14 is latched. That is, since DS0 is generated, as shown in FIGS. 8A and 9C, the sample of the sub-block SB1 of the current decoding block is the sample S1. 0 And the sample of the adjacent sub-block SB2 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output via LA13 and LA15 which are latched at timing TIM7 so as to be output in synchronization with.
[0070]
When both SDEC3 and DS1 are generated, similarly, the current decoding block shown in FIG. 15A is sequentially selected and output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC3> in FIG. 14, the timing signal TIM3 is applied as a latch signal to the LA12 by the action of the GA13, and the timing signal TIM5 is applied as a latch signal to the LA14 by the action of the GA14. . Therefore, the sample S (1) of the current decode block is latched in the LA12, and the sample S (2) is latched in the LA14. That is, since DS1 has been generated, as shown in FIG. 8B, the sample of the sub-block SB2 of the current decode block is the sample S2. 0 And the sample of the adjacent sub-block SB3 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0071]
When both SDEC3 and DS2 are generated, the previous decoding block shown in FIG. 15A is similarly sequentially output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC3> in FIG. 14, the timing signal TIM5 is applied as a latch signal to the LA12 by the action of the GA13, and the timing signal TIM7 is applied as a latch signal to the LA14 by the action of the GA14. . Accordingly, the sample S (2) of the current decode block is latched in the LA12, and the sample S (3) is latched in the LA14. That is, since DS2 has been generated, as shown in FIG. 8C, the sample of the sub-block SB3 of the current decoding block is the sample S3. 0 And the sample of the adjacent sub-block SB4 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0072]
Next, when both SDEC5 and DS0 are generated, the loop start block shown in FIG. 15D output from the loop start block RAM 11 supplied to the input C from SEL15 and SEL18 is shown in FIG. Are sequentially output at the timing shown in FIG. At this time, as shown in <SDEC5> in FIG. 14, the timing signal TIM1 is applied to LA12 as a latch signal by the action of INV16, GA12 and GA13, and the timing signal TIM3 is latched to LA14 by the action of GA14. Applied as a signal. Therefore, the sample S (-4L) of the head sub-block of the loop start block is latched in the LA12, and the sample S (1-4L) adjacent to the LA14 is latched. That is, since DS0 is generated, the sample of the sub-block SB1 of the loop start block RAM11 is changed to the sample S as shown in FIG. 0 And the sample of the adjacent sub-block SB2 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output via LA13 and LA15 which are latched at timing TIM7 so as to be output in synchronization with.
[0073]
When both SDEC5 and DS1 are generated, similarly, the current decode block shown in FIG. 15D is sequentially selected and output from SEL15 and SEL18 at the timing shown in FIG. In this case, as shown in <SDEC5> of FIG. 14, the timing signal TIM3 is applied to the LA12 as a latch signal by the action of the GA13, and the timing signal TIM5 is applied as a latch signal to the LA14 by the action of the GA14. . Therefore, the sample S (1-4L) of the loop start block is latched in LA12, and the sample S (2-4L) is latched in LA14. That is, since DS1 is generated, the sample of the sub-block SB2 of the loop start block RAM11 is changed to the sample S as shown in FIGS. 8B and 9D. 0 And the sample of the adjacent sub-block SB3 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0074]
When both SDEC5 and DS2 are generated, the loop start block shown in FIG. 15D is sequentially selected and output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC5> of FIG. 14, the timing signal TIM5 is applied as a latch signal to the LA12 by the action of the GA13, and the timing signal TIM7 is applied as a latch signal to the LA14 by the action of the GA14. . Therefore, the sample S (2-4L) of the loop start block is latched in LA12, and the sample S (3-4L) is latched in LA14. That is, since DS2 is generated, the sample of the sub-block SB3 of the loop start block RAM 11 is changed to the sample S as shown in FIG. 0 And the sample of the adjacent sub-block SB4 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0075]
There is no case where SDEC5 and DS3 are generated together, and DS3 is generated together with SDEC6. In this case, the one-sample-delayed current decoding block output from the SEL 12 shown in FIG. 15B and supplied to the input D from the SEL 15 is sequentially selected and output at the timing shown in FIG. After that, the current decoding block shown in FIG. 15A supplied to the input D is sequentially selected and output at the timing shown in FIG. In this case, as shown in <SDEC6> in FIG. 14, the timing signal TIM1 is applied to LA12 as a latch signal by the action of OR18, GA12, and GA13, and the timing signal TIM1 is latched to LA14 by the action of GA14. Applied as a signal. Therefore, the sample S (0) of the first sub-block of the current decoding block is latched in the LA 14, and the sample S (*) immediately before the sample S (0) adjacent to the sample S (0) is latched in the LA 12. Since SDEC6 occurs at the time of return, S (*) is the last decoded sample of the loop start block. That is, since DS3 has been generated, as shown in FIGS. 8D and 9E, the sample of the sub-block SB1 of the current decode block is the sample S3. 1 The sample of the sub-block SB4 of the loop start block (loop start block RAM11) is the sample S 0 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output via LA13 and LA15 which are latched at timing TIM7 so as to be output in synchronization with.
[0076]
Next, when both SDEC7 and DS0 are generated, the current decoding block shown in FIG. 15A output from the ADPCM decoding unit 70 supplied to the input A from SEL15 and SEL18 is the current decoding block shown in FIG. Are sequentially output at the timing shown in FIG. At this time, as shown in <SDEC7> of FIG. 14, the timing signal TIM1 is applied to LA12 as a latch signal by the action of INV16, GA12 and GA13, and the timing signal TIM3 is latched to LA14 by the action of GA14. Applied as a signal. Therefore, the sample S (0) of the head sub-block of the current decoding block is latched in the LA12, and the sample S (1) adjacent to the LA14 is latched. That is, since DS0 is generated, as shown in FIGS. 8A and 9F, the sample of the sub-block SB1 of the current decode block is the sample S. 0 And the sample of the adjacent sub-block SB2 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Are output via LA13 and LA15 which are latched at timing TIM7 so as to be output in synchronization with.
[0077]
When both SDEC7 and DS1 are generated, similarly, the current decoding block shown in FIG. 15A is sequentially selected and output from SEL15 and SEL18 at the timing shown in FIG. At this time, as shown in <SDEC7> of FIG. 14, the timing signal TIM3 is applied as a latch signal to the LA 12 by the action of the GA 13 and the timing signal TIM5 is applied as a latch signal to the LA 14 by the action of the GA 14. . Therefore, the sample S (1) of the current decode block is latched in the LA12, and the sample S (2) is latched in the LA14. That is, since DS1 has been generated, as shown in FIG. 8B, the sample of the sub-block SB2 of the current decode block is the sample S2. 0 And the sample of the adjacent sub-block SB3 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0078]
When both SDEC7 and DS2 are generated, SEL15 and SEL18 similarly sequentially select and output the previous decoding block shown in FIG. 15A at the timing shown in FIG. At this time, as shown in <SDEC7> in FIG. 14, the timing signal TIM5 is applied to the LA12 as a latch signal by the action of the GA13, and the timing signal TIM7 is applied as a latch signal to the LA14 by the action of the GA14. . Accordingly, the sample S (2) of the current decode block is latched in the LA12, and the sample S (3) is latched in the LA14. That is, since DS2 has been generated, as shown in FIG. 8C, the sample of the sub-block SB3 of the current decoding block is the sample S3. 0 And the sample of the adjacent sub-block SB4 is the sample S 1 It will be. Sample S latched by LA12 and LA14 0 And sample S 1 Is output from LA13 and LA15 at timing TIM7.
[0079]
In this manner, the sample S selected and output based on the first selection control information DS0 to DS3 and the second selection control information SDEC1 to SDEC3, 5, 7 0 And sample S 1 Is supplied to the interpolator 8 to generate an interpolation sample corresponding to the fractional part data FRA of the phase information, and to supply it as the musical sound waveform sample S to the accumulator ACC9.
[0080]
Here, returning to FIGS. 10 and 11, the configuration for supplying the quantization width Δ (n-1) signal to the ADPCM decoding unit 70 in the configuration of the ADPCM decoder 7 will be described.
As described above, the ADPCM tone waveform sample D (n) selected and output by the SEL 10 is also input to the quantization width calculator 71, and the quantization width Δ (n-1) signal selected and output from the SEL 14 and the above ( The operation of the expression 1) is performed, and a new quantization width Δ (n) signal is generated and output. The generated quantization width Δ (n) signal is latched by the respective timings of the timing signals TIM1, TIM3, TIM5, and TIM7 applied to the LA 11 via the OR 16. Further, it is supplied to the input A of the thirteenth selector (SEL13). The input A is selected when SDEC5 or SDEC6 is not generated, and the selected output of the SEL 13 is supplied to the immediately preceding quantization width RAM 12 and the loop start quantization width RAM 13 in parallel.
[0081]
What is written to the immediately preceding quantization width RAM 12 is the timing TIM7 when the return timing RTNT signal or SDEC3 is generated. That is, when the contents of the immediately preceding block RAM 10 are updated, the quantization width Δ calculated using the final sample is written to the immediately preceding quantization width RAM 12. The output of the immediately preceding quantization width RAM 12 is selectively output from the SEL 14 at the timing TIM01 when SDEC2 or SDEC3 is generated, and is supplied to the ADPCM decoding unit 70 as a quantization width Δ (n−1) signal. At this time, the sample of the sub-block SB4 of the immediately preceding block RAM 10 is selectively output from the SEL 12 and supplied to the ADPCM decoding unit 70 as the sample X (n-1).
[0082]
What is written to the loop start quantization width RAM 13 is the timing TIM7 when the loop start block start address detection signal LSDTCT is generated. That is, when the contents of the loop start block RAM 11 are updated, the quantization width Δ signal calculated using the last sample of the loop start block is written to the loop start quantization width RAM 13. The output of the loop start quantization width RAM 13 is selectively output from the SEL 14 at the timing TIM01 when SDEC6 or SDEC7 is generated, and is supplied to the ADPCM decoding unit 70 as a quantization width Δ (n−1) signal. At this time, a sample of the sub-block SB4 of the loop start block RAM 11 is selectively output from the SEL 12 and supplied to the ADPCM decoding unit 70 as a sample X (n-1).
The output of the loop start quantization width RAM 13 is also supplied to the input B of the SEL 13. When the SDEC 5 or SDEC 6 occurs together with the return timing RTNT signal, the output of the loop start quantization width RAM 13 selectively output from the SEL 13 is output. The output is transferred to the immediately preceding quantization width RAM 12, and the contents of the immediately preceding quantization width RAM 12 are updated. This operation is performed simultaneously with the case where the contents of the immediately preceding block RAM 10 are updated with the contents of the loop start block RAM 11. As a result, the required quantization width Δ (n−1) signal can always be supplied to the ADPCM decoding unit 70.
[0083]
In the above-described playback apparatus having the long stream playback function of the present invention, a tone or the like is generated by performing loop playback for repeatedly playing back waveform samples as shown in FIG. Such a mode of loop reproduction is referred to as a normal loop mode. The playback device having the long stream playback function of the present invention can play back not only a normal loop mode but also a long stream by applying the loop playback function. This playback mode is referred to as a long stream mode.
Therefore, reproduction in the long stream mode in the reproduction apparatus having the long stream reproduction function of the present invention will be described next with reference to FIG. The reproduction in the long stream mode is performed using at least one of the 64 channels.
[0084]
FIG. 16 is a diagram for explaining an outline of performing playback in the long stream mode in the configuration of the playback apparatus having the long stream playback function of the present invention shown in FIG. In the long stream mode, a long stream such as BGM recorded on a CD-ROM mounted on the peripheral device 4 is reproduced. In the long stream mode, the illustrated long stream portion 1 having a size corresponding to the storage capacity of the area composed of the areas A and B of the same size prepared in the RAM 6 is first read and stored. . In this storage operation, the CPU 3 controls the memory controller 5 to store the ADPCM musical tone waveform sample of the long stream portion 1 read from the CD-ROM in the area A and the area B of the RAM 6. The area A and the area B have the same storage capacity, and in this example, have a storage capacity of three blocks (12 ADPCM musical tone waveform samples). In the long stream mode, the start address SA corresponding to the first sample of the area A and the loop start address LSA are made equal, and the address corresponding to the first sample of the last block of the area B is set as the loop end address. LEA.
[0085]
Next, the memory controller 5 reads the ADPCM tone waveform sample from the beginning of the area A of the RAM 6 and supplies it to the ADPCM decoder 7, where the ADPCM decoding is performed as described above and the PCM tone waveform sample S is read. 0 , S 1 Is output. PCM tone waveform sample sample S 0 , S 1 Is supplied to the interpolator 8 to generate an interpolation sample corresponding to the fractional part data FRA of the phase information, and to supply it to the accumulator ACC 9 as the musical sound waveform sample S.
Here, when it is detected that the data INT has become equal to or more than (LEA-LSA) / 2, that is, that the last ADPCM musical tone waveform sample in the area A has been read out, the CPU 3 executes CD-CD. The last block (the last block of the area B) read last time and the long stream portion 2A of three blocks of the next two blocks are read from the ROM and stored in the area A of the RAM 6. The above detection is performed by the CPU 3 monitoring the contents of the register 10 in which the integer part data INT of the phase information output from the PG 1 is stored. Then, the long stream ADPCM tone waveform samples stored in the area B are sequentially read out one by one, and the reproduction is continued.
[0086]
Further, when the reproduction proceeds and the CPU 3 detects that the data INT has become equal to or greater than the loop end address LEA, the CPU 3 deletes the long stream portion 2B for the next three blocks from the last block previously read from the CD-ROM. The data is read out and stored in the area B of the RAM 6. In this case, return timing RTNT and return value RTNP generated when the loop end address LEA is exceeded from ADPCM decoding section 70 are supplied to PG1, and the phase information output from PG1 corresponds to return value RTNP. Value. At this time, the phase information output from the PG 1 corresponds to the head block address of the area A, and the subsequent reproduction is performed by reading out the ADPCM tone waveform sample of the next long stream portion 2A stored in the area A. Will be continued.
In this way, when the data INT becomes (LEA-LSA) / 2 or more, the area A is updated so that the last block already read is overlapped, and the data INT becomes more than the loop end address LEA. By repeating the loop reproduction while updating the area B, the area A and the area B of the RAM 6 are alternately updated with ADPCM tone waveform samples of a new long stream portion for each predetermined amount. . This makes it possible to reproduce a long stream composed of a large number of samples that cannot be stored in the RAM 6 such as BGM.
[0087]
Next, an outline of the operation of the ADPCM decoder 7 when the first selection control information DS0 to DS3 and the second selection control information SDEC1 to SDEC3 generated in the long stream mode will be described with reference to FIG. In the long stream mode, SDEC5 to SDEC7 are not generated by the action of GA3, as is apparent from FIG.
The operations (a) to (c) shown in FIG. 17 are the same as the operations (a) to (c) shown in FIG. The operation shown in FIG. 17D is an operation at the time of return when the data INT + 1 exceeds the loop end address LEA. When the return timing RTNT occurs in FIG. 17D, SDEC3 and DS0 are The operation when both are generated is shown.
[0088]
In this case, sample S selected and output last time 0 (1) and sample S selected and output last time 1 (1) is stored in the immediately preceding block RAM 10, and the sample S to be selectively output from the SEL 15 this time 0 (2) and sample S to be selectively output from SEL18 this time 1 (2) is a case where the samples of the sub-block SB1 and the sub-block SB2 of the next block are used. The address corresponding to the sample of the sub-block SB1 is the loop end address LEA. Therefore, it is only necessary to access the RAM 6 and read the last block of the area B. At this time, since the return timing RTNT has been generated, the memory address MA generated at this time is set to the loop start address LSA. The memory address indicates the first block of the corresponding area A. That is, at the time of return, it is necessary to read out successive ADPCM musical tone waveform samples with the same contents of the last block of area B and the first block of area A. Therefore, when the area A is updated as shown in FIG. 16, the last block of the area B is written in the area A redundantly as the first block. In this way, the first block of the area A of the RAM 6 is read and decoded as the current decode block.
[0089]
The operation shown in FIG. 17E shows the operation at the time of return when the data INT + 1 exceeds the loop end address LEA when performing long stream reproduction with the pitch increased. In this case, sample S selected and output last time 0 (1) is stored in the immediately preceding block RAM 10 and the sample S selected and output last time is 1 (1) is a sample S of the sub-block SB1 of the next block, which is stored in the immediately preceding block RAM 10 and is selectively output from the SEL 15 this time. 0 (2) is the sample of the sub-block SB4 of the next block, and the sample S to be selectively output from the SEL 18 this time. 1 (2) is a case where a sample of the sub-block SB1 of the next block is used. Sample S of next sub-block SB1 1 The address corresponding to (1) is the loop end address LEA. In this case as well, the first block of the area A corresponding to the loop start address LSA is accessed as described above. At this time, the next block can be read and decoded, but the next block cannot be accessed due to hardware limitations. Therefore, since pitch up as shown in FIG. 17E cannot be accompanied, reproduction of such pitch up is limited.
[0090]
In the above-described playback apparatus having the long stream playback function of the present invention, it has been described that a tone is generated. However, the present invention is not limited to the tone, and may be a sound effect in a game. In the above description, the pitch asynchronous type is described. However, the pitch asynchronous type is not always used, and the reproducing apparatus having the long stream reproducing function of the present invention may be the pitch synchronous type as needed.
Furthermore, in the playback device having the long stream playback function of the present invention described above, it is possible to simultaneously generate 64 sounds. However, the present invention is not limited to this number of sounds. It may be possible to simultaneously produce 32 sounds. Further, the pitch is raised within one octave. However, if hardware is configured so that two or more blocks can be read, the pitch can be raised by two octaves or more.
Furthermore, although the ADPCM method for adaptively controlling the quantization width is adopted as a method for compressing the waveform samples, the present invention is not limited to this method, and the waveform samples may be compressed by the differential PCM (DPCM) method.
[0091]
【The invention's effect】
As described above, according to the present invention, a reproducing apparatus capable of reproducing a musical tone repeatedly reads out a part of a musical tone waveform sample stored in a waveform sample storage means provided in a conventional apparatus, thereby producing a loop reproduction for generating a continuous tone. By using the function, a long stream can be reproduced. In this case, the higher-level device that supplies the long stream from the outside may collectively supply the waveform samples of the long stream to the playback device, and does not need to supply the waveform samples one by one in synchronization with the playback speed. Therefore, the burden on the host device can be reduced.
Further, even if the waveform sample of the long stream is a compressed waveform sample that has been compression-encoded, the playback device uses a decoder provided when reproducing the compressed-encoded compressed waveform sample to perform long-stream compression. Since the waveform sample can be decoded, the number of decoders dedicated to long stream reproduction can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram illustrating a general configuration of an ADPCM encoder.
FIG. 2 is a diagram illustrating a general configuration of an ADPCM decoder.
FIG. 3 is a block diagram illustrating a configuration example of an embodiment of a playback device having a long stream playback function according to the present invention.
FIG. 4 is a diagram showing a mode in which a compressed waveform sample is stored when a waveform sample is compressed in a playback apparatus having a long stream playback function according to the present invention.
FIG. 5 is a diagram showing a configuration and an operation of a phase information generating unit in an embodiment of a reproducing apparatus having a long stream reproducing function of the present invention.
FIG. 6 is a circuit diagram showing a configuration of an address pointer in the embodiment of the reproducing apparatus having a long stream reproducing function of the present invention.
FIG. 7 is a diagram illustrating an operation of the ADPCM decoder when the second selection control information SDEC is generated in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 8 is a diagram illustrating an operation of the ADPCM decoder when the first selection control information DS is generated in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 9 is a diagram illustrating an operation of the ADPCM decoder when both the first selection control information DS and the second selection control information SDEC are generated in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 10 is a circuit diagram showing a part of a detailed configuration of an ADPCM decoder in an embodiment of a playback device having a long stream playback function according to the present invention.
FIG. 11 is a circuit diagram showing another part of the detailed configuration of the ADPCM decoder in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 12 is a diagram showing operation timings in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 13 is a table showing a relationship between second selection control information SDEC and selection signals of the fifteenth and eighteenth selectors in the embodiment of the reproducing apparatus having a long stream reproducing function of the present invention.
FIG. 14 is a table showing a relationship between second selection control information SDEC and latch signals of the twelfth and fourteenth latches in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 15 is a diagram showing samples supplied to inputs A to D of a fifteenth selector and an eighteenth selector in the embodiment of the playback device having the long stream playback function of the present invention.
FIG. 16 is a diagram illustrating an operation of long stream reproduction in an embodiment of a reproduction device having a long stream reproduction function according to the present invention.
FIG. 17 is a diagram illustrating an operation of the ADPCM decoder when the second selection control information SDEC is generated during long stream playback in the embodiment of the playback device having the long stream playback function of the present invention.
[Explanation of symbols]
1 phase information generating unit, 2 address pointer, 3 CPU, 4 peripheral device, 5 memory controller, 6 RAM, 7 ADPCM decoder, 8 interpolator, 9 accumulator, 10 register, 11 shifter, 70 ADPCM decoding unit, 71 quantization width Operation unit, 100 memory address, 101 memory address, 101 subtractor, 102 memory address, 102 encoding unit, 103 quantization width operation unit, 104 delay circuit, 105 prediction unit, 106 delay circuit, 201 decoding unit, 202 delay circuit , 203 quantization width calculation unit, 204 delay circuit, DS0 to DS3 first selection control information, RAM10 immediately before block RAM, RAM11 loop start block RAM, RAM12 immediately before quantization width RAM, RAM13 loop start quantization width RAM, SB1 to SB4 Sub-block, SDEC1-3, SDEC5-7 Second selection control information

Claims (8)

ロングストリームを複数に分割した部分ロングストリームの波形サンプルを読み書き可能な波形サンプル記憶手段と、
ループスタート位置情報およびループエンド位置情報を発生するループ位置情報発生手段と、
所望の再生ピッチに対応した速度で、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生する位相情報発生手段と、
該位相情報発生手段から発生された位相情報に基づいてアドレス信号を生成して、前記波形サンプル記憶手段から部分ロングストリームの波形サンプルを読み出す読出手段と、
該読出手段により前記波形サンプル記憶手段から読み出された波形サンプルを出力する出力手段と、
前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて、ループバックされる前に前記波形サンプル記憶手段に記憶されているループスタート位置からループエンド位置までの既に読み出された部分ロングストリームの波形サンプルを次の部分ロングストリームの波形サンプルで書き換える波形サンプル供給手段と、
を備えることを特徴とするロングストリーム再生機能を有する再生装置。
Waveform sample storage means capable of reading and writing waveform samples of a partial long stream obtained by dividing a long stream into a plurality of pieces;
Loop position information generating means for generating loop start position information and loop end position information,
At a speed corresponding to a desired reproduction pitch, phase information is sequentially increased to a loop end position via a loop start position, and a loop end is generated based on loop end position information generated by the loop position information generating means. When it is detected that the position has been reached, phase information generating means for generating phase information which sequentially loops back the phase information to the loop start position and sequentially increases again,
Reading means for generating an address signal based on the phase information generated by the phase information generating means and reading out a waveform sample of a partial long stream from the waveform sample storage means;
Output means for outputting a waveform sample read from the waveform sample storage means by the reading means;
Based on the phase information generated by the phase information generating means or the address signal generated by the reading means, before the loop-back, the read from the loop start position to the loop end position stored in the waveform sample storage means is performed. Waveform sample supply means for rewriting the output partial long stream waveform sample with the next partial long stream waveform sample,
A playback device having a long stream playback function, comprising:
前記波形サンプル記憶手段のループスタート位置からループエンド位置までが第1のエリアと第2のエリアに等分されており、前記波形サンプル供給手段は、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて第1のエリアに記憶された波形サンプルが全て読み出されたことが検出された際に、該第1のエリアに次のロングストリームの波形サンプルを書き込み、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいてループエンド位置に達したと検出された際に、第2のエリアに次のロングストリームの波形サンプルを書き込むようにしたことを特徴とする請求項1記載のロングストリーム再生機能を有する再生装置。A portion from the loop start position to the loop end position of the waveform sample storage means is equally divided into a first area and a second area, and the waveform sample supply means includes a phase information generated by the phase information generation means or When it is detected that all the waveform samples stored in the first area have been read out based on the address signal generated by the reading means, the next long stream waveform sample is written in the first area, When it is detected that the loop end position has been reached based on the phase information generated by the phase information generating means or the address signal generated by the reading means, a waveform sample of the next long stream is written in the second area. 2. The reproducing apparatus having a long stream reproducing function according to claim 1, wherein: 予測値に基づいて圧縮符号化されたロングストリームを複数に分割した部分ロングストリームの圧縮波形サンプルを読み書き可能な波形サンプル記憶手段と、
ループスタート位置情報およびループエンド位置情報を発生するループ位置情報発生手段と、
所望の再生ピッチに対応した速度で、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生する位相情報発生手段と、
該位相情報発生手段から発生された位相情報に基づいてアドレス信号を生成して、前記波形サンプル記憶手段から部分ロングストリームの波形サンプルを読み出す読出手段と、
該読出制御手段により前記波形サンプル記憶手段から読み出された圧縮波形サンプルを予測値に基づいて所定周期毎に順次に逐一デコードし、その結果を伸長波形サンプルとして順次出力するデコード手段と、
該デコード手段によりデコードされた最新の伸長波形サンプルを含む少なくとも1つの伸長波形サンプルを、一時記憶する一時記憶手段と、
前記デコード手段から出力される伸長波形サンプルまたは前記一時記憶手段から出力される伸長波形サンプルのいずれかを予測値として前記デコード手段に選択的に出力すると共に、出力波形サンプルとして出力する出力手段と、
前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて、ループバックされる前に前記波形サンプル記憶手段に記憶されているループスタート位置からループエンド位置までの既に読み出された部分ロングストリームの圧縮波形サンプルを次の部分ロングストリームの圧縮波形サンプルで書き換える波形サンプル供給手段と、
を備えるようにしたことを特徴とするロングストリーム再生機能を有する再生装置。
Waveform sample storage means capable of reading and writing a compressed waveform sample of a partial long stream obtained by dividing a long stream compressed and encoded based on a prediction value into a plurality of segments,
Loop position information generating means for generating loop start position information and loop end position information,
At a speed corresponding to a desired reproduction pitch, phase information is sequentially increased to a loop end position via a loop start position, and a loop end is generated based on loop end position information generated by the loop position information generating means. When it is detected that the position has been reached, phase information generating means for generating phase information which sequentially loops back the phase information to the loop start position and sequentially increases again,
Reading means for generating an address signal based on the phase information generated by the phase information generating means and reading out a waveform sample of a partial long stream from the waveform sample storage means;
Decoding means for sequentially decoding the compressed waveform samples read from the waveform sample storage means by the read control means at predetermined intervals based on the predicted value, and sequentially outputting the results as decompressed waveform samples;
Temporary storage means for temporarily storing at least one expanded waveform sample including the latest expanded waveform sample decoded by the decoding means;
Output means for selectively outputting either the expanded waveform sample output from the decoding means or the expanded waveform sample output from the temporary storage means to the decoding means as a prediction value, and outputting the output waveform sample;
Based on the phase information generated by the phase information generating means or the address signal generated by the reading means, before the loop-back, the read from the loop start position to the loop end position stored in the waveform sample storage means is performed. Waveform sample supply means for rewriting the output compressed waveform sample of the partial long stream with the compressed waveform sample of the next partial long stream;
A playback device having a long stream playback function, comprising:
前記波形サンプル記憶手段のループスタート位置からループエンド位置までが第1のエリアと第2のエリアに等分されており、前記波形サンプル供給手段は、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいて第1のエリアに記憶された圧縮波形サンプルが全て読み出されたことが検出された際に、該第1のエリアに次のロングストリームの圧縮波形サンプルを書き込み、前記位相情報発生手段が発生する位相情報または前記読出手段が発生するアドレス信号に基づいてループエンド位置に達したと検出された際に、第2のエリアに次のロングストリームの圧縮波形サンプルを書き込むようにしたことを特徴とする請求項3記載のロングストリーム再生機能を有する再生装置。A portion from the loop start position to the loop end position of the waveform sample storage means is equally divided into a first area and a second area, and the waveform sample supply means includes a phase information generated by the phase information generation means or When it is detected that all the compressed waveform samples stored in the first area have been read out based on the address signal generated by the reading means, the compressed waveform sample of the next long stream is stored in the first area. When it is detected that the loop end position has been reached based on the phase information generated by the writing and phase information generating means or the address signal generated by the reading means, the compressed waveform sample of the next long stream is stored in the second area. 4. The playback device having a long stream playback function according to claim 3, wherein the playback device has a function of writing a long stream. 前記位相情報発生手段で発生する位相情報は整数部と小数部とから成り、前記出力手段は、前記位相情報の整数部に基づき少なくとも2つのサンプルを出力波形サンプルとして選択出力するとともに、選択出力された前記少なくとも2つのサンプルを用いて前記位相情報の小数部に基づき補間演算することにより、前記位相情報に応じた波形サンプルを生成するようにしたことを特徴とする請求項3記載のロングストリーム再生機能を有する再生装置。The phase information generated by the phase information generating means includes an integer part and a decimal part, and the output means selectively outputs at least two samples as output waveform samples based on the integer part of the phase information, and selectively outputs. 4. The long stream reproduction according to claim 3, wherein a waveform sample corresponding to the phase information is generated by performing an interpolation operation based on a decimal part of the phase information using the at least two samples. A playback device having functions. 前記位相情報発生手段が、前記所望の再生ピッチに対応した速度に代えて、所望のピッチ情報を所定周期毎に累算することにより、ループスタート位置を経由してループエンド位置まで順次増加する位相情報を発生するとともに、前記ループ位置情報発生手段から発生されるループエンド位置情報に基づいてループエンド位置に達したと検出された際に、位相情報をループスタート位置にループバックして再び順次増加する位相情報を発生するようにしたことを特徴とする請求項3記載のロングストリーム再生機能を有する再生装置。The phase information generating means accumulates desired pitch information at predetermined intervals instead of the speed corresponding to the desired reproduction pitch, thereby sequentially increasing the phase to the loop end position via the loop start position. Information, and when it is detected that the loop end position has been reached based on the loop end position information generated by the loop position information generating means, the phase information is looped back to the loop start position and sequentially increased again. 4. The reproducing apparatus having a long stream reproducing function according to claim 3, wherein phase information for generating a long stream is generated. 前記波形サンプル記憶手段には、圧縮波形サンプルが1アドレスにつきn(nは2以上の整数)サンプルずつ記憶されており、前記読出制御手段は、前記所定周期毎に、前記波形サンプル記憶手段を1回アクセスするかまたは全くアクセスしないように動作するものであり、前記一時記憶手段には少なくともn個の伸長波形サンプルが記憶されるようにしたことを特徴とする請求項6記載のロングストリーム再生機能を有する再生装置。The waveform sample storage means stores n (n is an integer equal to or greater than 2) samples of compressed waveform samples per address, and the read control means stores the waveform sample storage means in each of the predetermined periods. 7. The long stream reproduction function according to claim 6, wherein the temporary storage means is operated so as to access once or not at all, and at least n expanded waveform samples are stored in the temporary storage means. A playback device having 前記圧縮波形サンプルが差分符号化あるいは適応差分符号化されていることを特徴とする請求項3または6のいずれかに記載のロングストリーム再生機能を有する再生装置。7. The reproducing apparatus having a long stream reproducing function according to claim 3, wherein the compressed waveform sample is subjected to differential encoding or adaptive differential encoding.
JP33376398A 1998-11-25 1998-11-25 Playback device having long stream playback function Expired - Fee Related JP3567768B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP33376398A JP3567768B2 (en) 1998-11-25 1998-11-25 Playback device having long stream playback function
TW088120167A TW457472B (en) 1998-11-25 1999-11-18 Apparatus and method for reproducing waveform
US09/447,204 US6242681B1 (en) 1998-11-25 1999-11-22 Waveform reproduction device and method for performing pitch shift reproduction, loop reproduction and long-stream reproduction using compressed waveform samples

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP33376398A JP3567768B2 (en) 1998-11-25 1998-11-25 Playback device having long stream playback function

Publications (2)

Publication Number Publication Date
JP2000163071A JP2000163071A (en) 2000-06-16
JP3567768B2 true JP3567768B2 (en) 2004-09-22

Family

ID=18269693

Family Applications (1)

Application Number Title Priority Date Filing Date
JP33376398A Expired - Fee Related JP3567768B2 (en) 1998-11-25 1998-11-25 Playback device having long stream playback function

Country Status (1)

Country Link
JP (1) JP3567768B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI223536B (en) * 2001-05-18 2004-11-01 Yamaha Corp Portable communication terminal

Also Published As

Publication number Publication date
JP2000163071A (en) 2000-06-16

Similar Documents

Publication Publication Date Title
US7378586B2 (en) Compressed data structure and apparatus and method related thereto
JP2671747B2 (en) Musical tone forming device
EP0149896B1 (en) Method and apparatus for dynamic reproduction of transient and steady state voices in an electronic musical instrument
WO1985001377A1 (en) Apparatus for reproducing audio signal
JPS6199193A (en) Musical sound signal generator
JP3567768B2 (en) Playback device having long stream playback function
JP3567767B2 (en) Loop playback device using compressed waveform samples
JP3567766B2 (en) Pitch shift playback device using compressed waveform samples
JPS6035077B2 (en) electronic musical instruments
US5639978A (en) Musical tone signal generating apparatus for electronic musical instrument
JP5359203B2 (en) Music processing apparatus and program
JP2605903B2 (en) Music synthesizer
JP3918755B2 (en) Music synthesizer
JP3912304B2 (en) Compressed data structure, waveform generation device, and waveform storage device
JP2765433B2 (en) Memory playback device
JP3915725B2 (en) Music synthesizer
JPH09185379A (en) Sampling sound source device
JP3862839B2 (en) Waveform compression / decompression device
JP2798913B2 (en) Musical tone waveform generating apparatus and musical tone waveform generating method
JP2591159B2 (en) Waveform selection and synthesis device
JP2004294780A (en) Waveform data compression method, musical sound signal generation method, musical sound signal processor, and program
JPH09120284A (en) Digital signal processor
JP2705042B2 (en) Envelope waveform generation method
JPH02137893A (en) Continuous sound source data reproducing device
JPH02137892A (en) Sound source device

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040423

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040607

R150 Certificate of patent or registration of utility model

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090625

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100625

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110625

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20120625

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130625

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20140625

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees