JP3572847B2 - Sound source system and method using computer software - Google Patents

Sound source system and method using computer software Download PDF

Info

Publication number
JP3572847B2
JP3572847B2 JP01967697A JP1967697A JP3572847B2 JP 3572847 B2 JP3572847 B2 JP 3572847B2 JP 01967697 A JP01967697 A JP 01967697A JP 1967697 A JP1967697 A JP 1967697A JP 3572847 B2 JP3572847 B2 JP 3572847B2
Authority
JP
Japan
Prior art keywords
program
software
sound source
data
computer
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
JP01967697A
Other languages
Japanese (ja)
Other versions
JPH09258736A (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 JP01967697A priority Critical patent/JP3572847B2/en
Publication of JPH09258736A publication Critical patent/JPH09258736A/en
Application granted granted Critical
Publication of JP3572847B2 publication Critical patent/JP3572847B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)
  • Stored Programmes (AREA)

Description

【0001】
【発明の属する技術分野】
この発明は、CPUのような汎用の演算処理手段すなわちコンピュータを使用して、ソフトウェアとして記述された音波形サンプルデータ生成処理プログラムを実行することに基づき音波形サンプルデータを生成する音源システム及び方法に関する。
【0002】
【従来の技術】
電子楽器では、楽音生成処理(楽音生成処理によって生成した楽音波形データにエフェクトを付加する処理を含む場合もある)を、マイクロプロセッサに実行させることが広く行なわれている。そのようなマイクロプロセッサとしては、楽音生成方式(例えば波形メモリ方式やFM合成方式等)に応じた回路構成を採用して成る専用のハードウェア(例えば音源LSIやDSP(ディジタルシグナルプロセッサ)等)を設計することが一般的であった。
【0003】
しかし、近年、CPUの演算能力の向上に伴って、汎用コンピュータや専用の楽音発生装置に搭載したCPUにおいて、所定の楽音生成処理手順を記述したプログラムを実行させることにより、楽音波形データを生成させるようにしたものが登場している。ここでは、そのような楽音生成処理プログラムを基礎としている楽音生成装置や楽音生成方法のことをCPU音源またはソフトウェア音源(必要に応じてソフト音源と略称する)と呼び、これに対し、専用のハードウェアを使用する従来からの楽音生成装置や楽音生成方法をハード音源と呼ぶことにする。
【0004】
一方、WWW(World Wide Web)ブラウザや、ワープロソフト、表計算ソフト等の各種アプリケーションソフトウェアにおいては、プラグイン機能によって、所定の機能を実行するプラグインソフトを取り込むことができるものがある。例えば、自動演奏用のシーケンサ機能を実現するプラグインソフトが知られており、これを使用することによりMIDI(Musical Instrument Digital Interface)ファイルの再生が可能である。しかし、シーケンサ機能を実現するソフトウェアだけでは、楽音波形サンプルデータの生成を行うことができず、音源ボードと言われるハード音源をコンピュータに搭載し、このハード音源によって再生されたMIDIメッセージに基づく楽音波形サンプルデータを生成するようにしていた。ところで、この種の音源ボードには種々のタイプのものがあり、そのタイプやグレードによって、同じ内容のMIDIメッセージに対して生成される楽音の特性は異なるものとなってしまうことがあった。
【0005】
【発明が解決しようとする課題】
この発明は、上述の点に鑑みてなされたもので、ソフトウェア音源をアプリケーションソフトにプラグインで取り込み、該アプリケーションソフトの実行中においてソフトウェア音源のプログラムを起動させることにより、音源ボードを必要とすることなく、音波形サンプルデータの生成を行うことができるようにした音源システム及び方法を提供しようとするものである。
【0006】
ところで、MIDIメッセージ等の演奏情報に基づいて楽音発生処理を行おうとする場合、コンピュータが楽音発生処理のみを実行することは希であり、他のソフトウェアのプログラムを同じOS上で並行して処理することが多い。例えば、ゲームソフトを実行するときは、音声発生処理に並行して動画像の発生処理等を行う必要があるし、カラオケソフトを実行する場合でも歌詞画像及び背景画像の発生処理を同時並行的に行う必要がある。そのような場合、ソフトウェア音源を使用する場合、コンピュータはそのソフトウェア音源のプログラムと他の必要なソフトウェアのプログラムを同じOS上で並行して処理することになる。その場合には、他の処理に影響されることなくソフトウェア音源による楽音波形データ生成処理の実行が確保されるようにするために、マルチタスク機能を有するOS(例えばWindows95(商標)等)上で楽音生成処理を実行させることが望ましい。しかし、完全なマルチタスク機能を有しないOS(例えばWindows3.1(商標)等)も広く普及しており、そうしたOS上でも楽音生成処理を実行させたいというニーズが存在している。しかるに、そうしたOS上では、他のソフトウェアの処理の影響によって楽音生成処理の実行が遅れ、その結果、発音に支障が生じることがあり得るし、逆に、楽音生成処理に長い時間を費やすことに影響されて他の処理の実行が遅れるという問題も起こり得る。特に、従来は、ハードウェア音源を用いていたので、そのような並行処理の問題が起こらなかったアプリケーションソフトにおいて、本発明に従ってソフトウェア音源を使用するようにすると、そのような並行処理の問題が起こるおそれが出てくるので、予め解決策を講ずることが望まれる。
【0007】
この発明は上述の点に鑑みてなされたもので、完全なマルチタスク機能を有しないOS上でソフトウェア音源による音波形サンプルデータ生成処理と他のソフトウェアの処理を並行して実行させる場合でも、楽音生成処理や他の処理に支障が生じないようにしたコンピュータソフトウェアを用いた音源システム及び方法を提供しようとするものである。
【0008】
【課題を解決するための手段】
請求項1に記載されたこの発明に係る音源システムは、所定のオペレーティングシステムと該オペレーティングシステム上で動く所定のアプリケーションプログラムとを搭載したコンピュータを用いて、音波形サンプルデータを生成するための音源システムであって、前記オペレーティングシステムに備わった波形入力用インタフェース及び波形出力用のプログラムを具備すると共に、前記アプリケーションプログラムにプラグインされたソフトウェア音源のプログラムを具備し前記コンピュータは、前記ソフトウェア音源のプログラムとその他のプログラムを並行して実行する制御を行うメイン制御部を有し、このメイン制御部は、所定時間内の複数回の起動機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会に起動命令を発生する起動命令発生手段を具備しており、前記ソフトウェア音源において、前記起動命令に応じて波形サンプルデータ生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、波形サンプルデータ生成処理を調整する調整処理手段を具備しており、前記メイン制御部による前記アプリケーションプログラムの実行に応じて該アプリケーションプログラムから与えられる命令に従って前記起動命令発生手段が前記起動命令を発生して前記ソフトウェア音源のプログラムを起動させ、この起動に応じて前記メイン制御部が該ソフトウェア音源のプログラムを実行することで波形サンプルデータを生成する処理を行なうと共にこの生成した波形サンプルデータを前記波形入力用インタフェースに出力し、この波形サンプルデータ生成処理は前記調整処理手段により通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように調整され、前記コンピュータが前記オペレーティングシステムに備わった前記波形出力用のプログラムを実行することで前記波形入力インタフェースを介して与えられる前記生成済みの波形サンプルデータを外部に出力することを特徴とするものである。
【0009】
これによって、ソフトウェア音源のプログラムをアプリケーションプログラムにプラグインで組み込むだけで、コンピュータを使用した音波形サンプルデータ生成を容易に行うことができるようになり、かつ、格別の音源ボードが不要となる、という優れた効果を奏する。また、どのようなコンピュータを使用しても、そのハードウェア構成にかかわらず、プラグインしたソフトウェア音源プログラムに応じた均質の楽音特性を持つ音波形サンプルデータを生成することができるようになる。
【0010】
この発明の音源システムは、前記アプリケーションプログラムにプラグインされた自動演奏用シーケンサのプログラムを更に具備し、該シーケンサのプログラムの実行によって自動的に発生すべき楽音を指示し、前記ソフトウェア音源のプログラムでは、前記指示された楽音の音波形サンプルデータを生成するようにしてもよい。これによって、アプリケーションプログラムを介して任意の自動演奏データファイル(例えばMIDIファイル)を受け取ることにより、アプリケーションプログラムの実行中において、その自動演奏データファイルを再生演奏することができる。この場合、ソフトウェア音源のプログラムと自動演奏用シーケンサのプログラムは、それぞれ別モジュールのソフトウェアであってもよいし、別モジュールのソフトウェアでなくてもよい。すなわち、1つのソフトウェアの中に自動演奏用シーケンサのプログラムとソフトウェア音源のプログラムとが一体的に組み込まれていてもよい。
【0011】
ところで、高度なアプリケーションプログラム(例えばWWWブラウザ)においては、例えばインターネットのホームページを2箇所同時にアクセスすることができるものがある。そのような場合、アクセス中の2つのホームページの双方で音楽ソフトの再生を行うようなことが起こり得る。そうすると、該アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることになり、異常動作が起こる可能性がある。
このような異常動作を未然に防止するための1つの対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば後からの呼び出しを受け付けない処理を行うようにするとよい。これによって、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることなく、先に起動中の波形生成処理を優先して遂行させることができる。
そのための別の対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば該実行中の処理を中止し、後からの呼び出しを受け付けるようにしてもよい。これによって、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることなく、先に実行中の波形生成処理を中止し、後から呼び出しのかかった波形生成処理を優先して実行することができる。
【0012】
更にそのための別の対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば、後からの呼び出しを受け付けない処理を行うか、又は、該実行中の処理を中止して後からの呼び出しを受け付ける処理を行うか、のどちらかを選択可能に実行するようにしてもよい。この場合の選択の仕方としては、ディスプレイ画面に選択用のアイコンを表示して、操作者によってどちらかを選択させるようにしてもよいし、あるいは、再生すべき自動演奏データファイル中若しくはその他の適宜の領域に選択情報を格納しておき、この選択情報を参照して自動的に選択するようにしてもよい。あるいは、ディスプレイ画面における表示形態(例えば開いたページ画像の前後関係など)に応じてどちらでソフトウェア音源を使用するかを自動的に選択するようにしてもよいし、若しくはランダム選択によって選択するようにしてもよい。
【0013】
請求項7に記載されたこの発明に係る方法は、所定のオペレーティングシステムと該オペレーティングシステム上で動く所定のアプリケーションプログラムとを搭載したコンピュータを用いて、音波形サンプルデータを生成するための方法であって、前記コンピュータのメモリに、前記アプリケーションプログラムにプラグインされるソフトウェア音源のプログラムを記憶させる処理と、前記コンピュータの制御部による前記アプリケーションプログラムの実行中に、前記プラグインされたソフトウェア音源のプログラムを呼び出す処理と、前記アプリケーションプログラムからの呼び出しに応じて、前記コンピュータ制御部により前記ソフトウェア音源のプログラムを起動させる処理であって、所定時間内の複数の起動機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会に起動命令を発生するものと、前記起動命令に応じて起動された前記ソフトウェア音源のプログラムを前記コンピュータの制御部により実行することによって、再生すべき音を指示する演奏データを受け付けるステップと、受け付けた演奏データに基づき、1回の起動機会毎に複数サンプリング周期分のサンプルの音波形サンプルデータをまとめて生成し、生成した複数サンプリング周期分のサンプルの音波形サンプルデータを出力バッファに一時蓄積するステップと、前記起動命令に応じて前記音波形サンプルデータの生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、前記音波形サンプルデータの生成処理を調整するステップと、出力デバイスのプログラムを起動するステップとを含む処理を、前記コンピュータの制御部に実行させることと、起動された前記出力デバイスのプログラムを前記コンピュータの制御部により実行することによって、前記出力バッファに一時蓄積された音波形サンプルデータを所定の再生サンプリングクロックに従って読み出し、外部に対して出力する処理を、前記コンピュータの制御部に実行させることとを具備する。
これによっても、ソフトウェア音源のプログラムをアプリケーションプログラムにプラグインで組み込むだけで、コンピュータを使用した音波形サンプルデータ生成を容易に行うことができるようになり、かつ、格別の音源ボードが不要となる、という優れた効果を奏する。また、どのようなコンピュータを使用しても、そのハードウェア構成にかかわらず、プラグインしたソフトウェア音源プログラムに応じた均質の楽音特性を持つ音波形サンプルデータを生成することができるようになる。
【0014】
上記方法において、前述と同様に、アプリケーションプログラムに、ソフトウェア音源のプログラムのみならず、自動演奏用シーケンサのプログラムをもプラグインする処理を含んでいてもよい。この場合も、ソフトウェア音源のプログラムと自動演奏用シーケンサのプログラムとは、別モジュールのソフトウェアであるか否かを問わない。
また、上記方法において、前述と同様に、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることを防止するための上述の対策を施すようにしてもよい。
【0016】
この発明に係る音源システムによれば、コンピュータのメイン制御部において起動命令発生手段を設け、波形データ生成処理を起動する機会を所定時間内に複数回設定し、この複数回の機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会にだけ起動命令を発生する。これにより、メイン制御部は、他のプログラムの実行状況との兼ね合いで、ソフトウェア音源のプログラムを実際に実行してよい機会にだけ起動命令を発生することができ、ソフトウェア音源のプログラムとその他のプログラムとを適切に時分割制御して並行して実行させることができる。
【0017】
一方、ソフトウェア音源において、前記起動命令に応じて波形サンプルデータ生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、波形サンプルデータ生成処理を調整する調整処理手段を具備することにより、所定時間内に設定された複数回の起動機会のうち何回かの機会で起動命令が発生されなかったとしても、起動命令に応じて波形データ生成処理を実際に起動した機会だけを使用して、通算して上記所定時間内に所定サンプル数分の音波形サンプルデータを生成が完了するように制御される。すなわち、ソフトウェア音源における1回の起動命令に基づく波形サンプルデータ生成処理量がフレキシブルに可変制御され、所定時間内における実際の起動命令発生回数がメイン制御部の状況に依存する可変数であっても、通算して上記所定時間内に所定サンプル数分の音波形サンプルデータを生成が完了するように制御することができる。
【0018】
従って、完全なマルチタスク機能を有しないOS上でソフトウェア音源による音波形データ生成処理と他のソフトウェアの処理を並行して実行させる場合でも、音波形データ生成処理及び他のソフトウェアの処理に支障が生じないようにすることができる、という優れた効果を奏する。すなわち、他のソフトウェアの処理の影響によって音波形サンプルデータ生成処理の起動命令発生回数が相対的に減ったとしても、通算して上記所定時間内に所定サンプル数分の音波形サンプルデータを生成が完了するように制御されるので、発音遅れ等の支障が生じることがなくなる。逆に、音波形サンプルデータ生成処理を固定の時分割的処理時間で行わないことにより、他のソフトウェアの処理の実行が音波形データ生成処理によって阻害されてその処理が遅れるという問題が起こらないようにすることができる。
【0019】
一実施態様として、前記調整処理手段は、各起動命令に対応する時点において、その時点までに生成処理すべき波形サンプルデータの未処理量の関数として、該時点の1起動命令に応じて生成すべき波形サンプルデータ量を決定するものであってよく、その場合、前記ソフトウェア音源は、該決定された波形サンプルデータ量分の波形サンプルデータを生成する処理を、該1起動命令に応じて実行する。これによって、上記関数を適切に定めることにより、生成処理すべき波形サンプルデータの未処理量との兼ね合いで、1起動命令に応じて生成すべき波形サンプルデータ量を適切に決定することができ、1起動命令に対応するソフトウェア音源の処理によってメイン制御部の作業が占有されることによって他の処理の実行が阻害されることが起こる確率をできるだけ低くするように制御することができるようになる。
【0020】
【発明の実施の形態】
以下、添付図面を参照してこの発明の実施の形態を詳細に説明しよう。
図1は、この発明に従う音源システムの一実施形態のソフトウェアシステム構成例を概念的に示す図である。
オペレーティングシステム(OS)としては、例えばWindows95(マイクロソフト社の商標)を使用する。なお、使用するアプリケーションソフトによっては別のOS、例えばWindows3.1(マイクロソフト社の商標)を使用してもよい。この種のOSには、音波形サンプルデータを受け付けるための波形入力用インターフェース(例えば“waveAPI”)が用意されている。また、この波形入力用インターフェース(“waveAPI”)を介して受け取った波形サンプルデータを外部のハードウェアに対して出力する処理を行う波形出力用ドライバモジュール(以下「出力デバイス」とも言う)がインストールされている。
【0021】
このOSに所定のアプリケーションソフトAPSがインストールされ、そのプログラム内容に応じた処理を行うことができる。この所定のアプリケーションソフトAPSは、任意のプラグインソフトウェアをプラグインで組み込むことができる機能を有するものであり、一例として、WWWブラウザ(例えば“Netscape Navigator”(商標))のようなインターネット検索ソウトウェアを使用してよい。この発明に従って、アプリケーションソフトAPSに、所定のソフトウェア音源のプログラムを含むプラグインソフトPISがプラグインされる。このプラグインソフトPISは、ソフトウェア音源のプログラムに限らず、自動演奏用のシーケンサプログラムを含んでいてよい。また、前述の通り、自動演奏用のシーケンサプログラムとソフトウェア音源のプログラムは別々のソフトウェアモジュールを組み合わせたものであってもよいし、両者を一体的にプログラムしたものであってもよい。
【0022】
通信ネットワークへコンピュータを接続するための入出力ハードウェア装置としてネットワークI/O(入出力装置)が設けられ、また、OSにはネットワークドライバが組み込まれ、これによって、アプリケーションソフトAPSが外部の通信ネットワークに接続される。例えば、アプリケーションソフトAPSの実行時において、外部の通信ネットワークを介して任意の音楽の自動演奏データファイル(MIDIファイル)を取り込み、これに基づきプラグインソフトPISを起動させて、該自動演奏データファイルの曲を再生演奏することができる。すなわち、プラグインソフトPIS内のシーケンサプログラムを実行することによってMIDIメッセージを順次再生し、該プラグインソフトPIS内のソフト音源プログラムを実行することによって該再生されたMIDIメッセージに対応する楽音の音波形サンプルデータを生成する。プラグインソフトPIS内のソフト音源プログラムの実行によって生成された波形サンプルデータは、前記波形入力用インターフェース(“waveAPI”)を介してOSに渡され、波形出力用ドライバ(すなわち「出力デバイス」)を介して外部の装置例えばcodecハードウェア(すなわちディジタル/アナログ変換器DAC)に対して出力される。波形出力用ドライバ(すなわち「出力デバイス」)は、例えば、ソフト音源プログラムの処理によって生成されてハードディスクのような記憶装置にバッファ記憶された波形データをダイレクトメモリアクセスコントローラ(DMAC)を介して読み出して、例えばディジタル/アナログコンバータ(DAC)を含む外部ハードウェアに対して出力する処理を行うソフトウェアからなっている。
【0023】
なお、上記OSを具備したコンピュータに対して、通信ネットワークを介して任意の上記アプリケーションソフトAPSを転送し、インストールするようにしてもよい。また、通信ネットワークを介して任意の上記プラグインソフトPISを転送し、これを該アプリケーションソフトAPSにプラグインするようにしてもよい。
プラグインされたソフトPISは、アプリケーションソフトAPSからの命令を受け取るだけのみならず、該ソフト音源プログラム又はシーケンサプログラム中にイメージ情報が埋め込まれている場合、これをアプリケーションソフトAPSに与えてディスプレイ表示させる。例えば、ソフト音源プログラム及びシーケンサプログラムの動作を制御するための各種機能スイッチ類のアイコン表示情報をアプリケーションソフトAPSに与えてこれをディスプレイ表示させ、各種機能スイッチ類の操作を可能にする。
【0024】
図2は、通信ネットワークの一例を概念的に示す図である。この図では、インターネットを介してWWWサーバー、その他のサーバー、プロバイダーが接続され、個別ユーザーのパソコン(パーソナルコンピュータ)が公衆回線を介してプロバイダーに接続され、所要のサーバーにLANを介して個別のパソコンが接続される、といった状態が例示されている。図2に示された各パソコン内において、図1に示されたソフトウェアシステムが構築される。
【0025】
図3は、この発明に係るコンピュータソフトウェアを用いた音源システムの実施に使用するハードウェア構成例を示す全体ブロック図である。この図3は、1つのパソコンのハードウェア構成例を示すものであり、すなわち、図1に示されたソフトウェアシステムを駆動するためのハードウェア構成例を示している。
この音源システムでは、メイン制御部としてパーソナルコンピュータのCPU(中央処理部)3を使用し、このCPU3の制御の下でアプリケーションソフトAPSを実行し、かつ該アプリケーションソフトAPSの実行中において起動されるソフトウェア音源プログラムによる波形サンプルデータ生成処理とその他のプログラムの処理を並行して実行する。なお、以下では「楽音生成処理」という用語も使用するが、これは「波形サンプルデータ生成処理」と実質的に同義であり、さらには「波形サンプルデータ生成処理」のみならずエフェクト等の各種楽音処理を含んでいてよい。なお、以下では、「波形データ生成処理」という用語も使用するが、これは「波形サンプルデータ生成処理」と同義である。すなわち、「波形サンプルデータ」と「波形データ」は同義に用いることにする。
【0026】
CPU3には、ネットワークI/O(入出力装置)1,タイマ2,ROM(リードオンリーメモリ)4,RAM(ランダムアクセスメモリ)5,マウス7,キーボード8,ディスプレイ9,ハードディスク装置10,DMAC(ダイレクトメモリアクセスコントローラ)11,サウンドI/O(入出力装置)12,サンプリングクロック発生回路14,外部メモリドライブ16が、データ及びアドレスバス6を介して接続されている。
DMAC11は、楽音生成処理の実行によって生成されてRAM5内の出力バッファに書き込まれた楽音データを、サウンドI/O12からの再生サンプリングクロックに同期して1サンプルずつダイレクトメモリアクセス方式で出力バッファから読み出してサウンドI/O12に送る処理(再生処理)を実行する。
【0027】
サウンドI/O12は、CODECと呼ばれるサウンド入出力装置であって、その内部にはディジタル/アナログ変換器(DAC)、アナログ/ディジタル変換器(ADC)、ADCに接続された入力用のFIFO(先入れ先出しバッファ)、DACに接続された出力用のFIFOを含んでいる。このサウンドI/O12内の前記ADCには外部オーディオ信号入力端子15からアナログオーディオ信号が入力され、サンプリングクロック発生回路14から発生される所定の周波数(例えば48kHz)のサンプリングクロックFsに応じてこれをA/D変換し、このA/D変換したオーディオ信号を前記入力用のFIFOに取り込む。また、前記DMAC11の制御によって前記出力用のFIFOに書き込まれた波形サンプルデータを前記サンプリングクロックFsに従って該出力用のFIFOから読み出し、前記DACに与えてD/A変換する。そして、前記入力用FIFOにデータが存在するとき、または、前記出力用FIFOに空きがあるとき、データ処理を要求する信号をDMAC11に出力するように動作する。
上記DACでアナログ変換された音波形サンプルデータは、サウンドシステム13に送られて音響的に発音される。
【0028】
ハードディスク装置10内のハードディスクには、OS(ここでは、マイクロソフト社製のWindows3.1(商標)を使用するものとする)やユーティリティソフトといったソフトウェアの他に、アプリケーションソフトAPSと、そこにプラグインされたプラグインソフトPIS(ソフト音源プログラムとシーケンサプログラムを含む)が格納され、更に、複数種類の音色についての1または複数周期分の波形サンプルデータ群を予め記憶した波形データメモリの領域を含んでいる。なお、各種プログラムをハードディスク装置10に記憶してもよいし、あるいはRAM5又はROM4に記憶してもよい。なお、以下の説明では、ハードディスク装置10内の波形データメモリに予め記憶されている「波形データ」群と、ソフトウェア音源プログラムの処理によってこの記憶波形データを利用して(読み出して)生成する「波形サンプルデータ」とを区別するために、ソフトウェア音源プログラムの処理によって生成する「波形サンプルデータ」を「楽音データ」ということにする。
外部メモリドライブ16は、フロッピーディスクあるいはCD−ROMやMOなどの外部記録媒体17を着脱自在に装着して、該外部記録媒体17に対するデータの読み書きを行うものである。外部記録媒体17は、アプリケーションソフトAPSやプラグインソフトPISのプログラムを格納するために使用してもよいし、波形データ等を格納するために使用してもよい。
【0029】
図17は、この発明に係るコンピュータソフトウェアを用いた音源システムにおけるアプリケーションソフトAPSとプラグインソフトPISと間の情報のやりとり例を簡単に示す説明図である。図に沿って処理手順の概略を説明すると、まず、アプリケーションソフトAPSの実行中に「演奏データ有り」と判定されると、音源用のプラグインソフトPIS(本例では、自動演奏用シーケンサプログラムとソフト音源プログラムの双方を含んでいるとして説明する)に対して「初期化指示」を与え、該プラグインソフトPISを起動する。例えば、アプリケーションソフトAPSが、インターネットのブラウザである場合、MIDIファイルの有るページを開けたとき、そのMIDIファイルがユーザのパソコンに転送されてくる。このとき、実行中のアプリケーションソフトAPSでは上記のように「演奏データ有り」と判定し、音源用のプラグインソフトPISを起動する。
【0030】
音源用プラグインソフトPISでは、アプリケーションソフトAPSから与えられる上記「初期化指示」に応じて所定の「初期化」処理を行い、該プラグインソフトPISを起動する。
アプリケーションソフトAPSでは、プラグインソフトPISにより「初期化」処理が行われたことを確認すると、「OPEN指示」をプラグインソフトPISに与える。
プラグインソフトPISでは、上記「OPEN指示」に応じて所定のイメージ情報をアプリケーションソフトAPSに対して与え、アプリケーション画面中にそのイメージ情報に対応する「コントロールパネル画面」表示を行うことを指示する。これに応じて、アプリケーションソフトAPSでは、ディスプレイ9で表示しているアプリケーション画面中においてプラグインソフトPISから指示されたイメージ情報に対応する「コントロールパネル画面」を表示する。
【0031】
図18はこの「コントロールパネル画面」の表示例を示す。この「コントロールパネル画面」では、シーケンサ用の各種コントロールボタンC1〜C9と所定のロゴC10が表示される。各コントロールボタンC1〜C9は、マウス7のクリックによってオンされる。再生ボタンC1は再生演奏開始指示を行うためのもの、ポーズボタンC2は演奏中の曲の一時停止を指示するためのもの、停止ボタンC3は演奏中の曲の停止を指示するためのもの、テンポダウンボタンC4はクリックする毎に演奏中のテンポをダウンするためのもの、テンポリセットボタンC5はオリジナルテンポに戻すためのもの、テンポアップボタンC6はクリックする毎に演奏中のテンポをアップするためのもの、トランスポーズダウンボタンC7はクリックする毎に演奏キーを半音下げるためのもの、トランスポーズリセットボタンC8はオリジナルキーに戻すためのもの、トランスポーズアップボタンC9はクリックする毎に演奏キーを半音上げるためのもの、である。なお、ボタンC4,C6,C7,C9でアップ又はダウンの操作を行うと、所定色(例えば緑)でボタンが点灯することにより、テンポ又はキーの変更操作がなされたことを報知する。また、ロゴC10のエリアをクリックすることにより、ポップアップメニューが表示され、上記各コントロールボタンと同等の機能の操作が行えるようになっている。なお、このポップアップメニューでは、シーケンサの音源として、内部のソフト音源を使用するか、またはMIDI Managerを経由して外部の適宜のMIDI音源を使用するかの選択も行える。
【0032】
図17に戻り、アプリケーションソフトAPIでは、「コントロールパネル画面」の表示処理の後、「STREAM開始」を指示する。プラグインソフトPISでは、この「STREAM開始」指示を受けて、「データ受信開始」状態となる。以後、アプリケーションソフトAPIの側から、上記MIDIファイルのデータ(つまりMIDIメッセージ)を次々に送信し、プラグインソフトPISでは、これを次々に受信してバッファ記憶する。MIDIファイルの全データを送受信し終えると、「再生開始指示」がアプリケーションソフトAPIの側から送信され、プラグインソフトPISの側では上記MIDIファイルの自動演奏再生処理を開始する。やがて「再生終了指示」が与えられると、自動演奏再生処理が終了する。なお、クライアントやサーバーの側で、MIDIファイルと共に所定の制御情報を送信することにより、該MIDIファイルを取り込んだ側での自動演奏の再生開始及び停止を自動制御するようにすることができる。すなわち、MIDIファイルを受信したら速やかに自動演奏を再生開始するように制御情報を組み込むこともできるし、若しくは再生ボタンC1のクリックを待って自動演奏を再生開始するように制御情報を組み込むこともできる。また、MIDIファイルの再生が1回終わっても、停止ボタンC3がクリックされるまで同じMIDIファイルを繰り返し再生演奏するように制御情報を組み込むこともできるし、若しくはMIDIファイルの再生が1回終わったらその自動演奏を自動的に停止するように制御情報を組み込むこともできる。
【0033】
次に、以下で詳細に説明しようとするCPU3による起動制御に基づく、ソフトウェア音源プログラムによる楽音生成処理の一例の概要を、図4を参照して説明する。
プラグインソフトPIS内のソフトウェア音源プログラムは、CPU3の制御の下で、基本的には、所定の時間長の区間(フレームと呼ぶ)毎に設定される起動機会に応じて起動されて、それぞれその直前のフレーム内に供給されたMIDIメッセージに基づく楽音生成処理を、各制御パラメータに従って実行する(例えば、図4に示すように、時刻T1からT2までのフレーム内に供給されたMIDIメッセージに基づく楽音生成処理を、時刻T2からT3までのフレームで実行する)。楽音生成処理の一例として、波形メモリ方式の楽音生成処理では、まず、発音を割り当てられている各発音チャンネル毎に、当該発音チャンネル用の音源レジスタに格納された制御パラメータに従うピッチでRAM5から波形データを読み出し、その波形データに、音色制御(フィルタ演算)と、音量制御(音量エンベロープデータの乗算)と、ピッチ,音色または音量等の変調制御とを制御パラメータに従って施すことにより、当該発音チャンネルについての所定数サンプル分の楽音データを生成する。そして、各発音チャンネルについての楽音データを累算し、累算した楽音データを(あるいは、累算した楽音データにエフェクトを付加し、その楽音データを)、RAM5内の出力バッファに書き込む。そして、その出力バッファの再生を「出力デバイス」に予約する。この出力バッファの再生を「出力デバイス」に予約することが、生成した楽音データをソフト音源からOSレベルの波形入力用インターフェース(“wave API”)に与えることに相当する。
【0034】
「出力デバイス」は、各フレーム毎に、それぞれその直前のフレームで「音源部」によって再生予約された出力バッファから1サンプルずつ楽音データを読み出してサウンドI/O12に送る(例えば、図4に示すように、時刻T2からT3までのフレームで生成された楽音データを書き込まれて再生予約された出力バッファから、時刻T3からT4までのフレームで楽音データを読み出す)。
こうしたソフトウェアのうち、アプリケーションソフトAPSのプログラムの起動と、プラグインソフトPIS内のシーケンサプログラムの実行によって発生されたMIDIメッセージに基づくMIDI処理の起動は、リアルタイムに行なわれる。また、「出力デバイス」は、DMAC11による割込み処理として強制的に起動されるので、時間的な遅れが生じることはない。これに対し、波形サンプルデータそのものの生成処理(楽音生成処理)の起動は、CPU3自身の内部割込みによる起動命令によって行なわれるので、完全なマルチタスク機能を有しないOS上でこのソフトウェアを走らせた場合には、他の処理の影響によって楽音生成処理の起動が遅れることにより、発音に支障が生じることがある。そこで、この音源システムでは、次のような対策を講じることにより、発音に支障が生じる事態を防止している。
【0035】
〔対策1〕
楽音生成処理を起動させる内部割込み信号(すなわち起動命令)を発生するための機会を、各フレーム内でそれぞれ複数回設定し(例えばタイマによって定期的に設定する)、ソフト音源で楽音生成処理を実行してよい機会に対応して内部割込み信号(すなわち起動命令)を実際に発生する。内部割込み信号(すなわち起動命令)に基づく各起動毎に、それぞれ上記所定数サンプル分(1出力バッファ分)の楽音データのうちの一部の楽音データを生成することにより、通算として当該フレーム内に1出力バッファ分の楽音データが生成されるように調整を行なう。そして、いずれかの機会で、内部割込み信号(すなわち起動命令)が発生しなかったために「音源部」が起動せず、その結果楽音データが生成されなかった場合には、その未生成の楽音データを、当該フレーム内のその後の内部割込み信号が発生した機会で併せて生成することにより、当該フレーム内での1出力バッファ分の楽音データの生成が確保されるように調整を行なう。
【0036】
このように、楽音生成処理を起動させる内部割込み信号(起動命令)を発生する機会を各フレーム毎に複数回設け、この複数回の機会のうち何回か内部割込み信号(起動命令)が発生しなくても、内部割込み信号(起動命令)が発生した機会だけで、当該フレーム内に1出力バッファ分の楽音データの生成を完了するようにしたので、発音に支障が生じる事態が防止される。
図5及び図6は、それぞれこの〔対策1〕の一例を示す図である。これらの例では、100ミリ秒の長さのフレーム内に、楽音生成処理を起動する内部割込み信号を10ミリ秒毎のタイミングで(したがって、1フレーム内に合計10回)発生し、各起動毎に、それぞれ1出力バッファ分の楽音データの10分の1の量の楽音データを生成するようにしている。
【0037】
そして、図5の例では、内部割込み信号が発生しなかったタイミングでの未生成の楽音データを、その直後に内部割込み信号が発生した機会で全て生成するようにしている。すなわち、内部割込み信号が発生しなかった2回目の機会(図の10ミリ秒目)で未生成となった楽音データを、その直後に内部割込み信号が発生した3回目の機会(図の20ミリ秒目)での処理で、当該機会での楽音データと併せて全て生成し(図では2,3として示している)、内部割込み信号が発生しなかった6,7回目の機会(図の50及び60ミリ秒目)で未生成となった楽音データを、その直後に内部割込み信号が発生した8回目の機会(図の70ミリ秒目)での処理で、当該機会での楽音データと併せて全て生成している(図では6〜8として示している)。この図5のような処理方式は、未生成分がこれを直ちに一括して生成するので、楽音生成遅れが起こりにくい、という利点を持つ。
【0038】
これに対し、図6の例では、内部割込み信号が発生しなかった機会での未生成の楽音データを、その後に内部割込み信号が発生した複数の機会で分散して生成するようにしている。すなわち、内部割込み信号が発生しなかった2,3回目の機会(図の10,20ミリ秒目)で未生成となった楽音データを、その後に内部割込み信号が発生した4,5回目の機会(図の30及び40ミリ秒目)での処理で、それらの機会での楽音データと併せてそれぞれ分散して生成している(図ではそれぞれ2,3と4,5として示している)。但し、最後の10回目の機会(図の90ミリ秒目)では、当該フレーム内での1出力バッファ分の楽音データの生成を確保するために、内部割込み信号が発生しなかった7,8,9回目の機会(図の60,70,80ミリ秒目)で未生成となった楽音データを全て生成している。この図6のような処理方式は、未生成量が多い場合に、これを適切に分散した回数で処理するので、1回分の処理時間が多すぎないように制御でき、CPUの有効活用に有利である。
【0039】
図6では、未生成の楽音データを、1回の起動の機会で生成する量の楽音データに分散してその後に内部割込み信号が発生した機会で生成しているが、これに限らず、未生成の楽音データを、適宜の量の楽音データ(例えば、1回の起動の機会で生成する量の楽音データや、1回の起動の機会で生成する量の1.5倍の楽音データや、1回の起動の機会で生成する量の半分の楽音データ)に分散してその後の機会で生成するようにしてもよい。
また、更に別の例として、内部割込み信号が発生しなかった機会での未生成の楽音データを、当該フレーム内の最後の機会(図5及び図6では10回目の機会)までに徐々に生成するようにしてもよい。
【0040】
図16は、上記と同様に、〔対策1〕の一例を示す図であるが、1回の内部割込み信号(起動命令)に対応して生成される楽音データの量が、図5や図6に示したように1出力バッファ分の楽音データの10分の1の量の整数倍になるとは限らず、該単位に対する端数を持った量になることがありうる例を示すものである。
この図16の例では、各内部割込み信号(起動命令)に対応する時点において、その時点までに生成処理すべき楽音データの未処理量の関数として、該時点の1回の内部割込み信号(起動命令)に応じて生成すべき楽音データ量を決定するようにしており、図16は、そのようにして決定される楽音データの量の一例を内部割込み信号の発生との関係で示す図である。同図では、或るフレームにおいて内部割込み信号が発生した1回目の機会(図の0ミリ秒目)に、当該フレームにおける1出力バッファ分の楽音データの10分の1の量の楽音データを生成している。そして、内部割込み信号が発生しなかった2及び3回目の機会(図の10及び20ミリ秒目)の後、内部割込み信号が発生した4回目の機会(図の30ミリ秒目)に、未生成の楽音データのうち、1出力バッファ分の楽音データの10分の1.6の量の楽音データを生成している(したがってこの機会までに通算として当該フレームにおける1出力バッファ分の楽音データの10分の2.6の量の楽音データを生成したことになり、図ではこのことを2.6と示している)。
【0041】
続いて、内部割込み信号が発生した5回目の機会(図の40ミリ秒目)に、1出力バッファ分の楽音データの10分の1.5の量の楽音データを生成し(したがってこの機会までに通算として1出力バッファ分の楽音データの10分の4.1の量の楽音データを生成したことになり、図ではこのことを4.1と示している)、内部割込み信号が発生した6回目の機会(図の50ミリ秒目)に、1出力バッファ分の楽音データの10分の1.4の量の楽音データを生成している(したがってこの機会までに通算として1出力バッファ分の楽音データの10分の5.5の量の楽音データを生成したことになり、図ではこのことを5.5と示している)。そして、内部割込み信号が発生しなかった7及び8回目の機会(図の60,70ミリ秒目)の後、内部割込み信号が発生した9回目の機会(図の80ミリ秒目)に、1出力バッファ分の楽音データの10分の1.7の量の楽音データを生成している(したがってこの機会までに通算として1出力バッファ分の楽音データの10分の7.2の量の楽音データを生成したことになり、図ではこのことを7.2と示している)。続いて、内部割込み信号が発生した10回目の機会(図の90ミリ秒目)に、1出力バッファ分の楽音データの10分の1.6の量の楽音データを生成している(したがって1フレーム内に通算として当該フレームにおける1出力バッファ分の楽音データの10分の8.8の量の楽音データを生成したことになり、図ではこのことを8.8と示している)。
【0042】
そして次のフレームにおいて、内部割込み信号が発生した1回目の機会(図の100ミリ秒目)に、直前のフレームにおける残りの未生成の楽音データである1出力バッファ分の楽音データの10分の1.2の量の楽音データと、今回のフレームにおける1出力バッファ分の楽音データの10分の0.3の量の楽音データとを生成している(図ではこのことを10.3と示している)。この段階で、1出力バッファ分を超える楽音データが生成されることになるので、そのうち1出力バッファ分の楽音データ量に相当する10分の10の量の楽音データについては、生成済みの楽音データ群から取り出して「出力デバイス」に供給して再生予約するものとする。従って、生成中の楽音データとして、1出力バッファ分の楽音データの10分の0.3の量の楽音データが残されることになる。
【0043】
続いて、内部割込み信号が発生した2回目の機会(図の110ミリ秒目)に、今回のフレームにおける1出力バッファ分の楽音データの10分の1.4の量の楽音データを生成し(したがってこの機会までに通算として今回のフレームにおける1出力バッファ分の楽音データの10分の1.7の量の楽音データを生成したことになり、図ではこのことを1.7と示している)、以下同様にして、内部割込み信号が発生した機会毎に、楽音データを生成していく。なお、追って詳しく説明する通り、決定された生成すべき楽音データ量が所定の上限値SRmaxを超える場合は、該上限値SRmaxの範囲内に収まるように制御される。
【0044】
このように、図16の例では、ソフトタイマによる内部割込み信号が発生する毎に、それまでに未生成となっている楽音データの量の関数として、楽音生成処理に要する時間があまり長くならないような一定範囲内で楽音データの生成量を決定し、その量だけ楽音データを生成する処理を実行する。内部割込み信号が発生する毎にこうした処理が実行されることにより、未生成の楽音データが徐々に生成されていくことになる。すなわち、この方式は、内部割込み信号の発生を起動要因として楽音生成処理を実行する点では、図5,図6の例と同じであるから、これらの例と同様の効果を期待することができる。他方、未生成の楽音データを一度に全て生成せずに所定の関数に従って徐々に生成していく点で、それらとは異なっており、その点で特有の効果を有する。すなわち、CPU3がソフトウェア音源プログラムによる楽音生成処理のために長時間連続して独占されることはないので、CPU3において他のソフトウェアのプログラムを並行して実行する場合や、ソフトウェア音源プログラムにおける優先度の低い他の処理を行なう要求が生じた場合に、それらの処理に比較的速やかに移行させることができるので、資源の効率的な利用が図れる。
【0045】
すなわち、例えば図5のような方式では、未生成の楽音データの生成を最も早期に行なうことができるという点では優れているが、内部割込み信号が何回も連続して発生しなかったような場合には、その直後に内部割込み信号が発生した機会での楽音データの生成量が大きくなってしまう。このように生成量が大きくなると、一回の起動でソフトウェア音源プログラムによる楽音生成処理を行なうためにCPU3が費やさなければならない時間が長くなり、したがってCPU3がソフトウェア音源プログラムによる楽音生成処理の実行のために長時間連続して独占されるようになるので、その実行中にソフトウェア音源プログラムによる楽音生成処理よりも優先順位の低い処理の起動要因が発生しても、CPU3がそれらの処理をなかなか実行できなくなってしまうことがある。また、そのように1回分の楽音データ生成量が大きくなると、演算可能時間が残り少ない場合には、楽音データを生成可能な発音チャンネル数が極端に減少してしまうことがある。これに対して、図16のような方式を採用すれば、それらの問題点を解決することができる。従って、以下で詳細に説明する実施例では、図16のような方式に従って処理する例について説明することにする。
【0046】
ところで、内部割込み信号が発生しなかった機会が多くなると、その後の内部割込み信号が発生した機会で、楽音生成処理を割り当てられている全ての発音チャンネルについて楽音データを生成しきれなくなる場合がある。そこで、上記〔対策1〕において、そのような機会では、楽音データを生成する発音チャンネル数を減少させることにより、楽音データの生成を確保するようにすることが望ましい。楽音データを生成する発音チャンネル数を減少させなければならない頻度は、図5の例の場合が最も高く、図6の例の場合や、未生成の楽音データを当該フレーム内の最後の機会までに徐々に生成する場合、あるいは図16の例の場合には、図5の例の場合よりも低くなる(但し、未生成の楽音データの生成を早期に行なうという観点からは、図5の例が最も望ましい)。
【0047】
〔対策2〕
各発音チャンネル用の音源レジスタとして、発音チャンネルが未使用である際に割り当てた楽音生成処理を制御するパラメータを格納するための第1の音源レジスタ(表の音源レジスタ)と、当該発音チャンネル使用中となった際に割り当てた新たな楽音生成処理を制御するパラメータを格納するための第2の音源レジスタ(裏の音源レジスタ)とを設ける。そして、当該発音チャンネルで用いるべき音源レジスタとして、新たな楽音生成処理を開始すべきタイミングまでは、表の音源レジスタを選択し、該タイミング以降は、表の音源レジスタに替えて裏の音源レジスタを選択する。
【0048】
これにより、現在使用中の発音チャンネルに新たな楽音生成処理を割り当てた場合でも、表の音源レジスタを用いて当該発音チャンネルでの現在の楽音生成処理の実行を確保しつつ、当該発音チャンネルでの新たな楽音生成処理を直ちに裏の音源レジスタに用意することができる。したがって、楽音生成処理の用意の遅れを原因とする楽音データの生成の遅れを防止することができる。
【0049】
〔対策3〕
RAM5内に複数の出力バッファの領域を設けておき、楽音生成処理の起動に先行して、そのうちの一部の出力バッファの再生を「出力デバイス」に予約しておく。これにより、他の処理の影響により、各フレームで起動すべき楽音生成処理が当該フレーム内に起動しなくても、先行して再生予約した出力バッファの再生処理が全て完了するまでに楽音生成処理が起動して出力バッファの再生が予約されれば、楽音の再生に音切れが生じなくなる。したがって、音切れを生じさせないための楽音生成処理の起動時間の遅れの許容範囲が拡がる。
【0050】
図7は、この〔対策3〕の一例を示す図である。この例では、楽音生成処理の起動に先行して、4つの出力バッファの再生を「出力デバイス」に予約している。そして、フレームF1の開始時には、それより前のフレームで1出力バッファ分の再生処理が完了したことによって予約数が3になっているが、フレームF1の途中に、1出力バッファ分の楽音データの生成が完了してその出力バッファが再生予約されたために、予約数が4に増えている。そして、フレームF1の終了時に、次の1出力バッファ分の再生処理が完了したことによって予約数が3に減るが、フレームF2の途中に、次の1出力バッファ分の楽音データの生成が完了してその出力バッファが再生予約されたために、予約数が4に増えている。
【0051】
そしてその後、楽音生成処理の起動の遅れにより楽音データが生成されないために、フレームF4の終了時には予約数が1に減っている。そして、フレームF5で、再生予約済の最後の出力バッファ(フレームF2の途中に再生予約した出力バッファ)が読み出されている(図では、この再生予約と読み出しとの関係を明らかにするために、フレームF2の途中に再生予約の発生を太い矢印で示し、フレームF5を斜線で網かけしている)が、フレームF5の途中に、1出力バッファ分の楽音データの生成が完了してその出力バッファが再生予約されたために、予約数が2に増えている。そしてその後も、再生処理の完了と再生予約の発生とに応じて予約数が増減している。
【0052】
このように、各フレームで起動すべき楽音生成処理が当該フレーム内に起動しなくても、先行して再生予約した4つの出力バッファの再生処理が全て完了するまでに楽音生成処理が起動して出力バッファの再生が予約されれば、楽音の再生に遅れが生じなくなる。
尚、予約数が4であるときにフレームの途中で次の1出力バッファ分の楽音データの生成が完了した場合には、当該フレームでの再生処理の完了を待って出力バッファの再生予約を行なうことにより、予約数が4を越えないようにするものとする。
【0053】
この〔対策3〕を実施するためにRAM5内に設けておくべき出力バッファの数は、楽音生成処理の起動に先行して再生予約する出力バッファの数と、楽音生成処理で生成を完了した楽音データを書き込むための1つの出力バッファと、楽音生成処理で生成した楽音データの量が1出力バッファ分を越えた場合のための予備の出力バッファとの合計(図7の例では、6つ)になる。尤も、楽音生成処理において、生成した楽音データの量が1出力バッファ分を越える場合には生成をストップするようにすれば、予備の出力バッファは不要になる(したがって、図7の例では、5つで足りるようになる)。
【0054】
〔対策4〕
所定時間内に「出力デバイス」に出力バッファが再生予約されていない場合、そのタイミングで生成完了しているはずの楽音データの生成を打ち切り、そのタイミングで生成開始する楽音データから生成動作を新たに開始する。これにより、再生予約が間に合わず、一時的に楽音が乱れた場合でも、すぐに安定した楽音生成動作に復帰し、ノイズを最小限に抑えることができる。
例えば、前述の〔対策3〕の図7の例では、先行して「出力デバイス」に再生予約した出力バッファの再生処理が全て完了するまでに、楽音生成処理で生成を完了した楽音データを書き込んだ出力バッファが再生予約されている。しかし、他の処理の影響により楽音生成処理の起動が大幅に遅れた場合には、先行して再生予約した出力バッファの再生処理が全て完了した区間内においても、楽音生成処理で生成を完了した楽音データを書き込んだ出力バッファがまだ再生予約されていないこと(予約数が0になること)も起こりうる。そのような場合でも、〔対策3〕及び〔対策4〕を併せて実施すれば、予約数が0になった場合、そのタイミングで生成完了しているはずの楽音データの生成が打ち切られ、「出力デバイス」に出力バッファの再生の先行予約を再び行なった後、そのタイミングで生成開始する楽音データから生成動作が新たに開始する。
【0055】
次に、以上のような対策の実施を含んだこのコンピュータソフトウェアを用いた音源システムの実施例を、図8以下を参照して説明する。まず、始めに、図1のシステム構成に対応する実施例について説明する。
図8は、CPU3によって実行される音源用プラグインソフトPISのメインルーチンを示すフローチャートである。この例では、音源用プラグインソフトPISとして、ソフトウェア音源プログラムと自動演奏用シーケンサプログラムとを一体的に組み込んでなるものを使用している。
一般にプラグインソフトPISのメインルーチンがスタートする条件は、アプリケーションソフトAPSの実行中において、その処理データ中に該アプリケーションソフトAPSでは解釈不能のデータがあった場合、該アプリケーションソフトAPSのプラグインに登録してあるそのデータを処理するソフトがあるかどうかをサーチし、そのプラグインソフトを起動(RAMにロード)して該ロードしたプラグインソフトに処理を任せることによりスタートする。
従って、図8の音源用プラグインソフトPISのメインルーチンがスタートする条件は、これを組み込んだアプリケーションソフトAPSの実行中において、スタンダードMIDIファイルのような音楽情報が埋め込まれたデータを処理する段階に至ったときである。すなわち、アプリケーションソフトAPSからの問合せに応じて、音源用プラグインソフトPISがロードされて、起動(スタート)する。
【0056】
音源用プラグインソフトPISがスタートすると、まず、「初期設定」(ステップS1)を実行する。「初期設定」では、図9に示すように、最初に、各発音チャンネル用の音源レジスタ(〔対策2〕として説明したように、表の音源レジスタと裏の音源レジスタとが設けられている)内のデータと、RAM5のワークエリア(このワークエリア内には、〔対策3〕として説明したように、複数の出力バッファの領域が含まれている)内のデータとを全てクリアする(ステップS21)。続いて、ハードディスク装置10内のハードディスクに記録されている所要の音色の波形データをRAM5にロードする(ステップS22)。続いて、「出力デバイス」を初期設定し(ステップS23)、〔対策3〕として説明したように、楽音生成処理の起動に先行して、データをクリアされた幾つか(ここでは、図7の例と同じく4つとする)の出力バッファの再生を「出力デバイス」に予約する(ステップS24)。続いて、サウンドI/O12から再生サンプリングクロックFsを発生させてDMAC11に与えることにより「出力デバイス」を起動するとともに、楽音生成処理を起動する内部割込み信号(起動命令)を発生するためのソフトタイマ(例えば、ハード的に構成したタイマ2をCPU3が参照することによって内部割込み信号を発生するようにしたもの)をスタートさせる(ステップS25)。
【0057】
ソフトタイマは、この内部割込み信号(起動命令)を、前記〔対策1〕として説明したように各フレーム毎にそれぞれ複数の機会で発生可能である(ここでは、図5,図6,図16の例と同じく、100ミリ秒の長さのフレーム内に、10ミリ秒毎に合計10回の機会において発生することが可能であるものとする)。なお、前述の通り、ソフトタイマによる内部割込み信号(起動命令)は、各起動機会で(つまり10ミリ秒毎に)必ず発生できるとは限らず、起動機会が到来しても、CPU3がOSの処理や他のソフトウェアの処理に占有されているときは、ソフトウェア音源プログラムに対する内部割込み信号(起動命令)をかけることができない。そのための起動命令発生手段の構成としては、例えば、タイマ2で1回の起動機会に対応する所定時間(例えば10ミリ秒)を計時する毎にフラグを立てるようにし、CPU3がソフト音源の処理を実行してもよい状態のとき、このフラグの有無をチェックするようにし、未処理のフラグが立っていれば内部割込み信号(起動命令)を発生するようにすると共にそのフラグを消去するようにする。従って、1回の起動機会に対応する所定時間(例えば10ミリ秒)の間に、CPU3がソフト音源の処理をする余裕がある場合は、1回の内部割込み信号(起動命令)が発生される。しかし、1回の起動機会に対応する所定時間(例えば10ミリ秒)の間に、CPU3がソフト音源の処理をする余裕がない場合は、フラグチェックに行かないので、内部割込み信号(起動命令)が発生されることなく、所定時間が経過してしまい、次のフラグが立ってしまう。つまり、前のフラグに対応して内部割込み信号(起動命令)が発生されることがない。こうして、内部割込み信号(起動命令)は、図5,図6,図16に例示されるように、各起動機会毎に必ず発生できるとは限らないものとなる。また、上記から理解できるように、内部割込み信号(起動命令)がいくつかの各起動機会で連続して発生される場合でも、その発生時間間隔は正確な上記所定時間(例えば10ミリ秒)とはならず、10ミリ秒の前後で適宜の変動がある。すなわち、内部割込み信号(起動命令)の微視的な発生タイミングはCPU3の処理状態(いつタイマフラグを見に行くか)に依存しているからである。
【0058】
図8に戻り、初期設定を終えると、前記「コントロールパネル画面」(図18)をディスプレイ9に表示させるための所要の準備処理及びその他必要なデイスプレイ表示準備処理を行う(ステップS2)。すなわち、「コントロールパネル画面」のイメージ情報をアプリケーションソフトAPSに与える。アプリケーションソフトAPSでは、前述の通り、イメージ情報を受け取って「コントロールパネル画面」(図18)をディスプレイ9に表示させる。尚、楽音生成処理の起動に先行して「初期設定」(図9)で出力バッファを「出力デバイス」に再生予約しているので、「出力デバイス」では、この先行予約しした4つの出力バッファについての再生処理が完了してから、その後に再生予約した出力バッファについての再生処理を実行する。したがって、最初の音発生を指示するMIDIメッセージが発生されてから実際に楽音が再生発音されるまでの時間が、この先行予約した出力バッファの数に等しい数のフレーム分(図7の例では4フレーム分)だけ長くなる(遅れる)ことになる。そこで、ディスプレイ9では、MIDIメッセージの発生に基づく何らかの表示を行なう場合には、その表示のタイミングをこのフレーム分だけ後にずらすようにすることが望ましい。
【0059】
ステップS2に続くステップS3では、下記の各起動要因の発生をチェックする。
起動要因▲1▼:アプリケーションソフトAPSから1シーケンス分のMIDIファイルのデータが転送されてきたこと。
起動要因▲2▼:MIDIファイルの再生処理(自動演奏シーケンス処理)によってMIDIイベントタイミングが到来したこと。
起動要因▲3▼:ソフトタイマにより、楽音生成処理を起動する内部割込み信号(起動命令)が発生したこと。(この発生タイミングは、上記のように、所定時間すなわち10ミリ秒毎に割り込みを入れることを目標としてはいるが、必ずしもその通りに正確に発生されるものではない。)
起動要因▲4▼:「出力デバイス」からの処理要求が検出されたこと。
起動要因▲5▼:その他の処理要求が検出されたこと(特に、「コントロールパネル画面」のオン操作等に基づき、若しくはアプリケーションソフト処理過程で自動的に、前述の自動的シーケンス再生処理用の各種コマンドがアプリケーションソフトAPSから与えられたこと)。
起動要因▲6▼:このプラグインソフトPISの終了要求が検出されたこと(アプリケーションソフトAPSの実行状態がMIDIファイル若しくはMIDメッセージを処理しない状態となったとき、例えばMIDIファイルの埋め込まれていないページに切り替わったとき、音源用プラグインソフトPISの終了要求がアプリケーションソフトAPSから出される。)
【0060】
続いて、上記起動要因のいずれかが発生したか否かを判断する(ステップS4)。ノーであれば、ステップS3に戻り、いずれかの起動要因が発生するまでステップS3及びS4の処理を繰り返す。そしていずれかの起動要因が発生すると、ステップS4でイエスとなってステップS5に進む。ステップS5では、どの起動要因が発生したのかを判定する。以後、発生した起動要因に応じた処理を行なう。ここで、各起動要因の処理優先度は、▲2▼>▲3▼,▲4▼>▲1▼,▲5▼>▲6▼であり、起動要因▲2▼の優先度が最も高い。例えば、起動要因▲2▼と▲3▼が同時に発生した場合、起動要因▲2▼に対応する処理が先に行われる。
【0061】
ステップS5において、起動要因▲1▼が発生したことが判定されると、ステップS16(データ受信処理)に行き、アプリケーションソフトAPSから順次転送されてくる1シーケンス分のMIDIファイルの各データをRAM5にバッファ記憶する。次のステップS17(受信表示)では、MIDIファイルの受信を行ったことを表示する。
ステップS5において、起動要因▲2▼が発生したことが判定されると、ステップS6に行き、MIDI処理を実行する。それから、ステップS7に行き、所定の状態表示(例えば、どのMIDIチャンネルについてのMIDIメッセージが発生されたかの表示等)を、パネル上に行なう。そして、ステップS3に戻り、ステップS3以下の処理を繰り返す。
【0062】
ステップS6で実行するMIDI処理は、バッファ記憶したMIDIファイルから、到来したイベントタイミングに対応するMIDIメッセージデータを読み出すことと読み出したMIDIメッセージに対応する処理を行うことを含む。このMIDI処理には、読み出したMIDIメッセージが次のイベントまでの時間を示すデュレーションデータである場合にそのデュレーションデータをデュレーションタイマにセットする処理と、読み出したMIDIメッセージがノートオンイベントを含む場合に行うノートオンイベント処理や、読み出したMIDIメッセージがノートオフイベントを含む場合に行うノートオフイベント処理等が含まれる。デュレーションデータがセットされたデュレーションタイマは、図示しないテンポクロック割込み処理によって規則的に割込みカウントされる。セットしたデュレーションデータに対応する時間が到来したとき、このテンポクロック割込み処理から図8のメインルーチンの起動要因チェックステップS3に対して、MIDIイベントタイミングの到来を知らせる。これ基づき起動要因▲2▼が発生したことが検出される。この処理が自動演奏用シーケンサプログラムの処理に該当している。
【0063】
図10は、MIDI処理におけるノートオンイベント処理の一例を示すフローチャートである。最初に、ノートナンバ,ベロシティ,ノートオンを入力したMIDIチャンネルを受信するパートのパート番号,MIDIメッセージの入力時刻を示す時間軸上でノートオンイベントが発生した時刻を示すデータを、それぞれ所定のレジスタNN,VEL,p,TMに格納する(ステップS31)。続いて、当該ノートオンに基づく発音の割当て処理を行ない、割り当てた発音チャンネルのチャンネル番号をレジスタiに格納する(ステップS32)。続いて、レジスタp内のパート番号に対応して選択されている音色のボイスデータをRAM5から読み出し、そのボイスデータを、レジスタNN,VEL内のノートナンバ,ベロシティに応じて楽音生成処理制御用の制御パラメータ(ピッチを指定する周波数ナンバFNを含む)に変換する(ステップS33)。
【0064】
続いて、この制御パラメータを、ノートオン及びレジスタTM内の発生時刻のデータとともに、レジスタi内のチャンネル番号の発音チャンネル用の音源レジスタに格納することにより、当該発生時刻に応じたタイミングでのノートオンの予約を行なう(ステップS34)。
レジスタTM内の発生時刻のデータを音源レジスタに格納するのは、次のような理由による。ノートオンイベントの発生時刻と、当該ノートオンイベントに基づく楽音が再生される時刻とには、前述のように約4フレーム分の時間差がある(楽音の再生がそれだけ遅れる)。楽音生成処理(後述する「音源処理1」)は、その時間差の範囲内の任意のタイミングで、対応する楽音データを生成すればよい(つまり、その範囲内での処理の遅れが許容されている)。したがって、ノートオンイベントの発生時刻と異なる任意のタイミングで実行される楽音生成処理では、ノートオンイベントの発生時刻がわかっていないと、対応する楽音データが生成できないからである。
【0065】
尚、ステップS34において、当該発音チャンネルが使用中であれば、〔対策2〕として説明したように、当該発音チャンネル用の表の音源レジスタと裏の音源レジスタとのうち、裏の音源レジスタに制御パラメータ等を格納する。これにより、表の音源レジスタを用いて当該発音チャンネルでの現在の楽音生成処理の実行を確保しつつ、当該発音チャンネルでの新たな楽音生成処理を直ちに裏の音源レジスタに用意することができる。またこのように裏の音源レジスタに格納を行なった場合には、表の音源レジスタ内の予約領域にも、レジスタTM内の発生時刻に応じたタイミングでのダンプ(音量エンベロープを急激に減少させる処理)の予約を行なう。
ステップS34に続くステップS35では、ノートオンの発生時刻が遅い発音チャンネルの順に楽音生成演算が行なわれるように、発音の割当て処理を行なった各発音チャンネルの間での演算順序を決定する。(すなわち、後着のノートオンに対応した発音チャンネルが、楽音の生成において優先的に処理されるようになる)。そしてリターンする。
【0066】
図11は、ノートオフイベント処理の一例を示すフローチャートである。最初に、ノートナンバ,ノートオフを入力したMIDIチャンネルを受信するパートに対応して選択されている音色,MIDIメッセージの入力時刻を示す時間軸上でノートオフイベントが発生した時刻を示すデータを、それぞれ所定のレジスタNN,t,TMに格納する(ステップS41)。続いて、レジスタt内の音色での発音を割り当てた発音チャンネルを捜し、その発音チャンネルのチャンネル番号をレジスタiに格納する(ステップS42)。続いて、レジスタi内のチャンネル番号の発音チャンネル用の表の音源レジスタと裏の音源レジスタのうち、レジスタt内の音色に対応するほうの音源レジスタ内の予約領域に、レジスタTM内の発生時刻に応じたタイミングでのノートオフの予約を行なう(ステップS43)。そしてリターンする。
【0067】
図8の説明に戻り、ステップS5において起動要因▲3▼が発生していることが判定されると、「音源処理1」を実行し(ステップS8)、それから、所定の状態表示(例えば、CPU3の演算能力や、生成した楽音の音量レベル等の表示)を、パネル上に行なう(ステップS9)。そしてステップS3に戻り、ステップS3以下の処理を繰り返す。
【0068】
「音源処理1」は、前述の楽音生成処理の一部を成すものである。この「音源処理1」の詳細例は図12に示されている。
図12において、最初のステップS50では、MIDIメッセージの入力時刻を示す時間軸上での現在の時刻GTから、その時間軸上でのMIDIメッセージの入力時刻のうち当該MIDIメッセージに基づく楽音生成処理が終了しているものの最終の入力時刻STを減じた時間を、遅れ量OR(現時点までに生成すべき楽音データでありながら未生成である楽音データの量を時間の長さで表わしたもの)として設定する。続くステップS51では、生成量SR(今回の1起動で生成すべき楽音データの目標サンプル数を時間の長さで表現したもの)を、遅れ量ORの関数として決定する。
【0069】
図19は、この関数の特性の一例を示す図である。この例では、遅れ量ORが一定未満である場合には、生成量SRは10ミリ秒(1出力バッファ分の楽音データの10分の1に対応した時間)であるが、遅れ量ORが一定以上になると、遅れ量ORが増加するにつれて、生成量SRが連続的に増加していく。そして、生成量SRが、楽音生成処理に要する時間があまり長くならないような範囲内の一定の上限値SRmaxに達すると、遅れ量ORがそれ以上増加しても、生成量SRは上限値SRmaxを維持する。上限値SRmaxは、例えば20ミリ秒であってもよく、あるいはそれ以外の値であってもよい。
図20は、この関数の特性の別の一例を示す図である。この例では、遅れ量ORが一定未満である場合には、生成量SRは10ミリ秒であるが、遅れ量ORが一定以上になると、遅れ量ORが増加するにつれて、生成量SRが不連続に増加していく。そして、生成量SRが、楽音生成処理に要する時間があまり長くならないような範囲内の一定の上限値SRmaxに達すると、遅れ量ORがそれ以上増加しても、生成量SRは上限値SRmaxを維持する。
【0070】
尚、このようにして決定される生成量SRは、10ミリ秒を単位としてその整数倍の値のみをとるのではなく、該単位に対する端数を持った値をとりうる。したがって、一回の「音源処理1」の実行によって生成される楽音データの量は、1出力バッファ分の楽音データの10分の1の量の整数倍になるとは限らず、図16に示したように、該単位に対する端数を持った量になることがありうる。すなわち、この図12の「音源処理1」は、図16に示したような態様で、楽音生成処理を行なうものである。従って、前述の通り、1フレーム内の所定の起動機会において何回か内部割込み信号(起動命令)が発生しなかったとしても、実際に内部割込み信号(起動命令)が発生した機会だけで、当該フレーム内で生成すべき1出力バッファ分の楽音データの生成を効率的に行なうことができ、発音に支障が生じる事態を防止することができると共に、他の処理を阻害するおそれが少なくなる。
【0071】
ステップS51に続くステップS52では、「初期設定」で再生予約した出力バッファ以外の残りの出力バッファのうちの1つの出力バッファ上に、時刻STを先頭とした生成量SR分の楽音生成領域を設定する。
続くステップS53では、生成量SRの楽音データを生成する発音チャンネル数を決定する。ここで、この発音チャンネル数は、一例として、遅れ量ORの関数として決定するようにしてよい。図21は、そのような関数の特性の一例を示す図である。この例では、遅れ量ORが一定未満である場合には、ノートオンイベント処理(図10)で発音割当てを行なった発音チャンネル数CHmaxが、そのまま楽音データを生成する発音チャンネル数となるが、遅れ量ORが一定以上になると、遅れ量ORが増加するにつれて、楽音データを生成する発音チャンネル数がCHmaxよりも減少していく。このように、遅れ量ORが一定以上である場合には、発音チャンネル数が減少することにより、楽音生成処理に要する時間が短縮されるようになる。
【0072】
ステップS53に続くステップS54では、演算順序(ノートオンイベント処理のステップS35で決定したもの)が1位である発音チャンネルのチャンネル番号をレジスタiに格納し、スタートポインタspで時刻STを指す。続いて、レジスタi内のチャンネル番号の発音チャンネル用の表の音源レジスタの予約領域を参照して、スタートポインタsp以降から時刻GTまでの間で、最初の予約(ピッチベンドの予約,ノートオフの予約,ダンプの予約等)を検出する(ステップS55)。続いて、予約が検出されたか否かを判断する(ステップS56)。
【0073】
イエスであれば、当該発音チャンネルについて、当該予約の時刻までの楽音生成処理を実行し、スタートポインタspを当該予約の時刻にまで進める(ステップS57)。この楽音生成処理では、前述のように、音源レジスタに格納された制御パラメータに従うピッチでRAM5から波形データを読み出し、その波形データに、音色制御(フィルタ演算)と、音量制御(音量エンベロープデータの乗算)と、ピッチ,音色または音量等の変調制御と、エフェクトの付加とを制御パラメータに従って施すことによって楽音データを生成する。
【0074】
ステップS57に続くステップS58では、当該予約の内容を当該音源レジスタに格納することにより、その予約内容を実行する。ここで、ノートオフの予約が検出された場合には、当該発音チャンネルの表の音源レジスタにノートオフを書き込み、音量エンベロープのリリーススラートを開始する。また、ダンプの予約が検出された場合には、ダンプの実行の完了後(すなわち、音量エンベロープのレベルが一定以下の低い値になった後)、〔対策2〕として示したように、当該発音チャンネルで用いるべき音源レジスタとして、表の音源レジスタに替えて裏の音源レジスタを選択する(尤も、先に表の音源レジスタから裏の音源レジスタへの入替えを行なった後で、表の音源レジスタについてダンプを実行してもよい)。尚、図10のステップS34で説明したように、裏の音源レジスタに制御パラメータ,ノートオン及びレジスタTM内のノートオンの発生時刻のデータを格納する場合には、表の音源レジスタの予約領域に、レジスタTM内の発生時刻に応じたタイミングでのダンプの予約がされる。したがって、楽音生成処理において、このレジスタTM内の発生時刻に応じたタイミングが来ると、ダンプが実行された後、表の音源レジスタに替えて裏の音源レジスタを用いた楽音生成処理が開始されることになる。
【0075】
ステップS58を終了すると、ステップS55に戻り、ステップS55以下の処理を繰り返す。
他方、ステップS56でノーと判断されれば(あるいは、最初はイエスと判断されたがその後ステップS57及びS58を経由することによりノーと判断されるようになれば)、当該発音チャンネルについて、スタートポインタspから時刻GTまでの楽音生成処理を全て実行する(ステップS59)。これにより、当該発音チャンネルについて、生成量SR分の楽音生成領域に亘る楽音データの生成が完了する。
【0076】
続いて、ステップS53で決定した数の発音チャンネルについて楽音生成処理を全て完了したか否かを判断する(ステップS60)。ノーであれば、演算順序が次順位である発音チャンネルのチャンネル番号をレジスタiに格納し、スタートポインタspを時刻STに設定する(ステップS61)。そしてステップS55に戻り、ステップS55以下の処理を繰り返す。他方、ステップS60でイエスと判断されれば(あるいは、最初はノーと判断されたが、その後ステップS55以下を繰り返すことによりイエスと判断されるようになれば)楽音生成処理を終了してステップS62に進む。これにより、生成可能な発音チャンネル数が、発音の割当て処理を行なった発音チャンネル数未満である場合には、演算順序の遅い発音チャンネルについての楽音生成処理が省略されるという形で、同時発音チャンネル数が減少することになる。
【0077】
ステップS62では、累算された各発音チャンネルについて楽音データ(あるいは、累算された楽音データに適宜のエフェクトを付加したもの)を、出力バッファ上の楽音生成領域(ステップS52で設定したもの)に書き込む。続いて、時刻STに生成量SRの長さを加えた時刻を、新たな時刻STとして設定する(ステップS63)。この新たな時刻STは、次に「音源処理1」を実行する際の演算スタート位置になる。続くステップS264では、今回ノートオフのあった発音チャンネルについての音量エンベロープの大きさを、徐々にゼロに向けて下げる。続いて、1出力バッファ分の楽音データが完成したか否かを判断する(ステップS65)。ノーであればリターンする。他方イエスになると、その出力バッファを、後述の「音源処理2」によって当該出力バッファに連結されている他の出力バッファから切り離して、「出力デバイス」に再生予約する(ステップS66)。そしてリターンする。
【0078】
なお、ステップS50及びS51の別の例として、「GT−ST」の結果をそのままSRとして設定することも可能である。その場合は、前記〔対策1〕における図5の例のように、いずれかの機会で内部割込み信号が発生しなかったために楽音生成処理が起動しなかった場合に、その機会での未生成の楽音データを、その直後に内部割込み信号が発生した機会で全て生成するようになる。これによっても、1フレーム内に何回か内部割込み信号が発生しなくても、内部割込み信号が発生した機会だけで、当該フレーム内に1出力バッファ分の楽音データの生成が完了するので、発音に支障が生じる事態が防止される。また、内部割込み信号が発生しなかった機会での未生成の楽音データを、図6の例のようにその後に内部割込み信号が発生した複数の機会で分散して生成するようにしたり、あるいは当該フレーム内の最後の機会までに徐々に生成するようにしてもよいことは、前記〔対策1〕において述べたとおりである。
【0079】
また、ステップS53における発音チャンネル数の決定法の別の例として、次のようにしてもよい。まず、1つの発音チャンネルで生成量SR分の楽音データを生成するのに要する演算時間と、今回の演算可能時間EJ(次に内部割込み信号が発生する予定の時刻である演算終了時刻SJから、今回内部割込み信号が実際に発生した時刻である演算開始時刻KJを減じた時間)とに基づき、時間EJ内に幾つの発音チャンネルで生成量SR分の楽音データの生成が可能かを算出する。そして、算出した生成可能な発音チャンネル数が、ノートオンイベント処理(図10)で発音割当てを行なった発音チャンネル数以上であれば、当該発音割当てを行なった発音チャンネル数を、そのまま楽音データを生成する発音チャンネル数として決定する。他方、算出した生成可能な発音チャンネル数が、発音割当てを行なった発音チャンネル数未満であれば、当該生成可能な発音チャンネル数を、楽音データを生成する発音チャンネル数として決定する(すなわち、〔対策1〕として説明したように、楽音データを生成する発音チャンネル数を減少させることにより、1フレーム内に1出力バッファ分の楽音データの生成を確保する)。
【0080】
図8の説明に戻り、ステップS5において起動要因▲4▼が発生していることが判定されると、「音源処理2」を実行し(ステップS10)、所定の状態表示をパネル上に行なう(ステップS11)。そしてステップS3に戻り、ステップS3以下の処理を繰り返す。
「音源処理2」も、楽音生成処理の一部を成すものである。この「音源処理2」は、「出力デバイス」(すなわちDMAC11による外部割込み処理)の実行によって発生する要求に基づいて実行される。
【0081】
図13は、DMAC11による外部割込み処理の一例を示すフローチャートである。この外部割込み処理は、サウンドI/O12に楽音データを1サンプル分ずつ送るタイミング(サウンドI/O12の再生サンプリング周期)で、DMAC11が実行するものであり、この処理によって、出力バッファに記憶された1フレーム分の楽音データが、再生サンプリング周期毎に1サンプル分ずつ読み出されてサウンドI/O12に供給される。これは、図1における「出力デバイス」の処理に相当する。すなわち、OSのドライバである「出力デバイス」によって、波形入力用のインターフェース(“wave API”)に対してソフト音源から与えられた楽音データを受け取り、これを外部のハードウェアつまりサウンドI/O12に出力する処理に対応している。
最初に、「初期処理」(図9)または「音源処理1」(図12)によって「出力デバイス」に再生予約された出力バッファのうちの現在読出し中の出力バッファ(ポインタPBで指した出力バッファ)内の現在読出し中の1サンプル分の楽音データ(ポインタppで指した楽音データ)を、サウンドI/O12に送る(ステップS71)。続いて、ポインタppを1サンプル分進め(ステップS72)、当該出力バッファ内の全ての楽音データをサウンドI/O12に送り終えたか(すなわち当該出力バッファについての再生処理を完了したか)否かを判断する(ステップS73)。ノーであればリターンする。
【0082】
他方、ステップS73でイエスと判断されれば、次の出力バッファの再生予約があるか否かを判断する(ステップS74)。これは、インターフェース(“wave API”)に対してOSを介して「出力デバイス」からアクセスする処理、つまりOSを介在させた処理に相当する。
他の何らかの処理の影響により楽音生成処理の起動が遅れているために、楽音生成処理で生成を完了した楽音データを書き込んだ出力バッファが未だ再生予約されていない場合であっても、既に再生予約されている出力バッファ(「初期設定」(図9)で先行して再生予約した出力バッファや、音源処理1で既に再生予約している出力バッファ)があれば、その再生処理が全て完了するまでは、ステップS74でイエスと判断されてステップS75に進み、その出力バッファにポインタPBを進める。これにより、〔対策3〕として説明したように、楽音生成処理の遅れによる音切れを防ぐための楽音生成処理の起動時間の許容範囲が拡がることになる。ステップS75に続くステップS76では、再生処理を完了した出力バッファを、「音源処理2」のルーチンに返却する要求を発生する。そしてリターンする。
【0083】
他方、楽音生成処理の起動が大幅に遅れているために、既に再生予約している出力バッファの再生処理を全て完了した区間内においても、楽音生成処理で生成を完了した楽音データを書き込んだ出力バッファがまだ再生予約されていない場合には、ステップS74でノーと判断されてステップS77に進む。ステップS77では、ノイズ音の発生を防止するためにサウンドI/O12の出力をミュートする。続いてステップS78では、「音源処理2」に対してリセット要求(楽音生成処理のリセットを要求するもの)を発生する。そしてリターンする。
【0084】
図14は、「出力デバイス」からの返却要求(図13のステップS76)に基づく「音源処理2」の一例を示すフローチャートである。最初に、「出力デバイス」から返却された出力バッファを受け取る(ステップS81)。続いて、その出力バッファをクリアして、楽音生成処理が既に保有している出力バッファの後にその出力バッファを連結する(ステップS82)。尚、この連結とは、出力バッファ同士を仮想的に順番につなげて大きな1つのバッファとして扱うことである。したがって、RAM5内で物理的に相互に隣接した領域にそれらの出力バッファを存在させることは必要ではない。ステップS82に続くステップS83では、楽音生成処理と「出力デバイス」との間での時刻のずれの有無を確認して楽音生成処理の動作を補正するために、「出力デバイス」からの返却要求のタイミングを示すデータを作成する。そしてリターンする。
【0085】
図15は、「出力デバイス」からのリセット要求(図13のステップS78)に基づく「音源処理2」の一例を示すフローチャートである。最初に、各発音チャンネル用の音源レジスタ内のデータと、RAM5の出力バッファ内のデータとを全てクリアする(ステップS91)。続いて、「初期設定」(図9)のステップS23乃至S25と同じく、「出力デバイス」を初期設定し(ステップS92)、データをクリアされた4つの出力バッファの再生を再び「出力デバイス」に予約し(ステップS93)、「出力デバイス」を起動するとともに、ソフトタイマをスタートさせる(ステップS94)。そしてリターンする。
【0086】
このように、リセット要求に基づく「音源処理2」では、「出力デバイス」に出力バッファが再生予約されていない場合には、〔対策4〕として説明したように、それまでに楽音生成処理で実行していた楽音生成処理を打ち切り、クリアされた出力バッファの再生の先行予約を「出力デバイス」に再び行なった後、それ以降に供給されるMIDIメッセージに基づいて楽音生成処理を起動することにより、楽音生成処理を新たに開始している。これにより、再生予約が間に合わず、一時的に楽音が乱れた場合でも、すぐに安定した楽音生成動作に復帰するので、ノイズを最小限に抑えることができる。
【0087】
図8のステップS5に戻って、起動要因▲5▼が発生していると判定されると、その要求に応じたコマンド処理を実行し(ステップS12)、それに応じた表示をパネル上に行なう(ステップS13)。そしてステップS3に戻り、ステップS3以下の処理を繰り返す。
他方、起動要因▲6▼が発生していると判定されると、この音源用プラグインソフトPISのメインルーチンを終了させるための所定の処理をステップS14で実行し(例えば、ソフト音源プログラムが使用していたRAM5のメモリを開放する)、所定の画面消去処理を行う(ステップS15)。
【0088】
尚、ステップS5において、起動要因▲1▼乃至▲6▼のうちの2以上の起動要因が同時的に発生していると判断された場合には、前述の通り、起動要因▲2▼が最優先,起動要因▲3▼と▲4▼がその次の優先順位,起動要因▲1▼と▲5▼が更にその次の優先順位,起動要因▲6▼が最下位の優先順位、で該優先順位に従って処理されるものとする。起動要因▲3▼と▲4▼の間には特段の優先順位を付けず、対等とする。また、起動要因▲1▼と▲5▼の間にも特段の優先順位を付けず、対等とする。また、ステップS3乃至ステップS5は、擬似マルチタスク処理におけるタスク管理を仮想的に示したものであり、実際には、いずれかの起動要因の発生に基づいて処理を実行している途中で、それよりも優先順位の高い起動要因が発生したことにより、割込みで別の処理を実行すること(例えば、起動要因▲3▼の発生に基づいて「音源処理1」を実行している途中で、起動要因▲2▼が発生したことにより、割込みで「MIDI処理」を実行すること等)がある。
ところで、例えば、起動要因▲3▼の発生に基づいて「音源処理1」を実行している途中で、それよりも優先順位の低い起動要因▲5▼又は▲6▼が発生された場合、これらの起動要因▲5▼又は▲6▼についての起動は、起動要因▲3▼の発生に基づく1回の「音源処理1」が終了するまで待たなければならない。しかし、図19又は図20に示すような適切な関数に従って1回の起動に対応する生成量SRを遅れ量ORの関数として適切に決定するようにしたことにより、遅れ量ORが多い場合でも、起動要因▲3▼の発生に基づく1回の「音源処理1」が過度に処理時間を占有することかなくなるので、優先順位の低い起動要因に対応する処理を阻害する確率が低くなり、有効である。
【0089】
次に、上記実施の形態の変更例について説明する。
アプリケーションソフトAPSとして高度なアプリケーションプログラム(例えばWWWブラウザ)を使用する場合、アプリケーションソフトAPSの実行中において、例えばインターネットのホームページを2箇所同時にアクセスすることができるものがある。そのような場合、アクセス中の2つのホームページの双方で音楽ソフトの再生を行うようなことが起こり得る。そうすると、該アプリケーションプログラムにプラグインされたソフト音源プログラムが重複して起動されることになり、異常動作が起こる可能性がある。
【0090】
このような異常動作を未然に防止するための1つの対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば後からの呼び出しを受け付けない処理を行うようにするとよい。これによって、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることなく、先に起動中の波形生成処理を優先して遂行させることができる。
図22は、上記の対策を実現するために採用することができる図8の変更例を示す。図22において、ステップS1の前に、ステップS18,S19,S20が設けられている点が図8とは異なり、他は同一である。ステップS18では、既に、この音源用プラグインソフトPISが開かれているか否かを判定する。今回初めて音源用プラグインソフトPISが開かれた場合は、NOであり、ステップS19に行って、該音源用プラグインソフトPISの本体プログラムをメモリにロードする。その後、ステップS1に行き、図8と同様の処理を行う。一方、既に音源用プラグインソフトPISが開かれている場合は、ステップS18はYESであり、ステップS20に行き、「開けません」の表示をディスプレイ9で行わせて、処理を終了する。こうして、先に起動中の波形生成処理を優先して遂行させることができる。
【0091】
そのための別の対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば該実行中の処理を中止し、後からの呼び出しを受け付けるようにしてもよい。これによって、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることなく、先に実行中の波形生成処理を中止し、後から呼び出しのかかった波形生成処理を優先して実行することができる。
図23は、上記の対策を実現するために採用することができる図8の変更例を示す。図23において、ステップS1の前に、ステップS18,S19,S200が設けられている点が図8とは異なり、他は同一である。ステップS18,S19の処理は、図22と同様の処理である。図23では、既に音源用プラグインソフトPISが開かれている場合は、ステップS18のYESからステップS200に行き、現在演奏中の曲の演奏シーケンスを強制的に終了させる。その後。ステップS1に行き、図8と同様の処理を行う。こうして、先に実行中の波形生成処理を中止し、後から呼び出しのかかった波形生成処理を優先して実行することができる。
【0092】
更にそのための別の対策として、ソフトウェア音源のプログラムにおいて、前記アプリケーションプログラムから呼び出しを受けたとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば、後からの呼び出しを受け付けない処理を行うか、又は、該実行中の処理を中止して後からの呼び出しを受け付ける処理を行うか、のどちらかを選択可能に実行するようにしてもよい。この場合の選択の仕方としては、ディスプレイ画面に選択用のアイコンを表示して、操作者によってどちらかを選択させるようにしてもよいし、あるいは、再生すべき自動演奏データファイル中若しくはその他の適宜の領域に選択情報を格納しておき、この選択情報を参照して自動的に選択するようにしてもよい。あるいは、ディスプレイ画面における表示形態(例えば開いたページ画像の前後関係など)に応じてどちらでソフトウェア音源を使用するかを自動的に選択するようにしてもよいし、若しくはランダム選択によって選択するようにしてもよい。
【0093】
上記実施例は、音源用プラグインソフトPISとして、自動演奏用シーケンサのプログラムとソフトウェア音源のプログラムとをプラグインしたが、ソフトウェア音源のプログラムのみをプラグインしてもよい。その場合は、音源用プラグインソフトPISは、適宜入力されるMIDIメッセージに対応する楽音波形サンプルデータを生成する構成となる。
【0094】
尚、以上の実施の形態では、〔対策1〕において、通算として1フレーム内に所定サンプル数の楽音データを生成するようにしている。しかし、ここで「通算として」というのは、必ずしも1つのフレーム内で該所定サンプル数の楽音データの生成が完了することを要求するものではない。特に、これらの実施の形態では、図7に示すように、楽音データを書き込んだ出力バッファを複数再生予約できるようになっているので、1つのフレーム内で楽音データの生成演算が完了しなくても、その後のフレームでその分を補う演算を行なうことが可能である。図6を例にとってこのことを説明すれば、図6では、内部割込み信号の発生しなかった機会での未生成の楽音データを、1つのフレーム内の最後の機会までに間に合うように生成するようにしているが、該最後の機会までに生成できなくても、その次のフレームにその生成を持ち越すようにしてよい(例えば、未生成の4回分の楽音データを図6のように10回目の機会(100ミリ秒目)で全て生成するかわりに、10回目の機会で7,8回目の2回分の楽音データだけを生成し、それ以降のフレームで内部割込み信号が発生した機会で、残りの9,10回目の2回分の楽音データを生成するようにしてよい)。尚、図16に例示しているように、或るフレームにおける未生成の楽音データの生成を、その次のフレームに持ち越すことがありうる。
【0095】
また、以上の実施の形態では、ノートオンイベント処理やノートオフイベント処理といったMIDI処理において、楽音生成処理制御用の制御パラメータ,ノートオン及びイベントの発生時刻を示すデータを、各発音チャンネル毎に設けた音源レジスタに格納している。しかし、このようにこれら制御パラメータ等を各発音チャンネル毎に別の音源レジスタに格納するかわりに、1つの記憶エリアに、制御パラメータ等を発音チャンネルのチャンネル番号を示すデータと組にして順次書き込むようにしてもよい。その場合には、MIDIメッセージの供給に基づいて、一旦シーケンスデータを作成し、このシーケンスデータに基づいて楽音データの生成を行なうことになる。
【0096】
また、以上の実施の形態では、「音源処理2」において、「出力デバイス」から返却された出力バッファを、楽音生成処理が既に保有している出力バッファの後に連結しており、したがって「音源処理1」においては、このように連結された出力バッファに、1出力バッファ分ずつ楽音データを生成している。しかし、このように出力バッファを連結するかわりに、個々の出力バッファを単位として楽音データを生成するようにしてもよい。
【0097】
また、以上の実施の形態では、楽音生成処理の起動に先行して、4つの出力バッファの再生を「出力デバイス」に予約している。しかし、楽音生成処理の起動に先行して「出力デバイス」に再生予約する出力バッファの数は、もちろん4以外であってよい。また、また、RAM5内に設ける出力バッファの数も、楽音生成処理の起動に先行して「出力デバイス」に再生予約する出力バッファの数よりも1以上多い適宜の数であってよい。
【0098】
また、以上の実施の形態では、〔対策1〕,〔対策2〕,〔対策3〕及び〔対策4〕を全て実施している。しかし、これらの対策は、それぞれ相互に独立して実施しても、楽音生成処理の起動の遅れを原因として発音に支障が生じる事態を防止できるものである。したがって、これらの対策のうちのいずれか1つのみを実施したり、2つまたは3つを適宜組み合わせて実施したりしてもよい。
また、上記の実施形態においては、ソフト音源においては、生成した楽音波形データを出力バッファに最大で400ms分貯めてから、これを出力するようにしている。そのため、他のソフトウェアによって処理される該再生音楽情報に関連する他の情報(例えばカラオケの背景画像や歌詞画像情報)の再生タイミングと同期がとれなくなると不都合が生じるので、適宜の同期化対策を講ずるようにすかるのがよい。例えば、MIDIメッセージを出力するタイミングを、該MIDIメッセージに対応する再生音楽情報に同期されるべき他の情報(例えばカラオケの背景画像や歌詞画像情報)の出力タイミングよりも早めてやり、ソフト音源における楽音生成処理が他の処理よりも幾分先行して行なわれるようにしてやれば、最終的に必要な全情報を同期して出力することができる。
【0099】
また、以上の実施の形態では、波形メモリ方式の楽音生成処理をCPUに実行させるタイプのソフトウェア音源にこの発明を適用しているが、他の適宜の楽音生成方式(例えばFM合成方式等)をCPUに実行させるタイプのソフトウェア音源プログラムを採用してこの発明を実施してもよい。
また、この発明は、パーソナルコンピュータ(つまり汎用コンピュータ)のCPUによって楽音生成処理を実行させるようにしたソフトウェア音源において適用することができるのみならず、専用の楽音発生装置やその他の特機化された適宜の装置内に搭載されたコンピュータのCPUによって楽音生成処理を実行させるソフトウェア音源を具備するシステムにおいて適用することができる。また、波形データ生成の基となる演奏情報は、必ずしもMIDIフォームの情報に限定されるものではなく、その他の形式であってもよい。
【0100】
【発明の効果】
以上の通り、この発明によれば、ソフトウェア音源のプログラムをアプリケーションプログラムにプラグインで組み込むだけで、コンピュータを使用した音波形サンプルデータ生成を容易に行うことができるようになり、かつ、格別の音源ボードが不要となる、という優れた効果を奏する。また、どのようなコンピュータを使用しても、そのハードウェア構成にかかわらず、プラグインしたソフトウェア音源プログラムに応じた均質の楽音特性を持つ音波形サンプルデータを生成することができるようになる。
また、アプリケーションプログラムにプラグインされたソフトウェア音源プログラムが重複して起動されることのないように、優先順位をつけて、若しくは選択的に処理するようにしたので、異常動作を防止することができる。
【0101】
また、この発明によれば、コンピュータのメイン制御部(CPU3)において起動命令発生手段を設け、波形データ生成処理を起動する機会を所定時間内に複数回設定し、この複数回の機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会にだけ起動命令を発生し、これにより、メイン制御部は、他のプログラムの実行状況との兼ね合いで、ソフトウェア音源のプログラムを実際に実行してよい機会にだけ起動命令を発生することができ、ソフトウェア音源のプログラムとその他のプログラムとを適切に時分割制御して並行して実行させることができる一方で、ソフトウェア音源(SSM)において、前記起動命令に応じて波形データ生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形データを生成させるように、波形データ生成処理を調整する調整処理手段を具備したので、所定時間内に設定された複数回の起動機会のうち何回かの機会で起動命令が発生されなかったとしても、起動命令に応じて波形データ生成処理を実際に起動した機会だけを使用して、通算して上記所定時間内に所定サンプル数分の音波形データを生成が完了するように制御することができ、発音遅れの問題を解決することができる。従って、完全なマルチタスク機能を有しないOS上でソフトウェア音源による音波形データ生成処理と他のソフトウェアの処理を並行して実行させる場合でも、音波形データ生成処理及び他のソフトウェアの処理に支障が生じないようにすることができる、という優れた効果を奏する。すなわち、他のソフトウェアの処理の影響によって音波形データ生成処理の起動命令発生回数が相対的に減ったとしても、通算して上記所定時間内に所定サンプル数分の音波形データを生成が完了するように制御されるので、発音遅れ等の支障が生じることがなくなる。逆に、音波形データ生成処理を固定の時分割的処理時間で行わないことにより、他のソフトウェアの処理の実行が音波形データ生成処理によって阻害されてその処理が遅れるという問題が起こらないようにすることができる。
【0102】
その場合、各起動命令に対応する時点において、その時点までに生成処理すべき波形データの未処理量の関数として、該時点の1起動命令に応じて生成すべき波形データ量を決定し、該決定された波形データ量分の波形データを生成する処理を、該1起動命令に応じて実行するようにしたことにより、上記関数を適切に定めることにより、生成処理すべき波形データの未処理量との兼ね合いで、1起動命令に応じて生成すべき波形データ量を適切に決定することができ、1起動命令に対応するソフトウェア音源の処理によってメイン制御部の作業が占有されることによって他の処理の実行が阻害されることが起こる確率をできるだけ低くするように制御することができるようになる。
【図面の簡単な説明】
【図1】この発明に従う実施形態のソフトウェアシステム構成を略示する図。
【図2】上記ソフトウェアシステムに接続される通信ネットワークの一例を示すブロック図。
【図3】この発明の一実施形態に係る音源システムのハードウェア構成例を示す全体ブロック図。
【図4】この発明の一例として採用するソフトウェアによる楽音生成処理の概略を説明する図。
【図5】この発明の一実施形態において採用可能な〔対策1〕の一例を示す説明図。
【図6】この発明の一実施形態において採用可能な〔対策1〕の別の例を示す説明図。
【図7】この発明の一実施形態において採用可能な〔対策3〕の一例を示す説明図。
【図8】図3のCPUによって実行されるソフトウェア音源プログラムのメインルーチンの一例を示すフローチャート。
【図9】図8における初期設定処理の一例を示すフローチャート。
【図10】図8におけるMIDI処理において実行されるノートオンイベント処理の一例を示すフローチャート。
【図11】図8におけるMIDI処理において実行されるノートオフイベント処理の一例を示すフローチャート。
【図12】図8における音源処理1の一例を示すフローチャート。
【図13】図3のDMAコントローラによる割込み処理の一例を示すフローチャート。
【図14】図3のDMAコントローラからの返却要求に基づいて実行される図8の音源処理2の一例を示すフローチャート。
【図15】図3のDMAコントローラからのリセット要求に基づいて実行される図8の音源処理2の一例を示すフローチャート。
【図16】この発明の一実施形態において採用可能な〔対策1〕の更に別の例を示すものであって、内部割込み信号の発生と楽音データの生成量との関係の一例を示す説明図。
【図17】この発明の一実施形態におけるアプリケーションソフトと音源用プラグインソフトとの間の情報のやり取り例を略示する図。
【図18】上記音源用プラグインソフトから与えられ入メジ情報に応じて上記アプリケーションソフトによって表示制御されるコントロールパネル画面の一例を示す図。
【図19】生成量SRを遅れ量ORの関数として決定する際の関数の特性の一例を示す図。
【図20】生成量SRを遅れ量ORの関数として決定する際の関数の特性の別の一例を示す図。
【図21】発音チャンネル数を遅れ量ORの関数として決定する際の関数の特性の一例を示す図。
【図22】図8の変更例を示すフローチャート。
【図23】図8の別の変更例を示すフローチャート。
【符号の説明】
APS アプリケーションソフト
PIS 音源用プラグインソフト
FMD フェイクMIDIドライバ
1 ネットワークI/O
2 タイマ
3 CPU
4 ROM
5 RAM
6 データ及びアドレスバス
7 マウス
8 キーボード
9 ディスプレイ
10 ハードディスク装置
11 DMAC
12 サウンドI/O
13 サウンドシステム
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a sound source system and method for generating sound waveform sample data based on executing a sound waveform sample data generation processing program described as software using general-purpose arithmetic processing means such as a CPU, that is, a computer. .
[0002]
[Prior art]
2. Description of the Related Art In an electronic musical instrument, it is widely performed to cause a microprocessor to execute a tone generation process (which may include a process of adding an effect to tone waveform data generated by the tone generation process). As such a microprocessor, dedicated hardware (for example, a sound source LSI or a DSP (Digital Signal Processor) or the like) having a circuit configuration corresponding to a tone generation system (for example, a waveform memory system or an FM synthesis system) is used. It was common to design.
[0003]
However, in recent years, with the improvement of the computational power of the CPU, the CPU mounted on a general-purpose computer or a dedicated tone generator generates a sound waveform data by executing a program describing a predetermined tone generation processing procedure. Something like that has appeared. Here, a tone generator or tone generation method based on such a tone generation processing program is called a CPU tone generator or a software tone generator (abbreviated as a software tone generator if necessary). A conventional musical sound generation apparatus and a conventional musical sound generation method using hardware are referred to as hardware sound sources.
[0004]
On the other hand, in various application software such as a WWW (World Wide Web) browser, word processing software, and spreadsheet software, there is a plug-in function capable of loading plug-in software for executing a predetermined function. For example, plug-in software for realizing a sequencer function for automatic performance is known, and by using this, it is possible to reproduce a MIDI (Musical Instrument Digital Interface) file. However, the software that realizes the sequencer function alone cannot generate musical tone waveform sample data. A hardware tone generator called a tone generator board is mounted on a computer, and a musical tone waveform based on MIDI messages reproduced by the hardware tone generator is used. Sample data was generated. By the way, there are various types of tone generator boards of this type, and the characteristics of musical tones generated for MIDI messages having the same contents may differ depending on the type and grade.
[0005]
[Problems to be solved by the invention]
The present invention has been made in view of the above points, and requires a sound source board by loading a software sound source into an application software as a plug-in and activating the software sound source program during execution of the application software. Instead, it is an object of the present invention to provide a sound source system and method capable of generating sound waveform sample data.
[0006]
By the way, when performing a tone generation process based on performance information such as a MIDI message, it is rare for a computer to execute only a tone generation process, and other computer programs are processed in parallel on the same OS. Often. For example, when executing game software, it is necessary to perform processing for generating a moving image in parallel with sound generation processing, and even when executing karaoke software, processing for generating lyric images and background images is performed simultaneously and in parallel. There is a need to do. In such a case, when a software sound source is used, the computer processes the software sound source program and other necessary software programs in parallel on the same OS. In this case, in order to ensure the execution of the tone waveform data generation process by the software sound source without being affected by other processes, an OS having a multitasking function (for example, Windows95 (trademark) or the like) is used. It is desirable to execute a tone generation process. However, OSs (for example, Windows 3.1 (trademark) or the like) that do not have a complete multitasking function have also become widespread, and there is a need to execute a tone generation process even on such an OS. However, on such an OS, the execution of the musical sound generation processing may be delayed due to the influence of processing of other software, and as a result, there may be a problem with pronunciation, and conversely, a long time is required for the musical sound generation processing. A problem may occur that the execution of other processing is delayed due to the influence. In particular, in the past, since the hardware sound source was used, in the application software in which such a problem of the parallel processing did not occur, such a problem of the parallel processing occurs when the software sound source is used according to the present invention. There is a danger that it is desirable to take a solution in advance.
[0007]
SUMMARY OF THE INVENTION The present invention has been made in view of the above-described circumstances. Even when the sound waveform sample data generation processing by the software sound source and the processing of other software are executed in parallel on an OS that does not have a complete multitasking function, It is an object of the present invention to provide a sound source system and a method using computer software that do not hinder generation processing and other processing.
[0008]
[Means for Solving the Problems]
Claim 1 A sound source system according to the present invention uses a computer equipped with a predetermined operating system and a predetermined application program running on the operating system to generate a sound. of A sound source system for generating waveform sample data, the waveform input interface provided in the operating system And a program for outputting a waveform, and a program for a software sound source plugged into the application program. , The computer has a main control unit that performs control of executing the program of the software sound source and other programs in parallel, and the main control unit performs the software sound source among a plurality of activation opportunities within a predetermined time. The program includes a start command generating means for generating a start command at an opportunity when the program may be actually executed. And adjusting processing means for adjusting waveform sample data generation processing so as to generate waveform sample data for a predetermined number of samples within the predetermined time in total. The application program According to the execution of Given by the application program Be According to the order The start instruction generating means generates the start instruction to execute the program of the software sound source. Start-up The main control unit executes the software sound source program in response to the activation. Processing to generate waveform sample data While doing This generates Wave Type sample data to the waveform input interface The waveform sample data generation processing is adjusted by the adjustment processing means so as to generate a predetermined number of waveform sample data within the predetermined time as a total, and the computer The operating system provided Said Program for waveform output By running Said generated provided through said waveform input interface Waves Output sample data That It is a feature.
[0009]
This makes it easy to generate sound waveform sample data using a computer simply by incorporating the software sound source program into the application program as a plug-in, and eliminates the need for a special sound source board. It has excellent effects. Also, no matter what computer is used, it is possible to generate sound waveform sample data having a uniform tone characteristic according to the plug-in software tone generator program, regardless of the hardware configuration.
[0010]
The sound source system of the present invention further includes an automatic performance sequencer program plugged into the application program, and instructs a tone to be automatically generated by execution of the sequencer program. Alternatively, sound waveform sample data of the designated musical sound may be generated. Thus, by receiving an arbitrary automatic performance data file (for example, a MIDI file) via the application program, the automatic performance data file can be reproduced and played during the execution of the application program. In this case, the program of the software sound source and the program of the sequencer for automatic performance may be software of different modules or may not be software of different modules. That is, the program of the sequencer for automatic performance and the program of the software tone generator may be integrated into one piece of software.
[0011]
By the way, some advanced application programs (for example, WWW browsers) can simultaneously access, for example, two homepages on the Internet. In such a case, music software may be reproduced on both of the two homepages being accessed. Then, the software sound source program plugged into the application program is started up in duplicate, and an abnormal operation may occur.
As one measure for preventing such an abnormal operation beforehand, in a program of a software sound source, when a call from the application program is received, it is determined whether the program of the software sound source is already being executed, If it is already being executed, a process that does not accept a later call may be performed. As a result, the waveform generation process that has been started first can be preferentially performed without the software sound source program plugged in to the application program being started redundantly.
As another countermeasure therefor, in a program of the software sound source, when a call from the application program is received, it is determined whether or not the program of the software sound source is already being executed. The process may be stopped and a later call may be accepted. As a result, the waveform generation process that is being executed first is stopped without executing the software sound source program plugged in to the application program redundantly, and the waveform generation process that is called later is executed with priority. be able to.
[0012]
As another countermeasure therefor, in a software sound source program, when a call from the application program is received, it is determined whether or not the software sound source program is already being executed. Or a process for accepting a later call may be performed so as to be selectable. In this case, the selection may be made by displaying an icon for selection on the display screen and allowing the operator to select one of the icons, or in an automatic performance data file to be reproduced or other appropriate data. The selection information may be stored in the area of, and the selection may be made automatically with reference to the selection information. Alternatively, it is possible to automatically select which of the software sound sources is to be used in accordance with the display mode on the display screen (for example, the context of the opened page image, etc.), or to select the software sound source by random selection. May be.
[0013]
A method according to the present invention described in claim 7 is a method for generating sound waveform sample data using a computer equipped with a predetermined operating system and a predetermined application program running on the operating system. Storing the program of the software sound source plugged into the application program in the memory of the computer; and executing the program of the plugged-in software sound source during the execution of the application program by the control unit of the computer. Calling processing and processing for activating the software sound source program by the computer control unit in response to a call from the application program Wherein, among a plurality of startup opportunities within a predetermined time, a startup instruction is generated at an opportunity when the program of the software sound source may be actually executed. When, Start according to the start command Receiving the performance data indicating the sound to be reproduced by executing the program of the software sound source performed by the control unit of the computer; and performing a plurality of sampling periods for each start-up opportunity based on the received performance data. Generating sound waveform sample data of the samples for one minute, and temporarily storing the generated sound waveform sample data of the samples for a plurality of sampling periods in an output buffer; Only at the occasion when the generation processing of the sound waveform sample data is actually started in response to the start command, the waveform sample data for the predetermined number of samples is generated within the predetermined time as a whole, Adjusting the generation process; By causing the control unit of the computer to execute a process including a step of activating the program of the output device, and executing the activated program of the output device by the control unit of the computer, the output buffer is temporarily stored in the output buffer. Causing the control unit of the computer to execute a process of reading out the stored sound waveform sample data in accordance with a predetermined reproduction sampling clock and outputting the data to the outside.
Even with this, it is possible to easily generate sound waveform sample data using a computer simply by incorporating the software sound source program into the application program with a plug-in, and it becomes unnecessary to use a special sound source board, It has an excellent effect. Also, no matter what computer is used, it is possible to generate sound waveform sample data having a uniform tone characteristic according to the plug-in software tone generator program, regardless of the hardware configuration.
[0014]
In the above method, as described above, the application program may include a process of plugging in not only the program of the software tone generator but also the program of the sequencer for automatic performance. In this case as well, the program of the software sound source and the program of the sequencer for automatic performance may or may not be software of different modules.
Further, in the above method, as described above, the above-described measures for preventing the software sound source program plugged into the application program from being started in duplicate may be taken.
[0016]
Sound source system according to the present invention According to the present invention, a start command generating means is provided in a main control unit of a computer, and an opportunity to start a waveform data generation process is set a plurality of times within a predetermined time. The activation instruction is generated only when the execution may be executed. Thus, the main control unit can generate a start instruction only when it is good to actually execute the program of the software sound source in consideration of the execution status of the other programs. Can be executed in parallel with appropriate time division control.
[0017]
On the other hand, in the software sound source, the waveform sample data is generated such that the waveform sample data for a predetermined number of samples is generated within the predetermined time as a total only at the opportunity of actually starting the waveform sample data generation processing in response to the start instruction. By providing the adjustment processing means for adjusting the generation processing, even if a start command is not generated in some of a plurality of start opportunities set within a predetermined time, a waveform is generated according to the start command. By using only the opportunity to actually start the data generation processing, the control is performed so that the generation of the sound waveform sample data for the predetermined number of samples is completed within the predetermined time in total. That is, the amount of waveform sample data generation processing based on one start instruction in the software sound source is flexibly variably controlled, and the actual number of start instruction generations within a predetermined time is a variable number depending on the state of the main control unit. Thus, control can be performed so that generation of sound waveform sample data for a predetermined number of samples within the predetermined time is completed.
[0018]
Therefore, even when the sound waveform data generation processing by the software sound source and the processing of other software are performed in parallel on an OS that does not have a complete multitasking function, the processing of the sound waveform data generation processing and the processing of other software are not affected. This has an excellent effect that it can be prevented from occurring. In other words, even if the number of times the activation command is generated in the sound waveform sample data generation process is relatively reduced due to the influence of the processing of other software, the generation of the sound wave sample data for the predetermined number of samples within the above predetermined time is possible. Since the control is performed to complete the process, no trouble such as a delay in sound generation occurs. Conversely, by not performing the sound waveform sample data generation processing in a fixed time-division processing time, the problem that the execution of the processing of other software is hindered by the sound waveform data generation processing and the processing is delayed is prevented. Can be
[0019]
In one embodiment, the adjustment processing means generates, at a time corresponding to each start instruction, as a function of an unprocessed amount of waveform sample data to be generated and processed up to that time in response to one start instruction at the time. The software sound source may execute a process of generating waveform sample data corresponding to the determined waveform sample data amount in response to the one start instruction. . Thereby, by appropriately determining the function, the amount of waveform sample data to be generated in response to one start instruction can be appropriately determined in consideration of the unprocessed amount of the waveform sample data to be generated and processed. It is possible to perform control so as to minimize the probability that the execution of the other processing is hindered by the occupation of the work of the main control unit by the processing of the software sound source corresponding to one activation instruction.
[0020]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 1 is a diagram conceptually showing a software system configuration example of an embodiment of a sound source system according to the present invention.
As the operating system (OS), for example, Windows 95 (a trademark of Microsoft Corporation) is used. Depending on the application software used, another OS, for example, Windows 3.1 (a trademark of Microsoft Corporation) may be used. This type of OS is provided with a waveform input interface (for example, “waveAPI”) for receiving sound waveform sample data. Also, a waveform output driver module (hereinafter, also referred to as an “output device”) for performing processing of outputting the waveform sample data received via the waveform input interface (“waveAPI”) to external hardware is installed. ing.
[0021]
A predetermined application software APS is installed in the OS, and processing according to the contents of the program can be performed. The predetermined application software APS has a function of incorporating arbitrary plug-in software as a plug-in. For example, an Internet search software such as a WWW browser (for example, “Netscape Navigator” (trademark)) is used. May be used. According to the present invention, plug-in software PIS including a program of a predetermined software sound source is plugged into application software APS. This plug-in software PIS is not limited to a software sound source program, and may include a sequencer program for automatic performance. As described above, the sequencer program for automatic performance and the program for the software sound source may be a combination of different software modules, or may be a program in which both are integrated.
[0022]
A network I / O (input / output device) is provided as an input / output hardware device for connecting a computer to the communication network, and a network driver is incorporated in the OS, whereby the application software APS is connected to an external communication network. Connected to. For example, when the application software APS is executed, an automatic performance data file (MIDI file) of arbitrary music is fetched via an external communication network, and the plug-in software PIS is started based on the data, and the automatic performance data file You can play and play songs. That is, by executing the sequencer program in the plug-in software PIS, the MIDI messages are sequentially reproduced, and by executing the soft tone generator program in the plug-in software PIS, the tone waveform of the musical tone corresponding to the reproduced MIDI message is reproduced. Generate sample data. The waveform sample data generated by the execution of the software tone generator program in the plug-in software PIS is passed to the OS via the waveform input interface (“waveAPI”), and is output to the waveform output driver (ie, “output device”). Output to an external device, for example, codec hardware (that is, a digital / analog converter DAC) via an external device. The waveform output driver (ie, “output device”) reads out, via a direct memory access controller (DMAC), waveform data generated by processing of a software tone generator program and stored in a storage device such as a hard disk and buffered. , For example, software for performing a process of outputting to external hardware including a digital / analog converter (DAC).
[0023]
Note that any application software APS may be transferred to a computer equipped with the OS via a communication network and installed. Further, any plug-in software PIS may be transferred via a communication network and plugged into the application software APS.
The plugged-in software PIS not only receives instructions from the application software APS, but also provides the application software APS with image information embedded in the software sound source program or sequencer program when the image information is embedded in the program. . For example, icon display information of various function switches for controlling the operation of the software tone generator program and the sequencer program is given to the application software APS, and this is displayed on the display, so that the operation of the various function switches can be performed.
[0024]
FIG. 2 is a diagram conceptually illustrating an example of a communication network. In this figure, a WWW server, other servers, and a provider are connected via the Internet, personal computers (personal computers) of individual users are connected to the provider via a public line, and individual servers are connected to required servers via a LAN. Are connected. The software system shown in FIG. 1 is constructed in each personal computer shown in FIG.
[0025]
FIG. 3 is an overall block diagram showing a hardware configuration example used for implementing a sound source system using computer software according to the present invention. FIG. 3 shows an example of a hardware configuration of one personal computer, that is, an example of a hardware configuration for driving the software system shown in FIG.
In this tone generator system, a CPU (central processing unit) 3 of a personal computer is used as a main control unit, software APS is executed under the control of the CPU 3, and software activated during execution of the application software APS The waveform sample data generation processing by the sound source program and the processing of other programs are executed in parallel. In the following, the term "music sound generation processing" is also used, but this is substantially synonymous with "waveform sample data generation processing". Processing may be included. In the following, the term “waveform data generation processing” is also used, which is synonymous with “waveform sample data generation processing”. That is, “waveform sample data” and “waveform data” are used interchangeably.
[0026]
The CPU 3 includes a network I / O (input / output device) 1, a timer 2, a ROM (read only memory) 4, a RAM (random access memory) 5, a mouse 7, a keyboard 8, a display 9, a hard disk device 10, and a DMAC (direct A memory access controller 11, a sound I / O (input / output device) 12, a sampling clock generation circuit 14, and an external memory drive 16 are connected via a data and address bus 6.
The DMAC 11 reads out the tone data generated by execution of the tone generation processing and written into the output buffer in the RAM 5 from the output buffer one sample at a time in synchronization with the reproduction sampling clock from the sound I / O 12 by the direct memory access method. (Sound I / O 12).
[0027]
The sound I / O 12 is a sound input / output device called CODEC, in which a digital / analog converter (DAC), an analog / digital converter (ADC), and an input FIFO (first-in first-out) connected to the ADC are provided. Buffer), and an output FIFO connected to the DAC. An analog audio signal is input from the external audio signal input terminal 15 to the ADC in the sound I / O 12 and is supplied to the ADC according to a sampling clock Fs of a predetermined frequency (for example, 48 kHz) generated from the sampling clock generating circuit 14. A / D-converted, and the A / D-converted audio signal is taken into the input FIFO. In addition, waveform sample data written to the output FIFO under the control of the DMAC 11 is read from the output FIFO according to the sampling clock Fs, and is provided to the DAC for D / A conversion. Then, when data exists in the input FIFO or when there is free space in the output FIFO, an operation is performed to output a signal requesting data processing to the DMAC 11.
The sound waveform sample data analog-converted by the DAC is sent to the sound system 13 and acoustically generated.
[0028]
The hard disk in the hard disk device 10 includes, in addition to software such as an OS (here, Windows 3.1 (trademark) manufactured by Microsoft Corporation) and utility software, application software APS, and a plug-in therefor. Plug-in software PIS (including a software tone generator program and a sequencer program), and further includes a waveform data memory area in which a waveform sample data group for one or a plurality of cycles for a plurality of types of timbres is stored in advance. . The various programs may be stored in the hard disk device 10 or may be stored in the RAM 5 or the ROM 4. In the following description, the “waveform data” group stored in advance in the waveform data memory in the hard disk device 10 and the “waveform data” generated (read out) using the stored waveform data by the processing of the software sound source program In order to distinguish the “sample data” from the “sample data”, “waveform sample data” generated by processing of the software tone generator program is referred to as “musical sound data”.
The external memory drive 16 detachably mounts an external recording medium 17 such as a floppy disk, CD-ROM, or MO, and reads and writes data from and to the external recording medium 17. The external recording medium 17 may be used to store a program of the application software APS or the plug-in software PIS, or may be used to store waveform data or the like.
[0029]
FIG. 17 is an explanatory diagram simply showing an example of information exchange between the application software APS and the plug-in software PIS in the sound source system using the computer software according to the present invention. The outline of the processing procedure will be described with reference to the drawing. First, when it is determined that “performance data exists” during execution of the application software APS, plug-in software PIS for a sound source (in this example, a sequencer program for automatic performance and (It will be described as including both software sound source programs), an "initialization instruction" is given, and the plug-in software PIS is started. For example, when the application software APS is an Internet browser, when a page containing a MIDI file is opened, the MIDI file is transferred to the user's personal computer. At this time, the running application software APS determines that "performance data exists" as described above, and activates the plug-in software PIS for the sound source.
[0030]
The sound source plug-in software PIS performs a predetermined "initialization" process in response to the "initialization instruction" given from the application software APS, and activates the plug-in software PIS.
When the application software APS confirms that the “initialization” processing has been performed by the plug-in software PIS, it gives an “OPEN instruction” to the plug-in software PIS.
The plug-in software PIS gives predetermined image information to the application software APS in response to the "OPEN instruction", and instructs to display a "control panel screen" corresponding to the image information on the application screen. In response, the application software APS displays a “control panel screen” corresponding to the image information specified by the plug-in software PIS in the application screen displayed on the display 9.
[0031]
FIG. 18 shows a display example of the “control panel screen”. On the "control panel screen", various control buttons C1 to C9 for the sequencer and a predetermined logo C10 are displayed. Each of the control buttons C1 to C9 is turned on by clicking the mouse 7. The play button C1 is for instructing the start of the playing performance, the pause button C2 is for instructing the pause of the playing music, the stop button C3 is for instructing the stopping of the playing music, the tempo. The down button C4 is used to reduce the tempo being played each time the button is clicked, the tempo reset button C5 is used to return to the original tempo, and the tempo up button C6 is used to increase the tempo being played each time the button is clicked. The transpose down button C7 is used to lower the performance key by one semitone each time the button is clicked, the transpose reset button C8 is used to return to the original key, and the transpose up button C9 is used to raise the performance key by one semitone each time it is clicked. For, When the up or down operation is performed with the buttons C4, C6, C7, and C9, the button is lit in a predetermined color (for example, green) to notify that the tempo or key change operation has been performed. Further, by clicking on the area of the logo C10, a pop-up menu is displayed, so that operations equivalent to those of the control buttons can be performed. In this pop-up menu, it is possible to select whether to use an internal software sound source or an appropriate external MIDI sound source via a MIDI Manager as a sound source of the sequencer.
[0032]
Referring back to FIG. 17, the application software API instructs "start STREAM" after displaying the "control panel screen". The plug-in software PIS enters the "data reception start" state in response to the "STREAM start" instruction. Thereafter, the data of the MIDI file (that is, the MIDI message) is successively transmitted from the application software API side, and the plug-in software PIS receives the data one after another and stores it in the buffer. When all the data of the MIDI file has been transmitted / received, a "playback start instruction" is transmitted from the application software API side, and the plug-in software PIS side starts the automatic performance reproduction processing of the MIDI file. When the "reproduction end instruction" is given, the automatic performance reproduction process ends. By transmitting predetermined control information together with the MIDI file on the client or server side, it is possible to automatically control the reproduction start and stop of the automatic performance on the side where the MIDI file is fetched. That is, the control information can be incorporated so that the automatic performance starts to be reproduced immediately upon receipt of the MIDI file, or the control information can be incorporated so that the automatic performance is started after the reproduction button C1 is clicked. . Further, even if the reproduction of the MIDI file is completed once, control information can be incorporated so that the same MIDI file is repeatedly reproduced and played until the stop button C3 is clicked, or if the reproduction of the MIDI file is completed once. Control information can also be incorporated to automatically stop the automatic performance.
[0033]
Next, an outline of an example of tone generation processing by a software tone generator program based on activation control by the CPU 3, which will be described in detail below, will be described with reference to FIG.
Under the control of the CPU 3, the software sound source program in the plug-in software PIS is basically started according to a start opportunity set for each section (called a frame) of a predetermined time length, and A tone generation process based on the MIDI message supplied in the immediately preceding frame is executed according to each control parameter (for example, as shown in FIG. 4, a tone based on the MIDI message supplied in the frame from time T1 to T2). The generation process is executed in a frame from time T2 to time T3). As an example of the tone generation process, in the tone generation process of the waveform memory system, first, for each tone generation channel to which a tone is assigned, the waveform data is generated from the RAM 5 at a pitch according to the control parameter stored in the tone generator register for the tone generation channel. And performs tone control (filter operation), volume control (multiplication of volume envelope data), and modulation control such as pitch, tone or volume on the waveform data according to the control parameters. Generates tone data for a predetermined number of samples. Then, the tone data for each sounding channel is accumulated, and the accumulated tone data (or an effect is added to the accumulated tone data, and the tone data is written) is written to an output buffer in the RAM 5. Then, the reproduction of the output buffer is reserved for the “output device”. Reserving the reproduction of the output buffer in the “output device” is equivalent to providing the generated tone data from the software sound source to the OS-level waveform input interface (“wave API”).
[0034]
The "output device" reads out the musical tone data one sample at a time from each output buffer reserved for reproduction by the "sound source unit" in the immediately preceding frame for each frame and sends it to the sound I / O 12 (for example, as shown in FIG. 4). As described above, the tone data generated in the frame from time T2 to T3 is written and the tone data is read from the output buffer reserved for reproduction in the frame from time T3 to T4).
Among such software, the activation of the program of the application software APS and the activation of the MIDI processing based on the MIDI message generated by the execution of the sequencer program in the plug-in software PIS are performed in real time. Further, since the "output device" is forcibly started as an interrupt process by the DMAC 11, there is no time delay. On the other hand, the generation of the waveform sample data itself (tone generation processing) is started by a start instruction by an internal interrupt of the CPU 3 itself. Therefore, when this software is run on an OS that does not have a complete multitasking function. In some cases, the start of the musical sound generation processing is delayed due to the influence of other processing, which may cause trouble in sound generation. Therefore, in this sound source system, the following countermeasures are taken to prevent a situation in which the pronunciation is hindered.
[0035]
[Countermeasure 1]
An opportunity to generate an internal interrupt signal (ie, a start command) for activating the tone generation processing is set a plurality of times in each frame (for example, periodically set by a timer), and the tone generation processing is executed by the software sound source. An internal interrupt signal (i.e., a start instruction) is actually generated in response to an opportunity to do so. By generating a part of the tone data of the predetermined number of samples (one output buffer) for each activation based on the internal interrupt signal (that is, the activation instruction), a total of the tone data in the frame is generated. Adjustment is performed so that tone data for one output buffer is generated. If the "sound source section" does not start at any occasion because no internal interrupt signal (i.e., start instruction) is generated, and as a result no musical tone data is generated, the ungenerated musical tone data is not generated. Is generated together with the subsequent occurrence of the internal interrupt signal in the frame, so that the generation of the tone data for one output buffer in the frame is adjusted.
[0036]
As described above, the opportunity to generate the internal interrupt signal (activation instruction) for activating the tone generation processing is provided a plurality of times for each frame, and the internal interrupt signal (activation instruction) is generated several times out of the plurality of opportunities. Even if it is not necessary, the generation of the tone data for one output buffer is completed in the frame only at the occasion of the occurrence of the internal interrupt signal (start command), so that the occurrence of trouble in sound generation is prevented.
FIG. 5 and FIG. 6 are diagrams each showing an example of this [Countermeasure 1]. In these examples, an internal interrupt signal for activating the tone generation processing is generated at a timing of every 10 milliseconds (thus, a total of 10 times in one frame) within a frame of 100 milliseconds in length, and each activation is performed. In this case, tone data having a volume that is 1/10 of the tone data for one output buffer is generated.
[0037]
Then, in the example of FIG. 5, all the ungenerated musical tone data at the timing when the internal interrupt signal has not been generated are generated immediately after that at the opportunity when the internal interrupt signal is generated. That is, the musical tone data that has not been generated at the second opportunity (in the 10th millisecond in the figure) in which the internal interrupt signal has not been generated is replaced by the third opportunity (in the case of the 20th millimeter in the figure) immediately after the internal interrupt signal has been generated. In the process at (second), all are generated together with the musical tone data at the corresponding opportunity (shown as 2 and 3 in the figure), and the sixth and seventh occasions (50 in the figure) where no internal interrupt signal is generated. And the tone data which has not been generated at the 60th millisecond) is processed at the eighth opportunity (the 70th millisecond in the figure) immediately after the generation of the internal interrupt signal, and is combined with the tone data at that opportunity. Are all generated (shown as 6 to 8 in the figure). The processing method as shown in FIG. 5 has an advantage in that a sound generation delay is less likely to occur because the ungenerated part immediately generates the part immediately.
[0038]
On the other hand, in the example of FIG. 6, the ungenerated tone data at the opportunity where the internal interrupt signal has not been generated is distributed and generated at a plurality of occasions where the internal interrupt signal has been subsequently generated. That is, the tone data that has not been generated at the second and third occasions (10 and 20 milliseconds in the figure) in which the internal interrupt signal has not been generated is replaced by the fourth and fifth occasions in which the internal interrupt signal has been generated. In the processing (at the 30th and 40th milliseconds in the figure), they are generated in a distributed manner together with the tone data at those occasions (shown as 2, 3 and 4, 5 respectively in the figure). However, at the last tenth opportunity (the 90th millisecond in the figure), no internal interrupt signal was generated in order to secure the generation of tone data for one output buffer in the frame. At the ninth opportunity (60, 70, and 80 milliseconds in the figure), all the tone data that has not been generated are generated. In the processing method as shown in FIG. 6, when the amount of ungenerated data is large, the data is processed with the number of times appropriately distributed, so that it is possible to control the processing time so that one processing time is not too long, and this is advantageous for effective utilization of the CPU. It is.
[0039]
In FIG. 6, the ungenerated musical sound data is distributed to the amount of musical sound data generated at one activation opportunity, and subsequently generated at an opportunity when an internal interrupt signal is generated. However, the present invention is not limited to this. The generated musical sound data is converted into an appropriate amount of musical sound data (for example, musical sound data generated at one activation opportunity, musical data 1.5 times larger than generated at one activation opportunity, It may be distributed to half of the amount of musical sound data generated at one activation opportunity) and generated at a subsequent opportunity.
Further, as still another example, the ungenerated tone data at the opportunity where the internal interrupt signal has not occurred is gradually generated by the last opportunity (the tenth opportunity in FIGS. 5 and 6) in the frame. You may make it.
[0040]
FIG. 16 is a diagram showing an example of [Countermeasure 1] in the same manner as described above, but the amount of musical tone data generated in response to one internal interrupt signal (start instruction) is shown in FIGS. In this example, the amount of tone data for one output buffer is not always an integral multiple of 1/10, but may be a fractional unit.
In the example of FIG. 16, at the time corresponding to each internal interrupt signal (start instruction), as a function of the unprocessed amount of musical tone data to be generated and processed up to that point, one internal interrupt signal (start The amount of musical sound data to be generated is determined in accordance with the instruction). FIG. 16 is a diagram showing an example of the amount of musical sound data determined in this way in relation to the generation of an internal interrupt signal. . In the figure, at the first opportunity (0 milliseconds in the figure) when an internal interrupt signal is generated in a certain frame, tone data of 1/10 of the tone data of one output buffer in the frame is generated. are doing. Then, after the second and third occasions (10 and 20 milliseconds in the figure) in which the internal interrupt signal did not occur, the fourth opportunity (30 milliseconds in the figure) in which the internal interrupt signal occurred, Out of the generated tone data, 1.6 / 10 of the tone data of one output buffer is generated (therefore, by this opportunity, the total of tone data of one output buffer in the frame is generated by this opportunity). This means that 2.6 / 10 of the musical tone data has been generated, which is indicated as 2.6 in the figure).
[0041]
Subsequently, at the fifth opportunity (in the 40th millisecond in the figure) at which the internal interrupt signal is generated, tone data of 1.5 / 10 of the tone data of one output buffer is generated (therefore, until this opportunity). As a result, 4.1 / 10 of the tone data of one output buffer is generated as a total of tone data, which is indicated as 4.1 in the figure), and an internal interrupt signal is generated. At the first opportunity (50 milliseconds in the figure), 1.4 / 10 of the tone data of one output buffer is generated (thus, by this opportunity, a total of one output buffer of tone data is generated). This means that 5.5 times the amount of tone data of the tone data has been generated, and this is indicated by 5.5 in the figure.) Then, after the seventh and eighth occasions (60 and 70 milliseconds in the figure) in which the internal interrupt signal did not occur, the ninth opportunity (80 milliseconds in the figure) when the internal interrupt signal occurred and 1 The tone data of the amount of 1.7 / 10 of the tone data of the output buffer is generated (therefore, by this opportunity, the tone data of the amount of 7.2 / 10 of the tone data of the output buffer as a whole is generated by this opportunity). Is generated, and this is shown as 7.2 in the figure). Subsequently, on the tenth occasion (in the figure, 90 milliseconds) when the internal interrupt signal is generated, 1.6 to 1/10 of the tone data of one output buffer is generated (therefore, 1 to 1). This means that 8.8 / 10th of the tone data of the tone data for one output buffer in the frame is generated as a total in the frame, and this is indicated as 8.8 in the figure.)
[0042]
Then, in the next frame, at the first opportunity (100 milliseconds in the figure) at which the internal interrupt signal is generated, ten minutes of the tone data of one output buffer, which is the remaining ungenerated tone data in the immediately preceding frame. The musical tone data of 1.2 and the musical tone data of 0.3 / 10 of the musical tone data of one output buffer in the current frame are generated (this is indicated by 10.3 in the figure). ing). At this stage, the tone data exceeding one output buffer is generated. Of the tone data having a tenth amount corresponding to the tone data amount of one output buffer, the generated tone data is generated. It is assumed that it is taken out from the group and supplied to the “output device” to make a reproduction reservation. Therefore, as the tone data being generated, tone data having an amount of 0.3 / 10 of the tone data for one output buffer is left.
[0043]
Subsequently, on the second occasion (in the figure, at 110 milliseconds) when the internal interrupt signal is generated, tone data having a volume of 1.4 / 10 of the tone data for one output buffer in the current frame is generated ( Therefore, by this opportunity, a total of 1.7 / 10 of the tone data of the tone data for one output buffer in the current frame has been generated, and this is shown as 1.7 in the figure.) In the same manner, tone data is generated each time an internal interrupt signal is generated. As will be described in detail later, when the determined musical sound data amount to be generated exceeds a predetermined upper limit value SRmax, control is performed so as to fall within the range of the upper limit value SRmax.
[0044]
Thus, in the example of FIG. 16, every time an internal interrupt signal is generated by the soft timer, the time required for the tone generation processing does not become too long as a function of the amount of tone data that has not been generated so far. The generation amount of the musical sound data is determined within a certain fixed range, and the processing for generating the musical sound data by the amount is executed. By executing such a process each time an internal interrupt signal is generated, ungenerated tone data is gradually generated. That is, this method is the same as the examples of FIGS. 5 and 6 in that the tone generation processing is executed with the generation of an internal interrupt signal as a start factor, and therefore the same effects as those examples can be expected. . On the other hand, it differs from them in that ungenerated tone data is not generated all at once but is gradually generated according to a predetermined function, and has a unique effect in that point. That is, since the CPU 3 is not monopolized continuously for a long time for the musical sound generation processing by the software sound source program, the CPU 3 may execute another software program in parallel, or the priority of the software sound source program may be reduced. When there is a request to perform another process that is low, the process can be shifted to those processes relatively quickly, so that efficient use of resources can be achieved.
[0045]
That is, for example, the method as shown in FIG. 5 is excellent in that the ungenerated musical tone data can be generated at the earliest time, but it is such that the internal interrupt signal is not generated many times continuously. In this case, the generation amount of the musical tone data at the opportunity when the internal interrupt signal occurs immediately after that becomes large. As described above, when the amount of generation is large, the time that the CPU 3 must spend for performing the tone generation processing by the software tone generator program at one start becomes longer. Therefore, the CPU 3 needs to execute the tone generation processing by the software tone generator program. For a long time, the CPU 3 can easily execute those processes even if an activation factor of a process lower in priority than the tone generation process by the software sound source program occurs during the execution. It may be gone. Further, when the amount of generated musical tone data for one time is large, the number of sound channels capable of generating musical tone data may be extremely reduced when the remaining time for calculation is short. On the other hand, if the method as shown in FIG. 16 is adopted, those problems can be solved. Therefore, in the embodiment described in detail below, an example in which processing is performed according to a method as shown in FIG. 16 will be described.
[0046]
By the way, if the number of opportunities where the internal interrupt signal has not been generated increases, there may be a case where the musical tone data cannot be generated for all the tone generation channels to which the musical tone generation processing is assigned at the subsequent opportunity where the internal interrupt signal is generated. Therefore, in the above [Measure 1], at such an occasion, it is desirable to secure the generation of the musical sound data by reducing the number of sound channels for generating the musical sound data. The frequency in which the number of sound channels for generating musical sound data must be reduced is highest in the example of FIG. 5, and in the case of the example of FIG. In the case of gradual generation, or in the case of the example of FIG. 16, it is lower than in the case of the example of FIG. 5 (however, from the viewpoint of early generation of ungenerated musical sound data, the example of FIG. Most desirable).
[0047]
[Countermeasure 2]
A first tone generator register (sound generator register in the table) for storing parameters for controlling tone generation processing assigned when a tone channel is not used as a tone generator register for each tone channel, And a second tone generator register (back tone generator register) for storing a parameter for controlling a new musical tone generation process assigned when. Then, as the tone generator register to be used in the sounding channel, the tone generator register in the table is selected until the timing at which a new tone generation process is to be started, and after that timing, the tone generator register in the back is replaced with the tone generator register in the table. select.
[0048]
As a result, even when a new tone generation process is assigned to the currently used tone generation channel, the execution of the current tone generation process in the tone generation channel is ensured using the tone generator registers in the table, and the execution of the current tone generation process in the tone generation channel is ensured. A new tone generation process can be immediately prepared in the tone generator register on the back. Therefore, it is possible to prevent a delay in generation of musical tone data due to a delay in preparation for musical tone generation processing.
[0049]
[Countermeasure 3]
A plurality of output buffer areas are provided in the RAM 5, and reproduction of some of the output buffers is reserved in the "output device" prior to the start of the musical sound generation processing. As a result, even if the tone generation processing to be started in each frame does not start in the frame due to the influence of other processing, the tone generation processing is performed until all the reproduction processing of the output buffer previously reserved for reproduction is completed. Is activated, and the reproduction of the output buffer is reserved, so that the reproduction of the musical sound does not cause interruption of sound. Therefore, the allowable range of the delay of the start-up time of the tone generation process for preventing the sound from being interrupted is expanded.
[0050]
FIG. 7 is a diagram showing an example of this [Countermeasure 3]. In this example, the reproduction of the four output buffers is reserved in the "output device" prior to the activation of the musical sound generation processing. At the start of the frame F1, the number of reservations becomes three because the reproduction processing for one output buffer is completed in the previous frame. Since the generation is completed and the output buffer is reserved for reproduction, the number of reservations is increased to four. Then, at the end of the frame F1, the number of reservations is reduced to 3 by the completion of the reproduction processing for the next one output buffer, but the generation of the musical sound data for the next one output buffer is completed in the middle of the frame F2. Since the output buffer has been reserved for reproduction, the number of reservations has been increased to four.
[0051]
Thereafter, since the musical sound data is not generated due to a delay in the activation of the musical sound generation processing, the reservation number is reduced to 1 at the end of the frame F4. Then, in frame F5, the last output buffer that has been reserved for reproduction (the output buffer that has been reserved for reproduction in the middle of frame F2) is read (in the figure, in order to clarify the relationship between this reproduction reservation and reading). The occurrence of a reservation for reproduction is indicated by a thick arrow in the middle of the frame F2, and the frame F5 is shaded by oblique lines. Since the reproduction of the buffer has been reserved, the number of reservations has been increased to two. Thereafter, the number of reservations increases and decreases in accordance with the completion of the reproduction process and the occurrence of the reproduction reservation.
[0052]
As described above, even if the tone generation processing to be started in each frame does not start in the frame, the tone generation processing is started by the time all the playback processing of the four output buffers previously reserved for playback is completed. If the reproduction of the output buffer is reserved, no delay occurs in the reproduction of the musical sound.
When generation of tone data for the next output buffer is completed in the middle of a frame when the number of reservations is four, the reproduction of the output buffer is reserved after the completion of the reproduction processing in the frame. In this way, the number of reservations does not exceed four.
[0053]
The number of output buffers that should be provided in the RAM 5 to implement this [Countermeasure 3] includes the number of output buffers to be reserved for reproduction prior to the start of the tone generation process, and the number of tone generation completed in the tone generation process. A total of one output buffer for writing data and a spare output buffer for the case where the amount of tone data generated in the tone generation process exceeds one output buffer (six in the example of FIG. 7). become. However, in the tone generation process, if the generated tone data exceeds the amount of one output buffer, if the generation is stopped, a spare output buffer becomes unnecessary (therefore, in the example of FIG. One will be enough).
[0054]
[Countermeasure 4]
If the output buffer is not reserved for playback in the "output device" within the predetermined time, the generation of the tone data that should have been completed at that timing is terminated, and the generation operation is newly started from the tone data that starts to be generated at that timing. Start. As a result, even if the reproduction reservation cannot be made in time and the musical sound is temporarily disturbed, the operation immediately returns to a stable musical sound generation operation and the noise can be minimized.
For example, in the example of FIG. 7 described in [Measures 3], the musical tone data generated by the musical tone generation process is written before the reproduction process of the output buffer previously reserved for reproduction in the “output device” is completed. The output buffer is reserved for playback. However, if the start of the tone generation processing is significantly delayed due to the influence of other processing, the generation of the tone generation processing is completed even in the section in which all the reproduction processing of the output buffer previously reserved for reproduction has been completed. It is possible that the output buffer in which the musical tone data is written is not yet reserved for reproduction (the number of reservations becomes zero). Even in such a case, if [measure 3] and [measure 4] are performed together, when the number of reservations becomes 0, the generation of the musical sound data which should have been completed at that timing is terminated, and " After the advance reservation of the reproduction of the output buffer is performed again in the "output device", the generation operation is newly started from the musical sound data which starts to be generated at that timing.
[0055]
Next, an embodiment of a sound source system using the computer software including implementation of the above countermeasures will be described with reference to FIG. First, an embodiment corresponding to the system configuration of FIG. 1 will be described.
FIG. 8 is a flowchart showing a main routine of the sound source plug-in software PIS executed by the CPU 3. In this example, a software sound source program and an automatic performance sequencer program that are integrally incorporated are used as the sound source plug-in software PIS.
In general, the condition for starting the main routine of the plug-in software PIS is that, when the application software APS is executing, if the processing data includes data that cannot be interpreted by the application software APS, the data is registered in the plug-in of the application software APS. A search is performed to determine whether or not there is software for processing the data, and the plug-in software is started (loaded into the RAM), and the processing is started by the loaded plug-in software.
Therefore, the condition under which the main routine of the sound source plug-in software PIS shown in FIG. 8 starts is that, during execution of the application software APS incorporating the same, processing of data in which music information such as a standard MIDI file is embedded is performed. It is when it reaches. That is, the sound source plug-in software PIS is loaded and started (started) in response to an inquiry from the application software APS.
[0056]
When the sound source plug-in software PIS starts, first, "initial setting" (step S1) is executed. In the "initial setting", as shown in FIG. 9, first, a tone generator register for each sounding channel (as described as [measures 2], a tone generator register in the front and a tone generator register in the back are provided). And all the data in the work area of the RAM 5 (this work area includes a plurality of output buffer areas as described as [Measure 3]) (step S21). ). Subsequently, waveform data of a required tone color recorded on the hard disk in the hard disk device 10 is loaded into the RAM 5 (step S22). Subsequently, the "output device" is initialized (step S23), and as described in [Measures 3], some of the data that has been cleared prior to the activation of the tone generation process (here, FIG. The reproduction of the output buffer (the number of which is four as in the example) is reserved for the “output device” (step S24). Subsequently, a reproduction timer Sf is generated from the sound I / O 12 and supplied to the DMAC 11 to activate the “output device” and a soft timer for generating an internal interrupt signal (activation instruction) for activating the tone generation processing. (For example, an internal interrupt signal is generated by the CPU 3 referring to the timer 2 configured as hardware) (step S25).
[0057]
The soft timer can generate this internal interrupt signal (start instruction) at a plurality of opportunities for each frame as described in [Measures 1] (here, FIGS. 5, 6, and 16). As in the example, it can occur in a 100 ms long frame every 10 ms for a total of 10 opportunities). As described above, the internal interrupt signal (start instruction) by the soft timer cannot always be generated at each start opportunity (that is, every 10 milliseconds). When it is occupied by processing or processing of other software, it cannot issue an internal interrupt signal (start instruction) to the software tone generator program. For example, as a configuration of the activation command generation means for this, for example, a flag is set every time a predetermined time (for example, 10 milliseconds) corresponding to one activation opportunity is counted by the timer 2, and the CPU 3 executes the processing of the software sound source. In a state where execution is permitted, the presence or absence of this flag is checked. If an unprocessed flag is set, an internal interrupt signal (start instruction) is generated and the flag is deleted. . Therefore, if the CPU 3 has enough time to process the software sound source during a predetermined time (for example, 10 milliseconds) corresponding to one activation opportunity, one internal interrupt signal (activation instruction) is generated. . However, if the CPU 3 does not have enough time to perform the processing of the software sound source during a predetermined time (for example, 10 milliseconds) corresponding to one activation opportunity, the flag check is not performed. Does not occur, the predetermined time has elapsed, and the next flag is set. That is, an internal interrupt signal (start instruction) is not generated corresponding to the previous flag. Thus, as shown in FIGS. 5, 6, and 16, the internal interrupt signal (start instruction) cannot always be generated at each start opportunity. Further, as can be understood from the above, even when the internal interrupt signal (start instruction) is continuously generated at each of several start opportunities, the generation time interval is exactly the predetermined time (for example, 10 milliseconds). However, there is an appropriate fluctuation around 10 milliseconds. That is, the microscopic generation timing of the internal interrupt signal (start instruction) depends on the processing state of the CPU 3 (when to look at the timer flag).
[0058]
Returning to FIG. 8, when the initial setting is completed, necessary preparation processing for displaying the "control panel screen" (FIG. 18) on the display 9 and other necessary display display preparation processing are performed (step S2). That is, image information of the “control panel screen” is given to the application software APS. As described above, the application software APS receives the image information and causes the display 9 to display a “control panel screen” (FIG. 18). Since the output buffer is reserved for reproduction in the "output device" in the "initial setting" (FIG. 9) prior to the start of the musical tone generation process, the four output buffers reserved in advance are set in the "output device". After the reproduction process for the output buffer is completed, the reproduction process for the output buffer reserved for reproduction is executed thereafter. Therefore, the time from when the MIDI message indicating the first sound generation is generated to when the musical sound is actually reproduced and generated is equal to the number of frames of the output buffer reserved in advance (4 in the example of FIG. 7). Frame)). Therefore, in the case of performing any display based on the occurrence of the MIDI message on the display 9, it is desirable to shift the display timing later by this frame.
[0059]
In step S3 following step S2, the occurrence of the following activation factors is checked.
Activation factor {circle around (1)}: One sequence of MIDI file data has been transferred from the application software APS.
Activation factor {circle around (2)}: MIDI event timing has arrived by MIDI file playback processing (automatic performance sequence processing).
Activation factor {circle around (3)}: An internal interrupt signal (activation instruction) for activating the tone generation processing is generated by the soft timer. (The timing of this occurrence is aimed at interrupting at a predetermined time, that is, every 10 milliseconds as described above, but it is not always exactly generated as such.)
Activation factor (4): Processing request from "output device" is detected.
Activation factor (5): Another processing request is detected (especially, based on the ON operation of the “control panel screen” or automatically during the application software processing, various types of the above-described automatic sequence playback processing are performed). The command was given from the application software APS).
Activation factor {circle around (6)}: The end request of the plug-in software PIS is detected (when the execution state of the application software APS becomes a state in which the MIDI file or the MID message is not processed, for example, a page in which the MIDI file is not embedded). When the mode is switched to, the end request of the sound source plug-in software PIS is issued from the application software APS.)
[0060]
Subsequently, it is determined whether any of the above-mentioned activation factors has occurred (step S4). If no, the process returns to step S3, and the processes of steps S3 and S4 are repeated until any activation factor occurs. Then, when any of the activation factors occurs, the answer is YES in step S4 and the process proceeds to step S5. In step S5, it is determined which activation factor has occurred. Thereafter, a process according to the generated activation factor is performed. Here, the processing priority of each activation factor is (2)> (3), (4)> (1), (5)> (6), and the activation factor (2) has the highest priority. For example, when the activation factors (2) and (3) occur simultaneously, the processing corresponding to the activation factor (2) is performed first.
[0061]
If it is determined in step S5 that the activation factor (1) has occurred, the process proceeds to step S16 (data reception processing), where each data of the MIDI file for one sequence sequentially transferred from the application software APS is stored in the RAM 5. Store in buffer. In the next step S17 (reception display), it is displayed that the MIDI file has been received.
If it is determined in step S5 that the activation factor (2) has occurred, the process proceeds to step S6 to execute a MIDI process. Then, the process proceeds to step S7, where a predetermined status display (for example, display of which MIDI channel a MIDI message is generated) is performed on the panel. Then, the process returns to step S3, and the processing from step S3 is repeated.
[0062]
The MIDI processing executed in step S6 includes reading MIDI message data corresponding to the event timing that has arrived from the MIDI file stored in the buffer, and performing processing corresponding to the read MIDI message. This MIDI processing is performed when the read MIDI message is duration data indicating the time until the next event, and the duration data is set in a duration timer, and when the read MIDI message includes a note-on event. Note-on event processing, note-off event processing performed when the read MIDI message includes a note-off event, and the like are included. The duration timer in which the duration data is set is regularly counted by an unillustrated tempo clock interrupt process. When the time corresponding to the set duration data comes, the arrival of the MIDI event timing is notified from the tempo clock interrupt processing to the activation factor check step S3 of the main routine of FIG. Based on this, it is detected that the activation factor (2) has occurred. This processing corresponds to the processing of the sequencer program for automatic performance.
[0063]
FIG. 10 is a flowchart illustrating an example of the note-on event process in the MIDI process. First, a part number of a part receiving a MIDI channel to which a note number, a velocity, and a note-on are input, and data indicating a time at which a note-on event occurs on a time axis indicating a MIDI message input time are respectively stored in predetermined registers. NN, VEL, p, and TM are stored (step S31). Subsequently, a sound generation assignment process based on the note-on is performed, and the channel number of the assigned sound generation channel is stored in the register i (step S32). Subsequently, the voice data of the tone selected corresponding to the part number in the register p is read out from the RAM 5, and the voice data is used for controlling the tone generation processing in accordance with the note number and velocity in the registers NN and VEL. The parameter is converted into a control parameter (including a frequency number FN specifying the pitch) (step S33).
[0064]
Subsequently, the control parameters are stored in the tone generator register for the tone generation channel of the channel number in the register i together with the data of the note-on and the occurrence time in the register TM, so that the note at the timing corresponding to the occurrence time is stored. An ON reservation is made (step S34).
The data of the occurrence time in the register TM is stored in the tone generator register for the following reason. As described above, there is a time difference of about four frames between the occurrence time of the note-on event and the time at which the musical sound based on the note-on event is reproduced (the reproduction of the musical sound is delayed accordingly). In the tone generation process ("sound source process 1" described later), corresponding tone data may be generated at an arbitrary timing within the range of the time difference (that is, a delay in the process within the range is allowed). ). Therefore, in the tone generation processing executed at an arbitrary timing different from the note-on event occurrence time, the corresponding tone data cannot be generated unless the note-on event occurrence time is known.
[0065]
In step S34, if the sounding channel is in use, as described in [Countermeasure 2], control is performed on the sound source register on the back of the sound source register on the front and the sound source register on the back for the sounding channel. Stores parameters etc. As a result, it is possible to immediately prepare a new tone generation process for the relevant tone generation channel in the back tone generator register while securing the execution of the current tone generation process for the relevant tone generation channel using the tone generator registers in the table. When the data is stored in the sound source register on the back in this manner, the dump (processing for rapidly reducing the volume envelope) at the timing corresponding to the occurrence time in the register TM is also performed in the reserved area in the sound source register in the front. Make a reservation).
In step S35 following step S34, the calculation order among the tone generation channels for which tone assignment processing has been performed is determined so that the tone generation calculation is performed in the order of the tone generation channel in which the note-on occurrence time is later. (That is, the sounding channel corresponding to the later-arriving note-on is preferentially processed in generating the musical tone.) And return.
[0066]
FIG. 11 is a flowchart illustrating an example of the note-off event process. First, data indicating the time selected when the note-off event occurs on the time axis indicating the input time of the MIDI message and the tone color selected in correspondence with the part receiving the MIDI channel to which the note number and the note-off are input, Each is stored in a predetermined register NN, t, TM (step S41). Subsequently, a search is made in the register t for a sound channel to which the sound of the tone is assigned, and the channel number of the sound channel is stored in the register i (step S42). Then, of the tone generator registers of the front and rear tone generator registers for the sound channel of the channel number in the register i, the generation time in the register TM is stored in the reserved area in the tone generator register corresponding to the tone color in the register t. (Step S43). And return.
[0067]
Returning to the description of FIG. 8, if it is determined in step S5 that the activation factor (3) has occurred, "sound source processing 1" is executed (step S8), and then a predetermined state display (for example, the CPU 3) Display on the panel (step S9). Then, the process returns to step S3, and the processing from step S3 is repeated.
[0068]
"Sound source processing 1" is a part of the above-described tone generation processing. FIG. 12 shows a detailed example of the “sound source processing 1”.
In FIG. 12, in a first step S50, a musical sound generation process based on the MIDI message of the MIDI message input time on the time axis is performed from the current time GT on the time axis indicating the input time of the MIDI message. The time obtained by subtracting the final input time ST from the completed data is defined as a delay amount OR (the amount of musical sound data to be generated up to the present time but not generated is represented by the length of time). Set. In a succeeding step S51, a generation amount SR (a target number of musical tone data to be generated in one activation this time expressed by a time length) is determined as a function of the delay amount OR.
[0069]
FIG. 19 is a diagram illustrating an example of the characteristic of this function. In this example, when the delay amount OR is less than a certain value, the generation amount SR is 10 milliseconds (a time corresponding to one-tenth of the tone data of one output buffer), but the delay amount OR is constant. As described above, the generated amount SR continuously increases as the delay amount OR increases. Then, when the generation amount SR reaches a certain upper limit SRmax within a range where the time required for the musical sound generation processing does not become too long, even if the delay amount OR further increases, the generation amount SR does not exceed the upper limit SRmax. maintain. The upper limit value SRmax may be, for example, 20 milliseconds, or may be another value.
FIG. 20 is a diagram illustrating another example of the characteristic of the function. In this example, when the delay amount OR is less than a certain value, the generation amount SR is 10 milliseconds. However, when the delay amount OR becomes a certain value or more, the generation amount SR becomes discontinuous as the delay amount OR increases. To increase. Then, when the generation amount SR reaches a certain upper limit SRmax within a range where the time required for the musical sound generation processing does not become too long, even if the delay amount OR further increases, the generation amount SR does not exceed the upper limit SRmax. maintain.
[0070]
Note that the generated amount SR determined in this manner may take a value having a fraction with respect to the unit, instead of taking only a value of an integral multiple thereof in units of 10 milliseconds. Therefore, the amount of tone data generated by one execution of the "sound source process 1" is not always an integral multiple of 1/10 the amount of tone data for one output buffer, as shown in FIG. Thus, the amount can be a fractional amount for the unit. That is, the "sound source processing 1" of FIG. 12 performs the musical sound generation processing in the mode as shown in FIG. Therefore, as described above, even if the internal interrupt signal (start instruction) is not generated several times at a predetermined start opportunity within one frame, the internal interrupt signal (start instruction) is actually generated only at the opportunity where the internal interrupt signal (start instruction) is generated. It is possible to efficiently generate musical sound data for one output buffer to be generated in a frame, to prevent a situation in which sound generation is disturbed, and to reduce a possibility that other processing is obstructed.
[0071]
In step S52 following step S51, a tone generation area for the generation amount SR starting at time ST is set in one of the remaining output buffers other than the output buffer reserved for reproduction in the “initial setting”. I do.
In a succeeding step S53, the number of tone generation channels for generating the tone data of the generation amount SR is determined. Here, the number of sounding channels may be determined as a function of the delay amount OR, for example. FIG. 21 is a diagram illustrating an example of the characteristic of such a function. In this example, if the delay amount OR is less than a certain value, the number of sound channels CHmax to which sound is assigned in the note-on event processing (FIG. 10) becomes the number of sound channels for directly generating musical sound data. When the amount OR becomes equal to or more than a certain value, as the delay amount OR increases, the number of sound channels for generating musical sound data decreases from CHmax. As described above, when the delay amount OR is equal to or more than a certain value, the time required for the tone generation processing is reduced by reducing the number of sounding channels.
[0072]
In step S54 following step S53, the channel number of the sounding channel whose operation order (determined in step S35 of the note-on event process) is first is stored in the register i, and the start pointer sp points to the time ST. Subsequently, the first reservation (pitch bend reservation, note-off reservation) is made from the start pointer sp to the time GT with reference to the reserved area of the tone generator register of the channel number sounding channel table in the register i. , Dump reservation, etc.) (step S55). Subsequently, it is determined whether a reservation has been detected (step S56).
[0073]
If the answer is yes, the tone generation process is executed for the sounding channel up to the time of the reservation, and the start pointer sp is advanced to the time of the reservation (step S57). In this tone generation processing, as described above, waveform data is read from the RAM 5 at a pitch according to the control parameters stored in the tone generator register, and the waveform data is subjected to timbre control (filter operation) and volume control (multiplication of volume envelope data). ), Modulation control such as pitch, tone color or volume, and effect addition are performed according to the control parameters to generate musical sound data.
[0074]
In step S58 following step S57, the content of the reservation is stored in the sound source register, thereby executing the content of the reservation. Here, when a note-off reservation is detected, the note-off is written in the sound source register of the table of the sounding channel, and the release slat of the volume envelope is started. Further, when the reservation of the dump is detected, after the execution of the dump is completed (that is, after the level of the volume envelope has become a low value equal to or less than a certain value), as shown in [Countermeasure 2], the sound generation is performed. As the sound source register to be used in the channel, select the back sound source register in place of the sound source register in the table (although after replacing the sound source register in the front with the sound source register in the back first, You can perform a dump). As described in step S34 of FIG. 10, when the control parameter, the note-on, and the data of the note-on occurrence time in the register TM are stored in the tone generator register on the back, the data is stored in the reserved area of the tone generator register in the table. , A dump is reserved at a timing corresponding to the occurrence time in the register TM. Therefore, in the tone generation process, when a timing corresponding to the occurrence time in the register TM comes, after the dump is executed, the tone generation process using the back tone generator register instead of the tone generator register in the front is started. Will be.
[0075]
When step S58 ends, the process returns to step S55, and the processing from step S55 is repeated.
On the other hand, if it is determined NO in step S56 (or if it is initially determined to be YES but then it is determined to be NO through steps S57 and S58), the start pointer is set for the sounding channel. All musical tone generation processes from sp to time GT are executed (step S59). Thus, the generation of the musical tone data over the musical tone generation area for the generation amount SR is completed for the sound generation channel.
[0076]
Subsequently, it is determined whether or not all the tone generation processes have been completed for the number of sounding channels determined in step S53 (step S60). If NO, the channel number of the sounding channel whose operation order is the next order is stored in the register i, and the start pointer sp is set to the time ST (step S61). Then, the process returns to step S55, and the processing from step S55 is repeated. On the other hand, if it is determined to be yes in step S60 (or if it is initially determined to be no, but then it is determined to be yes by repeating steps S55 and thereafter), the tone generation process is terminated and step S62 is performed. Proceed to. Accordingly, if the number of soundable channels that can be generated is less than the number of sounding channels for which sound assignment processing has been performed, the tone generation processing for sounding channels with a slower calculation order is omitted. The number will be reduced.
[0077]
In step S62, the tone data (or the tone data obtained by adding an appropriate effect to the accumulated tone data) for each of the accumulated sound channels is stored in the tone generating area (set in step S52) on the output buffer. Write. Subsequently, a time obtained by adding the length of the generation amount SR to the time ST is set as a new time ST (step S63). This new time ST becomes a calculation start position when the next “sound source processing 1” is executed. In the following step S264, the magnitude of the volume envelope of the sounding channel for which the note-off has occurred this time is gradually reduced to zero. Subsequently, it is determined whether or not the tone data for one output buffer has been completed (step S65). If no, return. On the other hand, if the answer is yes, the output buffer is separated from the other output buffers connected to the output buffer by "sound source processing 2" described later, and the reproduction is reserved for the "output device" (step S66). And return.
[0078]
As another example of steps S50 and S51, the result of "GT-ST" can be set as SR as it is. In this case, as in the example of FIG. 5 in the above [Measures 1], if the tone generation processing is not started because the internal interrupt signal is not generated at any occasion, the ungenerated music at that opportunity is not activated. All the tone data is generated immediately after the occurrence of the internal interrupt signal. Even if the internal interrupt signal is not generated several times in one frame, the generation of the tone data for one output buffer is completed in the frame only by the opportunity of the generation of the internal interrupt signal. Is prevented from occurring. Further, musical tone data not generated at an opportunity where an internal interrupt signal has not been generated may be distributed and generated at a plurality of occasions at which an internal interrupt signal has subsequently been generated, as shown in the example of FIG. As described in the above [Measure 1], it may be generated gradually by the last opportunity in the frame.
[0079]
Another example of the method of determining the number of sounding channels in step S53 may be as follows. First, the calculation time required to generate the musical tone data for the generation amount SR in one sounding channel and the current calculation possible time EJ (the calculation end time SJ which is the next time when the internal interrupt signal is scheduled to be generated, Based on the calculation start time KJ, which is the time at which the internal interrupt signal was actually generated this time, the number of tone generation channels in which the generation amount SR can be generated within the time EJ is calculated. If the calculated number of sound channels that can be generated is equal to or greater than the number of sound channels to which sound is assigned in the note-on event processing (FIG. 10), the tone data is generated with the number of sound channels to which the sound is assigned. Is determined as the number of sounding channels to be played. On the other hand, if the calculated number of sound channels that can be generated is less than the number of sound channels to which sound is assigned, the number of sound channels that can be generated is determined as the number of sound channels that generate musical sound data (that is, [measures] As described in [1], generation of musical tone data for one output buffer is ensured in one frame by reducing the number of tone generation channels for generating musical tone data).
[0080]
Returning to the description of FIG. 8, when it is determined in step S5 that the activation factor {circle around (4)} has occurred, "sound source processing 2" is executed (step S10), and a predetermined state is displayed on the panel (step S10). Step S11). Then, the process returns to step S3, and the processing from step S3 is repeated.
"Sound source processing 2" also forms part of the musical sound generation processing. The “sound source processing 2” is executed based on a request generated by executing the “output device” (that is, the external interrupt processing by the DMAC 11).
[0081]
FIG. 13 is a flowchart showing an example of the external interrupt processing by the DMAC 11. This external interrupt processing is executed by the DMAC 11 at the timing of sending the musical sound data to the sound I / O 12 by one sample (reproduction sampling cycle of the sound I / O 12), and is stored in the output buffer by this processing. One frame of musical sound data is read out one sample at a time in the reproduction sampling period and supplied to the sound I / O 12. This corresponds to the processing of the “output device” in FIG. That is, the "output device" which is a driver of the OS receives the musical sound data given from the software sound source to the interface for waveform input ("wave API"), and sends it to external hardware, that is, the sound I / O12. It supports output processing.
First, the output buffer currently being read (the output buffer pointed by the pointer PB) among the output buffers that are reserved for reproduction in the “output device” by “initial processing” (FIG. 9) or “sound source processing 1” (FIG. 12). The tone data (the tone data pointed by the pointer pp) for one sample currently being read out in the parentheses is sent to the sound I / O 12 (step S71). Subsequently, the pointer pp is advanced by one sample (step S72), and it is determined whether or not all the tone data in the output buffer has been sent to the sound I / O 12 (ie, whether or not the reproduction process for the output buffer has been completed). A determination is made (step S73). If no, return.
[0082]
On the other hand, if YES is determined in the step S73, it is determined whether or not there is a reproduction reservation of the next output buffer (step S74). This corresponds to a process of accessing the interface (“wave API”) from the “output device” via the OS, that is, a process involving the OS.
Even if the output buffer to which the tone data generated in the tone generation process has been written is not yet reserved for playback, the start of the tone generation process has been delayed due to the influence of some other process. If there is an output buffer (an output buffer previously reserved for reproduction in the “initial setting” (FIG. 9) or an output buffer already reserved for reproduction in the sound source processing 1), all the reproduction processing is completed. Is determined to be YES in step S74, the process proceeds to step S75, and the pointer PB is advanced to the output buffer. As a result, as described in [Measure 3], the allowable range of the activation time of the tone generation processing for preventing the sound cutoff due to the delay of the tone generation processing is expanded. In step S76 following step S75, a request is issued to return the output buffer that has completed the reproduction process to the "sound source processing 2" routine. And return.
[0083]
On the other hand, since the start of the tone generation processing is greatly delayed, even in the section where the reproduction processing of the output buffer already reserved for reproduction has been completed, the output in which the tone data generated by the tone generation processing is completed is written. If the buffer has not been reserved for reproduction yet, it is determined as NO in step S74, and the process proceeds to step S77. In step S77, the output of the sound I / O 12 is muted in order to prevent generation of a noise sound. Subsequently, in step S78, a reset request (request for resetting the tone generation process) is issued to "sound source process 2". And return.
[0084]
FIG. 14 is a flowchart illustrating an example of “sound source processing 2” based on a return request from the “output device” (step S76 in FIG. 13). First, the output buffer returned from the "output device" is received (step S81). Subsequently, the output buffer is cleared, and the output buffer is connected after the output buffer already held by the musical sound generation processing (step S82). This connection means that the output buffers are virtually connected in order and handled as one large buffer. Therefore, it is not necessary to have those output buffers in areas physically adjacent to each other in the RAM 5. In step S83 following step S82, in order to confirm whether there is a time lag between the tone generation process and the "output device" and correct the operation of the tone generation process, a return request from the "output device" is issued. Create timing data. And return.
[0085]
FIG. 15 is a flowchart illustrating an example of “sound source processing 2” based on a reset request from the “output device” (step S78 in FIG. 13). First, all the data in the tone generator register for each sounding channel and the data in the output buffer of the RAM 5 are cleared (step S91). Subsequently, as in steps S23 to S25 of "initial setting" (FIG. 9), the "output device" is initialized (step S92), and the reproduction of the four output buffers whose data has been cleared is set to the "output device" again. A reservation is made (step S93), and the “output device” is activated, and the soft timer is started (step S94). And return.
[0086]
As described above, in the “sound source processing 2” based on the reset request, if the output buffer is not reserved for reproduction in the “output device”, as described in [Measures 4], the tone generation processing is executed before that. The tone generation process that has been performed is aborted, and the advance reservation of reproduction of the cleared output buffer is performed again to the “output device”, and then the tone generation process is started based on the MIDI message supplied thereafter. A new tone generation process has begun. As a result, even if the musical tone is temporarily disturbed because the reproduction reservation cannot be made in time, the operation immediately returns to the stable musical tone generating operation, so that the noise can be minimized.
[0087]
Returning to step S5 in FIG. 8, when it is determined that the activation factor (5) has occurred, a command process corresponding to the request is executed (step S12), and a display corresponding to the request is displayed on the panel (step S12). Step S13). Then, the process returns to step S3, and the processing from step S3 is repeated.
On the other hand, if it is determined that the activation factor (6) has occurred, a predetermined process for terminating the main routine of the sound source plug-in software PIS is executed in step S14 (for example, when the software sound source program is used). The memory of the RAM 5 that has been used is released), and a predetermined screen erasing process is performed (step S15).
[0088]
If it is determined in step S5 that two or more activation factors among the activation factors (1) to (6) occur simultaneously, as described above, the activation factor (2) is minimized. Priority, activation factors (3) and (4) are the next priority, activation factors (1) and (5) are the next priority, and activation factor (6) is the lowest priority. It shall be processed according to the order. No particular priority is given between the activation factors (3) and (4), and they are equal. Also, no special priority is given between the activation factors (1) and (5), and they are equal. Steps S3 to S5 virtually show task management in the pseudo multitasking process. In practice, while executing the process based on the occurrence of any one of the activation factors, the process is executed. When another activation factor having a higher priority is generated, another process is executed by an interrupt (for example, while the “sound source process 1” is being executed based on the occurrence of the activation factor (3), The execution of “MIDI processing” by an interrupt due to the occurrence of the factor (2)) may occur.
By the way, for example, if the activation factor (5) or (6) having a lower priority is generated during the execution of “sound source processing 1” based on the occurrence of the activation factor (3), The activation for the activation factor (5) or (6) must wait until one "sound source process 1" based on the occurrence of the activation factor (3) is completed. However, by appropriately determining the generation amount SR corresponding to one activation as a function of the delay amount OR according to an appropriate function as shown in FIG. 19 or FIG. 20, even when the delay amount OR is large, Since one “sound source process 1” based on the occurrence of the activation factor (3) does not excessively occupy the processing time, the probability of obstructing the process corresponding to the activation factor with a low priority is reduced, and the effect is reduced. is there.
[0089]
Next, a modified example of the above embodiment will be described.
When an advanced application program (for example, a WWW browser) is used as the application software APS, for example, during execution of the application software APS, there may be one that can simultaneously access, for example, two homepages on the Internet. In such a case, music software may be reproduced on both of the two homepages being accessed. Then, the software sound source program plugged into the application program is started up in duplicate, and an abnormal operation may occur.
[0090]
As one measure for preventing such an abnormal operation beforehand, in a program of a software sound source, when a call from the application program is received, it is determined whether the program of the software sound source is already being executed, If it is already being executed, a process that does not accept a later call may be performed. As a result, the waveform generation process that has been started first can be preferentially performed without the software sound source program plugged in to the application program being started redundantly.
FIG. 22 shows a modification of FIG. 8 that can be employed to implement the above measures. FIG. 22 differs from FIG. 8 in that steps S18, S19, and S20 are provided before step S1, and the rest is the same. In step S18, it is determined whether this plug-in software for sound source PIS has already been opened. If the sound source plug-in software PIS is opened for the first time this time, the determination is NO, and the process proceeds to step S19 to load the main body program of the sound source plug-in software PIS into the memory. Thereafter, the process proceeds to step S1, and the same processing as in FIG. 8 is performed. On the other hand, if the plug-in software PIS for the sound source is already open, step S18 is YES, and the process goes to step S20 to display "cannot open" on the display 9 and ends the processing. In this way, it is possible to prioritize and execute the waveform generation process that has been activated first.
[0091]
As another countermeasure therefor, in a program of the software sound source, when a call from the application program is received, it is determined whether or not the program of the software sound source is already being executed. The process may be stopped and a later call may be accepted. As a result, the waveform generation process that is being executed first is stopped without executing the software sound source program plugged in to the application program redundantly, and the waveform generation process that is called later is executed with priority. be able to.
FIG. 23 shows a modification of FIG. 8 that can be employed to implement the above measures. 23 is different from FIG. 8 in that steps S18, S19, and S200 are provided before step S1, and the others are the same. The processing in steps S18 and S19 is the same processing as in FIG. In FIG. 23, if the sound source plug-in software PIS has already been opened, the process proceeds from YES in step S18 to step S200, and the performance sequence of the currently playing music is forcibly terminated. afterwards. Go to step S1, and perform the same processing as in FIG. In this way, it is possible to suspend the waveform generation process that is being executed first, and give priority to the waveform generation process that is called later.
[0092]
As another countermeasure therefor, in a software sound source program, when a call from the application program is received, it is determined whether or not the software sound source program is already being executed. Or a process for accepting a later call may be performed so as to be selectable. In this case, the selection may be made by displaying an icon for selection on the display screen and allowing the operator to select one of the icons, or in an automatic performance data file to be reproduced or other appropriate data. The selection information may be stored in the area of, and the selection may be made automatically with reference to the selection information. Alternatively, it is possible to automatically select which of the software sound sources is to be used in accordance with the display mode on the display screen (for example, the context of the opened page image, etc.), or to select the software sound source by random selection. May be.
[0093]
In the above embodiment, the program of the sequencer for automatic performance and the program of the software sound source are plugged in as the plug-in software PIS for the sound source. However, only the program of the software sound source may be plugged in. In that case, the sound source plug-in software PIS is configured to generate musical tone waveform sample data corresponding to the MIDI message that is appropriately input.
[0094]
In the above-described embodiment, in [Measure 1], the musical tone data of a predetermined number of samples is generated in one frame as a whole. However, “total” here does not necessarily require that the generation of the tone data of the predetermined number of samples be completed within one frame. In particular, in these embodiments, as shown in FIG. 7, the output buffer in which the musical tone data is written can be reserved for multiple reproductions, so that the musical tone data generation calculation is not completed within one frame. It is also possible to perform an operation to compensate for that in a subsequent frame. This will be described with reference to FIG. 6 as an example. In FIG. 6, ungenerated tone data at an opportunity where an internal interrupt signal has not been generated is generated in time for the last opportunity in one frame. However, even if the music data cannot be generated by the last opportunity, the generation may be carried over to the next frame (for example, the four ungenerated musical tone data may be replaced with the tenth musical data as shown in FIG. 6). Instead of generating all at the opportunity (100 milliseconds), at the tenth opportunity, only the seventh and eighth tone data are generated, and at the opportunity when an internal interrupt signal occurs in the subsequent frames, the remaining It is also possible to generate ninth and tenth musical tone data). As illustrated in FIG. 16, the generation of the ungenerated musical sound data in a certain frame may be carried over to the next frame.
[0095]
In the above-described embodiment, in the MIDI processing such as the note-on event processing and the note-off event processing, control parameters for controlling the tone generation processing and data indicating the note-on and event occurrence times are provided for each sounding channel. Stored in the sound source register. However, instead of storing these control parameters and the like in a separate tone generator register for each tone generation channel, the control parameters and the like are sequentially written in one storage area as a set together with data indicating the channel number of the tone generation channel. It may be. In this case, sequence data is once created based on the supply of the MIDI message, and tone data is generated based on the sequence data.
[0096]
Further, in the above embodiment, in the “sound source processing 2”, the output buffer returned from the “output device” is connected after the output buffer already held by the tone generation processing, and thus the “sound source processing In "1", tone data is generated for each output buffer in the output buffer connected in this manner. However, instead of connecting the output buffers in this manner, the tone data may be generated for each output buffer.
[0097]
In the above embodiment, the reproduction of the four output buffers is reserved in the “output device” prior to the activation of the musical sound generation processing. However, the number of output buffers to be reserved for reproduction in the “output device” prior to the start of the tone generation processing may be other than four. Also, the number of output buffers provided in the RAM 5 may be an appropriate number that is one or more larger than the number of output buffers reserved for reproduction in the “output device” prior to the start of the musical sound generation processing.
[0098]
In the above embodiment, [Measures 1], [Measures 2], [Measures 3] and [Measures 4] are all implemented. However, even if these countermeasures are performed independently of each other, it is possible to prevent a situation in which the sound generation is hindered due to a delay in the activation of the tone generation processing. Therefore, only one of these measures may be implemented, or two or three may be implemented in combination as appropriate.
Further, in the above-described embodiment, in the soft sound source, the generated musical tone waveform data is stored in the output buffer for a maximum of 400 ms and then output. For this reason, if the reproduction timing of other information (for example, background image of karaoke or lyric image information) related to the reproduced music information processed by other software cannot be synchronized, a problem occurs. It is better to take it. For example, the output timing of the MIDI message is set earlier than the output timing of other information (for example, background image of karaoke or lyric image information) to be synchronized with the reproduction music information corresponding to the MIDI message, so that the soft sound source can be used. If the tone generation processing is performed somewhat earlier than the other processing, all the finally required information can be output synchronously.
[0099]
Further, in the above embodiment, the present invention is applied to a software tone generator of a type that causes a CPU to execute a tone generation process of a waveform memory system. However, another suitable tone generation system (for example, an FM synthesis system or the like) may be used. The present invention may be implemented by employing a software sound source program of a type executed by a CPU.
Further, the present invention can be applied not only to a software sound source in which a musical tone generation process is executed by a CPU of a personal computer (that is, a general-purpose computer), but also to a dedicated tone generating device or other specialized equipment. The present invention can be applied to a system including a software sound source that causes a musical tone generation process to be executed by a CPU of a computer mounted in an appropriate device. The performance information on which the waveform data is generated is not necessarily limited to MIDI form information, but may be in other formats.
[0100]
【The invention's effect】
As described above, according to the present invention, it is possible to easily generate sound waveform sample data using a computer simply by incorporating a software sound source program into an application program as a plug-in, and to achieve a special sound source. This has an excellent effect that a board is not required. Also, no matter what computer is used, it is possible to generate sound waveform sample data having a uniform tone characteristic according to the plug-in software tone generator program, regardless of the hardware configuration.
Also, since the software sound source program plugged into the application program is prioritized or selectively processed so as not to be started repeatedly, abnormal operation can be prevented. .
[0101]
Further, according to the present invention, a start command generating means is provided in the main control unit (CPU 3) of the computer, and an opportunity to start the waveform data generation processing is set a plurality of times within a predetermined time. A start instruction is generated only at an occasion when the program of the software sound source may be actually executed, whereby the main control unit actually executes the program of the software sound source in consideration of the execution status of another program. The start instruction can be generated only at a good opportunity, and the program of the software sound source and the other programs can be appropriately time-divisionally controlled and executed in parallel. Only when the waveform data generation process is actually started in response to the instruction, the total number of samples within the predetermined time Since the adjustment processing means for adjusting the waveform data generation processing is provided so as to generate the waveform data of the above, the start command is not generated in some of a plurality of start opportunities set within a predetermined time. Even if only the opportunity to actually start the waveform data generation processing in response to the start command is used, control is performed so that the generation of the sound waveform data for the predetermined number of samples is completed within the predetermined time in total. Can solve the problem of pronunciation delay. Therefore, even when the sound waveform data generation processing by the software sound source and the processing of other software are performed in parallel on an OS that does not have a complete multitasking function, the processing of the sound waveform data generation processing and the processing of other software are not affected. This has an excellent effect that it can be prevented from occurring. In other words, even if the number of activation instructions of the sound waveform data generation process is relatively reduced due to the influence of the processing of other software, generation of the sound waveform data for a predetermined number of samples is completed within the above predetermined time. As a result, troubles such as delay in sound generation do not occur. Conversely, by not performing the sound waveform data generation processing in a fixed time-division processing time, the execution of the processing of other software is not hindered by the sound waveform data generation processing, so that there is no problem that the processing is delayed. can do.
[0102]
In that case, at the time corresponding to each start instruction, the amount of waveform data to be generated according to one start instruction at the time is determined as a function of the unprocessed amount of the waveform data to be generated and processed up to that time. By executing the process of generating the waveform data for the determined waveform data amount in accordance with the one start instruction, the above function is appropriately determined, so that the unprocessed amount of the waveform data to be generated and processed is determined. In view of this, the amount of waveform data to be generated according to one start instruction can be appropriately determined, and the processing of the software tone generator corresponding to the one start instruction occupies the work of the main control unit. It is possible to control so that the probability that the execution of the process is hindered is made as low as possible.
[Brief description of the drawings]
FIG. 1 is a diagram schematically showing a software system configuration of an embodiment according to the present invention.
FIG. 2 is a block diagram showing an example of a communication network connected to the software system.
FIG. 3 is an overall block diagram showing a hardware configuration example of a sound source system according to an embodiment of the present invention.
FIG. 4 is an exemplary view for explaining an outline of a musical sound generation process by software employed as an example of the present invention;
FIG. 5 is an explanatory diagram showing an example of [measures 1] that can be adopted in an embodiment of the present invention.
FIG. 6 is an explanatory diagram showing another example of [Measure 1] that can be adopted in an embodiment of the present invention.
FIG. 7 is an explanatory view showing an example of [Measure 3] that can be adopted in an embodiment of the present invention.
FIG. 8 is a flowchart showing an example of a main routine of a software sound source program executed by the CPU of FIG. 3;
FIG. 9 is a flowchart illustrating an example of an initial setting process in FIG. 8;
FIG. 10 is a flowchart illustrating an example of a note-on event process executed in the MIDI process in FIG. 8;
FIG. 11 is a flowchart illustrating an example of a note-off event process executed in the MIDI process in FIG. 8;
FIG. 12 is a flowchart illustrating an example of a sound source process 1 in FIG. 8;
FIG. 13 is a flowchart illustrating an example of interrupt processing by the DMA controller of FIG. 3;
FIG. 14 is a flowchart showing an example of the sound source processing 2 of FIG. 8 executed based on a return request from the DMA controller of FIG. 3;
FIG. 15 is a flowchart showing an example of the sound source processing 2 of FIG. 8 executed based on a reset request from the DMA controller of FIG. 3;
FIG. 16 is a view showing still another example of [Countermeasure 1] which can be employed in the embodiment of the present invention, and showing an example of a relationship between generation of an internal interrupt signal and a generation amount of musical sound data. .
FIG. 17 is a diagram schematically showing an example of information exchange between application software and sound source plug-in software according to an embodiment of the present invention.
FIG. 18 is a view showing an example of a control panel screen which is displayed and controlled by the application software in accordance with input image information given from the sound source plug-in software.
FIG. 19 is a diagram illustrating an example of a characteristic of a function when determining the generation amount SR as a function of the delay amount OR.
FIG. 20 is a diagram showing another example of the characteristics of the function when determining the generation amount SR as a function of the delay amount OR.
FIG. 21 is a diagram illustrating an example of a characteristic of a function when determining the number of sounding channels as a function of a delay amount OR.
FIG. 22 is a flowchart showing a modification of FIG. 8;
FIG. 23 is a flowchart showing another modification of FIG. 8;
[Explanation of symbols]
APS application software
Plug-in software for PIS sound source
FMD Fake MIDI Driver
1 Network I / O
2 Timer
3 CPU
4 ROM
5 RAM
6 Data and address bus
7 mouse
8 Keyboard
9 Display
10 Hard disk drive
11 DMAC
12 Sound I / O
13 Sound system

Claims (12)

所定のオペレーティングシステムと該オペレーティングシステム上で動く所定のアプリケーションプログラムとを搭載したコンピュータを用いて、音波形サンプルデータを生成するための音源システムであって、
前記オペレーティングシステムに備わった波形入力用インタフェース及び波形出力用のプログラムを具備すると共に、前記アプリケーションプログラムにプラグインされたソフトウェア音源のプログラムを具備し
前記コンピュータは、前記ソフトウェア音源のプログラムとその他のプログラムを並行して実行する制御を行うメイン制御部を有し、このメイン制御部は、所定時間内の複数回の起動機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会に起動命令を発生する起動命令発生手段を具備しており、
前記ソフトウェア音源において、前記起動命令に応じて波形サンプルデータ生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、波形サンプルデータ生成処理を調整する調整処理手段を具備しており、
前記メイン制御部による前記アプリケーションプログラムの実行に応じて該アプリケーションプログラムから与えられる命令に従って前記起動命令発生手段が前記起動命令を発生して前記ソフトウェア音源のプログラムを起動させ、この起動に応じて前記メイン制御部が該ソフトウェア音源のプログラムを実行することで波形サンプルデータを生成する処理を行なうと共にこの生成した波形サンプルデータを前記波形入力用インタフェースに出力し、この波形サンプルデータ生成処理は前記調整処理手段により通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように調整され、
前記コンピュータが前記オペレーティングシステムに備わった前記波形出力用のプログラムを実行することで前記波形入力インタフェースを介して与えられる前記生成済みの波形サンプルデータを外部に出力する
ことを特徴とするコンピュータソフトウェアを用いた音源システム。
Using a computer with a predetermined application program running on a given operating system and the operating system, a tone generator system for generating waveform sample data of the sound,
A waveform input interface and a waveform output program provided in the operating system, and a software sound source program plugged into the application program is provided .
The computer has a main control unit that performs control for executing the program of the software sound source and other programs in parallel, and the main control unit is configured to execute the software sound source among a plurality of startup opportunities within a predetermined time. A start command generating means for generating a start command at a chance to actually execute the program,
In the software sound source, waveform sample data generation processing is performed such that the waveform sample data for a predetermined number of samples is generated within the predetermined time as a total only at the opportunity of actually starting the waveform sample data generation processing in response to the start instruction. An adjustment processing means for adjusting the processing;
Said in response to the execution of the application program by the main control unit the activation command generating means in accordance with instructions given et al is from the application program to generate the activation command activates the software tone generator program, the response to the start the main control unit outputs a waveform sample data this product with performing a process of generating waveform sample data by executing the software tone generator program to the waveform input interface, the waveform sample data generating process is the The adjustment processing means is adjusted so as to generate a predetermined number of waveform sample data within the predetermined time as a total,
Outputting the waveform sample data of the already generated given via the waveform input interface by the computer executes the program for the waveform output provided to the operating system to the outside
Tone generator system using computer software, characterized in that.
前記アプリケーションプログラムにプラグインされた自動演奏用シーケンサのプログラムを更に具備し、前記メイン制御部による該シーケンサのプログラムの実行によって自動的に発生すべき楽音を指示する命令が与えられこの命令に基づき前記メイン制御部により前記ソフトウェア音源のプログラムが実行されることで、前記指示された楽音の音波形サンプルデータを生成することを特徴とする請求項1に記載のコンピュータソフトウェアを用いた音源システム。Wherein further comprising a plugged-in the automatic performance sequence program to the application program, automatically given a command instructing a tone to be generated by the execution of the sequencer program by the main control unit, on the basis of this instruction 2. The sound source system using computer software according to claim 1, wherein the program of the software sound source is executed by the main control unit to generate sound waveform sample data of the specified musical sound. 前記メイン制御部は、前記アプリケーションプログラムから前記ソフトウェア音源のプログラムの呼び出しがあったとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば後からの呼び出しを受け付けない処理を行うものである請求項1又は2に記載のコンピュータソフトウェアを用いた音源システム。 The main control unit, when there is a call of the program of the software sound source from the application program, determines whether the program of the software sound source is already running, if the call is already running, the later call 3. A sound source system using the computer software according to claim 1, wherein the sound source system performs a process not accepted. 前記メイン制御部は、前記アプリケーションプログラムから前記ソフトウェア音源のプログラムの呼び出しがあったとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば該実行中の処理を中止し、後からの呼び出しを受け付けて該ソフトウェア音源のプログラムを実行するものである請求項1又は2に記載のコンピュータソフトウェアを用いた音源システム。 The main control unit determines whether the software sound source program is already being executed when the application sound program is called from the application program. 3. The sound source system using the computer software according to claim 1, wherein the program of the software sound source is executed by stopping the program and receiving a later call. 前記メイン制御部は、前記アプリケーションプログラムから前記ソフトウェア音源のプログラムの呼び出しがあったとき、該ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば、後からの呼び出しを受け付けない処理を行うか、又は、該実行中の処理を中止して後からの呼び出しを受け付ける処理を行うか、のどちらかを選択可能に実行するものである請求項1又は2に記載のコンピュータソフトウェアを用いた音源システム。 The main control unit, when from the application program a call of the software tone generator program, to determine whether the software tone generator program is already running, if already running, calling later 3. The method according to claim 1, wherein a process that does not accept the request is performed, or a process that accepts a later call by stopping the process in execution is performed so as to be selectable. 4. Sound source system using computer software. 前記調整処理手段は、各起動命令に対応する時点において、その時点までに生成処理すべき波形サンプルデータの未処理量の関数として、該時点の1起動命令に応じて生成すべき波形サンプルデータの量を決定するものであり、前記ソフトウェア音源において、該決定されたデータ量分の波形サンプルデータを生成する処理を、該1起動命令に応じて実行するようにした請求項1乃至5のいずれかに記載のコンピュータソフトウェアを用いた音源システム。At the time corresponding to each start instruction, the adjustment processing means determines, as a function of the unprocessed amount of the waveform sample data to be generated and processed up to that time, the waveform sample data to be generated in response to one start instruction at the time. 6. The software sound source according to claim 1, wherein the software sound source executes a process of generating waveform sample data corresponding to the determined data amount in response to the one start instruction . A sound source system using the computer software according to 1. 所定のオペレーティングシステムと該オペレーティングシステム上で動く所定のアプリケーションプログラムとを搭載したコンピュータを用いて、音波形サンプルデータを生成するための方法であって、
前記コンピュータのメモリに、前記アプリケーションプログラムにプラグインされるソフトウェア音源のプログラムを記憶させる処理と、
前記コンピュータの制御部による前記アプリケーションプログラムの実行中に、前記プラグインされたソフトウェア音源のプログラムを呼び出す処理と、
前記アプリケーションプログラムからの呼び出しに応じて、前記コンピュータ制御部により前記ソフトウェア音源のプログラムを起動させる処理であって、所定時間内の複数の起動機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会に起動命令を発生するものと、
前記起動命令に応じて起動された前記ソフトウェア音源のプログラムを前記コンピュータの制御部により実行することによって、再生すべき音を指示する演奏データを受け付けるステップと、受け付けた演奏データに基づき、1回の起動機会毎に複数サンプリング周期分のサンプルの音波形サンプルデータをまとめて生成し、生成した複数サンプリング周期分のサンプルの音波形サンプルデータを出力バッファに一時蓄積するステップと、前記起動命令に応じて前記音波形サンプルデータの生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、前記音波形サンプルデータの生成処理を調整するステップと、出力デバイスのプログラムを起動するステップとを含む処理を、前記コンピュータの制御部に実行させることと、
起動された前記出力デバイスのプログラムを前記コンピュータの制御部により実行することによって、前記出力バッファに一時蓄積された音波形サンプルデータを所定の再生サンプリングクロックに従って読み出し、外部に対して出力する処理を、前記コンピュータの制御部に実行させることと
を具備する方法。
A method for generating sound waveform sample data using a computer equipped with a predetermined operating system and a predetermined application program running on the operating system,
A process of storing a program of a software sound source plugged into the application program in a memory of the computer;
During the execution of the application program by the control unit of the computer, a process of calling a program of the plug-in software sound source,
In response to a call from the application program, a process of activating the software sound source program by the computer control unit , among a plurality of activation opportunities within a predetermined time, the software sound source program is actually executed. One that issues a startup command at a good opportunity ,
A step of receiving performance data indicating a sound to be reproduced by executing the program of the software sound source started in response to the start command by the control unit of the computer, and performing one time based on the received performance data. generated together sound waveform sample data of the sample of plural sampling periods for each starting occasion, the steps of temporarily storing the generated plurality sampling periods output buffer sound waveform sample data of the sample, depending on the activation instruction Adjusting the generation processing of the sound waveform sample data so as to generate the waveform sample data for the predetermined number of samples within the predetermined time as a whole only at the opportunity of actually starting the generation processing of the sound waveform sample data. If, processing including the step of activating the program output device And that the, to be executed by the control unit of the computer,
By executing the activated program of the output device by the control unit of the computer, a process of reading out the sound waveform sample data temporarily stored in the output buffer according to a predetermined reproduction sampling clock, and outputting the readout to the outside, Causing the control unit of the computer to execute.
所定のオペレーティングシステムと該オペレーティングシステム上で動く任意のアプリケーションプログラムとを搭載したコンピュータを用いて、音波形サンプルデータを生成するための方法であって、
前記コンピュータのメモリに、前記アプリケーションプログラムにプラグインされる自動演奏用シーケンサ及びソフトウェア音源のプログラムを記憶させる処理と、
前記コンピュータの制御部による前記アプリケーションプログラムの実行中に、前記プラグインされた自動演奏用シーケンサ及びソフトウェア音源のプログラムを呼び出す処理と、
前記アプリケーションプログラムからの呼び出しに応じて、前記コンピュータ制御部により前記自動演奏用シーケンサ及びソフトウェア音源のプログラムを起動させる処理であって、所定時間内の複数の起動機会のうち、前記ソフトウェア音源のプログラムを実際に実行してよい機会に該ソフトウェア音源のプログラムの起動命令を発生するものと、
起動された前記自動演奏用シーケンサ及びソフトウェア音源のプログラムを前記コンピュータの制御部により実行することによって、自動演奏データを受け付けるステップと、受け付けた自動演奏データの再生イベントに従って再生べき音を指示する演奏データを順次提供するステップと、提供された演奏データに基づき、前記起動命令に応じた前記ソフトウェア音源のプログラムの1回の起動機会毎に複数サンプリング周期分のサンプルの音波形サンプルデータをまとめて生成し、生成した複数サンプリング周期分のサンプルの音波形サンプルデータを出力バッファに一時蓄積するステップと、前記起動命令に応じて前記音波形サンプルデータの生成処理を実際に起動した機会だけで、通算として前記所定時間内に所定サンプル数分の波形サンプルデータを生成させるように、前記音波形サンプルデータの生成処理を調整するステップと、出力デバイスのプログラムを起動するステップとを含む処理を、前記コンピュータの制御部に実行させることと、
起動された前記出力デバイスのプログラムを前記コンピュータの制御部により実行することよって、前記出力バッファに一時蓄積された音波形サンプルデータを所定の再生サンプリングクロックに従って読み出し、外部に対して出力する処理を、前記コンピュータの制御部に実行させることと
を具備する方法。
A method for generating sound waveform sample data using a computer equipped with a predetermined operating system and an arbitrary application program running on the operating system,
Processing for storing a program of an automatic performance sequencer and a software sound source plugged into the application program in a memory of the computer;
A process of calling the plugged-in automatic performance sequencer and software sound source program during execution of the application program by the control unit of the computer;
In response to a call from the application program, said a process of activating the automatic performance sequencer and software tone generator program by the computer control unit, among the plurality of activation opportunities within a predetermined time, the software tone generator program Generating a start instruction of the program of the software sound source at an opportunity that may be actually executed ;
A step of receiving the automatic performance data by executing the program of the activated automatic performance sequencer and the software sound source by the control unit of the computer; and performance data indicating a sound to be reproduced in accordance with a reproduction event of the received automatic performance data. Sequentially, and, based on the provided performance data, collectively generate sound waveform sample data of samples for a plurality of sampling periods at each one start opportunity of the program of the software sound source according to the start instruction. Temporarily storing the generated sound waveform sample data of the samples for a plurality of sampling periods in an output buffer, and only at the opportunity of actually starting the processing of generating the sound wave sample data in response to the start command, as a whole Waveforms for a specified number of samples within a specified time As to generate sample data, and be executed and adjusting the production process of the sound waveform sample data, the processing comprising the steps of starting the program output device, the control unit of the computer,
By executing the program of the activated output device by the control unit of the computer, a process of reading out the sound waveform sample data temporarily stored in the output buffer according to a predetermined reproduction sampling clock, and outputting the readout to the outside, Causing the control unit of the computer to execute.
前記アプリケーションプログラムから呼び出しを受けたとき、前記ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば後からの呼び出しに応じて前記ソフトウェア音源のプログラムを起動しないようにする処理を前記コンピュータの制御部に実行させることを更に具備する請求項7又は8に記載の方法。Upon receiving a call from the application program, determine whether the software sound source program is already running, and if not already running, do not start the software sound source program in response to a later call. The method according to claim 7 , further comprising causing a control unit of the computer to execute the processing to be performed . 前記アプリケーションプログラムから呼び出しを受けたとき、前記ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば該実行中の処理を中止し、後からの呼び出しに応じて前記ソフトウェア音源のプログラムを起動する処理を前記コンピュータの制御部に実行させることを更に具備する請求項7又は8に記載の方法。When a call is received from the application program, it is determined whether the program of the software sound source is already being executed. The method according to claim 7 , further comprising causing a control unit of the computer to execute a process of activating a program of a software sound source. 前記アプリケーションプログラムから呼び出しを受けたとき、前記ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば該実行中の処理を一時中止し、後からの呼び出しに応じて前記ソフトウェア音源のプログラムを起動する処理を前記コンピュータの制御部に実行させることと、
その後、前記アプリケーションプログラムかのら呼び出しに応じて前記一時中止した処理を再開する処理を前記コンピュータの制御部に実行させること
を更に具備する請求項7又は8に記載の方法。
When a call is received from the application program, it is determined whether the software sound source program is already being executed.If the program is already being executed, the currently executing process is temporarily stopped. Causing the control unit of the computer to execute a process of activating a program of the software sound source;
9. The method according to claim 7 , further comprising: causing the control unit of the computer to execute a process of resuming the suspended process in response to a call from the application program.
前記アプリケーションプログラムから呼び出しを受けたとき、前記ソフトウェア音源のプログラムが既に実行中であるかどうかを判定し、既に実行中であれば、後からの呼び出しに応じて前記ソフトウェア音源のプログラムを起動しないようにするか、又は、該実行中の処理を中止して後からの呼び出しに応じて前記ソフトウェア音源のプログラムを起動するか、の選択を行う処理を前記コンピュータの制御部に実行させることを更に具備する請求項7又は8に記載の方法。Upon receiving a call from the application program, determine whether the software sound source program is already running, and if it is already running, do not start the software sound source program in response to a later call Or causing the control unit of the computer to execute a process of selecting whether to stop the process being executed and start the program of the software sound source in response to a later call. The method according to claim 7 or 8 , wherein
JP01967697A 1996-01-17 1997-01-17 Sound source system and method using computer software Expired - Fee Related JP3572847B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01967697A JP3572847B2 (en) 1996-01-17 1997-01-17 Sound source system and method using computer software

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP8-24748 1996-01-17
JP2474896 1996-01-17
JP01967697A JP3572847B2 (en) 1996-01-17 1997-01-17 Sound source system and method using computer software

Publications (2)

Publication Number Publication Date
JPH09258736A JPH09258736A (en) 1997-10-03
JP3572847B2 true JP3572847B2 (en) 2004-10-06

Family

ID=26356523

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01967697A Expired - Fee Related JP3572847B2 (en) 1996-01-17 1997-01-17 Sound source system and method using computer software

Country Status (1)

Country Link
JP (1) JP3572847B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1555772A3 (en) 2004-01-15 2013-07-17 Yamaha Corporation Remote control method of external devices
JP2005317114A (en) 2004-04-28 2005-11-10 Sony Corp Information processor, information processing method, and program
US8688804B2 (en) 2005-09-26 2014-04-01 Samsung Electronics Co., Ltd. Apparatus and method for transmitting sound information in web-based control system
JP5039157B2 (en) * 2010-02-05 2012-10-03 株式会社東芝 Information processing apparatus and effect program

Also Published As

Publication number Publication date
JPH09258736A (en) 1997-10-03

Similar Documents

Publication Publication Date Title
US5895877A (en) Tone generating method and device
EP0827132A1 (en) Sound source system based on computer software and method of generating acoustic waveform data
US6140566A (en) Music tone generating method by waveform synthesis with advance parameter computation
JP3293434B2 (en) Tone generation method
JPH09179556A (en) Method and device for musical tone generation
US5770812A (en) Software sound source with advance synthesis of waveform
JP2970526B2 (en) Sound source system using computer software
JP3572847B2 (en) Sound source system and method using computer software
JP3221314B2 (en) Musical sound synthesizer and method
KR100302626B1 (en) Sound generating device and method
JP3152198B2 (en) Music sound generation method and music sound generation device
JP3781171B2 (en) Music generation method
JP3405181B2 (en) Musical tone generation method
JP4096952B2 (en) Music generator
JP3003559B2 (en) Music generation method
JP3632744B2 (en) Sound generation method
JP3223827B2 (en) Sound source waveform data generation method and apparatus
JP3705203B2 (en) Music generation method
JP3627590B2 (en) Sound generation method
JP3139490B2 (en) Music generating apparatus and method
JP2005292858A (en) Method and device for musical sound generation
JP2000293173A (en) Musical sound generating device and recording medium where musical sound generation processing program is recorded

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20031224

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040227

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040621

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

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20090709

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100709

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20100709

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20110709

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20120709

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20130709

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees