JP3789997B2 - Waveform converter - Google Patents

Waveform converter Download PDF

Info

Publication number
JP3789997B2
JP3789997B2 JP00228397A JP228397A JP3789997B2 JP 3789997 B2 JP3789997 B2 JP 3789997B2 JP 00228397 A JP00228397 A JP 00228397A JP 228397 A JP228397 A JP 228397A JP 3789997 B2 JP3789997 B2 JP 3789997B2
Authority
JP
Japan
Prior art keywords
pitch
waveform data
read
buffer
input
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
JP00228397A
Other languages
Japanese (ja)
Other versions
JPH10198356A (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 JP00228397A priority Critical patent/JP3789997B2/en
Publication of JPH10198356A publication Critical patent/JPH10198356A/en
Application granted granted Critical
Publication of JP3789997B2 publication Critical patent/JP3789997B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、入力波形のピッチもしくはフォルマントを変更することにより出力波形を生成する、楽音信号の変換処理に用いられる波形変換装置に関するものである。
【0002】
【従来の技術】
楽音信号の変換処理用として、入力された楽音信号のピッチを鍵盤で選択したピッチに変換する、一種のピッチ変換装置が用いられるが、その一例として、特開昭62−65098号公報に開示された技術がある。これは、入力されて記憶された楽音データを分析して所要のデータ区間から成る音素を切り出し、この切り出された音素を鍵盤操作により選択した周期で出力するようにしたものである。
【0003】
この従来技術では、音素を切り出す際に、前回の切り出し位置との関係において相関係数が最大となる位置を選択して切り出すようにしている。しかし、このような相関係数を求める処理は煩雑であり、CPUやDSP(ディジタル・シグナル・プロセッサ)に対する負荷が重くなる。定められた時間内(例えばサンプリング周期内)で処理を終了する必要があるリアルタイム処理の場合、CPUやDSPに対する負荷が軽い簡単な処理の方が好ましい。
【0004】
一方、音楽をリアルタイムで切り出すための簡単な処理方法として、例えば、特開平3−288200号公報に開示された技術がある。これは、入力楽音信号のピッチをゼロクロス位置ないしピーク位置の時間間隔に基づいて検出し、ピッチ検出の際の基準位置としたポイントを音素切り出しの際の基準位置(スタート位置)とするものである。
【0005】
【発明が解決しようとする課題】
しかし、この特開平3−288200号公報に開示された技術には次のような問題点がある。図13はその問題点の説明図である。
いま、図13(a)に示すように、高調波が含まれ、その高調波が時間的に変化するような入力波形データが入力されているものとする。この入力波形データはメモリに順次格納される。図13(b)は、この入力波形データの基本波成分を示したものである。まず、図13(a)において、検出したゼロクロス点間で囲まれた波形(ゼロクロス点間で囲まれた波形が複数集合したものも含む)を、それより前のゼロクロス点間で囲まれた波形と比較し、それらに類似性あったときに、その検出したゼロクロス点間の波形を1周期としてピッチを検出する。ここで、図13(a)のS1(アドレスを示している)以前の波形は、S1からS2までの波形と類似性があるものとする。
【0006】
ところが、S3からS4までの波形部分はその直前のS2からS3までの波形部分とは、類似性がなく、そのため、そのピッチcは異常なピッチと見做される。同様に、S4からS5までの波形部分も、その直前のS3からS4までの波形部分とは類似性がなく、そのピッチdも異常なピッチと見做される。つまり、ピッチc,dについてはピッチ検出に失敗したものと見做され、結局、各直前の波形と類似性のあるa,b,e,fがピッチ検出値として採用されることになる。
【0007】
そして、直前にピッチ検出が成功した時の基準点から波形読み出しを開始する。すなわち、図13(c)のS1の時点で図13(a)の波形のS1を基準点とするピッチaの波形データをメモリから読み出し、次いで、図13(c)のS2の時点で図13(a)の波形のS2を基準とするピッチbの波形データを読み出す。このS2を基準とするピッチbの波形データの読み出しは、ピッチ検出が新たに成功するまで繰り返される。その後、図13(c)のS5の時点で図13(a)の波形のS5を基準とするピッチeの波形データを読み出し、さらに、図13(c)のS6の時点で図13(a)の波形のS6を基準とするピッチfの波形データを読み出す。
【0008】
このようにして、入力波形データの読み出しが順次行われるが、図13(c)のS5の部分に着目してみれば明らかなように、ピッチbとピッチeとの基本波成分のつながりが悪く、不連続な状態となっている。このような基本波成分の不連続部分が存在すると、この部分における楽音が不自然なものとなり、音楽的効果としての価値が大きく減殺されることになる。
【0009】
本発明は、上記事情に鑑み、従来と同様にリアルタイム処理のための簡単な処理方法を採用しながらも、基本波成分の不連続部分の発生を防止し、常に自然な出力波形を得ることができる波形変換装置を提供することを目的とする。
【0010】
【課題を解決するための手段】
上記目的を達成する本発明の波形変換装置は、順次入力される入力波形データのピッチを検出し、入力波形データの、検出されたピッチに対応する所定のデータ区間からなる音素を切り出し、切り出した音素を、所定の再生ピッチ情報に対応するピッチを有する出力波形データに変換して出力する波形変換装置において、
(1)波形データを一時的に記憶するメモリ
(2)順次入力される入力波形データを上記メモリに順次書き込む書込手段
(3)ピッチ情報を更新自在に格納する第1のバッファを有し、その入力波形データについてピッチ検出処理を実行しピッチ検出が成立した場合に第1のバッファに格納されたピッチ情報を新たに検出されたピッチ情報に更新するピッチ検出手段
(4)上記メモリに記憶された波形データから音素を切り出すための基準となる読出基準アドレスを更新自在に格納する第2のバッファを有し、第1のバッファから前回読み出したピッチ情報に対応する時間が経過する毎に第1のバッファからピッチ情報を読み出して、第2のバッファに格納された読出基準アドレスを、第1のバッファから新たに読み出したピッチ情報に対応するアドレス増分だけ更新するアドレス更新手段
(5)再生ピッチ情報を入力する再生ピッチ情報入力手段
(6)第2のバッファから読出基準アドレスを読み出し、読み出した読出基準アドレスに基づいて上記メモリから所定のデータ区間の波形データを読出すことにより音素を切り出し、切り出した音素を、再生ピッチ情報入力手段より入力された再生ピッチ情報に対応する周期で合成して出力波形データを生成する出力波形生成手段
を備えたことを特徴とする。
【0011】
本発明の波形変換装置は、ピッチ検出が成立した際の検出ピッチ、すなわち正しく検出されたピッチを順次加算することにより読出基準アドレスを更新するものであり、こうすることによりピッチの検出を誤った場合であっても基本波の不連続部分のない出力波形が得られ、音楽的効果の質が大幅に向上する。
ここで、上記本発明の波形変換装置において、上記(6)の出力波形生成手段が、
(6_1)再生ピッチ2ピッチ分の出力波形データが生成される毎に上記第2のバッファに格納された読出基準アドレスが転記される第3のバッファを有し、その第3のバッファに格納された読出基準アドレスに基づいて入力波形データ2ピッチ分の読出アドレスを順次生成して、上記メモリの、順次生成した読出アドレスに格納された波形データを順次読み出す第1の読出手段
(6_2)上記第2のバッファに格納された読出基準アドレスが上記第3のバッファに転記されるタイミングとは再生ピッチ1ピッチ分だけずれたタイミングで、かつ再生ピッチ2ピッチ分の出力波形データが生成される毎に、上記第2のバッファに格納された読出基準アドレスが転記される第4のバッファを有し、その第4のバッファに格納された読出基準アドレスに基づいて入力波形データ2ピッチ分の読出アドレスを順次生成して、上記メモリの、順次生成した読出アドレスに格納された波形データを順次読み出す第2の読出手段
(6−3)上記第1の読出手段で読み出された波形データと上記第2の読出手段で読み出された波形データを、2ピッチを一周期として周期的に変化する重みを用いて重み付け加算することにより出力波形データを生成する重み付け加算手段を備えたものであることが好ましい。
【0012】
これら(6_1)〜(6_3)を備えると、ピッチ更新時の出力波形の不連続が防止され、換言すればピッチを順次更新してもなめらかに連続した出力波形が得られ、音楽的効果の質が一層向上する。
【0013】
【発明の実施の形態】
以下、本発明の実施形態について説明する。
図1は、本発明の波形変換装置の一実施形態の構成を示すブロック図である。ローパスフィルタ1を通って入力された入力波形信号はA/D変換器2によりA/D変換されDSP3に送られる。DSP3は、この入力波形データをリングバッファメモリ(RAM)4に書き込むとともに、所定時間遅れてこの書き込まれたデータを切り出し、ピッチないしフォルマントが変更された出力波形データを生成する。DSP3から出力された出力波形データは、D/A変換器5によりD/A変換されローパスフィルタ6を通って外部に出力される。操作子7はパラメータ等の種々の設定条件を設定するものであり、その設定信号はCPU8を介してDSP3に送られる。この操作子7では、本実施形態に直接関係する設定条件として、再生ピッチおよび再生フォルトマンが、入力ピッチおよび入力フォルトマンに対する各比率として設定される。詳細は後述する。
【0014】
図2は、図1におけるDSP3の詳細な構成を示すブロック図である。この図2には操作子7が図示されており、操作子7の操作により得られた設定信号は、図1に示すように、CPU8を介してDSP3に入力される。ただし、この図2、および後述する図3には、図示の煩雑さを避けるためCPUは図示省略されている。 この図2に示すように、DSP3は、書込手段31、ピッチ検出手段32、アドレス更新手段33、出力波形生成手段34により構成されている。
【0015】
書込手段31は、A/D変換器2から順次出力されたディジタルの入力波形データを、リングバッファメモリ4に順次書き込む。
またピッチ検出手段32は、その入力波形データのピッチを順次検出する。このピッチ検出手段32は、入力波形データのピッチを更新自在に格納するバッファ32aを有し、入力波形データについてピッチ検出処理を実行し、ピッチ検出処理が成立した場合、すなわちここでは、直前に検出されたピッチと今回検出した新たなピッチとがほぼ等しいピッチであるという基準に照らし、今回検出した新たなピッチが正しいピッチである(直前に検出されたピッチと比べほぼ等しいピッチである)場合にピッチ検出が成立したものと判定され、バッファ32aに格納されたピッチを今回検出した新たなピッチに更新する。
【0016】
また、アドレス更新手段33は、後述する出力波形生成手段34において音素を切り出すための基準アドレスである、リングバッファメモリ4からの波形データの読出基準アドレスを更新する。このアドレス更新手段33は、リングバッファメモリ4に記憶された波形データから音素を切り出すための基準となる読出基準アドレスを更新自在に格納するバッファ33aを備えており、前回のバッファ33aの更新から、ピッチ検出手段32のバッファ32aのピッチ情報に対応する時間が経過する毎に、このアドレス更新手段33は、そのバッファ33aに格納された読出基準アドレスに、ピッチ検出手段32のバッファ32aに格納されたピッチを読み出し、この新たに読み出したピッチに対応アドレス増分を加算して新たな読出基準アドレスを求め、その新たな読出基準アドレスを、それまでバッファ33aに格納されていた読出基準アドレスに代わりそのバッファ33aに格納する。すなわち、バッファ33aに格納された読出基準アドレスは、ピッチ検出手段32で検出されバッファ32aに格納されたピッチに対応するアドレス増分ずつ順次累積されることになる。
【0017】
さらに出力波形生成手段34は、再生ピッチ1ピッチ分の出力波形データが生成される毎に、アドレス更新手段33のバッファ33aから読出基準アドレスを読み出し、その読み出した読出基準アドレスに基づいて、順次更新される読出アドレスを求め、リングバッファメモリ4から、その求められた読出アドレスに格納された波形データを読み出すことにより音素を切り出し、その切り出した音素を、操作子7の操作により入力されたピッチ情報およびフォルマント情報に対応する再生ピッチおよび再生フォルマントを有する出力波形データに変換する。この出力波形データによりあらわされる出力波形は、入力波形と比べ、ピッチもしくはフォルマントの一方もしくは双方が変更(同一である場合を含む)された波形である。
【0018】
図3は、図2に1つのブロックで示す出力波形生成手段34の詳細な構成を示すブロック図である。
この図3に示す出力波形生成手段34は、第1の読出手段341、第2の読出手段342、および重み付け加算手段343により構成されている。
第1の読出手段341は、再生ピッチ2ピッチ分の出力波形データが生成される毎にアドレス更新手段33のバッファ33aに格納された読出基準アドレスが転記される、バッファ341aを有し、そのバッファ341aに格納された読出基準アドレスに基づいて読出アドレスを順次生成して、リングバッファメモリ4aの、順次生成した読出アドレスに格納された波形データを順次読み出す。
【0019】
また、第2の読出手段342は、第1の読出手段341と同様、再生ピッチ2ピッチ分の出力波形データが生成される毎にアドレス更新手段33のバッファ33aに格納された読出基準アドレスが転記される、バッファ342aを有している。ただし、その転記のタイミングは、アドレス更新手段33のバッファ33aに格納された読出基準アドレスが第1の読出し手段341のバッファ341aに転記されるタイミングとは再生ピッチ1ピッチ分だけずれたタイミングである。すなわち、アドレス更新手段33のバッファ33aに格納された読出基準アドレスは、再生ピッチ1ピッチ分の出力波形データが生成される毎に交互に、第1の読出し手段341のバッファ341aもしくは第2の読出し手段342のバッファ342aに転記される。第2の読出手段342は、第1の読出手段341と同様、バッファ342aに格納された読出基準アドレスに基づいて読出アドレスを順次生成して、リングバッファメモリ4の、順次生成した読出アドレスに格納された波形データを順次読み出す。
【0020】
第1の読出手段341で読み出された波形データ、および第2の読出手段342で読み出された波形データは、重み付け加算手段343に入力され、重み付け加算手段343では、それらの波形データを、再生ピッチを2ピッチを一周期として周期的に変化する重みを用いて重み付け加算することにより、出力波形データを生成する。
【0021】
ここで、リングバッファメモリ4について説明しておくと、このリングバッファメモリは、例えば、最初のアドレスを「0000」(16進法)とし、最後のアドレスを[0FFF」とした場合に、「0000」から[0FFF」までの一連のアドレスが概念的にはリング状に連なっており、「0000」の次のアドレスが[0FFF」となるようなメモリのことである。
【0022】
次に、本実施形態の動作をフローチャート及び波形図に基づき説明していくが、その前に、本発明の要旨とするところを図4を参照しつつ概略的に説明しておく。
図4は、本発明の概要説明図であり、従来例の問題点の説明に際し参照した図13に対応する図である。図4(a),(b)は、それぞれ図13(a),(b)と同様であり、それぞれ、入力波形データ、およびその基本波成分を示した図である。ただし、SS4,SS5等の符号が一部付加されている。
【0023】
図4(c)は本発明の処理により得られた波形図である。従来は、前述したように、波形読み出しを開始する時点で、ピッチ検出が最後が成立した時の基準点から読み出しを開始していたが、本発明では、最後にピッチ検出が成立した時のピッチを前回の基準点(読出アドレス)に順次加算することにより、読み出しの基準点を求めるようにしている。
【0024】
まず、図4(c)のS1の時点で、図4(a)の波形のS1を基準点とするピッチaの波形データが読み出される。そして、図4(c)のS2の時点でS1+aの演算が行われ、図4(a)においてS1+a(=S2)の位置を読み出しの基準点とするピッチbの波形データが読み出される。同様に、図4(c)のS3の時点でS2+bの演算が行われ、図4(a)においてS2+b(=S3)の位置を基準点とするピッチbの波形データが読み出される。
【0025】
次いで、図4(a)においてS3+bによりSS4の位置が求められ、S3+b(=SS4)の位置を読み出しの基準点とするピッチbの波形データが読み出される。同様に、図4(a)においてSS4+bによりSS5の位置が求められ、SS4+b(=SS5)の位置を読み出しの基準点とするピッチeの波形データが読み出される。更に同様に、図4(a)においてSS5+eによりSS6の位置が求められ、SS5+e(=SS6)の位置を読み出しの基準点とするピッチfの波形データが読み出される。
【0026】
上記の方法によれば、検出ピッチに従って読み出しの基準点が更新されることになるため、基本波成分が不連続になるようなことはなく、波形のつながりが自然な出力波形を得ることが可能になる。
次に本実施形態の動作を説明する。
図5〜図7は、本実施形態における波形データおよび後述するプログラムで作成される関数の時間的な変化を示した波形図である。
【0027】
本実施形態では、操作子7(図1参照)から2つの変数、すなわち、ピッチ変更係数PITCH_ VRとフォルマント変更係数FORMANT_ VRが入力される。ピッチ変更係数PITCH_ VRは、本実施形態では0.5〜2.0の範囲内で任意に設定することができ、例えばその値を1.0から2.0に変更することは、ピッチを1オクターブ下げることを意味している。また、フォルマント変更係数FORMANT_ VRも、同様に0.5〜2.0の範囲内で任意に設定することができ、例えばその値を1.0から2.0に変更するということは、フォルマントの形1オクターブ上げることを意味している。
【0028】
図5は、PITCH_ VR=1.0,FORMANT_ VR=1.0の場合、図6は、PITCH_ VR>1.0,FORMANT_ VR=1.0の場合、図7は、PITCH_ VR=1.0,FORMANT_ VR>1.0の場合の波形図である。
尚、図7において、入力波形のピッチPとWIDTHは、図5の場合と同様に等しいため、図7では入力波形は図示が省略されている。
【0029】
以下、これらの図を参照しながら、本実施形態のフローチャートについて説明する。以下では、図5〜図7のいずれを参照してもよいときは、代表的に図5を参照するものとする。
図8は、本発明の動作を示すフローチャートである。このフローチャートに示す動作は、所定のサンプリング周期で繰り返し実行される。
【0030】
尚、以下のフローチャートの説明において、簡単のため、バッファに名づけた名称と、そのバッファに格納される値に付した名称とを区別せずに、同一の名称を使用することがある。
まず、図2に示す書込手段31は所定のサンプリング周期で入力されるサンプリングデータすなわち入力波形データを、リングバッファメモリ4に順次書き込んでいく(ステップ8_1)。
【0031】
これと同時に、ピッチ検出手段32は、入力したサンプリングデータのピッチ検出処理を行う(ステップ8_2)。この場合のピッチ検出処理は、既述した特開平3−288200号公報で開示されたものと同様の技術により行う。すなわち、入力波形のゼロクロス位置ないしピーク位置を検出し、それらの時間間隔を、前に検出したゼロクロス位置ないしピーク位置の時間間隔と比較することによってピッチを検出し、ピッチを正しく検出したと判断したときに前回の基準となるゼロクロス位置のアドレス及びピッチを出力する。具体的には、図5(a)に示すような入力波形データが入力されているものとすると、ゼロクロス点Z2を検出した時点で、Z0からZ1までのピッチP0とZ1からZ2までのピッチP1とが等しいと判断され、ゼロクロス点Z1および検出ピッチP1が出力される。
【0032】
ステップ8_2でピッチ検出が行われたと判別された場合、ピッチ検出手段32は、PITCHと名づけたバッファ32aに、そのピッチ1周期長の値(PITCH)を前回検出した値に代えて更新し保持しておく(ステップ8_3)。なお、ステップ8_2でピッチ検出が行われなかった場合は直ちにステップ8_4に進む。
【0033】
アドレス更新手段33は、ピッチ検出手段32が現在保持しているピッチ1周期長の値(PITCH)に基づいて、前回の更新からピッチ1周期長の値(PITCH)に対応する時間が経過す毎に、リングバッファメモリ4における読出基準アドレス(SADRS)の更新処理を行う(ステップ8_4)。この読出基準アドレスの更新については、図9及び図10を参照して後述する。
【0034】
ステップ8_4で読出基準アドレスの更新が行われると、出力波形生成手段34は図5(b),(d),(e)にそれぞれ示したPHASE,PH1,PH2の各関数についてインクリメントを行う(ステップ8_5)。そして、PHASEとWIDTH(再生ピッチ)との大小関係が比較され(ステップ8_6)、PHASEがWIDTHよりも小さな値にとどまっている間は波形読み出し処理が行われ(ステップ8_16)、出力波形データが出力される(ステップ8_17)。また、PHASEがWIDTH以上になった時点で、PHASEは初期化されて0となる(ステップ8_7)。
【0035】
そして、出力波形生成手段34は、CPU8が操作子7の状態を検出した結果から得られたパラメータを入力する(ステップ8_8)。ここでは、前述した、ピッチ変更係数PITCH_VRとフォルマント変更係数FORMANT_VRを入力している。
出力波形生成手段34は、操作子7から得られたパラメータに基づきWIDTHとLENGTHとを算出する(ステップ8_9)。WIDTHは再生ピッチとして定められた期間であり、LENGTHは波形読み出しを実際に行う期間の半分の期間である。WIDTHは、ステップ8_3で更新されているPITCHと、ピッチ変更係数PITCH_VRとの積により求めることができる。LENGTHは、PITCHをフォルマント変更係数FORMANT_VRで割ることにより求めることができる。
【0036】
次いで出力波形生成手段34は、LENGTHとWIDTHとの大小関係を比較し(ステップ8_10)、LENGTHがWIDTHよりも大きいときはLENGTHの値をWIDTHに設定する(ステップ8_11)。ステップ8_10でLENGTHがWIDTH以下であるとき、そのままステップ8_12へ進む。このように、ステップ8_10,8_11により常にLENGTHがWIDTHを越えないようにしているのは、もしLENGTHがWIDTHを越えると後述のWINDOW1,WINDOW2が0に下がり切らない状態が生じるからである。
【0037】
出力波形生成手段34は、さらに、W_RATEの算出とFLAGの反転動作を行う(ステップ8_12)。W_RATEは1/LENGTHにより求められる。そして、FLAGの正負を判別し(ステンレス8_13)、正の場合、図3に示す第1の読出手段34により、PH1及びWINDOW1が0にセットされ、SADRS1がステップ8_4で更新されたSADRSにセットされる(ステップ8_14)。負の場合は、図3に示す第2の読出手段342により、PH2及びWINDOW2が0にセットされ、SADRS2がステップ8_4で更新されたSADRSにセットされる(ステップ8_15)。このステップ8_14,8_15におけるPH1及びPH2のゼロ設定により、FLAGの立ち上がり時点及び立ち下がり時点(図5(c)参照)においてリセットされ、位相が互いに180度ずれた鋸歯状波が生成される(図5(d),(e)参照)。
【0038】
上記ステップ8_14,8_15を含むステップ8_7からステップ8_15の処理は、PHASE≧WIDTHを満足した時にだけ行われる処理であるため、FLAGの立ち上がり時点及び立ち下がり時点でのみ実行される処理となる。このように、ステップ8_14,8_15でPH1,WINDOW1,PH2,WINDOW2のリセット、およびSADRS1,SADRS2のセットが行われた後、出力波形生成手段34はリングバッファメモリ4から波形読み出し処理を行う(ステップ8_16)。そして、読み出された波形データに基づいて出力波形データが生成され、その出力波形データがD/A変換器5に出力される(ステップ8_17)。
【0039】
次に、ステップ8_4の読出アドレス(SADRS)の更新につき説明する。
図9は、リングバッファメモリ4における書き込みアドレスと読み出ししアドレスとの関係を示す概念図である。
図9の縦軸は「0000」〜[0FFF」までのアドレス位置を示しており、横軸は時間を示している。IBUF_PTRは、書込手段31により書き込みが行われているアドレスであり、このIBUF_PTRから遅延分DELAYだけ遅れてADRSが存在している。ADRSはリングバッファメモリ4から読み出しを行うべきアドレスであり、DELAYを設けていることにより、読出アドレスが書込アドレスを追い越してしまうことを防いでいる。このDELAYの値としては、通常、入力波形の最低周波数の1周期分が設定される。
【0040】
そして、ADRSの内側において、このADRSに沿って読出基準アドレス(SADRS)が階段状に変化するようになっている。SADRSが次第に上昇し、最終アドレス[0FFF」の手前に来ると、ADRS<SADRSとなる区間が生じる。すると、SADRSは下方の第1アドレス側に戻り、再びADRSに沿って階段状に変化していく。
【0041】
図10は、読出基準アドレス(SADRS)の更新動作についてのフローチャートである。
まず、アドレス更新手段33は、IBUF_PTRからDELAYを減ずることによりADRSを設定するが、さらに、ADRSが第1アドレスから最終アドレスの範囲内に収まるように、(1000(hex)−1)との論理積をとる(ステップ10_1)。ここで(hex)は16進数であることをあらわしている。
【0042】
次いで、ADRSとSADRSとの大小関係を比較し(ステップ10_2)、SADRSがADRSを越えていなければ、そのままステップ10_4に進む。SADRSがADRSを越えていれば、これは図9を参照して説明したように、SADRSが最終アドレスの手前に来て、ADRSが下方の第1アドレス側に戻ったことを意味しているので、ADRSを最終アドレスを越えたアドレスに補正するようにして、次のステップ10_4での大小関係の比較を正常に行うことができるようにする(ステップ10_3)。
【0043】
この後、アドレス更新手段33は、ADRSと(SADRS+PITCH)との大小関係を比較する(ステップ10_4)。PITCHは、図8のステップ8_3でピッチ検出手段32より更新されたものである。ADRSが(SADRS+PITCH)よりも大きいか等しい場合には、(SADRS+PITCH)と(1000(hex)−1)との論理積をとった上で、この(SADRS+PITCH)を新たなSADRSとして更新する(ステップ10_5)。また、ADRSが(SADRS+PITCH)よりも小さい場合には更新は行われず、そのまま現状のSADRSが用いられる。
【0044】
次に、図8のステップ8_16の波形読み出し処理につき図11のフローチャートを参照して説明する。
図3に示す第1の読出手段341は、まず、WINDOW1にW_RATEを加えたものを新たなWINDOW1として設定する(ステップ11−1)。W_RATEはステップ8_12において1/LENGTHにより求めたものである。WINDOW1はW_RATEでインクリメントされるものであって、図5では図示を省略しているが、PH1と同様の鋸歯状波であり、PH1とは傾きを異にするものである。そして、LENGTHの期間後にWINDOW1の値は1に、LENGTHの2倍の期間後にはWINDOW1の値は2となる。
【0045】
次いで、第1の読出手段341では、WINDOW1の現在の値が判別される(ステップ11_2)。WINDOW1の値が1未満であればエンベロープENV1をWINDOW1に設定し(ステップ11_3)、WINDOW1が1以上2未満であればエンベロープENV1を(2−WINDOW1)に設定する(ステップ11_4)。このステップ11_3,11_4は、鋸歯状波であるWINDOW1を1で折り返して三角波に変換することによりENV1を得ていることを意味している。WINDOW1が2以上である部分が存在する場合には、その部分のENV1は0に設定する(ステップ11_5)。
【0046】
次いで、リングバッファメモリ4から入力波形データを読み出すためのアドレスADRS1を設定する(ステップ11_6)。このADRS1は、読出基準アドレスSADRSに(PH1*FORMANT_VR)を加算することにより求められる。そして、このADRS1に基づいてリングバッファメモリ4から波形データDATA1が読みだされる(ステップ11_7)。なお、読出しアドレスADRS1は、実際には存在しないアドレスである小数点表現のアドレスであるが、公知の補間演算を施すことによって小数点アドレスに対応する波形データDATA1を読み出す処理を行っている。
【0047】
上記と同様の動作がWINDOW2側、すなわち、第2の読出手段342についても行われる(ステップ11_8〜11_14)。そして、図3に示す重み付け加算手段343では,ステップ11_7,11_14で得られたDATA1,DATA2から、それぞれDATA1*ENV1(図5(h)参照),DATA2*ENV2(図5(i)参照)が求められ、DATA1*ENV1+DATA2*ENV2が演算される。これが出力波形データとして出力波形生成手段34から出力される(ステップ11_15)。
【0048】
ところで、図10のステップ10_1において説明したように、読出アドレスADRSを求める際には、書込アドレスIBUF_PTRから遅れ分DELAYを差し引く演算を行っている。このDELAYの値は、リングバッファメモリ4の読出アドレス(SADRS1,SADRS2)が現在の書込アドレス(IBUF_PTR)を追い越さないようにするためのものであり、通常、入力波形の最低周波数の一周期分を設定していることは既述した通りである。しかし、入力波形の最低周波数が80Hzであるとすると、DELAYについて12.5m秒に相当する値を設定することになり、12.5ミリ秒の遅延が生じることになる。これは遅延として認識可能な値であり、好ましくない。
【0049】
そこで、最低周波数の低い入力波形が入力される場合でも、上記のような大きな遅延を付加しなくてもよいようにするため、図8のステップ8_9とステップ8_10との間に、図12に示したステップ9a,9bを挿入することが好ましい。すなわち、ステップ8_9の後、LENGTHと、最低周波数が100HzのときのピッチP(100Hz)との大小関係を比較し(ステップ9a)、LENGTHがP(100Hz)以下の場合はそのままステップ8_10へ進み、LENGTHがP(100Hz)より大きな場合はLENGTHをP(100Hz)に設定する(ステップ9_b)。このようにDELAYの値を一定値以下に制限することにより、読出しの際の遅延が認識されてしまうことを防ぐことできる。
【0050】
【発明の効果】
以上のように、本発明によれば、従来と同様にリアルタイム処理のための簡単な処理方法を採用しながらも、基本波成分の不連続部分の発生を防止し、常に自然な出力波形を得ることができる。
【図面の簡単な説明】
【図1】本発明の波形変換装置の一実施形態の構成を示すブロック図である。
【図2】DSPの詳細な構成を示すブロック図である。
【図3】出力波形生成手段の詳細な構成を示すブロック図である。
【図4】本発明の概要説明図である。
【図5】本発明の実施形態における波形データおよび関数の時間的な変化を示した波形図である。
【図6】本発明の実施形態における波形データおよび関数の時間的な変化を示した波形図である。
【図7】本発明の実施形態における波形データおよび関数の時間的な変化を示した波形図である。
【図8】本発明の実施形態の動作を示すすフローチャートである。
【図9】リングバッファメモリの書込アドレスと読出アドレスとの関係を示す概念図である。
【図10】読出基準アドレス(SADRS)の更新動作についてのフローチャートである。
【図11】波形読み出し処理のフローチャートである。
【図12】本発明の他の実施形態の、図8のフローチャートに追加すべきフローチャートを示す図である。
【図13】従来技術の問題点の説明図である。
【符号の説明】
1 ローパスフィルタ
2 A/D変換器
3 DSP
4 リングバッファメモリ
5 D/A変換器
6 ローパスフィルタ
7 操作子
8 CPU
31 書込手段
32 ピッチ検出手段
33 アドレス変更手段
34 出力波形生成手段
341 第1の読出手段
342 第2の読出手段
343 重み付け加算手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a waveform conversion apparatus used for a musical sound signal conversion process for generating an output waveform by changing the pitch or formant of an input waveform.
[0002]
[Prior art]
A kind of pitch conversion device that converts the pitch of an input musical sound signal to a pitch selected by a keyboard is used for the conversion processing of the musical sound signal. An example thereof is disclosed in Japanese Patent Application Laid-Open No. 62-65098. There is technology. In this method, musical tone data that has been input and stored is analyzed to extract a phoneme including a required data section, and the extracted phoneme is output at a cycle selected by keyboard operation.
[0003]
In this prior art, when a phoneme is cut out, a position where the correlation coefficient is maximized in relation to the previous cutout position is selected and cut out. However, the process for obtaining such a correlation coefficient is complicated, and the load on the CPU and DSP (digital signal processor) becomes heavy. In the case of real-time processing in which processing needs to be completed within a predetermined time (for example, within a sampling period), simple processing with a light load on the CPU and DSP is preferable.
[0004]
On the other hand, as a simple processing method for cutting out music in real time, for example, there is a technique disclosed in Japanese Patent Laid-Open No. 3-288200. This is to detect the pitch of the input musical sound signal based on the time interval between the zero cross position and the peak position, and to set the reference position (start position) at the time of phoneme extraction as the reference position at the time of pitch detection. .
[0005]
[Problems to be solved by the invention]
However, the technique disclosed in Japanese Patent Laid-Open No. 3-288200 has the following problems. FIG. 13 is an explanatory diagram of the problem.
Now, as shown in FIG. 13A, it is assumed that input waveform data that includes harmonics and that changes temporally is input. The input waveform data is sequentially stored in the memory. FIG. 13B shows the fundamental wave component of this input waveform data. First, in FIG. 13A, a waveform surrounded by the detected zero-cross points (including a set of a plurality of waveforms surrounded by the zero-cross points) is surrounded by the previous zero-cross points. When there is a similarity between them, the pitch is detected with the waveform between the detected zero-cross points as one period. Here, it is assumed that the waveform before S1 (indicating the address) in FIG. 13A is similar to the waveforms from S1 to S2.
[0006]
However, the waveform portion from S3 to S4 is not similar to the waveform portion from S2 to S3 immediately before, and therefore the pitch c is regarded as an abnormal pitch. Similarly, the waveform portion from S4 to S5 is not similar to the waveform portion from S3 to S4 immediately before, and the pitch d is also regarded as an abnormal pitch. That is, regarding the pitches c and d, it is considered that the pitch detection has failed, and a, b, e, and f that are similar to the immediately preceding waveform are eventually adopted as the pitch detection values.
[0007]
Then, waveform reading is started from the reference point when the pitch detection was successful immediately before. That is, the waveform data of the pitch a with the reference point S1 of the waveform of FIG. 13A is read from the memory at the time S1 of FIG. 13C, and then at the time of S2 of FIG. The waveform data of pitch b with reference to S2 of the waveform of (a) is read. Reading of the waveform data of the pitch b with reference to S2 is repeated until the pitch detection is newly succeeded. Thereafter, the waveform data of the pitch e with reference to S5 of the waveform of FIG. 13A is read at the time of S5 in FIG. 13C, and further, at the time of S6 in FIG. The waveform data of the pitch f with reference to S6 of the waveform is read.
[0008]
In this way, the input waveform data is sequentially read out, but as is apparent from the S5 part of FIG. 13C, the connection between the fundamental wave components of the pitch b and the pitch e is poor. In a discontinuous state. If such a discontinuous portion of the fundamental wave component exists, the musical sound in this portion becomes unnatural and the value as a musical effect is greatly diminished.
[0009]
In view of the above circumstances, the present invention can prevent the occurrence of discontinuous portions of the fundamental wave component and always obtain a natural output waveform while adopting a simple processing method for real-time processing as in the past. An object of the present invention is to provide a waveform converter capable of performing the above.
[0010]
[Means for Solving the Problems]
The waveform conversion apparatus of the present invention that achieves the above object detects the pitch of input waveform data that is sequentially input, cuts out and extracts a phoneme comprising a predetermined data section corresponding to the detected pitch of the input waveform data. In a waveform converter for converting phonemes to output waveform data having a pitch corresponding to predetermined reproduction pitch information and outputting the data,
(1) Memory that temporarily stores waveform data
(2) Writing means for sequentially writing input waveform data input sequentially to the memory
(3) A first buffer for storing the pitch information in an updatable manner is provided. When the pitch detection process is executed for the input waveform data and the pitch detection is established, the pitch information stored in the first buffer is newly set. Pitch detection means for updating to detected pitch information
(4) It has a second buffer for renewably storing a read reference address serving as a reference for extracting a phoneme from the waveform data stored in the memory, and corresponds to pitch information read last time from the first buffer. An address for reading the pitch information from the first buffer every time elapses and updating the read reference address stored in the second buffer by an address increment corresponding to the pitch information newly read from the first buffer Update means
(5) Reproduction pitch information input means for inputting reproduction pitch information
(6) Reading a read reference address from the second buffer, reading out waveform data in a predetermined data section from the memory based on the read read reference address, cutting out the phoneme, and inputting the cut out phoneme as reproduction pitch information Output waveform generating means for generating output waveform data by synthesizing at a period corresponding to the reproduction pitch information inputted from the means
It is provided with.
[0011]
The waveform conversion apparatus of the present invention updates the read reference address by sequentially adding the detected pitch when the pitch detection is established, that is, the correctly detected pitch, and thereby erroneously detecting the pitch. Even in this case, an output waveform without a discontinuous portion of the fundamental wave is obtained, and the quality of the musical effect is greatly improved.
Here, in the waveform conversion apparatus of the present invention, the output waveform generation means (6) is
(6_1) There is a third buffer to which the read reference address stored in the second buffer is transferred each time output waveform data corresponding to two playback pitches is generated, and stored in the third buffer. First reading means for sequentially generating read addresses for two pitches of input waveform data based on the read reference address and sequentially reading the waveform data stored in the sequentially generated read addresses in the memory
(6_2) The output waveform data corresponding to the reproduction pitch of 2 pitches is the timing at which the read reference address stored in the second buffer is shifted by the reproduction pitch of 1 pitch from the timing of the transfer to the third buffer. Each time it is generated, it has a fourth buffer to which the read reference address stored in the second buffer is transcribed, and the input waveform data 2 pitches based on the read reference address stored in the fourth buffer Second read means for sequentially generating the read addresses for the minutes and sequentially reading the waveform data stored in the sequentially generated read addresses of the memory.
(6-3) The waveform data read by the first reading means and the waveform data read by the second reading means are weighted using weights that periodically change with two pitches as one cycle. It is preferable that weighted addition means for generating output waveform data by adding is provided.
[0012]
When these (6_1) to (6_3) are provided, discontinuity of the output waveform at the time of pitch update is prevented, in other words, a smooth continuous output waveform can be obtained even if the pitch is updated sequentially, and the quality of the musical effect Is further improved.
[0013]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described.
FIG. 1 is a block diagram showing a configuration of an embodiment of a waveform conversion apparatus of the present invention. The input waveform signal input through the low-pass filter 1 is A / D converted by the A / D converter 2 and sent to the DSP 3. The DSP 3 writes the input waveform data in the ring buffer memory (RAM) 4 and cuts out the written data with a predetermined time delay to generate output waveform data in which the pitch or formant is changed. The output waveform data output from the DSP 3 is D / A converted by the D / A converter 5 and output to the outside through the low pass filter 6. The operating element 7 sets various setting conditions such as parameters, and the setting signal is sent to the DSP 3 via the CPU 8. In this operator 7, the reproduction pitch and the reproduction fault man are set as the respective ratios with respect to the input pitch and the input fault man as setting conditions directly related to the present embodiment. Details will be described later.
[0014]
FIG. 2 is a block diagram showing a detailed configuration of the DSP 3 in FIG. FIG. 2 shows an operator 7, and a setting signal obtained by operating the operator 7 is input to the DSP 3 via the CPU 8 as shown in FIG. 1. However, in FIG. 2 and FIG. 3 to be described later, the CPU is not shown in order to avoid the complexity of the illustration. As shown in FIG. 2, the DSP 3 includes a writing unit 31, a pitch detecting unit 32, an address updating unit 33, and an output waveform generating unit 34.
[0015]
The writing means 31 sequentially writes the digital input waveform data sequentially output from the A / D converter 2 into the ring buffer memory 4.
The pitch detector 32 sequentially detects the pitch of the input waveform data. The pitch detection means 32 has a buffer 32a for storing the pitch of the input waveform data in an updatable manner, executes the pitch detection process for the input waveform data, and detects the pitch detection process, that is, here, immediately before detection. When the new pitch detected this time is the correct pitch (the pitch is almost equal to the pitch detected immediately before) in light of the criterion that the new pitch detected this time and the new pitch detected this time are the same pitch. It is determined that pitch detection has been established, and the pitch stored in the buffer 32a is updated to the new pitch detected this time.
[0016]
The address updating means 33 updates the reference address for reading the waveform data from the ring buffer memory 4, which is a reference address for cutting out phonemes in the output waveform generating means 34 described later. The address update means 33 includes a buffer 33a for storing a read reference address as a reference for extracting a phoneme from the waveform data stored in the ring buffer memory 4 so that it can be updated. From the previous update of the buffer 33a, Each time the time corresponding to the pitch information in the buffer 32a of the pitch detection means 32 elapses, the address update means 33 is stored in the buffer 32a of the pitch detection means 32 at the read reference address stored in the buffer 33a. The pitch is read, the corresponding address increment is added to the newly read pitch to obtain a new read reference address, and the new read reference address is replaced by the buffer instead of the read reference address previously stored in the buffer 33a. 33a is stored. In other words, the read reference address stored in the buffer 33a is sequentially accumulated by address increments corresponding to the pitch detected by the pitch detecting means 32 and stored in the buffer 32a.
[0017]
Further, the output waveform generation means 34 reads out the read reference address from the buffer 33a of the address update means 33 every time output waveform data corresponding to one reproduction pitch is generated, and updates it sequentially based on the read read reference address. Is read out, the phoneme is cut out by reading out the waveform data stored in the read out address from the ring buffer memory 4, and the extracted phoneme is input to the pitch information input by operating the operator 7. And output waveform data having a reproduction pitch and a reproduction formant corresponding to the formant information. The output waveform represented by the output waveform data is a waveform in which one or both of the pitch and formant are changed (including the case where they are the same) as compared with the input waveform.
[0018]
FIG. 3 is a block diagram showing a detailed configuration of the output waveform generating means 34 shown as one block in FIG.
The output waveform generating means 34 shown in FIG. 3 includes a first reading means 341, a second reading means 342, and a weighted adding means 343.
The first reading means 341 has a buffer 341a to which the read reference address stored in the buffer 33a of the address updating means 33 is transcribed every time output waveform data corresponding to two reproduction pitches is generated. Read addresses are sequentially generated based on the read reference address stored in 341a, and the waveform data stored in the sequentially generated read addresses in the ring buffer memory 4a are sequentially read.
[0019]
Similarly to the first reading unit 341, the second reading unit 342 transfers the reading reference address stored in the buffer 33a of the address updating unit 33 every time output waveform data corresponding to two playback pitches is generated. A buffer 342a. However, the transfer timing is the timing at which the read reference address stored in the buffer 33a of the address update means 33 is transferred to the buffer 341a of the first read means 341 is shifted by one reproduction pitch. . That is, the read reference address stored in the buffer 33a of the address updating unit 33 is alternately output to the buffer 341a of the first reading unit 341 or the second reading every time output waveform data corresponding to one reproduction pitch is generated. The data is transferred to the buffer 342a of the means 342. Similar to the first reading unit 341, the second reading unit 342 sequentially generates a reading address based on the reading reference address stored in the buffer 342 a and stores the reading address in the ring buffer memory 4 at the sequentially generated reading address. Sequentially read the waveform data.
[0020]
The waveform data read by the first reading unit 341 and the waveform data read by the second reading unit 342 are input to the weighting addition unit 343, and the weighting addition unit 343 converts the waveform data into Output waveform data is generated by weighting and adding the reproduction pitch using a weight that periodically changes with two pitches as one period.
[0021]
Here, the ring buffer memory 4 will be described. For example, when the first address is “0000” (hexadecimal) and the last address is “0FFF”, the ring buffer memory 4 is “0000”. ”To“ 0FFF ”is a memory in which a series of addresses conceptually continues in a ring shape, and the next address after“ 0000 ”is“ 0FFF ”.
[0022]
Next, the operation of the present embodiment will be described based on a flowchart and waveform diagrams. Before that, the gist of the present invention will be schematically described with reference to FIG.
FIG. 4 is a schematic explanatory diagram of the present invention and corresponds to FIG. 13 referred to when describing the problems of the conventional example. 4 (a) and 4 (b) are the same as FIGS. 13 (a) and 13 (b), respectively, and show input waveform data and its fundamental wave components, respectively. However, some symbols such as SS4 and SS5 are added.
[0023]
FIG. 4C is a waveform diagram obtained by the processing of the present invention. Conventionally, as described above, when the waveform reading is started, the reading is started from the reference point when the last pitch detection is established. However, in the present invention, the pitch when the pitch detection is finally established is started. Are sequentially added to the previous reference point (read address) to obtain the read reference point.
[0024]
First, at the time of S1 in FIG. 4C, the waveform data of the pitch a having the reference point S1 of the waveform in FIG. 4A is read. Then, the calculation of S1 + a is performed at the time of S2 in FIG. 4C, and the waveform data of the pitch b with the position of S1 + a (= S2) in FIG. 4A as the reference point for reading is read out. Similarly, the calculation of S2 + b is performed at the time of S3 in FIG. 4C, and the waveform data of the pitch b with the position of S2 + b (= S3) as the reference point in FIG. 4A is read.
[0025]
Next, in FIG. 4A, the position of SS4 is obtained by S3 + b, and the waveform data of the pitch b with the position of S3 + b (= SS4) as the reference point for reading is read. Similarly, in FIG. 4A, the SS5 position is obtained by SS4 + b, and waveform data having a pitch e with the position of SS4 + b (= SS5) as the reference point for reading is read. Further, similarly, in FIG. 4A, the position of SS6 is obtained by SS5 + e, and the waveform data of the pitch f with the position of SS5 + e (= SS6) as the reference point for reading is read.
[0026]
According to the above method, since the reference point for reading is updated according to the detection pitch, the fundamental wave component is not discontinuous and an output waveform with a natural waveform connection can be obtained. become.
Next, the operation of this embodiment will be described.
5 to 7 are waveform diagrams showing temporal changes in waveform data and functions created by a program described later in the present embodiment.
[0027]
In this embodiment, two variables, that is, a pitch change coefficient PITCH_VR and a formant change coefficient FORMAT_VR are input from the operator 7 (see FIG. 1). In this embodiment, the pitch change coefficient PITCH_VR can be arbitrarily set within the range of 0.5 to 2.0. For example, changing the value from 1.0 to 2.0 changes the pitch to 1. It means lowering the octave. Similarly, the formant change coefficient FORMAT_VR can be arbitrarily set within a range of 0.5 to 2.0. For example, changing the value from 1.0 to 2.0 means that the formant change coefficient It means to raise the shape one octave.
[0028]
5 shows PITCH_VR = 1.0 and FORMAT_VR = 1.0. FIG. 6 shows PITCH_VR> 1.0 and FORMAT_VR = 1.0. FIG. 7 shows PITCH_VR = 1.0. , FORMANT_VR> 1.0.
In FIG. 7, since the pitch P and WIDTH of the input waveform are the same as in FIG. 5, the input waveform is not shown in FIG.
[0029]
Hereinafter, the flowchart of the present embodiment will be described with reference to these drawings. Hereinafter, when any of FIGS. 5 to 7 may be referred to, FIG. 5 is typically referred to.
FIG. 8 is a flowchart showing the operation of the present invention. The operation shown in this flowchart is repeatedly executed at a predetermined sampling period.
[0030]
In the following description of the flowchart, for the sake of simplicity, the same name may be used without distinguishing between the name given to the buffer and the name assigned to the value stored in the buffer.
First, the writing means 31 shown in FIG. 2 sequentially writes sampling data, that is, input waveform data input at a predetermined sampling period, into the ring buffer memory 4 (step 8_1).
[0031]
At the same time, the pitch detection means 32 performs a pitch detection process on the input sampling data (step 8_2). The pitch detection process in this case is performed by the same technique as that disclosed in Japanese Patent Laid-Open No. 3-288200 described above. That is, the zero cross position or peak position of the input waveform is detected, and the time interval is compared with the time interval of the previously detected zero cross position or peak position to determine that the pitch is correctly detected. Sometimes the address and pitch of the zero-cross position that is the previous reference is output. Specifically, assuming that input waveform data as shown in FIG. 5A is input, when the zero cross point Z2 is detected, the pitch P0 from Z0 to Z1 and the pitch P1 from Z1 to Z2 are detected. Are determined to be equal to each other, and the zero-cross point Z1 and the detection pitch P1 are output.
[0032]
If it is determined in step 8_2 that the pitch has been detected, the pitch detection means 32 updates and holds the value of the pitch 1 period length (PITCH) in the buffer 32a named PITCH instead of the value detected last time. (Step 8_3). If no pitch is detected in step 8_2, the process immediately proceeds to step 8_4.
[0033]
The address update means 33 is based on the pitch 1 period length value (PITCH) currently held by the pitch detection means 32 and every time corresponding to the pitch 1 period length value (PITCH) has elapsed since the previous update. Then, the read reference address (SADRS) in the ring buffer memory 4 is updated (step 8_4). The update of the read reference address will be described later with reference to FIGS.
[0034]
When the read reference address is updated in step 8_4, the output waveform generation means 34 increments the PHASE, PH1, and PH2 functions shown in FIGS. 5B, 5D, and 5E, respectively (step S4). 8_5). Then, the magnitude relationship between PHASE and WIDTH (reproduction pitch) is compared (step 8_6). While PHASE remains at a value smaller than WIDTH, waveform readout processing is performed (step 8_16), and output waveform data is output. (Step 8_17). Further, when PHASE becomes WIDTH or more, PHASE is initialized to 0 (step 8_7).
[0035]
Then, the output waveform generation means 34 inputs parameters obtained from the result of the CPU 8 detecting the state of the operation element 7 (step 8_8). Here, the pitch change coefficient PITCH_VR and the formant change coefficient FORMAT_VR described above are input.
The output waveform generation means 34 calculates WIDTH and LENGTH based on the parameters obtained from the operator 7 (step 8_9). WIDTH is a period determined as a reproduction pitch, and LENGTH is a period half of the period during which waveform reading is actually performed. WIDTH can be obtained from the product of PITCH updated in step 8_3 and the pitch change coefficient PITCH_VR. LENGTH can be obtained by dividing PITCH by the formant change coefficient FORMAT_VR.
[0036]
Next, the output waveform generation means 34 compares the magnitude relationship between LENGTH and WIDTH (step 8_10), and when LENGTH is greater than WIDTH, sets the value of LENGTH to WIDTH (step 8_11). When LENGTH is less than or equal to WIDTH in step 8_10, the process proceeds directly to step 8_12. As described above, the reason that LENGTH does not always exceed WIDTH by steps 8_10 and 8_11 is that, if LENGTH exceeds WIDTH, a state in which WINDOW1 and WINDOW2 (described later) do not fall down to 0 occurs.
[0037]
The output waveform generation means 34 further performs W_RATE calculation and FLAG inversion operation (step 8_12). W_RATE is obtained by 1 / LENGTH. Then, the positive / negative of FLAG is discriminated (stainless steel 8_13). If positive, PH1 and WINDOW1 are set to 0 by the first reading means 34 shown in FIG. 3, and SADRS1 is set to SADRS updated in step 8_4. (Step 8_14). If negative, PH2 and WINDOW2 are set to 0 by the second reading means 342 shown in FIG. 3, and SADRS2 is set to SADRS updated in step 8_4 (step 8_15). By setting PH1 and PH2 to zero in steps 8_14 and 8_15, resetting is performed at the rising and falling points of FLAG (see FIG. 5C), and sawtooth waves whose phases are shifted from each other by 180 degrees are generated (see FIG. 5). 5 (d), (e)).
[0038]
The processing from step 8_7 to step 8_15 including the above steps 8_14 and 8_15 is performed only when PHASE ≧ WIDTH is satisfied, and thus is performed only at the rising edge and falling edge of FLAG. As described above, after the PH1, WINDOW1, PH2, and WINDOW2 are reset and the SADRS1 and SADRS2 are set in Steps 8_14 and 8_15, the output waveform generation unit 34 performs a waveform reading process from the ring buffer memory 4 (Step 8_16). ). Then, output waveform data is generated based on the read waveform data, and the output waveform data is output to the D / A converter 5 (step 8_17).
[0039]
Next, the update of the read address (SADRS) in step 8_4 will be described.
FIG. 9 is a conceptual diagram showing a relationship between a write address and a read address in the ring buffer memory 4.
The vertical axis in FIG. 9 indicates the address position from “0000” to [0FFF], and the horizontal axis indicates time. IBUF_PTR is an address at which writing is performed by the writing means 31, and ADRS exists with a delay of DELAY from this IBUF_PTR. ADRS is an address to be read from the ring buffer memory 4, and the DELAY is provided to prevent the read address from overtaking the write address. As the DELAY value, one cycle of the lowest frequency of the input waveform is usually set.
[0040]
Inside the ADRS, the read reference address (SADRS) changes stepwise along the ADRS. When SADRS gradually rises and comes before the final address [0FFF], an interval where ADRS <SADRS occurs. Then, the SADRS returns to the lower first address side, and again changes in a stepped manner along the ADRS.
[0041]
FIG. 10 is a flowchart of the update operation of the read reference address (SADRS).
First, the address updating unit 33 sets ADRS by subtracting DELAY from IBUF_PTR. Further, the logic of (1000 (hex) −1) is set so that ADRS is within the range of the first address from the first address. Take the product (step 10_1). Here, (hex) represents a hexadecimal number.
[0042]
Next, the magnitude relationship between ADRS and SADRS is compared (step 10_2). If SADRS does not exceed ADRS, the process proceeds to step 10_4. If SADRS exceeds ADRS, this means that SADRS has come before the final address and ADRS has returned to the first address side below, as described with reference to FIG. The ADRS is corrected to an address exceeding the final address so that the comparison of the magnitude relationship in the next step 10_4 can be performed normally (step 10_3).
[0043]
Thereafter, the address updating means 33 compares the magnitude relationship between ADRS and (SADRS + PITCH) (step 10_4). PITCH is updated from the pitch detection means 32 in step 8_3 of FIG. If ADRS is greater than or equal to (SADRS + PITCH), the logical product of (SADRS + PITCH) and (1000 (hex) -1) is taken, and (SADRS + PITCH) is updated as a new SADRS (step 10_5). ). Further, when ADRS is smaller than (SADRS + PITCH), updating is not performed and the current SADRS is used as it is.
[0044]
Next, the waveform reading process in step 8_16 in FIG. 8 will be described with reference to the flowchart in FIG.
First, the first reading unit 341 shown in FIG. 3 sets a value obtained by adding W_RATE to WINDOW1 as a new WINDOW1 (step 11-1). W_RATE is obtained by 1 / LENGTH in step 8_12. WINDOW1 is incremented by W_RATE and is not shown in FIG. 5, but is a sawtooth wave similar to PH1, and has a slope different from that of PH1. Then, the value of WINDOW1 becomes 1 after the LENGTH period, and the value of WINDOW1 becomes 2 after the period twice LENGTH.
[0045]
Next, the first reading means 341 determines the current value of WINDOW1 (step 11_2). If the value of WINDOW1 is less than 1, envelope ENV1 is set to WINDOW1 (step 11_3), and if WINDOW1 is 1 or more and less than 2, envelope ENV1 is set to (2-WINDOW1) (step 11_4). Steps 11_3 and 11_4 mean that ENV1 is obtained by folding WINDO1 which is a sawtooth wave by 1 and converting it into a triangular wave. If there is a part where WINDOW1 is 2 or more, ENV1 of that part is set to 0 (step 11_5).
[0046]
Next, an address ADRS1 for reading input waveform data from the ring buffer memory 4 is set (step 11_6). This ADRS1 is obtained by adding (PH1 * FORMAT_VR) to the read reference address SADRS. Based on this ADRS1, the waveform data DATA1 is read from the ring buffer memory 4 (step 11_7). Note that the read address ADRS1 is an address of a decimal point expression that does not actually exist, but performs a process of reading the waveform data DATA1 corresponding to the decimal point address by performing a known interpolation operation.
[0047]
The same operation as described above is performed on the WINDOW 2 side, that is, the second reading means 342 (steps 11_8 to 11_14). In the weighted addition means 343 shown in FIG. 3, DATA1 * ENV1 (see FIG. 5 (h)) and DATA2 * ENV2 (see FIG. 5 (i)) are respectively obtained from DATA1 and DATA2 obtained in steps 11_7 and 11_14. Then, DATA1 * ENV1 + DATA2 * ENV2 is calculated. This is output from the output waveform generation means 34 as output waveform data (step 11_15).
[0048]
By the way, as described in Step 10_1 of FIG. 10, when the read address ADRS is obtained, a calculation of subtracting the delay amount DELAY from the write address IBUF_PTR is performed. This DELAY value is used to prevent the read address (SADRS1, SADRS2) of the ring buffer memory 4 from overtaking the current write address (IBUF_PTR), and is usually one cycle of the lowest frequency of the input waveform. As described above, is set. However, if the minimum frequency of the input waveform is 80 Hz, a value corresponding to 12.5 milliseconds is set for DELAY, resulting in a delay of 12.5 milliseconds. This is a value that can be recognized as a delay, and is not preferable.
[0049]
Therefore, even when an input waveform having a low minimum frequency is input, in order to avoid the need to add such a large delay as described above, it is shown in FIG. 12 between steps 8_9 and 8_10 in FIG. It is preferable to insert the steps 9a and 9b. That is, after step 8_9, the magnitude relationship between LENGTH and pitch P (100 Hz) when the lowest frequency is 100 Hz is compared (step 9a). When LENGTH is larger than P (100 Hz), LENGTH is set to P (100 Hz) (step 9_b). In this way, by limiting the DELAY value to a certain value or less, it is possible to prevent a delay in reading from being recognized.
[0050]
【The invention's effect】
As described above, according to the present invention, while adopting a simple processing method for real-time processing as in the past, the occurrence of discontinuous portions of the fundamental component is prevented, and a natural output waveform is always obtained. be able to.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of an embodiment of a waveform conversion apparatus of the present invention.
FIG. 2 is a block diagram showing a detailed configuration of a DSP.
FIG. 3 is a block diagram showing a detailed configuration of output waveform generation means.
FIG. 4 is a schematic explanatory diagram of the present invention.
FIG. 5 is a waveform diagram showing temporal changes in waveform data and functions in the embodiment of the present invention.
FIG. 6 is a waveform diagram showing temporal changes in waveform data and functions in the embodiment of the present invention.
FIG. 7 is a waveform diagram showing temporal changes in waveform data and functions in the embodiment of the present invention.
FIG. 8 is a flowchart showing the operation of the embodiment of the present invention.
FIG. 9 is a conceptual diagram showing a relationship between a write address and a read address of a ring buffer memory.
FIG. 10 is a flowchart of an update operation of a read reference address (SADRS).
FIG. 11 is a flowchart of a waveform read process.
12 is a diagram showing a flowchart to be added to the flowchart of FIG. 8 according to another embodiment of the present invention.
FIG. 13 is an explanatory diagram of problems in the prior art.
[Explanation of symbols]
1 Low-pass filter
2 A / D converter
3 DSP
4 Ring buffer memory
5 D / A converter
6 Low-pass filter
7 Controller
8 CPU
31 Writing means
32 Pitch detection means
33 Address change means
34 Output waveform generation means
341 First reading means
342 second reading means
343 Weighted addition means

Claims (2)

順次入力される入力波形データのピッチを検出し、該入力波形データの、検出されたピッチに対応する所定のデータ区間からなる音素を切り出し、切り出した音素を、所定の再生ピッチ情報に対応するピッチを有する出力波形データに変換して出力する波形変換装置において、
波形データを一時的に記憶するメモリと、
順次入力される入力波形データを前記メモリに順次書き込む書込手段と、
ピッチ情報を更新自在に格納する第1のバッファを有し、前記入力波形データについてピッチ検出処理を実行しピッチ検出が成立した場合に前記第1のバッファに格納されたピッチ情報を新たに検出されたピッチ情報に更新するピッチ検出手段と、
前記メモリに記憶された波形データから音素を切り出すための基準となる読出基準アドレスを更新自在に格納する第2のバッファを有し、前記第1のバッファから前回読出したピッチ情報に対応する時間が経過する毎に前記第1のバッファからピッチ情報を読み出して、前記第2のバッファに格納された読出基準アドレスを、前記第1のバッファから新たに読み出したピッチ情報に対応するアドレス増分だけ更新するアドレス更新手段と、
再生ピッチ情報を入力する再生ピッチ情報入力手段と、
前記第2のバッファから読出基準アドレスを読み出し、読み出した読出基準アドレスに基づいて前記メモリから所定のデータ区間の波形データを読出すことにより音素を切り出し、切り出した音素を、前記再生ピッチ情報入力手段より入力された再生ピッチ情報に対応する周期で合成して出力波形データを生成する出力波形生成手段とを備えたことを特徴とする波形変換装置。
Detects the pitch of input waveform data that is sequentially input, cuts out a phoneme consisting of a predetermined data section corresponding to the detected pitch of the input waveform data, and uses the extracted phoneme as a pitch corresponding to predetermined playback pitch information In the waveform converter for converting to output waveform data having
A memory for temporarily storing waveform data;
Writing means for sequentially writing input waveform data sequentially input to the memory;
A first buffer for storing the pitch information in an updatable manner is provided. When the pitch detection process is executed for the input waveform data and the pitch detection is established, the pitch information stored in the first buffer is newly detected. Pitch detection means for updating the pitch information;
A second buffer for renewably storing a read reference address serving as a reference for extracting phonemes from the waveform data stored in the memory, and a time corresponding to the pitch information read from the first buffer last time; Each time, the pitch information is read from the first buffer, and the read reference address stored in the second buffer is updated by an address increment corresponding to the pitch information newly read from the first buffer. Address updating means;
Reproduction pitch information input means for inputting reproduction pitch information;
A read reference address is read from the second buffer, and a phoneme is cut out by reading waveform data in a predetermined data section from the memory based on the read reference address. An output waveform generating means for generating output waveform data by synthesizing at a period corresponding to the input reproduction pitch information.
前記出力波形生成手段が、
前記再生ピッチ2ピッチ分の出力波形データが生成される毎に前記第2のバッファに格納された読出基準アドレスが転記される第3のバッファを有し、該第3のバッファに格納された読出基準アドレスに基づいて入力波形データ2ピッチ分の読出アドレスを順次生成して、前記メモリの、順次生成した読出アドレスに格納された波形データを順次読み出す第1の読出手段と、
前記第2のバッファに格納された読出基準アドレスが前記第3のバッファに転記されるタイミングとは再生ピッチ1ピッチ分だけずれたタイミングで、かつ再生ピッチ2ピッチ分の出力波形データが生成される毎に、前記第2のバッファに格納された読出基準アドレスが転記される第4のバッファを有し、該第4のバッファに格納された読出基準アドレスに基づいて入力波形データ2ピッチ分の読出アドレスを順次生成して、前記メモリの、順次生成した読出アドレスに格納された波形データを順次読み出す第2の読出手段と、
前記第1の読出手段で読み出された波形データと、前記第2の読出手段で読み出された波形データを、再生ピッチ2ピッチを一周期として周期的に変化する重みを用いて重み付け加算することにより出力波形データを生成する重み付け加算手段とを備えたことを特徴とする請求項1記載の波形変換装置。
The output waveform generating means is
A read buffer stored in the third buffer has a third buffer to which a read reference address stored in the second buffer is transcribed each time output waveform data corresponding to two playback pitches is generated. First reading means for sequentially generating read addresses for two pitches of input waveform data based on a reference address, and sequentially reading the waveform data stored in the sequentially generated read addresses of the memory;
Output waveform data corresponding to two playback pitches is generated at a timing deviated by one playback pitch from the timing at which the read reference address stored in the second buffer is transferred to the third buffer. Each has a fourth buffer to which the read reference address stored in the second buffer is transcribed, and reads out two pitches of input waveform data based on the read reference address stored in the fourth buffer. Second reading means for sequentially generating addresses and sequentially reading the waveform data stored in the sequentially generated read addresses of the memory;
The waveform data read by the first reading means and the waveform data read by the second reading means are weighted and added using a weight that periodically changes with a playback pitch of 2 pitches. The waveform conversion apparatus according to claim 1, further comprising weighted addition means for generating output waveform data.
JP00228397A 1997-01-09 1997-01-09 Waveform converter Expired - Fee Related JP3789997B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00228397A JP3789997B2 (en) 1997-01-09 1997-01-09 Waveform converter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00228397A JP3789997B2 (en) 1997-01-09 1997-01-09 Waveform converter

Publications (2)

Publication Number Publication Date
JPH10198356A JPH10198356A (en) 1998-07-31
JP3789997B2 true JP3789997B2 (en) 2006-06-28

Family

ID=11525051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00228397A Expired - Fee Related JP3789997B2 (en) 1997-01-09 1997-01-09 Waveform converter

Country Status (1)

Country Link
JP (1) JP3789997B2 (en)

Also Published As

Publication number Publication date
JPH10198356A (en) 1998-07-31

Similar Documents

Publication Publication Date Title
US4633748A (en) Electronic musical instrument
US5913259A (en) System and method for stochastic score following
US7606709B2 (en) Voice converter with extraction and modification of attribute data
JP3502247B2 (en) Voice converter
US20120031257A1 (en) Tone synthesizing data generation apparatus and method
US6721711B1 (en) Audio waveform reproduction apparatus
KR100402364B1 (en) Apparatus and method for generating musical tones, and storage medium
EP2278580B1 (en) Pitch detection apparatus and method
JPH07319498A (en) Pitch cycle extracting device for voice signal
EP0217357A2 (en) Waveform normalizer for electronic musical instrument
JP3789997B2 (en) Waveform converter
JP3834804B2 (en) Musical sound synthesizer and method
JP4128848B2 (en) Pitch pitch determination method and apparatus, pitch pitch determination program and recording medium recording the program
JP3649398B2 (en) Waveform processing method and apparatus
JP2001242900A (en) Sound&#39;s time expansion device, method and recoding medium for recording sound&#39;s times expansion program
JP2003036082A (en) Pitch converting apparatus
JP3303608B2 (en) Automatic performance device
US4520502A (en) Speech synthesizer
JP2985441B2 (en) Automatic transcription analyzer
US20240087552A1 (en) Sound generation method and sound generation device using a machine learning model
JP3460408B2 (en) Music control device
JPH07325581A (en) Musical sound generation device
JPH01219636A (en) Automatic score taking method and apparatus
JP3620405B2 (en) Musical sound fluctuation information generating method, musical sound fluctuation information generating apparatus, and recording medium
JP3428230B2 (en) Method and apparatus for forming repetitive waveform of electronic musical instrument

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20031212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050926

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051004

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051227

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060330

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120407

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130407

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees