JP4360358B2 - Tempo detection device and tempo detection method - Google Patents

Tempo detection device and tempo detection method Download PDF

Info

Publication number
JP4360358B2
JP4360358B2 JP2005222650A JP2005222650A JP4360358B2 JP 4360358 B2 JP4360358 B2 JP 4360358B2 JP 2005222650 A JP2005222650 A JP 2005222650A JP 2005222650 A JP2005222650 A JP 2005222650A JP 4360358 B2 JP4360358 B2 JP 4360358B2
Authority
JP
Japan
Prior art keywords
interval
tempo
input
basic
candidate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2005222650A
Other languages
Japanese (ja)
Other versions
JP2007041108A (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.)
Teac Corp
Original Assignee
Teac Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Teac Corp filed Critical Teac Corp
Priority to JP2005222650A priority Critical patent/JP4360358B2/en
Publication of JP2007041108A publication Critical patent/JP2007041108A/en
Application granted granted Critical
Publication of JP4360358B2 publication Critical patent/JP4360358B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、間欠的に入力される打拍信号に基づいて当該打拍信号の入力テンポを検出するテンポ検出装置およびテンポ検出方法に関する。   The present invention relates to a tempo detection device and a tempo detection method for detecting an input tempo of a beat signal based on a beat signal input intermittently.

従来から音楽の拍子を示す信号である打拍信号等、間欠的に入力される信号の入力テンポを検出し、ユーザに提示するテンポ検出装置が知られている(例えば、特許文献1〜3など)。かかるテンポ検出装置は、記録媒体に記録された音楽を再生するオーディオ装置や、ユーザにより演奏される電子楽器などに搭載され、ユーザの音楽の楽しみの幅を広げている。   Conventionally, a tempo detection device that detects an input tempo of a signal that is intermittently input, such as a beat signal that is a signal indicating a time signature of music, and presents the tempo to a user is known (for example, Patent Documents 1 to 3). ). Such a tempo detection device is mounted on an audio device that reproduces music recorded on a recording medium, an electronic musical instrument played by a user, and the like, and widens the user's enjoyment of music.

例えば、近年、ディスコ等では、DJと呼ばれる演出者が、ダンス中の踊り客の雰囲気を機敏に感じ取り、踊り客にとって乗りのよいテンポの音楽を間断無く提供することにより、ダンス中の演出効果を高めるようにしている。このとき、DJは、音楽のテンポが急に変化しないように、オーディオ装置を用いて再生されている音楽、あるいは、これから再生しようとする音楽のテンポを正確に把握しておく必要がある。この場合、オーディオ装置に搭載されたテンポ検出装置は、再生されている音楽データから自動的に検出され入力される打拍信号、または、音楽のテンポに応じてユーザが手動入力する打拍信号に基づいて、当該音楽のテンポを検出する。   For example, in recent years, in a disco etc., a director called DJ can quickly feel the atmosphere of the dancer during the dance and provide tempo music that is comfortable for the dancer without interruption, thereby providing the stage effect during the dance. I try to increase it. At this time, the DJ needs to accurately grasp the tempo of the music being played using the audio device or the music to be played in the future so that the tempo of the music does not change suddenly. In this case, the tempo detection device mounted on the audio device generates a beat signal that is automatically detected and input from the music data being played back, or a beat signal that is manually input by the user according to the music tempo. Based on this, the tempo of the music is detected.

特開2001−243692号公報Japanese Patent Laid-Open No. 2001-243692 特開2000−47664号公報JP 2000-47664 A 特開平8−179773号公報JP-A-8-179773

ここで、テンポ検出装置に入力される打拍信号の入力間隔は一定ではなく、変化することがある。例えば、テンポ検出対象である音楽のテンポが変化すれば、当該音楽のテンポに応じて入力される打拍信号の入力間隔も当然変化する。また、ユーザの誤操作やノイズ等が原因で不要な打拍信号が誤入力されることにより、入力間隔が変化する場合もある。入力間隔の変化がテンポ変化に起因する場合は、その入力間隔の変化からテンポ変化後のテンポを迅速に検出し、ユーザに提示する必要がある。一方、入力間隔の変化が誤入力に起因する場合には、その入力間隔の変化は無視して、テンポを検出する必要がある。   Here, the input interval of the beat signal input to the tempo detection device is not constant and may change. For example, if the tempo of music that is a tempo detection target changes, the input interval of the beat signal that is input according to the tempo of the music naturally changes. In addition, an input interval may change due to an erroneous input of an unnecessary beat signal due to a user's erroneous operation or noise. When the change in the input interval is caused by the tempo change, it is necessary to quickly detect the tempo after the tempo change from the change in the input interval and present it to the user. On the other hand, when the change in the input interval is caused by an erroneous input, it is necessary to detect the tempo by ignoring the change in the input interval.

しかし、通常、テンポ検出装置では、入力間隔の変化が、テンポ変化によるものか、誤入力によるものか、を判断し難いという問題がある。その結果、誤入力の影響を受けた不正確なテンポが検出されることがあった。そこで、この誤入力の影響を低減するために、過去数回分の打拍信号の入力間隔の移動平均値に基づいて、テンポを算出する方法が提案されている。この移動平均値に基づくテンポ算出であれば、一回の誤入力の影響が低減できる。しかし、その一方で、移動平均値は、常に遅れを含むことになるため、テンポ変化が生じた場合に、迅速に対応できないという問題が生じる。つまり、従来の方法では、誤入力の影響を受けない正確なテンポを迅速に算出できなかった。   However, the tempo detection device usually has a problem that it is difficult to determine whether the change in the input interval is due to a tempo change or an erroneous input. As a result, an inaccurate tempo affected by an erroneous input may be detected. Therefore, in order to reduce the influence of the erroneous input, a method of calculating the tempo based on the moving average value of the input intervals of the past several beat signals has been proposed. If the tempo is calculated based on this moving average value, the influence of a single erroneous input can be reduced. However, on the other hand, since the moving average value always includes a delay, there arises a problem that when a tempo change occurs, it cannot be quickly handled. In other words, the conventional method cannot quickly calculate an accurate tempo that is not affected by erroneous input.

そこで、本発明では、正確なテンポを迅速に検出でき得るテンポ検出装置および方法を提供することを目的とする。   Therefore, an object of the present invention is to provide a tempo detection device and method that can quickly detect an accurate tempo.

本発明のテンポ検出装置は、間欠的に入力される打拍信号に基づいて当該打拍信号の入力テンポを検出するテンポ検出装置であって、予め設定された基本間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第一判断手段と、第一判断手段により両間隔が一致しないと判断された場合における打拍信号の入力間隔を新たな基本間隔の候補である候補間隔として設定する候補間隔設定手段と、設定された候補間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第二判断手段と、第二判断手段により設定された候補間隔で打拍信号が入力されたと判断された場合に、当該候補間隔を新たな基本間隔として設定する基本間隔更新手段と、設定されている基本間隔に基づいて打拍信号の入力テンポを算出するテンポ算出手段と、を備えることを特徴とする。   A tempo detection device according to the present invention is a tempo detection device that detects an input tempo of a beat signal based on a beat signal that is intermittently input, and includes a preset basic interval and a beat signal input interval. And the first determination means for determining whether or not both coincide with each other within a predetermined allowable range, and the input interval of the beat signal when the first determination means determines that both intervals do not match, Candidate interval setting means for setting as a candidate interval that is a candidate, second determination means for determining whether or not the set candidate interval and the input interval of the beat signal match within a predetermined allowable range, When it is determined that the beat signal is input at the candidate interval set by the determination unit, the basic interval update unit that sets the candidate interval as a new basic interval, and the beat based on the set basic interval The input tempo of the signal A tempo calculation unit configured to output, characterized in that it comprises a.

好適な態様では、さらに、前記第一判断手段により一致していると判断され得る許容範囲内で基本間隔と打拍信号の入力間隔とがずれている場合に、当該打拍信号の入力間隔に応じて基本間隔の値を補正する基本間隔補正手段を有し、テンポ算出手段は、少なくとも過去3回分以上の基本間隔の値の変更履歴を記憶する手段と、当該基本間隔の変更履歴に基づいて、テンポが変化しているか否かを判断するテンポ状況判断手段と、テンポが変化していると判断した場合には最新の基本間隔に基づいてテンポを算出し、テンポが変化していないと判断した場合には変更履歴に記憶されている複数の基本間隔の平均値に基づいてテンポを算出する算出手段と、を有する。テンポ状況判断手段は、変更履歴に記憶されている基本間隔が連続して増加または減少している場合、あるいは、候補間隔に更新されている場合には、テンポが変化していると判断することが望ましい。   In a preferred aspect, when the basic interval and the input interval of the beat signal are shifted within an allowable range that can be determined to match by the first determining means, the input interval of the beat signal is In accordance with the basic interval correction means for correcting the basic interval value, the tempo calculation means is based on means for storing at least the past three basic interval value change history and the basic interval change history. Tempo status determination means for determining whether or not the tempo has changed, and if it is determined that the tempo has changed, the tempo is calculated based on the latest basic interval, and it is determined that the tempo has not changed In this case, there is a calculating means for calculating the tempo based on the average value of the plurality of basic intervals stored in the change history. The tempo status judging means judges that the tempo has changed when the basic interval stored in the change history continuously increases or decreases, or is updated to a candidate interval. Is desirable.

他の本発明であるテンポ検出方法は、間欠的に入力される打拍信号に基づいて当該打拍信号の入力テンポを検出するテンポ検出方法であって、予め設定された基本間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第一判断ステップと、第一判断ステップにより両間隔が一致しないと判断された場合における打拍信号の入力間隔を新たな基本間隔の候補である候補間隔として設定する候補間隔設定ステップと、設定された候補間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第二判断ステップと、第二判断ステップにより設定された候補間隔で打拍信号が入力されたと判断された場合に、当該候補間隔を新たな基本間隔として設定する基本間隔更新ステップと、設定されている基本間隔に基づいて打拍信号の入力テンポを算出するテンポ算出ステップと、を備えることを特徴とする。   Another tempo detection method according to the present invention is a tempo detection method for detecting an input tempo of a beat signal based on a beat signal input intermittently, wherein a preset basic interval and a beat signal are detected. The first determination step for determining whether or not the input intervals of the beats coincide with each other within a predetermined allowable range, and the input interval of the beat signal when it is determined by the first determination step that the intervals are not the same. A candidate interval setting step that is set as a candidate interval that is a candidate for the basic interval, and a second determination step that determines whether or not the set candidate interval and the input interval of the beat signal match within a predetermined tolerance range; A basic interval update step for setting the candidate interval as a new basic interval when it is determined that the beat signal is input at the candidate interval set in the second determination step; and the set basic interval Characterized in that and a tempo calculation step for calculating an input tempo of the beat signal based.

本発明によれば、候補間隔で打拍信号が入力されたと判断された場合に、当該候補間隔を新たな基本間隔として設定する。したがって、単発的に生じる誤入力は無視される一方で、迅速にテンポ変化に対応できる。その結果、正確なテンポを迅速に検出することができる。   According to the present invention, when it is determined that a beat signal is input at a candidate interval, the candidate interval is set as a new basic interval. Therefore, the erroneous input that occurs once can be ignored, while the tempo change can be dealt with quickly. As a result, an accurate tempo can be detected quickly.

以下、本発明の実施形態について図面を参照して説明する。図1は、本発明の実施形態であるオーディオ装置10の概略構成図である。このオーディオ装置10は、記録媒体に記録された音楽を再生することができる。また、このオーディオ装置10は、再生された音楽に応じてユーザが入力した打拍信号に基づいて、当該音楽のテンポを検出し、表示するテンポ表示機能を備えている。   Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is a schematic configuration diagram of an audio apparatus 10 according to an embodiment of the present invention. The audio device 10 can reproduce music recorded on a recording medium. The audio apparatus 10 also has a tempo display function for detecting and displaying the tempo of the music based on the beat signal input by the user in accordance with the reproduced music.

再生部12は、記憶媒体、例えば、光ディスクや磁気ディスク、磁気テープなどに記憶されている音楽データを読み込み、当該音楽データに応じた音を出力する。この再生部12の構成は、種々の周知の構成を用いることができる。   The playback unit 12 reads music data stored in a storage medium, such as an optical disk, a magnetic disk, or a magnetic tape, and outputs a sound corresponding to the music data. Various known configurations can be used as the configuration of the reproducing unit 12.

操作部14は、当該オーディオ装置10を操作するための各種操作子が設けられている。この操作子の中には、再生されている音楽のテンポに応じて、ユーザが操作するタップボタンも設けられている。音楽のテンポを検出、表示させたい場合、ユーザは、当該タップボタンを音楽のテンポに応じて操作する。タップボタンが操作されると、打拍信号がテンポ検出部16へと出力される。   The operation unit 14 is provided with various operators for operating the audio device 10. In this operation element, a tap button operated by the user according to the tempo of the music being reproduced is also provided. When it is desired to detect and display the music tempo, the user operates the tap button according to the music tempo. When the tap button is operated, a beat signal is output to the tempo detection unit 16.

テンポ検出手段は、打拍信号の出力間隔に基づいて、当該音楽のテンポを算出する。ここで、算出されるテンポの形式としては、1分あたりの拍子数、いわゆる、BPM(ビート・パー・ミニッツ)である。このテンポ検出部16は、後に詳説するように2種類の打拍間隔を管理している。一つは現時点での打拍間隔である基本間隔、一つは新たな基本間隔の候補である候補間隔である。この二つの間隔については後に詳説する。   The tempo detection means calculates the tempo of the music based on the output interval of the beat signal. Here, the calculated tempo format is the number of beats per minute, so-called BPM (beat per minute). The tempo detection unit 16 manages two types of beat intervals as will be described in detail later. One is a basic interval that is the current beat interval, and one is a candidate interval that is a candidate for a new basic interval. These two intervals will be described in detail later.

テンポ検出手段で検出されたテンポは、表示部18に設けられたBPM表示部24に表示される。この表示の形式としては、現時点でのBPMのみを表示してもよいし、BPMの遷移をグラフ形式で表示してもよい。   The tempo detected by the tempo detection means is displayed on the BPM display unit 24 provided on the display unit 18. As the display format, only the current BPM may be displayed, or the transition of the BPM may be displayed in a graph format.

制御部20は、ユーザからの指示に応じて、各部を制御する。ユーザからの指示は、既述の操作部14を介して入力される。制御部20は、この指示に応じて、再生部12に対する音楽データの再生、停止指示や、テンポ検出部16に対するテンポ検出の開始、終了などを指示する。   The control unit 20 controls each unit in accordance with an instruction from the user. An instruction from the user is input via the operation unit 14 described above. In response to this instruction, the control unit 20 instructs the playback unit 12 to play and stop music data, and instructs the tempo detection unit 16 to start and end tempo detection.

図2は、テンポ検出部16のより詳細なブロック図である。このテンポ検出部16は、基本間隔管理部30、候補間隔管理部32、比較部34、BPM算出部40、および、互いに独立した二つのタイマ36,38を備えている。基本間隔管理部30は、現時点での打拍間隔(打拍信号の入力間隔)である基本間隔を管理している。この基本間隔は、それ以前に入力された打拍信号の入力間隔に基づいて設定される。この基本間隔は、後述する候補間隔管理部32から更新指示が出されない限り、一定の値が保持される。基本間隔管理部30は、この基本間隔に基づいて次の打拍信号の入力タイミングを予想するとともに、当該タイミングに合わせて基本信号を比較部34に出力する。   FIG. 2 is a more detailed block diagram of the tempo detection unit 16. The tempo detection unit 16 includes a basic interval management unit 30, a candidate interval management unit 32, a comparison unit 34, a BPM calculation unit 40, and two timers 36 and 38 that are independent of each other. The basic interval management unit 30 manages a basic interval that is a beat interval (input interval of beat signals) at the present time. This basic interval is set based on the input interval of the beat signal input before that time. This basic interval is maintained at a constant value unless an update instruction is issued from a candidate interval manager 32 described later. The basic interval management unit 30 predicts the input timing of the next beat signal based on the basic interval, and outputs the basic signal to the comparison unit 34 in accordance with the timing.

ここで、テンポ検出対象である音楽は人により演奏されており、また、テンポ検出のためのタップボタンの操作も人によりなされている。つまり、人によりテンポが形成、検出されている。そのため、例え、テンポに大きな変更が無くても、テンポを示す打拍信号の入力間隔は、多少の変動をせざるを得ない。この変動を許容するために、基本間隔管理部30では、予め、許容範囲divが設定されている。そして、基本信号は、図3に図示する通り、予想タイミングtより許容範囲divだけ早めに出力され、予想タイミングtから許容範囲divだけ経過した後に出力停止される。   Here, the music to be detected for tempo is played by a person, and the operation of a tap button for detecting the tempo is also performed by the person. That is, a tempo is formed and detected by a person. For this reason, even if there is no significant change in the tempo, the input interval of the beat signal indicating the tempo must be slightly changed. In order to allow this variation, the basic interval management unit 30 sets an allowable range div in advance. As shown in FIG. 3, the basic signal is output earlier than the expected timing t by the allowable range div, and the output is stopped after the allowable range div has elapsed from the predicted timing t.

候補間隔管理部32は、新たな基本間隔の候補である候補間隔を管理する。この候補間隔は、基本間隔と、打拍信号の入力間隔と、が一致しなかった場合に設定される。具体的には、基本間隔と異なる間隔で打拍信号が入力された場合、当該異なる間隔が、候補間隔として設定される。候補間隔管理部32は、この候補間隔に基づいて、次の打拍信号の入力タイミングを予想するとともに、当該タイミングに合わせて候補信号を比較部34に出力する。また、2回連続して候補間隔で打拍信号が入力された場合には、当該候補間隔を新たな基本間隔に設定するように、基本間隔管理部30に更新指示を出力する。この候補間隔管理部32においても、許容範囲divが設定されており、候補信号は予想タイミングより前後div分だけ余分に出力される。   The candidate interval management unit 32 manages a candidate interval that is a candidate for a new basic interval. This candidate interval is set when the basic interval does not match the input interval of the beat signal. Specifically, when a beat signal is input at an interval different from the basic interval, the different interval is set as a candidate interval. The candidate interval management unit 32 predicts the input timing of the next beat signal based on the candidate interval, and outputs the candidate signal to the comparison unit 34 in accordance with the timing. In addition, when a beat signal is input at a candidate interval twice in succession, an update instruction is output to the basic interval management unit 30 so as to set the candidate interval to a new basic interval. Also in this candidate interval management unit 32, the allowable range div is set, and the candidate signal is output by an amount equivalent to the div before and after the expected timing.

比較部34は、タップボタンの操作に応じて入力される打拍信号、基本間隔管理部30から入力される基本信号、候補間隔管理部32から入力される候補信号の入力タイミングを比較し、その比較結果に応じた比較結果信号を出力する。基本間隔管理部30および候補間隔管理部32は、この比較部34から出力される比較結果信号に基づいて、打拍間隔と基本間隔、または、打拍間隔と候補間隔との一致、不一致を判断し、現在の基本間隔または候補間隔を維持または更新する。   The comparison unit compares the input timing of the beat signal input according to the tap button operation, the basic signal input from the basic interval management unit 30, and the candidate signal input from the candidate interval management unit 32. A comparison result signal corresponding to the comparison result is output. Based on the comparison result signal output from the comparison unit 34, the basic interval management unit 30 and the candidate interval management unit 32 determine whether or not the beat interval and the basic interval or the beat interval and the candidate interval match. And maintain or update the current basic or candidate interval.

第一タイマ36は、基本間隔管理部30が使用するタイマである。この第一タイマ36は、基本間隔管理部30からの指示に応じて、時間管理する。そして、必要に応じて、基本間隔管理部30に経過時間の値を通知したり、所定時間経過時にアラームを通知したりする。第二タイマ38は、候補間隔管理部32が使用するタイマで、候補間隔管理部32からの指示に応じて、時間管理や経過時間等の通知を行う。   The first timer 36 is a timer used by the basic interval management unit 30. The first timer 36 performs time management according to an instruction from the basic interval management unit 30. Then, as necessary, the basic interval management unit 30 is notified of the value of the elapsed time, or an alarm is notified when a predetermined time has elapsed. The second timer 38 is a timer used by the candidate interval management unit 32 and notifies time management, elapsed time, and the like according to an instruction from the candidate interval management unit 32.

BPM算出部40は、基本間隔管理部30で管理されている基本間隔に基づいてBPMを算出し、表示部18に出力する。このBPM算出部40は、基本間隔の変更履歴に応じて、BPM算出の方法を切り替える。この切り替えについては後に詳説する。   The BPM calculation unit 40 calculates the BPM based on the basic interval managed by the basic interval management unit 30 and outputs the BPM to the display unit 18. The BPM calculation unit 40 switches the BPM calculation method according to the basic interval change history. This switching will be described in detail later.

次に、比較部34の詳細な構成について説明する。図4は比較部34の構成の一例を示す図である。図4に示す通り、比較部34は、複数のAND回路、および、NOR回路からなる。この比較部34には、入力信号として、基本信号、候補信号、打拍信号が入力される。また、出力信号としては、A信号、B信号、X信号の3種類が出力される。3種類の出力信号のうち、A信号は、基本間隔管理部30および候補間隔管理部32の双方に出力される(図2参照)。一方、B信号およびX信号は、候補間隔管理部32にのみ出力される。   Next, a detailed configuration of the comparison unit 34 will be described. FIG. 4 is a diagram illustrating an example of the configuration of the comparison unit 34. As shown in FIG. 4, the comparison unit 34 includes a plurality of AND circuits and a NOR circuit. The comparison unit 34 receives a basic signal, a candidate signal, and a beat signal as input signals. Also, three types of output signals, A signal, B signal, and X signal, are output. Of the three types of output signals, the A signal is output to both the basic interval management unit 30 and the candidate interval management unit 32 (see FIG. 2). On the other hand, the B signal and the X signal are output only to the candidate interval management unit 32.

図5は、この比較部34の入出力関係を示す表であり、上3行は入力信号(打拍信号、基本信号、候補信号)の状態を、下3行は出力信号(A信号、B信号、X信号)の状態を示している。図5において、「H」は信号「High」状態、すなわち、信号が出力されていることを示している。「L」は信号が「Low」状態、すなわち、信号が出力されていないことを示している。さらに、「×」は、「Low」状態、「High」状態のいずれでもよいことを示している。   FIG. 5 is a table showing the input / output relationship of the comparison unit 34. The upper three lines indicate the state of the input signal (beat signal, basic signal, candidate signal), and the lower three lines indicate the output signal (A signal, B Signal, X signal). In FIG. 5, “H” indicates a signal “High” state, that is, a signal is being output. “L” indicates that the signal is in the “Low” state, that is, the signal is not output. Furthermore, “x” indicates that either the “Low” state or the “High” state may be used.

図5の表から分かる通り、打拍信号が「Low」状態、すなわち、打拍信号が入力されていない状態では、基本信号、候補信号の状態に関わらず、A信号、B信号、X信号のいずれの信号も出力されない。   As can be seen from the table of FIG. 5, when the beat signal is in the “Low” state, that is, when no beat signal is input, the A signal, the B signal, and the X signal regardless of the state of the basic signal and the candidate signal. Neither signal is output.

一方、打拍信号のみが入力され、基本信号、候補信号が入力されていない状態では、X信号のみが出力される。ここで、打拍信号は、ユーザがタップボタンを操作することにより出力される信号である。一方、基本信号は、予め設定された基本間隔に基づいて予想される打拍信号の入力タイミングに出力される信号である。また、候補信号は、新たな基本間隔の候補である候補間隔に基づいて予想される入力タイミングに出力される信号である。この基本信号および候補信号が入力されず、かつ、打拍信号のみが入力されるということは、すなわち、今までに無い、全く新しい間隔で打拍信号が入力されたことを意味する。この場合は、X信号が出力される。このX信号は、候補間隔管理部32にのみ出力される。   On the other hand, in the state where only the beat signal is input and the basic signal and the candidate signal are not input, only the X signal is output. Here, the beat signal is a signal output when the user operates the tap button. On the other hand, the basic signal is a signal output at an input timing of a beat signal that is expected based on a preset basic interval. The candidate signal is a signal that is output at an input timing that is expected based on a candidate interval that is a candidate for a new basic interval. The fact that the basic signal and the candidate signal are not inputted and only the beat signal is inputted means that the beat signal is inputted at a completely new interval which has never been obtained. In this case, an X signal is output. This X signal is output only to the candidate interval management unit 32.

打拍信号および候補信号が同時に入力された場合には、基本信号の入力の有無に関わらず、B信号が出力される。換言すれば、新たな基本間隔の候補である候補間隔と、打拍信号の入力間隔とが一致した場合には、B信号が出力される。このB信号は、候補間隔管理部32にのみ出力される。   When the beat signal and the candidate signal are input simultaneously, the B signal is output regardless of whether or not the basic signal is input. In other words, the B signal is output when the candidate interval that is a new candidate for the basic interval matches the input interval of the beat signal. This B signal is output only to the candidate interval management unit 32.

打拍信号および基本信号が同時に入力され、かつ、候補信号が入力されない場合には、A信号が出力される。換言すれば、予め設定された基本間隔と、打拍信号の入力間隔(ユーザによるタップボタンの操作間隔)が一致している場合には、A信号が出力される。このA信号は、基本間隔管理部30および候補間隔管理部32の双方に出力される。   When the beat signal and the basic signal are input simultaneously and no candidate signal is input, the A signal is output. In other words, the A signal is output when the preset basic interval and the beat signal input interval (tap button operation interval by the user) match. This A signal is output to both the basic interval management unit 30 and the candidate interval management unit 32.

次に、このテンポ検出部16によるテンポ検出の簡単な流れについて説明する。図6は、テンポ検出部16によるテンポ検出の基本的な流れを示すフローチャートである。テンポ検出する場合は、まず、基本間隔管理部30において、基本間隔の値が設定される(S10)。この基本間隔の値設定の処理については後に詳説する。続いて、基本間隔管理部30は、設定された基本間隔に基づいて次の打拍信号の入力タイミング、換言すれば、ユーザがタップボタンを操作するタイミングを予想する。そして、得られたタイミング時に(正確には許容範囲div分だけ早めに)、基本信号を出力する(S12)。なお、この時点では、候補間隔は設定されていないため、候補間隔管理部32は、候補信号を出力しない。   Next, a simple flow of tempo detection by the tempo detection unit 16 will be described. FIG. 6 is a flowchart showing a basic flow of tempo detection by the tempo detection unit 16. When detecting the tempo, first, the basic interval management unit 30 sets the value of the basic interval (S10). This basic interval value setting process will be described in detail later. Subsequently, the basic interval management unit 30 predicts the input timing of the next beat signal based on the set basic interval, in other words, the timing at which the user operates the tap button. Then, at the obtained timing (precisely by an allowable range div), a basic signal is output (S12). At this point, since no candidate interval is set, the candidate interval management unit 32 does not output a candidate signal.

次に、この出力された基本信号と、打拍信号と、の比較部34への入力タイミングが一致するか否かを判断する(S14)。この判断は、比較部34から出力される信号種類に基づいて判断できる。すなわち、打拍信号と基本信号がほぼ同じタイミングで比較部34に入力された場合、換言すれば、予め設定された基本間隔で打拍信号が入力された場合には、A信号が比較部34から出力される。比較部34からA信号が出力された場合、基本信号と打拍信号の入力タイミングが一致したと判断する。   Next, it is determined whether the input timing of the output basic signal and the beat signal to the comparison unit 34 coincide with each other (S14). This determination can be made based on the signal type output from the comparison unit 34. That is, when the beat signal and the basic signal are input to the comparison unit 34 at substantially the same timing, in other words, when the beat signal is input at a preset basic interval, the A signal is compared with the comparison unit 34. Is output from. When the A signal is output from the comparison unit 34, it is determined that the input timings of the basic signal and the beat signal match.

ここで、基本信号と打拍信号の入力タイミングが一致した場合には、現在の基本間隔が、現在のBPMを表していると考えることができる。したがって、A信号出力時には、BPM算出部40が現時点での基本間隔に基づいてBPMを算出する(S26)。算出されたBPMは、BPM表示部24に出力され、表示される。BPMが算出されれば、テンポ検出部16は、再び、入力タイミング予想、基本信号出力等を行う。   Here, when the input timings of the basic signal and the beat signal coincide, it can be considered that the current basic interval represents the current BPM. Therefore, when the A signal is output, the BPM calculating unit 40 calculates the BPM based on the current basic interval (S26). The calculated BPM is output to the BPM display unit 24 and displayed. When the BPM is calculated, the tempo detection unit 16 performs input timing prediction, basic signal output, and the like again.

一方、基本信号と打拍信号の入力タイミングが一致しなかった場合には、テンポが変更された、または、誤って打拍信号が入力されたと考えることができる。その場合には、比較部34から候補間隔管理部32に対してX信号が出力される。X信号を受信した候補間隔管理部32は、新たな基本間隔の候補である候補間隔を設定する(S16)。この候補間隔は、前回の打拍信号の入力タイミングをT0、および、今回の打拍信号タイミングをT1、候補間隔をTrとした場合、Tr=T1−T0で求めることができる。   On the other hand, if the input timings of the basic signal and the beat signal do not match, it can be considered that the tempo has been changed or that the beat signal has been input by mistake. In that case, an X signal is output from the comparison unit 34 to the candidate interval management unit 32. The candidate interval management unit 32 that has received the X signal sets a candidate interval that is a candidate for a new basic interval (S16). This candidate interval can be obtained by Tr = T1-T0, where T0 is the input timing of the previous beat signal, T1 is the current beat signal timing, and Tr is the candidate interval.

候補間隔が設定されれば、候補間隔管理部32は、当該候補間隔に基づいて、次の打拍信号の入力タイミングを予想するとともに、当該入力タイミング時に候補信号を出力する。また、基本間隔管理部30は、現時点での基本間隔に基づいて次の打拍信号の入力タイミングを予想し、当該入力タイミングに基本信号を出力する(S18)。   If the candidate interval is set, the candidate interval management unit 32 predicts the input timing of the next beat signal based on the candidate interval and outputs the candidate signal at the input timing. Further, the basic interval management unit 30 predicts the input timing of the next beat signal based on the current basic interval, and outputs the basic signal at the input timing (S18).

続いて、この候補信号および基本信号の比較部34への入力タイミングと、打拍信号の比較部34への入力タイミングが一致するか否かを判断する(S20、S24)。この判断は、比較部34から出力される信号の種類に基づいて判断できる。すなわち、候補信号と打拍信号が、ほぼ同じタイミングで比較部34に入力された場合、換言すれば、打拍信号が候補間隔で入力された場合には、比較部34からB信号が出力される。このB信号が候補間隔管理部32に出力された場合には、候補信号と打拍信号の入力タイミングが一致したと判断する。この場合、音楽のテンポが変更され、今後も、この候補間隔で打拍信号が入力されると判断する。したがって、候補信号および打拍信号の入力タイミングが一致した場合、候補間隔管理部32は、基本間隔管理部30に対して、候補間隔を新たな基本間隔とするように基本間隔値変更を指示するとともに、現在の候補間隔の値を破棄する(S22)。当該変更指示を受けた基本間隔管理部30は、基本間隔の値を変更するとともに、変更後の値をBPM算出部40に出力する。BPM算出部40は、この新たな基本間隔に基づいてBPMを算出し、BPM表示部24に出力する(S26)。   Subsequently, it is determined whether or not the input timing of the candidate signal and the basic signal to the comparison unit 34 coincides with the input timing of the beat signal to the comparison unit 34 (S20, S24). This determination can be made based on the type of signal output from the comparison unit 34. That is, when the candidate signal and the beat signal are input to the comparison unit 34 at substantially the same timing, in other words, when the beat signal is input at the candidate interval, the B signal is output from the comparison unit 34. The When this B signal is output to the candidate interval management unit 32, it is determined that the input timings of the candidate signal and the beat signal match. In this case, it is determined that the music tempo is changed and that beat signals are input at this candidate interval in the future. Therefore, when the input timings of the candidate signal and the beat signal coincide with each other, the candidate interval management unit 32 instructs the basic interval management unit 30 to change the basic interval value so that the candidate interval becomes a new basic interval. At the same time, the current candidate interval value is discarded (S22). Receiving the change instruction, the basic interval management unit 30 changes the value of the basic interval and outputs the changed value to the BPM calculation unit 40. The BPM calculating unit 40 calculates BPM based on the new basic interval and outputs it to the BPM display unit 24 (S26).

一方、候補信号と打拍信号の入力タイミングが一致せず、かつ、基本信号と打拍信号の入力タイミングが一致した場合には、A信号が比較部34から出力される。このA信号を受けた場合には、前回の打拍信号は、誤入力と判断する。したがって、この場合には、候補間隔管理部32は、現在の候補間隔を破棄する。また、基本間隔管理部30は、現在の基本間隔の値を維持したまま、次の打拍信号の入力タイミングを予想する(S12)。BPM算出部40は、現在の基本間隔の値で、BPM算出し、BPM表示部24に出力する(S26)。   On the other hand, if the input timings of the candidate signal and the beat signal do not match and the input timings of the basic signal and the beat signal match, the A signal is output from the comparison unit 34. When this A signal is received, it is determined that the previous beat signal is an erroneous input. Therefore, in this case, the candidate interval management unit 32 discards the current candidate interval. The basic interval management unit 30 predicts the input timing of the next beat signal while maintaining the current basic interval value (S12). The BPM calculation unit 40 calculates the BPM with the current basic interval value and outputs it to the BPM display unit 24 (S26).

打拍信号の入力タイミングが、基本信号および候補信号のいずれの入力タイミングとも一致しなかった場合には、再度、X信号が出力される。連続して2回以上X信号が出力された場合、打拍信号の入力間隔が乱れていることになる。この場合には、テンポが変更されたのか、誤って打拍信号が入力されたのかが判断できない。したがって、この場合、候補間隔管理部32は、再度、新たな候補間隔を設定する(S16)。そして、候補間隔または基本間隔のいずれかと打拍信号の入力間隔が一致するまで、この候補間隔の再設定を繰り返す。   If the input timing of the beat signal does not coincide with the input timing of either the basic signal or the candidate signal, the X signal is output again. When the X signal is output twice or more continuously, the input interval of the beat signal is disturbed. In this case, it cannot be determined whether the tempo has been changed or whether the beat signal has been input by mistake. Therefore, in this case, the candidate interval management unit 32 sets a new candidate interval again (S16). Then, the resetting of the candidate interval is repeated until either the candidate interval or the basic interval matches the input interval of the beat signal.

次に、このテンポ検出について具体例を用いて説明する。図7A〜Eは、比較部34への信号入力のタイミングチャートである。   Next, this tempo detection will be described using a specific example. 7A to 7E are timing charts of signal input to the comparison unit 34.

打拍信号のn打目とn+1打目において、打拍信号の入力間隔と基本間隔t0が一致している場合、換言すれば、ユーザのタップボタンの操作テンポと基本間隔t0が一致している場合には、図6Aに図示の通り、打拍信号の出力タイミングと基本信号の出力タイミングとが一致する。このとき、比較部34からはA信号が出力される。なお、この時点では、候補間隔は未設定であるため、候補信号は出力されない。ただし、候補間隔管理部32には、A信号が出力される。候補間隔管理部32は、A信号を受信すれば、第二タイマ38を起動させ、前回A信号受信から、次の信号(A信号、または、X信号)受信までの時間を計測する。   In the nth and n + 1th beats of the beat signal, when the beat signal input interval matches the basic interval t0, in other words, the operation tempo of the user's tap button matches the basic interval t0. In this case, as shown in FIG. 6A, the output timing of the beat signal coincides with the output timing of the basic signal. At this time, the A signal is output from the comparison unit 34. At this time, no candidate signal is output because the candidate interval is not set. However, the A signal is output to the candidate interval management unit 32. When receiving the A signal, the candidate interval management unit 32 starts the second timer 38 and measures the time from the previous reception of the A signal to the reception of the next signal (A signal or X signal).

続いて、n+2打目において、それまでと異なる間隔で打拍信号が出力されると、当然、基本信号と打拍信号とのタイミングがずれる。この場合、比較部34出力からはX信号が出力される。X信号をうけた候補間隔管理部32は、新たに候補間隔t1を設定する。候補間隔は、前回のA信号受信時から、今回のX信号受信時までの第二タイマ38経過時間から得る。そして、候補間隔管理部32は、当該候補間隔t1に応じたタイミングで候補信号を出力する。一方、基本間隔管理部30は、現時点での基本間隔t0に基づいたタイミングで基本信号の出力を行う。そして、この後、n+3打目の打拍信号がどのタイミングで出力されるかによって、検出されるテンポが異なってくる。   Subsequently, when the beat signal is output at an interval different from that in the n + 2th shot, the timings of the basic signal and the beat signal are naturally shifted. In this case, an X signal is output from the output of the comparison unit 34. Upon receiving the X signal, the candidate interval management unit 32 newly sets a candidate interval t1. The candidate interval is obtained from the elapsed time of the second timer 38 from the previous reception of the A signal to the reception of the current X signal. And the candidate space | interval management part 32 outputs a candidate signal at the timing according to the said candidate space | interval t1. On the other hand, the basic interval management unit 30 outputs a basic signal at a timing based on the current basic interval t0. After that, the detected tempo differs depending on the timing at which the beat signal of the (n + 3) th beat is output.

図7Bには、n+3打目の打拍信号と、候補信号と、の入力タイミングが一致した場合を図示している。このとき、比較部34からはB信号が出力される。つまり、比較部34からは、X信号、B信号が順に連続して出力される。X信号、B信号が順に連続して出力される場合には、打拍信号が候補間隔で連続して2回(n+2,n+3打目)出力されることになる。この場合には、タップボタンの操作テンポ、換言すれば、現在再生されている音楽のテンポが変更されたと判断し、この候補間隔t1を新たな基本間隔として設定する。また、現時点の候補間隔を破棄する。BPM算出部40は、この変更後の基本間隔(t1)に基づいてBPMを算出する。   FIG. 7B illustrates a case where the input timings of the n + 3 strike signal and the candidate signal match. At this time, the comparison unit 34 outputs a B signal. That is, the X signal and the B signal are sequentially output from the comparison unit 34 in order. When the X signal and the B signal are sequentially output in sequence, the beat signal is output twice (n + 2, n + 3) at the candidate interval. In this case, it is determined that the operation tempo of the tap button, in other words, the tempo of the currently played music has been changed, and this candidate interval t1 is set as a new basic interval. Also, the current candidate interval is discarded. The BPM calculating unit 40 calculates BPM based on the changed basic interval (t1).

ここで、新たなBPMが算出されるのは、n+3打目の直後である。つまり、テンポが変更されてから打拍信号が2打分(n+2,n+3打)だけ入力されれば、即座に、テンポ変更後のBPMが算出される。その結果、テンポ変更後、極めて迅速に、新たなテンポ(BPM)を得ることができる。   Here, the new BPM is calculated immediately after the n + 3th shot. That is, if the beat signal is input for two strokes (n + 2, n + 3 strokes) after the tempo is changed, the BPM after the tempo change is calculated immediately. As a result, a new tempo (BPM) can be obtained very quickly after the tempo change.

図7Cには、n+3打目の打拍信号と、候補信号および基本信号の入力タイミングが一致した場合を図示している。この場合は、図7Bと同様に、テンポが変更されたと認識し、候補間隔を新たな基本間隔として設定される。すなわち、n+3打目において、基本信号と打拍信号の入力タイミングが一致していたとしても、候補信号と打拍信号の入力タイミングが一致している場合、換言すれば、候補間隔t1で連続して2回(n+2打、n+3打)、打拍信号が入力された場合には、当該候補間隔t1を新たな基本間隔として設定する。そして、以降では、この新たな基本間隔に基づいてBPMを算出する。   FIG. 7C shows a case where the input timings of the beat signal of the (n + 3) th hit, the candidate signal, and the basic signal match. In this case, similarly to FIG. 7B, it is recognized that the tempo has been changed, and the candidate interval is set as a new basic interval. That is, even if the input timings of the basic signal and the beat signal coincide with each other at the n + 3th shot, if the input timing of the candidate signal and the beat signal match, in other words, it continues at the candidate interval t1. If a beat signal is input twice (n + 2 strokes, n + 3 strokes), the candidate interval t1 is set as a new basic interval. Thereafter, BPM is calculated based on the new basic interval.

図7Dには、n+3打目の打拍信号と候補信号の入力タイミングが一致せず、かつ、打拍信号と基本信号の入力タイミングが一致した場合を図示している。この場合、n+3打目において、比較部34からはA信号が出力される。すなわち、比較部34からはX信号(n+2打)、A信号(n+3打)が順に出力される。この場合、n+2打は、誤入力と判断し、現時点での基本間隔t0を維持する。すなわち、基本間隔管理部30は、以降も、現時点での基本間隔t0に基づいて基本信号を出力する。BPM算出部40は、この現時点での基本間隔に基づいてBPMを算出する。候補間隔管理部32は、現在の候補間隔を破棄し、再度X信号が出力されるまで、候補信号の出力を停止する。   FIG. 7D illustrates a case where the input timing of the n + 3 strike signal and the candidate signal do not match, and the input timing of the beat signal and the basic signal match. In this case, the A signal is output from the comparison unit 34 at the n + 3th shot. That is, the X signal (n + 2 stroke) and the A signal (n + 3 stroke) are sequentially output from the comparison unit 34. In this case, n + 2 strokes are determined to be erroneous input, and the current basic interval t0 is maintained. That is, the basic interval management unit 30 continues to output a basic signal based on the current basic interval t0. The BPM calculator 40 calculates BPM based on the current basic interval. The candidate interval management unit 32 discards the current candidate interval and stops outputting candidate signals until the X signal is output again.

つまり、本実施形態では、打拍信号が基本間隔と異なる間隔で1回だけ入力されたとしても、基本間隔の変更、換言すれば、BPM算出の基準値の変更を行わない。その結果、ユーザが誤って、間違ったタイミングでタップボタンを操作しても、その誤操作は、BPMの値に反映されない。したがって、誤操作の影響を受けない、より信頼性の高いBPMを認識することができる。   That is, in this embodiment, even if the beat signal is input only once at an interval different from the basic interval, the basic interval is not changed, in other words, the reference value for BPM calculation is not changed. As a result, even if the user mistakenly operates the tap button at the wrong timing, the erroneous operation is not reflected in the BPM value. Therefore, it is possible to recognize a more reliable BPM that is not affected by an erroneous operation.

図7Eには、n+2打目において、打拍信号と基本信号の入力タイミングが一致しなかった後、さらに、n+3打目においても、打拍信号と候補信号および基本信号との入力タイミングが一致しない場合を図示している。この場合、再度、現在の基準間隔t0が維持されるとともに、新たな候補間隔が設定される。すなわち、n+2打目でX信号が出力されると、候補間隔としてt1が設定され、基本間隔はt0のまま維持される。続いて、n+3打目においても、X信号が出力されると、新たな候補間隔t2が設定され、基本間隔t0はそのまま維持される。そして、n+4打目において、候補信号と打拍信号が一致すれば、すなわち、n+4打目の打拍信号が図7Eにおけるaタイミングで入力されれば、当該候補間隔が新たな基本間隔として設定される。一方、n+4打目において、基本信号と打拍信号が一致すれば、すなわち、n+4打目の打拍信号が図7Eにおけるbタイミングで入力されれば、当該候補間隔は破棄されるとともに、現時点での基本間隔が維持される。n+4打目においても、なお、打拍信号と、基本信号および候補信号との入力タイミングが一致しなければ、再度、候補間隔が設定しなおされる。この間、BPMは、その時点での基本間隔に基づいて算出される。     In FIG. 7E, after the input timing of the beat signal and the basic signal does not match at the n + 2 stroke, the input timing of the beat signal, the candidate signal, and the basic signal also does not match at the n + 3 stroke. The case is illustrated. In this case, the current reference interval t0 is maintained again and a new candidate interval is set. That is, when the X signal is output at the n + 2th shot, t1 is set as the candidate interval, and the basic interval is maintained at t0. Subsequently, also in the n + 3th shot, when the X signal is output, a new candidate interval t2 is set, and the basic interval t0 is maintained as it is. If the candidate signal and the beat signal coincide with each other at the n + 4th stroke, that is, if the beat signal at the n + 4th stroke is input at timing a in FIG. 7E, the candidate interval is set as a new basic interval. The On the other hand, if the basic signal and the beat signal coincide with each other at the n + 4th beat, that is, if the beat signal at the n + 4th beat is input at timing b in FIG. 7E, the candidate interval is discarded and at the present time. The basic interval is maintained. Even in the n + 4th shot, if the input timings of the beat signal, the basic signal, and the candidate signal do not match, the candidate interval is set again. During this time, BPM is calculated based on the basic interval at that time.

つまり、本実施形態では、打拍信号の入力間隔が変更されても、その変更の原因がテンポ変更によるものか、誤打によるものか、が明確になるまで、BPMを変更しない。その結果、誤打の影響を受けない、信頼性のより高いBPMを得ることができる。   In other words, in this embodiment, even if the input interval of the beat signal is changed, the BPM is not changed until it is clear whether the cause of the change is due to a tempo change or an erroneous hit. As a result, it is possible to obtain a highly reliable BPM that is not affected by an erroneous hit.

次に、基本間隔の初期値設定について図8を用いて説明する。図8は、打拍信号の入力直後におけるタイミングチャートの例である。基本間隔の初期値は、予め所定の値をユーザが設定するようにしてもよいし、実際に入力された打拍信号に基づいて求めるようにしてもよい。図8は、実際に入力された打拍信号に基づいて、基本間隔の初期値を求める様子を示している。   Next, the initial value setting of the basic interval will be described with reference to FIG. FIG. 8 is an example of a timing chart immediately after inputting the beat signal. The initial value of the basic interval may be set in advance by the user, or may be obtained based on the actually input beat signal. FIG. 8 shows how the initial value of the basic interval is obtained based on the actually input beat signal.

この場合、初期段階においては、基本間隔および候補間隔は、いずれも、未設定の状態である。したがって、ユーザがタップボタンを操作して、1打目の打拍信号を入力した時点では、基本信号および候補信号のいずれも出力されない。したがって、1打目の時点で、比較部34からは必ずX信号が出力される。X信号が出力されれば、候補間隔管理部32は、候補間隔の設定を試みる。しかし、1打目の打拍信号の入力直後の時点では、1打目以前の打拍信号入力履歴が無いため、候補間隔は設定できない。   In this case, in the initial stage, both the basic interval and the candidate interval are not set. Therefore, when the user operates the tap button and inputs the first beat signal, neither the basic signal nor the candidate signal is output. Therefore, the X signal is always output from the comparison unit 34 at the time of the first hit. If the X signal is output, the candidate interval management unit 32 tries to set the candidate interval. However, the candidate interval cannot be set because there is no beat signal input history before the first shot at the time immediately after the input of the first beat signal.

したがって、2打目の打拍信号入力の時点でも、候補信号および基本信号は、未設定のままで、2打目の際にも、必ず、X信号が出力される。このX信号の出力を受けた候補間隔設定部は、再度、候補間隔の設定を試みる。この時点では、2打目の入力タイミングと、1打目の入力タイミングと、の差分に基づいて、候補間隔t0を得ることができる。したがって、候補間隔管理部32は、当該候補間隔t0に基づいて、候補信号を出力する。この候補信号と、3打目の打拍信号の入力タイミングとが一致すれば、B信号が出力される。B信号が出力されれば、現時点の候補間隔t0が、基本間隔の初期値として設定される。そして、4打目以降は、この基本間隔t0に基づいて、基本信号が出力される。   Therefore, the candidate signal and the basic signal are not set even at the time of inputting the second beat signal, and the X signal is always output even at the second shot. Upon receiving this X signal output, the candidate interval setting unit tries to set the candidate interval again. At this time, the candidate interval t0 can be obtained based on the difference between the input timing of the second stroke and the input timing of the first stroke. Therefore, the candidate interval management unit 32 outputs a candidate signal based on the candidate interval t0. If this candidate signal matches the input timing of the third beat signal, the B signal is output. If the B signal is output, the current candidate interval t0 is set as the initial value of the basic interval. After the fourth shot, a basic signal is output based on this basic interval t0.

ところで、上述の説明では、分かりやすさのために、候補間隔管理部32から更新指示が無い限り、基本間隔の値を一定として説明している。しかし、実際には、基本間隔は、微小範囲で適宜、補正されている。この補正について説明する。図9は、基本間隔の値補正の様子を示すタイミングチャートである。既述したように、基本間隔管理部30は、基本間隔に基づいて次の打拍信号の入力タイミングを予想する。そして、当該予想タイミングの前後に許容範囲div分だけの余裕を持って、基本信号を出力する(図3参照)。   By the way, in the above description, the basic interval value is assumed to be constant unless there is an update instruction from the candidate interval management unit 32 for easy understanding. However, in practice, the basic interval is appropriately corrected within a minute range. This correction will be described. FIG. 9 is a timing chart showing how the basic interval value is corrected. As described above, the basic interval management unit 30 predicts the input timing of the next beat signal based on the basic interval. Then, the basic signal is output with a margin of the allowable range div before and after the expected timing (see FIG. 3).

今、あるn打目において、打拍信号が、許容範囲divを超えない範囲で予想タイミングTより早めに入力されたとする。このとき、基本間隔管理部30は、n打目の打拍信号の入力タイミングを基準とし、現時点での基本間隔t0に基づいて、n+1打目の打拍信号の入力タイミングを予想し、当該予想タイミングTn+1に基づいて基本信号を出力する。このとき、n+1打目の打拍信号が、許容範囲divを超えない範囲で、予想タイミングTn+1より遅れて入力されたとする。このとき、基本間隔管理部30は、n打目入力からn+1打目入力までの間隔t1を基本間隔として補正する。そして、n+2打目の予想タイミングTn+2を、n+1打目の打拍信号の入力タイミングを基準として、間隔t1に基づいて予想する。n+2打目においても、予想タイミングTn+2と、実際の入力タイミングと、が許容範囲divの範囲内でずれた場合には、基本間隔の値を、(n+2打目の入力タイミング−n+1打目の入力タイミング)の値に補正する。 Now, in certain n-th shot, beat signal, and is input earlier than expected timing T n in a range not exceeding the allowable range div. At this time, the basic interval management unit 30 predicts the input timing of the n + 1 beat signal based on the current basic interval t0 based on the input timing of the nth beat signal as a reference. A basic signal is output based on the timing T n + 1 . At this time, it is assumed that the beat signal of the (n + 1) th stroke is input after the expected timing Tn + 1 within a range that does not exceed the allowable range div. At this time, the basic interval management unit 30 corrects the interval t1 from the nth stroke input to the (n + 1) th stroke input as the basic interval. Then, the predicted timing T n + 2 of the n + 2 stroke is predicted based on the interval t1 with reference to the input timing of the beat signal of the n + 1 stroke. Also in the n + 2 stroke, when the predicted timing T n + 2 and the actual input timing are shifted within the allowable range div, the basic interval value is expressed as (n + 2 stroke input timing−n + 1 stroke). Input value) is corrected.

すなわち、実際の打拍信号の入力タイミングと、基本間隔に基づく予想タイミングと、が許容範囲divを超えない範囲でずれた場合には、常に、基本間隔の値が補正されることになる。   That is, the value of the basic interval is always corrected when the actual beat signal input timing and the expected timing based on the basic interval deviate within a range that does not exceed the allowable range div.

基本間隔管理部30は、この適宜、補正され、値変更される基本間隔の過去m回分の値を、t,tn−1,tn−2・・・tn−(m−1)して記憶している。BPM算出部40は、この過去m回分の基本間隔t,tn−1,tn−2・・・tn−(m−1)に基づいてBPMを算出する。このBPMの算出に当たっては、過去m回分の基本間隔t,tn−1,tn−2・・・tn−(m−1)の変動状況に応じて、その算出の方法を変えている。 The basic interval management unit 30 appropriately corrects and changes the value of the basic interval for the past m times t n , t n−1 , t n−2 ... T n− (m−1). And remember. The BPM calculating unit 40 calculates the BPM based on the basic intervals t n , t n−1 , t n−2 ... T n− (m−1) for the past m times. In calculating this BPM, the calculation method is changed according to the fluctuation state of the basic intervals t n , t n−1 , t n−2 ... T n− (m−1) for the past m times. Yes.

すなわち、BPM算出部40は、BPM算出に先立って、過去m回分の基本間隔の値を比較する。そして、基本間隔が徐々に短くなる場合(t<tn−1<tn−2・・・<tn−(m−1))、あるいは、基本間隔が徐々に長くなる場合(t>tn−1>tn−2・・・>tn−(m−1))には、テンポが変化しかけていると判断する。この場合には、最新の基本間隔tに基づいて、BPMを算出する。すなわち、BPM=60/t(tの単位はsec)とする。このように、テンポ変化が予測される場合には、最新の基本間隔のみに基づいてBPMを算出することにより、最新のテンポ状態をより強く反映したBPMを得ることができる。その結果、信頼性のより高いBPMを得ることができる。 That is, the BPM calculating unit 40 compares the values of the basic intervals for the past m times before calculating the BPM. Then, when the basic interval is gradually shortened (t n <t n-1 <t n-2 ... <T n- (m-1) ), or when the basic interval is gradually increased (t n > T n-1 > t n-2 ...> T n− (m−1) ), it is determined that the tempo is changing. In this case, based on the latest basic interval t n, calculating the BPM. That is, BPM = 60 / t n (the unit of t n is sec). In this way, when a tempo change is predicted, the BPM that more strongly reflects the latest tempo state can be obtained by calculating the BPM based only on the latest basic interval. As a result, BPM with higher reliability can be obtained.

また、候補間隔に基づいて新たな基本間隔が再設定された場合も、最新の基本間隔tに基づいて、BPMを算出する。つまり、候補間隔に基づいて新たな基本間隔が再設定された場合、換言すれば、明らかなテンポ変更があった場合には、最新の基本間隔のみに基づいて、BPMを算出している。その結果、テンポ変更前の影響を受けない、より正確なBPMを得ることができる。 Also, when a new base distance on the basis of the candidate interval is re-set, based on the latest basic interval t n, calculating the BPM. That is, when a new basic interval is reset based on the candidate interval, in other words, when there is an obvious tempo change, the BPM is calculated based only on the latest basic interval. As a result, a more accurate BPM that is not affected before the tempo change can be obtained.

一方、過去m回分の基本間隔t,tn−1,tn−2・・・tn−(m−1)の変動状況が、上記のいずれにも該当しない場合には、テンポは安定していると判断し、基本間隔が変動していない過去m回分の基本間隔t,tn−1,tn−2・・・tn−(m−1)の平均値を算出し、当該平均値に基づいてBPMを算出する。すなわち、BPM=60/{(t,tn−1,tn−2・・・tn−(m−1))/m}とする。過去3回分の平均に基づいてBPMを算出することにより、ノイズや、人の不正確さ等の影響を軽減できる。なお、mは、3回以上での適度な数であることが望ましい。mを2回とした場合、(t<tn−1)あるいは(t>tn−1)なるケースが殆どであり、常に、テンポが変化しかけていると判断されてしまう。逆に、mをあまり大きい数字とすると、基本間隔が徐々に短く、または、徐々に長くなる場合が稀となり、常に、テンポが安定していると判断されてしまう。 On the other hand, when the past m times the basic interval t n, the variation situation of n- t n-1, t n -2 ··· t (m-1) is, none of the above, the tempo stable Calculating the average value of the basic intervals t n , t n−1 , t n−2 ... T n− (m−1) for the past m times when the basic interval has not changed. BPM is calculated based on the average value. That is, BPM = 60 / {(t n , t n−1 , t n−2 ... T n− (m−1) ) / m}. By calculating the BPM based on the average of the past three times, it is possible to reduce the influence of noise and human inaccuracy. In addition, it is desirable that m is an appropriate number at 3 times or more. When m is set to twice, in most cases, (t n <t n-1 ) or (t n > t n-1 ), it is always determined that the tempo is changing. On the other hand, if m is a very large number, the basic interval is gradually shortened or gradually increased, and it is always determined that the tempo is stable.

このように、基本間隔の変動状況に応じて、BPM算出方法を変えることにより、信頼性のより高いBPMを得ることができる。   Thus, a BPM with higher reliability can be obtained by changing the BPM calculation method according to the fluctuation state of the basic interval.

以上の説明したように、本実施形態では、テンポを示す打拍信号が、基本間隔とは異なる候補間隔で連続して2回以上入力された場合にのみテンポ変更と判断している。連続して2回以上の場合にのみテンポ変更と判断することにより、打拍信号の入力間隔の変動が、誤入力によるものか、テンポ変更によるものか、を明確に判断できる。その結果、誤入力の影響を受けることなく、正確なBPMを得ることができる。テンポ変更された場合には、迅速にテンポ変更後のBPMを得ることができる。また、本実施形態では、過去数回分の基本間隔の値変動状況、換言すれば、打拍信号の入力間隔の変動状況に応じて、BPMの算出方法を切り替えている。そのため、信頼性のより高いBPMを得ることができる。   As described above, in this embodiment, it is determined that the tempo is changed only when the beat signal indicating the tempo is continuously input twice or more at a candidate interval different from the basic interval. By determining that the tempo is changed only when two or more times are continuously performed, it is possible to clearly determine whether the variation in the input interval of the beat signal is due to an erroneous input or due to a tempo change. As a result, an accurate BPM can be obtained without being affected by an erroneous input. When the tempo is changed, the BPM after the tempo change can be obtained quickly. Further, in the present embodiment, the BPM calculation method is switched in accordance with the value fluctuation state of the basic interval for the past several times, in other words, according to the fluctuation state of the input interval of the beat signal. Therefore, BPM with higher reliability can be obtained.

なお、本実施形態では、テンポを示す打拍信号は、ユーザがタップボタンを手動操作することにより生成、出力されている。しかしながら、再生される音楽の音声データから自動的に打拍信号を生成、出力されるようにしてもよい。すなわち、音声データから低周波信号が出力されれば、自動的に、打拍信号を出力するようにしてもよい。この打拍信号の出力については、特許文献1に記載の技術などを応用できる。   In the present embodiment, the beat signal indicating the tempo is generated and output when the user manually operates the tap button. However, a beat signal may be automatically generated and output from audio data of music to be reproduced. That is, if a low frequency signal is output from audio data, a beat signal may be automatically output. For the output of the beat signal, the technique described in Patent Document 1 can be applied.

また、本実施形態では、オーディオ装置10に搭載されたテンポ検出部16を例に説明している。しかし、テンポ検出が必要な機器であれば、当然、他の機器、例えば、電子楽器等にも当然、応用できる。   In the present embodiment, the tempo detection unit 16 installed in the audio device 10 is described as an example. However, as long as the device requires tempo detection, it can naturally be applied to other devices such as an electronic musical instrument.

また、本実施形態では、基本間隔を候補間隔の値に更新する条件として、候補間隔での打拍信号の入力が2回連続してあることとしている。しかし、候補間隔での打拍信号の入力が連続してあるのであれば、その回数は特に制限されない。ただし、この回数をあまり多くするとテンポ変化に対する対応(基本間隔の値更新)が遅れるため、ユーザにとって問題のない程度の回数とするのが望ましい。   In the present embodiment, as a condition for updating the basic interval to the value of the candidate interval, it is assumed that the input of the beat signal at the candidate interval is continuous twice. However, the number of beats is not particularly limited as long as the beat signal input at the candidate interval is continuous. However, if this number is increased too much, the response to the tempo change (update of the value of the basic interval) is delayed, so it is desirable that the number of times is not problematic for the user.

本発明の実施形態でオーディオ装置の概略構成を示すブロック図である。1 is a block diagram illustrating a schematic configuration of an audio apparatus according to an embodiment of the present invention. テンポ検出部の構成を示すブロック図である。It is a block diagram which shows the structure of a tempo detection part. 基本信号および候補信号の許容範囲divを示す図である。It is a figure which shows the tolerance | permissible_range div of a basic signal and a candidate signal. 比較部の構成を示す図である。It is a figure which shows the structure of a comparison part. 比較部の入出力関係を示す表である。It is a table | surface which shows the input / output relationship of a comparison part. テンポ検出の流れを示すフローチャートである。It is a flowchart which shows the flow of tempo detection. 比較部での信号入出力の一例を示すタイミングチャートである。It is a timing chart which shows an example of the signal input / output in a comparison part. 比較部での信号入出力の一例を示すタイミングチャートである。It is a timing chart which shows an example of the signal input / output in a comparison part. 比較部での信号入出力の一例を示すタイミングチャートである。It is a timing chart which shows an example of the signal input / output in a comparison part. 比較部での信号入出力の一例を示すタイミングチャートである。It is a timing chart which shows an example of the signal input / output in a comparison part. 比較部での信号入出力の一例を示すタイミングチャートである。It is a timing chart which shows an example of the signal input / output in a comparison part. 基本間隔の初期値設定の様子を説明するタイミングチャートである。It is a timing chart explaining the mode of the initial value setting of a basic interval. 基本間隔の補正の様子を説明するタイミングチャートである。It is a timing chart explaining the mode of correction of a basic interval.

符号の説明Explanation of symbols

10 オーディオ装置、12 再生部、14 操作部、16 テンポ検出部、18 表示部、20 制御部、24 BPM表示部、30 基本間隔管理部、32 候補間隔管理部、34 比較部、36,38 タイマ、40 BPM算出部。   10 audio devices, 12 playback units, 14 operation units, 16 tempo detection units, 18 display units, 20 control units, 24 BPM display units, 30 basic interval management units, 32 candidate interval management units, 34 comparison units, 36, 38 timers 40 BPM calculator.

Claims (3)

間欠的に入力される打拍信号に基づいて当該打拍信号の入力テンポを検出するテンポ検出装置であって、
予め設定された基本間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第一判断手段と、
第一判断手段により両間隔が一致しないと判断された場合における打拍信号の入力間隔を新たな基本間隔の候補である候補間隔として設定する候補間隔設定手段と、
設定された候補間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第二判断手段と、
第二判断手段により設定された候補間隔で打拍信号が入力されたと判断された場合に、当該候補間隔を新たな基本間隔として設定する基本間隔更新手段と、
設定されている基本間隔に基づいて打拍信号の入力テンポを算出するテンポ算出手段と、
を備えることを特徴とするテンポ検出装置。
A tempo detection device for detecting an input tempo of a beat signal based on a beat signal input intermittently,
First determination means for determining whether or not the preset basic interval and the input interval of the beat signal match within a predetermined allowable range;
Candidate interval setting means for setting the input interval of the beat signal as a candidate interval that is a candidate for a new basic interval when the first determination means determines that both intervals do not match;
Second determination means for determining whether or not the set candidate interval and the input interval of the beat signal match within a predetermined allowable range;
A basic interval update unit that sets the candidate interval as a new basic interval when it is determined that a beat signal is input at the candidate interval set by the second determination unit;
Tempo calculation means for calculating the input tempo of the beat signal based on the set basic interval;
A tempo detection device comprising:
請求項1に記載のテンポ検出装置であって、さらに、
前記第一判断手段により一致していると判断され得る許容範囲内で基本間隔と打拍信号の入力間隔とがずれている場合に、当該打拍信号の入力間隔に応じて基本間隔の値を補正する基本間隔補正手段を有し、
テンポ算出手段は、
少なくとも過去3回分以上の基本間隔の値の変更履歴を記憶する手段と、
当該基本間隔の変更履歴に基づいて、テンポが変化しているか否かを判断するテンポ状況判断手段と、
テンポが変化していると判断した場合には最新の基本間隔に基づいてテンポを算出し、テンポが変化していないと判断した場合には変更履歴に記憶されている複数の基本間隔の平均値に基づいてテンポを算出する算出手段と、
を有し、
テンポ状況判断手段は、変更履歴に記憶されている基本間隔が連続して増加または減少している場合、あるいは、候補間隔に更新されている場合には、テンポが変化していると判断する、
ことを特徴とするテンポ検出装置。
The tempo detection device according to claim 1, further comprising:
When the basic interval deviates from the input interval of the beat signal within an allowable range that can be determined to match by the first determining means, the value of the basic interval is set according to the input interval of the beat signal. Having a basic interval correction means for correcting,
Tempo calculation means
Means for storing a change history of at least three basic interval values;
Based on the change history of the basic interval, tempo situation determination means for determining whether or not the tempo has changed,
When it is determined that the tempo has changed, the tempo is calculated based on the latest basic interval, and when it is determined that the tempo has not changed, the average value of the plurality of basic intervals stored in the change history Calculating means for calculating the tempo based on
I have a,
The tempo status determination means determines that the tempo has changed when the basic interval stored in the change history continuously increases or decreases, or when it is updated to the candidate interval,
A tempo detection device characterized by the above.
間欠的に入力される打拍信号に基づいて当該打拍信号の入力テンポを検出するテンポ検出方法であって、  A tempo detection method for detecting an input tempo of a beat signal based on a beat signal input intermittently,
予め設定された基本間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第一判断ステップと、  A first determination step of determining whether or not the preset basic interval and the input interval of the beat signal match within a predetermined allowable range;
第一判断ステップにより両間隔が一致しないと判断された場合における打拍信号の入力間隔を新たな基本間隔の候補である候補間隔として設定する候補間隔設定ステップと、  A candidate interval setting step for setting the input interval of the beat signal when it is determined by the first determination step that the intervals do not match, as a candidate interval that is a candidate for a new basic interval;
設定された候補間隔と打拍信号の入力間隔とが所定の許容範囲内で一致するか否かを判断する第二判断ステップと、  A second determination step of determining whether or not the set candidate interval and the input interval of the beat signal match within a predetermined allowable range;
第二判断ステップにより設定された候補間隔で打拍信号が入力されたと判断された場合に、当該候補間隔を新たな基本間隔として設定する基本間隔更新ステップと、  A basic interval update step for setting the candidate interval as a new basic interval when it is determined that the beat signal is input at the candidate interval set in the second determination step;
設定されている基本間隔に基づいて打拍信号の入力テンポを算出するテンポ算出ステップと、  A tempo calculation step for calculating the input tempo of the beat signal based on the set basic interval;
を備えることを特徴とするテンポ検出方法。  A tempo detection method comprising:
JP2005222650A 2005-08-01 2005-08-01 Tempo detection device and tempo detection method Expired - Fee Related JP4360358B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005222650A JP4360358B2 (en) 2005-08-01 2005-08-01 Tempo detection device and tempo detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005222650A JP4360358B2 (en) 2005-08-01 2005-08-01 Tempo detection device and tempo detection method

Publications (2)

Publication Number Publication Date
JP2007041108A JP2007041108A (en) 2007-02-15
JP4360358B2 true JP4360358B2 (en) 2009-11-11

Family

ID=37799170

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005222650A Expired - Fee Related JP4360358B2 (en) 2005-08-01 2005-08-01 Tempo detection device and tempo detection method

Country Status (1)

Country Link
JP (1) JP4360358B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5309459B2 (en) * 2007-03-23 2013-10-09 ヤマハ株式会社 Beat detection device
JP2009186591A (en) * 2008-02-04 2009-08-20 Seiko Instruments Inc Tempo display device and tempo display method
MX2012009594A (en) 2010-02-26 2012-09-28 Sharp Kk Content reproduction device, television receiver, content reproduction method, content reproduction program, and recording medium.
JP6372072B2 (en) * 2013-12-09 2018-08-15 ヤマハ株式会社 Acoustic signal analysis apparatus, acoustic signal analysis method, and acoustic signal analysis program
KR101560797B1 (en) 2013-12-27 2015-10-15 김명구 A easy chord setting system and a method thereof

Also Published As

Publication number Publication date
JP2007041108A (en) 2007-02-15

Similar Documents

Publication Publication Date Title
US8723011B2 (en) Musical sound generation instrument and computer readable medium
JP4360358B2 (en) Tempo detection device and tempo detection method
JP4659681B2 (en) Content tagging support apparatus and content tagging support method
US20210335332A1 (en) Video processing device and video processing method
JP2005103241A (en) Input device, game system, program, and information storage medium
JP5309459B2 (en) Beat detection device
US20200394991A1 (en) Performance analysis method and performance analysis device
JP2009244707A (en) Musical range determination system and program
JP4891135B2 (en) Evaluation device
JP2006268936A (en) Audio signal reproducing device
JP2000267655A (en) Synchronization method for rhythm
JP5162754B2 (en) Performance start device and performance start program
JP2004287308A (en) Performance control device and its program
JP4214606B2 (en) Tempo calculation method and tempo calculation device
JP2009300622A (en) Musical performance start time estimation device
JP4501800B2 (en) Acoustic signal processing apparatus and program
JP2009086084A (en) Device for supporting performance practice, and program of processing performance practice support
JPH0620390A (en) Synchronizing pattern detecting device
JP2606501B2 (en) Electronic musical instrument with automatic performance function
JP5162887B2 (en) Program for realizing electronic music apparatus and control method thereof
JPH04328351A (en) Automatic adjuster for information reproducing speed
WO2019026260A1 (en) Evaluation device, evaluation method, and evaluation program
JP2019012118A (en) Karaoke device
JP2009147879A (en) Acoustic device, acoustic field correction method, acoustic field correction program and its recoding medium
JPH0635457A (en) Automatic player

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090324

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090414

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090611

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090803

R150 Certificate of patent or registration of utility model

Ref document number: 4360358

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20120821

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120821

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130821

Year of fee payment: 4

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees