JP3945905B2 - Pitch detection device - Google Patents

Pitch detection device Download PDF

Info

Publication number
JP3945905B2
JP3945905B2 JP11852198A JP11852198A JP3945905B2 JP 3945905 B2 JP3945905 B2 JP 3945905B2 JP 11852198 A JP11852198 A JP 11852198A JP 11852198 A JP11852198 A JP 11852198A JP 3945905 B2 JP3945905 B2 JP 3945905B2
Authority
JP
Japan
Prior art keywords
pitch
value
detection means
template
input signal
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
JP11852198A
Other languages
Japanese (ja)
Other versions
JPH11311988A (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.)
Korg Inc
Original Assignee
Korg Inc
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 Korg Inc filed Critical Korg Inc
Priority to JP11852198A priority Critical patent/JP3945905B2/en
Publication of JPH11311988A publication Critical patent/JPH11311988A/en
Application granted granted Critical
Publication of JP3945905B2 publication Critical patent/JP3945905B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

【0001】
【発明の属する技術分野】
本発明は、音声信号や楽音信号等のオーディオ信号のピッチを検出するピッチ検出装置に係り、特に高精度なピッチ検出を可能とする技術に関する。
【0002】
【従来の技術】
近年、カラオケ装置が多く普及する中で、単に楽音演奏を出力するのみならず、歌唱者の要望に応じた各種機能を備えたものが使用されつつある。例えば、「キーコントロール」機能を具備することにより、楽音の音程が歌唱者の発声音域に合わない場合には、楽音の音程を変化させることにより、歌唱者にとって歌い易い音域に合わせることができるようになる。
【0003】
更に、昨今においては、一人の歌唱者により発音された音声信号を基に、ハーモニーを奏でる機能を有するカラオケ装置が考案され、実用に共されている。この機能は、歌唱者が発音した音階を主とした和音を自動的に作成して出力するものであり、例えば、歌唱者が「ド」の音階を発声した場合には、この音声入力信号から「ミ」、「ソ」の音階を作成し、「ド、ミ、ソ」の和音として出力する。従って、独唱音を合唱音とすることができるので、臨場感を増大させることができる。
【0004】
入力された音声信号を基に和音を作成する際には、入力された音声信号のピッチを検出し、検出されたピッチに周波数変調を加えて、和音を構成する楽音信号を生成するという操作が必要となる。従って、入力信号のピッチを精度良く検出することが必須の条件となる。
【0005】
ピッチを検出するために用いられるピッチ検出装置として、従来より、入力信号の振幅の正負それぞれの最大値、または、それぞれの任意のスレッショルド点を交差するタイミング間隔をカウントし、その値を基準データとし、過去のピッチデータと比較して極端な信号波形の変化を排除した上で、次回、基準データと同一の間隔を有する信号が発生するまでの間隔を測定し、この間隔を当該入力信号のピッチとする方法を採用しているものが知られている。
【0006】
しかしながら、上記のピッチ検出方法では、入力波形の特定の条件における瞬時値を利用しているだけなので、入力信号にパルス性のノイズが混入した場合にはこれを排除することができるものの、持続性のあるノイズが重畳した場合には、これを排除することができないことが多く、高精度なピッチ検出ができないという問題が発生していた。
【0007】
【発明が解決しようとする課題】
上記したように、従来におけるピッチ検出装置では、ノイズの影響等により高精度なピッチ検出ができないことがある。従って、このピッチ検出装置を例えばカラオケ装置に搭載した場合には、歌唱中に突然音程がずれてしまい、歌唱者に不快感を与えたり、また、このピッチ検出装置を電子楽器に搭載してハーモナイザ(ハーモニーを自動で演奏する装置)として機能させる場合には、ライブ演奏中に突然音程がずれてしまうというトラブルが発生してしまうという欠点があった。
【0008】
この発明はこのような従来の課題を解決するためになされたものであり、その目的とするところは、入力信号のピッチを高精度で検出することのできるピッチ検出装置を提供することにある。
【0009】
【課題を解決するための手段】
上記目的を達成するため、本願請求項1に記載の発明は、入力されるオーディオ信号のピッチを検出するピッチ検出装置において、前記オーディオ信号を第n(nは自然数)のカットオフ周波数「fc(n);fc(n)>fc(n+1)」で濾過するn個のローパスフィルタを縦続的に配置し、前記各ローパスフィルタの出力側に、この出力信号のピッチを検出するピッチ検出手段をそれぞれ設置し、更に、各ピッチ検出手段より得られたピッチに基づいて最適となるピッチを求め、ピッチ決定値として出力するピッチ決定手段を具備し、前記各ピッチ検出手段は、入力信号に基づいてテンプレートを作成すると共に、当該テンプレートと以後の入力信号との相関関係の有無によりピッチを検出し、更に、検出されるピッチの値のばらつき具合を安定度として設定し、前記ピッチ決定手段は、前記各ピッチ検出手段より与えられる安定度から、より安定であるとされたピッチ検出手段より得られたピッチをピッチ決定値として出力すること特徴とする。
【0010】
また、請求項2に記載の発明は、入力されるオーディオ信号のピッチを検出するピッチ検出装置において、前記オーディオ信号を第n(nは自然数)のカットオフ周波数「fc(n);fc(n)>fc(n+1)」で濾過するn個のローパスフィルタを、前記入力信号に対して並列的に配置し、前記各ローパスフィルタの出力側に、この出力信号のピッチを検出するピッチ検出手段をそれぞれ設置し、更に、各ピッチ検出手段より得られたピッチに基づいて最適となるピッチを求め、ピッチ決定値として出力するピッチ決定手段を具備し、前記各ピッチ検出手段は、入力信号に基づいてテンプレートを作成すると共に、当該テンプレートと以後の入力信号との相関関係の有無によりピッチを検出し、更に、検出されるピッチの値のばらつき具合を安定度として設定し、前記ピッチ決定手段は、前記各ピッチ検出手段より与えられる安定度から、より安定であるとされたピッチ検出手段より得られたピッチをピッチ決定値として出力することを特徴とする。
【0011】
請求項3に記載の発明は、前記ピッチ決定手段には、前記各ピッチ検出手段より与えられる安定度を指標する安定度基準値が設定され、前記各ピッチ検出手段より与えられる安定度が、全て当該安定度基準値よりも小さいと判断された場合には、各ピッチ検出手段より与えられる各ピッチのうち、最も近接する2つのピッチを選択し、これらの平均値をピッチ決定値とすることを特徴とする。
【0013】
上記の如く構成された本願請求項1に記載の発明は、オーディオ信号が入力信号として与えられると、この入力信号はカットオフ周波数が順次小さく設定されるn個のローパスフィルタにより順次高周波成分が濾過され、そして、各ローパスフィルタの後段側に設置されたピッチ検出手段により、それぞれの波形のピッチが検出される。つまり、各ピッチ検出手段では、それぞれ異なる周波数帯域成分を含む波形に基づいてピッチを検出することになり、ピッチ決定手段は、これらの各ピッチ検出手段にて求められたピッチのうち最適のものを選択してピッチ決定値とする。より具体的には、各ピッチ検出手段に与えられた入力信号に対してテンプレートを用いた相関が計算され、この相関関係の有無から入力信号のピッチを求めると共に、経時的に検出されるピッチとの比較を逐次行い、ピッチのばらつき具合を示す「安定度」を設定する。即ち、検出されるピッチの値がほぼ同一でありばらつきが少ない場合は安定度を大きく設定し、検出されるピッチの値が離散している場合は安定度を小さく設定する。そして、ピッチ決定手段では、各ピッチ検出手段にて得られるピッチから、最も安定度の高いものを選択してピッチ決定値としている。したがって、突発的なノイズが重畳した場合や、持続性成分を有するノイズが重畳した場合においてもこれらの影響を受け難い精度の高いピッチ検出が可能になる。また、請求項2に記載の発明では、ローパスフィルタの接続を入力信号に対して並列接続としている。
【0015】
請求項に記載の発明では、各ピッチ検出手段にて得られた安定度が予め設定されている安定度基準値よりも小さい場合には、各ピッチ検出手段にて得られたピッチの値は、全て信頼性が低いと判断し、この場合には、各ピッチ検出手段より得られたピッチのうち、最も近接する2つのピッチを選択し、これらの平均値をピッチ決定値としている。
【0016】
【発明の実施の形態】
以下、本発明の実施形態を図面に基づいて説明する。図1は、本発明の一実施形態に係るピッチ検出装置8及びこれに接続される各機器の構成を示すブロック図である。
同図に示す装置は、音声信号を集音するマイク1と、該マイク1にて集音された音声信号を増幅するアンプ2と、アンプ2より出力されるアナログの音声信号をディジタル信号に変換するA/D変換器3と、ディジタル化された音声信号の直流成分を除去するハイパスフィルタ(以下、HPFと略す)4とを具備しており、このHPF4の出力信号はピッチ検出装置8に出力される。
【0017】
ピッチ検出装置8は、HPF4の後段側に縦続的に接続される第1のローパスフィルタ5a(以下、ローパスフィルタをLPFと略す)、第2のLPF5b及び第3のLPF5cと、各LPF5a〜5cの後段側に接続され、各LPF5a〜LPF5cより出力される音声信号のピッチを検出する第1のピッチ検出器6a、第2のピッチ検出器6b及び第3のピッチ検出器6cと、各ピッチ検出器6a〜6cにて検出されたピッチから、最適なピッチを求めるピッチ決定部7と、から構成されている。
【0018】
第1のLPF5a、第2のLPF5b及び第3のLPF5cは、入力信号中に含まれる高周波成分を除去するものであり、各LPF5a〜5cにて設定されている各カットオフ周波数fc1、fc2、fc3は、fc1>fc2>fc3なる関係を有しており、本実施形態では、一例としてfc1=900Hz、fc2=300Hz、fc3=100Hzに設定している。そして、LPF5a〜LPF5cとしてバタワース型のフィルタを使用した場合、図2に示す如くのカットオフ特性を得ることができる。同図において、曲線S1はHPF4とLPF5aとを通過した時の特性曲線であり、S2はHPF4とLPF5bとを通過した時の特性曲線であり、S3はHPF4とLPF5cとを通過した時の特性曲線である。なお、HPF4のカットオフ周波数は20Hzに設定している。
【0019】
図3に示す特性曲線S4〜S6は、それぞれ図1に示す(HPF+LPF5a)、(HPF+LPF5a+LPF5b)及び(HPF+LPF5a+LPF5b+LPF5c)によるカットオフ特性を示しており、図示のように、曲線S4は図2に示す曲線S1と同一であるが、図3の曲線S5は図2の曲線S2よりも周波数変化に対して急峻に下降するカーブを描いており、同様に、図3の曲線S6は図2の曲線S3よりも周波数変化に対して急峻に下降するカーブを描いていることが理解できる。
【0020】
図4は、IIR型の二次フィルタの構成を示すブロック図であり、同図に示すフィルタの伝達関数H(Z)は、次の(1)式にて示されることが知られている。

Figure 0003945905
そして、(1)式における各係数a、a、a、b、bを以下に示すように設定することにより、上記のカットオフ特性を得ることができる。
1)HPF4 fc=20[Hz]
= 0.997302393873
=-1.994604787746
= 0.997302393873
=-1.994597510654
= 0.994612064838
2)第1のLPF5a fc=900[Hz]
= 0.006574544547
= 0.013149089094
= 0.006574544547
=-1.757889215790
= 0.784187393978
3)第2のLPF5b fc=300[Hz]
= 0.000788720212
= 0.001577440424
= 0.000788720212
=-1.919004215489
= 0.922159096337
4)第3のLPF5c fc=100[Hz]
= 0.000089991332
= 0.000179982663
= 0.000089991332
=-1.972989097506
= 0.973349062833
【0021】
また、図1に示すピッチ検出器6a〜6cは、入力されるディジタル信号から、後述する方法でテンプレートを作成し、経時的に得られる入力信号との間で共相関計算を行い、「相関有り」と判断された場合には、この入力信号が得られるまでの時間間隔をピッチとして検出する。
【0022】
次に、上記の如く構成された本実施形態の作用について説明する。図5は、各ピッチ検出器6a〜6cにおけるピッチ検出の手順を示すフローチャートであり、同図に示すフロー(スタートからエンドまでの処理)はデータが1サンプル与えられる毎に実行される。具体例として、入力信号のサンプリング周波数を32.895[kHz]とした場合には、サンプリング周期は30.4[μ秒]であるから、この周期で図5に示すフローが実行されることになる。
【0023】
ピッチ検出が開始されると、まず、テンプレートが既に作成されているかどうか判断され(ステップST1)、テンプレートが作成されていなければ(ステップST1で「無」)テンプレートを作成する処理を実行する。テンプレートの作成方法は種々のものが考えられるが、本実施形態では入力信号がゼロレベルと交差する点を検出し、この点から遡って6サンプル間隔で全10サンプルを取り出し、これをテンプレートとしている。これを、図6に示す説明図を参照しながら説明すると、同図(a)に示すように、入力信号S10が与えられ、時刻t1にてこの入力信号S10とゼロレベルとの交差が検出された場合には(図5のステップST14でYES)、この時刻t1から6サンプル間隔で全10サンプル、即ち、182.4[μ秒](30.4×6=182.4)間隔で、10サンプル遡ったデータ(D1)を取り出してこれをテンプレートとする(ステップST8)。
【0024】
次いで、ステップ8にて求められたテンプレートの自乗和を演算し(ステップST9)、この値が所定の基準値以上であるかどうかが判定される(ステップST10)。そして、自乗和の値が基準値以上であると判定された場合には(ステップST10でYES)、ステップ8にて求められたテンプレートを以後使用するテンプレートとして決定し、変数「Sample」の値をゼロにリセットする(ステップST11)。一方、自乗和の値が基準値よりも小さいと判定された場合には(ステップST10でN0)、ステップST8で求めたテンプレートは無効であると判断し、テンプレート無しとする。同時に、変数「Pitch 」をゼロに設定する(Pitch =0は、ピッチが依然求められていない状態を意味する)(ステップST12)。ここで、自乗和の値が基準値よりも小さいということは、入力信号がゼロレベルに対してあまり大きく振幅していないことを示すので、データとして意味の無いものであるからテンプレートとして使用するには相応しくないと判断し、テンプレートを無効とするのである。
【0025】
そして、上記の手順を繰り返すことにより、テンプレートが作成されると、ステップST1で「有」となるから、「Sample」の値がインクリメントされ(ステップST2)、現在の「Sample」の値が設定値よりも小さいかどうかが判定される(ステップST3)。なお、このステップST3における処理の詳細については後述する。
【0026】
次いで、サンプリングされたデータにゼロクロスが発生したかどうかが判定され(ステップST4)、ゼロクロスが発生すると(ステップST4でYES)、この時点における入力波形と、既に決定されているテンプレート(データD1)との間で共相関を計算する(ステップST5)。図6に示した例で説明すると、同図(b)に示すように、入力信号S10は時刻t2にてゼロクロスするので、この時点の波形とテンプレートとで共相関が計算され、相関が無ければピッチデータとして採用せず、引き続きピッチ検出を継続する(ステップST6でNO)。なお、共相関の計算手法は周知であるからここでは説明を省略する。図6(b)では、入力信号S10とテンプレートとはほとんど一致していないので相関関係は無く、従ってピッチデータとして採用しない。
【0027】
同様の手順を繰り返すと、図6(c)、(d)に示すように、時刻t3、t4にてゼロクロスが検出されることになるが、共にテンプレートとの相関が無いと判断されるので、やはりピッチデータとして採用しない。そして、同図(e)に示す時刻t5においては、サンプリングデータのゼロクロスが検出され、且つ、入力信号S10とテンプレートとがほぼ一致するので、「相関有り」と判定されることになるから(ステップST6でYES)、現時点での「Sample」の値を「Pitch 」とする(ステップST7)。即ち、前記したように、テンプレートが決定された時点で(ステップST11)で「Sample」の値をゼロにリセットしており、また、ステップST2においてこの「Sample」の値をサンプリング周期毎にインクリメントしているので、図6(e)の時刻t5における「Sample」の値は、時刻t1〜t5の間のサンプル数ということになり、これが入力信号S10のピッチP1ということになる。
【0028】
次いで、前記したテンプレート作成手順と同様に、時刻t5から6サンプル間隔で遡って全10サンプルを取り出し、このデータを新たなテンプレートとして更新し、且つ、「Sample」をゼロにリセットする(ステップST8〜ST11)。ここで、テンプレートを更新する理由は、入力信号の波形が徐々に変化した場合でもこれに追従させるためである。つまり、図6(e)の時刻t5にて入力信号S10とテンプレートとの間に相関関係があると判断されたが、これらは全く同一の波形ということでは無く、若干の誤差が発生しており、以後使用するテンプレートとしては、できるだけ新しいデータを使用した方が共相関計算時の精度を向上させることができるので、新たに得られたデータに基づきテンプレートを改めて作成しているのである。
【0029】
また、上記の例では、時刻t5にて相関関係が得られた場合について説明したが、もし、テンプレートとの間で一定の相関関係が得られる波形が存在しない場合には、ステップST2において「Sample」の値がインクリメントされ続けることになり、この値が設定値以上となると(ステップST3でNO)、既に設定されているテンプレートをクリアし、且つ、「Pitch 」をゼロ(即ち、ピッチ未検出の状態)とする(ステップST13)。これは、長時間ピッチが検出されない場合に、これ以上現在のテンプレートを使用したピッチの検出を行わず、テンプレートを作成し直すための処理である。
【0030】
例えば、入力信号が人間の音声である場合を例にとると、人間の発声音の周波数は約60Hz以上であることが知られており、この周期は16.67[m秒]以下であり、前記したように入力信号のサンプリング周期は30.4[μ秒]であることから、16670/30.4=548が得られ、入力信号が人間の音声である場合には、ピッチが「548」サンプル以上となることは無いということができる。よって、「Sample」の値が「548」以上となってもなお且つピッチが検出されない場合には、現時点にて設定されているテンプレートを使用したこれ以上のピッチ検出は意味が無いものと判断される。従って、設定値を「548」に設定しておけば、たとえテンプレートと相関を持つ波形が検出されなくても、不要なピッチ検出の演算を回避することができることになる。本実施形態では、演算の都合上、この設定値を「512」としており、ステップST3において「Sample」の値が「512」以上となった場合には、現時点で設定されているテンプレートをクリアし、且つ、Pitch =0とした後(ステップST13)、ステップST14以降の処理にて再度テンプレートの作成を行う。
【0031】
また、ステップST6における処理にて、「相関有り」と判断されると、その都度新たなピッチ検出データが得られることになり、新たに得られるピッチに更新するかどうかの処理は、図7に示すフローチャートの手順に沿って実行される。図示のように、ピッチの更新処理では、まず、現在の「Pitch 」がゼロ(ピッチが未設定)であるかどうかが判定され(ステップST21)、Pitch =0である場合には(ステップST21でNO)、安定度を示す変数「Stab」をゼロとし、新たに得られた「Sample」の値を「Pitch 」とする(ステップST29)。また、「Pitch 」がゼロでない場合(ステップST21でYES)には、今回求められた「Sample」の値と現時点で設定されている「Pitch 」との比較が行われ(ステップST22)、両者が近い値であれば(ステップST22でYES)、「Stab」の値をインクリメントし(ステップST23)予め設定されている上限基準値との比較を行う(ステップST24)。なお、上限基準値は適宜設定することができるものであり、この例では「16」に設定している。
【0032】
そして、「Stab」の値が上限基準値「16」以下である場合には(ステップST24でYES)新たに求められた「Sample」を新たな「Pitch 」として更新する(ステップST25)。また「Stab」の値が上限基準値「16」よりも大きい場合には(ステップST24でNO)、Stab=16とした後(ステップST26)やはり、新たに求められた「Sample」を新たな「Pitch 」として更新する(ステップST25)。
【0033】
また、「Sample」の値が現時点で設定されている「Pitch 」と近い値では無い場合には(ステップST22でNO)、ピッチ検出の安定性が悪いと判断し、現在設定されてる「Stab」の値をデクリメントして(ステップST27)この値が下限基準値(「0」に設定している)以下であるかどうかの判定が行われる(ステップST28)。そして、「Stab」の値が「0」よりも大きいと判断された場合には(ステップST28でNO)、ピッチの更新は行わず、一方、「0」以下であると判断された場合には(ステップST28でYES)、「Stab=0」に設定し、かつ、求められた「Sample」の値を「Pitch 」として設定する(ステップST29)。こうして、ピッチの更新が行われるのである。
【0034】
上記の方法によれば、近似したピッチが複数回得られると安定度を示す変数「Stab」が増加し、反対にばらつきのあるピッチの値が得られると安定度「Stab」は減少する。即ち、「Stab」は、検出されるピッチの値のばらつきの度合いを指標する変数ということができる。
【0035】
そして、図1に示される各ピッチ検出器6a〜6cでは、図5,図7に示した手順にてピッチが検出され、この求められた「Pitch 」及び「Stab」はピッチ決定部7に出力される。以下、図8に示すフローチャートを参照しながら、ピッチ決定部7における処理手順について説明する。ここで、ピッチ検出器6aより得られる「Pitch 」をPa、「Stab」をSaと表し、ピッチ検出器6bより得られる「Pitch 」をPb、「Stab」をSbと表し、また、ピッチ検出器6cより得られる「Pitch 」をPc、「Stab」をScと表すことにする。また、図8に示すフローチャートでは、ピッチを示す変数を「PITCH 」と、大文字で示す。
【0036】
ピッチ決定部7における処理では、まず、以下の処理で使用する最大安定度「STAB MAX」を安定度基準値(ここでは「1」としている)に設定し、且つ、PITCH =0(即ち、ピッチ未設定の状態)とする(ステップST31)。次いで、Sa(ピッチ検出器6aより与えられる「Stab」)と最大安定度「1」との比較が行われ(ステップST32)、Sa≧1であれば(ステップST32でYES)「STAB MAX=Sa」とし、且つ、「PITCH 」をPaに設定する。
【0037】
次いで、ステップST34〜ST37にて、ピッチ検出器6b,6cの出力についても同様の処理を行う。その結果、各ピッチ検出器6a〜6cにて求められたピッチPa〜Pcのうち、最も安定度「Stab」の大きいピッチ検出器6a〜6cにて得られたピッチが「PITCH 」として設定されることになり、この「PITCH 」がピッチ決定部7におけるピッチ決定値(出力値)となる(ステップST38でNO、ステップST46)。ここで、図8のステップST32〜ST37に示す処理手順から容易理解されるように、各ピッチ検出器6a〜6cにて得られた「Stab」Sa、Sb、Scの値が同一である場合には、より下位にあるものが選択されることになる。例えば、Sa=Sb=Scである場合には、STAB MAX=Scとされるので、Pcが「PITCH 」として選択されることになる。これは、テンプレートによるピッチの検出エラーは、一般的に高周波帯域にて発生しやすいことを考慮したものであり、「Stab」の値が同一である場合には、より下位にあるものを選択することにより、ピッチの検出精度を向上させている。
【0038】
一方、安定度Sa〜Scがすべて安定度基準値「1」よりも小さい場合には、上記ステップST31〜ST37の処理では「PITCH 」にデータが書き込まれないことになるので(即ち、ステップST32,ST34,ST36で全てNO)、「PITCH =0」とされており(ステップST38でYES)、この場合には、まず、以下の処理で使用するピッチ誤差許容値を示す変数「PITCH DIF」を設定する(ステップST39)。なお、ここでは一例として「PITCH DIF=3」としている。そして、
イ)Pa≠0
ロ)Pb≠0
ハ)|Pa−Pb|≦PITCH DIF
上記イ)〜ハ)の3つの条件が成立した場合には(ステップST40でYES)、
ニ)PITCH DIF=|Pa−Pb|
ホ)PITCH =(Pa+Pb)/2
とする(ステップST41)。上記イ)〜ホ)の処理では、ピッチ検出器6a及び6bの出力を対象としており、Pa、Pbが共にゼロでなく、これらの差分の絶対値が「PITCH DIF」の値(ここでは、「3」)以下である場合には、PaとPbとの平均を「PITCH 」として設定している。
【0039】
そして、上記イ)〜ホ)と同様の操作をピッチ検出器6aと6c、及びピッチ検出器6bと6cでそれぞれ行い(ステップST42〜ST45)、最も差分の小さいものどうしの平均から得られる「PITCH 」を、ピッチ決定部7の出力とする(ステップST46)。つまり、上記のステップST39〜ST46の処理では、各ピッチ検出器6a〜6cにて得られたピッチPa〜Pcの安定度が全て安定度基準値「1」よりも小さい場合には、このうちの接近した2つのピッチの平均値を演算し、この平均値を最終的なピッチとしている。こうして、ピッチ決定部7では、各ピッチ検出器6a〜6cより与えられるピッチの値から最適なピッチを求め、これをピッチ決定値として出力する。
【0040】
次に、図1に示した各LPF5a〜5cより出力される波形の具体例について説明すると、例えば、A/D変換後の入力信号として、図9(a)に示す如くの波形が得られた場合には、LPF5aの出力信号は同図(b)、LPF5bの出力信号は同図(c)、そしてLPF5cの出力信号は同図(d)に示す如くの波形というように、順次高周波成分が除去された波形となる。そして、各ピッチ検出器6a〜6cでは、図9(b)〜(d)に示すそれぞれの波形を基にピッチを検出しており、ピッチ決定部7では各ピッチ検出器6a〜6cにて求められたピッチの中から最適なピッチを求めている。
【0041】
このようにして、本実施形態に係るピッチ検出装置では、複数段のLPF5a〜5cを用いて入力信号の波形を変形させ、変形された各信号に基づいてそれぞれピッチを検出し、求められた各ピッチから最適なピッチを求めるようにしているので、ノイズ等の影響を受け難くすることができ、従来のピッチ検出装置と比較して、より精度の高いピッチの検出が可能となる。
【0042】
図10は、本実施形態のピッチ検出装置を、カラオケ装置に搭載した例を示しており、図1に示したピッチ検出装置8は同図に示すディジタルシグナルプロセッサ(DSP)11内に搭載されている。このカラオケ装置は、制御中枢となるCPU17、所望の曲を選択する選曲部18、外部記憶装置19、データの一時的な記憶を行うRAM20、システムプログラムが記憶されるROM21、楽音信号を生成して出力する音源装置16、画面表示する画像を生成する画像処理装置22、D/A変換器12、楽音信号と音声信号とを合成するミキサ13、カラオケ画像を画面表示するビデオモニタ23、ミキサ13の出力を増幅するアンプ14、及びスピーカ15から構成されている。
【0043】
そして、このようなカラオケ装置に、本実施形態のピッチ検出装置を適用すれば、歌唱者より入力される音声信号に基づき、これを基準とした和音を自動的に作成して発音させることができるので、一人の音声で合唱音を生成でき、臨場感を増大させることができるようになる。また、採点機能付きカラオケ装置においては、ピッチ検出の精度を向上させることにより、歌唱者の実力に則したより高度な採点をすることができるようになる。
【0044】
図11は、本発明に係るピッチ検出装置の変形例の構成を示すブロック図であり、図示のようにこのピッチ検出装置は、HPF4の出力を3系統に分岐させ、分岐された各経路上にそれぞれカットオフ特性の相違するLPF5a〜5cを設置し、これらのLPF5a〜5cの出力側にピッチ検出器6a〜6cを配設している。そして、このような構成によれば、図2及び図3に示したように、LPF5a〜5cを縦続的に接続した場合と比較して、周波数のカットオフ特性が若干低下することになるが、実際には、フィルタのカットオフ特性が多少低下しても高い精度でピッチを検出することができるから、その効果は極めて大である。
【0045】
なお、上記した実施形態では、ローパスフィルタ及びピッチ検出器の個数を3個とする例について説明したが、本発明はこれに限定されるものでは無く、2個以上であれば、適用できることは自明である。また、入力信号としてカラオケ装置のマイクより入力される音声信号を例に説明したが、本発明はこれに限定されるものではなく、各種の入力信号に対して適用できるものである。
【0046】
また、図1に示したローパスフィルタの代わりにバンドパスフィルタを使用して帯域分割し、同様の効果を得ることもできるが、バンドパスフィルタはローパスフィルタとハイパスフィルタとの組み合わせにて構成されるものであるから、バンドパスフィルタを使用すると図1に示すピッチ検出装置8が搭載されるDSP11(図10参照)における計算量が著しく増大し、実現化が困難である。即ち、本発明はバンドパスフィルタを使用して帯域分割した場合と比較すると、より少ない計算量で高精度なピッチ検出が可能になるという効果も達成し得る。
【0047】
【発明の効果】
以上説明したように、本発明のピッチ検出装置では、入力信号に対してローパスフィルタを縦続的または並列的に複数段設置し、これら各ローパスフィルタの後段側にピッチ検出手段を接続し、各ピッチ検出手段より得られるピッチに基づき最適なピッチを求めている。従って、入力信号に突発的なノイズが重畳したり、持続性ノイズが重畳した場合においても、各ピッチ検出装置では、それぞれ異なるカットオフ周波数で高周波成分が除去された入力信号からピッチを検出しているので、これらのノイズの影響を受け難くなり、高精度なピッチ検出が可能となる。
【0048】
また、各ピッチ検出手段にて検出されるピッチのばらつき具合を「安定度」で評価し、各ピッチ検出手段にて検出されたピッチの中から、最も安定度が高いと判断されたピッチを選択する構成としているので、各ピッチ検出手段にて得られたピッチから確実に最適なものを選択することができる。
【0049】
更に、各ピッチ検出手段にて検出されたピッチの安定度が、安定度基準値よりも小さいと判断された場合には、全てのピッチについて信頼性が低いと判断されるので、各ピッチ検出手段にて検出されたピッチからどれかを選択するのでは無く、検出された各ピッチの中から最も接近している2つのピッチを取り出し、これらの平均値をピッチ決定値としているので、一つのピッチ検出結果に支配されない、より高精度なピッチ検出が可能となる。
【図面の簡単な説明】
【図1】本発明の一実施形態に係るピッチ検出装置の構成を示すブロック図。
【図2】各LPF5a〜5cの周波数のカットオフ特性を示す特性図。
【図3】LPF5a、(LPF5a+LPF5b)、(LPF5a+LPF5b+LPF5c)のそれぞれの周波数のカットオフ特性を示す特性図。
【図4】IIR型二次フィルタの一般的な構成を示すブロック図。
【図5】ピッチ検出器におけるピッチ検出の手順を示すフローチャート。
【図6】テンプレートの作成方法及びテンプレートと入力波形との相関関係の有無を示す説明図。
【図7】ピッチを更新する際の操作手順を示すフローチャート。
【図8】ピッチ決定部における操作手順を示すフローチャート。
【図9】入力信号及び第1のLPF〜第3のLPFより出力される信号波形を示す説明図。
【図10】カラオケ装置の構成を示すブロック図。
【図11】本発明の変形例の構成を示すブロック図。
【符号の説明】
1 マイク
2 アンプ
3 A/D変換器
4 ハイパスフィルタ(HPF)
5a〜5c 第1〜第3のローパスフィルタ(LPF)
6a〜6c 第1〜第3のピッチ検出器
7 ピッチ決定部
8 ピッチ検出装置
11 ディジタルシグナルプロセッサ(DSP)
12 D/A変換器
13 ミキサ
14 アンプ
15 スピーカ
16 音源装置
17 CPU
18 選曲部
19 外部記憶装置
20 RAM
21 ROM
22 画像処理装置
23 ビデオモニタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a pitch detection device that detects the pitch of an audio signal such as an audio signal or a musical tone signal, and more particularly to a technique that enables highly accurate pitch detection.
[0002]
[Prior art]
In recent years, with many karaoke apparatuses becoming popular, not only outputting musical tone performances but also those having various functions according to the demands of singers are being used. For example, by providing a “key control” function, if the pitch of the musical tone does not match the vocal range of the singer, the musical pitch can be changed to match the range that is easy for the singer to sing. become.
[0003]
Furthermore, in recent years, a karaoke apparatus having a function of playing a harmony based on an audio signal generated by a single singer has been devised and put into practical use. This function automatically creates and outputs a chord mainly composed of the scale produced by the singer. For example, when the singer utters a scale of “do”, the voice input signal Create a scale of “Mi” and “So” and output it as a chord of “Do, Mi, Seo”. Accordingly, since the solo sound can be used as the chorus sound, the sense of reality can be increased.
[0004]
When creating a chord based on an input audio signal, the operation of detecting the pitch of the input audio signal and applying frequency modulation to the detected pitch to generate a tone signal that constitutes the chord is performed. Necessary. Therefore, it is an essential condition to accurately detect the pitch of the input signal.
[0005]
As a pitch detection device used to detect pitch, the maximum value of the positive and negative values of the input signal, or the timing interval that crosses each arbitrary threshold point is counted, and that value is used as reference data. Measure the interval until the next generation of a signal with the same interval as the reference data after eliminating extreme changes in the signal waveform compared to the past pitch data, and use this interval as the pitch of the input signal. The one that adopts the method is known.
[0006]
However, since the above pitch detection method only uses an instantaneous value under a specific condition of the input waveform, it can be eliminated when pulsed noise is mixed in the input signal, but it is sustainable. In the case where a certain noise is superimposed, it is often impossible to eliminate the noise, and there has been a problem that a highly accurate pitch cannot be detected.
[0007]
[Problems to be solved by the invention]
As described above, the conventional pitch detection device may not be able to detect the pitch with high accuracy due to the influence of noise or the like. Therefore, when this pitch detection device is mounted on, for example, a karaoke device, the pitch suddenly shifts during singing, causing the singer to feel uncomfortable, or the pitch detection device is mounted on an electronic musical instrument. In the case of functioning as (a device for automatically playing harmony), there is a drawback that a trouble occurs that the pitch suddenly shifts during live performance.
[0008]
The present invention has been made to solve such a conventional problem, and an object of the present invention is to provide a pitch detection device capable of detecting the pitch of an input signal with high accuracy.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, according to the first aspect of the present invention, in the pitch detection device for detecting the pitch of the input audio signal, the audio signal is divided into the nth (n is a natural number) cut-off frequency “fc ( n); fc (n)> fc (n + 1) ”n low-pass filters are arranged in cascade, and pitch detection means for detecting the pitch of the output signals is provided on the output side of each low-pass filter, respectively. And a pitch determining means for obtaining an optimum pitch based on the pitch obtained from each pitch detecting means and outputting it as a pitch determined value. The pitch detection means creates a template based on the input signal, detects the pitch based on the presence or absence of a correlation between the template and the subsequent input signal, and further detects the variation in the detected pitch value. The pitch determination means outputs the pitch obtained from the pitch detection means determined to be more stable as the pitch determination value from the stability given from each pitch detection means. thing The Characteristic Toss The
[0010]
According to a second aspect of the present invention, in the pitch detection device for detecting the pitch of the input audio signal, the audio signal is divided into the nth (n is a natural number) cut-off frequency “fc (n); fc (n )> Fc (n + 1) ”, n low-pass filters arranged in parallel with the input signal, and a pitch detecting means for detecting the pitch of the output signal on the output side of each low-pass filter. In addition, a pitch determining means is provided for obtaining an optimum pitch based on the pitch obtained from each pitch detecting means and outputting it as a pitch determined value. The pitch detection means creates a template based on the input signal, detects the pitch based on the presence or absence of a correlation between the template and the subsequent input signal, and further detects the variation in the detected pitch value. The pitch determination means outputs the pitch obtained from the pitch detection means determined to be more stable as the pitch determination value from the stability given from each pitch detection means. It is characterized by that.
[0011]
The invention described in claim 3 The pitch determination means is set with a stability reference value indicating the stability given from each pitch detection means, and the stability given from each pitch detection means is all smaller than the stability reference value. If it is determined, the two closest pitches are selected from the pitches given by the pitch detection means, and the average value of these is set as the pitch determination value. It is characterized by that.
[0013]
According to the first aspect of the present invention configured as described above, when an audio signal is given as an input signal, the input signal is sequentially filtered of high-frequency components by n low-pass filters whose cut-off frequencies are sequentially set to be small. And the pitch of each waveform is detected by the pitch detection means installed on the downstream side of each low-pass filter. That is, each pitch detection means detects a pitch based on waveforms including different frequency band components, and the pitch determination means selects the optimum one of the pitches obtained by each pitch detection means. Select a pitch decision value. More specifically, a correlation using a template is calculated for the input signal given to each pitch detection means, the pitch of the input signal is obtained from the presence or absence of this correlation, and the pitch detected over time The “stability” indicating the degree of pitch variation is set. That is, when the detected pitch values are almost the same and there is little variation, the stability is set large, and when the detected pitch values are discrete, the stability is set small. Then, the pitch determining means selects a pitch having the highest stability from the pitches obtained by the pitch detecting means and uses it as a pitch determined value. Therefore, even when sudden noise is superimposed or when noise having a persistent component is superimposed, it is possible to detect the pitch with high accuracy that is not easily affected by these effects. . In the invention described in claim 2, the low-pass filter is connected in parallel to the input signal.
[0015]
Claim 3 In the invention described in the above, if the stability obtained by each pitch detection means is smaller than a preset stability reference value, the pitch values obtained by each pitch detection means are all reliable. In this case, the two closest pitches are selected from the pitches obtained by the pitch detection means, and the average value of these is used as the pitch determination value.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing a configuration of a pitch detection device 8 according to an embodiment of the present invention and each device connected thereto.
The apparatus shown in the figure includes a microphone 1 that collects an audio signal, an amplifier 2 that amplifies the audio signal collected by the microphone 1, and an analog audio signal output from the amplifier 2 into a digital signal. An A / D converter 3 that performs this operation, and a high-pass filter (hereinafter abbreviated as HPF) 4 that removes the DC component of the digitized audio signal. The output signal of this HPF 4 is output to the pitch detection device 8. Is done.
[0017]
The pitch detection device 8 includes a first low-pass filter 5a (hereinafter, the low-pass filter is abbreviated as LPF), a second LPF 5b, a third LPF 5c, and LPFs 5a to 5c that are connected in cascade to the downstream side of the HPF 4. A first pitch detector 6a, a second pitch detector 6b, a third pitch detector 6c, which are connected to the rear stage side and detect the pitch of the audio signal output from each LPF 5a to LPF 5c, and each pitch detector The pitch determination unit 7 calculates an optimum pitch from the pitches detected in 6a to 6c.
[0018]
The first LPF 5a, the second LPF 5b, and the third LPF 5c remove high frequency components contained in the input signal, and the cutoff frequencies fc1, fc2, fc3 set in the LPFs 5a to 5c. Have a relationship of fc1>fc2> fc3. In this embodiment, fc1 = 900 Hz, fc2 = 300 Hz, and fc3 = 100 Hz are set as an example. When a Butterworth filter is used as the LPF 5a to LPF 5c, a cutoff characteristic as shown in FIG. 2 can be obtained. In the figure, curve S1 is a characteristic curve when passing through HPF4 and LPF5a, S2 is a characteristic curve when passing through HPF4 and LPF5b, and S3 is a characteristic curve when passing through HPF4 and LPF5c. It is. The cut-off frequency of HPF 4 is set to 20 Hz.
[0019]
Characteristic curves S4 to S6 shown in FIG. 3 show cut-off characteristics according to (HPF + LPF5a), (HPF + LPF5a + LPF5b) and (HPF + LPF5a + LPF5b + LPF5c) shown in FIG. 1, respectively, and as shown in FIG. However, the curve S5 in FIG. 3 depicts a curve that drops more rapidly than the curve S2 in FIG. 2, and similarly, the curve S6 in FIG. 3 is more than the curve S3 in FIG. It can be understood that a curve steeply descending with respect to the frequency change is drawn.
[0020]
FIG. 4 is a block diagram showing the configuration of an IIR type second-order filter. It is known that the transfer function H (Z) of the filter shown in FIG. 4 is expressed by the following equation (1).
Figure 0003945905
And each coefficient a in the equation (1) 0 , A 1 , A 2 , B 1 , B 2 By setting as follows, the above-mentioned cut-off characteristics can be obtained.
1) HPF4 fc = 20 [Hz]
a 0 = 0.997302393873
a 1 = -1.994604787746
a 2 = 0.997302393873
b 1 = -1.994597510654
b 2 = 0.994612064838
2) First LPF 5a fc = 900 [Hz]
a 0 = 0.006574544547
a 1 = 0.013149089094
a 2 = 0.006574544547
b 1 = -1.757889215790
b 2 = 0.784187393978
3) Second LPF 5b fc = 300 [Hz]
a 0 = 0.000788720212
a 1 = 0.001577440424
a 2 = 0.000788720212
b 1 = -1.919004215489
b 2 = 0.922159096337
4) Third LPF 5c fc = 100 [Hz]
a 0 = 0.000089991332
a 1 = 0.000179982663
a 2 = 0.000089991332
b 1 = -1.972989097506
b 2 = 0.973349062833
[0021]
In addition, the pitch detectors 6a to 6c shown in FIG. 1 create a template from an input digital signal by a method described later and perform a co-correlation calculation with the input signal obtained over time. Is determined as a pitch, the time interval until the input signal is obtained is detected as a pitch.
[0022]
Next, the operation of the present embodiment configured as described above will be described. FIG. 5 is a flowchart showing a pitch detection procedure in each of the pitch detectors 6a to 6c. The flow shown in FIG. 5 (processing from start to end) is executed every time one sample of data is given. As a specific example, when the sampling frequency of the input signal is 32.895 [kHz], the sampling cycle is 30.4 [μ seconds], and therefore the flow shown in FIG. 5 is executed in this cycle. Become.
[0023]
When pitch detection is started, it is first determined whether or not a template has already been created (step ST1). If a template has not been created ("No" in step ST1), a process for creating a template is executed. There are various template creation methods. In this embodiment, a point where the input signal crosses the zero level is detected, and all 10 samples are extracted at intervals of 6 samples from this point, and this is used as a template. . This will be described with reference to the explanatory diagram shown in FIG. 6. As shown in FIG. 6A, an input signal S10 is given, and at time t1, an intersection between the input signal S10 and the zero level is detected. If this is the case (YES in step ST14 in FIG. 5), all 10 samples from the time t1 at intervals of 6 samples, that is, 102.4 at intervals of 182.4 [μ seconds] (30.4 × 6 = 182.4). Sampled data (D1) is taken out and used as a template (step ST8).
[0024]
Next, the sum of squares of the template obtained in step 8 is calculated (step ST9), and it is determined whether this value is equal to or greater than a predetermined reference value (step ST10). If it is determined that the value of the sum of squares is greater than or equal to the reference value (YES in step ST10), the template obtained in step 8 is determined as a template to be used later, and the value of the variable “Sample” is determined. Reset to zero (step ST11). On the other hand, when it is determined that the value of the sum of squares is smaller than the reference value (N0 in step ST10), it is determined that the template obtained in step ST8 is invalid, and there is no template. At the same time, the variable “Pitch” is set to zero (Pitch = 0 means that the pitch is not yet obtained) (step ST12). Here, the value of the sum of squares being smaller than the reference value indicates that the input signal does not have a large amplitude with respect to the zero level, so it is meaningless as data, so it can be used as a template. Decides that it is not suitable and invalidates the template.
[0025]
When the template is created by repeating the above procedure, “Yes” is set in step ST1, so the value of “Sample” is incremented (step ST2), and the current value of “Sample” is set to the set value. Is determined (step ST3). Details of the process in step ST3 will be described later.
[0026]
Next, it is determined whether or not zero crossing has occurred in the sampled data (step ST4). If zero crossing has occurred (YES in step ST4), the input waveform at this point in time and the template (data D1) already determined are determined. Are calculated (step ST5). In the example shown in FIG. 6, as shown in FIG. 6B, the input signal S10 zero-crosses at time t2, and therefore, the co-correlation is calculated between the waveform at this time and the template, and there is no correlation. The pitch detection is continued without being adopted as pitch data (NO in step ST6). Since the method for calculating the co-correlation is well known, the description thereof is omitted here. In FIG. 6B, since the input signal S10 and the template hardly coincide with each other, there is no correlation, and therefore, it is not adopted as pitch data.
[0027]
When the same procedure is repeated, as shown in FIGS. 6C and 6D, zero crosses are detected at times t3 and t4, but it is determined that there is no correlation with the template. It is not adopted as pitch data. Then, at time t5 shown in FIG. 5E, the zero crossing of the sampling data is detected, and the input signal S10 and the template substantially coincide with each other, so that “correlation exists” is determined (step) “YES” in ST6), the current “Sample” value is set to “Pitch” (step ST7). That is, as described above, when the template is determined (step ST11), the value of “Sample” is reset to zero, and in step ST2, the value of “Sample” is incremented for each sampling period. Therefore, the value of “Sample” at time t5 in FIG. 6E is the number of samples between times t1 and t5, and this is the pitch P1 of the input signal S10.
[0028]
Next, similarly to the template creation procedure described above, all 10 samples are extracted retroactively from the time t5 at an interval of 6 samples, this data is updated as a new template, and “Sample” is reset to zero (steps ST8 to ST8). ST11). Here, the reason for updating the template is to make it follow even when the waveform of the input signal gradually changes. That is, it is determined that there is a correlation between the input signal S10 and the template at time t5 in FIG. 6E, but these are not exactly the same waveform, and a slight error has occurred. As a template to be used thereafter, the accuracy at the time of co-correlation calculation can be improved by using as much new data as possible. Therefore, the template is newly created based on the newly obtained data.
[0029]
Further, in the above example, the case where the correlation is obtained at time t5 has been described. However, if there is no waveform that can obtain a certain correlation with the template, in step ST2, “Sample” ”Will continue to be incremented. If this value exceeds the set value (NO in step ST3), the already set template is cleared and“ Pitch ”is set to zero (that is, the pitch is not detected). State) (step ST13). This is a process for re-creating a template without detecting the pitch using the current template any more when the pitch is not detected for a long time.
[0030]
For example, taking the case where the input signal is a human voice as an example, it is known that the frequency of a human voice is about 60 Hz or more, and this period is 16.67 [msec] or less. As described above, since the sampling period of the input signal is 30.4 [μ seconds], 16670 / 30.4 = 548 is obtained. When the input signal is a human voice, the pitch is “548”. It can be said that there is no more than a sample. Therefore, even if the value of “Sample” is “548” or more and the pitch is not detected, it is determined that further pitch detection using the template set at the present time is meaningless. The Therefore, if the set value is set to “548”, unnecessary calculation of pitch detection can be avoided even if a waveform having a correlation with the template is not detected. In the present embodiment, this setting value is set to “512” for the convenience of calculation. If the value of “Sample” becomes “512” or more in step ST3, the currently set template is cleared. In addition, after Pitch = 0 (step ST13), a template is created again in the processing after step ST14.
[0031]
In addition, when it is determined that there is “correlation” in the process in step ST6, new pitch detection data is obtained each time, and the process of whether or not to update to the newly obtained pitch is shown in FIG. It is executed according to the procedure of the flowchart shown. As shown in the figure, in the pitch update process, first, it is determined whether or not the current “Pitch” is zero (pitch is not set) (step ST21). If Pitch = 0 (step ST21). NO), the variable “Stab” indicating the stability is set to zero, and the newly obtained value of “Sample” is set to “Pitch” (step ST29). If “Pitch” is not zero (YES in step ST21), the value of “Sample” obtained this time is compared with “Pitch” currently set (step ST22). If it is a close value (YES in step ST22), the value of “Stab” is incremented (step ST23) and compared with a preset upper reference value (step ST24). The upper limit reference value can be set as appropriate, and is set to “16” in this example.
[0032]
If the value of “Stab” is equal to or less than the upper reference value “16” (YES in step ST24), the newly obtained “Sample” is updated as a new “Pitch” (step ST25). If the value of “Stab” is larger than the upper reference value “16” (NO in step ST24), after setting Stab = 16 (step ST26), the newly obtained “Sample” is again replaced with a new “Sample”. Pitch "is updated (step ST25).
[0033]
If the value of “Sample” is not close to the currently set “Pitch” (NO in step ST22), it is determined that the stability of pitch detection is poor, and the currently set “Stab”. Is decremented (step ST27), and it is determined whether or not this value is equal to or lower than the lower limit reference value (set to “0”) (step ST28). If it is determined that the value of “Stab” is greater than “0” (NO in step ST28), the pitch is not updated, whereas if it is determined that the value is “0” or less. (YES in step ST28), “Stab = 0” is set, and the obtained value of “Sample” is set as “Pitch” (step ST29). In this way, the pitch is updated.
[0034]
According to the above method, the variable “Stab” indicating the stability increases when the approximate pitch is obtained a plurality of times, and conversely, the stability “Stab” decreases when the pitch value having variations is obtained. That is, “Stab” can be said to be a variable that indicates the degree of variation in the detected pitch value.
[0035]
The pitch detectors 6 a to 6 c shown in FIG. 1 detect the pitch by the procedure shown in FIGS. 5 and 7, and the obtained “Pitch” and “Stab” are output to the pitch determination unit 7. Is done. Hereinafter, the processing procedure in the pitch determination unit 7 will be described with reference to the flowchart shown in FIG. Here, “Pitch” obtained from the pitch detector 6a is represented as Pa, “Stab” is represented as Sa, “Pitch” obtained from the pitch detector 6b is represented as Pb, “Stab” is represented as Sb, and the pitch detector “Pitch” obtained from 6c is represented as Pc, and “Stab” as Sc. In the flowchart shown in FIG. 8, the variable indicating the pitch is indicated as “PITCH” in capital letters.
[0036]
In the processing in the pitch determination unit 7, first, the maximum stability “STAB MAX” used in the following processing is set to the stability reference value (here, “1”), and PITCH = 0 (that is, pitch) Unset state) (step ST31). Next, Sa (“Stab” given from the pitch detector 6a) is compared with the maximum stability “1” (step ST32). If Sa ≧ 1 (YES in step ST32), “STAB MAX = Sa And “PITCH” is set to Pa.
[0037]
Next, in steps ST34 to ST37, the same processing is performed for the outputs of the pitch detectors 6b and 6c. As a result, the pitches obtained by the pitch detectors 6a to 6c having the highest stability “Stab” among the pitches Pa to Pc obtained by the pitch detectors 6a to 6c are set as “PITCH”. Therefore, this “PITCH” becomes the pitch determination value (output value) in the pitch determination unit 7 (NO in step ST38, step ST46). Here, as easily understood from the processing procedure shown in steps ST32 to ST37 of FIG. 8, when the values of “Stab” Sa, Sb, and Sc obtained by the pitch detectors 6a to 6c are the same. Is selected at a lower level. For example, when Sa = Sb = Sc, since STAB MAX = Sc, Pc is selected as “PITCH”. This is because it is considered that the pitch detection error due to the template is generally likely to occur in the high frequency band, and if the “Stab” value is the same, select the lower one As a result, the pitch detection accuracy is improved.
[0038]
On the other hand, when the stability Sa to Sc are all smaller than the stability reference value “1”, data is not written to “PITCH” in the processing of steps ST31 to ST37 (that is, steps ST32, ST32, All of ST34 and ST36 are NO), and “PITCH = 0” is set (YES in step ST38). In this case, first, a variable “PITCH DIF” indicating a pitch error allowable value used in the following processing is set. (Step ST39). In this example, “PITCH DIF = 3” is set as an example. And
B) Pa ≠ 0
B) Pb ≠ 0
C) | Pa-Pb | ≤ PITCH DIF
When the above three conditions a) to c) are satisfied (YES in step ST40),
D) PITCH DIF = | Pa-Pb |
E) PITCH = (Pa + Pb) / 2
(Step ST41). In the processes (a) to (e) above, the outputs of the pitch detectors 6a and 6b are targeted, Pa and Pb are not zero, and the absolute value of the difference between them is the value of “PITCH DIF” (here, “ 3 ") or less, the average of Pa and Pb is set as" PITCH ".
[0039]
Then, operations similar to the above (i) to (e) are performed by the pitch detectors 6a and 6c and the pitch detectors 6b and 6c (steps ST42 to ST45), respectively, and "PITCH" obtained from the average of the smallest differences. "Is the output of the pitch determination unit 7 (step ST46). That is, in the processing of steps ST39 to ST46, when the stability of the pitches Pa to Pc obtained by the pitch detectors 6a to 6c is all smaller than the stability reference value “1”, An average value of two close pitches is calculated, and this average value is used as a final pitch. In this way, the pitch determination unit 7 obtains an optimum pitch from the pitch values given from the pitch detectors 6a to 6c, and outputs this as a pitch determination value.
[0040]
Next, specific examples of waveforms output from the LPFs 5a to 5c shown in FIG. 1 will be described. For example, waveforms as shown in FIG. 9A were obtained as input signals after A / D conversion. In this case, the output signal of the LPF 5a has a waveform as shown in FIG. 5B, the output signal of the LPF 5b has the waveform shown in FIG. 5C, and the output signal of the LPF 5c has a waveform as shown in FIG. The waveform is removed. The pitch detectors 6a to 6c detect pitches based on the waveforms shown in FIGS. 9B to 9D, and the pitch determination unit 7 obtains the pitches from the pitch detectors 6a to 6c. The optimum pitch is obtained from the determined pitches.
[0041]
In this way, in the pitch detection apparatus according to the present embodiment, the waveform of the input signal is deformed using the plurality of stages of LPFs 5a to 5c, and the pitch is detected based on each of the deformed signals. Since the optimum pitch is obtained from the pitch, it can be made less susceptible to noise and the like, and the pitch can be detected with higher accuracy than the conventional pitch detection device.
[0042]
FIG. 10 shows an example in which the pitch detection device of this embodiment is mounted on a karaoke device, and the pitch detection device 8 shown in FIG. 1 is mounted in a digital signal processor (DSP) 11 shown in FIG. Yes. This karaoke device generates a CPU 17 as a control center, a music selection unit 18 for selecting a desired song, an external storage device 19, a RAM 20 for temporarily storing data, a ROM 21 for storing system programs, and a tone signal. A sound source device 16 for outputting, an image processing device 22 for generating an image to be displayed on the screen, a D / A converter 12, a mixer 13 for synthesizing a musical sound signal and an audio signal, a video monitor 23 for displaying a karaoke image on the screen, and a mixer 13 It comprises an amplifier 14 for amplifying the output and a speaker 15.
[0043]
And if the pitch detection apparatus of this embodiment is applied to such a karaoke apparatus, based on the audio | voice signal input from a singer, the chord based on this can be produced automatically and can be pronounced. Therefore, it is possible to generate a chorus sound with one person's voice and increase the sense of reality. Moreover, in the karaoke apparatus with a scoring function, by improving the accuracy of pitch detection, it becomes possible to perform more advanced scoring according to the ability of the singer.
[0044]
FIG. 11 is a block diagram showing a configuration of a modified example of the pitch detection apparatus according to the present invention. As shown in the figure, this pitch detection apparatus branches the output of the HPF 4 into three systems, and on each branched path. LPFs 5a to 5c having different cut-off characteristics are installed, and pitch detectors 6a to 6c are arranged on the output side of these LPFs 5a to 5c. And according to such a structure, as shown in FIG.2 and FIG.3, compared with the case where LPF5a-5c is connected in cascade, the frequency cutoff characteristic will fall a little, Actually, the pitch can be detected with high accuracy even if the cutoff characteristic of the filter is somewhat deteriorated, and the effect is extremely great.
[0045]
In the above-described embodiment, an example in which the number of low-pass filters and pitch detectors is three has been described. However, the present invention is not limited to this, and it is obvious that the present invention can be applied to two or more. It is. Moreover, although the audio | voice signal input from the microphone of a karaoke apparatus was demonstrated to the example as an input signal, this invention is not limited to this, It can apply with respect to various input signals.
[0046]
Further, a band-pass filter can be used instead of the low-pass filter shown in FIG. 1 to divide the band, and the same effect can be obtained. Therefore, if a band-pass filter is used, the amount of calculation in the DSP 11 (see FIG. 10) on which the pitch detection device 8 shown in FIG. 1 is mounted is remarkably increased, which is difficult to realize. That is, the present invention can also achieve an effect that a highly accurate pitch detection can be performed with a smaller calculation amount as compared with the case where band division is performed using a bandpass filter.
[0047]
【The invention's effect】
As described above, in the pitch detection apparatus of the present invention, a plurality of low-pass filters are installed in cascade or in parallel with respect to the input signal, and pitch detection means is connected to the downstream side of each low-pass filter, and each pitch is detected. The optimum pitch is obtained based on the pitch obtained from the detecting means. Therefore, even when sudden noise or persistent noise is superimposed on the input signal, each pitch detection device detects the pitch from the input signal from which the high frequency components have been removed at different cutoff frequencies. Therefore, it becomes difficult to be affected by these noises, and highly accurate pitch detection is possible.
[0048]
Also, the degree of variation in pitch detected by each pitch detection means is evaluated by “stability”, and the pitch that is judged to have the highest stability is selected from the pitches detected by each pitch detection means. Therefore, it is possible to reliably select an optimum pitch from the pitches obtained by the pitch detecting means.
[0049]
Further, when it is determined that the stability of the pitch detected by each pitch detection means is smaller than the stability reference value, it is determined that the reliability is low for all pitches. Rather than selecting one of the pitches detected in step 2, the two closest pitches are extracted from the detected pitches, and the average value of these is used as the pitch decision value. More accurate pitch detection that is not controlled by the detection result is possible.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a pitch detection apparatus according to an embodiment of the present invention.
FIG. 2 is a characteristic diagram showing frequency cutoff characteristics of LPFs 5a to 5c.
FIG. 3 is a characteristic diagram showing cut-off characteristics of respective frequencies of LPF 5a, (LPF 5a + LPF 5b), and (LPF 5a + LPF 5b + LPF 5c).
FIG. 4 is a block diagram showing a general configuration of an IIR secondary filter.
FIG. 5 is a flowchart showing a pitch detection procedure in the pitch detector.
FIG. 6 is an explanatory diagram showing a template creation method and the presence / absence of a correlation between the template and the input waveform.
FIG. 7 is a flowchart showing an operation procedure when the pitch is updated.
FIG. 8 is a flowchart showing an operation procedure in a pitch determination unit.
FIG. 9 is an explanatory diagram showing an input signal and signal waveforms output from the first LPF to the third LPF.
FIG. 10 is a block diagram illustrating a configuration of a karaoke apparatus.
FIG. 11 is a block diagram showing a configuration of a modified example of the present invention.
[Explanation of symbols]
1 microphone
2 Amplifier
3 A / D converter
4 High-pass filter (HPF)
5a-5c 1st-3rd low pass filter (LPF)
6a-6c 1st-3rd pitch detector
7 Pitch determination part
8 Pitch detection device
11 Digital signal processor (DSP)
12 D / A converter
13 Mixer
14 Amplifier
15 Speaker
16 Sound source device
17 CPU
18 music selection section
19 External storage
20 RAM
21 ROM
22 Image processing device
23 Video monitor

Claims (3)

入力されるオーディオ信号のピッチを検出するピッチ検出装置において、
前記オーディオ信号を第n(nは自然数)のカットオフ周波数「fc(n);fc(n)>fc(n+1)」で濾過するn個のローパスフィルタを縦続的に配置し、
前記各ローパスフィルタの出力側に、この出力信号のピッチを検出するピッチ検出手段をそれぞれ設置し、
更に、各ピッチ検出手段より得られたピッチに基づいて最適となるピッチを求め、ピッチ決定値として出力するピッチ決定手段を具備し
前記各ピッチ検出手段は、入力信号に基づいてテンプレートを作成すると共に、当該テンプレートと以後の入力信号との相関関係の有無によりピッチを検出し、更に、検出されるピッチの値のばらつき具合を安定度として設定し、
前記ピッチ決定手段は、前記各ピッチ検出手段より与えられる安定度から、より安定であるとされたピッチ検出手段より得られたピッチをピッチ決定値として出力することを特徴とするピッチ検出装置。
In a pitch detector for detecting the pitch of an input audio signal,
N low-pass filters for filtering the audio signal with an n-th (n is a natural number) cut-off frequency “fc (n); fc (n)> fc (n + 1)” are arranged in cascade;
Pitch detection means for detecting the pitch of this output signal is installed on the output side of each low-pass filter,
Furthermore, it comprises a pitch determining means for obtaining an optimum pitch based on the pitch obtained from each pitch detecting means and outputting it as a pitch determined value .
Each of the pitch detection means creates a template based on the input signal, detects the pitch based on the presence or absence of a correlation between the template and the subsequent input signal, and stabilizes the variation in the detected pitch value. Set as degrees,
The pitch determination means outputs the pitch obtained from the pitch detection means determined to be more stable as the pitch determination value based on the stability given from each pitch detection means .
入力されるオーディオ信号のピッチを検出するピッチ検出装置において、
前記オーディオ信号を第n(nは自然数)のカットオフ周波数「fc(n);fc(n)>fc(n+1)」で濾過するn個のローパスフィルタを、前記入力信号に対して並列的に配置し、
前記各ローパスフィルタの出力側に、この出力信号のピッチを検出するピッチ検出手段をそれぞれ設置し、
更に、各ピッチ検出手段より得られたピッチに基づいて最適となるピッチを求め、ピッチ決定値として出力するピッチ決定手段を具備し
前記各ピッチ検出手段は、入力信号に基づいてテンプレートを作成すると共に、当該テンプレートと以後の入力信号との相関関係の有無によりピッチを検出し、更に、検出されるピッチの値のばらつき具合を安定度として設定し、
前記ピッチ決定手段は、前記各ピッチ検出手段より与えられる安定度から、より安定であるとされたピッチ検出手段より得られたピッチをピッチ決定値として出力することを特徴とするピッチ検出装置。
In a pitch detector for detecting the pitch of an input audio signal,
In parallel with the input signal, n low-pass filters that filter the audio signal with an n-th (n is a natural number) cut-off frequency “fc (n); fc (n)> fc (n + 1)”. Place and
Pitch detection means for detecting the pitch of this output signal is installed on the output side of each low-pass filter,
Furthermore, it comprises a pitch determining means for obtaining an optimum pitch based on the pitch obtained from each pitch detecting means and outputting it as a pitch determined value .
Each of the pitch detection means creates a template based on the input signal, detects the pitch based on the presence or absence of a correlation between the template and the subsequent input signal, and stabilizes the variation in the detected pitch value. Set as degrees,
The pitch determination means outputs the pitch obtained from the pitch detection means determined to be more stable as the pitch determination value based on the stability given from each pitch detection means .
請求項1または2に記載の装置において、
前記ピッチ決定手段には、前記各ピッチ検出手段より与えられる安定度を指標する安定度基準値が設定され、前記各ピッチ検出手段より与えられる安定度が、全て当該安定度基準値よりも小さいと判断された場合には、各ピッチ検出手段より与えられる各ピッチのうち、最も近接する2つのピッチを選択し、これらの平均値をピッチ決定値とすることを特徴とするピッチ検出装置。
The apparatus according to claim 1 or 2,
The pitch determination means is set with a stability reference value indicating the stability given from each pitch detection means, and the stability given from each pitch detection means is all smaller than the stability reference value. If determined , the pitch detecting device is characterized in that two closest pitches are selected from each pitch given by each pitch detecting means, and an average value thereof is set as a pitch determination value .
JP11852198A 1998-04-28 1998-04-28 Pitch detection device Expired - Fee Related JP3945905B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11852198A JP3945905B2 (en) 1998-04-28 1998-04-28 Pitch detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11852198A JP3945905B2 (en) 1998-04-28 1998-04-28 Pitch detection device

Publications (2)

Publication Number Publication Date
JPH11311988A JPH11311988A (en) 1999-11-09
JP3945905B2 true JP3945905B2 (en) 2007-07-18

Family

ID=14738684

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11852198A Expired - Fee Related JP3945905B2 (en) 1998-04-28 1998-04-28 Pitch detection device

Country Status (1)

Country Link
JP (1) JP3945905B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220189444A1 (en) * 2020-12-14 2022-06-16 Slate Digital France Note stabilization and transition boost in automatic pitch correction system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6225818B2 (en) * 2014-04-30 2017-11-08 ヤマハ株式会社 Pitch information generation apparatus, pitch information generation method, and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220189444A1 (en) * 2020-12-14 2022-06-16 Slate Digital France Note stabilization and transition boost in automatic pitch correction system

Also Published As

Publication number Publication date
JPH11311988A (en) 1999-11-09

Similar Documents

Publication Publication Date Title
Marolt A connectionist approach to automatic transcription of polyphonic piano music
US7974838B1 (en) System and method for pitch adjusting vocals
JP2874832B2 (en) Song Scorer for Karaoke System
WO2007010637A1 (en) Tempo detector, chord name detector and program
JPH07302092A (en) Grading apparatus of song grade of user of sing-along system
Marolt SONIC: Transcription of polyphonic piano music with neural networks
JP2005266797A (en) Method and apparatus for separating sound-source signal and method and device for detecting pitch
JP2002215195A (en) Music signal processor
KR20140003111A (en) Apparatus and method for evaluating user sound source
JP3945905B2 (en) Pitch detection device
CN115699160A (en) Electronic device, method, and computer program
JP2005107328A (en) Karaoke machine
JP2005107330A (en) Karaoke machine
JP4091892B2 (en) Singing voice evaluation device, karaoke scoring device and program thereof
JP5494083B2 (en) Karaoke equipment
Marolt Networks of adaptive oscillators for partial tracking and transcription of music recordings
WO2022070639A1 (en) Information processing device, information processing method, and program
JP4483561B2 (en) Acoustic signal analysis apparatus, acoustic signal analysis method, and acoustic signal analysis program
JP4134961B2 (en) Sound signal analyzing apparatus and method
JP4757971B2 (en) Harmony sound adding device
JPH1026994A (en) Karaoke grading device
JP4048249B2 (en) Karaoke equipment
JP5034642B2 (en) Karaoke equipment
JP2001067068A (en) Identifying method of music part
JP2005107332A (en) Karaoke machine

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050308

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061115

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20061220

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070410

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees