JP2008286858A - Electronic music sound generator - Google Patents

Electronic music sound generator Download PDF

Info

Publication number
JP2008286858A
JP2008286858A JP2007129324A JP2007129324A JP2008286858A JP 2008286858 A JP2008286858 A JP 2008286858A JP 2007129324 A JP2007129324 A JP 2007129324A JP 2007129324 A JP2007129324 A JP 2007129324A JP 2008286858 A JP2008286858 A JP 2008286858A
Authority
JP
Japan
Prior art keywords
key
keyboard
touch information
turned
switches
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.)
Pending
Application number
JP2007129324A
Other languages
Japanese (ja)
Inventor
Yasushi Sato
康史 佐藤
Seijiro Imamura
聖治郎 今村
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.)
Kawai Musical Instrument Manufacturing Co Ltd
Original Assignee
Kawai Musical Instrument Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Kawai Musical Instrument Manufacturing Co Ltd filed Critical Kawai Musical Instrument Manufacturing Co Ltd
Priority to JP2007129324A priority Critical patent/JP2008286858A/en
Publication of JP2008286858A publication Critical patent/JP2008286858A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To calculate key touch information by reflecting player's intention, in case of no continuous hit sound by keeping shallow key pressing, and to calculate the key touch information, even in case of continuous hit sound by keeping shallow key pressing. <P>SOLUTION: Keyboard switches SW1 to SW4 are arranged in a key pressing depth direction for each key of a keyboard. When the key is pressed from a state in which all keys are not touched, velocity is calculated from difference of when SW1 and SW2 are turned on. When the key is pressed from a half key pressing state in which SW1 is on, and SW3 is off, the velocity is calculated from time difference of when SW3 and SW4 are turned on. The musical sound is generated by the calculated velocity. More than five keyboard switches may be arranged and SW1 to SW4 may be selected from them. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、鍵タッチ情報生成手段を備えた電子楽音発生器に関し、特に、鍵が浅く押されたまま連打されたような場合でも鍵タッチ情報を算出できる鍵タッチ情報算出手段を備えた電子楽音発生器に関する。   The present invention relates to an electronic musical tone generator having key touch information generating means, and in particular, an electronic musical tone having key touch information calculating means capable of calculating key touch information even when a key is pressed while being pressed shallowly. Regarding the generator.

従来の電子楽音発生器では、各鍵に対して押鍵深さ方向位置に2つの接点を配置し、押鍵されたときに2つの接点がオンする時間差に基づいて鍵タッチ情報を算出している。   In the conventional electronic musical tone generator, two contacts are arranged at the key press depth direction position for each key, and the key touch information is calculated based on the time difference when the two contacts are turned on when the key is pressed. Yes.

特許文献1には、4メイク式タッチレスポンススイッチを用い、押鍵深さ方向の浅い位置の2つのスイッチをハーフミュート区間の検出に利用し、深い位置の2つのスイッチをキーオン時間の検出に利用する電子鍵盤楽器が記載されている。これは、鍵を完全に戻さなくても深い位置の2つのスイッチのキーオンで再度ベロシティを決定することにより、連打したときのような楽音を発生させることができるものとなっている。   In Patent Document 1, a 4-make touch response switch is used, two switches at shallow positions in the key pressing depth direction are used for detecting the half mute section, and two switches at deep positions are used for detecting the key-on time. An electronic keyboard instrument is described. In this case, even if the key is not completely returned, the velocity is determined again by the key-on of the two switches at a deep position, so that it is possible to generate a musical sound like when hit repeatedly.

特許文献2には、強打あるいは弱打した場合のいずれにおいても電子音を正常に発音させるためハンマの最終打鍵速度を精確に検出する速度検出装置が記載されている。
特開2003−280658号公報 特開2000−276134号公報
Patent Document 2 describes a speed detection device that accurately detects the final keystroke speed of a hammer in order to properly generate an electronic sound regardless of whether it is strongly struck or weakly struck.
JP 2003-280658 A JP 2000-276134 A

アコースティックピアノでは、鍵が浅く押されたまま連打されたような場合でも楽音が送出される。しかし、各鍵に対して押鍵深さ方向位置に2つの接点を配置し、押鍵されたときに2つの接点がオンする時間差に基づいて鍵タッチ情報を算出する電子楽音発生器では、鍵が浅く押されたまま、すなわち押鍵深さ方向の浅い位置に配置された接点がオンとなった状態のままで押鍵が繰り返されるような場合、ベロシティなどの鍵タッチ情報を算出できないので、楽音が送出されないという課題があった。   In an acoustic piano, a musical sound is transmitted even when a key is pressed shallowly and repeatedly hit. However, in the electronic musical tone generator that calculates the key touch information based on the time difference at which the two contacts are turned on when the key is pressed, the key contact information is calculated by arranging two contacts at the key pressing depth direction position for each key. Since key press information such as velocity cannot be calculated when the key is repeatedly pressed with the contact pressed in a shallow position in the key press depth direction, with the contact being turned on being kept on, There was a problem that music was not transmitted.

特許文献1に記載された電子鍵盤楽器は、常に深い位置の2つのスイッチのキーオンでベロシティを決定しており、鍵タッチ情報が演奏者の意図がよく反映されたものとなる鍵スイッチの押鍵深さ方向位置について考慮されていない。   In the electronic keyboard instrument described in Patent Document 1, the velocity is always determined by key-on of two switches at deep positions, and the key touch information is a key switch that reflects the intention of the player well. The depth position is not considered.

特許文献2は、強打あるいは弱打した場合の最終打鍵速度を問題とするものであり、鍵が浅く押されたまま連打されたような場合の鍵タッチ情報の算出を問題にしていない。   Japanese Patent Application Laid-Open No. 2004-228688 has a problem with the final key-pressing speed when a strong or weak hit is made, and does not have a problem with the calculation of key touch information when the key is hit repeatedly while being pressed shallowly.

本発明の目的は、上記課題を解決し、浅く押されたままの連打でない場合には演奏者の意図がよく反映された鍵タッチ情報を算出でき、浅く押されたままの連打の場合でも鍵タッチ情報を算出できる鍵タッチ情報算出手段を備えた電子楽音発生器を提供することにある。   The object of the present invention is to solve the above-mentioned problems, and can calculate key touch information that reflects the player's intention well when it is not shallowly pressed repeatedly. An object of the present invention is to provide an electronic musical tone generator including key touch information calculation means capable of calculating touch information.

上記課題を解決するために、本発明は、鍵盤の各鍵に対してその押鍵深さ方向位置に配置された鍵盤スイッチのオンオフに基づいて鍵タッチ情報を算出し、該鍵タッチ情報に応じて楽音を発生する電子楽音発生器において、鍵盤の各鍵に対してその押鍵深さ方向の異なる位置に順に配置された少なくとも4個の第1ないし第4の鍵盤スイッチと、前記第1の鍵盤スイッチがオンしてから前記第2の鍵盤スイッチがオンするまでの時間を計測する第1の押鍵速度検出手段と、前記第3の鍵盤スイッチがオンしてから前記第4の鍵盤スイッチがオンするまでの時間を計測する第2の押鍵速度検出手段と、前記第1の押鍵速度検出手段によって計測された時間に基づいて鍵タッチ情報を算出する第1の鍵タッチ情報算出手段と、前記第2の押鍵速度検出手段によって計測された時間に基づいて鍵タッチ情報を算出する第2の鍵タッチ情報算出手段と、前記第1ないし第4の鍵盤スイッチが全てオフである全離鍵状態からの押鍵に対しては、前記第1の鍵タッチ情報算出手段により算出された鍵タッチ情報に応じて楽音を発生し、前記第1の鍵盤スイッチがオンであり、第3の鍵盤スイッチがオフである半離鍵状態から押鍵に対しては、前記第2の鍵タッチ情報算出手段により算出された鍵タッチ情報に応じて楽音を発生する点に第1の特徴がある。   In order to solve the above-described problem, the present invention calculates key touch information based on on / off of a keyboard switch arranged at a key press depth direction position for each key of the keyboard, and according to the key touch information. In the electronic musical tone generator for generating musical tones, at least four first to fourth keyboard switches arranged in order at different positions in the key pressing depth direction for each key of the keyboard, and the first A first key-pressing speed detecting means for measuring a time from when the keyboard switch is turned on until the second keyboard switch is turned on; and after the third keyboard switch is turned on, the fourth keyboard switch is A second key pressing speed detecting means for measuring a time until turning on; a first key touch information calculating means for calculating key touch information based on the time measured by the first key pressing speed detecting means; , The second key pressing speed Second key touch information calculating means for calculating key touch information based on the time measured by the output means, and key pressing from a fully released state where all of the first to fourth keyboard switches are off. A half-key release in which a tone is generated in accordance with the key touch information calculated by the first key touch information calculating means, the first keyboard switch is on, and the third keyboard switch is off. The first feature is that a key tone is generated in response to the key touch information calculated by the second key touch information calculating means for the key depression from the state.

また、本発明は、鍵盤の各鍵に対してその押鍵深さ方向の異なる位置に順に配置された5個以上の鍵盤スイッチを備え、その中から第1ないし第4の鍵盤スイッチが選択可能となっている点に第2の特徴がある。   In addition, the present invention includes five or more keyboard switches arranged in order at different positions in the key pressing depth direction for each key of the keyboard, from which the first to fourth keyboard switches can be selected. There is a second feature in that.

さらに、本発明は、前記5個以上の鍵盤スイッチの中からの押鍵深さ方向が3番目以上に深い位置に配置された2個の鍵盤スイッチを選択して前記第3および第4の鍵盤スイッチとして用いた点に第3の特徴がある。   Further, according to the present invention, the third and fourth keyboards are selected by selecting two keyboard switches arranged at a position where the key pressing depth direction is third or deeper from the five or more keyboard switches. The third feature is that it is used as a switch.

本発明によれば、全離鍵状態から押鍵された場合に第1の鍵タッチ情報算出手段により算出された鍵タッチ情報を利用し、半離鍵状態から押鍵された場合には第2の鍵タッチ情報算出手段により算出された鍵タッチ情報を利用するので、浅く押されたままの連打の場合の鍵タッチ情報生成の構成とは関係なく、浅く押されたままの連打でない場合の鍵タッチ情報を生成することができる。したがって、演奏者の意図がよく反映された鍵タッチ情報を得ることができるとともに、浅く押されたままの連打の場合でも鍵タッチ情報を得ることができる。   According to the present invention, the key touch information calculated by the first key touch information calculation means is used when the key is pressed from the fully-released state, and the second is displayed when the key is pressed from the half-released state. Since the key touch information calculated by the key touch information calculation means is used, it is not related to the configuration of the key touch information generation in the case where the key is pressed lightly and the key in the case where the key is not repeatedly pressed Touch information can be generated. Therefore, it is possible to obtain key touch information that reflects the player's intention well, and to obtain key touch information even in the case of repeated hits that are kept pressed.

また、鍵盤の各鍵に対してその押鍵深さ方向の異なる位置に順に配置された5個以上の鍵盤スイッチを備え、その中から第1ないし第4の鍵盤スイッチを選択可能とすることにより、演奏者の意図がよく反映された鍵タッチ情報が得られるように鍵盤スイッチを選択して鍵タッチ情報算出に利用することができる。   Also, by providing five or more keyboard switches sequentially arranged at different positions in the key pressing depth direction with respect to each key of the keyboard, the first to fourth keyboard switches can be selected from among them. The keyboard switch can be selected and used for calculating the key touch information so that the key touch information reflecting the performer's intention can be obtained.

以下、図面を参照して本発明を説明する。図1は、本発明が適用される電子楽音発生器の一実施形態を示すブロック図である。本実施形態の電子楽音発生器は、鍵盤楽器の形態を有し、CPU1、ROM2、RAM3、操作パネル4、パネルインタフェース(I/F)5、鍵盤(キーボード)6、鍵盤I/F7、MIDI I/F8、トーン発生器9、D/A変換器10、出力増幅器(AMP)11、スピーカ12およびバス13を備える。   The present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of an electronic musical tone generator to which the present invention is applied. The electronic musical tone generator of this embodiment has the form of a keyboard instrument, CPU1, ROM2, RAM3, operation panel 4, panel interface (I / F) 5, keyboard (keyboard) 6, keyboard I / F7, MIDI I / F8, tone generator 9, D / A converter 10, output amplifier (AMP) 11, speaker 12, and bus 13.

CPU1は、制御プログラムに従って電子楽音発生器全体の制御を行う。ROM2は、制御プログラムの他、複数の音色パラメータやエフェクトについてのパラメータなど、演奏状態を設定するための各種パラメータを記憶している。RAM3は、CPU1のワークエリアとして使用され、また、各種レジスタのデータを一時記憶するバッファとしても使用される。RAM3は、例えばバッテリによりバックアップされていてもよい。   The CPU 1 controls the entire electronic musical tone generator according to the control program. In addition to the control program, the ROM 2 stores various parameters for setting the performance state, such as a plurality of tone color parameters and effect parameters. The RAM 3 is used as a work area for the CPU 1 and is also used as a buffer for temporarily storing data of various registers. The RAM 3 may be backed up by a battery, for example.

操作パネル4は、演奏時の状態を設定するための各種操作子およびこれにより設定された状態を表示するためのディスプレイ(LCD)を有する。パネルI/F5は、操作パネル4をスキャンしてパネルスイッチのオン/オフを示すパネルイベント情報を生成し、また、操作パネル4に配置されたLCDをドライブしてCPU1からの各種設定情報などを表示させる。パネルイベント情報は各パネルスイッチに対応付けられてRAM3に記憶される。   The operation panel 4 has various operators for setting the state during performance and a display (LCD) for displaying the state set thereby. The panel I / F 5 scans the operation panel 4 to generate panel event information indicating ON / OFF of the panel switch, and drives the LCD arranged on the operation panel 4 to display various setting information from the CPU 1. Display. The panel event information is stored in the RAM 3 in association with each panel switch.

鍵盤7の各鍵に対してその押鍵方向に鍵盤スイッチが配置されている。本発明では、押鍵深さ方向に少なくとも4個の鍵盤スイッチを配置しており、これらにより各鍵の押鍵および離鍵状態が感知される。鍵盤I/F7は、鍵盤スイッチをスキャンしてそれぞれのオン/オフ状態を検知し、押鍵(キーオン)、離鍵(キーオフ)、音高(キーナンバ)などのキーイベント情報を生成し、さらにベロシティを含む鍵タッチ情報を算出する。キーイベント情報や鍵タッチ情報もRAM3に記憶される。   For each key of the keyboard 7, a keyboard switch is arranged in the key pressing direction. In the present invention, at least four keyboard switches are arranged in the direction of the key depression depth, and the key depression and key release states of each key are sensed by these. The keyboard I / F7 scans the keyboard switch to detect each on / off state, generates key event information such as key press (key on), key release (key off), pitch (key number), and velocity. The key touch information including is calculated. Key event information and key touch information are also stored in the RAM 3.

MIDI I/F8は、外部MIDI機器との間においてMIDIメッセージのやり取りを行う信号送受信回路である。MIDI I/F8から入力される演奏情報、あるいは鍵盤7の操作によるキーイベント情報や鍵タッチ情報を含む演奏情報は、楽音発生器(TG)9入力される。   The MIDI I / F 8 is a signal transmission / reception circuit that exchanges MIDI messages with an external MIDI device. Performance information input from the MIDI I / F 8 or performance information including key event information and key touch information by operating the keyboard 7 is input to a musical tone generator (TG) 9.

楽音発生器9は、波形読み出し方式により演奏情報に基づく楽音信号を発生する回路であり、デジタル楽音波形サンプル値が記憶されている波形メモリから、発音すべき音高に比例したアドレス間隔で順次波形データを読み出し、補間演算を行って楽音波形信号を発生させる。   The tone generator 9 is a circuit that generates a tone signal based on performance information by means of a waveform readout method. From the waveform memory in which digital tone waveform sample values are stored, waveforms are sequentially generated at address intervals proportional to the pitch to be sounded. Data is read out, and an interpolating operation is performed to generate a musical sound waveform signal.

また、楽音発生器9は、エンベロープパラメータに従って発生したエンベロープ信号を楽音波形信号に乗算してエンベロープを付与し、さらにDSP(Digital Signal Processor)を備えたエフェクタにより、リバーブ、エコーなどの各種エフェクトを適宜付与したデジタル楽音信号を出力する。楽音発生器9は、複数、例えば32の楽音発生チャネルを有しているが、実際には1つのトーン発生器を時分割多重動作させることにより同時に複数の楽音信号を独立して発生可能に構成されている。   The musical sound generator 9 multiplies the musical sound waveform signal by the envelope signal generated according to the envelope parameter to give an envelope, and further, various effects such as reverb and echo are appropriately applied by an effector equipped with a DSP (Digital Signal Processor). Outputs the assigned digital musical tone signal. The musical tone generator 9 has a plurality of, for example, 32 musical tone generation channels, but in practice, a single tone generator is operated in a time-division multiplexing manner so that a plurality of musical tone signals can be generated independently at the same time. Has been.

D/A変換器10は、デジタル楽音信号をアナログ信号に変換する。D/A変換器10で変換されたアナログ信号は、出力増幅器(AMP)11を通してスピーカ12に与えられ、スピーカ12から楽音が送出される。   The D / A converter 10 converts the digital musical sound signal into an analog signal. The analog signal converted by the D / A converter 10 is given to the speaker 12 through an output amplifier (AMP) 11, and a musical sound is transmitted from the speaker 12.

図2は、鍵盤7の各鍵に対して配置された鍵盤スイッチを示す概念図である。ここでは鍵盤7の各鍵KEYに対しその押鍵深さ方向に第1ないし第4の鍵盤スイッチSW1,SW2,SW3,SW4を配置している。第1および第2の鍵盤スイッチSW1,SW2は比較的浅い押鍵深さ位置に対して配置しており、第3および第4の鍵盤スイッチSW3,SW4は比較的深い押鍵深さ位置に対して配置している。   FIG. 2 is a conceptual diagram showing a keyboard switch arranged for each key of the keyboard 7. Here, the first to fourth keyboard switches SW1, SW2, SW3, and SW4 are arranged in the key pressing depth direction for each key KEY of the keyboard 7. The first and second keyboard switches SW1 and SW2 are arranged with respect to a relatively shallow key depression depth position, and the third and fourth keyboard switches SW3 and SW4 are arranged with respect to a relatively deep key depression depth position. Arranged.

全離鍵状態から鍵KEYが深く押されればSW1,SW2,SW3,SW4が順にオンし、離されればSW4,SW3,SW2,SW1が順にオフする。イベントの内の押鍵イベントは、SW2あるいはSW4がオンすることで検知され、離鍵イベントは、SW1あるいはSW3がオフすることで検知される。また、鍵タッチ情報に含まれるベロシティは、SW1とSW2が順次オンする時間差、あるいはSW3とSW4が順次オンする時間差から算出される。   SW1, SW2, SW3, SW4 are turned on in sequence if the key KEY is pressed deeply from the fully released state, and SW4, SW3, SW2, SW1 are turned off in sequence if released. Of the events, a key depression event is detected when SW2 or SW4 is turned on, and a key release event is detected when SW1 or SW3 is turned off. The velocity included in the key touch information is calculated from the time difference when SW1 and SW2 are sequentially turned on or the time difference when SW3 and SW4 are sequentially turned on.

なお、SW1のオンで押鍵イベントが検知されれば、それに続くSW3の押鍵イベントは無視される。また、SW3のオフで離鍵イベントが検知されれば、それに続くSW1の離鍵イベントは無視される。これは、後述するフラグAllOffFlag、あるいは押鍵イベントが一旦発生されればセットされ、離鍵イベントが一旦発生されればリセットされるフラグを参照した制御で可能である。   If a key depression event is detected when SW1 is turned on, the subsequent key depression event of SW3 is ignored. If a key release event is detected when SW3 is off, the subsequent SW1 key release event is ignored. This can be controlled by referring to a flag AllOffFlag, which will be described later, or a flag that is set once a key depression event is generated and reset when a key release event is generated once.

SW1とSW2が順次オンする時間差を検出する構成は、第1の押鍵速度検出手段に相当し、その時間差からベロシティを算出する構成は、第1の鍵タッチ情報算出手段に相当する。また、SW3とSW4が順次オンする時間差を検出する構成は、第2の押鍵速度検出手段に相当し、その時間差からベロシティを算出する構成は、第2の鍵タッチ情報算出手段に相当する。   The configuration for detecting the time difference at which SW1 and SW2 are sequentially turned on corresponds to the first key pressing speed detection means, and the configuration for calculating the velocity from the time difference corresponds to the first key touch information calculation means. Further, the configuration for detecting the time difference when SW3 and SW4 are sequentially turned on corresponds to the second key pressing speed detection means, and the configuration for calculating the velocity from the time difference corresponds to the second key touch information calculation means.

図3は、図1の電子楽音発生器の動作の一例を示すメインフローチャートである。電源が投入されると、まず、初期化(S31)を実行する。この初期化により、CPU1、RAM3、トーン発生器11を構成するLSIなどを初期状態とする。   FIG. 3 is a main flowchart showing an example of the operation of the electronic musical tone generator of FIG. When the power is turned on, first, initialization (S31) is executed. With this initialization, the CPU 1, RAM 3, LSI constituting the tone generator 11, etc. are set to the initial state.

次に、イベント発生の有無を判定する(S32)。S32でイベント発生有りと判定した場合、該イベントに応じたイベント処理を実行する(S33)。S32でイベント発生無しと判定した場合やS33でイベント処理を実行した後は、通常処理を実行する(S34)。この通常処理(S34)は、音量制御やビブラート付与などの処理を含む。その後、S32にリターンする。   Next, it is determined whether or not an event has occurred (S32). If it is determined in S32 that an event has occurred, event processing corresponding to the event is executed (S33). If it is determined in S32 that no event has occurred, or after event processing is executed in S33, normal processing is executed (S34). This normal processing (S34) includes processing such as volume control and vibrato provision. Thereafter, the process returns to S32.

図4は、図3のイベント処理(S33)を示すフローチャートである。イベント処理では、まず、発生したイベントが押鍵イベントか否かを判定する(S41)。押鍵イベントは、図2のSW2あるいはSW4がオンになったことで判定できる。S41で押鍵イベントと判定した場合、押鍵処理(S42)を実行した後、リターンする。押鍵処理は、後述するカウンタルーチン(A)または(B)で求められたT1あるいはT2を取得し、それに応じたベロシティで発音させる処理を含む。S41で押鍵イベントと判定されない場合には、離鍵イベントか否かを判定する(S43)。離鍵イベントは、図2のSW1あるいはSW3がオフになったことで判定できる。S43で離鍵イベントと判定した場合、離鍵処理(S44)を実行した後、リターンする。   FIG. 4 is a flowchart showing the event processing (S33) of FIG. In the event processing, first, it is determined whether or not the generated event is a key pressing event (S41). The key depression event can be determined by turning on SW2 or SW4 in FIG. If it is determined in S41 that the event is a key pressing event, the key pressing process (S42) is executed and then the process returns. The key pressing process includes a process of acquiring T1 or T2 obtained by a counter routine (A) or (B) described later and generating a sound with a velocity corresponding thereto. If it is not determined in S41 that the event is a key press event, it is determined whether or not the event is a key release event (S43). The key release event can be determined by turning off SW1 or SW3 in FIG. If it is determined in S43 that the event is a key release event, the key release process (S44) is executed and then the process returns.

S43で離鍵イベントと判定されない場合には、パネルイベントか否かを判定する(S45)。S45でパネルイベントと判定した場合、パネル処理(S46)を実行した後、リターンし、パネルイベントと判定されない場合には、その他のイベント処理(S47)を実行した後、リターンする。離鍵処理やパネル処理、その他のイベント処理は、通常のものと変わりがないので説明を省略する。   If it is not determined as a key release event in S43, it is determined whether or not it is a panel event (S45). If the panel event is determined in S45, the process returns after executing the panel process (S46). If not determined as a panel event, the process returns after executing the other event process (S47). The key release process, panel process, and other event processes are the same as normal ones, and will not be described.

図5は、タイマ割り込みを示すフローチャートである。タイマ割り込みは、CPU1に割り込みをかけることによってカウンタのカウント値tを所定クロックに従ってインクリメントする(S51)。tは、ベロシティの算出に用いられるので、この所定クロックは、押鍵変化の時間に比べて十分の短い周期のものとする。なお、tの初期値は0である。 FIG. 5 is a flowchart showing the timer interrupt. Timer interrupt increments the count value t x of the counter in accordance with a predetermined clock by interrupting the CPU 1 (S51). Since t x is used for velocity calculation, the predetermined clock has a period sufficiently shorter than the key pressing change time. Note that the initial value of t x is 0.

本実施形態では全離鍵状態からの押鍵か半離鍵状態からの押鍵かを判断するためにフラグAllOffFlagを利用する。図6は、AllOffFlagを制御するフラグコントロールルーチンを示すフローチャートである。   In the present embodiment, a flag AllOffFlag is used to determine whether the key is pressed from the fully-released state or the half-released state. FIG. 6 is a flowchart showing a flag control routine for controlling AllOffFlag.

AllOffFlagは初期状態ではリセットされている。まず、SW4がオンになったか否かを判定する(S61)。押鍵されてSW4がオンになったと判定された場合、AllOffFlagはセットされる(S62)。次に、SW4がオフになったか否かを判定する(S63)。離鍵されてSW1がオフになったと判定された場合、AllOffFlagはリセットされる。AllOffFlagは、押鍵されてSW4がオンになると離鍵されてSW3やSW2がオフしてもSW1がオンの半離鍵状態ではセットされたままとなる。   AllOffFlag is reset in the initial state. First, it is determined whether or not SW4 is turned on (S61). If it is determined that the key is pressed and SW4 is turned on, AllOffFlag is set (S62). Next, it is determined whether or not SW4 is turned off (S63). If it is determined that SW1 is turned off after the key is released, AllOffFlag is reset. AllOffFlag is released when the key is pressed and SW4 is turned on. Even if SW3 and SW2 are turned off, AllOffFlag remains set in the half-released state where SW1 is on.

以上の処理により、AllOffFlagは、初期状態ではリセット(=0)されており、SW4がオンするとセット(=1)され、その後、SW1がオフするとリセット(=0)される。   Through the above processing, AllOffFlag is reset (= 0) in the initial state, and is set (= 1) when SW4 is turned on, and then reset (= 0) when SW1 is turned off.

図7および図8は、図4の押鍵処理(S42)で発音させる際のベロシティを求めるカウンタルーチン(A),(B)を示すフローチャートである。図7のカウンタルーチン(A)は、SW1またはSW3がオンとなった場合に呼び出されて実行され、カウンタルーチン(B)は、SW2またはSW4がオンとなった場合に呼び出されて実行される。   FIGS. 7 and 8 are flowcharts showing counter routines (A) and (B) for obtaining the velocity at the time of sound generation in the key pressing process (S42) of FIG. The counter routine (A) in FIG. 7 is called and executed when SW1 or SW3 is turned on, and the counter routine (B) is called and executed when SW2 or SW4 is turned on.

図7のカウンタルーチン(A)は、SW1またはSW3がオンとなった場合に呼び出される。ここでは、まず、割り込みを禁止し(S71)、tを0にリセット(S72)した後、割り込み禁止を解除する(S73)。割り込み禁止としてtを0にリセットするという構成を採ることにより、そのときに割り込みがかかることによる誤動作を防止できる。S71〜S73により、カウンタルーチン(A)が呼び出されるたびにtが0にセットされる。 The counter routine (A) in FIG. 7 is called when SW1 or SW3 is turned on. Here, first, an interrupt is prohibited (S71), after resetting (S72) a t x to 0 to release the interrupt disabled (S73). By adopting a configuration in which t x is reset to 0 as an interrupt prohibition, it is possible to prevent a malfunction caused by an interrupt at that time. The S 71 to S 73, the counter routine (A) is set to t x is 0 each time it is called.

次に、AllOffFlagがセットされているか否かを判定し(S74)、AllOffFlagがセットされていないと判定された場合、さらにSW1のオンか否かを判定する(S75)。ここで、SW1のオンと判定された場合、T1に0を代入し(S76)、SW1のオンと判定されない場合にはリターンする。   Next, it is determined whether or not AllOffFlag is set (S74). If it is determined that AllOffFlag is not set, it is further determined whether or not SW1 is on (S75). If it is determined that SW1 is on, 0 is substituted for T1 (S76). If it is not determined that SW1 is on, the process returns.

また、S74で、AllOffFlagがセットされていると判定された場合には、さらにSW3のオンか否かを判定する(S77)。ここで、SW3のオンと判定された場合、T2に0を代入し(S78)、SW3のオンと判定されない場合にはリターンする。   If it is determined in S74 that AllOffFlag is set, it is further determined whether or not SW3 is on (S77). If it is determined that SW3 is on, 0 is substituted for T2 (S78). If it is not determined that SW3 is on, the process returns.

以上の処理により、全離鍵状態から押鍵されてSW1がオンした時点でT1がOとなり、半離鍵状態からSW3がオンした時点でT2がOとなる。   With the above processing, T1 becomes O when the key is pressed from the fully released state and SW1 is turned on, and T2 becomes O when SW3 is turned on from the half-released state.

図8のカウンタルーチン(B)は、SW2またはSW4がオンとなった場合に呼び出される。ここでは、まず、割り込みを禁止し(S81)、そのときのtを読み出してdTとする(S82)。その後、tを0にリセットし(S83)、割り込み禁止を解除する(S84)。割り込み禁止としてtを読み出すという構成を採ることにより、そのときに割り込みがかかることによる誤動作を防止できる。S81〜S84により、カウンタルーチン(B)が呼び出されるたびに、SW1がオンしてからSW2がオンするまでの時間差、あるいはSW3がオンしてからSW4がオンする間での時間差がdTとして得られる。 The counter routine (B) in FIG. 8 is called when SW2 or SW4 is turned on. Here, first, an interrupt is prohibited (S81), and dT reads t x at that time (S82). Then, reset the t x to 0 (S83), it releases the interrupt disabled (S84). By adopting a configuration in which t x is read out as an interrupt prohibition, it is possible to prevent a malfunction due to an interrupt occurring at that time. Every time the counter routine (B) is called by S81 to S84, the time difference from when SW1 is turned on until SW2 is turned on, or the time difference between when SW3 is turned on and SW4 is turned on is obtained as dT. .

次に、AllOffFlagがセットされているか否かを判定し(S85)、AllOffFlagがセットされていないと判定された場合、さらにSW2のオンか否かを判定する(S86)。ここで、SW2のオンと判定された場合、T1にT1+dTを代入し(S87)、SW2のオンと判定されない場合にはリターンする。   Next, it is determined whether or not AllOffFlag is set (S85). If it is determined that AllOffFlag is not set, it is further determined whether or not SW2 is on (S86). If it is determined that SW2 is on, T1 + dT is substituted for T1 (S87), and if it is not determined that SW2 is on, the process returns.

また、S85で、AllOffFlagがセットされていると判定された場合には、さらにSW4のオンか否かを判定する(S88)。ここで、SW4のオンと判定された場合、T2にT2+dTを代入し(S89)、SW4のオンと判定されない場合にはリターンする。   If it is determined in S85 that AllOffFlag is set, it is further determined whether or not SW4 is on (S88). If it is determined that SW4 is on, T2 + dT is substituted for T2 (S89), and if it is not determined that SW4 is on, the process returns.

以上の処理により、全離鍵状態から押鍵されてSW2がオンした時点でT1がT1+dTとなり、これは、SW1がオンしてからSW2がオンするまでの時間差を表すことになる。また、半離鍵状態から押鍵されてSW4がオンした時点でT2がT2+dTとなり、これは、SW3がオンしてからSW4がオンするまでの時間差を表すことになる。これにより得られたT1,T2は,発音の際のベロシティを算出する際に用いられる。   With the above processing, T1 becomes T1 + dT when SW2 is turned on after being depressed from the fully released state, and this represents a time difference from when SW1 is turned on to when SW2 is turned on. Further, when SW4 is turned on after the key is depressed from the half-released state, T2 becomes T2 + dT, and this represents a time difference from when SW3 is turned on to when SW4 is turned on. The obtained T1 and T2 are used when calculating the velocity at the time of pronunciation.

図9は、押鍵処理(S42)を示すフローチャートである。この押鍵処理は、SW2あるいはSW4がオフからオンになったときに、カウンタルーチン(A),(B)に続いて実行される。まず、AllOffFlagがセットされているか否かを判定し(S91)、AllOffFlagがセットされていないと判定された場合、S87で得られたT1に基づいてベロシティを算出し、これにより発音を行う(S92)。これは、全離鍵状態から押鍵されてSW1,SW2が順にオンになった場合である。これに続いてSW3,SW4が順にオンしてもAllOffFlagはセットされていないので、これにより発音が行われることはない。   FIG. 9 is a flowchart showing the key pressing process (S42). This key pressing process is executed following the counter routines (A) and (B) when SW2 or SW4 is switched from OFF to ON. First, it is determined whether or not AllOffFlag is set (S91) .If it is determined that AllOffFlag is not set, the velocity is calculated based on T1 obtained in S87, and the sound is thereby generated (S92). ). This is a case where SW1 and SW2 are turned on in order after being depressed from the fully released key. Subsequent to this, even when SW3 and SW4 are turned on in sequence, AllOffFlag is not set, so that no sound is produced.

また、AllOffFlagがセットされていると判定された場合には、S89で得られたT2に基づいてベロシティを算出し、これにより発音を行う(S93)。これは、半離鍵状態から押鍵されてSW3,SW4が順にオンになった場合である。   On the other hand, if it is determined that AllOffFlag is set, the velocity is calculated based on T2 obtained in S89, and the sound is produced by this (S93). This is a case where SW3 and SW4 are turned on in order after being depressed from the half-released state.

以上のように、SW1〜SW4が全てオフである全離鍵状態からの押鍵に対しては、T1(第1の鍵タッチ情報算出手段により算出された鍵タッチ情報)に応じて楽音を発生し、SW1がオンであり、SW3がオフである半離鍵状態から押鍵に対しては、T2(第2の鍵タッチ情報算出手段により算出された鍵タッチ情報)に応じて楽音を発生する。全離鍵状態から押鍵された場合にT1をベロシティ算出に用いたのは、演奏する際の演奏者の意図がキータッチの初期によく反映されているからである。   As described above, a musical tone is generated according to T1 (key touch information calculated by the first key touch information calculation means) when a key is pressed from a fully-released state in which SW1 to SW4 are all off. When a key is pressed from a half-key release state in which SW1 is on and SW3 is off, a musical tone is generated according to T2 (key touch information calculated by the second key touch information calculating means). . The reason why T1 is used for velocity calculation when the key is pressed from the fully released state is that the intention of the performer at the time of performance is well reflected in the initial stage of key touch.

図10は、押鍵時の動作を説明するための説明図であり、縦軸は押鍵深さを表し、横軸は期間経過を表している。図10は、t0で押鍵が始まり、SW1,SW2,SW3,SW4はそれぞれ、t1,t2,t2,t4でオンし、その後、離鍵が開始され、SW3,SW4がそれぞれt5,t6でオフし、さらに鍵が浅く押された半押鍵状態から再び押鍵されてSW3,SW4がt7,t8でオンし、その後、離鍵されてSW4,SW3,SW2,SW1がt9,t10,t11,t12で順次オフした場合を示している。   FIG. 10 is an explanatory diagram for explaining the operation at the time of key depression, where the vertical axis represents the key depression depth and the horizontal axis represents the passage of the period. In FIG. 10, key pressing starts at t0, SW1, SW2, SW3, and SW4 turn on at t1, t2, t2, and t4, respectively, then key release starts, and SW3 and SW4 turn off at t5 and t6, respectively. Then, the key is pressed again from the half-pressed state where the key is pressed shallowly, and SW3, SW4 are turned on at t7, t8, and then released, and SW4, SW3, SW2, SW1 are t9, t10, t11, The case where it turns off one by one at t12 is shown.

この場合、AllOffFlagは、t4でセット(=1)され、t12でリセット(=0)される。上記カウンタルーチン(A),(B)に従って、全離鍵状態からの押鍵時のベロシティは、t1〜t2の時間dTを元に算出され、半離鍵状態からの押鍵時のベロシティは、t7〜t8の時間dTを元に算出されることになる。すなわち、AllOffFlagにより全離鍵状態からの押鍵であるか半離鍵状態からの押鍵であるかを判断し、これにより、SW1がオンしてからSW2がオンするまでの時間あるいはSW3がオンしてからSW4がオンするまでの時間の一方を選択してベロシティ算出に用いている。 In this case, AllOffFlag is set (= 1) at t4 and reset (= 0) at t12. Accordance with the above counter routine (A), (B), the velocity of key pressing from all key released state is calculated based on the time dT 1 of t1 to t2, velocity of key pressing from the half-release key state It will be calculated based on the time dT 2 of t7 to t8. In other words, AllOffFlag determines whether the key is pressed from the full key release state or from the half key release state, so that the time from when SW1 is turned on to when SW2 is turned on or SW3 is turned on Then, one of the time from when SW4 is turned on is selected and used for velocity calculation.

以上、実施形態について説明したが、本発明は上記実施形態に限られず、種々に変形が可能である。例えば、各鍵に対してその押鍵深さ方向位置に5個以上の鍵盤スイッチを配置し、その適宜2個を組み合わせを選択して鍵タッチ情報の算出に用いることもできる。これにより、演奏者の意図がよく反映された鍵タッチ情報が得られるように鍵盤スイッチを選択して鍵タッチ情報算出に利用できる。ただし、全離鍵前の半離鍵状態から再び押鍵された場合でも鍵タッチ情報が算出できるように配慮することが必要である。例えば、5個の鍵盤スイッチを配置した場合、押鍵深さ方向位置が最も浅い位置と2番目に浅い位置の鍵盤スイッチを1組とし、3番目と4番目に浅い位置の鍵盤スイッチあるいは4番目に浅い位置と最も深い位置の鍵盤スイッチを1組として用いることができる。   Although the embodiment has been described above, the present invention is not limited to the above embodiment, and various modifications can be made. For example, it is also possible to arrange five or more keyboard switches for each key in the key press depth direction position, and select the appropriate combination of the two to be used for calculating the key touch information. Thus, the keyboard switch can be selected and used for calculating the key touch information so that the key touch information that reflects the intention of the performer can be obtained. However, it is necessary to consider that the key touch information can be calculated even when the key is pressed again from the half key release state before the full key release. For example, when five keyboard switches are arranged, one set of the keyboard switch at the shallowest position and the second shallowest position in the key pressing depth direction is a set, and the third and fourth shallowest keyboard switch or fourth switch. The keyboard switch at the shallowest position and the deepest position can be used as one set.

本発明が適用される電子楽音発生器の一実施形態を示すブロック図である。It is a block diagram which shows one Embodiment of the electronic musical tone generator with which this invention is applied. 鍵盤の各鍵に対して配置された鍵盤スイッチを示す概念図である。It is a conceptual diagram which shows the keyboard switch arrange | positioned with respect to each key of a keyboard. 図1の電子楽音発生器の動作の一例を示すメインフローチャートである。It is a main flowchart which shows an example of operation | movement of the electronic musical tone generator of FIG. 図3のイベント処理を示すフローチャートである。It is a flowchart which shows the event process of FIG. タイマ割り込みを示すフローチャートである。It is a flowchart which shows a timer interruption. AllOffFlagを制御するフラグコントロールルーチンを示すフローチャートである。It is a flowchart which shows the flag control routine which controls AllOffFlag. 押鍵処理で発音させる際のベロシティを求めるカウンタルーチン(A)を示すフローチャートである。It is a flowchart which shows the counter routine (A) which calculates | requires the velocity at the time of making it sound by a key press process. 押鍵処理で発音させる際のベロシティを求めるカウンタルーチン(B)を示すフローチャートである。It is a flowchart which shows the counter routine (B) which calculates | requires the velocity at the time of making it sound by a key press process. 押鍵処理を示すフローチャートである。It is a flowchart which shows a key pressing process. 押鍵時の動作を説明するための説明図である。It is explanatory drawing for demonstrating the operation | movement at the time of key pressing.

符号の説明Explanation of symbols

1・・・CPU、2・・・ROM、3・・・RAM、4・・・操作パネル、5・・・パネルインタフェース(I/F)、6・・・鍵盤(キーボード)、7・・・鍵盤I/F、8・・・MIDI I/F、9・・・トーン発生器、10・・・D/A変換器、11・・・出力増幅器(AMP)、12・・・スピーカ、13・・・バス 1 ... CPU, 2 ... ROM, 3 ... RAM, 4 ... Operation panel, 5 ... Panel interface (I / F), 6 ... Keyboard (keyboard), 7 ... Keyboard I / F, 8 ... MIDI I / F, 9 ... Tone generator, 10 ... D / A converter, 11 ... Output amplifier (AMP), 12 ... Speaker, 13. ··bus

Claims (3)

鍵盤の各鍵に対してその押鍵深さ方向位置に配置された鍵盤スイッチのオンオフに基づいて鍵タッチ情報を算出し、該鍵タッチ情報に応じて楽音を発生する電子楽音発生器において、
鍵盤の各鍵に対してその押鍵深さ方向の異なる位置に順に配置された少なくとも4個の第1ないし第4の鍵盤スイッチと、
前記第1の鍵盤スイッチがオンしてから前記第2の鍵盤スイッチがオンするまでの時間を計測する第1の押鍵速度検出手段と、
前記第3の鍵盤スイッチがオンしてから前記第4の鍵盤スイッチがオンするまでの時間を計測する第2の押鍵速度検出手段と、
前記第1の押鍵速度検出手段によって計測された時間に基づいて鍵タッチ情報を算出する第1の鍵タッチ情報算出手段と、
前記第2の押鍵速度検出手段によって計測された時間に基づいて鍵タッチ情報を算出する第2の鍵タッチ情報算出手段と、
前記第1ないし第4の鍵盤スイッチが全てオフである全離鍵状態からの押鍵に対しては、前記第1の鍵タッチ情報算出手段により算出された鍵タッチ情報に応じて楽音を発生し、前記第1の鍵盤スイッチがオンであり、第3の鍵盤スイッチがオフである半離鍵状態から押鍵に対しては、前記第2の鍵タッチ情報算出手段により算出された鍵タッチ情報に応じて楽音を発生することを特徴とする電子楽音発生器。
In an electronic musical tone generator that calculates key touch information based on on / off of a keyboard switch arranged at a key pressing depth direction position for each key of the keyboard, and generates a musical tone according to the key touch information.
At least four first to fourth keyboard switches sequentially arranged at different positions in the key pressing depth direction for each key of the keyboard;
First key-pressing speed detecting means for measuring a time from when the first keyboard switch is turned on until the second keyboard switch is turned on;
Second key-pressing speed detecting means for measuring a time from when the third keyboard switch is turned on to when the fourth keyboard switch is turned on;
First key touch information calculating means for calculating key touch information based on the time measured by the first key pressing speed detecting means;
Second key touch information calculating means for calculating key touch information based on the time measured by the second key pressing speed detecting means;
When a key is pressed from a fully-released state in which all of the first to fourth keyboard switches are off, a tone is generated according to the key touch information calculated by the first key touch information calculating means. The key touch information calculated by the second key touch information calculation means is applied to a key depression from a half key release state in which the first keyboard switch is on and the third keyboard switch is off. An electronic musical sound generator characterized by generating musical sounds in response.
鍵盤の各鍵に対してその押鍵深さ方向の異なる位置に順に配置された5個以上の鍵盤スイッチを備え、その中から第1ないし第4の鍵盤スイッチが選択可能となっていることを特徴とする請求項1に記載の電子楽音発生器。   It is provided with five or more keyboard switches sequentially arranged at different positions in the key pressing depth direction for each key of the keyboard, and the first to fourth keyboard switches can be selected from among them. The electronic musical sound generator according to claim 1, wherein 前記5個以上の鍵盤スイッチの中からの押鍵深さ方向が3番目以上に深い位置に配置された2個の鍵盤スイッチを選択して前記第3および第4の鍵盤スイッチとして用いたことを特徴とする請求項2に記載の電子楽音発生器。   Two keyboard switches arranged in a position where the key pressing depth direction is the third or deeper among the five or more keyboard switches are selected and used as the third and fourth keyboard switches. The electronic musical sound generator according to claim 2,
JP2007129324A 2007-05-15 2007-05-15 Electronic music sound generator Pending JP2008286858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007129324A JP2008286858A (en) 2007-05-15 2007-05-15 Electronic music sound generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007129324A JP2008286858A (en) 2007-05-15 2007-05-15 Electronic music sound generator

Publications (1)

Publication Number Publication Date
JP2008286858A true JP2008286858A (en) 2008-11-27

Family

ID=40146677

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007129324A Pending JP2008286858A (en) 2007-05-15 2007-05-15 Electronic music sound generator

Country Status (1)

Country Link
JP (1) JP2008286858A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010160263A (en) * 2009-01-07 2010-07-22 Casio Computer Co Ltd Electronic keyboard musical instrument

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010160263A (en) * 2009-01-07 2010-07-22 Casio Computer Co Ltd Electronic keyboard musical instrument

Similar Documents

Publication Publication Date Title
US8785759B2 (en) Electric keyboard musical instrument, method executed by the same, and storage medium
US11551653B2 (en) Electronic musical instrument
US11694665B2 (en) Sound source, keyboard musical instrument, and method for generating sound signal
JP3922225B2 (en) Pronunciation control program and electronic keyboard instrument using the same
JP6176480B2 (en) Musical sound generating apparatus, musical sound generating method and program
JP5315883B2 (en) Electronic musical instrument and musical sound generation program
US9905209B2 (en) Electronic keyboard musical instrument
JP2005222073A (en) Electronic musical instrument
JP2008286858A (en) Electronic music sound generator
JP2013205778A (en) Electronic keyboard musical instrument
JP2011191352A (en) Electronic keyboard musical instrument
JP2008046249A (en) Electronic keyboard instrument
JP4175566B2 (en) Electronic musical instrument pronunciation control device
JP6507519B2 (en) Touch detection device, method, and program, electronic musical instrument
JP6410345B2 (en) Sound preview apparatus and program
JP3843800B2 (en) Touch control device and touch control method
JP2007279490A (en) Electronic musical instrument
JP4855202B2 (en) Electronic keyboard instrument
JP4457200B2 (en) Electronic musical instruments
JP2007240929A (en) Key area dividing point determining device
JP2024086022A (en) Electronic keyboard instrument, electronic musical instrument system, program, and sound generation control method
JPH0417986Y2 (en)
JPH0683345A (en) Input information changing device of electronic musical instrument
JP2011053465A (en) Electronic percussion instrument
JP2006301017A (en) Electronic keyboard instrument