JP6102975B2 - Musical sound generation device, musical sound generation program, and electronic musical instrument - Google Patents
Musical sound generation device, musical sound generation program, and electronic musical instrument Download PDFInfo
- Publication number
- JP6102975B2 JP6102975B2 JP2015090918A JP2015090918A JP6102975B2 JP 6102975 B2 JP6102975 B2 JP 6102975B2 JP 2015090918 A JP2015090918 A JP 2015090918A JP 2015090918 A JP2015090918 A JP 2015090918A JP 6102975 B2 JP6102975 B2 JP 6102975B2
- Authority
- JP
- Japan
- Prior art keywords
- audio data
- zero cross
- cross point
- data
- song
- 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
Links
Images
Description
本発明は、押鍵に基づく楽音データとオーディオデータとが協働する楽音生成装置、楽音生成プログラム及び電子楽器に関する。 The present invention relates to a musical sound generating device, a musical sound generating program, and an electronic musical instrument in which musical sound data based on key depression and audio data cooperate.
電子楽器においては、いわゆる「自動伴奏」という機能が良く知られている。自動伴奏の機能の中には、所定の楽曲の自動伴奏パターンのデータが格納され、所定のテンポにしたがってそのデータが順次読み込まれて自動伴奏を構成する楽音が発音される。演奏者は、この自動伴奏を聴きつつ、所定のパート(一般的にはメロディ)を楽曲に規定されたタイミングで押鍵することにより、完成された楽曲の楽音が発音される。 In electronic musical instruments, a so-called “automatic accompaniment” function is well known. In the automatic accompaniment function, automatic accompaniment pattern data of a predetermined music is stored, and the data are sequentially read according to a predetermined tempo to generate musical sounds constituting the automatic accompaniment. The performer presses a predetermined part (generally, a melody) at the timing specified in the music while listening to the automatic accompaniment, thereby generating the musical tone of the completed music.
自動伴奏パターンにおいては、所定のコードの構成音に相当する楽音が、自動伴奏パターンが示す伴奏シーケンスにしたがった発音タイミングで発音される。また、自動伴奏パターンには、メロディ音の対旋律などを構成するオブリガート音、および、リズム音も含まれ得る。 In the automatic accompaniment pattern, a musical tone corresponding to a constituent sound of a predetermined chord is generated at a sounding timing according to the accompaniment sequence indicated by the automatic accompaniment pattern. The automatic accompaniment pattern may also include obligato sounds and rhythm sounds that constitute the counter-melody of melody sounds.
このような自動伴奏は、演奏者の鍵操作による楽音の発生と同様の発音形態を有している。すなわち、伴奏シーケンスにしたがった発音タイミングで、音高および音色を含むノートオンイベントが音源部に送信され、音源部が、波形データを格納したROMから、指定された音色のデータを音高にしたがった速度で波形データを読み出すことで、所定の音色および音高の楽音波形データを出力している。 Such an automatic accompaniment has a sound generation form similar to the generation of a musical sound by a player's key operation. That is, a note-on event including the pitch and tone color is transmitted to the sound source unit at the sounding timing according to the accompaniment sequence, and the sound source unit follows the specified tone color data from the ROM storing the waveform data. By reading the waveform data at a predetermined speed, musical tone waveform data of a predetermined tone color and pitch is output.
このような自動伴奏機能を有する電子楽器において、演奏者はその楽曲の演奏に熟練しているとは限らず、正規の押鍵タイミングで鍵を押鍵出来ない場合や、誤った鍵を押鍵してしまう場合がある。特許文献1、2に開示された電子楽器では、このような場合に、自動伴奏パターンの読み出しを適切化して、勝手に伴奏だけが進んで言ってしまうような事態が生じることを防止している。
In such an electronic musical instrument having an automatic accompaniment function, the performer is not necessarily skilled in playing the music, and when the key cannot be pressed at the proper key pressing timing, or the wrong key is pressed. May end up. In such an electronic musical instrument disclosed in
一方、オーディオプレーヤなど他の音響機器からのオーディオデータを受け入れ、或いは、マイクなどからの音響信号をサンプリングしたオーディオデータを受け入れ、そのようなオーディオデータと、音源部から発せられた楽音波形データの双方の再生が可能な電子楽器が提案されている。 On the other hand, audio data from other audio equipment such as an audio player is accepted, or audio data obtained by sampling an audio signal from a microphone or the like is accepted, and both such audio data and musical tone waveform data emitted from a sound source unit are received. An electronic musical instrument that can be reproduced is proposed.
たとえば、オーディオデータを自動伴奏として再生して、メロディ音を演奏者の鍵操作に基づき音源部により生成された楽音波形データとする装置を考えることができる。この場合に、オーディオデータは、所定のサンプリング周波数で読み出されるため、演奏者が正規の押鍵タイミングで押鍵出来なかった場合にも、オーディオデータの読み出しを演奏者の演奏に合わせて制御するのが困難であるという問題点があった。 For example, an apparatus can be considered in which audio data is reproduced as an automatic accompaniment and melody sound is converted to musical sound waveform data generated by a sound source unit based on a player's key operation. In this case, since the audio data is read at a predetermined sampling frequency, the audio data reading is controlled in accordance with the performance of the performer even when the performer cannot press the key at the proper key press timing. There was a problem that it was difficult.
本発明は、オーディオデータを自動伴奏として再生する際に、演奏者の鍵操作に応じて適切なオーディオデータの読み出しを実現できる楽音生成装置、楽音生成プログラム及び電子楽器を提供することを目的とする。 An object of the present invention is to provide a musical sound generating apparatus, a musical sound generating program, and an electronic musical instrument capable of realizing appropriate audio data reading according to a player's key operation when reproducing audio data as an automatic accompaniment. .
本発明の目的は、楽曲を構成する楽音の音高および発音タイミングを示す時間情報を含む曲データ、および、前記曲データにかかる楽曲の伴奏データであるオーディオデータを格納した記憶手段から、前記曲データに含まれる時間情報に基づく経過時間にしたがって前記オーディオデータを読み出すオーディオデータ読み出し手段と、
演奏操作子の操作にかかる曲データにおける正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に未来でかつ直近の第1のゼロクロスポイントを、前記オーディオデータから検出するジャンプ先検出手段と、
前記曲データに示す発音タイミング経過までに、当該発音タイミングに対応する音高の楽音を発生させる前記演奏操作子が操作されたか否かを判断する操作判断手段と、
この操作判断手段にて前記演奏操作子が操作されていないと判断された場合に、前記第1のゼロクロスポイントを始点として、当該ゼロクロスポイントより以前のゼロクロスポイントのうち、発音されている楽音の音高に整合した周期に対応する区間の終点の位置と同一もしくは直近にあり、かつ前記第1のゼロクロスポイントと同位相の第2のゼロクロスポイントを検出するループ先検出手段と、
この第2ゼロクロスポイントと前記第1のゼロクロスポイントとの間の区間をループ区間として前記オーディオデータを繰り返し読み出すループ読み出し手段と、
このループ読み出し手段により読み出しが開始された後に前記操作判断手段により前記演奏操作子が操作されたと判断された場合に、当該演奏操作子の操作タイミングから時系列的に未来でかつ直近にあり、さらに前記演奏操作子の操作タイミング時と同位相の第3のゼロクロスポイントを、前記オーディオデータから検出するジャンプ元検出手段と、
前記検出された第3のゼロクロスポイントから前記検出された第1のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続するように、前記オーディオデータ読み出し手段を制御する制御手段と、
を有する楽音生成装置により達成される。
An object of the present invention is to provide music data including time data indicating pitches and sound generation timings of musical sounds constituting music, and storage means storing audio data which is accompaniment data of music related to the music data. Audio data reading means for reading the audio data according to the elapsed time based on the time information included in the data;
Based on the normal sound generation timing in the music data relating to the operation of the performance operators, the series in the future and and the nearest first zero-cross points when the sound generation timing of the normal, and jump detection means for detecting from said audio data ,
Operation determining means for determining whether or not the performance operator that generates a musical tone having a pitch corresponding to the sound generation timing has been operated before the sound generation timing indicated in the song data;
When it is determined by the operation determining means that the performance operator is not operated, the sound of the musical sound that is sounded among the zero cross points before the zero cross point, starting from the first zero cross point. A loop destination detection means for detecting a second zero cross point that is the same as or closest to the position of the end point of the section corresponding to the period matched to high and has the same phase as the first zero cross point;
Loop reading means for repeatedly reading out the audio data using a section between the second zero cross point and the first zero cross point as a loop section;
When it is determined by the operation determining means that the performance operator has been operated after reading is started by the loop reading means, it is in the future in the time series from the operation timing of the performance operator, and Jump source detection means for detecting a third zero cross point in phase with the operation timing of the performance operator from the audio data;
The audio data reading means is configured to cause audio data reading to jump from the detected third zero cross point to the detected first zero cross point, and thereafter to continue normal audio data reading. Control means for controlling;
This is achieved by a musical sound generator having
本発明によれば、オーディオデータを自動伴奏として再生する際に、演奏者の鍵操作に応じて適切なオーディオデータの読み出しを実現できる楽音生成装置、楽音生成プログラム及び電子楽器を提供することが可能となる。 ADVANTAGE OF THE INVENTION According to this invention, when reproducing audio data as an automatic accompaniment, it is possible to provide a musical sound generation device, a musical sound generation program, and an electronic musical instrument that can realize appropriate audio data reading in accordance with a player's key operation. It becomes.
以下、添付図面を参照して、本発明の実施の形態について説明する。図1は、本実施の形態にかかる電子楽器の外観を示す図である。図1に示すように、本実施の形態にかかる電子楽器10は、鍵盤11を有する。また、鍵盤11の上部には、音色の指定、後述するオーディオデータにしたがったソング伴奏の開始・終了などを行なうためのスイッチ(符号12、13参照)や、演奏される楽曲に関する種々の情報、たとえば、音色、楽譜などを表示する表示部15を有する。本実施の形態にかかる電子楽器10は、たとえば、61個の鍵(C2〜C7)を有する。
Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a diagram showing an external appearance of an electronic musical instrument according to the present embodiment. As shown in FIG. 1, the electronic musical instrument 10 according to the present embodiment has a
図2は、本発明の実施の形態にかかる電子楽器の構成を示すブロックダイヤグラムである。図2に示すように、本実施の形態にかかる電子楽器10は、CPU21、ROM22、RAM23、サウンドシステム24、鍵盤11、入力インタフェース(I/F)14、表示部15、および、上記スイッチ11、12を有するスイッチ群16を備える。
FIG. 2 is a block diagram showing the configuration of the electronic musical instrument according to the embodiment of the present invention. As shown in FIG. 2, the electronic musical instrument 10 according to the present embodiment includes a
CPU21は、電子楽器10全体の制御、鍵盤11の鍵の押鍵やスイッチ群16を構成するスイッチ(たとえば、図1の符号12、13参照)の操作の検出、鍵やスイッチの操作にしたがったサウンドシステム24の制御、オーディオデータにしたがったソング伴奏など、種々の処理を実行する。
The
ROM22は、CPU21に実行させる種々の処理、たとえば、スイッチの操作、鍵盤の何れかの鍵の押鍵、押鍵に応じた楽音の発音、オーディオデータにしたがったソング伴奏などのプログラムを記憶する。また、ROM22は、ピアノ、ギター、ヴァイオリン、ギター、トランペット、クラリネットなど種々の音色の楽音を生成するための波形データを格納した波形データエリア、押鍵すべき鍵およびその押鍵タイミングを含む曲データを格納した曲データエリア、並びに、オーディオデータを格納したオーディオデータエリアを有する。RAM23は、ROM22から読み出されたプログラムや、処理の過程で生じたデータを記憶する。なお、RAM23にも、入力I/F14を介して他の音響機器30から受け入れたオーディオデータを格納するオーディオデータエリアを有する。オーディオデータは、所定のサンプリング周波数でサンプリングされた、たとえば、PCMデータであり、オーディオデータエリアの開始アドレスからデータ値が順次格納されている。
The ROM 22 stores various processes to be executed by the
入力I/F14は、他の音響機器30と接続可能であり、他の音響機器30からのオーディオデータを受け入れることができる。オーディオデータは、CPU21によりRAM23のオーディオデータエリアに格納される。また、オーディオデータは、先頭アドレスのデータからの経過時間と対応付けられている。
The input I / F 14 can be connected to another
サウンドシステム24は、音源部26、オーディオ回路27、スピーカ28およびオーディオデータ再生部29を有する。音源部26は、たとえば、押鍵された鍵についての情報或いは自動伴奏パターンについての情報をCPU21から受信すると、ROM22の波形データエリアから所定の波形データを読み出して、所定の音高の楽音データを生成して出力する。また、音源部26は、波形データ、特に、スネアドラム、バスドラム、シンバルなど打楽器の音色の波形データを、そのまま楽音データとして出力することもできる。また、オーディオデータ再生部29は、オーディオデータエリアに格納されたオーディオデータを、サンプリング周波数にしたがって、また、曲データに含まれる時間情報に基づく経過時間にしたがって読み出す。また、オーディオデータ再生部29は、後述するように、2つのループポイント(ループ元時刻およびループ先時刻)を受け入れて、ループポイント間のオーディオデータのループ再生ができる。オーディオ回路27は、楽音データおよびオーディオデータを合成し、合成されたデータをD/A変換して増幅する。これによりスピーカ28から音響信号が出力される。
The
図3〜図5は、本実施の形態において、ソング伴奏が行われているときの曲データおよびその押鍵タイミングの例を示す図である。図3において、正規タイミングの曲データでは、最初の休符(時間t0)の後、押鍵(キーオン)がされ、時間t1(1)の後に離鍵し、さらに、時間t2(1)の後、次の押鍵(押鍵時間(t1(2))がなされることになっている。実際の押鍵動作(符号320)においては、最初の押鍵および離鍵は適切になされている。しかしながら、離鍵後にt2(1)だけ経過して時刻T(符号322参照)にて次の鍵を押鍵すべきところ、t2’(<t2(1))だけ経過して(符号310参照)時刻T’(符号321参照)にて次の押鍵が行われている。すなわち、T−T’(=t2(1)−t2’)だけ押鍵が早まっている。したがって、それ以降、曲データの読み込みは、T−T’だけ早める必要がある(符号311参照)。 FIGS. 3 to 5 are diagrams showing examples of song data and key pressing timing when song accompaniment is performed in the present embodiment. In FIG. 3, in the music data at the regular timing, after the first rest (time t0), the key is pressed (key-on), released after time t1 (1), and after time t2 (1). Next key press (key press time (t1 (2)) is to be made. In the actual key press operation (reference numeral 320), the first key press and the key release are appropriately performed. However, when t2 (1) has elapsed after the key release and the next key should be depressed at time T (see symbol 322), t2 '(<t2 (1)) has elapsed (see symbol 310). The next key depression is performed at time T ′ (see reference numeral 321), that is, the key depression is advanced by T−T ′ (= t2 (1) −t2 ′). Data reading needs to be accelerated by TT ′ (see reference numeral 311).
図4においても、実際の押鍵動作(符号420)においては、最初の押鍵および離鍵は適切になされている。しかしながら、図4の例では、最初の鍵の離鍵後、t2(1)が経過した後も次の鍵の押鍵がなされない(符号410参照)。たとえば、図5に示すように、最初の鍵の離鍵後、時間t”(>t2(1))だけ経過した後、時刻T”(符号521参照)において押鍵がなされたと考える。この場合には、t”−t2(1)だけ押鍵が遅れている。したがって、曲データの読み込みは、t”−t2(1)だけ遅らせる必要がある(符号512参照)。また、符号511に示す時間においては、オーディオデータの新たなアドレスのデータを読み出すことができない。
Also in FIG. 4, in the actual key pressing operation (reference numeral 420), the first key pressing and key releasing are appropriately performed. However, in the example of FIG. 4, after the first key is released, the next key is not pressed even after t2 (1) has elapsed (see reference numeral 410). For example, as shown in FIG. 5, it is considered that the key is pressed at time T ″ (see reference numeral 521) after the time t ″ (> t2 (1)) has elapsed after the first key is released. In this case, the key depression is delayed by t ″ −t2 (1). Therefore, it is necessary to delay the reading of the music data by t ″ −t2 (1) (see reference numeral 512). In addition, at the time indicated by
本実施の形態においては、後述するように、押鍵による楽音の発生は音源部26により生成される楽音であるが、ソング伴奏は、オーディオデータの再生により実現されるため、図3や図5に示すように、押鍵が早まり、或いは、遅くなった場合に、オーディオデータの読み出しを適切化する必要がある。本実施の形態では、後述するような手法で読み出しの適切化を実現している。
In the present embodiment, as will be described later, the generation of a musical sound by pressing a key is a musical sound generated by the
図6(a)は、本実施の形態にかかる曲データのデータ構成例を示す図、図6(b)は、処理の過程で設定されるデータを格納したレジスタ群の例を示す図である。図6(a)に示すように、曲データ600は、時間間隔を示すタイムのレコード(符号601、603、605参照)、押鍵すべき鍵の音高を含むノートオンイベントのレコード(符号602参照)および離鍵すべき鍵の音高を含むノートオフイベントのレコード(符号604参照)を含む。
FIG. 6A is a diagram showing a data configuration example of song data according to the present embodiment, and FIG. 6B is a diagram showing an example of a register group storing data set in the course of processing. . As shown in FIG. 6A, the
最初のタイムのレコードは、最初の押鍵までの間の時間t0を格納している。この時間t0は、楽曲のイントロの時間に相当する。また、ノートオンイベントのレコードと、ノートオフイベントのレコードとの間のタイムのレコードに格納された時間t1は、押鍵時間を示している。また、ノートオフイベントのレコードと、ノートオンイベントのレコードとの間のタイムのレコードに格納された時間t2は、ある鍵が離鍵されてから次の鍵を押鍵するまでの時間間隔を示している。 The first time record stores the time t0 until the first key depression. This time t0 corresponds to the time of the intro of the music. The time t1 stored in the time record between the note-on event record and the note-off event record indicates the key pressing time. The time t2 stored in the time record between the note-off event record and the note-on event record indicates the time interval from when a key is released until the next key is pressed. ing.
図6(b)に示すように、RAM23中のレジスタ群610は、経過時間レジスタ、時間情報レジスタ、今回音高情報レジスタ、次回音高情報レジスタ、ソング経過時間レジスタ、正解フラグ、スタータスレジスタ、ループ再生フラグを有する。経過時間レジスタには、ソング処理間で経過する時間が格納される。時間情報レジスタには、ノートオンイベント間の時間間隔(Δt=t1+t2)が格納される。今回音高情報レジスタおよび次回音高レジスタには、ノートオンイベントのレコードに含まれる音高情報が格納される。また、ソング経過時間レジスタは、ソングが開始されてからの経過時間が格納される。ステータスレジスタには、電子楽器10の演奏ステータスが格納される。
As shown in FIG. 6B, the
以下、本実施の形態にかかる電子楽器10において実行される処理について説明する。図7(a)は、本実施の形態にかかる電子楽器において実行されるメインフローの例を示すフローチャートである。また、図7(b)は、本実施の形態にかかるタイマ割り込み処理の例を示すフローチャートである。タイマ割り込み処理においては、図7(a)に示すメインフローが実行されているときに、所定の時間間隔で、割込カウンタである経過時間カウンタおよびソング経過時間カウンタのカウンタ値が、それぞれインクリメントされる(ステップ711、712)。なお、タイマ割り込み処理は、CPU21の指示によりカウンタの停止が可能である。
Hereinafter, processing executed in the electronic musical instrument 10 according to the present embodiment will be described. FIG. 7A is a flowchart showing an example of a main flow executed in the electronic musical instrument according to the present embodiment. FIG. 7B is a flowchart showing an example of timer interrupt processing according to the present embodiment. In the timer interrupt process, the counter values of the elapsed time counter and the song elapsed time counter, which are interrupt counters, are incremented at predetermined time intervals when the main flow shown in FIG. (
図7(a)に示すように、電子楽器10のCPU21は、電子楽器10の電源が投入されると、RAM23中のデータや、表示部15の画像のクリアクリアを含むイニシャル処理(初期化処理)を実行する(ステップ701)。イニシャル処理(ステップ701)が終了すると、CPU21は、スイッチ群16を構成するスイッチのそれぞれの操作を検出し、検出された操作にしたがった処理を実行するスイッチ処理を実行する(ステップ702)。
As shown in FIG. 7A, when the electronic musical instrument 10 is turned on, the
たとえば、スイッチ処理(ステップ702)においては、音色指定スイッチや、ソング伴奏のための曲データの指定スイッチ、ソング再生スイッチの操作が検出される。たとえば、ソング再生スイッチがオンになると、CPU21は、レジスタ群610中のステータスレジスタに所定の値を格納する。また、ソング再生スイッチがオフとなると、ステータスレジスタに、ソング再生オフ状態を示す値を格納する。
For example, in the switch process (step 702), operations of a tone color designation switch, a song data designation switch for song accompaniment, and a song playback switch are detected. For example, when the song playback switch is turned on, the
スイッチ処理(ステップ702)が終了すると、CPU21は、鍵盤処理を実行する(ステップ703)。図8は、本実施の形態にかかる鍵盤処理の例をより詳細に示すフローチャートである。鍵盤処理において、CPU21は、鍵盤11の鍵を走査する(ステップ801)。鍵の走査結果であるイベント(ノートオン或いはノートオフ)は、RAM23に一時的に記憶される。CPU21は、RAM23に記憶された鍵の走査結果を参照して、ある鍵について新規なイベントが有るか否かを判断する(ステップ802)。ステップ802でYesと判断された場合には、CPU21はステータスレジスタを参照して、演奏ステータスが、「ソング再生中」であるかを判断する(ステップ803)。
When the switch process (step 702) ends, the
ステップ803でYesと判断された場合には、レッスン鍵盤処理が実行される(ステップ804)。その一方、ステップ803でNoと判断された場合には、通常の鍵盤処理が実行される(ステップ805)。ステップ805においては、CPU21は、鍵イベントがノートオン(押鍵)であるかノートオフ(離鍵)であるかを判断する。ノートオンであれば、CPU21は、押鍵された鍵の音高の情報を含むノートオンイベントを生成して音源部26に出力する。ノートオフであれば、離鍵された鍵の音高の情報を含むノートオフイベントを生成して音源部26に出力する。
If it is determined YES in
次に、レッスン鍵盤処理(ステップ804)について説明する。図9は本実施の形態にかかるレッスン鍵盤処理の例を示すフローチャートである。図9に示すように、CPU21は、鍵イベントが新規のノートオンであるかを判断する(ステップ901)。ステップ901でYesと判断された場合には、CPU21は、押鍵された鍵の音高の情報を含むノートオンイベントを生成して音源部26に出力する(ステップ902)。また、ステップ901でNoと判断された場合には、離鍵された鍵の音高の情報を含むノートオフイベントを生成して音源部26に出力する(ステップ903)。ステップ903の後、レッスン鍵盤処理は終了する。
Next, the lesson keyboard process (step 804) will be described. FIG. 9 is a flowchart showing an example of lesson keyboard processing according to the present embodiment. As shown in FIG. 9, the
ステップ902が実行された後、CPU21は、新規なノートオンにかかる鍵の音高が、次回音高情報レジスタ中に格納されたものと一致するかを判断する(ステップ904)。ステップ904でNoと判断された場合には、レッスン鍵盤処理を終了する。ステップ904でYesと判断された場合には、ステップ904でYesと判断された場合には、CPU21は、レジスタ群中の正解フラグを「1」にセットする(ステップ905)。この正解フラグは、演奏者による押鍵が、次に押鍵すべき鍵と一致した場合に「1」にセットされるものである。
After
次いで、CPU21は、現在、ソング伴奏データであるオーディオデータがループ再生中であるかを判断する(ステップ906)。ループ再生中であるかは、レジスタ群中のループ再生フラグが「1」であるかを判断すればよい。ステップ906でNoと判断された場合には、CPU21は、早押し対応のジャンプ元時刻をサーチし(ステップ907)、ステップ906でYesと判断された場合には、CPU21は、遅押し対応のジャンプ元時刻をサーチする(ステップ908)。ジャンプ元時刻は、押鍵タイミングから時系列的に未来でかつ直近の所定の位相(たとえば、データ値が負から正に移行する)のゼロクロスポイントである。
Next, the
鍵盤処理(ステップ703)が終了すると、CPU21はソング処理を実行する(ステップ704)。図10は本実施の形態にかかるソング処理の例を示すフローチャートである。図10に示すように、CPU21は、ステータスレジスタを参照して、演奏ステータスが「ソング再生中」を示しているかを判断する(ステップ1001)。ステップ1004でNoと判断された場合には、CPU21は、ステータスレジスタを参照して、演奏スタータスが「ソング開始」を示しているかを判断する(ステップ1002)。ステップ1002でNoと判断された場合には、ソング処理を終了する。ステップ1002でYesと判断された場合には、CPU21は、ソング開始処理を実行する(ステップ1003)。
When the keyboard process (step 703) is completed, the
図11は、本実施の形態にかかるソング開始処理の例を示すフローチャートである。図11に示すように、CPU21は、ROM22に格納された曲データの先頭のレコードから、タイムt0を取得する(ステップ1101)。このタイムt0は、初期的な時間情報Δtとして、レジスタ群中、時間情報レジスタに格納される。CPU21は、次のアドレスのレコードからノートオンイベントを取得して、ノートオンイベントに含まれる音高情報を、今回音高情報レジスタに格納する(ステップ1102)。また、CPU21は、次のノートオンイベントのレコードを取得して、当該次のノートオンイベントに含まれる音高情報を、時間音高情報レジスタに格納する(ステップ1103)。
FIG. 11 is a flowchart showing an example of the song start process according to the present embodiment. As shown in FIG. 11, the
また、CPU21は、タイマ割り込み処理によるソング経過時間カウンタの動作を許可し、ソング経過時間の計測を開始する(ステップ1104)とともに、オーディオデータ再生の開始をオーディオデータ再生部29に指示する(ステップ1105)。また、CPU21は、ステータスレジスタに、演奏ステータスとして「ソング再生中」を示す情報を格納する(ステップ1106)。
Further, the
ステップ1001でYesと判断された場合には、CPU21は、ソング楽音再生処理を実行する(ステップ1004)。図12は、本実施の形態にかかるソング楽音再生処理の例を示すフローチャートである。図12に示すように、CPU21は、経過時間レジスタのレジスタ値を取得する(ステップ1201)。次いで、CPU2は、時間情報Δtを算出すべきであるかを判断する(ステップ1202)。ステップ1202でYesと判断された場合には、今回押鍵された鍵についてのノートオンイベントのレコードの次のレコード中のタイムt1と、ノートオフイベントのレコードの次のレコード中のタイムt2とを加算して、加算値t1+t2を、時間情報Δtとして時間情報レジスタに格納する(ステップ1203)。なお、ステップ1202において時間情報Δtを算出すべき場合とは、今回音高情報レジスタおよび次回音高情報レジスタの値が変更された場合である。
When it is determined Yes in
次いで、CPU21は、Δt−経過時間を算出する(ステップ1204)。ステップ1201〜1204において、前回の押鍵(ノートオン)の時刻からの経過時間が、Δtだけ経過して、次の押鍵(ノートオン)の時刻に達しているかを判断している。ステップ1205で、ステップ1204での結果を参照して、前回の押鍵の時刻からΔtだけ経過している場合には(ステップ1205でYes)、次の押鍵をすべき時刻に達しているのに、押鍵がまだされていないことを示している。したがって、ステップ1205でYesと判断された場合には、CPU21は、ループポイントサーチ処理を実行する(ステップ1206)。
Next, the
図13は、本実施の形態にかかるループポイントサーチ処理の例を示すフローチャートである。図13に示すように、CPU21は、今回音高レジスタ中の今回音高情報に基づき、当該音高の周期であるループ周期を算出する(ステップ1301)。このループ周期が、オーディオデータのループの基本周期となる。CPU21は、オーディオデータにおいて現在再生中のアドレスから過去に遡ってゼロクロスポイントをサーチする(ステップ1302)。CPU21は、ゼロクロスポイント間の平均周期を算出する(ステップ1303)。なお、ここで、サーチされるゼロクロスポイントは、すべて同じ位相のゼロクロスポイントである。すなわち、最初に見出されたゼロクロスポイントが、立ち上がり(データ値が負から正に移行する)ゼロクロスポイントであれば、他の見出されるゼロクロスポイントも、すべて立ち上がりのゼロクロスポイントとなる。
FIG. 13 is a flowchart showing an example of the loop point search process according to the present embodiment. As shown in FIG. 13, the
CPU21は、ループ周期と平均周期との差異の絶対値が、許容範囲内(つまり、所定の閾値より小さい)か、を判断する(ステップ1304)。ステップ1304でNoと判断された場合には、CPU21は、さらにオーディオデータの時系列を遡って次のゼロクロスポイントをサーチする(ステップ1302)。その一方、ステップ1304でYesと判断された場合には、CPU21は、上記差異の絶対値が許容範囲となったゼロクロスポイントを、オーディオデータのループポイントのうち、ループ先のポイントとしてRAM23に格納する(ステップ1305)。なお、ループポイントはループ先のポイントおよびループ元のポイントがある。本実施の形態においては、ループ先のポイントを示す情報として、上記ゼロクロスポイントに対応する時刻(ループ先時刻)が格納される。また、後述するように、本実施の形態においては、正規の押鍵タイミングは、所定の位相(立ち上がり、つまりデータ値が負から正に移行する)のゼロクロスポイントと一致している。したがって、ループ元のポイントは、正規の押鍵タイミングに対応するポイントである。そこで、本実施の形態においては、ループ元のポイントを示す情報として、正規の押鍵タイミングに対応する時刻(ループ元時刻)が格納される。
The
その後、CPU21は、レジスタ群中のループ再生フラグを「2」にセットする(ステップ1306)。なお、ループ再生フラグは、オーディオデータのループ再生状態を示すものであり、フラグが「2」であることはループ再生開始状態であることを示す。また、フラグが「1」であることは、ループ再生状態、フラグが「0」であることは、ループ再生がされていない状態を、それぞれ示す。
Thereafter, the
図14は、本実施の形態にかかるループポイントの検出の例を説明する図である。図14において、ノートオフ(離鍵)のタイミングは符号1401で示し、本来の次のノートオン(押鍵)のタイミングが符号1402で示されている。ある鍵のノートオンから次のノートオンまでの時間はΔtである(符号1400参照)。また、ソング伴奏としてのオーディオデータは符号1400で示されている。なお、上記既に押鍵および離鍵(符号1401)された件の音高はA4=440Hzであり、ループ周期は約2.27msecである。
FIG. 14 is a diagram for explaining an example of loop point detection according to the present embodiment. In FIG. 14, the note-off (key release) timing is indicated by
図14において、本来の次のノートオンで実際の押鍵がなされなかった場合には、CPU21は、オーディオデータのゼロクロスポイント(同位相のゼロクロスポイント)間の周期を計測する。最初の処理では、本来のノートオンのタイミングから時系列に遡って、1組のゼロクロスポイントが特定され、その間の波形(符号1411参照)の平均周期は2.22msecである。たとえば、本実施の形態において、A4の音高に関する閾値を0.01msecとすると、|2.27−2.22|≧閾値であるため、図13のステップ1304でNoと判断され、次のステップ1302では、さらに時系列に遡って、2組のゼロクロスポイントが特定される。
In FIG. 14, when the actual key depression is not performed at the next next note-on, the
それぞれの間の2つの波形(符号1411、1412)の平均周期(2.245msec)が算出される。ここでも、|2.27−2.245|≧閾値であるため、再度、ステップ1302に戻る。ステップ1302では、さらに時系列を遡って、3組のゼロクロスポイントが特定される。それぞれの間の3つの波形(符号1411〜1413参照)の平均周期(2.263msec)が算出される。ここでも、|2.27−2.263|≧閾値であるため、再度、ステップ1302に戻る。
An average period (2.245 msec) of two waveforms (
ステップ1302では、さらに時系列を遡って、4組のゼロクロスポイントが特定される。それぞれの間の4つの波形(符号1411〜1414参照)の平均周期(2.27msec)が算出される。ここでは、|2.27−2.27|<閾値であるため、ステップ1304においてYesと判断され、4つの波形1411〜1414からなる区間(符号1420参照)がループ区間となり、その始点および終点(符号1422、1421参照)がループポイントとなる。本実施の形態おいては、上記始点が、ループ先時刻に対応し、終点がループ元時刻に対応する。
In
このようにして、現在発音中の楽音の音高に整合した周期の波形の区間が得られ、当該区間の波形が繰り返し読み出されることで、演奏者にとって違和感のないソング伴奏音を出力することが可能となる。 In this way, a period of a waveform having a period that matches the pitch of the currently sounding musical tone is obtained, and by repeatedly reading out the waveform of the period, it is possible to output a song accompaniment sound that does not make the player feel uncomfortable. It becomes possible.
ソング楽音再生処理(ステップ1004)が終了すると、CPU21は、ソングオーディオ再生処理を実行する(ステップ1005)。図15および図16は、本実施の形態にかかるソングオーディオ再生処理の例を示すフローチャートである。図15に示すように、CPU21は、ループ再生フラグが「2」であるかを判断する(ステップ1501)。ループ再生フラグが「2」であることは、ループ再生開始状態であることを示している。ステップ1501でYesと判断された場合には、図16(b)のステップ1611に進む。ステップ1501でNoと判断された場合には、CPU21は、ループ再生フラグが「1」であるかを判断する(ステップ1502)。ループ再生フラグが「1」であることはループ再生状態であることを示している。ステップ1502でYesと判断された場合には、CPU21は、図16(a)のステップ1601に進む。
When the song tone reproduction process (step 1004) is completed, the
ステップ1502でNoと判断された場合、すなわち、再生フラグが「0」である場合(ループ再生がされていない場合)には、CPU21は、正解フラグが「1」であるかを判断する(ステップ1503)。ステップ1503でNoと判断された場合には、ソングオーディオ再生処理を終了する。ステップ1503でYesと判断された場合は、演奏者が次に押鍵すべき鍵を、正規の押鍵タイミングより早く押鍵したこと(早押し)を示している。この場合には、CPU21は、経過時間カウンタを参照して、ジャンプ元時刻に到達しているかを判断する(ステップ1504)。ステップ1504でNoと判断された場合には、ソングオーディオ処理を終了する。
When it is determined No in
ジャンプ元時刻は、押鍵された鍵の押鍵タイミングから、時系列的に未来でかつ直近のゼロクロスポイントである。したがって、本実施例においては、ゼロクロスポイントを検出して、オーディオデータの継ぎ目を平滑にすることを可能にしている。ステップ1504でYesと判断された場合には、CPU21は、正解フラグを「0」にリセットする(ステップ1505)。また、CPU21は、ソング経過時間を、ジャンプ元時刻に基づき更新する(ステップ1506)。すなわち、ジャンプ元時刻と、本実施の形態におけるジャンプ先時刻に対応する、次の押鍵すべき鍵の正規の押鍵タイミングとを一致させることで、継ぎ目が円滑でかつ演奏者の早押しに対応したオーディオデータの再生が実現される。その後、CPU21は、曲データを参照して、今回音高情報、時間情報Δtおよび次回音高情報をそれぞれ更新する(ステップ1507〜1509)。
The jump source time is the latest zero cross point in the future in chronological order from the key pressing timing of the pressed key. Therefore, in this embodiment, it is possible to detect the zero cross point and smooth the seam of the audio data. If it is determined Yes in
次に、ステップ1502でYesと判断された場合について説明する。ステップ1502でYesと判断された場合には、ループ再生が既に行われている状態である。この場合には、CPU21は、正解フラグが「1」であるかを判断する(ステップ1601)。ステップ1602でNoと判断された場合には、ソングオーディオ再生処理を終了する。
Next, the case where Yes is determined in
ステップ1601でYesと判断された場合には、演奏者が次に押鍵すべき鍵を、正規の押鍵タイミングより遅く押鍵したこと(遅押し)を示している。ステップ1601でYesと判断された場合には、CPU21は、経過時間カウンタを参照して、ジャンプ元時刻に到達しているかを判断する(ステップ1602)。ステップ1602でNoと判断された場合には、ソングオーディオ処理を終了する。ステップ1602でYesと判断された場合には、CPU21は、ループ再生フラグを「0」にリセットする(ステップ1603)。その後、ステップ1505〜1509の処理が実行される。
If it is determined Yes in
次に、ステップ1501でNoと判断された場合について説明する。ステップ1501でYesと判断された場合には、CPU21は、図13のステップ1305で設定された2つのループポイント(ループ元時刻およびループ先時刻)をオーディオデータ再生部29に出力する(ステップ1611)。また、CPU21は、タイマ割り込み処理によるソング経過時間カウンタのカウントを停止する(ステップ1612)とともに、経過時間カウンタのカウントも停止する(ステップ1613)。これは、ループ再生中では、ループ元時刻とループ先時刻との間でオーディオデータがループ再生され、曲データ自体の進行は伴わないからである。また、CPU21はループ再生フラグを「1」にセットする(ステップ1614)。その後、ソングオーディオ再生処理は終了する。
Next, the case where No is determined in
ソング処理(ステップ704)が終了すると、CPU21は、音源発音処理を実行する(ステップ705)。図17は、本実施の形態にかかる音源発音処理の例を示すフローチャートである。図17の音源発音処理において、ステップ1701〜1712は、CPU21からの指示および受け入れた情報に基づいてオーディオデータ再生部29が実行する。また、ステップ1713は、音源部26が実行する。
When the song process (step 704) ends, the
図17に示すように、オーディオデータ再生部29は、ループ再生フラグが「1」であるかを判断する(ステップ1701)。ステップ1701でNoと判断された場合には、通常のオーディオデータの読み出しがなされる。すなわち、オーディオデータ再生部29は、サンプリングレートにしたがったデータ読み出し時刻に到達したかを判断する(ステップ1702)。ステップ1702でYesと判断された場合には、オーディオデータ再生部29は、オーディオデータのデータ読み出しアドレスに基づいてオーディオデータを読み出し(ステップ1703)、オーディオ回路27に出力する(ステップ1704)。次いで、オーディオデータ再生部29は、オーディオデータエリアのデータ読み出しアドレスを歩進する(ステップ1705)。
As shown in FIG. 17, the audio
ステップ1701でYesと判断された場合には、オーディオデータ再生部29は、オーディオデータのデータ読み出しアドレスが、ループ元時刻に対応する値に到達しているかを判断する(ステップ1706)。ステップ1706でYesと判断された場合には、オーディオデータ再生部29は、データ読み出しアドレスをジャンプ時刻に応答する値に変更する(ステップ1707)。なお、ジャンプ先時刻は、押鍵された鍵の正規の押鍵タイミングに相当する時刻である。
If it is determined Yes in
次いで、オーディオデータ再生部29は、サンプリングレートにしたがったデータ読み出し時刻に到達したかを判断する(ステップ1708)。ステップ1708でYesと判断された場合には、オーディオデータ再生部29は、オーディオデータのデータ読み出しアドレスに基づいてオーディオデータを読み出し(ステップ1709)、時間の経過とともに減衰するエンベロープと乗算する(ステップ1710)。その後、オーディオデータ再生部29は、乗算されたオーディオデータをオーディオ回路27に出力する(ステップ1711)。また、オーディオデータ再生部29は、オーディオデータエリアのデータ読み出しアドレスを歩進する(ステップ1712)。
Next, the audio
このようにして、通常のオーディオデータの再生或いはオーディオデータのループ再生が行われると、音源部26による楽音データ発音処理が実行される(ステップ1703)。無論、ステップ1701〜1712と、ステップ1713とは並列的に実行されても良い。楽音データ発音処理において、音源部26は、CPU21からノートオンイベントを受け入れていれば、ノートオンイベントにしたがった音色の波形データをROM22から、音高にしたがった速度で読み出し、読み出された波形データに所定のエンベロープを乗算して、乗算されたデータをオーディオ回路27に出力する。また、CPU21からノートオフイベントを受け入れていれば、ノートオフイベントにしたがった音高のデータの消音を実行する。
In this way, when normal audio data reproduction or audio data loop reproduction is performed, musical tone data sound generation processing by the
音源発音処理(ステップ705)が終了すると、CPU21は、その他の処理(たとえば、表示部15への画像表示など:ステップ706)を実行して、ステップ702に戻る。
When the sound source sound generation process (step 705) ends, the
図18は、本実施の形態において、楽曲における押鍵(ノートオン)および離鍵(ノートオフ)のタイミングとオーディオデータの例、図19は、演奏者による早押しがあった場合のオーディオデータの例を示す図である。図18に示すように、本実施の形態においては、予め曲データ1800の押鍵タイミングが、オーディオデータ1810の所定の位相(この例ではデータ値が負から正に移行する)のゼロクロスポイントと一致するようになっている(符合1811、1812参照)。この例では、最初の正規の押鍵タイミングでの押鍵(符号1811参照)と次の正規の押鍵タイミングでの押鍵との間の波形は、同位相のゼロクロスポイントにて画定されている(符号1821)。同様に次の正規の押鍵タイミングでの押鍵とその次の正規の押鍵タイミングとの間の波形も、同位相のゼロクロスポイントにより画定されている。なお、本実施の形態においては正規の押鍵タイミングが、オーディオデータの所定の位相のゼロクロスポイントと一致するように構成されているがこれに限定されるものではない。
FIG. 18 shows an example of the key press (note-on) and key release (note-off) timings and audio data in the present embodiment, and FIG. 19 shows the audio data when the player performs a quick press. It is a figure which shows an example. As shown in FIG. 18, in this embodiment, the key depression timing of the
図19において、演奏者が、最初の押鍵を、正規タイミングより早いタイミングで行っている(符合1911参照)。この場合には、オーディオデータにおいて、演奏者による押鍵タイミングから、時系列的に未来でかつ直近のゼロクロスポイントが見出される(符号1931参照)。そこで、上記ゼロクロスポイントで、最初の正規の押鍵タイミングでの押鍵(符号1811参照)と次の正規の押鍵タイミングでの押鍵との間の波形(符号1941)がつなぎ合わされる。なお、図19において、タイミング1931と1912との間の波形1941は、図18の波形1821と一致し、タイミング1912と1913との間の波形1942は、図18の波形1822と一致する。
In FIG. 19, the performer performs the first key depression at a timing earlier than the normal timing (see reference numeral 1911). In this case, in the audio data, the latest zero cross point in the future is found in time series from the key pressing timing by the performer (see reference numeral 1931). Therefore, at the zero cross point, a waveform (reference numeral 1941) between the key depression at the first regular key depression timing (see numeral 1811) and the key depression at the next regular key depression timing is connected. In FIG. 19, a
このように本実施の形態においては、演奏者による早押しがあった場合に、オーディオデータにおいて、時系列的に未来でかつ直近のゼロクロスポイントが見出され、そこから、データ値がゼロから開始する、正規の押鍵タイミングに対応するオーディオデータが継ぎ合わされて、再生される。したがって、正規の押鍵タイミングより早い押鍵があっても、当該早い押鍵にしたがったオーディオデータの読み出しがなされ、かつ、その継ぎ目も滑らかであり、不快なノイズが生ずることがない。 As described above, in this embodiment, when there is a fast press by the performer, a future and the latest zero cross point is found in the audio data in time series, from which the data value starts from zero. The audio data corresponding to the regular key pressing timing is spliced and reproduced. Therefore, even if there is a key depression earlier than the regular key depression timing, the audio data is read according to the early key depression, and the joint is smooth, so that unpleasant noise does not occur.
また、演奏者により正規のタイミングで押鍵が無かった場合には、押鍵の無い間、図14を参照して説明したように、ループ先時刻(符号1422)とループ元時刻(符号1421)との間でオーディオデータのループ再生が行われる。その後、ユーザによる押鍵すべき鍵の押鍵が行われると、押鍵タイミングから時系列的に未来でかつ直近のゼロクロスポイントに対応するジャンプ元時刻から、押鍵された鍵の正規の押鍵タイミングに相当する時刻であるジャンプ先時刻に、オーディオデータの読み出しアドレスが切り換えられる。したがって、早押しのときと同様に、遅い押鍵にしたがったオーディオデータの読み出しがなされ、かつ、その継ぎ目も滑らかであり、不快なノイズが生ずることがない。 If the player does not press the key at regular timing, the loop destination time (reference numeral 1422) and the loop original time (reference numeral 1421) while there is no key press, as described with reference to FIG. Audio data is played back in a loop. After that, when the user presses the key to be pressed, the normal key pressing of the pressed key from the jump source time corresponding to the nearest zero cross point in the future in chronological order from the key pressing timing. The read address of the audio data is switched at a jump destination time that is a time corresponding to the timing. Therefore, the audio data is read according to the slow key depression as in the case of the early depression, and the joint is smooth, so that unpleasant noise does not occur.
なお、本実施の形態においては、鍵の正規の押鍵タイミングが、オーディオデータの所定の位相のゼロクロスポイントとが一致するようにオーディオデータが構成されていたが、これに限定されるものではない。この場合には、上記ジャンプ先時刻として、鍵の正規の押鍵タイミングに対応するオーディオデータから時系列的に未来でかつ直近の、所定の位相のゼロクロスポイントを用いればよい。 In the present embodiment, the audio data is configured such that the normal key pressing timing of the key matches the zero-cross point of the predetermined phase of the audio data, but the present invention is not limited to this. . In this case, as the jump destination time, a zero-cross point of a predetermined phase that is in the future in the time series from the audio data corresponding to the normal key pressing timing of the key may be used.
本実施の形態においては、CPU21は、鍵の押鍵タイミングが、曲データに規定される発音タイミングより早かったと判断された場合に、オーディオデータにおいて、鍵の押鍵タイミングから時系列的に一方向にある直近でかつ所定の位相の第1のゼロクロスポイントを見出す。また、上記押鍵操作にかかる曲データにおける正規の発音タイミングに基づき、正規の発音タイミングから時系列的に一方向にある直近でかつ所定の位相の第2のゼロクロスポイントを見出す。CPU21は、上記第1のゼロクロスポイントの情報および第2のゼロクロスポイントの情報をオーディオデータ再生部29に出力する。オーディオデータ再生部29は、第1のゼロクロスポイントから第2のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続する。
In the present embodiment, when it is determined that the key pressing timing is earlier than the tone generation timing specified in the song data, the
これにより、早押しの押鍵があった場合であっても、その押鍵の正規の発音タイミング(押鍵タイミング)に対応するオーディオデータの再生が可能であり、演奏者による押鍵と、オーディオデータの再生との間にずれが生じることを防止できる。また、同位相のゼロクロスポイントを連結させたオーディオデータの読み出しを実現することにより、オーディオデータの継ぎ目においてノイズが発生することを防止できる。 As a result, even when a key is pressed quickly, audio data corresponding to the normal tone generation timing (key pressing timing) of the key press can be reproduced. It is possible to prevent a deviation from occurring during data reproduction. Also, by realizing reading of audio data in which zero-cross points having the same phase are connected, it is possible to prevent noise from occurring at the seam of the audio data.
また、本実施の形態においては、第1のゼロクロスポイントから、第2のゼロクロスポイントにオーディオデータの読み出しをジャンプさせるときに、CPU21は、正規の発音タイミングに基づく経過時間に更新し、更新された経過時間にしたがって、オーディオデータ再生部39は、オーディオデータを読み出す。したがって、演奏者による早押しがあった場合にも、経過時間を適切化することが可能である。
In the present embodiment, when the audio data reading is jumped from the first zero cross point to the second zero cross point, the
また、本実施の形態においては、CPUは、鍵の押鍵タイミングから時系列的に未来でかつ直近の第1のゼロクロスポイントを見出すとともに、正規の発音タイミング(押鍵タイミング)に基づき、当該正規の発音タイミングから時系列的に未来でかつ直近の第2のゼロクロスポイントを見出す。第1のゼロクロスポイントとして、押鍵タイミングから時系列的に未来でかつ直近のものを見出すことで、処理時間を考慮しつつ、適切に第1のゼロクロスポイントから第2のゼロクロスポイントへの移行が実現できる。 Further, in the present embodiment, the CPU finds the first zero cross point that is in the future in the chronological order from the key pressing timing, and based on the normal sounding timing (key pressing timing), The second zero crossing point in the future in the chronological order is found from the pronunciation timing of. As the first zero-cross point, the transition from the first zero-cross point to the second zero-cross point can be appropriately performed while considering the processing time by finding the most recent one in the time series from the key press timing. realizable.
特に、本実施の形態においては、オーディオデータにおいて、楽音の発音タイミング(押鍵タイミング)に対応するタイミングにおいて、所定の位相のゼロクロスポイントが位置する。CPU21は、正規の発音タイミング(押鍵タイミング)に対応する所定の位相の第2のゼロクロスポイントを検出する。これにより、第2の押鍵タイミングの検出を容易にすることが可能となる。
In particular, in the present embodiment, a zero-cross point having a predetermined phase is located at a timing corresponding to the tone generation timing (key press timing) of the musical sound in the audio data. The
本発明は以上の実施の形態に限定されるものではない。たとえば、前記実施の形態において、現在発音中の楽音の音高情報(今回音高情報)に基づいたループ周期に、その平均周期が近似する複数のループ波形を特定している。しかしながらこれに限定されるものではない。たとえば、曲データにコード名が付加されていれば、現在発音中の楽音に関連付けられたコード名に基づき、その根音に基づくループ周期と、オーディオデータのループ波形の周期とを比較しても良い。 The present invention is not limited to the above embodiment. For example, in the embodiment described above, a plurality of loop waveforms whose average period approximates the loop period based on the pitch information (current pitch information) of the tone currently being generated are specified. However, the present invention is not limited to this. For example, if a chord name is added to the song data, the loop period based on the root note and the period of the loop waveform of the audio data are compared based on the chord name associated with the currently sounding tone. good.
図20は、本発明の他の実施の形態にかかる曲データのデータ構成例を示す図である。図20に示すように、他の実施の形態においては、曲データ2000のノートオンイベント(符号2001、2011参照)のそれぞれに関連付けられて、コード情報(符号2002、2012参照)のレコードが設けられる。コード情報は、たとえば、CM7、Cm7、Am7、D7など、根音を示す情報を含む。
FIG. 20 is a diagram showing a data configuration example of song data according to another embodiment of the present invention. As shown in FIG. 20, in another embodiment, a record of code information (see
図21は、図13は、本実施の形態にかかるループポイントサーチ処理の例を示すフローチャートである。図21に示すように、CPU21は、今回音高レジスタ中の今回音高情報に関連付けられた、曲データ中のコード情報を取得する(ステップ2101)。次いで、CPU21は、コード情報に含まれる根音に基づき、根音の周期であるループ周期を算出する(ステップ2102)。たとえば、コード情報が、AM7、Am7など、根音がAであれば、例示的にA3(220KHz)に基づくループ周期(4.5454msec)が算出される。ここでは、オクターブを考慮して、根音は比較的低めの音高が採用される。
FIG. 21 is a flowchart showing an example of the loop point search process according to the present embodiment. As shown in FIG. 21, the
引き続くステップ2103、2104は、図13のステップ1302、1303と同様である。次いで、CPU21は、ループ周期と平均周期のn倍(n=1、2、4)との差異の絶対値が、許容範囲内(つまり、所定の閾値より小さい)か、を判断する(ステップ2105)。ステップ2105では、オーディオデータが、上記根音の1オクターブ、2オクターブ高い楽音である可能性を考慮している。
ステップ2105でNoと判断された場合には、CPU21は、さらにオーディオデータの時系列を遡って次のゼロクロスポイントをサーチする(ステップ2103)。ステップ2105でYesと判断された場合には、CPU21は、上記差異の絶対値が許容範囲となったゼロクロスポイントを、オーディオデータのループポイントのうち、ループ先のポイントとしてRAM23に格納する(ステップ2106)とともに、ループ再生フラグを「2」にセットする(ステップ2107)。
When it is determined No in
以上、本発明の実施の形態について詳細に説明したが、本発明の範囲は上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明およびその均等の範囲が、本発明の範囲内に包含される。以下、本出願の願書に最初に添付した特許請求の範囲に記載された発明を付記する。なお、付記に記載した請求項の項番は、本出願の願書に最初に添付した特許請求の範囲の項番に相当する。 Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited to the above-described embodiments, and the invention described in the claims and the equivalents thereof are described in the present invention. Is included in the range. Hereinafter, the invention described in the scope of claims attached to the application of the present application will be added. Note that the item numbers of the claims described in the appendix correspond to the item numbers of the claims first attached to the application of the present application.
[付記]
請求項1に記載された発明は、楽曲を構成する楽音の音高および発音タイミングを示す時間情報を含む曲データ、および、前記曲データにかかる楽曲の伴奏データであるオーディオデータを格納した記憶手段と、
並列に配置され演奏操作子の操作に基づいて、所定の楽音の楽音データを生成する楽音データ生成手段と、
前記曲データに含まれる時間情報に基づく経過時間にしたがって、前記オーディオデータを読み出すオーディオデータ再生手段と、を備えた楽音生成装置であって、
前記演奏操作子の操作にかかる曲データにおける正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に一方向にある直近の第1のゼロクロスポイントを、前記オーディオデータから検出するジャンプ先検出手段と、
前記曲データに示す発音タイミング経過までに、当該発音タイミングに対応する音高の楽音を発生させる前記演奏操作子が操作されたか否かを判断する操作判断手段と、
この操作判断手段にて前記演奏操作子が操作されていないと判断された場合に、前記第1のゼロクロスポイントを始点として、当該ゼロクロスポイントより以前のゼロクロスポイントのうち、発音されている楽音の音高に整合した周期に比例する区間の終点に対応した位置に存在する第2のゼロクロスポイントを検出するループ先検出手段と、
この第2ゼロクロスポイントと前記第1のゼロクロスポイントとの間の区間をループ区間として前記オーディオデータを繰り返し読み出すループ読み出し手段と、
このループ読み出し手段により読み出しが開始された後に前記操作判断手段により前記演奏操作子が操作されたと判断された場合に、当該演奏操作子の操作タイミングから時系列的に一方向にある直近の第3のゼロクロスポイントを、前記オーディオデータから検出するジャンプ元検出手段と、
前記検出された第3のゼロクロスポイントから前記検出された第1のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続するように、前記オーディオデータ再生手段を制御する制御手段と、を有する楽音生成装置である。
[Appendix]
According to the first aspect of the present invention, there is provided storage means for storing music data including time information indicating the pitch and tone generation timing of a musical sound constituting a music, and audio data which is accompaniment data of the music related to the music data. When,
Musical tone data generating means for generating musical tone data of a predetermined musical tone based on an operation of a performance operator arranged in parallel;
An audio data reproducing means for reading out the audio data according to an elapsed time based on time information included in the music data,
Jump destination detection for detecting from the audio data the first zero-cross point closest to the normal sound generation timing in one direction in time series based on the normal sound generation timing in the music data for the operation of the performance operator Means,
Operation determining means for determining whether or not the performance operator that generates a musical tone having a pitch corresponding to the sound generation timing has been operated before the sound generation timing indicated in the song data;
When it is determined by the operation determining means that the performance operator is not operated, the sound of the musical sound that is sounded among the zero cross points before the zero cross point, starting from the first zero cross point. A loop destination detecting means for detecting a second zero cross point existing at a position corresponding to an end point of a section proportional to a period matched to high;
Loop reading means for repeatedly reading out the audio data using a section between the second zero cross point and the first zero cross point as a loop section;
When it is determined by the operation determining means that the performance operator has been operated after reading is started by the loop reading means, the latest third one in one direction in time series from the operation timing of the performance operator. Jump source detection means for detecting the zero cross point of the audio data,
The audio data reproducing means is configured to cause the audio data read to jump from the detected third zero cross point to the detected first zero cross point, and thereafter to continue reading normal audio data. A musical tone generating device having control means for controlling.
請求項2に記載された発明は、前記オーディオデータ再生手段が、前記第3のゼロクロスポイントから、前記第1のゼロクロスポイントにオーディオデータの読み出しをジャンプさせるときに、前記正規の発音タイミングに基づく経過時間に更新し、前記更新された経過時間にしたがって、前記オーディオデータを読み出すように構成されたことを特徴とする請求項1に記載の楽音生成装置である。
According to a second aspect of the present invention, when the audio data reproducing means jumps the reading of the audio data from the third zero cross point to the first zero cross point, the progress based on the normal sound generation timing. 2. The musical sound generating apparatus according to
請求項3に記載された発明は、前記ジャンプ元検出手段が、前記演奏操作子の操作タイミングから時系列的に未来でかつ直近の第3のゼロクロスポイントを見出すように構成され、前記ジャンプ先検出手段が、前記正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に未来でかつ直近の第1のゼロクロスポイントを検出するように構成された楽音生成装置である。 According to a third aspect of the present invention, the jump source detecting means is configured to find a third zero cross point that is in the future and nearest in time series from the operation timing of the performance operator, and the jump destination detection The means is a musical sound generating device configured to detect the first zero cross point in the future in a time series from the normal sound generation timing based on the normal sound generation timing.
請求項4に記載された発明は、前記オーディオデータにおいて、前記楽音の発音タイミングに対応するタイミングにおいて、所定の位相のゼロクロスポイントが位置し、前記ジャンプ先検出手段が、前記正規の発音タイミングに対応する所定の位相の第1のゼロクロスポイントを検出する請求項1に記載の楽音生成装置である。
According to a fourth aspect of the present invention, in the audio data, a zero-cross point having a predetermined phase is located at a timing corresponding to the tone generation timing of the musical sound, and the jump destination detection means corresponds to the regular tone generation timing. The musical tone generation apparatus according to
請求項5に記載された発明は、楽曲を構成する楽音の音高および発音タイミングを示す時間情報を含む曲データ、および、前記曲データにかかる楽曲の伴奏データであるオーディオデータを格納した記憶手段と、並列に配置され演奏操作子の操作に基づいて、所定の楽音の楽音データを生成する楽音データ生成手段と、前記曲データに含まれる時間情報に基づく経過時間にしたがって、前記オーディオデータを読み出すオーディオデータ再生手段と、を備えたコンピュータに、
前記演奏操作子の操作にかかる曲データにおける正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に一方向にある直近の第1のゼロクロスポイントを、前記オーディオデータから検出するジャンプ先検出ステップと、
前記曲データに示す発音タイミング経過までに、当該発音タイミングに対応する音高の楽音を発生させる前記演奏操作子が操作されたか否かを判断する操作判断ステップと、
前記演奏操作子が操作されていないと判断された場合に、前記第1のゼロクロスポイントを始点として、当該ゼロクロスポイントより以前のゼロクロスポイントのうち、発音されている楽音の音高に整合した周期に比例する区間の終点に対応した位置に存在する第2のゼロクロスポイントを検出するループ先検出ステップと、
この第2ゼロクロスポイントと前記第1のゼロクロスポイントとの間の区間をループ区間として前記オーディオデータを繰り返し読み出すループ読み出しステップと、
このループ読み出しステップにより読み出しが開始された後、前記演奏操作子が操作されたと判断された場合に、当該演奏操作子の操作タイミングから時系列的に一方向にある直近の第3のゼロクロスポイントを、前記オーディオデータから検出するジャンプ元検出ステップと、
前記検出された第3のゼロクロスポイントから前記検出された第1のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続するように、前記オーディオデータ再生手段を制御する制御ステップと、
を実行させる楽音生成プログラムである。
According to a fifth aspect of the present invention, there is provided storage means for storing song data including time information indicating the pitch and tone generation timing of musical sounds constituting a song, and audio data which is accompaniment data of the song relating to the song data. And reading out the audio data according to the musical sound data generating means for generating musical sound data of a predetermined musical sound based on the operation of the performance operator arranged in parallel, and the elapsed time based on the time information included in the song data. An audio data reproducing means;
Jump destination detection for detecting from the audio data the first zero-cross point closest to the normal sound generation timing in one direction in time series based on the normal sound generation timing in the music data for the operation of the performance operator Steps,
An operation determination step for determining whether or not the performance operator for generating a musical tone having a pitch corresponding to the sound generation timing has been operated before the sound generation timing indicated in the song data;
When it is determined that the performance operator has not been operated, the cycle is consistent with the pitch of the tone being played out of the zero cross points before the zero cross point, starting from the first zero cross point. A loop destination detection step for detecting a second zero cross point existing at a position corresponding to the end point of the proportional section;
A loop reading step of repeatedly reading out the audio data with a section between the second zero cross point and the first zero cross point as a loop section;
When it is determined that the performance operator has been operated after reading is started by this loop reading step, the nearest third zero cross point in one direction in time series from the operation timing of the performance operator is obtained. , A jump source detecting step for detecting from the audio data;
The audio data reproducing means is configured to cause the audio data read to jump from the detected third zero cross point to the detected first zero cross point, and thereafter to continue reading normal audio data. Control steps to control;
Is a program for generating musical sounds.
10 電子楽器
11 鍵盤
12、13 スイッチ
15 表示部
21 CPU
22 ROM
23 RAM
24 サウンドシステム
25 スイッチ群
26 音源部
27 オーディオ回路
28 スピーカ
29 オーディオデータ再生部
DESCRIPTION OF SYMBOLS 10 Electronic
22 ROM
23 RAM
24 Sound System 25
Claims (4)
演奏操作子の操作にかかる曲データにおける正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に未来でかつ直近の第1のゼロクロスポイントを、前記オーディオデータから検出するジャンプ先検出手段と、
前記曲データに示す発音タイミング経過までに、当該発音タイミングに対応する音高の楽音を発生させる前記演奏操作子が操作されたか否かを判断する操作判断手段と、
この操作判断手段にて前記演奏操作子が操作されていないと判断された場合に、前記第1のゼロクロスポイントを始点として、当該ゼロクロスポイントより以前のゼロクロスポイントのうち、発音されている楽音の音高に整合した周期に対応する区間の終点の位置と同一もしくは直近にあり、かつ前記第1のゼロクロスポイントと同位相の第2のゼロクロスポイントを検出するループ先検出手段と、
この第2ゼロクロスポイントと前記第1のゼロクロスポイントとの間の区間をループ区間として前記オーディオデータを繰り返し読み出すループ読み出し手段と、
このループ読み出し手段により読み出しが開始された後に前記操作判断手段により前記演奏操作子が操作されたと判断された場合に、当該演奏操作子の操作タイミングから時系列的に未来でかつ直近にあり、さらに前記演奏操作子の操作タイミング時と同位相の第3のゼロクロスポイントを、前記オーディオデータから検出するジャンプ元検出手段と、
前記検出された第3のゼロクロスポイントから前記検出された第1のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続するように、前記オーディオデータ読み出し手段を制御する制御手段と、
を有する楽音生成装置。 Time information included in the song data from the storage means storing the song data including time information indicating the pitch and tone generation timing of the musical sound constituting the song and the accompaniment data of the song related to the song data Audio data reading means for reading the audio data according to the elapsed time based on
Based on the normal sound generation timing in the music data relating to the operation of the performance operators, the series in the future and and the nearest first zero-cross points when the sound generation timing of the normal, and jump detection means for detecting from said audio data ,
Operation determining means for determining whether or not the performance operator that generates a musical tone having a pitch corresponding to the sound generation timing has been operated before the sound generation timing indicated in the song data;
When it is determined by the operation determining means that the performance operator is not operated, the sound of the musical sound that is sounded among the zero cross points before the zero cross point, starting from the first zero cross point. A loop destination detection means for detecting a second zero cross point that is the same as or closest to the position of the end point of the section corresponding to the period matched to high and has the same phase as the first zero cross point;
Loop reading means for repeatedly reading out the audio data using a section between the second zero cross point and the first zero cross point as a loop section;
When it is determined by the operation determining means that the performance operator has been operated after reading is started by the loop reading means, it is in the future in the time series from the operation timing of the performance operator, and Jump source detection means for detecting a third zero cross point in phase with the operation timing of the performance operator from the audio data;
The audio data reading means is configured to cause audio data reading to jump from the detected third zero cross point to the detected first zero cross point, and thereafter to continue normal audio data reading. Control means for controlling;
A musical sound generating device having
演奏操作子の操作にかかる曲データにおける正規の発音タイミングに基づき、当該正規の発音タイミングから時系列的に未来でかつ直近の第1のゼロクロスポイントを、前記オーディオデータから検出するジャンプ先検出ステップと、
前記曲データに示す発音タイミング経過までに、当該発音タイミングに対応する音高の楽音を発生させる前記演奏操作子が操作されたか否かを判断する操作判断ステップと、
前記演奏操作子が操作されていないと判断された場合に、前記第1のゼロクロスポイントを始点として、当該ゼロクロスポイントより以前のゼロクロスポイントのうち、発音されている楽音の音高に整合した周期に対応する区間の終点の位置と同一もしくは直近にあり、かつ前記第1のゼロクロスポイントと同位相の第2のゼロクロスポイントを検出するループ先検出ステップと、
この第2ゼロクロスポイントと前記第1のゼロクロスポイントとの間の区間をループ区間として前記オーディオデータを繰り返し読み出すループ読み出しステップと、
このループ読み出しステップにより読み出しが開始された後、前記演奏操作子が操作されたと判断された場合に、当該演奏操作子の操作タイミングから時系列的に未来でかつ直近にあり、さらに前記演奏操作子の操作タイミング時と同位相の第3のゼロクロスポイントを、前記オーディオデータから検出するジャンプ元検出ステップと、
前記検出された第3のゼロクロスポイントから前記検出された第1のゼロクロスポイントに、オーディオデータの読み出しをジャンプさせ、それ以降、通常のオーディオデータの読み出しを継続するように、前記オーディオデータ読み出し手段を制御する制御ステップと、
を実行させる楽音生成プログラム。 Time information included in the song data from the storage means storing the song data including time information indicating the pitch and tone generation timing of the musical sound constituting the song and the accompaniment data of the song related to the song data An audio data reading means for reading the audio data according to the elapsed time based on
Based on the normal sound generation timing in the music data according to the operation of Starring Somisao Sakuko, jump destination detection step of the series in the future and and the nearest first zero-cross points when the sound generation timing of the normal, is detected from the audio data When,
An operation determination step for determining whether or not the performance operator for generating a musical tone having a pitch corresponding to the sound generation timing has been operated before the sound generation timing indicated in the song data;
When it is determined that the performance operator has not been operated, the cycle is consistent with the pitch of the tone being played out of the zero cross points before the zero cross point, starting from the first zero cross point. A loop destination detection step for detecting a second zero cross point that is the same as or closest to the position of the end point of the corresponding section and has the same phase as the first zero cross point;
A loop reading step of repeatedly reading out the audio data with a section between the second zero cross point and the first zero cross point as a loop section;
When it is determined that the performance operator has been operated after reading is started by the loop reading step, the performance operator is in the future in the chronological order from the operation timing of the performance operator. A jump source detection step of detecting a third zero cross point in phase with the operation timing of the audio data;
The audio data reading means is configured to cause audio data reading to jump from the detected third zero cross point to the detected first zero cross point, and thereafter to continue normal audio data reading. Control steps to control;
Music generation program that executes
請求項1の楽音生成装置と、
前記楽音生成装置からの楽音データ及びオーディオデータに基づいた音響信号を出力するオーディオ手段と、
を有する電子楽器。 A performance controller,
A musical sound generating device according to claim 1;
Audio means for outputting an acoustic signal based on the musical sound data and audio data from the musical sound generating device;
Electronic musical instrument with
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015090918A JP6102975B2 (en) | 2015-04-28 | 2015-04-28 | Musical sound generation device, musical sound generation program, and electronic musical instrument |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015090918A JP6102975B2 (en) | 2015-04-28 | 2015-04-28 | Musical sound generation device, musical sound generation program, and electronic musical instrument |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2011185697A Division JP5742592B2 (en) | 2011-04-06 | 2011-08-29 | Musical sound generation device, musical sound generation program, and electronic musical instrument |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2015158686A JP2015158686A (en) | 2015-09-03 |
JP6102975B2 true JP6102975B2 (en) | 2017-03-29 |
Family
ID=54182673
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015090918A Active JP6102975B2 (en) | 2015-04-28 | 2015-04-28 | Musical sound generation device, musical sound generation program, and electronic musical instrument |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP6102975B2 (en) |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000181458A (en) * | 1998-12-16 | 2000-06-30 | Korg Inc | Time stretch device |
JP4170525B2 (en) * | 1999-07-09 | 2008-10-22 | ローランド株式会社 | Waveform readout device |
-
2015
- 2015-04-28 JP JP2015090918A patent/JP6102975B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2015158686A (en) | 2015-09-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8723011B2 (en) | Musical sound generation instrument and computer readable medium | |
JP5168297B2 (en) | Automatic accompaniment device and automatic accompaniment program | |
JP6232850B2 (en) | Touch detection device, touch detection method, electronic musical instrument, and program | |
JP5293710B2 (en) | Key judgment device and key judgment program | |
JP5732982B2 (en) | Musical sound generation device and musical sound generation program | |
JP6149890B2 (en) | Musical sound generation device and musical sound generation program | |
JP5742592B2 (en) | Musical sound generation device, musical sound generation program, and electronic musical instrument | |
JP6102975B2 (en) | Musical sound generation device, musical sound generation program, and electronic musical instrument | |
JP5909967B2 (en) | Key judgment device, key judgment method and key judgment program | |
JP5418525B2 (en) | Karaoke equipment | |
JP2006065186A (en) | Device and method for tempo information output, computer program for tempo information output, device and method for touch information output, and computer program for touch information output | |
JP5692275B2 (en) | Electronic musical instruments | |
JP3620396B2 (en) | Information correction apparatus and medium storing information correction program | |
JP4003625B2 (en) | Performance control apparatus and performance control program | |
JP2010117419A (en) | Electronic musical instrument | |
JP5412766B2 (en) | Electronic musical instruments and programs | |
JP5151603B2 (en) | Electronic musical instruments | |
JP7425558B2 (en) | Code detection device and code detection program | |
JP5560574B2 (en) | Electronic musical instruments and automatic performance programs | |
JP5564921B2 (en) | Electronic musical instruments | |
JP5600968B2 (en) | Automatic performance device and automatic performance program | |
JP2009216769A (en) | Sound processing apparatus and program | |
JP2016057389A (en) | Chord determination device and chord determination program | |
JP6305275B2 (en) | Voice assist device and program for electronic musical instrument | |
JP2016045254A (en) | Sound preview device and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20160526 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20160621 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160809 |
|
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: 20170131 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20170213 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6102975 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |