JP2967787B2 - Tone generator - Google Patents

Tone generator

Info

Publication number
JP2967787B2
JP2967787B2 JP2180667A JP18066790A JP2967787B2 JP 2967787 B2 JP2967787 B2 JP 2967787B2 JP 2180667 A JP2180667 A JP 2180667A JP 18066790 A JP18066790 A JP 18066790A JP 2967787 B2 JP2967787 B2 JP 2967787B2
Authority
JP
Japan
Prior art keywords
key
envelope waveform
envelope
state
level
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
JP2180667A
Other languages
Japanese (ja)
Other versions
JPH0468398A (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 JP2180667A priority Critical patent/JP2967787B2/en
Priority to US07/727,548 priority patent/US5256831A/en
Publication of JPH0468398A publication Critical patent/JPH0468398A/en
Application granted granted Critical
Publication of JP2967787B2 publication Critical patent/JP2967787B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】 [産業上の利用分野] この発明は、電子楽器用として好適な楽音発生装置に
関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a tone generator suitable for an electronic musical instrument.

[従来の技術] 従来、電子楽器用の楽音発生装置として、アタック、
ディケイ等複数のステートからなるエンベロープ波形を
発生させるものが知られている(例えば特公昭63−3907
2号)。
[Prior Art] Conventionally, attack,
A device that generates an envelope waveform composed of a plurality of states such as decay is known (for example, Japanese Patent Publication No. 63-3907).
No. 2).

しかしながら、従来の楽音発生装置においては、極端
に早く、エンベロープ波形が充分に立上る前にキーオフ
動作を行なった場合、アタック感が出ない内にエンベロ
ープ波形が減衰を始めてしまうという不都合があった。
However, in the conventional tone generator, if the key-off operation is performed extremely quickly before the envelope waveform sufficiently rises, there is a disadvantage that the envelope waveform starts to be attenuated without an attack feeling.

また、特開昭53−25416号公報には、電子楽器におい
てエンベロープ波形信号を発生させる装置であって、エ
ンベロープの波形レベルが所定のアタックレベルに達す
る以前にキーオフされる場合と、波形レベルが前記アタ
ックレベルに達した後にキーオフされる場合とで、異な
る減衰波形を発生させるようにしたものが記載されてい
る。
Japanese Patent Application Laid-Open No. 53-25416 discloses an apparatus for generating an envelope waveform signal in an electronic musical instrument, wherein a key is turned off before the waveform level of the envelope reaches a predetermined attack level, and It is described that a different attenuation waveform is generated when the key is turned off after the attack level is reached.

しかし、このものでは、単にアタック時にキーオフさ
れた場合のみに注目し、所定のアタックレベルに達した
か否かのみにより減衰波形を異ならせているため、単
に、アタック時のキーオフによる減衰の不自然さを解消
するにとどまっている。
However, in this method, attention is paid only to a case where a key is turned off during an attack, and an attenuation waveform is made different only depending on whether or not a predetermined attack level is reached. It has just been eliminated.

また、特開平2−48699号公報には、エンベロープ波
形を制御する技術として、キーオフのタイミングが所定
の期間内である場合、キーオフ処理を行なうタイミング
を上記所定の期間を経過するまで遅延させるようにした
ものが記載されている。
Japanese Patent Application Laid-Open No. 2-48699 discloses a technique for controlling an envelope waveform such that when a key-off timing is within a predetermined period, the timing of performing a key-off process is delayed until the predetermined period elapses. Is described.

しかしこの技術は、キーオフ処理を、キーオフのタイ
ミングに応じて単に遅延させるようにしただけであるか
ら、キーオフ処理が単調なものとならざるを得ない。
However, in this technique, the key-off processing is simply delayed according to the timing of the key-off, so that the key-off processing must be monotonous.

このように、従米のものでは、キーオフの種々のタイ
ミングに応じてエンベロープの形状を多彩に制御するこ
とができない。
As described above, in the U.S.A., the shape of the envelope cannot be variously controlled in accordance with various key-off timings.

[発明が解決しようとする課題] この発明の目的は、このような従来技術の問題点に鑑
み、キーオフタイミングが極端に早い場合にも十分なア
タック感を有するとともに、キーオフの種々のタイミン
グに応じてエンベロープの形状を多彩に制御することが
できる楽音発生装置を提供することにある。
[Problems to be Solved by the Invention] In view of the problems of the related art, an object of the present invention is to have a sufficient attack feeling even when the key-off timing is extremely early, and to respond to various key-off timings. It is an object of the present invention to provide a tone generator capable of controlling the shape of the envelope in various ways.

[課題を解決するための手段] 前記の目的を達成するためこの発明では、エンベロー
プ波形信号を形成するエンベロープ波形信号形成手段
と、前記エンベロープ波形信号を用いて楽音信号を発生
する楽音信号発生手段とを具備する楽音発生装置におい
て、 エンベロープ波形上の特定位置を任意に設定する特定
位置設定手段と、 キーオフの指示があったとき、 (a)該キーオフがあった時点で前記楽音信号発生手段
に対してキーオフ処理を指示するとともに、 (b)前記キーオフのタイミングにおける前記エンベロ
ープ波形上の位置が前記特定位置よりも前である場合に
は、前記エンベロープ波形信号形成手段で形成されるエ
ンベロープ波形信号が前記特定位置に達するまで前記エ
ンベロープ波形信号形成手段におけるキーオフ処理を実
行させず、前記エンベロープ波形信号形成手段で形成さ
れるエンベロープ波形信号が前記特定位置に達した時点
で前記エンベロープ波形信号形成手段におけるキーオフ
処理を実行させ、 (c)前記キーオフのタイミングにおける前記エンベロ
ープ波形上の位置が前記特定位置よりも後である場合に
は、該キーオフがあった時点で前記エンベロープ波形信
号形成手段におけるキーオフ処理を実行させる 制御手段と を具備することを特徴とする。
Means for Solving the Problems To achieve the above object, according to the present invention, there is provided an envelope waveform signal forming means for forming an envelope waveform signal, and a tone signal generating means for generating a tone signal using the envelope waveform signal. A specific position setting means for arbitrarily setting a specific position on the envelope waveform; and when a key-off instruction is given, (a) when the key-off occurs, the musical sound signal generating means (B) when the position on the envelope waveform at the key-off timing is before the specific position, the envelope waveform signal formed by the envelope waveform signal forming means is used for the key-off process. Executes a key-off process in the envelope waveform signal forming means until a specific position is reached. Without performing the key-off process in the envelope waveform signal forming means when the envelope waveform signal formed by the envelope waveform signal forming means reaches the specific position; (c) performing the key-off processing on the envelope waveform at the key-off timing; When the position is located after the specific position, the control unit causes the envelope waveform signal forming unit to execute a key-off process when the key-off occurs.

この発明の好ましい実施例において、前記特定位置設
定手段は、エンベロープ波形上の第1および第2の特定
位置を各々任意に設定するものであり、前記制御手段
は、前記キーオフタイミングが前記第1特定位置より前
のときは前記エンベロープ波形信号形成手段におけるキ
ーオフ処理を遅延させ、前記キーオフタイミングが前記
第1特定位置および第2特定位置間のときと、前記第2
特定位置より後であるときとでエンベロープ波形信号形
成手段におけるキーオフ処理におけるエンベロープ波形
の減衰特性を異ならせるものである。
In a preferred embodiment of the present invention, the specific position setting means arbitrarily sets first and second specific positions on an envelope waveform, and the control means sets the key-off timing to the first specific position. When the key-off timing is between the first specific position and the second specific position, the key-off process in the envelope waveform signal forming means is delayed when the key-off timing is between the first specific position and the second specific position.
The attenuation characteristic of the envelope waveform in the key-off process in the envelope waveform signal forming means differs between when the envelope is after the specific position.

後述する実施例において、前記エンベロープ波形信号
形成手段はCPU10および図5〜7のフローに対応し、楽
音信号発生手段は音源回路16に、特定位置設定手段はEG
設定SW14に、そして制御手段はCPU10に対応する。
In an embodiment described later, the envelope waveform signal forming means corresponds to the CPU 10 and the flow shown in FIGS. 5 to 7, the tone signal generating means is provided in the tone generator circuit 16, and the specific position setting means is provided in the EG.
The setting switch 14 corresponds to the control means, and the control means corresponds to the CPU 10.

[作用] 上記構成によれば、キーオフのタイミングにおける
エンベロープ波形上の位置が特定位置よりも前である場
合には、エンベロープ波形信号形成手段におけるキーオ
フ処理を遅延させているため、キーオフタイミングが早
過ぎる場合にも、充分なアタック感を有するエンベロー
プ波形を発生することができる。
[Operation] According to the above configuration, when the position on the envelope waveform at the key-off timing is before the specific position, the key-off process in the envelope waveform signal forming means is delayed, so that the key-off timing is too early. In this case, an envelope waveform having a sufficient attack feeling can be generated.

さらに、キーオフがあった時点で楽音信号発生手段
に対してキーオフ処理を指示しており、これらおよび
の構成を併せ持つことにより、下記の効果を奏する。
すなわち、この発明では、キーオフがあった場合におけ
る楽音信号発生手段への制御とエンベロープ波形信号形
成手段への制御とが独立しており、楽音信号発生手段に
対しては、キーオフがあった時点で発音停止が指示さ
れ、一方、エンベロープ波形信号形成手段に対しては、
キーオフのタイミングにおけるエンベロープ波形上の位
置が前記特定位置よりも前である場合には、エンベロー
プ波形信号形成手段におけるキーオフ処理が遅延される
ようになっている。
Further, the key-off process is instructed to the tone signal generating means at the time of the key-off, and the following effects can be obtained by combining these and the configurations.
That is, in the present invention, the control to the tone signal generating means and the control to the envelope waveform signal forming means when the key is turned off are independent. Stop sounding is instructed. On the other hand, for the envelope waveform signal forming means,
If the position on the envelope waveform at the key-off timing is before the specific position, the key-off process in the envelope waveform signal forming means is delayed.

これにより、エンベロープについては上記条件の場合
にキーオフ処理が遅延されるが、他のパラメータ(例え
ば音色、効果など)についてはエンベロープについての
キーオフ処理が遅延された場合でもキーオフされた時点
でキーオフ処理を実行させることができる。
As a result, the key-off process is delayed for the envelope under the above condition, but the key-off process is performed at the time of key-off for other parameters (for example, tone, effect, etc.) even when the key-off process for the envelope is delayed. Can be executed.

[効果] したがって、この発明によれば、キーオフタイミング
が早過ぎる場合にも、十分なアタック感を有するエンベ
ロープを発生させることができるとともに、キーオフタ
イミングに応じてエンベロープ形状を従来より多彩なも
のとすることができる。また、音色など、エンベロープ
以外については、エンベロープについてのキーオフ処理
が遅延された場合でも必要に応じてキーオフされた時点
でキーオフ処理を実行させることができ、より多彩な楽
音を発生することができる。
[Effect] Therefore, according to the present invention, even when the key-off timing is too early, an envelope having a sufficient attack feeling can be generated, and the envelope shape can be made more versatile in accordance with the key-off timing. be able to. In addition, even if the key-off process for the envelope is delayed, the key-off process can be executed as needed when the key-off process is performed on the envelope other than the envelope, so that a wider variety of musical sounds can be generated.

[実施例] 以下、図面によりこの発明の実施例を説明する。Hereinafter, embodiments of the present invention will be described with reference to the drawings.

第1図は、この発明の一実施例に係る電子楽器のハー
ドウエア構成を示す。
FIG. 1 shows a hardware configuration of an electronic musical instrument according to an embodiment of the present invention.

同図の電子楽器は、中央処理装置(CPU)10を用いて
その全体動作を制御するように構成したものである。CP
U10には双方向バスラインBUSを介してリードオンリメモ
リ(ROM)11、ランダムアクセスメモリ(RAM)12、キー
検出回路13、EG設定スイッチ群14、その他のスイッチ群
15、および音源回路16が接続されている。さらに、CPU1
0には信号ラインLを介してタイマ回路17が接続され、
キー検出回路13には鍵盤回路18が接続され、音源回路16
にはサウンドシステム19が接続されている。
The electronic musical instrument shown in FIG. 1 is configured to control the entire operation using a central processing unit (CPU) 10. CP
U10 has a read only memory (ROM) 11, a random access memory (RAM) 12, a key detection circuit 13, an EG setting switch group 14, and other switches via a bidirectional bus line BUS.
15 and a tone generator circuit 16 are connected. In addition, CPU1
Timer circuit 17 is connected to 0 via signal line L,
A keyboard circuit 18 is connected to the key detection circuit 13 and a tone generator circuit 16
Is connected to a sound system 19.

ROM11には、プログラムエリアとパラメータエリアが
設けられている。プログラムエリアには、第2〜7図に
示すフローチャートに対応するメインルーチン処理、お
よびタイマインタラプト処理等の各種制御プログラムが
格納されている。この電子楽器において発生する楽音の
エンベロープ波形は、第8〜11図に示されるように、ア
タック、ディケイ、ホールド、およびリリースまたはサ
スティン等の各ステートを有している。前記パラメータ
エリアには、このようなエンベロープ波形の各ステート
(ホールドステートを除く)の傾きを表わすレートデー
タおよび目標(最終)レベルを表わすレベルデータが、
音色ごとのテーブルとして格納されている。
The ROM 11 has a program area and a parameter area. The program area stores various control programs such as a main routine process corresponding to the flowcharts shown in FIGS. 2 to 7 and a timer interrupt process. The envelope waveform of the musical tone generated in this electronic musical instrument has states such as attack, decay, hold, and release or sustain, as shown in FIGS. In the parameter area, rate data indicating the slope of each state (excluding the hold state) of the envelope waveform and level data indicating the target (final) level are stored.
This is stored as a table for each tone.

RAM12には、CPU10が前記制御プログラムを実行する際
に発生する各種のデータを一時記憶するため下記のよう
なレジスタ群が設定されている。なお、以下において
は、レジスタ等とその内容とは同一のラベルで表わすも
のとする。また、i(=0〜7)はステートナンバであ
り、例えばステート0はアタックステート、ステート1
はディケイステートを表わす。j(=0〜15)は発音チ
ャンネルナンバである。
The following groups of registers are set in the RAM 12 to temporarily store various data generated when the CPU 10 executes the control program. In the following, registers and the like and their contents are represented by the same label. Also, i (= 0 to 7) is a state number, for example, state 0 is an attack state, state 1
Represents a decay state. j (= 0 to 15) is a sounding channel number.

Li:ステートiの目標レベル 0〜95.25(0.75ステップ、7ビット) Ri:ステートiのレート 0〜95.25(0.75ステップ、7ビット) RR:リリースレート 0〜95.25(0.75ステップ、7ビット) SUSR:サスティンレート 0〜95.25(0.75ステップ、7ビット) EGj:チャンネルjの現エンベロープレベル 0〜95.25(0.75ステップ、7ビット) INTj:チャンネルjのイニシャルタッチ 0〜127(7ビット) KCDj:チャンネルjに発音割当されたキーコード MP:マスクポイント 0〜7(3ビット) DP:ディケイポイント 0〜7(3ビット) HP:ホールドポイント 0〜7(3ビット) SUSON:サスティンフラグ 1:サスティンオン、0:サスティンオフ SYNM:シンセフラグ 1:シンセモード、0:ノーマルモード DPINH:DPインヒビットフラグ 1:DPインヒビット、0:DPイネーブル HOLDj:チャンネルjのホールドフラグ 1:ホールド KONj:チャンネルjのキーオンフラグ 1:キーオン中 KOFFj:チャンネルjのキーオフフラグ 1:エンベロープ波形形成終了 キー検出回路13は、鍵盤18における各鍵(キー)の操
作状態を検出し、各鍵ごとの押鍵、離鍵およびキータッ
チ(イニシャルタッチ)を表わすキー情報を発生する。
Li: Target level of state i 0 to 95.25 (0.75 steps, 7 bits) Ri: Rate of state i 0 to 95.25 (0.75 steps, 7 bits) RR: Release rate 0 to 95.25 (0.75 steps, 7 bits) SUSR: Sustain Rate 0 to 95.25 (0.75 steps, 7 bits) EGj: Current envelope level of channel j 0 to 95.25 (0.75 steps, 7 bits) INTj: Initial touch of channel j 0 to 127 (7 bits) KCDj: Sound assignment to channel j Key code MP: Mask point 0-7 (3 bits) DP: Decay point 0-7 (3 bits) HP: Hold point 0-7 (3 bits) SUSON: Sustain flag 1: Sustain on, 0: Sustain off SYNM: Synth flag 1: Synth mode, 0: Normal mode DPINH: DP inhibit flag 1: DP inhibit, 0: DP enable HOLDj: Channel j hole KONj: Key-on flag of channel j 1: During key-on KOFFj: Key-off flag of channel j 1: End of envelope waveform formation The key detection circuit 13 detects the operation state of each key (key) on the keyboard 18 and Key information indicating key press, key release, and key touch (initial touch) for each key is generated.

EG設定スイッチ群14は、サスティンオン/オフスイッ
チ、シンセモード設定スイッチおよびDPインヒビットス
イッチ等により構成され、これらのスイッチごとのオン
/オフまたは設定状態を表わすスイッチ情報を発生す
る。
The EG setting switch group 14 includes a sustain on / off switch, a synth mode setting switch, a DP inhibit switch, and the like, and generates switch information indicating an on / off or setting state of each of these switches.

その他のスイッチ群15としては、音色選択スイッチ、
音量設定スイッチや各種効果スイッチが設けられてい
る。
Other switch groups 15 include a tone selection switch,
A volume setting switch and various effect switches are provided.

音源回路16は、EG設定スイッチ群14およびその他のス
イッチ群15のオン/オフまたは設定状態、ならびに鍵盤
18の操作に応じてCPU10から送出されるエンベロープレ
ベル情報EGj、ならびにノートオン/オフ指令、キーコ
ード情報KCDj、およびイニシャルタッチ情報INTj等の楽
音制御情報に基づいて楽音信号を形成する。この楽音信
号は、サウンドシステム19に供給される。ここで、音源
回路16は、ナンバj(=0〜15)で表わされる16個の時
分割発音チャンネルを形成されており、この電子楽器
は、16個の楽音を同時発音可能となっている。
The tone generator circuit 16 includes an on / off or set state of the EG setting switch group 14 and other switch groups 15, and a keyboard.
A tone signal is formed based on envelope level information EGj sent from the CPU 10 in response to the operation 18 and tone control information such as a note on / off command, key code information KCDj, and initial touch information INTj. This tone signal is supplied to the sound system 19. Here, the tone generator 16 is formed with 16 time-division sounding channels represented by numbers j (= 0 to 15), and this electronic musical instrument can simultaneously generate 16 musical tones.

サウンドシステム19は、音源回路16から供給される楽
音信号を音響に変換して放音する。
The sound system 19 converts a tone signal supplied from the sound source circuit 16 into sound and emits the sound.

次に、第2図〜第7図のフローチャートを参照しなが
ら、第1図の電子楽器におけるCPU10の動作を説明す
る。
Next, the operation of the CPU 10 in the electronic musical instrument of FIG. 1 will be described with reference to the flowcharts of FIGS.

第1図の電子楽器において図示しない電源が投入され
ると、CPU10はROM11に格納された制御プログラムに従っ
て動作を開始する。先ず、第2図ステップ100以下のメ
インルーチンで示される処理を実行し、それとともに第
5図AおよびBに示されるタイマ割込処理を実行する。
When a power source (not shown) is turned on in the electronic musical instrument of FIG. 1, the CPU 10 starts operating according to a control program stored in the ROM 11. First, the processing shown in the main routine after step 100 in FIG. 2 is executed, and at the same time, the timer interrupt processing shown in FIGS. 5A and 5B is executed.

第2図を参照して、先ず、ステップ201ではRAM12内に
設定されている各ステートごとの目標レベルレジスタL0
〜L7およびレートレジスタR0〜R7、リリースレートレジ
スタRR、サスティンレートレジスタSUSR、各発音チャン
ネルごとのエンベロープレベルレジスタEG0〜GE15、イ
ニシャルタッチレジスタINT0〜INT15、キーコードレジ
スタKCD0〜KCD15、キーオンフラグKON0〜KON15およびホ
ールドフラグHOLD0〜HOLD15、マスクポイントレジスタM
P、ディケイポイントレジスタDP、ホールドポイントレ
ジスタHP、サスティンフラグSUSON、シンセフラグSYN
M、ならびにDPインヒビットフラグDPINHをクリアし、か
つ各発音チャンネルのキーオフフラグKOFF0〜KOFF15を
それぞれ1にセットする等の初期設定を行なう。その
後、ステップ202の押鍵処理、ステップ203のEG設定処
理、およびステップ204のその他の処理からなる循環処
理を実行する。
Referring to FIG. 2, first, in step 201, a target level register L0 for each state set in the RAM 12 is set.
~ L7 and rate registers R0 ~ R7, release rate register RR, sustain rate register SUSR, envelope level registers EG0 ~ GE15 for each sounding channel, initial touch registers INT0 ~ INT15, key code registers KCD0 ~ KCD15, key on flags KON0 ~ KON15 And hold flags HOLD0 to HOLD15, mask point register M
P, Decay point register DP, Hold point register HP, Sustain flag SUSON, Synth flag SYN
Initial settings such as clearing the M and DP inhibit flags DPINH and setting the key-off flags KOFF0 to KOFF15 of each sounding channel to 1 are performed. Thereafter, a circulating process including a key pressing process in step 202, an EG setting process in step 203, and other processes in step 204 is executed.

第3図は、第2図における押鍵処理(ステップ202)
の詳細を示す。
FIG. 3 shows the key pressing process in FIG. 2 (step 202).
The details are shown below.

第3図を参照して、ステップ301ではキー検出回路13
の出力に基づき鍵盤18における押鍵による鍵状態の変化
があった(キーオンイベント有)か否かを判定する。キ
ーオンイベント有りならば、ステップ302にてオンイベ
ントの発生した鍵に対応する楽音(キーコード)の発音
チャンネル割当を行ない、ステップ303にてその割当ら
れた発音チャンネルjのキーオンフラグKONjを1にセッ
トし、かつその鍵のキーコードおよびイニシャルタッチ
データをそれぞれキーコードレジスタKCDjおよびイニシ
ャルタッチレジスタINTjに格納し、ステップ304にて音
源回路16のjチャンネルへノートオン(発音開始)指
令、前記キーコードKCDjおよびイニシャルタッチデータ
INTjを送出した後、ステップ305に処理を進める。これ
により、音源回路16は、これらのキーコードKCDjおよび
イニシャルタッチデータINTjならびに後述するエンベロ
ープレベルデータEGjに基づく楽音形成処理を開始す
る。
Referring to FIG. 3, in step 301, the key detection circuit 13
It is determined whether or not a key state change due to a key press on the keyboard 18 has occurred (there is a key-on event) based on the output of. If there is a key-on event, a tone channel (key code) corresponding to the key in which the on-event occurred is assigned in step 302, and a key-on flag KONj of the assigned tone channel j is set to 1 in step 303. Then, the key code and the initial touch data of the key are stored in the key code register KCDj and the initial touch register INTj, respectively. In step 304, a note-on (sound generation start) command is issued to the j channel of the tone generator circuit 16, and the key code KCDj And initial touch data
After transmitting INTj, the process proceeds to step 305. As a result, the tone generator 16 starts a tone generation process based on the key code KCDj, the initial touch data INTj, and the envelope level data EGj described later.

一方、前記ステップ301の判定が「NO」、すなわちキ
ーオンイベントが発生していなければ、ステップ302〜3
04の処理をスキップしてステップ301から直接ステップ3
05に処理を進める。
On the other hand, if the determination in step 301 is “NO”, that is, if no key-on event has occurred, steps 302 to 3
Skip step 04 and skip directly from step 301 to step 3
Proceed to 05.

ステップ305では前記キー検出回路13の出力より、鍵
盤18における離鍵操作(キーオフイベント)の有無を判
定する。キーオフイベント有りならば、ステップ306に
てキーオフイベントのあった鍵に対応するキーコードが
割り当てられている発音チャンネルを検索する。該当す
るチャンネルjが見付かれば、次のステップ307からス
テップ308へ分岐して該当チャンネルjのキーオンフラ
グKONjをリセットし、続くステップ309にて音源回路16
の該当チャンネルjにノートオフ(発音停止)指令を送
出した後、この押鍵処理を終了してメイン処理(第2図
ステップ203)に戻る。これにより、音源回路16は、該
当チャンネルjにおいてキーオフ後の楽音信号の形成処
理を行なう。
In step 305, the presence or absence of a key release operation (key off event) on the keyboard 18 is determined from the output of the key detection circuit 13. If there is a key-off event, a search is made in step 306 for a sound channel to which a key code corresponding to the key having the key-off event is assigned. If the corresponding channel j is found, the process branches from the next step 307 to step 308 to reset the key-on flag KONj of the corresponding channel j.
After transmitting a note-off (sound generation stop) command to the corresponding channel j, the key pressing process is terminated and the process returns to the main process (step 203 in FIG. 2). As a result, the tone generator 16 performs a tone signal formation process after the key-off in the corresponding channel j.

一方、前記ステップ307の判定が「NO」、すなわちキ
ーオフされた鍵と同じキーコードが割り当てられている
発音チャンネルが見付からない場合には、ステップ308
〜309の処理をスキップしてステップ307からそのままこ
の押鍵処理を終了してメイン処理(第2図ステップ20
3)に戻る。
On the other hand, if the determination in step 307 is "NO", that is, if no sounding channel to which the same key code as the key that has been turned off is assigned is found, step 308 is executed.
Steps 307 to 309 are skipped, and the key depression processing is terminated as it is from step 307, and the main processing (step 20 in FIG. 2) is performed.
Return to 3).

また、前記ステップ305の判定が「NO」、すなわちキ
ーオフイベントが発生していない場合には、ステップ30
6〜309の処理をスキップしてステップ305からそのまま
この押鍵処理を終了してメイン処理(第2図ステップ20
3)に戻る。
If the determination in step 305 is “NO”, that is, if no key-off event has occurred, step 30
The processing of steps 6 to 309 is skipped, the key depression processing is terminated as it is from step 305, and the main processing (step 20 in FIG. 2) is performed.
Return to 3).

第4図は、第2図におけるEG設定処理(ステップ20
3)の詳細を示す。
FIG. 4 shows the EG setting process (step 20) in FIG.
Details of 3) are shown.

このEG設定処理において、CPU10は、EG設定スイッチ
群14を構成する各スイッチの設定状態を読み取り、その
設定状態に対応するパラメータをRAM12内の対応するレ
ジスタに格納する。例えば、各ステートの目標レベルL0
〜L7、各ステートのレベル変化レートR0〜R7、リリース
レートRR、およびサスティンレートSUSRは、音色選択ス
イッチによって選択された音色に対応してROM11内のテ
ーブルから読み込まれるデータをそれぞれ対応するレジ
スタL0〜L7、R0〜R7、RRおよびSUSRに格納する。また、
マスクポイントMP、ディケイポイントDP、ホールドポイ
ントHP、サスティンオン/オフSUSON、シンセモードオ
ン/オフSYNM、およびDPインヒビットオン/オフDPINH
の各パラメータは、EG設定スイッチ群14における各設定
スイッチの状態に基づいて作成し、それらをそれぞれ対
応するレジスタMP、DPおよびHP、フラグSUSON、SYNMお
よびDPINHに格納する。
In this EG setting process, the CPU 10 reads the setting state of each switch constituting the EG setting switch group 14, and stores a parameter corresponding to the setting state in a corresponding register in the RAM 12. For example, the target level L0 of each state
L7, the level change rate R0 to R7 of each state, the release rate RR, and the sustain rate SUSR correspond to the data read from the table in the ROM 11 corresponding to the tone selected by the tone selection switch. Store in L7, R0-R7, RR and SUSR. Also,
Mask Point MP, Decay Point DP, Hold Point HP, Sustain On / Off SUSON, Synth Mode On / Off SYNM, and DP Inhibit On / Off DPINH
Are created based on the state of each setting switch in the EG setting switch group 14, and are stored in the corresponding registers MP, DP, and HP, and the flags SUSON, SYNM, and DPINH.

CPU10は、タイマ17から信号ラインLを介して固定周
期(例えば50μS)のクロックが入力されると、これを
割込信号として第5〜7図に示すタイマインタラプト処
理を実行する。ここでは、1回のタイマインタラプト処
理によって、チャンネルナンバjで表わされる1個の発
音チャンネルについてのエンベロープ波形形成処理が実
行される。
When a clock having a fixed period (for example, 50 .mu.S) is input from the timer 17 via the signal line L, the CPU 10 executes a timer interrupt process shown in FIGS. Here, the envelope waveform forming process for one sounding channel represented by the channel number j is executed by one timer interrupt process.

第5図Aを参照して、ステップ501では、このタイマ
インタラプト処理がjチャンネルを発音チャンネルとし
て割り当てた後、当該チャンネルについての最初の割込
処理であるか否かを判定する。最初の割込処理であれ
ば、ステップ502にてアタックレートR0が最大値(95.2
5)であるか否かを判定する。最大値であれば、ステッ
プ503にてステートナンバiを1に設定し、エンベロー
プレベルEGjをアタックステート(i=0)の目標レベ
ルL0に設定した後、ステップ505に進む。この場合、エ
ンベロープ波形は、初期値がアタック目標値L0となって
瞬時にアタックステートを終了するという極めて急峻な
アタック波形を有するものとなる。一方、アタックレー
トR0が最大値でなければステップ504にてステートナン
バiを0に設定し、エンベロープレベルEGjを最大値の1
/2の値(47.25)に設定した後、ステップ505に進む。こ
の場合、エンベロープ波形は、初期値が47.25となり、
ここからアタックステートが開始される。次に、ステッ
プ505にてキーオフフラグKOFFjをリセットすると、ステ
ップ551(第5図B)へ処理を進める。
Referring to FIG. 5A, in step 501, it is determined whether or not this timer interrupt processing is the first interrupt processing for the channel after the channel j is assigned as a sounding channel. If it is the first interrupt processing, the attack rate R0 is set to the maximum value (95.2
5) is determined. If it is the maximum value, the state number i is set to 1 in step 503, the envelope level EGj is set to the target level L0 of the attack state (i = 0), and the process proceeds to step 505. In this case, the envelope waveform has an extremely steep attack waveform in which the initial value becomes the attack target value L0 and the attack state ends instantly. On the other hand, if the attack rate R0 is not the maximum value, the state number i is set to 0 in step 504, and the envelope level EGj is set to the maximum value of 1
After setting the value to / 2 (47.25), the process proceeds to step 505. In this case, the initial value of the envelope waveform is 47.25,
From here, the attack state is started. Next, when the key-off flag KOFFj is reset in step 505, the process proceeds to step 551 (FIG. 5B).

前記ステップ501の判定結果が「NO」、すなわちこの
インタラプト処理がキーオンイベントによるjチャンネ
ルへの発音割当後、当該チャンネルについて2回目以降
のものである場合、処理はステップ511へ進む。
If the result of the determination in step 501 is “NO”, that is, if this interrupt processing is the second or subsequent time for the channel after the tone is assigned to the j channel by the key-on event, the processing proceeds to step 511.

ステップ511ではキーオフフラグKOFFjを検査する。フ
ラグKOFFjが1となるのは、エンベロープ波形信号の形
成が終了したとき(第6図ステップ615および第7図ス
テップ707参照)である。したがって、この場合は、そ
れ以上エンベロープに関する処理を行なうことなく、ス
テップ511から直接ステップ551(第5図B)へ進む。
In step 511, the key-off flag KOFFj is checked. The flag KOFFj becomes 1 when the formation of the envelope waveform signal is completed (see step 615 in FIG. 6 and step 707 in FIG. 7). Therefore, in this case, the process directly proceeds from step 511 to step 551 (FIG. 5B) without performing any further processing relating to the envelope.

前記ステップ511の判定結果がKOFFj=0であれば、ス
テップ512にてキーオンフラグKONjを検査する。キーオ
ン中(KONj=1)であれば、続くステップ513にてホー
ルドフラグHOLDjを検査する。フラグHOLDjが0であれ
ば、ステップ514にて後述するサブルーチン(第6
図)を実行して現ステートiのレートRiでエンベロープ
レベルEGjを増減した後、前記したステップ551(第5図
B)へ進む。
If KOFFj = 0 in step 511, the key-on flag KONj is checked in step 512. If the key is ON (KONj = 1), the hold flag HOLDj is checked in the following step 513. If the flag HOLDj is 0, a subroutine (6th
(FIG. 5) to increase or decrease the envelope level EGj at the rate Ri of the current state i, and then proceed to step 551 (FIG. 5B).

一方、ステップ513の判定結果がHOLDj=1であれば、
ステップ521にてシンセモードフラグSYNMを検査し、シ
ンセモード(SYNM=1)であれば、さらにステップ522
にてDPインヒビットフラグDPINHを検査する。そして、D
Pインヒビットモード(DPINH=1)であれば、ステップ
523にてステートナンバiをディケイポイントDPを設定
されているステートの次のステートであるDP+1にジャ
ンプ(ステートジャンプ)させ、続くステップ524にて
ホールドフラグHOLDjをリセットし、さらにステップ514
にてサブルーチン(第6図)のエンベロープレベル増
減処理を実行した後、ステップ551(第5図B)へ進
む。前記ステップ521〜524の処理を経由する場合、DP<
HPであれば、前記ステップ523のステートジャンプ処理
によって、エンベロープ波形としてステートナンバDP+
1からHPまでの波形が繰り返される。
On the other hand, if the determination result of step 513 is HOLDj = 1,
In step 521, the synth mode flag SYNM is checked. If the synth mode is SYNM (SYNM = 1), step 522 is further executed.
Inspects the DP inhibit flag DPINH. And D
If P inhibit mode (DPINH = 1), step
At step 523, the state number i is jumped (state jump) to DP + 1 which is the next state of the state in which the decay point DP is set, and at step 524, the hold flag HOLDj is reset.
After executing the envelope level increasing / decreasing process of the subroutine (FIG. 6), the process proceeds to step 551 (FIG. 5B). In the case of going through the processing of steps 521 to 524, DP <
If it is HP, by the state jump processing of the step 523, the state number DP +
The waveform from 1 to HP is repeated.

前記ステップ521の判定結果がノーマルモード(SYNM
=0)である場合、およびステップ522の判定結果がDP
イネーブル(DPINH=0)である場合には、これらのス
テップ521または522からステップ525へ進み、音源回路1
6へエンベロープレベルデータEGjを送出した後、前記ス
テップ551(第5図B)へ処理を進める。
If the determination result of step 521 is a normal mode (SYNM
= 0), and the determination result of step 522 is DP
If it is enabled (DPINH = 0), the process proceeds from these steps 521 or 522 to step 525, where the tone generator circuit 1
After sending the envelope level data EGj to 6, the process proceeds to step 551 (FIG. 5B).

第6図を参照して、ステップ601ではエンベロープレ
ベルEGjと現ステートiの目標レベルLiとの大小を比較
してエンベロープ波形の現時点における傾きが正である
か負であるかを判定する。傾きが正(EGj<Li)であれ
ばステップ602にてレベルEGjにレートRiを加算し、負
(EGj≧Li)であればステップ603にてレベルEGjからレ
ートRiを減算した後、ステップ604または605にてエンベ
ロープレベルEGjが目標レベルLiに達したか否かを判定
する。目標レベルLiに達していなければ、ステップ606
または607にて音源回路16へエンベロープレベルデータE
Gjを送出した後、もとのルーチン(第5図Bステップ55
1)へ戻る。
Referring to FIG. 6, in step 601, the magnitude of the envelope level EGj and the target level Li of the current state i are compared to determine whether the current slope of the envelope waveform is positive or negative. If the gradient is positive (EGj <Li), the rate Ri is added to the level EGj in step 602; if negative (EGj ≧ Li), the rate Ri is subtracted from the level EGj in step 603. At 605, it is determined whether or not the envelope level EGj has reached the target level Li. If the target level Li has not been reached, step 606
Or 607 to the tone generator circuit 16 at envelope level data E
After sending Gj, the original routine (step 55 in FIG.
Return to 1).

一方、目標レベルLiに達していれば、ステップ609に
進み、エンベロープレベルEGjを目標レベルLiに設定し
た後、ステップ610にて現ステートiがホールドポイン
トHPを設定されたステートであるか否かを判定する。ホ
ールドポイントHPを設定されたステート(i=HP)であ
れば、ステップ611にてホールドフラグHOLDjをセットし
た後、そうでなければステップ612にてステートナンバ
iをインクリメントした後、ステップ613にて音源回路1
6へエンベロープレベルデータEGjを送出し、さらにステ
ップ614にてステートナンバiが8に達したか否かを判
定する。この電子楽器において、エンベロープのステー
ト数は0〜7の8個に設定してある。したがって、ステ
ートナンバiが8に達していれば、それはエンベロープ
波形形成処理を終了したことを意味する。この場合は、
ステップ615にてキーオフフラグKOFFjをセットした後、
もとのルーチン(第5図Bステップ551)へ戻る。ま
た、ステートナンバiが8に達していなければ、ステッ
プ614からそのまま、もとのルーチン(第5図Bステッ
プ551)へ戻る。
On the other hand, if the target level Li has been reached, the process proceeds to step 609, where the envelope level EGj is set to the target level Li, and in step 610, it is determined whether or not the current state i is the state in which the hold point HP is set. judge. If the state is a state where the hold point HP is set (i = HP), the hold flag HOLDj is set in step 611; otherwise, the state number i is incremented in step 612, and the sound source is generated in step 613. Circuit 1
The envelope level data EGj is sent to 6, and at step 614 it is determined whether or not the state number i has reached 8. In this electronic musical instrument, the number of envelope states is set to eight (0 to 7). Therefore, if the state number i has reached 8, it means that the envelope waveform forming process has been completed. in this case,
After setting the key-off flag KOFFj in step 615,
The routine returns to the original routine (step 551 in FIG. 5B). If the state number i has not reached 8, the routine returns from step 614 to the original routine (step 551 in FIG. 5B).

第5図Aに戻って、前記ステップ512の判定がキーオ
ンフラグKONj=0であれば、これは鍵盤18において当該
チャンネルjに割り当てられたキーが離鍵(キーオフ)
されていることを意味する(第2図ステップ308参
照)。この場合には、第5図Bに示すキーオフ後処理を
実行する。
Returning to FIG. 5A, if the determination in step 512 is that the key-on flag KONj = 0, this means that the key assigned to the channel j on the keyboard 18 is released (key-off).
(Step 308 in FIG. 2). In this case, post-key-off processing shown in FIG. 5B is executed.

第5図Bを参照して、ステップ530ではホールドフラ
グHOLDjをクリアし、続くステップ531では現ステートi
がマスクポイントMPを設定されたステート以後のステー
ト(i≧MP)であるか否かを判定する。マスクポイント
MPは、それより前に生じたキーオフを直ちには受け付け
ず、エンベロープ波形がマスクポイントMPまで形成され
た後、キーオフエンベロープを形成するためのものであ
る。したがって、現ステートiがマスクポイントMPを設
定されたステートMPより前のステート(i<MP)であれ
ば、ステップ532にて前記サブルーチン(第6図)の
エンベロープレベル増減処理を実行した後、ステップ55
1へ処理を進める。この場合には、キーオン中と同様の
エンベロープ形成処理が続行される。
Referring to FIG. 5B, in step 530, the hold flag HOLDj is cleared, and in step 531, the current state i is cleared.
Is a state (i ≧ MP) after the state in which the mask point MP is set. Mask point
The MP does not immediately accept a key-off that has occurred earlier, and forms a key-off envelope after an envelope waveform is formed up to the mask point MP. Therefore, if the current state i is a state (i <MP) before the state MP in which the mask point MP is set, after performing the envelope level increasing / decreasing process of the subroutine (FIG. 6) in step 532, 55
Proceed to step 1. In this case, the same envelope forming processing as during key-on is continued.

前記ステップ531の判定結果が「YES」、すなわち現ス
テートiがマスクポイントMPを設定されたステート以後
のステート(i≧MP)であれば、今度はステップ533に
て現ステートiがディケイポイントDPを設定されたステ
ート以後のステート(i>DP)であるか否かを判定す
る。ディケイポイントDPは、キーオフがそれより前であ
るか後であるかによってキーオフ後のエンベロープ波形
を異ならせるために設けられている。現ステートiがデ
ィケイポイントDPを設定されたステート以前のステート
(i≦DP)であれば、ステップ534にてDPインヒビット
フラグDPINHを検査する。DPインヒビットモード(DPINH
=1)はディケイポイントDPを無視することを意味す
る。したがって、DPインヒビットプラグDPINHが1であ
れば、後述するステップ541以下においてシンセモード
およびノーマルモードのそれぞれに応じて設定された標
準のキーオフエンベロープ波形を形成する。一方、DPイ
ンヒビットプラグDPINHが0であれば、ディケイポイン
トDP前のキーオフに対応した、前記標準のキーオフエン
ベロープ波形とは異なるキーオフエンベロープ波形を形
成する。すなわち、ステップ535にてシンセフラグSYNM
を検査し、シンセモード(SYNM=1)であれば、ステッ
プ536にて後述するサブルーチン(第7図)のリリー
ス/サスティン処理を実行した後、ステップ551ヘ処理
を進める。
If the determination result of step 531 is "YES", that is, if the current state i is a state after the state where the mask point MP is set (i ≧ MP), then in step 533, the current state i changes the decay point DP. It is determined whether or not the state after the set state (i> DP). The decay point DP is provided to make the envelope waveform after key-off different depending on whether the key-off is before or after that. If the current state i is a state before the state where the decay point DP is set (i ≦ DP), the DP inhibit flag DPINH is checked in step 534. DP inhibit mode (DPINH
= 1) means to ignore the decay point DP. Therefore, if the DP inhibit plug DPINH is 1, a standard key-off envelope waveform set according to each of the synth mode and the normal mode is formed in steps 541 and later described later. On the other hand, if the DP inhibit plug DPINH is 0, a key-off envelope waveform different from the standard key-off envelope waveform corresponding to the key-off before the decay point DP is formed. That is, in step 535, the synth flag SYNM
Is checked, and if it is a synth mode (SYNM = 1), a release / sustain process of a subroutine (FIG. 7) described later is executed in step 536, and then the process proceeds to step 551.

第7図を参照して、ステップ701ではサスティンフラ
グSUSONを検査する。サスティンオン(SUSON=1)であ
れば、エンベロープレベルEGjをサスティンレートSUSR
だけ減衰させた後、一方、サスティンオフ(SUSON=
0)であれば、エンベロープレベルEGjをリリースレー
トRRだけ減衰させた後、ステップ704にて音源回路16へ
エンベロープレベルデータEGjを送出し、さらにステッ
プ705にてエンベロープレベルEGjが0より大きいか否か
を判定する。エンベロープレベルEGjが0以下(EGj≦
0)であれば、ステップ706にてレベルEGjを0にセット
し、ステップ707にてキーオフフラグKOFFjを1にセット
した後、一方、エンベロープレベルEGjが0より大(EGj
>0)であればそのまま、もとのルーチン(第5図Bス
テップ551)へ戻る。前記ステップ706でレベルEGjが0
にセットされ、ステップ707でキーオフフラグがKOFFj=
1にセットされた場合、当該チャンネルについては、以
後、第5図Aのタイマインタラプト処理がステップ511
から525を通る経路で、エンベロープレベルEGjの増減処
理(前記サブルーチンおよび後述のステップ538)
を経由することなく実行される。このため、エンベロー
プレベルEGjは0のまま一定となる。すなわち、当該チ
ャンネルのエンベロープ波形形成は終了する。
Referring to FIG. 7, in step 701, the sustain flag SUSON is checked. If sustain on (SUSON = 1), the envelope level EGj is set to the sustain rate SUSR
After attenuating only, on the other hand, sustain off (SUSON =
If it is 0), the envelope level EGj is attenuated by the release rate RR, and then the envelope level data EGj is transmitted to the tone generator 16 in step 704, and in step 705, whether the envelope level EGj is greater than 0 or not. Is determined. Envelope level EGj is 0 or less (EGj ≦
If 0), the level EGj is set to 0 in step 706, and the key-off flag KOFFj is set to 1 in step 707. On the other hand, the envelope level EGj is larger than 0 (EGj
If> 0), the process returns to the original routine (step 551 in FIG. 5B). In step 706, the level EGj is 0
And the key-off flag is set to KOFFj =
If set to 1, the timer interrupt processing of FIG.
From the subroutine and step 538 to be described later.
It is executed without going through. For this reason, the envelope level EGj remains constant at 0. That is, the envelope waveform formation of the channel ends.

第5図Bに戻って、前記ステップ535の判定結果がノ
ーマルモード(SYNM=0)であれば、ステップ537にて
ステートナンバiをDPに設定(ステートジャンプ)した
後、ステップ538にてエンベロープレベルEGjがステート
DPの目標レベルLi(i=DP)に達しているか否かを判定
する。目標レベルLiに達していなければ(EGj≦Li)、
前記ステップ536にて第7図のサブルーチンによるリ
リース/サスティン処理を実行した後、ステップ551へ
処理を進める。また、目標レベルLiに達していれば(EG
j>i)、ステップ539にてステートDPのレートであるデ
ィケイレートRi(i=DP)によるエンベロープ減衰処理
を行ない、ステップ540にて音源回路16へエンベロープ
レベルデータEGjを送出した後、ステップ551へ処理を進
める。
Returning to FIG. 5B, if the result of the determination in step 535 is the normal mode (SYNM = 0), the state number i is set to DP in step 537 (state jump), and then the envelope level is determined in step 538. EGj is in state
It is determined whether or not the DP has reached the target level Li (i = DP). If the target level Li has not been reached (EGj ≦ Li),
After executing the release / sustain process in the subroutine of FIG. 7 in the step 536, the process proceeds to a step 551. If the target level Li has been reached (EG
j> i), in step 539, an envelope attenuation process is performed with the decay rate Ri (i = DP), which is the rate of the state DP, and in step 540, the envelope level data EGj is sent to the tone generator 16; Proceed with the process.

一方、前記ステップ533の判定結果がディケイポイン
トDP後(i>DP)である場合には、ステップ541以下の
標準キーオフエンベロープ波形形成処理を実行する。す
なわち、ステップ541ではシンセモードフラグSYNMを検
査する。ノーマルモード(SYNM=0)であれば、ステッ
プ542にてサブルーチン(第7図)のリリース/サス
ティン処理を実行した後、ステップ551へ処理を進め
る。したがって、ノーマルモード(SYNM=0)でディケ
イポイントDPより後にキーオフされた(i>DP)場合、
キーオフエンベロープ波形は、サブルーチン(第7
図)の処理で形成されるリリースまたはサスティン波形
となる。つまり、ノーマルモード(SYNM=0)の標準キ
ーオフエンベロープ波形はリリースまたはサスティン波
形である。
On the other hand, if the result of the determination in the step 533 is after the decay point DP (i> DP), the standard key-off envelope waveform forming processing of the step 541 and subsequent steps is executed. That is, in step 541, the synth mode flag SYNM is checked. In the normal mode (SYNM = 0), the release / sustain process of the subroutine (FIG. 7) is executed in step 542, and then the process proceeds to step 551. Therefore, when the key is turned off after the decay point DP in the normal mode (SYNM = 0) (i> DP),
The key-off envelope waveform is calculated in the subroutine (7th
It becomes a release or sustain waveform formed by the processing of FIG. That is, the standard key-off envelope waveform in the normal mode (SYNM = 0) is a release or sustain waveform.

一方、前記ステップ541の判定結果がシンセモード(S
YNM=1)であれば、ステップ543にて現ステートナンバ
iがホールドポイントHPより後であるか否かを判定す
る。ホールドポイントHP以前(i≦HP)であれば、ステ
ップ544にてステートナンバiをホールドポイント直後
のステートナンバであるHP+1に設定(ステートジャン
プ)した後、ホールドポイントHPより後(i>HP)であ
ればそのまま、ステップ545へ処理を進める。ステップ5
45では、前記サブルーチン(第6図)のエンベロープ
レベル増減処理を実行した後、ステップ551へ処理を進
める。
On the other hand, the result of the determination in step 541 is the synth mode (S
If YNM = 1), it is determined in step 543 whether or not the current state number i is after the hold point HP. If it is before the hold point HP (i ≦ HP), after setting the state number i to HP + 1 which is the state number immediately after the hold point (state jump) in step 544, after the hold point HP (i> HP), If so, the process proceeds to step 545. Step 5
At step 45, after executing the envelope level increasing / decreasing process of the subroutine (FIG. 6), the process proceeds to step 551.

ステップ551〜553では、発音チャンネルを次のチャン
ネルに切り換える。すなわち、ステップ551にてチャン
ネルナンバjをインクリメントした後、ステップ552に
てチャンネルナンバjが16に達したか否かを判定する。
この電子楽器において、発音チャンネルは、ナンバj=
0〜15の16個である。したがって、チャンネルナンバj
が16でなければそのまま、チャンネルナンバjが16にな
ったときはステップ553にてチャンネルナンバをj=15
の次のナンバであるj=0に設定した後、このタイマイ
ンタラプトを解除してメインルーチンに復帰する。
In steps 551 to 553, the sound channel is switched to the next channel. That is, after incrementing the channel number j in step 551, it is determined in step 552 whether or not the channel number j has reached 16.
In this electronic musical instrument, the sounding channel is number j =
There are 16 from 0 to 15. Therefore, the channel number j
If the channel number j is 16 if it is not 16, the channel number is changed to j = 15 in step 553.
After setting the next number j = 0, the timer interrupt is released and the process returns to the main routine.

以上の動作によって、第8〜11図に示すようなエンベ
ロープ波形を形成することができる。
By the above operation, an envelope waveform as shown in FIGS. 8 to 11 can be formed.

第8〜11図は、ディケイポイントDPを1に、ホールド
ポイントHPを3に設定した場合のエンベロープ波形図を
示す。各図ともアタックレートR0を最大値(95.25)よ
り小さな値に設定された場合のものである。
8 to 11 show envelope waveform diagrams when the decay point DP is set to 1 and the hold point HP is set to 3. In each of the figures, the attack rate R0 is set to a value smaller than the maximum value (95.25).

このようなエンベロープ波形は、キーオンイベントが
検出されて(第3図ステッ301)発音チャンネル割当が
行なわれ(ステップ302)、キーオンフラグKONjがセッ
トされる(ステップ303)ことにより形成処理が開始さ
れ、キーオフイベントが検出されて(ステップ305)、
キーオンフラグKONjがリセットされる(ステップ308)
ことにより減衰消音処理される。
Such an envelope waveform is formed by detecting a key-on event (step 301 in FIG. 3), assigning a sound channel (step 302), and setting a key-on flag KONj (step 303). When a key-off event is detected (step 305),
The key-on flag KONj is reset (step 308)
As a result, an attenuation silencing process is performed.

先ず、キーオン検出直後の当該発音チャンネルのタイ
マインタラプト処理(第5図A)において、エンベロー
プレベルEGjおよびステートナンバiの初期値は、前記
ステップ504にてそれぞれ47.25および0(アタックステ
ート)に設定される。これにより、エンベロープ波形は
これらの初期値で指定された初期位置から開始する。
First, in the timer interrupt processing (FIG. 5A) of the sounding channel immediately after the key-on detection, the initial values of the envelope level EGj and the state number i are set to 47.25 and 0 (attack state) in step 504, respectively. . Thus, the envelope waveform starts from an initial position specified by these initial values.

そして、第8〜11図のエンベロープ波形における、リ
リースまたはサスティンステートRR/SUSRを除く傾斜部
は、前記ステップ602または603(第6図)の処理がタイ
マインタラプトの都度実行されることにより形成され
る。また、前記ステップ612の処理により、第8〜11図
のエンベロープ波形における傾きの切換(ステート切
換)が行なわれ、かつ前記ステップ610からステップ612
をスキップすることにより、第8〜10図の平坦部(ホー
ルドステート)が形成される。さらに、前記ステップ61
1にてホールドフラグHOLDjをセットすることによって、
前記ステップ523のステートジャンプが実行され、第11
図におけるステートナンバ2と3の繰返しが実現され
る。
8 to 11 except for the release or sustain state RR / SUSR are formed by executing the processing of the step 602 or 603 (FIG. 6) each time a timer interrupt occurs. . Further, by the processing of the step 612, the gradient switching (state switching) in the envelope waveforms of FIGS. 8 to 11 is performed, and the steps 610 to 612 are performed.
Are skipped, a flat portion (hold state) shown in FIGS. 8 to 10 is formed. Further, the step 61
By setting the hold flag HOLDj at 1,
The state jump of step 523 is executed, and the eleventh state is executed.
The repetition of the state numbers 2 and 3 in the figure is realized.

次に、キーオフ時のエンベロープ形成を説明する。以
下において、丸付の項番号は、図中のキーオフエンベロ
ープ波形を示す破線の付番と一致させてある。
Next, the formation of the envelope at the time of key-off will be described. In the following, the item numbers with circles correspond to the numbers with broken lines indicating the key-off envelope waveform in the figure.

第8図に示すノーマルモード(SYNM=0)、マスクポ
イント無し(MP=0)の場合、 デイケイポイントDPの属するステートよりも前のステ
ートであるステート0(アタックステート)でDPのレベ
ル(レベルL1)よりも低い状態でキーオフになったとき
は、タイマインタラプトの都度、第5図Bのステップ53
8からステップ536に進んで第7図のサブルーチンを実
行するので、リリースまたはサスティンレートで減衰す
る。そして、エンベロープレベルEGjが0以下になる
(ステップ705)と、レベルEGjを0にセットし、キーオ
フフラグKOFFjをセットする。これにより、以後のタイ
マインタラプトではステップ511から525へ抜ける経路で
処理が行なわれるため、エンベロープレベルEGjは0の
まま増減はされない。すなわち、エンベロープ波形形成
処理は終了する。
In the case of the normal mode (SYNM = 0) and no mask point (MP = 0) shown in FIG. 8, the DP level (state) in the state 0 (attack state) which is the state prior to the state to which the decay point DP belongs. When the key is turned off in a state lower than L1), each time a timer interrupt occurs, step 53 in FIG. 5B is performed.
The program proceeds from step 8 to step 536 to execute the subroutine shown in FIG. 7, so that the rate is attenuated at the release or sustain rate. Then, when the envelope level EGj becomes 0 or less (step 705), the level EGj is set to 0 and the key-off flag KOFFj is set. As a result, in the subsequent timer interrupt, the processing is performed along the path from step 511 to step 525, so that the envelope level EGj remains 0 and is not increased or decreased. That is, the envelope waveform forming process ends.

DPの属するステート(ステート1)よりも前のステー
ト(ステート0)のDPレベルLi(i=DP)よりも高い状
態でキーオフされたときは、エンベロープレベルEGjがD
Pレベルに下がるまで、タイマインタラプトの都度、ス
テップ539にてDPのレートRi(i=DP)による減衰処理
が実行され、その後ステップ538,536にてサブルーチン
が実行されることによりリリースまたはサスティンレ
ートで減衰する。
When the key is turned off in a state higher than the DP level Li (i = DP) of the state (state 0) preceding the state to which the DP belongs (state 1), the envelope level EGj becomes D
Until the level falls to the P level, the damping process is performed at the rate of DP Ri (i = DP) at step 539 every time the timer interrupt occurs, and then the subroutine is executed at steps 538 and 536 to attenuate at the release or sustain rate. .

DPの属するステート(ステート1)でキーオフされた
ときは、前記と同様に、DPレベルまでDPレートで減衰
し、その後リリースまたはサスティンレートで減衰す
る。
When the key is turned off in the state to which the DP belongs (state 1), the signal is attenuated at the DP rate up to the DP level and then attenuated at the release or sustain rate, as described above.

DPの属するステートより後のステート(ステート2以
降)でキーオフされたときは、ステップ542にてサブル
ーチンが実行されることにより、リリースまたはサス
ティンレートで減衰する。
When the key is turned off in a state after the state to which the DP belongs (state 2 or later), the subroutine is executed in step 542, and the signal is attenuated at the release or sustain rate.

キーオフされることなくホールドポイントHPまで達す
ると、前記したようにそこからホールドステートとな
る。そして、キーオフがあったら、前記と同様に、タ
イマインタラプトの都度ステップ542にてサブルーチン
が実行されることにより、リリースまたはサスティン
レートで減衰する。
When the hold point HP is reached without being keyed off, the hold state is entered from there as described above. Then, when there is a key-off, similarly to the above, the subroutine is executed at step 542 every time a timer interrupt is performed, so that the signal is attenuated at the release or sustain rate.

第9図に示すシンセモード(SYNM=1)、マスクポイ
ント無し(MP=0)の場合、 およびは、それぞれ前記ノーマルモード時(第8
図)のおよびと同様の減衰波形である。また、DPの
属するステート(ステート1)でキーオフされたときも
第8図の破線と同様の減衰波形になる。
In the case of the synth mode (SYNM = 1) and no mask point (MP = 0) shown in FIG.
FIG. Also, when the key is turned off in the state (state 1) to which the DP belongs, an attenuation waveform similar to the broken line in FIG. 8 is obtained.

および′のDPの属するステートより後のステート
(ステート2以降)でキーオフされたときは、ホールド
ポイントHP(=3)の直後のステートHP+1(=4)ま
でジャンプし(ステップ544)、その後はタイマインタ
ラプトの都度、ステップ514にて第6図のサブルーチン
を実行する。これにより、ホールドポイントHPの直後
のステート4からステート7までの各ステートに対して
設定されたレートRiおよび目標レベルLiに基づくキーオ
フエンベロープ波形(キーオフEG)が形成される。すな
わち、キーオフされたレベルからレートR4で目標レベル
L4へ向かい、その後はレートR5でレベルL5へ、レートR6
でレベルL6へ向かい、レートR7でレベルL7まで減衰す
る。このエンベロープ波形はキーオフ時の音にクリック
感を与えることができる。ステートナンバiが8になる
(ステップ614)と、キーオフフラグKOFFjをセットする
(ステップ615)。これにより、以後のタイマインタラ
プトではステップ511から525ヘ抜ける経路で処理され、
エンベロープレベルEGjの増減はない。すなわち、エン
ベロープ波形形成処理は終了する。
If the key is turned off in the state after the state to which the DPs belonging to 'and' belong (state 2 and subsequent), the CPU jumps to the state HP + 1 (= 4) immediately after the hold point HP (= 3) (step 544). At each interrupt, the subroutine of FIG. 6 is executed at step 514. As a result, a key-off envelope waveform (key-off EG) based on the rate Ri and the target level Li set for each of the states 4 to 7 immediately after the hold point HP is formed. In other words, the target level at the rate R4 from the key-off level
Head to L4, then to level L5 at rate R5, rate R6
Goes to level L6 and attenuates to level L7 at rate R7. This envelope waveform can give a click feeling to the key-off sound. When the state number i becomes 8 (step 614), the key-off flag KOFFj is set (step 615). As a result, in the subsequent timer interrupt, the processing is performed on the route that goes from step 511 to step 525,
There is no increase or decrease in the envelope level EGj. That is, the envelope waveform forming process ends.

キーオフされることなくホールドポイントHPまで達す
ると、そのレベルでホールドされ、キーオフがあったら
前記キーオフEGで減衰する。
If the key reaches the hold point HP without being keyed off, it is held at that level, and if there is a key-off, it is attenuated by the key-off EG.

第10図に示すノーマルモード(SYNM=0)、マスクポ
イントMP=1の場合、 マスクポイントMPよりも前のステート(ステート0、
例えば点)でキーオフしたときは、マスクポイントMP
に達するまで、タイマインタラプトの都度、ステップ53
1からステップ532へ分岐するため、ステップ532にてエ
ンベロープレベルEGjの増減処理(第6図のサブルーチ
ン)は実行するが、キーオフ動作に移らない。そし
て、ステートナンバiがステップ612にてインクリメン
トされてマスクポイントMPに達したら、前記第8図と
同様に、前記ディケイポイントDP(=1)のレートR1で
ディケイポイントDPまで減衰し、その後リリースまたは
サスティンレートで減衰する。
In the normal mode (SYNM = 0) and the mask point MP = 1 shown in FIG. 10, the state before the mask point MP (state 0,
For example, when key-off at point), the mask point MP
Until each timer interrupt occurs.
Since the process branches from 1 to step 532, the process of increasing / decreasing the envelope level EGj (subroutine in FIG. 6) is executed in step 532, but the operation does not shift to the key-off operation. Then, when the state number i is incremented in step 612 and reaches the mask point MP, similarly to FIG. 8, the state number i attenuates to the decay point DP at the rate R1 of the decay point DP (= 1), and then releases or releases. Decays at the sustain rate.

DPINH=1のときは、ディケイポイントDPの位置にか
かわらず、どこでキーオフされてもリリースまたはサス
ティンレートで減衰する。
When DPINH = 1, it attenuates at the release or sustain rate regardless of where the key is turned off, regardless of the position of the decay point DP.

第11図に示すシンセモード(SYNM=1)、マスクポイ
ントMP=0の場合、 DPINH=1のときは、ディケイポイントDPの位置にか
かわらず、どこでキーオフされてもステップ533または5
34からテップ541へ進むので、第9図〜の場合と同
様に、キーオフEG波形を形成する。
In the synth mode (SYNM = 1) shown in FIG. 11, when the mask point MP = 0, and when DPINH = 1, regardless of the position of the decay point DP, regardless of the position of the decay point DP, steps 533 or 5 are performed.
Since the process proceeds from step 34 to step 541, a key-off EG waveform is formed as in the case of FIGS.

DPINH=1のときは、ホールドポイントHP(=3)に
達する(ステップ610)と、ディケイポイントDP(=
1)の直後のステートDP+1(=2)までジャンプし
(ステップ611,523)、ステート2および3の波形を繰
返す(ループ)。キーオフされると、第9図の場合と
同様に、キーオフEG波形を形成する。
When DPINH = 1, when the hold point HP (= 3) is reached (step 610), the decay point DP (=
It jumps to state DP + 1 (= 2) immediately after 1) (steps 611 and 523), and repeats the waveforms of states 2 and 3 (loop). When the key is turned off, a key-off EG waveform is formed as in the case of FIG.

[発明の適用例] なお、この発明は、上記実施例に限定されることなく
適宜変形して実施することができる。
[Application Examples of the Invention] The present invention is not limited to the above-described embodiments, and can be appropriately modified and implemented.

例えば、上述の実施例においては、ソフトウエアで制
御したが、専用のハードウエアを用いて制御してもよ
い。
For example, in the above-described embodiment, control is performed by software, but control may be performed using dedicated hardware.

上述においては、電子鍵盤楽器にこの発明を適用した
例を示したが、この発明は鍵盤の内音源ユニットのよう
なものにも適用可能である。
In the above description, an example in which the present invention is applied to an electronic keyboard instrument has been described. However, the present invention is also applicable to an internal sound source unit of a keyboard.

前記マスクポイント、ディケイポイント、およびホー
ルドポイントは任意の位置に設定可能である。あるい
は、音色に対応して自動的に設定するようにしてもよ
い。
The mask point, decay point, and hold point can be set at arbitrary positions. Alternatively, it may be automatically set in accordance with the tone color.

前記リリースとサスティンをフットペダル等で演奏時
に切り換えるようにしてもよい。
The release and the sustain may be switched at the time of performance with a foot pedal or the like.

エンベロープ波形は、前記実施例のように、複数の直
線からなるものに限らず、曲線等を自由に組み合わせた
ものであってもよい。また、レベルとレートを指定して
エンベロープを形成するものに限らず、波形をメモリに
記憶してあるようなものでもよい。
The envelope waveform is not limited to a waveform composed of a plurality of straight lines as in the above embodiment, and may be a waveform obtained by freely combining curves and the like. Further, the waveform is not limited to the one in which the envelope is formed by designating the level and the rate, and the waveform may be stored in the memory.

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

第1図は、この発明の一実施例に係る電子楽器のハード
ウエア構成図、 第2図〜第7図は、第1図におけるCPUが実行する処理
を示すフローチャート図、 第8〜11図は、第1図における音源回路で形成されるエ
ンベロープ波形図である。 10:中央処理装置(CPU) 13:キー検出回路 14:EG設定スイッチ 16:音源回路 18:鍵盤
FIG. 1 is a hardware configuration diagram of an electronic musical instrument according to one embodiment of the present invention, FIGS. 2 to 7 are flowchart diagrams showing processing executed by a CPU in FIG. 1, and FIGS. FIG. 3 is an envelope waveform diagram formed by the tone generator circuit in FIG. 10: Central processing unit (CPU) 13: Key detection circuit 14: EG setting switch 16: Sound source circuit 18: Keyboard

フロントページの続き (72)発明者 市来 哲二 静岡県浜松市中沢町10番1号 ヤマハ株 式会社内 (56)参考文献 特開 昭53−25416(JP,A) 特開 平2−48699(JP,A) 実開 平1−101296(JP,U)Continuation of the front page (72) Inventor Tetsuji Ichiki 10-1 Nakazawa-cho, Hamamatsu-shi, Shizuoka Pref. Yamaha Corporation (56) References JP, A) Hikaru 1-101296 (JP, U)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】エンベロープ波形信号を形成するエンベロ
ープ波形信号形成手段と、前記エンベロープ波形信号を
用いて楽音信号を発生する楽音信号発生手段とを具備す
る楽音発生装置において、 エンベロープ波形上の特定位置を任意に設定する特定位
置設定手段と、 キーオフの指示があったとき、 (a)該キーオフがあった時点で前記楽音信号発生手段
に対してキーオフ処理を指示するとともに、 (b)前記キーオフのタイミングにおける前記エンベロ
ープ波形上の位置が前記特定位置よりも前である場合に
は、前記エンベロープ波形信号形成手段で形成されるエ
ンベロープ波形信号が前記特定位置に達するまで前記エ
ンベロープ波形信号形成手段におけるキーオフ処理を実
行させず、前記エンベロープ波形信号形成手段で形成さ
れるエンベロープ波形信号が前記特定位置に達した時点
で前記エンベロープ波形信号形成手段におけるキーオフ
処理を実行させ、 (c)前記キーオフのタイミングにおける前記エンベロ
ープ波形上の位置が前記特定位置よりも後である場合に
は、該キーオフがあった時点で前記エンベロープ波形信
号形成手段におけるキーオフ処理を実行させる 制御手段と を具備することを特徴とする楽音発生装置。
1. A tone generator comprising: an envelope waveform signal forming means for forming an envelope waveform signal; and a tone signal generating means for generating a tone signal using the envelope waveform signal, wherein a specific position on the envelope waveform is determined. (A) instructing the tone signal generating means to perform key-off processing at the time of the key-off, and (b) timing of the key-off. If the position on the envelope waveform in the above is before the specific position, the key-off process in the envelope waveform signal forming means is performed until the envelope waveform signal formed by the envelope waveform signal forming means reaches the specific position. Without executing, the envelope formed by the envelope waveform signal forming means. When the envelope waveform signal reaches the specific position, a key-off process is performed in the envelope waveform signal forming means. (C) When a position on the envelope waveform at the key-off timing is later than the specific position And a control means for causing the envelope waveform signal forming means to execute a key-off process when the key-off occurs.
【請求項2】前記特定位置設定手段は、エンベロープ波
形上の第1および第2の特定位置を各々任意に設定する
ものであり、 前記制御手段は、前記キーオフタイミングが前記第1特
定位置より前のときは前記エンベロープ波形信号形成手
段におけるキーオフ処理を遅延させ、前記キーオフタイ
ミングが前記第1特定位置および第2特定位置間のとき
と、前記第2特定位置より後であるときとでエンベロー
プ波形信号形成手段におけるキーオフ処理におけるエン
ベロープ波形の減衰特性を異ならせるものであることを
特徴とする請求項1記載の楽音発生装置。
2. The method according to claim 1, wherein the specific position setting means arbitrarily sets first and second specific positions on an envelope waveform, and the control means sets the key-off timing before the first specific position. In this case, the key-off process in the envelope waveform signal forming means is delayed, and the envelope waveform signal is generated when the key-off timing is between the first specific position and the second specific position and when the key-off timing is after the second specific position. 2. A tone generator according to claim 1, wherein the attenuation means of the envelope waveform in the key-off process in said forming means is made different.
JP2180667A 1990-07-10 1990-07-10 Tone generator Expired - Lifetime JP2967787B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2180667A JP2967787B2 (en) 1990-07-10 1990-07-10 Tone generator
US07/727,548 US5256831A (en) 1990-07-10 1991-07-09 Envelope waveform generation apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2180667A JP2967787B2 (en) 1990-07-10 1990-07-10 Tone generator

Publications (2)

Publication Number Publication Date
JPH0468398A JPH0468398A (en) 1992-03-04
JP2967787B2 true JP2967787B2 (en) 1999-10-25

Family

ID=16087206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2180667A Expired - Lifetime JP2967787B2 (en) 1990-07-10 1990-07-10 Tone generator

Country Status (1)

Country Link
JP (1) JP2967787B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5325416A (en) * 1976-08-20 1978-03-09 Nippon Gakki Seizo Kk Control waveform generator of electronic musical instruments
JPH0248699A (en) * 1988-08-11 1990-02-19 Yamaha Corp Envelope controller

Also Published As

Publication number Publication date
JPH0468398A (en) 1992-03-04

Similar Documents

Publication Publication Date Title
JP2743680B2 (en) Automatic performance device
US7470855B2 (en) Tone control apparatus and method
JPH0656552B2 (en) Automatic playing device
US5218158A (en) Musical tone generating apparatus employing control of musical parameters in response to note duration
US5502275A (en) Automatic accompaniment apparatus implementing smooth transition to fill-in performance
JP2967787B2 (en) Tone generator
JP2933141B2 (en) Envelope waveform generator
JPH0916172A (en) Musical performance practice device
JP3791796B2 (en) Music generator
US5256831A (en) Envelope waveform generation apparatus
JP3642130B2 (en) Electronic musical instruments
US4926738A (en) Electronic rhythm performing apparatus generating both manual and automatic rhythm tones
JPS648355B2 (en)
JP2629418B2 (en) Music synthesizer
JPH03242697A (en) Electronic musical instrument
US5635659A (en) Automatic rhythm performing apparatus with an enhanced musical effect adding device
JPH0468397A (en) Envelope waveform generating device
JP2900360B2 (en) Automatic accompaniment device
JP2990780B2 (en) Music signal generator
JP4214845B2 (en) Automatic arpeggio device and computer program applied to the device
JP2646812B2 (en) Electronic musical instrument
JP2715795B2 (en) Musical sound synthesizer having pronunciation assigning means
JP2770770B2 (en) Electronic musical instrument
JP3646611B2 (en) Music generator
JP2578327B2 (en) Automatic performance device

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 (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070820

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080820

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090820

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20100820

Year of fee payment: 11

EXPY Cancellation because of completion of term