JP6452234B2 - Musical sound generator and program - Google Patents

Musical sound generator and program Download PDF

Info

Publication number
JP6452234B2
JP6452234B2 JP2014234395A JP2014234395A JP6452234B2 JP 6452234 B2 JP6452234 B2 JP 6452234B2 JP 2014234395 A JP2014234395 A JP 2014234395A JP 2014234395 A JP2014234395 A JP 2014234395A JP 6452234 B2 JP6452234 B2 JP 6452234B2
Authority
JP
Japan
Prior art keywords
sound
waveform data
waveform
remaining
data
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.)
Active
Application number
JP2014234395A
Other languages
Japanese (ja)
Other versions
JP2016099408A (en
Inventor
大地 阪上
大地 阪上
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Korg Inc
Original Assignee
Korg Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Korg Inc filed Critical Korg Inc
Priority to JP2014234395A priority Critical patent/JP6452234B2/en
Publication of JP2016099408A publication Critical patent/JP2016099408A/en
Application granted granted Critical
Publication of JP6452234B2 publication Critical patent/JP6452234B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

本発明は、汎用CPUを音源に用いた電子楽器音源(ソフトウエア音源)等に係わり、特に楽音発生を遅延なく行うことを可能にする改良に関する。   The present invention relates to an electronic musical instrument sound source (software sound source) that uses a general-purpose CPU as a sound source, and more particularly to an improvement that enables musical sound generation without delay.

キャッシュメモリを備えた装置(CPU等)を用いて、効率良く楽音発生(PCMデータの読み出し)を行う手法について以下のような提案がなされている。例えば、特許文献1に記載の楽音発生装置は次のようなものである。波形テーブル合成処理部において、左チャンネル、右チャンネルおよびリバーブ用の3系統の波形データが1サンプル分ずつ繰り返し演算生成されることより、複数サンプル分の波形データが纏めて演算生成される。   The following proposals have been made for a technique for efficiently generating musical sounds (reading PCM data) using a device (such as a CPU) having a cache memory. For example, the musical tone generator described in Patent Document 1 is as follows. In the waveform table synthesis processing unit, the waveform data for the left channel, the right channel, and the reverb are repeatedly calculated and generated for each sample, so that waveform data for a plurality of samples are calculated and generated collectively.

そして、これらのデータは、出力バッファに1サンプル毎に順次インターリーブされて格納される。このデータにリバーブ演算処理されたデータが足し込まれ、出力すべき波形データが出力バッファに得られる。この構成にあっては、出力バッファにインターリーブされて波形データが格納されているので、キャッシュメモリを搭載したシステムにおいて、キャッシュのヒット率が高くなり高速演算が可能になる(例えば特許文献1参照。)。つまり、複数系列の波形データを1サンプル分ずつインターリーブして出力バッファに格納するというものである。   These data are sequentially interleaved and stored in the output buffer for each sample. The reverb-calculated data is added to this data, and waveform data to be output is obtained in the output buffer. In this configuration, waveform data is stored after being interleaved in the output buffer. Therefore, in a system equipped with a cache memory, the cache hit rate becomes high and high-speed computation is possible (see, for example, Patent Document 1). ). That is, a plurality of series of waveform data is interleaved by one sample and stored in the output buffer.

また、特許文献2に記載の装置は、第1のメモリの他に、この第1のメモリ(波形メモリ)よりも小容量であるが高速アクセス可能な第2のメモリを備えた装置である。そして、第2のメモリに部分的な波形データを記憶し、第1のメモリと第2のメモリの出力を切り替えて楽音信号形成に利用するために、メモリ切り替手段が設けられている。このメモリ切り替手段の働きにより、通常は、第1のメモリから読み出された波形データに基づき楽音信号を形成するが、この第1のメモリのアクセス時間の時間遅れに見合った時間の間は第2のメモリから波形データを読み出しこれに基づき楽音信号を形成する。   In addition to the first memory, the device described in Patent Document 2 is a device including a second memory that has a smaller capacity than the first memory (waveform memory) but can be accessed at high speed. A memory switching means is provided for storing partial waveform data in the second memory and switching the outputs of the first memory and the second memory to be used for forming a musical sound signal. Due to the function of this memory switching means, a musical tone signal is normally formed based on the waveform data read from the first memory, but during the time commensurate with the time delay of the access time of this first memory. The waveform data is read from the memory 2 and a musical tone signal is formed based on the waveform data.

これによって、第1のメモリのアクセス時間遅れが問題となる短時間の間は、高速アクセス型の第2のメモリによって楽音発生が保証されて、不都合のない実時間演奏が可能になる。つまり、低速の大容量の第1のメモリからの波形データの読み出し遅延時間に見合った時間だけ、高速の小容量の第2のメモリから波形データを読み出す手法が開示されている(例えば特許文献2参照。)。   As a result, during a short period of time in which the delay in access time of the first memory becomes a problem, the high-speed access type second memory guarantees the generation of musical sounds and enables real-time performance without inconvenience. That is, a method of reading waveform data from a high-speed small-capacity second memory for a time commensurate with the readout delay time of waveform data from the low-speed large-capacity first memory is disclosed (for example, Patent Document 2). reference.).

これらの手法の他にも、PCM波形データをアクセス速度が低速なメモリからアクセス速度が高速のメモリに取り込む手法として、補間のためにデータを先読みしておく等の工夫がなされてきた。   In addition to these techniques, as a technique for fetching PCM waveform data from a memory having a low access speed into a memory having a high access speed, a technique has been devised such as prefetching data for interpolation.

特開平9−152869号公報(第2−4頁、第3図)JP-A-9-152869 (page 2-4, FIG. 3) 特公昭64−1800号公報(第1−2頁、第3図)Japanese Examined Patent Publication No. 64-1800 (page 1-2, Fig. 3)

しかしながら、CPUがソフトウエアを実行することで実現する電子楽器用音源(ソフトウエア音源)にあっては、CPUがキャッシュ機構を備えていても、異なるサンプリング周期のPCMデータの読み出しに関する配慮がなされていない。そのため、異なるサンプリング周期のPCMデータが混在する場合にあっては、発音開始までの遅延時間が発生し演奏がしにくくなるといった問題が発生していた。つまり、発音指示を与えても発音動作が行われなくなることがあった。   However, in the sound source for electronic musical instruments (software sound source) realized by executing software by the CPU, consideration is given to reading PCM data at different sampling periods even if the CPU has a cache mechanism. Absent. For this reason, when PCM data having different sampling periods coexist, a delay time until the start of sound generation occurs and it becomes difficult to perform. In other words, even when a sound generation instruction is given, the sound generation operation may not be performed.

本発明は、かかる従来の課題を解決するためになされたもので、ボイスの発音可能な残り時間である残存発音可能時間を参照して、発音の遅延を防止することを可能とする楽音発生装置およびプログラムを提供することを目的とする。   The present invention has been made in order to solve such a conventional problem, and a musical sound generating apparatus capable of preventing a delay in sound generation with reference to a remaining soundable time which is a remaining time during which a voice can be sounded. And to provide a program.

上記目的を達成するために、本願発明の発明者は、SSD、HD等の大容量記憶装置(低速だが大容量のメモリ)から、DRAM、SRAM等(高速だが容量の小さなメモリ)のキャッシュメモリにPCMデータ(波形データ)を読み出す際に、発音中ボイスの発音可能な残り時間である「残存発音可能時間」を求め、例えば残存発音可能時間のより短いボイスに対応する波形データを優先的に読み出すことによって、サンプリング周期の異なるデータを混在させた場合であってもこの混在を支障とせずに、発音開始までの遅延を低減して楽音発生することができることを見出した。   In order to achieve the above object, the inventor of the present invention changed from a large-capacity storage device such as SSD and HD (low-speed but large-capacity memory) to a cache memory such as DRAM and SRAM (high-speed but small-capacity memory). When PCM data (waveform data) is read, the “remaining soundable time”, which is the remaining time that can be sounded, is obtained, and for example, waveform data corresponding to a voice with a shorter remaining soundable time is preferentially read. As a result, it has been found that even when data having different sampling periods are mixed, it is possible to generate a musical sound without reducing the delay until the start of sound generation without hindering the mixing.

つまり、本発明は、波形データを割り当て発音を行うボイスを複数備える音源を有して、楽音を発生する楽音発生装置において、
複数の波形データを記憶するメモリと、
楽音生成指令に応じて、前記波形データを組み合わせこの組み合わせた前記波形データを前記ボイスに割り当てて楽音信号を発生させる信号処理手段と、
波形管理手段によって書き込まれた前記波形データを記憶するキャッシュメモリと、を備え、
前記波形管理手段は、
複数の前記ボイスが発音中である場合のその複数の発音中ボイスに割り当てる波形データが、前記信号処理手段に供給され続けたと想定した時の当該発音中ボイスに対する残りの発音可能な時間である残存発音可能時間を零としないように、前記メモリから前記波形データを読み出し、
この読み出した波形データを前記キャッシュメモリに書き込むことを特徴とする。
In other words, the present invention provides a musical sound generating apparatus that has a sound source that includes a plurality of voices that assign waveform data and generate sound, and that generates musical sounds.
A memory for storing a plurality of waveform data;
In response to a musical sound generation command, signal processing means for generating a musical sound signal by combining the waveform data and assigning the combined waveform data to the voice;
A cache memory for storing the waveform data written by the waveform management means,
The waveform management means includes
When the plurality of voices are sounding, the remaining waveform is the remaining soundable time for the sounding voice when it is assumed that the waveform data assigned to the plurality of sounding voices continues to be supplied to the signal processing means. Read the waveform data from the memory so that the soundable time is not zero,
The read waveform data is written into the cache memory.

この発明によれば、波形管理手段は、複数の発音中ボイスに割り当てる波形データが、信号処理手段に供給され続けたと想定した時の当該発音中ボイスに対する残存発音可能時間を零としないように、メモリから波形データを読み出す。更に、この読み出した波形データをキャッシュメモリに書き込む。この結果として、信号処理手段は発音の遅延を防止することが可能となり、読み出し対象となる波形データのサンプリング周期が異なっていてもこの混在を支障とせずに、発音開始までの遅延を低減して楽音発生することができる。   According to the present invention, the waveform management means does not set the remaining soundable time for the sounding voice to zero when it is assumed that the waveform data assigned to the plurality of sounding voices continues to be supplied to the signal processing means. Read waveform data from memory. Further, the read waveform data is written into the cache memory. As a result, the signal processing means can prevent the delay of sound generation, and even if the sampling period of the waveform data to be read is different, this mixing is not hindered, and the delay until the start of sound generation is reduced. Musical sound can be generated.

より具体的には、波形管理手段を、発音中ボイスそれぞれに対する残存発音可能時間を求める演算部と、この演算部によって求められた残存発音可能時間に基づいて発音中ボイスの優先順位を決めこの決めた優先順位に従ってボイスを選択する選択部と、この選択部によって選択されたボイスの波形データをメモリから読み出す読み出し部と、読み出し部が読み出した波形データをキャッシュメモリに書き込む書き込み部と、を含んで成る構成とすることができる。 More specifically, the waveform management means determines the priority of the sounding voices based on the calculation unit for obtaining the remaining soundable time for each sounding voice and the remaining soundable time obtained by the calculation unit. A selection unit that selects a voice according to the priority order, a read unit that reads waveform data of the voice selected by the selection unit from a memory, and a write unit that writes the waveform data read by the read unit to a cache memory. It can be set as the structure which consists of.

演算部は、発音中ボイスそれぞれに対する残存発音可能時間を求め、また、選択部は、この演算部によって求められた残存発音可能時間に基づいて発音中ボイスの優先順位を決め、次いで、選択部は、この決めた優先順位に従ってボイスを選択する。そして、読み出し部は、この選択部によって選択されたボイスの波形データをメモリから読み出し、書き込む部は、読み出し部が読み出した波形データをキャッシュメモリに書き込む。したがって、選択部は、演算部によって演算された残存発音可能時間というパラメータに対する優先順位付けを行い、読み出し部は、この優先順位付けを参照して直近に必要な波形データを優先的にメモリから読み出すことになるため、必要なボイスの波形データを迅速に読み出すことが可能となる。更に、書き込み部がキャッシュメモリに書き込む処理を行うことによってキャッシュの使用率が高まり処理が一層迅速に行えるようになる。   The calculation unit obtains the remaining soundable time for each of the sounding voices, and the selection unit determines the priority order of the sounding voices based on the remaining soundable time obtained by the calculation unit. The voice is selected according to the determined priority. The reading unit reads the waveform data of the voice selected by the selection unit from the memory, and the writing unit writes the waveform data read by the reading unit to the cache memory. Therefore, the selection unit prioritizes the parameter of the remaining soundable time calculated by the calculation unit, and the reading unit reads the most recently required waveform data from the memory with reference to the prioritization. Therefore, it becomes possible to quickly read out the waveform data of the necessary voice. Furthermore, when the writing unit performs the process of writing to the cache memory, the usage rate of the cache increases and the process can be performed more quickly.

また上記楽音発生装置において、前記演算部は、前記残存発音可能時間を、(1)前記信号処理手段で用いる前記ボイスに割り当てられた前記波形データの再生サンプリング周波数(再生ピッチf2)と、(2)前記メモリから追加読み出しをせずに前記信号処理手段に供給することができる前記キャッシュメモリ上の残データである残存発音可能データ量(D)と、(3)前記波形データの録音時のサンプリング周波数(録音ピッチf1)と、を含むパラメータを用いて求めることが可能である。 In the above musical tone generator, the arithmetic unit may calculate the remaining soundable time as follows: (1) a reproduction sampling frequency (reproduction pitch f2) of the waveform data assigned to the voice used in the signal processing means; ) The remaining soundable data amount (D) that is the remaining data on the cache memory that can be supplied to the signal processing means without additional reading from the memory, and (3) sampling at the time of recording the waveform data It can be obtained using parameters including the frequency (recording pitch f1).

具体的には、演算部は、読み出し手段がメモリに対して追加読み出しを停止するとした場合に、その追加読み出し停止時点において信号処理手段に供給可能な波形データの残存量である残存発音可能データ量(D)を実効サンプリング周波数(f1、f2)で除した値を残存発音可能時間として求める。ここで「実効サンプリング周波数」は、通常、再生ピッチ(f2)に等しく、f2は録音時から再生時へのピッチシフト量をn半音とした時、「f2=f1×2n/12(Hz)」として求める周波数(f2)である。また、実装の効率化のため、実効サンプリング周波数(f3)として、再生ピッチ(f2)の代替値を用いることもできる。代替値の例として、f2の上下一半音以内の近似値や、押鍵時の再生ピッチ(f2)、すなわち、押鍵以降のピッチ変更指示を無視した場合の周波数等が考えられる。 Specifically, when the reading unit stops additional reading from the memory, the arithmetic unit determines the remaining soundable data amount that is the remaining amount of waveform data that can be supplied to the signal processing unit at the time of the additional reading stop. A value obtained by dividing (D) by the effective sampling frequency (f1, f2) is obtained as the remaining soundable time. Here, the “effective sampling frequency” is normally equal to the reproduction pitch (f2), and f2 is “f2 = f1 × 2 n / 12 (Hz), where n is a pitch shift amount from recording to reproduction. The frequency (f2) obtained as “ Further, an alternative value of the reproduction pitch (f2) can be used as the effective sampling frequency (f3) for efficient mounting. As an example of an alternative value, an approximate value within f1 upper and lower semitones, a reproduction pitch (f2) at the time of key depression, that is, a frequency when a pitch change instruction after the key depression is ignored, or the like can be considered.

今、音程X1、サンプリング周波数f1(Hz)で録音されたデータを音程X2で発音する場合を想定する。この場合のピッチシフト量(音程X1と音程X2との音高差)をn半音とすると、「実効サンプリング周波数」は、f1に2n/12を乗じた「f1×2n/12(Hz)」となる。ピッチシフト量が「0」、即ち、ピッチシフトが無ければ「n(ピッチシフト量)=0」であるので、「実効サンプリング周波数」は、録音時のサンプリング周波数(ピッチ)f1そのものである。 Assume that data recorded at a pitch X1 and a sampling frequency f1 (Hz) is generated at a pitch X2. When the pitch shift amount in this case the (pitch difference between the pitch X1 and the pitch X2) and n semitone, "effective sampling frequency" is multiplied by 2 n / 12 to f1 "f1 × 2 n / 12 (Hz ) " Since the pitch shift amount is “0”, that is, when there is no pitch shift, “n (pitch shift amount) = 0”, the “effective sampling frequency” is the sampling frequency (pitch) f1 during recording.

具体例を述べると、音程A4、サンプリング周波数48000(Hz)で録音されたサンプルを音程B4で発音する場合、ピッチシフト量は2半音であるので、実効サンプリング周波数は48000(Hz)に22/12を乗じれば良いので「48000×22/12≒53878(Hz)」となる。このようにして、再生サンプリング周波数(再生ピッチ)を、録音と再生との「ピッチシフト量」を考慮して求めたサンプリング周波数が「実効サンプリング周波数」である。「残存データ量」をこの「実効サンプリング周波数」で除した値を「残存発音可能時間」としているので、録音ピッチと再生ピッチとのピッチシフトを考慮しながら残存発音可能時間を正確かつ容易に求めることができる。 To describe a specific example, when a sample recorded at a pitch A4 and a sampling frequency 48000 (Hz) is pronounced at a pitch B4, the pitch shift amount is 2 semitones, so the effective sampling frequency is 2 2 / (28000). Since 12 should be multiplied, “48000 × 2 2/12 ≈53878 (Hz)”. Thus, the sampling frequency obtained by considering the reproduction sampling frequency (reproduction pitch) in consideration of the “pitch shift amount” between recording and reproduction is the “effective sampling frequency”. The value obtained by dividing the “remaining data amount” by the “effective sampling frequency” is used as the “remaining soundable time”, so that the remaining soundable time can be accurately and easily determined while taking into account the pitch shift between the recording pitch and the playback pitch. be able to.

更に、信号処理手段が行う処理(例えば楽音生成指令に応じて波形データを組み合わせてボイスに割り当てて楽音信号を発生させる等)と、波形管理手段が行う処理(例えばキャッシュメモリに対する読み出し書き込み、残存発音可能時間の演算、優先順位付け、波形データのメモリからの読み出し等)とを並行して行う構成とすれば、必要な処理が一層迅速に行われる。 Further, processing performed by the signal processing means (for example, generating waveform signals by combining waveform data in accordance with a musical tone generation command and assigning them to voices), processing performed by the waveform management means (for example, reading / writing to the cache memory, residual sound generation) If the configuration is such that calculation of possible time, prioritization, reading of waveform data from the memory, etc.) are performed in parallel, the necessary processing is performed more rapidly.

また、本発明の他の態様は、波形データを割り当て発音を行うボイスを複数備える音源と、複数の波形データを記憶するメモリと、前記波形データを記憶するキャッシュメモリとを備えて楽音を発生する楽音発生装置に、
楽音生成指令に応じて、前記波形データを組み合わせこの組み合わせた前記波形データを前記ボイスに割り当てて楽音信号を発生させる信号処理機能と、
前記キャッシュメモリに対してアクセス動作を行う波形管理機能と、を実現させるためのプログラムであり、
前記波形管理機能は、
複数の前記ボイスが発音中である場合のその複数の発音中ボイスに割り当てる波形データが、前記信号処理機能に供給され続けたと想定した時の当該発音中ボイスの、残りの発音可能な時間である残存発音可能時間を零としないように、前記メモリから前記波形データを読み出す機能と、
この読み出した波形データを前記キャシュメモリに書き込む書き込み機能と、を含むことを特徴とする。
According to another aspect of the present invention, a tone generator is provided that includes a sound source including a plurality of voices to which waveform data is assigned and sounded, a memory that stores a plurality of waveform data, and a cache memory that stores the waveform data. To the musical sound generator
A signal processing function for generating a musical sound signal by combining the waveform data and assigning the combined waveform data to the voice according to a musical sound generation command;
And a waveform management function for performing an access operation to the cache memory,
The waveform management function
When the plurality of voices are being sounded, the remaining soundable time of the sounding voice when the waveform data assigned to the plurality of sounding voices is assumed to be continuously supplied to the signal processing function. A function of reading the waveform data from the memory so that the remaining soundable time is not zero;
And a write function for writing the read waveform data into the cache memory.

この発明によれば、波形管理機能は、複数の発音中ボイスに割り当てる波形データが、信号処理機能に供給され続けたと想定した時の当該発音中ボイスに対する残存発音可能時間を零としないように、メモリから波形データを読み出し、この読み出した波形データを前記キャッシュメモリに書き込む。また、波形管理機能によってキャッシュメモリに対するアクセス動作を行う。したがって、この発明によってもボイスに対する残存発音可能時間を参照することによって発音の遅延を防止することができ、また、読み出し対象となる波形データのサンプリング周期が異なるものが混在する場合であってもこの混在を支障とはせずに、発音開始までの遅延を低減して楽音発生することができる。   According to the present invention, the waveform management function is configured so that the remaining soundable time for the sounding voice is zero when it is assumed that the waveform data assigned to the plurality of sounding voices is continuously supplied to the signal processing function. The waveform data is read from the memory, and the read waveform data is written to the cache memory. Further, an access operation to the cache memory is performed by the waveform management function. Therefore, according to the present invention, it is possible to prevent a delay in sound generation by referring to the remaining soundable time for the voice, and even when there are a mixture of different sampling periods of waveform data to be read out. It is possible to generate musical sounds without reducing the delay until the start of sound generation without interfering with mixing.

このプログラムにおいて、更に、前記波形管理機能を、前記発音中ボイスそれぞれに対する前記残存発音可能時間を求める演算機能と、前記演算部によって求められた前記残存発音可能時間に基づいて前記発音中ボイスの優先順位を決めこの決めた優先順位に従って前記ボイスを選択する選択機能と、前記選択機能によって選択された前記ボイスの波形データを前記メモリから読み出す読み出し機能と、この読み出した波形データを前記キャッシュメモリに書き込む書き込み機能とを含んで成ることを特徴とするプログラムとすることができる。 In this program, the waveform management function further includes a calculation function for obtaining the remaining soundable time for each of the sounding voices, and priority of the sounding voices based on the remaining soundable time obtained by the calculating unit. A selection function for determining the order and selecting the voice according to the determined priority, a read function for reading the waveform data of the voice selected by the selection function from the memory, and writing the read waveform data to the cache memory It can be set as the program characterized by including a writing function.

このプログラムによれば、演算機能が発音中ボイスそれぞれに対する残存発音可能時間を求め、また、選択機能は、この演算機能によって求められた残存発音可能時間に基づいて発音中ボイスの優先順位を決め、次いで、選択機能は、この決めた優先順位に従ってボイスを選択する。そして、読み出し機能は、この選択機能によって選択されたボイスの波形データをメモリから読み出し、また、書き込み機能は、この読み出した波形データを前記キャッシュメモリに書き込む。したがって、選択機能は、演算機能によって演算された残存発音可能時間というパラメータによる優先順位付けを行い、読み出し機能は、この優先順位付けを参照して必要な波形データのみをメモリから読み出すだけで良いので、必要なボイスの波形データを迅速に読み出すことが可能となる。また、書き込み機能は、読み出し機能が読み出した波形データをキャッシュメモリに書き込むことで処理の迅速化を図る。   According to this program, the calculation function obtains the remaining soundable time for each of the sounding voices, and the selection function determines the priority order of the sounding voices based on the remaining soundable time obtained by the calculation function, Next, the selection function selects a voice according to the determined priority order. The read function reads the waveform data of the voice selected by the selection function from the memory, and the write function writes the read waveform data to the cache memory. Therefore, the selection function performs prioritization based on the parameter of the remaining soundable time calculated by the calculation function, and the read function only needs to read out necessary waveform data from the memory with reference to this prioritization. It becomes possible to quickly read out the waveform data of the necessary voice. In addition, the write function speeds up processing by writing the waveform data read by the read function to the cache memory.

このようなプログラムは、ROM、SSD、HD等の記録媒体に記録しておき、この記録したプログラムをCPU、DSP等のプロセッサ等が読み取って実行していくことによって、信号処理機能や波形管理機能(演算機能、選択機能、読み出し機能、書き込み機能等を含む)等の必要な機能を実現することが可能である。   Such a program is recorded on a recording medium such as a ROM, SSD, HD, etc., and the recorded program is read and executed by a processor such as a CPU, DSP, etc., so that a signal processing function and a waveform management function are obtained. Necessary functions such as a calculation function, a selection function, a reading function, a writing function, and the like can be realized.

本発明によれば、ボイスに対する残存発音可能時間を参照することによって発音の遅延を防止することを可能とする楽音発生装置やプログラムを実現できるという効果が得られる。   According to the present invention, it is possible to realize a musical sound generating apparatus and program that can prevent a delay in sound generation by referring to a remaining soundable time for a voice.

楽音発生装置100の構成図である。1 is a configuration diagram of a musical sound generator 100. FIG. 音源の構成図である。It is a block diagram of a sound source. 信号処理部21の動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of a signal processing unit 21. 信号処理部21の動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of a signal processing unit 21. 信号処理部21の動作を説明するためのフローチャートである。3 is a flowchart for explaining the operation of a signal processing unit 21. 波形管理部22の動作を説明するためのフローチャートである。4 is a flowchart for explaining the operation of a waveform management unit 22; 動作を説明するための模式的な説明図である。It is typical explanatory drawing for demonstrating operation | movement.

以下、本発明を実施の形態について図面を参照しつつ説明する。図1は本発明の楽音発生装置100の実施形態のハードウエア構成図である。なお、この図1に示す楽音発生装置100のハードウエアの構成は、本発明の一実施形態に過ぎず、また、楽音発生装置100のハードウエア構成は、本願発明の要旨を逸脱しない範囲内で種々の変形等が可能である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a hardware configuration diagram of an embodiment of a musical sound generating apparatus 100 of the present invention. The hardware configuration of the musical tone generator 100 shown in FIG. 1 is only one embodiment of the present invention, and the hardware configuration of the musical tone generator 100 is within the scope of the present invention. Various modifications are possible.

(構成)
CPU1は各構成要素の動作を把握したり動作を制御したりする機能を有する。より具体的には、CPU1はアプリケーションプログラム(AP)の実行や各種の演算処理、制御動作を行う機能を有する。ROM3には音色データ等の各種のデータや、アプリケーションプログラム(AP)、動作プログラム等のプログラム等が読み出し可能に記録されている。RAM4は、出力バッファエリア等の記憶エリアが形成されたり、CPU1がプログラムを実行する演算過程での一時記憶領域等が形成されたりする。
(Constitution)
The CPU 1 has a function of grasping the operation of each component and controlling the operation. More specifically, the CPU 1 has a function of executing an application program (AP), various arithmetic processes, and control operations. Various data such as timbre data, programs such as application programs (AP), operation programs, and the like are recorded in the ROM 3 so as to be readable. In the RAM 4, a storage area such as an output buffer area is formed, or a temporary storage area or the like in the calculation process in which the CPU 1 executes a program is formed.

MIDIインターフェイス5はMIDI信号を通信するためのインターフェイスであり、例えばMIDI信号を受信するインターフェイスとなる。MIDIインターフェイス5を介して受信されたMIDI信号はバス15を通ってCPU1に渡される。また、キーボード6は、英文字、記号、数字、日本語等のキャラクタを入力するための入力デバイスであり、また、同じく入力デバイスであるマウス11を平面上で移動操作させて画面上のポインタを移動させたり、釦部をクリックすることにより所望のコマンドを選択したりするものである。また、ディスプレイ8は、アプリケーション操作画面を表示したり、ユーザーがこの楽音発生装置100と対話するために各種のコマンドを表示したりするための出力デバイスである。   The MIDI interface 5 is an interface for communicating a MIDI signal, for example, an interface for receiving a MIDI signal. The MIDI signal received via the MIDI interface 5 is passed to the CPU 1 through the bus 15. The keyboard 6 is an input device for inputting characters such as English letters, symbols, numbers, and Japanese characters, and the mouse 11 that is also the input device is moved on the plane to move the pointer on the screen. A desired command is selected by moving or clicking a button part. The display 8 is an output device for displaying an application operation screen and displaying various commands for the user to interact with the musical sound generating apparatus 100.

音源20は、楽音発生指示操作等に応じて、楽音信号を生成出力する。D/A変換器9は、この生成出力されたデジタル楽音信号をアナログ信号に変換する。このD/A変換器9には発音手段としてスピーカ10が接続されているので、デジタルの楽音信号がD/A変換器9によってアナログ信号に変換されてスピーカ10から放音される。かくして、音源20が生成出力した楽音信号はスピーカ10から放音される構成となっている。 The sound source 20 generates and outputs a musical sound signal in response to a musical sound generation instruction operation or the like. The D / A converter 9 converts the generated and output digital musical tone signal into an analog signal. Since the speaker 10 is connected to the D / A converter 9 as sound generation means, the digital musical tone signal is converted into an analog signal by the D / A converter 9 and emitted from the speaker 10. Thus, the tone signal generated and output by the sound source 20 is emitted from the speaker 10.

HD(ハードディスク)7のアクセス速度(読み出しおよび書き込み速度)はRAM4等の記憶デバイスと比較して低速であるが大容量のメモリである。このHD7には各種のアプリケーションプログラム(AP)やOS等をインストールしたり各種のデータを保存したりすることが可能である。楽音信号作成のための音のPCM波形である波形データを音色数だけ保存可能であるので波形メモリとすることもできる。これらの構成要素は、バス15を介して相互に所要のデータを送受信可能に接続されている。そして、楽音発生装置100は、例えば外付け基板上にD/A変換器9を搭載し、この基板を差し込んだコンピュータシステムによって実現可能である。したがって楽音発生装置100は1台のパーソナルコンピュータ(PC)等によって実現可能である。 The access speed (reading and writing speed) of the HD (hard disk) 7 is a low-speed but large-capacity memory compared to a storage device such as the RAM 4. It is possible to install various application programs (AP), OS, etc., and store various data in the HD 7. Since waveform data, which is a PCM waveform of a sound for creating a musical tone signal, can be stored for the number of timbres, a waveform memory can be used. These components are connected to each other via a bus 15 so that necessary data can be transmitted and received. The musical sound generating device 100 can be realized by a computer system in which the D / A converter 9 is mounted on an external board and the board is inserted, for example. Therefore, the musical sound generator 100 can be realized by a single personal computer (PC) or the like.

(音源20の構成)
音源20は、不図示のROM等に記録された音源制御用プログラムをCPUが実行することによって実現される。CPUは信号処理部21と波形管理部22とを実現している。また、このCPUはキャッシュメモリ30を備えていると共に、HD等で実現可能な大容量記憶装置(メモリ)23もアクセス可能になっている。このキャッシュメモリ30は、アクセス(波形データの読み出しおよび書き込み)速度が高速であるが容量の小さい記憶デバイスである一方、大容量記憶装置23は読み出し速度が低速であるが容量の大きな記憶デバイスである。また、出力バッファ25も備えていて、この出力バッファ25に合成音を書き込んだり、この書き込んだ合成音を読み出したりするために使用される。図2の構成例では大容量記憶装置23を設けているが、図1に記載したHD7を利用して音源20を構成することも可能である。また、波形データは、所要の波形をPCM録音したものを音色数記録されているものであり、これを記録している記憶デバイスを、一般に波形メモリと称している。
(Configuration of the sound source 20)
The sound source 20 is realized by the CPU executing a sound source control program recorded in a ROM (not shown) or the like. The CPU implements a signal processing unit 21 and a waveform management unit 22. The CPU includes a cache memory 30 and can also access a large-capacity storage device (memory) 23 that can be realized by an HD or the like. The cache memory 30 is a storage device having a high access speed (reading and writing waveform data) but a small capacity, while the mass storage device 23 is a storage device having a low read speed but a large capacity. . An output buffer 25 is also provided, and is used for writing a synthesized sound in the output buffer 25 and reading the written synthesized sound. Although the mass storage device 23 is provided in the configuration example of FIG. 2, the sound source 20 can be configured using the HD 7 described in FIG. 1. Further, the waveform data is a PCM-recorded recording of a required waveform and the number of timbres is recorded. A storage device that records this is generally called a waveform memory.

信号処理部21は、プログラム管理データ用エリア31と、ボイス管理データA用エリア32とが形成されており、中間バッファ33も有している。信号処理部21は、後述する「発音指令」、「演奏プログラム指令」、「音声合成指令」等の楽音信号の生成指令に応じて、波形データを組み合わせこの組み合わせた波形データをボイスに割り当てて楽音信号を発生させる。プログラム管理データ用エリア31は、与えられる演奏プログラム(信号処理部21が発音指令等を基に合成音を出力する際、どのサウンド(サウンド:一つの録音サンプルで、例えばWAV形式ファイルのようなもの)をいつ発音すべきかというような情報をまとめたデータ)を記憶管理するための領域であり、ボイス管理データA用エリア32は、ボイスの記憶管理のためのデータの記憶エリアである。信号処理部21が波形管理部22に対してデータ要求指令を与えると、波形管理22がこれに応答して波形データを信号処理部21に渡す。また、信号処理部21は波形データを合成して生成した合成音(楽音信号)を出力バッファ25に書き込んだり、この書き込んだ合成音を出力バッファ25から読み出したりして音源外部の出力装置例えばスピーカ10に渡す。また、信号処理部21内には複数のボイス34が設けられている。この例ではボイス1〜ボイスnまでn個のボイスがある。このボイスは、信号処理部21における楽音の合成単位であり、ハードウエア的には一種の発音器で成る。 The signal processing unit 21 includes a program management data area 31 and a voice management data A area 32, and also includes an intermediate buffer 33. The signal processing unit 21 combines waveform data in accordance with musical sound signal generation commands such as “sound generation command”, “performance program command”, and “speech synthesis command”, which will be described later, and assigns the combined waveform data to the voice to generate a musical sound. Generate a signal. The program management data area 31 is a performance program (when the signal processing unit 21 outputs a synthesized sound based on a sound generation command or the like, which sound (sound: one recorded sample, such as a WAV format file) ) Is an area for storing and managing data) that summarizes information such as when to pronounce), and the voice management data A area 32 is a data storage area for voice storage management. When the signal processing unit 21 gives a data request command to the waveform management unit 22, the waveform management unit 22 passes the waveform data to the signal processing unit 21 in response thereto. Further, the signal processing unit 21 writes a synthesized sound (musical sound signal) generated by synthesizing waveform data into the output buffer 25 or reads out the written synthesized sound from the output buffer 25 to output an output device outside the sound source, for example, a speaker. Pass to 10. A plurality of voices 34 are provided in the signal processing unit 21. In this example, there are n voices from voice 1 to voice n. This voice is a unit for synthesizing musical sounds in the signal processing unit 21, and is composed of a kind of sound generator in terms of hardware.

波形管理部22には、サウンド管理データ用エリア41と、ボイス管理データB用エリア42と、メモリ管理データ用エリア43とが形成されている。波形管理部22は、キャッシュメモリ30に対して波形データの読み出しおよび書き込みを行い、メモリ管理データ用エリア43にはキャッシュメモリ30の3番地がサウンド5の波形ブロックを記録しているというようなキャッシュ記憶内容管理情報を書き込んで記憶しておく。また、波形管理部22が大容量記憶装置23に対して読み出し指令を与えると、大容量記憶装置23がこれに応答して波形データを渡す。 In the waveform management unit 22, a sound management data area 41, a voice management data B area 42, and a memory management data area 43 are formed. The waveform management unit 22 reads and writes the waveform data to and from the cache memory 30, and the memory management data area 43 has a cache in which the third address of the cache memory 30 records the waveform block of the sound 5. The stored content management information is written and stored. When the waveform management unit 22 gives a read command to the mass storage device 23, the mass storage device 23 delivers waveform data in response thereto.

(全体動作例概要)
まず、音源20の全体動作概要を説明する。便宜上、「ボイス」は信号処理部21における発音単位、「サウンド」は単一の録音波形とし、1ボイスには1サウンドを割り当てるものとする。大容量記憶装置23には、予め全てのサウンドが記録されているものとする。例えば、信号処理部21が処理可能なボイス数は100程度、大容量記憶装置23に含まれるサウンド数は数十から数千程度となる。また、音源20における波形データの語長は1バイトとする。すなわち、48(kHz)の波形1秒分に対し48(kB)の波形データが必要である。さらに、各サウンドの10(kB)分の波形断片を「ブロック」と呼ぶことにする。サウンドのデータ長が100(kB)であれば、このサウンドは10個の(波形)ブロックに分けられる。キャッシュメモリ30には、1000個の(波形)ブロックを記録できるものとする。
(Overview of overall operation example)
First, an overview of the overall operation of the sound source 20 will be described. For convenience, “voice” is a sound generation unit in the signal processing unit 21, “sound” is a single recording waveform, and one sound is assigned to one voice. It is assumed that all sounds are recorded in the mass storage device 23 in advance. For example, the number of voices that can be processed by the signal processing unit 21 is about 100, and the number of sounds included in the mass storage device 23 is about tens to thousands. The word length of the waveform data in the sound source 20 is 1 byte. That is, 48 (kB) waveform data is required for one second of a 48 (kHz) waveform. Furthermore, a waveform fragment of 10 (kB) for each sound is called a “block”. If the data length of the sound is 100 (kB), this sound is divided into 10 (waveform) blocks. It is assumed that 1000 (waveform) blocks can be recorded in the cache memory 30.

ユーザーの操作等により信号処理部21が「演奏プログラム指令」を受け取ると、信号処理部21は、演奏プログラム指令をプログラム管理データ用エリア31に書き込み、その後、演奏プログラムに含まれる総てのサウンドを列挙し、波形管理部22に通知する。波形管理部22は、通知された総てのサウンドを示す情報をサウンド管理データエリア41に登録し、各サウンドの先頭部分(第1番目のブロック)を予め大容量記憶装置23から読み出し、キャッシュメモリ30に書き込む。キャッシュメモリ30の利用状況は、メモリ管理データ用エリア43に書き込まれる。なお、先頭部分として複数ブロックを予め読み出しても良い。 When the signal processing unit 21 receives a “performance program command” by a user operation or the like, the signal processing unit 21 writes the performance program command in the program management data area 31, and then all sounds included in the performance program are recorded. List and notify the waveform management unit 22. The waveform management unit 22 registers the information indicating all the notified sounds in the sound management data area 41, reads the head portion (first block) of each sound from the large-capacity storage device 23 in advance, and cache memory Write to 30. The usage status of the cache memory 30 is written in the memory management data area 43 . Note that a plurality of blocks may be read in advance as the head portion.

続いて、信号処理部21が、例えばキーボード6等の入力装置から「発音指令」を受け取ると、発音指令に対応した楽音を生成するために、プログラム管理データ用エリア31に記憶されているプログラム管理情報等からボイスが発音すべきサウンドを決定し、当該ボイスを示すボイス情報をボイス管理データA用エリア32に登録する。続いて、信号処理部21は、波形管理部22に対し、当該ボイスが使用するサウンドと、波形データを消費する速度である「実効サンプリング周波数」とを通知する。信号処理部21は、使用するボイスに対応するサウンドの波形データを先頭から順に処理して出力音を合成する。信号処理部21が「音声合成指令」を受け取ると、ボイス管理データA用エリア32に登録されている総てのボイスについて、波形管理部22に対しサウンドの先頭からのオフセットを指定して波形データを要求し、楽音を合成して中間バッファ33に書き込む処理を行う。さらに、信号処理部21はこの中間バッファ33に書き込まれた合成音に対してエフェクト等の後処理を行ってから、出力バッファ25に対してこの後処理を施した合成音を出力する。なお、信号処理部21はループ状波形に対応するため、一定のオフセット範囲に対するアクセス要求を繰り返すことがある。信号処理部21は、離鍵指示、ピアノダンパーオフ等の消音指示を受け取ると、リリース音等の処理を行った後、該当するボイスに対する処理を終了する。以上が信号処理部21の全体的な処理の概要である。 Subsequently, when the signal processing unit 21 receives a “sound generation command” from an input device such as the keyboard 6, for example, the program management data stored in the program management data area 31 is used to generate a tone corresponding to the sound generation command. The sound to be produced by the voice is determined from the information and the voice information indicating the voice is registered in the voice management data A area 32. Subsequently, the signal processing unit 21 notifies the waveform management unit 22 of the sound used by the voice and the “effective sampling frequency” that is the speed at which the waveform data is consumed. The signal processing unit 21 synthesizes the output sound by processing the waveform data of the sound corresponding to the voice to be used in order from the top. When the signal processing unit 21 receives the “speech synthesis command”, the waveform data for all the voices registered in the voice management data A area 32 is specified by specifying an offset from the head of the sound to the waveform management unit 22. , And a process of synthesizing the musical sound and writing it in the intermediate buffer 33 is performed. Further, the signal processing unit 21 performs post-processing such as effects on the synthesized sound written in the intermediate buffer 33, and then outputs the synthesized sound subjected to the post-processing to the output buffer 25. In addition, since the signal processing part 21 respond | corresponds to a loop-shaped waveform, it may repeat the access request with respect to a fixed offset range. When the signal processing unit 21 receives a mute instruction such as a key release instruction or piano damper off, it performs a process such as a release sound and then ends the process for the corresponding voice. The above is the outline of the overall processing of the signal processing unit 21.

一方、波形管理部22は、信号処理部21からサウンドの使用通知を受け取ると、サウンドの先頭部分を大容量記憶装置メモリ23から予め読み込んでキャッシュメモリ30に書き込んでおく。続いて、信号処理部21からボイスの作成通知を受け取ると、波形管理部22は、信号処理部21が次々に要求する波形データを遅滞なく供給する責任を負う。このため、波形管理部22は、作成通知されたボイスを示すボイス情報をボイス管理データB用エリア42の当該ボイス用エリアに記録する。信号処理部21から供給可能な読み込み済み波形データを、メモリ管理データ用エリア43を調べて求め、ボイス管理データB用エリア42に登録する。信号処理部21から波形データを要求された際には、この波形データを使用して応答する。   On the other hand, when receiving the sound usage notification from the signal processing unit 21, the waveform management unit 22 reads the head portion of the sound from the mass storage device memory 23 in advance and writes it in the cache memory 30. Subsequently, upon receiving a voice creation notification from the signal processing unit 21, the waveform management unit 22 is responsible for supplying waveform data requested by the signal processing unit 21 one after another without delay. Therefore, the waveform management unit 22 records voice information indicating the voice notified of creation in the voice area of the voice management data B area 42. The read waveform data that can be supplied from the signal processing unit 21 is obtained by examining the memory management data area 43 and registered in the voice management data B area 42. When waveform data is requested from the signal processing unit 21, the waveform data is used to respond.

波形管理部22は、総てのボイスに対する残存発音可能時間がゼロにならないように、大容量記憶装置23に読み出し指令を発行して波形データを読み出す。このため、波形管理部22はボイス管理データB用エリア42に登録されている総てのボイスに対して、「残存データ量」と「実効サンプリング周波数」から「残存発音可能時間」を求め、この残存発音可能時間の少ないボイスが使用するサウンドについて読み出し指令を発行する。大容量記憶装置23から波形データの応答があると、波形管理部2は、この波形データをキャッシュメモリ30に記憶し、このキャッシュメモリ30に記憶されたデータの情報をメモリ管理データに保持する。キャッシュメモリ30は小容量であるため、容量が不足する場合は必要のないデータを選択して消去する。そして、信号処理部21および波形処理部22がそれぞれ行う処理は並列に動作させることができる。場合によっては、信号処理部21が行う動作と波形管理部22が行う動作を交互とすることも可能である。 The waveform management unit 22 issues a read command to the mass storage device 23 to read the waveform data so that the remaining soundable time for all voices does not become zero. Therefore, the waveform management unit 22 obtains “remaining soundable time” from “remaining data amount” and “effective sampling frequency” for all voices registered in the voice management data B area 42, and A read command is issued for a sound used by a voice having a short remaining soundable time. When the mass storage device 23 there is a response waveform data, the waveform control section 2 2 stores the waveform data in the cache memory 30 holds information of the data stored in the cache memory 30 to the memory management data . Since the cache memory 30 has a small capacity, unnecessary data is selected and deleted when the capacity is insufficient. The processes performed by the signal processing unit 21 and the waveform processing unit 22 can be operated in parallel. In some cases, the operation performed by the signal processing unit 21 and the operation performed by the waveform management unit 22 can be alternated.

(動作詳細)
(信号処理部21の動作:「演奏プログラム指令」が与えられた場合)
図3は信号処理部21が「演奏プログラム指令」を与えられた場合の動作の説明図である。信号処理部21はステップS300〜ステップS360までの動作を行う。まず、ステップS300において、「演奏プログラム指令」を受け取ると、ステップS310において、この「演奏プログラム指令」における演奏プログラムをプログラム管理データ用エリア31に書き込み、ステップ320において、このプログラム管理データ用エリア31に書き込まれた演奏プログラムに含まれる総てのサウンドを列挙し、これを波形管理22に通知する。ステップS330では、波形管理部22に通知してないサウンドがあるか否かを判断する。波形管理部22に通知してないサウンドがあると判断した場合(Yes)にはステップ340に進む一方、波形管理部22に通知していないサウンドがないと判断した場合(No)には、ステップS360に進み、演奏準備が完了したとして、図3に示す一連の動作を終了する。ステップS340では、信号処理部21が波形管理部22に対してサウンドを一つ通知する。この通知後、信号処理部21は待機状態に入る。この通知を受けた波形管理部22は、通知されたサウンドをサウンド管理データ用エリア41に登録し、次いでサウンドの先頭部を大容量記憶装置23から読み出し、更に読み出した先頭部の波形データをキャッシュメモリ30に書き込んで波形データの管理情報をメモリ管理データ用エリア43に書き込む。これによって波形管理部23は信号処理部21に完了応答を行う。この完了応答を受けた信号処理部21は、ステップS350において待機を終了してステップS330に戻る。かくして、「演奏プログラム指令」が与えられた時の信号処理部21が行う演奏準備が完了する。
(Operation details)
(Operation of the signal processing unit 21: “Performance program command” is given)
FIG. 3 is an explanatory diagram of the operation when the signal processing unit 21 is given a “performance program command”. The signal processing unit 21 performs operations from step S300 to step S360. First, when a “performance program command” is received in step S300, the performance program in the “performance program command” is written in the program management data area 31 in step S310, and in the program management data area 31 in step 320. All the sounds included in the written performance program are listed and notified to the waveform management unit 22. In step S330, it is determined whether there is a sound not notified to the waveform management unit 22. If it is determined that there is a sound that has not been notified to the waveform management unit 22 (Yes), the process proceeds to step 340, while if it is determined that there is no sound that has not been notified to the waveform management unit 22 (No), a step is performed. Proceeding to S360, the preparation for performance is completed, and the series of operations shown in FIG. In step S340, the signal processing unit 21 notifies the waveform management unit 22 of one sound. After this notification, the signal processing unit 21 enters a standby state. Upon receiving this notification, the waveform management unit 22 registers the notified sound in the sound management data area 41, then reads the head of the sound from the mass storage device 23, and caches the read waveform data of the head. Write to the memory 30 and write the waveform data management information to the memory management data area 43. As a result, the waveform management unit 23 sends a completion response to the signal processing unit 21. The signal processing unit 21 that has received this completion response ends the standby in step S350 and returns to step S330. Thus, the performance preparation performed by the signal processing unit 21 when the “performance program command” is given is completed.

(信号処理部21の動作:「発音指令」が与えられた場合)
図4は信号処理部21が「発音指令」を与えられた場合の動作の説明図である。信号処理部21はステップS400〜ステップS460までの動作を行う。まず、ステップS400において、「発音指令」を受け取ると、ステップS410において、新規にボイスの割り当てが可能か否かを判断する。新規に割り当て可能なボイスが無い(例えばボイスが総て使用されている等)と判断した場合(No)には何もしないで処理を終了する。この一方、新規にボイスの割り当てが可能であると判断した場合(Yes)には、ステップS420に進む。ステップS420においては、発音指示の音高、ベロシティ、演奏プログラムの情報等を参照して新規のボイスを準備する。次いで、ステップS430において、ボイス管理データA用エリア32に、この新規ボイスを示す情報等を含むボイス情報を記憶して登録する。そして、ステップ440において、波形管理部22に対して、サウンドと実効サンプリング周波数とを指定して新規ボイスを通知し、待機状態に入る。新規ボイスの通知を受けた波形管理部22は、ボイスをボイス管理データB用エリア42に登録し、次いで対応するサウンドの読み込み済み波形データの情報をボイス管理データB用エリア42の当該ボイス用エリアに記録し、信号処理部21に対して完了応答する。この完了応答を受けた信号処理部21は、ステップS450において待機状態を終了し、ステップ460において作業を完了する。かくして、「発音指令」が与えられた時の信号処理部21が行う処理が終了する。
(Operation of the signal processing unit 21: When a “sound generation command” is given)
FIG. 4 is an explanatory diagram of the operation when the signal processing unit 21 is given a “sound generation command”. The signal processing unit 21 performs operations from step S400 to step S460. First, when a “sound generation command” is received in step S400, it is determined in step S410 whether or not a new voice can be assigned. If it is determined that there are no newly assignable voices (for example, all voices are used) (No), the process ends without doing anything. On the other hand, if it is determined that a new voice can be assigned (Yes), the process proceeds to step S420. In step S420, a new voice is prepared with reference to the pitch, velocity, and performance program information of the sound generation instruction. In step S430, voice information including information indicating the new voice is stored and registered in the voice management data A area 32. In step 440, the waveform management unit 22 is notified of a new voice by specifying a sound and an effective sampling frequency, and enters a standby state. Upon receiving the notification of the new voice, the waveform management unit 22 registers the voice in the voice management data B area 42, and then stores the information of the waveform data already read in the corresponding sound in the voice management data B area 42. And a completion response to the signal processing unit 21. The signal processing unit 21 that has received the completion response ends the standby state in step S450 and completes the operation in step 460. Thus, the processing performed by the signal processing unit 21 when the “sound generation command” is given is completed.

(信号処理部21の動作:「音声合成指令」が与えられた場合)
図5は信号処理部21が「音声合成指令」を与えられた場合の動作の説明図である。信号処理部21はステップS500〜ステップS580までの動作を行う。まず、ステップS500において、「音声合成指令」を受け取ると、ステップS510において、ボイス管理データA用エリア32に登録されている総てのボイスを未処理とする。次に、ステップS520において、未処理のボイスが有るか否かを判断する。未処理のボイスが有ると判断した場合(ステップS520のYes)には、その内の一つのボイスを選択し(ステップS530)、ステップS540において、波形管理部22に当該音声合成に必要な波形データを要求する。次いで、ステップS550において、必要な波形データを組み合わせる音声合成処理を行い、ステップS560において、これを中間バッファ33に書き込む。一方、ステップS520において、未処理のボイスが無いと判断した場合(ステップS520のYes)には、ステップS570に移って、中間バッファ33に書き込んだ音声合成処理した信号に対して、残響処理等の演算を行って後処理を施す。そして、ステップS580において、中間バッファ33に書き込んで後処理を行った信号を出力バッファ25に書き込む。以降、この出力バッファ25に書き込んだ信号を読み出してスピーカ10等の出力装置に供給する。かくして、「音声合成指令」が与えられた時の信号処理部21が行う処理が終了する。なお、この音声合成指令が与えられた場合においても、ステップS540等において、波形管理部22が信号処理部21との間で所要の情報をやりとりする。万一、ボイスの残存発音可能時間が零となった場合、波形管理部22は読み出し完了まで応答を保留する、または、無音信号を返すなどの応急措置を取ることもできる。
(Operation of the signal processing unit 21: when a “speech synthesis command” is given)
FIG. 5 is an explanatory diagram of the operation when the signal processing unit 21 is given a “speech synthesis command”. The signal processing unit 21 performs operations from step S500 to step S580. First, when a “speech synthesis command” is received in step S500, in step S510, all voices registered in the voice management data A area 32 are unprocessed. Next, in step S520, it is determined whether there is an unprocessed voice. When it is determined that there is an unprocessed voice (Yes in step S520), one of the voices is selected (step S530), and in step S540, the waveform data necessary for the voice synthesis is stored in the waveform management unit 22. Request. Next, in step S550, speech synthesis processing for combining necessary waveform data is performed, and in step S560, this is written in the intermediate buffer 33. On the other hand, if it is determined in step S520 that there is no unprocessed voice (Yes in step S520), the process proceeds to step S570, and reverberation processing or the like is performed on the speech synthesized signal written in the intermediate buffer 33. Perform post-processing by computing. In step S580, the signal that has been written into the intermediate buffer 33 and post-processed is written into the output buffer 25. Thereafter, the signal written in the output buffer 25 is read and supplied to an output device such as the speaker 10. Thus, the processing performed by the signal processing unit 21 when the “speech synthesis command” is given is completed. Even when this voice synthesis command is given, the waveform management unit 22 exchanges necessary information with the signal processing unit 21 in step S540 and the like. In the unlikely event that the remaining soundable time of the voice becomes zero, the waveform management unit 22 can take an emergency measure such as holding the response until the reading is completed or returning a silence signal.

(波形管理部22の動作)
図6は波形管理部22が行う処理を示すフローチャートである。まず、ステップS600で波形データの読み出しが必要なボイスがあるか否かを判断する。ない(No)と判断した場合にはステップS670に移行して、一定時間または次の波形データ要求までウエイト状態になる。一方、ステップS600において、波形データ読み出しが必要なボイス例えば発音中のボイスがあると判断した場合(Yes)にはステップS610に移行する。ステップS610では、この発音中の各ボイスの残存発音可能時間を計算する。この計算は、残存発音可能データ量(D)、即ち、「波形管理部22が大容量記憶装置23に対して追加読み出しを停止するとした場合に、その追加読み出し停止時点において信号処理部21に供給可能な波形データのキャッシュメモリ30上の残存量である残存発音可能データ量(D)」を、実効サンプリング周波数で除した値を残存発音可能時間として求めることによって実行する。この実効サンプリング周波数は、録音ピッチ(f1)と再生ピッチ(f2)とのピッチシフト量をn半音として「f2=f1×2n/12(Hz)」となる周波数(f2)である。つまり、残存発音可能時間を、(1)信号処理部21で用いるボイスの波形データの再生ピッチ(f2)と、(2)大容量記憶装置23から追加読み出しをせずに信号処理部21に供給することができるキャッシュメモリ30上の残データである残存発音可能データ量(D)と、(3)波形データの録音時のサンプリング周波数(f1)と、を含むパラメータを用いて求めることが可能となる。
(Operation of the waveform management unit 22)
FIG. 6 is a flowchart showing processing performed by the waveform management unit 22. First, in step S600, it is determined whether there is a voice for which waveform data needs to be read. If it is determined that there is no (No), the process proceeds to step S670, where the process waits for a predetermined time or until the next waveform data request. On the other hand, if it is determined in step S600 that there is a voice that requires waveform data reading, for example, a voice that is being sounded (Yes), the process proceeds to step S610. In step S610, the remaining soundable time of each voice being sounded is calculated. This calculation is based on the remaining soundable data amount (D), that is, “when the waveform management unit 22 stops additional reading from the mass storage device 23, it is supplied to the signal processing unit 21 when the additional reading is stopped. The remaining soundable data amount (D), which is the remaining amount of waveform data on the cache memory 30, is divided by the effective sampling frequency to obtain the remaining soundable time. This effective sampling frequency is a frequency (f2) that becomes “f2 = f1 × 2 n / 12 (Hz)”, where the pitch shift amount between the recording pitch (f1) and the reproduction pitch (f2) is n semitones. That is, the remaining soundable time is supplied to the signal processing unit 21 without (1) the reproduction pitch (f2) of the waveform data of the voice used by the signal processing unit 21 and (2) additional reading from the mass storage device 23. The remaining soundable data amount (D) that is the remaining data on the cache memory 30 that can be obtained and (3) the sampling frequency (f1) at the time of recording the waveform data can be obtained using parameters. Become.

そして、ステップS620において、各ボイスの優先順位を決める。例えばその時点での残存発音可能時間が短い順番に高い優先順位を付与する。かくして、一番短い残存発音可能時間には最も高い優先順位である「1」番が付与される。そして、ステップS630において、最も優先順位の高いボイスを選ぶ。ステップS640ではこのボイスが使用する波形データを得るべく、大容量記憶装置23に対して読み出し指令を発行して、読み出された波形データを得る。ステップS650では、この読み出し指令の発行によって大容量記憶装置23から読み出した波形データをキャッシュメモリ30に書き込む。そして、ステップS660において、キャッシュメモリ30のキャッシュ記憶内容管理情報をメモリ管理データ用エリア43に書き込む。以上が、波形管理部22が行う主たる動作である。 In step S620, the priority order of each voice is determined. For example, a higher priority is assigned in the order of the short remaining soundable time at that time. Thus, “1”, which is the highest priority, is given to the shortest remaining soundable time. In step S630, the voice with the highest priority is selected. In step S640, in order to obtain waveform data used by the voice, a read command is issued to the mass storage device 23 to obtain the read waveform data. In step S650, the waveform data read from the mass storage device 23 by issuing this read command is written in the cache memory 30. In step S660, the cache storage content management information of the cache memory 30 is written into the memory management data area 43 . The above is the main operation performed by the waveform management unit 22.

波形管理部22は、発音中ボイスそれぞれに対する残存発音可能時間を求め(ステップ610:演算機能)、この求めた残存発音可能時間に基づいて発音中ボイスの優先順位を決め、この決めた優先順位に従ってボイスを選択する(ステップ630:選択機能)。そして、波形管理部22は、この選択されたボイスの波形データを大容量記憶装置23(メモリ)から読み出し(ステップ640:読み出し機能)、読み出した波形データをキャッシュメモリ30に書き込む(ステップ650:書き込み機能)。したがって、波形管理部22は、演算された残存発音可能時間というパラメータに対する優先順位付けを行い、この優先順位付けを参照して必要な波形データのみを大容量記憶装置23から読み出すだけで良いので、必要なボイスの波形データを迅速に読み出すことが可能となる。更に信号処理部21からの波形データの要求の際にはキャッシュメモリ30を利用するので一層処理が迅速に行われる。 The waveform management unit 22 obtains the remaining soundable time for each of the sounding voices (step 610: calculation function), determines the priority of the sounding voices based on the obtained remaining soundable time, and according to the determined priority. A voice is selected (step 630: selection function). The waveform management unit 22 reads the waveform data of the selected voice from the mass storage device 23 (memory) (step 640: read function), and writes the read waveform data to the cache memory 30 (step 650: write). function). Therefore, the waveform management unit 22 needs to prioritize the calculated parameter of the remaining soundable time, and only need to read out the necessary waveform data from the mass storage device 23 with reference to this prioritization. It becomes possible to quickly read out the necessary waveform data of the voice. Furthermore, since the cache memory 30 is used when requesting waveform data from the signal processing unit 21, the processing is performed more quickly.

図7は本発明の実施形態の音源20が行う動作の模式的説明図である。図7には、サウンド管理データ用エリア41において記憶管理される「サウンド管理データ」、ボイス管理データB用エリア42において記憶管理される「ボイス管理データB」、メモリ管理データ用エリア43において記憶管理される「メモリ管理データ」および、キャッシュメモリ30の具体的な記憶内容が模式的に記載されている。図2を参照すれば分かるように、「サウンド管理データ」、「ボイス管理データB」および「メモリ管理データ」はいずれも波形管理部22によって管理されている。そして、図7では3段階での各データの変化の様子を示している。具体的には、1段階目が「演奏プログラムロード後の段階」、2段階目が「同時2音の発音指示がある段階」、3段階目が「それから0.1秒後の段階」である。今、サウンド1、サウンド3、およびサウンド5を使用する場合を想定する。また、各サウンドは複数のブロックで成る。例えばサウンド1は、「サウンド1ブロック1」、「サウンド1ブロック2」、…「サウンド1ブロック10」から成る。   FIG. 7 is a schematic explanatory diagram of an operation performed by the sound source 20 according to the embodiment of the present invention. FIG. 7 shows “sound management data” stored and managed in the sound management data area 41, “voice management data B” stored and managed in the voice management data B area 42, and stored and managed in the memory management data area 43. The “memory management data” and the specific storage contents of the cache memory 30 are schematically described. As can be seen from FIG. 2, “sound management data”, “voice management data B”, and “memory management data” are all managed by the waveform management unit 22. FIG. 7 shows how the data changes in three stages. Specifically, the first stage is a "stage after loading a performance program", the second stage is a "stage where there is a simultaneous two-tone pronunciation instruction", and the third stage is a "stage after 0.1 second" . Assume that Sound 1, Sound 3, and Sound 5 are used. Each sound consists of a plurality of blocks. For example, sound 1 includes “sound 1 block 1”, “sound 1 block 2”,... “Sound 1 block 10”.

まず演奏プログラムをロードした後である(第1段階)。この演奏プログラムにはサウンド1、サウンド3、サウンド5の3つのサウンドが含まれている。波形管理部22は、信号処理部21からの通知により、サウンド管理データとしてサウンド1、サウンド3、サウンド5を示す情報を記憶管理する。この段階では使用するボイスが決まっていないため、ボイス管理データBには何ら情報が記憶管理されていない。また、メモリ管理データとしては、各サウンドの先頭のブロックである「サウンド1ブロック1」、「サウンド3ブロック1」、「サウンド5ブロック1」を示すキャッシュ記憶管理情報が記憶管理され、対応するキャッシュメモリ30の領域には対応する波形データが記憶される。   First, after the performance program is loaded (first stage). This performance program includes three sounds, Sound 1, Sound 3, and Sound 5. In response to the notification from the signal processing unit 21, the waveform management unit 22 stores and manages information indicating the sound 1, sound 3, and sound 5 as sound management data. At this stage, since no voice is used, no information is stored and managed in the voice management data B. As the memory management data, cache storage management information indicating “sound 1 block 1”, “sound 3 block 1”, and “sound 5 block 1”, which are the first blocks of each sound, is stored and managed, and the corresponding cache is stored. Corresponding waveform data is stored in the area of the memory 30.

第2段階では、同時2音の発音指示が発行された段階であり、図7中の中央部に各データの変化の様子を示す。サウンド管理データの内容はサウンドの追加は生じないから変化しない。そして、ボイス管理データBには、同時2音を使用する旨の通知を受けた波形管理部22によって、2つのボイスであるボイス1、ボイス2を示すボイス情報を追加された。波形管理部22の演算によって、ボイス1に割り当てた「サウンド1」は実効サンプリング周波数が48(kHz)、残存発音可能時間が0.208(s)、ボイス2に割り当てた「サウンド3」は実効サンプリング周波数が57(kHz)、残存発音可能時間が0.175(s)であることが求められる。なお、サウンド、残存発音可能時間の演算に必要な実効サンプリング周波数等の情報は信号処理部21から渡される。   In the second stage, a simultaneous two-tone sounding instruction is issued, and the change of each data is shown in the center in FIG. The contents of the sound management data do not change because no sound is added. In the voice management data B, voice information indicating two voices, voice 1 and voice 2, is added by the waveform management unit 22 that has received notification that two simultaneous sounds are used. According to the calculation of the waveform management unit 22, “Sound 1” assigned to Voice 1 has an effective sampling frequency of 48 (kHz), the remaining soundable time is 0.208 (s), and “Sound 3” assigned to Voice 2 is effective. It is required that the sampling frequency is 57 (kHz) and the remaining soundable time is 0.175 (s). Information such as the effective sampling frequency necessary for calculating the sound and the remaining soundable time is passed from the signal processing unit 21.

この演算結果によって波形管理部22が発音中のボイスの残存発音可能時間に対して優先順位を決定すると、ボイス2の「サウンド3」が1位、ボイス1の「サウンド1」が2位となる。よって優先するのはボイス2の「サウンド3」であるので、サウンド3ブロック1に続く波形データであるサウンド3ブロック2を大容量記憶装置23から読み出しキャッシュメモリ30の空き領域に書き込む。この書き込み状態を示すために、キャッシュメモリ30に読込中と記載している。かくして、ボイス2の発音遅れを防止して発音の途切れ等の支障がなくなる。   If the waveform management unit 22 determines the priority order for the remaining soundable time of the currently sounding voice based on the calculation result, “Sound 3” of Voice 2 is ranked first and “Sound 1” of Voice 1 is ranked second. . Therefore, since “sound 3” of voice 2 is given priority, sound 3 block 2 which is waveform data following sound 3 block 1 is read from mass storage device 23 and written to an empty area of cache memory 30. In order to indicate this write state, it is described that the cache memory 30 is being read. Thus, the delay in pronunciation of the voice 2 is prevented, and troubles such as interruption of pronunciation are eliminated.

最後の3段階目の状態は、図7の右側部に記載しており、これは同時発音開始から0.1(s)経過した段階である。この段階で再度、波形管理部22が発音中ボイスのサウンド1、サウンド3の残存発音可能時間を演算によって求めると、ボイス1に割り当てた「サウンド1」の残存発音可能時間が0.108(s)、ボイス2に割り当てた「サウンド3」の残存発音可能時間が0.251(s)であると求められる。すると、今度は、サウンド1の残存発音可能時間の方が短いのでサウンド1の方が優先度が高くなる。この結果、この段階では、サウンド1のデータを続けて読むようするべく、大容量記憶装置23から波形データを読み込んで、キャッシュメモリ30にサウンド1ブロック2を書き込んでメモリ管理データを更新する。   The state of the final third stage is described on the right side of FIG. 7, which is the stage after 0.1 (s) has elapsed since the start of simultaneous sounding. At this stage, when the waveform management unit 22 again obtains the remaining soundable time of the sound 1 and sound 3 of the sounding sound by calculation, the remaining soundable time of “sound 1” assigned to the voice 1 is 0.108 (s). ), The remaining soundable time of “Sound 3” assigned to Voice 2 is determined to be 0.251 (s). Then, since the remaining soundable time of sound 1 is shorter, sound 1 has a higher priority. As a result, at this stage, in order to continuously read the sound 1 data, the waveform data is read from the mass storage device 23, the sound 1 block 2 is written into the cache memory 30, and the memory management data is updated.

以上のように、本発明の実施形態によれば、波形管理部22は、複数の発音中ボイスに割り当てる波形データが、信号処理部21に供給され続けたと想定した時の当該発音中ボイスに対する残存発音可能時間を零としないように、大容量記憶装置(メモリ)23から波形データを読み出し、この読み出した波形データをキャッシュメモリ30に書き込む。この結果、ボイスに対する残存発音可能時間を参照することによって発音の遅延を防止することが可能となり、読み出し対象となる波形データのサンプリング周期が異なっていてもこの混在を支障とせずに発音開始までの遅延を低減して楽音発生することができる。   As described above, according to the embodiment of the present invention, the waveform management unit 22 remains for the sounding voice when it is assumed that the waveform data assigned to the plurality of sounding voices continues to be supplied to the signal processing unit 21. The waveform data is read from the mass storage device (memory) 23 so that the soundable time is not zero, and the read waveform data is written in the cache memory 30. As a result, it becomes possible to prevent delays in sound generation by referring to the remaining soundable time for the voice, and even if the sampling period of the waveform data to be read is different, this mixing is not hindered until sounding is started. Musical sound can be generated with reduced delay.

そして、以上述べてきたような音源20の動作は、CPUが不図示のROMに記録された音源動作のための動作用プログラムを実行することによって実現することが可能である。   The operation of the sound source 20 as described above can be realized by the CPU executing an operation program for sound source operation recorded in a ROM (not shown).

以上の実施形態において様々な変形例が挙げられる。例えば、キャッシュ機構をリングバッファや可変サイズのヒープアロケータ等に変更すること、様々なデータの付属データを変更すること等が挙げられる。   Various modifications can be given in the above embodiment. For example, changing the cache mechanism to a ring buffer, a variable-size heap allocator, changing various data attached data, and the like.

以上説明してきたように、本発明の楽音発生装置は、音楽分野、特に電子鍵盤楽器等に利用することができる。   As described above, the musical sound generating apparatus of the present invention can be used in the music field, particularly in electronic keyboard instruments.

1 CPU
3 ROM
4 RAM
5 MIDIインターフェイス
6 キーボード
7 HD(ハードディスク)
8 ディスプレイ
9 D/A変換器
10 スピーカ
11 マウス
15 バス
20 音源
21 信号処理部
22 波形管理部
23 大容量記憶装置
25 出力バッファ
30 キャッシュメモリ
100 楽音発生装置
1 CPU
3 ROM
4 RAM
5 MIDI interface 6 Keyboard 7 HD (hard disk)
8 Display 9 D / A Converter 10 Speaker 11 Mouse 15 Bus 20 Sound Source 21 Signal Processing Unit 22 Waveform Management Unit 23 Mass Storage Device 25 Output Buffer 30 Cache Memory 100 Musical Sound Generation Device

Claims (3)

波形データを割り当て発音を行うボイスを複数備える音源を有して、楽音を発生する楽音発生装置であって、
複数の波形データを記憶するメモリと、
楽音合成指令に応じて、前記波形データを前記複数のボイスのいずれかに割り当てていき、ボイス音を合成した楽音信号を発生させる信号処理手段と、
波形管理手段によって書き込まれた前記波形データを記憶する、前記メモリよりアクセス速度が速いキャッシュメモリと、を備え、
前記波形管理手段は、
複数の前記ボイスが発音中である場合のその複数の発音中ボイスのそれぞれに割り当てる波形データが、前記信号処理手段に供給され続けたと想定した時の当該発音中ボイスに対する残りの発音可能な時間である残存発音可能時間を求める演算部と、
前記演算部によって求められた前記残存発音可能時間に基づいて前記発音中ボイスに対する優先順位を決め、この決めた優先順位に従って前記ボイスを選択する選択部と、
前記選択部によって選択された前記ボイスの波形データを前記メモリから読み出す読み出し部と、
この読み出した波形データを前記キャッシュメモリに書き込む書き込み部と、
前記キャッシュメモリの利用状況を把握して不要なデータを消去する消去部と、
前記演算部が求めた前記残存発音可能時間が零となった場合、対応するボイスを強制無音とするために、前記信号処理手段に無音信号を返す応急措置部と、を含み、
前記演算部は、
前記読み出し部が前記メモリに対して追加読み出しを停止するとした場合に、その追加読み出し停止時点において前記信号処理手段に供給可能な波形データの前記キャッシュメモリ上の残存量である残存発音可能データ量(D)を、実効サンプリング周波数で除した値を前記残存発音可能時間として求め、この実効サンプリング周波数は、録音ピッチ(f1)と再生ピッチ(f2)とのピッチシフト量をn半音として「f2=f1×2 n/12 (Hz)」となる周波数(f2)またはその代替値であることを特徴とする楽音発生装置。
A musical sound generator that generates a musical sound, having a sound source that includes a plurality of voices that assign waveform data and generate sound,
A memory for storing a plurality of waveform data;
In response to a musical tone synthesis command, signal processing means for assigning the waveform data to any of the plurality of voices and generating a musical tone signal obtained by synthesizing the voice sound ;
A cache memory that stores the waveform data written by the waveform management means and has a higher access speed than the memory;
The waveform management means includes
When it is assumed that the waveform data assigned to each of the plurality of sounding voices when the plurality of voices are sounding continues to be supplied to the signal processing means, the remaining soundable time for the sounding voices An arithmetic unit for obtaining a certain remaining pronunciation possible time;
A priority unit for determining the priority for the voices during sound generation based on the remaining soundable time determined by the calculation unit, and a selection unit for selecting the voices according to the determined priority level;
A readout unit for reading out waveform data of the voice selected by the selection unit from the memory;
A writing unit for writing the read waveform data to the cache memory;
An erasure unit that grasps the usage status of the cache memory and erases unnecessary data;
An emergency measure unit that returns a silence signal to the signal processing means in order to make the corresponding voice forced silence when the remaining soundable time determined by the arithmetic unit becomes zero,
The computing unit is
When the reading unit stops additional reading from the memory, the remaining soundable data amount (remaining amount of waveform data on the cache memory that can be supplied to the signal processing means at the time of the additional reading stop ( The value obtained by dividing D) by the effective sampling frequency is obtained as the remaining soundable time, and this effective sampling frequency is expressed as “f2 = f1” where the pitch shift amount between the recording pitch (f1) and the reproduction pitch (f2) is n semitones. A musical sound generator characterized by a frequency (f2) of “ × 2 n / 12 (Hz)” or an alternative value thereof .
請求項1記載の楽音発生装置において、
前記信号処理手段が行う処理と、前記波形管理手段が行う処理とは並行して行われることを特徴とする楽音発生装置。
In the musical sound generator according to claim 1,
A musical sound generating apparatus characterized in that the processing performed by the signal processing means and the processing performed by the waveform management means are performed in parallel.
波形データを割り当て発音を行うボイスを複数備える音源と、複数の波形データを記憶するメモリと、前記波形データを記憶する、前記メモリよりアクセス速度が速いキャッシュメモリとを備えて楽音を発生する楽音発生装置に、
楽音合成指令に応じて、前記波形データを前記複数のボイスのいずれかに割り当てていき、ボイス音を合成した楽音信号を発生させる信号処理機能と、
前記キャッシュメモリに対してアクセス動作を行う波形管理機能と、を実現させるためのプログラムであり、
前記波形管理機能は、
複数の前記ボイスが発音中である場合のその複数の発音中ボイスのそれぞれに割り当てる波形データが、前記信号処理手段に供給され続けたと想定した時の当該発音中ボイスに対する残りの発音可能な時間である残存発音可能時間を求める演算機能と、
前記演算機能によって求められた前記残存発音可能時間に基づいて前記発音中ボイスの優先順位を決め、この決めた優先順位に従って前記ボイスを選択する選択機能と、
前記選択機能によって選択された前記ボイスの波形データを前記メモリから読み出す読み出し機能と、
この読み出した波形データを前記キャッシュメモリに書き込む書き込み機能と、
前記キャッシュメモリの利用状況を把握して不要なデータを消去する消去機能と、
前記演算機能が求めた前記残存発音可能時間が零となった場合、対応するボイスを強制無音とするために、前記信号処理機能に無音信号を返す応急措置機能と、を含み、
前記演算機能は、
前記読み出し機能が前記メモリに対して追加読み出しを停止するとした場合に、その追加読み出し停止時点において前記信号処理機能に供給可能な波形データの前記キャッシュメモリ上の残存量である残存発音可能データ量(D)を、実効サンプリング周波数で除した値を前記残存発音可能時間として求め、この実効サンプリング周波数は、録音ピッチ(f1)と再生ピッチ(f2)とのピッチシフト量をn半音として「f2=f1×2 n/12 (Hz)」となる周波数(f2)またはその代替値であることを特徴とするプログラム。
A tone generator for generating musical tones comprising a sound source having a plurality of voices to which waveform data is assigned and sounded, a memory for storing a plurality of waveform data, and a cache memory for storing the waveform data and having a faster access speed than the memory To the device,
A signal processing function for assigning the waveform data to any of the plurality of voices in response to a musical sound synthesis command, and generating a musical sound signal synthesized with the voice sound ;
And a waveform management function for performing an access operation to the cache memory,
The waveform management function
When it is assumed that the waveform data assigned to each of the plurality of sounding voices when the plurality of voices are sounding continues to be supplied to the signal processing means, the remaining soundable time for the sounding voices A calculation function to obtain a certain remaining pronunciation possible time,
A priority function for determining the priority of the voices during sound generation based on the remaining soundable time determined by the arithmetic function, and a selection function for selecting the voices according to the determined priority;
A read function for reading out waveform data of the voice selected by the selection function from the memory;
A write function for writing the read waveform data to the cache memory;
An erasing function for grasping the usage status of the cache memory and erasing unnecessary data;
An emergency measure function that returns a silence signal to the signal processing function to force the corresponding voice to be silent when the remaining soundable time determined by the calculation function becomes zero,
The calculation function is
When the reading function stops additional reading from the memory, the remaining soundable data amount (remaining amount of waveform data on the cache memory that can be supplied to the signal processing function at the time of the additional reading stop ( The value obtained by dividing D) by the effective sampling frequency is obtained as the remaining soundable time, and this effective sampling frequency is expressed as “f2 = f1” where the pitch shift amount between the recording pitch (f1) and the reproduction pitch (f2) is n semitones. × 2 n / 12 (Hz) "and becomes frequency (f2) or a program to the substitute value der wherein Rukoto.
JP2014234395A 2014-11-19 2014-11-19 Musical sound generator and program Active JP6452234B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014234395A JP6452234B2 (en) 2014-11-19 2014-11-19 Musical sound generator and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014234395A JP6452234B2 (en) 2014-11-19 2014-11-19 Musical sound generator and program

Publications (2)

Publication Number Publication Date
JP2016099408A JP2016099408A (en) 2016-05-30
JP6452234B2 true JP6452234B2 (en) 2019-01-16

Family

ID=56075460

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014234395A Active JP6452234B2 (en) 2014-11-19 2014-11-19 Musical sound generator and program

Country Status (1)

Country Link
JP (1) JP6452234B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6922614B2 (en) * 2017-09-27 2021-08-18 カシオ計算機株式会社 Electronic musical instruments, musical tone generation methods, and programs

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4089687B2 (en) * 2004-12-28 2008-05-28 ヤマハ株式会社 Music signal processor

Also Published As

Publication number Publication date
JP2016099408A (en) 2016-05-30

Similar Documents

Publication Publication Date Title
JP6988343B2 (en) Singing voice editing support method and singing voice editing support device
JP2007047293A (en) Musical sound generating device and program
US10354629B2 (en) Sound control device, sound control method, and sound control program
US10373595B2 (en) Musical sound generation device
US10475425B2 (en) Musical sound generation device
JP3637578B2 (en) Music generation method
JP6011219B2 (en) Audio file generation program and audio file generation apparatus
CN110299128B (en) Electronic musical instrument, method, and storage medium
JP6452234B2 (en) Musical sound generator and program
JP6856081B2 (en) Electronic musical instruments, control methods for electronic musical instruments, and programs
JP6044284B2 (en) Speech synthesizer
JP5157922B2 (en) Speech synthesizer and program
JP2000163057A (en) Device and method for voice assigning and recording medium which records program for voice assigning process
JP3637577B2 (en) Music generation method
JP4096952B2 (en) Music generator
JP7332002B2 (en) Electronic musical instrument, method and program
JP6610211B2 (en) Music performance device and music performance program
JP4239706B2 (en) Automatic performance device and program
JP7124370B2 (en) Electronic musical instrument, method and program
JP6558077B2 (en) Music performance device and music performance program
JP7331915B2 (en) Information processing device, electronic musical instrument, sound capturing system, method and program
JP6443773B2 (en) Musical sound generating device, musical sound generating method, musical sound generating program, and electronic musical instrument
JP2016033674A (en) Voice synthesizing device and voice synthesizing method
JP6606839B2 (en) Waveform writing apparatus, method, program, and electronic musical instrument
JP4920946B2 (en) Music generator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20171101

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180829

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20180913

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181210

R150 Certificate of patent or registration of utility model

Ref document number: 6452234

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250