JP4868041B2 - Data conversion apparatus and data conversion program - Google Patents

Data conversion apparatus and data conversion program Download PDF

Info

Publication number
JP4868041B2
JP4868041B2 JP2009191570A JP2009191570A JP4868041B2 JP 4868041 B2 JP4868041 B2 JP 4868041B2 JP 2009191570 A JP2009191570 A JP 2009191570A JP 2009191570 A JP2009191570 A JP 2009191570A JP 4868041 B2 JP4868041 B2 JP 4868041B2
Authority
JP
Japan
Prior art keywords
data
input
output
frame
frame memory
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
JP2009191570A
Other languages
Japanese (ja)
Other versions
JP2011043654A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2009191570A priority Critical patent/JP4868041B2/en
Priority to US12/836,898 priority patent/US8484018B2/en
Publication of JP2011043654A publication Critical patent/JP2011043654A/en
Application granted granted Critical
Publication of JP4868041B2 publication Critical patent/JP4868041B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、入力した音声信号の速度を変換して出力するデータ変換装置およびデータ変換プログラムに関する。   The present invention relates to a data conversion apparatus and a data conversion program that convert and output the speed of an input audio signal.

音声信号の音高を変化させず、その時間長を変化させて再生する技術が実用化され、カラオケにおける音声効果の付与や、CD、ビデオ、DVDなどの再生時の早送り再生・スロー再生に適用されている。この技術には、時間軸上の操作に基づくものと、周波数軸上での操作に基づくものとに大別できる。前者の代表例として、OLA(OverLap and Add)方式、および、その発展形であるPSOLA(Pitch Synchronous OLA)方式が知られている。また、後者の代表例として、フェーズ・ヴォコーダーが知られている。   Practical use of playback technology that changes the length of the audio signal without changing the pitch of the audio signal, and applies it to audio effects in karaoke and fast-forward playback / slow playback during playback of CDs, videos, DVDs, etc. Has been. This technique can be broadly divided into those based on operations on the time axis and those based on operations on the frequency axis. As a typical example of the former, an OLA (OverLap and Add) method and a PSOLA (Pitch Synchronous OLA) method, which is a developed form thereof, are known. As a representative example of the latter, a phase vocoder is known.

特開2005−266571号公報JP 2005-266571 A 特開平10−124082号公報Japanese Patent Laid-Open No. 10-124082 特開2005−208627号公報JP 2005-208627 A

OLA方式はたとえば特許文献1に記載されている。OLA方式においては、音声データをフレーム単位に分割し、フレームに窓関数を施した後、それぞれのフレームの一部が相互に重なり合うように順次配置し、重なり合う部分のデータ値を加算して出力する。この重なり合う幅を変化させることにより、音声データを伸長・短縮する。OLA方式は、その処理が単純であり、簡易な構成で実現することができる。その一方、フレームの重なり合う部分の周辺を含むフレーム接合点での不連続性が生じ、ノイズが発生する場合がある。   The OLA method is described in Patent Document 1, for example. In the OLA method, audio data is divided into frame units, a window function is applied to the frames, and then the frames are sequentially arranged so that parts of the frames overlap each other, and the data values of the overlapping parts are added and output. . By changing the overlapping width, the audio data is expanded / shortened. The OLA method has a simple process and can be realized with a simple configuration. On the other hand, discontinuity may occur at the frame junction including the periphery of the overlapping portion of the frames, and noise may occur.

PSOLA方式はたとえば特許文献2に記載されている。PSOLA方式は、OLA方式で生じるフレーム接合点でのノイズを軽減するために、音声データのピッチを抽出し、フレームサイズを抽出されたピッチに基づくサイズに設定する。PSOLA方式では、抽出可能なピッチを有する音声データ、つまり、単音の楽器などの音声データにしか適用できないという問題点があった。   The PSOLA system is described in Patent Document 2, for example. In the PSOLA system, the pitch of audio data is extracted and the frame size is set to a size based on the extracted pitch in order to reduce the noise at the frame junction generated in the OLA system. The PSOLA method has a problem that it can be applied only to audio data having an extractable pitch, that is, audio data such as a single musical instrument.

周波数軸上の操作を伴う技術が、たとえば特許文献3に記載されている。フェーズ・ヴォコーダーなど、周波数軸上の操作を伴う技術においては、音声データをフーリエ変換して、周波数軸上で位相を操作して、逆フーリエ変換を施し、再度時間軸上のデータに戻すことにより、音声データの伸長・短縮を実現している。この方式は、OLAやPSOLAのような単に時間軸上の操作に較べて良好な変換結果を得ることができる。しかしながら、フーリエ変換や複素数の演算を伴うため、処理が非常に複雑化するという問題点がある。   A technique involving an operation on the frequency axis is described in Patent Document 3, for example. In technologies that involve operations on the frequency axis, such as phase vocoders, the audio data is Fourier transformed, the phase is manipulated on the frequency axis, the inverse Fourier transform is performed, and the data is returned to the data on the time axis again. The voice data has been expanded and shortened. This method can obtain a better conversion result than the operation on the time axis such as OLA and PSOLA. However, there is a problem that the processing becomes very complicated because it involves Fourier transform and complex number calculation.

本発明は、OLA方式を用いて簡易な構成で実現でき、かつ、フレーム接合点での不連続性などに伴う音質劣化を解決したデータ変換装置およびデータ変換プログラムを提供することを目的とする。   An object of the present invention is to provide a data conversion apparatus and a data conversion program that can be realized with a simple configuration using the OLA method, and that solves the deterioration of sound quality caused by discontinuity at a frame junction.

本発明の目的は、入力データの速度に対する前記出力データの再生速度の比を表わす再生速度比を取得する再生速度比取得手段と、
前記取得された再生速度比に基づいて入力フレームメモリ及び出力フレームメモリ夫々のサイズ、並びに前記入力データ及び出力データ夫々に対するオーバーラップ比を決定する決定手段と、
前記速度で順次供給される前記入力データを入力バッファに格納する格納手段と、
前記入力フレームメモリサイズ及び前記入力データに対するオーバーラップ比に基づいて決定される入力ホップサイズ分のデータを前記入力バッファから抽出して前記入力フレームメモリの最後尾にコピーするとともに、前記出力フレームのフレームサイズ及び前記出力データに対するオーバーラップ比に基づいて決定される出力ホップサイズ分のデータを前記出力フレームの先頭から抽出して前記出力バッファにコピーするコピー手段と、
前記入力フレームメモリのデータに窓関数を施す窓関数適用手段と、
前記窓関数を施された入力フレームメモリのデータと、前記出力フレームメモリのデータのうち先頭から前記出力ホップサイズ分のデータ以降のデータとを加算する加算手段と、
前記加算手段により加算された出力フレームメモリのデータを前記出力ホップサイズのデータ分だけ左シフトするとともに、前記入力フレームメモリのデータを前記入力ホップサイズのデータ分だけ左シフトするシフト手段と、
前記出力バッファに格納されたデータを前記出力データとして前記再生速度で順次出力する出力手段と、
を有し、
前記決定手段は、前記取得された再生速度比が、「1」より小さい場合であるスロー再生と、「1」より大きい場合であるファスト再生のそれぞれにおいて、異なるフレームサイズおよびオーバーラップ比を決定するように構成されたことを特徴とするデータ変換装置により達成される。
An object of the present invention is to obtain a reproduction speed ratio acquisition means for acquiring a reproduction speed ratio representing a ratio of the reproduction speed of the output data to the speed of input data;
Determining means for determining a size of each of the input frame memory and the output frame memory and an overlap ratio for each of the input data and the output data based on the acquired reproduction speed ratio;
Storage means for storing the input data sequentially supplied at the speed in an input buffer;
Data for the input hop size determined based on the size of the input frame memory and the overlap ratio for the input data is extracted from the input buffer and copied to the tail of the input frame memory , and the output frame Copy means for extracting data for an output hop size determined based on a frame size and an overlap ratio with respect to the output data from the head of the output frame and copying it to the output buffer;
Window function applying means for applying a window function to the data of the input frame memory ;
An adding means for adding the data of the input frame memory subjected to the window function and data after the data corresponding to the output hop size from the top of the data of the output frame memory ;
Shift means for shifting the data of the output frame memory added by the adding means to the left by the data of the output hop size and shifting the data of the input frame memory to the left by the data of the input hop size;
Output means for sequentially outputting the data stored in the output buffer as the output data at the reproduction speed;
Have
The determining means determines different frame sizes and overlap ratios in each of slow playback where the acquired playback speed ratio is smaller than “1” and fast playback where the acquired playback speed ratio is larger than “1”. This is achieved by a data converter characterized by being configured as described above.

好ましい実施態様においては、前記決定手段が、前記スロー再生のときの前記入力データに対するオーバーラップ比が、前記ファスト再生のときの前記入力データに対するオーバーラップ比より大きいように、前記入力データに対するオーバーラップ比を決定する。 In a preferred embodiment, the determining means, the overlap ratio for the input data when the slow reproduction is to be greater than the overlap ratio for the input data when the fast playback, the overlap with respect to the input data Determine the ratio.

より好ましい実施態様においては、前記決定手段が、前記スロー再生のときの前記入力データに対するオーバーラップ比を「3」または「4」、前記ファスト再生のときの前記入力データに対するオーバーラップ比を「2」と決定する。 In a more preferred embodiment, the determining means sets the overlap ratio for the input data during the slow playback to “3” or “4”, and sets the overlap ratio for the input data during the fast playback to “2”. Is determined.

また、本発明の目的は、入力データの速度に対する前記出力データの再生速度の比を表わす再生速度比を取得する再生速度比取得ステップと、
前記取得された再生速度比に基づいて入力フレームメモリ及び出力フレームメモリ夫々のサイズ、並びに前記入力データ及び出力データ夫々に対するオーバーラップ比を決定するとともに、前記取得された再生速度比が、「1」より小さい場合であるスロー再生と、「1」より大きい場合であるファスト再生のそれぞれにおいて、異なるフレームサイズおよびオーバーラップ比を決定する決定ステップと、
前記速度で順次供給される前記入力データを入力バッファに格納する格納ステップと、
前記入力フレームメモリのサイズ及び前記入力データに対するオーバーラップ比に基づいて決定される入力ホップサイズ分のデータを前記入力バッファから抽出して前記入力フレームメモリの最後尾にコピーするとともに、前記出力フレームのフレームサイズ及び前記出力データに対するオーバーラップ比に基づいて決定される出力ホップサイズ分のデータを前記出力フレームの先頭から抽出して出力バッファにコピーするコピーステップと、
前記入力フレームメモリのデータに窓関数を施す窓関数適用ステップと、
前記窓関数を施された入力フレームメモリのデータと、前記出力フレームメモリのデータのうち先頭から前記出力ホップサイズ分のデータ以降のデータとを加算する加算ステップと、
前記加算された出力フレームメモリのデータを前記出力ホップサイズのデータ分だけ左シフトするとともに、前記入力フレームメモリのデータを前記入力ホップサイズのデータ分だけ左シフトするシフトステップと、
前記出力バッファに格納されたデータを前記出力データとして前記再生速度で順次出力する出力ステップと、
をコンピュータに実行させるデータ変換プログラムにより達成される。
Further, an object of the present invention is to obtain a reproduction speed ratio obtaining step for obtaining a reproduction speed ratio representing a ratio of the reproduction speed of the output data to the speed of input data,
Based on the acquired reproduction speed ratio, the sizes of the input frame memory and the output frame memory, and the overlap ratio for the input data and the output data are determined, and the acquired reproduction speed ratio is “1”. A determination step for determining different frame sizes and overlap ratios in each of slow playback that is smaller than and fast playback that is larger than “1”;
Storing the input data sequentially supplied at the speed in an input buffer;
Data for the input hop size determined based on the size of the input frame memory and the overlap ratio for the input data is extracted from the input buffer and copied to the tail of the input frame memory, and the output frame A copy step of extracting data for an output hop size determined based on a frame size and an overlap ratio with respect to the output data from the head of the output frame and copying it to an output buffer;
A window function applying step for applying a window function to the data of the input frame memory;
An addition step of adding the data of the input frame memory subjected to the window function and the data after the data corresponding to the output hop size from the top of the data of the output frame memory;
A shift step of shifting the data of the added output frame memory to the left by the data of the output hop size, and shifting the data of the input frame memory to the left by the data of the input hop size;
An output step of sequentially outputting the data stored in the output buffer as the output data at the reproduction speed;
Is achieved by a data conversion program that causes a computer to execute.

本発明によれば、OLA方式を用いて簡易な構成で実現でき、かつ、フレーム接合点での不連続性などに伴う音質劣化を解決したデータ変換装置およびデータ変換プログラムを提供することが可能となる。   According to the present invention, it is possible to provide a data conversion apparatus and a data conversion program that can be realized with a simple configuration using the OLA method, and that solves sound quality degradation caused by discontinuities at the frame junctions. Become.

図1は、本発明の実施の形態にかかるデータ変換装置の概略を示す図である。FIG. 1 is a diagram showing an outline of a data conversion apparatus according to an embodiment of the present invention. 図2は、本実施の形態にかかる信号変換部および使用する記憶部の構成を示すブロックダイヤグラムである。FIG. 2 is a block diagram showing the configuration of the signal conversion unit and the storage unit used according to the present embodiment. 図3は、本実施の形態にかかるデータ変換装置において実行されるメインフローの例を示すフローチャートである。FIG. 3 is a flowchart showing an example of a main flow executed in the data conversion apparatus according to the present embodiment. 図4は、本実施の形態にかかるスイッチ処理の例を示すフローチャートである。FIG. 4 is a flowchart illustrating an example of the switch processing according to the present embodiment. 図5は、OLA方式におけるフレーム加算の概略を示す図である。FIG. 5 is a diagram showing an outline of frame addition in the OLA system. 図6は、スロー再生の際のフレーム加算の概略を示す図である。FIG. 6 is a diagram showing an outline of frame addition at the time of slow reproduction. 図7は、スロー再生の際のフレーム加算の概略を示す図である。FIG. 7 is a diagram showing an outline of frame addition at the time of slow reproduction. 図8は、本実施の形態にかかる入力バッファ、入力フレーム、出力フレームおよび出力バッファの例を示す図である。FIG. 8 is a diagram illustrating an example of an input buffer, an input frame, an output frame, and an output buffer according to the present embodiment. 図9は、本実施の形態にかかる入力バッファ、入力フレーム、出力フレームおよび出力バッファの他の例を示す図である。FIG. 9 is a diagram illustrating another example of the input buffer, the input frame, the output frame, and the output buffer according to the present embodiment. 図10は、本実施の形態にかかるデータ変換処理の例を示すフローチャートである。FIG. 10 is a flowchart illustrating an example of data conversion processing according to the present embodiment. 図11(a)は、i=1のとき、図11(b)は、i=2のときのステップ1003における、入力フレームのサブフレームへのデータ配置を説明する図、図11(c)は、処理を繰り返すことにより得られる入力フレームの例を示す図である。11A is a diagram for explaining the data arrangement in the subframe of the input frame in step 1003 when i = 1, FIG. 11B is a diagram for explaining the data arrangement in the subframe, and FIG. It is a figure which shows the example of the input frame obtained by repeating a process. 図12(a)〜(c)は、ステップ1005〜1008により生成される入力フレーム、出力フレームの例を示す図である。12A to 12C are diagrams illustrating examples of input frames and output frames generated in steps 1005 to 1008.

以下、添付図面を参照して、本発明の実施の形態について説明する。図1は、本発明の実施の形態にかかるデータ変換装置の概略を示す図である。図1に示すように、本実施の形態にかかるデータ変換装置10は、CPU11、入力部12、表示部13、RAM14、ROM15、大規模記憶装置16、入力インタフェース(I/F)17、信号変換部18、オーディオ回路19を有する。   Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a diagram showing an outline of a data conversion apparatus according to an embodiment of the present invention. As shown in FIG. 1, a data conversion apparatus 10 according to this embodiment includes a CPU 11, an input unit 12, a display unit 13, a RAM 14, a ROM 15, a large-scale storage device 16, an input interface (I / F) 17, and a signal conversion. Section 18 and audio circuit 19.

入力部12は、再生速度設定スイッチ、テンキーなどキー、スイッチを有する。表示部13は、たとえば、液晶表示装置を含む。CPU11は、入力部12のスイッチ操作の検出、スイッチ操作に基づく再生速度比の決定、スイッチ操作に基づく変換処理の起動、変換処理に用いるパラメータの算出、パラメータの信号変換部18への伝達、入力I/F17の制御など種々の処理を実行する。   The input unit 12 includes keys and switches such as a playback speed setting switch and a numeric keypad. The display unit 13 includes, for example, a liquid crystal display device. The CPU 11 detects the switch operation of the input unit 12, determines the reproduction speed ratio based on the switch operation, starts the conversion process based on the switch operation, calculates the parameter used for the conversion process, transmits the parameter to the signal conversion unit 18, and inputs Various processes such as control of the I / F 17 are executed.

ROM14は、CPU11により実行される種々の処理、たとえば、入力部12のスイッチ操作の検出、スイッチ操作に基づく再生速度比の決定、スイッチ操作に基づく変換処理の起動、変換処理に用いるパラメータの算出、パラメータの信号変換部18への伝達、入力I/F17の制御などの処理プログラムを格納する。RAM15は、入力I/F17により取得された入力データを格納する入力バッファ、オーディオ回路19により読み出される出力バッファ、処理中のデータを一時的に記憶する入力フレームおよび出力フレームなどのためのデータ記憶領域を提供する。また、RAM15には処理で用いられる各種のパラメータが格納される。大規模記憶装置16は、ハードディスク装置やカード型の記憶装置を含み、入力I/F17を介して入力されたデータや、信号変換部18により変換されたデータを記憶することができる。   The ROM 14 performs various processes executed by the CPU 11, for example, detection of a switch operation of the input unit 12, determination of a reproduction speed ratio based on the switch operation, activation of a conversion process based on the switch operation, calculation of parameters used for the conversion process, Processing programs such as transmission of parameters to the signal converter 18 and control of the input I / F 17 are stored. The RAM 15 is a data storage area for an input buffer that stores input data acquired by the input I / F 17, an output buffer that is read by the audio circuit 19, an input frame that temporarily stores data being processed, an output frame, and the like. I will provide a. The RAM 15 stores various parameters used in processing. The large-scale storage device 16 includes a hard disk device and a card-type storage device, and can store data input via the input I / F 17 and data converted by the signal conversion unit 18.

入力I/F17は、マイク20と接続され、また、入力端子21を有する。マイク20から入力された音声信号は、CPU11の指示に従って、入力I/F17においてディジタル変換され、ディジタルの入力データとしてRAM14や大規模記憶装置16に格納される。また、本実施の形態においては、入力端子21を介して、オーディオ機器からの音声信号を入力して、ディジタルの入力データをRAM14や大規模記憶装置16に格納することもできる。   The input I / F 17 is connected to the microphone 20 and has an input terminal 21. The audio signal input from the microphone 20 is digitally converted at the input I / F 17 in accordance with an instruction from the CPU 11 and stored in the RAM 14 or the large-scale storage device 16 as digital input data. In the present embodiment, an audio signal from an audio device can be input via the input terminal 21, and digital input data can be stored in the RAM 14 or the large-scale storage device 16.

信号変換部18は、入力データに基づいて、時間伸長処理或いは時間短縮処理を実行して、その再生速度が変換された出力データを生成する。信号変換部18の構成および信号変換部18において実行される処理については後述する。オーディオ回路19は、D/A変換器および増幅回路(ともに図示せず)を有し、出力データを、アナログの音声信号に変換して増幅し、スピーカ32から音響信号を出力する。   The signal conversion unit 18 executes time expansion processing or time reduction processing based on input data, and generates output data in which the reproduction speed is converted. The configuration of the signal converter 18 and the processing executed in the signal converter 18 will be described later. The audio circuit 19 includes a D / A converter and an amplifier circuit (both not shown), converts the output data into an analog audio signal, amplifies it, and outputs an acoustic signal from the speaker 32.

図2は、本実施の形態にかかる信号変換部および使用する記憶部の構成を示すブロックダイヤグラムである。図2に示すように、本実施の形態にかかる信号変換部18は、入力フレームデータ生成部26と、フレーム間演算部30と、出力バッファデータ生成部28と、を有する。入力フレームデータ生成部26は、入力バッファ25に格納された入力データを読み出して、読み出された入力データを、入力フレーム27中の所定の位置に格納する。また、出力バッファデータ生成部28は、出力フレーム29から所定のデータを取り出して、出力バッファ31中に格納する。出力バッファ31に格納された出力データは、オーディオ回路19によりアナログの音声信号に変換され、スピーカ32から出力される。   FIG. 2 is a block diagram showing the configuration of the signal conversion unit and the storage unit used according to the present embodiment. As shown in FIG. 2, the signal conversion unit 18 according to the present embodiment includes an input frame data generation unit 26, an interframe calculation unit 30, and an output buffer data generation unit 28. The input frame data generation unit 26 reads the input data stored in the input buffer 25 and stores the read input data at a predetermined position in the input frame 27. Further, the output buffer data generation unit 28 extracts predetermined data from the output frame 29 and stores it in the output buffer 31. The output data stored in the output buffer 31 is converted into an analog audio signal by the audio circuit 19 and output from the speaker 32.

フレーム間演算部30は、入力フレーム27や出力フレーム29におけるデータシフトなどのデータ操作、入力フレーム27に窓関数を施すこと、入力フレームのデータ値を、対応する出力フレーム29のデータ値に加算することなど、フレームに関する処理、および、フレーム間に関する種々の処理を実行する。   The inter-frame operation unit 30 performs data operations such as data shift in the input frame 27 and the output frame 29, applies a window function to the input frame 27, and adds the data value of the input frame to the data value of the corresponding output frame 29. For example, various processes relating to frames and inter-frame processes are executed.

図3は、本実施の形態にかかるデータ変換装置において実行されるメインフローの例を示すフローチャートである。図3に示すように、電源の投入とともに、メインフローは起動し、CPU11は、RAM14中の入力バッファ25のクリア、入力フレーム27のクリア、出力フレーム29のクリア、出力バッファ31のクリア、各種パラメータのクリアを含むイニシャライズ処理を実行する(ステップ301)
イニシャライズ処理が終了すると、ステップ302以降の処理が繰り返し実行される。ステップ302のスイッチ処理において、入力部12を構成するスイッチの操作があったかが判断され、スイッチ操作があった場合には、操作にしたがった処理が実行される。図4は、本実施の形態にかかるスイッチ処理の例を示すフローチャートである。図4に示すように、CPU11は、スイッチ12を構成するスイッチのうち、再生速度設定スイッチがオンされたかを判断する(ステップ401)。ステップ401でYesと判断された場合には、CPU11は、テンキーの操作或いは「+(プラス)」キー或いは「−(マイナス)」キーの操作に基づいて、入力された再生速度比を取得する(ステップ402)。
FIG. 3 is a flowchart showing an example of a main flow executed in the data conversion apparatus according to the present embodiment. As shown in FIG. 3, when the power is turned on, the main flow starts, and the CPU 11 clears the input buffer 25 in the RAM 14, clears the input frame 27, clears the output frame 29, clears the output buffer 31, and various parameters. Execute initialization processing including clearing (step 301)
When the initialization process is completed, the processes after step 302 are repeatedly executed. In the switch process of step 302, it is determined whether or not a switch constituting the input unit 12 has been operated. If a switch operation has been performed, a process according to the operation is executed. FIG. 4 is a flowchart illustrating an example of the switch processing according to the present embodiment. As shown in FIG. 4, the CPU 11 determines whether the playback speed setting switch among the switches constituting the switch 12 is turned on (step 401). If YES is determined in step 401, the CPU 11 acquires the input playback speed ratio based on the operation of the numeric keypad or the operation of the “+ (plus)” key or the “− (minus)” key ( Step 402).

再生速度比とは、入力データの速度を「1」としたときの、変換された出力データの再生速度を示す。再生速度比が「2」であるとは、出力データが、入力データの2倍の速度で再生されることを示す。また、再生速度比が「0.5」であることは、出力でデータが、入力データの半分の速度で再生されることを示す。また、後述するデータ変換処理における、「伸縮比」は、再生速度比の逆数、つまり、「1/再生速度比」と等価である。   The reproduction speed ratio indicates the reproduction speed of the converted output data when the speed of the input data is “1”. A reproduction speed ratio of “2” indicates that the output data is reproduced at twice the speed of the input data. A reproduction speed ratio of “0.5” indicates that data is reproduced at the output at half the speed of the input data. In the data conversion process described later, the “stretch ratio” is equivalent to the reciprocal of the reproduction speed ratio, that is, “1 / reproduction speed ratio”.

次いで、CPU11は、再生速度比に基づいて、入力バッファ25および入力フレーム27のサイズ、オーバーラップ比、出力フレーム29のサイズおよび出力バッファ31のサイズを決定する(ステップ403)。本実施の形態においては、再生速度比が0.5〜2の範囲で、入力データを指定された再生速度比で変換し、変換により得られた出力データを出力している。また、本実施の形態においては、OLA方式を採用し、複雑な演算を経ることなく、入力データを変換して出力データを取得する。   Next, the CPU 11 determines the size of the input buffer 25 and the input frame 27, the overlap ratio, the size of the output frame 29, and the size of the output buffer 31 based on the reproduction speed ratio (step 403). In the present embodiment, input data is converted at a specified reproduction speed ratio within a reproduction speed ratio range of 0.5 to 2, and output data obtained by the conversion is output. In the present embodiment, the OLA method is adopted, and input data is converted and output data is acquired without complicated calculations.

OLA方式においては、入力データを、まず、所定サイズの入力フレームに分割する。また、各フレームは部分的に重なり合うように抽出され、かつ、出力データにおいても、各フレームが部分的に重なったようなデータ値となっている。上記フレームの重なり具合を示すパラメータとしてオーバーラップ比が用いられる。オーバーラップ比は、フレームが、フレームサイズ全体に対して、どのくらいずらされるかを示す。たとえば、オーバーラップ比が「4」であれば、フレームは、フレームサイズの1/4だけずらされることを意味する。また、このときの、フレームのずれの量をホップサイズと称する。   In the OLA method, input data is first divided into input frames of a predetermined size. Each frame is extracted so as to partially overlap, and the output data has a data value such that each frame partially overlaps. An overlap ratio is used as a parameter indicating the degree of overlap of the frames. The overlap ratio indicates how much the frame is shifted relative to the overall frame size. For example, if the overlap ratio is “4”, it means that the frame is shifted by ¼ of the frame size. The amount of frame shift at this time is referred to as a hop size.

フレームを重ね合わせて加算する際には、フレームに窓関数を施して、窓関数が施されたデータが加算される。たとえば、窓関数としてハニング窓を使用することができる。入力データに関するホップサイズと、出力データに関するホップサイズとが等しければ、重ねあわされた分だけ振幅は増加するが、もとの波形の形状が維持される。また、出力データに関するホップサイズが、入力データに関するホップサイズより大きければ、時間伸長処理が施されることになり、その結果、再生速度が遅くなるいわゆるスロー再生となる。その一方、出力データに関するホップサイズが、入力データに関するホップサイズより小さければ、時間短縮処理が実行されることになり、その結果、再生速度が速くなるいわゆるファスト再生となる。   When the frames are superimposed and added, a window function is applied to the frames, and the data subjected to the window function is added. For example, a Hanning window can be used as the window function. If the hop size related to the input data is equal to the hop size related to the output data, the amplitude increases by the overlapped amount, but the original waveform shape is maintained. In addition, if the hop size related to the output data is larger than the hop size related to the input data, the time extension processing is performed, and as a result, so-called slow playback is performed in which the playback speed is slow. On the other hand, if the hop size related to the output data is smaller than the hop size related to the input data, the time shortening process is executed, and as a result, so-called fast playback is achieved in which the playback speed is increased.

図5は、OLA方式におけるフレーム加算の概略を示す図、また、図6は、スロー再生の際における、フレーム加算の概略を示す図である。図6において、入力データに関するホップサイズ(図6において「HOPSIZE」と示す)より、出力データに関するホップサイズ(図6において、「HOPSIZE’」と示す)が大きいため、出力フレームのサイズも入力フレームより大きくなる。また、重ね合わせの際に、出力データに関するホップサイズ「HOPSIZE’」にしたがって、矢印方向に重ねあわせるべきフレームが移動する。   FIG. 5 is a diagram showing an outline of frame addition in the OLA system, and FIG. 6 is a diagram showing an outline of frame addition in slow reproduction. In FIG. 6, since the hop size related to the output data (shown as “HOPSIZE ′” in FIG. 6) is larger than the hop size related to the input data (shown as “HOPSIZE” in FIG. 6), the size of the output frame is also larger than that of the input frame. growing. Further, at the time of superposition, the frame to be superposed moves in the direction of the arrow according to the hop size “HOPSIZE ′” related to the output data.

フレームの重ね合わせの際に、フレームサイズとオーバーラップ比を適切に設定しないと、スロー再生、ファスト再生の何れにおいても音質が劣化する。たとえば、図7に示すように、オーバーラップ比を最小値である「2」として、時間伸長処理を行なった上でスロー再生を行なうと、フレーム加算によってデータ値のレベルを一定に保持することができず、振幅が揺らいでしまうという問題点がある(図7の破線参照)。また、オーバーラップ比が小さいことは、接合点における不連続性、つまり、複数の波形が重ねあわされている部分のデータの不連続性を、オーバーラップにより解決することができないという問題点があった。   If the frame size and overlap ratio are not set appropriately when frames are superimposed, the sound quality deteriorates in both slow playback and fast playback. For example, as shown in FIG. 7, when the overlap ratio is set to “2” which is the minimum value and the slow reproduction is performed after performing the time extension processing, the level of the data value can be kept constant by frame addition. There is a problem that the amplitude does not fluctuate (see the broken line in FIG. 7). In addition, the small overlap ratio has the problem that the discontinuity at the junction point, that is, the discontinuity of the data where the plurality of waveforms are overlapped, cannot be solved by the overlap. It was.

その一方、オーバーラップ比を大きくすることにより、上記接合点における不連続性は軽減されるが、以下に述べるような別の問題が生じる。オーバーラップ比を大きくすることにしたがって、重なり合うフレーム数が増大する。したがって、くし型フィルタの効果が多重にかかり、その結果、音質が大きく変化してしまう。フレームサイズを大きくした場合にも、重なり合う部分が大きくなるため、同様にくし型フィルタの効果が過剰となる。   On the other hand, by increasing the overlap ratio, the discontinuity at the junction point is reduced, but another problem as described below arises. As the overlap ratio is increased, the number of overlapping frames increases. Therefore, the effect of the comb filter is applied in multiple, and as a result, the sound quality is greatly changed. Even when the frame size is increased, the overlapping portion becomes larger, so that the effect of the comb filter is excessively increased.

本出願人は、OLA方式によるスロー再生、ファスト再生の双方において、オーバーラップ比は「2」以上であり、かつ、できるだけ小さい値が望ましいことを知見した。また、オーバーラップ比を「2」とすると、時間伸長処理によるスロー再生においては、振幅が揺らぐ問題や不連続性の問題が生じるが、時間短縮処理によるファスト再生である限り、オーバーラップ比が、最小値である「2」であっても問題がないこと知見した。   The present applicant has found that the overlap ratio is “2” or more in both slow reproduction and fast reproduction by the OLA method, and that the smallest possible value is desirable. In addition, when the overlap ratio is “2”, in the slow reproduction by the time extension process, the problem of the amplitude fluctuation and the problem of discontinuity occur. However, as long as the fast reproduction by the time reduction process, the overlap ratio is It has been found that there is no problem even with the minimum value “2”.

スロー再生においては、上述したように不連続性の問題が生じないように、オーバーラップ比は「2」より大きいのが望ましい。また、くし形フィルタ効果の影響を考慮すると、オーバーラップ比は、「3」または「4」が望ましいことが見出されている。なお、処理のしやすさを考慮して、本実施の形態においては、スロー再生におけるオーバーラップ比は「4」としている。   In the slow reproduction, it is desirable that the overlap ratio is larger than “2” so that the problem of discontinuity does not occur as described above. Further, it has been found that the overlap ratio is preferably “3” or “4” in consideration of the influence of the comb filter effect. In consideration of the ease of processing, in this embodiment, the overlap ratio in slow playback is set to “4”.

また、フレームサイズも、くし型フィルタ効果の影響を考慮して決定されるのが望ましい。本出願人は、オーバーラップ比が「2」であるときには、サンプリング周波数に相当するサンプル数の1/5程度、オーバーラップ比が「4」であるときには、サンプリング周波数に相当するサンプル数の1/10程度が適切であることを知見した。図8は、本実施の形態にかかる入力バッファ、入力フレーム、出力フレームおよび出力バッファの例を示す図である。図8に示す例は、再生速度比Rが「1」より小さいスロー再生のときの例を示す。   The frame size is preferably determined in consideration of the influence of the comb filter effect. When the overlap ratio is “2”, the applicant of the present invention is about 1/5 of the number of samples corresponding to the sampling frequency, and when the overlap ratio is “4”, 1 / of the number of samples corresponding to the sampling frequency. It was found that about 10 is appropriate. FIG. 8 is a diagram illustrating an example of an input buffer, an input frame, an output frame, and an output buffer according to the present embodiment. The example shown in FIG. 8 shows an example when the playback speed ratio R is slow playback smaller than “1”.

本実施の形態においては、サンプリング周波数が44.1KHz(44,100Hz)であり、入力バッファ801と入力フレーム802のサイズ(フレームサイズ)は、ともに「4096」である。また、オーバーラップ比は「4」であり、フレーサイズをオーバーラップ比で割った値に相当するサブフレームのサイズは「1024」である(符号811参照)。なお、フレームサイズは、サンプリング周波数の1/10と厳密には相違するが、処理の簡便さから2のべき乗のうち、サンプリング周波数の1/10である「4410」に最も近い値を採用した。   In this embodiment, the sampling frequency is 44.1 KHz (44,100 Hz), and the sizes (frame sizes) of the input buffer 801 and the input frame 802 are both “4096”. The overlap ratio is “4”, and the size of the subframe corresponding to the value obtained by dividing the frame size by the overlap ratio is “1024” (see reference numeral 811). Although the frame size is strictly different from 1/10 of the sampling frequency, a value closest to “4410”, which is 1/10 of the sampling frequency, among powers of 2 is adopted for the convenience of processing.

また、本実施の形態にかかる出力フレーム803は、その先頭に、入力バッファ801および入力フレーム802のサブフレームのサイズを再生速度比で割ったサイズ(1024/R)のサブフレーム831を有する。また、先頭のサブフレーム831の後ろには、入力バッファ801や入力フレーム802のサブフレームと、同様のサイズの4つのサブフレーム(たとえば、符号832参照)が配置される。   Further, the output frame 803 according to the present embodiment has a subframe 831 having a size (1024 / R) obtained by dividing the size of the subframes of the input buffer 801 and the input frame 802 by the reproduction speed ratio at the head thereof. In addition, after the first subframe 831, four subframes (for example, reference numeral 832) having the same size as the subframes of the input buffer 801 and the input frame 802 are arranged.

本実施の形態にかかる出力バッファ804は、そのサイズが出力フレームの先頭のサブフレーム831と同一(つまり、1024/R)の、4つのサブフレーム(たとえば符号841参照)から構成される。   The output buffer 804 according to the present embodiment is composed of four subframes (see, for example, reference numeral 841) whose size is the same as that of the first subframe 831 of the output frame (that is, 1024 / R).

図9は、本実施の形態にかかる入力バッファ、入力フレーム、出力フレームおよび出力バッファの他の例を示す図である。図9に示す例は、再生速度比Rが「1」より大きいファスト再生のときの例を示す。ファスト再生のときの入力バッファ901および入力フレーム902のサイズは、そもに「8192」である。また、オーバーラップ比は「2」であり、サブフレームのサイズは「4096」である。   FIG. 9 is a diagram illustrating another example of the input buffer, the input frame, the output frame, and the output buffer according to the present embodiment. The example shown in FIG. 9 shows an example in the case of fast playback where the playback speed ratio R is larger than “1”. The sizes of the input buffer 901 and the input frame 902 at the time of fast reproduction are originally “8192”. The overlap ratio is “2”, and the size of the subframe is “4096”.

出力フレーム903の先頭のサブフレーム931のサイズは、入力バッファ901および入力フレーム902のサブフレームのサイズを再生速度比で割ったサイズ(4096/R)である。また、先頭のサブフレーム931の後ろには、入力バッファ901や入力フレーム902のサブフレームと、同様のサイズの2つのサブフレーム(たとえば、符号932参照)が配置される。また、本実施の形態にかかる出力バッファ904は、そのサイズが出力フレームの先頭のサブフレーム931と同一(つまり、4096/R)の、2つのサブフレーム(たとえば符号941参照)から構成される。   The size of the head subframe 931 of the output frame 903 is a size (4096 / R) obtained by dividing the sizes of the subframes of the input buffer 901 and the input frame 902 by the reproduction speed ratio. Further, behind the first subframe 931, two subframes (for example, reference numeral 932) of the same size as the subframes of the input buffer 901 and the input frame 902 are arranged. In addition, the output buffer 904 according to the present embodiment is composed of two subframes (for example, see reference numeral 941) whose size is the same as that of the first subframe 931 of the output frame (that is, 4096 / R).

本実施の形態においては、再生速度比が「1」より大きい場合の入力バッファおよび入力フレームのサイズ、並びに、オーバーラップ比の組と、再生速度比が「1」より小さい場合の、入力バッファおよび入力フレームのサイズ、並びに、オーバーラップ比の組とがRAM14に格納されている。したがって、スイッチ処理のステップ402において、再生速度比が取得され、また、ステップ403において、再生速度比に応じた、入力バッファおよび入力フレームのサイズ、並びに、オーバーラップ比の組が取得される。   In the present embodiment, the size of the input buffer and the input frame when the reproduction speed ratio is larger than “1”, the set of overlap ratios, and the input buffer and the input buffer when the reproduction speed ratio is smaller than “1”. The size of the input frame and the set of overlap ratios are stored in the RAM 14. Therefore, in step 402 of the switch process, the playback speed ratio is acquired, and in step 403, the size of the input buffer and the input frame and the set of overlap ratios corresponding to the playback speed ratio are acquired.

再生速度比が「1」より小さい場合、つまり、スロー再生の場合には、図8に示すようなサイズの入力バッファ、入力フレーム、出力フレームおよび出力バッファのためのデータ領域がRAM14中に確保される(ステップ404)。たとえば、再生速度比が「0.8」であれば、出力フレーム803の先頭のサブフレーム(符号831参照)や、出力バッファ804のサブフレーム(符号841参照)のサイズは「1280」となり、出力バッファ804のフレームサイズは「5120」となる。その一方、再生速度比が「1」より大きい場合、つまり、ファスト再生の場合には、図9に示すようなサイズの入力バッファ、入力フレーム、出力フレームおよび出力バッファのためのデータ領域をRAM14中に確保される(ステップ404)。ステップ404の後、他のスイッチ処理が実行される(ステップ405)。   When the playback speed ratio is smaller than “1”, that is, in the case of slow playback, the input buffer, the input frame, the output frame, and the data area for the output buffer having the sizes shown in FIG. (Step 404). For example, if the playback speed ratio is “0.8”, the size of the first subframe (see reference numeral 831) of the output frame 803 and the subframe of the output buffer 804 (see reference numeral 841) is “1280”. The frame size of the buffer 804 is “5120”. On the other hand, when the reproduction speed ratio is larger than “1”, that is, in the case of fast reproduction, the input buffer, the input frame, the output frame, and the data area for the output buffer having the sizes shown in FIG. (Step 404). After step 404, another switch process is executed (step 405).

スイッチ処理の後、CPU11および入力I/F21は、データ入力処理を実行する(ステップ303)。データ入力処理においては、CPU11は、タイマ(図示せず)を参照して、データの入力タイミングとなっているかを判断し、入力タイミングが到来している場合には、CPU11は、入力I/F17に対して、入力されたデータを入力データバッファ25に格納するように指示する。入力I/F17は、入力されたデータを順次入力データバッファに格納していく。入力I/F17に一時的に記憶されていたデータが全て入力データバッファに格納されると、データ入力処理は終了する。   After the switch process, the CPU 11 and the input I / F 21 execute a data input process (step 303). In the data input process, the CPU 11 refers to a timer (not shown) to determine whether it is a data input timing. If the input timing has arrived, the CPU 11 determines that the input I / F 17 is input. Is instructed to store the input data in the input data buffer 25. The input I / F 17 sequentially stores the input data in the input data buffer. When all the data temporarily stored in the input I / F 17 is stored in the input data buffer, the data input process ends.

データ入力処理の後、CPU11の指示により信号変換部18が、データ変換処理を実行する(ステップ304)。図10は、本実施の形態にかかるデータ変換処理の例を示すフローチャートである。図10に示すように、信号変換部18は、サブフレームを特定するパラメータiを初期化する(ステップ1001)。   After the data input process, the signal conversion unit 18 executes the data conversion process according to an instruction from the CPU 11 (step 304). FIG. 10 is a flowchart illustrating an example of data conversion processing according to the present embodiment. As shown in FIG. 10, the signal conversion unit 18 initializes a parameter i for specifying a subframe (step 1001).

次いで、信号変換部18は、パラメータiがオーバーラップ比より大きいかを判断する(ステップ1002)。ステップ1002でNoと判断された場合には、信号変換部18(入力フレームデータ生成部26)は、入力バッファの第i番のサブフレームを、入力フレームの最後尾のサブフレームにコピーする(ステップ1003)。図11(a)は、i=1のとき、図11(b)は、i=2のときのステップ1003における、入力フレームのサブフレームへのデータ配置を説明する図である。入力フレーム1100に、先頭のサブフレームからIn(T)、In(T+1)、In(T+2)およびIn(T+3)というデータが格納されていた場合に、図11(a)、(b)に示すように、第1番、第2番のサブフレームのデータが、入力フレーム1110の末尾のサブフレームに格納される。   Next, the signal converter 18 determines whether or not the parameter i is larger than the overlap ratio (step 1002). When it is determined No in step 1002, the signal conversion unit 18 (input frame data generation unit 26) copies the i-th subframe of the input buffer to the last subframe of the input frame (step 1003). FIG. 11A is a diagram for explaining the data arrangement in the subframe of the input frame in step 1003 when i = 1 and FIG. 11B is the case when i = 2. When data of In (T), In (T + 1), In (T + 2), and In (T + 3) are stored in the input frame 1100 from the first subframe, they are shown in FIGS. As described above, the data of the first and second subframes are stored in the last subframe of the input frame 1110.

後述するように、ステップ1007で入力フレームのサブフレームがそれぞれシフトされる。したがって、ステップ1002を繰り返すことにより、入力フレームにおいて、先頭からサブフレームIn(t−3)、In(t−2)、In(t−1)、In(t)が格納されることになる。   As will be described later, in step 1007, the subframes of the input frame are shifted. Therefore, by repeating step 1002, subframes In (t-3), In (t-2), In (t-1), and In (t) are stored from the beginning in the input frame.

次いで、信号変換部18(出力バッファデータ生成部28)は、出力フレームの先頭のサブフレームを、出力バッファの第i番のサブフレームにコピーする(ステップ1004)。後述するようにステップ1008において、出力フレームのサブフレームがそれぞれシフトされるため、ステップ1004において、先頭のサブフレームには、第i番の出力バッファのサブフレームに相当するデータが配置されている。   Next, the signal converter 18 (output buffer data generator 28) copies the first subframe of the output frame to the i-th subframe of the output buffer (step 1004). As will be described later, since the subframes of the output frame are shifted in step 1008, in step 1004, data corresponding to the subframe of the i-th output buffer is arranged in the first subframe.

ステップ1004の後、信号変換部18(フレーム間演算部30)は、入力フレームにハニング窓を施す(ステップ1005)。次いで、信号処理部18は、ハニング窓が施された入力フレームのデータ値と、出力フレームの第2番のサブフレーム以降の対応するデータ値とを加算する(ステップ1006)。図12(a)に示すように、ステップ1005においては、入力フレーム1200にハニング窓1202に施され、ハニング窓が施されたデータ値が格納された入力フレーム1203が得られる。また、図12(b)に示すように、ステップ1006においては、ハニング窓が施されたデータ値が格納された入力フレーム1203の第k番サブフレーム(k=1〜4)と、出力フレーム1204の第(k+1)番サブフレームとが重なるように、対応するデータ値が加算される。   After step 1004, the signal conversion unit 18 (interframe calculation unit 30) performs a Hanning window on the input frame (step 1005). Next, the signal processing unit 18 adds the data value of the input frame subjected to the Hanning window and the corresponding data value after the second subframe of the output frame (step 1006). As shown in FIG. 12A, in step 1005, the input frame 1200 is applied to the Hanning window 1202, and an input frame 1203 in which the data value subjected to the Hanning window is stored is obtained. Also, as shown in FIG. 12B, in step 1006, the k-th subframe (k = 1 to 4) of the input frame 1203 storing the data value subjected to the Hanning window, and the output frame 1204 Corresponding data values are added so that the (k + 1) th subframe overlaps.

ステップ1006の後、信号変換部18(入力フレームデータ生成部26)は、入力フレームのデータ値を、サブフレーム1つ分だけ左側(先頭側)にシフトする(ステップ1007)。これにより、ステップ1006における第k番サブフレーム(k=2〜4)は、それぞれ、ステップ1007の後に第(k−1)番のサブフレームとなる。ステップ1006における第1番サブフレームは破棄される。また、入力フレームの第4番サブフレームには、次回のステップ1003において、入力バッファのサブフレームがコピーされるが、ステップ1006では、たとえば、データ値「0」を格納しておけば良い。   After step 1006, the signal conversion unit 18 (input frame data generation unit 26) shifts the data value of the input frame to the left (first side) by one subframe (step 1007). Thereby, the kth subframe (k = 2 to 4) in step 1006 becomes the (k−1) th subframe after step 1007, respectively. The first subframe in step 1006 is discarded. Further, in the next step 1003, the subframe of the input buffer is copied to the fourth subframe of the input frame. In step 1006, for example, the data value “0” may be stored.

また、信号変換部18(出力データバッファデータ生成部28)は、出力フレームのデータ値を、出力フレームの第1番サブフレーム分だけ左側(先頭側)にシフトする(ステップ1008)。図12(c)に示すように、ステップ1008の処理後の出力フレーム1205においては、その先頭から、ステップ1008の処理前における出力フレーム1204の第2番サブフレーム〜第4番サブフレームが順次格納される。また、ステップ1008において、信号変換部18は、末尾の所定量のデータ値(出力フレームの第1番サブフレームのサイズに相当するデータ値:符号1206参照)に「0」を格納する。   Further, the signal conversion unit 18 (output data buffer data generation unit 28) shifts the data value of the output frame to the left (first side) by the first subframe of the output frame (step 1008). As shown in FIG. 12C, in the output frame 1205 after the process of step 1008, the second to fourth subframes of the output frame 1204 before the process of step 1008 are sequentially stored from the beginning. Is done. In step 1008, the signal conversion unit 18 stores “0” in a predetermined amount of data value at the end (data value corresponding to the size of the first subframe of the output frame: reference numeral 1206).

ステップ1009の後、信号変換部18は、パラメータiをインクリメントして(ステップ1009)、ステップ1002に戻る。   After step 1009, the signal converter 18 increments the parameter i (step 1009) and returns to step 1002.

図10に示すデータ変換処理により、複数のサブフレーム(スロー再生では4つのサブフレーム)を含む出力バッファが生成される。出力バッファに格納されたデータにおいては、入力フレームのデータ値がサブフレームの数(オーバーラップ比:スロー再生では「4」)に基づいて重ねあわされている。また、再生速度比を「0.8」とすると、出力バッファのホップサイズは、入力フレームのホップサイズより、1/0.8=1.2倍となっており、再生速度が0.8倍となった時間伸長処理が実現される。   By the data conversion process shown in FIG. 10, an output buffer including a plurality of subframes (four subframes in slow reproduction) is generated. In the data stored in the output buffer, the data value of the input frame is overlaid based on the number of subframes (overlap ratio: “4” in slow playback). When the playback speed ratio is “0.8”, the hop size of the output buffer is 1 / 0.8 = 1.2 times the hop size of the input frame, and the playback speed is 0.8 times. The time extension process is realized.

なお、図11、図12を参照して、データ変換処理において、スロー再生のため、時間伸長処理による出力バッファのデータを生成する例を説明しているが、ファスト再生のための時間短縮処理による場合も、オーバーラップ比、入力バッファのサイズ、入力フレームのサイズ、出力フレームのサイズ、出力バッファのサイズ、および、それぞれのサブフレームのサイズが異なることを除けば、同様に実現できることは言うまでも無い。   11 and 12, in the data conversion process, an example of generating the output buffer data by the time expansion process for the slow reproduction has been described. However, by the time reduction process for the fast reproduction. Of course, the same can be achieved except that the overlap ratio, input buffer size, input frame size, output frame size, output buffer size, and the size of each subframe are different. No.

データ変換処理(図3のステップ304)の後、CPU11は、データ出力処理を実行する(ステップ305)。データ出力処理においては、CPU11は、タイマ(図示せず)を参照して、データの出力タイミングとなっているかを判断し、出力タイミングが到来している場合には、CPU11は、RAM14の出力データバッファから所定のデータを読み出して、オーディオ回路19に出力する。オーディオ回路19は、受け入れたデータをアナログ信号に変換して、増幅し、スピーカ22に出力する。   After the data conversion process (step 304 in FIG. 3), the CPU 11 executes a data output process (step 305). In the data output process, the CPU 11 refers to a timer (not shown) to determine whether it is the data output timing, and when the output timing has arrived, the CPU 11 outputs the output data of the RAM 14. Predetermined data is read from the buffer and output to the audio circuit 19. The audio circuit 19 converts the received data into an analog signal, amplifies it, and outputs it to the speaker 22.

本実施の形態によれば、時間伸長処理を実行すべき場合、つまり、スロー再生の場合と、時間短縮処理を実行すべき場合、つまり、ファスト再生の場合とで、フレームサイズ、ホップサイズ、オーバーラップ比を含むパラメータを切替えて、それぞれに最適なパラメータを用いてデータ変換処理を実行している。これにより、処理の簡易さを確保しつつ、音質の劣化を抑制したファスト再生、および、スロー生成を実現することができる。   According to the present embodiment, when the time extension process is to be executed, that is, in the case of slow playback, and when the time reduction process is to be executed, that is, in the case of fast playback, the frame size, hop size, The parameters including the wrap ratio are switched, and the data conversion process is executed using the optimum parameters for each. As a result, it is possible to realize fast reproduction and slow generation while suppressing deterioration in sound quality while ensuring simplicity of processing.

本実施の形態において、CPU11は、スロー再生のときのオーバーラップ比が、ファスト再生のときのオーバーラップ比より大きいように、前記オーバーラップ比を決定している。これは、スロー再生のときには、フレームの接合点における不連続性の問題が生じやすいためであり、オーバーラップ比をより大きくすることにより、不連続性から生じるノイズを防止することが可能となる。   In the present embodiment, the CPU 11 determines the overlap ratio so that the overlap ratio during slow playback is larger than the overlap ratio during fast playback. This is because a problem of discontinuity at the junction of frames is likely to occur during slow reproduction. By increasing the overlap ratio, it is possible to prevent noise caused by the discontinuity.

特に、CPU11は、スロー再生のときのオーバーラップ比を「3」または「4」、特に処理の容易さから「4」と決定し、ファスト再生のときのオーバーラップ比を「2」と決定する。ファスト再生におけるオーバーラップ比「2」は、整数としてのオーバーラップ比の最小値であるが、ファスト再生であれば、最小値を適用しても、それほど音質の劣化が生じない。また、これにより、ファスト再生の際には、重ね合わせの数を最小化することで、より処理を簡易にすることが可能となる。   In particular, the CPU 11 determines the overlap ratio during slow playback as “3” or “4”, particularly “4” for ease of processing, and determines the overlap ratio during fast playback as “2”. . The overlap ratio “2” in fast reproduction is the minimum value of the overlap ratio as an integer. However, in the case of fast reproduction, even if the minimum value is applied, the sound quality does not deteriorate so much. In addition, this makes it possible to simplify processing by minimizing the number of overlaps during fast playback.

また、CPU11は、入力バッファおよび入力フレームのフレームサイズを、サンプリング周波数および再生速度比に基づいて、スロー再生のときのフレームサイズが、前記ファスト再生のときのフレームサイズより小さくなるように、決定する。これも、スロー再生のときには、より大きなフレームサイズであっても、それほど音質の劣化が生じないためである。   Further, the CPU 11 determines the frame sizes of the input buffer and the input frame based on the sampling frequency and the playback speed ratio so that the frame size during the slow playback is smaller than the frame size during the fast playback. . This is also because the sound quality does not deteriorate so much during slow playback even with a larger frame size.

特に、CPU11は、入力バッファおよび入力フレームのフレームサイズを、スロー再生のときに、入力データのサンプリング周波数の1/10に相当する数所定範囲に属する数、ファスト再生のときに、入力データのサンプリング周波数の1/5に相当する数所定範囲に属する数に決定する。たとえば、サンプリング周波数が、44.1KHz(44100Hz)のときに、スロー再生のときに、フレームサイズを「4096」、ファスト再生のときに、フレームサイズを「8192」と適切化している。   In particular, the CPU 11 sets the frame size of the input buffer and the input frame to a number corresponding to 1/10 of the sampling frequency of the input data at the time of slow playback, and sampling of the input data at the time of fast playback. A number corresponding to 1/5 of the frequency is determined to be a number belonging to a predetermined range. For example, when the sampling frequency is 44.1 KHz (44100 Hz), the frame size is set to “4096” during slow playback, and the frame size is set to “8192” during fast playback.

本発明は、以上の実施の形態に限定されることなく、特許請求の範囲に記載された発明の範囲内で、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。   The present invention is not limited to the above embodiments, and various modifications can be made within the scope of the invention described in the claims, and these are also included in the scope of the present invention. Needless to say.

10 データ変換装置
11 CPU
12 入力部
13 表示部
14 RAM
15 ROM
16 大規模記憶装置
17 入力I/F
18 信号変換部
19 オーディオ回路
25 入力バッファ
26 入力フレームデータ生成部
27 入力フレーム
28 出力バッファデータ生成部
29 出力フレーム
30 フレーム間演算部
31 出力バッファ
10 Data converter 11 CPU
12 Input unit 13 Display unit 14 RAM
15 ROM
16 Large-scale storage device 17 Input I / F
DESCRIPTION OF SYMBOLS 18 Signal conversion part 19 Audio circuit 25 Input buffer 26 Input frame data generation part 27 Input frame 28 Output buffer data generation part 29 Output frame 30 Inter-frame calculating part 31 Output buffer

Claims (4)

入力データの速度に対する前記出力データの再生速度の比を表わす再生速度比を取得する再生速度比取得手段と、
前記取得された再生速度比に基づいて入力フレームメモリ及び出力フレームメモリ夫々のサイズ、並びに前記入力データ及び出力データ夫々に対するオーバーラップ比を決定する決定手段と、
前記速度で順次供給される前記入力データを入力バッファに格納する格納手段と、
前記入力フレームメモリサイズ及び前記入力データに対するオーバーラップ比に基づいて決定される入力ホップサイズ分のデータを前記入力バッファから抽出して前記入力フレームメモリの最後尾にコピーするとともに、前記出力フレームのフレームサイズ及び前記出力データに対するオーバーラップ比に基づいて決定される出力ホップサイズ分のデータを前記出力フレームの先頭から抽出して出力バッファにコピーするコピー手段と、
前記入力フレームメモリのデータに窓関数を施す窓関数適用手段と、
前記窓関数を施された入力フレームメモリのデータと、前記出力フレームメモリのデータのうち先頭から前記出力ホップサイズ分のデータ以降のデータとを加算する加算手段と、
前記加算手段により加算された出力フレームメモリのデータを前記出力ホップサイズのデータ分だけ左シフトするとともに、前記入力フレームメモリのデータを前記入力ホップサイズのデータ分だけ左シフトするシフト手段と、
前記出力バッファに格納されたデータを前記出力データとして前記再生速度で順次出力する出力手段と、
を有し、
前記決定手段は、前記取得された再生速度比が、「1」より小さい場合であるスロー再生と、「1」より大きい場合であるファスト再生のそれぞれにおいて、異なるフレームサイズおよびオーバーラップ比を決定するように構成されたことを特徴とするデータ変換装置。
Playback speed ratio acquisition means for acquiring a playback speed ratio representing a ratio of the playback speed of the output data to the speed of input data;
Determining means for determining a size of each of the input frame memory and the output frame memory and an overlap ratio for each of the input data and the output data based on the acquired reproduction speed ratio;
Storage means for storing the input data sequentially supplied at the speed in an input buffer;
Data for the input hop size determined based on the size of the input frame memory and the overlap ratio for the input data is extracted from the input buffer and copied to the tail of the input frame memory , and the output frame Copy means for extracting data for an output hop size determined based on a frame size and an overlap ratio with respect to the output data from the head of the output frame and copying it to an output buffer;
Window function applying means for applying a window function to the data of the input frame memory ;
An adding means for adding the data of the input frame memory subjected to the window function and data after the data corresponding to the output hop size from the top of the data of the output frame memory ;
Shift means for shifting the data of the output frame memory added by the adding means to the left by the data of the output hop size and shifting the data of the input frame memory to the left by the data of the input hop size;
Output means for sequentially outputting the data stored in the output buffer as the output data at the reproduction speed;
Have
The determining means determines different frame sizes and overlap ratios in each of slow playback where the acquired playback speed ratio is smaller than “1” and fast playback where the acquired playback speed ratio is larger than “1”. A data conversion device configured as described above.
前記決定手段が、前記スロー再生のときの前記入力データに対するオーバーラップ比が、前記ファスト再生のときの前記入力データに対するオーバーラップ比より大きいように、前記入力データに対するオーバーラップ比を決定することを特徴とする請求項1に記載のデータ変換装置。 Said determining means that the overlap ratio for the input data when said slow reproduction is the so greater than the overlap ratio for the input data when the fast playback, determines an overlap ratio with respect to the input data The data conversion device according to claim 1, wherein 前記決定手段が、前記スロー再生のときの前記入力データに対するオーバーラップ比を「3」または「4」、前記ファスト再生のときの前記入力データに対するオーバーラップ比を「2」と決定することを特徴とする請求項2に記載のデータ変換装置。 The determining means determines an overlap ratio with respect to the input data at the time of the slow reproduction as “3” or “4”, and an overlap ratio with respect to the input data at the time of the fast reproduction as “2”. The data conversion device according to claim 2. 入力データの速度に対する前記出力データの再生速度の比を表わす再生速度比を取得する再生速度比取得ステップと、
前記取得された再生速度比に基づいて入力フレームメモリ及び出力フレームメモリ夫々のサイズ、並びに前記入力データ及び出力データ夫々に対するオーバーラップ比を決定するとともに、前記取得された再生速度比が、「1」より小さい場合であるスロー再生と、「1」より大きい場合であるファスト再生のそれぞれにおいて、異なるフレームサイズおよびオーバーラップ比を決定する決定ステップと、
前記速度で順次供給される前記入力データを入力バッファに格納する格納ステップと、
前記入力フレームメモリのサイズ及び前記入力データに対するオーバーラップ比に基づいて決定される入力ホップサイズ分のデータを前記入力バッファから抽出して前記入力フレームメモリの最後尾にコピーするとともに、前記出力フレームのフレームサイズ及び前記出力データに対するオーバーラップ比に基づいて決定される出力ホップサイズ分のデータを前記出力フレームの先頭から抽出して出力バッファにコピーするコピーステップと、
前記入力フレームメモリのデータに窓関数を施す窓関数適用ステップと、
前記窓関数を施された入力フレームメモリのデータと、前記出力フレームメモリのデータのうち先頭から前記出力ホップサイズ分のデータ以降のデータとを加算する加算ステップと、
前記加算された出力フレームメモリのデータを前記出力ホップサイズのデータ分だけ左シフトするとともに、前記入力フレームメモリのデータを前記入力ホップサイズのデータ分だけ左シフトするシフトステップと、
前記出力バッファに格納されたデータを前記出力データとして前記再生速度で順次出力する出力ステップと、
をコンピュータに実行させるデータ変換プログラム。
A reproduction speed ratio obtaining step for obtaining a reproduction speed ratio representing a ratio of the reproduction speed of the output data to the speed of the input data;
Based on the acquired reproduction speed ratio, the sizes of the input frame memory and the output frame memory, and the overlap ratio for the input data and the output data are determined, and the acquired reproduction speed ratio is “1”. A determination step for determining different frame sizes and overlap ratios in each of slow playback that is smaller than and fast playback that is larger than “1”;
Storing the input data sequentially supplied at the speed in an input buffer;
Data for the input hop size determined based on the size of the input frame memory and the overlap ratio for the input data is extracted from the input buffer and copied to the tail of the input frame memory, and the output frame A copy step of extracting data for an output hop size determined based on a frame size and an overlap ratio with respect to the output data from the head of the output frame and copying it to an output buffer;
A window function applying step for applying a window function to the data of the input frame memory;
An addition step of adding the data of the input frame memory subjected to the window function and the data after the data corresponding to the output hop size from the top of the data of the output frame memory;
A shift step of shifting the data of the added output frame memory to the left by the data of the output hop size, and shifting the data of the input frame memory to the left by the data of the input hop size;
An output step of sequentially outputting the data stored in the output buffer as the output data at the reproduction speed;
Data conversion program that causes a computer to execute.
JP2009191570A 2009-08-21 2009-08-21 Data conversion apparatus and data conversion program Expired - Fee Related JP4868041B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2009191570A JP4868041B2 (en) 2009-08-21 2009-08-21 Data conversion apparatus and data conversion program
US12/836,898 US8484018B2 (en) 2009-08-21 2010-07-15 Data converting apparatus and method that divides input data into plural frames and partially overlaps the divided frames to produce output data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009191570A JP4868041B2 (en) 2009-08-21 2009-08-21 Data conversion apparatus and data conversion program

Publications (2)

Publication Number Publication Date
JP2011043654A JP2011043654A (en) 2011-03-03
JP4868041B2 true JP4868041B2 (en) 2012-02-01

Family

ID=43831126

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009191570A Expired - Fee Related JP4868041B2 (en) 2009-08-21 2009-08-21 Data conversion apparatus and data conversion program

Country Status (1)

Country Link
JP (1) JP4868041B2 (en)

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2957861B2 (en) * 1993-09-09 1999-10-06 三洋電機株式会社 Audio time axis compression / expansion device

Also Published As

Publication number Publication date
JP2011043654A (en) 2011-03-03

Similar Documents

Publication Publication Date Title
US8296143B2 (en) Audio signal processing apparatus, audio signal processing method, and program for having the method executed by computer
JP4868041B2 (en) Data conversion apparatus and data conversion program
JP4868042B2 (en) Data conversion apparatus and data conversion program
US8484018B2 (en) Data converting apparatus and method that divides input data into plural frames and partially overlaps the divided frames to produce output data
JP4816507B2 (en) Speech analysis / synthesis apparatus and program
JP5807419B2 (en) Signal processing device
JP2013521537A (en) Apparatus and method for processing transient audio events in an audio signal when changing playback speed or pitch
JP5552794B2 (en) Method and apparatus for encoding acoustic signal
JP4344438B2 (en) Audio signal waveform processing device
JP5169566B2 (en) Reverberation imparting device and program
JP6131574B2 (en) Audio signal processing apparatus, method, and program
JP2532731B2 (en) Voice speed conversion device and voice speed conversion method
JP2001075571A (en) Waveform generator
JP4294179B2 (en) Waveform playback device
JP2001282246A (en) Waveform data time expansion and compression device
JP5359203B2 (en) Music processing apparatus and program
JP6181921B2 (en) Voice reproduction apparatus, voice synthesis reproduction apparatus, and programs thereof
JPH11311997A (en) Sound reproducing speed converting device and method therefor
JP2006139158A (en) Sound signal synthesizer and synthesizing/reproducing apparatus
WO2012035595A1 (en) Playback device, playback method and playback program
JP6149514B2 (en) Digital signal processing apparatus with search function
JP4267114B2 (en) Waveform processing device
JP2007256896A (en) Speech speed conversion device
JPH03123397A (en) Device and method for converting voice speed
JP2005284221A (en) Speech converting device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110601

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110725

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110816

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110913

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

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

R150 Certificate of patent or registration of utility model

Ref document number: 4868041

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

Year of fee payment: 3

LAPS Cancellation because of no payment of annual fees