JP2712361B2 - Key operation detection device for electronic musical instruments - Google Patents

Key operation detection device for electronic musical instruments

Info

Publication number
JP2712361B2
JP2712361B2 JP63221006A JP22100688A JP2712361B2 JP 2712361 B2 JP2712361 B2 JP 2712361B2 JP 63221006 A JP63221006 A JP 63221006A JP 22100688 A JP22100688 A JP 22100688A JP 2712361 B2 JP2712361 B2 JP 2712361B2
Authority
JP
Japan
Prior art keywords
key
value
ksw
pressing depth
pressing
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 - Lifetime
Application number
JP63221006A
Other languages
Japanese (ja)
Other versions
JPH0268600A (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 JP63221006A priority Critical patent/JP2712361B2/en
Publication of JPH0268600A publication Critical patent/JPH0268600A/en
Application granted granted Critical
Publication of JP2712361B2 publication Critical patent/JP2712361B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、キータッチの強さに応じて音高、音色、
音量等の楽音特性が制御される電子楽器に関し、特にキ
ー操作検出部の改良に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention relates to pitch, timbre,
The present invention relates to an electronic musical instrument whose tone characteristics such as volume are controlled, and more particularly to an improvement of a key operation detecting unit.

[発明の概要] この発明は、キー押下に伴ってキーオフ検知点より深
いところでキータッチの強さ及びキーオンを検知するこ
とにより速やかな連打演奏を簡単に行なえるようにした
ものである。
[Summary of the Invention] The present invention is intended to easily perform a rapid continuous playing by detecting the intensity of key touch and the key-on at a depth deeper than a key-off detection point with a key depression.

[従来の技術] 従来、キータッチの強さに応じて楽音特性が制御され
る電子楽器としては、各キー毎にキー押下に伴って順次
にオンする第1及び第2のキースイッチを設け、第1の
キースイッチのオン時から第2のキースイッチのオン時
までの時間を計測して押鍵速度に対応したタッチデータ
を発生すると共に第2のキースイッチのオン時にキーオ
ン信号を発生し、このキーオン信号に応じて発生される
楽音信号の楽音特性をタッチデータに応じて制御するよ
うにしたものが知られている(例えば特公昭58−57119
号公報参照)。この場合、発生された楽音信号は、キー
の復帰に伴って第1のキースイッチがオフしたときに発
生されるキーオフ信号に応じて減衰制御される。
[Prior Art] Conventionally, as an electronic musical instrument whose tone characteristics are controlled in accordance with the strength of key touch, first and second key switches that are sequentially turned on in response to key depression for each key are provided, Measuring the time from when the first key switch is turned on to when the second key switch is turned on, generates touch data corresponding to the key-depression speed, and generates a key-on signal when the second key switch is turned on; It is known that the tone characteristics of a tone signal generated in response to the key-on signal are controlled in accordance with touch data (for example, Japanese Patent Publication No. 58-57119).
Reference). In this case, the generated tone signal is attenuated in accordance with a key-off signal generated when the first key switch is turned off with the return of the key.

[発明が解決しようとする課題] 上記した従来技術によると、第1のキースイッチがキ
ータッチの強さ検出及びキーオフ検出に兼用されている
ため、キーの押下に伴って楽音信号が発生された後は第
1のキースイッチを一旦オフさせなければ再度同一キー
を押下してもキーの再押下に対応した楽音信号を発生さ
せることができない。換言すれば、同一キーを連打する
ときは、第1のキースイッチがオフするように十分なス
トロークでキー操作を行なうことでキー押下毎に楽音信
号を発生させることができるが、キーストロークが大き
いと、例えばグランドピアノにおける連打演奏のような
速やかな連打演奏を行なうのが困難であり、演奏表現や
制約される不都合があった。
[Problems to be Solved by the Invention] According to the above-described related art, since the first key switch is also used for detecting the strength of key touch and for detecting key-off, a tone signal is generated in response to a key press. After that, unless the first key switch is once turned off, even if the same key is pressed again, a tone signal corresponding to the key pressing again cannot be generated. In other words, when the same key is repeatedly struck, a tone signal can be generated each time the key is pressed by performing the key operation with a sufficient stroke so that the first key switch is turned off, but the key stroke is large. For example, it is difficult to perform a rapid continuous performance such as a continuous performance on a grand piano, and there are inconveniences such as performance expression and restrictions.

この発明の目的は、速やかな連打演奏を簡単に行なえ
るようにすることにある。
SUMMARY OF THE INVENTION An object of the present invention is to make it possible to easily perform a rapid continuous performance.

[課題を解決するための手段] この発明による電子楽器のキー操作検出装置は、第1
及び第2の検知手段をそなえている。
[Means for Solving the Problems] A key operation detecting device for an electronic musical instrument according to the present invention comprises:
And second detection means.

第1の検知手段は、キーが第1の押下深さより深く押
下された後該第1の押下深さより浅く復帰したことを検
知してキーオフ信号を発生するものである。
The first detecting means generates a key-off signal by detecting that the key is pressed deeper than the first pressing depth and then returns to a depth smaller than the first pressing depth.

第2検知手段は、上記キーが第1の押下深さより深い
第2の押下深さを越えて押下されるたびにキータッチの
強さに応じたタッチデータを発生すると共にキーの押下
に応じてキーオン信号を発生するものである。ここで、
キータッチの強さは、押圧力又は押鍵速度の形で検知可
能である。
The second detecting means generates touch data in accordance with the strength of the key touch each time the key is pressed beyond a second pressing depth which is deeper than the first pressing depth, and in response to the pressing of the key. A key-on signal is generated. here,
The strength of key touch can be detected in the form of pressing force or key pressing speed.

第2の検知手段は、上記キーが第1の押下深さを経て
から第2の押下深さを越えて押下されたとき(単打時)
と、第1の押下深さを経てから該第1の押下深さに戻ら
ずに第2の押下深さを越えて再押下されたとき(連打
時)とでは、強さ同一のキータッチに対して値の異なる
タッチデータを発生するように構成してもよい。
The second detecting means is provided when the key is pressed beyond the second pressing depth after passing through the first pressing depth (at the time of single hit).
And when the key is pressed again beyond the second pressing depth without returning to the first pressing depth after passing through the first pressing depth (at the time of continuous striking), Alternatively, it may be configured to generate touch data having different values.

[作用] この発明の構成によれば、キーが第1の押下深さを経
てから第2の押下深さを越えて押下されると、そのとき
のキータッチの強さに応じたタッチデータ及びキー押下
に応じたキーオン信号が発生されるので、これらのタッ
チデータ及びキーオン信号に基づいて楽音信号を発生可
能である。この後、キーが例えば離鍵に伴って第1の押
下深さより浅く復帰すると、キーオフ信号が発生される
ので、このキーオフ信号に応じて発生中の楽音信号を減
衰制御することができる。
[Operation] According to the configuration of the present invention, when a key is pressed beyond the second pressing depth after passing through the first pressing depth, the touch data and the touch data corresponding to the strength of the key touch at that time are obtained. Since a key-on signal is generated in response to a key depression, a tone signal can be generated based on the touch data and the key-on signal. Thereafter, when the key returns to a position shallower than the first pressing depth, for example, due to the key release, a key-off signal is generated, so that the tone signal being generated can be attenuated in accordance with the key-off signal.

また、キー押下に伴ってタッチデータ及びキーオン信
号が発生された後、第1の押下深さまで戻らずにキーを
再押下したときにも、タッチデータ及びキーオン信号が
発生され、これに応じて楽音信号を発生可能である。従
って、小さなキーストロークで速やかな連打演奏を行な
えるようになる。
Also, after the touch data and the key-on signal are generated in accordance with the key press and the key is pressed again without returning to the first pressing depth, the touch data and the key-on signal are generated, and the musical tone is correspondingly generated. A signal can be generated. Therefore, it is possible to perform rapid continuous performance with small keystrokes.

上記したように、第2の検知手段から、単打時と連打
時とでは強さ同一のキータッチに対して値を異にするタ
ッチデータを発生させるようにすると、連打時の音高、
音色、音量等の楽音特性を単打時の楽音特性と異なるよ
うに制御することができ、例えばグランドピアノの連打
演奏を模擬するのに好都合である。
As described above, when the second detection means generates touch data having different values for a key touch having the same strength between a single hit and a continuous hit, the pitch at the time of the continuous hit,
The tone characteristics such as tone and volume can be controlled so as to be different from the tone characteristics at the time of single tapping, which is convenient for simulating continuous playing of a grand piano, for example.

[実施例] 第1図は、この発明の一実施例による電子楽器の回路
構成を示すもので、この電子楽器は、鍵盤操作に基づく
楽音発生がマイクロコンピュータによって制御されるよ
うになっている。
Embodiment FIG. 1 shows a circuit configuration of an electronic musical instrument according to an embodiment of the present invention. In this electronic musical instrument, the tone generation based on keyboard operation is controlled by a microcomputer.

回路構成(第1図) 第1図において、データバス10には、鍵盤回路12、パ
ネルスイッチ回路14、中央処理装置(CPU)16、プログ
ラムメモリ18、レジスタ群20、変換テーブルメモリ22、
トーンジェネレータ(TG)24等が接続されている。
1. Circuit Configuration (FIG. 1) In FIG. 1, the data bus 10 includes a keyboard circuit 12, a panel switch circuit 14, a central processing unit (CPU) 16, a program memory 18, a register group 20, a conversion table memory 22,
A tone generator (TG) 24 and the like are connected.

鍵盤回路12は、マニアル演奏用の鍵盤を含むもので、
鍵盤の各キー毎にキー操作情報が検出されるようになっ
ている。鍵盤は、一例として61個のキーを有するもの
で、各キーネーム毎のキーコード値は予め第2図に示す
ように定められている。キー操作情報の検出について
は、第3図及び第4図を参照して後述する。
The keyboard circuit 12 includes a manual performance keyboard,
Key operation information is detected for each key on the keyboard. The keyboard has 61 keys as an example, and the key code value for each key name is determined in advance as shown in FIG. The detection of the key operation information will be described later with reference to FIGS. 3 and 4.

パネルスイッチ回路14は、音色、音量等を設定するた
めのパネルスイッチを含むもので、スイッチ操作に応じ
た設定情報が検出されるようになっている。
The panel switch circuit 14 includes a panel switch for setting a tone color, a volume, and the like, and detects setting information according to a switch operation.

CPU16は、プログラムメモリ18にストアされたプログ
ラムに従って楽音発生のための各種処理を実行するもの
で、これらの処理については、第5図乃至第11図を参照
して後述する。CPU16には、クロック発生器26から時間
計測用のクロック信号CLKが供給され、このクロック信
号CLKの各パルス毎に第6図のクロック割込みルーチン
が実行されるようになっている。
The CPU 16 executes various processes for generating musical tones in accordance with the programs stored in the program memory 18. These processes will be described later with reference to FIGS. 5 to 11. A clock signal CLK for time measurement is supplied from the clock generator 26 to the CPU 16, and the clock interrupt routine shown in FIG. 6 is executed for each pulse of the clock signal CLK.

レジスタ群20は、CPU16による各種処理に際して利用
される多数のレジスタを含むもので、この発明の実施に
関係するレジスタ類については後述する。
The register group 20 includes a large number of registers used for various processes by the CPU 16, and registers related to the embodiment of the present invention will be described later.

変換テーブルメモリ22は、押鍵速度に対して反比例の
関係にある後述の時間レジスタTIMERの値を押鍵速度に
ほぼ比例した速度データに変換するために使用されるも
ので、TIMERの各値毎にそれに対応する速度データの値C
NVを記憶している。
The conversion table memory 22 is used to convert the value of a time register TIMER, which is inversely proportional to the key pressing speed, into speed data substantially proportional to the key pressing speed. To the corresponding speed data value C
I remember NV.

TG24は、一例として16個の楽音形成チャンネルを有す
るもので、最大で16音まで同時発音可能である。鍵盤で
所望のキーを押すと、そのキーに対応するキーコードが
いずれかの楽音形成チャンネルに割当てられ、割当てに
係るチャンネルではキーオン信号に応じてキーコード対
応の楽音信号が発生開始となり、キーオフ信号に応じて
該楽音信号が減衰開始となる。
The TG 24 has, for example, 16 musical tone forming channels, and can simultaneously generate up to 16 sounds. When a desired key is pressed on the keyboard, a key code corresponding to that key is assigned to one of the tone forming channels, a tone signal corresponding to the key code starts to be generated in response to the key-on signal in the assigned channel, and a key-off signal is generated. , The tone signal starts to decay.

サウンドシステム28は、出力アンプ、スピーカ等を含
むもので、TG24からの楽音信号を楽音として放音するよ
うになっている。
The sound system 28 includes an output amplifier, a speaker, and the like, and emits a tone signal from the TG 24 as a tone.

キー操作検出(第3図及び第4図) 第3図は、1キー分のキースイッチ部の断面構成を示
すものである。
Key Operation Detection (FIGS. 3 and 4) FIG. 3 shows a cross-sectional configuration of a key switch portion for one key.

キー部材KYの下部には、3つの下方突出部A、B、C
が設けられており、各々の突出長をLA、LB、LCとする
と、LA>LB>LCなる関係になっている。
At the bottom of the key member KY, three downward projections A, B, C
Are provided, and when the respective protruding lengths are L A , L B , and L C , a relation of L A > L B > L C is established.

キー部材KYの下方には、ゴム等からなる弾性部材EMが
設けられており、この弾性部材はキー部材KYの下方突出
部材A、B、Cにそれぞれ対応して内部が空洞のクッシ
ョン部a、b、cを有する。
An elastic member EM made of rubber or the like is provided below the key member KY, and the elastic members correspond to the downwardly protruding members A, B, and C of the key member KY, respectively, and the inside has a hollow cushion portion a, b and c.

弾性部材EMのクッション部a、b、cと支持面SSとの
間には、第1、第2、第3のキースイッチKSW1、KSW2
KSW3がそれぞれ形成されている。
First, second and third key switches KSW 1 , KSW 2 , between the cushion portions a, b, c of the elastic member EM and the support surface SS.
KSW 3 is formed respectively.

キー部材KYを矢印P方向に押下すると、キースイッチ
KSW1、KSW2、KSW3は、この記載の順序でオン状態とな
る。また、キー部材KYYは押圧力を解除すると図示の位
置に復帰するが、この復帰の過程にあっては、KSW3、KS
W2、KSW1の順にキースイッチがオフ状態となる。
When the key member KY is pressed in the direction of arrow P, the key switch
KSW 1 , KSW 2 , and KSW 3 are turned on in the order described. When the pressing force is released, the key member KYY returns to the position shown in the figure. In the process of this return, KSW 3 and KS
Key switch is turned off in the order of W 2, KSW 1.

第4図は、キーの押下深さd1〜d3に関してキースイッ
チKSW1〜KSW3の出力信号を示したもので、“0"がオフ状
態、“1"がオン状態にそれぞれ対応する。また、d1〜d3
は、d1<d2<d3の関係にある。
Figure 4 is intended with respect to pressing depth d 1 to d 3 of the key shows the output signal of the key switch KSW 1 ~KSW 3, "0" is turned off, "1" corresponding to the ON state. Also, d 1 to d 3
Are in a relationship of d 1 <d 2 <d 3 .

キーを押下していって第1の押下深さd1に達すると、
KSW1がオンとなり、第2の押下深さd2に達すると、KSW2
がオンとなり、第3の押圧深さd3に達すると、KSW3がオ
ンとなる。そして、キーを離すと、この逆の順序で各キ
ースイッチがオフとなる。
First the pressing reaches a depth d 1 go by pressing the key,
When KSW 1 is turned on, it reaches the second depression depth d 2, KSW 2
There turned on and reaches the third pressing depth d 3, KSW 3 is turned on. When the keys are released, the key switches are turned off in the reverse order.

この実施例では、クロック信号CLKに基づいてKSW2
オン時からKSW3のオン時までの時間(押鍵速度対応時
間)を検出してタッチデータを形成すると共に、KSW3
オンイベントをキーオンタイミングとして検出し、KSW1
のオフイベントをキーオフタイミングとして検出する。
このようにすると、d1まで戻らずにキーを再押下しても
時間検出及びキーオン検出が可能である。
In this embodiment, based on the clock signal CLK, a time (key pressing speed corresponding time) from when the KSW 2 is turned on to when the KSW 3 is turned on is detected to form touch data, and the KSW 3 on event is keyed on. Detect as timing, KSW 1
Is detected as a key-off timing.
In this way, even if re-pressing a key without returning to d 1 are possible time detection and key-on detection.

レジスタ類 レジスタ群20に属するレジスタのうち、この発明の実
施に関係するものを列挙すると、次の通りである。
Registers Among the registers belonging to the register group 20, those related to the embodiment of the present invention are listed as follows.

(1)第1、第2のチャンネルナンバレジスタASS、ASS
2…これらのレジスタは、0〜15のいずれかのチャンネ
ルナンバがセットされるものである。
(1) First and second channel number registers ASS, ASS
2... These registers are for setting any one of channel numbers 0 to 15.

(2)クロックカウンタCOUNT…これは、クロック信号C
LKによる割込みのたびにカウント値が1アップする8ビ
ットのカウンタであって、0〜99のカウント値をとり、
100になるタイミングで0にリセットされる。
(2) Clock counter COUNT: This is a clock signal C
This is an 8-bit counter that counts up by one every time an interrupt is issued by LK.
It is reset to 0 when it reaches 100.

(3)終了カウント値レジスタED0〜ED60…これらのレ
ジスタは、鍵盤の61キーにそれぞれ対応して設けられた
もので、各レジスタには、対応するキーのスイッチKSW3
のオン時(押鍵速度対応時間の計測終了時)においてカ
ウンタCOUNTの値がセットされる。
(3) End count value register ED 0 ~ED 60 ... These registers those provided corresponding to 61 keys of the keyboard, each register of the corresponding key switch KSW 3
Is turned on (when the measurement of the time corresponding to the key pressing speed is completed), the value of the counter COUNT is set.

(4)時間計測フラグENB0〜ENB60…これらは、鍵盤の6
1キーにそれぞれ対応して設けられた1ビットのレジス
タであり、各フラグには、対応するキーのスイッチKSW2
のオン時に“1"がセットされ、対応するキーのスイッチ
KSW3のオン時に“0"がセットされる。すなわち、各フラ
グは、その内容が“1"であることにより対応するキーに
関して押鍵速度対応時間が計測中であることを表わす。
(4) Time measurement flags ENB 0 to ENB 60 .
Each key is a 1-bit register provided corresponding to each key. Each flag has a corresponding key switch KSW 2
Is set to “1” when is turned on, and the corresponding key switch
“0” is set when KSW 3 is turned on. That is, each flag indicates that the key pressing speed corresponding time is being measured for the corresponding key because the content is “1”.

(5)制御変数レジスタi…これは、制御変数iがセッ
トされるものである。
(5) Control variable register i... This is where the control variable i is set.

(6)キーコードバッファレジスタKCBUF0〜KCBUF15
これらのレジスタは、楽音形成用の16チャンネルにそれ
ぞれ対応して設けられたもので、各レジスタ毎にキーコ
ードをストアすることによりチャンネル割当てが行なわ
れる。
(6) Key code buffer registers KCBUF 0 to KCBUF 15 ...
These registers are provided corresponding to the 16 channels for forming a musical tone, respectively, and channel assignment is performed by storing a key code for each register.

(7)キーコードレジスタKEY…これは、キー走査に用
いられるもので、0〜60のいずれかのキーコードがセッ
トされるたびに該キーコード対応のキーについてスイッ
チKSW1〜KSW3のオン又はオフイベントが検知される。
(7) Key code register KEY: This is used for key scanning. Each time any one of the key codes 0 to 60 is set, the switches KSW 1 to KSW 3 are turned on or off for the key corresponding to the key code. An off event is detected.

(8)キーオン/オフフラグKON0〜KON15…これらは、
楽音形成用の16チャンネルにそれぞれ対応して設けられ
た1ビットのレジスタであり、各フラグ“1"ならばキー
オン中であることを表わし、“0"ならばキーオン中でな
いことを表わす。
(8) Key on / off flags KON 0 to KON 15
This is a 1-bit register provided for each of the 16 channels for tone generation. Each flag "1" indicates that the key is on, and "0" indicates that the key is not on.

(9)イベント順序カウンタLVLCNT0〜LVLCNT15…これ
らのカウンタは、楽音形成用の16チャンネルにそれぞれ
対応して設けられたもので、各カウンタには、対応する
チャンネルがキーオンに応じて割当チャンネルとして選
択されたときはFFH(下つきの「H」は16進表記を表わ
す。以下同じ)がセットされ、該チャンネルで発音中の
キーについてキーオフが検出されたときは7FHがセット
される。いずれの場合にも、セットされた値からいずれ
かのキーにイベント(キーオン又はキーオフ)があるた
びに1が減算される。ただし、このような減算が行なわ
れるのは、カウンタの値がFFHセットの場合には80Hにな
るでであり、7FHセットの場合には00Hになるまでであ
る。カウンタLVLCNT0〜LVLCNT15を参照することにより
キーオンイベント発生時からの経過時間が最も長いチャ
ンネル(最古押鍵に係るチャンネル)をサーチ可能とな
る。
(9) Event order counters LVLCNT 0 to LVLCNT 15 ... These counters are provided corresponding to the 16 channels for musical tone formation, respectively. When selected, FF H (the subscript “H” represents hexadecimal notation; the same applies hereinafter) is set, and when key-off is detected for a key that is sounding on the channel, 7F H is set. In any case, 1 is subtracted from the set value every time any key has an event (key on or key off). However, such a subtraction is performed until the counter value becomes 80 H when the counter value is set to FF H and until the counter value becomes 00 H when it is set to 7F H. Elapsed time from the key-on event occurs by referring to the Counter LVLCNT 0 ~LVLCNT 15 becomes searchable longest channel (channel according to the oldest key depression).

(10)サーチ用レジスタLVLMIN…これは、最古押鍵に係
るチャンネルをサーチするのに使用されるもので、カウ
ンタLVLCNT0〜LVLCNT15を順次に調べていって最小値を
与えるカウンタの値が最終的にセットされる。
(10) Search register LVLMIN: This is used to search for the channel related to the oldest key press. The counter LVLCNT 0 to LVLCNT 15 are checked in order, and the value of the counter that gives the minimum value is Finally set.

(11)オーバーフローカウンタMPL0〜MPL60…これらの
カウンタは、鍵盤の61キーにそれぞれ対応して設けられ
たもので、各カウンタは、対応するキーのスイッチKSW2
のオン時にリセットされた後、カウンタCOUNTがカウン
ト値100に達してリセットされるたびに値が1アップす
るものである。
(11) the overflow counter MPL 0 ~MPL 60 ... These counters are those which are provided corresponding to 61 keys of the keyboard, each counter switch corresponding key KSW 2
After the counter is reset when is turned on, the value increases by one each time the counter COUNT reaches the count value 100 and is reset.

(12)キーオフレジスタOFF…これは、発音中のキーに
ついてキーオフがあったとき該キーの割当チャンネルの
ナンバがセットされるものである。
(12) Key-off register OFF: This is used to set the number of the channel assigned to the key that is currently sounding when a key-off occurs.

(13)オールドチャンネルレジスタOLD…これは、最古
押鍵に係るチャンネルをサーチするのに使用されるもの
で、カウンタLVLCNT0〜LVLCNT15を順次に調べていって
最古値を与えるカウンタに対応するチャンネルのナンバ
(最古押鍵に係るチャンネルのナンバ)が最終的にセッ
トされる。
(13) Old Channel register OLD ... This is intended to be used to search the channel according to the earliest depressed key, corresponding to the counter giving the oldest value went sequentially examine counter LVLCNT 0 ~LVLCNT 15 (The number of the channel related to the oldest key press) is finally set.

(14)開始カウント値レジスタST0〜ST60…これらのレ
ジスタは、鍵盤の61キーにそれぞれ対応して設けられた
もので、各レジスタには、対応するキーのスイッチKSW2
のオン時(押鍵速度対応時間の計測開始時)においてカ
ウンタCOUNTの値がセットされる。
(14) Start count value registers ST 0 to ST 60 ... These registers are provided corresponding to the 61 keys of the keyboard, respectively. Each register has a corresponding key switch KSW 2.
Is turned on (at the start of measuring the time corresponding to the key pressing speed), the value of the counter COUNT is set.

(15)時間レジスタTIMER…これは、押鍵速度に対応し
た時間データがストアされるもので、この時間データの
値は、次の(1)式の演算により得られる。
(15) Time register TIMER... This stores time data corresponding to the key pressing speed. The value of this time data is obtained by the calculation of the following equation (1).

MPLKEY×100+(EDKEY−STKEY) …(1) この(1)式において、MPLKEYは、キーオン検出に係
るキーに対応したオーバーフローカウンタ(MPL)の
値、EDKEYは、該キーに対応した終了カウント値レジス
タ(ED)の値、STKEYは、該キーに対応した開始カウン
ト値レジスタ(ST)の値である。
MPL KEY x 100 + (ED KEY- ST KEY ) ... (1) In the equation (1), MPL KEY is the value of the overflow counter (MPL) corresponding to the key related to key-on detection, and ED KEY is the corresponding key. The value of the end count value register (ED), ST KEY, is the value of the start count value register (ST) corresponding to the key.

(16)タッチデータレジスタTOUCH…これは、楽音特性
制御用のタッチデータがストアされるもので、タッチデ
ータの値は、次の(2)式の演算により得られる。
(16) Touch data register TOUCH... This stores the touch data for controlling the tone characteristics, and the value of the touch data is obtained by the calculation of the following equation (2).

WEIGHT×CNV(TMER) …(2) この(2)式において、WEIGHTは、次に述べる係数レ
ジスタの値、CNV(TIMER)は、レジスタTIMERの値に対
応してメモリ22から読出された速度データの値である。
WEIGHT × CNV (TMER) (2) In the equation (2), WEIGHT is a value of a coefficient register described below, and CNV (TIMER) is speed data read from the memory 22 corresponding to the value of the register TIMER. Is the value of

(17)係数レジスタWEIGHT…これは、係数データがセッ
トされるもので、係数データの値は一例としてキースイ
ッチKSW1のオン時には1.0とされ、キースイッチKSW2
オフ時には0.8とされる。従って、KSW1のオンを経てKSW
2,KSW3をオンさせたときと、KSW1のオン後KSW1のオフ
を経ないでKSW2,KSW3を再オンさせたときとでは、上記
(2)式におけるCNV(TIMER)の値が同一であっても、
(2)式の演算により得られるタッチデータの値は再オ
ンの場合の方が小さくなる。
(17) the coefficient register WEIGHT ... It is intended that the coefficient data is set, the value of the coefficient data is set to 1.0 at the time of the on key switch KSW 1 As an example, when the key switch KSW 2 off is 0.8. Therefore, after turning on KSW 1 , KSW
2, and when the KSW 3 was turned on, at the when the re turn on KSW 2, KSW 3 without going through the on-post KSW 1 off KSW 1, the value of CNV (TIMER) in the above (2) Are the same,
The value of the touch data obtained by the calculation of the expression (2) is smaller in the case of the re-ON.

メインルーチン(第5図) 第5図は、メインルーチンの処理の流れを示すもの
で、このルーチンは、電源オン時に応じてスタートす
る。
Main Routine (FIG. 5) FIG. 5 shows the flow of the processing of the main routine, and this routine is started in response to power-on.

まず、ステップ30では、イニシャライズルーチンを実
行する。例えば、KON0〜KON15、KCBUF0〜KCBUF15、LVLC
NT0〜LVLCNT15、ENB0〜ENB60には、いずれも0をセット
する。
First, at step 30, an initialization routine is executed. For example, KON 0 to KON 15 , KCBUF 0 to KCBUF 15 , LVLC
The NT 0 ~LVLCNT 15, ENB 0 ~ENB 60, both sets 0.

次に、ステップ32でKEYに最低音対応のキーコード値
0をセットしてから、KEY値対応キーのイベント検出処
理34を実行する。
Next, in step 32, the key code value 0 corresponding to the lowest tone is set to KEY, and then an event detection process 34 of the key corresponding to the KEY value is executed.

イベント検出処理34において、ステップ36では、ステ
ップKSW1にオンイベントありか判定する。この判定結果
が肯定的(Y)であればステップ38に移り、WEIGHTに1.
0をセットする。
In the event detection process 34, in step 36, there is on-event in Step KSW 1 determines. If the result of this determination is affirmative (Y), the flow proceeds to step 38, and WEIGHT is set to 1.
Set 0.

ステップ36の判定結果が否定的(N)であったとき又
はステップ38の処理が終ったときは、ステップ40に移
り、ステップKSW2にオンイベントありか判定する。この
判定結果が肯定的(Y)であればステップ42に移り、KE
Y値対応の時間計測フラグENB(KEY)に1を、KEY値対応
の開始カウント値レジスタST(KEY)にCOUNTの値を、KE
Y値対応のオーバーフローカウンタMPL(KEY)に0をそ
れぞれセットする。
The determination result in step 36 is when the process of or step 38 when was negative (N) is over, the process proceeds to step 40, it is determined whether there-on event in step KSW 2. If this determination result is affirmative (Y), the process proceeds to step 42, where KE
The time measurement flag ENB (KEY) corresponding to the Y value is set to 1, the COUNT value is set to the start count value register ST (KEY) corresponding to the KEY value, and KE
The overflow counter MPL (KEY) corresponding to the Y value is set to 0.

ステップ40の判定結果が否定的(N)であったとき又
はステップ42の処理が終ったときは、ステップ44に移
り、スイッチKSW3にオンイベントありか判定する。この
判定結果が肯定的(Y)であればステップ46に移り、第
7図について後述するようにKSW3オンのサブルーチンを
実行する。
The determination result in step 40 is when the process of or step 42 when was negative (N) is over, the process proceeds to step 44, it is determined whether there on event to switch KSW 3. This judgment result is transferred to step 46 if affirmative (Y), a subroutine of KSW 3 on as described below for Figure 7.

ステップ44の判定結果が否定的(N)であったとき又
はステップ46の処理が終ったときは、ステップ48に移
り、ステップKSW1にオフイベントありか判定する。この
判定結果が肯定的(Y)であればステップ50に移り、第
10図について後述するようにキーオフのサブルーチンを
実行する。
The decision result in the step 44 when the process of or step 46 when the A was negative (N) is over, the process proceeds to step 48, it is determined whether there off event in step KSW 1. If this determination result is affirmative (Y), the process proceeds to step 50,
The key-off subroutine is executed as described later with reference to FIG.

ステップ48の判定結果が否定的(N)であったとき又
はステップ50の処理が終ったときは、ステップ52に移
り、スイッチKSW2にオフイベントありか判定する。この
判定結果が肯定的(Y)であればステップ54に移り、WE
IGHTに0.8をセットする。
Step 48 of the determination result when the process of or step 50 when was negative (N) is over, the process proceeds to step 52, it is determined whether there off event to switch KSW 2. If the result of this determination is affirmative (Y), the routine proceeds to step 54, where WE
Set IGHT to 0.8.

ステップ52の判定結果が否定的(N)であったとき又
はステップ54の処理が終ったときは、イベント検出処理
34が終ったことになり、ステップ56に移る。
When the determination result of step 52 is negative (N) or when the processing of step 54 is completed, the event detection processing
34 is over, and the routine goes to step 56.

ステップ56では、KEYの値を1アップする。この結
果、例えばステップ32の後はじめてステップ56にきたと
きはKEYの値は1となる。
In step 56, the value of KEY is increased by one. As a result, for example, the first time after step 32, step 56 is reached, the value of KEY becomes 1.

次に、ステップ58では、KEYの値が61より小か判定す
る。上記のようにKEYの値が1であれば、ステップ58の
判定結果が肯定的(Y)となり、ステップ60に移る。
Next, in step 58, it is determined whether the value of KEY is smaller than 61. If the value of KEY is 1 as described above, the determination result of step 58 is affirmative (Y), and the routine goes to step 60.

ステップ60では、その他の処理(例えば音色スイッ
チ、音量スイッチ等の操作に基づく設定処理)を行な
う。そして、ステップ36に戻り、上記のようなイベント
検出処理34をキーコード値1に対応するキーについて実
行する。
In step 60, other processing (for example, setting processing based on operation of a tone switch, a volume switch, and the like) is performed. Then, returning to step 36, the above-described event detection processing 34 is executed for the key corresponding to the key code value 1.

この後は、KEYの値を1アップするたびに上記のよう
な処理を繰返す。そして、ステップ56でKEYの値が61に
なると、61キー分のイベント検出処理が終ったことにな
る。この場合、ステップ58の判定結果は否定的(N)と
なり、ステップ62でKEYに0をセットする。そして、ス
テップ60を経てステップ36に戻り、上記のような処理を
繰返す。
Thereafter, each time the value of KEY is incremented by 1, the above processing is repeated. Then, when the value of KEY becomes 61 in step 56, the event detection processing for 61 keys has been completed. In this case, the determination result in step 58 is negative (N), and 0 is set in KEY in step 62. Then, the process returns to step 36 via step 60, and repeats the above processing.

この結果、キーコード値0〜60に対応する61キーにつ
いては、イベント検出処理34が順次に且つ反復的に行な
われるようになる。
As a result, for the 61 keys corresponding to the key code values 0 to 60, the event detection processing 34 is sequentially and repeatedly performed.

クロック割込みルーチン(第6図) 第6図は、クロック割込みルーチンを示すもので、こ
のルーチンは、クロック信号CLKの各パルス毎に開始さ
れる。
Clock Interrupt Routine (FIG. 6) FIG. 6 shows a clock interrupt routine, which is started for each pulse of the clock signal CLK.

ステップ70では、COUNTの値を1アップする。そし
て、ステップ72に移る。
In step 70, the value of COUNT is increased by one. Then, the process proceeds to a step 72.

ステップ72では、COUNTの値がAOH(10進数で100)か
判定し、この判定結果が否定的(N)であれば第5図の
ルーチンにリターンする。なお、第6図〜第11図におい
て「RET」はリターンを表わす。
In step 72, it is determined whether the value of COUNT is AO H (100 in decimal), and if the result of this determination is negative (N), the routine returns to the routine of FIG. 6 to 11, "RET" indicates a return.

ステップ72の判定結果が肯定的(Y)であったとき
は、ステップ74に移り、COUNTを0にリセットする。そ
して、ステップ76で制御変数iを0にしてからステップ
78に移る。
When the determination result of step 72 is affirmative (Y), the process proceeds to step 74, and COUNT is reset to 0. Then, after setting the control variable i to 0 in step 76,
Move to 78.

ステップ78では、i番目の時間計測フラグENBiが1で
且つi番目のオーバーフローカウンタMPLiの値がFF
H(最大値)に達してないか判定する。この判定結果が
肯定的(Y)であればステップ80に移り、MPLiの値を1
アップ(オーバーフロー回数として1を加算)する。
In step 78, the ith time measurement flag ENB i is 1 and the value of the ith overflow counter MPL i is FF
Judge whether it has reached H (maximum value). If the result of this determination is affirmative (Y), the routine proceeds to step 80, where the value of MPL i is set to 1
Increase (add 1 as overflow count).

ステップ78の判定結果が否定的(N)であったとき又
はステップ80の処理が終ったときは、ステップ82に移
り、iの値を1アップする。そして、ステップ84でiが
60より大か判定し、大でない(N)ならばステップ74に
戻り、このステップ以降の処理を上記したと同様に繰返
す。この結果、MPL0〜MPL60のうち押鍵速度対応時間計
測中のキーに対応するもののみFFHに達してないことを
条件にして値が1アップされる。
When the result of the determination at the step 78 is negative (N) or when the processing at the step 80 is completed, the process proceeds to a step 82, at which the value of i is increased by one. Then, at step 84, i
It is determined whether it is greater than 60, and if it is not greater (N), the flow returns to step 74, and the processing after this step is repeated in the same manner as described above. As a result, the value in the condition that does not reach the FF H only those corresponding to the key in the key depressing velocity corresponding time measurement of MPL 0 ~MPL 60 is 1 up.

ステップ82の処理によりiの値が61になると、ステッ
プ84の判定結果が肯定的(Y)となり、第5図のルーチ
ンにリターンする。
When the value of i becomes 61 by the processing of step 82, the determination result of step 84 becomes affirmative (Y), and the routine returns to the routine of FIG.

KSW3オンのサブルーチン(第7図) 第7図はKSW3オンのサブルーチンを示すもので、ステ
ップ90では、KEY値対応の時間計測フラグENB(KEY)が
0か判定する。この判定結果が肯定的(Y)であれば、
KEY値対応キーについて押鍵速度対応時間を計測中でな
かったことになり、第5図のルーチンにリターンする。
KSW 3 ON Subroutine (FIG. 7) FIG. 7 shows a KSW 3 ON subroutine. In step 90, it is determined whether the time measurement flag ENB (KEY) corresponding to the KEY value is 0 or not. If this determination result is positive (Y),
Since the key pressing speed corresponding time is not being measured for the key corresponding to the KEY value, the process returns to the routine of FIG.

ステップ90の判定結果が否定的(N)であったとき
は、ステップ92に移り、ENB(KEY)に0をセットすると
共に、KEY値対応の終了カウント値レジスタED(KEY)に
COUNTの値をセットする。そして、ステップ94に移る。
If the decision result in the step 90 is negative (N), the process shifts to a step 92 where ENB (KEY) is set to 0 and the end count value register ED (KEY) corresponding to the KEY value is set.
Set the value of COUNT. Then, the process proceeds to step 94.

ステップ94では、前記(1)式の演算を実行し、その
演算結果として得られた値をTIMERにセットする。そし
て、ステップ96に移る。
In step 94, the operation of the above equation (1) is executed, and the value obtained as the operation result is set in TIMER. Then, the process proceeds to step 96.

ステップ96では、前記(2)式の演算を実行し、その
演算結果として得られた値をTOUCHにセットする。そし
て、ステップ98に移る。
In step 96, the operation of the above equation (2) is executed, and the value obtained as the operation result is set in TOUCH. Then, the process proceeds to step 98.

ステップ98では、第8図について後述するようにキー
オンのサブルーチンを実行し、しかる後第5図のルーチ
ンにリターンする。
In step 98, a key-on subroutine is executed as described later with reference to FIG. 8, and thereafter, the process returns to the routine of FIG.

キーオンのサブルーチン(第8図) 第8図は、キーオンのサブルーチンを示すもので、ス
テップ100では、制御変数iを0とする。そして、ステ
ップ102に移る。
Key-On Subroutine (FIG. 8) FIG. 8 shows a key-on subroutine. In step 100, the control variable i is set to 0. Then, the process proceeds to step 102.

ステップ102では、KEYの値とi番目のキーコードバッ
ファレジスタKCBUFiの値とが等しいか(第iチャンネル
にKEYと同一のキーコードが割当て済みか)判定する。
この判定結果が否定的(N)であればステップ104に移
り、iの値を1アップする。そして、ステップ106に移
る。
In step 102, or not the values of the i-th key code buffer register KCBUF i of KEY equal (same key code and the KEY to the i channel or already assigned) is determined.
If the result of this determination is negative (N), the routine proceeds to step 104, where the value of i is increased by one. Then, the process proceeds to step 106.

ステップ106では、iの値が16より小か判定し、小で
ある(Y)ならばステップ102に戻る。そして、ステッ
プ102以降の処理を上記したと同様にしてi=16となる
まで繰返す。i=16となると、ステップ106の判定結果
が否定的(N)となる。これは、第0〜第15チャンネル
のいずれもKEYと同一のキーコードが割当てられていな
かったことを意味する。
In step 106, it is determined whether the value of i is smaller than 16, and if it is smaller (Y), the process returns to step 102. Then, the processing after step 102 is repeated in the same manner as described above until i = 16. When i = 16, the determination result of step 106 becomes negative (N). This means that the same key code as KEY has not been assigned to any of the 0th to 15th channels.

ステップ102の判定結果が肯定的(Y)となったとき
は、ステップ108に移り、iの値(KEYと同一のキーコー
ドが割当てられているチャンネルのナンバ)をASSにセ
ットする。そして、ステップ110でiの値を1アップし
てからステップ112に移る。
When the determination result of step 102 is affirmative (Y), the process proceeds to step 108, and the value of i (the number of the channel to which the same key code as KEY is assigned) is set to ASS. Then, the value of i is increased by 1 in step 110, and then the process proceeds to step 112.

ステップ112では、iの値が16より小か判定し、この
判定結果が肯定的(Y)であればステップ114に移る。
In step 112, it is determined whether the value of i is smaller than 16. If the determination result is affirmative (Y), the process proceeds to step 114.

ステップ114では、ステップ102と同様にKEY=KCBUFi
か判定する。この判定結果が否定的(N)であればステ
ップ110に戻り、このステップ以降の処理をi=16とな
るまで上記したと同様に繰返す。そして、i=16となる
と、ステップ112の判定結果が否定的(N)となる。こ
れは、第0〜第15チャンネルのうちASSにセットされた
ナンバのチャンネル1つにだけKEYと同一のキーコード
が割当てられていたことを意味する。
In step 114, as in step 102, KEY = KCBUF i
Is determined. If the determination result is negative (N), the process returns to step 110, and the processes after this step are repeated in the same manner as described above until i = 16. Then, when i = 16, the determination result of step 112 becomes negative (N). This means that the same key code as KEY has been assigned to only one channel of the number set to ASS among the 0th to 15th channels.

ステップ106又は112の判定結果が否定的(N)になっ
たときは、ステップ116に移り、第9図について後述す
るようにオールドサーチのサブルーチンを実行する。ス
テップ116の処理は最古押鍵に係るチャンネルをサーチ
するためのもので、OLDには最古押鍵に係るチャンネル
のナンバがセットされる。そして、ステップ116の後
は、ステップ118に移り、OLDのチャンネルナンバをASS
にセットする。
When the result of the determination in step 106 or 112 is negative (N), the process proceeds to step 116, and an old search subroutine is executed as described later with reference to FIG. The processing in step 116 is for searching for the channel related to the oldest key press. In OLD, the number of the channel related to the oldest key press is set. Then, after step 116, the process proceeds to step 118, where the OLD channel number is ASS.
Set to.

一方、ステップ114の判定結果が肯定的(Y)であっ
たときは、ステップ120に移り、ASSにiの値(KEYと同
一のキーコードが割当てられているチャンネルのナン
バ)をセットする。これは、KEYと同一のキーコードが
割当てられているチャンネルが2つあった場合である。
On the other hand, if the decision result in the step 114 is affirmative (Y), the process shifts to a step 120 to set the value of i (the number of the channel to which the same key code as KEY is assigned) in ASS. This is the case when there are two channels to which the same key code as KEY is assigned.

次に、ステップ122では、ASS2の値に対応するイベン
ト順序カウンタLVLCNT(ASS2)の値がASSの値に対応す
るイベント順序カウンタLVLCNT(ASS)の値より小さい
か(ASS2値対応チャンネルがASS値対応チャンネルより
押鍵時期として古いか)判定する。この判定結果が肯定
的(Y)であればステップ124に移り、ASSにASS2のチャ
ンネルナンバをセットする。
Next, in step 122, whether the value of the event order counter LVLCNT (ASS2) corresponding to the value of ASS2 is smaller than the value of the event order counter LVLCNT (ASS) corresponding to the value of ASS (if the channel corresponding to ASS2 value It is determined whether the key press timing is older than the channel). If the result of this determination is affirmative (Y), the routine proceeds to step 124, where the channel number of ASS2 is set in ASS.

ステップ122の判定結果が否定的(N)であったと
き、ステップ124の処理が終ったとき又はステップ118の
処理が終ったときは、ステップ126に移る。この結果、K
EYと同一のキーコードが割当てられているチャンネルが
0又は1つであったときは最古押鍵に係るチャンネルが
割当てチャンネルとなり、2つであったときはそのうち
で押鍵時期がより古いチャンネルが割当チャンネルとな
る。
When the determination result of step 122 is negative (N), when the processing of step 124 is completed, or when the processing of step 118 is completed, the process proceeds to step 126. As a result, K
When the number of channels to which the same key code as EY is assigned is 0 or 1, the channel related to the oldest key press is the assigned channel. Is the assigned channel.

ステップ126では、LVLCNT(ASS)にFFHをセットす
る。そして、ステップ128では、ASS値対応のキーコード
バッファレジスタKCBUF(ASS)にKEYのキーコード値を
セットする。この後、ステップ130では、ASS値対応のキ
ーオン/オフフラグKON(ASS)に1をセットする。
In step 126, it sets the FF H to LVLCNT (ASS). Then, in step 128, the key code value of KEY is set in the key code buffer register KCBUF (ASS) corresponding to the ASS value. Thereafter, in step 130, 1 is set to a key on / off flag KON (ASS) corresponding to the ASS value.

次に、ステップ132では、TG24のASS値対応チャンネル
(割当チャンネル)にてKEY及びTOUCHに基づいてキーオ
ン処理を行なう。この結果、割当チャンネルからは、押
下されたキーに対応する楽音信号がTOUCHのタッチデー
タに応じて楽音特性が制御された形で送出され、サウン
ドシステム28により放音される。
Next, in step 132, key-on processing is performed based on KEY and TOUCH in a channel (assigned channel) corresponding to the ASS value of TG24. As a result, a tone signal corresponding to the pressed key is transmitted from the assigned channel in a form in which tone characteristics are controlled in accordance with the touch data of TOUCH, and is emitted by the sound system 28.

この後は、ステップ134で第11図について後述するよ
うにカウントダウンのサブルーチンを実行してから第7
図のルーチンにリターンする。
Thereafter, in step 134, a countdown subroutine is executed as described later with reference to FIG.
It returns to the routine of the figure.

オールドサーチのサブルーチン(第9図) 第9図は、オールドサーチのサブルーチンを示すもの
で、ステップ140では、LVLMINにFFH(最大値)をセット
すると共に、OLDに0をセットする。そして、ステップ1
42で制御変数iを0としてからステップ144に移る。
Old Search Subroutine (FIG. 9) FIG. 9 shows an old search subroutine. In step 140, FF H (maximum value) is set in LVLMIN and 0 is set in OLD. And step 1
At 42, the control variable i is set to 0, and then the routine proceeds to step 144.

ステップ144では、i番目のイベント順序カウンタLVL
CNTiの値がLVLMINの値より小さいか判定する。この判定
結果が肯定的(Y)であればステップ146に移り、LVLMI
NにLVLCNTiの値をセットする。そして、ステップ148で
は、OLDにiの値をセットする。
In step 144, the ith event order counter LVL
It is determined whether the value of CNT i is smaller than the value of LVLMIN. If the result of this determination is affirmative (Y), the flow proceeds to step 146, where LVLMI
Set the value of LVLCNT i to N. Then, in step 148, the value of i is set to OLD.

ステップ144の判定結果が否定的(N)であったとき
又はステップ148の処理が終ったときは、ステップ150に
移り、iの値を1アップする。そして、ステップ152に
移る。
When the determination result of step 144 is negative (N) or when the process of step 148 is completed, the process proceeds to step 150, and the value of i is increased by one. Then, the process proceeds to step 152.

ステップ152では、iの値が16より小か判定する。こ
の判定結果が肯定的(Y)であればステップ144に戻
り、このステップ以降の処理をi=16となるまで上記し
たと同様に繰返す。そして、i=16となると、ステップ
152の判定結果が否定的(N)となり、第8図のルーチ
ンにリターンする。
In step 152, it is determined whether the value of i is smaller than 16. If the determination result is affirmative (Y), the process returns to step 144, and the processes after this step are repeated in the same manner as described above until i = 16. And when i = 16, step
The determination result at 152 is negative (N), and the routine returns to the routine of FIG.

一例として、LVLCNT0〜LVLCNT3に0より大きい値がセ
ットされ且つLVLCNT4に0がセットされていたものとす
ると、ステップ146でLVLCNT4からLVLMINに0がセットさ
れた後、ステップ148でOLDに4がセットされる。この
後、ステップ150でi=5になってステップ144にくる
と、LVLCNT5が0より小さいことはありえないので判定
結果が否定的(N)となり、ステップ150に移る。この
ことはi=6〜15についても同様である。従って、LVLM
INのセット値は最終的に0となり、OLDのセット値は最
終的に4となる。
As an example, assuming that a value greater than 0 is set in LVLCNT 0 to LVLCNT 3 and 0 is set in LVLCNT 4, after 0 is set from LVLCNT 4 to LVLMIN in step 146, OLD is set in step 148. 4 is set. Thereafter, when i = 5 in step 150 and the process proceeds to step 144, the determination result becomes negative (N) because LVLCNT 5 cannot be smaller than 0, and the process proceeds to step 150. The same applies to i = 6 to 15. Therefore, LVLM
The set value of IN finally becomes 0, and the set value of OLD finally becomes 4.

この例では、簡単のため、LVLCNT4の値を0とした
が、LVLCNT4の値がLVLCNT0〜LVLCNT15の中で0以外の最
小値(例えば1)であった場合には、LVLMINでは該最小
値が、OLDでは4がそれぞれ最終的なセット値となる。
In this example, for the sake of simplicity, the value of LVLCNT 4 is set to 0. However, if the value of LVLCNT 4 is the minimum value other than 0 (for example, 1) among LVLCNT 0 to LVLCNT 15 , the value of LVLMIN is When the minimum value is OLD, 4 is the final set value.

キーオフのサブルーチン(第10図) 第10図は、キーオフのサブルーチンを示すもので、ス
テップ160では、制御変数iを0とする。
Key-Off Subroutine (FIG. 10) FIG. 10 shows a key-off subroutine. In step 160, the control variable i is set to 0.

次に、ステップ162では、KEYの値がKCBUFiの値と等し
く且つKONiが1か(第iチャンネルにKEYと同一のキー
コードが割当て済みであり且つ第iチャンネルがキーオ
ン中か)判定する。この判定結果が否定的(N)であれ
ばステップ164に移り、iの値を1アップしてからステ
ップ166に移る。
Next, in step 162, it is determined whether the value of KEY is equal to the value of KCBUF i and KON i is 1 (whether the same key code as KEY has been assigned to the i-th channel and the i-th channel is on key-on). . If the result of this determination is negative (N), the operation proceeds to step 164, in which the value of i is increased by 1, and the operation proceeds to step 166.

ステップ166では、i<16か判定する。この判定結果
が肯定的(Y)であればステップ162に戻り、このステ
ップ以降の処理をi=16となるまで上記したと同様に繰
返す。i=16となると、ステップ166の判定結果が否定
的(N)となる。これは、キーオフすべきチャンネルが
なかったことを意味する。
In step 166, it is determined whether i <16. If the determination result is affirmative (Y), the process returns to step 162, and the processes after this step are repeated in the same manner as described above until i = 16. When i = 16, the determination result of step 166 becomes negative (N). This means that there was no channel to key off.

ステップ162の判定結果が肯定的(Y)となったとき
は、ステップ168に移り、OFFにiの値(KEYと同一のキ
ーコードが割当てられているキーオン中のチャンネルの
ナンバ)をセットする。そして、ステップ170移る。
When the determination result of step 162 is affirmative (Y), the process proceeds to step 168, and the value of i (the number of the key-on channel to which the same key code as KEY is assigned) is set to OFF. Then, the process proceeds to step 170.

ステップ170では、OFF値対応のキーオン/オフフラグ
KON(OFF)に0をセットする。そして、ステップ172で
は、OFF値対応のイベント順序カウンタLVLCNT(OFF)に
7FHをセットする。
In step 170, a key on / off flag corresponding to the OFF value
Set KON (OFF) to 0. In step 172, the event order counter LVLCNT (OFF) corresponding to the OFF value is set.
7F Set H.

この後、ステップ174では、TG24のOFF値対応チャンネ
ルにてキーオフ処理を行なう。この結果、発生中の楽音
信号は減衰制御される。
Thereafter, in step 174, key-off processing is performed on the channel corresponding to the OFF value of TG24. As a result, the tone signal being generated is attenuated.

ステップ166の判定結果が否定的(N)であったとき
又はステップ174の処理が終ったときは、ステップ176に
移り、第11図について後述するようにカウントダウンの
サブルーチンを実行する。この後は、第5図のルーチン
にリターンする。
When the determination result of step 166 is negative (N) or when the process of step 174 is completed, the process proceeds to step 176 to execute a countdown subroutine as described later with reference to FIG. Thereafter, the process returns to the routine of FIG.

カウントダウンのサブルーチン(第11図) 第11図は、カウントダウンのサブルーチンを示すもの
で、ステップ180では、制御変数iを0とする。
Countdown Subroutine (FIG. 11) FIG. 11 shows a countdown subroutine. In step 180, the control variable i is set to 0.

次に、ステップ182では、LVLCNTiの下位7ビットすべ
てが“0"か(80H又は00Hか)判定する。この判定結果が
否定的(N)であればステップ184に移り、LVLCNTiの値
を1ダウンさせる。
Next, in step 182, all the lower 7 bits of LVLCNT i is "0" or (80 or H or 00 H) determine. If the determination result is negative (N) shifts to step 184, to 1 down the value of LVLCNT i.

ステップ182の判定結果が肯定的(Y)であったとき
又はステップ184の処理が終ったときは、ステップ186に
移り、iの値を1アップする。そして、ステップ188に
移る。
When the determination result of step 182 is affirmative (Y) or when the process of step 184 is completed, the process proceeds to step 186, and the value of i is increased by one. Then, the process proceeds to step 188.

ステップ188では、i<16か判定し、この判定結果が
肯定的(Y)であればステップ182に戻る。そして、ス
テップ182以降の処理をi=16となるまで上記したと同
様に繰返す。
In step 188, it is determined whether i <16. If the determination result is affirmative (Y), the process returns to step 182. Then, the processing after step 182 is repeated in the same manner as described above until i = 16.

i=16となると、ステップ188の判定結果が否定的
(N)となり、元のルーチン(第8図又は第10図)にリ
ターンする。
When i = 16, the result of the determination in step 188 is negative (N), and the routine returns to the original routine (FIG. 8 or FIG. 10).

変形例 この発明は、上記した実施例に限定されるものではな
く、種々の改変形態で実施可能なものである。例えば、
次のような変更が可能である。
Modifications The present invention is not limited to the above-described embodiments, but can be implemented in various modifications. For example,
The following changes are possible:

(1)タッチデータ形成等の各種処理をソフトウエアで
実行するようにしたが、専用のハードウエアで実行する
ようにしてもよい。
(1) Although various processes such as touch data formation are executed by software, they may be executed by dedicated hardware.

(2)イベント順序カウンタ(LVLCNT)へのセット値
は、FFHのように一定とするのではなく、キータッチの
強さに応じて可変設定するようにしてもよい。
(2) a set value to the event sequence counter (LVLCNT), rather than constant as FF H, may be variably set in accordance with the key touch strength.

(3)チャンネル割当てに際しては、LVLCNTの値を参照
してキーオンイベント発生時からの経過時間が最も長い
チャンネルを選択するようにしたが、エンベロープ波形
の振幅値を参照して最も減衰が進んだチャンネルを選択
するようにしてもよい。
(3) When assigning channels, the channel with the longest elapsed time since the occurrence of the key-on event was selected with reference to the value of LVLCNT, but the channel with the most attenuation was determined with reference to the amplitude value of the envelope waveform. May be selected.

(4)実施例では3つのキースイッチをキー部材で直接
的に駆動するようにしたが、間接的に例えばハンマー等
を介して駆動するようにしてもよい。
(4) In the embodiment, the three key switches are directly driven by the key members. However, the three key switches may be driven indirectly via, for example, a hammer.

(5)キーの押下深さ検知手段としては、キースイッチ
KSW1〜KSW3の代りに感圧素子等を用いてもよい。また、
キーオン検知手段としては、KSW3のように独立のスイッ
チ手段を設けるのではなく、キータッチの強さを検出す
るための圧力検知手段の出力が所定値に達したことを検
知してキーオン信号を発生するようなものであってもよ
い。
(5) A key switch is used as a key pressing depth detecting means.
Instead of KSW 1 ~KSW 3 may be used a pressure-sensitive element or the like. Also,
As a key-on detecting means, instead of providing an independent switch means as in KSW 3 , the key-on signal is detected by detecting that the output of the pressure detecting means for detecting the intensity of the key touch has reached a predetermined value. That which may occur may occur.

[発明の効果] 以上のように、この発明によれば、キーの押下に伴っ
てキーオフ検知点より深いところでキータッチの強さ及
びキーオンを検知するようにしたので、キーオフ検知点
まで戻らずに小さいキーストロークで速やかな連打演奏
を行なえるようになり、電子楽器の演奏性能が向上する
効果が得られるものである。
[Effects of the Invention] As described above, according to the present invention, the strength of the key touch and the key-on are detected at a depth deeper than the key-off detection point in response to the pressing of the key. It is possible to perform a rapid continuous performance with a small keystroke, so that the effect of improving the performance of the electronic musical instrument can be obtained.

【図面の簡単な説明】[Brief description of the drawings]

第1図は、この発明の一実施例による電子楽器の構成を
示すブロック図、 第2図は、キーネーム毎のキーコード値を示す図、 第3図は、1キー分のスイッチ部の構成を示す断面図、 第4図は、キー操作検出操作を説明するための信号波形
図、 第5図は、メインルーチンを示すフローチャート、 第6図は、クロック割込みルーチンを示すフローチャー
ト、 第7図は、KSW3オンのサブルーチンを示すフローチャー
ト、 第8図は、キーオンのサブルーチンを示すフローチャー
ト、 第9図は、オールドサーチのサブルーチンを示すフロー
チャート、 第10図は、キーオフのサブルーチンを示すフローチャー
ト、 第11図は、カウントダウンのサブルーチンを示すフロー
チャートである。 10…データバス、12…鍵盤回路、14…パネルスイッチ回
路、16…中央処理装置、18…プログラムメモリ、20…レ
ジスタ群、22…変換テーブルメモリ、24…トーンジェネ
レータ、26…クロック発生器、28…サウンドシステム、
KY…キー部材、EM…弾性部材、KSW1〜KSW3…キースイッ
チ。
FIG. 1 is a block diagram showing the configuration of an electronic musical instrument according to an embodiment of the present invention, FIG. 2 is a diagram showing key code values for each key name, and FIG. 3 is a configuration of a switch unit for one key. FIG. 4 is a signal waveform diagram for explaining a key operation detection operation, FIG. 5 is a flowchart showing a main routine, FIG. 6 is a flowchart showing a clock interrupt routine, FIG. a flowchart showing a subroutine of KSW 3 on, FIG. 8 is a flowchart illustrating a subroutine of key-on, Figure 9 is a flowchart illustrating a subroutine of Old search, FIG. 10 is a flowchart showing a subroutine of the key-off, FIG. 11 9 is a flowchart showing a countdown subroutine. 10 data bus, 12 keyboard circuit, 14 panel switch circuit, 16 central processing unit, 18 program memory, 20 register group, 22 conversion table memory, 24 tone generator, 26 clock generator, 28 ... sound system,
KY ... key member, EM ... elastic member, KSW 1 ~KSW 3 ... key switch.

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】(a)キーが第1の押下深さより深く押下
された後該第1の押下深さより浅く復帰したことを検知
してキーオフ信号を発生する第1の検知手段と、 (b)前記キーが前記第1の押下深さより深い第2の押
下深さを越えて押下されるたびにキータッチの強さを検
知してタッチデータを発生すると共にキーの押下に応じ
てキーオン信号を発生する第2の検知手段と をそなえた電子楽器のキー操作検出装置。
(A) first detection means for generating a key-off signal upon detecting that a key has been pressed deeper than a first pressing depth and then returning to a position shallower than the first pressing depth; Each time the key is pressed beyond a second pressing depth that is deeper than the first pressing depth, the strength of the key touch is detected to generate touch data and a key-on signal is generated in response to the key pressing. A key operation detecting device for an electronic musical instrument, comprising: a second detecting unit that generates the key operation.
【請求項2】前記第2の検知手段は、前記キーが前記第
1の押下深さを経てから前記第2の押下深さを越えて押
下されたときと、前記第1の押下深さを経てから該第1
の押下深さに戻らずに前記第2の押下深さを越えて再押
下されたときとでは、強さ同一のキータッチに対して値
の異なるタッチデータを発生するように構成されている
ことを特徴とする請求項1記載の電子楽器のキー操作検
出装置。
2. The apparatus according to claim 1, wherein the second detecting means detects when the key is pressed beyond the second pressing depth after passing through the first pressing depth and when the first pressing depth is exceeded. After the first
When the key is pressed again beyond the second pressing depth without returning to the pressing depth of, the touch data having different values is generated for a key touch having the same strength. The key operation detecting device for an electronic musical instrument according to claim 1, wherein:
JP63221006A 1988-09-03 1988-09-03 Key operation detection device for electronic musical instruments Expired - Lifetime JP2712361B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63221006A JP2712361B2 (en) 1988-09-03 1988-09-03 Key operation detection device for electronic musical instruments

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63221006A JP2712361B2 (en) 1988-09-03 1988-09-03 Key operation detection device for electronic musical instruments

Publications (2)

Publication Number Publication Date
JPH0268600A JPH0268600A (en) 1990-03-08
JP2712361B2 true JP2712361B2 (en) 1998-02-10

Family

ID=16759998

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63221006A Expired - Lifetime JP2712361B2 (en) 1988-09-03 1988-09-03 Key operation detection device for electronic musical instruments

Country Status (1)

Country Link
JP (1) JP2712361B2 (en)

Also Published As

Publication number Publication date
JPH0268600A (en) 1990-03-08

Similar Documents

Publication Publication Date Title
US7429699B2 (en) Electronic musical instrument and recording medium that stores processing program for the electronic musical instrument
JP2623809B2 (en) Automatic key press indicating device
JPH03174590A (en) Electronic musical instrument
JPH07295568A (en) Electronic keyboard instrument
JP2712361B2 (en) Key operation detection device for electronic musical instruments
US9905209B2 (en) Electronic keyboard musical instrument
JP3624780B2 (en) Music control device
JPH11175065A (en) Device and method for musical sound signal generation
US9280962B1 (en) Sound preview device and program
JPS6296996A (en) Electronic percussion instrument
JP2646812B2 (en) Electronic musical instrument
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP2744257B2 (en) Electronic percussion instrument
JP2556370Y2 (en) Electronic keyboard instrument
JPH0627947A (en) Operating force sense data output device and electronic musical instrument using the same
JP3509120B2 (en) Electronic musical instrument
JPH07175480A (en) Data setter for electronic musical instrument
JPH08278781A (en) Sound source module
JPH10319949A (en) Electronic musical instrument
JPH07146681A (en) Electronic musical instrument
JPH04134495A (en) Musical tone signal generator
JP3067145B2 (en) Envelope generation control device, sound emission form control device, envelope generation control method, and sound emission form control method
JPS6290697A (en) Keying allotter for electronic musical apparatus
JPH0816166A (en) Rhythm selecting device
JPH1063269A (en) Silence piano

Legal Events

Date Code Title Description
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 (prs date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071031

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20081031

Year of fee payment: 11

EXPY Cancellation because of completion of term