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
JP3695337B2 - Operation speed information output method, operation speed information output device, and recording medium - Google Patents
[go: Go Back, main page]

JP3695337B2 - Operation speed information output method, operation speed information output device, and recording medium - Google Patents

Operation speed information output method, operation speed information output device, and recording medium Download PDF

Info

Publication number
JP3695337B2
JP3695337B2 JP2001039603A JP2001039603A JP3695337B2 JP 3695337 B2 JP3695337 B2 JP 3695337B2 JP 2001039603 A JP2001039603 A JP 2001039603A JP 2001039603 A JP2001039603 A JP 2001039603A JP 3695337 B2 JP3695337 B2 JP 3695337B2
Authority
JP
Japan
Prior art keywords
state
detection
contact
key
detection means
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
JP2001039603A
Other languages
Japanese (ja)
Other versions
JP2002244662A (en
Inventor
信弥 櫻田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2001039603A priority Critical patent/JP3695337B2/en
Publication of JP2002244662A publication Critical patent/JP2002244662A/en
Application granted granted Critical
Publication of JP3695337B2 publication Critical patent/JP3695337B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、電子楽器の操作状態の検出に用いられる操作速度情報出力方法、操作速度情報出力装置および記録媒体に関し、特に鍵の操作状態の検出に用いて好適な操作速度情報出力方法、操作速度情報出力装置および記録媒体に関する。
【0002】
【従来の技術】
従来より、電子鍵盤楽器等に用いられる鍵には、鍵速度等を検出するために、複数箇所の鍵位置を検出するセンサが設けられている。センサを機械式接点によって構成する場合には、例えば鍵を押下するに従って順次オン状態になる第1および第2接点が設けられ、両接点がオン状態になる間隔を測定することによって押鍵速度を検出することができ、両接点がオフ状態になる間隔を測定することによって離鍵速度を検出することができる。
【0003】
近年、鍵盤の製造コストを抑えるとともに精度を確保するために、弾性変形する部材によって接点を構成する技術が提案されている(特開平8−235952号公報)。その一例を図8を参照し説明する。同図(a)は接点部分の縦断面図、(b)は平面図を示す。この例においては、可動接点側の構成は、押圧部29の先端に形成された第1可動接点25と、円筒状に連続したドーナツ形の第2可動接点26とから構成されている。また、固定接点6は、実質上十字形の放射状パターンであって、中央の内パターン1と、外側の外パターン2と、その中間の共通パターン3とをそれぞれ所定の間隔を隔てて形成したものである。
【0004】
内パターン1と共通パターン3とにより内ペア4が構成され、外パターン2と共通パターン3とにより外ペア5が構成されている。各パターン1、2、3はそれぞれ接点端子部T1、T2、T3を介して外部配線パターンに接続され、これを通して内パターン1および外パターン2は抵抗を介してアースに接続され、共通パターン3は電源電圧Vに接続される。内パターン1および外パターン2は電圧検出回路(図示しない)に連結され、例えば各種楽音制御に利用される。
【0005】
このような構成の2メイクスイッチ27において、押圧部29を押圧してスイッチを押し下げると、まず中央の円形第1可動接点25が内ペア4に当接し、接点端子T1、T3間を閉成する。さらにスイッチを押し下げることにより、ドーナツ形第2可動接点26が内パターン1、外パターン2および共通パターン3のすべてに跨がって当接して、外ペア5の接点端子T1、T2間を閉成するとともに、第1可動接点により閉成されている接点端子T1、T3間をさらに閉成する。
【0006】
【発明が解決しようとする課題】
しかし、上述したように弾性変形する部材を接点に用いた場合には、接点部分の複雑な挙動によって、従来では考えられなかったような態様のチャタリングが発生する。この発明は上述した事情に鑑みてなされたものであり、チャタリングが発生しても支障なく、正確な操作検出を可能とする操作速度情報出力方法、操作速度情報出力装置および記録媒体を提供することを目的としている。
【0007】
【課題を解決するための手段】
上記課題を解決するため本発明にあっては、下記構成を具備することを特徴とする。なお、括弧内は例示である。
請求項記載の構成にあっては、操作子の操作(押鍵)によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する操作速度情報出力方法であって、前記第1の操作検出手段の、第1の状態(オフ状態)から第2の状態(オン状態)への変化(図4(c)の第1接点の最初のオン)を検出して時間測定を開始する第1検出過程と、該第1検出過程の後に、前記第1の操作検出手段の、前記第2の状態(オン状態)から前記第1の状態(オフ状態)への変化(図4(c)の第1接点の最初のオフ)を検出する第2検出過程と、該第2検出過程の後に、前記第1の操作検出手段の、前記第1の状態(オフ状態)から前記第2の状態(オン状態)への変化(図4(c)の第1接点の2回目のオン)を検出すると、前記第1検出過程において開始された時間測定をクリアして再度時間測定を開始する第3検出過程と、該第3検出過程の後に、前記第2の操作検出手段の状態変化(図4(c)の第2接点のオン)を検出する第4検出過程と、前記第4検出過程における時間測定結果に基づいて前記操作速度情報を出力する出力過程とを有することを特徴とする。
また、請求項記載の構成にあっては、操作子の操作によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する操作速度情報出力装置であって、前記第1の操作検出手段の、第1の状態から第2の状態への変化を検出して時間測定を開始する第1検出手段と、該第1検出手段が前記時間測定を開始した後に、前記第1の操作検出手段の、前記第2の状態から前記第1の状態への変化を検出する第2検出手段と、該第2検出手段が前記第2の状態から前記第1の状態への変化を検出した後に、前記第1の操作検出手段の、前記第1の状態から前記第2の状態への変化を検出すると、前記第1検出手段において開始された時間測定をクリアして再度時間測定を開始する第3検出手段と、該第3検出手段によって前記時間測定が再度開始された後に、前記第2の操作検出手段の状態変化を検出する第4検出手段と、前記第4検出手段が前記第2の操作検出手段の状態変化を検出した際の時間測定結果に基づいて前記操作速度情報を出力する出力手段とを有することを特徴とする。
また、請求項記載の構成にあっては、操作子の操作によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する処理をコンピュータに実行させるプログラムを記録した記録媒体であって、前記プログラムは、前記第1の操作検出手段の、第1の状態から第2の状態への変化を検出して時間測定を開始する第1検出過程と、該第1検出過程の後に、前記第1の操作検出手段の、前記第2の状態から前記第1の状態への変化を検出する第2検出過程と、該第2検出過程の後に、前記第1の操作検出手段の、前記第1の状態から前記第2の状態への変化を検出すると、前記第1検出過程において開始された時間測定をクリアして再度時間測定を開始する第3検出過程と、該第3検出過程の後に、前記第2の操作検出手段の状態変化を検出する第4検出過程と、前記第4検出過程における時間測定結果に基づいて前記操作速度情報を出力する出力過程とを前記コンピュータに実行させるプログラムを記憶したことを特徴とする。
【0008】
【発明の実施の形態】
1.実施形態のハードウエア構成
次に、本発明の一実施形態の電子鍵盤楽器のハードウエア構成を図1を参照し説明する。
図において52は鍵盤であり、複数の鍵が配列されている。各鍵には、図8において説明したように、押鍵に伴って最初にオン状態になる第1接点10(1st Make)と、さらに深く押下された時にオン状態になる第2接点12(2nd Make)とが設けられている。各接点は、例えば音名(C〜B)を一方の軸、オクターブ数を他方の軸とするダイオードマトリクス回路上に配置すると好適である。54はキースキャンCPUであり、鍵盤52における各接点の状態を検出する。56はROMであり、キースキャンCPU54の制御プログラムが格納されている。58はRAMであり、バス60を介してキースキャンCPU54のワークメモリとして用いられる。
【0009】
これらキースキャンCPU54、ROM56、RAM58およびバス60は、1個のLSI(ワンチップマイコン)上に実装される。64はシステムCPUであり、内部バス62を介してキースキャンCPU54から鍵操作状態(キーオン、キーオフおよびベロシティ等)を受信するとともに、バス74を介して電子鍵盤楽器内の各部を制御する。66はROMであり、システムCPU64の制御プログラム、各種波形データ、楽音パラメータ等が記憶されている。68はRAMであり、システムCPU64のワークメモリとして用いられる。70は操作表示部であり、ユーザに対して各種情報を表示するとともに、各種動作モード等の設定を行うことが可能である。72は音源部であり、システムCPU64の指令に基づいて楽音信号を合成する。
【0010】
2.実施形態のデータ構成
次に、図2を参照し、ROM56およびRAM58に格納されるデータ構成について説明する。
同図(a)において、ROM56には、キースキャンCPU54の制御プログラムを格納するCPUプログラム領域562と、後述する様々なタイミング情報等を格納するプリセットデータ領域564とが設けられている。である。また、同図(b)において、RAM58の先頭部分にはCPUワークエリア582が設けられ、その後にTDC用エリア584、MASKTM用エリア586、RTRGTM用エリア588およびステータスレジスタ領域590が順次設けられている。
【0011】
同図(b)においてTDC用エリア584は、鍵のベロシティを測定するために設けられたものであり、鍵の第1接点10がオン状態になった後第2接点12がオン状態になるまでの時間、換言すればタイマ割込みが発生した回数をカウントする時間差計測カウンタTDCが記憶される。また、本実施形態においては、キースキャンCPU54がキーオン信号を送信した後、一定のマスク時間は当該鍵に係るキーオフ信号信号を送信することを禁止している。MASKTM用エリア586には、このマスク時間をカウントするマスクタイマMASKTMが記憶される。
【0012】
また、本実施形態においては、第1接点10のオンオフ状態が頻繁に変化した場合は、最後に発生したオン状態への遷移を用いて各種制御を行うこととしている。例えば、第1接点10がオン状態に遷移し、一旦オフ状態に遷移し、さらに2回目のオン状態に遷移した場合、オフ状態に遷移した後に2回目のオン状態に遷移した間隔が所定時間内であれば、2回目のオン状態のタイミングに基づいてベロシティの計算等が行われる。RTRGTM用エリア588には、かかる判定を行うために、タイマ割込みが発生する毎にカウントアップされるリトリガータイマRTRGTMが記憶される。
【0013】
また、RAM58の終端部分にはステータスレジスタ領域590が設けられる。ここには、各鍵の状態を記憶するステータスレジスタSTATUSが設けられる。上記鍵盤52内の各鍵には鍵番号Kn(Kn=K1, …Ke)が付与されており、ステータスレジスタSTATUSは各鍵に対応して一対一に設けられている。そこで、鍵番号Knに対応するステータスレジスタを「STATUS(Kn)」のように表記する。一方、上記時間差計測カウンタTDC、マスクタイマMASKTMおよびリトリガータイマRTRGTMは、全鍵の数より少ない数だけ設けられており、必要に応じて鍵番号Knに対応して割り当てられる。そこで、これらについても、鍵番号Knに対応させて「TDC(Kn)」、「MASKTM(Kn)」、「RTRGTM(Kn)」のように表記する。
【0014】
次に、各ステータスレジスタSTATUS(Kn)の内容を同図(c)を参照し説明する。ステータスレジスタの第0ビット(最下位ビット)は、鍵の第1接点10がオン状態であるか否かを示すビットであり、“1”がオン状態であることを示す。また、第1ビットは鍵の第2接点12がオン状態であるか否かを示すビットであり、“1”がオン状態であることを示す。また、第2ビットはシステムCPU64に対してキーオン信号を送信したか否かを示すビットであり、“1”が送信済みであることを示す。また、第3ビットはキーオフ・マスク状態すなわちキーオフの送信を禁止している状態であるか否かを示すビットであり、“1”がマスク状態(キーオフの送信を禁止している状態)であることを示す。
【0015】
また、第4ビットは、ベロシティの計測中であるか否かを示すビットであり、“1”が計測中であることを示す。また、第5ビットはキーオフ・送信ミス状態であるか否かを示すビットであり、キースキャンCPU54からシステムCPU64へのキーオフ信号の送信が失敗した時に“1”に設定される。以後、本明細書においては、ステータスレジスタSTATUS(Kn)の内容を、第5ビット〜第0ビットの順に配列して“010001”のように表記する。
【0016】
3.実施形態の動作
3.1.休止状態
次に、本実施形態の動作を説明する。
まず、電子鍵盤楽器の電源が投入されると、キースキャンCPU54において図5,図6に示すメインルーチンが実行される。図において処理がステップSP2に進むと、所定の初期設定が行われ、鍵番号Knが初期値すなわち「1」に設定される。次に、ステップSP4〜SP14においては、ステータスレジスタSTATUS(Kn)の内容に応じて処理が分岐される。まず、鍵番号Knの鍵が離鍵されている状態ではステータスレジスタSTATUS(Kn)は“000000”であるため、処理はステップSP4を介してステップSP16に進む。
【0017】
ここでは、鍵番号Knの第1接点10がオン状態であるか否かが判定される。鍵番号Knの鍵が全く押下されていなければここで「NO」と判定され、処理はステップSP72に進む。ここでは、全ての鍵番号KnについてステップSP4〜SP70の処理が完了したか否かが判定される。未だ完了していなければ「NO」と判定され、処理はステップSP74に進み、鍵番号Knが「1」だけインクリメントされ、処理はステップSP4に戻る。そして、インクリメントされた鍵番号Knに基づいて再びステップSP4以降の処理が実行される。その後、鍵番号Knがインクリメントされ続け、鍵番号Knが最終鍵番号Keに達した後に再び処理がステップSP72に進むと、ここで「YES」と判定される。これにより、処理はステップSP2に戻り、鍵番号Knが再び「1」に設定される。以後、同様の動作が繰り返されることになる。
【0018】
3.2.通常の鍵操作
3.2.1.押鍵
次に、チャタリングが起きない状態における鍵操作に対する動作を説明する。鍵番号Knの鍵が押下されてゆくと、やがて第1接点10がオン状態になる。その後に処理がステップSP16に進むとその旨が検出される。これにより、ここで「YES」と判定され、処理はステップSP18に進む。ここでは、鍵番号Knに対して時間差計測カウンタTDC(Kn)が割り当て可能か、すなわち時間差計測カウンタに空きがあるか否かが判定される。割当可能であれば処理はステップSP20に進み、割当処理が行われる。
【0019】
次に、処理がステップSP22に進むと、時間差計測カウンタTDC(Kn)の値(初期値)として「0」が設定され、その状態がSTART状態(計測状態)に設定される。次に、処理がステップSP24に進むと、ステータスレジスタSTATUS(Kn)が“010001”に設定される。すなわち、第1接点10がオン状態になったために第0ビットが“1”に設定され、時間差計測カウンタTDC(Kn)を用いたベロシティの計測中が開始されたために第4ビットが“1”に設定されるのである。以上のステップが終了すると、処理はステップSP72に進み、次の鍵番号Kn+1あるいは最初の鍵番号K1に係る処理が実行される。
【0020】
その後、鍵番号が再び上記Knになった後に処理がステップSP4に進むと、処理はステップSP6を介してステップSP8に進む。ここでは、ステータスレジスタSTATUS(Kn)が“010001”であるか否かが判定される。ここで「YES」と判定されると、処理はステップSP32に進み、鍵番号Knの第1接点10がオフ状態であるかか否かが判定される。通常の押鍵操作では、この状態において第1接点10がオフ状態にならないため、「NO」と判定され、処理はステップSP38に進み、第2接点12がオン状態であるか否かが判定される。第2接点12が未だオフ状態であれば、ここで「NO」と判定され、処理はステップSP74に戻る。以後、当該鍵番号Knについてのメインルーチンの処理においては、上述したステップが繰り返され、実質的な処理は行われない。
【0021】
本実施形態においては、所定時間毎にタイマ割込が発生し、図7に示すタイマ処理ルーチンが起動される。図において処理がステップSP102に進むと、鍵番号Knに初期値すなわち「1」が設定される。なお、本ルーチンにおける鍵番号Knは、メインルーチンの鍵番号Knとはスコープが異なる別の変数である。
【0022】
次に、処理がステップSP104に進むと、時間差計測カウンタTDC(Kn)はSTART状態に設定されているか否かが判定される。ここで「YES」と判定されると、処理はステップSP106に進み、ステータスレジスタSTATUS(Kn)が“010000”以外の値であるか否かが判定される。上記例においては、ステップSP24においてステータスレジスタSTATUS(Kn)は“010001”に設定されたから「YES」と判定され、処理はステップSP108に進む。
【0023】
ここでは、時間差計測カウンタTDC(Kn)の値が時間差最大値TDCmax未満であるか否かが判定される。ここで「YES」と判定されると、ステップSP110においてカウンタTDC(Kn)が「1」だけインクリメントされる。一方、「NO」と判定された場合には、ステップSP110はスキップされ、カウンタTDC(Kn)の値は保持される。次に、処理がステップSP116に進むと、マスクタイマMASKTM(Kn)がスタート設定されているか否かが判定される。この時点ではマスクタイマMASKTM(Kn)はスタート設定されていないため、「NO」と判定され、処理はステップSP126に進む。ここでは、リトリガータイマRTRGTM(Kn)がスタート設定されているか否かが判定される。この時点ではリトリガータイマRTRGTM(Kn)はスタート設定されていないため、「NO」と判定され、処理はステップSP136に進む。
【0024】
処理がステップSP136においては、鍵番号Knが最終鍵番号Keに達したか否かが判定される。ここで「NO」と判定されると、処理はステップSP138に進み、鍵番号Knが「1」だけインクリメントされ、新たな鍵番号KnについてステップSP104以降の処理が繰り返される。一方、全鍵番号KnについてステップSP104以降の処理が完了し鍵番号Knが最終鍵番号Keに達していた場合には、ステップSP136において「YES」と判定され、処理はメインルーチンに戻る。
【0025】
メインルーチン(図5,図6)においては、鍵番号Knの第2接点12がオフ状態である限り、ステップSP8,SP32,SP38を介するループが繰り返され、実質的な処理は行われないが、上述したようにタイマ処理ルーチンによってカウンタTDC(Kn)は逐次更新されている。これにより、第1接点10がオン状態になった後の経過時間が、時間差最大値TDCmaxを限度として計測されることになる。その後、鍵番号Knの鍵がさらに深く押下され第2接点12がオン状態になると、ステップSP38において「YES」と判定され処理はステップSP40に進む。
【0026】
ステップSP40においては、時間差計測カウンタTDC(Kn)がSTOP状態に設定され、それ以降のカウント処理が禁止される。さらに、ステップSP40においては、カウンタTDC(Kn)の内容に基づいて、ベロシティVEL(Kn)が求められる。具体的には、ベロシティVEL(Kn)は、カウンタTDC(Kn)に対する演算、テーブル参照、あるいはそれらの組み合わせによって求められる。次に、処理がステップSP42に進むと、鍵番号KnおよびベロシティVEL(Kn)を伴って、キースキャンCPU54からシステムCPU64にキーオン信号が送信される。これにより、周知の電子楽器と同様に、システムCPU64においては、楽音信号が合成され、音源部72を介して楽音信号が発音される。
【0027】
3.2.2.離鍵マスク
次に、処理がステップSP46に進むと、鍵番号KnのマスクタイマMASKTM(Kn)の値が「0」に設定され、マスクタイマMASKTM(Kn)がSTART状態に設定される。次に、処理がステップSP48に進むと、ステータスレジスタSTATUS(Kn)の内容が“001111”に設定される。すなわち、ステータスレジスタSTATUS(Kn)の内容は元々“010001”であったが、鍵の第2接点12がオン状態になったため第1ビットが“1”に設定され、キーオフ・マスク状態すなわちキーオフの送信を禁止している状態であるから第3ビットが“1”に設定され、ベロシティの計測が終了したために第4ビットが“0”に設定されたのである。
【0028】
さて、ステータスレジスタSTATUS(Kn)が“001111”になると、ステップSP4〜SP4の何れにおいても「NO」と判定されるため、当該鍵番号Knについてはメインルーチン(図5,図6)において実質的な処理が行われなくなる。この場合においても、所定時間毎にタイマ割込みが発生し、タイマ処理ルーチン(図7)が起動される。先にステップSP40においてカウンタTDC(Kn)がSTOP状態に設定されたから、図7において処理がステップSP104に進むと、ここで「NO」と判定され、処理はステップSP116に進む。
【0029】
先のステップSP46においてはマスクタイマMASKTM(Kn)はSTART状態に設定されたから、ステップSP116においては「YES」と判定される。次に、処理がステップSP118に進むと、マスクタイマMASKTM(Kn)が「1」だけインクリメントされる。次に、処理がステップSP120に進むと、ステータスレジスタSTATUS(Kn)が“001111”であるか否かが判定される。先にステップSP48においてステータスレジスタSTATUS(Kn)は“001111”に設定されたから、ここでは「YES」と判定される。
【0030】
次に、処理がステップSP122に進むと、マスクタイマMASKTM(Kn)の値がマスクタイマ最大値MASKTMmax以上になったか否かが判定される。なお、マスクタイマ最大値MASKTMmaxは、鍵の構造等に基づいて予め定められている。まだマスクタイマMASKTM(Kn)の値がマスクタイマ最大値MASKTMmaxに達していなければ「NO」と判定され、処理はステップSP126に進む。ここで、リトリガータイマRTRGTM(Kn)は未だスタート設定されていないために「NO」と判定され、処理はステップSP136に進む。
【0031】
以上のように、ステータスレジスタSTATUS(Kn)が“001111”になると、当該鍵番号Knに係るマスクタイマMASKTM(Kn)がタイマ割込みの度にインクリメントされてゆく。それ以外には、鍵番号Knについて実質的な処理は行われず、第1および第2接点12の状態の変化が起ったとしても、処理に影響が及ばない。やがて、マスクタイマMASKTM(Kn)がマスクタイマ最大値MASKTMmaxに達すると、ステップSP122において「YES」と判定され、処理はステップSP124に進む。ここでは、ステータスレジスタSTATUS(Kn)が“000111”に設定される。すなわち、キーオフ・マスク状態を解消し、キーオフ信号の送信を可能ならしめるため、第3ビットが“0”に設定される。
【0032】
3.2.3.離鍵
ステータスレジスタSTATUS(Kn)が“000111”に設定されると、以後はメインルーチンのステップSP12において「YES」と判定され、処理はステップSP56に進む。ここでは、第2接点12がオフ状態であるか否かが判定される。未だオフ状態でなければ「NO」と判定され、処理はステップSP72に進む。従って、かかる状態では実質的な処理が行われない。
【0033】
ここで、鍵番号Knの離鍵が開始されると、やがてその第2接点12がオフ状態になる。その後に処理がステップSP56に進むと、ここで「YES」と判定され、処理はステップSP58に進み、ステータスレジスタSTATUS(Kn)が“000101”に設定される。すなわち、第2接点12がオフ状態になったため、第1ビットが“0”に設定される。
【0034】
その後、メインルーチンにおいては、当該鍵番号KnについてはステップSP14を介して処理はステップSP60に進む。ここでは、第2接点12がオン状態になったか否かが判定される。通常の離鍵状態においては、一旦オフ状態になった第2接点12はオン状態にはならない。従って、ここでは「NO」と判定され、処理はステップSP64に進み、第1接点10がオフ状態であるか否かが判定される。未だ第1接点10がオフ状態になっていなければここで「NO」と判定され、処理はステップSP72に進む。
【0035】
以後、メインルーチンにおいて、該鍵番号Knについては、第1接点10がオフ状態になるまでは、ステップSP14,SP60,SP64が繰り返され実質的な処理は行われない。その後、鍵がさらに上昇して第1接点10がオフ状態になると、ステップSP64において「YES」と判定され、処理はステップSP66に進む。ここでは、キースキャンCPU54からシステムCPU64に鍵番号Knを伴ったキーオフ信号が送信される。これにより、周知の電子楽器と同様に、システムCPU64においては、当該鍵番号Knに係る消音処理等が実行される。
【0036】
次に、処理がステップSP68に進むと、ステータスレジスタSTATUS(Kn)が“000000”すなわち初期状態に設定される。次に処理がステップSP70に進むと、該鍵番号Knに割り当てられていた時間差計測カウンタTDC(Kn)が解放され、他の鍵の時間差計測に割り当てることが可能になる。
【0037】
3.3.時間差計測カウンタの割当が不可能である場合の動作
上述したステップSP18においては、鍵番号Knに対して時間差計測カウンタTDC(Kn)が割り当て可能か、すなわち時間差計測カウンタに空きがあるか否かが判定された。ここで、割り当てが不可能であった場合は、処理はステップSP26に進み、ステータスレジスタSTATUS(Kn)が“000001”に設定される。すなわち、第1接点10がオン状態になったために第0ビットが“1”に設定されるが、ベロシティの計測が行われていないために第4ビットは“0”に保持されたままになる。
【0038】
その後、当該鍵番号Knについて再びステップSP4以降の処理が実行されると、ステップSP6において「YES」と判定され、処理はステップSP28に進む。ここでは、第1接点10がオフ状態であるか否かが判定される。ここで「NO」と判定されると実質的な処理は行われないが、「YES」と判定されると処理はステップSP30に進み、ステータスレジスタSTATUS(Kn)が“000000”(初期状態)に戻される。結局、カウンタTDC(Kn)が割り当て不可能であった場合は、当該鍵操作に対してキーオン信号もキーオフ信号もシステムCPU64には送信されないため、全く発音が行われないことになる。
【0039】
3.4.浅い押鍵操作に対する処理
浅い押鍵操作が行われた場合には、まず第1接点10がオン状態になり、第2接点12がオン状態になることなく、比較的長い時間が経過した後に第1接点10がオフ状態になる。かかる場合の動作を説明する。まず、初期状態(ステータスレジスタSTATUS(Kn)=“000000”)において第1接点10がオン状態になり、かつ、時間差計測カウンタTDC(Kn)の割当が可能であれば、上記ステップSP20〜SP24の処理を介してステータスレジスタSTATUS(Kn)が“010001”に設定される。
【0040】
次に、第1または第2接点12に変化が現れるまで、当該鍵番号Knについては、ステップSP8,SP32,SP38の判定が実行されるが、メインルーチンにおいては実質的な処理は実行されない。その期間中、カウンタTDC(Kn)はタイマ割込みが生ずる毎に「1」づつインクリメントされてゆく。ここで、第1接点10がオフ状態になると、ステップSP32において「YES」と判定され、処理はステップSP34に進む。
【0041】
ここでは、リトリガータイマRTRGTM(Kn)の値が「0」に設定され、リトリガータイマRTRGTM(Kn)がSTART状態に設定される。次に処理がステップSP36に進むと、ステータスレジスタSTATUS(Kn)が“010000”に設定される。すなわち、第1接点10がオフ状態になったために第0ビットを“0”に設定したが、これは単なるチャタリングの可能性があるため、ベロシティの測定状態を続行するために、第4ビットを“1”のまま保持したものである。
【0042】
次に、メインルーチンにおいて再びステップSP4以降の処理が実行されると、ステップSP10において「YES」と判定されるから処理はステップSP50に進む。ここでは、第1接点10がオン状態であるか否かが判定される。ここでは既に第1接点10がオフ状態になっているため「NO」と判定され、処理はステップSP38を介してステップSP72に進む。以後同様に、メインルーチンにおいては、鍵番号Knに対してステップSP10,SP50,SP38が繰り返されるが、実質的な処理は実行されない。
【0043】
一方、上記例においてはカウンタTDC(Kn)がSTART状態に設定され、ステータスレジスタSTATUS(Kn)が“010000”に設定されたため、タイマ処理ルーチンが呼び出されると、処理はステップSP104、SP106を介してステップSP112に進む。ここでは、カウンタTDC(Kn)のカウント結果(すなわち第1接点10がオンオフされた間隔)が所定のチャタリング閾値TDCchtr未満であるか否かが判定される。なお、チャタリング閾値TDCchtrは、通常発生するチャタリングの最大周期(例えば30msec)に設定される。
【0044】
浅い押鍵操作によって第1接点10のオンオフが生じた場合には、カウンタTDC(Kn)のカウント結果はチャタリング閾値TDCchtrよりも充分に大きくなるから、ステップSP112においては「NO」と判定され、処理はステップSP114に進む。ここでは、時間差計測カウンタTDC(Kn)がSTOP状態に設定されるとともに解放され、さらにステータスレジスタSTATUS(Kn)が“000000”すなわち初期状態に設定される。このように、第2接点12がオン状態にならないような浅い押鍵操作に対しては、キーオン信号もキーオフ信号もシステムCPU64には送信されないため、全く発音が行われないことになる。
【0045】
3.5.第1接点10においてチャタリングが生じた場合の処理
次に、第1接点10においてチャタリングが生じた場合の処理を説明する。第1接点10においてチャタリングが生じると、第2接点12がオン状態になる前に第1接点10においてオンオフが繰り返される。
まず、初期状態(ステータスレジスタSTATUS(Kn)=“000000”)において第1接点10が最初にオン状態になると、上記「浅い押鍵操作」が行われた場合と同様に、該当する鍵番号Knに対して時間差計測カウンタTDC(Kn)が割り当てられ、ステップSP20〜SP24の処理を介してステータスレジスタSTATUS(Kn)が“010001”に設定される。以後、タイマ割込みが生ずる毎にカウンタTDC(Kn)が「1」づつインクリメントされる。
【0046】
次に、第1接点10がオフ状態になると、ステップSP34,SP36においてリトリガータイマRTRGTM(Kn)が「0」に戻され、リトリガータイマRTRGTM(Kn)がSTART状態に設定される。ステータスレジスタSTATUS(Kn)が“010000”に設定される。次にタイマ割込みが発生すると、ステップSP112において、カウンタTDC(Kn)のカウント結果が所定のチャタリング閾値TDCchtr未満であるか否かが判定される。チャタリングが生じた場合には、第1接点10は頻繁にオンオフされるため、カウント結果はチャタリング閾値TDCchtr未満になる。従って、ここでは「YES」と判定され、処理はステップSP108に進み、カウンタTDC(Kn)の更新が続行される。
【0047】
また、リトリガータイマRTRGTM(Kn)がSTART状態に設定されたことにより、タイマ処理ルーチンのステップSP126においては「YES」と判定される。次に、ステップSP128においては、リトリガータイマRTRGTM(Kn)が「1」だけインクリメントされる。次に、処理がステップSP130に進むと、ステータスレジスタSTATUS(Kn)が“010000”であるか否かが判定される。先にステップSP36においてステータスレジスタSTATUS(Kn)は“010000”に設定されたから、ここでは「YES」と判定され、処理はステップSP132に進む。ステップSP132においては、リトリガータイマRTRGTM(Kn)の値がリトリガータイマ最大値RTRGTMmax以上になったか否かが判定される。ここで「NO」と判定されると、処理はステップSP136に進み、当該鍵番号Knについてはタイマ処理が終了する。
【0048】
ここで、仮に、リトリガータイマRTRGTM(Kn)がリトリガータイマ最大値RTRGTMmaxに達すると、処理はステップSP132に進み、ステータスレジスタSTATUS(Kn)が“000000”すなわち初期状態に設定される。しかし、上述したように、チャタリングが発生している状況では第1接点10が頻繁にオンオフするから、リトリガータイマRTRGTM(Kn)の値がリトリガータイマ最大値RTRGTMmaxに達する前に第1接点10が再びオン状態になる。第1接点10が再びオン状態になると、メインルーチンのステップSP50において「YES」と判定されるから、処理はステップSP52に進む。ここでは、時間差計測カウンタTDC(Kn)が「0」に設定されるとともに、該カウンタTDC(Kn)が再度START状態に設定される。次に、処理がステップSP54に進むと、ステータスレジスタSTATUS(Kn)が“010001”に設定される。
【0049】
以後、同様に、第1接点10がオフ状態になるとステップSP34,SP36においてリトリガータイマRTRGTM(Kn)が「0」に戻されるとともに、ステータスレジスタSTATUS(Kn)が“010000”に設定される。また、第1接点10がオン状態になると、ステップSP52,SP54において、カウンタTDC(Kn)のカウント結果が「0」に戻されるとともに該時間差計測カウンタTDC(Kn)が再度START状態に設定され、ステータスレジスタSTATUS(Kn)が“010001”に設定される。チャタリングが継続している期間中は、これら2つの状態が交互に繰り返されることになる。
【0050】
鍵番号Knの鍵がさらに深く押下されてゆくと、やがて第2接点12がオン状態になる。この時点で第1接点10のチャタリングが終了している場合と、継続している場合とが考えられるため、以後の動作を場合を分けて説明する。
【0051】
3.5.1.第1接点10のチャタリング終了後に第2接点12がオン状態になった場合
第1接点10のチャタリングが終了すると、第1接点10はオン状態に安定する。すなわち、ステップSP52,SP54においてカウンタTDC(Kn)がSTART状態に設定され、ステータスレジスタSTATUS(Kn)が“010001”に設定される。これにより、カウンタTDC(Kn)のカウントが再開される。
【0052】
以後の動作は、「通常の鍵操作」の場合と同様である。すなわち、第2接点12がオン状態になると、ステップSP38において「YES」と判定され、ステップSP40〜SP48の処理が実行される。ステップSP40においては、カウンタTDC(Kn)のカウント結果、換言すれば第1接点10が最後にオン状態に安定した後に第2接点12が最初にオン状態になるまでの時間に応じて、ベロシティVEL(Kn)が計算されキーオン信号がシステムCPU64に送信される。
【0053】
3.5.2.第1接点10のチャタリング中に第2接点12がオン状態になった場合
「第1接点10のチャタリング中」には、第1接点10がオン状態である場合とオフ状態である場合とが考えられる。第1接点10がオン状態であれば、メインルーチンにおいてステップSP8,SP32,SP38の判定処理が繰り返されるから、第2接点12がオン状態になるとともにステップSP40以降の処理が実行される。すなわち、かかる場合には、「第1接点10のチャタリング終了後に第2接点12がオン状態になった場合」と同様の処理が実行されることになる。
【0054】
一方、第1接点10がオフ状態であれば、ステップSP10,SP50,SP38の判定処理が繰り返される。ここで、第2接点12がオン状態になると、ステップSP38を介してステップSP40以降の処理が実行される。ここで、時間差計測カウンタTDC(Kn)は先に第1接点10がオン状態になった時からカウントを開始しているため、最後に第1接点10がオン状態になった後、第2接点12がオン状態になるまでのカウント結果に基づいてベロシティVEL(Kn)が計算されることになる。
【0055】
4.実施形態の効果
以下、図3,図4を参照し、想定される各種チャタリングに対する本実施形態の効果を説明する。これらの図は、様々な態様でチャタリング等が発生した場合における第1および第2接点12のオンオフ状態を負論理で示した波形図である。
【0056】
(1)図3(a)においては、最初に第1接点10がオン状態になり、次に第2接点12がオン状態になり、しかる後に第1接点10においてチャタリングが生じた場合の波形図を示す。第2接点12がオン状態になると、ステータスレジスタSTATUS(Kn)は、ステップSP48において“001111”に設定され、さらにマスクタイマ最大値MASKTMmaxが経過した時にステップSP124において“000111”に設定される。何れの場合においても、第1接点10のオンオフ状態は処理に影響を及ぼさないため、このチャタリングによる影響を排除することができる。
【0057】
(2)図3(b)においては、第1および第2接点12が順次オン状態になった後、第2接点12にチャタリングが生じた場合の波形図を示す。上述したように、第2接点12がオン状態になると、ステータスレジスタSTATUS(Kn)は“001111”に設定された後、“000111”に設定される。ここで、第2接点12がオフ状態になると、ステップSP58においてステータスレジスタSTATUS(Kn)が“000101”に設定されるが、第1接点10がオフ状態になる前に第2接点12が再びオン状態になると、ステップSP60,SP62を介してレジスタSTATUS(Kn)が再び“000111”に設定される。これにより、以後は第2接点12のチャタリングが無かった場合と同様の動作が実行され、第2接点12のチャタリングによる影響を排除することができる。
【0058】
(3)図4(a)においては、第1および第2接点12が順次オン状態になった後、マスクタイマ最大値MASKTMmaxに対応するマスク時間が経過する以前に第1および第2接点12に同時にチャタリングが生じた場合の波形図を示す。ここで、このようなチャタリングが生じる背景について説明しておく。
【0059】
自然楽器のピアノにおいては、押鍵操作によってハンマアクションを持ち上げ、ハンマが弦を打つことによって楽音が発生される。そして、ハンマアクションが基準位置に戻る際に鍵に衝突し、演奏者はそのショックを指先に感じることができる。そこで、電子ピアノにおいてもこのようなピアノタッチを再現すべく、鍵にショックを与えるような機構が付与されている。しかし、鍵にこのようなショックを与えると、第1および第2接点12が共にオフ状態になることがある。図4(a)は、かかる状態を想定したものである。
【0060】
マスク時間が経過する以前はレジスタSTATUS(Kn)は“001111”に設定されており、この期間中における第1および第2接点12のオンオフ状態は処理になんら影響を及ぼさない。従って、ピアノタッチを模擬した場合に特有のチャタリングも排除することができる。なお、マスクタイマ最大値MASKTMmaxは、ピアノタッチを与える機構部分の特性に応じて、決定されることは言うまでもない。
【0061】
(4)図4(b)においては、第1接点10が一旦オン状態になった後にチャタリングが発生し、そのチャタリングの途中、第1接点10がオフ状態である時に第2接点12がオン状態になった場合の波形図を示す。本実施形態のように弾性変形する部材によって接点を構成した場合には、このようなチャタリングも起こりうる。かかる場合には、「第1接点10のチャタリング中に第2接点12がオン状態になった場合」において説明したように、第1接点10が最後にオン状態になった後第2接点12がオン状態になるまでの時間に応じてベロシティVEL(Kn)が決定されるから、かかる状態におけるチャタリングの影響も排除することができる。
【0062】
(5)図4(c)においては、第1接点10においてチャタリングが生じた後第1接点10がオン状態に安定し、しかる後に第2接点12がオン状態になった場合の波形図を示す。この例においても、第1接点10が最後にオン状態になった後第2接点12がオン状態になるまでの時間に応じてベロシティVEL(Kn)が決定されるから、第1接点10のチャタリングの影響を排除することができる。
【0063】
(6)図4(d)においては、第1接点10においてチャタリングが生じた後第1接点10がオン状態に安定し、第2接点12はオフ状態に保持された場合の波形図を示す。この例においては、第1接点10がオン状態になった後、チャタリング閾値TDCchtrを経過したことを条件としてステータスレジスタSTATUS(Kn)が“000000”に戻る。従って、この期間内に第2接点12がオン状態になると、第1接点10がオフ状態であってもキーオン信号を生成することが可能になる。
【0064】
5.変形例
本発明は上述した実施形態に限定されるものではなく、例えば以下のように種々の変形が可能である。
(1)上記各実施形態はキースキャンCPU54においてキーオン・キーオフイベント検出処理を行ったが、上述した各処理をシステムCPU64において実行してもよい。同様に、キーオン・キーオフイベント検出処理も含めて電子鍵盤楽器の各構成要素を各種コンピュータ上で動作するソフトウエアによって構成してもよい。その場合、このソフトウエアをCD−ROM、フロッピーディスク等の記録媒体に格納して頒布し、あるいは伝送路を通じて頒布することもできる。
【0065】
【発明の効果】
以上説明したように本発明によれば、第1の操作検出手段において最後に第1の状態から第2の状態へ変化したタイミングに基づいて操作速度情報を出力するから、チャタリングの影響を防止しつつ操作速度を検出することができる。
【図面の簡単な説明】
【図1】 本発明の一実施形態の電子鍵盤楽器のブロック図である。
【図2】 上記実施形態のメモリマップである。
【図3】 上記実施形態の波形図である。
【図4】 上記実施形態の他の状態における波形図である。
【図5】 上記実施形態のメインルーチンのフローチャート(1/2)である。
【図6】 上記実施形態のメインルーチンのフローチャート(2/2)である。
【図7】 上記実施形態のタイマ処理ルーチンのフローチャートである。
【図8】 従来技術および上記実施形態における接点構造を示す図である。
【符号の説明】
1……内パターン、2……外パターン、3……共通パターン、4……内ペア、5……外ペア、6……固定接点、10……第1接点、12……第2接点、25……第1可動接点、26……第2可動接点、27……2メイクスイッチ、29……押圧部、52……鍵盤、54……キースキャンCPU、56……ROM、58……RAM、60……バス、62……内部バス、64……システムCPU、66……ROM、68……RAM、70……操作表示部、72……音源部、74……バス、562……CPUプログラム領域、564……プリセットデータ領域、582……CPUワークエリア、584……TDC用エリア、586……MASKTM用エリア、588……RTRGTM用エリア、590……ステータスレジスタ領域。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an operation speed information output method, an operation speed information output device, and a recording medium used for detecting an operation state of an electronic musical instrument, and more particularly to an operation speed information output method and an operation speed suitable for use in detecting an operation state of a key. The present invention relates to an information output device and a recording medium.
[0002]
[Prior art]
Conventionally, a key used for an electronic keyboard instrument or the like has been provided with sensors for detecting key positions at a plurality of locations in order to detect a key speed or the like. When the sensor is constituted by a mechanical contact, for example, first and second contacts that are sequentially turned on as the key is pressed are provided, and the key pressing speed is determined by measuring the interval at which both contacts are turned on. The key release speed can be detected by measuring the interval at which both contacts are turned off.
[0003]
In recent years, in order to reduce the manufacturing cost of a keyboard and to ensure accuracy, a technique has been proposed in which a contact is formed by an elastically deformable member (Japanese Patent Laid-Open No. 8-235595). One example will be described with reference to FIG. FIG. 4A is a longitudinal sectional view of a contact portion, and FIG. In this example, the movable contact side is composed of a first movable contact 25 formed at the tip of the pressing portion 29 and a donut-shaped second movable contact 26 that is continuous in a cylindrical shape. Further, the fixed contact 6 is a substantially cross-shaped radial pattern, and is formed by forming a central inner pattern 1, an outer outer pattern 2, and an intermediate common pattern 3 at predetermined intervals. It is.
[0004]
The inner pattern 1 and the common pattern 3 constitute an inner pair 4, and the outer pattern 2 and the common pattern 3 constitute an outer pair 5. Each pattern 1, 2 and 3 is connected to an external wiring pattern through contact terminal portions T1, T2 and T3, respectively, through which the inner pattern 1 and the outer pattern 2 are connected to ground through a resistor, and the common pattern 3 is Connected to the power supply voltage V. The inner pattern 1 and the outer pattern 2 are connected to a voltage detection circuit (not shown), and are used for various musical tone control, for example.
[0005]
In the two-make switch 27 having such a configuration, when the pressing portion 29 is pressed and the switch is pressed down, the circular first movable contact 25 at the center first comes into contact with the inner pair 4 and closes the contact terminals T1 and T3. . By further depressing the switch, the donut-shaped second movable contact 26 abuts over all of the inner pattern 1, the outer pattern 2 and the common pattern 3, and the contact terminals T1 and T2 of the outer pair 5 are closed. At the same time, the contact terminals T1 and T3 closed by the first movable contact are further closed.
[0006]
[Problems to be solved by the invention]
However, when a member that elastically deforms as described above is used for the contact, chattering in a manner that has not been considered in the past occurs due to the complicated behavior of the contact portion. The present invention has been made in view of the above circumstances, and provides an operation speed information output method, an operation speed information output device, and a recording medium that enable accurate operation detection without any problem even if chattering occurs. It is an object.
[0007]
[Means for Solving the Problems]
In order to solve the above problems, the present invention is characterized by having the following configuration. The parentheses are examples.
Claim 1 In the configuration described above, the detection states of the first and second operation detection means are changed by using the first and second operation detection means whose detection states are changed by the operation (key depression) of the operation element. An operation speed information output method for outputting operation speed information of the operation element based on a time interval to be operated, wherein the first operation detection means is changed from a first state (off state) to a second state (on state). ) (First detection of the first contact point in FIG. 4 (c)) to detect time, and after the first detection process, the first operation detecting means A second detection step of detecting a change from the second state (on state) to the first state (off state) (first off of the first contact in FIG. 4 (c)); After the detection process, the first operation detecting means changes from the first state (off state) to the second state (on state). 3) is detected, the time measurement started in the first detection process is cleared and the time measurement is started again. And, after the third detection process, a fourth detection process for detecting a change in the state of the second operation detection means (turning on the second contact in FIG. 4C), and time measurement in the fourth detection process And an output process for outputting the operation speed information based on the result.
Claims 2 In the configuration described, Using the first and second operation detection means whose detection state changes according to the operation of the operation element, the operation speed of the operation element is based on the time interval at which the detection state of the first and second operation detection means changes. An operation speed information output device for outputting information, wherein the first operation detection means detects a change from the first state to the second state and starts time measurement; and After the first detection means starts the time measurement, a second detection means for detecting a change from the second state to the first state of the first operation detection means, and the second detection means After detecting a change from the second state to the first state, the first operation detecting means detects a change from the first state to the second state. Clear time measurement started in detection means and measure time again A third detection unit that starts, a fourth detection unit that detects a state change of the second operation detection unit after the time measurement is started again by the third detection unit, and the fourth detection unit Output means for outputting the operation speed information based on a time measurement result when a state change of the second operation detection means is detected. It is characterized by that.
Claims 3 In the configuration described, Using the first and second operation detection means whose detection state changes according to the operation of the operation element, the operation speed of the operation element is based on the time interval at which the detection state of the first and second operation detection means changes. A recording medium recording a program for causing a computer to execute a process of outputting information, wherein the program detects a change from the first state to the second state by the first operation detecting unit and detects a time. A first detection process for starting measurement; and a second detection process for detecting a change from the second state to the first state of the first operation detecting means after the first detection process; After detecting the change of the first operation detecting means from the first state to the second state after the second detection step, the time measurement started in the first detection step is cleared. Third test to start time measurement again And a fourth detection process for detecting a change in state of the second operation detection means after the third detection process, and an output for outputting the operation speed information based on a time measurement result in the fourth detection process. Causing the computer to execute the process The program is memorized.
[0008]
DETAILED DESCRIPTION OF THE INVENTION
1. Hardware configuration of the embodiment
Next, the hardware configuration of the electronic keyboard instrument of one embodiment of the present invention will be described with reference to FIG.
In the figure, reference numeral 52 denotes a keyboard on which a plurality of keys are arranged. As described with reference to FIG. 8, each key has a first contact 10 (1st Make) that is first turned on when the key is depressed, and a second contact 12 (2nd that is turned on when pressed further deeply). Make). Each contact is preferably arranged on a diode matrix circuit having, for example, a pitch name (C to B) as one axis and an octave number as the other axis. A key scan CPU 54 detects the state of each contact on the keyboard 52. A ROM 56 stores a control program for the key scan CPU 54. A RAM 58 is used as a work memory for the key scan CPU 54 via the bus 60.
[0009]
The key scan CPU 54, ROM 56, RAM 58 and bus 60 are mounted on one LSI (one-chip microcomputer). A system CPU 64 receives a key operation state (key-on, key-off, velocity, etc.) from the key scan CPU 54 via the internal bus 62 and controls each part in the electronic keyboard instrument via the bus 74. A ROM 66 stores a control program for the system CPU 64, various waveform data, musical tone parameters, and the like. Reference numeral 68 denotes a RAM which is used as a work memory for the system CPU 64. Reference numeral 70 denotes an operation display unit that displays various types of information to the user and can set various operation modes and the like. Reference numeral 72 denotes a sound source unit that synthesizes a musical sound signal based on a command from the system CPU 64.
[0010]
2. Data structure of the embodiment
Next, the data structure stored in the ROM 56 and the RAM 58 will be described with reference to FIG.
In FIG. 6A, the ROM 56 is provided with a CPU program area 562 for storing a control program for the key scan CPU 54 and a preset data area 564 for storing various timing information described later. It is. In FIG. 6B, a CPU work area 582 is provided at the head of the RAM 58, and thereafter, a TDC area 584, a MASKTM area 586, an RTRGTM area 588, and a status register area 590 are sequentially provided. .
[0011]
In FIG. 5B, a TDC area 584 is provided for measuring the velocity of the key, and until the second contact 12 is turned on after the first contact 10 of the key is turned on. In other words, a time difference measurement counter TDC that counts the number of times the timer interrupt has occurred is stored. In this embodiment, after the key scan CPU 54 transmits a key-on signal, it is prohibited to transmit a key-off signal signal related to the key for a certain mask time. The MASKTM area 586 stores a mask timer MASKTM for counting the mask time.
[0012]
Further, in the present embodiment, when the on / off state of the first contact 10 frequently changes, various controls are performed using the transition to the on state that occurs last. For example, when the first contact 10 transitions to the on state, transitions to the off state, and then transitions to the second on state, the interval between the transition to the off state and the transition to the second on state is within a predetermined time. Then, the velocity is calculated based on the timing of the second on state. The RTRGTM area 588 stores a retrigger timer RTRGTM that is incremented every time a timer interrupt occurs in order to make such a determination.
[0013]
A status register area 590 is provided at the end of the RAM 58. Here, a status register STATUS for storing the state of each key is provided. Each key in the keyboard 52 is given a key number Kn (Kn = K1,... Ke), and a status register STATUS is provided on a one-to-one basis corresponding to each key. Therefore, the status register corresponding to the key number Kn is expressed as “STATUS (Kn)”. On the other hand, the time difference measurement counter TDC, the mask timer MASKTM, and the retrigger timer RTRGTM are provided in a number smaller than the total number of keys, and are assigned corresponding to the key number Kn as necessary. Therefore, these are also expressed as “TDC (Kn)”, “MASKTM (Kn)”, “RTRGTM (Kn)” corresponding to the key number Kn.
[0014]
Next, the contents of each status register STATUS (Kn) will be described with reference to FIG. The 0th bit (least significant bit) of the status register is a bit indicating whether or not the first contact 10 of the key is in an ON state, and “1” indicates that it is in an ON state. The first bit is a bit indicating whether or not the second contact 12 of the key is in an ON state, and “1” indicates that it is in an ON state. The second bit is a bit indicating whether or not a key-on signal has been transmitted to the system CPU 64, and “1” indicates that transmission has been completed. The third bit is a bit indicating whether or not a key-off mask state, that is, a state in which key-off transmission is prohibited, and “1” is a mask state (a state in which key-off transmission is prohibited). It shows that.
[0015]
The fourth bit is a bit indicating whether or not velocity is being measured, and “1” indicates that measurement is being performed. The fifth bit is a bit indicating whether or not there is a key-off / transmission miss state, and is set to “1” when transmission of the key-off signal from the key scan CPU 54 to the system CPU 64 fails. Hereinafter, in this specification, the contents of the status register STATUS (Kn) are arranged in the order of the fifth bit to the 0th bit and expressed as “010001”.
[0016]
3. Operation of the embodiment
3.1. Hibernation
Next, the operation of this embodiment will be described.
First, when the power of the electronic keyboard instrument is turned on, the main routine shown in FIGS. 5 and 6 is executed in the key scan CPU 54. In the figure, when the process proceeds to step SP2, predetermined initial setting is performed, and the key number Kn is set to an initial value, that is, "1". Next, in steps SP4 to SP14, the process branches according to the contents of the status register STATUS (Kn). First, since the status register STATUS (Kn) is “000000” in a state where the key of the key number Kn is released, the process proceeds to step SP16 via step SP4.
[0017]
Here, it is determined whether or not the first contact 10 with the key number Kn is in an ON state. If the key of the key number Kn is not pressed at all, it is determined as “NO” here, and the process proceeds to step SP72. Here, it is determined whether or not the processing of steps SP4 to SP70 has been completed for all key numbers Kn. If not completed yet, it is determined as “NO”, the process proceeds to step SP74, the key number Kn is incremented by “1”, and the process returns to step SP4. Then, the processing after step SP4 is executed again based on the incremented key number Kn. Thereafter, the key number Kn is continuously incremented, and when the process proceeds again to step SP72 after the key number Kn reaches the final key number Ke, it is determined as “YES” here. As a result, the process returns to step SP2, and the key number Kn is set to “1” again. Thereafter, the same operation is repeated.
[0018]
3.2. Normal key operation
3.2.1. Key press
Next, an operation for a key operation in a state where chattering does not occur will be described. When the key with the key number Kn is depressed, the first contact 10 is turned on. Thereafter, when the process proceeds to step SP16, this is detected. Thereby, it determines with "YES" here and a process progresses to step SP18. Here, it is determined whether or not the time difference measurement counter TDC (Kn) can be assigned to the key number Kn, that is, whether or not there is an empty time difference measurement counter. If the allocation is possible, the process proceeds to step SP20 and the allocation process is performed.
[0019]
Next, when the process proceeds to step SP22, “0” is set as the value (initial value) of the time difference measurement counter TDC (Kn), and the state is set to the START state (measurement state). Next, when the process proceeds to step SP24, the status register STATUS (Kn) is set to “010001”. That is, the 0th bit is set to “1” because the first contact 10 is turned on, and the fourth bit is set to “1” because the velocity measurement using the time difference measurement counter TDC (Kn) is started. It is set to. When the above steps are completed, the process proceeds to step SP72, and the process related to the next key number Kn + 1 or the first key number K1 is executed.
[0020]
Thereafter, when the process proceeds to step SP4 after the key number becomes Kn again, the process proceeds to step SP8 via step SP6. Here, it is determined whether or not the status register STATUS (Kn) is “010001”. If “YES” is determined here, the process proceeds to step SP32 to determine whether or not the first contact 10 of the key number Kn is in an OFF state. In a normal key pressing operation, since the first contact 10 is not turned off in this state, it is determined as “NO”, the process proceeds to step SP38, and it is determined whether or not the second contact 12 is turned on. The If the second contact 12 is still in the off state, “NO” is determined here, and the process returns to step SP74. Thereafter, in the processing of the main routine for the key number Kn, the steps described above are repeated and no substantial processing is performed.
[0021]
In this embodiment, a timer interrupt occurs every predetermined time, and the timer processing routine shown in FIG. 7 is started. In the figure, when the process proceeds to step SP102, an initial value, that is, “1” is set to the key number Kn. The key number Kn in this routine is another variable having a different scope from the key number Kn in the main routine.
[0022]
Next, when the process proceeds to step SP104, it is determined whether or not the time difference measurement counter TDC (Kn) is set to the START state. If "YES" is determined here, the process proceeds to step SP106 to determine whether or not the status register STATUS (Kn) is a value other than "010000". In the above example, since the status register STATUS (Kn) is set to “010001” in step SP24, “YES” is determined, and the process proceeds to step SP108.
[0023]
Here, it is determined whether or not the value of the time difference measurement counter TDC (Kn) is less than the maximum time difference value TDCmax. If “YES” is determined here, the counter TDC (Kn) is incremented by “1” in step SP110. On the other hand, if “NO” is determined, step SP110 is skipped, and the value of the counter TDC (Kn) is held. Next, when the process proceeds to step SP116, it is determined whether or not the mask timer MASKTM (Kn) is set to start. At this time, since the mask timer MASKTM (Kn) is not set to start, it is determined “NO”, and the process proceeds to step SP126. Here, it is determined whether or not the retrigger timer RTRGTM (Kn) is set to start. At this time, since the re-trigger timer RTRGTM (Kn) is not set to start, it is determined “NO”, and the process proceeds to step SP136.
[0024]
In step SP136, it is determined whether or not the key number Kn has reached the final key number Ke. If "NO" is determined here, the process proceeds to step SP138, the key number Kn is incremented by "1", and the processes after step SP104 are repeated for the new key number Kn. On the other hand, if the processing after step SP104 is completed for all key numbers Kn and the key number Kn has reached the final key number Ke, “YES” is determined in step SP136, and the processing returns to the main routine.
[0025]
In the main routine (FIGS. 5 and 6), as long as the second contact 12 with the key number Kn is in an OFF state, the loop through steps SP8, SP32 and SP38 is repeated, and no substantial processing is performed. As described above, the counter TDC (Kn) is sequentially updated by the timer processing routine. Thereby, the elapsed time after the first contact 10 is turned on is measured with the maximum time difference TDCmax as a limit. Thereafter, when the key with the key number Kn is further pressed down and the second contact 12 is turned on, “YES” is determined in the step SP38, and the process proceeds to a step SP40.
[0026]
In step SP40, the time difference measurement counter TDC (Kn) is set to the STOP state, and the subsequent counting process is prohibited. Further, in step SP40, the velocity VEL (Kn) is obtained based on the contents of the counter TDC (Kn). Specifically, the velocity VEL (Kn) is obtained by calculation with respect to the counter TDC (Kn), table reference, or a combination thereof. Next, when the process proceeds to step SP42, a key-on signal is transmitted from the key scan CPU 54 to the system CPU 64 with the key number Kn and velocity VEL (Kn). As a result, like the known electronic musical instrument, the system CPU 64 synthesizes the musical sound signal and generates the musical sound signal via the sound source unit 72.
[0027]
3.2.2. Key release mask
Next, when the process proceeds to step SP46, the value of the mask timer MASKTM (Kn) of the key number Kn is set to “0”, and the mask timer MASKTM (Kn) is set to the START state. Next, when the process proceeds to step SP48, the content of the status register STATUS (Kn) is set to “001111”. That is, the content of the status register STATUS (Kn) was originally “010001”, but since the second contact 12 of the key is turned on, the first bit is set to “1”, and the key-off / mask state, that is, the key-off state is set. Since the transmission is prohibited, the third bit is set to “1” and the fourth bit is set to “0” because the velocity measurement is completed.
[0028]
When the status register STATUS (Kn) becomes “001111”, it is determined as “NO” in any of the steps SP4 to SP4. Therefore, the key number Kn is substantially determined in the main routine (FIGS. 5 and 6). Will not be processed properly. Even in this case, a timer interrupt occurs every predetermined time, and the timer processing routine (FIG. 7) is started. Since the counter TDC (Kn) is set to the STOP state in step SP40 first, when the process proceeds to step SP104 in FIG. 7, “NO” is determined here, and the process proceeds to step SP116.
[0029]
In the previous step SP46, the mask timer MASKTM (Kn) is set to the START state, and therefore, “YES” is determined in step SP116. Next, when the process proceeds to step SP118, the mask timer MASKTM (Kn) is incremented by “1”. Next, when the process proceeds to step SP120, it is determined whether or not the status register STATUS (Kn) is “001111”. First, in step SP48, the status register STATUS (Kn) is set to “001111”, so that “YES” is determined here.
[0030]
Next, when the process proceeds to step SP122, it is determined whether or not the value of the mask timer MASKTM (Kn) is equal to or greater than the mask timer maximum value MASKTMmax. The mask timer maximum value MASKTMmax is determined in advance based on the key structure and the like. If the value of the mask timer MASKTM (Kn) has not yet reached the mask timer maximum value MASKTMmax, it is determined “NO”, and the process proceeds to step SP126. Here, since the re-trigger timer RTRGTM (Kn) has not yet been set to start, it is determined “NO”, and the process proceeds to step SP136.
[0031]
As described above, when the status register STATUS (Kn) becomes “001111”, the mask timer MASKTM (Kn) related to the key number Kn is incremented every time a timer interrupt occurs. Other than that, no substantial processing is performed on the key number Kn, and even if the state of the first and second contacts 12 changes, the processing is not affected. Eventually, when the mask timer MASKTM (Kn) reaches the mask timer maximum value MASKTMmax, “YES” is determined in step SP122, and the process proceeds to step SP124. Here, the status register STATUS (Kn) is set to “000111”. That is, the third bit is set to “0” to cancel the key-off mask state and enable transmission of the key-off signal.
[0032]
3.2.3. Key release
When the status register STATUS (Kn) is set to “000111”, “YES” is determined thereafter in step SP12 of the main routine, and the process proceeds to step SP56. Here, it is determined whether or not the second contact 12 is in an off state. If it is not in the off state, it is determined as “NO”, and the process proceeds to step SP72. Accordingly, no substantial processing is performed in such a state.
[0033]
Here, when the key release of the key number Kn is started, the second contact 12 is eventually turned off. Thereafter, when the process proceeds to step SP56, “YES” is determined here, the process proceeds to step SP58, and the status register STATUS (Kn) is set to “000101”. That is, since the second contact 12 is turned off, the first bit is set to “0”.
[0034]
Thereafter, in the main routine, for the key number Kn, the process proceeds to step SP60 via step SP14. Here, it is determined whether or not the second contact 12 is turned on. In the normal key release state, the second contact 12 once turned off is not turned on. Therefore, it is determined as “NO” here, and the process proceeds to step SP64 to determine whether or not the first contact 10 is in the OFF state. If the first contact 10 has not yet been turned off, “NO” is determined here, and the process proceeds to step SP72.
[0035]
Thereafter, in the main routine, for the key number Kn, steps SP14, SP60, and SP64 are repeated until the first contact 10 is turned off and no substantial processing is performed. Thereafter, when the key is further raised and the first contact 10 is turned off, “YES” is determined in step SP64, and the process proceeds to step SP66. Here, a key-off signal with a key number Kn is transmitted from the key scan CPU 54 to the system CPU 64. As a result, like the known electronic musical instrument, the system CPU 64 executes the mute processing related to the key number Kn.
[0036]
Next, when the process proceeds to step SP68, the status register STATUS (Kn) is set to “000000”, that is, the initial state. Next, when the process proceeds to step SP70, the time difference measurement counter TDC (Kn) assigned to the key number Kn is released and can be assigned to the time difference measurement of other keys.
[0037]
3.3. Operation when time difference measurement counter cannot be assigned
In step SP18 described above, it is determined whether or not the time difference measurement counter TDC (Kn) can be assigned to the key number Kn, that is, whether or not there is an empty time difference measurement counter. If the assignment is impossible, the process proceeds to step SP26, and the status register STATUS (Kn) is set to “000001”. That is, the 0th bit is set to “1” because the first contact 10 is turned on, but the 4th bit remains “0” because the velocity is not measured. .
[0038]
Thereafter, when the process after step SP4 is executed again for the key number Kn, it is determined as “YES” in step SP6, and the process proceeds to step SP28. Here, it is determined whether or not the first contact 10 is in an off state. If “NO” is determined here, no substantial processing is performed, but if “YES” is determined, the processing proceeds to step SP30 and the status register STATUS (Kn) is set to “000000” (initial state). Returned. Eventually, if the counter TDC (Kn) cannot be assigned, no key-on signal or key-off signal is transmitted to the system CPU 64 in response to the key operation, and no sound is produced.
[0039]
3.4. Processing for shallow key press operations
When a shallow key pressing operation is performed, the first contact 10 is first turned on, the second contact 12 is not turned on, and the first contact 10 is turned off after a relatively long time has elapsed. become. The operation in such a case will be described. First, if the first contact 10 is turned on in the initial state (status register STATUS (Kn) = “000000”) and the time difference measurement counter TDC (Kn) can be allocated, the above steps SP20 to SP24 are performed. Through the processing, the status register STATUS (Kn) is set to “010001”.
[0040]
Next, until the change appears at the first or second contact 12, the determination of steps SP8, SP32, and SP38 is executed for the key number Kn, but no substantial processing is executed in the main routine. During this period, the counter TDC (Kn) is incremented by “1” every time a timer interrupt occurs. If the first contact 10 is turned off, “YES” is determined in step SP32, and the process proceeds to step SP34.
[0041]
Here, the value of the retrigger timer RTRGTM (Kn) is set to “0”, and the retrigger timer RTRGTM (Kn) is set to the START state. Next, when the process proceeds to step SP36, the status register STATUS (Kn) is set to “010000”. That is, since the first contact 10 is turned off, the 0th bit is set to “0”. However, since this is merely a possibility of chattering, the 4th bit is set to continue the velocity measurement state. It is held as “1”.
[0042]
Next, when the processing after step SP4 is executed again in the main routine, it is determined as “YES” in step SP10, and the processing proceeds to step SP50. Here, it is determined whether or not the first contact 10 is on. Here, since the first contact 10 has already been turned off, it is determined as “NO”, and the process proceeds to step SP72 via step SP38. Thereafter, similarly, in the main routine, steps SP10, SP50, and SP38 are repeated for the key number Kn, but no substantial processing is executed.
[0043]
On the other hand, in the above example, since the counter TDC (Kn) is set to the START state and the status register STATUS (Kn) is set to “010000”, when the timer processing routine is called, the process goes through steps SP104 and SP106. Proceed to step SP112. Here, it is determined whether or not the count result of the counter TDC (Kn) (that is, the interval at which the first contact 10 is turned on / off) is less than a predetermined chattering threshold TDCchtr. Note that the chattering threshold TDCchtr is set to the maximum chattering cycle (for example, 30 msec) that normally occurs.
[0044]
When the first contact 10 is turned on / off by a shallow key pressing operation, the count result of the counter TDC (Kn) is sufficiently larger than the chattering threshold TDCchtr. Therefore, it is determined as “NO” in step SP112, and the processing Advances to step SP114. Here, the time difference measurement counter TDC (Kn) is set to the STOP state and released, and the status register STATUS (Kn) is set to “000000”, that is, the initial state. As described above, for a shallow key pressing operation in which the second contact 12 is not turned on, neither a key-on signal nor a key-off signal is transmitted to the system CPU 64, so that no sound is generated.
[0045]
3.5. Processing when chattering occurs at the first contact 10
Next, processing when chattering occurs at the first contact 10 will be described. When chattering occurs at the first contact 10, on / off is repeated at the first contact 10 before the second contact 12 is turned on.
First, when the first contact 10 is first turned on in the initial state (status register STATUS (Kn) = “000000”), as in the case where the “shallow key pressing operation” is performed, the corresponding key number Kn. Is assigned a time difference measurement counter TDC (Kn), and the status register STATUS (Kn) is set to “010001” through the processing of steps SP20 to SP24. Thereafter, every time a timer interrupt occurs, the counter TDC (Kn) is incremented by “1”.
[0046]
Next, when the first contact 10 is turned off, the retrigger timer RTRGTM (Kn) is returned to “0” in steps SP34 and SP36, and the retrigger timer RTRGTM (Kn) is set to the START state. The status register STATUS (Kn) is set to “010000”. Next, when a timer interrupt occurs, in step SP112, it is determined whether or not the count result of the counter TDC (Kn) is less than a predetermined chattering threshold TDCchtr. When chattering occurs, the first contact 10 is frequently turned on / off, so that the count result is less than the chattering threshold TDCchtr. Therefore, here, it is determined as “YES”, the process proceeds to step SP108, and the update of the counter TDC (Kn) is continued.
[0047]
Further, when the retrigger timer RTRGTM (Kn) is set to the START state, “YES” is determined in step SP126 of the timer processing routine. Next, in step SP128, the retrigger timer RTRGTM (Kn) is incremented by “1”. Next, when the process proceeds to step SP130, it is determined whether or not the status register STATUS (Kn) is “010000”. First, since the status register STATUS (Kn) is set to “010000” in step SP36, it is determined “YES” here, and the process proceeds to step SP132. In step SP132, it is determined whether or not the value of the retrigger timer RTRGTM (Kn) is equal to or greater than the retrigger timer maximum value RTRGTMmax. If "NO" is determined here, the process proceeds to step SP136, and the timer process ends for the key number Kn.
[0048]
If the retrigger timer RTRGTM (Kn) reaches the retrigger timer maximum value RTRGTMmax, the process proceeds to step SP132, and the status register STATUS (Kn) is set to “000000”, that is, the initial state. However, as described above, in the situation where chattering occurs, the first contact 10 is frequently turned on and off, so that the first contact 10 is again turned on before the value of the retrigger timer RTRGTM (Kn) reaches the retrigger timer maximum value RTRGTMmax. Turns on. When the first contact 10 is turned on again, “YES” is determined in step SP50 of the main routine, and the process proceeds to step SP52. Here, the time difference measurement counter TDC (Kn) is set to “0”, and the counter TDC (Kn) is set to the START state again. Next, when the process proceeds to step SP54, the status register STATUS (Kn) is set to “010001”.
[0049]
Thereafter, similarly, when the first contact 10 is turned off, the retrigger timer RTRGTM (Kn) is returned to “0” in steps SP34 and SP36, and the status register STATUS (Kn) is set to “010000”. When the first contact 10 is turned on, the count result of the counter TDC (Kn) is returned to “0” in steps SP52 and SP54, and the time difference measurement counter TDC (Kn) is set to the START state again. The status register STATUS (Kn) is set to “010001”. These two states are repeated alternately while chattering continues.
[0050]
When the key with the key number Kn is further pressed down, the second contact 12 is turned on. Since the case where the chattering of the first contact 10 is completed at this time and the case where the first contact 10 is continuing can be considered, the subsequent operation will be described separately.
[0051]
3.5.1. When the second contact 12 is turned on after the chattering of the first contact 10 is completed.
When the chattering of the first contact 10 is completed, the first contact 10 is stabilized in the on state. That is, in steps SP52 and SP54, the counter TDC (Kn) is set to the START state, and the status register STATUS (Kn) is set to “010001”. As a result, the count of the counter TDC (Kn) is restarted.
[0052]
The subsequent operation is the same as in the case of “normal key operation”. That is, when the second contact 12 is turned on, “YES” is determined in step SP38, and the processes of steps SP40 to SP48 are executed. In step SP40, the velocity VEL depends on the count result of the counter TDC (Kn), in other words, the time until the second contact 12 is first turned on after the first contact 10 is finally stabilized. (Kn) is calculated and a key-on signal is transmitted to the system CPU 64.
[0053]
3.5.2. When the second contact 12 is turned on during chattering of the first contact 10
When “the first contact 10 is chattering”, there are a case where the first contact 10 is in an on state and a case where it is in an off state. If the first contact 10 is in the on state, the determination processing in steps SP8, SP32, and SP38 is repeated in the main routine, so that the second contact 12 is in the on state and the processing after step SP40 is executed. In other words, in such a case, the same process as “when the second contact 12 is turned on after the chattering of the first contact 10 is finished” is executed.
[0054]
On the other hand, if the first contact 10 is in the off state, the determination process of steps SP10, SP50, SP38 is repeated. Here, when the second contact 12 is turned on, the processing after step SP40 is executed via step SP38. Here, since the time difference measurement counter TDC (Kn) starts counting from when the first contact 10 is first turned on, the second contact after the first contact 10 is finally turned on. Velocity VEL (Kn) is calculated based on the count result until 12 is turned on.
[0055]
4). Effects of the embodiment
Hereinafter, with reference to FIG. 3 and FIG. 4, the effect of this embodiment with respect to various chattering assumed will be described. These diagrams are waveform diagrams showing the on / off states of the first and second contacts 12 with negative logic when chattering or the like occurs in various modes.
[0056]
(1) In FIG. 3 (a), the first contact 10 is turned on first, the second contact 12 is then turned on, and chattering occurs at the first contact 10 after that. Indicates. When the second contact 12 is turned on, the status register STATUS (Kn) is set to “001111” in step SP48, and further set to “000111” in step SP124 when the mask timer maximum value MASKTMmax has elapsed. In any case, since the on / off state of the first contact 10 does not affect the processing, the influence of chattering can be eliminated.
[0057]
(2) FIG. 3B shows a waveform diagram when chattering occurs at the second contact 12 after the first and second contacts 12 are sequentially turned on. As described above, when the second contact 12 is turned on, the status register STATUS (Kn) is set to “001111” and then set to “000111”. When the second contact 12 is turned off, the status register STATUS (Kn) is set to “000101” in step SP58. However, the second contact 12 is turned on again before the first contact 10 is turned off. When the state is reached, the register STATUS (Kn) is set to “000111” again through steps SP60 and SP62. Thereby, after that, the same operation as the case where there is no chattering of the second contact 12 is executed, and the influence of chattering of the second contact 12 can be eliminated.
[0058]
(3) In FIG. 4 (a), after the first and second contacts 12 are sequentially turned on, before the mask time corresponding to the mask timer maximum value MASKTMmax elapses, A waveform diagram when chattering occurs simultaneously is shown. Here, the background in which such chattering occurs will be described.
[0059]
In a natural musical instrument piano, a hammer action is lifted by pressing a key, and a musical sound is generated when the hammer strikes a string. When the hammer action returns to the reference position, it collides with the key, and the player can feel the shock at the fingertip. Therefore, in order to reproduce such a piano touch in an electronic piano, a mechanism that gives a shock to the key is added. However, if such a shock is applied to the key, both the first and second contacts 12 may be turned off. FIG. 4A assumes such a state.
[0060]
Before the mask time elapses, the register STATUS (Kn) is set to “001111”, and the ON / OFF state of the first and second contacts 12 during this period has no effect on the processing. Therefore, chattering peculiar to a piano touch can be eliminated. Needless to say, the mask timer maximum value MASKTMmax is determined according to the characteristics of the mechanism portion that gives the piano touch.
[0061]
(4) In FIG. 4B, chattering occurs after the first contact 10 is once turned on, and the second contact 12 is turned on during the chattering when the first contact 10 is turned off. The waveform diagram in the case of Such a chattering may occur when the contact point is configured by a member that is elastically deformed as in the present embodiment. In such a case, as described in “When the second contact 12 is turned on during chattering of the first contact 10”, the second contact 12 is turned on after the first contact 10 is turned on last. Since the velocity VEL (Kn) is determined according to the time until the on state, the influence of chattering in this state can be eliminated.
[0062]
(5) FIG. 4 (c) shows a waveform diagram when the first contact 10 is stabilized in the on state after chattering occurs in the first contact 10, and then the second contact 12 is turned on. . Also in this example, since the velocity VEL (Kn) is determined according to the time from when the first contact 10 is finally turned on to when the second contact 12 is turned on, the chattering of the first contact 10 is determined. The influence of can be eliminated.
[0063]
(6) FIG. 4D shows a waveform diagram when the first contact 10 is stabilized in the ON state after the chattering occurs in the first contact 10 and the second contact 12 is held in the OFF state. In this example, after the first contact 10 is turned on, the status register STATUS (Kn) returns to “000000” on condition that the chattering threshold TDCchtr has elapsed. Therefore, when the second contact 12 is turned on within this period, it is possible to generate a key-on signal even if the first contact 10 is turned off.
[0064]
5. Modified example
The present invention is not limited to the above-described embodiment, and various modifications can be made as follows, for example.
(1) In each of the above embodiments, the key-on / key-off event detection process is performed in the key scan CPU 54. However, the above-described processes may be performed in the system CPU 64. Similarly, each component of the electronic keyboard instrument including key-on / key-off event detection processing may be configured by software operating on various computers. In this case, the software can be stored in a recording medium such as a CD-ROM or a floppy disk and distributed, or can be distributed through a transmission path.
[0065]
【The invention's effect】
As described above, according to the present invention, since the operation speed information is output based on the timing at which the first operation detecting unit last changed from the first state to the second state, the influence of chattering is prevented. The operation speed can be detected while the operation is being performed.
[Brief description of the drawings]
FIG. 1 is a block diagram of an electronic keyboard instrument according to an embodiment of the present invention.
FIG. 2 is a memory map of the embodiment.
FIG. 3 is a waveform diagram of the embodiment.
FIG. 4 is a waveform diagram in another state of the embodiment.
FIG. 5 is a flowchart (1/2) of the main routine of the embodiment.
FIG. 6 is a flowchart (2/2) of the main routine of the embodiment.
FIG. 7 is a flowchart of a timer processing routine of the embodiment.
FIG. 8 is a diagram showing a contact structure in the prior art and the above embodiment.
[Explanation of symbols]
1 ... inner pattern, 2 ... outer pattern, 3 ... common pattern, 4 ... inner pair, 5 ... outer pair, 6 ... fixed contact, 10 ... first contact, 12 ... second contact, 25... 1st movable contact, 26... 2nd movable contact, 27... 2 make switch, 29... Pressing part, 52 .. keyboard, 54 .. key scan CPU, 56. , 60 ... bus, 62 ... internal bus, 64 ... system CPU, 66 ... ROM, 68 ... RAM, 70 ... operation display section, 72 ... sound source section, 74 ... bus, 562 ... CPU Program area, 564 ... Preset data area, 582 ... CPU work area, 584 ... TDC area, 586 ... MASKTM area, 588 ... RTRGTM area, 590 ... Status register area.

Claims (3)

操作子の操作によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する操作速度情報出力方法であって、
前記第1の操作検出手段の、第1の状態から第2の状態への変化を検出して時間測定を開始する第1検出過程と、
該第1検出過程の後に、前記第1の操作検出手段の、前記第2の状態から前記第1の状態への変化を検出する第2検出過程と、
該第2検出過程の後に、前記第1の操作検出手段の、前記第1の状態から前記第2の状態への変化を検出すると、前記第1検出過程において開始された時間測定をクリアして再度時間測定を開始する第3検出過程と、
該第3検出過程の後に、前記第2の操作検出手段の状態変化を検出する第4検出過程と、
前記第4検出過程における時間測定結果に基づいて前記操作速度情報を出力する出力過程と
を有することを特徴とする操作速度情報出力方法。
Using the first and second operation detection means whose detection state changes according to the operation of the operation element, the operation speed of the operation element is based on the time interval at which the detection state of the first and second operation detection means changes. An operation speed information output method for outputting information,
A first detection step of detecting a change from the first state to the second state of the first operation detecting means to start time measurement;
A second detection step of detecting a change from the second state to the first state of the first operation detection means after the first detection step;
After detecting the change of the first operation detecting means from the first state to the second state after the second detection step, the time measurement started in the first detection step is cleared. A third detection process in which time measurement is started again;
A fourth detection process for detecting a change in state of the second operation detection means after the third detection process;
An operation speed information output method comprising: an output process of outputting the operation speed information based on a time measurement result in the fourth detection process.
操作子の操作によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する操作速度情報出力装置であって、
前記第1の操作検出手段の、第1の状態から第2の状態への変化を検出して時間測定を開始する第1検出手段と、
該第1検出手段が前記時間測定を開始した後に、前記第1の操作検出手段の、前記第2の状態から前記第1の状態への変化を検出する第2検出手段と、
該第2検出手段が前記第2の状態から前記第1の状態への変化を検出した後に、前記第1の操作検出手段の、前記第1の状態から前記第2の状態への変化を検出すると、前記第1検出手段において開始された時間測定をクリアして再度時間測定を開始する第3検出手段と、
該第3検出手段によって前記時間測定が再度開始された後に、前記第2の操作検出手段の状態変化を検出する第4検出手段と、
前記第4検出手段が前記第2の操作検出手段の状態変化を検出した際の時間測定結果に基づいて前記操作速度情報を出力する出力手段と
を有することを特徴とする操作速度情報出力装置。
Using the first and second operation detection means whose detection state changes according to the operation of the operation element, the operation speed of the operation element is based on the time interval at which the detection state of the first and second operation detection means changes. An operation speed information output device for outputting information,
First detection means for detecting a change of the first operation detection means from the first state to the second state and starting time measurement;
Second detection means for detecting a change of the first operation detection means from the second state to the first state after the first detection means starts the time measurement;
After the second detection means detects a change from the second state to the first state, the first operation detection means detects a change from the first state to the second state. Then, the third detection means for clearing the time measurement started in the first detection means and starting the time measurement again,
A fourth detection means for detecting a change in state of the second operation detection means after the time measurement is started again by the third detection means;
Output means for outputting the operation speed information based on a time measurement result when the fourth detection means detects a state change of the second operation detection means;
An operation speed information output device comprising:
操作子の操作によって検出状態が変化する第1および第2の操作検出手段を用いて、これら第1および第2の操作検出手段の検出状態が変化する時間間隔に基づいて該操作子の操作速度情報を出力する処理をコンピュータに実行させるプログラムを記録した記録媒体であって、前記プログラムは、
前記第1の操作検出手段の、第1の状態から第2の状態への変化を検出して時間測定を開始する第1検出過程と、
該第1検出過程の後に、前記第1の操作検出手段の、前記第2の状態から前記第1の状態への変化を検出する第2検出過程と、
該第2検出過程の後に、前記第1の操作検出手段の、前記第1の状態から前記第2の状態への変化を検出すると、前記第1検出過程において開始された時間測定をクリアして再度時間測定を開始する第3検出過程と、
該第3検出過程の後に、前記第2の操作検出手段の状態変化を検出する第4検出過程と、
前記第4検出過程における時間測定結果に基づいて前記操作速度情報を出力する出力過程と
を前記コンピュータに実行させるプログラムを記憶したことを特徴とする記録媒体。
Using the first and second operation detection means whose detection state changes according to the operation of the operation element, the operation speed of the operation element is based on the time interval at which the detection state of the first and second operation detection means changes. A recording medium recording a program for causing a computer to execute a process of outputting information, wherein the program is
A first detection step of detecting a change from the first state to the second state of the first operation detecting means to start time measurement;
A second detection step of detecting a change from the second state to the first state of the first operation detection means after the first detection step;
After detecting the change of the first operation detecting means from the first state to the second state after the second detection step, the time measurement started in the first detection step is cleared. A third detection process in which time measurement is started again;
A fourth detection process for detecting a change in state of the second operation detection means after the third detection process;
An output process for outputting the operation speed information based on a time measurement result in the fourth detection process;
The recording medium which memorize | stored the program which makes the said computer execute .
JP2001039603A 2001-02-16 2001-02-16 Operation speed information output method, operation speed information output device, and recording medium Expired - Fee Related JP3695337B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001039603A JP3695337B2 (en) 2001-02-16 2001-02-16 Operation speed information output method, operation speed information output device, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001039603A JP3695337B2 (en) 2001-02-16 2001-02-16 Operation speed information output method, operation speed information output device, and recording medium

Publications (2)

Publication Number Publication Date
JP2002244662A JP2002244662A (en) 2002-08-30
JP3695337B2 true JP3695337B2 (en) 2005-09-14

Family

ID=18902355

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001039603A Expired - Fee Related JP3695337B2 (en) 2001-02-16 2001-02-16 Operation speed information output method, operation speed information output device, and recording medium

Country Status (1)

Country Link
JP (1) JP3695337B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4320782B2 (en) 2006-03-23 2009-08-26 ヤマハ株式会社 Performance control device and program
JP4855202B2 (en) * 2006-10-06 2012-01-18 株式会社河合楽器製作所 Electronic keyboard instrument
JP5939068B2 (en) * 2012-07-25 2016-06-22 ヤマハ株式会社 Electronic keyboard instrument

Also Published As

Publication number Publication date
JP2002244662A (en) 2002-08-30

Similar Documents

Publication Publication Date Title
JPH02259696A (en) Touch controller for automatic playing piano
JPH03269596A (en) Electronic percussion instrument
JP3695337B2 (en) Operation speed information output method, operation speed information output device, and recording medium
JP2012022095A (en) Electronic musical instrument
JP3561947B2 (en) Performance detection device and electronic musical instrument
US5452270A (en) Melody alarm timepiece
US10657941B2 (en) Electronic musical instrument and lesson processing method for electronic musical instrument
JP4361327B2 (en) Electronic musical instrument performance evaluation device
US9905209B2 (en) Electronic keyboard musical instrument
JP4808868B2 (en) Automatic performance device
JPH0259474B2 (en)
JP2018054767A (en) Electronic musical instrument, its sound production control method, and program
JP2011064728A (en) Electronic keyboard instrument
JP3254062B2 (en) piano
JPH0727383B2 (en) Autorhythm device
US10522127B2 (en) Conversion-to-note apparatus, electronic wind instrument and conversion-to-note method
JP3785526B2 (en) Electronic musical instruments
JP2530744Y2 (en) Electronic musical instrument
US20250124903A1 (en) Information processing apparatus configured to perform control based on performance actions
US20240119918A1 (en) Automatic performing apparatus and automatic performing program
JPH0745116Y2 (en) Sequencer data input device for digital musical instruments
JP5449963B2 (en) Automatic melody performance device and program for automatic melody performance function
KR0120526Y1 (en) Keyboard Touch Recognition Device for Electronic Keyboard Instruments
JP3217956B2 (en) Pseudo action hammer
JP3380601B2 (en) Compound piano auto-off device

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20050228

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050315

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050513

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20050620

R150 Certificate of patent or registration of utility model

Ref document number: 3695337

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20090708

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20100708

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20110708

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20120708

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20130708

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees