JP4940875B2 - Audio data compression method and apparatus, and decompression method and apparatus - Google Patents

Audio data compression method and apparatus, and decompression method and apparatus Download PDF

Info

Publication number
JP4940875B2
JP4940875B2 JP2006275048A JP2006275048A JP4940875B2 JP 4940875 B2 JP4940875 B2 JP 4940875B2 JP 2006275048 A JP2006275048 A JP 2006275048A JP 2006275048 A JP2006275048 A JP 2006275048A JP 4940875 B2 JP4940875 B2 JP 4940875B2
Authority
JP
Japan
Prior art keywords
data
memory
compressed data
compressed
decompressed
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.)
Active
Application number
JP2006275048A
Other languages
Japanese (ja)
Other versions
JP2008096501A (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 JP2006275048A priority Critical patent/JP4940875B2/en
Publication of JP2008096501A publication Critical patent/JP2008096501A/en
Application granted granted Critical
Publication of JP4940875B2 publication Critical patent/JP4940875B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Description

本発明は、主としてパチンコやゲーム機等に用いられる音声データ圧縮方法及び装置並びに伸張方法及び装置に関する。   The present invention relates to an audio data compression method and apparatus, and a decompression method and apparatus mainly used for a pachinko machine or a game machine.

パチンコやゲーム機等においては、バック音楽のための音声データを圧縮してROMに記憶させ、そのROMをゲーム機等にセットする。そして、ゲーム機の使用時で、音楽再生時にROM内のデータを読み出して伸張し、バック音楽を発生するようになっている。また、再生時においては、同じフレーズを繰り返し再生することが行われる。
上述した音声データの圧縮においては、MP3、AAC(Advanced Audio Coding)、WMA(Windows(登録商標) Media Audio)等の高圧縮率の非可逆圧縮方式が用いられる。しかし、この高圧縮率の圧縮方式は、例えば1024サンプルという多数のサンプルを1単位として圧縮/伸張処理が行われるため、伸張処理を開始してから伸張された音声データが得られるまでにデコードレイテンシがあり、このため、繰り返し再生の場合に、繰り返し楽音が終了した後、繰り返し点からの楽音が始まるまでの間に一時的に楽音が停止してしまう。
In pachinko machines, game machines, etc., audio data for back music is compressed and stored in a ROM, and the ROM is set in a game machine or the like. When the game machine is used, the data in the ROM is read and decompressed during music playback, and back music is generated. In playback, the same phrase is played back repeatedly.
In the audio data compression described above, an irreversible compression method with a high compression rate such as MP3, AAC (Advanced Audio Coding), WMA (Windows (registered trademark) Media Audio) or the like is used. However, since this compression method with a high compression rate performs compression / expansion processing with a large number of samples, for example, 1024 samples as one unit, the decoding latency from the start of the expansion processing until the decompressed audio data is obtained. For this reason, in the case of repeated playback, the musical tone is temporarily stopped after the musical tone has been repeated and before the musical tone starts from the repetition point.

そこで、従来、この一時的な楽音停止をなくすため、例えばADPCM等の低レイテンシ(デコード時の遅延が小)であるが伸張に時間を要しない圧縮方式によって、繰り返し点から所定長さの音声データを圧縮して用意し、繰り返し再生時においては、まず、この低レイテンシによるデータを伸張して再生し、その間に高圧縮率のデータの伸張を行い、伸張ができた後、低レイテンシのデータに代えて高圧縮率のデータによる楽音再生を行うという方法をとっていた。   Therefore, conventionally, in order to eliminate this temporary stop of the musical sound, for example, audio data having a predetermined length from the repetition point by a compression method which has low latency (decoding delay is small) such as ADPCM but does not require time for expansion. In the case of repeated playback, first, the data with this low latency is expanded and played back, and during that time, the data with high compression rate is expanded. Instead, music was played back using high compression rate data.

ところで、上記の処理において、低レイテンシのデータによる楽音と高圧縮率のデータによる楽音を単に接続すると、接続点においてクリックノイズが発生してしまう。そこで、このクリックノイズを除くため、接続点において低レイテンシのデータによる楽音を徐々に減衰させる一方、高圧縮率のデータによる楽音を徐々に増大させるクロスフェード処理を行うことが望ましい。   By the way, in the above processing, if a musical tone based on low latency data and a musical tone based on high compression rate data are simply connected, click noise occurs at the connection point. Therefore, in order to eliminate this click noise, it is desirable to perform cross-fade processing that gradually attenuates the musical sound based on the low latency data at the connection point while gradually increasing the musical sound based on the high compression rate data.

従来、このクロスフェード処理の方法として、予め、所定長さのクロスフェード処理をした高圧縮率のデータを別途用意する方法がある。しかし、この方法は、その分データ量が増大し、また、圧縮率の低下を招く欠点がある。クロスフェード処理の他の方法として、音声データ伸張回路にクロスフェード回路を組み込む方法がある。しかし、この方法はハードウエアが増える欠点があり、DSP(ディジタルシグナルプロセッサ)を使用する場合はステップ数の増大を招く欠点がある。
なお、従来の音声データの繰り返し再生を行う圧縮/伸張装置として特許文献1ないし3が知られている。
特開2002-341896号公報 特開2004-348055号公報 特開2005-283944号公報
Conventionally, as a method of the crossfade processing, there is a method of separately preparing high compression rate data that has been subjected to crossfade processing of a predetermined length. However, this method has the disadvantages that the data amount is increased correspondingly and the compression rate is lowered. As another method of crossfade processing, there is a method of incorporating a crossfade circuit into an audio data expansion circuit. However, this method has a drawback that the hardware is increased, and when a DSP (digital signal processor) is used, there is a disadvantage that the number of steps is increased.
Patent Documents 1 to 3 are known as conventional compression / decompression apparatuses that repeatedly reproduce audio data.
JP 2002-341896 JP 2004-348055 A JP 2005-283944 JP

本発明は、上記事情を考慮してなされたもので、その目的は、クロスフェードのための音声データを用意することなく、また、クロスフェード回路を設けることもなくクロスフェード処理を行うことができる音声データ圧縮方法及び装置並びに伸張方法及び装置を提供することにある。   The present invention has been made in consideration of the above circumstances, and its purpose is to perform cross-fading processing without preparing audio data for cross-fading and without providing a cross-fading circuit. An object of the present invention is to provide an audio data compression method and apparatus and an expansion method and apparatus.

この発明は上記の課題を解決するためになされたもので、請求項1に記載の発明は、被圧縮データを高圧縮率による圧縮方式によって圧縮し、圧縮によって得られたパケットをメモリに書き込む第1のステップと、前記メモリ内のパケットの中から、予め設定された途中再生点が属するパケットの次の次のパケットを検出する第2のステップと、前記第2のステップにおいて検出されたパケットをデコードしてデコードデータを得る第3のステップと、前記途中再生点から前記デコードデータの先頭位置までに対応する被圧縮データ、および、該デコードデータの先頭から所定部分までに対応する被圧縮データから該デコードデータの先頭から所定部分までを減算して得られたデータを低レイテンシによる圧縮方式によって圧縮する第4のステップとを有することを特徴とする音声データ圧縮方法である。 The present invention has been made in order to solve the above-mentioned problems, and the invention according to claim 1 is a method for compressing compressed data by a compression method with a high compression ratio and writing a packet obtained by the compression into a memory. and first step, from among the packets in said memory, the preset during playback point belongs packet and a second step of detecting the next following packet, the packets detected at said second step From the third step of decoding to obtain decoded data, from the compressed data corresponding to the intermediate reproduction point to the beginning position of the decoded data, and the compressed data corresponding to the predetermined portion from the beginning of the decoded data The fourth step of compressing the data obtained by subtracting the predetermined portion from the beginning of the decoded data by a compression method with low latency An audio data compression method is characterized by having a.

請求項2に記載の発明は、第1のメモリに記憶された被圧縮データを読み出し、高圧縮率による圧縮方式によって圧縮し、圧縮によって得られたパケットを第2のメモリに書き込む第1の圧縮手段と、前記第2のメモリ内のパケットの中から、予め設定された途中再生点が属するパケットの次の次のパケットを検出する検出手段と、前記検出手段において検出されたパケットをデコードしてデコードデータを出力するデコーダと、前記途中再生点から前記デコードデータの先頭位置までに対応する第1の被圧縮データのブロック、および、該デコードデータの先頭から所定部分までに対応する第2の被圧縮データのブロックを各々前記第1のメモリから読み出し、前記第1の被圧縮データのブロックを低レイテンシによる圧縮方式によって圧縮すると共に、前記第2の被圧縮データのブロックから前記デコードデータを減算して得られたデータを低レイテンシによる圧縮方式によって圧縮する第2の圧縮手段とを有することを特徴とする音声データ圧縮装置である。 According to the second aspect of the present invention, the first compression is performed in which the data to be compressed stored in the first memory is read out, compressed by a compression method with a high compression ratio, and a packet obtained by the compression is written in the second memory. means, among the packets in the second memory, decodes a detector during playback point set in advance to detect the next following packet belongs packet, the detected packet in the detection means A decoder that outputs decode data; a first block of compressed data corresponding to the intermediate reproduction point to the start position of the decode data; and a second copy corresponding to a predetermined portion from the start of the decode data. Each block of compressed data is read from the first memory, and the first block of data to be compressed is compressed by a compression method using low latency. And a second compression means for compressing the data obtained by subtracting the decoded data from the block of the second compressed data by a compression method with a low latency. .

請求項3に記載の発明は、高圧縮率による圧縮データと、第1の部分、第2の部分に区分けされた低レイテンシによる圧縮データとが記憶されたメモリからデータを読み出し、伸張する音声データ伸張方法において、前記メモリから前記高圧縮率による圧縮データを順次読み出して伸張し、伸張済みデータとして出力する第1のステップと、前記第1のステップにおける伸張処理が予め設定されている再生打ち切り点に到達した時、前記メモリから前記低レイテンシによる圧縮データの第1の部分を読み出し、伸張して伸張済みデータを出力する第2のステップと、前記メモリに設定されている特定位置から前記高圧縮率による圧縮データを読み出し、伸張する第3のステップと、前記メモリから前記低レイテンシによる圧縮データの第2の部分を読み出して伸張し、その伸張済みデータと前記第3のステップによって得られた伸張済みデータとを加算し、加算結果を伸張済みデータとして出力する第4のステップとを有することを特徴とする音声データ伸張方法。である   According to a third aspect of the present invention, audio data is read out and decompressed from a memory in which compressed data with a high compression ratio and compressed data with low latency divided into a first part and a second part are stored. In the decompression method, a first step of sequentially reading out and decompressing the compressed data with the high compression rate from the memory and outputting the decompressed data, and a reproduction stop point in which the decompression process in the first step is set in advance The second step of reading the first portion of the compressed data with the low latency from the memory, decompressing and outputting the decompressed data, and the high compression from a specific position set in the memory A third step of reading and decompressing the compressed data by rate, and a second part of the compressed data by the low latency from the memory. And a fourth step of adding the decompressed data and the decompressed data obtained in the third step and outputting the addition result as decompressed data. Data decompression method. Is

請求項4に記載の発明は、高圧縮率による圧縮データと、第1の部分、第2の部分に区分けされた低レイテンシによる圧縮データとが記憶されたメモリからデータを読み出し、伸張する音声データ伸張装置において、前記メモリから前記高圧縮率による圧縮データを順次読み出して伸張し、伸張済みデータとして出力する第1の手段と、前記第1の手段における伸張処理が予め設定されている再生打ち切り点に到達した時、前記メモリから前記低レイテンシによる圧縮データの第1の部分を読み出し、伸張して伸張済みデータを出力する第2の手段と、前記メモリに設定されている特定位置から前記高圧縮率による圧縮データを読み出し、伸張する第3の手段と、前記メモリから前記低レイテンシによる圧縮データの第2の部分を読み出して伸張し、その伸張済みデータと前記第3の手段によって得られた伸張済みデータとを加算し、加算結果を伸張済みデータとして出力する第4の手段とを有することを特徴とする音声データ伸張装置である。 According to a fourth aspect of the present invention, audio data is read and decompressed from a memory in which compressed data with a high compression ratio and compressed data with low latency divided into a first portion and a second portion are stored. In the decompression device, first means for sequentially reading out and decompressing the compressed data with the high compression rate from the memory and outputting the decompressed data, and a reproduction end point at which decompression processing in the first means is preset The second means for reading the first portion of the compressed data with the low latency from the memory, decompressing and outputting the decompressed data, and the high compression from a specific position set in the memory A third means for reading and decompressing the compressed data by the rate, and reading and decompressing the second portion of the compressed data by the low latency from the memory; Adds the decompressed data obtained and its decompressed data by said third means, a voice data expansion apparatus, characterized in that it comprises a fourth means for outputting the addition result as the decompressed data.

この発明によれば、音声データ圧縮/伸張装置における曲の途中再生を行う場合において、クロスフェードのための音声データを用意することなく、また、クロスフェード回路を設けることもなくクロスフェード処理を行うことができる効果がある。   According to the present invention, when the music data compression / decompression apparatus performs halfway reproduction of the music, the crossfade processing is performed without preparing the audio data for crossfading and without providing the crossfade circuit. There is an effect that can.

以下、図面を参照し、この発明の実施の形態について説明する。図1はこの発明の一実施の形態による音声データ圧縮装置の構成を示すブロック図である。この図において、符号1は圧縮前の音声データ(PCMデータ)が記憶されたメモリ、2は制御回路、3は、MP3、AAC、WMA等の高圧縮率ではあるが、デコード時の発音レイテンシの大きな音声データ圧縮を行う第1エンコーダ、4は、ADPCM、DPCM、LPC、非圧縮等の低レイテンシではあるがデコード時のレイテンシの小さな音声データ圧縮を行う第2エンコーダ、5は圧縮済みデータが書き込まれるメモリ、また、6は第1エンコーダによって圧縮された音声データを伸張するデコーダである。そして、メモリ5内の圧縮済みデータはビットストリーム生成回路によってビットストリームに生成され、パケット化されてROMに書き込まれる。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an audio data compression apparatus according to an embodiment of the present invention. In this figure, reference numeral 1 is a memory in which audio data (PCM data) before compression is stored, 2 is a control circuit, and 3 is a high compression ratio such as MP3, AAC, WMA, etc., but the pronunciation latency at the time of decoding is A first encoder that compresses large audio data, 4 is a second encoder that compresses audio data with low latency such as ADPCM, DPCM, LPC, uncompressed, but low latency during decoding, and 5 stores compressed data And 6 is a decoder for decompressing the audio data compressed by the first encoder. The compressed data in the memory 5 is generated into a bit stream by the bit stream generation circuit, packetized, and written into the ROM.

次に、上述した音声データ圧縮装置の動作を図2ないし図4を参照して説明する。
まず、制御回路2はメモリ1から圧縮前の音声データを順次読み出し、第1エンコーダ3へ出力する。第1エンコーダ3はこの音声データを高圧縮率による圧縮方式で圧縮し、圧縮済のデータをメモリ5に書き込む(ステップSa1)。メモリ1内の全データが第1エンコーダによって圧縮され、メモリ5に書き込まれると、次に、制御回路2は、途中再生点が属するパケットを検出する(ステップSa2)。この途中再生点とは、例えば繰り返し再生の場合に、曲の再生が1回終了した後、次の再生が開始される点であり、予め制御回路2内に設定されている。
Next, the operation of the above-described audio data compression apparatus will be described with reference to FIGS.
First, the control circuit 2 sequentially reads the audio data before compression from the memory 1 and outputs it to the first encoder 3. The first encoder 3 compresses the audio data by a compression method with a high compression rate, and writes the compressed data in the memory 5 (step Sa1). When all the data in the memory 1 is compressed by the first encoder and written in the memory 5, the control circuit 2 next detects the packet to which the midway reproduction point belongs (step Sa2). The intermediate playback point is a point at which, for example, in the case of repeated playback, the next playback is started after the music has been played once, and is set in the control circuit 2 in advance.

以下、このブロック検出の過程を図3、図4を参照して説明する。
図3において、P1、P2、・・・を圧縮済のパケット(サンプル数=2048)とする。これらのパケットP1、P2、・・・を順次デコード(伸張)すると、パケットP1、P2、・・・に対応してブロックB1、B2、・・・が得られる。各パケットは、1024サンプルがサンプリングレートで発音されるのに要する時間内でデコードされ、バッファに格納される。また、MP3、AAC等のブロック分割しての圧縮方式の場合、ブロック間で1024サンプルのオーバーラップを持たせる共にブロックの最初と最後のサンプルが0になるような窓関数がかけられることから、図に示すように、デコードされた各ブロックはエンベロープが湾曲した曲線となる。そして、デコード済みデータは、隣接するブロックのデータを加算することによって得られる。例えば、0番目から1023番目のサンプルはブロックB1とブロックB2を加算することによって得られ、1024番目から2047番目のサンプルはブロックB2とブロックB3を加算することによって得られる。以下、同様である。
Hereinafter, this block detection process will be described with reference to FIGS.
In FIG. 3, P1, P2,... Are compressed packets (number of samples = 2048). When these packets P1, P2,... Are sequentially decoded (expanded), blocks B1, B2,... Are obtained corresponding to the packets P1, P2,. Each packet is decoded and stored in a buffer within the time required for 1024 samples to be played at the sampling rate. In addition, in the case of a compression method in which blocks are divided such as MP3 and AAC, a window function is applied so that the blocks have an overlap of 1024 samples and the first and last samples of the block are 0. As shown in the figure, each decoded block is a curve with a curved envelope. The decoded data is obtained by adding the data of adjacent blocks. For example, the 0th to 1023th samples are obtained by adding the blocks B1 and B2, and the 1024th to 2047th samples are obtained by adding the blocks B2 and B3. The same applies hereinafter.

次に、図4は途中再生のためのパケットを検出する処理のフローチャートである。いま、途中再生点A(図3)をスタート点から2500番目のサンプルとする。まず、制御回路2は、メモリ5から第1番目のパケットP1を読み込む(ステップSb1)。次に、読み込んだパケットをデコードした場合のサンプル番号を検出する。パケットP1の場合、デコードによってブロックB1が得られるが、前半の1024サンプルは、加算する隣接パケットのデコードサンプルがないためサンプルは生成されず、便宜上、サンプル番号はなしとする。次に、途中再生点Aのサンプル番号2500を過ぎたか否かがチェックされる(ステップSb3)。この場合、判断結果が「NO」となり、ステップSb1へ戻る。   Next, FIG. 4 is a flowchart of processing for detecting a packet for halfway reproduction. Now, let the playback point A (FIG. 3) on the way be the 2500th sample from the start point. First, the control circuit 2 reads the first packet P1 from the memory 5 (step Sb1). Next, the sample number when the read packet is decoded is detected. In the case of the packet P1, the block B1 is obtained by decoding. However, for the 1024 samples in the first half, no sample is generated because there is no decoded sample of the adjacent packet to be added. Next, it is checked whether or not the sample number 2500 at the midway reproduction point A has passed (step Sb3). In this case, the determination result is “NO”, and the process returns to Step Sb1.

次に、制御回路2は、メモリ5から第2番目のパケットP2を読み込む(ステップSb1)。次に、読み込んだパケットをデコードした場合のサンプル番号を検出する(ステップSb2)。この場合、サンプル番号0から1023が検出される。次に、途中再生点Aのサンプル番号2500を過ぎたか否かがチェックされる(ステップSb3)。この場合、判断結果が「NO」となり、ステップSb1へ戻る。以下、同様の処理が繰り返される。そして、ステップSb1においてパケットP5が読み込まれると、ステップSb2においてサンプル番号3072から4095が検出され、ステップSb3の判断結果が「YES」となり、ステップSb4へ進む。ステップSb4では、次のパケット番号、すなわち、パケット番号P6が制御回路2の内部のパケット番号レジスタに書き込まれる。 Next, the control circuit 2 reads the second packet P2 from the memory 5 (step Sb1). Next, the sample number when the read packet is decoded is detected (step Sb2). In this case, sample numbers 0 to 1023 are detected. Next, it is checked whether or not the sample number 2500 at the midway reproduction point A has passed (step Sb3). In this case, the determination result is “NO”, and the process returns to Step Sb1. Thereafter, the same processing is repeated. When the packet P5 is read in step Sb1, sample numbers 3072 to 4095 are detected in step Sb2, the determination result in step Sb3 is “YES”, and the flow proceeds to step Sb4. In step Sb4, the next packet number, that is, the packet number P6 is written in the packet number register inside the control circuit 2.

以上が、図2のステップSa2の処理である。次に、ステップSa3へ進むと、ステップSa2で検出されたパケットより前のパケットがデータ0であったと仮定し、正常なデコードが可能になるまで強制的にデコードする。
すなわち、上記の例の場合、ステップSa2においてパケットP6(ブロックB6)が検出されたことから、このステップSa3においては、制御回路2がパケットP6をメモリ5から読み出し、デコーダ6へ出力する。デコーダ6はパケットP6をデコードして制御回路2へ戻す。なお、パケットP7以降のパケットは再生時において正常なデコードが可能であり、上記のデコーダ6によるデコード処理は行われない。
The above is the process of step Sa2 in FIG. Next, when proceeding to step Sa3, it is assumed that the packet before the packet detected at step Sa2 was data 0, and forcibly decoding until normal decoding becomes possible.
That is, in the above example, since the packet P6 (block B6) is detected in step Sa2, the control circuit 2 reads the packet P6 from the memory 5 and outputs it to the decoder 6 in step Sa3. The decoder 6 decodes the packet P6 and returns it to the control circuit 2. The packets after the packet P7 can be normally decoded at the time of reproduction, and the decoding process by the decoder 6 is not performed.

次に、ステップSa4へ進むと、制御回路2は、メモリ1から圧縮前のデータを読み出し、読み出したデータとデコード済みのデータの差を算出する。すなわち、上記例の場合、制御回路2は、メモリ1から、2500番目から5119番目までのサンプルを読み出し、2500番目のサンプルから4095番目のサンプルについては「0」を減算し、4096番目のサンプルから5119番目のサンプルについてはデコード済みのデータ(ブロックB6のデータ)を減算する。次にステップSa5へ進むと、制御回路2が上記の減算によって得られたデータを第2エンコーダ4へ出力する。第2エンコーダ4はそのデータを低レイテンシの圧縮方式によって圧縮し、メモリ5に書き込む。これにより、図3に符号ADにて示す低レイテンシの圧縮済みデータがメモリ5に書き込まれる。   Next, when proceeding to step Sa4, the control circuit 2 reads the uncompressed data from the memory 1, and calculates the difference between the read data and the decoded data. That is, in the case of the above example, the control circuit 2 reads the 2500th to 5119th samples from the memory 1, subtracts “0” for the 4095th sample from the 2500th sample, and starts from the 4096th sample. For the 5119th sample, the decoded data (data of block B6) is subtracted. Next, when proceeding to step Sa5, the control circuit 2 outputs the data obtained by the above subtraction to the second encoder 4. The second encoder 4 compresses the data by a low latency compression method and writes the compressed data in the memory 5. As a result, low latency compressed data indicated by the symbol AD in FIG.

このように、上記実施形態による音声データ圧縮装置は、高圧縮率の圧縮方式によってメモリ1内の全データを圧縮しメモリ5に書き込むと共に、途中再生点Aから所定の長さの低レイテンシのデータを生成しメモリ5内に用意する。これは、再生時において再生がA点に戻った時、高圧縮率のデータのデコードがすぐにはできないため、しばらくの間低レイテンシのデータを再生し、高圧縮率のデータ再生が間に合った時点以降、再び高圧縮率のデータ再生を行うためである。そして、図3の例の場合、パケットP5のデコードは当然に間に合わず、パケットP6のデコードによれば4096番目のサンプルからデコード済みデータが得られる。   As described above, the audio data compression apparatus according to the above embodiment compresses and writes all data in the memory 1 to the memory 5 by a compression method with a high compression rate, and also low-latency data having a predetermined length from the playback point A on the way. Is prepared in the memory 5. This is because when the playback returns to point A, the high compression rate data cannot be decoded immediately, so the low latency data is played back for a while and the high compression rate data playback is in time. This is because data compression with a high compression rate is performed again thereafter. In the case of the example of FIG. 3, the packet P5 cannot be decoded in time, and the decoded data is obtained from the 4096th sample according to the decoding of the packet P6.

したがって、まず、2500番目から4095番目までのサンプルについて低レイテンシのデータで用意する必要がある。また、パケットP6のデコードによって4096番目のサンプルからデコード済みデータが得られても、4096番目から5119番目のサンプルについては加算するサンプルが存在せず、したがって、高圧縮率のデータのみではデコード済みの音声データが得られない。そこで、圧縮前の4096番目から5119番目のサンプルからデコード済みのブロックB6のデータを減算し、減算によって得られたデータを低レイテンシの圧縮方式で圧縮し、メモリ5に書き込む。再生時においては、2500番目から4095番目までのサンプルについては、低レイテンシのデータをデコードして使用し、4096番目から5119番目のサンプルについては、高圧縮率のデータをデコードしたデータと低レイテンシのデータをデコードしたデータとを加算して使用し、5120番目のサンプル以降、高圧縮率のデータをデコードして使用する。 Therefore, it is necessary to prepare low latency data for the 2500th to 4095th samples. Even if decoded data is obtained from the 4096th sample by decoding the packet P6, there is no sample to be added for the 4096th to 5119th samples. Audio data cannot be obtained. Therefore, the data of the decoded block B6 is subtracted from the 4096th to 5119th samples before compression, and the data obtained by the subtraction is compressed by the low latency compression method and written to the memory 5. At the time of reproduction, the low latency data is decoded and used for the 2500th to 4095th samples, and the high compression rate data and the low latency data are decoded for the 4096th to 5119th samples. Data obtained by decoding the data is added and used. After the 5120th sample, data with a high compression rate is decoded and used.

次に、上述した圧縮装置によって圧縮されたデータを伸張する音声データ伸張装置について説明する。
図5は音声データ伸張装置の構成を示すブロック図である。この図において、11は圧縮済み音声データが書き込まれたROM、12は制御回路、13は第1の圧縮方式(高圧縮率の圧縮方式)のデータを伸張する第1デコーダ、14は第2の圧縮方式(低レイテンシの圧縮方式)のデータをデコードする第2デコーダ、15は第1デコーダによるデコード済みデータと第2デコーダによるデコード済みデータとを加算する加算器、16は第1デコーダの出力、第2デコーダの出力、加算器の出力のいずれか1つを選択して出力するセレクタ、17はセレクタの出力が書き込まれるバッファメモリ、18はバッファメモリ17の出力をアナログ信号に変換するD/A変換器である。
Next, an audio data expansion device that expands data compressed by the compression device described above will be described.
FIG. 5 is a block diagram showing the configuration of the audio data decompression apparatus. In this figure, 11 is a ROM in which compressed audio data is written, 12 is a control circuit, 13 is a first decoder for decompressing data of the first compression method (high compression rate compression method), and 14 is a second decoder. A second decoder that decodes data in a compression scheme (low latency compression scheme), 15 an adder that adds the decoded data by the first decoder and the decoded data by the second decoder, and 16 an output of the first decoder, A selector that selects and outputs one of the output of the second decoder and the output of the adder, 17 is a buffer memory in which the output of the selector is written, 18 is a D / A that converts the output of the buffer memory 17 into an analog signal It is a converter.

次に、上述した音声データ伸張装置の動作を上述した図3および図6に示すフローチャートを参照して説明する。
まず、制御回路12はROM11から1番目のパケットP1(図3参照)を読み出し、第1デコーダ13へ出力する。第1デコーダ13は、そのパケットP1を、1024サンプルがサンプリングレートに従い発音されるのに要する時間以内の時間内でデコードしてブロックB1(図3)として第1のバッファ(図示省略)に格納する。次に、制御回路12は2番目のパケットP2を読み出し、第1デコーダ13へ出力する。第1デコーダ13はそのパケットP2をデコードしてブロックB2として第2のバッファ(図示省略)に格納する。次に、第1デコーダ13はブロックB1の1024サンプル以降のデータとブロックB2の0〜1023サンプルのデータを加算することによって第0から第1023のデコード済みサンプルを生成し、セレクタ16を介してバッファメモリ17に書き込むと共に、制御回路12は3番目のパケットP3を読み出し、第1のデコーダ13へ出力する。第1のデコーダ13は、パケットP3をデコードしてブロックB3として第3のバッファ(図示省略)に格納する。バッファメモリ17に書き込まれたデータはサンプリング周波数のクロックパルスによって読み出され、D/A変換器18によってアナログ信号に変換されスピーカへ出力される。これにより、楽音が発生する(ステップSc2,Sc3)。
Next, the operation of the above-described audio data expansion device will be described with reference to the flowcharts shown in FIGS.
First, the control circuit 12 reads the first packet P <b> 1 (see FIG. 3) from the ROM 11 and outputs it to the first decoder 13. The first decoder 13 decodes the packet P1 within the time required for the 1024 samples to be sounded according to the sampling rate, and stores it in the first buffer (not shown) as the block B1 (FIG. 3). . Next, the control circuit 12 reads the second packet P2 and outputs it to the first decoder 13. The first decoder 13 decodes the packet P2 and stores it as a block B2 in a second buffer (not shown). Next, the first decoder 13 generates the 0th to 1023 decoded samples by adding the data after 1024 samples of the block B1 and the data of 0 to 1023 samples of the block B2, and buffers them via the selector 16 While writing to the memory 17, the control circuit 12 reads the third packet P 3 and outputs it to the first decoder 13. The first decoder 13 decodes the packet P3 and stores it as a block B3 in a third buffer (not shown). The data written in the buffer memory 17 is read by the clock pulse of the sampling frequency, converted into an analog signal by the D / A converter 18, and output to the speaker. Thereby, a musical sound is generated (steps Sc2 and Sc3).

以後、制御回路12はROM11からパケットP3、P4・・・を順次読み出し、第1デコーダ13へ出力する。これにより、パケットP3、P4・・・に基づく楽音が発生する。制御回路12はパケットを第1デコーダへ出力する毎に予め内部に設定されている再生打ち切り点に達したか否かを判断する(図6のステップSc1)。そして、判断結果が「NO」の場合は、ステップSc2,Sc3に進む。   Thereafter, the control circuit 12 sequentially reads the packets P3, P4... From the ROM 11 and outputs them to the first decoder 13. As a result, a musical tone based on the packets P3, P4... Is generated. Each time the control circuit 12 outputs a packet to the first decoder, it determines whether or not the reproduction stop point set in advance has been reached (step Sc1 in FIG. 6). If the determination result is “NO”, the process proceeds to steps Sc2 and Sc3.

次に、再生打ち切り点に達すると、以前までに読み込んだデータのクリアを第1デコーダ13に指示する(ステップSc4)。次に、第1の圧縮方式によるデータの読み込み位置をエンコード時に定められたデコード再開位置に設定する(ステップSc5)。図3の例の場合、第1の圧縮方式によるデータの読み込み位置をパケットP6の位置に設定する。この位置はROM11内に予め書き込まれている。   Next, when the reproduction stop point is reached, the first decoder 13 is instructed to clear the previously read data (step Sc4). Next, the data reading position by the first compression method is set to the decoding restart position determined at the time of encoding (step Sc5). In the case of the example of FIG. 3, the data reading position by the first compression method is set to the position of the packet P6. This position is written in the ROM 11 in advance.

次に、制御回路12は、第2の圧縮方式のデータをROM11から読み込む(ステップSc6)。そして、第2の圧縮方式のデータのみで再生する部分(図3の例では2500番目から4095番目のサンプル)を第2のデコーダ14へ出力する。第2のデコーダ14はこのデータをデコードし、セレクタ16を介してバッファメモリ17に書き込む(ステップSc7)。   Next, the control circuit 12 reads the data of the second compression method from the ROM 11 (step Sc6). Then, the portion to be reproduced only with the data of the second compression method (in the example of FIG. 3, the 2500th to 4095th samples) is output to the second decoder 14. The second decoder 14 decodes this data and writes it into the buffer memory 17 via the selector 16 (step Sc7).

次に、制御回路12は、ROM11の上述したデコード再開位置から第1の圧縮方式のデータを読み出し、第1デコーダ13へ出力する(ステップSc8)。第1のデコーダ13はそのデータをデコードし、加算器15へ出力する(ステップSc9)。また、制御回路12はROM11から、第2の圧縮方式のデータで第1の圧縮方式のデータと加算するデータ(図3の例では4096番目から5119番目のサンプル)を読み出し、第2デコーダ14へ出力する。第2デコーダ14はそのデータをデコードし、加算器15へ出力する(ステップSc10)。加算器15は第1、第2デコーダ13、14の出力を加算し、セレクタ16を介してバッファメモリ17に書き込む(ステップSc11)。上記の加算処理は第2の圧縮方式のデータの終了まで行われ、第2の圧縮方式のデータが終了すると、以後、第1の圧縮方式のデータによる楽音再生が行われる(ステップSc12)。   Next, the control circuit 12 reads the data of the first compression method from the above-described decoding restart position of the ROM 11 and outputs it to the first decoder 13 (step Sc8). The first decoder 13 decodes the data and outputs it to the adder 15 (step Sc9). Further, the control circuit 12 reads from the ROM 11 data (the 4096th to 5119th samples in the example of FIG. 3) to be added to the first compression method data with the second compression method data, and sends it to the second decoder 14. Output. The second decoder 14 decodes the data and outputs it to the adder 15 (step Sc10). The adder 15 adds the outputs of the first and second decoders 13 and 14 and writes them to the buffer memory 17 via the selector 16 (step Sc11). The above addition processing is performed until the end of the data of the second compression method. When the data of the second compression method is completed, musical tone reproduction using the data of the first compression method is performed thereafter (step Sc12).

以上説明したように、上記実施形態によれば、高圧縮率の圧縮方式における周波数変換の前処理(ブロック化)の際に用いられる窓関数を利用し、クロスフェード処理を行っている(図3におけるサンプル番号4096から5120)。この結果、クロスフェードのための音声データを用意することなく、また、クロスフェード回路を設けることなくもクロスフェード処理を行うことができる。   As described above, according to the above-described embodiment, the cross-fade processing is performed using the window function used in the frequency conversion preprocessing (blocking) in the compression method with a high compression ratio (FIG. 3). Sample numbers 4096 to 5120). As a result, the crossfade process can be performed without preparing audio data for crossfade and without providing a crossfade circuit.

なお、上記実施形態は、再生打ち切り点をブロックの終了点としているが、これに限らず、ブロックの途中において再生打ち切りをしてもよい。この場合、再生打ち切りの判断は第1デコーダにおいて行われる。
また、上記説明においては、繰り返し再生を例に挙げているが、途中の一部を飛ばして再生する等の場合にも上記実施形態は適用可能である。
尚、上述の実施形態において、レイテンシの小さな圧縮データの概念には、未圧縮データも含まれるものとする。
In the above embodiment, the playback stop point is set as the end point of the block. However, the present invention is not limited to this, and the playback stop may be performed in the middle of the block. In this case, the determination of the reproduction abort is made in the first decoder.
In the above description, repeated reproduction is given as an example. However, the above embodiment can also be applied to a case where reproduction is performed while skipping part of the middle.
In the above-described embodiment, the concept of compressed data with a low latency includes uncompressed data.

この発明は、パチンコやゲーム機におけるバック音楽の発生等に用いられる。   The present invention is used for generating back music in a pachinko machine or a game machine.

この発明の一実施形態による音声データ圧縮装置の構成を示すブロック図である。It is a block diagram which shows the structure of the audio | voice data compression apparatus by one Embodiment of this invention. 同音声データ圧縮装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the audio | voice data compression apparatus. 同音声データ圧縮装置の動作を説明するための説明図である。It is explanatory drawing for demonstrating operation | movement of the audio | voice data compression apparatus. 図2におけるステップSa2の処理を詳細に示すフローチャートである。It is a flowchart which shows the process of step Sa2 in FIG. 2 in detail. この発明の一実施形態による音声データ圧伸張装置の構成を示すブロック図である。It is a block diagram which shows the structure of the audio | voice data pressure expansion apparatus by one Embodiment of this invention. 同音声データ伸張装置の動作を説明するためのフローチャートである。It is a flowchart for demonstrating operation | movement of the audio | voice data expansion | extension apparatus.

符号の説明Explanation of symbols

1…メモリ、2…制御回路、3…第1のエンコーダ、4…第2のエンコーダ、5…メモリ、6…デコーダ、11…ROM、12…制御回路、13…第1デコーダ、14…第2デコーダ、15…加算器、16…セレクタ、17…バッファメモリ、18…D/A変換器。 DESCRIPTION OF SYMBOLS 1 ... Memory, 2 ... Control circuit, 3 ... 1st encoder, 4 ... 2nd encoder, 5 ... Memory, 6 ... Decoder, 11 ... ROM, 12 ... Control circuit, 13 ... 1st decoder, 14 ... 2nd Decoder, 15 ... adder, 16 ... selector, 17 ... buffer memory, 18 ... D / A converter.

Claims (4)

被圧縮データを高圧縮率による圧縮方式によって圧縮し、圧縮によって得られたパケットをメモリに書き込む第1のステップと、
前記メモリ内のパケットの中から、予め設定された途中再生点が属するパケットの次の次のパケットを検出する第2のステップと、
前記第2のステップにおいて検出されたパケットをデコードしてデコードデータを得る第3のステップと、
前記途中再生点から前記デコードデータの先頭位置までに対応する被圧縮データ、および、該デコードデータの先頭から所定部分までに対応する被圧縮データから該デコードデータの先頭から所定部分までを減算して得られたデータを低レイテンシによる圧縮方式によって圧縮する第4のステップと、
を有することを特徴とする音声データ圧縮方法。
A first step of compressing data to be compressed by a compression method with a high compression ratio, and writing a packet obtained by the compression to a memory;
From among the packets in the memory, a second step of during playback point set in advance to detect the next following packet belongs packet,
A third step of decoding the packet detected in the second step to obtain decoded data;
The compressed data corresponding to the intermediate playback point to the start position of the decoded data and the compressed data corresponding to the decoded data from the start to a predetermined portion are subtracted from the start of the decoded data to the predetermined portion. A fourth step of compressing the obtained data by a compression method with low latency;
An audio data compression method characterized by comprising:
第1のメモリに記憶された被圧縮データを読み出し、高圧縮率による圧縮方式によって圧縮し、圧縮によって得られたパケットを第2のメモリに書き込む第1の圧縮手段と、
前記第2のメモリ内のパケットの中から、予め設定された途中再生点が属するパケットの次の次のパケットを検出する検出手段と、
前記検出手段において検出されたパケットをデコードしてデコードデータを出力するデコーダと、
前記途中再生点から前記デコードデータの先頭位置までに対応する第1の被圧縮データのブロック、および、該デコードデータの先頭から所定部分までに対応する第2の被圧縮データのブロックを各々前記第1のメモリから読み出し、前記第1の被圧縮データのブロックを低レイテンシによる圧縮方式によって圧縮すると共に、前記第2の被圧縮データのブロックから前記デコードデータを減算して得られたデータを低レイテンシによる圧縮方式によって圧縮する第2の圧縮手段と、
を有することを特徴とする音声データ圧縮装置。
First compression means for reading the compressed data stored in the first memory, compressing the compressed data by a compression method with a high compression ratio, and writing the packet obtained by the compression to the second memory,
From among the packets in the second memory, the detecting means during playback point set in advance to detect the next following packet belongs packet,
A decoder that decodes the packet detected by the detection means and outputs decoded data;
A first block of compressed data corresponding to the intermediate reproduction point to the beginning position of the decoded data and a second block of compressed data corresponding to the predetermined portion from the beginning of the decoded data are respectively Read from the memory of 1 and compress the block of the first compressed data by a compression method using low latency, and subtract the decoded data from the block of the second compressed data to obtain the low latency A second compression means for compressing by the compression method according to
An audio data compression apparatus comprising:
高圧縮率による圧縮データと、第1の部分、第2の部分に区分けされた低レイテンシによる圧縮データとが記憶されたメモリからデータを読み出し、伸張する音声データ伸張方法において、
前記メモリから前記高圧縮率による圧縮データを順次読み出して伸張し、伸張済みデータとして出力する第1のステップと、
前記第1のステップにおける伸張処理が予め設定されている再生打ち切り点に到達した時、前記メモリから前記低レイテンシによる圧縮データの第1の部分を読み出し、伸張して伸張済みデータを出力する第2のステップと、
前記メモリに設定されている特定位置から前記高圧縮率による圧縮データを読み出し、伸張する第3のステップと、
前記メモリから前記低レイテンシによる圧縮データの第2の部分を読み出して伸張し、その伸張済みデータと前記第3のステップによって得られた伸張済みデータとを加算し、加算結果を伸張済みデータとして出力する第4のステップと、
を有することを特徴とする音声データ伸張方法。
In an audio data decompression method for reading and decompressing data from a memory in which compressed data with a high compression rate and compressed data with low latency divided into a first part and a second part are stored.
A first step of sequentially reading and decompressing the compressed data with the high compression rate from the memory, and outputting the decompressed data;
When the decompression process in the first step reaches a preset reproduction stop point, the first portion of the compressed data with the low latency is read from the memory, decompressed, and the decompressed data is output. And the steps
A third step of reading and decompressing the compressed data with the high compression ratio from a specific position set in the memory;
Reads and decompresses the second portion of the compressed data with the low latency from the memory, adds the decompressed data and the decompressed data obtained in the third step, and outputs the addition result as decompressed data A fourth step to
An audio data decompression method comprising:
高圧縮率による圧縮データと、第1の部分、第2の部分に区分けされた低レイテンシによる圧縮データとが記憶されたメモリからデータを読み出し、伸張する音声データ伸張装置において、
前記メモリから前記高圧縮率による圧縮データを順次読み出して伸張し、伸張済みデータとして出力する第1の手段と、
前記第1の手段における伸張処理が予め設定されている再生打ち切り点に到達した時、前記メモリから前記低レイテンシによる圧縮データの第1の部分を読み出し、伸張して伸張済みデータを出力する第2の手段と、
前記メモリに設定されている特定位置から前記高圧縮率による圧縮データを読み出し、伸張する第3の手段と、
前記メモリから前記低レイテンシによる圧縮データの第2の部分を読み出して伸張し、その伸張済みデータと前記第3の手段によって得られた伸張済みデータとを加算し、加算結果を伸張済みデータとして出力する第4の手段と、
を有することを特徴とする音声データ伸張装置。
In an audio data decompression device that reads and decompresses data from a memory in which compressed data with a high compression rate and compressed data with low latency divided into a first part and a second part are stored.
First means for sequentially reading and decompressing the compressed data with the high compression rate from the memory, and outputting the decompressed data;
When the decompression process in the first means reaches a preset playback stop point, the first portion of the compressed data with the low latency is read from the memory, decompressed, and the decompressed data is output. Means of
A third means for reading and decompressing the compressed data with the high compression ratio from a specific position set in the memory;
Reads and decompresses the second portion of the compressed data with the low latency from the memory, adds the decompressed data and the decompressed data obtained by the third means , and outputs the addition result as decompressed data A fourth means to
An audio data decompressing device comprising:
JP2006275048A 2006-10-06 2006-10-06 Audio data compression method and apparatus, and decompression method and apparatus Active JP4940875B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006275048A JP4940875B2 (en) 2006-10-06 2006-10-06 Audio data compression method and apparatus, and decompression method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006275048A JP4940875B2 (en) 2006-10-06 2006-10-06 Audio data compression method and apparatus, and decompression method and apparatus

Publications (2)

Publication Number Publication Date
JP2008096501A JP2008096501A (en) 2008-04-24
JP4940875B2 true JP4940875B2 (en) 2012-05-30

Family

ID=39379448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006275048A Active JP4940875B2 (en) 2006-10-06 2006-10-06 Audio data compression method and apparatus, and decompression method and apparatus

Country Status (1)

Country Link
JP (1) JP4940875B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02135931A (en) * 1988-11-17 1990-05-24 Matsushita Electric Ind Co Ltd Signal processing method
JP4254960B2 (en) * 2004-12-03 2009-04-15 株式会社ソニー・コンピュータエンタテインメント Audio data encoding apparatus and audio data reproducing apparatus
JP4483811B2 (en) * 2005-06-01 2010-06-16 ヤマハ株式会社 Data compression method, data compression circuit, and data expansion circuit

Also Published As

Publication number Publication date
JP2008096501A (en) 2008-04-24

Similar Documents

Publication Publication Date Title
JP4359499B2 (en) Editing audio signals
JP2006085164A (en) Method of embedding sound field control factor and method of processing sound field suitable thereto
JP3891309B2 (en) Audio playback speed converter
JP4793539B2 (en) Code conversion method and apparatus, program, and storage medium therefor
JP4940875B2 (en) Audio data compression method and apparatus, and decompression method and apparatus
JP4639966B2 (en) Audio data compression method, audio data compression circuit, and audio data expansion circuit
JP2007010855A (en) Voice reproducing apparatus
WO2009090705A1 (en) Recording/reproduction device
EP1522063B1 (en) Sinusoidal audio coding
JP3227929B2 (en) Speech encoding apparatus and decoding apparatus for encoded signal
JP4665550B2 (en) Playback apparatus and playback method
JP2006243128A (en) Reproducing device and reproducing method
JP4222250B2 (en) Compressed music data playback device
JP2010123225A (en) Record reproducing apparatus and record reproducing method
JP3918826B2 (en) Music data playback device
JP4862136B2 (en) Audio signal processing device
JP4483811B2 (en) Data compression method, data compression circuit, and data expansion circuit
JPS61275900A (en) Voice information compression system
JPH0235320B2 (en)
JP2000049614A (en) Reproducing device
JP2005204003A (en) Continuous media data fast reproduction method, composite media data fast reproduction method, multichannel continuous media data fast reproduction method, video data fast reproduction method, continuous media data fast reproducing device, composite media data fast reproducing device, multichannel continuous media data fast reproducing device, video data fast reproducing device, program, and recording medium
JPH08167243A (en) Digital audio system and reproducing device as well as recording device and digital copying method
KR100776432B1 (en) Apparatus for writing and playing audio and audio coding method in the apparatus
JP2011209412A (en) Compressing device, compressing method, reproducing device, and reproducing method
JP2006053485A (en) Voice/music data recording method, voice/music data reproducing method, voice/music data recording apparatus, and voice/music data reproducing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20090820

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111115

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120111

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120213

R150 Certificate of patent or registration of utility model

Ref document number: 4940875

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20150309

Year of fee payment: 3