JPH08179767A - Electronic musical instrument - Google Patents
Electronic musical instrumentInfo
- Publication number
- JPH08179767A JPH08179767A JP6324456A JP32445694A JPH08179767A JP H08179767 A JPH08179767 A JP H08179767A JP 6324456 A JP6324456 A JP 6324456A JP 32445694 A JP32445694 A JP 32445694A JP H08179767 A JPH08179767 A JP H08179767A
- Authority
- JP
- Japan
- Prior art keywords
- note
- tone
- key
- order
- envelope
- 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.)
- Granted
Links
- 230000002194 synthesizing effect Effects 0.000 claims abstract description 9
- 230000005236 sound signal Effects 0.000 abstract 2
- 238000000034 method Methods 0.000 description 51
- 230000008569 process Effects 0.000 description 47
- 230000015572 biosynthetic process Effects 0.000 description 16
- 238000003786 synthesis reaction Methods 0.000 description 16
- 230000000994 depressogenic effect Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000003111 delayed effect Effects 0.000 description 3
- 230000002238 attenuated effect Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 2
- 230000004044 response Effects 0.000 description 2
- 101100309712 Arabidopsis thaliana SD11 gene Proteins 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000000056 organ Anatomy 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
Landscapes
- Electrophonic Musical Instruments (AREA)
Abstract
Description
【0001】[0001]
【産業上の利用分野】本発明は、電子楽器に関し、特に
時間経過に従い音量が変化する楽音を発生する複数の発
音チャンネルを有し、発生すべき楽音に対して発音チャ
ンネルを割り当てる割当て処理を良好に行える電子楽器
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic musical instrument, and more particularly, it has a plurality of tone generation channels for generating musical tones whose volume changes with the passage of time, and has good allocation processing for allocating tone generation channels to musical tones to be generated. The electronic musical instruments that can be performed.
【0002】[0002]
【従来の技術】電子楽器の発音チャンネルは、メモリに
記憶された波形データを演奏者の鍵盤操作等に応じて読
み出す波形合成回路と、波形合成回路が形成した波形の
振幅を制御して楽音の音量を制御するためのエンベロー
プ信号を発生するエンベロープ形成回路等により構成さ
れている。2. Description of the Related Art A tone generation channel of an electronic musical instrument has a waveform synthesizing circuit for reading out waveform data stored in a memory in response to a player's keyboard operation and the like. It is composed of an envelope forming circuit for generating an envelope signal for controlling the volume.
【0003】この種の電子楽器では、発音すべき楽音毎
に動的に発音チャンネルを割り当てる。演奏者の鍵盤操
作等により発音要求があると、1つの発音チャンネルが
割り当てられる。空きチャンネルがない場合は、以前に
発音要求のあった楽音に割り当てられている発音チャン
ネルを強制的に解放し、新たに要求があった楽音に対し
てこの発音チャンネルを割り当てる。この割り当て処理
をトランケート処理という。In this type of electronic musical instrument, a tone generation channel is dynamically assigned to each musical tone to be generated. One tone generation channel is assigned when there is a tone generation request by the player's keyboard operation or the like. If there is no free channel, the tone generation channel previously assigned to the tone generation request is forcibly released, and this tone generation channel is assigned to the newly requested tone generation. This allocation process is called a truncate process.
【0004】楽音の中には、異なった早さのリリースを
持つもの、あるいは、ストリングやパイプオルガン等の
スローアタックの音色のものや、キーオンディレイとい
ってアタックを意識的に遅らせたものがある。従来の電
子楽器では、エンベロープ信号のレベルだけに基づいて
トランケート処理を行っていたため、例えば以下のよう
な不都合が生じていた。Some of the musical tones have different speeds of release, those of slow attack tones such as strings and pipe organs, and those of which the attack is intentionally delayed called key-on delay. . In the conventional electronic musical instrument, since the truncation processing is performed only based on the level of the envelope signal, the following inconveniences occur.
【0005】図10に示すように、スローアタックの音
色が割り当てられている発音チャンネルCの時刻t1 に
おけるエンベロープ信号のレベルLc は、楽音の立ち上
がり部分であるにもかかららず、発音チャンネルA及び
Bの時刻t1 におけるエンベロープ信号のレベルLa お
よびLb よりも小さい。時刻t1 に発音チャンネル割当
て要求があった場合、エンベロープ信号のレベルだけに
基づいてトランケート処理を行うと発音チャンネルCが
トランケート処理されてしまう。これでは、発音チャン
ネルCを割り当てられた楽音が発音されないまま消音さ
れてしまうため不自然である。As shown in FIG. 10, the level L c of the envelope signal at the time t 1 of the tone generation channel C to which the slow attack tone color is assigned is the rising portion of the musical tone but the tone generation channel. It is smaller than the levels L a and L b of the envelope signals at time t 1 of A and B. When there is a tone generation channel allocation request at time t 1 , if the truncation process is performed based only on the level of the envelope signal, the tone generation channel C will be truncated. This is unnatural because the musical sound assigned to the sounding channel C is muted without being sounded.
【0006】そこで、最も古く押鍵された発音チャンネ
ルを検出してトランケート処理する方法が提案されてい
る。時刻t1 に発音チャンネルの割り当て要求がある
と、時刻t1 におけるエンベロープ信号のレベルは発音
チャンネルBよりも発音チャンネルAの方が小さいにも
かかわらず、最も古く押鍵された発音チャンネルBがト
ランケートされてしまう。これでは、実際に減衰が進ん
でいる音よりも、まだ聞こえている音の方が先に消音さ
れてしまうことになり不自然である。Therefore, there has been proposed a method of detecting the tone generation channel having the oldest key depression and performing a truncation process. If there is allocation request tone generation channels at time t 1, even though the level of the envelope signal at time t 1 is smaller for the sound channel A than sound channel B, truncated the oldest depressed the sound channel B Will be done. This is unnatural because the sound that is still heard will be muted earlier than the sound that is actually attenuated.
【0007】このような不自然さを解消するためのトラ
ンケート処理方法が、特開平5−265458号に開示
されている。この方法は、既に離鍵された鍵に割り当て
られている発音チャンネルの中で最もエンベロープ信号
のレベルが小さい発音チャンネルをトランケートするも
のである。このトランケート処理によると、離鍵はされ
ているが、未だエンベロープ信号レベルの比較的大きな
発音チャンネルをトランケートしてしまうことを防止で
きる。A truncation method for eliminating such an unnaturalness is disclosed in Japanese Patent Laid-Open No. 5-265458. This method truncates the tone generation channel having the lowest envelope signal level among the tone generation channels assigned to the already released keys. According to this truncation processing, it is possible to prevent truncation of a tone generation channel having a relatively high envelope signal level, although the key is released.
【0008】[0008]
【発明が解決しようとする課題】既に離鍵された鍵に割
り当てられている発音チャンネルの中で最もエンベロー
プ信号のレベルが小さい発音チャンネルをトランケート
することにより、最適の発音チャンネルをトランケート
することができる。しかし、離鍵されている発音チャン
ネル数が多くなってくると、エンベロープ信号レベルが
最小の発音チャンネルを検索する時間が長くなる。検索
時間が長くなると、押鍵されてから実際に発音するまで
の時間遅れが生じ、不自然に聞こえる。The optimum sounding channel can be truncated by truncating the sounding channel with the lowest envelope signal level among the sounding channels assigned to the already released keys. . However, as the number of released tone channels increases, the time for searching the tone channel with the lowest envelope signal level increases. If the search time becomes long, there is a time delay between the key being pressed and the actual pronunciation, which sounds unnatural.
【0009】本発明の目的は、音楽的に自然で、かつ効
率的にトランケートすべき発音チャンネルを決定するこ
とができる電子楽器を提供することである。It is an object of the present invention to provide an electronic musical instrument that is musically natural and can efficiently determine a tone generation channel to be truncated.
【0010】[0010]
【課題を解決するための手段】本発明の電子楽器は、発
音されるべき楽音の音高を示し、オン状態とオフ状態の
いずれかの状態をとり得るノートコード、及び該ノート
コードに対して発音開始が指示されたとき「ノートオ
ン」となり、発音終了が指示されたとき「ノートオフ」
となるオンオフ種別を含む発音処理要求を発生する演奏
入力手段と、前記ノートコードが動的に割り当てられ、
割り当てられたノートコード及びオンオフ種別に応じ
て、時間的にエンベロープレベルが変化する楽音波形を
生成する複数の発音チャンネルを有する楽音合成手段
と、前記複数の発音チャンネルと、各発音チャンネルに
割り当てられているノートコードとを対応付けて、ノー
トコードがオン状態になった順番及びオフ状態になった
順番が分かるように記憶する発音割当情報記憶手段と、
前記演奏入力手段から発音処理要求があったことを検出
する発音処理要求検出手段と、前記発音処理要求検出手
段が発音処理要求を検出したとき、前記オンオフ種別が
「ノートオン」であり、前記発音チャンネルに空きチャ
ンネルがない場合には、その時点で予め決められている
レベルよりも小さいエンベロープレベルを有する発音チ
ャンネルが検出されるまで、前記発音割当情報記憶手段
を所定の順番で検索し、検出された発音チャンネルの楽
音波形の生成を停止させると共に、発音処理要求のあっ
たノートコードのオンオフ種別が「ノートオン」に対応
する楽音波形を新たに生成させ、前記発音割当情報記憶
手段に、発音処理要求のあったノートコードがオン状態
になった順番が分かるように、検出された発音チャンネ
ルと発音処理要求のあったノートコードとを新たに対応
付けて記憶させ、かつ、前記オンオフ種別が「ノートオ
フ」である場合には、発音処理要求のあったノートコー
ドに割り当てられている発音チャンネルに対してオンオ
フ種別が「ノートオフ」に対応する楽音波形を生成さ
せ、前記発音割当情報記憶手段に、発音処理要求のあっ
たノートコードがオフ状態になったことをオフ状態にな
った順番が分かるように記憶させる制御手段であって、
前記所定の順番は、その時点でオフ状態のノートコー
ド、次にオン状態のノートコードの順番であり、オフ状
態のノートコードの中ではオフ状態になった順番、オン
状態のノートコードの中ではオン状態になった順番であ
る前記制御手段とを有する。The electronic musical instrument of the present invention indicates the pitch of a musical tone to be sounded and can be in either an on state or an off state, and a note code for the note code. "Note on" when the start of pronunciation is instructed, and "Note off" when the end of pronunciation is instructed
Performance input means for generating a sounding processing request including an on / off type, and the note code are dynamically assigned,
According to the assigned note code and on / off type, a musical tone synthesizing unit having a plurality of tone generation channels for generating a tone waveform whose envelope level changes with time, the plurality of tone generation channels, and a plurality of tone generation channels assigned to each tone generation channel. Sounding assignment information storage means for storing the note code in association with the existing note code so that the order in which the note code is turned on and the order in which the note code is turned off can be understood
A sounding process request detecting unit that detects that there is a sounding process request from the performance input unit; and when the sounding process request detecting unit detects a sounding process request, the on / off type is “note on”, If there is no empty channel in the channels, the sounding assignment information storage means is searched in a predetermined order and detected until a sounding channel having an envelope level smaller than a predetermined level at that time is detected. The generation of the musical tone waveform of the sound generation channel is stopped, and a musical tone waveform corresponding to the note-off on / off type "note-on" is newly generated, and the pronunciation allocation information storage means is caused to perform the tone generation processing. Detected sound channel and sound processing request so that you can see the order in which the requested note code was turned on If there is a new note code stored in association with it, and if the on / off type is "note off", the on / off type is assigned to the sound generation channel assigned to the note code for which the sound generation processing request has been made. Generates a tone waveform corresponding to "note-off", and stores it in the pronunciation assignment information storage means so that the note code for which the pronunciation processing request has been made is in an off-state so that the order of the off-state can be known. Control means,
The predetermined order is the order of the note chords in the off state at that time, then the note chords in the on state, and in the note chords in the off state, the order in which they are in the off state and the note chords in the on state. And the control means in the order of being turned on.
【0011】[0011]
【作用】新たな発音処理要求があったときに、その時点
でのエンベロープレベルが所定のレベル以下である発音
チャンネルをトランケートする。この所定のレベルを適
当に決めておくことにより、トランケートされた発音チ
ャンネルが発生していた楽音を消音することによる不自
然さを防止することができる。When a new tone generation processing request is made, the tone generation channel whose envelope level at that time is below a predetermined level is truncated. By appropriately determining the predetermined level, it is possible to prevent the unnaturalness caused by muting the musical sound generated by the truncated sound generation channel.
【0012】各発音チャンネルのエンベロープレベルを
順番に読み出してエンベロープレベルと所定レベルとを
比較する。エンベロープレベルが所定レベル以下の発音
チャンネルを検出したら、それ以降の発音チャンネルの
エンベロープレベル読み出しを行う必要がない。全ての
発音チャンネルのエンベロープレベルを読み出す必要が
ないため、比較的短時間にトランケートすべき発音チャ
ンネルを検出することができる。The envelope level of each tone generation channel is read in order and the envelope level is compared with a predetermined level. When a tone generation channel whose envelope level is lower than a predetermined level is detected, it is not necessary to read the envelope level of the tone generation channels thereafter. Since it is not necessary to read the envelope levels of all the sound generation channels, the sound generation channels to be truncated can be detected in a relatively short time.
【0013】オフ状態になった順番が古いノートコード
に割り当てられている発音チャンネルほどエンベロープ
レベルが低いと期待される。また、オン状態のノートコ
ードでは、オン状態になった順番が古いキーに割り当て
られている発音チャンネルほどエンベロープレベルが低
いと期待される。発音チャンネルのエンベロープレベル
を読み出す順番を、まずオフ状態になった順番が古い
順、次にオン状態になった順番が古い順とすることによ
り、所定レベル以下のエンベロープレベルを有する発音
チャンネルを検出するまでの時間が短縮されると期待で
きる。It is expected that a tone generation channel assigned to a note code whose turn-off state is older is lower in envelope level. Further, in the note code in the on state, it is expected that the tone generation channel assigned to the key whose turn-on state becomes older has a lower envelope level. By detecting the order of reading the envelope level of the sound generation channel, the sound generation channel having the envelope level lower than the predetermined level is detected by setting the order of the off state to the oldest first and then the order of the on state to the oldest. It can be expected that the time to
【0014】[0014]
【実施例】以下、本発明の一実施例について説明する。
図1は、本発明の一実施例による電子楽器の全体構成を
示すブロック図である。データバス18に複数のモジュ
ールが接続され、データバス18を介してモジュール間
でデータをやりとりすることにより、演奏が行われる。
演奏入力部11は複数の鍵盤を有し、鍵盤の押鍵、離鍵
を検出し、音高情報、押鍵離鍵の速さ情報等をデータバ
ス18に供給する。MIDIインタフェース14には、
MIDI端子が設けられており、MIDI端子から入力
されるMIDIメッセージを受信してデータバス18に
供給する。An embodiment of the present invention will be described below.
FIG. 1 is a block diagram showing the overall configuration of an electronic musical instrument according to an embodiment of the present invention. A plurality of modules are connected to the data bus 18, and data is exchanged between the modules via the data bus 18 to perform a performance.
The performance input unit 11 has a plurality of keyboards, detects key depression and key release of the keyboard, and supplies pitch information, key release speed information and the like to the data bus 18. The MIDI interface 14 has
A MIDI terminal is provided, and receives a MIDI message input from the MIDI terminal and supplies it to the data bus 18.
【0015】表示盤12は、選択されている音色情報等
を表示する。パネルスイッチ13は、音色等の選択を行
うためのものであり、音色情報等をデータバス18に供
給する。CPU15は、ROM16に記憶されたプログ
ラムに従って処理を実行する。RAM17は、処理に必
要な一時データを記憶するためのメモリである。The display board 12 displays the selected tone color information and the like. The panel switch 13 is for selecting a tone color and the like, and supplies tone color information and the like to the data bus 18. The CPU 15 executes processing according to the program stored in the ROM 16. The RAM 17 is a memory for storing temporary data required for processing.
【0016】音声合成回路19は、CPU15からの発
音指示に基づいて楽音合成を行う複数の発音チャンネル
を有し、複数の発音チャンネルで合成された楽音信号を
サウンドシステム20に出力する。サウンドシステム2
0は、楽音信号合成回路19から出力された楽音信号を
D/A変換し増幅して楽音として発音させる。The voice synthesizing circuit 19 has a plurality of tone generation channels for synthesizing a tone based on a tone generation instruction from the CPU 15, and outputs the tone signal synthesized by the plurality of tone generation channels to the sound system 20. Sound system 2
0 is D / A-converts and amplifies the tone signal output from the tone signal synthesis circuit 19 to generate a tone.
【0017】次に、図1に示す構成の電子楽器のCPU
15の動作について、図2〜図6を参照して説明する。
図2は、CPU15のメインルーチンのフローチャート
を示す。電子楽器の電源が投入されると、CPU15
は、ステップSA1を実行する。ステップSA1では、
装置各部の初期設定を行う。例えば、各モジュール内の
レジスタのリセット、各種変数の初期設定等を行う。初
期設定が終了すると、CPU15はステップSA2のM
IDI処理、ステップSA3の鍵処理、及びステップS
A4のパネル処理を行う。ステップSA4の処理が終了
すると、ステップSA2に戻り、電源が切断されるまで
ステップSA2〜ステップSA4を繰り返し実行する。Next, the CPU of the electronic musical instrument having the configuration shown in FIG.
The operation of 15 will be described with reference to FIGS.
FIG. 2 shows a flowchart of the main routine of the CPU 15. When the power of the electronic musical instrument is turned on, the CPU 15
Executes step SA1. In step SA1,
Initialize each part of the device. For example, the registers in each module are reset and various variables are initialized. When the initial setting is completed, the CPU 15 sets M in step SA2.
IDI processing, key processing in step SA3, and step S
A4 panel processing is performed. When the process of step SA4 is completed, the process returns to step SA2, and steps SA2 to SA4 are repeatedly executed until the power is turned off.
【0018】以下、ステップSA3の鍵処理を説明し、
次にステップSA4のパネル処理、最後にステップSA
2のMIDI処理を説明する。図3は、鍵処理のフロー
チャートを示す。CPU15の処理が図2のステップS
A3に進むと、図3に示す鍵処理ルーチンが起動され
る。鍵処理ルーチンが起動されるとCPU15は、ステ
ップSB1の処理を実行する。ステップSB1では、演
奏入力部11の鍵盤をスキャンして鍵盤の押離鍵状態を
検出する。全ての鍵盤のスキャンが終了するとステップ
SB2へ進む。The key processing in step SA3 will be described below.
Next, panel processing in step SA4, and finally step SA
The MIDI processing of No. 2 will be described. FIG. 3 shows a flowchart of the key processing. The processing of the CPU 15 is step S in FIG.
Proceeding to A3, the key processing routine shown in FIG. 3 is started. When the key processing routine is activated, the CPU 15 executes the processing of step SB1. In step SB1, the keyboard of the performance input section 11 is scanned to detect the key press / release state. When scanning of all keyboards is completed, the process proceeds to step SB2.
【0019】ステップSB2では、ステップSB1で検
出した押離鍵状態から鍵イベントの有無を判断する。例
えば、前周期のスキャン結果が離鍵状態で今周期のスキ
ャン結果が押鍵状態であれば、今周期に押鍵があったこ
とになり、鍵イベントは押鍵があったことを示す「キー
オン」になる。逆に前周期のスキャン結果が押鍵状態で
今周期のスキャン結果が離鍵状態であれば、鍵イベント
は離鍵があったことを示す「キーオフ」になる。また、
全ての鍵について前周期と今周期の状態が同じであれ
ば、鍵イベントは検出されない。In step SB2, it is determined whether or not there is a key event based on the key press / release state detected in step SB1. For example, if the scan result of the previous cycle is the key release state and the scan result of the current cycle is the key press state, it means that there is a key press in the current cycle, and the key event indicates that there is a key press. "become. On the contrary, if the scan result of the previous cycle is the key pressed state and the scan result of the current cycle is the key released state, the key event is “key off” indicating that the key was released. Also,
If the state of the previous cycle and the current cycle are the same for all the keys, no key event is detected.
【0020】鍵イベントが検出されない場合には、なに
もせず図2に示すメインルーチンに戻る。鍵イベントを
検出した場合には、ステップSB3の処理に進む。ステ
ップSB3では、全ての鍵イベントに関する発音情報を
RAM17のMIDIバッファに格納する。発音情報
は、例えば押鍵離鍵の別、音高を表すキーコード(K
C)、押離鍵の速さを表すキーベロシティ(KV)等か
らなる。全ての鍵イベント情報をMIDIバッファに格
納すると、図2に示すメインルーチンに戻る。If no key event is detected, nothing is returned to the main routine shown in FIG. If a key event is detected, the process proceeds to step SB3. In step SB3, pronunciation information on all key events is stored in the MIDI buffer of the RAM 17. The pronunciation information is, for example, a key code (K
C), key velocity (KV) indicating the speed of pressing and releasing keys, and the like. When all the key event information is stored in the MIDI buffer, the process returns to the main routine shown in FIG.
【0021】上記鍵処理ルーチンの説明では、鍵盤の押
離鍵を検出する場合について説明したが、MIDIイン
タフェース14から演奏入力が行われる場合にも同様の
処理を行う。すなわち、MIDIメッセージの受信が有
った場合には、MIDIメッセージで指定されている発
音情報をMIDIバッファに格納する。In the above description of the key processing routine, the case where the key depression / release of the keyboard is detected has been described, but the same processing is performed when a performance input is made from the MIDI interface 14. That is, when the MIDI message is received, the pronunciation information specified by the MIDI message is stored in the MIDI buffer.
【0022】以下、演奏入力部11及びMIDIインタ
フェース14からの入力を総称してMIDIイベントと
呼ぶ。通常のMIDI規格のチャンネル数は0チャンネ
ルから15チャンネルまでの16チャンネルであり、M
IDI入力端子から入力されるMIDIメッセージにこ
のMIDIチャンネル情報が含まれている。本実施例で
は、内部処理においてこのMIDIチャンネルを拡張
し、16チャンネル以上のチャンネル数を確保してい
る。以下、MIDI入力端子から入力されるメッセージ
中のMIDIチャンネルを外部MIDIチャンネルと呼
び、内部で使用される拡張されたMIDIチャンネルを
単にMIDIチャンネルと呼ぶ。Hereinafter, the inputs from the performance input section 11 and the MIDI interface 14 are generically called MIDI events. The number of channels of the normal MIDI standard is 16 channels from 0 to 15, and M
The MIDI message input from the IDI input terminal includes this MIDI channel information. In this embodiment, the MIDI channels are expanded in the internal processing to secure the number of channels of 16 or more. Hereinafter, the MIDI channel in the message input from the MIDI input terminal is called an external MIDI channel, and the extended MIDI channel used internally is simply called a MIDI channel.
【0023】鍵盤からの入力とMIDI入力端子からの
入力とを区別するために、それぞれに異なるMIDIチ
ャンネルが割りつけられている。例えば、鍵盤からの入
力情報にMIDIチャンネル0を割りつけ、MIDI入
力端子からの情報には外部MIDIチャンネルに一定値
を加算したMIDIチャンネルを割りつけている。RA
M17のMIDIバッファに格納される発音情報には、
このMIDIチャンネルも含まれている。In order to distinguish the input from the keyboard and the input from the MIDI input terminal, different MIDI channels are assigned to each. For example, the MIDI channel 0 is assigned to the input information from the keyboard, and the MIDI channel obtained by adding a fixed value to the external MIDI channel is assigned to the information from the MIDI input terminal. RA
The pronunciation information stored in the M17 MIDI buffer includes
This MIDI channel is also included.
【0024】次に、図2に示すステップSA4のパネル
処理について説明する。演奏者が図1のパネルスイッチ
13を操作すると、その操作に応じて曲風やテンポの設
定、あるいはMIDIチャンネルごとの音色の設定等を
行う。曲風、テンポ、音色等はRAM17に記憶され
る。以下に説明するMIDI処理において、これらの音
色情報等が使用される。Next, the panel processing of step SA4 shown in FIG. 2 will be described. When the performer operates the panel switch 13 shown in FIG. 1, the musical style and tempo are set, or the tone color for each MIDI channel is set according to the operation. The musical style, tempo, tone color, etc. are stored in the RAM 17. These tone color information and the like are used in the MIDI processing described below.
【0025】次に、図4〜図6を参照して図2に示すス
テップSA2のMIDI処理について説明する。図4
は、MIDI処理のフローチャートを示す。CPU15
の処理が図2のステップSA2に進むと、図4に示すM
IDI処理が起動される。CPU15は、ステップSC
1でRAM17のMIDIバッファを走査した後、ステ
ップSC2へ進む。Next, the MIDI processing of step SA2 shown in FIG. 2 will be described with reference to FIGS. FIG.
Shows a flowchart of MIDI processing. CPU15
2 proceeds to step SA2 in FIG. 2, M shown in FIG.
The IDI process is activated. CPU15, step SC
After scanning the MIDI buffer of the RAM 17 at 1, the process proceeds to step SC2.
【0026】ステップSC2では、MIDIイベントの
有無を判断する。MIDIイベントが検出されない場合
は、何もせず図2のメインルーチンへ戻る。MIDIイ
ベントが検出された場合は、ステップSC3へ進む。In step SC2, it is determined whether or not there is a MIDI event. If no MIDI event is detected, nothing is done and the process returns to the main routine of FIG. If the MIDI event is detected, the process proceeds to step SC3.
【0027】ステップSC3では、MIDIイベントが
ノートイベントか否かを判定する。ここで、ノートイベ
ントとは、押離鍵を表すイベントをいう。MIDIイベ
ントがノートイベントのときはステップSC4のノート
イベント処理を実行し、ノートイベント以外のときは、
ステップSC5の各イベントに対応した処理を実行す
る。ステップSC4あるいはSC5の処理が終了する
と、図2のメインルーチンへ戻る。In step SC3, it is determined whether the MIDI event is a note event. Here, the note event refers to an event representing a key release. When the MIDI event is a note event, the note event process of step SC4 is executed, and when it is not a note event,
The process corresponding to each event in step SC5 is executed. When the processing of step SC4 or SC5 ends, the process returns to the main routine of FIG.
【0028】次に、図5及び図6を参照してノートイベ
ント処理について説明する。以下の説明では、演奏入力
部11から押離鍵があった場合を説明するが、MIDI
入力端子から押離鍵に対応するMIDIメッセージが入
力された場合も同様の処理である。Next, the note event process will be described with reference to FIGS. In the following description, the case where a key is released from the performance input section 11 will be described.
The same processing is performed when a MIDI message corresponding to key release is input from the input terminal.
【0029】図5は、ノートイベント処理のフローチャ
ートを示す。CPU15の処理が図4のステップSC4
に進むと、図5のノートイベント処理が起動される。ス
テップSD1では、CPU15はRAM17のMIDI
バッファに格納されている発音情報を取り出す。発音情
報には、上述のように「キーオン」、「キーオフ」の区
別を示す鍵イベント、キーコード、キーベロシティ及び
MIDIチャンネル等が含まれている。FIG. 5 shows a flow chart of note event processing. The processing of the CPU 15 is step SC4 in FIG.
When the process proceeds to step 5, the note event process of FIG. 5 is activated. At step SD1, the CPU 15 sends the MIDI data in the RAM 17
The pronunciation information stored in the buffer is retrieved. The pronunciation information includes a key event indicating the distinction between "key on" and "key off", a key code, a key velocity, a MIDI channel, etc., as described above.
【0030】ステップSD2では、鍵イベントが「キー
オン」か否かを判定する。鍵イベントが「キーオン」で
ある場合には、押鍵された鍵に対応する楽音を発音する
ためのステップSD3〜SD12の一連の処理を実行す
る。鍵イベントが「キーオフ」である場合には、ステッ
プSD13〜SD15の一連のキーオフ処理を実行す
る。In step SD2, it is determined whether the key event is "key on". When the key event is "key on", a series of processes of steps SD3 to SD12 for producing a tone corresponding to the depressed key are executed. If the key event is "key off", a series of key off processing of steps SD13 to SD15 is executed.
【0031】まず、図6(A)を参照しつつ、ステップ
SD13〜SD15の離鍵時の処理を説明する。図6
(A)は、離鍵時のキーアサインテーブルの動きを示
す。ここで、キーアサインテーブルとは、キーコードと
発音チャンネルとの対応関係を示す情報要素を所定の順
番に配列したテーブルをいい、RAM17内に記憶され
ている。図6(A)は、発音チャンネルが0〜7の8個
準備されている場合を示す。図6(A)左側に示すテー
ブルは、離鍵処理前の状態を、右側に示すテーブルは離
鍵処理後の状態を表している。First, with reference to FIG. 6A, the processing at the time of releasing the key in steps SD13 to SD15 will be described. Figure 6
(A) shows the movement of the key assignment table when releasing the key. Here, the key assignment table refers to a table in which information elements indicating the correspondence between key codes and sounding channels are arranged in a predetermined order, and is stored in the RAM 17. FIG. 6A shows a case where eight tone generation channels 0 to 7 are prepared. The table shown on the left side of FIG. 6A shows the state before the key release process, and the table shown on the right side shows the state after the key release process.
【0032】離鍵処理前のテーブルの上から5行分は既
に離鍵されている鍵を表す離鍵情報領域であり、下から
3行分は押鍵中の鍵を表す押鍵情報領域である。例え
ば、キーコード36は既に離鍵されており、発音チャン
ネル7に割り当てられている。キーコード42は現在押
鍵中であり、発音チャンネル0に割り当てられている。
なお、離鍵情報領域及び押鍵情報領域に格納されている
情報要素の数は、そのときの押離鍵状態によって変動す
る。The five rows from the top of the table before the key release processing are the key release information areas that represent the keys that have already been released, and the three rows from the bottom are the key release information areas that represent the keys being pressed. is there. For example, the key code 36 has already been released and is assigned to the sound generation channel 7. The key code 42 is currently being depressed and is assigned to the tone generation channel 0.
The number of information elements stored in the key release information area and the key release information area varies depending on the key release state at that time.
【0033】ステップSD13では、キーアサインテー
ブルを走査してMIDIバッファから取り出したキーコ
ードすなわち今周期に離鍵されたキーコードを検索し、
割り当てられている発音チャンネル番号を得る。例え
ば、離鍵されたキーコードが61であるとすると、図6
(A)の離鍵処理前テーブルから、キーコード61に割
り当てられている発音チャンネル番号5を得る。In step SD13, the key assignment table is scanned to retrieve the key code retrieved from the MIDI buffer, that is, the key code released in this cycle,
Get the assigned pronunciation channel number. For example, assuming that the released key code is 61, the key code shown in FIG.
The tone generation channel number 5 assigned to the key code 61 is obtained from the pre-key release processing table of (A).
【0034】ステップSD14では、離鍵されたキーコ
ードに割り当てられている発音チャンネルに対して「キ
ーオフ」信号を送出する。楽音合成回路19は、「キー
オフ」信号を受信すると該当の発音チャンネルから離鍵
後の楽音信号を発生する。離鍵後の楽音信号の制御情報
は、パネルスイッチ13により指定される音色ごとに予
めROM16に記憶されてる。楽音合成回路19は、こ
の制御情報に基づいて楽音信号を発生する。これによ
り、エンベロープ波形が徐々に減衰するリリース状態に
なる。なお、ROM16に記憶されている制御情報は、
CPU15が読み出して音声合成回路19に転送する。At step SD14, a "key-off" signal is sent to the tone generation channel assigned to the released key code. Upon receiving the "key-off" signal, the tone synthesis circuit 19 generates a tone signal after key release from the corresponding sounding channel. The control information of the tone signal after key release is stored in advance in the ROM 16 for each tone color designated by the panel switch 13. The tone synthesis circuit 19 generates a tone signal based on this control information. As a result, the envelope waveform enters a release state in which it gradually attenuates. The control information stored in the ROM 16 is
The CPU 15 reads it and transfers it to the voice synthesis circuit 19.
【0035】ステップSD15では、離鍵された鍵に関
する情報要素をキーアサインテーブルの離鍵情報領域の
最後尾に移動する。離鍵された鍵がキーコード61であ
る場合、図6(A)に示すように、キーコード61に関
する情報要素を離鍵情報領域の最後尾に移動する。この
ようにして、離鍵情報領域にはキーコードに関する情報
要素が上から離鍵の古い順番に並ぶ。In step SD15, the information element relating to the released key is moved to the end of the key release information area of the key assignment table. When the released key is the key code 61, the information element related to the key code 61 is moved to the end of the key release information area, as shown in FIG. In this way, in the key release information area, the information elements related to the key code are arranged in the order of old key release from the top.
【0036】次に、図6(B)を参照しつつ、ステップ
SD3〜SD12の押鍵処理を説明する。図6(B)左
側に示すテーブルは、押鍵処理前の状態を、右側に示す
テーブルは押鍵処理後の状態を示す。Next, with reference to FIG. 6B, the key depression processing of steps SD3 to SD12 will be described. The table shown on the left side of FIG. 6B shows the state before the key pressing process, and the table shown on the right side shows the state after the key pressing process.
【0037】ステップSD3で変数iに0を代入し、ス
テップSD4〜SD6の一連の処理を実行する。ステッ
プSD7で変数iに1を加えてステップSD8で変数i
と発音チャンネル数とを比較し、等しくない場合にはス
テップSD4に戻る。すなわち、ステップSD4〜SD
6の一連の処理を発音チャンネル数分繰り返し実行す
る。At step SD3, 0 is substituted for the variable i, and a series of processes of steps SD4 to SD6 are executed. At step SD7, 1 is added to the variable i, and at step SD8 the variable i is added.
Is compared with the number of sound generation channels, and if they are not equal, the process returns to step SD4. That is, steps SD4 to SD
A series of processing of 6 is repeatedly executed for the number of sound generation channels.
【0038】ステップSD4では、キーアサインテーブ
ルのi番目(先頭を0番目とする)の情報要素に対応す
る発音チャンネル番号を得る。例えば、iが2であれば
図6(B)の上から2番目の情報要素に対応し、発音チ
ャンネル番号1が得られる。In step SD4, the tone generation channel number corresponding to the i-th (starting from 0) information element of the key assignment table is obtained. For example, if i is 2, the tone generation channel number 1 is obtained corresponding to the second information element from the top in FIG.
【0039】ステップSD5では、ステップSD4で得
た発音チャンネルのエンベロープレベルを得る。エンベ
ロープレベルは、楽音合成回路19内の発音チャンネル
ごとに設けられたテンポラリメモリに格納されており、
CPU15はデータバス18を介して楽音合成回路19
からエンベロープレベルを読み込む。At step SD5, the envelope level of the tone generation channel obtained at step SD4 is obtained. The envelope level is stored in the temporary memory provided for each tone generation channel in the tone synthesis circuit 19,
The CPU 15 uses the data bus 18 to synthesize the musical sound synthesis circuit 19
Read the envelope level from.
【0040】ステップSD6では、ステップSD5で得
たエンベロープレベルと所定のトランケートレベルとを
比較する。エンベロープレベルがトランケートレベル以
下の場合、ステップSD4〜SD8のループ処理を抜け
てステップSD9に進む。エンベロープレベルがトラン
ケートレベルよりも大きい場合、ステップSD7に進
み、上述のように発音チャンネル数分ステップSD4〜
SD8のループ処理を繰り返す。At step SD6, the envelope level obtained at step SD5 is compared with a predetermined truncation level. If the envelope level is equal to or lower than the truncate level, the loop process of steps SD4 to SD8 is skipped and the process proceeds to step SD9. If the envelope level is higher than the truncate level, the process proceeds to step SD7 and, as described above, steps SD4 to
The loop process of SD8 is repeated.
【0041】ステップSD9では、ステップSD6でエ
ンベロープレベルがトランケートレベルよりも小さいと
判断された発音チャンネルの発音終了処理を行う。これ
により、楽音信号合成回路19は、該当の発音チャンネ
ルからの楽音信号の発生を停止する。In step SD9, the tone generation ending process of the tone generation channel whose envelope level is determined to be lower than the truncated level in step SD6 is performed. As a result, the tone signal synthesizing circuit 19 stops the generation of tone signals from the corresponding tone generation channel.
【0042】ステップSD10では、ステップSD9で
楽音信号の発生を停止した発音チャンネルに新規の発音
情報を送出する。楽音信号合成回路19の該当の発音チ
ャンネルは、CPU15から送出された発音情報に基づ
いて楽音信号を発生する。In step SD10, new tone generation information is sent to the tone generation channel in which the generation of the tone signal is stopped in step SD9. The corresponding tone generation channel of the tone signal synthesis circuit 19 generates a tone signal based on the tone information sent from the CPU 15.
【0043】ステップSD11では、キーアサインテー
ブルのi番目の情報要素を削除し、i+1番目以降の情
報要素を1つずつ上に詰める。ステップSD12では、
押鍵された鍵のキーコードにi番目の情報要素に格納さ
れていた発音チャンネルを割当て、キーアサインテーブ
ルの押鍵情報領域の最後尾に登録する。At step SD11, the i-th information element of the key assignment table is deleted, and the i + 1th and subsequent information elements are packed up one by one. In step SD12,
The tone generation channel stored in the i-th information element is assigned to the key code of the depressed key, and is registered at the end of the key depression information area of the key assignment table.
【0044】図6(B)は、押鍵されたキーコードが4
3、発音チャンネル7のエンベロープレベルがトランケ
ートレベル以下である場合のステップSD11とSD1
2の処理におけるキーアサインテーブルの変化を示す。
まず、押鍵処理前のキーアサインテーブルの離鍵情報領
域の上から順番に、発音チャンネルのエンベロープレベ
ルを得る。発音チャンネル7のエンベロープレベルがト
ランケートレベル以下と仮定したため、キーコード3
6、発音チャンネル7を対応付けている0番目の情報要
素を削除する。In FIG. 6B, the depressed key code is 4
3. Steps SD11 and SD1 when the envelope level of the sounding channel 7 is below the truncate level
9 shows changes in the key assignment table in the process of 2.
First, the envelope level of the tone generation channel is obtained in order from the top of the key release information area of the key assignment table before the key depression processing. Since it was assumed that the envelope level of pronunciation channel 7 was below the truncate level, key code 3
6. Delete the 0th information element associated with the pronunciation channel 7.
【0045】次に、図6(B)の押鍵処理後のキーアサ
インテーブルに示すように、押鍵されたキーコード43
に発音チャンネル7を割当て、キーアサインテーブルの
押鍵情報領域の最後尾に登録する。これにより、キーア
サインテーブルの押鍵情報領域には、現在押鍵中のキー
コードが押鍵の古い順番に並ぶことになる。Next, as shown in the key assignment table after the key depression processing of FIG.
The tone generation channel 7 is assigned to and is registered at the end of the key depression information area of the key assignment table. As a result, in the key-depression information area of the key assignment table, the key codes currently being depressed are lined up in the order of oldest key-depression.
【0046】上記実施例では、キーアサインテーブルを
上から順番に検索して、発音チャンネルのエンベロープ
レベルがトランケートレベル以下のものを検出した時点
で検索が終了する。全ての発音チャンネルについてエン
ベロープレベルを読みだす必要がないため、処理の高速
化が可能になる。また、キーアサインテーブルには最も
古く離鍵された順番、次に最も古く押鍵された順番に情
報要素が配列されているため、エンベロープレベルが低
いと思われる発音チャンネルから優先的に検索される。
これにより、トランケートレベル以下の発音チャンネル
をより早く見つけ出すことができる。In the above embodiment, the key assignment table is searched in order from the top, and the search is ended when the envelope level of the tone generation channel is detected to be below the truncation level. Since it is not necessary to read the envelope level for all the sound generation channels, the processing speed can be increased. Further, since the information elements are arranged in the key assignment table in the order of the oldest released key and the next oldest pressed key, the pronunciation channels that are considered to have a low envelope level are preferentially searched. .
As a result, it is possible to find out a sounding channel below the truncated level more quickly.
【0047】また、上記実施例では、キーアサインテー
ブルを離鍵情報領域と押鍵情報領域の2領域に分けて、
それぞれ古く押離鍵されたものから順番に配列する場合
を説明したが、さらに、空き発音チャンネル領域を設け
てもよい。空き発音チャンネル領域には、キーコードに
割り当てられていない発音チャンネル番号を記憶してお
く。例えば、自然な減衰によってエンベロープレベルが
0になった発音チャンネルを検出し、この発音チャンネ
ルを空き発音チャンネル領域に登録しておけばよい。新
たな押鍵があったときは、押鍵のあったキーコードに空
き発音チャンネル領域中のいずれかの発音チャンネルを
割り当てればよい。In the above embodiment, the key assignment table is divided into two areas, a key release information area and a key depression information area,
The case where the keys are arranged in order from the oldest pressed and released keys has been described, but an empty tone generation channel area may be further provided. In the empty tone generation channel area, tone generation channel numbers not assigned to the key code are stored. For example, a tone generation channel in which the envelope level becomes 0 due to natural attenuation may be detected, and this tone generation channel may be registered in the empty tone generation channel area. When there is a new key depression, any tone generation channel in the empty tone generation channel area may be assigned to the key code having the key depression.
【0048】トランケートレベルは、音色及び音高によ
らず一定レベルにしてもよいし、音色もしくは音高ごと
に重み付けをしてもよい。トランケートレベルを一定レ
ベルにする場合は、例えば、エンベロープレベルの最大
値を0dBとしたとき、−70dB程度とすればよいで
あろう。また、トランケートレベルに重み付けをするの
は、音量が同じでも音高等によって人間の聴覚に与える
影響が異なることに対応している。例えば、音量が同じ
でも高音は低音よりも目立ったり、あるいは最低音は音
楽的に重要であったりする。トランケートレベルに重み
付けをすることにより、人間の耳に、より自然に聞こえ
るように消音することができる。The truncate level may be a constant level regardless of tone color and tone pitch, or may be weighted for each tone color or tone pitch. When the truncation level is set to a constant level, for example, when the maximum envelope level value is 0 dB, it may be about −70 dB. In addition, weighting the truncate level corresponds to the fact that even if the volume is the same, the influence on human hearing depends on the pitch and the like. For example, trebles may be more prominent than basses, or lowest notes may be musically important, even at the same volume. By weighting the truncation level, it is possible to mute the human ear so that it sounds more natural.
【0049】上記実施例では、ノートイベント処理にお
いて現在のエンベロープレベルとトランケートレベルと
を比較する場合を説明したが、この比較処理をリアルタ
イム制御に適用してもよい。ここで、リアルタイム制御
とは、押離鍵のイベント以外のアフタタッチ、ピッチベ
ンドホイル等により楽音にリアルタイムに変化を与える
制御をいう。In the above embodiment, the case where the current envelope level and the truncated level are compared in the note event process has been described, but this comparison process may be applied to real time control. Here, the real-time control refers to control in which a musical sound is changed in real time by an after-touch, a pitch bend wheel, or the like other than a key press / release event.
【0050】次に、エンベロープレベルとトランケート
レベルとの比較処理をリアルタイム制御に適用した実施
例について説明する。まず、図7を参照して楽音合成回
路19の構成について説明する。Next, an embodiment in which the comparison processing between the envelope level and the truncate level is applied to the real-time control will be described. First, the configuration of the tone synthesis circuit 19 will be described with reference to FIG.
【0051】図7(A)は、楽音合成回路19のブロッ
ク図を示す。発音情報供給回路31、エンベロープデー
タRAM35及びフィルタエンベロープデータRAM3
8がインタフェース回路30に接続されている。インタ
フェース回路30は図1に示すデータバス18に接続さ
れ、CPU15とのデータの送受信を行う。FIG. 7A shows a block diagram of the tone synthesis circuit 19. Pronunciation information supply circuit 31, envelope data RAM 35, and filter envelope data RAM 3
8 is connected to the interface circuit 30. The interface circuit 30 is connected to the data bus 18 shown in FIG. 1 and transmits / receives data to / from the CPU 15.
【0052】発音情報供給回路31にインタフェース回
路30を介してCPU15から発音情報が入力される。
発音情報供給回路31は、楽音合成回路19内の各ブロ
ックに発音情報を供給する。The pronunciation information is input from the CPU 15 to the pronunciation information supply circuit 31 via the interface circuit 30.
The pronunciation information supply circuit 31 supplies pronunciation information to each block in the tone synthesis circuit 19.
【0053】波形合成回路32は、発音情報供給回路3
1から供給された発音情報に基づいて該当の音高、音色
の波形を合成する。合成された波形はエンベロープ回路
33に入力される。The waveform synthesizing circuit 32 is used by the sound information supplying circuit 3
Based on the pronunciation information supplied from No. 1, the waveform of the corresponding pitch and tone color is synthesized. The combined waveform is input to the envelope circuit 33.
【0054】エンベロープ回路33は波形合成回路32
から入力された波形に振幅エンベロープを付与する。付
与すべき振幅エンベロープは、押鍵時にエンベロープデ
ータRAM35に格納される。具体的には、振幅エンベ
ロープの初期値、目標値及び補間レートが格納される。The envelope circuit 33 is a waveform synthesis circuit 32.
An amplitude envelope is added to the waveform input from. The amplitude envelope to be given is stored in the envelope data RAM 35 when the key is pressed. Specifically, the initial value of the amplitude envelope, the target value, and the interpolation rate are stored.
【0055】振幅エンベロープ形成回路34は、押鍵時
に初期値を現在値とし、現在値から目標値に向かって指
定された補間レートで補間処理を行い、エンベロープの
現在値を一定周期で更新する。この補間処理により、楽
音のアタック、ディケイ、サステイン、リリース等のエ
ンベロープ波形が生成される。振幅エンベロープの現在
値はエンベロープ回路33に供給され、エンベロープ回
路33はこの現在値に基づいて波形合成回路32から入
力された波形に振幅エンベロープを付与する。振幅エン
ベロープが付与された波形はフィルタ回路36に供給さ
れる。The amplitude envelope forming circuit 34 uses the initial value as the current value when a key is pressed, performs interpolation processing from the current value toward the target value at the specified interpolation rate, and updates the current value of the envelope in a constant cycle. By this interpolation processing, envelope waveforms such as attack, decay, sustain and release of musical tones are generated. The current value of the amplitude envelope is supplied to the envelope circuit 33, and the envelope circuit 33 adds the amplitude envelope to the waveform input from the waveform synthesis circuit 32 based on this current value. The waveform provided with the amplitude envelope is supplied to the filter circuit 36.
【0056】フィルタ回路36は、フィルタエンベロー
プ形成回路37から与えられるカットオフ周波数に基づ
いて、エンベロープ回路33から入力された波形をフィ
ルタリングする。フィルタ回路32は例えばディジタル
ローパスフィルタである。The filter circuit 36 filters the waveform input from the envelope circuit 33 based on the cutoff frequency given from the filter envelope forming circuit 37. The filter circuit 32 is, for example, a digital low pass filter.
【0057】フィルタエンベロープデータRAM38に
は、押鍵時にカットオフ中心周波数、及びカットオフ周
波数乗算係数の初期値、目標値及び補間レートが格納さ
れる。フィルタエンベロープ形成回路37は、押鍵時に
初期値を現在値とし、現在値から目標値に向かって指定
された補間レートで補間処理を行い、乗算係数の現在値
を一定周期で更新する。さらに、カットオフ中心周波数
に乗算係数の現在値を乗じて現時点のカットオフ周波数
を求め、フィルタ回路36に供給する。The filter envelope data RAM 38 stores the cutoff center frequency, the initial value of the cutoff frequency multiplication coefficient, the target value, and the interpolation rate when the key is pressed. The filter envelope forming circuit 37 sets the initial value as the current value when the key is pressed, performs interpolation processing from the current value toward the target value at the specified interpolation rate, and updates the current value of the multiplication coefficient at a constant cycle. Further, the cutoff center frequency is multiplied by the current value of the multiplication coefficient to obtain the current cutoff frequency, and the cutoff frequency is supplied to the filter circuit 36.
【0058】フィルタ回路36は、フィルタエンベロー
プ形成回路37により指定されたカットオフ周波数に基
づいて、エンベロープ回路33から入力された波形をフ
ィルタリングする。フィルタリングされた波形は図1の
サウンドシステム20に供給される。The filter circuit 36 filters the waveform input from the envelope circuit 33 based on the cutoff frequency designated by the filter envelope forming circuit 37. The filtered waveform is provided to the sound system 20 of FIG.
【0059】例えば、ピアノの打鍵当初の音はノイズ成
分を多く含んでいるが、時間とともに高周波成分が速く
減衰し最終的には基本周波数成分及び低次の高周波成分
のみが残る。この音を電子的に合成するには、時間とと
もにローパスフィルタのカットオフ周波数を低くすれば
よい。For example, the sound at the beginning of the keystroke of a piano contains a lot of noise components, but the high frequency components decay quickly with time, and finally only the fundamental frequency components and low-order high frequency components remain. To electronically synthesize this sound, the cutoff frequency of the low-pass filter may be lowered with time.
【0060】図7(B)は、フィルタエンベロープの一
例を示す。横軸は時間を表し、縦軸はカットオフ周波数
の標準値からの差分を表す。図7(B)に折れ線で示す
フィルタエンベロープ波形に対応する目標値と補間レー
トに相当する傾きをグラフ中の表に示している。乗算係
数の初期値は1であり、カットオフ周波数はカットオフ
中心周波数と等しい。当初の目標値は1であり現在値と
等しいため、乗算係数は1を保持する。現在値と目標値
が等しいとき、「傾き」で指定された数値は現在値を保
持する時間と解釈する。FIG. 7B shows an example of the filter envelope. The horizontal axis represents time, and the vertical axis represents the difference of the cutoff frequency from the standard value. The table in the graph shows the target value corresponding to the filter envelope waveform shown by the polygonal line in FIG. 7B and the slope corresponding to the interpolation rate. The initial value of the multiplication coefficient is 1, and the cutoff frequency is equal to the cutoff center frequency. Since the initial target value is 1 and is equal to the current value, the multiplication coefficient holds 1. When the current value and the target value are equal, the numerical value specified by "slope" is interpreted as the time to hold the current value.
【0061】現在値を保持する時間が経過すると、乗算
係数は目標値2に向かって傾き1で増加する。目標値2
に到達すると、目標値0.5に向かって傾き−1.5で
減少する。以降、この動作を繰り返し、フィルタエンベ
ロープ波形を生成する。「傾き」に「ホールド」が指定
されている場合は、発音終了まで現在値を保持する。こ
のフィルタエンベロープ波形は、音色ごとに設定されて
いる。When the time for holding the current value has elapsed, the multiplication coefficient increases with a slope of 1 toward the target value 2. Target value 2
When reaching, the slope decreases toward the target value 0.5 at -1.5. After that, this operation is repeated to generate the filter envelope waveform. When "hold" is specified for "tilt", the current value is held until the end of sounding. This filter envelope waveform is set for each timbre.
【0062】電子楽器の場合には、鍵のアフタタッチ、
ピッチベンドホイール等の制御によってローパスフィル
タのカットオフ周波数を変動させる手法も採られる。従
って、発音後にフィルタエンベロープの波形を変更する
リアルタイム制御を行う必要が生ずる。リアルタイム制
御では、予め設定されているフィルタエンベロープ波形
をリアルタイムに変化させる。In the case of an electronic musical instrument, a key aftertouch,
A method of changing the cutoff frequency of the low pass filter by controlling the pitch bend wheel or the like is also adopted. Therefore, it becomes necessary to perform real-time control in which the waveform of the filter envelope is changed after sounding. In real-time control, a preset filter envelope waveform is changed in real time.
【0063】次に、図8、図9を参照してリアルタイム
制御について説明する。リアルタイム制御パラメータ
は、例えばCPU15に設けられたA/D入力端子に入
力される。例えば、演奏入力部11の全鍵共通のアフタ
タッチセンサが備えられており、アフタタッチセンサの
出力信号がCPU15のA/D入力端子に入力される。
またCPU15に複数のA/D入力端子を準備し、ピッ
チベントホイール等の出力信号を入力してもよい。Next, the real-time control will be described with reference to FIGS. The real-time control parameter is input to, for example, an A / D input terminal provided in the CPU 15. For example, an after touch sensor common to all keys of the performance input unit 11 is provided, and an output signal of the after touch sensor is input to the A / D input terminal of the CPU 15.
Alternatively, the CPU 15 may be provided with a plurality of A / D input terminals to input the output signal of the pitch bent wheel or the like.
【0064】図8は、リアルタイム制御のフローチャー
トを示す。リアルタイム制御は、10ms周期の割り込
みにより起動される。リアルタイム制御が起動される
と、CPU15はステップSE1に進み、A/D入力端
子に入力されている信号を読み出し、リアルタイム制御
パラメータを得る。FIG. 8 shows a flowchart of real-time control. The real-time control is activated by an interrupt having a cycle of 10 ms. When the real-time control is activated, the CPU 15 proceeds to step SE1 to read the signal input to the A / D input terminal and obtain the real-time control parameter.
【0065】ステップSE2では、変数iに0を代入
し、ステップSE3〜SE7までの一連の処理を実行す
る。ステップSE8で変数iに1を加え、ステップSE
9で変数iと発音チャンネル数とを比較する。変数iが
発音チャンネル数と等しくない場合は、ステップSE3
に戻る。変数iが発音チャンネル数と等しい場合は、リ
アルタイム制御を終了し割り込み前の処理を再開する。
すなわち発音チャンネル数分ステップSE3〜SE7の
処理を繰り返し実行する。At step SE2, 0 is substituted for the variable i, and a series of processing from step SE3 to SE7 is executed. In step SE8, 1 is added to the variable i and step SE
In step 9, the variable i is compared with the number of sound generation channels. If the variable i is not equal to the number of sound generation channels, step SE3
Return to When the variable i is equal to the number of sound generation channels, the real-time control is ended and the process before interruption is restarted.
That is, the processes of steps SE3 to SE7 are repeatedly executed for the number of sound generation channels.
【0066】ステップSE3では、図6に示すキーアサ
インテーブルのi番目の情報要素に対応する発音チャン
ネル番号を得る。ステップSE4では、ステップSE3
で得られた発音チャンネルのエンベロープレベルを得
る。ステップSE5では、ステップSE4で得られたエ
ンベロープレベルと所定のリアルタイム制御対象レベル
とを比較する。ステップSE3〜SE5の処理は、図5
に示すノートイベント処理のステップSD4〜SD6と
同様の処理である。In step SE3, the tone generation channel number corresponding to the i-th information element of the key assignment table shown in FIG. 6 is obtained. In step SE4, step SE3
Obtain the envelope level of the sounding channel obtained in. In step SE5, the envelope level obtained in step SE4 is compared with a predetermined real-time control target level. The processing of steps SE3 to SE5 is shown in FIG.
This is the same processing as steps SD4 to SD6 of the note event processing shown in FIG.
【0067】エンベロープレベルがリアルタイム制御対
象レベルよりも大きい場合は、ステップSE6に進みフ
ィルタ制御を実行する。エンベロープレベルがリアルタ
イム制御対象レベル以下の場合は、フィルタ制御を行わ
ずステップSE8に進む。すなわち、エンベロープレベ
ルがリアルタイム制御対象レベルよりも大きい楽音信号
を発生している発音チャンネルについてのみフィルタ制
御を行い、その他の発音チャンネルに対してはフィルタ
制御を行わない。フィルタ制御については、後に図9を
参照して詳述する。If the envelope level is higher than the real-time control target level, the process proceeds to step SE6 to execute the filter control. If the envelope level is equal to or lower than the real-time control target level, the filter control is not performed and the process proceeds to step SE8. That is, the filter control is performed only for the tone generation channels that generate the tone signal whose envelope level is higher than the real-time control target level, and the filter control is not performed for the other tone generation channels. The filter control will be described later in detail with reference to FIG.
【0068】これは、既に音量が減衰し人間の耳に聞こ
えなくなっている楽音に対しては、フィルタ制御しても
その効果が少ないという考えに基づいている。このよう
に、実質的にフィルタ制御する必要のない発音チャンネ
ルに対してフィルタ制御を行わなくすることにより、楽
音の不自然さを失うことなくリアルタイム制御のステッ
プ数を削減することができる。This is based on the idea that the filter control has little effect on the musical sound whose volume is already attenuated and cannot be heard by the human ear. As described above, by eliminating the filter control for the tone generation channel that does not substantially need the filter control, it is possible to reduce the number of steps of the real-time control without losing the unnaturalness of the musical sound.
【0069】ノートイベント処理では、図5のステップ
SD6に示すように、トランケートレベル以下のエンベ
ロープレベルを有する発音チャンネルを見つけた時点で
キーアサインテーブルの検索を終了する。これに対し、
リアルタイム制御では、毎周期ごとにキーアサインテー
ブルを全て検索する。このように、リアルタイム制御で
はキーアサインテーブル検索のステップ数が多くなる
が、以下の理由により許容される範囲である。In the note event process, as shown in step SD6 of FIG. 5, when the tone generation channel having the envelope level equal to or lower than the truncation level is found, the search of the key assignment table is ended. In contrast,
In real-time control, all key assignment tables are searched every cycle. As described above, the number of steps of the key assignment table search increases in the real-time control, but it is within the allowable range for the following reasons.
【0070】すなわち、押鍵を検出するとその鍵に対応
する楽音を直ちに発音する必要がある。発音が遅れると
不自然さが目立つ。リアルタイム処理の場合は、アフタ
タッチあるいはピッチベンド等に対応する処理であるた
め、応答が少し遅れても不自然さは目立たない。このよ
うに、リアルタイム処理はノートイベント処理ほど実時
間性が厳しくない。このため、リアルタイム制御のステ
ップ数がすこし多くなっても許容される。なお、上記理
由からノートイベント処理実行中は、割り込み禁止にし
ておき、リアルタイム制御よりもノートイベント処理を
優先して実行することが好ましい。That is, when a key depression is detected, it is necessary to immediately generate a tone corresponding to the key. If the pronunciation is delayed, unnaturalness becomes noticeable. In the case of real-time processing, since it is processing corresponding to aftertouch or pitch bend, even if the response is slightly delayed, unnaturalness is not noticeable. Thus, real-time processing is not as strict as real-time processing as note event processing. Therefore, even if the number of steps in real-time control increases, it is acceptable. For the above reason, it is preferable that the interrupt is disabled during the note event process and the note event process is executed with priority over the real-time control.
【0071】次に、図9を参照してフィルタ制御につい
て説明する。図9は、図7(A)の楽音合成回路のフィ
ルタ制御フローを示す。CPU15の処理が図8のステ
ップSE6に進むと、図9のフィルタ制御が起動され
る。Next, the filter control will be described with reference to FIG. FIG. 9 shows a filter control flow of the musical sound synthesis circuit of FIG. When the processing of the CPU 15 proceeds to step SE6 of FIG. 8, the filter control of FIG. 9 is activated.
【0072】ステップSF1では、処理対象の発音チャ
ンネルのフィルタエンベロープの現在値と目標値を図7
(A)に示すエンベロープデータRAM34から読みだ
す。ステップSF2では、図8のステップSE1でリア
ルタイム制御バッファから読みだした制御パラメータに
基づいて、フィルタエンベロープの現在値と目標値を増
減する。In step SF1, the current value and target value of the filter envelope of the tone generation channel to be processed are shown in FIG.
It is read from the envelope data RAM 34 shown in (A). In step SF2, the current value and the target value of the filter envelope are increased or decreased based on the control parameter read from the real-time control buffer in step SE1 of FIG.
【0073】ステップSF3では、増減したフィルタエ
ンベロープの現在値と目標値を、エンベロープデータR
AM34に書き込む。エンベロープデータRAM34の
現在値と目標値が書き換えられると、フィルタエンベロ
ープ形成回路33は、新たな現在値から新たな目標値に
向かって所定の補間レートで補間処理を行う。これによ
り、予め設定されているフィルタエンベロープ波形と異
なる波形を生成することができる。フィルタ回路32の
カットオフ周波数が変動する。At step SF3, the present value and the target value of the increased / decreased filter envelope are set to the envelope data R
Write to AM34. When the current value and the target value in the envelope data RAM 34 are rewritten, the filter envelope forming circuit 33 performs interpolation processing from the new current value toward the new target value at a predetermined interpolation rate. This makes it possible to generate a waveform different from the preset filter envelope waveform. The cutoff frequency of the filter circuit 32 changes.
【0074】なお、図8、図9では、フィルタエンベロ
ープ波形についてリアルタイム制御する場合を説明した
が、振幅エンベロープ波形をリアルタイム制御してもよ
い。以上実施例に沿って本発明を説明したが、本発明は
これらに制限されるものではない。例えば、種々の変
更、改良、組み合わせ等が可能なことは当業者に自明で
あろう。Although the case where the filter envelope waveform is controlled in real time has been described with reference to FIGS. 8 and 9, the amplitude envelope waveform may be controlled in real time. Although the present invention has been described above with reference to the embodiments, the present invention is not limited thereto. For example, it will be apparent to those skilled in the art that various modifications, improvements, combinations, and the like can be made.
【0075】[0075]
【発明の効果】以上説明したように、本発明によれば、
比較的少ない処理ステップ数でトランケートすべき発音
チャンネルを決定することができる。人間の耳に聞こえ
ない程度にエンベロープレベルが低くなっている発音チ
ャンネルをトランケートすることができるため、不自然
さを与えることなく消音することが可能になる。As described above, according to the present invention,
It is possible to determine the tone generation channel to be truncated with a relatively small number of processing steps. Since it is possible to truncate a sounding channel whose envelope level is too low to be heard by the human ear, it is possible to mute the sound without imparting unnaturalness.
【図1】 本発明の実施例による電子楽器のブロック図
である。FIG. 1 is a block diagram of an electronic musical instrument according to an embodiment of the present invention.
【図2】 本発明の実施例による電子楽器のCPUのメ
インルーチンを示すフローチャートである。FIG. 2 is a flowchart showing a main routine of the CPU of the electronic musical instrument according to the embodiment of the present invention.
【図3】 鍵処理のフローチャートである。FIG. 3 is a flowchart of key processing.
【図4】 MIDI処理のフローチャートである。FIG. 4 is a flowchart of MIDI processing.
【図5】 ノートイベント処理のフローチャートであ
る。FIG. 5 is a flowchart of note event processing.
【図6】 押鍵時及び離鍵時のノートイベント処理にお
けるキーアサインテーブルの変化を示す図である。FIG. 6 is a diagram showing a change of a key assignment table in a note event process at the time of key depression and key release.
【図7】 図1の楽音合成回路のブロック図、及びフィ
ルタエンベロープの乗算係数の変化の一例を示すグラフ
である。7 is a block diagram of the tone synthesis circuit of FIG. 1 and a graph showing an example of changes in multiplication coefficients of a filter envelope.
【図8】 リアルタイム制御のフローチャートである。FIG. 8 is a flowchart of real-time control.
【図9】 フィルタ制御のフローチャートである。FIG. 9 is a flowchart of filter control.
【図10】 従来例によるトランケート処理を説明する
ための、発音チャンネルごとのエンベロープレベルを示
すグラフである。FIG. 10 is a graph showing the envelope level for each sound generation channel for explaining the truncation process according to the conventional example.
11 演奏入力部、 12 表示盤、 13 パネルス
イッチ、 14 MIDIインタフェース、 15 C
PU、 16 ROM、 17 RAM、 18バス、
19 楽音合成回路、 20 サウンドシステム、
21 スピーカ、 30 インタフェース回路、 31
発音情報供給回路、 32 波形合成回路、 33
エンベロープ回路、 34 振幅エンベロープ形成回
路、 35振幅エンベロープデータRAM、 36 フ
ィルタ回路、 37 フィルタエンベロープ形成回路、
38 フィルタエンベロープデータRAM11 performance input section, 12 display panel, 13 panel switch, 14 MIDI interface, 15 C
PU, 16 ROM, 17 RAM, 18 bus,
19 tone synthesis circuit, 20 sound system,
21 speaker, 30 interface circuit, 31
Pronunciation information supply circuit, 32 Waveform synthesis circuit, 33
Envelope circuit, 34 amplitude envelope forming circuit, 35 amplitude envelope data RAM, 36 filter circuit, 37 filter envelope forming circuit,
38 Filter envelope data RAM
Claims (1)
状態とオフ状態のいずれかの状態をとり得るノートコー
ド、及び該ノートコードに対して発音開始が指示された
とき「ノートオン」となり、発音終了が指示されたとき
「ノートオフ」となるオンオフ種別を含む発音処理要求
を発生する演奏入力手段と、 前記ノートコードが動的に割り当てられ、割り当てられ
たノートコード及びオンオフ種別に応じて、時間的にエ
ンベロープレベルが変化する楽音波形を生成する複数の
発音チャンネルを有する楽音合成手段と、 前記複数の発音チャンネルと、各発音チャンネルに割り
当てられているノートコードとを対応付けて、ノートコ
ードがオン状態になった順番及びオフ状態になった順番
が分かるように記憶する発音割当情報記憶手段と、 前記演奏入力手段から発音処理要求があったことを検出
する発音処理要求検出手段と、 前記発音処理要求検出手段が発音処理要求を検出したと
き、前記オンオフ種別が「ノートオン」であり、前記発
音チャンネルに空きチャンネルがない場合には、その時
点で予め決められているレベルよりも小さいエンベロー
プレベルを有する発音チャンネルが検出されるまで、前
記発音割当情報記憶手段を所定の順番で検索し、検出さ
れた発音チャンネルの楽音波形の生成を停止させると共
に、発音処理要求のあったノートコードのオンオフ種別
が「ノートオン」に対応する楽音波形を新たに生成さ
せ、前記発音割当情報記憶手段に、発音処理要求のあっ
たノートコードがオン状態になった順番が分かるよう
に、検出された発音チャンネルと発音処理要求のあった
ノートコードとを新たに対応付けて記憶させ、かつ、前
記オンオフ種別が「ノートオフ」である場合には、発音
処理要求のあったノートコードに割り当てられている発
音チャンネルに対してオンオフ種別が「ノートオフ」に
対応する楽音波形を生成させ、前記発音割当情報記憶手
段に、発音処理要求のあったノートコードがオフ状態に
なったことをオフ状態になった順番が分かるように記憶
させる制御手段であって、前記所定の順番は、その時点
でオフ状態のノートコード、次にオン状態のノートコー
ドの順番であり、オフ状態のノートコードの中ではオフ
状態になった順番、オン状態のノートコードの中ではオ
ン状態になった順番である前記制御手段とを有する電子
楽器。1. A note chord which indicates a pitch of a musical tone to be sounded and can be in either an on state or an off state, and "note on" when a tone generation start is instructed to the note code. And a performance input means for generating a sounding processing request including an on / off type that becomes “note off” when the end of sounding is instructed, and the note code is dynamically assigned, and the note code and the on / off type are assigned. , A musical tone synthesizing means having a plurality of sound generation channels for generating a musical tone waveform whose envelope level changes with time, the plurality of sound generation channels and the note codes assigned to the respective sound generation channels are associated with each other to generate notes. Pronunciation assignment information storage means for storing so that the order in which the chords are turned on and the order in which the chords are turned off are stored, A sounding processing request detecting means for detecting that there is a sounding processing request from the performance input means; and when the sounding processing request detecting means detects a sounding processing request, the on / off type is “note on”, and the sounding channel If there is no vacant channel, the sounding assignment information storage means is searched in a predetermined order and detected until a sounding channel having an envelope level smaller than a predetermined level is detected at that time. The generation of the tone waveform of the tone generation channel is stopped, a tone waveform corresponding to the note code on / off type of "note on" is newly generated, and the tone generation request is stored in the tone assignment information storage means. There is a detected sound channel and sound processing request so that you can see the order in which the note codes that were If a new note code is stored in association with the note code, and the on / off type is “note off”, the on / off type is set to the tone generation channel assigned to the note code for which the tone generation processing request is made. Control for generating a musical tone waveform corresponding to "note-off" and storing in the pronunciation assignment information storage means that the note code requested to be produced is in the off-state so that the order of the off-state can be known. The predetermined order is the order of the note code in the off state at that time, then the note code in the on state, and in the note code in the off state, the order in which the note is in the off state and the note code in the on state. An electronic musical instrument having the control means, which is the order in which the note code is turned on.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6324456A JP2853588B2 (en) | 1994-12-27 | 1994-12-27 | Electronic musical instrument |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP6324456A JP2853588B2 (en) | 1994-12-27 | 1994-12-27 | Electronic musical instrument |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH08179767A true JPH08179767A (en) | 1996-07-12 |
| JP2853588B2 JP2853588B2 (en) | 1999-02-03 |
Family
ID=18166018
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP6324456A Expired - Fee Related JP2853588B2 (en) | 1994-12-27 | 1994-12-27 | Electronic musical instrument |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2853588B2 (en) |
-
1994
- 1994-12-27 JP JP6324456A patent/JP2853588B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2853588B2 (en) | 1999-02-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US4909121A (en) | Tone signal generation device with reasonance tone effect | |
| JPH09127941A (en) | Electronic musical instrument | |
| JP2605885B2 (en) | Tone generator | |
| JPH09330079A (en) | Musical tone signal generating apparatus and musical tone signal generating method | |
| JP2853588B2 (en) | Electronic musical instrument | |
| JPH05323967A (en) | Musical sound generator | |
| JP2698942B2 (en) | Tone generator | |
| JP2834347B2 (en) | Stereo device and stereo method | |
| JP2961867B2 (en) | Music signal generator | |
| JPH096343A (en) | Musical tone signal generator | |
| JP2943279B2 (en) | Electronic musical instrument | |
| JPH08137469A (en) | Frequency characteristic control device for musical tone signals | |
| JP2953217B2 (en) | Electronic musical instrument | |
| JP2570945B2 (en) | Tone generator | |
| JPH09292880A (en) | Electronic keyboard musical instrument | |
| JP3277662B2 (en) | Tone generator | |
| JPH05108068A (en) | Phrase information input and output device | |
| JP2694788B2 (en) | Electronic musical instrument | |
| JPH07104753A (en) | Electronic musical instrument automatic tuning device | |
| JP3090383B2 (en) | Tone assigning device and tone generating device | |
| JP2814479B2 (en) | Electronic musical instrument | |
| JP3329030B2 (en) | Music signal generator | |
| JPH0498291A (en) | Electronic musical instrument | |
| JPH07181973A (en) | Automatic musical instrument accompaniment device | |
| JPH06195077A (en) | Musical tone generating device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 19981020 |
|
| 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: 20071120 Year of fee payment: 9 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081120 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081120 Year of fee payment: 10 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091120 Year of fee payment: 11 |
|
| LAPS | Cancellation because of no payment of annual fees |