JP3759810B2 - Method and apparatus for time compression / decompression of waveform data - Google Patents

Method and apparatus for time compression / decompression of waveform data Download PDF

Info

Publication number
JP3759810B2
JP3759810B2 JP08825997A JP8825997A JP3759810B2 JP 3759810 B2 JP3759810 B2 JP 3759810B2 JP 08825997 A JP08825997 A JP 08825997A JP 8825997 A JP8825997 A JP 8825997A JP 3759810 B2 JP3759810 B2 JP 3759810B2
Authority
JP
Japan
Prior art keywords
waveform
length
waveform data
time
block
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
JP08825997A
Other languages
Japanese (ja)
Other versions
JPH10282963A (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.)
Roland Corp
Original Assignee
Roland 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 Roland Corp filed Critical Roland Corp
Priority to JP08825997A priority Critical patent/JP3759810B2/en
Publication of JPH10282963A publication Critical patent/JPH10282963A/en
Application granted granted Critical
Publication of JP3759810B2 publication Critical patent/JP3759810B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は波形データの再生時間を圧縮/伸張する波形データの時間圧縮伸張方法および装置に関する。
【0002】
サンプラー等の編集機能の一つにタイム・ストレッチがある。このタイム・ストレッチは波形データの指定した範囲を任意の再生時間に圧縮したり伸張したりする機能であり、元となる音声波形を任意の長さの波形ブロックに切り出して、再生時間を長くしたり短くする割合に応じて、波形ブロックの一部を、伸張時には二度読みし、圧縮時には読み飛ばしして、前後の波形ブロックを一部重ね合わせてつなげ、その重ね合わせる部分をクロスフェード処理することにより行われる。
【0003】
図9には波形データの再生時間の圧縮/伸張方法の概要を示す。図9(a)は元の音声波形(以下、原波形という)の長さL1を新しい音声波形(以下、再生波形という)の長さL2に伸ばす(伸張)場合、図9(b)は原波形の長さL1を再生波形の長さL2に短くする(圧縮)場合を示している。
【0004】
まず、図9(a)を参照して原波形の再生時間を伸張する場合について説明する。LO1〜LO3(以下、総称したLOと記する)の重なった部分を有する原波形の波形ブロックLB1〜LB4を下段のような配置して、それぞれの波形ブロック間をクロスフェードでつないで、原波形の長さL1を時間伸張してL2となった再生波形を生成している。この時間伸張した再生波形は原波形の前記LOの部分を重複して使用していることになる。
【0005】
次に、図9(b)を参照して原波形の再生時間を圧縮する場合について説明する。LD1〜LD4(以下、総称してLDと記する)の読み飛ばした部分を除いた原波形の波形ブロックLB1〜LB4を下段のように配置して、それぞれの波形ブロック間をクロスフェードでつないで、原波形の長さL1を時間圧縮してL2となった再生波形を再生している。この時間圧縮した再生波形は原波形の前記LDの部分を削除して使用していることになる。
【0006】
【発明が解決しようとする課題】
再生波形の波形ブロックのつなぎ目部分では、通常、上述したように波形が不連続となる部分をクロスフェードするが、このクロスフェードする際には、そのクロスフェード部分では音声波形のフェージング(位相の変化)が起こり、これが聴感上、異音となって聴こえる。この異音は再生ブロックの長さの周期で周期的に繰り返され、その周期は音声波形のもつリズムと何ら相関がないため、再生された音声に対して目立ち、聴感上再生波形の音質に好ましからざる影響を与える。
【0007】
本発明はかかる問題点に鑑みてなされたものであり、再生波形の波形ブロックのつなぎ目部分で生じる異音が再生波形の音質に与える影響を低減させることを目的とする。
【0008】
【課題を解決するための手段】
上述の課題を解決するために、本発明に係る波形データの時間圧縮伸張方法では、波形データを時系列に長さの等しい複数の波形ブロックに分割し、波形データを時間圧縮する場合は該波形ブロックの一部を削除して長さを短くし、時間伸張する場合は該波形ブロックの一部を重複させて長さを長くしてから該複数の波形ブロックを再配置することで波形データの時間圧縮/伸張を行う波形データの時間圧縮伸張方法であって、該分割する波形ブロックの長さを該波形データの演奏タイミング情報(音声波形のテンポや拍子、拍数)に基づいて決めるようにしたものである。
【0009】
また、本発明に係る波形データの時間圧縮伸張装置は、波形データを記憶した記憶手段と、該波形データの演奏タイミング情報(音声波形のテンポや拍子、拍数)に基づいて分割の長さを決定して該波形データを該決定した長さの複数の波形ブロックに分割する分割手段と、波形データを時間圧縮する場合は該波形ブロックの一部を削除して長さを短くし、時間伸張する場合は該波形ブロックの一部を重複させて長さを長くしてから該複数の波形ブロックを再配置する圧縮伸張手段とを備える。
【0010】
上記の時間圧縮伸張装置は、上記の演奏タイミング情報が該記憶手段に波形データと共に記憶されており、該分割手段が該演奏タイミング情報を該記憶手段から読み出して該分割する波形ブロックの長さを決定するよう構成できる。
【0011】
【作用】
従来の時間圧縮伸張方法では、元となる音声波形から波形ブロックを切り出す長さは、元の音声波形のもつ演奏タイミング(テンポや拍子、拍数)に関係なく決められている。このため、再生波形において波形ブロックのつなぎ目部分で生じる異音は、その発生の周期が音声波形のテンポや拍子に対して全く無関係なものとなり、その結果、その異音が再生された音声に対して目立つものになって聴感上、音声波形の音質を損なう。
【0012】
そこで、本発明では、音声波形を切り出す波形ブロックの長さに着目し、波形ブロックの長さを、音声波形の持つ演奏タイミング情報に基づいて決定するようにしている。このようにすると、波形ブロックのつなぎ目は、元の音声波形の演奏タイミングに対して規則的にすることができ、よって再生波形の波形ブロックのつなぎ目部分で異音が生じても、その異音は音声波形のリズムと相関があるため聴感上余り目立たなくなる。
【0013】
【発明の実施の形態】
以下、図面を参照して本発明の実施形態を説明する。
図1は本発明にかかる時間圧縮伸張装置を搭載した音声波形処理装置のブロック構成を示す図である。この実施例装置では、音楽的タイミング情報(テンポや拍子、拍数など)をもとに音声波形を複数の波形ブロックに切り出す長さを決定し、音声波形の再生時間を長くしたり短くしたりする。
【0014】
図1において、CPU1は音声波形の再生時間を長くしたり短くする処理や、装置全体の処理を行う。ROM2は装置全体の制御プログラムと音声波形の再生時間を長くしたり短くする処理のための後述の制御プログラムが格納される。RAM3は音声波形のデータやCPU作業用のデータが格納される。操作部4と表示部5は装置全体の制御をするパラメータを確認したり入力するためのものである。A/D変換器6とD/A変換器7は音声波形の入出力を行うためのものである。
【0015】
図2には実施例装置の操作を行うためのパネルの構成例である。図2において、50は表示部5の表示画面である。42は制御パラメータの値を設定する際に使用するロータリーエンコーダ、43は操作を実行したり中止するためのボタンスイッチ、44は音声波形の再生時間を長くしたり短くする処理を指示するためのストレッチ指示スイッチ、45は制御パラメータの種類を選択するためのパラメータ選択スイッチである。46は音声波形を発音させ確認するための波形選択スイッチであり、RAM3に各スイッチ対応に予め用意された音声波形データを選択できる。
【0016】
これらの操作子による操作法を説明すると、ストレッチ指示スイッチ44を押しながら、波形選択スイッチ46のどれかを押すと、その選択した音声波形の再生時間を長くしたり短くする処理のための制御パラメータを設定し、圧縮/伸張処理を実行できる状態になる。制御パラメータは表示画面50に表示され、その種類はパラメータ選択スイッチ45を操作することで切り換えられる。表示画面50に表示された制御パラメータはローターリエンコーダ42を用いてその値を任意に設定することができる。ローターリエンコーダ42で設定できる制御パラメータは、波形選択スイッチ46に割り当てる音声波形データ、音声波形データの再生範囲(波形データのスタートアドレスS1とエンドアドレスE1)、音声波形データの拍数B、音声波形の再生時間を長くしたり短くしたりする圧伸割合R、1拍あたりに切り出す波形ブロックの数Qなどがある。
【0017】
以下、図3、図4のフローチャートを参照して本実施例装置の動作を説明する。図3は、音声波形の再生時間を長くしたり短くするためのパネル処理の流れを示すフローチャートである。このパネル処理ルーチンは実施例装置のメインルーチンにおける、パネル上の操作子の状態を監視するためのルーチンであり、ストレッチ指示スイッチ44を押しながら波形選択スイッチ46の何れかを押したときに呼び出されて実行される。
なお、以降の説明では再生時間を長くしたり短くする元の音声波形を原波形、再生時間を長くしたり短くして作り出された音声波形を再生波形と呼んで説明を行う。
【0018】
まず、制御パラメータの設定を行う(ステップS1)。制御パラメータの設定では、ストレッチ指示スイッチ44と共に押された波形選択スイッチ46に割り当てられている原波形に対して、拍数B(単位:拍)、再生時間を長くしたり短くしたりする圧伸割合R(単位:%)、1拍あたりに切り出す波形ブロックの数Q(単位:個/拍)を操作子を用いて設定する。
なお、ここでは、原波形の拍数Bの代わりにテンポTempを設定したり、圧伸割合Rの代わりに再生波形のテンポTempを設定するようにしてもよい。
【0019】
制御パラメータの設定処理が終わると、表示画面50に「処理を実行しますか」の案内文が表示される(ステップS2)。ボタンスイッチ43で「YES」を選択するとステップS3の圧縮/伸張処理が実行され、「NO」を選択するとメインルーチンに戻る。
【0020】
ステップS3の音声波形の圧縮/伸張処理では、原波形を複数の波形ブロックに分割し、分割した波形ブロックを再配置して、波形ブロック間にクロスフェード処理をし、再生時間を長くしたり短くした再生波形を作り出す。この圧縮/伸張処理の詳細については後述する。
【0021】
圧縮/伸張処理が終了したら、表示画面50に再生波形を保存するかどうかを問う案内文「新しい音声波形を割り当てますか?」が表示される(ステップS4)。ボタンスイッチ43で「YES」を選択すると、原波形が割り当てられていた波形選択スイッチ46に、再生波形が割り当てられる(ステップS5)。「NO」を選択した場合には、再生波形は波形選択スイッチ46に割り当てられることなく処理が終了されて、メインルーチンに戻る。
【0022】
次に、音声波形の圧縮/伸張処理を図4の圧縮/伸張処理ルーチンのフローチャートと、図5、図6の圧縮/伸張処理のタイムチャートを参照して説明する。ここで、図5は原波形を複数のブロックに分割し、それぞれの波形ブロックを再配置/クロスフェードすることで時間伸張するやり方を、また図6は時間圧縮するやり方を示したものである。図4の圧縮/伸張処理ルーチンでは、図3のパネル処理ルーチンにおいて設定した制御パラメータと、原波形データの再生範囲(波形データのスタートアドレスS1とエンドアドレスE1)を用いて、原波形を複数の波形ブロックに分割し、それらの分割した波形ブロックを時系列に再配置して、波形ブロック間にクロスフェード処理を行い、原波形の再生時間を長くしたり短くしたりする。
【0023】
まず、波形ブロック長の決定を行う(ステップS31)。波形ブロック長の決定処理では、波形ブロックの分割数N、原波形の長さL1、原波形の波形ブロックの長さL1B、再生波形の長さL2、再生波形の波形ブロックの長さL2Bの5つのパラメータの値を自動的に決定する。以下、これらの決定の仕方を説明する。
【0024】
原波形を複数の波形ブロックに分割する数N(単位:個)は、拍数B(単位:拍)と、1拍あたりに切り出す波形ブロックの数Q(単位:個/拍)を用いて、
N=Q×B
を計算することで求める。これにより、波形ブロックの分割数Nに音声波形の音楽的タイミング情報が反映されることになる。
【0025】
原波形の長さL1(単位:サンプル)は、波形データのエンドアドレスE1とスタートアドレスS1を用いて、
L1=E1−S1
を計算することで求める。
【0026】
原波形を複数の波形ブロックに切り出すときの波形ブロックの長さL1B(単位:サンプル)は、
L1B=L1/N
を計算することで求める。この波形ブロックの長さL1Bは、原波形における任意の長さの「音符」に対応するものになる。例えば、4分音符の長さを1拍とすると、波形ブロックの長さL1Bは、原波形の4分音符の長さの1/Q、つまり整数分の1の長さになる。
【0027】
再生波形の長さL2は、原波形の長さL1と再生時間の圧伸割合Rを用いて、
L2=L1×(R/100)
を計算することで求める。
【0028】
再生波形を原波形と同様に、複数の波形ブロックに分割するときの波形ブロックの長さL2Bは、
L2B=L2/N
を計算することで求める。この波形ブロックの長さL2Bは、再生波形における任意の長さの「音符」に対応するものになる。例えば、4分音符の長さを1拍とすると、波形ブロックの長さL2Bは、原波形の4分音符の長さの1/Q、つまり整数分の1の長さになる。
【0029】
波形ブロックの決定処理が終了したら、作業用パラメータの初期化を行う(ステップS32)。この初期化処理では、カウンタC、ポインタP1、P2の3つのパラメータの初期化をする。
【0030】
まず、波形ブロックを処理するカウンタCの値を「0」にする。このカウンタCは再生波形を作り出す処理において、一つの波形ブロックについて再配置とクロスフェード処理を行う毎に一つ増加するもので、全ての波形ブロックを処理した時にカウンタCの値は「N」になる。
【0031】
原波形が格納してあるメモリ領域の先頭アドレスS1をポインタP1にセットする。また再生波形が格納されるメモリ領域の先頭アドレスS2をポインタP2にセットする。これらのポインタP1、P2は、音声波形上で現在作業中の波形ブロックの先頭アドレスを示すことになる。
【0032】
次に、音声波形の圧伸割合Rを調べて、音声波形の伸張処理を行うのか、圧縮処理を行うのか、あるいは圧縮/伸張を行わないのかを判定する(ステップS33、S35)。R>100であれば伸張処理、R<100であれば圧縮処理、そのいずれでもなければ圧縮/伸張は行わないと判定する。以下、伸張処理と圧縮処理について詳細に説明する。
【0033】
R>100すなわち伸張処理では、原波形の再生時間を長くする処理を行う(ステップS34)。まず、原波形が格納してあるアドレス上のポインタP1の位置から長さL1Bにわたる波形ブロックのデータを読み出し、これを再生波形が格納されるメモリ領域にそのアドレス上のポインタP2の位置から長さL1Bにわたりコピー(書込み)する。
【0034】
さらに、原波形の二度読み部分(図9で説明した長さLOの部分)を読み出して、上記コピーされた波形ブロックデータの末尾側にクロスフェードしながらつなげる。具体的には、原波形ブロックのポインタP1から(L1B×2−L2B−LF)の位置、つまり〔P1+(L1B×2−L2B−LF)〕の位置から長さ(L2B−L1B+LF)分の波形データを読み出し、その波形データを、コピーされた波形ブロックの終わりの部分から長さLFだけ手前のアドレス位置、つまり(P2+L1B−LF)の位置から長さ(L2B−L1B+LF)分にわたりコピーし、そのコピーの際に、波形データが重なるクロスフェード部分(長さLF)をクロスフェード処理する(ステップS34)。この波形データの重なるクロスフェード部分の長さLF(単位:サンプル)は、システムに応じて所定の一定値に決定されている。
【0035】
この伸張処理を図5で説明すると、原波形上で任意の長さの「音符」に対応する波形ブロック(長さL1B)が、再生波形上で任意の長さの「音符」に対応する波形ブロック(長さL2B)になるように、原波形の波形ブロック(長さL1B)の一部、すなわち原波形の波形ブロックの後端から手前に長さLO=(L2B−L1B+LF)の部分を二度読みし、この二度読みした部分の前端部分を原波形の波形ブロックの後端部分に長さLFだけ重ね合わせて、その重ね合わせ部分(長さLF)をクロスフェード処理する。
【0036】
一方、R<100すなわち音声波形の圧縮処理の場合(ステップS35)、音声波形の再生時間を短くする処理を行う(ステップS36)。まず、原波形を格納してあるアドレス上のポインタP1の位置から長さL2Bの波形ブロックのデータを、再生波形が格納されるメモリ領域にそのアドレス上のポインタP2の位置から長さL2Bにわたりコピーする。
【0037】
さらに、原波形の格納されているアドレス上のポインタP1から長さL1B分の波形ブロック・データについて、ポインタP1から(L1B−LF)の位置、つまり〔P1+(L1B−LF)〕の位置から長さLF分の波形データを、上記でコピーした波形ブロックの後端部分からクロスフェード長LF分だけ手前の位置、つまり(P2+L2B−LF)の位置から、クロスフェード長LFにわたりコピーし、その際、波形データの重なるクロスフェード部分(長さLF)をクロスフェード処理する(ステップS36)。
【0038】
この圧縮処理を図6を参照して説明すると、原波形上で任意の長さの「音符」に対応する波形ブロック(長さL1B)が、再生波形上で任意の長さの「音符」に対応する波形ブロック(長さL2B)になるように、原波形の波形ブロック(長さL1B)の一部(長さL1B−L2B)を読み飛ばし、さらに原波形の波形ブロック(長さL1B)の後端から手前にクロスフェード長LFの部分を読み出し、この読み出した部分を再生波形の波形ブロック(長さL2B)の後端側の長さLFの部分に重ね合わせ、その重ね合わせた部分をクロスフェード処理する。なお、先の図9(b)の読み飛ばし部の長さLDを図6で示すと、LD=(L1B−L2B−LF)に対応する。
【0039】
音声波形の圧縮/伸張処理が終わったら、作業用パラメータの更新を行う(ステップS37)。すなわち、ポインタP1を長さL1B分増加させ、またポインタP2を長さL2B分増加させる。その後、カウンタCを一つ増加させる。そしてこのカウンタCの値が「N」になるまで処理を繰り返し、値が「N」になれば処理を終了する(ステップS38)。これにより、原波形の再生時間を長くしたり短くしたりした再生波形が作り出される。
【0040】
本発明の実施にあたっては種々の変形形態が可能である。例えば、上述の実施例において、パネル処理ルーチンのステップS1では、拍数B、再生時間の圧伸割合R、1拍あたりに切り出す波形ブロックの数Qを全て、操作子を用いて設定するようにしているが、拍数Bは波形データとして波形の振幅データと共に記憶していてもよい。また、1拍あたりに切り出す波形ブロックの数Qは定数として予め演算に含ませておいてもよい。このようにしておくと、ユーザは再生時間を長くしたり短くしたりするにあたり圧伸割合Rのみを設定すればよくなる。この場合、前記パネル処理ルーチンのステップS1は図7に示すフローに置き換える。すなわち、音声波形データを記憶する記憶手段から拍数Bを読み出して制御パラメータの拍数Bとし(ステップS11)、制御パラメータの圧伸割合Rには操作子で入力した割合(%)を設定する(ステップS12)。
【0041】
また、波形データとしてテンポ情報(拍数/分)を記憶しているものもあり、この場合には、図3のパネル処理ルーチンのステップS1を図8に示すフローに置き換えればよい。すなわち、記憶手段から波形データのテンポ情報Tempを読み出し、テンポ情報Temp(拍数/分)に波形長(分)を乗算して拍数Bを算出する(ステップS14)。波形データのスタートアドレスとエンドアドレスからメモリ容量をアドレス長として得る。予め波形データのサンプリング周波数が分かっているので、そのサンプリング周波数から前記アドレス長を時間(分)として変換することができる。この場合も、ユーザは再生時間を長くしたり短くする場合には、圧伸割合Rのみを設定すればよい(ステップS15)。
【0042】
【発明の効果】
以上に説明したように、本発明によれば、再生波形の波形ブロックのつなぎ目部分で生じる異音が目立たなくなり、再生波形の音質に与える好ましくない影響を低減することができる。
【図面の簡単な説明】
【図1】本発明に係る波形データの時間圧縮伸張装置を搭載した音声波形処理装置のブロック構成を示す図である。
【図2】実施例装置のパネルの構成例を示す図である。
【図3】実施例装置で実行されるメインルーチンにおけるパネル処理ルーチンを示すフローチャートである。
【図4】実施例のパネル処理ルーチンにおける時間圧縮/伸張処理ルーチンを示すフローチャートである。
【図5】実施例における波形データの時間伸張の様子を示すタイムチャートである。
【図6】実施例における波形データの時間圧縮の様子を示すタイムチャートである。
【図7】本発明の他の実施例における変更部分のフローチャートである。
【図8】本発明のまた他の実施例における変更部分のフローチャートである。
【図9】従来の時間圧縮/伸張方法を説明する図である。
【符号の説明】
1 CPU(中央処理装置)
2 ROM(リード・オンリー・メモリ)
3 RAM(ランダム・アクセス・メモリ)
4 操作子
5 表示部
6 A/D変換器
7 D/A変換器
42 ロータリ・エンコーダ
43 ボタンスイッチ
44 ストレッチ指示スイッチ
45 パラメータ選択スイッチ
46 波形選択スイッチ
50 表示器の表示画面
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a waveform data time compression / decompression method and apparatus for compressing / decompressing the reproduction time of waveform data.
[0002]
One of the editing functions such as sampler is time stretch. This time stretch is a function that compresses or expands a specified range of waveform data to an arbitrary playback time, cuts the original audio waveform into waveform blocks of an arbitrary length, and extends the playback time. Depending on the rate of shortening, part of the waveform block is read twice when decompressing, skipped when compressing, and the previous and subsequent waveform blocks are overlapped and connected, and the overlapped part is crossfade processed Is done.
[0003]
FIG. 9 shows an outline of a method for compressing / decompressing the reproduction time of waveform data. FIG. 9A shows the case where the length L1 of the original speech waveform (hereinafter referred to as the original waveform) is extended (expanded) to the length L2 of the new speech waveform (hereinafter referred to as the playback waveform). In this example, the waveform length L1 is shortened (compressed) to the reproduction waveform length L2.
[0004]
First, the case where the reproduction time of the original waveform is extended will be described with reference to FIG. The original waveform waveform blocks LB1 to LB4 having overlapping portions of LO1 to LO3 (hereinafter collectively referred to as LO) are arranged as shown in the lower stage, and the respective waveform blocks are connected by a crossfade so that the original waveform The reproduction waveform having the length L1 is expanded by time to become L2. The reproduced waveform expanded in time uses the LO portion of the original waveform in an overlapping manner.
[0005]
Next, the case where the reproduction time of the original waveform is compressed will be described with reference to FIG. The waveform blocks LB1 to LB4 of the original waveform excluding the skipped portions of LD1 to LD4 (hereinafter collectively referred to as LD) are arranged as shown in the lower stage, and the respective waveform blocks are connected by crossfading. The reproduced waveform having the length L1 of the original waveform is time-compressed to L2. This time-compressed reproduced waveform is used by deleting the LD portion of the original waveform.
[0006]
[Problems to be solved by the invention]
As described above, the portion where the waveform is discontinuous is usually crossfaded at the joint portion of the waveform block of the playback waveform. When this crossfading is performed, the fading (phase change) of the audio waveform occurs at the crossfade portion. ) Occurs, and this can be heard as an abnormal sound. This abnormal sound is repeated periodically with the period of the length of the playback block, and the period has no correlation with the rhythm of the speech waveform, so it stands out from the reproduced sound and is preferred for the sound quality of the playback waveform for audibility. It has a negative effect.
[0007]
The present invention has been made in view of such problems, and an object of the present invention is to reduce the influence of abnormal sounds generated at the joints of the waveform blocks of the reproduction waveform on the sound quality of the reproduction waveform.
[0008]
[Means for Solving the Problems]
In order to solve the above-described problem, in the time compression / decompression method for waveform data according to the present invention, the waveform data is divided into a plurality of waveform blocks having the same length in time series, and the waveform data is time-compressed. When shortening the length by deleting a part of the block and expanding the time, the part of the waveform block is overlapped to increase the length, and then the waveform data is relocated. A method for time compression / expansion of waveform data for performing time compression / expansion, wherein the length of the waveform block to be divided is determined based on performance timing information (tempo, time signature, and number of beats) of the waveform data. It is a thing.
[0009]
Further, the time compression / expansion device for waveform data according to the present invention has a storage means for storing the waveform data and the length of division based on performance timing information (tempo, time signature, beat number) of the waveform data. Dividing means for deciding and dividing the waveform data into a plurality of waveform blocks of the decided length, and when compressing the waveform data in time, a part of the waveform block is deleted to shorten the length and extend the time In this case, a compression / expansion unit that rearranges the plurality of waveform blocks after increasing the length by overlapping a part of the waveform blocks is provided.
[0010]
In the time compression / decompression apparatus, the performance timing information is stored together with the waveform data in the storage means, and the division means reads the performance timing information from the storage means and determines the length of the waveform block to be divided. Can be configured to determine.
[0011]
[Action]
In the conventional time compression / expansion method, the length for cutting out the waveform block from the original speech waveform is determined regardless of the performance timing (tempo, time signature, number of beats) of the original speech waveform. For this reason, abnormal sounds generated at the joints of waveform blocks in the playback waveform are completely irrelevant to the tempo and time signature of the audio waveform. The sound quality of the sound waveform is impaired in the sense of hearing.
[0012]
Therefore, in the present invention, attention is paid to the length of the waveform block from which the speech waveform is cut out, and the length of the waveform block is determined based on performance timing information of the speech waveform. In this way, the joint of the waveform block can be made regular with respect to the performance timing of the original audio waveform, so even if an abnormal noise occurs at the joint portion of the waveform block of the reproduced waveform, the abnormal sound is Since it correlates with the rhythm of the speech waveform, it is not very noticeable.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a block configuration of a speech waveform processing apparatus equipped with a time compression / decompression apparatus according to the present invention. In this embodiment apparatus, the length for cutting out a speech waveform into a plurality of waveform blocks is determined based on musical timing information (tempo, time signature, number of beats, etc.), and the playback time of the speech waveform is lengthened or shortened. To do.
[0014]
In FIG. 1, a CPU 1 performs processing for extending or shortening the reproduction time of a speech waveform, and processing for the entire apparatus. The ROM 2 stores a control program for the entire apparatus and a control program to be described later for processing to lengthen or shorten the playback time of the audio waveform. The RAM 3 stores voice waveform data and CPU work data. The operation unit 4 and the display unit 5 are used for confirming and inputting parameters for controlling the entire apparatus. The A / D converter 6 and the D / A converter 7 are for inputting and outputting voice waveforms.
[0015]
FIG. 2 shows a configuration example of a panel for operating the embodiment apparatus. In FIG. 2, reference numeral 50 denotes a display screen of the display unit 5. 42 is a rotary encoder used when setting the value of the control parameter, 43 is a button switch for executing or stopping the operation, and 44 is a stretch for instructing a process for extending or shortening the reproduction time of the audio waveform. An instruction switch 45 is a parameter selection switch for selecting the type of control parameter. Reference numeral 46 denotes a waveform selection switch for generating and confirming the sound waveform, and the sound waveform data prepared in advance for each switch in the RAM 3 can be selected.
[0016]
The operation method using these operators will be described. When any one of the waveform selection switches 46 is pressed while the stretch instruction switch 44 is being pressed, the control parameters for the process of lengthening or shortening the reproduction time of the selected audio waveform. Is set, and compression / decompression processing can be executed. The control parameters are displayed on the display screen 50, and the type thereof is switched by operating the parameter selection switch 45. The control parameter displayed on the display screen 50 can be arbitrarily set using the rotary encoder 42. The control parameters that can be set by the rotary encoder 42 are voice waveform data to be assigned to the waveform selection switch 46, a playback range of the voice waveform data (start address S1 and end address E1 of the waveform data), beat number B of the voice waveform data, voice waveform There is a companding ratio R for increasing or shortening the reproduction time, and the number Q of waveform blocks cut out per beat.
[0017]
Hereinafter, the operation of the apparatus according to the present embodiment will be described with reference to the flowcharts of FIGS. FIG. 3 is a flowchart showing a flow of panel processing for extending or shortening the reproduction time of the audio waveform. This panel processing routine is a routine for monitoring the state of the operator on the panel in the main routine of the embodiment apparatus, and is called when one of the waveform selection switches 46 is pressed while the stretch instruction switch 44 is pressed. Executed.
In the following description, the original sound waveform that lengthens or shortens the playback time is referred to as an original waveform, and the sound waveform that is created by lengthening or shortening the playback time is referred to as a playback waveform.
[0018]
First, control parameters are set (step S1). In the control parameter setting, companding is performed to increase or decrease the number of beats B (unit: beat) and playback time with respect to the original waveform assigned to the waveform selection switch 46 pressed together with the stretch instruction switch 44. The ratio R (unit:%) sets the number Q (unit: pieces / beat) of the waveform blocks to be cut out per beat using the control.
Here, the tempo Temp may be set instead of the beat number B of the original waveform, or the tempo Temp of the reproduction waveform may be set instead of the companding ratio R.
[0019]
When the control parameter setting process is completed, a guidance message “Do you want to execute the process?” Is displayed on the display screen 50 (step S2). When “YES” is selected with the button switch 43, the compression / decompression process of step S3 is executed, and when “NO” is selected, the process returns to the main routine.
[0020]
In the audio waveform compression / expansion processing in step S3, the original waveform is divided into a plurality of waveform blocks, the divided waveform blocks are rearranged, and cross-fade processing is performed between the waveform blocks to increase or decrease the reproduction time. Create a playback waveform. Details of the compression / decompression processing will be described later.
[0021]
When the compression / decompression process is completed, a guidance sentence “Do you want to assign a new speech waveform?” Is displayed on the display screen 50 asking whether to save the playback waveform (step S4). When “YES” is selected with the button switch 43, a reproduction waveform is assigned to the waveform selection switch 46 to which the original waveform has been assigned (step S5). If “NO” is selected, the reproduced waveform is not assigned to the waveform selection switch 46, and the process is terminated and the process returns to the main routine.
[0022]
Next, the audio waveform compression / decompression process will be described with reference to the flowchart of the compression / decompression process routine of FIG. 4 and the time charts of the compression / decompression process of FIGS. Here, FIG. 5 shows a method of time expansion by dividing an original waveform into a plurality of blocks and rearranging / crossfading each waveform block, and FIG. 6 shows a method of time compression. In the compression / decompression processing routine of FIG. 4, a plurality of original waveforms are converted using the control parameters set in the panel processing routine of FIG. 3 and the reproduction range of the original waveform data (the start address S1 and end address E1 of the waveform data). The waveform blocks are divided, the divided waveform blocks are rearranged in time series, cross-fading processing is performed between the waveform blocks, and the reproduction time of the original waveform is lengthened or shortened.
[0023]
First, the waveform block length is determined (step S31). In the determination process of the waveform block length, the number N of waveform blocks, the length L1 of the original waveform, the length L1B of the waveform block of the original waveform, the length L2 of the reproduced waveform, and the length L2B of the waveform block of the reproduced waveform are 5 Automatically determine the value of one parameter. Hereinafter, how to make these determinations will be described.
[0024]
The number N (unit: pieces) for dividing the original waveform into a plurality of waveform blocks is calculated using the number of beats B (unit: beats) and the number Q of waveform blocks cut out per beat (unit: pieces / beat).
N = Q × B
Is obtained by calculating. Thereby, the musical timing information of the speech waveform is reflected in the division number N of the waveform block.
[0025]
The length L1 (unit: sample) of the original waveform is determined by using the end address E1 and start address S1 of the waveform data.
L1 = E1-S1
Is obtained by calculating.
[0026]
The length L1B (unit: sample) of the waveform block when cutting the original waveform into a plurality of waveform blocks is:
L1B = L1 / N
Is obtained by calculating. The length L1B of the waveform block corresponds to a “note” having an arbitrary length in the original waveform. For example, if the length of a quarter note is 1 beat, the length L1B of the waveform block is 1 / Q of the length of a quarter note of the original waveform, that is, a length of an integer.
[0027]
The length L2 of the reproduced waveform is obtained by using the length L1 of the original waveform and the companding ratio R of the reproduction time.
L2 = L1 × (R / 100)
Is obtained by calculating.
[0028]
Similar to the original waveform, the length L2B of the waveform block when dividing the reproduced waveform into a plurality of waveform blocks is:
L2B = L2 / N
Is obtained by calculating. The length L2B of the waveform block corresponds to a “note” having an arbitrary length in the reproduced waveform. For example, if the length of a quarter note is 1 beat, the length L2B of the waveform block is 1 / Q of the length of the quarter note of the original waveform, that is, a length of an integer.
[0029]
When the waveform block determination process is completed, the working parameters are initialized (step S32). In this initialization process, the three parameters of the counter C and the pointers P1 and P2 are initialized.
[0030]
First, the value of the counter C that processes the waveform block is set to “0”. The counter C is incremented by one every time rearrangement and crossfading processing is performed on one waveform block in the process of generating a reproduction waveform. When all the waveform blocks are processed, the value of the counter C becomes “N”. Become.
[0031]
The start address S1 of the memory area where the original waveform is stored is set to the pointer P1. Further, the start address S2 of the memory area where the reproduction waveform is stored is set to the pointer P2. These pointers P1 and P2 indicate the head address of the waveform block currently being worked on on the speech waveform.
[0032]
Next, the companding ratio R of the voice waveform is checked to determine whether the voice waveform is expanded, compressed, or not compressed / expanded (steps S33 and S35). If R> 100, decompression processing is performed. If R <100, compression processing is performed. Hereinafter, the decompression process and the compression process will be described in detail.
[0033]
In R> 100, that is, in the expansion process, a process for extending the reproduction time of the original waveform is performed (step S34). First, the data of the waveform block from the position of the pointer P1 on the address where the original waveform is stored to the length L1B is read, and this is read from the position of the pointer P2 on the address in the memory area where the reproduction waveform is stored. Copy (write) over L1B.
[0034]
Further, the twice-read portion of the original waveform (the portion of the length LO described in FIG. 9) is read and connected while crossfading to the end of the copied waveform block data. Specifically, a waveform corresponding to a length (L2B−L1B + LF) from the position (L1B × 2−L2B−LF) from the pointer P1 of the original waveform block, that is, the position [P1 + (L1B × 2−L2B−LF)]. The data is read, and the waveform data is copied over the length (L2B-L1B + LF) from the end position of the copied waveform block by the length LF, that is, from the position of (P2 + L1B-LF) to the length (L2B-L1B + LF) At the time of copying, the crossfade portion (length LF) where the waveform data overlaps is subjected to crossfade processing (step S34). The length LF (unit: sample) of the crossfade portion where the waveform data overlaps is determined to be a predetermined constant value according to the system.
[0035]
This decompression process will be described with reference to FIG. 5. A waveform block (length L1B) corresponding to “notes” having an arbitrary length on the original waveform is a waveform corresponding to “notes” having an arbitrary length on the reproduced waveform. A part of the waveform block (length L1B) of the original waveform, that is, a part of the length LO = (L2B−L1B + LF) from the rear end of the waveform block of the original waveform to the front so as to become the block (length L2B). Read twice, and superimpose the front end portion of the twice read portion on the rear end portion of the waveform block of the original waveform by the length LF, and cross-fading the overlap portion (length LF).
[0036]
On the other hand, in the case of R <100, that is, a speech waveform compression process (step S35), a process of shortening the playback time of the speech waveform is performed (step S36). First, the data of the waveform block of length L2B from the position of the pointer P1 on the address where the original waveform is stored is copied over the length L2B from the position of the pointer P2 on the address to the memory area where the reproduction waveform is stored. To do.
[0037]
Further, the waveform block data of length L1B from the pointer P1 on the address where the original waveform is stored is long from the position of (L1B-LF) from the pointer P1, that is, from the position of [P1 + (L1B-LF)]. The waveform data for LF is copied over the crossfade length LF from the position just before the crossfade length LF from the rear end portion of the copied waveform block, that is, the position of (P2 + L2B-LF). The crossfade portion (length LF) where the waveform data overlaps is crossfade processed (step S36).
[0038]
This compression processing will be described with reference to FIG. 6. A waveform block (length L1B) corresponding to an “note” having an arbitrary length on the original waveform is converted into an “note” having an arbitrary length on the reproduced waveform. A part (length L1B-L2B) of the waveform block (length L1B) of the original waveform is skipped so as to become the corresponding waveform block (length L2B), and the waveform block (length L1B) of the original waveform is further skipped. Read out the portion of the crossfade length LF from the rear end to the front, superimpose the read portion on the portion of the length LF on the rear end side of the waveform block (length L2B) of the reproduction waveform, and cross the overlapped portion. Fade. When the length LD of the skipped portion in FIG. 9B is shown in FIG. 6, it corresponds to LD = (L1B−L2B−LF).
[0039]
When the audio waveform compression / decompression process is completed, the working parameters are updated (step S37). That is, the pointer P1 is increased by the length L1B, and the pointer P2 is increased by the length L2B. Thereafter, the counter C is incremented by one. The process is repeated until the value of the counter C becomes “N”, and when the value becomes “N”, the process ends (step S38). As a result, a reproduction waveform in which the reproduction time of the original waveform is lengthened or shortened is created.
[0040]
Various modifications are possible in the practice of the present invention. For example, in the above-described embodiment, in step S1 of the panel processing routine, the number of beats B, the companding ratio R of the reproduction time, and the number Q of waveform blocks to be cut out per beat are all set using the operators. However, the beat number B may be stored together with the waveform amplitude data as waveform data. The number Q of waveform blocks cut out per beat may be included in the calculation as a constant. In this way, the user only needs to set the companding ratio R in order to lengthen or shorten the reproduction time. In this case, step S1 of the panel processing routine is replaced with the flow shown in FIG. That is, the number of beats B is read from the storage means for storing the voice waveform data and set as the number of beats B of the control parameter (step S11), and the ratio (%) input by the operator is set as the companding ratio R of the control parameter. (Step S12).
[0041]
Also, some waveform data stores tempo information (beats / minute). In this case, step S1 of the panel processing routine of FIG. 3 may be replaced with the flow shown in FIG. That is, the tempo information Temp of the waveform data is read from the storage means, and the beat number B is calculated by multiplying the tempo information Temp (beats / minute) by the waveform length (minutes) (step S14). The memory capacity is obtained as the address length from the start address and end address of the waveform data. Since the sampling frequency of the waveform data is known in advance, the address length can be converted from the sampling frequency as time (minutes). Also in this case, the user only needs to set the companding ratio R when the reproduction time is lengthened or shortened (step S15).
[0042]
【The invention's effect】
As described above, according to the present invention, the abnormal sound generated at the joint portion of the waveform block of the reproduced waveform becomes inconspicuous, and an undesirable influence on the sound quality of the reproduced waveform can be reduced.
[Brief description of the drawings]
FIG. 1 is a diagram showing a block configuration of a speech waveform processing apparatus equipped with a time compression / decompression apparatus for waveform data according to the present invention.
FIG. 2 is a diagram illustrating a configuration example of a panel of an example device.
FIG. 3 is a flowchart showing a panel processing routine in a main routine executed by the embodiment apparatus.
FIG. 4 is a flowchart showing a time compression / decompression processing routine in the panel processing routine of the embodiment.
FIG. 5 is a time chart showing a state of time expansion of waveform data in the embodiment.
FIG. 6 is a time chart showing a state of time compression of waveform data in an example.
FIG. 7 is a flowchart of a changed portion in another embodiment of the present invention.
FIG. 8 is a flowchart of a changed portion in still another embodiment of the present invention.
FIG. 9 is a diagram for explaining a conventional time compression / expansion method.
[Explanation of symbols]
1 CPU (Central Processing Unit)
2 ROM (Read Only Memory)
3 RAM (Random Access Memory)
4 Controller 5 Display Unit 6 A / D Converter 7 D / A Converter 42 Rotary Encoder 43 Button Switch 44 Stretch Instruction Switch 45 Parameter Selection Switch 46 Waveform Selection Switch 50 Display Screen of Display

Claims (3)

波形データを時系列に長さの等しい複数の波形ブロックに分割し、波形データを時間圧縮する場合は該波形ブロックの一部を削除して長さを短くし、時間伸張する場合は該波形ブロックの一部を重複させて長さを長くしてから該複数の波形ブロックを再配置することで波形データの時間圧縮/伸張を行う波形データの時間圧縮伸張方法であって
該分割する波形ブロックの長さを該波形データの演奏タイミング情報に基づいて決めるようにした波形データの時間圧縮伸張方法。
When the waveform data is divided into a plurality of waveform blocks having the same length in time series, and when the waveform data is time-compressed, a part of the waveform block is deleted to shorten the length, and when the waveform data is expanded, the waveform block a time compression and expansion method of the waveform data to be time compression / expansion of the waveform data by some with overlapping rearranging the plurality of waveform blocks from longer lengths of,
A time compression / decompression method for waveform data, wherein the length of the waveform block to be divided is determined based on performance timing information of the waveform data.
波形データを記憶した記憶手段と、
該波形データの演奏タイミング情報に基づいて分割の長さを決定して該波形データを該決定した長さの複数の波形ブロックに分割する分割手段と、
波形データを時間圧縮する場合は該波形ブロックの一部を削除して長さを短くし、時間伸張する場合は該波形ブロックの一部を重複させて長さを長くしてから該複数の波形ブロックを再配置する圧縮伸張手段と
を備えた波形データの時間圧縮伸張装置。
Storage means for storing waveform data;
Division means for determining a division length based on performance timing information of the waveform data and dividing the waveform data into a plurality of waveform blocks of the determined length ;
When the waveform data is time-compressed, a part of the waveform block is deleted to shorten the length, and when the time expansion is performed, the part of the waveform block is overlapped to increase the length and then the plurality of waveforms A waveform data temporal compression / expansion device comprising: compression / expansion means for rearranging blocks.
該演奏タイミング情報は該記憶手段に波形データと共に記憶されており、該分割手段は該演奏タイミング情報を該記憶手段から読み出して該分割する波形ブロックの長さを決定するものである請求項2記載の波形データの時間圧縮伸張装置。  3. The performance timing information is stored together with waveform data in the storage means, and the dividing means reads out the performance timing information from the storage means and determines the length of the waveform block to be divided. Time compression / decompression device for waveform data.
JP08825997A 1997-04-07 1997-04-07 Method and apparatus for time compression / decompression of waveform data Expired - Fee Related JP3759810B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP08825997A JP3759810B2 (en) 1997-04-07 1997-04-07 Method and apparatus for time compression / decompression of waveform data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP08825997A JP3759810B2 (en) 1997-04-07 1997-04-07 Method and apparatus for time compression / decompression of waveform data

Publications (2)

Publication Number Publication Date
JPH10282963A JPH10282963A (en) 1998-10-23
JP3759810B2 true JP3759810B2 (en) 2006-03-29

Family

ID=13937892

Family Applications (1)

Application Number Title Priority Date Filing Date
JP08825997A Expired - Fee Related JP3759810B2 (en) 1997-04-07 1997-04-07 Method and apparatus for time compression / decompression of waveform data

Country Status (1)

Country Link
JP (1) JP3759810B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3430968B2 (en) 1999-05-06 2003-07-28 ヤマハ株式会社 Method and apparatus for time axis companding of digital signal
JP3430974B2 (en) 1999-06-22 2003-07-28 ヤマハ株式会社 Method and apparatus for time axis companding of stereo signal
JP4300641B2 (en) 1999-08-10 2009-07-22 ヤマハ株式会社 Time axis companding method and apparatus for multitrack sound source signal
JP3630609B2 (en) * 2000-03-29 2005-03-16 パイオニア株式会社 Audio information reproducing method and apparatus
CN112336370B (en) * 2019-08-09 2022-07-05 深圳市理邦精密仪器股份有限公司 Fetal heart sound processing method and device, medical equipment and computer storage medium
KR102294800B1 (en) * 2021-02-26 2021-08-30 (주)알티엠 Method and apparatus for extracting feature value of time series data

Also Published As

Publication number Publication date
JPH10282963A (en) 1998-10-23

Similar Documents

Publication Publication Date Title
US6281421B1 (en) Remix apparatus and method for generating new musical tone pattern data by combining a plurality of divided musical tone piece data, and storage medium storing a program for implementing the method
JP3399297B2 (en) Electronic musical instrument
JP3759810B2 (en) Method and apparatus for time compression / decompression of waveform data
US7511214B2 (en) Automatic performance apparatus for reproducing music piece
US20180090113A1 (en) Effect providing apparatus, effect providing method, storage medium and electronic musical instrument
US7323630B2 (en) Automatic performance system
JP2000250554A (en) Composition data forming device
JPH0962257A (en) Musical sound signal processing device
JP2001255876A (en) Method for expanding and compressing musical sound waveform signal in time base direction
JP3780857B2 (en) Waveform editing method and waveform editing apparatus
JP4265452B2 (en) Performance data reproducing apparatus and program
US5895878A (en) Automatic accompaniment apparatus with concurrent change of music style and acoustic effect
JP2000339485A (en) Animation generation device
JP4344438B2 (en) Audio signal waveform processing device
JPH0689547A (en) Device for reproducing disk having random music selection function
JPH11126077A (en) Chord progress producing support apparatus and recording medium recorded with chord progress producing support program
JP4162766B2 (en) Performance information generating apparatus and automatic performance apparatus
JP4205782B2 (en) Waveform processing device
JP4236570B2 (en) Waveform playback device and waveform playback program
JP4097785B2 (en) Waveform playback device
JP3309350B2 (en) Automatic reproduction device for audio mixer device
JP3942719B2 (en) Waveform data editing device
JP3872186B2 (en) Automatic performance device
JP4037973B2 (en) Waveform playback device
JP2001075571A (en) Waveform generator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040323

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20040402

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050920

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20051129

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20051201

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060105

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090113

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120113

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees