[go: up one dir, main page]

JP3871119B2 - Modulation waveform generator - Google Patents

Modulation waveform generator Download PDF

Info

Publication number
JP3871119B2
JP3871119B2 JP2002079793A JP2002079793A JP3871119B2 JP 3871119 B2 JP3871119 B2 JP 3871119B2 JP 2002079793 A JP2002079793 A JP 2002079793A JP 2002079793 A JP2002079793 A JP 2002079793A JP 3871119 B2 JP3871119 B2 JP 3871119B2
Authority
JP
Japan
Prior art keywords
value
tempo
counter
waveform
signal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2002079793A
Other languages
Japanese (ja)
Other versions
JP2003280649A (en
Inventor
登喜男 白川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2002079793A priority Critical patent/JP3871119B2/en
Publication of JP2003280649A publication Critical patent/JP2003280649A/en
Application granted granted Critical
Publication of JP3871119B2 publication Critical patent/JP3871119B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、電子楽器などに適用する変調波形発生装置に関する。
【0002】
【従来の技術】
電子楽器の発生する楽音に対しては、振幅、周波数、パン(ステレオ音における左右の音量バランス)、あるいは音色などを変動させて特殊効果を付与することが多い。そのような特殊効果の付与を行なうため、変調波(低周波)波形発生器、いわゆるLFOが設けられる。楽音に対する特殊効果の周期は、このLFOから出力される変調波形の周期によって決定される。
【0003】
一方、近年の電子楽器は自動演奏や自動伴奏の機能を備えたものが多い。自動演奏や自動伴奏では、自動演奏・伴奏におけるテンポが指定される。例えば、MIDI(Musical Instruments Digital Interface)データで表現された自動演奏データでは、曲の先頭や途中にテンポを指定するデータをセットし、曲の先頭や途中でのテンポの設定を行なう。
【0004】
そのような自動演奏・伴奏の側でのテンポのタイミングと特殊効果のタイミングが一致しないと楽音が不自然になる。そこで、特殊効果の周期を規定するLFOと自動演奏・伴奏のテンポとを同期させるための技術が提案されている。例えば、特許第2621669号には、指示手段による楽音信号発生指示に応じて第1の楽音信号を発生し、テンポ設定手段で設定されたテンポにしたがって自動的に第2の楽音信号を発生し、さらに前記テンポ設定手段で設定されたテンポに応じた周期の変調信号を発生し、その変調信号に基づき第1の楽音信号を変調するようにした電子楽器が開示されている。これによれば、第2の楽音信号(自動伴奏)のテンポはテンポ設定手段で設定されたテンポにしたがい、さらにそのテンポに応じた周期の変調信号で第1の楽音信号を変調するので、変調信号の周期を自動伴奏のテンポに対応させることができ、第1の楽音信号の変調を自動伴奏に同期させることができる。なお、以下では、自動演奏や自動伴奏のテンポに同期した周期の変調信号を発生するLFOを「テンポ同期LFO」と呼ぶ。
【0005】
【発明が解決しようとする課題】
上記特許第2621669号に記載のものは、数値として与えられたテンポに対して同期した変調信号を発生するものであり、実際にテンポを規定するテンポクロック(例えば、MIDIデータで入力してくるテンポクロック)に対して同期した変調信号を発生するものではない。特に、自動演奏(以下、単に自動演奏というときは自動伴奏も含むものとする)のテンポを規定するテンポクロックの時間間隔が変動する場合、従来のテンポ同期LFOでは、その周期が変動するテンポクロックに対して同期することは困難である。また、従来のテンポ同期LFOでは、仮に、自動演奏手段からテンポクロックとともに数値としてのテンポ値を供給しても、テンポの変化タイミングを互いに完全一致させることはできないので、厳密な意味での同期はとれていない。
【0006】
さらに、その指定されたテンポに応じて変調波形を発生するLFO(音源内のLFO)が自動演奏手段(一般にCPU)とは独立した発振器である場合には、たとえテンポ値が固定であっても、テンポクロックと変調波形が時間とともに少しずつずれていくという問題がある。CPUにテンポ同期LFOの波形発生処理を受け持たせることも考えられるが、そうするとCPUは、各サンプリング周期ごとに発音チャンネル数分のLFO処理を行なうことになり、負担が大きい。
【0007】
この発明は、上述の従来技術における問題点に鑑み、LFOと自動演奏手段とが独立して設けられている場合でも、自動演奏のテンポに同期した変調波形を発生することができる変調波形発生装置を提供することを目的とする。
【0008】
【課題を解決するための手段】
この目的を達成するため、請求項1に係る発明は、楽音を生成する音源内で使用する変調波形を発生する変調波形発生装置において、自動演奏のテンポに応じた時間間隔で発生されるテンポ信号を受信し、前記テンポ信号が発生される周期よりも短い周期である所定周期でクロック信号を発生する。またトリガーカウンタを用意し、テンポ信号を受信するごとにトリガーカウンタアップ値だけ該トリガーカウンタの値をカウントアップするようにし、そのトリガーカウンタアップ値は、変調波形のベースとなるベース波形の1周期でトリガーカウンタの値が最大値となるように決定する。トリガーカウンタの値は、最大値に達したときに初期化する。さらに共通カウンタを用意し、前記クロック信号が発生されるごとに補間レートだけ該共通カウンタの値をカウントアップし、その補間レートは、トリガーカウンタアップ値よりも小さい値とし、自動演奏テンポに応じて決定する。共通カウンタの値は、最大値に達したときに初期化する。そして、トリガーカウンタの値がカウントアップされるごとに、新たなトリガーカウンタの値を、前記共通カウンタにおけるカウントアップの目標値として設定し、前記共通カウンタの値が前記目標値に達したときには、前記目標値が新たな値に設定されるまでの間、前記共通カウンタの値を目標値に一致させておき、前記共通カウンタの値が前記目標値に達する前に、前記目標値が新たな値に設定されたときには、その時点で、前記共通カウンタの値を、新たに設定される前の目標値の値へ変更する。前記クロック信号が発生されるごとに、前記共通カウンタの値をベース波形として出力し、そのベース波形に基づいて変調波形を発生する。
テンポとは、例えば1分間の4分音符の数で表される音楽的なテンポであり、テンポ信号は該テンポに応じて変化する時間間隔で繰り返し発生される。このテンポ信号ごとにトリガーカウンタアップ値を累算することにより、階段状に変化していく目標値を得る。一方、クロック信号はテンポ信号が発生される周期よりも短い周期で発生するものとし、そのクロック信号が発生されるごとに補間レートだけ共通カウンタの値をカウントアップする。補間レートは、トリガーカウンタアップ値よりも小さい値とし、自動演奏テンポに応じて決定する。以上のようにして、テンポ信号ごとに階段状に目標値を変化させ、テンポ信号とテンポ信号の間は、クロック信号ごとに補間レートを累算してその時点の目標値に向かって近づいていく共通カウンタの値を求め、その共通カウンタの値をベース波形とし、該ベース波形に基づいて変調波形を生成する。
要するに、ベース波形の1周期をテンポ信号で区切り、区切った各区間において目標値(トリガーカウンタの値)に近づく共通カウンタの値を求めている。1周期を区切った各区間において目標値に近づく共通カウンタの値を求めているので、途中でテンポが変化しても、そのテンポの変化に応じて補間レートが変更され、そのような補間レートを累算して共通カウンタの値を求めるので、テンポに同期したベース波形(およびそれから作られる変調波形)が得られる。
共通カウンタ制御手段は、前記共通カウンタの値が前記目標値に達したときには、前記目標値が新たな値に設定されるまでの間、前記共通カウンタの値を目標値に一致させておく。また、前記共通カウンタの値が前記目標値に達する前に、前記目標値が新たな値に設定されたときには、その時点で、前記共通カウンタの値を、新たに設定される前の目標値の値へ変更する。このようにして、テンポ信号ごとに共通カウンタの値を目標値に一致させる(いわばテンポ信号ごとに共通カウンタの値を目標値に修正する)ので、上述のベース波形の1周期を区切った各区間において目標値に近づく共通カウンタの値を求めていることと合わせることで、テンポが変化した場合でも、より正確にそのテンポに同期した変調波形が得られるものである。
なお、トリガーカウンタの値および共通カウンタの値は所定の条件下で初期化されるので、ベース波形は鋸歯状波の繰り返しとなり、そのようなベース波形に基づいて変調波形が繰り返し出力されることになる。
【0009】
請求項2に係る発明は、請求項1において、前記補間レート決定手段は、前記テンポ信号を受信するごとに、および/または、テンポの変更を指示するテンポチェンジを受信するごとに、前記補間レートを決定することを特徴とする。
【0010】
請求項3に係る発明は、請求項1または2において、前記トリガーカウンタは、ベース波形の1周期内のすべてのテンポ信号の受信タイミングで前記カウントアップを行なう代わりに、ベース波形の1周期内の任意のテンポ信号を間引き、間引いたテンポ信号以外のテンポ信号の受信タイミングで前記カウントアップを行なうものとし、そのときにカウントアップするトリガーカウンタアップ値は前記間引いたテンポ信号の受信タイミングでカウントアップすべきであった値に基づいて変更するものであることを特徴とする。
【0011】
請求項4に係る発明は、請求項1から3の何れか1つにおいて、前記クロック信号は、楽音生成処理を行なう際の基準タイミング信号であるサンプリングクロック、またはN個(Nは自然数)のサンプリングクロックごとに1回取り出したクロック信号であることを特徴とする。
請求項5に係る発明は、請求項1から4の何れか1つにおいて、前記変調波形発生手段では、生成した変調波形の平滑化を行ない、平滑化後の変調波形を発生することを特徴とする。
請求項6に係る発明は、請求項1に係る変調波形発生装置を備えた自動演奏装置である。
【0012】
【発明の実施の形態】
以下、図面を用いてこの発明の実施の形態を説明する。
【0013】
図1は、この発明の変調波形発生装置を適用した電子楽器のブロック構成を示す。この電子楽器は、中央処理装置(CPU)101、リードオンリメモリ(ROM)102、ランダムアクセスメモリ(RAM)103、タイマ104、ドライブ装置105、MIDIインターフェース107、ネットワークインターフェース108、パネルスイッチ109、パネル表示器110、音源120、波形メモリ128、ディジタルアナログ変換器(DAC)130、およびサウンドシステム131を備える。
【0014】
CPU101は、この電子楽器全体の動作を制御するための処理装置である。ROM102は、CPU101が実行するプログラムや各種の定数データなどを格納した不揮発メモリである。RAM103は、CPU101が実行するプログラムのロード領域や各種のワークメモリ領域に使用する揮発性のメモリである。タイマ104は、所定周期のクロック信号を供給するタイマである。ドライブ装置105は、外部記録媒体であるディスク106を挿入し、CPU101の指示に応じて各種のデータを読み書きする装置である。MIDIインターフェース107は、外部のMIDI機器と接続しMIDI規格にしたがって信号のやり取りを行なうインターフェースである。ネットワークインターフェース108は、外部のネットワークに接続するためのインターフェースである。パネルスイッチ109は、この電子楽器の外部パネル上に設けられている各種のスイッチなどの操作子を示す。パネル表示器110は、この電子楽器のパネル上に設けられている表示器である。
【0015】
音源120は、音源制御レジスタ121、LFO(変調波形発生部)122、アドレス発生部123、補間部124、DCF(周波数特性制御部)125、EG(エンベロープジェネレータ)126、およびミキサ&DSP127を備える。音源120は、複数チャンネルについて時分割で動作する。すなわち、いわゆる1DAC周期(1サンプリング周期)をチャンネルの数で分割し、分割した各時間区間で各チャンネルの楽音生成処理を行なうものである。
【0016】
音源制御レジスタ121は、CPU101と音源120との間のインターフェースの役割を果たす。CPU101は、音源制御レジスタ121の中の所定のレジスタに所定の値を書き込むことにより、音源120に各種の指示命令を出す。音源制御レジスタ121については、後に詳しく説明する。アドレス発生部123は、CPU101の指示に応じて波形メモリ128中の所定の波形データを読み出すアドレスを発生する。読み出された波形データは補間部124で補間処理され、DCF125に入力する。DCF125は、入力信号に対し音色変化を与える。EG付与部126は、入力信号に対してエンベロープを付与する。ミキサ&DSP127は、入力信号をミキシングし各種の効果付与などを行なった後、最終的な音源出力として楽音信号をDAC130に出力する。DAC130は、入力したディジタル楽音信号をアナログ楽音信号に変換する。変換されたアナログ楽音信号はサウンドシステム131により放音される。
【0017】
LFO122で発生したLFO波形は、アドレス発生部123、DCF125、EG付与部126、およびミキサ&DSP127に入力する。アドレス発生部123に入力するLFO波形は、アドレスを周波数変調するピッチ変調波形の役割を果たす。DCF125に入力するLFO波形は、音色を変化させる音色変調波形の役割を果たす。EG付与部126に入力するLFO波形は、エンベロープを付与する際の振幅変調波形の役割を果たす。ミキサ&DSP127に入力するLFO波形は、パンの変化に利用したり、リバーブやコーラスなどの各種のエフェクト処理に利用する。
【0018】
図2は、LFO122で発生するLFO波形の例を示す。5線譜と音符は自動演奏の楽音を示す。その下の波形201は、この自動演奏のテンポに同期して発生されるLFO波形の例である。例えば、1小節の開始位置でパンポット(音像の位置)を左側に定位(ステレオのL側の音量レベルが最大でR側の音量レベルが0の状態)させ、小節内では徐々にパンポットを左側から右側に移動させ、小節終了位置ではパンポットを右側に定位させるようなパンニングを行ないたいときには、このLFO波形201をミキサ&DSP127のパンニング回路に供給する。LFO波形201はパンポットの定位する位置を規定する波形の役割を果たし、LFO波形20の最下位レベルで一番左、最上位レベルで一番右に定位するものとする。このようなパンニングを行なう場合、自動演奏のテンポとLFO波形が同期していないと、各小節で所望のパンニングを行なうことができない。本実施形態では、自動演奏のテンポに同期したLFO波形を発生するので、各小節で自動演奏のテンポに同期したパンニングを行なうことができる。
【0019】
自動演奏のテンポに同期したLFO波形201を発生するため、CPU101側からLFO122にテンポクロックであるF8信号に基づくテンポ同期トリガーを供給する。すなわち、CPU101は、後述するようにF8信号のタイミングでテンポ同期トリガーを音源120に供給する。LFO122は、F8信号に基づくテンポ同期トリガーを受けたとき、カウンタの次の目標値に変えるなどのテンポに対する同期ずれを補正する処理を行ない、これによりできる限りF8信号のテンポに同期したLFO波形を出力するように処理する。この処理については、後述する。
【0020】
図3は、図1のLFO122の詳細な構成を示す。LFO122は、トリガーカウンタ301、共通カウンタ302、各チャンネル用低周波発振部303、およびDSP用各低周波発振部305を備える。トリガーカウンタ301と共通カウンタ302は、LFO122内に1つずつ設けられている。各チャンネル用低周波発振部303は、各発音チャンネルごとに設けられている。ここでは128チャンネル分のチャンネル用低周波発振部303が設けられている。DSP用各低周波発振部305は、ミキサ&DSP127で使用する複数の変調波形を生成するため複数設けられている。ここでは64チャンネル分のDSP用各低周波発振部305が設けられている。
【0021】
各発音チャンネル用低周波発振部303は、N倍処理部331、リセット制御部332、オフセット付加部333、形状変形部334、直線補間部335、位相反転部336,338,340、デプス制御部337,339,341、および非同期カウンタ342を備える。各DSP用各低周波発振部305は、N倍処理部351、リセット制御部352、オフセット付加部353、形状変形部354、1次LPF355、および非同期カウンタ356を備える。
【0022】
トリガーカウンタ301と共通カウンタ302は、出力するLFO波形の元になる基本的な鋸歯状波(ベース波形と呼ぶ)を生成するためのそれぞれ整数部17ビットと小数部10ビットで構成されるカウンタである。これらにより生成したベース波形を、各チャンネル用低周波発振部303やDSP用各低周波発振部305で加工することにより、所望のLFO波形を得る。
【0023】
トリガーカウンタ301は、CPU101からテンポ同期トリガーが供給されるごとに、トリガーカウンタアップ値を現在値に加算し、加算後の値を新たな現在値として出力するカウンタである。トリガーカウンタ301の現在値は、共通カウンタ302の目標値となる。テンポ同期トリガーとは、F8信号のタイミングでCPU101から音源120に供給されるトリガーであり、後述するトリガーアクションのことである。トリガーカウンタアップ値は、CPU101が算出して設定する。
【0024】
共通カウンタ302は、各サンプリング周期ごとに共通カウンタ補間レートを累算するカウンタである。共通カウンタ補間レートは、CPU101が算出して設定する。次のテンポ同期トリガーが来る前に、共通カウンタ302の累算値がトリガーカウンタ301の値に到達したら、そこで共通カウンタ302のサンプリング周期ごとの累算を停止する。次のテンポ同期トリガーが来たときに、共通カウンタ302の累算値が未だトリガーカウンタ301の値に到達していなかったら、共通カウンタ302の累算値を、それまで目標値としていたトリガーカウンタ301の値に強制的に設定する。共通カウンタ302の出力は、図2に示したようなベース波形(鋸歯状波)201になる。
【0025】
共通カウンタ302からのベース波形(整数部17ビット+小数部10ビット)は、各チャンネルの低周波発振部303のN倍処理部331に入力する。N倍処理部331は、共通カウンタ302の出力波形をN倍(但し、整数部のビット数は増やさない)する。乗算結果のうちの小数部は切り捨てられ、整数部17ビットのみからなる、ベース波形の周期の1/Nの周期の鋸歯状波を生成する。乗数Nは、各発音チャンネルごとに独立にCPU101が設定する。
【0026】
N倍処理部331の出力は、リセット制御部332に入力する。なお、リセット制御部332以降における各ブロックの波形データは全て整数部17ビットのみから構成される。リセット制御部332は、キーオンと同時にLFO波形を初期位相に設定することを指示するキーオンリセットフラグが「有効」に設定されている場合、各発音チャンネルがノートオンされたときその時点のN倍出力が「0」となるように制御する。具体的には、各発音チャンネルがノートオンされたときのN倍出力値をレジスタに取り込み、それ以降のN倍出力値からそのレジスタの値を整数部の減算(但し、整数部のビット数は増やさない)するような動作を行なう。これにより、リセット制御部332の出力は、強制的に0から開始される波形となる。なお、上記キーオンリセットフラグが「無効」と設定されている場合は、上記「N倍出力値のレジスタへの取り込み」を行なわない。すなわち、ノートオン時に過去にレジスタに取り込まれている値は変更せず、そのレジスタの値をN倍出力値から減算して出力する処理を継続する。
【0027】
リセット制御部332の出力は、オフセット付加部333に入力する。オフセット付加部333は、入力する波形に、各発音チャンネルごとに設定されたオフセット値を加算(但し、整数部のビット数は増やさない)する。このオフセット値は、上記キーオンリセットフラグが「有効」でリセットされた場合の初期位相になる。このオフセット値は、CPU101が設定する。リセット制御部332とオフセット付加部333により、任意の初期位相から開始するLFO波形を生成できる。
【0028】
オフセット付加部333の出力は、形状変形部334に入力する。形状変形部334は、形状選択情報に応じて、入力した鋸歯状波を、三角波、矩形波、およびサイン波などの各種の形状の波形に変換して出力する。ここで、鋸歯状波は各種の形状の波形を生成するための位相データとして働く。従って、この変換では、周期は同じままで形状のみが変換され、あるいは、鋸歯状波をそのまま出力することもできる。形状選択情報は、発音チャンネルごとにCPU101が設定する。
【0029】
形状変形部334の出力は、直線補間部335に入力する。直線補間部335は、入力波形の傾き(変化)が、設定された波形補間レート以下になるように制御する。波形補間レートは、発音チャンネルごとにCPU101が設定する。直線補間部335による補間は、ノイズ除去を目的とする波形の平滑化のためである。
【0030】
直線補間部335の出力は、位相反転部336,338,340にそれぞれ入力する。位相反転部336,338,340では、各発音チャンネルの出力先(アドレス発生部123、DCF125、EG付与部126)ごとに、位相の反転(正相/逆相)を選択可能である。例えば、ピッチと振幅の変調を同位相の変調にしたり、逆位相にしたりできる。また、複数の発音チャンネルで生成する音の振幅変調を互いに同位相(スルー)にしたり逆位相(全ビット反転)にしたりできる。位相の反転を行なうか否かは、CPU101が設定する。
【0031】
位相反転部336,338,340の出力は、それぞれデプス制御部337,339,341に入力する。デプス制御部337,339,341では、各発音チャンネルの出力先(アドレス発生部123、DCF125、EG付与部126)ごとに変調の深さを設定することができる。変調の深さの設定は、CPU101が行なう。デプス制御部337,339,341の出力は、それぞれ、ピッチ変調波形としてアドレス発生部123に、音色変調波形としてDCF125に、振幅変調波形としてEG付与部126に、それぞれ入力する。
【0032】
各発音チャンネルの低周波発振部303は、発音チャンネルごとの設定に応じて、テンポ同期LFOとして動作させることもできるし、テンポ非同期LFOとして動作させることもできる。その指定は、CPU101により行なう。非同期カウンタ342は、テンポ非同期LFOとして動作するとき、設定された周波数データに対応した周波数の変調波形を発生するために使用するカウンタである。テンポ非同期LFOとして動作するよう設定されたLFO303では、発生するLFO波形の周期の単位は周期時間または周波数で指定する。この周期時間または周波数は、CPU101が指定する。非同期カウンタ342は、指定された周期時間または周波数に対応した周波数の変調波形を発生する。
【0033】
なお、ある発音チャンネルの低周波発振部303をテンポ非同期LFOとして動作させるときには、そのチャンネルのN倍処理部331やリセット制御部332は不要である。そこで、リセット制御部332のレジスタを、非同期カウンタ342の現在値を保持するレジスタとして兼用している。また、N倍処理部331の乗数Nを保持するレジスタを、CPU101が指定した「周期時間または周波数」を保持するレジスタとして兼用している。
【0034】
DSP用各低周波発振部305の内部構成は、上述の各発音チャンネルの低周波発振部303と同様である。N倍処理部351はN倍処理部331に、リセット制御部352はリセット制御部332に、オフセット付加部353はオフセット付加部333に、形状変形部354は形状変形部334に、非同期カウンタ356は非同期カウンタ342に、それぞれ相当する。ただし、直線補間部335以降の部分の代わりに、平滑化のための1次LPF355を備えている。低周波発振部305で発生するLFO波形の振幅レベルは、DSPでマイクロプログラムにより実現されるアルゴリズムの中の乗算器で制御される。この構成により、ミキサ&DSP127における各エフェクト処理に割り当てて使用する複数LFO波形を発生する。
【0035】
なお、上述したように各エフェクトに割り当てて使用する複数LFOとともに、DSPには複数EGが備えられている。該複数LFOと該複数EGは、DSPで実行される個々のエフェクトで必要とされる数ずつ各エフェクトに割り当てて使用され、そのため、それぞれ1つずつ個別にトリガーをかけることができるようになっている。例えば、3つのLFOを使用するコーラス効果の場合、その3つのLFOは、相互に位相を120度ずつずらせて動作させる必要がある。これは、3LFOチャンネル分のLFOについて、オフセット付加部353で120度ずつ異なる初期位相を設定し、同時にリセットをかけることにより実現できる。トリガーを使えば、DSPでエフェクトの代りに(波形発生部と同じような)波形発生処理を実行させることも可能である。
【0036】
次に、テンポ同期LFOに関係するレジスタやフラグについて説明する。トリガーカウンタ301と共通カウンタ302については図3で説明したので、それ以外のレジスタやフラグ(音源制御レジスタ121)について次の(1)〜(14)で説明する。
【0037】
(1)トリガーカウンタアップ値レジスタ:トリガーカウンタ301にF8信号(テンポ同期トリガー)ごとに加算する値を保持するレジスタである。ここに書き込んだ値により何回のトリガーで一周期まわるかが決まる。ここでは、トリガーカウンタ301は、その整数部17ビットで2の17乗−1=131071まで、小数部込みで約2の17乗=約131072までカウントアップできるレジスタであるので、この最大値をベース波形の1周期内のF8信号の数で割ることにより、トリガーカウンタアップ値が求められる。CPU101は、そのように算出した値を音源120に送って、トリガーカウンタアップ値レジスタに保持させる。なお、トリガーカウンタアップ値の算出で割り切れない場合は、その商を切り上げるものとする。切り上げることにより、ベース波形の1周期内の最後のF8信号ではトリガーカウンタ301が必ずオーバフローするようになり、この時点でオーバーフローしたあふれ分は切り捨てられ、トリガーカウンタ301は0に初期化される。したがって、割り切れない場合の誤差が蓄積されることはない。
【0038】
CPU101によるトリガーカウンタアップ値の算出例を説明する。CPU101は、出力させたいLFO波形に応じてベース波形の周期を決める。例えば、テンポを1分間に4分音符120個のテンポとし、F8信号を1小節で96個発生させるものとし、ベース波形の周期を1小節(4部音符が4つ分とする)単位とする場合を考える。この場合、1小節内のF8信号の個数は96個であるから、ここからF8信号ごとにトリガーカウンタ301に加算されるトリガーカウンタアップ値が算出できる。すなわち、トリガーカウンタ301の最大値が2の17乗=131072であるから、131072/96≒1365.3333とし、この値を切り上げて、トリガーカウンタアップ値とする。例えば、トリガーカウンタアップ値が指数部4ビットと仮数部12ビットであれば、切り上げた値は1365.5となる。なお、実際には、トリガーカウンタ301やトリガーカウンタアップ値レジスタは浮動小数点の2進数で値を格納するので、切り上げも2進数での切り上げである。このように、トリガーカウンタアップ値は、ベース波形の1周期におけるF8信号の数に基づいて、RU(最大値/F8信号の回数)の式で算出される。ここで、RU()は切り上げを示す。
【0039】
(2)共通カウンタ補間レートレジスタ:共通カウンタ302は、1DACサイクルごとに、トリガーカウンタ301の値を目標値として直線的に補間する補間器である。この補間器に対して補間速度を指定するのが、共通カウンタ補間レートである。共通カウンタ補間レートレジスタは、この共通カウンタ補間レートを保持するレジスタである。共通カウンタ補間レートは、上記トリガーカウンタアップ値によって決定したステップ幅(分割数)と、そのステップ幅をどれだけの時間、つまりどれだけのテンポに合わせて補間するかを考慮して指定する必要がある。
【0040】
上記(1)のトリガーカウンタアップ値の算出例のケースで、CPU101が共通カウンタ補間レートを算出する例を説明する。まず、上記のケースでは、4分音符1つ分は、60sec/120≒0.5secの時間長さになる。4分音符1つはF8信号24個分の時間間隔であるから、F8信号1つ分の時間間隔(F8信号から次のF8信号までの時間間隔)は、0.5sec/24≒0.0208secである。ベース波形の周期を1小節(F8信号で96個分の時間間隔)としたいのであるから、0.0208sec×96≒2secがベース波形の周期である。音源内のサンプリング周波数を44100Hzとすると、その周期は22μsecであるから、上記ベース波形の1周期の時間内では、2sec/22μsec≒88200回だけ共通カウンタ302への累算が行なわれることになる。共通カウンタ302の最大値は2の17乗=131072であるから、131072/88200≒1.4861であり、共通カウンタ補間レートが指数部4ビットと仮数部12ビットで構成されるとすると、2進で切り上げた約1.4863がその値となる。このように、共通カウンタレートは、ベース波形の1周期のサンプル回数に基づいて、RU(最大値/サンプル回数)の式で算出される。
【0041】
(3)トリガーアクションフラグ:トリガーアクションは、CPU101からのテンポ同期のためのイベントを与えるトリガー(テンポ同期トリガー)である。CPU101からこのトリガーアクションフラグに1を書き込むと、テンポ同期トリガーがLFO122に供給されたことになる。このトリガーにより、上記トリガーカウンタ301にトリガーカウンタアップ値が加算され、その値が新たな目標値となって、該目標値に向かって共通カウンタ302による補間が始まる。
【0042】
(4)トリガーカウンタリセットフラグ:テンポ同期トリガーにより加算されるトリガーカウンタ301をリセットするフラグである。テンポ同期などの初期化時に使用する。1を書き込むとそのタイミングでリセット状態となり、0を書きこむ必要はない。
【0043】
(5)共通カウンタリセットフラグ:直線補間器である共通カウンタ302をリセットするフラグである。テンポ同期などの初期化時に使用する。1を書き込むとそのタイミングでリセット状態となり、その後すぐに、設定されている共通カウンタ補間レートで共通カウンタ302のカウントアップが開始する。0を書きこむ必要はない。
【0044】
(6)フリーランモードフラグ:通常、共通カウンタ302は、トリガーカウンタ301の値を目標値として動作するが、このフリーランモードフラグを1に設定すると、共通カウンタ302は、目標値を無視して常に与えられたレートで補間し続ける。これにより、テンポ同期のイベントがなくなっても、テンポ同期のときとほぼ同じ速度で共通カウンタ302が動作する。一方、共通カウンタ302が通常のテンポ同期動作を行なうときは、フリーランモードフラグが0に設定される。フリーランモードフラグを0にすると、共通カウンタ302による補間処理は停止し、停止した時点の値を出力し続ける。
【0045】
(7)チャンネル別テンポ同期フラグ:各チャンネル別の低周波発振部303に対して、チャンネル独立の周波数設定で動作するか(従来形)、テンポ同期の共通カウンタ302に同期して動作するかを切替えるフラグである。このフラグを1に設定すると共通カウンタ302に同期し(すなわち図3で、N倍処理部331→リセット制御部332→オフセット付加部333の流れで生成される波形を使う)、0に設定するとチャンネル独立の周波数設定のLFO(すなわち図3で、非同期カウンタ342→オフセット付加部333の流れで生成される波形を使う)になる。
【0046】
(8)チャンネル別N倍設定レジスタ:テンポ同期LFOとして使用するとき、各チャンネル別にN倍処理部331の乗数Nの値を設定するレジスタである。このレジスタは、テンポ非同期LFOとして使用するときのチャンネル別の周波数レジスタと共用している。
【0047】
(9)キーオンリセットフラグ:キーオン(ノートオンと同義)と同時にLFO波形を初期位相に設定するかどうかを決めるフラグである。0のときは「無効」、すなわちキーオンでリセットしない。1のときは「有効」、すなわちキーオンでリセットする。
【0048】
(10)オフセット値レジスタ:オフセット付加部353でLFO波形に加算するオフセット値を保持するレジスタである。
【0049】
(11)波形選択レジスタ:形状変形部334で変換出力する波形形状の形状選択情報を保持するレジスタである。選択できる波形については、後に詳しく説明する。
【0050】
(12)波形補間レートレジスタ:直線補間部335において補間を行なうときの補間レートを保持するレジスタである。
【0051】
(13)位相反転指定レジスタ:位相反転部336,338,340において、位相の反転(正相/逆相)を選択するための選択情報を保持するレジスタである。
【0052】
(14)デプス指定レジスタ:デプス制御部337,339,341における変調の深さを設定するレジスタである。
【0053】
なお、上記のレジスタやフラグのうち、(1)〜(6)はシステム内でそれぞれ1つずつ設けられているものである。(7)〜(14)はチャンネルごとに(チャンネルとは、各発音チャンネルの低周波発振部303では発音チャンネル、DSP用各低周波発振部305では各LFOチャンネルである)設けられているものである。ただし、DSP用各低周波発振部305は、(12)〜(14)のレジスタは持っていない。
【0054】
図4は、トリガーカウンタ301と共通カウンタ302によるカウントアップの様子を示す。図4(a)は、F8信号(テンポ同期トリガー)が等間隔で供給される場合を示す。ここで、CPU101は、F8信号の発生に応じて音源120のLFO122に対してトリガーアクション与えるので、F8信号の発生するタイミングはトリガーアクションのタイミングと等価である。音源120内ではトリガーアクションのタイミングとして認識しているが、図4では説明の簡単化のためF8信号でそのタイミングを示すものとする。ここでは、説明の簡単化のため、ベース波形の1周期あたりのF8信号の発生回数を4回としているが、通常のF8信号の発生回数はこれよりかなり多い。
【0055】
F8信号が供給されるタイミングで階段状に変化しているグラフ401は、トリガーカウンタ301の値を示す。トリガーカウンタ301の値は、ベース波形の1周期における最初のF8信号のタイミングでトリガーカウンタアップ値となり、その後、F8信号が来るごとにその値に対してトリガーカウントアップ値が加算される。共通カウンタ302は、トリガーカウンタ301の値を目標値として細かく補間されてカウントアップされる。402は、目標値に向かって理想的にカウントアップされていく共通カウンタ302の値を示す。403は、次のF8信号のタイミングで共通カウンタ302の累算値が未だトリガーカウンタ301の目標値に到達していない場合、共通カウンタ302の累算値を、目標値であるトリガーカウンタ301の値に強制的に設定しているグラフを示す。404は、次のF8信号のタイミングに至る前に共通カウンタ302の累算値がトリガーカウンタ301の目標値に到達し、そこからは共通カウンタ302の累算を停止して、その目標値を出力し続けているグラフを示す。
【0056】
410はカウンタの最大値である2の17乗=131072のレベルを示す。ベース波形の1周期における最後のF8信号(この図では4回目)のタイミングにおいてトリガーカウンタ301はオーバーフローし、該オーバーフローに応じて、トリガーカウンタ301の内部値は0にリセットされる一方、共通カウンタに対して最大値(約131072)を出力する。なお、この図の例でトリガーカウンタアップ値の計算は割り切れている(131072/4=32768)が、その場合であっても、最後のF8信号に応じた加算によりその加算結果は整数部の17ビットを超えてオーバーフローが発生する。共通カウンタ302の値は、最大値131072に至った後は、その最大値を続けて出力する。
【0057】
図4(b)は、F8信号が不規則な場合を示す。自動演奏のテンポは任意に変動できるものであるので、F8信号も不規則に発生される場合がある。F8信号が不規則な場合でもカウントアップの動作は同様であるので、図4(a)と同じ番号を付した。図4(b)では、F8信号411のタイミングでトリガーカウンタ301が0にリセットされ、そこから共通カウンタ302は共通カウンタ補間レートの累算を継続しているが、共通カウンタ302の値が最大値に至る前に次のF8信号412が来ており、ここで共通カウンタ302は0にリセットされている。
【0058】
図5は、トリガーカウンタ301と共通カウンタ302を用いたカウントアップの各種の例を示す。上述したように、CPU101は、ベース波形の周期を決め、その周期内のF8信号の数を求め、F8信号ごとのトリガーカウンタ301への加算量を算出し、共通カウンタ補間レートを算出する。この場合、CPU101側からLFO122に対して等間隔でF8信号を送る必要がある。図5(a)は、ベース波形の1周期を細かく等分したタイミングでF8信号を送っている例である。複数の横線501は、トリガーカウンタ301が階段状にカウントアップされる各レベルを示す。F8信号は502に示すように等間隔でLFO122に供給され、各F8信号のタイミングで、カウンタ301が階段状にカウントアップされている。503は共通カウンタ302のグラフである。このように、細かい周期でF8信号を送っている場合には、ベース波形の1周期の途中に起こる様々なテンポの変動に対して精密に追従していくことができる。
【0059】
図5(b)は、F8信号を間引く例を示す。ベース波形の各周期の途中であまりテンポが変動しないことが判っている場合には、このように途中のF8信号を間引くことができる。CPU101は、ベース波形の周期を決め、その周期内でF8信号を何個にするかを決定する。この際、本来のF8信号の数から幾つかのF8信号を間引く。間引いたあとに残ったF8信号に基づいて、F8信号ごとの加算量であるトリガーカウンタアップ値を算出する。この場合、ベース波形の1周期ごとにF8信号は1回しか発生しないので、トリガーカウンタアップ値は最初の加算でオーバーフローを発生するような特殊な最大値にする。また、図5(a)の例からF8信号を間引いただけであり、ベース波形の傾きは同じなので共通カウンタ補間レートも図5(a)の場合と同じ値でよい。この例では、CPU101は、ベース波形の1周期ごとに1回だけLFO122にトリガーアクションを与えればよく、CPU101にかかる負担が少ない。
【0060】
図5(c)は、ベース波形の1周期の途中で共通カウンタ補間レートを変更する例を示す。CPU101は、ベース波形の周期を決め、その周期内でF8信号を何個にするかを決定する。そして、F8信号ごとの加算量であるトリガーカウンタアップ値を算出する。この図の例では、3等分して加算量を求めている。一方、共通カウンタ補間レートは、ベース波形の1周期の前半ではトリガーカウンタアップ値の2倍をタイミング521〜522までのサンプル回数で割った商として、後半ではトリガーカウンタアップ値をタイミング522〜523までのサンプル回数で割った商として算出する。図のように、CPU101は、ベース波形の各周期において不等間隔でトリガーアクションを与える。また、CPU101は、ベース波形の1周期の先頭の521、523のタイミングでは前記前半の共通カウンタ補間レートを与え、真中の522のタイミングでは前記後半の共通カウンタ補間レートを与える。
【0061】
図5(d)は、図5(c)において、さらにベース波形の1周期の途中でトリガーカウンタアップ値を変更する代わりに、F8信号を間引けるようにした例である。この場合も、ベース波形の傾きは図5(c)と同じなので、共通カウンタ補間レートは図5(c)の場合と同じでよい。一方、トリガーカウンタアップ値は、ベース波形の1周期の前半が最大値の3分の2、後半が3分の1として算出される。CPU101は、ベース波形の1周期の先頭の531、533のタイミングでは前記前半のベースカウンタアップ値を与え、真中の522のタイミングでは前記後半のベースカウンタアップ値を与える。また、ベース波形の1周期の先頭の534、536のタイミングでは前記前半の共通カウンタ補間レートを与え、真中の535のタイミングでは前記後半の共通カウンタ補間レートを与える。このように、1周期の途中で共通カウンタ補間レートを変更するベース波形を生成する場合、CPU101は、その変更するタイミングについて、トリガーアクション、ベースカウンタアップ値、共通カウンタ補間レートの制御を行なうだけでよい。
【0062】
図6は、F8信号が途絶えた場合の処理方法を示す。曲の終わりなどではテンポカウンタであるF8信号が途絶える場合がある。この場合、上述のフリーランモードフラグにより、図6(a)か図6(b)の何れかの処理方法を採ることができる。図6(a)は、F8信号が途絶えた後もフリーランモードフラグを0のまま放置した場合である。この場合、F8信号が途絶えたタイミングでトリガーカウンタ301の値が増加しなくなるのに応じ、共通カウンタの値もそれと同じ値から変化しなくなる。図6(b)は、CPU101がF8が途絶えたことを検出した時点でフリーランモードフラグに1を設定した場合である。この場合、共通カウンタ302は、目標値を無視して常に与えられた共通カウンタ補間レートで補間し続ける。これにより、曲が終わった後に出力されているような楽音に対しても、引き続きLFO波形を適用できる。
【0063】
図7は、上述のN倍処理部331,351による処理例を示す。701は、共通カウンタ302からN倍処理部331,351に入力するベース波形を示す。N倍処理部331,351での乗数Nが9であったとすると、N倍処理部331,351の出力は波形702のようになる。この波形703の周波数は、ベース波形701の周波数の9倍になっている。
【0064】
図8は、上述のN倍処理部331,351の乗数Nの一覧を示す。表の最上位行の「4分音符基準個数」は、ベース波形の1周期が4分音符の何個分になるかの場合分けを示す。4分音符4個で1小節とするので、その下の行の「小節」に示すように、小節数でベース波形の1周期の長さを表せる。4分音符1個でF8信号が24個分であるから、それぞれの場合のベース波形の1周期内のF8信号数が求められる。「F8信号数」の行は、その値を示す。
【0065】
左側の「4分×32(8小節)」や「4分×16(4小節)」などの記載は、各発音チャンネルないし各LFOチャンネルにおいて発生させたいLFO波形の周期を示す。例えば、「4分音符基準個数」が3個の場合、ベース波形の1周期が4分音符3個分になり、このベース波形に対し「全音符3連」の周期の波形を発生させたい場合は、N=1.125と設定すればよいことが分かる。同様に、この一覧表に基づいて、ベース波形の周期と発生させたい波形の周期から乗数Nを求めることができる。なお、図8に記載した以外であっても、任意の長さのベース波形の周期と任意の長さの発生させたい波形の周期から乗数Nを求めることができる。
【0066】
図9は、形状変形部334,354で各チャンネル毎に選択可能な波形形状の例を示す。形状変形部334,354は、入力したベース波形に基づいて、三角波901、矩形波902、鋸歯状波903、サイン波904、およびランダム波905などを生成出力することができる。ここに挙げた波形は一例であり、他の任意の波形を選択できるようにしてもよい。
【0067】
図10は、直線補間部335による直線補間の例を示す。直線補間部335は、入力した波形の傾きが設定された補間レート以下になるよう制限する補間を行なう。CPU101は、この補間レートを、LFO122の当該発音チャンネルないしLFOチャンネルにおいて選択された波形形状や設定されたN倍の値に応じて決定し、直線補間部335に与える。例えば、入力波形が1001に示すような鋸歯状波の場合、補間レートの値を小さくすると波形1002のような波形が出力される。この補間により、LFO波形の急激に変化する部分でノイズが発生するのを防止できる。
【0068】
次に、フローチャートを参照してCPU101が実行する処理手順を説明する。
【0069】
図11は、CPU101が実行するメイン処理の流れを示す。ステップ1101で初期設定を行ない、ステップ1102で起動要因(イベント)の発生をチェックする。ステップ1103で何らかの起動要因があれば、ステップ1104に進む。起動要因がなければ、ステップ1102に戻り、起動要因チェックを継続する。ステップ1104では、何の要因かを判別し、その要因別にステップ1105〜1109の何れかに分岐する。パネル操作イベントがあったときは、ステップ1105に進み、パネル処理を行なった後、ステップ1102に戻る。MIDIイベントがあったときは、ステップ1106に進み、MIDIイベント処理を行なった後、ステップ1102に戻る。テンポ割込イベントがあったときは、ステップ1107に進み、自動演奏のテンポ割込処理を行なった後、ステップ1102に戻る。その他のイベントのときは、ステップ1108に進み、そのイベントに応じた処理を行なった後、ステップ1102に戻る。電源スイッチのオフイベントであったときは、ステップ1109で終了処理を行なった後、本処理を終了する。
【0070】
図12は、ステップ1106のMIDIイベント処理のうち、MIDIインターフェース107を介して他のMIDI機器からのF8信号を受信したときの動作を示す。これは、この電子楽器がスレーブ動作する場合である。すなわち、他のMIDI機器が出力する自動演奏データに基づいて、この電子楽器で自動演奏を行なう場合であり、テンポクロックであるF8信号は、他のMIDI機器からこの電子楽器に供給される。
【0071】
ステップ1201では、過去のF8信号の時間間隔に基づき現在のテンポ値を推定し変数GTに格納する。ステップ1202では、現在のテンポ値GTに基づき、共通カウンタ補間レートを算出して音源120のLFO122に供給する。共通カウンタ補間レートの算出方法についてはすでに説明した。次に、ステップ1203で、音源120のLFO122にテンポ同期トリガーを供給する。これは、トリガーアクションフラグに1を書き込むことで行なう。
【0072】
図13は、ステップ1106のMIDIイベント処理のうち、MIDIインターフェース107から自動演奏のノートオンを受信したときの動作を示す。ステップ1301で、受信したノートオンのパート番号を変数PTに、ノート番号を変数NNに、ベロシティを変数VELに、それぞれ格納する。ステップ1302では、発音チャンネルの割り当て処理を行なう。ステップ1303では、パートPTで選択されている現在の音色とノートオンのノート番号およびベロシティに従い、音源レジスタ121の割り当てたチャンネルに各種パラメータを設定する。すなわち、波形選択情報、Fナンバ、各種EGパラメータ、LFOパラメータ、各種センドレベル等が設定される。ここで、該LFOパラメータには、テンポ同期フラグ、倍数Nないし周波数、補間レート、ピッチ変調度PMD、音色変調度CMD、振幅変調度AMD等が含まれる。パートPTにおいてLFO波形をテンポ同期させるよう設定された音色が選択されている場合には、テンポ同期フラグが立てられる。ステップ1304で、当該チャンネルにノートオン信号(発音開始トリガー)を供給する。ノートオン信号が供給された発音チャンネルでは、設定されたパラメータに応じた楽音信号の形成処理を開始される。すなわち、アドレス発生部123と補間部124による波形メモリからの波形データの読み出しが開始され、DCF125では読み出された波形データに対して音色変化が与えられ、更に、EG付与部126では立ち上がりから立ち下がりまでの音量変化が付与される。LFO122の発生するLFO波形は、アドレス発生部123、DCF125、EG付与部126に供給されており、当該チャンネルで発生する楽音波形の各種特性を制御する。
【0073】
図14は、ステップ1106のMIDIイベント処理のうち、MIDIインターフェース107からバリエーションタイプを受信したときの動作を示す。バリエーションタイプとは、楽音に付与するエフェクトの種類を指定する情報である。ステップ1401で、受信したバリエーションタイプを変数VTに格納する。ステップ1402では、MP(マイクロプログラム)番号、MP記憶領域、LFO、およびEGなどを割り当てる。DSP127は、複数のマイクロプログラム記憶領域を備えており、それらの領域にMP番号を割り当ててマイクロプログラムを設定し、実行させることにより、任意のエフェクト処理を組み合わせて実行できる。ステップ1402のMP番号とMP記憶領域の割り当ては、バリエーションタイプで指定されたエフェクトのマイクロプログラムをロードする領域を番号を割り当てるものである。LFOの割り当ては、指定されたエフェクトに必要な数のLFOを、図3の305に示した複数のLFOチャンネルに相当する低周波発振部の中から割り当てるものである。また、EG(エンベロープジェネレータ)の割り当ては、指定されたエフェクトに必要な数のEGを、DSP127が備えている複数のEGの中から割り当てるものである。
【0074】
次に、ステップ1403で、割り当てたMP番号のエフェクトをミュートする。これは、そのMP番号のエフェクト処理が実行中であった場合に、マイクロプログラムの入れ替えでノイズが発生しないようにミュートするものである。ステップ1404では、指定されたバリエーションタイプのエフェクトを付与する処理を行なうマイクロプログラムをDSP127に設定する。ステップ140では、割り当てたLFOチャンネルに対し、テンポ同期フラグ、倍数N(テンポ非同期で用いる場合は周波数)、LPF係数、キーオンリセットフラグなどを設定する。ステップ1406でEGの設定を行ない、ステップ1407で各種の係数を設定する。ステップ1408では、その他の必要な処理(遅延メモリの処理など)を行なう。ステップ1409では、ステップ1403でかけたミュートを解除し、マイクロプログラムの実行を開始するようにトリガーをかけて、処理終了する。
【0075】
図15(a)は、図11のステップ1107の自動演奏のテンポ割込処理の手順を示す。自動演奏中は、現在のテンポに応じた周期でタイマ割込が発生し、そのときこのテンポ割込処理が実行される。これは、この電子楽器がマスタ動作する場合である。すなわち、この電子楽器が自動演奏データを読み込んで、自動演奏する場合であり、F8信号はこの電子楽器で発生して他のMIDI機器に供給する。テンポ割り込みの時間間隔は、F8信号と同じ4分音符あたり24回の割り込みが発生するように設定しても良いし、それより細かい分解能で、例えば、4分音符あたり96回の割り込みが発生するように設定しても良い。
【0076】
まずステップ1501で、テンポカウンタをカウントアップする。テンポカウンタは、CPU101側で自動演奏のテンポを規定するカウンタである。次に、ステップ1502で、音源120のLFO122にテンポ同期トリガーを供給する。ステップ1503では、F8信号をMIDI出力端子に出力する。なお、テンポ割込がF8信号より細かい分解能で発生する場合は、ステップ1502では何回かに1回テンポ同期トリガーを供給すればよいし、ステップ1503ではやはり何回かに1回F8信号を出力すればよい。例えば、4分音符あたり96回の割り込みが発生するように設定された場合には、4回の割り込み毎に1回F8信号を出力する。ステップ1504では、当該自動演奏データのイベントタイミングに至ったかを判定する。イベントタイミングに至ったときは、ステップ1505で当該イベントを再生し、ステップ1506で次イベントまでのデュレーションを設定して、処理終了する。ステップ1504でイベントタイミングでないときは、そのまま処理終了する。
【0077】
ステップ1505のイベント再生処理では、例えば、ノートオンイベントであれば、そのノートオン処理を行なう。ステップ1505でノートオンの再生まで行なってしまってもよいし、ステップ1505ではノートオンをバッファに積むだけとし、別処理ルーチンでそのバッファからノートオンを取り出して処理しても良い。
【0078】
ステップ1505のイベントがテンポチェンジであったときは、図15(b)の処理が行なわれる。まずステップ1521で、指定されたテンポ値を変数TMPに格納する。ステップ1522では、そのテンポ値TMPに応じてテンポタイマの速度を設定変更する。次にステップ1523で、音源120のLFO122に、テンポ値TMPに応じた共通カウンタ補間レートを供給し、処理を終了する。
【0079】
なお、上記実施形態において、テンポクロックは、必ずしもMIDIの「F8信号」(分解能が1拍の1/24)でなくてもよい。分解能は、例えば、1拍の1/2、1/96などでもよい。共通カウンタ302に加算する共通カウンタ補間レートの値は、テンポクロックの直前の時間間隔に基づいて自動決定してもよい。また、上記実施形態では、共通カウンタで各サンプリング周期ごとに補間演算(累算)を行なっていたが、サンプリング周期ごとに行なわなくてもよい。例えば、2サンプリング周期に1回とか、8サンプリング周期に1回、補間演算を行なうようにしてもよい。また、「F8信号」の受信間隔に基づくテンポの推定をCPU101で行なわず、音源120内の演算回路で行ない、音源120内で共通カウンタ補間レートを算出するようにしてもよい。テンポの推定は、直前に受信した2つの「F8信号」の時間間隔のみから(直線的に)推定してもよいし、直前の3つ以上の「F8信号」の複数時間間隔からラグランジェ補間などを使用して(曲線的に)推定してもよい。
【0080】
なお、F8信号は、CPU101がタイマ104を用いて生成するようにしても良いし、外部で生成されてMIDIインターフェース107やネットワークインターフェース108から入力するようになっていてもよい。
【0081】
本実施形態では、F8信号をテンポ信号としていたが、それ以外のリズムを制御するあらゆる種類のタイミング信号を同期のためのテンポ信号としてよい。
【0082】
また本実施形態では、自動演奏ないし自動伴奏との同期をとるためにテンポを示すF8信号を使用していたが、本発明をこのようなF8信号に限定する必要はない。この信号は、自動演奏ないし自動伴奏のテンポとベース波形が同期するように補正を掛けるタイミングを示す信号であれば何でも良く、F8信号以外のタイプのテンポ信号であっても良いし、自動演奏に同期して定期的にないし不定期的に発生する同期制御信号であってもよい。
【0083】
リセット制御部332では、ノートオンに応じて0にリセットされるようになっていたが、0以外の所定値にリセットされるようにしてもよい。
【0084】
本実施形態では、ベース波形は整数部17ビットと小数部10ビットで構成されていたが、このビット数に限られるものではなく、必要に応じて増減してよい。
【0085】
図6では、自動演奏の終了に伴いF8信号が途切れた場合を示したが、エラーによりF8信号が取りこぼされる場合も考えられる。その場合は、CPU101がダミーのF8信号を生成して、LFO波形が途切れないようにしてもよい。
【0086】
【発明の効果】
以上説明したように、この発明によれば、テンポ信号ごとに所定値を累算する累算手段を備え、この累算値を時間的に補間しその補間値から変調波形を生成しているので、LFOと自動演奏手段とが独立して設けられている場合でも、自動演奏のテンポに同期した変調波形を発生することができる。
【図面の簡単な説明】
【図1】この発明の変調波形発生装置を適用した電子楽器のブロック構成図
【図2】LFOで発生するLFO波形の例を示す図
【図3】LFOの詳細な構成を示す図
【図4】トリガーカウンタと共通カウンタによるカウントアップの様子を示す図
【図5】トリガーカウンタと共通カウンタを用いたカウントアップの各種の例を示す図
【図6】F8信号が途絶えた場合の処理方法を示す図
【図7】N倍処理部による処理例を示す図
【図8】N倍処理部の乗数Nの一覧を示す図
【図9】形状変形部で選択可能な波形形状の例を示す図
【図10】直線補間部による直線補間の例を示す図
【図11】メイン処理のフローチャート図
【図12】MIDIインターフェース107からF8信号を受信したときのフローチャート図
【図13】MIDIインターフェース107から自動演奏のノートオンを受信したときのフローチャート図
【図14】MIDIインターフェース107からバリエーションタイプを受信したときのフローチャート図
【図15】自動演奏のテンポ割込処理のフローチャート図
【符号の説明】
101…中央処理装置(CPU)、102…リードオンリメモリ(ROM)、103…ランダムアクセスメモリ(RAM)、104…タイマ、105…ドライブ装置、107…MIDIインターフェース、108…ネットワークインターフェース、109…パネルスイッチ、110…パネル表示器、120音源、128…波形メモリ、130…ディジタルアナログ変換器(DAC)、131…サウンドシステム。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a modulation waveform generator applied to an electronic musical instrument or the like.
[0002]
[Prior art]
A special effect is often applied to musical sounds generated by an electronic musical instrument by changing the amplitude, frequency, pan (the volume balance between left and right in a stereo sound), or timbre. In order to give such a special effect, a modulation wave (low frequency) waveform generator, so-called LFO is provided. The period of the special effect for the musical sound is determined by the period of the modulation waveform output from the LFO.
[0003]
On the other hand, many electronic musical instruments in recent years have functions of automatic performance and automatic accompaniment. In automatic performance and automatic accompaniment, the tempo for automatic performance and accompaniment is specified. For example, in automatic performance data expressed by MIDI (Musical Instruments Digital Interface) data, data specifying a tempo is set at the beginning or middle of a song, and the tempo is set at the beginning or middle of the song.
[0004]
If the timing of the tempo on the side of such automatic performance / accompaniment and the timing of the special effect do not match, the musical sound becomes unnatural. Therefore, a technique for synchronizing the LFO that defines the cycle of the special effect and the tempo of automatic performance / accompaniment has been proposed. For example, in Japanese Patent No. 2621669, a first musical sound signal is generated in response to a musical sound signal generation instruction by the instruction means, and a second musical sound signal is automatically generated according to the tempo set by the tempo setting means, Furthermore, an electronic musical instrument is disclosed in which a modulation signal having a period corresponding to the tempo set by the tempo setting means is generated and the first musical tone signal is modulated based on the modulation signal. According to this, the tempo of the second musical sound signal (automatic accompaniment) follows the tempo set by the tempo setting means and further modulates the first musical sound signal with the modulation signal having a period corresponding to the tempo. The period of the signal can correspond to the tempo of automatic accompaniment, and the modulation of the first musical sound signal can be synchronized with the automatic accompaniment. In the following, an LFO that generates a modulation signal having a period synchronized with the tempo of automatic performance or automatic accompaniment is referred to as “tempo synchronization LFO”.
[0005]
[Problems to be solved by the invention]
The one described in the above-mentioned Japanese Patent No. 2621669 generates a modulation signal synchronized with a tempo given as a numerical value, and is a tempo clock that actually defines the tempo (for example, a tempo input as MIDI data). It does not generate a modulation signal synchronized with the clock). In particular, when the time interval of the tempo clock that defines the tempo of automatic performance (hereinafter simply referred to as “automatic performance” includes automatic accompaniment) fluctuates, in the conventional tempo synchronization LFO, the tempo clock whose cycle varies It is difficult to synchronize. Further, in the conventional tempo synchronization LFO, even if a tempo value as a numerical value is supplied together with the tempo clock from the automatic performance means, the tempo change timings cannot be completely matched with each other. Not taken.
[0006]
Further, when the LFO that generates a modulation waveform according to the designated tempo (the LFO in the sound source) is an oscillator independent of the automatic performance means (generally a CPU), even if the tempo value is fixed. There is a problem that the tempo clock and the modulation waveform are gradually shifted with time. Although it is conceivable that the CPU is in charge of tempo-synchronized LFO waveform generation processing, the CPU performs LFO processing for the number of sound generation channels for each sampling period, which is a heavy burden.
[0007]
In view of the above-described problems in the prior art, the present invention provides a modulation waveform generator capable of generating a modulation waveform synchronized with the tempo of automatic performance even when the LFO and the automatic performance means are provided independently. The purpose is to provide.
[0008]
[Means for Solving the Problems]
  To achieve this object, the invention according to claim 1 is a modulation waveform generator for generating a modulation waveform used in a sound source for generating musical sounds., A tempo signal generated at a time interval corresponding to the tempo of the automatic performance is received, and a clock signal is generated at a predetermined cycle which is shorter than the cycle at which the tempo signal is generated. Also, a trigger counter is prepared so that each time a tempo signal is received, the trigger counter value is counted up by the trigger counter up value. The trigger counter up value is a period of the base waveform that is the base of the modulation waveform. The trigger counter value is determined to be the maximum value. The trigger counter value is initialized when the maximum value is reached. Furthermore, a common counter is prepared, and the value of the common counter is counted up by an interpolation rate every time the clock signal is generated. The interpolation rate is set to a value smaller than the trigger counter up value, and is set according to the automatic performance tempo. decide. The value of the common counter is initialized when the maximum value is reached. Each time the value of the trigger counter is counted up, a new value of the trigger counter is set as a target value for counting up in the common counter, and when the value of the common counter reaches the target value, Until the target value is set to a new value, the value of the common counter is matched with the target value, and before the value of the common counter reaches the target value, the target value becomes a new value. When set, at that time, the value of the common counter is changed to the value of the target value before being newly set. Each time the clock signal is generated, the value of the common counter is output as a base waveform, and a modulation waveform is generated based on the base waveform.
The tempo is a musical tempo represented by, for example, the number of quarter notes per minute, and the tempo signal is repeatedly generated at time intervals that change according to the tempo. By accumulating the trigger counter up value for each tempo signal, a target value changing stepwise is obtained. On the other hand, the clock signal is generated at a cycle shorter than the cycle at which the tempo signal is generated, and the value of the common counter is incremented by the interpolation rate each time the clock signal is generated. The interpolation rate is set to a value smaller than the trigger counter up value, and is determined according to the automatic performance tempo. As described above, the target value is changed stepwise for each tempo signal, and the interpolation rate is accumulated for each clock signal between the tempo signal and the tempo signal, and approaches the target value at that time. A value of the common counter is obtained, the value of the common counter is used as a base waveform, and a modulation waveform is generated based on the base waveform.
In short, one cycle of the base waveform is divided by the tempo signal, and the value of the common counter that approaches the target value (the value of the trigger counter) is obtained in each divided section. Since the value of the common counter that approaches the target value is obtained in each section divided by one cycle, even if the tempo changes midway, the interpolation rate is changed according to the change in the tempo. Since the value of the common counter is obtained by accumulation, a base waveform (and a modulation waveform generated therefrom) synchronized with the tempo is obtained.
When the value of the common counter reaches the target value, the common counter control means keeps the value of the common counter coincident with the target value until the target value is set to a new value. In addition, when the target value is set to a new value before the common counter value reaches the target value, the value of the common counter is set to the target value before the new value is set at that time. Change to value. In this way, the value of the common counter is matched with the target value for each tempo signal (in other words, the value of the common counter is corrected to the target value for each tempo signal). In combination with the determination of the value of the common counter that approaches the target value in FIG. 5, even when the tempo changes, a modulation waveform synchronized with the tempo more accurately can be obtained.
Since the trigger counter value and the common counter value are initialized under a predetermined condition, the base waveform is a sawtooth waveform, and the modulation waveform is repeatedly output based on such a base waveform. Become.
[0009]
  The invention according to claim 22. The interpolation rate determining means according to claim 1, wherein the interpolation rate determining means determines the interpolation rate every time the tempo signal is received and / or every time a tempo change instructing a tempo change is received.It is characterized by that.
[0010]
  The invention according to claim 33. The trigger counter according to claim 1, wherein the trigger counter thins out and thins out an arbitrary tempo signal within one period of the base waveform instead of performing the count-up at the reception timing of all tempo signals within one period of the base waveform. The count up is performed at the reception timing of a tempo signal other than the tempo signal, and the trigger counter up value counted up at that time is based on the value that should have been counted up at the reception timing of the thinned tempo signal. To changeIt is characterized by that.
[0011]
  The invention according to claim 44. The clock signal according to claim 1, wherein the clock signal is a sampling clock that is a reference timing signal when performing musical tone generation processing, or a clock that is extracted once for every N sampling clocks (N is a natural number). SignalIt is characterized by that.
  The invention according to claim 5 is characterized in that, in any one of claims 1 to 4, the modulation waveform generation means smoothes the generated modulation waveform and generates a smoothed modulation waveform. To do.
The invention according to claim 6 is an automatic performance device including the modulation waveform generator according to claim 1.
[0012]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
[0013]
FIG. 1 shows a block configuration of an electronic musical instrument to which a modulation waveform generator of the present invention is applied. The electronic musical instrument includes a central processing unit (CPU) 101, a read only memory (ROM) 102, a random access memory (RAM) 103, a timer 104, a drive device 105, a MIDI interface 107, a network interface 108, a panel switch 109, and a panel display. 110, sound source 120, waveform memory 128, digital-to-analog converter (DAC) 130, and sound system 131.
[0014]
The CPU 101 is a processing device for controlling the operation of the entire electronic musical instrument. The ROM 102 is a nonvolatile memory that stores programs executed by the CPU 101 and various constant data. The RAM 103 is a volatile memory used for a load area for programs executed by the CPU 101 and various work memory areas. The timer 104 is a timer that supplies a clock signal having a predetermined period. The drive device 105 is a device that inserts a disk 106 as an external recording medium and reads / writes various data in accordance with instructions from the CPU 101. The MIDI interface 107 is an interface that is connected to an external MIDI device and exchanges signals according to the MIDI standard. The network interface 108 is an interface for connecting to an external network. A panel switch 109 indicates operators such as various switches provided on the external panel of the electronic musical instrument. The panel display 110 is a display provided on the panel of the electronic musical instrument.
[0015]
The sound source 120 includes a sound source control register 121, an LFO (modulation waveform generation unit) 122, an address generation unit 123, an interpolation unit 124, a DCF (frequency characteristic control unit) 125, an EG (envelope generator) 126, and a mixer & DSP 127. The sound source 120 operates in a time division manner for a plurality of channels. That is, a so-called 1DAC period (one sampling period) is divided by the number of channels, and a musical tone generation process is performed for each channel in each divided time section.
[0016]
The sound source control register 121 serves as an interface between the CPU 101 and the sound source 120. The CPU 101 writes various instruction commands to the sound source 120 by writing a predetermined value in a predetermined register in the sound source control register 121. The sound source control register 121 will be described in detail later. The address generator 123 generates an address for reading predetermined waveform data in the waveform memory 128 in accordance with an instruction from the CPU 101. The read waveform data is interpolated by the interpolation unit 124 and input to the DCF 125. The DCF 125 gives a timbre change to the input signal. The EG giving unit 126 gives an envelope to the input signal. After mixing the input signal and applying various effects, the mixer & DSP 127 outputs a musical sound signal to the DAC 130 as a final sound source output. The DAC 130 converts the input digital musical tone signal into an analog musical tone signal. The converted analog tone signal is emitted by the sound system 131.
[0017]
The LFO waveform generated by the LFO 122 is input to the address generator 123, the DCF 125, the EG adder 126, and the mixer & DSP 127. The LFO waveform input to the address generator 123 serves as a pitch modulation waveform for frequency modulating the address. The LFO waveform input to the DCF 125 serves as a timbre modulation waveform that changes the timbre. The LFO waveform input to the EG applying unit 126 plays a role of an amplitude modulation waveform when applying an envelope. The LFO waveform input to the mixer & DSP 127 is used for pan changes or various effect processing such as reverb or chorus.
[0018]
FIG. 2 shows an example of an LFO waveform generated in the LFO 122. The five-line notation and notes indicate the musical tone of the automatic performance. A waveform 201 below is an example of an LFO waveform generated in synchronization with the tempo of this automatic performance. For example, the pan pot (sound image position) is localized to the left at the start position of one measure (the stereo L volume level is maximum and the R volume level is 0), and the pan pot is gradually moved within the measure. When it is desired to perform panning by moving from the left side to the right side and panning the pan pot to the right side at the bar end position, this LFO waveform 201 is supplied to the panning circuit of the mixer & DSP 127. The LFO waveform 201 plays a role of a waveform that defines the position where the pan pot is localized, and is assumed to be localized to the left at the lowest level of the LFO waveform 20 and to the right at the highest level. When such panning is performed, if the tempo of automatic performance and the LFO waveform are not synchronized, desired panning cannot be performed at each measure. In this embodiment, since an LFO waveform synchronized with the tempo of automatic performance is generated, panning synchronized with the tempo of automatic performance can be performed at each measure.
[0019]
In order to generate the LFO waveform 201 synchronized with the tempo of the automatic performance, a tempo synchronization trigger based on the F8 signal that is a tempo clock is supplied from the CPU 101 side to the LFO 122. That is, the CPU 101 supplies a tempo synchronization trigger to the sound source 120 at the timing of the F8 signal as will be described later. When the LFO 122 receives a tempo synchronization trigger based on the F8 signal, the LFO 122 performs a process of correcting a synchronization deviation with respect to the tempo, such as changing to the next target value of the counter, and thereby an LFO waveform synchronized with the tempo of the F8 signal as much as possible Process to output. This process will be described later.
[0020]
FIG. 3 shows a detailed configuration of the LFO 122 of FIG. The LFO 122 includes a trigger counter 301, a common counter 302, a low frequency oscillation unit 303 for each channel, and a low frequency oscillation unit 305 for DSP. One trigger counter 301 and one common counter 302 are provided in the LFO 122. Each channel low-frequency oscillator 303 is provided for each sound generation channel. Here, 128 low-frequency oscillators 303 for 128 channels are provided. A plurality of low frequency oscillators 305 for DSP are provided to generate a plurality of modulation waveforms used in the mixer & DSP 127. Here, DSP low frequency oscillators 305 for 64 channels are provided.
[0021]
Each sound channel low-frequency oscillation unit 303 includes an N-times processing unit 331, a reset control unit 332, an offset addition unit 333, a shape transformation unit 334, a linear interpolation unit 335, phase inversion units 336, 338, and 340, and a depth control unit 337. , 339, 341, and an asynchronous counter 342. Each DSP low-frequency oscillation unit 305 includes an N-times processing unit 351, a reset control unit 352, an offset addition unit 353, a shape transformation unit 354, a primary LPF 355, and an asynchronous counter 356.
[0022]
The trigger counter 301 and the common counter 302 are counters each composed of an integer part 17 bits and a decimal part 10 bits for generating a basic sawtooth wave (referred to as a base waveform) from which an LFO waveform to be output is generated. is there. A desired LFO waveform is obtained by processing the generated base waveform by the low-frequency oscillation unit 303 for each channel or the low-frequency oscillation unit 305 for the DSP.
[0023]
The trigger counter 301 is a counter that adds the trigger counter up value to the current value each time a tempo synchronization trigger is supplied from the CPU 101 and outputs the value after the addition as a new current value. The current value of the trigger counter 301 becomes the target value of the common counter 302. The tempo synchronization trigger is a trigger supplied from the CPU 101 to the sound source 120 at the timing of the F8 signal, and is a trigger action described later. The trigger counter up value is calculated and set by the CPU 101.
[0024]
The common counter 302 is a counter that accumulates a common counter interpolation rate for each sampling period. The CPU 101 calculates and sets the common counter interpolation rate. If the accumulated value of the common counter 302 reaches the value of the trigger counter 301 before the next tempo synchronization trigger comes, the accumulation for every sampling period of the common counter 302 is stopped there. When the next tempo synchronization trigger comes, if the accumulated value of the common counter 302 has not yet reached the value of the trigger counter 301, the accumulated value of the common counter 302 has been set as the target value until then. Force the value to. The output of the common counter 302 becomes a base waveform (sawtooth wave) 201 as shown in FIG.
[0025]
The base waveform (integer part 17 bits + decimal part 10 bits) from the common counter 302 is input to the N-times processor 331 of the low-frequency oscillator 303 of each channel. The N-times processing unit 331 multiplies the output waveform of the common counter 302 by N (however, the number of bits in the integer part is not increased). The fractional part of the multiplication result is rounded down to generate a sawtooth wave having a period of 1 / N of the period of the base waveform and consisting of only 17 bits of the integer part. The multiplier N is set by the CPU 101 independently for each tone generation channel.
[0026]
The output of the N-times processing unit 331 is input to the reset control unit 332. Note that the waveform data of each block after the reset control unit 332 is composed of only 17 bits of the integer part. When the key-on reset flag that instructs to set the LFO waveform to the initial phase at the same time as the key-on is set to “valid”, the reset control unit 332 outputs N times the current sound output channel when the note-on is performed. Is controlled to be “0”. Specifically, an N-fold output value when each sound channel is note-on is taken into a register, and the value of the register is subtracted from the subsequent N-fold output value (however, the number of bits in the integer portion is Do not increase). Thereby, the output of the reset control part 332 becomes a waveform forcibly starting from zero. If the key-on reset flag is set to “invalid”, the “loading of the N times output value to the register” is not performed. That is, the value fetched in the register at the time of note-on is not changed, and the process of subtracting the value of the register from the N-fold output value and outputting is continued.
[0027]
The output of the reset control unit 332 is input to the offset adding unit 333. The offset adding unit 333 adds an offset value set for each tone generation channel to the input waveform (however, the number of bits in the integer part is not increased). This offset value is the initial phase when the key-on reset flag is reset with “valid”. The CPU 101 sets this offset value. The reset control unit 332 and the offset addition unit 333 can generate an LFO waveform starting from an arbitrary initial phase.
[0028]
The output of the offset adding unit 333 is input to the shape deforming unit 334. The shape deforming unit 334 converts the input sawtooth wave into a waveform having various shapes such as a triangular wave, a rectangular wave, and a sine wave according to the shape selection information, and outputs the waveform. Here, the sawtooth wave serves as phase data for generating waveforms of various shapes. Therefore, in this conversion, only the shape is converted with the same period, or a sawtooth wave can be output as it is. The shape selection information is set by the CPU 101 for each sound generation channel.
[0029]
The output of the shape deforming unit 334 is input to the linear interpolation unit 335. The linear interpolation unit 335 performs control so that the slope (change) of the input waveform is equal to or less than the set waveform interpolation rate. The CPU 101 sets the waveform interpolation rate for each sound generation channel. The interpolation by the linear interpolation unit 335 is for smoothing a waveform for the purpose of noise removal.
[0030]
The output of the linear interpolation unit 335 is input to the phase inversion units 336, 338, and 340, respectively. The phase inversion units 336, 338, and 340 can select phase inversion (normal phase / reverse phase) for each output destination (address generation unit 123, DCF 125, EG adding unit 126) of each sound generation channel. For example, the pitch and amplitude can be modulated in the same phase or in opposite phases. In addition, the amplitude modulation of sounds generated by a plurality of sound generation channels can be in phase (through) or in reverse phase (all bit inversion). The CPU 101 sets whether to invert the phase.
[0031]
The outputs of the phase inversion units 336, 338, and 340 are input to the depth control units 337, 339, and 341, respectively. In the depth control units 337, 339, and 341, the modulation depth can be set for each output destination (address generation unit 123, DCF 125, EG adding unit 126) of each sound generation channel. The CPU 101 sets the modulation depth. The outputs of the depth control units 337, 339, and 341 are respectively input to the address generation unit 123 as a pitch modulation waveform, to the DCF 125 as a tone color modulation waveform, and to the EG provision unit 126 as an amplitude modulation waveform.
[0032]
The low frequency oscillating unit 303 of each sound generation channel can be operated as a tempo synchronization LFO or can be operated as a tempo asynchronous LFO according to the setting for each sound generation channel. The designation is performed by the CPU 101. The asynchronous counter 342 is a counter used to generate a modulation waveform having a frequency corresponding to set frequency data when operating as a tempo asynchronous LFO. In the LFO 303 set to operate as a tempo asynchronous LFO, the unit of the period of the generated LFO waveform is specified by a period time or a frequency. This cycle time or frequency is designated by the CPU 101. Asynchronous counter 342 generates a modulation waveform having a frequency corresponding to a specified cycle time or frequency.
[0033]
Note that when the low-frequency oscillation unit 303 of a certain tone generation channel is operated as a tempo asynchronous LFO, the N-times processing unit 331 and the reset control unit 332 for that channel are not necessary. Therefore, the register of the reset control unit 332 is also used as a register that holds the current value of the asynchronous counter 342. The register that holds the multiplier N of the N-times processing unit 331 is also used as a register that holds “cycle time or frequency” designated by the CPU 101.
[0034]
The internal configuration of each DSP low-frequency oscillator 305 is the same as the low-frequency oscillator 303 of each tone generation channel described above. The N-fold processing unit 351 is the N-fold processing unit 331, the reset control unit 352 is the reset control unit 332, the offset adding unit 353 is the offset adding unit 333, the shape deforming unit 354 is the shape deforming unit 334, and the asynchronous counter 356 is These correspond to the asynchronous counters 342, respectively. However, a linear LPF 355 for smoothing is provided instead of the portion after the linear interpolation unit 335. The amplitude level of the LFO waveform generated by the low-frequency oscillator 305 is controlled by a multiplier in an algorithm realized by a microprogram in the DSP. With this configuration, a plurality of LFO waveforms that are assigned to each effect process in the mixer & DSP 127 are generated.
[0035]
As described above, the DSP is provided with a plurality of EGs together with a plurality of LFOs assigned to each effect. The plurality of LFOs and the plurality of EGs are assigned to each effect in the number required for each effect executed by the DSP, so that each one can be individually triggered. Yes. For example, in the case of a chorus effect using three LFOs, the three LFOs need to be operated with phases shifted from each other by 120 degrees. This can be realized by setting initial phases different by 120 degrees in the offset adding unit 353 for the LFOs for 3 LFO channels and simultaneously resetting them. If a trigger is used, it is also possible to execute waveform generation processing (similar to the waveform generation unit) instead of the effect by the DSP.
[0036]
Next, registers and flags related to tempo synchronization LFO will be described. Since the trigger counter 301 and the common counter 302 have been described with reference to FIG. 3, the other registers and flags (sound source control register 121) will be described in the following (1) to (14).
[0037]
(1) Trigger counter up value register: This register holds a value to be added to the trigger counter 301 for each F8 signal (tempo synchronization trigger). The value written here determines how many triggers make one cycle. Here, the trigger counter 301 is a register that can count up to 2 to the 17th power −1 = 131071 with its integer part 17 bits, and about 2 to the 17th power to about 131072 with the decimal part included, so this maximum value is the base. The trigger counter up value is obtained by dividing by the number of F8 signals in one period of the waveform. The CPU 101 sends the calculated value to the sound source 120 and stores it in the trigger counter up value register. When the trigger counter up value is not divisible, the quotient is rounded up. By rounding up, the trigger counter 301 always overflows with the last F8 signal in one cycle of the base waveform. The overflow overflowed at this point is discarded, and the trigger counter 301 is initialized to zero. Therefore, an error when it cannot be divided is not accumulated.
[0038]
A calculation example of the trigger counter up value by the CPU 101 will be described. The CPU 101 determines the period of the base waveform according to the LFO waveform to be output. For example, assume that the tempo is 120 quarter-note tempo per minute, 96 F8 signals are generated in one bar, and the base waveform cycle is one bar (four quadrants). Think about the case. In this case, since the number of F8 signals in one measure is 96, a trigger counter up value to be added to the trigger counter 301 for each F8 signal can be calculated from here. That is, since the maximum value of the trigger counter 301 is 2 17 = 131072, it is set to 131072 / 96≈1365.3333, and this value is rounded up to obtain the trigger counter up value. For example, if the trigger counter up value is 4 bits for the exponent part and 12 bits for the mantissa part, the rounded up value is 1365.5. Actually, since the trigger counter 301 and the trigger counter up value register store values in a floating-point binary number, rounding up is also rounded up in binary number. Thus, the trigger counter up value is calculated by the equation of RU (maximum value / number of F8 signals) based on the number of F8 signals in one cycle of the base waveform. Here, RU () indicates rounding up.
[0039]
(2) Common counter interpolation rate register: The common counter 302 is an interpolator that linearly interpolates using the value of the trigger counter 301 as a target value for each DAC cycle. It is the common counter interpolation rate that specifies the interpolation speed for this interpolator. The common counter interpolation rate register is a register that holds the common counter interpolation rate. The common counter interpolation rate must be specified in consideration of the step width (number of divisions) determined by the trigger counter up value and how much time, that is, how much tempo is used for interpolation. is there.
[0040]
An example in which the CPU 101 calculates the common counter interpolation rate in the case of the trigger counter up value calculation example (1) above will be described. First, in the above case, one quarter note has a time length of 60 sec / 120≈0.5 sec. Since one quarter note is a time interval for 24 F8 signals, the time interval for one F8 signal (the time interval from the F8 signal to the next F8 signal) is 0.5 sec / 24≈0.0208 sec. . Since we want to set the period of the base waveform to one measure (time interval for 96 F8 signals), 0.0208 sec × 96≈2 sec is the period of the base waveform. Assuming that the sampling frequency in the sound source is 44100 Hz, the period is 22 μsec. Therefore, the accumulation to the common counter 302 is performed 2 sec / 22 μsec≈88200 times within one period of the base waveform. Since the maximum value of the common counter 302 is 2 17 = 131072, 131072 / 88200≈1.4861, and if the common counter interpolation rate is composed of 4 bits for the exponent part and 12 bits for the mantissa part, it is rounded up in binary. About 1.4863 is the value. In this way, the common counter rate is calculated by the formula of RU (maximum value / number of samples) based on the number of samples in one period of the base waveform.
[0041]
(3) Trigger action flag: The trigger action is a trigger (tempo synchronization trigger) that gives an event for tempo synchronization from the CPU 101. When 1 is written to the trigger action flag from the CPU 101, the tempo synchronization trigger is supplied to the LFO 122. By this trigger, the trigger counter up value is added to the trigger counter 301, and the value becomes a new target value, and interpolation by the common counter 302 starts toward the target value.
[0042]
(4) Trigger counter reset flag: This is a flag for resetting the trigger counter 301 added by the tempo synchronization trigger. Used for initialization such as tempo synchronization. When 1 is written, the reset state is entered at that timing, and it is not necessary to write 0.
[0043]
(5) Common counter reset flag: A flag for resetting the common counter 302 which is a linear interpolator. Used for initialization such as tempo synchronization. When 1 is written, the reset state is entered at that timing, and immediately thereafter, the common counter 302 starts counting up at the set common counter interpolation rate. There is no need to write 0.
[0044]
(6) Free-run mode flag: Normally, the common counter 302 operates with the value of the trigger counter 301 as a target value. When this free-run mode flag is set to 1, the common counter 302 ignores the target value. Always continue to interpolate at a given rate. As a result, even if there is no tempo synchronization event, the common counter 302 operates at almost the same speed as in tempo synchronization. On the other hand, when the common counter 302 performs a normal tempo synchronization operation, the free-run mode flag is set to zero. When the free run mode flag is set to 0, the interpolation processing by the common counter 302 is stopped, and the value at the time of the stop is continuously output.
[0045]
(7) Channel-by-channel tempo synchronization flag: Whether to operate at a channel-independent frequency setting for each low-frequency oscillation unit 303 (conventional type) or whether to operate in synchronization with the tempo-synchronized common counter 302 It is a flag to switch. Setting this flag to 1 synchronizes with the common counter 302 (that is, using the waveform generated by the flow of the N-times processing unit 331 → reset control unit 332 → offset adding unit 333 in FIG. 3), and setting it to 0 makes the channel Independent frequency setting LFO (that is, the waveform generated by the flow of the asynchronous counter 342 → offset adding unit 333 is used in FIG. 3).
[0046]
(8) N-by-channel setting register: A register for setting a multiplier N value of the N-times processing unit 331 for each channel when used as a tempo synchronization LFO. This register is shared with the frequency register for each channel when used as a tempo asynchronous LFO.
[0047]
(9) Key-on reset flag: A flag that determines whether or not to set the LFO waveform to the initial phase simultaneously with key-on (synonymous with note-on). When it is 0, it is “invalid”, that is, it is not reset by key-on. When it is 1, “valid”, that is, reset by key-on.
[0048]
(10) Offset value register: This register holds an offset value to be added to the LFO waveform by the offset adding unit 353.
[0049]
(11) Waveform selection register: a register that holds the shape selection information of the waveform shape converted and output by the shape deforming unit 334. The waveforms that can be selected will be described in detail later.
[0050]
(12) Waveform interpolation rate register: A register for holding an interpolation rate when the linear interpolation unit 335 performs interpolation.
[0051]
(13) Phase inversion designation register: A register that holds selection information for selecting phase inversion (normal phase / reverse phase) in the phase inversion units 336, 338, and 340.
[0052]
(14) Depth designation register: a register for setting the depth of modulation in the depth control units 337, 339, and 341.
[0053]
Of the above registers and flags, (1) to (6) are provided one by one in the system. (7) to (14) are provided for each channel (a channel is a sound generation channel in the low frequency oscillation unit 303 of each sound generation channel, and each LFO channel in each low frequency oscillation unit 305 for DSP). is there. However, each low frequency oscillation unit 305 for DSP does not have the registers (12) to (14).
[0054]
  FIG. 4 shows how the trigger counter 301 and the common counter 302 count up. FIG. 4A shows a case where the F8 signal (tempo synchronization trigger) is supplied at regular intervals. Here, the CPU 101 triggers the LFO 122 of the sound source 120 in response to the generation of the F8 signal.TheTherefore, the timing at which the F8 signal is generated is equivalent to the timing of the trigger action. Although it is recognized as the timing of the trigger action in the sound source 120, in FIG. 4, the timing is indicated by an F8 signal for simplification of explanation. Here, for the sake of simplicity of explanation, the number of occurrences of the F8 signal per period of the base waveform is set to four, but the number of occurrences of the normal F8 signal is considerably larger than this.
[0055]
A graph 401 that changes stepwise at the timing at which the F8 signal is supplied indicates the value of the trigger counter 301. The value of the trigger counter 301 becomes the trigger counter up value at the timing of the first F8 signal in one cycle of the base waveform, and thereafter, the trigger count up value is added to the value every time the F8 signal comes. The common counter 302 is finely interpolated using the value of the trigger counter 301 as a target value and counted up. Reference numeral 402 denotes the value of the common counter 302 that is ideally counted up toward the target value. If the accumulated value of the common counter 302 has not yet reached the target value of the trigger counter 301 at the timing of the next F8 signal, the accumulated value of the common counter 302 is set to the value of the trigger counter 301 that is the target value. Shows the graph forcibly set. 404, the accumulated value of the common counter 302 reaches the target value of the trigger counter 301 before reaching the timing of the next F8 signal, from which the accumulation of the common counter 302 is stopped and the target value is output. The graph which continues doing is shown.
[0056]
Reference numeral 410 denotes a level of 2 17 = 131072, which is the maximum value of the counter. The trigger counter 301 overflows at the timing of the last F8 signal (fourth in this figure) in one cycle of the base waveform, and in response to the overflow, the internal value of the trigger counter 301 is reset to 0, while the common counter In contrast, the maximum value (about 131072) is output. In the example of this figure, the calculation of the trigger counter up value is divisible (131072/4 = 32768), but even in that case, the addition result is 17 in the integer part by the addition according to the last F8 signal. Overflow occurs beyond the bit. After the value of the common counter 302 reaches the maximum value 131072, the maximum value is continuously output.
[0057]
FIG. 4B shows a case where the F8 signal is irregular. Since the tempo of automatic performance can be arbitrarily changed, the F8 signal may be generated irregularly. Even when the F8 signal is irregular, the count-up operation is the same, so the same numbers as in FIG. In FIG. 4B, the trigger counter 301 is reset to 0 at the timing of the F8 signal 411, from which the common counter 302 continues to accumulate the common counter interpolation rate, but the value of the common counter 302 is the maximum value. The next F8 signal 412 arrives before the counter reaches, and the common counter 302 is reset to zero.
[0058]
FIG. 5 shows various examples of count-up using the trigger counter 301 and the common counter 302. As described above, the CPU 101 determines the period of the base waveform, obtains the number of F8 signals within the period, calculates the amount added to the trigger counter 301 for each F8 signal, and calculates the common counter interpolation rate. In this case, it is necessary to send F8 signals from the CPU 101 side to the LFO 122 at equal intervals. FIG. 5A shows an example in which the F8 signal is sent at a timing obtained by finely dividing one period of the base waveform. A plurality of horizontal lines 501 indicate each level at which the trigger counter 301 is counted up stepwise. The F8 signal is supplied to the LFO 122 at equal intervals as indicated by 502, and the counter 301 is counted up stepwise at the timing of each F8 signal. Reference numeral 503 denotes a graph of the common counter 302. As described above, when the F8 signal is transmitted at a fine cycle, it is possible to precisely follow various tempo changes occurring in the middle of one cycle of the base waveform.
[0059]
FIG. 5B shows an example of thinning out the F8 signal. If it is known that the tempo does not fluctuate much during each period of the base waveform, the intermediate F8 signal can be thinned out in this way. The CPU 101 determines the period of the base waveform and determines how many F8 signals are to be included in the period. At this time, some F8 signals are thinned out from the original number of F8 signals. Based on the F8 signal remaining after the thinning, a trigger counter up value that is an addition amount for each F8 signal is calculated. In this case, since the F8 signal is generated only once per period of the base waveform, the trigger counter up value is set to a special maximum value that causes an overflow in the first addition. Further, only the F8 signal is thinned out from the example of FIG. 5A, and the slope of the base waveform is the same, so the common counter interpolation rate may be the same value as in FIG. In this example, the CPU 101 only needs to give a trigger action to the LFO 122 once every period of the base waveform, and the load on the CPU 101 is small.
[0060]
FIG. 5C shows an example in which the common counter interpolation rate is changed during one cycle of the base waveform. The CPU 101 determines the period of the base waveform and determines how many F8 signals are to be included in the period. Then, a trigger counter up value that is an addition amount for each F8 signal is calculated. In the example of this figure, the addition amount is obtained by dividing into three equal parts. On the other hand, the common counter interpolation rate is the quotient obtained by dividing twice the trigger counter up value by the number of samples from timings 521 to 522 in the first half of one cycle of the base waveform, and the trigger counter up value from timings 522 to 523 in the second half. Calculated as the quotient divided by the number of samples. As shown in the figure, the CPU 101 gives trigger actions at unequal intervals in each period of the base waveform. In addition, the CPU 101 gives the first half common counter interpolation rate at the timings 521 and 523 at the beginning of one cycle of the base waveform, and gives the second half common counter interpolation rate at the middle 522 timing.
[0061]
FIG. 5D is an example in which the F8 signal is thinned out instead of changing the trigger counter up value in the middle of one cycle of the base waveform in FIG. 5C. In this case as well, since the slope of the base waveform is the same as in FIG. 5C, the common counter interpolation rate may be the same as in FIG. On the other hand, the trigger counter up value is calculated with the first half of one period of the base waveform being 2/3 of the maximum value and the second half being 1/3. The CPU 101 gives the base counter up value in the first half at the timings 531 and 533 at the beginning of one cycle of the base waveform, and gives the base counter up value in the second half at the middle 522 timing. Further, the first half common counter interpolation rate is given at the timings 534 and 536 at the beginning of one cycle of the base waveform, and the second half common counter interpolation rate is given at the middle 535 timing. As described above, when generating a base waveform for changing the common counter interpolation rate in the middle of one cycle, the CPU 101 only controls the trigger action, the base counter up value, and the common counter interpolation rate for the timing of the change. Good.
[0062]
  FIG. 6 shows a processing method when the F8 signal is interrupted. At the end of a song, the F8 signal that is a tempo counter may be interrupted. In this case, either of the processing methods shown in FIGS. 6A and 6B can be adopted according to the above-described free-run mode flag. FIG. 6A shows a case where the free-run mode flag is left as 0 even after the F8 signal is interrupted. In this case, as the value of the trigger counter 301 does not increase at the timing when the F8 signal stops,CommonThe counter value does not change from the same value. FIG. 6B shows a case where the free run mode flag is set to 1 when the CPU 101 detects that F8 has stopped. In this case, the common counter 302 always performs interpolation at a given common counter interpolation rate ignoring the target value. As a result, the LFO waveform can be continuously applied to a musical sound that is output after the music is finished.
[0063]
FIG. 7 shows an example of processing performed by the N-times processing units 331 and 351 described above. Reference numeral 701 denotes a base waveform input from the common counter 302 to the N-times processing units 331 and 351. If the multiplier N in the N-times processing units 331 and 351 is 9, the output of the N-times processing units 331 and 351 will be a waveform 702. The frequency of this waveform 703 is nine times the frequency of the base waveform 701.
[0064]
FIG. 8 shows a list of multipliers N of the N-times processing units 331 and 351 described above. “Quarter note reference number” in the top row of the table indicates how many quarter notes are included in one period of the base waveform. Since one quarter is made up of four quarter notes, the length of one period of the base waveform can be expressed by the number of bars as shown in “bar” in the lower row. Since there are 24 F8 signals in one quarter note, the number of F8 signals within one period of the base waveform in each case is obtained. The “F8 signal number” row indicates the value.
[0065]
The descriptions such as “4 minutes × 32 (8 bars)” and “4 minutes × 16 (4 bars)” on the left side indicate the period of the LFO waveform to be generated in each sound generation channel or each LFO channel. For example, if there are three “quarter note reference numbers”, one period of the base waveform is three quarter notes, and you want to generate a waveform with a period of “all three notes” for this base waveform. It can be seen that N = 1.125 may be set. Similarly, based on this list, the multiplier N can be obtained from the period of the base waveform and the period of the waveform to be generated. Note that even if it is not described in FIG. 8, the multiplier N can be obtained from the period of the base waveform having an arbitrary length and the period of the waveform to be generated having an arbitrary length.
[0066]
FIG. 9 shows examples of waveform shapes that can be selected for each channel by the shape deforming units 334 and 354. The shape deforming units 334 and 354 can generate and output a triangular wave 901, a rectangular wave 902, a sawtooth wave 903, a sine wave 904, a random wave 905, and the like based on the input base waveform. The waveforms listed here are merely examples, and other arbitrary waveforms may be selected.
[0067]
FIG. 10 shows an example of linear interpolation by the linear interpolation unit 335. The linear interpolation unit 335 performs interpolation for limiting the slope of the input waveform to be equal to or lower than a set interpolation rate. The CPU 101 determines the interpolation rate in accordance with the waveform shape selected in the sound generation channel or LFO channel of the LFO 122 and the set N times value, and supplies the linear interpolation unit 335 with the interpolation rate. For example, when the input waveform is a sawtooth waveform as indicated by 1001, a waveform such as the waveform 1002 is output when the interpolation rate value is decreased. By this interpolation, it is possible to prevent noise from occurring at a portion where the LFO waveform changes rapidly.
[0068]
Next, a processing procedure executed by the CPU 101 will be described with reference to a flowchart.
[0069]
FIG. 11 shows a flow of main processing executed by the CPU 101. In step 1101, initialization is performed, and in step 1102, the occurrence of an activation factor (event) is checked. If there is any activation factor in step 1103, the process proceeds to step 1104. If there is no activation factor, the process returns to step 1102 to continue the activation factor check. In step 1104, what factor is determined, and the process branches to one of steps 1105 to 1109 depending on the factor. If there is a panel operation event, the process proceeds to step 1105 to perform panel processing and then returns to step 1102. If there is a MIDI event, the process proceeds to step 1106, performs MIDI event processing, and then returns to step 1102. If there is a tempo interruption event, the process proceeds to step 1107 to perform automatic performance tempo interruption processing, and then returns to step 1102. If it is another event, the process proceeds to step 1108, performs processing according to the event, and then returns to step 1102. If the event is a power switch off event, an end process is performed in step 1109 and then the process ends.
[0070]
FIG. 12 shows the operation when the F8 signal from another MIDI device is received via the MIDI interface 107 in the MIDI event processing in step 1106. This is a case where the electronic musical instrument operates as a slave. That is, this electronic musical instrument performs an automatic performance based on automatic performance data output from another MIDI device, and the F8 signal as a tempo clock is supplied to the electronic musical instrument from the other MIDI device.
[0071]
In step 1201, the current tempo value is estimated based on the time interval of the past F8 signal and stored in the variable GT. In step 1202, a common counter interpolation rate is calculated based on the current tempo value GT and supplied to the LFO 122 of the sound source 120. The method for calculating the common counter interpolation rate has already been described. In step 1203, a tempo synchronization trigger is supplied to the LFO 122 of the sound source 120. This is done by writing 1 to the trigger action flag.
[0072]
FIG. 13 shows the operation when the note-on of automatic performance is received from the MIDI interface 107 in the MIDI event processing in step 1106. In step 1301, the received note-on part number is stored in the variable PT, the note number is stored in the variable NN, and the velocity is stored in the variable VEL. In step 1302, sound channel assignment processing is performed. In step 1303, various parameters are set in the channel assigned to the tone generator register 121 in accordance with the current tone color selected in the part PT, the note-on note number, and the velocity. That is, waveform selection information, F number, various EG parameters, LFO parameters, various send levels, etc. are set. Here, the LFO parameters include a tempo synchronization flag, a multiple N or frequency, an interpolation rate, a pitch modulation degree PMD, a tone color modulation degree CMD, an amplitude modulation degree AMD, and the like. When a timbre set to synchronize the tempo of the LFO waveform is selected in the part PT, a tempo synchronization flag is set. In step 1304, a note-on signal (sound generation start trigger) is supplied to the channel. In the sound generation channel to which the note-on signal is supplied, the tone signal forming process corresponding to the set parameter is started. That is, reading of waveform data from the waveform memory by the address generation unit 123 and the interpolation unit 124 is started, a timbre change is given to the read waveform data by the DCF 125, and further, the EG adding unit 126 stands up from the rising edge. Volume change until the drop is given. The LFO waveform generated by the LFO 122 is supplied to the address generating unit 123, the DCF 125, and the EG applying unit 126, and controls various characteristics of the tone waveform generated in the channel.
[0073]
FIG. 14 shows an operation when a variation type is received from the MIDI interface 107 in the MIDI event processing in step 1106. The variation type is information that specifies the type of effect to be added to the musical sound. In step 1401, the received variation type is stored in the variable VT. In step 1402, an MP (microprogram) number, an MP storage area, an LFO, and an EG are allocated. The DSP 127 includes a plurality of microprogram storage areas. By assigning MP numbers to these areas and setting and executing the microprograms, any effect processing can be executed in combination. The assignment of the MP number and MP storage area in step 1402 is to assign a number to the area where the effect microprogram specified by the variation type is loaded. In the LFO allocation, the required number of LFOs for a specified effect is allocated from the low-frequency oscillation units corresponding to a plurality of LFO channels indicated by reference numeral 305 in FIG. In addition, the EG (envelope generator) is allocated from among a plurality of EGs provided in the DSP 127, as many EGs as are necessary for the designated effect.
[0074]
  Next, in step 1403, the assigned MP number effect is muted. In this case, when the effect processing of the MP number is being executed, muting is performed so that noise is not generated by switching micro programs.In step 1404, the DSP 127 is set with a microprogram for performing processing for applying the effect of the designated variation type.Step 1405Then, a tempo synchronization flag, a multiple N (frequency when used asynchronously with tempo), an LPF coefficient, a key-on reset flag, and the like are set for the assigned LFO channel. In step 1406, EG is set, and in step 1407, various coefficients are set. In step 1408, other necessary processing (delay memory processing, etc.) is performed. In step 1409, the mute applied in step 1403 is canceled, a trigger is given to start execution of the microprogram, and the process ends.
[0075]
FIG. 15A shows the procedure of the automatic performance tempo interruption process in step 1107 of FIG. During automatic performance, a timer interrupt is generated at a period corresponding to the current tempo, and this tempo interrupt process is executed at that time. This is a case where the electronic musical instrument operates as a master. That is, this electronic musical instrument reads automatic performance data and performs an automatic performance. The F8 signal is generated by this electronic musical instrument and supplied to another MIDI device. The time interval of tempo interruption may be set so that 24 interruptions per quarter note, which is the same as the F8 signal, or, for example, 96 interruptions per quarter note with a finer resolution. You may set as follows.
[0076]
First, at step 1501, the tempo counter is counted up. The tempo counter is a counter that defines the tempo of automatic performance on the CPU 101 side. Next, in step 1502, a tempo synchronization trigger is supplied to the LFO 122 of the sound source 120. In step 1503, the F8 signal is output to the MIDI output terminal. If the tempo interruption occurs at a finer resolution than the F8 signal, the tempo synchronization trigger may be supplied once in several times in step 1502, and the F8 signal is output once in several times in step 1503. do it. For example, if it is set so that 96 interrupts per quarter note are generated, the F8 signal is output once every 4 interrupts. In step 1504, it is determined whether the event timing of the automatic performance data has been reached. When the event timing is reached, the event is reproduced in step 1505, the duration up to the next event is set in step 1506, and the process ends. If it is not the event timing in step 1504, the processing is terminated as it is.
[0077]
In the event reproduction process in step 1505, for example, if a note-on event, the note-on process is performed. In step 1505, note-on reproduction may be performed. In step 1505, note-on is simply accumulated in the buffer, and note-on may be taken out from the buffer and processed in another processing routine.
[0078]
If the event in step 1505 is a tempo change, the process of FIG. 15B is performed. First, in step 1521, the designated tempo value is stored in the variable TMP. In step 1522, the speed of the tempo timer is changed according to the tempo value TMP. Next, in step 1523, a common counter interpolation rate corresponding to the tempo value TMP is supplied to the LFO 122 of the sound source 120, and the process is terminated.
[0079]
In the above embodiment, the tempo clock is not necessarily a MIDI “F8 signal” (resolution is 1/24 of one beat). The resolution may be, for example, 1/2 of a beat, 1/96, or the like. The value of the common counter interpolation rate to be added to the common counter 302 may be automatically determined based on the time interval immediately before the tempo clock. In the above embodiment, the common counter performs the interpolation operation (accumulation) for each sampling period. However, it may not be performed for each sampling period. For example, the interpolation calculation may be performed once every two sampling periods or once every eight sampling periods. Further, the tempo estimation based on the reception interval of the “F8 signal” may not be performed by the CPU 101 but may be performed by an arithmetic circuit in the sound source 120 to calculate the common counter interpolation rate in the sound source 120. The tempo may be estimated from only the time interval of the two “F8 signals” received immediately before (linearly), or from the multiple time intervals of the three or more “F8 signals” immediately before, by Lagrange interpolation. Etc. (curve) may be used.
[0080]
Note that the F8 signal may be generated by the CPU 101 using the timer 104, or may be generated externally and input from the MIDI interface 107 or the network interface 108.
[0081]
In the present embodiment, the F8 signal is used as a tempo signal, but any type of timing signal that controls other rhythms may be used as a tempo signal for synchronization.
[0082]
In this embodiment, the F8 signal indicating the tempo is used to synchronize with the automatic performance or the automatic accompaniment. However, it is not necessary to limit the present invention to such an F8 signal. This signal may be any signal indicating the timing for performing correction so that the tempo of the automatic performance or automatic accompaniment is synchronized with the bass waveform, and may be a tempo signal of a type other than the F8 signal. It may be a synchronous control signal generated periodically or irregularly in synchronization.
[0083]
The reset control unit 332 is reset to 0 in response to note-on, but may be reset to a predetermined value other than 0.
[0084]
In this embodiment, the base waveform is composed of an integer part of 17 bits and a decimal part of 10 bits, but is not limited to this number of bits, and may be increased or decreased as necessary.
[0085]
Although FIG. 6 shows the case where the F8 signal is interrupted with the end of the automatic performance, there may be a case where the F8 signal is missed due to an error. In that case, the CPU 101 may generate a dummy F8 signal so that the LFO waveform is not interrupted.
[0086]
【The invention's effect】
As described above, according to the present invention, the accumulation means for accumulating a predetermined value for each tempo signal is provided, and the accumulated value is temporally interpolated to generate a modulation waveform from the interpolated value. Even when the LFO and the automatic performance means are provided independently, a modulated waveform synchronized with the tempo of the automatic performance can be generated.
[Brief description of the drawings]
FIG. 1 is a block diagram of an electronic musical instrument to which a modulation waveform generating apparatus according to the present invention is applied.
FIG. 2 is a diagram showing an example of an LFO waveform generated in an LFO
FIG. 3 is a diagram showing a detailed configuration of an LFO
FIG. 4 is a diagram showing a state of count-up by a trigger counter and a common counter
FIG. 5 is a diagram showing various examples of count-up using a trigger counter and a common counter.
FIG. 6 is a diagram showing a processing method when an F8 signal is interrupted.
FIG. 7 is a diagram illustrating an example of processing performed by an N-times processing unit;
FIG. 8 is a diagram showing a list of multipliers N of an N-times processing unit
FIG. 9 is a diagram illustrating examples of waveform shapes that can be selected by the shape deforming unit;
FIG. 10 is a diagram illustrating an example of linear interpolation by a linear interpolation unit;
FIG. 11 is a flowchart of main processing.
FIG. 12 is a flowchart when an F8 signal is received from the MIDI interface 107;
FIG. 13 is a flowchart when an automatic performance note-on is received from the MIDI interface 107;
FIG. 14 is a flowchart when a variation type is received from the MIDI interface 107;
FIG. 15 is a flowchart of tempo interruption processing for automatic performance.
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 101 ... Central processing unit (CPU), 102 ... Read-only memory (ROM), 103 ... Random access memory (RAM), 104 ... Timer, 105 ... Drive apparatus, 107 ... MIDI interface, 108 ... Network interface, 109 ... Panel switch 110 ... Panel display, 120 sound source, 128 ... Waveform memory, 130 ... Digital-to-analog converter (DAC), 131 ... Sound system.

Claims (6)

楽音を生成する音源内で使用する変調波形を発生する変調波形発生装置であって、
自動演奏のテンポに応じた時間間隔で発生されるテンポ信号を受信する受信手段と、
テンポ信号が発生される周期よりも短い周期である所定周期でクロック信号を発生するクロック信号発生手段と、
テンポ信号を受信するごとに、トリガーカウンタアップ値だけ、値をカウントアップするトリガーカウンタであって、その値が最大値に達したときにその値を初期化するものと、
変調波形のベースとなるベース波形の1周期で前記トリガーカウンタの値が最大値となるように、前記トリガーカウンタアップ値を決定するトリガーカウントアップ値決定手段と、
前記クロック信号が発生されるごとに、補間レートだけ、値をカウントアップする共通カウンタであって、共通カウンタの値が最大値に達したときにその値を初期化するものと、
前記トリガーカウンタアップ値よりも小さい値である補間レートを、自動演奏テンポに応じて決定する補間レート決定手段と、
前記トリガーカウンタの値がカウントアップされるごとに、新たなトリガーカウンタの値を、前記共通カウンタにおけるカウントアップの目標値として設定する目標値設定手段と、
前記共通カウンタの値が前記目標値に達したときには、前記目標値が新たな値に設定されるまでの間、前記共通カウンタの値を目標値に一致させておき、前記共通カウンタの値が前記目標値に達する前に、前記目標値が新たな値に設定されたときには、その時点で、前記共通カウンタの値を、新たに設定される前の目標値の値へ変更する、共通カウンタ制御手段と、
前記クロック信号が発生されるごとに、前記共通カウンタの値をベース波形として出力するベース波形出力手段と、
前記ベース波形に基づいて変調波形を発生する変調波形発生手段と
を備えたことを特徴とする変調波形発生装置。
A modulation waveform generator for generating a modulation waveform for use in a sound source that generates musical sounds,
Receiving means for receiving a tempo signal generated at time intervals according to the tempo of automatic performance ;
Clock signal generating means for generating a clock signal at a predetermined cycle which is shorter than a cycle at which the tempo signal is generated;
Each time a tempo signal is received, it is a trigger counter that counts up the value by the trigger counter up value, and initializes the value when the value reaches the maximum value,
Trigger count-up value determining means for determining the trigger counter-up value so that the value of the trigger counter becomes a maximum value in one cycle of the base waveform that is the base of the modulation waveform;
A common counter that counts up the value by the interpolation rate each time the clock signal is generated, and initializes the value when the value of the common counter reaches the maximum value;
Interpolation rate determination means for determining an interpolation rate that is smaller than the trigger counter up value according to the automatic performance tempo,
Target value setting means for setting a new trigger counter value as a count-up target value in the common counter each time the trigger counter value is counted up;
When the value of the common counter reaches the target value, the value of the common counter is matched with the target value until the target value is set to a new value, and the value of the common counter is When the target value is set to a new value before reaching the target value, the common counter control means changes the value of the common counter to the value of the target value before the new value is set at that time. When,
Base waveform output means for outputting the value of the common counter as a base waveform each time the clock signal is generated;
A modulation waveform generating device comprising: modulation waveform generating means for generating a modulation waveform based on the base waveform .
請求項1に記載の変調波形発生装置において、The modulation waveform generator according to claim 1,
前記補間レート決定手段は、前記テンポ信号を受信するごとに、および/または、テンポの変更を指示するテンポチェンジを受信するごとに、前記補間レートを決定することを特徴とする変調波形発生装置。  The modulation waveform generating apparatus according to claim 1, wherein the interpolation rate determining means determines the interpolation rate every time the tempo signal is received and / or every time a tempo change instructing a tempo change is received.
請求項1または2に記載の変調波形発生装置において、The modulation waveform generator according to claim 1 or 2,
前記トリガーカウンタは、ベース波形の1周期内のすべてのテンポ信号の受信タイミングで前記カウントアップを行なう代わりに、ベース波形の1周期内の任意のテンポ信号を間引き、間引いたテンポ信号以外のテンポ信号の受信タイミングで前記カウントアップを行なうものとし、そのときにカウントアップするトリガーカウンタアップ値は前記間引いたテンポ信号の受信タイミングでカウントアップすべきであった値に基づいて変更するものであることを特徴とする変調波形発生装置。  The trigger counter thins out an arbitrary tempo signal within one period of the base waveform and performs a tempo signal other than the thinned out tempo signal instead of counting up at the reception timing of all tempo signals within one period of the base waveform. The trigger count up value to be counted up at that time is changed based on the value that should have been counted up at the reception timing of the thinned tempo signal. A characteristic modulation waveform generator.
請求項1から3の何れか1つに記載の変調波形発生装置において、In the modulation waveform generator according to any one of claims 1 to 3,
前記クロック信号は、楽音生成処理を行なう際の基準タイミング信号であるサンプリングクロック、またはN個(Nは自然数)のサンプリングクロックごとに1回取り出したクロック信号であることを特徴とする変調波形発生装置。  The modulation waveform generator according to claim 1, wherein the clock signal is a sampling clock that is a reference timing signal when performing musical tone generation processing, or a clock signal extracted once for every N sampling clocks (N is a natural number). .
請求項1から4の何れか1つに記載の変調波形発生装置において、
前記変調波形発生手段では、生成した変調波形の平滑化を行ない、平滑化後の変調波形を発生することを特徴とする変調波形発生装置。
In the modulation waveform generator according to any one of claims 1 to 4 ,
Wherein the modulation waveform generation means performs smoothing of the generated modulation waveform, the modulation waveform generator, characterized in that for generating a modulation waveform after smoothing.
音源で使用する変調波形を発生する変調波形発生部を備えた自動演奏装置であって、
自動演奏のテンポに応じた時間間隔でテンポ信号を発生するテンポ発生手段と、
テンポ信号に応じて、テンポ変更イベントを含む曲データの自動演奏を行なう自動演奏手段と、
テンポ信号が発生される周期よりも短い周期である所定周期でクロック信号を発生するクロック信号発生手段と、
テンポ信号を受信するごとに、トリガーカウンタアップ値だけ、値をカウントアップするトリガーカウンタであって、その値が最大値に達したときにその値を初期化するものと、
変調波形のベースとなるベース波形の1周期で前記トリガーカウンタの値が最大値となるように、前記トリガーカウンタアップ値を決定するトリガーカウントアップ値決定手段と、
前記クロック信号が発生されるごとに、補間レートだけ、値をカウントアップする共通カウンタであって、共通カウンタの値が最大値に達したときにその値を初期化するものと、
前記トリガーカウンタアップ値よりも小さい値である補間レートを、自動演奏テンポに応じて決定する補間レート決定手段と、
前記トリガーカウンタの値がカウントアップされるごとに、新たなトリガーカウンタの値を、前記共通カウンタにおけるカウントアップの目標値として設定する目標値設定手段と、
前記共通カウンタの値が前記目標値に達したときには、前記目標値が新たな値に設定されるまでの間、前記共通カウンタの値を目標値に一致させておき、前記共通カウンタの値が前記目標値に達する前に、前記目標値が新たな値に設定されたときには、その時点で、前記共通カウンタの値を、新たに設定される前の目標値の値へ変更する、共通カウンタ制御手段と、
前記クロック信号が発生されるごとに、前記共通カウンタの値をベース波形として出力するベース波形出力手段と、
前記ベース波形に基づいて変調波形を発生する変調波形発生手段と
を備えたことを特徴とする自動演奏装置。
An automatic performance device having a modulation waveform generator for generating a modulation waveform used by a sound source,
Tempo generating means for generating a tempo signal at time intervals according to the tempo of automatic performance ;
Automatic performance means for automatically performing song data including a tempo change event according to a tempo signal;
Clock signal generating means for generating a clock signal at a predetermined cycle which is shorter than a cycle at which the tempo signal is generated;
Each time a tempo signal is received, it is a trigger counter that counts up the value by the trigger counter up value, and initializes the value when the value reaches the maximum value,
Trigger count-up value determining means for determining the trigger counter-up value so that the value of the trigger counter becomes a maximum value in one cycle of the base waveform that is the base of the modulation waveform;
A common counter that counts up the value by the interpolation rate each time the clock signal is generated, and initializes the value when the value of the common counter reaches the maximum value;
Interpolation rate determination means for determining an interpolation rate that is smaller than the trigger counter up value according to the automatic performance tempo,
Target value setting means for setting a new trigger counter value as a count-up target value in the common counter each time the trigger counter value is counted up;
When the value of the common counter reaches the target value, the value of the common counter is matched with the target value until the target value is set to a new value, and the value of the common counter is When the target value is set to a new value before reaching the target value, the common counter control means changes the value of the common counter to the value of the target value before the new value is set at that time. When,
Base waveform output means for outputting the value of the common counter as a base waveform each time the clock signal is generated;
An automatic performance apparatus comprising: a modulation waveform generating means for generating a modulation waveform based on the base waveform .
JP2002079793A 2002-03-20 2002-03-20 Modulation waveform generator Expired - Fee Related JP3871119B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002079793A JP3871119B2 (en) 2002-03-20 2002-03-20 Modulation waveform generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002079793A JP3871119B2 (en) 2002-03-20 2002-03-20 Modulation waveform generator

Publications (2)

Publication Number Publication Date
JP2003280649A JP2003280649A (en) 2003-10-02
JP3871119B2 true JP3871119B2 (en) 2007-01-24

Family

ID=29229086

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002079793A Expired - Fee Related JP3871119B2 (en) 2002-03-20 2002-03-20 Modulation waveform generator

Country Status (1)

Country Link
JP (1) JP3871119B2 (en)

Also Published As

Publication number Publication date
JP2003280649A (en) 2003-10-02

Similar Documents

Publication Publication Date Title
KR100319481B1 (en) Method and device for forming a tone waveform by combined use of different waveform sample forming resolutions
US6509519B2 (en) Method and apparatus for generating musical tone waveforms by user input of sample waveform frequency
JPS6353560B2 (en)
US9711119B2 (en) Audio processing device, method of audio processing, storage medium, and electronic musical instrument
JP6252642B1 (en) Effect imparting device, effect imparting method, program, and electronic musical instrument
JP3008922B2 (en) Music sound generating apparatus and music sound generating method
JP3844214B2 (en) Modulation waveform generator
JP3871119B2 (en) Modulation waveform generator
JPH10307586A (en) Musical sound generator and method
JP4179243B2 (en) Waveform generator and program
JPH09179561A (en) Musical tone generating method
JP2018055120A (en) Effect imparting device, effect imparting method, program, and electronic musical instrument
JP3095018B2 (en) Music generator
JP2833485B2 (en) Tone generator
JP4152540B2 (en) Electronic musical instrument sound control device
JP2970438B2 (en) Waveform memory type tone generator
JP2001215973A (en) Method and device for creating musical sound control parameter, and recording medium
JP3862839B2 (en) Waveform compression / decompression device
JP3245411B2 (en) Electronic musical instrument
JP3399340B2 (en) Music synthesis device and recording medium storing music synthesis program
JP3405170B2 (en) Music synthesizer
JP3095323B2 (en) Electronic musical instrument
JP4179245B2 (en) Waveform generator and program
JP3687095B2 (en) Coefficient interpolation method and apparatus
JP2684791B2 (en) Waveform signal generator for tone control

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040805

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060502

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20060706

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060904

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20061011

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20101027

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20111027

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20121027

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20121027

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20131027

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees