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 PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims description 107
- 230000008569 process Effects 0.000 claims description 99
- 238000001514 detection method Methods 0.000 claims description 95
- 238000005259 measurement Methods 0.000 claims description 51
- 230000008859 change Effects 0.000 claims description 27
- 244000145845 chattering Species 0.000 description 42
- 238000012545 processing Methods 0.000 description 36
- KTTKGQINVKPHLY-DOCRCCHOSA-N 5a,6-anhydrotetracycline Chemical compound C1=CC(O)=C2C(O)=C(C(=O)[C@@]3(O)[C@H]([C@@H](C(C(C(N)=O)=C3O)=O)N(C)C)C3)C3=C(C)C2=C1 KTTKGQINVKPHLY-DOCRCCHOSA-N 0.000 description 34
- 238000010586 diagram Methods 0.000 description 11
- 102100040791 Zona pellucida-binding protein 1 Human genes 0.000 description 10
- 238000003825 pressing Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 8
- 230000007704 transition Effects 0.000 description 6
- 102100022907 Acrosin-binding protein Human genes 0.000 description 5
- 102100031798 Protein eva-1 homolog A Human genes 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 101000756551 Homo sapiens Acrosin-binding protein Proteins 0.000 description 3
- 102100032320 Transcription factor Sp8 Human genes 0.000 description 3
- 230000035939 shock Effects 0.000 description 3
- 230000005236 sound signal Effects 0.000 description 3
- 101000642536 Apis mellifera Venom serine protease 34 Proteins 0.000 description 2
- 101100478055 Dictyostelium discoideum cotC gene Proteins 0.000 description 2
- 101100333868 Homo sapiens EVA1A gene Proteins 0.000 description 2
- 102100022465 Methanethiol oxidase Human genes 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000000994 depressogenic effect Effects 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000000881 depressing effect Effects 0.000 description 1
- 230000006266 hibernation Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
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記載の構成にあっては、操作子の操作(押鍵)によって検出状態が変化する第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検出過程における時間測定結果に基づいて前記操作速度情報を出力する出力過程とを有することを特徴とする。
また、請求項2記載の構成にあっては、操作子の操作によって検出状態が変化する第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の操作検出手段の状態変化を検出した際の時間測定結果に基づいて前記操作速度情報を出力する出力手段とを有することを特徴とする。
また、請求項3記載の構成にあっては、操作子の操作によって検出状態が変化する第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
[0004]
The
[0005]
In the two-
[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.
[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,
[0009]
The
[0010]
2. Data structure of the embodiment
Next, the data structure stored in the
In FIG. 6A, the
[0011]
In FIG. 5B, a
[0012]
Further, in the present embodiment, when the on / off state of the
[0013]
A
[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
[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
[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
[0017]
Here, it is determined whether or not the
[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
[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
[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
[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
[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
[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
[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
[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
[0033]
Here, when the key release of the key number Kn is started, the
[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
[0035]
Thereafter, in the main routine, for the key number Kn, steps SP14, SP60, and SP64 are repeated until the
[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
[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
[0039]
3.4. Processing for shallow key press operations
When a shallow key pressing operation is performed, the
[0040]
Next, until the change appears at the first or
[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
[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
[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
[0044]
When the
[0045]
3.5. Processing when chattering occurs at the
Next, processing when chattering occurs at the
First, when the
[0046]
Next, when the
[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
[0049]
Thereafter, similarly, when the
[0050]
When the key with the key number Kn is further pressed down, the
[0051]
3.5.1. When the
When the chattering of the
[0052]
The subsequent operation is the same as in the case of “normal key operation”. That is, when the
[0053]
3.5.2. When the
When “the
[0054]
On the other hand, if the
[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
[0056]
(1) In FIG. 3 (a), the
[0057]
(2) FIG. 3B shows a waveform diagram when chattering occurs at the
[0058]
(3) In FIG. 4 (a), after the first and
[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
[0060]
Before the mask time elapses, the register STATUS (Kn) is set to “001111”, and the ON / OFF state of the first and
[0061]
(4) In FIG. 4B, chattering occurs after the
[0062]
(5) FIG. 4 (c) shows a waveform diagram when the
[0063]
(6) FIG. 4D shows a waveform diagram when the
[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
[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の操作検出手段の、第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の操作検出手段の、第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の操作検出手段の、第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 .
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)
| 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 |
-
2001
- 2001-02-16 JP JP2001039603A patent/JP3695337B2/en not_active Expired - Fee Related
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 |