Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP3757641B2 - Tempo control device - Google Patents
[go: Go Back, main page]

JP3757641B2 - Tempo control device - Google Patents

Tempo control device Download PDF

Info

Publication number
JP3757641B2
JP3757641B2 JP26255398A JP26255398A JP3757641B2 JP 3757641 B2 JP3757641 B2 JP 3757641B2 JP 26255398 A JP26255398 A JP 26255398A JP 26255398 A JP26255398 A JP 26255398A JP 3757641 B2 JP3757641 B2 JP 3757641B2
Authority
JP
Japan
Prior art keywords
tempo
value
timing
variable
time interval
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
JP26255398A
Other languages
Japanese (ja)
Other versions
JP2000089757A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP26255398A priority Critical patent/JP3757641B2/en
Publication of JP2000089757A publication Critical patent/JP2000089757A/en
Application granted granted Critical
Publication of JP3757641B2 publication Critical patent/JP3757641B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、ユーザが動かす物体(例えば手)の動きを検出してテンポ(の値)を変更する技術に関する。
【0002】
【従来の技術】
現在、自動演奏装置は専用の装置としてだけでなく、電子楽器やシンセサイザ、或いはコントローラ等の楽音発生装置にも幅広く搭載されている。その自動演奏装置は、演奏データを処理することで演奏(ここでは伴奏を含む意味で用いる)を行う装置であり、その演奏は設定されたテンポで行われる。テンポ制御装置は、そのような自動演奏装置に、ユーザに任意のテンポの値を設定させるための装置として搭載される。
【0003】
上記テンポ制御装置の多くは、新たに設定するテンポの値をユーザに指定させる方法として、スイッチ等を操作させてテンポの値をユーザに直接的に指定させる方法が採用されている。しかし、テンポ制御装置のなかには、物体(例えば手)の動かし方によりテンポの値をユーザに指定させる方法が採用されたものがある。その方法では、物体の動きからテンポの値を指定する情報を抽出することから、以降、便宜的にテンポ抽出方法と呼ぶことにする。テンポの値を指定する情報については、以降、便宜的にテンポ情報と呼ぶことにする。
【0004】
テンポ抽出方法を採用したテンポ制御装置には、ユーザが動かす物体の動きを検出するために、例えばLED(発光ダイオード)等の光源やフォトセンサが備えられている。テンポ制御装置は、それらを用いて、例えば以下のようにテンポ情報を抽出する。
【0005】
上記フォトセンサは、光源から放射された光、或いはそれを物体が反射した光を受光させるために用いられる。そのような光の何れかをフォトセンサに受光させることにより、その受光量から物体がフォトセンサで検出される位置に存在しているか否か判定する。
【0006】
ユーザが物体を動かしている場合、フォトセンサの受光量に基づく物体の有無の判定結果は、有から無、無から有、といったように順次、交互に変化する。そのことに着目し、判定結果が変化する時間間隔、例えば有と判定してから再び有と判定するまでの時間間隔(周期)を計時し、その計時した時間間隔をテンポ情報として抽出する。新たに設定すべきテンポの値は、そのようにして抽出したテンポ情報を基に決定する。
【0007】
【発明が解決しようとする課題】
テンポ抽出方法を採用したテンポ制御装置では、フォトセンサに光源が放射した光、或いはその反射光を受光させるために、光源を駆動しなければならない。その光源は、消費電力を抑えたり、電灯等の外乱光の影響を避けるために、普通、間欠駆動される。
【0008】
従来のテンポ制御装置は、その間欠駆動を、予め定められた時間間隔が経過する度に光源を駆動することで行い、その光源を駆動するタイミングでフォトセンサの受光量を標本化(検出)し、その受光量からテンポの変更を行っていた。このため、光源を駆動する時間間隔によって、以下のような問題点があった。
【0009】
時間間隔を比較的に長く設定した場合には、物体の動きを検出するタイミングが全体として遅れるようになり、テンポ情報を抽出する精度が低下する。このため、ユーザが所望するテンポの値を高精度に設定することができないという問題点があった。
【0010】
一方、時間間隔を比較的に短く設定した場合には、物体のぶれといった僅かな動きを検出してしまい、ユーザの意図に関わらずにテンポの値を変更してしまうという問題点があった。
【0011】
このように、従来のテンポ制御装置では、何れにしても、ユーザが意図したようにテンポの値を変更させることが困難であった。このため、それらの問題点を共に回避することが強く望まれていた。
【0012】
本発明の課題は、ユーザの意図に沿って所望のテンポ値に高精度に変更できるテンポ制御装置を提供することにある。
【0013】
【課題を解決するための手段】
本発明のテンポ制御装置は、自動演奏装置に搭載され、該自動演奏装置が自動演奏を行うテンポの値を制御することを前提とし、ユーザが動かす物体の動きを検出する動き検出手段と、動き検出手段が検出した物体の動きに基づいて、テンポの値を変更するテンポ変更手段と、動き検出手段が物体の検出を行う時間間隔を変化させて該動き検出手段に物体を検出させる制御手段と、を具備する。
【0014】
なお、上記の構成において、制御手段は、時間間隔を、予め定めた演奏単位を周期として変化させる、ことが望ましい。また、制御手段は、演奏単位の先頭に位置する期間、及び最終に位置する期間の時間間隔を、それら以外の期間の時間間隔と比較して長くさせる、ことが望ましい。その演奏単位は拍である、ことが望ましい。
【0015】
本発明では、物体を検出するタイミングの時間間隔に変化を設け、そのタイミングで物体を検出した場合に、そのタイミングに基づいてテンポ値の変更を行う。
【0016】
時間間隔に変化を設けることで、或る定められた期間のなかで物体の検出を行う精度に変化をつけることになる。このことから、その期間を、必要な精度に応じて時間間隔を調整することにより、ユーザの意図に反するテンポ値の変更は回避し、意図したテンポ値の変更は高精度に行えるようになる。
【0017】
【発明の実施の形態】
以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。
図1は、本実施の形態によるテンポ制御装置を搭載した自動演奏装置の回路構成図である。
【0018】
その自動演奏装置は、図1に示すように、装置全体の制御を行うCPU101と、プログラムや自動演奏用の演奏データ(シーケンスデータ)、及び各種制御データ等を格納したROM102と、CPU101がワーク用に用いるRAM103と、各種の操作子からなる操作子群104、各種楽音の波形データを格納した波形メモリ105と、CPU101の指示に従って、波形メモリ105から波形データを読み出し、それに必要な処理を施して出力する音源LSI106と、音源LSI106が出力した波形データをD/A変換してアナログのオーディオ信号を出力するD/A変換器107と、そのオーディオ信号を増幅する音響増幅器108と、音響増幅器108が出力したオーディオ信号を入力して楽音を放音するスピーカー109と、光を放射する光源としてLED110を有する発光部111と、CPU101から送られる信号(発光信号)の電流(或いは電圧)増幅を行い、それを発光部111に出力して駆動するドライバ回路112と、フォトセンサ(フォトダイオード)113を有する受光部114と、その受光部114から出力された受光信号をA/D変換してそのデジタル値を出力するA/D変換器115と、を備えて構成されている。
【0019】
上記操作子群104は、各種操作子の他に、それらの操作状態を検出する回路を含めて表したものである。その検出回路は、例えばスキャン(走査)することで各操作子の操作状態を検出し、各操作子毎にその検出結果を操作情報としてCPU101に送出する。操作子としては、特に図示しないが、自動演奏(ここでは自動伴奏を含む)のスタート、或いはストップを指示するためのスタート/ストップスイッチ、自動演奏する曲を指定するための複数の数値キー、テンポ値を指定するためのテンポボタン、予め用意されているモードのなかから一つのモードを選択するためのモードスイッチ等が配設されている。発光部111(LED110)、及び受光部114は、そのモードスイッチにより所定のモードが選択された場合に、自動演奏を行っている間、駆動される。その所定のモードについては、以降、便宜的に、テンポ抽出モードと呼ぶことにする。
【0020】
フォトセンサ113は、発光部111のLED110と並べた形で配設させている。それにより、LED110から放射され、反射物120で反射された光をフォトセンサ113に受光させるようにしている。このことから、ユーザは、反射物120をLED110から放射される光の光路に沿って、或いはその光路の交差方向に移動(普通は往復移動)させてテンポを指定することになる。なお、反射物120は、具体的にはユーザの手、或いは指揮棒等である。
【0021】
以上の構成において、その動作を説明する。
特に図示しない電源スイッチへの操作によって電源がオンされると、CPU101は、ROM102に格納されたプログラムを読み出して実行することにより、装置全体の制御を開始する。その制御は、RAM103をワーク用に使用しながら、操作子群104へのユーザの操作に応じて行う。
【0022】
各操作子に対して行ったユーザの操作を検出するために、CPU101は、操作子群104の検出回路に制御コマンドを送出し、検出回路に各操作子をスキャンさせて、その走査結果(各操作子の操作状態を示す操作情報)を受け取る。その走査結果(操作情報)を解析することにより、状態が変化した操作子、及びその変化内容を判別する。上記制御は、その操作子に割り当てた機能、及び変化内容に応じて行う。
【0023】
例えば、走査結果を解析した結果、上記数値キー、テンポボタン、或いはモードスイッチが操作されたと判別した場合、CPU101は、操作されたと判別した操作子の種類に応じて、RAM103に格納した変数の値を書き換る。それにより、自動演奏させる曲やテンポ値の変更、モードの切り換えを行う。このとき、テンポ値を変更すると、自動演奏を実行する際に参照する変数TEMPOVALUEには、変更後のテンポ値に対応する自動演奏実行上の値が代入される。
【0024】
一方、上記スタート/ストップスイッチが操作されたと判別した場合には、CPU101は、例えば自動演奏を実行中か否かを管理するための変数(以降、便宜的に自動演奏フラグと呼ぶ)の値を書き換える。それにより、例えばそれまでの値が1であれば0、それまでの値が0であれば1に変更する。そのような書き換えを行った後の自動演奏フラグの値から、自動演奏を現在行っているか否か判定し、その判定結果に応じて以下のような制御を行う。
【0025】
なお、自動演奏を行うために処理する演奏データは、例えば演奏上のイベントの内容を表すイベントデータに、それを処理すべきタイミングを表す時間データが付加されて構成されたものである。
【0026】
自動演奏を現在行っていないと判定した場合、CPU101は、RAM103に保持させた変数を参照して、ユーザが再生を指定した曲の演奏データをROM102から読み出す。その後は、例えば、ROM102から読み出した演奏データ中のイベントデータを制御コマンドとして、それに付加された時間データに従って音源LSI106に順次送出していくことで、自動演奏を実行する。
【0027】
音源LSI106は、その制御コマンドで指示された内容に従って、波形データの出力や音色の変更、或いは音響効果の付加といった処理を行う。例えば制御コマンドが楽音の発音を指示する内容であった場合には、発音指示された楽音の音色の波形データを波形メモリ105から読み出し、それに必要に応じた操作を施した後、D/A変換器107に出力する。D/A変換器107が音源LSI106から入力した波形データをアナログのオーディオ信号に変換し、音響増幅器108がそのオーディオ信号を増幅してスピーカー109に出力することにより、楽音がスピーカー109から発音されることになる。
【0028】
反対に、自動演奏を現在行っていると判定した場合には、CPU101は、演奏データの処理を中止することで自動演奏をストップさせる。音源LSI106に対しては、例えば発音中の全楽音の消音を指示する制御コマンドを送出して、スピーカー109から楽音が発音されるのを止めさせる。
【0029】
自動演奏は、基本的に、ユーザがテンポボタンを介して指定したテンポ値で行われる。しかし、ユーザがテンポ抽出モードを選択している状態で自動演奏の実行を指示、即ちスタート/ストップスイッチを操作した場合には、CPU101は以下のようにしてテンポ値を変更する。そのテンポ値の変更方法について、図2及び図3を参照して説明する。
【0030】
図2は、発光部111(LED110)、及び受光部114(フォトセンサ113)の駆動タイミングを説明する図である。
図2において、発光タイミングは、CPU101がドライバ回路112に発光信号を出力するタイミングと一致し、有効受光タイミングは、A/D変換器115が受光部114のフォトセンサ113の信号出力をサンプリングしたなかで、CPU101がテンポ値の変更を有効とするタイミングのことである。図2中に示す線は、それぞれ、一つのタイミングを表している。有効受光タイミングでは、拍の頭と一致するタイミングを太線で表している。
【0031】
本実施の形態では、発光部111(LED110)を短く一定の時間間隔で駆動している。具体的には、1拍当たり48回駆動している。このように発光部111(LED110)を駆動(発光)させるのに対し、A/D変換器115の出力は、図2に示すように、基本的には発光部111の発光タイミングに合わせて有効とするが、拍を変化の周期として、有効とするタイミングの間隔を変化させている。具体的には、拍の頭の近傍では他の部分よりも大きな間隔でタイミングを有効としている。それにより、例えば2拍目の頭の近傍では、小節の頭を基準に発光部111の駆動回数で表現すると、43、45〜47、49〜51、及び53回目に発光部111が駆動するタイミングではA/D変換器115の出力を有効としないようにしている。なお、A/D変換器115の出力を有効とするタイミングは、以降も小節の頭を基準にした発光部111の駆動回数で表現することにする。
【0032】
CPU101は、テンポ値を変更するためのテンポ情報を、ユーザが動かす反射物120をフォトセンサ113で検出してから再び検出するまでの時間間隔を計時することで取得する。その時間間隔の計時は、有効受光タイミングを考慮しつつ行う。それにより、有効としていないタイミングでフォトセンサ113が反射物120を検出すると、そのタイミングの近傍の有効としているタイミングで反射物120を検出したとしてテンポ情報を抽出する。このようにして取得したテンポ情報は、ユーザが新たに指定した1拍の時間間隔であるとして、テンポ値を変更する。
【0033】
上述したようにして変更したテンポ値は、直ちに自動演奏に反映させる。その場合、テンポの変更タイミングと反射物120の動きが連動(同期)していないとユーザに不自然な印象を与える。それを回避するために、拍を単位とした演奏の進行は、反射物120の検出に合わせて行うようにさせている。
【0034】
図3は、反射物120の検出タイミングを説明する図である。ユーザが反射物120として手を動かした場合を例にとって、有効受光タイミングと対応させて手を検出するタイミングを示したものである。比較のために、受光タイミングの時間間隔が短い従来例(以降、第1の従来例と呼ぶ)、及びその時間間隔が長い従来例(以降、第2の従来例と呼ぶ)の受光タイミングと手の検出タイミングも合わせて示している。この図3を参照して、反射物120(ここでは手)を検出するタイミング、及びそれの従来との相違について具体的に説明する。
【0035】
なお、図3において、(a)は第1の従来例の受光タイミング、(b)は第2の従来例の受光タイミング、(c)は本実施の形態の有効受光タイミング、(d)は反射物120である手の動き、(e)は第1の従来例での検出タイミング、(f)は第2の従来例での検出タイミング、(g)は本実施の形態での検出タイミングである。図2と同様に、図3(a)〜(c)で示す線は、それぞれ、受光タイミングを表し、太線は受光タイミングのなかで拍の頭と一致するタイミングを表す。その拍の頭のタイミングは、手を検出するタイミングに応じて変化するが、ここでは便宜上、そのことを無視して受光タイミングを示している。1〜4の数値は小節の先頭から何番目に位置する拍であるかを示す。
【0036】
図3に示すように、拍の頭と一致するタイミングでユーザが手を検出できる位置(以降、検出可能位置と呼ぶ)に移動させた場合、第1及び第2の従来例、本実施の形態ともにそのタイミングで手を検出する。しかし、検出可能位置に手を移動させるタイミングが僅かでも遅れると、受光タイミングの時間間隔が短い第1の従来例では、そのタイミングで手を検出する。これに対し、第2の従来例と本実施の形態では、拍(3拍目である)の頭のタイミングで手を検出する。手を検出してから再び手を検出するまでの時間間隔(以降、拍間隔と呼ぶ)は、第1の従来例では時間aとなるのに対し、第2の従来例および本実施の形態では時間bとなる。
【0037】
人間が手(反射物120)を動かしている以上、多少のズレがどうしても存在する。そのズレは、テンポ値の変更を意志していなくても生じる。このことは、それまでのテンポ値を僅かに変えるような変化が手の動きにあっても、その手の動きの変化をユーザがテンポの変更を意図して行うことは少ないということを意味する。第1の従来例では、そのズレを検出してテンポ情報の変化として扱われるため、一定のテンポを維持することが非常に困難である。これに対し、本実施の形態では、結果としてそのようなズレを無視するため、ユーザの意図しないテンポの変更を回避して、一定のテンポを容易に維持することができる。
【0038】
一方、拍の頭の近傍でないタイミングでユーザが手を検出可能位置に移動させた場合には、第1の従来例および本実施の形態ではそのタイミングで手を検出するのに対し、第2の従来例では、そのタイミングから遅れて手を検出する。
【0039】
拍の頭の近傍でないタイミングで手を検出したということは、検出可能位置にあった手を移動させて再び検出可能位置に移動させるまでの時間間隔をユーザが比較的に大きく変化させたことを意味する。従って、その手の動きの変化をユーザがテンポの変更を意図して行った可能性が非常に高いと云える。第2の従来例では、基本的に手の動きを高精度に検出できないため、ユーザが所望するテンポ値を設定することができない。これに対し、本実施の形態では、そのような手の動きは有効受光タイミングの時間間隔が短い期間で検出するため、手の動きの変化を高精度に検出することができる。それにより、ユーザの所望するテンポ値も高精度に設定することができる。
【0040】
上記したように、拍の頭の近傍のタイミングでユーザが手を検出可能位置に移動させた場合、第1の従来例と第2の従来例および本実施の形態とで手を検出するタイミングが異なる。このため、手の動きの比較的大きな変化が生じると、拍間隔は第1及び第2の従来例、本実施の形態で全て異なってくる。第1の従来例では時間c、第2の従来例ではd、本実施の形態ではeとなる。このことから、第1及び第2の従来例では、本実施の形態のように、ユーザの意図に沿って所望のテンポ値に高精度に変更することができないことが分かる。
【0041】
次に、上述したCPU101の動作について、図4、図5、及び図7に示す各種動作フローチャート、及び図6に示す説明図を参照して詳細に説明する。
図4は、ユーザがスタート/ストップスイッチを操作して自動演奏の実行を指示した場合に実行されるタイマインタラプト処理の動作フローチャートである。図4を参照して、始めにその処理について詳細に説明する。
【0042】
なお、そのタイマインタラプト処理は、例えばCPU101内蔵のハードタイマから出力される割り込み信号によって所定の時間間隔毎に実行される処理である。CPU101は、その割り込み信号が出力された場合、それに対応するプログラムをROM102から読み出し、それに制御を移すことでタイマインタラプト処理を実行する。また、便宜上、ここでは、テンポ抽出モードが選択されたことを前提としてタイマインタラプト処理について説明することにする。1小節の拍数は4とする。
【0043】
上述したように、本実施の形態では、1/48拍の時間間隔で発光部111のLED110を発光させるようにしている。その時間間隔は、テンポ値に応じて変化する。タイマインタラプト処理は、所定の時間間隔毎に実行される。このことから、上記変数TEMPOVALUEには、タイマインタラプト処理の実行間隔を単位としたテンポ値に応じた値を代入させている。
【0044】
先ず、ステップ401では、その変数TEMPOVALUEの値と変数SKYの値が等しいか否か判定する。それら変数の値が等しい場合、その判定はYESとなってステップ402に移行する。そうでない場合には、その判定はNOとなってステップ409に移行する。
【0045】
上記変数SKYは、1/48拍の時間間隔を特定するためにタイマインタラプト処理の実行回数のカウント用に用意した変数である。ステップ402では、その変数SKYに0を代入する。このように変数SKYに0を代入することで、ステップ401では、1/48拍に対応する時間間隔毎にYESと判定することになる。
【0046】
ステップ402に続くステップ403では、小節単位で自動演奏を進行するために用意した変数Xの値をインクリメントする。それが終了した後、ステップ404に移行する。なお、その変数Xは、後述するように、有効受光タイミングを判別するために参照される。
【0047】
ステップ404では、変数Xの値が192(=48×4)と等しいか否か判定する。変数Xのカウント数は1拍当たりの48であることから、1小節の拍数が4のときには192となる。このため、1小節分のカウントを行った場合、その判定はYESとなり、ステップ405に移行して変数Xに0を代入した後、ステップ406に移行する。そうでない場合には、その判定はNOとなってステップ406に移行する。
【0048】
ステップ406では、時間データに従ってイベントデータを処理することにより自動演奏を行う自動演奏処理を実行する。続くステップ407では、発光部111のLED110を発光させる発光処理を実行する。それが終了した後、ステップ408に移行する。
【0049】
上記イベントデータの処理は、例えばCPU101が、それを音源LSI106に送出することで行われる。また、上記発光処理は、CPU101がドライバ回路112に発光信号を送出することで行われる。
【0050】
ステップ408では、A/D変換器115から受光部114のフォトセンサ113の受光量を表す値(受光値)を入力して、テンポ情報の抽出、更にはテンポ値の変更を行う受光処理を実行する。その後、一連の処理を終了する。
【0051】
一方、ステップ401の判定がNO、即ち変数SKYの値と変数TEMPOVALUEの値が異なる場合に移行するステップ409では、変数SKYの値をインクリメントする。そのインクリメントを行った後、上記ステップ408に移行する。
【0052】
このように、タイマインタラプト処理では、1/48拍に対応する時間間隔毎に、ステップ406の自動演奏処理、ステップ407の発光処理を実行するようになっている。そのため、自動演奏は、設定されているテンポ値で行われることになり、LED110は1/48拍の時間間隔毎に発光することになる。
【0053】
図5は、上記ステップ408として実行される受光処理の動作フローチャートであり、図6は、テンポ情報の抽出方法を説明するための図である。次に、図5、及び図6を参照して、受光処理について詳細に説明する。
【0054】
始めに、受光処理で行われるテンポ情報の抽出について、図6を参照して説明する。
図6において、縦軸はA/D変換器115の出力値、横軸は時間であり、グラフはA/D変換器115の出力値の時間変化を示している。縦軸に示すA、及びBは、予め定めた閾値である。具体的には、閾値Aは、フォトセンサ113が反射物120を検出したか否かを判定するために定めた閾値であり、閾値Bは、反射物120が移動してフォトセンサ113により検出されなくなったか否か判定するために定めた閾値である。
【0055】
テンポ情報は、基本的に、反射物120を検出してからそれを再び検出するまでの時間間隔を計時して取得するようになっている。その時間間隔を計時するために、本実施の形態では、変数ONFLAGを用意している。その変数ONFLAGは、A/D変換器115の出力値が閾値Aより大きくなるとセット、即ち1を代入し、その出力値が閾値Bより小さくなるとリセット、即ち0を代入している。
【0056】
変数ONFLAGを上記したタイミングでリセットするのは、次にA/D変換器115の出力値が閾値Aより大きくなったときにセットできるようにするためである。そのように変数ONFLAGのセットやリセットを行うことで、本実施の形態では、変数ONFLAGをセットしてから次にセットするまでの期間を計時してテンポ情報を取得するようにしている。
【0057】
図5に示す受光処理の説明に移る。
先ず、ステップ501では、A/D変換器115の出力値を取り込んで、それを変数Yに代入する。続くステップ502では、その変数Yの値が、閾値Aより大きいか否か判定する。その閾値Aよりも変数Yの値が大きかった場合、即ち反射物120が検出可能位置に移動してフォトセンサ113がそれを検出したような場合、その判定はYESとなってステップ503に移行する。そうでない場合には、その判定はNOとなってステップ507に移行する。
【0058】
ステップ503では、変数ONFLAGの値が1か否か判定する。その変数ONFLAGに1が代入されていた場合、その判定はYESとなってステップ509に移行し、そうでない場合には、その判定はNOとなってステップ504に移行する。
【0059】
ステップ504では、変数ONFLAGに1を代入する。変数ONFLAGをセットすることは、反射物120の検出に伴ってテンポ情報が取得されたことを意味する。このため、続くステップ505では、その取得したテンポ情報、及び有効受光タイミングに基づきテンポ値を変更する間引き処理を実行する。それが終了すると、ステップ506に移行し、テンポ情報取得用、即ち反射物120の検出間隔を計時するために用意した変数COUNTERに0を代入した後、一連の処理を終了する。
【0060】
一方、ステップ502の判定がNO、即ちA/D変換器115の出力値が閾値A以下と判定した場合に移行するステップ507では、その出力値が閾値Bより小さいか否か判定する。反射物120が検出可能位置から離れてフォトセンサ113の受光量が減少した、或いは小さい場合、A/D変換器115の出力値は閾値Bより小さくなることから、その判定はYESとなり、ステップ508に移行して変数ONFLAGをリセットした後、ステップ509に移行する。そうでない場合には、その判定はNOとなってステップ509に移行する。
【0061】
ステップ509では、変数COUNTERの値をインクリメントする。そのインクリメントを行った後、一連の処理を終了する。
受光処理では、A/D変換器115の出力値が閾値Aより大きくなって変数ONFLAGをセットする場合を除き、その処理を実行する度に変数COUNTERの値をインクリメントするようになっている。それにより、変数COUNTERには、受光処理の実行間隔、即ち図4に示すタイマインタラプト処理の実行間隔を単位として、変数ONFLAGがセットされてから再びセットされるまでの期間を表す値が代入されることになる。
【0062】
図7は、上記ステップ505として実行される間引き処理の動作フローチャートである。次に、図7を参照して、間引き処理について詳細に説明する。
本実施の形態では、上述したように、拍の頭の近傍では有効受光タイミングの時間間隔を比較的に大きくし、その間で反射物120を検出した場合には、その検出したタイミングは無視し、それの近傍の有効受光タイミング(ここでは、拍の頭のタイミング)で検出したとしてテンポ値の変更を行っている。反射物120を検出したタイミングが有効受光タイミングか否かは、変数Xの値を参照して判定している。このことから、間引き処理は、変数Xの値に応じてテンポ値の変更を行うようになっている。
【0063】
先ず、ステップ701では、変数Xの値が0以上6未満か否か判定する。変数Xの値がその間の値であった場合、その判定はYESとなってステップ702に移行し、そうでない場合には、その判定はNOとなってステップ703に移行する。
【0064】
ステップ702では、変数Xの値が0、或いは4か否か、即ち変数Xの値が有効受光タイミングを表しているか否か判定する。有効受光タイミングでフォトセンサ113が反射物120を検出した場合、即ちA/D変換器115の出力値が閾値Aより大きくなった場合、その判定はYESとなってステップ711に移行し、そうでない場合には、その判定はNOとなって一連の処理を終了する。
【0065】
ステップ703〜710では、上記と同様にして、有効受光タイミングでフォトセンサ113が反射物120を検出したか否か判定し、その有効受光タイミングでフォトセンサ113が反射物を検出したと判定した場合には、ステップ711に移行する。そうでない場合には、テンポ値、即ち変数TEMPOVALUEの値を変更することなく一連の処理を終了する。
【0066】
そのステップ711では、変数TEMPOVALUEに、変数COUNTERの値を48で割って得られる値を代入する。それにより、テンポ値を変更する。その後、一連の処理を終了する。
【0067】
図8は、テンポ変更例を説明する図である。上述したようにして行われるテンポ値の変更によって、反射物120を検出するタイミングに応じて拍の時間間隔が変化する様子を有効受光タイミングで表したものである。図中の「受光あり」は、反射物120を検出したタイミング、即ちA/D変換器115の出力値が閾値Aより大きくなったタイミングを示している。1〜4の数値は、小節の先頭から何番目に位置した拍であるかを示す。
【0068】
図8に示すように、2拍目の頭のタイミングとなるまえに反射物120を検出した場合、その反射物120を検出したタイミング以降は、時間fが1拍の演奏期間となるようにテンポが変更される。1拍の残りの部分を変更後のテンポで経過する時間となると、2拍目の演奏に移行するが、その3拍目の頭のタイミングで反射物120が検出されたため、その検出によるテンポ値の変更は回避されている。それにより、2拍目の演奏期間は、時間fとなっている。
【0069】
なお、本実施の形態では、テンポ値の変更は速くなるほうのみを想定しているが、遅くなるほうのみを想定してテンポ値を変更するようにしても良い。当然のことながら、そのどちらにもテンポ値を変更できるようにしても良い。
【0070】
また、本実施の形態では、図8に示すように、反射物120を検出したタイミングでテンポ値のみを変更するようにしているが、テンポ値を変更する場合には、図9に示すように、必要に応じて拍単位で自動演奏を進行させるようにしても良い。
【0071】
有効受光タイミングは、図2に示すように、本実施の形態では、拍の頭の近傍では粗く、それ以外では密としているが、微妙なテンポ値の変更を可能とするために、その逆としても良い。即ち拍の頭の近傍では密に、それ以外では粗くするようにしても良い。その有効受光タイミングは、本実施の形態ではプログラム中のデータから判別するようにしているが、幾つか有効受光タイミングのパターンを制御データとしてROM102に用意しておき、そのなかからユーザが所望するパターンを選択させるようにしても良い。電池等を電源とする装置に対応するために、全体としてタイミングの時間間隔が異なるパターンを複数用意し、そのなかから電源の電圧に応じてパターンを自動的に選択するようにしても良い。
【0072】
本実施の形態では、有効受光タイミングではないタイミングでもLED110やフォトセンサ113の駆動(A/D変換器115の出力値の読み込み)を行っているが、有効受光タイミングでのみそれらを駆動するようにしても良い。何れにしても、有効受光タイミングで反射物120を検出した場合にのみ、テンポ値の変更を行うようにしていれば良い。
【0073】
また、本実施の形態によるテンポ制御装置は、自動演奏装置に搭載させているが、搭載できる装置は自動演奏装置に限定されるものではない。電子楽器やコントローラ、シンセサイザ等に幅広く搭載させることができる。反射物120を検出する機能を既に備えたテンポ制御装置には、基本的に、上述したような動作を実現させるプログラムを搭載させるだけで本発明を適用させることができる。
【0074】
【発明の効果】
以上、説明したように本発明は、物体を検出するタイミングの時間間隔に変化を設け、そのタイミングで物体を検出した場合に、そのタイミングに基づいてテンポ値の変更を行う。このため、ユーザの意図に反するテンポ値の変更は回避しつつ、意図したテンポ値の変更は高精度に行うことができる。
【図面の簡単な説明】
【図1】本実施の形態によるテンポ制御装置を搭載した自動演奏装置の回路構成図である。
【図2】発光部、及び受光部の駆動タイミングを説明する図である。
【図3】反射物の検出タイミングを説明する図である。
【図4】タイマインタラプト処理の動作フローチャートである。
【図5】受光処理の動作フローチャートである。
【図6】テンポ情報の抽出方法を説明するための図である。
【図7】間引き処理の動作フローチャートである。
【図8】テンポ変更例を説明する図である。
【図9】他の実施の形態におけるテンポ変更方法を説明する図である。
【符号の説明】
101 CPU
102 ROM
103 RAM
104 操作子群
105 波形メモリ
106 音源LSI
110 LED
111 発光部
112 ドライバ回路
113 フォトセンサ
114 受光部
115 A/D変換器
120 反射物
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a technique for changing the tempo (value) by detecting the movement of an object (for example, a hand) that a user moves.
[0002]
[Prior art]
At present, automatic performance apparatuses are widely used not only as dedicated apparatuses but also in musical sound generation apparatuses such as electronic musical instruments, synthesizers, and controllers. The automatic performance device is a device that performs performance (used in the sense including accompaniment) by processing performance data, and the performance is performed at a set tempo. The tempo control device is mounted on such an automatic performance device as a device for allowing the user to set an arbitrary tempo value.
[0003]
Many of the tempo control devices employ a method in which a user directly designates a tempo value by operating a switch or the like as a method for causing a user to designate a newly set tempo value. However, some tempo control devices employ a method in which a user specifies a tempo value by moving an object (for example, a hand). In this method, information specifying the tempo value is extracted from the movement of the object, so that it is hereinafter referred to as a tempo extraction method for convenience. The information specifying the tempo value is hereinafter referred to as tempo information for convenience.
[0004]
A tempo control apparatus that employs a tempo extraction method is provided with a light source such as an LED (light emitting diode) and a photosensor, for example, in order to detect the movement of an object moved by a user. The tempo control device uses them to extract tempo information as follows, for example.
[0005]
The photosensor is used to receive light emitted from a light source or light reflected from an object. By causing the photosensor to receive any of such light, it is determined whether or not the object is present at a position detected by the photosensor from the amount of received light.
[0006]
When the user is moving the object, the determination result of the presence / absence of the object based on the amount of light received by the photosensor is alternately changed from “Yes” to “No” and “No to Yes”. Focusing on this, a time interval at which the determination result changes, for example, a time interval (period) from when it is determined to be present until it is determined again to be present is measured, and the time interval measured is extracted as tempo information. The tempo value to be newly set is determined based on the tempo information extracted in this way.
[0007]
[Problems to be solved by the invention]
In a tempo control device that employs the tempo extraction method, the light source must be driven in order for the photosensor to receive the light emitted from the light source or the reflected light. The light source is normally intermittently driven in order to reduce power consumption and avoid the influence of ambient light such as an electric lamp.
[0008]
The conventional tempo control device performs the intermittent drive by driving the light source every time a predetermined time interval elapses, and samples (detects) the amount of light received by the photosensor at the timing of driving the light source. The tempo was changed based on the amount of light received. Therefore, there are the following problems depending on the time interval for driving the light source.
[0009]
When the time interval is set to be relatively long, the timing for detecting the movement of the object is delayed as a whole, and the accuracy of extracting tempo information decreases. For this reason, there is a problem that the tempo value desired by the user cannot be set with high accuracy.
[0010]
On the other hand, when the time interval is set to be relatively short, a slight movement such as a shake of an object is detected, and the tempo value is changed regardless of the user's intention.
[0011]
Thus, in any conventional tempo control device, it is difficult to change the tempo value as intended by the user. For this reason, it has been strongly desired to avoid these problems together.
[0012]
An object of the present invention is to provide a tempo control device capable of changing to a desired tempo value with high accuracy in accordance with a user's intention.
[0013]
[Means for Solving the Problems]
A tempo control device according to the present invention is mounted on an automatic performance device, and is based on the premise that the automatic performance device controls the value of a tempo at which automatic performance is performed. Tempo changing means for changing the tempo value based on the movement of the object detected by the detecting means, and control means for causing the movement detecting means to detect the object by changing the time interval at which the motion detecting means detects the object; Are provided.
[0014]
In the above configuration, it is desirable that the control means changes the time interval with a predetermined performance unit as a cycle. In addition, it is desirable that the control means lengthens the time interval of the period positioned at the beginning of the performance unit and the period positioned at the end compared to the time intervals of other periods. The performance unit is preferably a beat.
[0015]
In the present invention, a change is made in the time interval of the timing for detecting an object, and when an object is detected at that timing, the tempo value is changed based on that timing.
[0016]
By providing a change in the time interval, the accuracy with which an object is detected within a certain period is changed. For this reason, by adjusting the time interval according to the required accuracy, the change of the tempo value against the user's intention can be avoided, and the intended change of the tempo value can be performed with high accuracy.
[0017]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a circuit configuration diagram of an automatic performance device equipped with a tempo control device according to the present embodiment.
[0018]
As shown in FIG. 1, the automatic performance apparatus includes a CPU 101 that controls the entire apparatus, a ROM 102 that stores programs, performance data (sequence data) for automatic performance, various control data, and the like. RAM 103, operator group 104 consisting of various operators, waveform memory 105 storing waveform data of various musical sounds, and reading out the waveform data from the waveform memory 105 in accordance with instructions from the CPU 101, and performing necessary processing thereon. A sound source LSI 106 to be output, a D / A converter 107 that D / A converts the waveform data output from the sound source LSI 106 and outputs an analog audio signal, an acoustic amplifier 108 that amplifies the audio signal, and an acoustic amplifier 108 Speaker 109 that inputs output audio signal and emits musical sound A light-emitting unit 111 having an LED 110 as a light source that emits light, a driver circuit 112 that performs current (or voltage) amplification of a signal (light-emitting signal) sent from the CPU 101, and outputs and amplifies it to the light-emitting unit 111; A light receiving unit 114 having a photosensor (photodiode) 113, and an A / D converter 115 for A / D converting the light reception signal output from the light receiving unit 114 and outputting the digital value thereof. ing.
[0019]
The operator group 104 includes various operators and a circuit that detects their operation state. The detection circuit detects the operation state of each operation element by scanning, for example, and sends the detection result to the CPU 101 as operation information for each operation element. Although not shown in the figure, the operation element is not particularly shown. A start / stop switch for instructing start or stop of automatic performance (including automatic accompaniment in this case), a plurality of numeric keys for designating a song to be automatically performed, and a tempo A tempo button for designating a value, a mode switch for selecting one of the modes prepared in advance, and the like are provided. The light emitting unit 111 (LED 110) and the light receiving unit 114 are driven during automatic performance when a predetermined mode is selected by the mode switch. The predetermined mode is hereinafter referred to as a tempo extraction mode for convenience.
[0020]
The photo sensor 113 is arranged in a line with the LED 110 of the light emitting unit 111. Thereby, the photosensor 113 receives light emitted from the LED 110 and reflected by the reflector 120. Thus, the user designates the tempo by moving the reflector 120 along the optical path of the light emitted from the LED 110 or in the crossing direction of the optical path (usually reciprocating movement). The reflector 120 is specifically a user's hand or a command stick.
[0021]
The operation of the above configuration will be described.
In particular, when the power is turned on by operating a power switch (not shown), the CPU 101 reads out and executes a program stored in the ROM 102 to start control of the entire apparatus. The control is performed in accordance with a user operation on the operator group 104 while using the RAM 103 for work.
[0022]
In order to detect a user operation performed on each operation element, the CPU 101 sends a control command to the detection circuit of the operation element group 104, causes the detection circuit to scan each operation element, and the scan result (each Operation information indicating the operation state of the operator) is received. By analyzing the scanning result (operation information), the operation element whose state has changed and the content of the change are determined. The above control is performed according to the function assigned to the operator and the contents of change.
[0023]
For example, when it is determined that the numeric key, the tempo button, or the mode switch is operated as a result of analyzing the scanning result, the CPU 101 determines the value of the variable stored in the RAM 103 according to the type of the operator that is determined to be operated. Rewrite. As a result, the music to be played automatically, the tempo value are changed, and the mode is switched. At this time, if the tempo value is changed, the value for automatic performance execution corresponding to the changed tempo value is substituted for the variable TEMPOVALUE referred to when the automatic performance is executed.
[0024]
On the other hand, if it is determined that the start / stop switch has been operated, the CPU 101 sets a value of a variable (hereinafter referred to as an automatic performance flag for convenience) for managing whether or not automatic performance is being performed, for example. rewrite. Thus, for example, if the previous value is 1, it is changed to 0, and if the previous value is 0, it is changed to 1. Based on the value of the automatic performance flag after such rewriting, it is determined whether or not automatic performance is currently being performed, and the following control is performed according to the determination result.
[0025]
Note that the performance data to be processed to perform the automatic performance is configured by adding time data indicating the timing at which the performance data is to be processed to event data indicating the content of the event on performance, for example.
[0026]
If it is determined that the automatic performance is not currently being performed, the CPU 101 refers to the variable stored in the RAM 103 and reads the performance data of the music designated by the user from the ROM 102. Thereafter, for example, the event data in the performance data read from the ROM 102 is sent as a control command to the tone generator LSI 106 in accordance with the time data added thereto, thereby executing the automatic performance.
[0027]
The tone generator LSI 106 performs processing such as output of waveform data, change of timbre, or addition of an acoustic effect according to the contents instructed by the control command. For example, if the control command has a content for instructing the pronunciation of a musical tone, the waveform data of the tone color of the musical tone instructed to be reproduced is read from the waveform memory 105 and subjected to a necessary operation, and then D / A conversion is performed. Output to the unit 107. The D / A converter 107 converts the waveform data input from the sound source LSI 106 into an analog audio signal, and the acoustic amplifier 108 amplifies the audio signal and outputs the amplified audio signal to the speaker 109. It will be.
[0028]
On the other hand, if it is determined that the automatic performance is currently being performed, the CPU 101 stops the automatic performance by stopping the processing of the performance data. For example, a control command for instructing mute of all the musical tones being generated is sent to the tone generator LSI 106 to stop the musical sound from being produced from the speaker 109.
[0029]
The automatic performance is basically performed at the tempo value designated by the user via the tempo button. However, when the user instructs execution of automatic performance with the tempo extraction mode selected, that is, when the start / stop switch is operated, the CPU 101 changes the tempo value as follows. A method for changing the tempo value will be described with reference to FIGS.
[0030]
FIG. 2 is a diagram illustrating the drive timing of the light emitting unit 111 (LED 110) and the light receiving unit 114 (photo sensor 113).
In FIG. 2, the light emission timing coincides with the timing at which the CPU 101 outputs a light emission signal to the driver circuit 112, and the effective light reception timing is obtained when the A / D converter 115 samples the signal output of the photosensor 113 of the light receiving unit 114. The timing at which the CPU 101 validates the change of the tempo value. Each line shown in FIG. 2 represents one timing. In the effective light reception timing, the timing that coincides with the beginning of the beat is indicated by a bold line.
[0031]
In the present embodiment, the light emitting unit 111 (LED 110) is driven short and at constant time intervals. Specifically, it is driven 48 times per beat. While the light emitting unit 111 (LED 110) is driven (emitted) in this way, the output of the A / D converter 115 is basically effective in accordance with the light emission timing of the light emitting unit 111 as shown in FIG. However, the effective timing interval is changed with the beat as the period of change. Specifically, the timing is effective at a larger interval in the vicinity of the head of the beat than in other portions. Accordingly, for example, in the vicinity of the head of the second beat, when expressed by the number of times of driving of the light emitting unit 111 with reference to the head of the bar, the timing at which the light emitting unit 111 is driven at the 43rd, 45th to 47th, 49th to 51st and 53rd times. Then, the output of the A / D converter 115 is not validated. Note that the timing at which the output of the A / D converter 115 is validated will be expressed by the number of times the light emitting unit 111 is driven based on the head of the measure.
[0032]
The CPU 101 acquires tempo information for changing the tempo value by measuring the time interval from when the reflective object 120 moved by the user is detected by the photo sensor 113 until it is detected again. The time interval is measured in consideration of the effective light reception timing. As a result, when the photo sensor 113 detects the reflecting object 120 at a timing that is not valid, the tempo information is extracted based on the assumption that the reflecting object 120 is detected at a timing near the timing. The tempo information obtained in this way changes the tempo value assuming that the time interval is one beat newly designated by the user.
[0033]
The tempo value changed as described above is immediately reflected in the automatic performance. In that case, if the change timing of the tempo and the movement of the reflector 120 are not linked (synchronized), an unnatural impression is given to the user. In order to avoid this, the progress of performance in units of beats is performed in accordance with the detection of the reflector 120.
[0034]
FIG. 3 is a diagram for explaining the detection timing of the reflector 120. For example, when the user moves his / her hand as the reflector 120, the timing for detecting the hand in correspondence with the effective light reception timing is shown. For comparison, the light receiving timing and the hand of the conventional example with a short time interval of light reception timing (hereinafter referred to as the first conventional example) and the conventional example with a long time interval (hereinafter referred to as the second conventional example). The detection timing is also shown. With reference to this FIG. 3, the timing which detects the reflector 120 (here hand), and its difference with the past are demonstrated concretely.
[0035]
In FIG. 3, (a) is the light reception timing of the first conventional example, (b) is the light reception timing of the second conventional example, (c) is the effective light reception timing of this embodiment, and (d) is the reflection. (E) is a detection timing in the first conventional example, (f) is a detection timing in the second conventional example, and (g) is a detection timing in the present embodiment. . Similar to FIG. 2, the lines shown in FIGS. 3A to 3C represent the light reception timing, and the thick line represents the timing coincident with the beginning of the beat in the light reception timing. The timing of the beginning of the beat changes according to the timing of detecting the hand, but here, for convenience, the light reception timing is shown ignoring this. The numbers 1 to 4 indicate the number of beats positioned from the beginning of the measure.
[0036]
As shown in FIG. 3, when the user moves his / her hand to a position where the hand can be detected at a timing coincident with the head of the beat (hereinafter referred to as a detectable position), the first and second conventional examples and the present embodiment Both detect the hand at that timing. However, if the timing of moving the hand to the detectable position is slightly delayed, the first conventional example with a short time interval of the light receiving timing detects the hand at that timing. In contrast, in the second conventional example and the present embodiment, the hand is detected at the timing of the head of the beat (which is the third beat). The time interval from detection of a hand to detection of a hand again (hereinafter referred to as a beat interval) is time a in the first conventional example, whereas in the second conventional example and this embodiment, the time interval is a. Time b is reached.
[0037]
As long as the human moves the hand (reflecting object 120), there is inevitably some deviation. The deviation occurs even if the user does not intend to change the tempo value. This means that even if there is a change in the hand movement that slightly changes the tempo value until then, the user rarely changes the movement of the hand with the intention of changing the tempo. . In the first conventional example, the deviation is detected and treated as a change in tempo information, so it is very difficult to maintain a constant tempo. On the other hand, in the present embodiment, since such a shift is ignored as a result, a tempo change unintended by the user can be avoided and a constant tempo can be easily maintained.
[0038]
On the other hand, when the user moves the hand to a detectable position at a timing that is not in the vicinity of the head of the beat, the second conventional example and the present embodiment detect the hand at that timing, whereas the second In the conventional example, the hand is detected with a delay from the timing.
[0039]
The fact that the hand is detected at a timing that is not in the vicinity of the head of the beat means that the user has changed the time interval from moving the hand that was at the detectable position to the detectable position again relatively large. means. Therefore, it can be said that there is a high possibility that the user has made a change in the movement of the hand with the intention of changing the tempo. In the second conventional example, basically, the hand movement cannot be detected with high accuracy, and therefore the tempo value desired by the user cannot be set. On the other hand, in the present embodiment, such a hand movement is detected in a period in which the time interval of the effective light reception timing is short, so that a change in the hand movement can be detected with high accuracy. Thereby, the tempo value desired by the user can be set with high accuracy.
[0040]
As described above, when the user moves the hand to a detectable position at a timing near the head of the beat, the timing for detecting the hand in the first conventional example, the second conventional example, and the present embodiment is as follows. Different. For this reason, when a relatively large change in hand movement occurs, the beat intervals are all different between the first and second conventional examples and the present embodiment. The time is c in the first conventional example, d in the second conventional example, and e in the present embodiment. From this, it can be seen that the first and second conventional examples cannot be changed to a desired tempo value with high accuracy according to the user's intention as in the present embodiment.
[0041]
Next, the operation of the CPU 101 described above will be described in detail with reference to various operation flowcharts shown in FIGS. 4, 5, and 7 and an explanatory diagram shown in FIG.
FIG. 4 is an operation flowchart of timer interrupt processing executed when the user operates the start / stop switch to instruct execution of automatic performance. With reference to FIG. 4, the process will be described in detail first.
[0042]
The timer interrupt process is a process executed at predetermined time intervals by an interrupt signal output from a hard timer built in the CPU 101, for example. When the interrupt signal is output, the CPU 101 reads out a program corresponding to the interrupt signal from the ROM 102 and transfers control to it to execute a timer interrupt process. For convenience, the timer interrupt process will be described here on the assumption that the tempo extraction mode is selected. The number of beats in one measure is 4.
[0043]
As described above, in the present embodiment, the LED 110 of the light emitting unit 111 is caused to emit light at a time interval of 1/48 beats. The time interval changes according to the tempo value. The timer interrupt process is executed at predetermined time intervals. For this reason, the variable TEMPOVALUE is substituted with a value corresponding to the tempo value with the execution interval of the timer interrupt process as a unit.
[0044]
First, in step 401, it is determined whether or not the value of the variable TEMPOVALUE is equal to the value of the variable SKY. If the values of these variables are equal, the determination is yes and the process moves to step 402. Otherwise, the determination is no and the process moves to step 409.
[0045]
The variable SKY is a variable prepared for counting the number of times of execution of the timer interrupt process in order to specify a time interval of 1/48 beats. In step 402, 0 is substituted for the variable SKY. By substituting 0 for the variable SKY in this way, in step 401, YES is determined for each time interval corresponding to 1/48 beats.
[0046]
In step 403 following step 402, the value of the variable X prepared to advance the automatic performance in units of measures is incremented. After that is completed, the process proceeds to step 404. The variable X is referred to in order to determine the effective light reception timing, as will be described later.
[0047]
In step 404, it is determined whether or not the value of the variable X is equal to 192 (= 48 × 4). Since the count number of the variable X is 48 per beat, it becomes 192 when the beat number of one measure is four. For this reason, when counting for one measure is performed, the determination is YES, the process proceeds to step 405, and 0 is substituted for the variable X, and then the process proceeds to step 406. Otherwise, the determination is no and the process moves to step 406.
[0048]
In step 406, automatic performance processing is performed for performing automatic performance by processing event data in accordance with time data. In the subsequent step 407, a light emission process for causing the LED 110 of the light emitting unit 111 to emit light is executed. After that is completed, the process proceeds to step 408.
[0049]
The event data is processed by, for example, the CPU 101 sending it to the sound source LSI 106. The light emission process is performed by the CPU 101 sending a light emission signal to the driver circuit 112.
[0050]
In step 408, a value (light reception value) indicating the amount of light received by the photosensor 113 of the light receiving unit 114 is input from the A / D converter 115, and light reception processing for extracting tempo information and further changing the tempo value is executed. To do. Thereafter, the series of processing is terminated.
[0051]
On the other hand, when the determination in step 401 is NO, that is, when the value of the variable SKY is different from the value of the variable TEMPOVALUE, the value of the variable SKY is incremented in step 409. After the increment, the process proceeds to step 408.
[0052]
As described above, in the timer interrupt process, the automatic performance process in step 406 and the light emission process in step 407 are executed for each time interval corresponding to 1/48 beats. Therefore, the automatic performance is performed at the set tempo value, and the LED 110 emits light at a time interval of 1/48 beats.
[0053]
FIG. 5 is an operation flowchart of the light receiving process executed as step 408, and FIG. 6 is a diagram for explaining a method for extracting tempo information. Next, the light receiving process will be described in detail with reference to FIGS. 5 and 6.
[0054]
First, extraction of tempo information performed in the light receiving process will be described with reference to FIG.
In FIG. 6, the vertical axis represents the output value of the A / D converter 115, the horizontal axis represents time, and the graph shows the time change of the output value of the A / D converter 115. A and B shown on the vertical axis are predetermined threshold values. Specifically, the threshold A is a threshold determined to determine whether or not the photosensor 113 has detected the reflecting object 120, and the threshold B is detected by the photosensor 113 as the reflecting object 120 moves. This is a threshold value that is set to determine whether or not it has disappeared.
[0055]
The tempo information is basically obtained by measuring the time interval from when the reflector 120 is detected until it is detected again. In this embodiment, a variable ONFLAG is prepared in order to measure the time interval. The variable ONFLAG is set when the output value of the A / D converter 115 becomes larger than the threshold A, that is, 1 is substituted, and when the output value becomes smaller than the threshold B, it is reset, that is, 0 is substituted.
[0056]
The reason why the variable ONFLAG is reset at the timing described above is to allow the variable ONFLAG to be set when the output value of the A / D converter 115 becomes larger than the threshold value A next time. In this embodiment, the variable ONFLAG is set or reset in such a manner, so that the tempo information is acquired by measuring the period from setting the variable ONFLAG to the next setting.
[0057]
Turning to the description of the light receiving process shown in FIG.
First, in step 501, the output value of the A / D converter 115 is fetched and substituted into the variable Y. In the subsequent step 502, it is determined whether or not the value of the variable Y is larger than the threshold value A. If the value of the variable Y is larger than the threshold A, that is, if the reflector 120 moves to a detectable position and the photo sensor 113 detects it, the determination is YES and the process proceeds to step 503. . Otherwise, the determination is no and the process moves to step 507.
[0058]
In step 503, it is determined whether the value of the variable ONFLAG is 1. If 1 is assigned to the variable ONFLAG, the determination is YES and the process proceeds to step 509. Otherwise, the determination is NO and the process proceeds to step 504.
[0059]
In step 504, 1 is substituted into the variable ONFLAG. Setting the variable ONFLAG means that tempo information has been acquired as the reflector 120 is detected. For this reason, in the subsequent step 505, a thinning process for changing the tempo value based on the acquired tempo information and the effective light reception timing is executed. When this is completed, the process proceeds to step 506, where 0 is substituted into a variable COUNTER prepared for acquiring tempo information, that is, for measuring the detection interval of the reflecting object 120, and then a series of processing ends.
[0060]
On the other hand, if the determination in step 502 is NO, that is, if it is determined that the output value of the A / D converter 115 is equal to or less than the threshold value A, it is determined whether or not the output value is smaller than the threshold value B. If the amount of light received by the photosensor 113 decreases or is small due to the reflection object 120 moving away from the detectable position, the output value of the A / D converter 115 becomes smaller than the threshold value B, so that determination is YES and step 508 Then, the process proceeds to step 509 after resetting the variable ONFLAG. Otherwise, the determination is no and the process moves to step 509.
[0061]
In step 509, the value of the variable COUNTER is incremented. After the increment, a series of processing is terminated.
In the light receiving process, the value of the variable COUNTER is incremented every time the process is executed, except when the output value of the A / D converter 115 is larger than the threshold value A and the variable ONFLAG is set. As a result, the variable COUNTER is assigned a value representing the period from when the variable ONFLAG is set to when it is set again, with the execution interval of the light receiving process, that is, the execution interval of the timer interrupt process shown in FIG. It will be.
[0062]
FIG. 7 is an operation flowchart of the thinning process executed as step 505. Next, the thinning process will be described in detail with reference to FIG.
In the present embodiment, as described above, the time interval of the effective light reception timing is relatively large in the vicinity of the head of the beat, and when the reflector 120 is detected in the meantime, the detected timing is ignored, The tempo value is changed as detected at the effective light reception timing (here, the timing of the beginning of the beat) in the vicinity thereof. It is determined with reference to the value of the variable X whether or not the timing at which the reflector 120 is detected is the effective light reception timing. For this reason, the thinning-out process changes the tempo value according to the value of the variable X.
[0063]
First, in step 701, it is determined whether the value of the variable X is 0 or more and less than 6. If the value of the variable X is a value in the meantime, the determination is YES and the process proceeds to step 702. Otherwise, the determination is NO and the process proceeds to step 703.
[0064]
In step 702, it is determined whether or not the value of the variable X is 0 or 4, that is, whether or not the value of the variable X represents an effective light reception timing. When the photosensor 113 detects the reflecting object 120 at the effective light reception timing, that is, when the output value of the A / D converter 115 becomes larger than the threshold value A, the determination is YES, and the process proceeds to step 711, otherwise. In that case, the determination is NO, and the series of processing ends.
[0065]
In steps 703 to 710, in the same manner as described above, it is determined whether or not the photosensor 113 has detected the reflecting object 120 at the effective light receiving timing, and it is determined that the photosensor 113 has detected the reflecting object at the effective light receiving timing. In step S711, the process proceeds to step 711. If not, the series of processing ends without changing the tempo value, that is, the value of the variable TEMPOVALUE.
[0066]
In step 711, a value obtained by dividing the value of the variable COUNTER by 48 is substituted for the variable TEMPOVALUE. Thereby, the tempo value is changed. Thereafter, the series of processing is terminated.
[0067]
FIG. 8 is a diagram for explaining an example of changing the tempo. The change in the tempo value performed as described above shows how the beat time interval changes according to the timing at which the reflector 120 is detected in terms of effective light reception timing. “With light reception” in the figure indicates the timing at which the reflector 120 is detected, that is, the timing at which the output value of the A / D converter 115 becomes greater than the threshold value A. Numerical values 1 to 4 indicate the number of beats positioned from the beginning of the measure.
[0068]
As shown in FIG. 8, when the reflector 120 is detected before the timing of the head of the second beat, after the timing when the reflector 120 is detected, the tempo is set so that the time f becomes a performance period of one beat. Is changed. When the remaining time of 1 beat reaches the time elapsed at the changed tempo, the performance shifts to the 2nd beat, but since the reflector 120 is detected at the beginning of the 3rd beat, the tempo value based on the detection is detected. Changes are avoided. Thereby, the performance period of the second beat is time f.
[0069]
In the present embodiment, it is assumed that the change of the tempo value is faster, but the tempo value may be changed only on the assumption of the slower one. Of course, the tempo value may be changed to either of them.
[0070]
Further, in this embodiment, as shown in FIG. 8, only the tempo value is changed at the timing when the reflecting object 120 is detected. However, when changing the tempo value, as shown in FIG. If necessary, the automatic performance may be advanced in units of beats.
[0071]
As shown in FIG. 2, the effective light reception timing is rough in the vicinity of the beginning of the beat in the present embodiment and dense in the other portions. However, in order to enable subtle changes in the tempo value, Also good. That is, it may be dense in the vicinity of the beginning of the beat and rough in other areas. In the present embodiment, the effective light reception timing is determined from the data in the program. However, some patterns of effective light reception timing are prepared in the ROM 102 as control data, and the pattern desired by the user is prepared from them. May be selected. In order to support a device using a battery or the like as a power source, a plurality of patterns having different timing intervals as a whole may be prepared, and a pattern may be automatically selected according to the voltage of the power source.
[0072]
In this embodiment, the LED 110 and the photosensor 113 are driven (reading the output value of the A / D converter 115) even at a timing that is not the effective light reception timing. However, they are driven only at the effective light reception timing. May be. In any case, the tempo value may be changed only when the reflecting object 120 is detected at the effective light reception timing.
[0073]
Although the tempo control device according to the present embodiment is mounted on an automatic performance device, the device that can be mounted is not limited to the automatic performance device. It can be installed in a wide range of electronic musical instruments, controllers, synthesizers, etc. The tempo control device that already has a function of detecting the reflecting object 120 can basically be applied to the present invention simply by installing a program that realizes the operation described above.
[0074]
【The invention's effect】
As described above, according to the present invention, a change is made to the time interval of the timing for detecting an object, and when an object is detected at that timing, the tempo value is changed based on that timing. For this reason, while changing the tempo value against the user's intention, the intended tempo value can be changed with high accuracy.
[Brief description of the drawings]
FIG. 1 is a circuit configuration diagram of an automatic performance device equipped with a tempo control device according to the present embodiment.
FIG. 2 is a diagram illustrating driving timings of a light emitting unit and a light receiving unit.
FIG. 3 is a diagram for explaining detection timing of a reflecting object.
FIG. 4 is an operation flowchart of a timer interrupt process.
FIG. 5 is an operation flowchart of light reception processing.
FIG. 6 is a diagram for explaining a method of extracting tempo information.
FIG. 7 is an operation flowchart of a thinning process.
FIG. 8 is a diagram illustrating an example of changing the tempo.
FIG. 9 is a diagram illustrating a tempo changing method according to another embodiment.
[Explanation of symbols]
101 CPU
102 ROM
103 RAM
104 Operator group
105 Waveform memory
106 Sound source LSI
110 LED
111 Light emitter
112 Driver circuit
113 Photosensor
114 Light receiver
115 A / D converter
120 Reflector

Claims (4)

自動演奏装置に搭載され、該自動演奏装置が自動演奏を行うテンポの値を制御する装置であって、
ユーザが動かす物体の動きを検出する動き検出手段と、
前記動き検出手段が検出した物体の動きに基づいて、前記テンポの値を変更するテンポ変更手段と、
前記動き検出手段が物体の検出を行う時間間隔を変化させて該動き検出手段に物体を検出させる制御手段と、
を具備したことを特徴とするテンポ制御装置。
A device that is mounted on an automatic performance device and controls the value of the tempo at which the automatic performance device performs automatic performance,
A motion detection means for detecting the motion of the object moved by the user;
Tempo changing means for changing the value of the tempo based on the movement of the object detected by the movement detecting means;
Control means for causing the motion detection means to detect an object by changing a time interval at which the motion detection means detects the object;
A tempo control device comprising:
前記制御手段は、前記時間間隔を、予め定めた演奏単位を周期として変化させる、
ことを特徴とする請求項1記載のテンポ制御装置。
The control means changes the time interval with a predetermined performance unit as a cycle.
The tempo control device according to claim 1.
前記制御手段は、前記演奏単位の先頭に位置する期間、及び最終に位置する期間の時間間隔を、それら以外の期間の時間間隔と比較して長くさせる、
ことを特徴とする請求項1記載のテンポ制御装置。
The control means makes the time interval of the period located at the beginning of the performance unit and the period located at the end longer than the time intervals of other periods,
The tempo control device according to claim 1.
前記演奏単位は拍である、
ことを特徴とする請求項1、2、または3記載のテンポ制御装置。
The performance unit is a beat.
The tempo control device according to claim 1, 2, or 3.
JP26255398A 1998-09-17 1998-09-17 Tempo control device Expired - Fee Related JP3757641B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26255398A JP3757641B2 (en) 1998-09-17 1998-09-17 Tempo control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26255398A JP3757641B2 (en) 1998-09-17 1998-09-17 Tempo control device

Publications (2)

Publication Number Publication Date
JP2000089757A JP2000089757A (en) 2000-03-31
JP3757641B2 true JP3757641B2 (en) 2006-03-22

Family

ID=17377413

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26255398A Expired - Fee Related JP3757641B2 (en) 1998-09-17 1998-09-17 Tempo control device

Country Status (1)

Country Link
JP (1) JP3757641B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115346553A (en) * 2021-05-14 2022-11-15 华为技术有限公司 Method and device for detecting user actions based on music tempo

Also Published As

Publication number Publication date
JP2000089757A (en) 2000-03-31

Similar Documents

Publication Publication Date Title
US5841050A (en) Method and apparatus for optically determining note characteristics from key motion in a keyboard operated musical instrument
US7112738B2 (en) Electronic musical instrument
US8937239B2 (en) Light emission control device
JP4531415B2 (en) Automatic performance device
JP2004302438A (en) String-instrument type electronic musical instrument
JP3757641B2 (en) Tempo control device
JP2001343888A (en) Playing support device and keyboard device
JPH0753116Y2 (en) Music control device
JP3252181B2 (en) Electronic musical instrument
JP6572916B2 (en) Pronunciation control device and method, program
JP4197153B2 (en) Electronic musical instruments
JP2000298426A (en) Performance guidance device and performance guidance method
JP3319043B2 (en) Automatic performance device
JP2003280641A (en) Fingering guide device for musical instruments
JP4170549B2 (en) Electronic musical instruments
JP2579229Y2 (en) Electronic string instrument
JP3345453B2 (en) Automatic performance device
JP2526032Y2 (en) Electronic musical instrument
JP2643277B2 (en) Automatic performance device
JP2570411B2 (en) Playing equipment
JP2522906Y2 (en) Electronic musical instrument
JP2570550B2 (en) Electronic string instrument
JP2001117561A (en) Musical instrument using range finding sensors
JP2583617Y2 (en) Electronic string instrument
JPS63264795A (en) automatic rhythm playing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040421

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20051128

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051219

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20090113

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20100113

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110113

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110113

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20120113

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20130113

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130113

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees