JP3671407B2 - Waveform generator - Google Patents
Waveform generator Download PDFInfo
- Publication number
- JP3671407B2 JP3671407B2 JP20657895A JP20657895A JP3671407B2 JP 3671407 B2 JP3671407 B2 JP 3671407B2 JP 20657895 A JP20657895 A JP 20657895A JP 20657895 A JP20657895 A JP 20657895A JP 3671407 B2 JP3671407 B2 JP 3671407B2
- Authority
- JP
- Japan
- Prior art keywords
- waveform
- peak
- pulse
- value
- dsp
- 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
Links
Images
Landscapes
- Electrophonic Musical Instruments (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、電子楽器の音源や、効果音を付与するエフェクタ等に用いて好適な波形発生装置に関する。
【0002】
【従来の技術】
近年、外部から供給される入力信号に応じて楽音パラメータを発生し、発生した楽音パラメータに基づき波形発生する外部制御方式の波形発生装置が案出されている。この種の装置としては、例えば、「ギターシンセサイザ」と呼ばれるものが開発されており、この装置では、通常の電気楽器と同様に、撥弦により生じる弦振動を、ピックアップコイル等でアナログ入力信号に変換した後、このアナログ入力信号のピッチ(音高周波数)および音量レベルを検出し、検出したピッチおよび音量に応じて所定の音色の楽音波形を発生するように構成されている。
【0003】
【発明が解決しようとする課題】
さて、上述した従来の波形発生装置では、演奏操作に応じて発生するアナログ波形に基づき楽音波形を生成するので、例えば、自然楽器であるギターにピックアップコイル等を設けて、このコイル出力に基づき楽音波形を発生すれば、ギター演奏しながらもギターとは異なる音色の楽音を生成でき、従来には無い新規な楽器形態を実現することが可能となっている。
【0004】
しかしながら、こうした外部制御方式による波形発生装置では、次のような問題が生じている。
(イ)演奏操作に応じて発生するアナログ入力信号のピッチ(音高周波数)を検出するには、その信号波形を複数周期にわたってサンプリングしなければならないため、発音遅れが起きるという弊害がある。
(ロ)また、アナログ入力信号の波形形状が急激に変化するような演奏操作、例えば、ギターの場合にはチョーキングなどの演奏操作が行われると、アナログ入力信号の正確なピッチを検出することができず、演奏者が意図しない音高で発音してしまう虞もある。このため、演奏操作に制約が生じ、音楽表現力に欠けてしまうという問題がある。
(ハ)アナログ入力信号から検出したピッチと音量とに応じて楽音合成されるから、例えばギターの場合、ピッキングの仕方(撥弦強さ、角度および位置)やピックの材質などを変えて撥弦態様を変化させても、音色変化を与えることができず、これ故、発生する楽音が単調で演奏効果を付与できないという問題もある。
【0005】
結局、上述した外部制御方式による波形発生装置では、従来には無い新規な楽器形態を実現するものの、反面、発音遅れが生じる上、演奏操作に応じて音色を微妙に変化させる等の音楽表現力や演奏効果に欠けるという欠点がある。
そこで、本発明は、上述した事情に鑑みてなされたもので、従来には無い新規な楽器形態を実現しながらも、発音遅れが起こらず豊かな音楽表現力や演奏効果を得ることができる波形発生装置を提供することを目的としている。
【0006】
【課題を解決するための手段】
上記目的を達成するため、請求項1に記載の発明では、外部から供給される入力波形の傾きが増加から減少、若しくは減少から増加に変化する波形変化点を検出すると共に、その波形変化点の変化形態を判別する波形変化検出手段と、発生すべき波形形状を指定する波形発生条件を、前記変化形態の種類別に設定する条件設定手段と、波形変化点の変化形態に対応付けられた波形発生条件に従ってパルス波形を発生するパルス波発生手段と、このパルス波発生手段が発生するパルス波形に対して前記波形発生条件に応じたフィルタリングを施して前記出力波形を形成するフィルタリング手段とを具備することを特徴としている。
【0010】
上記請求項1に従属する請求項2に記載の発明では、前記パルス波発生手段は、波形発生の指示を受けてからの時間経過に応じて、前記波形発生条件内に設定されるパルス波高初期値からパルス波高目標値に内挿補間される値と入力波形レベルとを乗算して発生すべきパルス波形の波高値を連続的に可変制御する波高制御手段と、波形発生の指示を受けてからの時間経過に応じて、前記波形発生条件内に設定されるパルス幅初期値からパルス幅目標値に内挿補間される値に応じて発生すべきパルス波形のパルス幅を連続的に可変制御するパルス幅制御手段とを具備することを特徴としている。
【0011】
また、上記請求項1に従属する請求項3に記載の発明によれば、前記フィルタリング手段は、波形発生の指示を受けてからの時間経過に応じて、前記波形発生条件内に設定される初期カットオフ周波数から目標カットオフ周波数に内挿補間されるカットオフ周波数値を、前記波形発生条件内に設定されるフィルタ種類により指定されるフィルタに与えて前記パルス波発生手段が発生するパルス波形にフィルタリングを施すことを特徴とする。
【0014】
本発明では、波形変化検出手段によって外部から供給される入力波形の傾きが増加から減少、若しくは減少から増加に変化する波形変化点が検出されると共に、その波形変化点の変化形態が判別され、条件設定手段が発生すべき波形形状を指定する波形発生条件を、前記変化形態の種類別に設定すると、パルス発生手段は波形変化点の変化形態に対応付けられた波形発生条件に従ってパルス波形を発生し、このパルス波形に対して前記波形発生条件に応じたフィルタリングを施して前記出力波形を形成する。つまり、入力波形の傾きが変化する波形変化点毎に、その変化形態に合致した波形発生条件に基づいた波形形状の出力波形を逐次発生するので、入力波形の微妙な変化が反映された出力波形になる訳である。
【0015】
したがって、本発明による波形発生装置では、従来のように、ピッチ抽出する必要がない為、発音遅延を起こしたり、発音ピッチを誤検出するといった不具合を解消できる上、入力波形の微妙な変化を出力波形に付与し得るので、豊かな音楽表現力や演奏効果を実現できる。しかも、入力楽器を演奏することで生成される入力波形により出力波形を制御する形になるため、従来には無い新規な楽器形態をも実現可能にしている。
【0016】
【発明の実施の形態】
本発明による波形発生装置は、電子楽器、楽音制御装置あるいはエフェクタ等に適用され得る。以下、図面を参照して本発明の実施の形態である楽音制御装置を実施例として説明する。
【0017】
A.第1実施例の構成
(1)全体構成
図1は、本発明の実施の形態による楽音制御装置の全体構成を示すブロック図である。この図において、1は設定操作に応じた各種パラメータを発生して音源部6(後述する)側に供給する制御部である。2はCPUであり、制御部1の各部を制御する一方、後述するディジタル・シグナル・プロセッサ9(以下、DSPと記す)に対して発生すべき波形形状を指定する各種パラメータを送出する。3はCPU2のワークエリアとして使用されるRAMであり、各種レジスタ/フラグデータが一時記憶される。4はROMであり、CPU2にロードされる制御プログラムや制御データ等が記憶される。5はLCDパネルや各種操作スイッチなどから構成される操作部であり、設定操作に応じた操作信号を発生すると共に、これに応じてCPU2側から供給される表示制御信号に基づき設定状態をLCDパネルに表示する。
【0018】
音源部6は、入力端T1に供給される入力信号と、上記制御部1から送出されてくるパラメータとに基づいて生成する楽音波形を出力端T2から出力する。入力端T1には、例えば、マイクロフォンなどで電気信号に変換された入力波形が供給される。7はローパスフィルタ(LPF)であり、この入力波形のノイズ成分をカットすべくローパスフィルタリングを施して平滑化された波形信号を出力する。8はLPF7の出力をA/D変換して波形データを出力するA/D変換器である。
【0019】
DSP9は、CPU2から供給される各種パラメータに基づいて自身に内蔵されるマイクロプログラムを実行し、上記A/D変換器8から出力される波形データに各種処理を施して楽音波形(波形データ)を発生する。なお、このDSP9においてなされる各種処理の概要については後述する。10はDSP9の演算結果などが一時記憶されるワークRAMであり、そのレジスタ構成については追って説明する。11はDSP9から出力される楽音波形(波形データ)をアナログ信号に変換するD/A変換器である。12はこのアナログ信号にノイズ除去等のフィルタリングを施した後、増幅して出力端T2に供給する出力回路である。
【0020】
(2)DSP9の機能構成
DSP9では、自身に内蔵されるマイクロプログラムに基づき、「波形取り込み処理」、「ピーク検出処理」、「アタック検出処理」、「周期検出および周期波形記憶処理」および「波形発生処理」を実行する。これら処理の詳細については後述の動作説明にて言及するが、ここでは、DSP9の機能構成としてこれら処理の概要について述べる。
【0021】
▲1▼波形取り込み処理
DSP9は、A/D変換器8から出力される波形データを順次取り込み、ワークRAM10に格納する。なお、ワークRAM10には、後述するレジスタエリアの他に波形記憶エリアが設けられており、この記憶エリアは所謂、リングバッファとして動作して常に現サンプリング時点から複数サンプリング分遡った波形データが蓄積されるようになっている。そのリングバッファ長は、入力波形成分のうち、最も長い周期波形が複数周期にわたって記憶され得るものに設定されている。
【0022】
▲2▼ピーク検出処理
DSP9では、上記リングバッファに取り込んだ波形データを順番に読み出し、波形の傾きが変化した時、つまり、波高値が増加から減少あるいは減少から増加に転じた時に、その1サンプル前の波形データを波形ピーク(あるいはボトム)であると見做して検出信号を発生する。こうしたピーク検出では、波形ピーク(ボトム)と見做された波形データを記憶しておき、次サンプルの波形データと比較してその傾きの変化を見る。同一の波形レベルが連続した時には、前サンプルの傾きを次サンプルの傾きとして記憶する。すなわち、次サンプルの傾きが前サンプルのものと同じなら、ピークと見做さないことになる。
したがって、例えば、図2に図示する入力波形の場合、実線矢印で示される波形データWD1,WD3,WD4,WD6,…が波形ピークと見做される。なお、図中の破線矢印で示される波形データWD2,WD5,…は波形ボトムである。
【0023】
▲3▼アタック検出処理
ここで言うアタック検出とは、アタック(発音タイミング)を検出する処理を指す。DSP9では、上記ピーク検出処理にて新たなピークが検出される毎にアタックであるか否かを判定する。
その判定条件は、次の2条件のいずれかによる。まず、第1の条件としては、図3に示すように、入力波形が一定時間ゼロレベル(あるいはノイズレベル)を保つ無音状態を経てからレベル増加し始めた時点を、演奏操作が開始されたアタックと見做し、最初の波形ピークを検出するまでの期間を、楽音の立上がりを形成するアタック領域とする。
【0024】
次に、第2の条件としては、上記ピーク検出処理により比較区間(図4参照)中で最も高い波高値の比較ピークと、現時点で検出された現波形ピークとを比較し、現波形ピークが上記比較ピークの所定倍数以上に達した時点で、演奏者が入力楽器、すなわち、入力波形を発音する楽器を弾き直したと判断し、その時点から発音タイミングに入り、アタック領域であると見做す。
したがって、例えば、図5に示すように、入力波形レベルが徐々に大きくなる場合などでは、アタックと見做さずに誤発音を防止する。
【0025】
アタック検出処理では、まず、第1の条件に基づき、一定期間中無音が続いた後にレベル増加したかどうかを判断してアタック検出を行い、この条件に合致しない時には続いて第2の条件により入力波形が急激にレベル上昇したか否かを判断してアタック検出する。
なお、上述した第2の条件においては、比較区間の長さや、発音タイミングを決める比較ピークと現波形ピークとの比は入力楽器の特性に応じて最適なものに設定すれば、誤発音を防ぐことができる。
【0026】
▲4▼周期検出および周期波形記憶処理
DSP9では、上述したピーク検出処理により波形ピーク(ボトム)を検出する毎に、次の手順に従って本処理を行う。
(a)まず、過去複数の波形ピーク列の内、最大波高値の波形ピーク(以下、最大波形ピークと称す)をサーチする。
(b)この最大波形ピークから現波形ピークまでの中で、同符号であって、かつ、最大波形ピークに対して所定比率範囲の波高値となる波形ピークが存在するかどうか調べる。
(c)この条件に合致するものが見当らない場合には、最大波形ピークが発生する以前に遡って上記条件に基づきサーチする。
(d)そして、最大波形ピークと上記条件に合致する波形ピークとの間を、入力波形の1周期と見做して、これらを記憶しておく。
【0027】
こうして得られた波形周期は、後述する波形発生処理においてリリース波形を発生する際に用いられる。すなわち、入力波形レベルが減少すると、波形ピーク(ボトム)を検出するのが困難になるため、本実施例では入力波形レベルが所定レベル以下になった時点で、その直前にサンプリングした波形データを、上述のようにして求めた波形周期で繰り返し再生することでリリース波形を発生する。なお、このリリース波形を発生する処理については追って詳述する。
【0028】
▲5▼波形発生処理
DSP9では、CPU2から供給される各種パラメータに基づき、入力波形の波形ピーク/波形ボトムに対応するパルス波形を発生する一方、発生したパルス波形にフィルタリングを施して所望の楽音波形を形成する。
CPU2から供給されるパラメータは、「パルス波高初期値」、「パルス波高目標値」、「パルス幅初期値」、「パルス幅目標値」、「フィルタタイプ(LPF,HPF)」、「初期カットオフ周波数」、「目標カットオフ周波数」、「リリーススレッシュ値」および「リリースレート」からなる。これらパラメータは、波形ピーク(ボトム)の種類別、つまり、正ピークポイント用、負ピークポイント用、正ボトムポイント用および負ボトムポイント用に分類される。
【0029】
生成されるパルス波形の波高値は、パルス波高初期値からパルス波高目標値へ経時変化に応じて補間した値に入力波形の波形ピーク(あるいはボトム)レベルを乗算したものとなる。したがって、発音タイミング時点では、入力波形の波形ピーク(あるいはボトム)レベルにパルス波高初期値を乗算することになる。
例えば、図6に示す一例では、パルス波高初期値を「0.75」とした時に波形ピークポイントで発生するパルス波形を図示している。なお、この例では、パルス幅を一定としている。
【0030】
ここで、図7を参照してパルス波形の波高値を連続的に経時変化させる一例について説明する。なお、この図は正ピークポイントにおけるパルス波形の波高変化を示すものである。
まず、図中(A)は、前述したアタック検出により発音タイミングとされた正ピークポイントにおいて波形ピークレベルにパルス波高初期値を乗算して得られるパルス波形である。そして、アタック領域では、パルス波高初期値からパルス波高目標値へ経時変化に応じて内挿補間することで図中(B),(C)の順にパルス波形の波高値が連続的に変化する。
【0031】
生成されるパルス波形の幅は、波形発生当初はパルス幅初期値に従って定められた後、上記波高値と同様にパルス幅目標値へ補間する。例えば、図8は、正ピークポイントにおけるパルス幅の変化を示すものであり、図中(A)は、発音タイミングとされた正ピークポイントにおいてパルス幅初期値により設定されるパルス波形である。そして、アタック領域では、パルス幅初期値からパルス幅目標値へ経時変化に応じて内挿補間することで図中(B),(C)の順にパルス幅が連続的に変化する。
【0032】
以上のようにして、パルス波形の波高値およびパルス幅が定まると、これを所望の波形形状にすべくフィルタリングを施す。フィルタリングに際しては、上述したパラメータの内、フィルタタイプ(LPF,HPF)、初期カットオフ周波数および目標カットオフ周波数が用いられる。
ここで、図9を参照してフィルタリングの一例について説明する。図9は、正ピークポイントで生成されたパルス波形に対してカットオフ周波数を徐々に低減させるローパスフィルタリングを施したものである。これは、例えば、発音タイミング時点で初期カットオフ周波数によるローパスフィルタリングを施し(同図(A))、続いて、アタック領域では、経時変化する補間係数を目標カットオフ周波数に乗算してローパスフィルタリングのカットオフ周波数を徐々に低減させる。これにより、図中(B),(C)の順にパルス波形を鈍らせて行く。
【0033】
結局、波形発生処理では、入力波形の傾きが変化する波形ピーク(あるいはボトム)ポイントにおいて、与えられたパラメータに応じたパルス波形を発生すると共に、これに指定された条件のフィルタリングを施すことで、入力波形の変化に沿った新たな楽音波形を形成するようにしている。
図10は、このような一連の処理により得られる楽音波形を図示したものである。この図に示す一例では、正負ピークポイントの波高値を入力波形レベルに一致させ、正負ボトムポイントの波高値を入力波形レベルの半値とするパルス波形を発生し、カットオフ周波数は初期値から徐々に低減させたケースである。
この図から明らかなように、波形発生処理により得られる楽音波形には、従来のピッチ抽出による発音遅れが無く、入力波形の微妙な変化が反映されていることが判る。
【0034】
ところで、前述したように、入力波形レベルが減少すると、波形ピーク/ボトムを検出するのが困難になる。そこで、本実施例では、図11に示すように、入力波形レベルがリリーススレッシュ値以下になった時点で、その直前にサンプリングした波形データを、周期検出にて求めた波形周期で繰り返し再生しながら、与えられたリリースレートで減衰させるリリース波形を生成する。
このリリーススレッシュ値およびリリースレートは、CPU2から供給される可変パラメータである。なお、こうしたリリース中にアタックが発生した場合には、リリースを中止して新たな発音を開始させる。
【0035】
(3)ワークRAM10の構成
次に、上述したDSP9の各処理結果や入力波形をサンプリングした波形データ等が格納されるワークRAM10の構成について図12〜図14を参照して説明する。
図12において、WDは波形記憶エリアである。この記憶エリアWDは、リングバッファとして機能し、そのアドレスAD1+0〜AD1+Nには常に過去の複数サンプリング点の波形データが循環的に格納される。PPはピークポイント記憶エリアであり、上記アドレスAD1+0〜AD1+Nに格納される波形データの内、波形ピーク/ボトムポイントに相当する波形データのアドレス値がアドレスAD2+0〜AD2+Mに記憶される。したがって、例えば、アドレスAD2+2の波形データが波形ピーク(あるいは波形ボトム)である場合、そのアドレスAD2+2がピークポイント記憶エリアPPに記憶される訳である。
【0036】
PSはピーク状態記憶エリアであり、上記アドレスAD2+0〜AD2+Mに格納される波形ピーク/ボトムポイントの種類、すなわち、ピークポイントの正負およびボトムポイントの正負を表わすフラグPKFがセットされる。ここで、PKFが「1」の時に正ピークポイント、「2」の時に正ボトムポイント、「3」の時に負ピークポイント、「4」の時に負ボトムポイントを表わす。アドレスAD3+0〜AD3+Mに記憶されるフラグPKFは、上記アドレスAD2+0〜AD2+Mに格納される波形ピーク/ボトムポイントに対応してその種類を表わしている。
次に、アドレスAD4に格納されるAPPは最大波形レベルのピーク(ボトム)ポイントが記憶され、アドレスAD4のMPPは上記APPの対となるピーク(ボトム)ポイントが記憶される。したがって、このアドレスAD4,AD4+1に格納されるAPPとMPPとは、前述した周期検出結果が記憶されることになり、このAPPとMPPとの時間幅が波形周期に相当する。
【0037】
次に、図13において、PRM1は正ピークポイント用パラメータ記憶エリアであり、CPU2から供給されるパルス波高初期値A、パルス波高目標値B、パルス幅初期値C、パルス幅目標値D、フィルタタイプE、初期カットオフ周波数F、目標カットオフ周波数G、リリーススレッシュ値HおよびリリースレートIが記憶される。また、PRM2〜PRM4は、それぞれ正ボトムポイント用、負ピークポイント用および負ボトムポイント用のパラメータA〜Iが記憶されるパラメータ記憶エリアである。USPは使用パラメータ格納エリアであり、処理対象とされる波形ピーク(あるいは波形ボトム)の種類に応じたパラメータPRM1〜PRM4のいずれかがストアされる。つまり、上述したフラグPKFに対応する種類のパラメータA〜IがアドレスAD5〜AD5+8に格納ストアされる訳である。
【0038】
次に、図14は、DSP9の各種演算処理に使用されるレジスタ群の構成を示す図である。この図において、PT1は波形データ読み出しポインタが記憶されるレジスタ、PT2はピーク(あるいはボトム)ポイント読み出しポインタが記憶されるレジスタ、PT3はピーク(あるいはボトム)種類読み出しポインタが記憶されるレジスタである。
CはDSP9における処理ループ巡回数、つまり、一連の処理プログラムが繰り返される回数がストアされるレジスタである。TCは上記レジスタCの値を線形変換する比例定数が格納されるレジスタである。PWは現在サンプリングされた波形データが格納されるレジスタ、FWは1サンプル前に取り込まれた波形データが格納されるレジスタである。
【0039】
APWは、最大波形レベルのピーク(ボトム)ポイントAPPの波形データが記憶されるレジスタである。MPWは、上記APPの対となるピーク(ボトム)ポイントMPPの波形データが記憶されるレジスタである。fcは前述した使用パラメータF,Gに応じて定められた出力カットオフ周波数を指定するフィルタ係数が格納されるレジスタである。Lは前述した使用パラメータA,Bに応じて定められた出力波高値が格納されるレジスタである。Pは使用パラメータC,Dに応じて定められた出力パルス幅が記憶されるレジスタである。
RADは、リリース波形出力用アドレスポインタが記憶されるレジスタである。PCはパルス幅カウント用レジスタである。MONは無音期間カウント用レジスタである。FEは各種フラグがセットされるフラグエリアである。
【0040】
B.第1実施例の動作
次に、図15〜図24を参照して第1実施例の動作について説明する。ここでは、まず、制御部1側から音源部6側に設定パラメータを送出する動作としてCPU2のパラメータ送出タスクについて説明した後、これにより与えられたパラメータに基づいて前述した各種処理により波形合成するDSP9の動作について説明して行く。
【0041】
(1)CPU2の動作(パラメータ送出タスク)
前述した操作部5においてパラメータ設定操作がなされると、CPU2は図15に示すパラメータ送出タクスを実行してステップSA1に処理を進める。なお、本タスクはDSP9の処理とは非同期に行われており、操作部5の設定操作によりDSP9において波形形成される楽音の特性を定めるパラメータを設定して送出するようになっている。例えば、パラメータA〜Iの内容によりDSP9側にて発生される楽音波形の特性(例えば、音色)が決る。
【0042】
さて、ステップSA1に処理が進むと、CPU2は設定操作に応じて生成されたパラメータが正負いずれのものであるかを判断する。ここで、正ピーク/ボトムポイント用のパラメータであれば、ステップSA2に進み、ピークあるいはボトムのいずれであるかを判断する。そして、ボトムポイントである時にはステップSA3に進み、正ボトムポイント用パラメータA〜IをRAM3内の転送バッファにセットする。一方、ピークポイントであれば、ステップSA4に処理を進め、正ピークポイント用パラメータA〜Iを転送バッファにセットする。
一方、上記ステップSA1において負ピーク/ボトムポイント用のパラメータであると判断された時には、CPU2はステップSA5に処理を進め、ピークあるいはボトムのいずれであるかを判断する。ここで、ボトムポイントである時にはステップSA6に進み、負ボトムポイント用パラメータA〜Iを転送バッファにセットし、一方、ピークポイントであれば、ステップSA7にて負ピークポイント用パラメータA〜Iを転送バッファにセットする。
【0043】
次いで、ステップSA8では、転送指示スイッチが操作されたかどうかを判断する。ここで、当該スイッチが操作されなければ、判断結果が「NO」となり、上記ステップSA1に処理を戻し、パラメータ設定が行われる。そして、4種のパラメータが設定された時点で転送指示スイッチが操作されると、ここでの判断結果が「YES」となり、ステップSA9に処理を進める。ステップSA9では、RAM3に設けられる転送開始フラグTFを「1」にセットする。
一方、DSP9側では、後述するCPU交信処理ルーチンにより一定周期毎にこのフラグTFの状態をモニタしており、当該フラグTFが「1」となった時点でワークRAM10に設けられる転送終了フラグAFを「0」にして受信可能状態をCPU2側に知らせる。
【0044】
DSP9側が受信状態になると、CPU2はステップSA10に処理を進め、転送バッファに格納されるパラメータを順次送出する。次いで、ステップSA11に進むと、CPU2はDSP9側が転送完了フラグAFを「1」としてパラメータ受信完了の旨を表わすまで待機する。そして、DSP9側が当該フラグAFを「1」にセットすると、CPU2はパラメータ転送が完了したとして次のステップSA12に処理を進め、転送開始フラグTFを「0」にセットして転送完了の旨を表わし、このパラメータ送出タスクを終了する。
【0045】
(2)DSP9の動作
次に、上述したCPU2のパラメータ送出タスクに基づき供給された4種のパラメータに従って楽音波形を発生するDSP9の動作として、最初にDSP9の概略動作としてメインルーチンについて説明した後、このメインルーチンにおいてコールされる各種処理ルーチンについて順次説明して行く。
▲1▼メインルーチン
まず、装置電源投入と共に、音源部6のDSP9は内部ROMに記憶されているマイクロプログラムをロードして図16に示すメインルーチンを実行し、ステップSB1に処理を進める。ステップSB1では、前述したワークRAM10の所定記憶エリアをゼロリセットしたり、あるいは初期値セットする等のイニシャライズを行い、次のステップSB2に進む。ステップSB2では、上述したCPU2のパラメータ送出タスクにより転送されるパラメータを、ワークRAM10の記憶エリアPRM1〜PRM4(図13参照)に格納するため、CPU交信処理を行う。
【0046】
次いで、ステップSB3では、波形取り込み処理を行う。この波形取り込み処理とは、前述したように、A/D変換器8から出力される波形データを順次ワークRAM10の記憶エリアWDに格納する。そして、次のステップSB4では、上記記憶エリアWDに取り込んだ波形データを順番に読み出し、波形の傾きが変化した時、つまり、波高値が増加から減少、あるいは減少から増加に転じた時に、その1サンプル前の波形データを波形ピーク(あるいは波形ボトム)であるとしてピーク(ボトム)ポイントを生成する。次に、ステップSB5に進むと、DSP9は、上記ピーク検出処理にて新たなピークが検出される毎に、前述した第1の条件および第2の条件に基づき発音タイミングであるか否かを判定するためのアタック検出を行う。
【0047】
そして、ステップSB6では、リリース波形を発生する際に必要な入力波形の周期を検出した後、これを記憶する周期波形記憶処理を行い、続く、ステップSB7では、入力波形の傾きが変化する波形ピーク/ボトムポイント毎に、与えられたパラメータに応じたパルス波形を発生すると共に、これに指定された条件のフィルタリングを施し、これにより入力波形の変化に沿った新たな楽音波形を発生する波形発生処理を行う。次いで、ステップSB8では、DSP9の処理ループ周期を一定にすべく所定ステップ数分のアイドリングを行った後、上述のステップSB2に処理を戻し、以後、DSP9は動作停止が指示される迄、ステップSB2〜SB8を繰り返し実行する。
【0048】
▲2▼CPU交信処理ルーチン
上述したように、DSP9の処理がステップSB2に進むと、図17に示すCPU交信処理ルーチンを実行してステップSC1に処理を進める。ステップSC1では、転送開始フラグTFが「1」、すなわち、CPU2側が転送開始状態にあるか否かを判断する。ここで、転送開始状態になければ、判断結果が「NO」になり、ステップSC2に進み、転送終了フラグAFを「1」にセットして転送終了状態に設定したまま本ルーチンを完了してメインルーチンへ復帰する。
【0049】
一方、CPU2側が転送開始状態にあると、上記ステップSC1の判断結果が「YES」となり、ステップSC3に処理を進める。ステップSC3では、フラグAFを「0」に設定してCPU2側に受信可能状態であることを知らせる。これに応じてCPU2側よりパラメータが送出されると、DSP9はステップSC4において受信したパラメータをワークRAM10の対応する記憶エリアPRM1〜PRM4にストアする。この後、DSP9はステップSC5に処理を進め、パラメータ受信が完了したかどうか、つまり、CPU2側において転送開始フラグTFを「0」にセットしたか否かを判断する。ここで、パラメータ受信完了とならない時には判断結果が「NO」となり、上記ステップSC4に処理を戻す。これに対し、CPU2側でフラグTFが「0」になった時には、パラメータ受信完了であるとして判断結果が「YES」となり、ステップSC2に処理を進めて転送終了フラグAFを「1」に設定する。
【0050】
▲3▼波形取り込み処理ルーチン
以上のようにして波形発生に必要なパラメータをCPU2側から受領すると、DSP9は前述したステップSB3を介して図18に示す波形取り込み処理ルーチンを実行し、ステップSD1に処理を進める。
まず、ステップSD1では、A/D変換器8からの波形データが入力されているか否かを判断する。ここで、演奏者が入力楽器を演奏せずにいると、入力波形が入力端T1(図1参照)に印加されないため、波形データがDSP9側に入力されず、このステップSD1の判断結果が「NO」となり、前述したステップSB2(図16:メインルーチン)へ処理を戻す。
【0051】
一方、A/D変換器8から波形データが入力されれば、ステップSD1の判断結果が「YES」となり、次のステップSD2に処理を進める。ステップSD2では、入力された波形データをレジスタPW(図14参照)にストアする。なお、このレジスタPWは、現在サンプリングされた波形データ(以後、現波形データと称す)が格納される。
次いで、ステップSD3に進むと、レジスタPT1に格納される波形データ読み出しポインタが、波形データ記憶エリアWD(図12参照)のアドレスAD1+Nに達しているかどうかを判断する。つまり、リングバッファとして波形データが循環的に記憶されるエリアWDにおいて、最古サンプリングされた波形データを書き込むアドレスであるかどうかを判断している。
【0052】
ここで、最古のアドレスである場合には、判断結果が「YES」となり、次のステップSD4に処理を進める。ステップSD4では、レジスタPT1の波形データ読み出しポインタを最新のアドレスに更新し、続く、ステップSD5では、この更新に対応してレジスタPT2に格納されるピーク(ボトム)ポイント読み出しポインタを同様に最新のアドレスAD2(図12参照)に変更する。次いで、ステップSD6においても、上記レジスタPT1の更新に伴ってピーク(ボトム)種類読み出しポインタが格納されるレジスタPT3を同様に最新のアドレスAD3(図12参照)に更新し、次のステップSD8に処理を進める。
【0053】
一方、レジスタPT1に格納される波形データ読み出しポインタが最古のアドレスを指し示していない場合には、上記ステップSD3の判断結果が「NO」となり、ステップSD7に進む。ステップSD7に進むと、DSP9はレジスタPT1の値を1インクリメントしてその読み出しポインタを次のアドレスを指し示すように歩進させる。
そして、ステップSD8では、レジスタPT1に格納される波形データ読み出しポインタが指し示す記憶エリアWDのアドレスに、レジスタPWに格納されている現波形データを書き込み、本ルーチンを完了する。
【0054】
▲4▼ピーク検出処理ルーチン
波形データを取り込むと、DSP9は前述したステップSB4を介して図19に示すピーク検出処理ルーチンを実行し、ステップSE1に処理を進める。ステップSE1では、波形ピーク(あるいはボトム)を検出するため、レジスタPWに格納されている現波形データと、レジスタFWに格納されている1サンプル前の波形データとの差分を算出する。
ここで、差分が正の場合、つまり、波形が増加傾向にある時には、次のステップSE2に進み、現在傾きフラグPFを「0(増加)」にセットする。一方、差分が負の時には波形が減少傾向にあるから、ステップSE3に進み、フラグPFを「1(減少)」にセットする。なお、差分が「0」の時、すなわち、同一レベルの波形データが連続した時には、後述するステップSE17に処理を進める。
【0055】
1サンプル前の波形データとの比較により現在の波形傾きが判定されると、DSP9は、ステップSE4に処理を進め、フラグPFとフラグFFとが一致するかどうかを判断する。このフラグFFとは、1処理ループ前に判定した波形傾きを示すものであり、現在傾きフラグPFと同様に「1」の時に減少を、「0」の時に増加を表わす。したがって、このステップSE4では、波形の傾きが一定であるか否かを判断している。そして、波形の傾きが一定である場合には、判断結果が「YES」となり、後述のステップSE17に処理を進める。
一方、波形の傾きが一定でない時、つまり、波形が減少から増加へ、あるいは増加から減少へ転じた時には、判断結果が「NO」となり、ステップSE5に進む。
【0056】
ステップSE5では、波形の正負を決めるべくレジスタFWに格納される1サンプル前の波形データが「負」であるか否かを判断する。ここで、1サンプル前の波形データが「正」であると、判断結果は「NO」となり、ステップSE6に処理を進める。ステップSE6では、フラグPFの値が「0(増加)」であるかどうかを判断し、「増加」であれば、波形は現在、正側で増加から減少へ転じているのだから、ステップSE7に進み、波形ピーク/ボトムポイントの種類を表わすフラグPKFを「1(正ピークポイント)」にセットする。これに対し、上記ステップSE6の判断結果が「NO」時、つまり、波形が現在、正側で減少から増加へ転じている時には、ステップSE8に進み、フラグPKFに「2(正ボトムポイント)」にセットする。
【0057】
一方、ステップSE5において、レジスタFWに格納される1サンプル前の波形データが「負」である場合には、ここでの判断結果は「YES」となり、ステップSE9に処理を進める。ステップSE9では、フラグPFの値が「0(増加)」であるかどうかを判断し、「増加」であれば、波形は現在、負側で増加から減少へ転じているのだから、ステップSE10に進み、波形ピーク/ボトムポイントの種類を表わすフラグPKFを「3(負ピークポイント)」にセットする。これに対し、上記ステップSE9の判断結果が「NO」時、つまり、波形が現在、負側で減少から増加へ転じている時には、ステップSE11に進み、フラグPKFに「4(負ボトムポイント)」にセットする。
【0058】
こうして波形ピーク(あるいはボトム)が検出されると、DSP9は、ステップSE12に進み、レジスタPT2に格納されるピーク(ボトム)ポイント読み出しポインタをアドレスにしてワークRAM10の記憶エリアPPにピーク(ボトム)ポイントをストアする。この場合、ピーク(ボトム)ポイントとは、レジスタFWに格納される1サンプル前の波形データが記憶される記憶エリアWDのアドレスに相当する。次いで、ステップSE13では、レジスタPT3に格納されているピーク(ボトム)種類読み出しポインタをアドレスとしてワークRAM10の記憶エリアPSにフラグPKFをストアする。
【0059】
そして、ステップSE14,SE15では、それぞれレジスタPT2、PT3の値を1インクリメントして歩進させ、続く、ステップSE16では、ピーク(あるいはボトム)検出を表わす検出フラグPDFを「1(検出状態)」にセットする。
次いで、ステップSE17では、次の波形データに基づいてピーク(あるいはボトム)検出する為に、レジスタPWの内容をレジスタFWに書き換えて波形サンプルを更新し、次のステップSE18でも同様にフラグPFの内容をフラグFFに書き換えて本ルーチンを完了する。
【0060】
▲5▼アタック検出処理ルーチン
次に、発音タイミングを検出するアタック検出処理ルーチンの動作について説明する。前述した通り、アタック検出には2通りの処理があり、その第1は、入力波形が一定時間ゼロレベル(あるいはノイズレベル)を保つ無音状態を経てからレベル増加し始めた時点を、演奏操作が開始された発音タイミングと見做し、最初の波形ピークを検出するまでの期間を楽音の立上がりを形成するアタック領域とするものであり、これをアタック(I)処理とする。
次に、第2は、前述したピーク検出処理により検出された最も高い波高値と、現時点で検出された現波形ピークとを比較し、現波形ピークが最も高い波高値の所定倍数以上に達した時点で、入力波形を発音する楽器を弾き直したと判断し、その時点から発音タイミングに入ったと見做すものであり、これをアタック(II)処理とする。以下、これら両処理の動作について説明する。
【0061】
(a)アタック(II)処理ルーチン
波形ピーク/ボトムポイントおよびその種類が判定されると、DSP9は前述したステップSB5を介して図20に示すアタック(I)処理ルーチンを実行し、ステップSF1に処理を進める。
ステップSF1では、レジスタPWに格納される現波形データのレベルが「0」、すなわち、無音状態にあるかどうかを判断する。ここで、無音状態であれば、判断結果が「YES」となり、次のステップSF2に進む。ステップSF2では、無音期間を計測するカウンタとして用いられるレジスタMONの値を1インクリメントして歩進させ、本ルーチンを完了する。つまり、無音状態になる毎にレジスタMONをカウントアップして行き、無音期間を計測する訳である。
【0062】
そして、前述したメインルーチンの処理ループが複数回繰り返される度に無音期間となり、その都度、レジスタMONがカウントアップされた状態にあったとする。そうした状態で、再び本ルーチンが実行されてステップSF1において無音状態でないと判断された時には、ステップSF3に処理を進める。ステップSF3では、レジスタMONに格納される値、つまり、無音期間に相当するカウンタ値が所定値を超えているか否かを判断する。
ここで、レジスタMONの値が所定値を超えていない場合には、アタックではないと見做して判断結果が「NO」となり、ステップSF4に処理を進めてレジスタMONをゼロリセットして本ルーチンを完了する。
これに対し、レジスタMONの値が所定値を超えた時には、アタックであると見做して判断結果が「YES」となり、ステップSF5に処理を進めてレジスタCの値をゼロリセットする。なお、このレジスタCは、メインルーチンの処理ループが一巡する毎にインクリメントされるループ回数カウンタであり、この値が意味するところについては後述する。
【0063】
(b)アタック(II)処理
波形ピーク/ボトムポイントおよびその種類が判定されると、DSP9は前述したステップSB5を介して図21に示すアタック(II)処理ルーチンを実行し、ステップSG1に処理を進める。
ステップSG1では、ピーク(ボトム)の検出状態を表わす検出フラグPDFが「1」、つまり、ピーク(あるいはボトム)を検出しているかどうかを判断する。ここで、検出フラグPDFが「0」であれば、アタック状態に入り得ないので、判断結果が「NO」となり、本ルーチンを完了する。
【0064】
一方、ピーク(あるいはボトム)を検出しているならば、判断結果が「YES」となり、次のステップSG2に処理を進める。ステップSG2に進むと、DSP9は、ワークRAM10の記憶エリアPP(図12参照)のアドレスAD2〜AD2+(M−1)に格納されるピーク(ボトム)ポイントに対応する波形データの内、その絶対値が最大となる波形データMPLを求める。次いで、ステップSG3では、レジスタPWに格納されている現波形データが上記波形データMPLのk倍以上に達しているか否かを判断する。なお、この係数kは入力楽器の種類や演奏形態に応じて可変設定される値である。
そして、現波形データが上記波形データMPLのk倍以上に達している時には、入力楽器が弾かれた発音タイミングとなり、アタック領域であると見做して判断結果が「YES」となり、次のステップSG4に処理を進めてレジスタCに格納されるループ回数カウンタ値をゼロリセットする。これに対し、現波形データが上記波形データMPLのk倍以上に達していない時には、アタックではないとして判断結果が「NO」となり、本ルーチンを完了する。
【0065】
▲6▼周期検出および周期波形記憶処理ルーチン
アタック検出がなされると、DSP9は前述したステップSB6(図16参照)を介して図22に示す周期検出および周期波形記憶処理ルーチンを実行し、ステップSH1に処理を進める。
まず、ステップSH1では、波形ピーク(あるいはボトム)検出フラグPDFが「1」、つまり、波形ピーク(あるいはボトム)が検出されているか否かを判断する。ここで、検出されていない場合には、周期検出し得ないので、判断結果を「NO」として本ルーチンを完了する。
【0066】
一方、波形ピーク(あるいはボトム)が検出され、フラグPDFが「1」の時には、判断結果が「YES」となり、次のステップSH2に処理を進める。ステップSH2では、ワークRAM10の記憶エリアPPのアドレスAD2〜AD2+(N−1)に格納されているピーク(ボトム)ポイントの内、最大レベルのピークポイントMPPを求める。次いで、ステップSH3では、この最大レベルのピークポイントMPPとは異なる別のピークポイントAPPを記憶エリアPPから読み出す。そして、ステップSH4では、上記ピークポイントMPPに対応する波形データと、上記ピークポイントAPPに対応する波形データとが同一符号であるか否かを判断する。
【0067】
ここで、両者の符号が一致しない時には、判断結果が「NO」となり、ステップSH5に進み、再びピークポイントMPPとは異なる別のピークポイントAPPを求める。そして、この時、ピークポイントが存在しないならば、次のステップSH6の判断結果が「YES」となり、このルーチンを完了する。
一方、ピークポイントが存在するならば、判断結果が「NO」になり、再びステップSH4に処理を進めてピークポイントMPPに対応する波形データと、新たに求めたピークポイントAPPに対応する波形データとが同一符号であるか否かを判断する。
【0068】
そして、両ポイントの波形データの符号が一致すると、DSP9はステップSH7に処理を進め、ピークポイントAPPに対応する波形データのレベルが、ピークポイントMPPに対応する波形データのレベルの0.8倍〜1.0倍の範囲に収るかどうか、すなわち、ピークポイントMPPと対になるピークポイントであるか否かを判断する。
ここで、ピークポイントAPPの波形レベルが上記規格を満たさない時には、ピークポイントMPPと対になるピークポイントではないと見做して判断結果が「NO」となり、上述したステップSH5に処理を戻す。
一方、ピークポイントAPPの波形レベルが規格を満たした時には、ピークポイントMPPと対になるピークポイントと見做すので、判断結果が「YES」となり、次のステップSH8に処理を進める。
【0069】
次いで、ステップSH8では、対となったピークポイントMPP,APPの大小関係を判断し、APP>MPPの時にはステップSH9に処理を進め、ワークRAM10のアドレスAD4に最大波形レベルのピーク(ボトム)ポイントMPPをストアすると共に、アドレスAD4+1に対となるピーク(ボトム)ポイントAPPをストアする。
これに対し、APP<MPPの時にはステップSH10に処理を進め、ワークRAM10のアドレスAD4に最大波形レベルのピーク(ボトム)ポイントAPPをストアすると共に、アドレスAD4+1に対となるピーク(ボトム)ポイントMPPをストアする。これにより、入力波形の周期、つまりピーク(ボトム)ポイントMPPとピーク(ボトム)ポイントAPPとの間隔が記憶されることになり、この波形周期は、後述する波形発生処理におけるリリース波形発生の際に用いられる。
【0070】
▲7▼波形発生処理ルーチン
次に、DSP9は前述したステップSB7(図16参照)を介して図23に示す波形発生処理ルーチンを実行し、ステップSJ1に処理を進める。ステップSJ1では、ピーク(ボトム)検出フラグPDFが「1」、つまり、波形ピーク(あるいはボトム)が検出されているか否かを判断する。ここで、検出されていない時には、判断結果が「NO」となり、後述するステップSJ14に処理を進める。一方、波形ピーク(ボトム)を検出している時には、それに応じた波形を発生するため、判断結果が「YES」となり、次のステップSJ2に処理を進める。
【0071】
ステップSJ2では、レジスタCに格納されるループ回数カウンタ値をテーブル変換して変換値C’を発生する。このテーブル変換とは、アタック開始時にリセットされた後、DSP9の処理ループ一巡毎に所定値まで逐次カウントアップされるループ回数カウンタ値を、「0」〜「1」の値域をとる変換値C’に線形変換するものである。つまり、ループ回数カウンタ値を正規化する訳である。
次いで、ステップSJ3に進むと、DSP9は、検出した波形ピーク(あるいはボトム)に対応するフラグPKFに基づき波形ピーク(あるいはボトム)の種類を判別する。
【0072】
すなわち、フラグPKFが「1」の時には、「正ピークポイント」だから、ステップSJ4に進み、ワークRAM10の記憶エリアPRM1(図13参照)に格納されているパラメータA〜Iを、記憶エリアUSPのアドレスAD5〜AD5+8にそれぞれストアする。
フラグPKFが「2」の時には、「正ボトムポイント」だから、ステップSJ5に進み、ワークRAM10の記憶エリアPRM2(図13参照)に格納されているパラメータA〜Iを、記憶エリアUSPのアドレスAD5〜AD5+8にそれぞれストアする。
【0073】
また、フラグPKFが「3」の時には、「負ピークポイント」だから、ステップSJ6に進み、ワークRAM10の記憶エリアPRM3(図13参照)に格納されているパラメータA〜Iを、記憶エリアUSPのアドレスAD5〜AD5+8にそれぞれストアする。
さらに、フラグPKFが「4」の時には、「負ボトムポイント」だから、ステップSJ7に進み、ワークRAM10の記憶エリアPRM4(図13参照)に格納されているパラメータA〜Iを、記憶エリアUSPのアドレスAD5〜AD5+8にそれぞれストアする。
なお、上記ステップSJ3〜SJ7の処理は、フラグPKFの値に応じてワークRAM10の記憶エリアPRM1〜PRM4を選択してパラメータを指定するようにしても良い。
【0074】
こうして検出した波形ピーク(あるはボトム)の種類に対応したパラメータA〜Iが選択されると、DSP9は、ステップSJ8に処理を進め、発生すべき矩形パルス波の波高値Lを次式(1)に基づき算出する。
波高値L=PW×{A×(1−C’)+B×C’} …(1)
ここで、PWはレジスタPWに格納されている現波形データ、Aはパルス波高初期値、Bはパルス波高目標値、C’は前述したループ回数カウンタ値を正規化してなる変換値であり、内挿補間係数として用いられる値である。したがって、波高値Lは、パルス波高初期値からパルス波高目標値までをアタック経過時間に応じて補間し、これに現波形データを乗算したものとなる。
【0075】
次いで、ステップSJ9では、発生すべきパルス幅Pを次式(2)に基づき算出する。
パルス幅P=C×(1−C’)+D×C’…(2)
ここで、Cはパルス幅初期値、Dはパルス幅目標値、C’は内挿補間係数である。よって、パルス幅Pは、パルス幅初期値からパルス幅目標値までをアタック経過時間に応じて補間したものになる。
また、同様に、次のステップSJ10では、次式(3)に基づき、初期カットオフ周波数Fから目標カットオフ周波数Gまでをアタック経過時間に応じて補間したカットオフ周波数fcを発生する。
カットオフ周波数fc=F×(1−C’)+G×C’…(3)
【0076】
次に、ステップSJ11に進むと、DSP9は、波形出力の可否を示すフラグPSFを「1」として波形発生する旨を表わし、続く、ステップSJ12では、フラグPDFをゼロリセットする。次いで、ステップSJ13では、レジスタPCに格納されるパルス幅カウント値をゼロリセットする。
こうして波形発生に係わる準備が整った場合、あるいは波形ピーク(あるいはボトム)が検出されず、上述したステップSJ1の判断結果が「NO」の場合に次のステップSJ14に処理を進め、レジスタPWにセットされている現波形データのレベルがリリーススレッシュ値H以下であるか、つまり、リリース領域に入っているか否かを判断する。
【0077】
ここで、リリース領域に入っていなければ、判断結果が「NO」となり、図24に示すステップSJ17に処理を進め、一方、リリース領域にある時には、判断結果が「YES」となり、ステップSJ15に進む。ステップSJ15では、傾きフラグRFを「1」にセットして現在の入力波形の傾きが減少であることを表わすと共に、フラグPSFを「0」にセットして波形発生不可状態を表わす。そして、ステップSJ16では、レジスタRADにリリース波形出力用アドレスポインタとしてワークRAM10のアドレスAD4の値、すなわち、ピーク(ボトム)ポイントAPPをストアする。
【0078】
次に、ステップSJ17(図24参照)に進むと、DSP9は、フラグPSFが「1」であるか否かを判断する。この判断では、現波形データがリリース領域にあるか否かで処理を分岐させるので、以下、各ケース別に説明して行く。
(a)現波形データがリリース領域に入っていない時
現波形データがリリース領域に入っていない場合には、上述したステップSJ11においてフラグPSFが「1」に設定されるから、このステップSJ17の判断結果は「YES」となり、次のステップSJ18に処理を進める。ステップSJ18では、レジスタPCに格納されるパルス幅カウント値をインクリメントして歩進させ、続く、ステップSJ19では、この歩進されたパルス幅カウント値が、前記(2)式に基づき算出されたパルス幅Pより大であるか否かを判断する。
【0079】
ここで、パルス幅カウント値がパルス幅Pより大なる時には、判断結果が「YES」となり、次のステップSJ20に処理を進め、波形出力を止めるべく、フラグPSFを「0」にセットする。次いで、ステップSJ21では、これに伴ってレジスタPCに格納されるパルス幅カウント値をゼロリセットし、続く、ステップSJ22において波高値Lをゼロにセットする。これにより、波形発生が停止し、この後、DSP9はステップSJ24に処理を進め、ループ回数カウンタ値を1インクリメントして歩進させ、このルーチンを完了する。
【0080】
一方、パルス幅カウント値がパルス幅Pより小さい場合には、上記ステップSJ19の判断結果が「NO」となり、ステップSJ23に進む。ステップSJ23では、パラメータEに基づき指定されたフィルタ(ハイパスフィルタあるいはローパスフィルタ)に対して、前述した(3)式により得られるカットオフ周波数fcを与え、これに基づき波高値Lのパルス波形をフィルタリングして波形出力する。そして、この後、ステップSJ24に処理を進め、ループ回数カウンタ値を1インクリメントして歩進させて本ルーチンを完了する。
【0081】
(b)現波形データがリリース領域に入っている時
現波形データがリリース領域に入っている時には、上述したステップSJ15においてフラグPSFが「0」に設定されるから、ステップSJ17の判断結果が「NO」となり、ステップSJ25に処理を進める。ステップSJ25では、リリース開始フラグRFが「1」であるか否かを判断する。リリース開始時点では、上述したステップSJ15において当該フラグRFが「1」に設定されているので、その判断結果は「YES」となり、次のステップSJ26に処理を進める。ステップSJ26に進むと、DSP9は、レジスタRADに格納されるリリース波形出力用アドレスポインタに基づき対応する波形データを読み出す。なお、レジスタRADに格納されるアドレスポインタとは、ワークRAM10のアドレスAD4の値、すなわち、ピーク(ボトム)ポイントAPPを指定するアドレスである。
【0082】
次いで、ステップSJ27では、レジスタRADの値に応じて読み出した波形データにリリーススレッシュ値Hを乗算してリリース波形レベルを生成する。そして、次のステップSJ28に進むと、リリーススレッシュ値HからリリースレートIを減算して次のリリーススレッシュ値Hを発生する。続いて、ステップSJ29では、レジスタRADに格納されるアドレスポインタを1インクリメントして歩進させる。
そして、ステップSJ30では、この歩進されたアドレスポインタが前述したピーク(ボトム)ポイントMPPを指定するアドレスより大であるか、すなわち、前述した周期検出および周期波形記憶処理ルーチンにおいて検出した波形周期を超えたかどうかを判断する。ここで、波形周期を超えていない場合には、判断結果が「NO」となり、ステップSJ32に進み、リリーススレッシュ値Hが0以下、つまり、リリース波形が減衰し切ったかどうかを判断する。
【0083】
ここで、例えば、リリース開始間もない場合であったとする。そうすると、リリース波形は減衰し切れていないから、上記ステップSJ32の判断結果は「NO」となり、上述したステップSJ24を経てループ回数カウンタ値を1インクリメントして歩進させて本ルーチンを完了する。
そして、以後、処理ループが所定回数巡回し、これに応じてリリースレートIで逐次減衰するリリース波形を発生している過程において、リリース期間が前述の波形周期を超えると、上述したステップSJ30の判断結果が「YES」となり、ステップSJ31に処理を進め、レジスタRADにアドレスAD4をセットする。
【0084】
次いで、ステップSJ32においてリリーススレッシュ値Hが「0」になると、ここでの判断結果が「YES」となり、ステップSJ32に処理を進め、フラグRFを「0」にセットした後、ステップSJ24を経てループ回数カウンタ値を歩進させ、このルーチンを完了する。
こうしてリリース波形出力が完了した後に本ルーチンが実行されると、前述したステップSJ1の判断結果が「NO」となり、ステップSJ17を介してステップSJ25に進むが、この場合、フラグRFは「0」になっているので、判断結果が「NO」となり、ステップSJ33に進み、波高値Lを「0」として波形出力を止め、ステップSJ24においてループ回数カウンタ値を歩進させて本ルーチンを完了する。
【0085】
このように、波形発生処理ルーチンでは、波形ピーク(ボトム)の種類に応じて選定されるパラメータに基づいて発生すべき矩形パルス波の波高値Lおよびパルス幅Pと、それをフィルタリング出力するカットオフ周波数fcとが定められる。その際、波高値L、パルス幅Pおよびカットオフ周波数fcは、パラメータにより規定される初期値から目標値までがループ巡回数に対応して補間される。そして、入力波形のレベルがリリーススレッシュ値H以下になった時点で、その直前にサンプリングした波形データを、周期検出にて求めた波形周期で繰り返し再生しながら、与えられたリリースレートで減衰させるリリース波形を生成する。
【0086】
C.第2実施例
次に、第2実施例について説明する。上述した第1実施例では、波形ピーク(ボトム)の種類に応じて選定されるパラメータに基づき、発生すべき矩形パルス波の波高値Lおよびパルス幅Pと、それをフィルタリング出力するカットオフ周波数fcとを設定し、これら諸条件に従い波形発生する態様であるが、第2形態では、予め波形ピーク(ボトム)の種類別に各種形状の波形を記憶しておき、波形ピーク(ボトム)が検出される毎に対応する種類の波形を読み出し、これを繋げ合わせて波形発生する態様としている。
したがって、以下では、第1実施例と相違する点、すなわち、CPU2からワークRAM10へ転送されるパラメータの内容と、DSP9においてなされる波形処理の内容とについて言及する。
【0087】
(1)第2実施例の概要
第2実施例の場合、DSP9の内部ROMに複数の波形情報を記憶しておき、入力波形のピーク(ボトム)を検出する毎に、検出した波形ピーク(ボトム)の種類に対応する波形情報を、CPU2から供給される各種波形読み出しアドレス(パラメータ)を参照して内部ROMから読み出して波形発生する。
CPU2から供給される各種波形読み出しアドレス(パラメータ)は、DSP9を介してワークRAM10の記憶エリアPRMに書き込まれる。図25は記憶エリアPRMの構成を示す図である。
図において、PPSW,PPEWは、正ピークポイントにおける開始波形および終了波形を読み出すための読み出しアドレスであり、PBSW,PBEWは、正ボトムポイントにおける開始波形および終了波形を読み出すための読み出しアドレスである。また、NPSW,NPEWは、負ピークポイントにおける開始波形および終了波形を読み出すための読み出しアドレスであり、NBSW,NBEWは負ボトムポイントにおける開始波形および終了波形を読み出すための読み出しアドレスである。
【0088】
つまり、DSP9は、波形ピーク(ボトム)を検出する毎に、その種類(正負ピーク、正負ボトム)に対応する読み出しアドレスを選定し、選定した読み出しアドレスに従って内部ROMから対応する波形情報を読み出す訳である。
なお、こうした態様に替えて、上述したワークRAM10の記憶エリアPRMに、「正ピーク開始波形」、「正ピーク終了波形」、「正ボトム開始波形」、「正ボトム終了波形」、「負ピーク開始波形」、「負ピーク終了波形」、「負ボトム開始波形」および「負ボトム終了波形」の8種類の波形情報をCPU2からDMA転送して格納しておき、これらの内から検出した波形ピーク(ボトム)の種類に応じた波形情報を読み出す態様とすることも可能である。
【0089】
第2実施例では、開始波形から終了波形までを、DSP9の処理ループ巡回数に応じて補間する。図26は、この波形補間の一例を示している。図中、(A)は開始波形、(C)は終了波形である。アタック検出時点で開始波形(A)を発生し、以後、処理ループ巡回毎に終了波形(C)になるよう波形補間することにより、波形(B)が生成される。
したがって、こうした波形補間に基づき入力波形に対して、例えば、図27に示すように、正ピークポイントでは波形(A)が、正ボトムポイントでは波形(B)がそれぞれ生成され、また、負ピークポイントでは波形(C)が、負ボトムポイントでは波形(D)がそれぞれ生成されたとすると、結局、図28に図示する通り、入力波形に対応してこれら波形(A)〜(D)を順次繋ぎ合わせた楽音波形が形成される。この場合、割り当てられた波形が時間的に重複した場合、新たな波形を優先するようにしている。
【0090】
(2)第2実施例の動作
次に、図29〜図30を参照して第2実施例の動作について説明する。なお、本ルーチン以外のDSP9における各種処理ルーチンは、第1実施例と同一であるから、その説明は省略する。
前述した第1実施例と同様に、DSP9はメインルーチンのステップSB7(図16参照)を介して図29に示す波形発生処理ルーチンを実行し、ステップSK1に処理を進める。ステップSK1では、ピーク(ボトム)検出フラグPDFが「1」、つまり、波形ピーク(あるいはボトム)が検出されているか否かを判断する。ここで、検出されていない時には、判断結果が「NO」となり、後述するステップSK10に処理を進める。
【0091】
一方、波形ピーク(ボトム)を検出している時には、それに応じた波形情報を読み出すため、判断結果が「YES」となり、次のステップSK2に処理を進める。ステップSK2では、レジスタCに格納されるループ回数カウンタ値をテーブル変換して変換値C’を発生する。このテーブル変換とは、アタック開始時にリセットされた後、DSP9の処理ループ巡回毎に所定値まで逐次カウントアップされるループ回数カウンタ値を、「0」〜「1」の値域をとる変換値C’に線形変換するものである。
【0092】
こうして補間係数となる変換値C’が求まると、DSP9はステップSK3に処理を進め、検出した波形ピーク(あるいはボトム)の種類を表わすフラグPKFの値に基づき処理を分岐する。
すなわち、フラグPKFが「1」の時には、正ピークポイントなので、ステップSK4に進み、ワークRAM10の記憶エリアPRM(図25参照)に格納されている正ピーク開始波形読み出しアドレスPPSWと、正ピーク終了波形読み出しアドレスPPEWとをそれぞれレジスタPT4、PT5にストアする。
フラグPKFが「2」の時には、正ボトムポイントなので、ステップSK5に進み、ワークRAM10の記憶エリアPRMに格納されている正ボトム開始波形読み出しアドレスPBSWと、正ボトム終了波形読み出しアドレスPBEWとをそれぞれレジスタPT4、PT5にストアする。
【0093】
また、フラグPKFが「3」の時には、負ピークポイントなので、ステップSK6に進み、ワークRAM10の記憶エリアPRMに格納されている負ピーク開始波形読み出しアドレスNPSWと、負ピーク終了波形読み出しアドレスNPEWとをそれぞれレジスタPT4、PT5にストアする。
さらに、フラグPKFが「4」の時には、負ボトムポイントなので、ステップSK7に進み、ワークRAM10の記憶エリアPRMに格納されている負ボトム開始波形読み出しアドレスNBSWと、負ボトム終了波形読み出しアドレスNBEWとをそれぞれレジスタPT4、PT5にストアする。
【0094】
このようにして波形ピーク(あるはボトム)の種類に対応した波形情報が定められると、DSP9は、ステップSK8に処理を進め、フラグPSFを「1」にセットして波形発生する旨を表わし、続く、ステップSK9では、フラグPDFをゼロリセットする。
そして、ステップSK10に進むと、DSP9はレジスタPWにセットされている現波形データのレベルがリリーススレッシュ値H以下であるか、つまり、リリース領域であるか否を判断する。ここで、リリース領域に入っていなければ、判断結果が「NO」となり、図30に示すステップSK11に処理を進める。ステップSK11では、フラグPSFが「1」であるか否かを判断する。この判断では、現波形データがリリース領域にあるか否かで処理を分岐させるので、以下、各ケース別に説明して行く。
【0095】
(a)現波形データがリリース領域にない場合
現波形データがリリース領域にない場合には、上述したステップSK8においてフラグPSFが「1」に設定されるから、このステップSK11における判断結果は「YES」となり、次のステップSK12に処理を進める。ステップSK12では、レジスタPT4、PT5に格納されている開始波形/終了波形読み出しアドレスに基づき、DSP9の内部ROMに記憶されている開始波形情報および終了波形情報を読み出す。次いで、ステップSK13では、この読み出した開始波形情報および終了波形情報を、前述した変換値C’により内挿補間してなる補間波形を発生する。
【0096】
そして、次のステップSK14では、生成された補間波形に対してレジスタPWに格納される現波形データと係数kとを乗算して出力波形を形成する。なお、この係数kとは、入力波形レベルに対する出力波形レベル比となる任意の値であり、通常、0.8〜1.0の範囲の値をとる。
次いで、ステップSK15では、レジスタPT4、PT5に格納される開始波形/終了波形読み出しアドレスをそれぞれ歩進させ、続く、ステップSK16では、歩進された開始波形読み出しアドレスおよび終了波形読み出しアドレスが終端アドレスENDに達したかどうかを判断する。
ここで、終端アドレスENDに達していなければ、判断結果が「NO」となり、ステップSK17に処理を進め、ループ回数カウンタ値を1インクリメントして歩進させて一旦、本ルーチンを完了する。
【0097】
そして、DSP9のループ処理の繰り返しに応じて逐次楽音波形(出力波形)が形成され、この時、開始波形読み出しアドレスおよび終了波形読み出しアドレスが終端アドレスENDに達すると、上述したステップSK16の判断結果が「YES」となり、ステップSK18に処理を進める。ステップSK18では、波形出力を止めるべく、フラグPSFをゼロリセットすると共に、レジスタPCに格納されるパルス幅カウント値をゼロリセットし、ステップSK19にて出力波形のレベルをゼロクリアする。そして、この後、ステップSK17を介してループ回数カウンタ値を歩進させて本ルーチンを完了する。
【0098】
(b)現波形データがリリース領域に入っている時
現波形データがリリース領域に入っている時には、上述したステップSK10の判断結果が「YES」となり、ステップSK20(図29参照)に進み、フラグPSFを「0」として波形出力を停止させる旨を表わすと共に、リリース開始を表わすフラグRFを「1」にセットする。次に、ステップSK21では、レジスタRADにリリース波形出力用アドレスポインタとしてワークRAM10のアドレスAD4の値、すなわち、ピーク(ボトム)ポイントAPPをストアした後、図30に示すステップSK11に処理を進める。ステップSK11では、この場合、フラグPSFが上記ステップSK20において「0」に設定されているので、ここでの判断結果は「NO」となり、ステップSK22に進む。
【0099】
ステップSK22では、フラグRFが「1」、つまり、リリース開始状態であるか否かを判断する。リリース開始時点では、上述したステップSK20においてフラグRFが「1」に設定されるから、ここでの判断結果は「YES」となり、次のステップSK23に処理を進める。ステップSK23に進むと、DSP9は、レジスタRADに格納されるリリース波形出力用アドレスポインタに基づき対応する波形データを読み出す。なお、レジスタRADに格納されるアドレスポインタとは、ワークRAM10のアドレスAD4の値、すなわち、ピーク(ボトム)ポイントAPPを指定するアドレスである。
【0100】
次いで、ステップSK24に進むと、レジスタRADの値に応じて読み出した波形データにリリーススレッシュ値Hを乗算してリリース波形レベルを生成する。そして、ステップSK25では、リリーススレッシュ値HからリリースレートIを減算してリリーススレッシュ値Hを更新する。続いて、ステップSK26では、レジスタRADに格納されるアドレスポインタを1インクリメントして歩進させる。
次に、ステップSK27に進むと、DSP9は、この歩進されたアドレスポインタが前述したピーク(ボトム)ポイントMPPを指定するアドレスより大であるか、すなわち、周期検出および周期波形記憶処理ルーチン(第1実施例参照)において検出される波形周期を超えたかどうかを判断する。ここで、波形周期を超えていない場合には、判断結果が「NO」となり、ステップSK29に進み、リリーススレッシュ値Hが0以下、つまり、リリース波形が減衰し切ったかどうかを判断する。
【0101】
ここで、例えば、リリース開始間もない場合であったとする。そうすると、リリース波形は減衰し切れていないから、上記ステップSK29の判断結果は「NO」となり、上述したステップSK17を経てループ回数カウンタ値を1インクリメントして歩進させて本ルーチンを完了する。
そして、以後、ループ処理が所定回数巡回し、これに応じてリリースレートIで逐次減衰するリリース波形を発生している過程において、リリース期間が前述の波形周期を超えると、上述したステップSK27の判断結果が「YES」となり、ステップSK28に処理を進め、レジスタRADにアドレスAD4をセットする。
【0102】
次いで、ステップSK29においてリリーススレッシュ値Hが「0」になると、ここでの判断結果が「YES」となり、ステップSK30に処理を進め、フラグRFを「0」にセットした後、ステップSK17を経てループ回数カウンタ値を歩進させ、このルーチンを完了する。
こうしてリリース波形発生が完了してから本ルーチンが実行されると、前述したステップSK1の判断結果が「NO」となり、ステップSK11を介してステップSK22に進むが、この場合、フラグRFは「0」だから、ここでの判断結果は「NO」となり、ステップSK19に進み、出力レベルを「0」として波形出力を止め、次のステップSK17においてループ回数カウンタ値を歩進させた後、本ルーチンを完了する。
【0103】
このように、第2実施例による波形発生処理ルーチンでは、DSP9の内部ROMに複数の波形情報を記憶しておき、入力波形のピーク(ボトム)を検出する毎に、検出した波形ピーク(ボトム)の種類に対応する開始波形および終了波形を、CPU2から供給される読み出しアドレスに応じて内部ROMから読み出し、これら開始波形および終了波形をループ巡回回数に応じて内挿補間してなる出力波形を生成する。そして、生成された出力波形(楽音波形)は、入力波形のレベルがリリーススレッシュ値H以下になった時点で、その直前にサンプリングした波形データを、周期検出にて求めた波形周期で繰り返し再生しながら、与えられたリリースレートで減衰させるリリース波形に置き換えられるようになっている。
【0104】
以上のように、本発明による波形発生装置によれば、入力波形の傾きが変化する波形ピーク/ボトムポイント毎に、与えられたパラメータに応じた形状の波形を順次発生して新たな連続波形を形成するので、入力波形の微妙な変化が反映された楽音波形を生成し得る。
したがって、この波形発生装置では、従来のように、ピッチ抽出する必要がない為、発音遅延を起こしたり、発音音高を誤検出するといった不具合を解消できる上、入力波形の微妙な変化を楽音波形に付与し得るので、豊かな音楽表現力や演奏効果を実現できる。しかも、入力楽器を演奏することで生成される楽音波形を制御することになるため、従来には無い新規な楽器形態をも実現できる。
【0105】
なお、上述した第1および第2実施例は、いずれも本発明の波形発生装置を、楽音制御装置に適用した場合について説明したが、本発明の要旨はこれに限定されず、電子楽器などのエフェクタとしても有用である。つまり、楽器内部の音源から出力される楽音波形を、本発明における波形発生装置への入力と見做せば、この音源の出力の変化が反映された新たな波形を発生でき、あたかも効果付与する形態となる訳である。要するに、本発明の要旨は、与えられた入力波形の傾向を取り込んで新たな波形を発生する形態であれば、いかなる装置にも適用し得る。
【0106】
【発明の効果】
本発明によれば、波形変化検出手段によって外部から供給される入力波形の傾きが増加から減少、若しくは減少から増加に変化する波形変化点が検出されると共に、その波形変化点の変化形態が判別され、条件設定手段が発生すべき波形形状を指定する波形発生条件を、前記変化形態の種類別に設定すると、パルス発生手段は波形変化点の変化形態に対応付けられた波形発生条件に従ってパルス波形を発生し、このパルス波形に対して前記波形発生条件に応じたフィルタリングを施して前記出力波形を形成するので、従来のように、ピッチ抽出する必要がない為、発音遅延を起こしたり、発音ピッチを誤検出するといった不具合を解消できる。また、入力波形の微妙な変化を出力波形に付与し得るので、豊かな音楽表現力や演奏効果を実現できる。しかも、入力楽器を演奏することで生成される入力波形により出力波形を制御する形になるため、従来には無い新規な楽器形態を実現することができる。
【図面の簡単な説明】
【図1】本発明の第1実施例である楽音制御装置の構成を示すブロック図である。
【図2】同実施例におけるDSP9のピーク検出処理を説明するための図である。
【図3】DSP9におけるアタック検出処理を説明するための図である。
【図4】DSP9におけるアタック検出処理を説明するための図である。
【図5】DSP9におけるアタック検出処理を説明するための図である。
【図6】DSP9における波形発生処理を説明するための図である。
【図7】DSP9における波形発生処理を説明するための図である。
【図8】DSP9における波形発生処理を説明するための図である。
【図9】DSP9における波形発生処理を説明するための図である。
【図10】DSP9における波形発生処理を説明するための図である。
【図11】DSP9における波形発生処理(リリース波形発生)を説明するための図である。
【図12】第1実施例におけるワークRAM10のメモリ構成を説明するためのメモリマップである。
【図13】第1実施例におけるワークRAM10のメモリ構成を説明するためのメモリマップである。
【図14】第1実施例におけるワークRAM10のメモリ構成を説明するためのメモリマップである。
【図15】第1実施例におけるCPU2のパラメータ送出タスクを説明するためのフローチャートである。
【図16】第1実施例におけるDSP9のメインルーチンの動作を示すフローチャートである。
【図17】第1実施例におけるDSP9のCPU交信処理ルーチンの動作を示すフローチャートである。
【図18】第1実施例におけるDSP9の波形取り込み処理ルーチンの動作を示すフローチャートである。
【図19】第1実施例におけるDSP9のピーク検出処理ルーチンの動作を示すフローチャートである。
【図20】第1実施例におけるDSP9のアタック(I)検出処理ルーチンの動作を示すフローチャートである。
【図21】第1実施例におけるDSP9のアタック(II)検出処理ルーチンの動作を示すフローチャートである。
【図22】第1実施例におけるDSP9の周期検出および周期波形記憶処理ルーチンの動作を示すフローチャートである。
【図23】第1実施例におけるDSP9の波形発生処理ルーチンの動作を示すフローチャートである。
【図24】第1実施例におけるDSP9の波形発生処理ルーチンの動作を示すフローチャートである。
【図25】第2実施例におけるワークRAM10のメモリ構成を説明するためのメモリマップである。
【図26】第2実施例によるDSP9の波形発生処理を説明するための図である。
【図27】第2実施例によるDSP9の波形発生処理を説明するための図である。
【図28】第2実施例によるDSP9の波形発生処理を説明するための図である。
【図29】第2実施例におけるDSP9の波形発生処理ルーチンの動作を示すフローチャートである。
【図30】第2実施例におけるDSP9の波形発生処理ルーチンの動作を示すフローチャートである。
【符号の説明】
1 制御部
2 CPU(条件設定手段)
3 RAM(条件設定手段)
4 ROM(条件設定手段)
5 操作部(条件設定手段)
6 音源部
7 LPF
8 A/D変換器(波形変化検出手段)
9 DSP(波形変化検出手段、波形出力手段)
10 ワークRAM
11 D/A変換器(波形出力手段)
12 出力回路(波形出力手段)[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a waveform generator suitable for use in a sound source of an electronic musical instrument, an effector for applying sound effects, and the like.
[0002]
[Prior art]
In recent years, an external control type waveform generating apparatus has been devised that generates a musical sound parameter in accordance with an externally supplied input signal and generates a waveform based on the generated musical sound parameter. As this type of device, for example, a so-called “guitar synthesizer” has been developed. In this device, string vibration generated by plucked strings is converted into an analog input signal by a pick-up coil or the like, as in an ordinary electric instrument. After the conversion, the pitch (pitch frequency) and volume level of the analog input signal are detected, and a musical tone waveform of a predetermined tone color is generated according to the detected pitch and volume.
[0003]
[Problems to be solved by the invention]
The conventional waveform generator described above generates a musical sound waveform based on an analog waveform generated in response to a performance operation. For example, a guitar, which is a natural instrument, is provided with a pickup coil or the like, and a musical sound is generated based on the coil output. If the waveform is generated, it is possible to generate a musical tone having a tone different from that of the guitar while playing the guitar, and it is possible to realize a novel musical instrument form that has not been found in the past.
[0004]
However, such a waveform generator using the external control system has the following problems.
(A) In order to detect the pitch (pitch frequency) of an analog input signal generated in accordance with a performance operation, the signal waveform must be sampled over a plurality of periods, which causes a problem of delay in sound generation.
(B) In addition, when a performance operation in which the waveform shape of the analog input signal changes abruptly, for example, a performance operation such as choking in the case of a guitar, the accurate pitch of the analog input signal may be detected. There is also a risk that the player will be able to pronounce at a pitch not intended by the performer. For this reason, there is a problem that the performance operation is restricted and the music expression power is lacking.
(C) Musical tone synthesis is performed according to the pitch and volume detected from the analog input signal. For example, in the case of a guitar, plucking is performed by changing the picking method (plucking strength, angle and position), pick material, etc. Even if the mode is changed, the timbre cannot be changed. Therefore, there is a problem that the generated musical tone is monotonous and cannot give a performance effect.
[0005]
In the end, the above-mentioned waveform generator using the external control method realizes a new musical instrument form that has not been available in the past, but on the other hand, there is a delay in pronunciation and music expressive power such as subtly changing the timbre according to the performance operation And lack of performance effect.
Therefore, the present invention has been made in view of the above-described circumstances, and has a waveform that can achieve a rich musical expression and performance effect without causing a delay in pronunciation while realizing a novel musical instrument form that has not been conventionally available. The object is to provide a generator.
[0006]
[Means for Solving the Problems]
In order to achieve the above object, the invention according to claim 1 detects a waveform change point at which the slope of the input waveform supplied from the outside changes from increase to decrease or decreases to increase, and A waveform change detecting means for determining a change form, a condition setting means for setting a waveform generation condition for designating a waveform shape to be generated for each type of the change form, Pulse wave generating means for generating a pulse waveform according to the waveform generation condition associated with the change form of the waveform change point, and filtering according to the waveform generation condition for the pulse waveform generated by the pulse wave generating means Filtering means for forming the output waveform; It is characterized by having.
[0010]
Claims above 1 Claims dependent on 2 In the invention described in (1), the pulse wave generation means interpolates from a pulse wave height initial value set in the waveform generation condition to a pulse wave height target value as time elapses after receiving a waveform generation instruction. A pulse height control means for continuously and variably controlling the peak value of a pulse waveform to be generated by multiplying the value to be input and the input waveform level, and the waveform generation according to the passage of time after receiving the waveform generation instruction. Pulse width control means for continuously and variably controlling the pulse width of the pulse waveform to be generated according to the value interpolated from the initial pulse width value set in the condition to the pulse width target value. It is a feature.
[0011]
In addition, the above claims 1 Claims dependent on 3 According to the invention, the filtering means interpolates from an initial cutoff frequency set in the waveform generation condition to a target cutoff frequency as time elapses after receiving a waveform generation instruction. The cut-off frequency value is applied to a filter specified by a filter type set in the waveform generation condition, and the pulse waveform generated by the pulse wave generation means is filtered.
[0014]
In the present invention, the waveform change point at which the slope of the input waveform supplied from the outside by the waveform change detecting means changes from increase to decrease or from decrease to increase is detected, and the change form of the waveform change point is determined, When the waveform generation conditions for specifying the waveform shape to be generated by the condition setting means are set for each type of change mode, The pulse generating means generates a pulse waveform according to a waveform generation condition associated with the change form of the waveform change point, and performs filtering according to the waveform generation condition on the pulse waveform to form the output waveform. That is, for each waveform change point where the slope of the input waveform changes, an output waveform with a waveform shape based on the waveform generation condition that matches the change form is sequentially generated, so the output waveform that reflects subtle changes in the input waveform That is why.
[0015]
Therefore, the waveform generator according to the present invention does not require pitch extraction as in the prior art, so that it is possible to eliminate problems such as delays in sound generation and erroneous detection of sound generation pitches, and outputs subtle changes in the input waveform. Since it can be added to the waveform, rich music expression and performance effects can be realized. In addition, since the output waveform is controlled by the input waveform generated by playing the input musical instrument, a novel musical instrument form that has not been conventionally possible can be realized.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
The waveform generator according to the present invention can be applied to an electronic musical instrument, a musical tone control device, an effector, or the like. Hereinafter, a musical tone control apparatus according to an embodiment of the present invention will be described as an example with reference to the drawings.
[0017]
A. Configuration of the first embodiment
(1) Overall configuration
FIG. 1 is a block diagram showing the overall configuration of a musical tone control apparatus according to an embodiment of the present invention. In this figure,
[0018]
The
[0019]
The
[0020]
(2) DSP9 functional configuration
The
[0021]
(1) Waveform acquisition processing
The
[0022]
(2) Peak detection processing
The
Therefore, for example, in the case of the input waveform shown in FIG. 2, the waveform data WD1, WD3, WD4, WD6,. It should be noted that the waveform data WD2, WD5,.
[0023]
(3) Attack detection processing
The attack detection here refers to a process for detecting an attack (sound generation timing). The
The determination condition depends on one of the following two conditions. First, as a first condition, as shown in FIG. 3, when the input waveform starts to increase after passing through a silent state where the input waveform is maintained at a zero level (or noise level) for a certain period of time, the attack at which the performance operation is started. Therefore, the period until the first waveform peak is detected is defined as an attack region that forms the rising edge of the musical sound.
[0024]
Next, as a second condition, the peak detection process compares the highest peak value comparison peak in the comparison section (see FIG. 4) with the current waveform peak detected at the present time, When it reaches a predetermined multiple of the comparison peak, it is determined that the performer has replayed the input instrument, that is, the instrument that generates the input waveform. The
Therefore, for example, as shown in FIG. 5, when the input waveform level gradually increases, erroneous sound generation is prevented without being regarded as an attack.
[0025]
In the attack detection process, first, based on the first condition, it is determined whether or not the level has increased after silence for a certain period of time, and then attack detection is performed. If this condition is not met, then the second condition is input. An attack is detected by judging whether or not the waveform level has increased rapidly.
In the second condition described above, erroneous pronunciation is prevented if the length of the comparison section and the ratio of the comparison peak that determines the sound generation timing to the current waveform peak are set optimally according to the characteristics of the input instrument. be able to.
[0026]
(4) Period detection and periodic waveform storage processing
The
(a) First, a waveform peak having a maximum peak value (hereinafter referred to as a maximum waveform peak) is searched from a plurality of waveform peak sequences in the past.
(b) It is examined whether a waveform peak having the same sign and a peak value in a predetermined ratio range with respect to the maximum waveform peak exists from the maximum waveform peak to the current waveform peak.
(c) If no match is found, search based on the above conditions before the maximum waveform peak occurs.
(d) Then, the interval between the maximum waveform peak and the waveform peak satisfying the above condition is regarded as one cycle of the input waveform, and these are stored.
[0027]
The waveform period obtained in this way is used when generating a release waveform in the waveform generation processing described later. That is, if the input waveform level decreases, it becomes difficult to detect the waveform peak (bottom). Therefore, in this embodiment, the waveform data sampled immediately before the input waveform level becomes a predetermined level or less, A release waveform is generated by repeatedly reproducing with the waveform period obtained as described above. The process for generating the release waveform will be described in detail later.
[0028]
(5) Waveform generation processing
The
The parameters supplied from the
[0029]
The peak value of the generated pulse waveform is obtained by multiplying a value obtained by interpolating a pulse peak initial value from a pulse peak initial value according to a change with time by a waveform peak (or bottom) level of the input waveform. Accordingly, at the time of sound generation timing, the waveform peak (or bottom) level of the input waveform is multiplied by the initial value of the pulse wave height.
For example, in the example shown in FIG. 6, the pulse waveform generated at the waveform peak point when the initial value of the pulse wave height is “0.75” is illustrated. In this example, the pulse width is constant.
[0030]
Here, an example in which the peak value of the pulse waveform is continuously changed with time will be described with reference to FIG. This figure shows the change in pulse height of the pulse waveform at the positive peak point.
First, (A) in the figure is a pulse waveform obtained by multiplying the waveform peak level by the initial value of the pulse wave height at the positive peak point determined as the sounding timing by the above-described attack detection. In the attack region, the peak value of the pulse waveform continuously changes in the order of (B) and (C) in the figure by interpolating from the initial pulse peak value to the pulse peak target value according to the change over time.
[0031]
The width of the generated pulse waveform is determined according to the initial pulse width value at the beginning of waveform generation, and is then interpolated to the target pulse width value in the same manner as the peak value. For example, FIG. 8 shows the change of the pulse width at the positive peak point, and (A) in the figure is a pulse waveform set by the initial value of the pulse width at the positive peak point set as the sounding timing. In the attack region, the pulse width continuously changes in the order of (B) and (C) in the figure by interpolating from the initial pulse width value to the target pulse width value according to the change over time.
[0032]
As described above, when the peak value and the pulse width of the pulse waveform are determined, filtering is performed so as to obtain a desired waveform shape. In filtering, the filter type (LPF, HPF), the initial cutoff frequency, and the target cutoff frequency are used among the parameters described above.
Here, an example of filtering will be described with reference to FIG. FIG. 9 shows a case where low-pass filtering for gradually reducing the cutoff frequency is performed on the pulse waveform generated at the positive peak point. For example, low-pass filtering based on the initial cut-off frequency is performed at the timing of sound generation ((A) in the same figure). Gradually reduce the cut-off frequency. Thereby, the pulse waveform is blunted in the order of (B) and (C) in the figure.
[0033]
Eventually, in waveform generation processing, at the waveform peak (or bottom) point where the slope of the input waveform changes, a pulse waveform corresponding to the given parameter is generated, and filtering under the specified conditions is performed. A new musical sound waveform is formed along with the change of the input waveform.
FIG. 10 illustrates a musical sound waveform obtained by such a series of processes. In the example shown in this figure, the peak value at the positive / negative peak point is matched with the input waveform level, a pulse waveform is generated with the peak value at the positive / negative bottom point at half the input waveform level, and the cutoff frequency gradually increases from the initial value. This is a reduced case.
As can be seen from the figure, the musical sound waveform obtained by the waveform generation process has no sound delay due to the conventional pitch extraction and reflects a subtle change in the input waveform.
[0034]
By the way, as described above, when the input waveform level decreases, it becomes difficult to detect the waveform peak / bottom. Therefore, in this embodiment, as shown in FIG. 11, when the input waveform level becomes equal to or lower than the release threshold value, the waveform data sampled immediately before is repeatedly reproduced in the waveform period obtained by the period detection. Generate a release waveform that attenuates at a given release rate.
The release threshold value and the release rate are variable parameters supplied from the
[0035]
(3) Configuration of
Next, the configuration of the
In FIG. 12, WD is a waveform storage area. This storage area WD functions as a ring buffer, and waveform data of a plurality of past sampling points are always stored cyclically at addresses AD1 + 0 to AD1 + N. PP is a peak point storage area, and among the waveform data stored in the addresses AD1 + 0 to AD1 + N, the address value of the waveform data corresponding to the waveform peak / bottom point is stored in the addresses AD2 + 0 to AD2 + M. Therefore, for example, when the waveform data at the address AD2 + 2 is a waveform peak (or waveform bottom), the address AD2 + 2 is stored in the peak point storage area PP.
[0036]
PS is a peak state storage area, and the type of waveform peak / bottom point stored in the addresses AD2 + 0 to AD2 + M, that is, a flag PKF indicating the positive / negative of the peak point and the positive / negative of the bottom point is set. Here, when PKF is “1”, a positive peak point is indicated, when “2” it is positive bottom point, when “3” is negative peak point, and when “4” is negative bottom point. The flag PKF stored in the address AD3 + 0 to AD3 + M indicates the type corresponding to the waveform peak / bottom point stored in the address AD2 + 0 to AD2 + M.
Next, the APP stored at the address AD4 stores the peak (bottom) point of the maximum waveform level, and the MPP at the address AD4 stores the peak (bottom) point that is a pair of the APP. Accordingly, the APP and MPP stored at the addresses AD4 and AD4 + 1 store the above-described period detection result, and the time width between the APP and MPP corresponds to the waveform period.
[0037]
Next, in FIG. 13, PRM1 is a parameter storage area for positive peak points, and is supplied with a pulse height initial value A, a pulse height target value B, a pulse width initial value C, a pulse width target value D, a filter type supplied from the CPU 2 E, initial cutoff frequency F, target cutoff frequency G, release threshold value H and release rate I are stored. PRM2 to PRM4 are parameter storage areas for storing parameters A to I for positive bottom point, negative peak point, and negative bottom point, respectively. USP is a use parameter storage area, and stores one of parameters PRM1 to PRM4 corresponding to the type of waveform peak (or waveform bottom) to be processed. That is, the types of parameters A to I corresponding to the flag PKF described above are stored and stored in the addresses AD5 to AD5 + 8.
[0038]
Next, FIG. 14 is a diagram illustrating a configuration of a register group used for various arithmetic processes of the
C is a register for storing the number of processing loop cycles in the
[0039]
The APW is a register that stores the waveform data of the peak (bottom) point APP of the maximum waveform level. MPW is a register in which the waveform data of the peak (bottom) point MPP which is a pair of the APP is stored. fc is a register for storing a filter coefficient for designating an output cutoff frequency determined according to the use parameters F and G described above. L is a register for storing an output peak value determined according to the use parameters A and B described above. P is a register in which the output pulse width determined according to the use parameters C and D is stored.
RAD is a register in which a release waveform output address pointer is stored. PC is a pulse width count register. MON is a silent period counting register. FE is a flag area in which various flags are set.
[0040]
B. Operation of the first embodiment
Next, the operation of the first embodiment will be described with reference to FIGS. Here, first, the parameter sending task of the
[0041]
(1) Operation of CPU 2 (parameter transmission task)
When the parameter setting operation is performed in the
[0042]
When the process proceeds to step SA1, the
On the other hand, when it is determined in step SA1 that the parameter is for the negative peak / bottom point, the
[0043]
Next, in step SA8, it is determined whether or not the transfer instruction switch has been operated. If the switch is not operated, the determination result is “NO”, the process returns to step SA1, and parameter setting is performed. If the transfer instruction switch is operated when the four types of parameters are set, the determination result here is “YES”, and the process proceeds to step SA9. In step SA9, a transfer start flag TF provided in the
On the other hand, on the
[0044]
When the
[0045]
(2) Operation of DSP9
Next, as the operation of the
(1) Main routine
First, when the apparatus power is turned on, the
[0046]
Next, in step SB3, a waveform capturing process is performed. As described above, the waveform capturing process sequentially stores the waveform data output from the A /
[0047]
In step SB6, after detecting the period of the input waveform necessary for generating the release waveform, periodic waveform storage processing for storing this is performed, and in step SB7, the waveform peak in which the slope of the input waveform changes is performed. / Waveform generation process that generates a pulse waveform according to the given parameters for each bottom point, and filters the specified conditions, thereby generating a new musical sound waveform according to the change of the input waveform I do. Next, in step SB8, idling for a predetermined number of steps is performed to make the processing loop period of the
[0048]
(2) CPU communication processing routine
As described above, when the processing of the
[0049]
On the other hand, if the
[0050]
(3) Waveform capture processing routine
When the parameters necessary for waveform generation are received from the
First, in step SD1, it is determined whether or not the waveform data from the A /
[0051]
On the other hand, if waveform data is input from the A /
Next, in step SD3, it is determined whether or not the waveform data read pointer stored in the register PT1 has reached the address AD1 + N of the waveform data storage area WD (see FIG. 12). That is, it is determined whether or not the earliest sampled waveform data is an address in the area WD in which the waveform data is cyclically stored as a ring buffer.
[0052]
If it is the oldest address, the determination result is “YES”, and the process proceeds to the next step SD4. In step SD4, the waveform data read pointer of the register PT1 is updated to the latest address, and in step SD5, the peak (bottom) point read pointer stored in the register PT2 corresponding to this update is similarly updated to the latest address. Change to AD2 (see FIG. 12). Next, also in step SD6, the register PT3 in which the peak (bottom) type read pointer is stored is updated to the latest address AD3 (see FIG. 12) in accordance with the update of the register PT1, and the process proceeds to the next step SD8. To proceed.
[0053]
On the other hand, if the waveform data read pointer stored in the register PT1 does not point to the oldest address, the determination result in step SD3 is “NO”, and the flow proceeds to step SD7. In step SD7, the
In step SD8, the current waveform data stored in the register PW is written to the address of the storage area WD indicated by the waveform data read pointer stored in the register PT1, and this routine is completed.
[0054]
(4) Peak detection processing routine
When the waveform data is captured, the
Here, when the difference is positive, that is, when the waveform is increasing, the process proceeds to the next step SE2, and the current inclination flag PF is set to “0 (increase)”. On the other hand, since the waveform tends to decrease when the difference is negative, the process proceeds to step SE3, and the flag PF is set to “1 (decrease)”. When the difference is “0”, that is, when waveform data of the same level continues, the process proceeds to step SE17 described later.
[0055]
When the current waveform inclination is determined by comparison with the waveform data of one sample before, the
On the other hand, when the slope of the waveform is not constant, that is, when the waveform changes from decrease to increase or from increase to decrease, the determination result is “NO”, and the flow proceeds to step SE5.
[0056]
In step SE5, it is determined whether or not the waveform data one sample before stored in the register FW is “negative” in order to determine whether the waveform is positive or negative. Here, if the waveform data one sample before is “positive”, the determination result is “NO”, and the process proceeds to step SE6. In step SE6, it is determined whether or not the value of the flag PF is “0 (increase)”. If it is “increase”, the waveform is currently changing from increasing to decreasing on the positive side. Then, the flag PKF indicating the type of waveform peak / bottom point is set to “1 (positive peak point)”. On the other hand, when the determination result in step SE6 is “NO”, that is, when the waveform is currently changing from decreasing to increasing on the positive side, the process proceeds to step SE8 and the flag PKF is set to “2 (positive bottom point)”. Set to.
[0057]
On the other hand, if the waveform data one sample before stored in the register FW is “negative” in step SE5, the determination result here is “YES”, and the process proceeds to step SE9. In step SE9, it is determined whether or not the value of the flag PF is “0 (increase)”. If it is “increase”, the waveform is currently changing from increasing to decreasing on the negative side. Then, the flag PKF indicating the type of waveform peak / bottom point is set to “3 (negative peak point)”. On the other hand, when the result of the determination at step SE9 is “NO”, that is, when the waveform is currently on the negative side and is changing from decreasing to increasing, the process proceeds to step SE11 and the flag PKF is set to “4 (negative bottom point)”. Set to.
[0058]
When the waveform peak (or bottom) is detected in this way, the
[0059]
Then, in steps SE14 and SE15, the values of the registers PT2 and PT3 are incremented by 1, respectively, and incremented, and in step SE16, the detection flag PDF indicating peak (or bottom) detection is set to “1 (detection state)”. set.
Next, in step SE17, in order to detect a peak (or bottom) based on the next waveform data, the contents of the register PW are rewritten to the register FW to update the waveform sample, and the contents of the flag PF are similarly changed in the next step SE18. Is replaced with flag FF to complete this routine.
[0060]
(5) Attack detection processing routine
Next, the operation of the attack detection processing routine for detecting the sound generation timing will be described. As described above, there are two types of attack detection processing. The first is that when the performance operation starts when the input waveform starts to increase after passing through a silence state where the input waveform remains at a zero level (or noise level) for a certain period of time. The period until the first waveform peak is detected is regarded as the sound generation timing started, and is set as an attack region that forms the rising edge of the musical tone, and this is referred to as attack (I) processing.
Second, the highest peak value detected by the peak detection process described above is compared with the current waveform peak detected at the present time, and the current waveform peak has reached a predetermined multiple of the highest peak value. At this point, it is determined that the instrument that generates the input waveform has been replayed, and it is assumed that the sound generation timing has started from that point, and this is referred to as attack (II) processing. Hereinafter, the operations of both these processes will be described.
[0061]
(A) Attack (II) processing routine
When the waveform peak / bottom point and its type are determined, the
In step SF1, it is determined whether the level of the current waveform data stored in the register PW is “0”, that is, whether there is a silent state. Here, if it is a silence state, a judgment result will be "YES" and will progress to the following step SF2. In step SF2, the value of the register MON used as a counter for measuring the silent period is incremented by 1, and this routine is completed. That is, every time the silent state is entered, the register MON is counted up and the silent period is measured.
[0062]
Then, it is assumed that a silent period occurs every time the processing loop of the main routine described above is repeated a plurality of times, and the register MON is counted up each time. In this state, when this routine is executed again and it is determined in step SF1 that there is no silence, the process proceeds to step SF3. In step SF3, it is determined whether or not the value stored in the register MON, that is, the counter value corresponding to the silent period exceeds a predetermined value.
Here, if the value of the register MON does not exceed the predetermined value, it is assumed that the attack is not an attack, the determination result is “NO”, the process proceeds to step SF4, the register MON is reset to zero, and this routine is executed. To complete.
On the other hand, when the value of the register MON exceeds the predetermined value, it is considered as an attack, and the determination result is “YES”, the process proceeds to step SF5, and the value of the register C is reset to zero. The register C is a loop number counter that is incremented every time the processing loop of the main routine is completed, and the meaning of this value will be described later.
[0063]
(B) Attack (II) processing
When the waveform peak / bottom point and its type are determined, the
In step SG1, it is determined whether or not the detection flag PDF indicating the peak (bottom) detection state is “1”, that is, whether the peak (or bottom) is detected. Here, if the detection flag PDF is “0”, the attack state cannot be entered, so the determination result is “NO”, and this routine is completed.
[0064]
On the other hand, if the peak (or bottom) is detected, the determination result is “YES”, and the process proceeds to the next step SG2. In step SG2, the
When the current waveform data reaches k times the waveform data MPL or more, the sounding timing at which the input instrument is played is assumed to be the attack area, and the determination result is “YES”. The process proceeds to SG4 and the loop number counter value stored in the register C is reset to zero. On the other hand, when the current waveform data does not reach k times or more of the waveform data MPL, the determination result is “NO” because it is not an attack, and this routine is completed.
[0065]
(6) Period detection and periodic waveform storage processing routine
When attack detection is performed, the
First, in step SH1, it is determined whether the waveform peak (or bottom) detection flag PDF is “1”, that is, whether the waveform peak (or bottom) is detected. Here, if it is not detected, the period cannot be detected, so the determination result is “NO” and this routine is completed.
[0066]
On the other hand, when the waveform peak (or bottom) is detected and the flag PDF is “1”, the determination result is “YES”, and the process proceeds to the next step SH2. In step SH2, the peak point MPP of the maximum level is obtained among the peak (bottom) points stored in the addresses AD2 to AD2 + (N-1) of the storage area PP of the
[0067]
Here, when the two codes do not match, the determination result is “NO”, the process proceeds to step SH5, and another peak point APP different from the peak point MPP is obtained again. At this time, if the peak point does not exist, the determination result in the next step SH6 is “YES”, and this routine is completed.
On the other hand, if the peak point exists, the determination result is “NO”, and the process proceeds again to step SH4, and the waveform data corresponding to the peak point MPP and the waveform data corresponding to the newly obtained peak point APP are Is the same sign.
[0068]
When the signs of the waveform data at both points match, the
Here, when the waveform level of the peak point APP does not satisfy the above-mentioned standard, it is determined that the peak point is not a peak point paired with the peak point MPP, the determination result is “NO”, and the process returns to step SH5 described above.
On the other hand, when the waveform level of the peak point APP satisfies the standard, it is regarded as a peak point that is paired with the peak point MPP, so the determination result is “YES”, and the process proceeds to the next step SH8.
[0069]
Next, in step SH8, the magnitude relationship between the paired peak points MPP and APP is determined. When APP> MPP, the process proceeds to step SH9, and the peak (bottom) point MPP of the maximum waveform level is added to the address AD4 of the
On the other hand, when APP <MPP, the process proceeds to step SH10, the peak (bottom) point APP of the maximum waveform level is stored at the address AD4 of the
[0070]
(7) Waveform generation processing routine
Next, the
[0071]
In step SJ2, the loop count counter value stored in the register C is converted into a table to generate a converted value C ′. In this table conversion, after being reset at the start of an attack, the loop count counter value that is sequentially counted up to a predetermined value for each round of the processing loop of the
Next, when proceeding to step SJ3, the
[0072]
That is, when the flag PKF is “1”, because it is “positive peak point”, the process proceeds to step SJ4, and the parameters A to I stored in the storage area PRM1 (see FIG. 13) of the
When the flag PKF is “2”, because it is “a positive bottom point”, the process proceeds to step SJ5, and the parameters A to I stored in the storage area PRM2 (see FIG. 13) of the
[0073]
When the flag PKF is “3”, it is “negative peak point”, so the process proceeds to step SJ6, and the parameters A to I stored in the storage area PRM3 (see FIG. 13) of the
Further, when the flag PKF is “4”, since it is “negative bottom point”, the process proceeds to step SJ7, and the parameters A to I stored in the storage area PRM4 (see FIG. 13) of the
Note that the processing in steps SJ3 to SJ7 may be performed by selecting the storage areas PRM1 to PRM4 of the
[0074]
When the parameters A to I corresponding to the type of the waveform peak (or bottom) detected in this way are selected, the
Crest value L = PW × {A × (1−C ′) + B × C ′} (1)
Here, PW is the current waveform data stored in the register PW, A is the initial pulse wave height value, B is the pulse wave height target value, and C ′ is a conversion value obtained by normalizing the loop number counter value described above. It is a value used as an interpolation coefficient. Therefore, the peak value L is obtained by interpolating the pulse peak initial value to the pulse peak target value according to the attack elapsed time and multiplying this by the current waveform data.
[0075]
Next, in step SJ9, the pulse width P to be generated is calculated based on the following equation (2).
Pulse width P = C × (1−C ′) + D × C ′ (2)
Here, C is a pulse width initial value, D is a pulse width target value, and C ′ is an interpolation coefficient. Therefore, the pulse width P is obtained by interpolating the pulse width initial value to the pulse width target value according to the attack elapsed time.
Similarly, in the next step SJ10, based on the following equation (3), a cutoff frequency fc is generated by interpolating from the initial cutoff frequency F to the target cutoff frequency G according to the attack elapsed time.
Cut-off frequency fc = F × (1−C ′) + G × C ′ (3)
[0076]
Next, when proceeding to step SJ11, the
When preparation for waveform generation is completed in this way, or when a waveform peak (or bottom) is not detected and the determination result in step SJ1 is “NO”, the process proceeds to the next step SJ14 and set in the register PW. It is determined whether the level of the current waveform data being applied is equal to or lower than the release threshold value H, that is, whether the current waveform data is in the release area.
[0077]
If it is not in the release area, the determination result is “NO”, and the process proceeds to step SJ17 shown in FIG. 24. On the other hand, if it is in the release area, the determination result is “YES” and the process proceeds to step SJ15. . In step SJ15, the slope flag RF is set to “1” to indicate that the slope of the current input waveform is decreasing, and the flag PSF is set to “0” to indicate a waveform generation disabled state. In step SJ16, the value of the address AD4 of the
[0078]
Next, in step SJ17 (see FIG. 24), the
(A) When the current waveform data is not in the release area
If the current waveform data is not in the release area, the flag PSF is set to “1” in the above-described step SJ11. Therefore, the determination result in step SJ17 is “YES”, and the process proceeds to the next step SJ18. Proceed. In step SJ18, the pulse width count value stored in the register PC is incremented and stepped, and in step SJ19, the stepped pulse width count value is calculated based on the equation (2). It is determined whether or not it is larger than the width P.
[0079]
Here, when the pulse width count value is larger than the pulse width P, the determination result is “YES”, the process proceeds to the next step SJ20, and the flag PSF is set to “0” to stop the waveform output. Next, in step SJ21, the pulse width count value stored in the register PC is reset to zero along with this, and in step SJ22, the peak value L is set to zero. As a result, the generation of the waveform is stopped, and thereafter, the
[0080]
On the other hand, if the pulse width count value is smaller than the pulse width P, the determination result in step SJ19 is “NO”, and the flow proceeds to step SJ23. In step SJ23, the filter (high-pass filter or low-pass filter) designated based on the parameter E is given the cutoff frequency fc obtained by the above-described equation (3), and the pulse waveform of the peak value L is filtered based on this. And output the waveform. Thereafter, the process proceeds to step SJ24, and the loop number counter value is incremented by 1 and incremented to complete this routine.
[0081]
(B) When the current waveform data is in the release area
When the current waveform data is in the release area, the flag PSF is set to “0” in step SJ15 described above, so the determination result in step SJ17 is “NO”, and the process proceeds to step SJ25. In step SJ25, it is determined whether or not the release start flag RF is “1”. Since the flag RF is set to “1” in step SJ15 described above at the start of release, the determination result is “YES”, and the process proceeds to the next step SJ26. In step SJ26, the
[0082]
Next, in step SJ27, the waveform data read according to the value of the register RAD is multiplied by the release threshold value H to generate a release waveform level. Then, when the process proceeds to the next step SJ28, the release rate I is subtracted from the release threshold value H to generate the next release threshold value H. Subsequently, in step SJ29, the address pointer stored in the register RAD is incremented by 1 and incremented.
In step SJ30, the stepped address pointer is larger than the address specifying the peak (bottom) point MPP described above, that is, the waveform period detected in the period detection and periodic waveform storage processing routine described above. Determine if it has been exceeded. If the waveform period has not been exceeded, the determination result is “NO”, and the process proceeds to step SJ32, where it is determined whether the release threshold value H is 0 or less, that is, whether the release waveform has been completely attenuated.
[0083]
Here, for example, it is assumed that the release has just started. Then, since the release waveform is not completely attenuated, the determination result in step SJ32 is “NO”, the loop number counter value is incremented by 1 through step SJ24 described above, and this routine is completed.
Thereafter, in a process in which the processing loop circulates a predetermined number of times and a release waveform that is sequentially attenuated at the release rate I is generated in response, if the release period exceeds the above-described waveform period, the determination in step SJ30 described above. The result is “YES”, the process proceeds to step SJ31, and the address AD4 is set in the register RAD.
[0084]
Next, when the release threshold value H becomes “0” in step SJ32, the determination result here becomes “YES”, the process proceeds to step SJ32, the flag RF is set to “0”, and then the loop is passed through step SJ24. The number counter value is incremented to complete this routine.
When this routine is executed after the release waveform output is completed in this way, the determination result of step SJ1 is “NO”, and the process proceeds to step SJ25 via step SJ17. In this case, the flag RF is set to “0”. Therefore, the determination result is “NO”, the process proceeds to step SJ33, the peak value L is set to “0”, the waveform output is stopped, and the loop number counter value is incremented in step SJ24 to complete this routine.
[0085]
As described above, in the waveform generation processing routine, the peak value L and pulse width P of the rectangular pulse wave to be generated based on the parameters selected according to the type of the waveform peak (bottom), and the cut-off for filtering it out. A frequency fc is determined. At that time, the crest value L, the pulse width P, and the cut-off frequency fc are interpolated from the initial value defined by the parameter to the target value in accordance with the number of loop cycles. When the level of the input waveform falls below the release threshold value H, the waveform data sampled immediately before the release is attenuated at the given release rate while being repeatedly reproduced in the waveform period obtained by the period detection. Generate a waveform.
[0086]
C. Second embodiment
Next, a second embodiment will be described. In the first embodiment described above, the peak value L and pulse width P of the rectangular pulse wave to be generated based on the parameters selected according to the type of waveform peak (bottom), and the cut-off frequency fc for filtering it out. In the second mode, waveforms of various shapes are stored in advance for each type of waveform peak (bottom), and the waveform peak (bottom) is detected. Corresponding types of waveforms are read out every time, and these are connected to generate a waveform.
Therefore, hereinafter, the difference from the first embodiment, that is, the contents of the parameters transferred from the
[0087]
(1) Overview of the second embodiment
In the case of the second embodiment, a plurality of waveform information is stored in the internal ROM of the
Various waveform read addresses (parameters) supplied from the
In the figure, PPSW and PPEW are read addresses for reading the start waveform and end waveform at the positive peak point, and PBSW and PBEW are read addresses for reading the start waveform and end waveform at the positive bottom point. NPSW and NPEW are read addresses for reading the start waveform and end waveform at the negative peak point, and NBSW and NBEW are read addresses for reading the start waveform and end waveform at the negative bottom point.
[0088]
That is, every time the
In place of such a mode, the “positive peak start waveform”, “positive peak end waveform”, “positive bottom start waveform”, “positive bottom end waveform”, “negative peak start” are stored in the storage area PRM of the
[0089]
In the second embodiment, the start waveform to the end waveform are interpolated according to the number of processing loop cycles of the
Therefore, for example, as shown in FIG. 27, the waveform (A) is generated at the positive peak point, the waveform (B) is generated at the positive bottom point, and the negative peak point is generated based on such waveform interpolation. If the waveform (C) is generated at the negative bottom point and the waveform (D) is generated at the negative bottom point, the waveforms (A) to (D) are sequentially connected correspondingly to the input waveform as shown in FIG. A musical sound waveform is formed. In this case, when the assigned waveforms overlap in time, the new waveform is prioritized.
[0090]
(2) Operation of the second embodiment
Next, the operation of the second embodiment will be described with reference to FIGS. Since the various processing routines in the
As in the first embodiment described above, the
[0091]
On the other hand, when the waveform peak (bottom) is detected, the waveform information corresponding to the waveform peak (bottom) is read, so that the determination result is “YES”, and the process proceeds to the next step SK2. In step SK2, the loop number counter value stored in the register C is converted into a table to generate a converted value C ′. This table conversion is a conversion value C ′ having a value range of “0” to “1” as a loop number counter value that is reset at the start of an attack and then sequentially counted up to a predetermined value for each processing loop cycle of the
[0092]
When the conversion value C ′ serving as the interpolation coefficient is obtained in this way, the
That is, when the flag PKF is “1”, since it is a positive peak point, the process proceeds to step SK4, and the positive peak start waveform read address PPSW stored in the storage area PRM (see FIG. 25) of the
When the flag PKF is “2”, since it is a positive bottom point, the process proceeds to step SK5 to register the positive bottom start waveform read address PBSW and the positive bottom end waveform read address PBEW stored in the storage area PRM of the
[0093]
When the flag PKF is “3”, since it is a negative peak point, the process proceeds to step SK6, and the negative peak start waveform read address NPSW and the negative peak end waveform read address NPEW stored in the storage area PRM of the
Further, when the flag PKF is “4”, since it is a negative bottom point, the process proceeds to step SK7, where the negative bottom start waveform read address NBSW and the negative bottom end waveform read address NBEW stored in the storage area PRM of the
[0094]
When the waveform information corresponding to the type of waveform peak (or bottom) is determined in this way, the
In step SK10, the
[0095]
(A) When the current waveform data is not in the release area
If the current waveform data is not in the release area, the flag PSF is set to “1” in the above-described step SK8. Therefore, the determination result in this step SK11 is “YES”, and the process proceeds to the next step SK12. In step SK12, the start waveform information and end waveform information stored in the internal ROM of the
[0096]
In the next step SK14, the generated waveform is multiplied by the current waveform data stored in the register PW and the coefficient k to form an output waveform. The coefficient k is an arbitrary value that is a ratio of the output waveform level to the input waveform level, and usually takes a value in the range of 0.8 to 1.0.
Next, in step SK15, the start waveform / end waveform read address stored in the registers PT4 and PT5 is incremented, and in step SK16, the incremented start waveform read address and end waveform read address are set to the end address END. Determine if you have reached.
If the end address END has not been reached, the determination result is “NO”, the process proceeds to step SK17, the loop number counter value is incremented by 1, and the routine is once completed.
[0097]
Then, a musical tone waveform (output waveform) is formed in accordance with the repetition of the loop processing of the
[0098]
(B) When the current waveform data is in the release area
When the current waveform data is in the release area, the determination result of step SK10 described above is “YES”, the process proceeds to step SK20 (see FIG. 29), and the flag PSF is set to “0” to indicate that the waveform output is stopped. At the same time, a flag RF indicating the start of release is set to “1”. Next, in step SK21, the value of the address AD4 of the
[0099]
In step SK22, it is determined whether or not the flag RF is “1”, that is, whether or not the release is started. Since the flag RF is set to “1” in the above-described step SK20 at the start of release, the determination result here is “YES”, and the process proceeds to the next step SK23. In step SK23, the
[0100]
Next, when proceeding to step SK24, the waveform data read in accordance with the value of the register RAD is multiplied by the release threshold value H to generate a release waveform level. In step SK25, the release threshold value H is updated by subtracting the release rate I from the release threshold value H. Subsequently, in step SK26, the address pointer stored in the register RAD is incremented by 1 and incremented.
Next, when proceeding to step SK27, the
[0101]
Here, for example, it is assumed that the release has just started. Then, since the release waveform is not completely attenuated, the determination result in step SK29 is “NO”, and through this step SK17, the loop number counter value is incremented by 1, and the routine is completed.
Thereafter, in the process in which the loop process is circulated a predetermined number of times and a release waveform that is sequentially attenuated at the release rate I is generated in response to this, if the release period exceeds the above-described waveform period, the determination in step SK27 described above. The result is “YES”, the process proceeds to step SK28, and the address AD4 is set in the register RAD.
[0102]
Next, when the release threshold value H becomes “0” in step SK29, the determination result here becomes “YES”, the process proceeds to step SK30, the flag RF is set to “0”, and then the loop is passed through step SK17. The number counter value is incremented to complete this routine.
When this routine is executed after the generation of the release waveform is completed in this way, the determination result of step SK1 is “NO”, and the process proceeds to step SK22 via step SK11. In this case, the flag RF is “0”. Therefore, the determination result here is “NO”, the process proceeds to step SK19, the output level is set to “0”, the waveform output is stopped, the loop number counter value is incremented in the next step SK17, and this routine is completed. To do.
[0103]
Thus, in the waveform generation processing routine according to the second embodiment, a plurality of waveform information is stored in the internal ROM of the
[0104]
As described above, according to the waveform generator of the present invention, a waveform having a shape corresponding to a given parameter is sequentially generated for each waveform peak / bottom point where the slope of the input waveform changes to generate a new continuous waveform. Therefore, it is possible to generate a musical sound waveform that reflects a subtle change in the input waveform.
Therefore, this waveform generator does not require pitch extraction as in the prior art, so that it is possible to eliminate problems such as delays in pronunciation and erroneous detection of pronunciation pitch, and subtle changes in the input waveform Because it can be given to the music, rich music expression and performance effects can be realized. In addition, since the musical sound waveform generated by playing the input musical instrument is controlled, a novel musical instrument form that has not existed in the past can be realized.
[0105]
In the first and second embodiments described above, the case where the waveform generator of the present invention is applied to a musical tone control apparatus has been described. However, the gist of the present invention is not limited to this, and electronic musical instruments and the like are not limited thereto. It is also useful as an effector. In other words, if a musical sound waveform output from a sound source inside a musical instrument is regarded as an input to the waveform generator in the present invention, a new waveform reflecting the change in the output of the sound source can be generated, giving an effect. It is a form. In short, the gist of the present invention can be applied to any apparatus as long as it takes a tendency of a given input waveform and generates a new waveform.
[0106]
【The invention's effect】
According to the present invention, the waveform change point at which the slope of the input waveform supplied from the outside is increased or decreased or changed from decrease to increase is detected by the waveform change detection means, and the change form of the waveform change point is determined. When the waveform generation conditions for specifying the waveform shape to be generated by the condition setting means are set for each type of change mode, The pulse generating means generates a pulse waveform according to a waveform generation condition associated with the change form of the waveform change point, and performs filtering according to the waveform generation condition on the pulse waveform to form the output waveform. Therefore, unlike the conventional case, since it is not necessary to extract the pitch, it is possible to solve the problems such as a delay in sound generation or erroneous detection of the sound generation pitch. In addition, since subtle changes in the input waveform can be added to the output waveform, rich music expression and performance effects can be realized. In addition, since the output waveform is controlled by the input waveform generated by playing the input musical instrument, a novel musical instrument form that has not been conventionally available can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a musical tone control apparatus according to a first embodiment of the present invention.
FIG. 2 is a diagram for explaining peak detection processing of a
FIG. 3 is a diagram for explaining attack detection processing in a
FIG. 4 is a diagram for explaining attack detection processing in a
FIG. 5 is a diagram for explaining attack detection processing in the
FIG. 6 is a diagram for explaining a waveform generation process in the
7 is a diagram for explaining waveform generation processing in the
FIG. 8 is a diagram for explaining waveform generation processing in the
FIG. 9 is a diagram for explaining waveform generation processing in the
FIG. 10 is a diagram for explaining waveform generation processing in the
FIG. 11 is a diagram for explaining waveform generation processing (release waveform generation) in the
FIG. 12 is a memory map for explaining a memory configuration of the
FIG. 13 is a memory map for explaining the memory configuration of the
FIG. 14 is a memory map for explaining a memory configuration of the
FIG. 15 is a flowchart for explaining a parameter sending task of
FIG. 16 is a flowchart showing the operation of a main routine of the
FIG. 17 is a flowchart showing an operation of a CPU communication processing routine of the
FIG. 18 is a flowchart showing the operation of a waveform capture processing routine of the
FIG. 19 is a flowchart showing the operation of a peak detection processing routine of the
FIG. 20 is a flowchart showing an operation of an attack (I) detection processing routine of the
FIG. 21 is a flowchart showing an operation of an attack (II) detection processing routine of the
FIG. 22 is a flowchart showing the operation of a
FIG. 23 is a flowchart showing an operation of a waveform generation processing routine of the
FIG. 24 is a flowchart showing an operation of a waveform generation processing routine of the
FIG. 25 is a memory map for explaining a memory configuration of the
FIG. 26 is a diagram for explaining a waveform generation process of the
FIG. 27 is a diagram for explaining a waveform generation process of the
FIG. 28 is a diagram for explaining a waveform generation process of the
FIG. 29 is a flowchart showing the operation of a waveform generation processing routine of the
FIG. 30 is a flowchart showing an operation of a waveform generation processing routine of the
[Explanation of symbols]
1 Control unit
2 CPU (condition setting means)
3 RAM (condition setting means)
4 ROM (condition setting means)
5 Operation part (condition setting means)
6 Sound source
7 LPF
8 A / D converter (waveform change detection means)
9 DSP (waveform change detection means, waveform output means)
10 Work RAM
11 D / A converter (waveform output means)
12 Output circuit (waveform output means)
Claims (3)
発生すべき波形形状を指定する波形発生条件を、前記変化形態の種類別に設定する条件設定手段と、
波形変化点の変化形態に対応付けられた波形発生条件に従ってパルス波形を発生するパルス波発生手段と、
このパルス波発生手段が発生するパルス波形に対して前記波形発生条件に応じたフィルタリングを施して前記出力波形を形成するフィルタリング手段と
を具備することを特徴とする波形発生装置。A waveform change detecting means for detecting a waveform change point at which the slope of the input waveform supplied from the outside decreases from an increase or changes from a decrease to an increase, and discriminates a change form of the waveform change point;
Condition setting means for setting a waveform generation condition for specifying a waveform shape to be generated for each type of the change mode;
A pulse wave generating means for generating a pulse waveform according to a waveform generation condition associated with a change form of a waveform change point;
A waveform generating apparatus comprising: filtering means for filtering the pulse waveform generated by the pulse wave generating means according to the waveform generating conditions to form the output waveform .
波形発生の指示を受けてからの時間経過に応じて、前記波形発生条件内に設定されるパルス幅初期値からパルス幅目標値に内挿補間される値に応じて発生すべきパルス波形のパルス幅を連続的に可変制御するパルス幅制御手段とPulse of the pulse waveform to be generated according to the value interpolated from the pulse width initial value set in the waveform generation condition to the pulse width target value as time elapses after receiving the waveform generation instruction Pulse width control means for continuously and variablely controlling the width;
を具備することを特徴とする請求項1記載の波形発生装置。The waveform generator according to claim 1, further comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP20657895A JP3671407B2 (en) | 1995-07-20 | 1995-07-20 | Waveform generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP20657895A JP3671407B2 (en) | 1995-07-20 | 1995-07-20 | Waveform generator |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH0934466A JPH0934466A (en) | 1997-02-07 |
JP3671407B2 true JP3671407B2 (en) | 2005-07-13 |
Family
ID=16525729
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP20657895A Expired - Fee Related JP3671407B2 (en) | 1995-07-20 | 1995-07-20 | Waveform generator |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3671407B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2008015798A (en) * | 2006-07-06 | 2008-01-24 | Hitachi Kokusai Electric Inc | Video transmitter |
-
1995
- 1995-07-20 JP JP20657895A patent/JP3671407B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JPH0934466A (en) | 1997-02-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2699651B2 (en) | Sound source device | |
JP4672474B2 (en) | Automatic musical transcription device and program | |
KR100319481B1 (en) | Method and device for forming a tone waveform by combined use of different waveform sample forming resolutions | |
JP3671407B2 (en) | Waveform generator | |
US5648626A (en) | Musical tone controller responsive to playing action of a performer | |
JPH0926791A (en) | Musical sound generating method and waveform storing method | |
JP3283163B2 (en) | Melody generator by DSP | |
JP4561531B2 (en) | Musical sound control device and musical sound control processing program | |
EP3757984B1 (en) | Electronic musical instrument, method and program | |
JP6648457B2 (en) | Electronic musical instrument, sound waveform generation method, and program | |
JPH08160961A (en) | Sound source device | |
JP2007140000A (en) | Song grading device and program for processing song grading | |
JP4565846B2 (en) | Pitch converter | |
JPH06186973A (en) | Pitch detecting device | |
JP4998565B2 (en) | Singing scoring device and singing scoring program | |
JP2687698B2 (en) | Electronic musical instrument tone control device | |
JP4088947B2 (en) | Music generator | |
JPH04336599A (en) | Tempo detection device | |
JPH10124060A (en) | Method and device for musical sound generation and recording medium where program for sound generation is recorded | |
JP2017173679A (en) | Musical sound controller, electronic wind instrument, musical sound control method and program | |
JPH07152372A (en) | Playing device | |
JP5099146B2 (en) | Singing scoring device and singing scoring program | |
JP5648836B2 (en) | Musical sound control device and program | |
JP4548327B2 (en) | Musical sound control device and musical sound control processing program | |
JPH0337196B2 (en) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20041122 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20041126 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20041210 |
|
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: 20050328 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050410 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090428 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090428 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100428 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110428 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120428 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120428 Year of fee payment: 7 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130428 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130428 Year of fee payment: 8 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140428 Year of fee payment: 9 |
|
LAPS | Cancellation because of no payment of annual fees |