JPS6291996A - Keying allotter for electronic musical apparatus - Google Patents

Keying allotter for electronic musical apparatus

Info

Publication number
JPS6291996A
JPS6291996A JP61108986A JP10898686A JPS6291996A JP S6291996 A JPS6291996 A JP S6291996A JP 61108986 A JP61108986 A JP 61108986A JP 10898686 A JP10898686 A JP 10898686A JP S6291996 A JPS6291996 A JP S6291996A
Authority
JP
Japan
Prior art keywords
key
data
assigned
channel
musical
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
Application number
JP61108986A
Other languages
Japanese (ja)
Other versions
JPH0335679B2 (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.)
Nippon Gakki Co Ltd
Original Assignee
Nippon Gakki Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Gakki Co Ltd filed Critical Nippon Gakki Co Ltd
Priority to JP61108986A priority Critical patent/JPS6291996A/en
Publication of JPS6291996A publication Critical patent/JPS6291996A/en
Publication of JPH0335679B2 publication Critical patent/JPH0335679B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、鍵盤にて押された鍵を鍵の数より少ない複
数の楽音発生チャンネルのいずれかに割当てる電子楽器
の押鍵割当て装置に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a key press assignment device for an electronic musical instrument that assigns keys pressed on a keyboard to one of a plurality of tone generation channels smaller than the number of keys.

〔従来技術〕[Prior art]

近年、電子楽器の分野では、鍵の数より少ない複数の楽
音発生チャンネルからなる楽音発生手段を用意しておき
、鍵盤にて新たな鍵が押されると、該鍵を複数の楽音発
生チャンネルのいずれかに割当て、該割当てられた楽音
発生チャンネルにて新たに押された鍵に関する楽音を発
生するようにした電子楽器が一般化してきている。そし
て、このような割当てを行なう割当て装置は、例えば特
開昭52−25613号公報に示されるように、全ての
楽音発生チャンネルの中から発生楽音の音量が最小であ
る楽音発生チャンネルを探し出し、該チャンネルに新た
に押された鍵を割当て、または例えば特公昭59−22
238号公報に示されるように、全ての楽音発生チャン
ネルの中から最も古く離鍵された鍵が割当・てられてい
る楽音発生チャンネルを探し出し、該チャンネルに新た
に押された鍵を割当てるようにして、発音を終了し又は
最も早く発音を終了する楽音発生チャンネルにて新たに
押された鍵に関する楽音が発生されるようにしている。
In recent years, in the field of electronic musical instruments, musical sound generation means consisting of a plurality of musical sound generation channels smaller than the number of keys have been prepared, and when a new key is pressed on the keyboard, the key is selected from one of the plurality of musical sound generation channels. Electronic musical instruments have become commonplace in which a musical tone is assigned to a newly pressed key, and a musical tone corresponding to a newly pressed key is generated using the assigned musical tone generating channel. As shown in, for example, Japanese Patent Application Laid-Open No. 52-25613, an allocation device that performs such allocation searches out the musical tone generating channel whose generated musical tone has the minimum volume from among all the musical tone generating channels, and assigns the musical tone to the corresponding musical tone. Assign the newly pressed key to the channel, or e.g.
As shown in Publication No. 238, the musical tone generating channel to which the oldest released key is assigned is found from among all musical tone generating channels, and the newly pressed key is assigned to that channel. Then, the musical tone associated with the newly pressed key is generated in the musical tone generation channel that finishes generating the sound or ends the generation earliest.

また、この種の割当て装置においては、特公昭52−4
6088号公報に示されるように、上記割当て条件の他
に、ある鍵に対応する楽音が減衰発音中であって再びそ
の鍵が押された場合、該減衰発音中の楽音は消され、再
押鍵された鍵が該減衰発音中であった楽音発生チャンネ
ルに再び割当てられるようにした同一チャンネルへの再
割当て処理を行なうようにしたものも知られている。そ
して、トリル演奏等のように同一鍵が短時間内に多数回
繰返し押された場合にも、楽音発生チャンネルの多くが
該鍵に専有されて、他の鍵の押鍵に伴う楽音の発生に支
障を来たさないようにしている。
In addition, in this type of allocation device,
As shown in Publication No. 6088, in addition to the above assignment conditions, if a musical tone corresponding to a certain key is in the process of attenuating sound and that key is pressed again, the musical tone in the process of being attenuated is erased and the key is pressed again. There is also known a system in which a key is re-assigned to the same channel, in which the key is re-assigned to the tone generating channel that was producing the attenuated sound. Even when the same key is repeatedly pressed many times within a short period of time, such as when playing a trill, many of the musical sound generation channels are dedicated to that key, and the musical sound generated when other keys are pressed. I try not to cause any trouble.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかるに、同一チャンネルへの再割当て処理を行う上記
従来の割当て装置を採用した電子楽器にあっては、上記
のように楽音発生チャンネルの多くが同一鍵のために専
有されてしまうことはないが、同一鍵に関する楽音は□
必ず単一の楽音発生チャンネルから発生されるので、例
えばピアノ等の自然楽器におけるトリル演奏等のように
短時間内に同一鍵が繰返し押鍵された場合に生じる効果
、すなわち発音源である弦は後の押鍵に関する楽音を発
生しているにもかかわらず、w板等の共鳴装置が前の押
鍵に関する楽音を発生するような効果をシミュレートす
ることができないという問題がある。一方、同一チャン
ネルへの再割当て処理を行わない一般的な上記従来の割
当て装置を採用した電子楽器にあっては、トリル演奏等
のように同一鍵が短時間内に多数回繰返し押された場合
、上述したように多くの楽音発生チャンネルが該同一鍵
に専有されて、他の鍵の押鍵に伴う楽音の発生に支障を
来すという問題がある。
However, in electronic musical instruments that employ the above-mentioned conventional allocation device that performs reallocation processing to the same channel, many of the tone generation channels are not monopolized for the same key as described above. Musical tones related to the same key are □
Since the musical sound is always generated from a single musical sound generation channel, the effect that occurs when the same key is pressed repeatedly within a short period of time, such as when playing a trill on a natural instrument such as a piano, in other words, the string that is the sound source is There is a problem in that the resonator, such as the w-board, cannot simulate the effect of generating a musical tone associated with a previous key press, even though it generates a musical tone associated with a later key press. On the other hand, for electronic musical instruments that employ the general conventional allocation device mentioned above that does not perform reassignment processing to the same channel, when the same key is repeatedly pressed many times within a short period of time, such as when playing a trill, etc. As mentioned above, there is a problem in that many musical tone generation channels are exclusively used for the same key, which interferes with the generation of musical tones when other keys are pressed.

この発明は、上記両問題点に鑑み案出されたもので、そ
の目的とするところはピアノ等の自然楽器におけるトリ
ル演奏に伴う上記効果をよりよくシミュレートできるよ
うにするとともに、前記トリル演奏がされた場合でも他
の鍵の押鍵に伴う楽音の発生に支障を来すことがないよ
うにした電子楽器の押鍵割当て装置を提供することにあ
る。
This invention has been devised in view of both of the above-mentioned problems, and its purpose is to better simulate the above-mentioned effects associated with trill performance on a natural musical instrument such as a piano, and to improve the performance of the trill performance. To provide a key press assignment device for an electronic musical instrument, which does not interfere with the generation of musical tones accompanying the press of other keys even when the keys are pressed.

〔問題点を解決するための手段〕[Means for solving problems]

かかる問題の解決にあたり、この発明の構成上の特徴は
、第1図に示すように、鍵盤1にて押された鍵を鍵の数
より少ない複数の楽音発生チャンネル2のいずれかに割
当てる電子楽器の押鍵割当て装置3において、前記鍵盤
lの鍵を表すとともに前記楽音発生チャンネル2にて発
生されるべき楽音の音高を指定するキー情報を各々前記
各楽音発生チャンネル2に対応して記憶する複数の記憶
チャンネルからなるキー情報記憶手段3aと、前記鍵5
111にて新たに押された鍵を表すキー情報と同一キー
情報を記憶している前記記憶チャンネルの数を検出する
チャンネル数検出手段3bと、前記検出した記憶チャン
ネルの数が2以上かつ前記楽音発生チャンネル2の数未
満の所定整数値より小さいとき前記新たに押された鍵を
表すキー情報を前記記憶チャンネルのうちのいずれかに
記憶させることにより前記新たに押された鍵の割当てを
制御し、かつ前記検出した記憶チャンネルの数が前記所
定整数値以上のとき前記新たに押された鍵を表すキー情
報を該キー情報と同一キー情報を記憶している前記記憶
チャンネルのうちのいずれかに記憶させることにより前
記新たに押された鍵の割当てを制御する割当て制御手段
と30とを備えたことにある。
In order to solve this problem, the structural feature of the present invention is to provide an electronic musical instrument in which a key pressed on a keyboard 1 is assigned to one of a plurality of musical sound generation channels 2 smaller than the number of keys, as shown in FIG. In the key press assignment device 3, key information representing the key of the keyboard l and specifying the pitch of the musical tone to be generated in the musical tone generating channel 2 is stored in correspondence with each of the musical tone generating channels 2. Key information storage means 3a consisting of a plurality of storage channels, and the key 5
channel number detection means 3b for detecting the number of the storage channels storing the same key information as the key information representing the newly pressed key in step 111; Controlling the assignment of the newly pressed key by storing key information representing the newly pressed key in one of the storage channels when the number is less than a predetermined integer value less than the number of generation channels 2; , and when the number of the detected storage channels is greater than or equal to the predetermined integer value, key information representing the newly pressed key is stored in one of the storage channels storing the same key information as the key information. The present invention further includes an allocation control means 30 for controlling the allocation of the newly pressed key by storing the key.

〔発明の作用〕[Action of the invention]

上記のように構成したこの発明においては、鍵盤1にて
新たな鍵が押されると、チャンネル数検出手段3bは、
この新たに押された鍵を表すキー情報と同一キー情報を
記憶しているキー情報記憶手段3a内の記憶チャンネル
の数を検出する。この検出した記憶チャンネルの数が所
定整数値より小さければ、割当て制御手段3Cは前記新
たに押された鍵を表すキー情報をキー情報記憶手段3a
内の全ての記憶チャンネルのいずれかに記憶させること
により、前記新たに押された鍵の楽音発生チャンネル2
への割当てを制御する。そして、この所定整数値は2以
上の値に設定されているので、同一鍵が短時間内に繰返
し押鍵された場合には、該同一鍵は前記所定整数値に等
しい複数の楽音発生チャンネル2に同時に割当てられる
ことになる。
In the present invention configured as described above, when a new key is pressed on the keyboard 1, the channel number detection means 3b
The number of storage channels in the key information storage means 3a storing the same key information as the key information representing this newly pressed key is detected. If the detected number of storage channels is smaller than a predetermined integer value, the allocation control means 3C transfers the key information representing the newly pressed key to the key information storage means 3a.
By storing the tone generation channel 2 of the newly pressed key in any of the memory channels within the memory channel 2,
Control allocation to Since this predetermined integer value is set to a value of 2 or more, if the same key is pressed repeatedly within a short period of time, the same key will be activated by a plurality of musical tone generation channels equal to the predetermined integer value. will be allocated at the same time.

また、チャンネル数検出手段3bにより検出された記憶
チャンネルの数が所定整数値以上であれば、割当て制御
手段3Cは前記新たに押された鍵を表すキー情報を該キ
ー情報と同一キー情報を記憶している記憶チャンネルの
うちのいずれかに記憶さ“せることにより、前記押され
た鍵の楽音発生チャンネル2への割当てを制御する。そ
して、この所定整数値は楽音発生チャンネル2の数未満
の値に設定されているので、同一鍵が短時間内に多数回
繰返し押鍵されても、該同一鍵は最大でも所定整数値に
等しい複数の楽音発生チャンネル2に割当てられ、残り
の楽音発生チャンネル2は他の鍵の割当て利用される。
Further, if the number of storage channels detected by the channel number detection means 3b is equal to or greater than a predetermined integer value, the allocation control means 3C stores the key information representing the newly pressed key and the same key information. The assignment of the pressed key to the tone generation channel 2 is controlled by storing it in one of the memory channels 2.The predetermined integer value is less than the number of tone generation channels 2. Since this is set to a value of 2 is used for other key assignments.

〔発明の効果〕〔Effect of the invention〕

上記作用説明からも理解できる通り、トリル演奏等のよ
うに鍵盤1にて同一鍵が短時間内に繰返し押鍵された場
合、該鍵は複数の楽音発生チャンネル2に重複して割当
てられて、時間を異にして押された同一鍵に関する楽音
が同時に発音可能となるので、例えばピアノ等の自然楽
器で見られるように発音源である弦は後の押鍵に関する
楽音を発生しているにもかかわらず、響板等の共鳴装置
が前の押鍵に関する楽音を発生するような効果がよりよ
くシミュレートできて、電子楽器の品質が向上する。
As can be understood from the above explanation of the operation, when the same key is repeatedly pressed on the keyboard 1 within a short period of time, such as when playing a trill, the key is redundantly assigned to a plurality of musical sound generation channels 2, Since musical tones related to the same key pressed at different times can be produced simultaneously, for example, as seen in natural instruments such as the piano, the strings that are the sound source can generate the musical tones related to the later key pressed. Regardless, the quality of the electronic musical instrument is improved by better simulating the effect in which a resonator, such as a soundboard, generates a musical tone related to the previous key press.

また、同一鍵の上記繰返し押鍵の回数が所定整数値(2
以上かつ楽音発生チャンネル2の数未満)より大きくな
っても、上記同一鍵の重複割当てが許容される楽音発生
チャンネル2の数は所定整数値までに制限され、残りの
楽音発生チャンネル2は他の割当てに利用されるので、
このような場合でも他の鍵の押鍵に伴う楽音の発生に支
障を来たすことがな(なる。
Also, the number of times the same key is repeatedly pressed is a predetermined integer value (2
Even if the number of musical tone generating channels 2 to which the same key is allowed to be duplicated is limited to a predetermined integer value, the remaining musical tone generating channels 2 are allocated to other musical tone generating channels 2. It is used for allocation, so
Even in such a case, the generation of musical tones caused by pressing other keys will not be interfered with.

〔実施例〕〔Example〕

a、構成例 以下、この発明の一実施例を図面を用いて説明すると、
第2図はこの発明が適用された減衰系(パーカフシブ系
)の楽音を発生する電子楽器を概略的に示すものであり
、この電子楽器は1!ii。
a. Configuration example An embodiment of the present invention will be described below with reference to the drawings.
FIG. 2 schematically shows an electronic musical instrument that generates attenuated (percussive) musical tones to which the present invention is applied. ii.

と、音色、音量等を選択制御する操作子群11と、楽音
の減衰時間(減衰時定数)を切換えるサスティンペダル
12と、楽音信号を発生する楽音発生回路13と、l!
盤10、操作子群11及びサスティンペダル12の状態
を入力して楽音発生回路13を制御するマイクロコンピ
ュータ部14を備えている。
, a group of operators 11 that selectively controls the tone, volume, etc., a sustain pedal 12 that switches the decay time (decay time constant) of musical tones, a musical tone generation circuit 13 that generates musical tone signals, and l!
It is equipped with a microcomputer section 14 that inputs the states of the panel 10, the operator group 11, and the sustain pedal 12 to control the musical tone generation circuit 13.

鍵盤10は楽音発生回路13にて発生される楽音の音高
を指定するための複数の鍵(例えばAO〜C8の88鍵
)を有し、冬場の押鍵又は離鍵操作は冬場に対応して設
けられた鍵スィッチからなる鍵スィッチ回路10aによ
って検出されるようになっているとともに、上記押鍵操
作に伴う押鍵速さ、押鍵圧力等の鍵タッチ強さくイニシ
ャル鍵タッチ)が冬場に対応して設けられた押鍵速度検
出回路又は押鍵圧□力検出回路等からなる鍵タッチ検出
回路10bによって検出されるようになっている。鍵ス
ィッチ回路10a及び鍵タッチ検出回路10bは、バス
15を介してマイクロコンピュータ部14に接続され、
マイクロコンピュータ部14に制御されて、冬場の押鍵
又は離鍵状態を表す鍵データ及び各y!操作に伴う鍵タ
ツチデータをマイクロコンピュータ部14に供給するよ
うになっている。操作子群11は楽音発生回路13にて
発生される減衰系の例えばピアノ、ハープシコード等の
音色を選択する操作子及び発生される楽音の音量等を調
節する操作子等を有し、これらの操作子の操作状態は前
記各操作子に対応して設けられたスイッチ、ボリュウム
等からなる操作子スイッチ回路11aによって検出され
るようになっている。操作子スイッチ回路11aはバス
15を介してマイクロコンピュータ部14に接続され、
マイクロコンピュータ部14に制御されて、各操作子の
状態を表すデータをマイクロコンピュータ部14に供給
するようになっている。サスティンペダル12は、その
踏込み操作により楽音発生回路13にて発生される楽音
の減衰時間を長くし、かつ踏込み解除により前記楽音の
減衰時間を短くするために演奏者の足により操作される
ものであり、サスティンペダル12の踏込み又は踏込み
解除はサスティンペダルスイッチ回路12aにより検出
され、この検出されたサスティンペダル12の踏込み又
は踏込み解除を表すデータは、同回路12aに接続され
たバス15を介してマイクロコンピュータ部14に供給
されるようになっている。
The keyboard 10 has a plurality of keys (for example, 88 keys from AO to C8) for specifying the pitch of the musical tones generated by the musical tone generating circuit 13, and the key press and release operations in winter correspond to the winter. It is detected by a key switch circuit 10a consisting of a key switch provided at The touch is detected by a key touch detection circuit 10b, which includes a correspondingly provided key press speed detection circuit, key press pressure force detection circuit, or the like. The key switch circuit 10a and the key touch detection circuit 10b are connected to the microcomputer section 14 via the bus 15,
Under the control of the microcomputer section 14, key data indicating the key pressed or released state in winter and each y! Key touch data associated with the operation is supplied to the microcomputer section 14. The operator group 11 includes an operator for selecting the tone of the attenuation system, such as piano or harpsichord, generated by the musical tone generating circuit 13, and an operator for adjusting the volume of the generated musical tone. The operation state of the child is detected by an operator switch circuit 11a comprising a switch, a volume, etc. provided corresponding to each of the operators. The operator switch circuit 11a is connected to the microcomputer section 14 via the bus 15,
It is controlled by the microcomputer section 14 and supplies data representing the status of each operator to the microcomputer section 14. The sustain pedal 12 is operated by the performer's foot in order to lengthen the decay time of the musical sound generated by the musical sound generation circuit 13 when the pedal is depressed, and to shorten the decay time of the musical sound when the pedal is released. Depression or release of the sustain pedal 12 is detected by the sustain pedal switch circuit 12a, and data representing the detected depression or release of the sustain pedal 12 is sent to the microcontroller via the bus 15 connected to the circuit 12a. The data is supplied to the computer section 14.

楽音発生回路13は、鍵盤10の鍵数より少ないN個(
例えば、8個)の楽音発生チャンネルを有し、鍵f!;
iioにて新たな鍵が押されたとき、マイクロコンピュ
ータ部14により該鍵が割当てられた楽音発生チャンネ
ルにおいて、y1盤1oの鍵操作、操作子群11の操作
状態及びサスティンペダル12の操作状態に応じた楽音
信号を発生し、アンプ16を介しスピーカ17がら楽音
として発音する。この場合、発生楽音の周波数は鍵盤1
0にて押された鍵により指定された該鍵に対応する音高
周波数であり、発生楽音の音色は操作子群11の操作状
態に応じて指定されるピアノ、ハープシコード等の音色
である。また、発生楽音のエンベロープ波形は、基本的
には第3A図の実線にて示すように、押鍵と同時に急速
に立上り、所定のアタックレベルALに達すると、離鍵
とは無関係に所定の減衰時定数DTで除々に減衰して、
押鍵中はこの減衰を続行し、減衰中に離鍵されると、破
線にて示すようにその時点から急速に減衰する形状であ
るが、このエンベロープ波形はサスティンペダル12の
操作及び鍵盤10の鍵操作により制御されて、サスティ
ンペダル12が踏込まれた状態にあればgIt鍵されて
も破線のように変化せず実線のように変化し、また、発
生される音高が低くなるに従って減衰時定数DTが大き
くなるように設定されて一点鎖線のように変化し、さら
に、鍵タッチ検出回路10bにより検出された鍵タッチ
が強ければすなわち押鍵速度が大きく又は押鍵圧力が大
きければ上記所定のアタックレベルALが太き(なって
二点鎖線のように変化するようになっている。さらに、
前記減衰時定数DT及びアタックレベルALは発生楽音
の音色に応じても変化するようになっている。これによ
り、ピアノ等の減衰系の自然楽器において見られるよう
に、発生楽音に応じて楽音の減衰時間(楽音の音量レベ
ルが高い状態から除々に低くなってほぼ零になるまでの
時間)を異ならせるようになっている。
The musical tone generation circuit 13 has N keys (
For example, it has 8) musical tone generation channels, and the key f! ;
When a new key is pressed in iio, the microcomputer unit 14 changes the key operation of the y1 board 1o, the operation state of the operator group 11, and the operation state of the sustain pedal 12 in the musical sound generation channel to which the key is assigned. A corresponding musical tone signal is generated and output as a musical tone from a speaker 17 via an amplifier 16. In this case, the frequency of the generated musical tone is keyboard 1.
This is the pitch frequency corresponding to the key specified by the key pressed at 0, and the timbre of the generated musical tone is the timbre of piano, harpsichord, etc. specified according to the operating state of the operator group 11. Furthermore, as shown by the solid line in Figure 3A, the envelope waveform of the generated musical tone basically rises rapidly at the same time as the key is pressed, and when it reaches a predetermined attack level AL, it attenuates by a predetermined value regardless of the key release. Gradually attenuates with time constant DT,
This attenuation continues while the key is pressed, and when the key is released during the attenuation, it rapidly attenuates from that point on, as shown by the broken line, but this envelope waveform is affected by the operation of the sustain pedal 12 and the keyboard 10. Controlled by key operation, if the sustain pedal 12 is depressed, even if the gIt key is pressed, it will not change as shown by the broken line but will change as shown by the solid line, and as the pitch of the generated tone becomes lower, it will change as shown in the solid line. The constant DT is set to be large and changes as shown by the dashed line, and further, if the key touch detected by the key touch detection circuit 10b is strong, that is, if the key pressing speed is large or the key pressing pressure is large, the above predetermined value is changed. The attack level AL becomes thicker (and changes like the two-dot chain line).Furthermore,
The attenuation time constant DT and attack level AL are adapted to change depending on the timbre of the generated musical tone. As a result, the decay time of a musical sound (the time it takes for the volume level of a musical sound to gradually decrease to almost zero from a high state) depending on the generated musical sound, as seen in damping natural instruments such as pianos. It is now possible to

マイクロコンピュータ部14は、第5図乃至第9図及び
第11図に示すフローチャートに対応したプログラムを
記憶する読出し専用メモリ (以下単にROMという)
14aと、このプログラムを実行゛する中央処理装置(
以下単にCPUという)14bと、このプログラムを実
行するのに必要な後述する諸変数を一時的に記憶してワ
ーキングメモリとしての役目を果す書込み可能メモリ 
(以下単にRAMという)14cと、時間を計測して所
定時間毎に、実行中のプログラム処理を中断して第8図
に示すフローチャートに対応した「タイマ割込み」プロ
グラムをcpui4bに実行させるタイマ回路14dと
を備え、上記プログラムの実行により鍵盤10.操作子
群II及びサスティンペダル12の操作に応じたデータ
を楽音発生回路13に出力して楽音の発生を制御する。
The microcomputer unit 14 is a read-only memory (hereinafter simply referred to as ROM) that stores programs corresponding to the flowcharts shown in FIGS. 5 to 9 and 11.
14a, and a central processing unit (
(hereinafter simply referred to as the CPU) 14b, and a writable memory that temporarily stores various variables (described later) necessary to execute this program and serves as a working memory.
(hereinafter simply referred to as RAM) 14c, and a timer circuit 14d that measures time and, at predetermined intervals, interrupts the program processing being executed and causes the CPU 4b to execute a "timer interrupt" program corresponding to the flowchart shown in FIG. By executing the above program, the keyboard 10. Data corresponding to the operations of the operator group II and the sustain pedal 12 is outputted to a musical tone generating circuit 13 to control the generation of musical tones.

なお、ROM14a、CPU14b、RAM14c及び
タイマ回路14dはバス15に接続されている。
Note that the ROM 14a, CPU 14b, RAM 14c, and timer circuit 14d are connected to the bus 15.

RAM14Cは、楽音発生回路13の各楽音発生チャン
ネルに割当てた鍵に関するデータを記憶する割当てキー
データレジスタ領域AKDR(第4A図)と、前記各楽
音発生チャンネルに割当てた鍵の鍵タッチ強さを表すデ
ータを記憶する割当てタッチデータレジスタ領域ATD
R(第4B図)と、前記各楽音発生チャンネルへの割当
て優先順位を表すデータを記憶する優先順位データレジ
スタ領域PRDR(第4C図)と、鍵盤10にて新たに
押された鍵の割当てるべきチャンネルを指定するための
割当指定チャンネルデータ等を記憶する割当てチャンネ
ルレジスタ領域ACHR(第4D図)と、鍵盤10の押
鍵検出及び操作子群11の操作検出に利用する押鍵及び
操作検出レジスタ領域KOR(第4E図)と、チャンネ
ルの割当て演算及びその他の演算に利用する一般しジス
タ領域GNR(第4F図)に区分されている。
The RAM 14C includes an assigned key data register area AKDR (FIG. 4A) that stores data regarding keys assigned to each tone generation channel of the tone generation circuit 13, and represents the key touch strength of the keys assigned to each tone generation channel. Assigned touch data register area ATD to store data
R (FIG. 4B), a priority data register area PRDR (FIG. 4C) that stores data representing the priority of assignment to each of the musical tone generation channels, and a register to which a newly pressed key on the keyboard 10 should be assigned. An assigned channel register area ACHR (FIG. 4D) that stores assigned channel data for specifying a channel, and a key press and operation detection register area used for detecting key presses on the keyboard 10 and detecting operations on the operator group 11. It is divided into a KOR (Fig. 4E) and a general register area GNR (Fig. 4F) used for channel assignment calculations and other calculations.

さらに、割当てキーデータレジスタ領域AKDR(第4
A図)は楽音発生回路13の各楽音発生チャンネルに各
々対応したN個のレジスタを有し、各レジスタは各々対
応する楽音発生チャンネルに割当てられた鍵を表すキー
コードKC及び該鍵の状態を示すキーオンデータKOか
らなる割当てキーデータA K D (1)〜AKD 
(N)を各々記憶する。
Furthermore, the assigned key data register area AKDR (fourth
Figure A) has N registers corresponding to each musical tone generating channel of the musical tone generating circuit 13, and each register stores a key code KC representing a key assigned to the corresponding musical tone generating channel and the state of the key. Assigned key data AKD (1) to AKD consisting of key-on data KO shown
(N) respectively.

なお、この実施例ではキーコードKCは高音になるに従
って「1」ずつ増加し、鍵盤10の88鍵に対応して「
21」〜r108Jの値をとるものであり、キーオンデ
ータKOは値“0”にて離鍵状態を示しかつ値“1”に
て押鍵状態を示すものである。
In addition, in this embodiment, the key code KC increases by "1" as the tone becomes higher, and corresponds to the 88 keys of the keyboard 10.
21'' to r108J, and the key-on data KO indicates a key-released state with a value of "0" and a key-pressed state with a value of "1".

割当てタッチデータレジスタ領域ATDR(第4B図)
も、割当てキーデータレジスタ領域AKDRと同様に、
N個のレジスタを存し、各レジスタは割当てキーデータ
レジスタ領域AKDRに記憶されている各割当てキーデ
ータAKD (1)〜(N)が示す鍵に関するタッチデ
ータTDを割当てタッチデータATD (1)〜(N)
として各々記憶する。なお、タッチデータTDは押鍵強
さが大きくなると大きな値となるデータである。優先順
位データレジスタ領域PRDR(第4C図)も、割当て
キーデータレジスタ領域AKDRと同様に、各楽音発生
チャンネルに対応したN個のレジスタを有し、各レジス
タは各楽音発生チャンネルに対応してその値が小さい程
割当て優先順位が高くなる優先順位データPRD (1
)〜PRD (N)を記憶する。
Assigned touch data register area ATDR (Figure 4B)
Similarly to the assigned key data register area AKDR,
There are N registers, and each register assigns touch data TD related to keys indicated by each assigned key data AKD (1) to (N) stored in the assigned key data register area AKDR. (N)
Each is memorized as . Note that the touch data TD is data that increases in value as the key depression strength increases. Like the assigned key data register area AKDR, the priority data register area PRDR (Fig. 4C) also has N registers corresponding to each tone generation channel, and each register corresponds to each tone generation channel. Priority data PRD (1
) to PRD (N).

割当てチャンネルレジスタ領域ACHR(第4D図)は
、yIiIOにて新たに押された鍵が割当てられる楽音
発生チャンネルの番号を示す割当てチャンネル番号デー
タACHNを記憶するレジスタと、この割当てチャンネ
ル番号データACHNを探し出す処理過程において抽出
されるチャンネル番号CHN及び優先順位データPRD
を記憶するレジスタ群を有する。
The assigned channel register area ACHR (Figure 4D) is a register that stores assigned channel number data ACHN indicating the number of the musical tone generation channel to which the newly pressed key is assigned in yIiIO, and this assigned channel number data ACHN is searched. Channel number CHN and priority data PRD extracted in the processing process
It has a group of registers that store .

押鍵及び操作検出レジスタ領域KOR(第4E図)は、
鍵盤10の冬場に各々対応する複数のピントから成り、
各ビットが冬場の押鍵又は離鍵を表わす“1”又は“0
”のデータを記憶する鍵状態メモリKEYMEMと、操
作子群11の各スイッチ及び各ボリュウムに対応した複
数の記憶位置を有し、各々対応するスイッチの開閉成状
態データ又はボリュウムの位置データを記憶する操作子
状態メモリSWMEMと、鍵盤10の押鍵イベントデー
タKEVTI、%1mイベントデータKEvT2、又は
操作子群11の操作子イベントデータ5WEVTを記憶
するための複数のレジスタを有する。なお、この押鍵イ
ベントデータKEVTIは鍵名を表すキーコードKC,
ylの操作状態を表すキーオンデータKO及び鍵タッチ
強さを表すタッチデータTDからなり、離鍵イベントデ
ータKEVT2は上記キーコードKC及びキーオンデー
タKOからなる。
The key press and operation detection register area KOR (Fig. 4E) is as follows:
Consists of multiple focuses each corresponding to the winter time of the keyboard 10,
Each bit is “1” or “0” indicating key press or key release in winter.
It has a key state memory KEYMEM that stores data of ", and a plurality of storage positions corresponding to each switch and each volume of the operator group 11, and each stores the opening/closing state data of the corresponding switch or the position data of the volume. It has a control state memory SWMEM and a plurality of registers for storing key press event data KEVTI of the keyboard 10, %1m event data KEvT2, or control event data 5WEVT of the control group 11. Data KEVTI is a key code KC representing a key name,
The key-on event data KEVT2 is composed of the key-on data KO representing the operation state of yl and the touch data TD representing the key touch strength, and the key-release event data KEVT2 is composed of the key code KC and the key-on data KO.

一般しジスタ領域GNP (第4F図)は押鍵イベント
データKEVTIの処理中に上記レジスタ領域KORか
ら読出したキーデータKD及びタッチデータTDを記憶
する2箇のレジスタと、最低音検出により検出した最低
音に対応する最低音キーコードLKCを記憶するレジス
タと、同一鍵が割当てられている楽音発生チャンネル数
を示す重複割当てチャンネル数データMANYを記憶す
るレジスタと、サスティンペダル12が踏込まれた状態
を値“1″にて表しかつサスティンペダル12が踏込ま
れていない状態を値“0”にて表すサスティンデータS
USを記憶するレジスタと、マイクロコンピュータ部1
4の演算に必要なその他の変数等を記憶するその他のレ
ジスタ群から成る。
In general, the register area GNP (Figure 4F) has two registers that store the key data KD and touch data TD read from the register area KOR during the processing of the key press event data KEVTI, and the lowest note detected by the lowest note detection. A register that stores the lowest note key code LKC corresponding to a note, a register that stores duplicate assignment channel number data MANY indicating the number of musical tone generation channels to which the same key is assigned, and a value that indicates the state in which the sustain pedal 12 is depressed. Sustain data S is represented by “1” and the state in which the sustain pedal 12 is not depressed is represented by the value “0”
Register for storing US and microcomputer section 1
It consists of a group of other registers that store other variables necessary for the operations in step 4.

b、基本動作 上記のように構成した実施例の基本的動作を第5図に示
すフローチャートを用いて説明すると、電源の投入によ
り、CPU14bは第5図のステップ20からプログラ
ムの実行を開始してステップ21にてRAM14Cの初
期設定を行う。
b. Basic Operation The basic operation of the embodiment configured as described above will be explained using the flowchart shown in FIG. 5. When the power is turned on, the CPU 14b starts executing the program from step 20 in FIG. In step 21, the RAM 14C is initialized.

上記初期設定後、CPU14bは、プログラムをステッ
プ22の鍵処理ルーチンに進め、同ルーチンにて、後述
する第6図、第7図及び第9図のフローチャートに対応
したプログラムを実行することにより、j3!盤10の
押鍵または離鍵に応じて楽音発生回路工3による楽音の
発生を制御する。
After the above initial settings, the CPU 14b advances the program to the key processing routine of step 22, and in the same routine executes the program corresponding to the flowcharts of FIGS. 6, 7, and 9, which will be described later. ! The generation of musical tones by the musical tone generating circuit 3 is controlled in response to key depression or key release on the keyboard 10.

上記鍵処理ルーチンの実行後、CPU14bは、プログ
ラムをステップ23のサスティンペダル処理ルーチンに
進め、同ルーチンにて、後述する第11図のフローチャ
ートに対応したプログラムを実行することにより、サス
ティンペダル12の踏込み又は踏込み解除に応じて楽音
発生回路13にて発生中の楽音の減衰状態を制御する。
After executing the key processing routine, the CPU 14b advances the program to the sustain pedal processing routine of step 23, and in this routine, by executing a program corresponding to the flowchart of FIG. Alternatively, the attenuation state of the musical tone being generated by the musical tone generating circuit 13 is controlled in response to the release of the pedal.

次に、プログラムはステップ24.25に進み、マイ゛
クロコンピユータ部14は操作子群11の操作子状態を
検出し、検出結果を楽音発生回路13に出力して楽音の
音色、音量等を制御する。ステップ24にて、CPU1
4bは操作子スイッチ回路11a内の各スイッチの開閉
状態及びボリュウムの設定位置を表わすデータを操作子
群11の新操作子データとして入力し、これらの入力デ
ータと操作子状態メモリSWMEMに記憶されている旧
操作子データとを各操作子毎に各々対比し、両データが
異なる場合にのみ当該データに関する操作子の操作状態
が変化したものとして、同操作子の新操作子データを操
作子状態メモリSWMEMの同操作子に対応する記憶位
置に書込むと共に、同所操作子データを押鍵及び操作検
出レジスタ領域KORに操作子イベントデータ5WEV
Tとして記憶する。ステップ25にて、CPU14bは
操作子イベントデータ5WEVTの有無を調べ、データ
がある場合、このデータを楽音発生回路13に出力した
後、出力した操作子イベントデータ5WEVTを消去し
、操作子イベントデータ5WEVTがなくなるまで上記
動作を繰返し、全ての操作子イベントデータの送出を行
う。なお、全操作子に関する新旧操作子データが一致す
る場合には、ステップ24.25における操作子データ
の書換え及び出力は実行されない。
Next, the program proceeds to steps 24 and 25, where the microcomputer section 14 detects the state of the operators in the operator group 11 and outputs the detection results to the musical tone generating circuit 13 to control the tone, volume, etc. of the musical tone. do. At step 24, CPU1
4b inputs data representing the open/closed state of each switch in the operator switch circuit 11a and the set position of the volume as new operator data for the operator group 11, and stores these input data and the operator status memory SWMEM. The old control data for each control is compared with the old control data for each control, and only if the two data are different, it is assumed that the operation state of the control related to the data has changed, and the new control data for the same control is stored in the control state memory. In addition to writing the same controller data to the storage location corresponding to the same controller in SWMEM, the controller event data 5WEV is written to the key press and operation detection register area KOR.
Store as T. In step 25, the CPU 14b checks the presence or absence of the operator event data 5WEVT, and if the data is present, outputs this data to the musical tone generation circuit 13, erases the output operator event data 5WEVT, and deletes the output operator event data 5WEVT. The above operation is repeated until all controller event data are sent out. Note that if the new and old controller data regarding all the controllers match, the rewriting and output of the controller data in steps 24 and 25 are not executed.

上記ステップ24.25の処理後、プログラムはステッ
プ22に戻り、CPU14bはステップ22〜25の各
処理を繰返し実行して鍵盤10、サスティンペダル12
及び操作子群11の状態に応じて楽音発生回路13の楽
音発生を制御する。
After the processing of steps 24 and 25 above, the program returns to step 22, and the CPU 14b repeatedly executes each processing of steps 22 to 25 to
According to the state of the operator group 11, the musical tone generation circuit 13 controls musical tone generation.

C0鍵処理動作 次に鍵処理ルーチンについて詳述すると、CPU14b
は第6図のステ・ノブ30からプログラムの実行を開始
し、ステップ31にて鍵スイツチ回路10a内の各鍵ス
ィッチを低音側又は高音側から順次走査し、この走査に
より各鍵スィッチの開閉成の状態信号を鍵盤10の新鍵
状態データとして入力し、これらの入力データと鍵状態
メモリKEYMEMに記憶されている旧遊状態データと
を各鍵毎に各々対比して鍵盤10における押鍵状態の変
化を検出するとともに、新たな押鍵を検出したときには
鍵タッチ検出回路10bから該鍵に関するタッチデータ
を取込む。すなわち、新鍵状態データが“1″であり、
かつ旧遊状態データが“0”である場合、CPU14b
は鍵盤10にて新たに鍵が押されたことを検知し、この
新鍵状態データ“1”を鍵状態メモリKEYMEMの新
たに押された鍵に対応する記憶位置に書込むと共に、同
鍵名を表わすキーコードKC及び鍵が押されたことを表
わす値“′l”のキーオンデータKOからなるキーデー
タKDと鍵タッチ検出回路10bから取込んだ該鍵の鍵
タッチ強さを表すタッチデータTDとを押鍵イベントデ
ータKEVTIとして押鍵及び操作検出レジスタ領域K
OR(第4E図)のレジスタ群に記憶する。また、新鍵
状態データが“O”でありかつ旧遊状態データが“1“
である場合、CPU14bは鍵i10にて新たに鍵が離
されたことを検知し、この新鍵状態データ“O”を鍵状
態メモリKEYMEMの新たに離された鍵に対応する記
憶位置に書込むと共に、同鍵名を表わすキーコードKC
及び鍵が離されたことを表わす値“O”のキーオンデー
タKOからなるキーデータKDをM鍵イベントデータK
EVT2として上記レジスタ群に記憶する。なお、上記
キーコードKCは上記走査において冬場に対応する鍵ス
ィッチを順次指定している走査カウンタ(図示しない)
により決定される。このような走査により、鍵盤10の
全ての鍵の状態検出を終了すると、前回のステップ31
の実行時から今回のステップ31の実行までに状態が変
化した鍵に対応する押鍵イベントデータKEVTI及び
離鍵イベントデータKEVT2が上記レジスタ群に全て
記憶されることになる。
C0 key processing operation Next, the key processing routine will be explained in detail.
starts executing the program from the step knob 30 in FIG. 6, and in step 31 scans each key switch in the key switch circuit 10a sequentially from the low tone side or the high tone side, and by this scanning, opens and closes each key switch. The state signal is inputted as new key state data of the keyboard 10, and these input data and the old play state data stored in the key state memory KEYMEM are compared for each key to determine the key pressed state of the keyboard 10. In addition to detecting a change, when a new key press is detected, touch data regarding the key is fetched from the key touch detection circuit 10b. That is, the new key status data is “1”,
And if the old play state data is “0”, the CPU 14b
detects that a new key has been pressed on the keyboard 10, writes this new key state data "1" to the memory location corresponding to the newly pressed key in the key state memory KEYMEM, and writes the same key name. Key data KD consisting of a key code KC representing a key press, key-on data KO having a value "'l" representing that a key has been pressed, and touch data TD representing a key touch strength of the key taken in from the key touch detection circuit 10b. and as key press event data KEVTI in the key press and operation detection register area K.
It is stored in the register group of OR (FIG. 4E). Also, the new key status data is “O” and the old key status data is “1”.
If so, the CPU 14b detects that the key i10 has been newly released, and writes this new key state data "O" to the storage location corresponding to the newly released key in the key state memory KEYMEM. together with the key code KC representing the same key name.
M key event data K
It is stored in the above register group as EVT2. The key code KC is a scanning counter (not shown) that sequentially specifies the key switch corresponding to winter in the scanning.
Determined by When the state detection of all the keys on the keyboard 10 is completed through such scanning, the previous step 31 is completed.
The key press event data KEVTI and the key release event data KEVT2 corresponding to the keys whose states have changed from the execution of step 31 to the current execution of step 31 are all stored in the register group.

次に、プログラムはステップ32.33に進み、CPU
I 4 bはステップ32.33にて上記レジスタ群の
内容により押鍵または離鍵イベントの発生の有無を判別
する。鍵盤10の冬場に状態変化がない場合、cput
tbはステップ32及びステップ33にてrNOJと判
断して、ステップ34により鍵処理ルーチンの実行を終
了して第5図のステップ23の実行に移る。
The program then proceeds to step 32.33 where the CPU
In step 32.33, I4b determines whether a key press or key release event has occurred based on the contents of the register group. If there is no change in the state of keyboard 10 in winter, cput
tb is determined to be rNOJ in steps 32 and 33, and the execution of the key processing routine is ended in step 34, and the process moves to step 23 in FIG.

鍵盤10にて新たな押鍵があった場合、CPU14bは
ステップ32にて、上記レジスタ群に記憶されている押
鍵イベントデータKEVTIの存在によりrYEsJと
判別して、ステップ40の「割当てchサーチ」プログ
ラム(第7図)、ステップ50の「割当てchデータ設
定」プログラム(第9図)及びステップ60の処理から
成る押鍵イベント処理ルーチンの実行に移る。
When a new key is pressed on the keyboard 10, the CPU 14b determines in step 32 that it is rYEsJ based on the presence of the key press event data KEVTI stored in the register group, and performs the "assigned channel search" in step 40. A key press event processing routine consisting of the program (FIG. 7), the "assigned channel data setting" program (FIG. 9) at step 50, and the process at step 60 is executed.

CPU14bは、新たに押された鍵の割当てらるべきチ
ャンネル番号ACHNを決定する第7図の「割当てch
サーチ」プログラムにおいて、ステップ40aからプロ
グラムの実行を開始し、ステップ41aにて押鍵及び操
作検出レジスタ領域KORのレジスタ群からキーデータ
KD及びタッチデータTDからなる一組の押鍵イベント
データKEVTIを読出して一般しジスタ領域GNPに
今後処理するキーデータKD及びタッチデータTDとし
て記憶した後、ステップ41bにて咳押鍵イベントデー
タKEVTIを上記レジスタ群から消去し、ステップ4
2にて優先順位データレジスタ領域PRDRの各レジス
タに記憶されている優先順位データPRD (1)〜P
RD (N)を順次読出し、読出した優先順位データP
RDの値が「O」でなければこの値から「1」を減算し
て減算結果を新たな優先順位データPRDとして上記読
出したレジスタに再び記憶し、父上記値が「0」であれ
ば、上記読出したレジスタの内容を書換えないようにす
る。これにより、鍵盤10にて新たな鍵が押される毎に
そのデータ値が「0」でないチャンネルの優先順位デー
タPRD (1)〜PRD (N)が−率に「1」ずつ
減算されることになり、このことは押鍵毎に各チャンネ
ルの優先順位データが割当て優先順位の高い方向に一率
に更新されることを意味する。
The CPU 14b determines the channel number ACHN to which the newly pressed key should be assigned.
In the "Search" program, execution of the program is started from step 40a, and a set of key press event data KEVTI consisting of key data KD and touch data TD is read out from the register group of the key press and operation detection register area KOR in step 41a. After storing the key data KD and touch data TD to be processed in the future in the general register area GNP, the cough key press event data KEVTI is deleted from the register group in step 41b, and the process is performed in step 4.
2, the priority data PRD stored in each register of the priority data register area PRDR (1) to P
RD (N) is read out sequentially and the read priority data P
If the value of RD is "O", "1" is subtracted from this value and the subtraction result is stored again in the register read above as new priority data PRD, and if the value above is "0", Prevent the contents of the read register from being rewritten. As a result, each time a new key is pressed on the keyboard 10, the priority data PRD (1) to PRD (N) of the channels whose data value is not "0" are subtracted by "1" from the minus rate. This means that the priority data of each channel is updated at a constant rate in the direction of higher allocation priority every time a key is pressed.

上記優先順位データPRD (1)〜PRD(N)の更
新後、CPU14bは、ステップ43aにて、一般レジ
スタGNPにステップ41aの処理により記憶したキー
データKDに基づき、該キーデータKD中のキーコード
KCの値と等しい値のキーニー下KCを有する割当てキ
ーデータAKDの数を、割当てキーデータレジスタAK
DRに記憶されている割当てキーデータAKD (1)
〜AKD(N)を順次読出してキーコードKC同志を比
較することにより検出し、検出した数を重複割当てチャ
ンネル数データMANYとして記憶する。この重複割当
てチャンネル数データMANYの検出は、トリル演奏等
の演奏態様により鍵盤10にて所定数(楽音発生チャン
ネル数N)の押1!操作の間に同一鍵が2回以上繰返し
押された場合に、該鍵の割当てられる最大チャンネル数
を決定するもので、この実施例では同一鍵の異なるチャ
ンネルへの割当ては2チヤンネルまで許容され、3チャ
ンネル以上の割当ては禁止されるようになっている。
After updating the priority data PRD(1) to PRD(N), the CPU 14b, in step 43a, determines the key code in the key data KD based on the key data KD stored in the general register GNP by the processing in step 41a. The number of assigned key data AKD having a lower key KC value equal to the value of KC is stored in the assigned key data register AK.
Assigned key data AKD stored in DR (1)
-AKD(N) are sequentially read out and detected by comparing the key codes KC, and the detected number is stored as duplicate allocation channel number data MANY. Detection of this duplicate allocation channel number data MANY is performed by pressing a predetermined number (number of musical sound generation channels N) on the keyboard 10 depending on the performance mode such as trill performance. When the same key is pressed twice or more during operation, the maximum number of channels to which the key can be assigned is determined. In this embodiment, the same key can be assigned to different channels up to 2 channels, Allocation of three or more channels is prohibited.

次に、CPU14bはステップ43bにて上記記憶した
重複割当てチャンネル数データMANYO値が「1」よ
り大きいか否かを判断する。上記新たに押された鍵が上
記所定数の押鍵操作の間に2回以上押されたものでない
場合、割当てキーデ−タレジスタ領域AKDRの各レジ
スタには各々異なるキーコードKCを有するキーデータ
KDが記憶されているので、上記ステップ43bにて検
出した重複割当てチャンネル数データMANYは「0」
であり、cpui4bはステップ43bにてrNOJと
判定し、ステップ44aにて割当てキーデータレジスタ
領域AKDRの各レジスタに記憶されている割当てキー
データAKD (1)〜AKD (N)を順次読出し、
読出した割当てキーデータAKDのキーコードKCが最
低音キーコードLKCと一致せずかつ同キーデータAK
DのキーオンデータKOが“0”である割当てキーデー
タAKDを検出することにより、該割当てキーデータA
KDが記憶されているチャンネルを探し出して該チャン
ネルの番号を表すチャンネル番号データCHNと、優先
順位データレジスタ領域PRDRに記憶されていて該チ
ャンネル番号CHNに対応する優先順位データPRDと
を一組の抽出データとして割当てチャンネルレジスタ領
域ACHRに順次記憶する。これにより、最低音でな(
かつ!ili鍵されている鍵に関するキーデータKDが
割当てられている楽音発生チャンネルが全て抽出される
ことになる。この抽出処理後、CPU14bは、ステッ
プ44bにて上記抽出処理により抽出された該当チャン
ネルが有るか否かを判断し、抽出された該当チャンネル
がある場合にはrYESJとの判定の基に、ステップ4
5aにて前記抽出チャンネルの中からその値が最小であ
る優先順位データPRDを探し出し、この優先順位デー
タPRDと一組になって記憶されているチャンネル番号
データCHNを割当てチャンネルレジスタ領域ACHH
に割当てチャンネル番号データACHNとして記憶して
、ステップ46にて「割当てchサーチ」プログラムの
実行を終了する。
Next, in step 43b, the CPU 14b determines whether the stored duplicate allocation channel number data MANYO value is greater than "1". If the newly pressed key has not been pressed twice or more during the predetermined number of key press operations, each register in the assigned key data register area AKDR contains key data KD having a different key code KC. Since it is stored, the duplicate allocation channel number data MANY detected in step 43b above is "0".
The CPU 4b determines rNOJ in step 43b, and sequentially reads out the assigned key data AKD (1) to AKD (N) stored in each register of the assigned key data register area AKDR in step 44 a.
The key code KC of the read assigned key data AKD does not match the lowest note key code LKC and the same key data AK
By detecting the assigned key data AKD in which the key-on data KO of D is “0”, the assigned key data A
Find a channel in which KD is stored and extract a set of channel number data CHN representing the number of the channel and priority data PRD stored in the priority data register area PRDR and corresponding to the channel number CHN. It is sequentially stored as data in the allocated channel register area ACHR. This allows you to play the lowest pitch (
and! All musical tone generation channels to which the key data KD related to the ili-keyed key are assigned are extracted. After this extraction processing, the CPU 14b determines in step 44b whether or not there is a corresponding channel extracted by the above extraction processing, and if there is a corresponding extracted channel, based on the determination that rYESJ is present, the CPU 14b performs step 44b.
In step 5a, the priority data PRD having the smallest value is searched from among the extracted channels, and the channel number data CHN stored as a pair with the priority data PRD is allocated to the channel register area ACHH.
The assigned channel number data ACHN is stored as assigned channel number data ACHN, and the execution of the "assigned channel search" program is ended in step 46.

また、ステップ44aの抽出処理により該当するチャン
ネルがない場合、すなわち最低音でないチャンネルが全
て押鍵中である場合には、CPU14bはステップ44
bにて「NO」と判定し、ステップ45bにて、割当て
キーデータレジスタ領域AKDRに記憶されている割当
てキーデータAKD (1)〜AKD (N)のキーコ
ードKCが最低音キーコードLKCと一致せず、かつ優
先順位データレジスタ領域PRDRに記憶されている優
先順位データPRD (1)〜PRD(N)が最小の値
であるチャンネルを検出し、該チャンネルの番号CHN
を割当てチャンネルレジスタ領域ACHRに割当てチャ
ンネル番号データACHNとして記憶して、ステップ4
6にて「割当てchサーチ」のプログラムの実行を終了
する。これにより、#3!110にて押された鍵が上記
所定数の押鍵操作の間に2回以上押されたものでない場
合、ステップ44a、44b、45a、45bの処理に
より、該鍵が割当てられるチャンネルを示す割当てチャ
ンネル番号データACHNは、割当てキーデータAKD
 (1)〜AKD (N)の中に、最低音を示すキーデ
ータKD以外で離された鍵を表すキーデータKDがあれ
ば、このキーデータKDを記憶するチャンネルのうち、
優先順位データPRDが最小値であるチャンネルを表す
チャンネル番号CHNに決定され、また上記の条件に該
当するキー・データKDがなければ全チャンネル中最低
音を表すキーデータKDを記憶するチャンネル以外であ
って、優先順位データPRDが最小値のチャンネルを表
すチャンネル番号CHHに設定される。
Further, if there is no corresponding channel as a result of the extraction process in step 44a, that is, if all channels other than the lowest note are being pressed, the CPU 14b performs step 44.
It is determined "NO" in step 45b, and in step 45b, the key codes KC of the assigned key data AKD (1) to AKD (N) stored in the assigned key data register area AKDR match the lowest note key code LKC. Detects the channel for which the priority data PRD(1) to PRD(N) stored in the priority data register area PRDR have the minimum value, and sets the number CHN of the channel.
is stored in the allocated channel register area ACHR as allocated channel number data ACHN, and the process proceeds to step 4.
At step 6, the execution of the "assigned channel search" program ends. As a result, if the key pressed in #3!110 is not pressed twice or more during the predetermined number of key press operations, the key is assigned by the processing of steps 44a, 44b, 45a, and 45b. The assigned channel number data ACHN indicating the channel to be assigned is assigned key data AKD.
If there is key data KD representing a key released other than key data KD representing the lowest note among (1) to AKD (N), among the channels storing this key data KD,
If the priority data PRD is determined to be the channel number CHN representing the channel with the minimum value, and if there is no key data KD that meets the above conditions, then the channel other than the one storing the key data KD representing the lowest tone among all channels is selected. Then, the priority data PRD is set to the channel number CHH representing the channel with the minimum value.

一方、トリル演奏のように鍵盤10において上記所定数
の押鍵操作の間に同一鍵が2回以上繰返して押された場
合、新たに押された鍵が1回目であれば、上記と同様に
、ステップ43aにて重複割当てチャンネル数データM
ANYが「0」に設定され、また2回目であれば、割当
てキーデータレジスタ領域AKDRには1回の押鍵時の
割当てにより該鍵に関する割当てキーデータAKDが存
在しているのでステップ43aの処理により重複割当て
チャンネル数データMANYは「1」に設定され、さら
に3回目であればステップ43aの処理により重複割当
てチャンネル数データMANYは「2」に設定される。
On the other hand, when the same key is pressed twice or more during the predetermined number of key press operations on the keyboard 10, such as when playing a trill, if the newly pressed key is the first time, the same procedure as above is performed. , in step 43a, the number of duplicately allocated channels data M
If ANY is set to "0" and this is the second time, the assigned key data AKD related to the key exists in the assigned key data register area AKDR due to the assignment when the key is pressed once, so the process of step 43a is performed. Therefore, the data MANY for the number of duplicately allocated channels is set to "1", and if it is the third time, the data MANY for the number of duplicately allocated channels is set to "2" by the process of step 43a.

このように、重複割当てチャンネル数データMANYは
同一鍵の繰返し押鍵回数により種々の値に設定され、同
データMANYが「0」又は「1」のときはステップ4
3bにて「NO」すなわち同データMANYが「1」よ
り大きくないと判定されて、ステップ44a。
In this way, the duplicate allocation channel number data MANY is set to various values depending on the number of times the same key is repeatedly pressed, and when the same data MANY is "0" or "1", step 4
3b, it is determined that the same data MANY is not greater than "1", and the process proceeds to step 44a.

44 b、  45 a、  45 bにて上記のよう
にして割当てチャンネル番号データACHNが設定され
るが、同データMANYが「2」になると、CPU14
bはステップ43bにてrYESJと判定し、ステップ
45Cにて割当てキーデータレジスタ領域AKDRの各
レジスタに記憶しである割当てキーデータAKD (1
)〜AKD (N)を順次読出し、読出した割当てキー
データAKD中のキーコードKCと新たに押された鍵を
表すキーデータKD中のキーコードKCとを比較し、こ
れらのキーコードKCが一致する複数のチャンネルを抽
出して、この抽出した複数のチャンネルに対応して割当
てタッチデータレジスタ領域ATDRに記憶されている
複数の割当てタッチデータATDのうちその値が最も小
さい割当てタッチデータATDを記憶するチャンネルを
検出し、該チャンネルを示す番号を割当てチャンネルレ
ジスタ領域ACHRに割当てチャンネル番号データAC
HNとして記憶して、ステップ46の処理により「割当
てchサーチ」プログラムの実行を終了する。
44 b, 45 a, and 45 b, the allocated channel number data ACHN is set as described above, but when the same data MANY becomes "2", the CPU 14
b is determined to be rYESJ in step 43b, and in step 45C, the assigned key data AKD (1
) ~ AKD (N) are read out sequentially, and the key code KC in the read assigned key data AKD is compared with the key code KC in the key data KD representing the newly pressed key, and these key codes KC are found to match. extracting a plurality of channels to be extracted, and storing assigned touch data ATD having the smallest value among the plurality of assigned touch data ATD stored in the assigned touch data register area ATDR corresponding to the extracted plurality of channels. Detects a channel, assigns a number indicating the channel, and assigns it to the channel register area ACHR. Channel number data AC
HN, and the execution of the "assigned channel search" program is completed through the process of step 46.

このステップ43a、43bの処理により、割当てチャ
ンネル番号データACHNは、yI盤10にて上記所定
数の押vi操作の間に同一鍵の押される回数が「2」以
内のときにはステップ44a。
Through the processing of steps 43a and 43b, the assigned channel number data ACHN is changed to step 44a when the number of times the same key is pressed during the predetermined number of press vi operations on the yI board 10 is within "2".

44b、45a、45bの処理により設定され、父上記
回数が「3」以上になるとステップ45cの処理により
前に押された同一鍵が割当てられているチャンネルの中
で、割当てタッチデータATDが最小であるチャンネル
を示すチャンネル番号CHNに設定される。このことは
同一鍵に関する楽音を同時に発生するチャンネル数を「
2」までに制限していることを意味する。なお、この制
御チャンネル数は他の数例えば「3」等でもよく、この
場合にはステップ43bにて重複割当てチャンネル数M
ANYと比較する値を「2」にするとよい。また、上記
割当てタッチデータATDは、後述する「割当てchデ
ータ設定」プログラムの実行により、鍵が新たに押され
たときキーデータKDとともに鍵タッチ強さを表すタッ
チデータTDとして割当て記憶された後、第8図に示す
フローチャートに対応した「タイマ割込み」プログラム
の実行によりその値が更新されるものである。
44b, 45a, and 45b, and when the number of times above reaches "3" or more, the process of step 45c determines that the assigned touch data ATD is the smallest among the channels to which the same key previously pressed is assigned. This is set to a channel number CHN indicating a certain channel. This means that the number of channels that simultaneously generate musical tones related to the same key is
This means that the number is limited to 2. Note that this number of control channels may be any other number, such as "3", and in this case, in step 43b, the number of overlappingly allocated channels M is set.
It is preferable to set the value to be compared with ANY to "2". Further, the above-mentioned assigned touch data ATD is assigned and stored as touch data TD representing the key touch strength together with the key data KD when a key is newly pressed by executing the "assigned channel data setting" program to be described later. The value is updated by executing the "timer interrupt" program corresponding to the flowchart shown in FIG.

上記「タイマ割込み」プログラムにおいては、CPU1
4bはタイマ回路14dにより制御されて、他のプログ
ラムの実行を中断してステップ65から該プログラムの
実行を開始し、ステップ66にて割当てタッチデータレ
ジスタ領域ATDRの各レジスタに記憶されている割当
て夕7チデータATD (1)〜ATD (N)を順次
読出し、読出した割当てタッチデータATDが「0」で
なければ該データATDから「1」を減算し、減算結果
(ATD−1)を新たな割当てタッチデータATDとし
て割当てタッチデータレジスタ領域ATDRの読出した
レジスタに再び記憶する。また、読出したタッチデータ
ATDが「0」であれば、該データATDの書換えは行
なわない。上記のようにして、全ての割当てタッチデー
タATDの更新処理を実行すると、CPU14bはステ
ップ67の処理によりこの「タイマ割込み」プログラム
の実行を終了して、前記中断したプログラムの実行に移
る。この「タイマ割込み」プログラムにより、押鍵時に
設定された割当てタッチデータATD (1)〜ATD
 (N)の各値は時間が経過するに従って小さくなるの
で、同一鍵が上記所定数の押鍵操作の間に3回以上押さ
れた場合における該鍵が割当てられるべきチャンネルを
示す割当てチャンネル番号データACHNは押鍵時の鍵
タッチ強さ及び押鍵からの経過時間に応じて決定される
ことになる。
In the above "timer interrupt" program, CPU1
4b is controlled by the timer circuit 14d, interrupts the execution of other programs and starts execution of the program from step 65, and in step 66 the allocation data stored in each register of the allocated touch data register area ATDR is updated. 7 touch data ATD (1) to ATD (N) are read out sequentially, and if the read assigned touch data ATD is not "0", "1" is subtracted from the data ATD, and the subtraction result (ATD-1) is assigned as a new assignment. It is stored again in the read register of the assigned touch data register area ATDR as touch data ATD. Further, if the read touch data ATD is "0", the data ATD is not rewritten. After executing the updating process for all assigned touch data ATD as described above, the CPU 14b ends the execution of this "timer interrupt" program through the process of step 67, and proceeds to execute the interrupted program. This "timer interrupt" program allows the assigned touch data ATD (1) to ATD set when a key is pressed.
Since each value of (N) decreases as time passes, the assigned channel number data indicates the channel to which the key is to be assigned when the same key is pressed three or more times during the predetermined number of key press operations. ACHN is determined according to the key touch strength at the time of key depression and the elapsed time from the key depression.

なお、上記「割当てahサーチ」プログラムにおいては
、全ての楽音発生チャンネルにて発生中の楽音が、最低
音を除き鍵盤10における押鍵中のものである場合、C
PU14bがステップ44bにて「NO」と判定し、ス
テップ45bの処理により割当てチャンネル番号データ
ACHNを設定記憶するようにしたが、このステップ4
5bの処理の代わりに第7図に破線で示すようにステッ
プ45dの処理をするようにしてもよい。すなわち、上
記場合、cpuzbは、ステップ45dにて最低音とは
無関係に優先順位データレジスタ領域PRDRに記憶し
である全ての優先順位データPRD (1)〜PRD(
N)の中から最小値を示す優先順位データPRDを記憶
するチャンネルを探し出し、該チャンネルを示すチャン
ネル番号CHNを割当てチャンネル番号データA CH
Nとして設定記憶し、ステップ46にて「割当てchサ
ーチ」プログラムの実行を終了するようにしてもよい。
In addition, in the above-mentioned "allocation ah search" program, if the musical tones being generated in all the musical tone generation channels are the keys being pressed on the keyboard 10 except the lowest note, C
Although the PU 14b makes a "NO" determination in step 44b and stores the assigned channel number data ACHN through the processing in step 45b, this step 4
Instead of the process of step 5b, the process of step 45d may be performed as shown by the broken line in FIG. That is, in the above case, cpuzb stores all the priority data PRD(1) to PRD(
N), the channel that stores the priority data PRD having the minimum value is found, and a channel number CHN indicating the channel is assigned to the channel number data A CH.
Alternatively, the setting may be stored as N, and the execution of the "assigned channel search" program may be terminated in step 46.

上記「割当てchサーチ」プログラムの実行を終了する
と、CPU14bは、第6図のステップ50にて、上述
した第7図のステップ453〜45dの処理により設定
された割当てチャンネル番号ACHNに基づいて、優先
順位データPRD (ACHN)、割当てキーデータA
KD (ACHN)及び割当てタッチデータATD (
ACHN)を初期設定する「割当てchデータ設定」プ
ログラムの実行に移る。
When the execution of the "assigned channel search" program is finished, the CPU 14b, in step 50 of FIG. Ranking data PRD (ACHN), allocation key data A
KD (ACHN) and assigned touch data ATD (
The process moves on to execution of the "assigned channel data setting" program that initializes the ACHN.

このプログラムの詳細は第9図のフローチャートに示さ
れており、CPU14bはステップ50aにてこのプロ
グラムの実行を開始し、ステップ51aにてサスティン
データSUSの値に基づきサスティンペダル12が踏込
まれているか否かを判断する。この判断においてサステ
ィンペダル12が踏込まれた状態にあれば、後述するサ
スティンペダル処理ルーチンのプログラムの実行により
サスティンデータSUSは1”に設定されており、CP
U14bはrYESJと判定し、ステップ51bにて新
たに押された鍵を表すキーデータKD中のキーコードK
Cと現時点における最低音を表すキーコードLKCとを
比較し、前記キーコードKCが最低音キーコードLKC
より小さければrYESJと判定して、ステップ51c
にて最低音キーコードLKCを前記キーコードKCに設
定し、又前記キーコードKCが最低音キーコードLKC
より大きければ「NO」と判定してステップ51cの処
理をせずプログラムをステップ52aに進める。これに
より、サスティンペダル12が踏込まれているとき、新
たな鍵が押され、この新たな鍵が以前に割当てられてい
たいずれの鍵よりも低い音高の鍵であれば、最低音キー
コードしKCが新たに押された鍵を示すキーコードKC
に変更される。また、サスティンペダル12の踏込みが
解除されていれば、後述するサスティンペダル処理ルー
チンのプログラムの実行によりサスティンデータSUS
は“O”に設定されており、CPU14bはステ7プ5
1aにてrNOJと判定してステップ51b、51Cの
処理を実行しないでプログラムをステップ52aに進め
る。このことは、サスティンペダル12が踏込まれてい
ないときには、最低音検出が行われないことを意味する
The details of this program are shown in the flowchart of FIG. 9, and the CPU 14b starts executing this program in step 50a, and determines whether the sustain pedal 12 is depressed based on the value of sustain data SUS in step 51a. to judge. If the sustain pedal 12 is in the depressed state in this judgment, the sustain data SUS is set to 1" by executing the sustain pedal processing routine program to be described later, and the CP
U14b determines rYESJ, and in step 51b the key code K in the key data KD representing the newly pressed key is determined.
C and the key code LKC representing the lowest note at the current time, and the key code KC is the lowest note key code LKC.
If it is smaller, it is determined as rYESJ and step 51c
, the lowest note key code LKC is set to the key code KC, and the key code KC is set to the lowest note key code LKC.
If it is larger, the determination is "NO" and the program proceeds to step 52a without performing the process of step 51c. As a result, when the sustain pedal 12 is depressed, a new key is pressed, and if this new key has a lower pitch than any of the previously assigned keys, it will be assigned the lowest key code. Key code KC indicating the newly pressed key
will be changed to In addition, if the sustain pedal 12 is released, the sustain data SUS is updated by executing the sustain pedal processing routine program to be described later.
is set to “O”, and the CPU 14b
In step 1a, it is determined that rNOJ, and the program proceeds to step 52a without executing steps 51b and 51C. This means that the lowest note detection is not performed when the sustain pedal 12 is not depressed.

次に、CPU14bは、ステップ52aにて新たに押さ
れた鍵を示すキーデータKD中のキーコードKCを一般
しジスタ領域GNRから再び読出し、読出したキーコー
ドKCを右へ4ビツトシフトすることによりこのキーコ
ードKCの値を「16」で割算してこの割算結果を変数
WGHTとして設定し、ステップ52bにて「8」から
前記変数W・GHTO値を減算して、この減算結果を上
述の「割当てchサーチ」プログラムにより設定された
割当てチャンネル番号データACHHの示すチャンネル
における優先順位データPRD (ACHN)として設
定する。これにより、優先順位データPRD (ACH
N)は、キーコードKCの値に応じて、音名AO−A8
に渡り16音毎に「1」ずつ減少する「7」〜「2」の
いずれかの値に設定され、このことは押鍵時に設定され
る優先順位データPRDが低音程割当て優先順位が低く
重み付けされることを意味する。
Next, in step 52a, the CPU 14b reads the key code KC in the key data KD indicating the newly pressed key again from the general register area GNR, and shifts the read key code KC to the right by 4 bits. The value of the key code KC is divided by "16", the result of this division is set as the variable WGHT, the value of the variable W.GHTO is subtracted from "8" in step 52b, and the result of this subtraction is used as described above. This is set as priority data PRD (ACHN) for the channel indicated by the allocated channel number data ACHH set by the "allocated channel search" program. As a result, priority data PRD (ACH
N) is pitch name AO-A8 according to the value of key code KC.
It is set to a value between "7" and "2" that decreases by "1" for every 16 notes over the period, and this means that the priority order data PRD set when the key is pressed indicates that the low pitch assignment priority is weighted low. means to be

さらに、CPU14bは、ステップ53aにて前記新た
に押された鍵を示すキーデータKD中のキーコードKC
と値「60」とを比較し、キーコードKCが値「60」
より小さければステップ53bにて上記ステップ52b
にて設定した優先順位データPRD (ACHN)に「
32」を加算し、キーコードKCが値「60」以上であ
ればステップ53cにて前記優先順位データPRD (
ACHN)に「26」を加算する。この値「60」は音
高04を示すキーコードKCに相当し、これにより音高
04を境に、前記優先順位データPRD (ACHN)
はさらに低音程割当て優先順位が低く重み付けられ、そ
の値は、第10図に示すように新たに押された鍵のキー
コードKCに応じて、音高AO〜C8に渡り「39」〜
r37J、r31J〜「28」のいずれかとなる。
Further, the CPU 14b inputs the key code KC in the key data KD indicating the newly pressed key in step 53a.
and the value "60", and the key code KC is the value "60".
If it is smaller, the above step 52b is performed in step 53b.
The priority data PRD (ACHN) set in
32'' is added, and if the key code KC is greater than or equal to the value ``60'', the priority order data PRD (
Add "26" to ACHN). This value "60" corresponds to the key code KC indicating pitch 04, so that the priority order data PRD (ACHN)
is further weighted to have a lower pitch priority, and its value ranges from "39" to pitches AO to C8, depending on the key code KC of the newly pressed key, as shown in FIG.
It will be one of r37J, r31J to "28".

上記優先順位データPRDの設定後、CPUl4bはス
テップ54 a、  54 bにて新たに押された鍵を
示すキーデータKD及び該鍵の鍵タッチ強さを示すタッ
チデータTDを一般しジスタ領域GNRから再び読出し
て、これらのデータKD、TDを各々割当てキーデータ
レジスタ領域AKDR及び割当てタッチデータレジスタ
領域ATDR内の上記割当てチャンネル番号データAC
HNが示すチャンネルに対応する位置に書込むことによ
り、押鍵割当てに伴う割当てキーデータAKD (AC
HN)及び割当てタッチデータATD (ACHN)の
設定を実行する。
After setting the priority data PRD, the CPU 14b in steps 54a and 54b outputs the key data KD indicating the newly pressed key and the touch data TD indicating the key touch strength of the key from the register area GNR. These data KD and TD are read out again and the assigned channel number data AC in the assigned key data register area AKDR and the assigned touch data register area ATDR are respectively read out.
By writing in the position corresponding to the channel indicated by HN, the assigned key data AKD (AC
HN) and assigned touch data ATD (ACHN).

次に、CPU14bはステップ55aにて再ひ上記汐フ
チデータTDを一般しジスタ領域GNPから再度読出し
、読出したタッチデータTDを右へ4ビツトシフトする
ことによりこのタッチデータTDを「16」で割算して
この割算結果を変数W G HTとして設定し、ステッ
プ55bにて上記音高による重み付けした優先順位デー
タPRD (ACHN)に変数WGHTを加算すること
により、優先順位データPRD (ACHN)をタフチ
データTDO値が大きい程割当て優先順位が低くなるよ
うに重み付けして、ステップ56にて「割当てchデー
タ設定」プログラムの処理を終了する。
Next, in step 55a, the CPU 14b again reads out the above-mentioned edge data TD from the register area GNP, shifts the read touch data TD to the right by 4 bits, and divides this touch data TD by "16". The result of this division is set as a variable WGHT, and in step 55b, the variable WGHT is added to the priority data PRD (ACHN) weighted by the pitch, thereby converting the priority data PRD (ACHN) into the tuff data TDO. Weighting is performed so that the larger the value is, the lower the allocation priority is, and in step 56, the processing of the "allocation channel data setting" program is terminated.

なお、上述の音高及び鍵タッチ強さに基づく優先順位デ
ータP RD (11〜PRD(N)の重み付けは、上
記ステップ52a、55aの割算値の変更及びステップ
53aの比較値の変更により種々に変更されるものであ
る。また、鍵タッチ検出回路10bがなくてタッチデー
タTDが得られない場合又は鍵タッチ強さの楽音の減衰
時間に与える影響が小さくてタッチデータTDに応じて
優先順位データP RD (1)〜PRD(N)の重み
付けを特に必要としない場合、CPU14bは第9図に
破線にて示すようにステップ54bの処理後、ステ・ノ
ブ55a、55bの処理を経ないで、ステップ56にて
このプログラムの実行を終了するようにしてもよい。
Note that the weighting of the priority order data PRD (11 to PRD(N)) based on the pitch and key touch strength described above can be varied by changing the division values in steps 52a and 55a and the comparison value in step 53a. In addition, when the touch data TD cannot be obtained because the key touch detection circuit 10b is not provided, or when the influence of the key touch strength on the decay time of the musical tone is small, the priority order is changed according to the touch data TD. If weighting of the data PRD(1) to PRD(N) is not particularly required, the CPU 14b does not perform the processing of the steering knobs 55a and 55b after the processing of step 54b, as shown by the broken line in FIG. , the execution of this program may be terminated at step 56.

上記「割当てchデータ設定」プログラムの実行を終了
すると、CPU14bは、第6図のステップ60にプロ
グラムを進め、ステップ60にて再び一般しジスタ領域
GNPからキーデータKDとタッチデータTDを読出し
て楽音発生回路13に出力するとともに、割当てチャン
ネルレジスタ領域ACHRから割当てチャンネル番号デ
ータACHNを読出して楽音発生回路13に出力する。
When the execution of the "assigned channel data setting" program is finished, the CPU 14b advances the program to step 60 in FIG. At the same time, the assigned channel number data ACHN is read out from the assigned channel register area ACHR and outputted to the tone generating circuit 13.

これにより、楽音発生回路13はマイクロコンピュータ
部14から鍵盤10にて新たに押された鍵を表すキーデ
ータKD、該鍵のタッチ強さを表すタッチデータTD及
び楽音を発生すべき楽音発生チャンネルを示すチャンネ
ル番号データCHNを入力することになり、同回路13
はこのチャンネル番号データCHNに基づき楽音を発生
すべき楽音発生チャンネルを指定し、この指定された楽
音発生チャンネルが上記キーデータKD中のキーオンデ
ータKO(“1”)に基づき、キーデータKD中のキー
コードKCにより指定された音高の楽音信号を発生し始
める。また、この楽音信号のエンベロープはそのアタッ
クレベルALがタッチデータに応じて決定され、かつそ
の減衰時定数DTがキーコードKCに応じて決定される
。このとき、同楽音発生チャンネルがいまだ他の楽音信
号を発生中であれば、との他の楽音信号の発生は停止さ
れて上記指定される音高の楽音信号の発生を開始する。
Thereby, the musical sound generation circuit 13 receives key data KD representing a newly pressed key on the keyboard 10, touch data TD representing the touch strength of the key, and a musical sound generation channel for generating a musical sound from the microcomputer section 14. The channel number data CHN shown in the diagram is input, and the same circuit 13
specifies the musical tone generating channel that should generate musical tones based on this channel number data CHN, and the specified musical tone generating channel is selected based on the key-on data KO (“1”) in the key data KD. A musical tone signal of the pitch specified by the key code KC begins to be generated. Furthermore, the attack level AL of the envelope of this musical tone signal is determined according to the touch data, and the decay time constant DT thereof is determined according to the key code KC. At this time, if the same musical tone generating channel is still generating another musical tone signal, generation of the other musical tone signal is stopped and generation of a musical tone signal of the specified pitch is started.

なお、上記のように他の楽音信号から新たに指定された
音高の楽音信号への切換え時には、新たな音のアタック
感を確保しかつクリック音の発生を防止するために、他
の楽音信号を所定の時定数で急速に減衰させた後上記切
換えを行うようにするとよい。
As mentioned above, when switching from another musical tone signal to a musical tone signal with a newly specified pitch, the other musical tone signal is It is preferable that the above switching is performed after rapidly attenuating with a predetermined time constant.

上記楽音発生回路13への新たに押された鍵に関するデ
ータの送出を終了すると、CPU14bはプログラムを
ステップ32に進め、上述のようにステップ32にて押
鍵及び操作検出レジスタ領域KOR内の押鍵イベントデ
ータKEVTIの有無を調べ、押鍵イベントデータKE
VTIがまだ存在する場合には、ステップ40の「割当
てchサーチ」プログラム、ステップ50の「割当てC
hデータ設定」プログラム及びステップ60の処理から
なる押鍵イベント処理ルーチンにより次の押鍵イベント
データKEVTIに対応する押鍵に関するデータを楽音
発生回路13に出力し、押鍵イベントデータKEvT1
がなくなるまで上記押鍵イベント処理ルーチンの循環処
理を実行し続ける。この循環処理により押鍵イベントデ
ータKEVTIが全て処理されると、CPUI 4 b
はステップ32にて「NO」と判断し、プログラムをス
テップ33に進め、押鍵及び操作検出レジスタ領域KO
R内に離鍵イベントデータKEVT2が存在しなければ
ステップ33にて「NO」と判定し、ステップ34の処
理により鍵処理ルーチンの実行を終了し、離鍵イベント
データKEVT2が存在すればステップ33にてrYE
sJと判定し、ステップ70〜73からなる離鍵イベン
ト処理ルーチンにプログラムを進める。
When the CPU 14b finishes sending the data regarding the newly pressed key to the musical sound generation circuit 13, the CPU 14b advances the program to step 32, and as described above, in step 32, the pressed key in the key pressed and operation detection register area KOR is sent. Check the presence or absence of event data KEVTI, and press key press event data KE.
If the VTI still exists, the "assignment channel search" program in step 40 and the "assignment C channel search" program in step 50 are executed.
h data setting" program and the key press event processing routine consisting of the processing in step 60, outputs data regarding the key press corresponding to the next key press event data KEVTI to the musical sound generation circuit 13, and generates the key press event data KEvT1.
The above-described cyclic processing of the key press event processing routine continues to be executed until the key press event processing routine runs out. When all the key press event data KEVTI is processed through this circular process, the CPU 4 b
determines “NO” in step 32, advances the program to step 33, and registers the key press and operation detection register area KO.
If the key release event data KEVT2 does not exist in R, a determination of "NO" is made in step 33, and the execution of the key processing routine is terminated by the processing in step 34. If the key release event data KEVT2 exists, the process proceeds to step 33. te rYE
sJ, and the program advances to a key release event processing routine consisting of steps 70-73.

この離鍵イベント処理ルーチンでは、CPU14bはス
テップ70にて押鍵及び操作レジスタ領域KORから、
キーデータKDからなる一つの離鍵イベントデータKE
VT2を読出して、一般レジスタ領域GNPに今後処理
するキーデータKDとして記憶した後、ステップ71に
て上記レジスタ領域KORの読出したi!鍵イベントデ
ータKEVT2を消去する。次に、cpui4bは前記
記憶したキーデータKDを読出し、このキーデータKD
のキーコードKCと同じキーコードKCを有しかつキー
オンデータKOが“1”である割当てキーデータAKD
を、割当てキーデータレジスタ領域AKDRに記憶され
ている割当てキーデータA K D (11〜AKD 
(N)の中から探し出し、探し出した割当てキーデータ
AKDのキーオンデータKOを0”に設定変更し、ステ
ップ73にてキーオンデータKOを0”に設定変更した
キーデータKD及び該キーデータKDが記憶されていた
チャンネルを表すチャンネル番号データCHNを楽音発
生回路13に出力する。これにより、楽音発生回路13
は前記チャンネル番号データCHNにて指定される楽音
発生チャンネルにて発生中の楽音信号の減衰を制御する
。このとき、後述するサスティンペダル処理ルーチンに
て設定されるサスティンデータSUSが“0”であれば
上記減衰は第3A図に破線で示すように急速に進み、ま
たサスティンデータSUSが“1ゝであれば上記減衰は
第3A図に実線にて示すように緩やかに進む。
In this key release event processing routine, the CPU 14b reads the key press and operation register area KOR in step 70.
One key release event data KE consisting of key data KD
After reading VT2 and storing it in the general register area GNP as key data KD to be processed in the future, in step 71 the read i! of the register area KOR is stored. Delete key event data KEVT2. Next, the cpui4b reads the stored key data KD and
Assigned key data AKD which has the same key code KC as the key code KC of and whose key-on data KO is "1"
, the assigned key data A K D (11 to AKD
(N), the key-on data KO of the found assigned key data AKD is changed to 0'', and the key data KD with the key-on data KO changed to 0'' in step 73 and the key data KD are stored. The channel number data CHN representing the channel that was being played is output to the tone generating circuit 13. As a result, the musical tone generation circuit 13
controls the attenuation of the musical tone signal being generated in the musical tone generation channel specified by the channel number data CHN. At this time, if the sustain data SUS set in the sustain pedal processing routine described later is "0", the above-mentioned attenuation will proceed rapidly as shown by the broken line in FIG. 3A, and even if the sustain data SUS is "1", In this case, the above-mentioned attenuation proceeds gradually as shown by the solid line in FIG. 3A.

このステップ73の処理後、CPU14bはプログラム
をステップ32に進め、ステップ32にてrNOJと判
定し、押鍵及び操作検出レジスタ領域KORの離鍵イベ
ントデータKEVT2がなくなるまでステップ32,3
3.70〜73の循環処理を実行し、離鍵イベントデー
タKEVT2がなくなると、ステップ33にてrNOJ
と判定し、ステップ34の処理にて鍵処理ルーチンの実
行を終了して第5図のステップ23のサスティンペダル
処理ルーチンの実行に移る。
After the processing in step 73, the CPU 14b advances the program to step 32, determines rNOJ in step 32, and steps 32 and 3 until the key release event data KEVT2 in the key press and operation detection register area KOR disappears.
3. When the cyclic processing from 70 to 73 is executed and the key release event data KEVT2 is no longer available, rNOJ is executed in step 33.
It is determined that the execution of the key processing routine is completed in step 34, and the execution of the sustain pedal processing routine of step 23 in FIG. 5 is started.

d、“サスティンペダル処理動作 サスティンペダル12の踏込み又は踏込み解除に伴うサ
スティンペダル処理動作について詳述すると、第5図の
ステップ23のサスティンペダル処理のプログラムは第
11図のフローチャートに詳細に示されている。このプ
ログラムにおいては、CPU14bはステップ80にて
プログラムの実行を開始し、ステップ81にてサスティ
ンペダルスイッチ回路12aからサスティンペダル12
の現状態を示す現状態データを読込み、ステップ82a
、82bにて一般しジスタ領域GNPに記憶されている
サスティンペダル12の以前の状態を示すサスティンデ
ータSUSと上記現状態データとを比較することにより
サスティンペダル12の状態変化を検出する。
d. "Sustain Pedal Processing Operation To explain in detail the sustain pedal processing operation that occurs when the sustain pedal 12 is depressed or released, the sustain pedal processing program in step 23 of FIG. 5 is shown in detail in the flowchart of FIG. 11. In this program, the CPU 14b starts executing the program in step 80, and in step 81, the sustain pedal switch circuit 12a switches the sustain pedal 12 to the sustain pedal switch circuit 12a.
Step 82a reads current state data indicating the current state of
, 82b, a change in the state of the sustain pedal 12 is detected by comparing the current state data with sustain data SUS indicating the previous state of the sustain pedal 12 stored in the register area GNP.

サスティンペダル12が以前踏込まれておらず新たに踏
込まれた場合、サスティンデータは“0であり上記取込
んだ現状態データは“1”であるので、CPU14bは
ステップ82aにてrYES」すなわちオンイベント有
りと判断し、ステンプ83aにてサスティンデータSU
Sを1”に設定変更する。次に、CPU14bは、ステ
ップ84aにて割当てキーデータレジスタ領域AKDR
に記憶されている割当てキーデータA K D (1)
〜AKD (N)を順次読出し、これらの割当てキーデ
ータA K D (1)〜AKD (N)の中に押鍵中
の鍵すなわちキーオンデータKOが“1”である鍵を表
す割当てキーデータAKDがあるか否かを調べて、押鍵
中の鍵に関する割当てキーデータAKDがあれば、ステ
ップ84bにて上記押鍵中の鍵に関する割当てキーデー
タAKDの中から最小のキーコードKCを有するものを
探し出し、該キーコードKCを最低音として一般しジス
タ領域GNHに記憶する。また、押鍵中に関する割当て
キーデータAKDがなければ、CPU14bはステップ
84aにてrNOJと判定し、ステップ84cにて一般
しジスタ領域GNR内の最低音キーコードLKCを鍵盤
、10における最高音C8のキーコードKC(108)
よりも大きい値、例えば「128」に設定する。これに
より、サスティンペダル12′が踏込まれた時点で鍵1
A10にて押されている鍵があれば、この鍵の中から最
低音が検出され、押されている鍵がなければ最低音が検
出されないことになる。なお、ステップ84cにて最低
音キーコードLKCを鍵盤10における最高音C8のキ
ーコードKC(108)より大きく設定したのは、サス
ティンペダル12が踏込み状態にあるときに新たな鍵が
押された場合、上述の第9図のステップ51a〜51c
の処理により該新たな鍵が最低音として検出されるよう
にするためである。
When the sustain pedal 12 has not been previously depressed and is newly depressed, the sustain data is "0" and the above-mentioned imported current state data is "1", so the CPU 14b returns rYES in step 82a. Judging that there is, sustain data SU at step 83a.
S is set to 1". Next, in step 84a, the CPU 14b changes the setting of the assigned key data register area AKDR.
Assigned key data A K D (1) stored in
~AKD (N) are sequentially read out, and among these assigned key data AKD (1) to AKD (N), assigned key data AKD representing the key being pressed, that is, the key whose key-on data KO is "1" is added. If there is any assigned key data AKD related to the currently depressed key, in step 84b, the one having the minimum key code KC is selected from among the assigned key data AKD related to the currently depressed key. The key code KC is found as the lowest note and stored in the register area GNH. Furthermore, if there is no assigned key data AKD regarding the currently pressed key, the CPU 14b determines rNOJ at step 84a, and at step 84c generally assigns the lowest note key code LKC in the register area GNR to the keyboard and the highest note C8 in 10. Key code KC (108)
For example, set it to a value larger than ``128''. As a result, when the sustain pedal 12' is depressed, the key 1
If there is a key pressed at A10, the lowest note among the keys will be detected, and if no key is pressed, the lowest note will not be detected. Note that the reason why the lowest note key code LKC is set larger than the key code KC (108) of the highest note C8 on the keyboard 10 in step 84c is because a new key is pressed while the sustain pedal 12 is in the depressed state. , steps 51a to 51c in FIG. 9 above.
This is to ensure that the new key is detected as the lowest note by the process.

上記最低音キーコードLKCの設定後、CPU14bは
ステップ85にてサスティンデータ5US(−1”)を
楽音発生回路13に出力し、ステップ86の処理により
サスティンペダル処理ルーチンの実行を終了する。楽音
発生回路13は、このサスティンデータSUS (=“
1′)を記憶し、以降このサスティンデータSUS (
−“1”)が変更されるまで各楽音発生チャンネルにて
発生される楽音の減衰特性を同データSUS (−“1
”)に基づき制御し、これにより、該楽音は%1を鍵さ
れても第3A図に実線で示すようにゆっくりと減衰する
ようになる。
After setting the lowest note key code LKC, the CPU 14b outputs sustain data 5US (-1") to the musical sound generation circuit 13 in step 85, and ends the execution of the sustain pedal processing routine through the process of step 86. Musical sound generation The circuit 13 uses this sustain data SUS (="
1'), and from now on this sustain data SUS (
The same data SUS (-“1”) shows the attenuation characteristics of the musical tones generated in each musical tone generation channel until the tone (-“1”) is changed.
”), and as a result, even when the musical tone is keyed at %1, it decays slowly as shown by the solid line in FIG. 3A.

サスティンペダル12が以前踏込まれており新たに踏込
みが解除された場合、一般レジスタ領域GNRに記憶さ
れているサスティンデータSUSは“1”であり、上記
ステップ81にて取込んだサスティンペダル12の現状
態データは“0”であるので、CPU14bはステップ
82aにて「NOJすなわちオンイベント無しと判定し
、ステップ82bにてrYEsJすなわちオフイベント
有りと判定して、ステップ83bにてサスティンデータ
SUSを′0”に設定変更し、ステップ84dにて一般
しジスタ領域GNR内の最低音キーコードLKCを鍵盤
10における最低音AoのキーコードKC(21)より
小さな値、例えばrlJに設定する。このように、最低
音キーコードLKCを鍵盤10の鍵を表すキーコードK
Cとして利用されていない値「1」に設定することは、
サスティンペダル12が踏込まれていないときには最低
音キーコードLKCをクリアしておくことを意味する。
If the sustain pedal 12 was previously depressed and is now released, the sustain data SUS stored in the general register area GNR is "1", and the sustain data SUS of the sustain pedal 12 imported in step 81 above is Since the state data is "0", the CPU 14b determines in step 82a that there is NOJ, that is, there is no on event, and in step 82b, determines that rYEsJ, that is, there is an off event, and in step 83b, the CPU 14b sets the sustain data SUS to '0'. ", and in step 84d, the lowest note key code LKC in the register area GNR is set to a value smaller than the key code KC (21) of the lowest note Ao on the keyboard 10, for example rlJ. In this way, the lowest key code LKC is changed to the key code K representing the 10th key of the keyboard.
Setting it to a value "1" that is not used as C is
This means that the lowest key code LKC is cleared when the sustain pedal 12 is not depressed.

このステップ84dの処理後、CPUl4bはステップ
85にて、上記と同様に、サスティンデータ5US(−
”0”)を楽音発生回路13に出力し、ステップ86の
処理によりサスティンペダル処理ルーチンの実行を終了
する。楽音発生回路13はこのサスティンデータSUS
 (−“0”)を記憶し、以降このサスティンデータ5
US(−O”)が変更されるまで各楽音発生チャンネル
にて発生される楽音の減衰特性を同データ5USO値“
0”に基づき制御し、これにより該楽音は1iIll!
されると第3A図に破線で示すように急速に減衰するよ
うになる。
After the processing in step 84d, the CPU 14b processes the sustain data 5US(-
"0") is output to the musical tone generating circuit 13, and the execution of the sustain pedal processing routine is completed by the process of step 86. The musical sound generation circuit 13 uses this sustain data SUS.
(-“0”), and from now on this sustain data 5
The attenuation characteristics of musical tones generated in each musical tone generation channel until US (-O") is changed are the same data 5 USO value "
0”, thereby the musical tone is 1iIll!
When this happens, it begins to rapidly attenuate as shown by the broken line in FIG. 3A.

さらに、サスティンペダル12の状態が変化しない場合
には、一般レジスタ領域GNRに記憶されているサステ
ィンデータSUSと上記ステップ81にて取込んだサス
ティンペダル12の現状態データは同じであり、CPU
14bは、ステップ82aにて「NO」すなわちオンイ
ベント無しと判定し、ステップ82bにて「No」すな
わちオフイベント無しと判定してステップ86の処理に
よりこのサスティンペダル処理ルーチンの実行を終了す
る。
Furthermore, if the state of the sustain pedal 12 does not change, the sustain data SUS stored in the general register area GNR and the current state data of the sustain pedal 12 imported in step 81 above are the same, and the CPU
14b determines "NO" in step 82a, that is, there is no on event, and determines as "No", that is, there is no off event in step 82b, and ends the execution of this sustain pedal processing routine through the process of step 86.

e、実施例の効果 以上の動作説明からも理解できる通り、上記実施例にお
いては、割当て優先順位を決定するための優先順位デー
タP RD (11〜PRD(N)は押鍵検出によって
のみ設定され、楽音発生回路13からの発生楽音の音量
を示すエンベロープ振幅値データ等を必要としないので
、この実施例に係る押鍵割当て装置は低コストにて実現
される。また、上記優先順位データP RD (1)〜
PRD (N)は、押鍵時に、第9図のステップ52a
、52b、53 a、  53 b、  53 cの処
理により音高が低くなるに従って大きくなる値に初期設
定され(第10図参照)、かつ第9図のステップ55a
、55bの処理により鍵タッチ強さが大きくなるに従っ
て大きくなる値に初期設定されて、この初期設定された
優先順位データP RD (11〜PRD (N)は第
7図のステップ42の処理により各データとも押鍵毎に
一率に減ぜられ、この減ぜられた優先順位デー・りP 
RD (1)〜PRD(N>に基づいてステップ45a
、45b、45dの処理により小さな値の優先順位デー
タPRDを記憶するチャンネルが、新たな鍵が押された
ときの該鍵の割当てチャンネルとして決定されるので、
該新たに押された鍵は、音高が低(かつ鍵タッチ強さが
大きくなるに従ってその減衰時間が長くなる楽音を発生
中のチャンネルには割当てられにくくなり、割当て優先
順位決定が押y!順のみにより決定されるものに比べて
適切になる。
e. Effects of the Embodiment As can be understood from the above explanation of the operation, in the above embodiment, the priority data PRD (11 to PRD(N)) for determining the allocation priority are set only by key press detection. Since the envelope amplitude value data indicating the volume of the generated musical tone from the musical tone generating circuit 13 is not required, the key press assignment device according to this embodiment can be realized at low cost. (1)~
When PRD (N) is pressed, step 52a in FIG.
, 52b, 53a, 53b, and 53c, the initial value is set to a value that increases as the pitch decreases (see FIG. 10), and step 55a of FIG.
, 55b, the initially set priority order data PRD (11 to PRD (N) are initialized to values that increase as the key touch strength increases, and the initialized priority order data PRD (11 to PRD (N) are each set by the processing of step 42 in FIG. Both data and data are reduced by one rate for each key press, and this reduced priority data is
Step 45a based on RD(1) to PRD(N>
, 45b, and 45d, the channel that stores the priority data PRD with a small value is determined as the channel to be assigned to the new key when the key is pressed.
The newly pressed key is less likely to be assigned to a channel that is currently generating a musical tone with a low pitch (and whose decay time becomes longer as the key touch strength increases, and the assignment priority order is determined by pressing y!). It is more appropriate than one determined only by the order.

また、トリル演奏等のように所定数(楽音発生チャンネ
ル数N)の押鍵操作の間に同一鍵が2回以上繰返し押さ
れた場合、第7図のステップ43a、43bの処理によ
り該鍵は2チヤンネルまで割当てを許容されるので、同
一鍵に関する楽音が2チヤンネルで同時に発生されて、
例えばピアノ等の自然楽器に見られるように発音源であ
る弦は後の打鍵に関する楽音を発生しているにもかかわ
らず、響板等の共鳴装置が前の打鍵に関する楽音を発生
するような効果がより良(シミュレートできる。また、
所定数(楽音発生チャンネル数N)の押l!操作の間に
同一鍵が3回以上繰返し押された場合には、第7図のス
テップ45c及び第8図のタイマ割込みプログラムの処
理により、鍵タッチ強さと押鍵からの時間経過とを考慮
して以前に押された同一鍵が割当てられているチャンネ
ルに該鍵が再度割当てられるようにしたので、同一鍵が
連続して何回も繰返し押されても全て若しくは大部分の
楽音発生チャンネルが同一鍵により専有されてしまうこ
とがなく、しかも同一鍵が割当てられているチャンネル
の中では小さな音量の方に新たに押された鍵の割当てが
なされるので、この割当ても適切なものとなる。なお、
この同一鍵の重複割当てはサスティンペダル12が踏込
まれていて、楽音の減衰時間が長い場合程、より大きな
効果となって現われる。
Furthermore, when the same key is repeatedly pressed twice or more during a predetermined number of key press operations (number of musical sound generation channels N), such as when playing a trill, the key is Assignment is allowed for up to two channels, so musical tones related to the same key can be generated simultaneously on two channels,
For example, as seen in natural instruments such as the piano, an effect where a resonant device such as a soundboard generates the musical sound related to the previous keystroke, even though the strings that are the sound source generate the musical sound related to the subsequent keystroke. is better (can be simulated. Also,
A predetermined number of presses (number of musical tone generation channels N)! If the same key is repeatedly pressed three or more times during the operation, step 45c in FIG. 7 and the timer interrupt program in FIG. The key is reassigned to the channel to which the same key previously pressed is assigned, so even if the same key is pressed many times in a row, all or most of the musical sound generation channels will be the same. This assignment is also appropriate because it will not be monopolized by a key, and among channels to which the same key is assigned, the newly pressed key will be assigned to the one with the lower volume. In addition,
This overlapping assignment of the same key becomes more effective as the sustain pedal 12 is depressed and the decay time of the musical tone is longer.

さらに、サスティンペダル12が踏まれていて、発生楽
音の減衰時間が長い場合、第9図のステップsib、s
ic及び第11図のステップ84b84cの処理により
最低音が検出され、第7図のステ’7プ44 a、  
44 b、  45 a、  45 bの処理により最
低音が割当てられているチャンネルには新たに押された
鍵の割当てが禁止されるようになっているので、該最低
音は引続き発生され続けることになり、ピアノ等で見ら
れるように、低音部の楽音の余韻を残したまま高音部の
速い押鍵による楽音を次々に発生させ名ことができる。
Furthermore, if the sustain pedal 12 is depressed and the decay time of the generated musical tone is long, steps sib and s in FIG.
ic and the process of steps 84b84c in FIG.
As a result of the processing in steps 44b, 45a, and 45b, the assignment of a newly pressed key to the channel to which the lowest note is assigned is prohibited, so the lowest note will continue to be generated. As seen on a piano, it is possible to generate musical tones one after another by rapidly pressing keys in the treble range while retaining the lingering sound of the low tones.

また、サスティンペダル12が踏込まれていす発生楽音
の減衰時間が短い場合、第11図のステップ84dの処
理により最低音が検出されないように最低音キーコード
LKCがクリアされるので、減衰時間が短く低音部(特
に最低音)の余韻が残らない場合には、上記割当て禁止
が解除されて新たに押された鍵の割当てが不必要に制限
されない。これにより、全ての楽音発生チャンネルが有
効に利用される。
Furthermore, when the sustain pedal 12 is depressed and the decay time of the musical sound generated is short, the lowest note key code LKC is cleared by the process of step 84d in FIG. 11 so that the lowest note is not detected, so the decay time is short. If the bass part (particularly the lowest note) does not have a lingering sound, the above-mentioned assignment prohibition is canceled and the assignment of the newly pressed key is not unnecessarily restricted. As a result, all musical tone generation channels are effectively utilized.

e、他の実施例 上記実施例においては、楽音発生回路13がピアノ、ハ
ープシコード等の減衰系の楽音を発生する電子楽器にこ
の発明に係る押鍵割当て装置が通用された例について説
明したが、この発明に係る押鍵割当て装置は、楽音発生
回路13がフルート、バイオリン等の持続系の楽音を発
生する電子楽器にも通用される。この場合、エンベロー
プ波形振幅値は、第3B図に実線にて示すように、押鍵
と同時に急速に立上がり、押鍵中はほぼ一定しベルSL
を維持し、離鍵後減衰時定数DTに応じて除々に減衰す
るものであり、この場合には楽音の減衰時間が押鍵タイ
ミングにより決定されないで離鍵タイミングにより決定
されるので、優先順位データP RD (11〜PRD
(N)の減算は%!I G3!されているチャンネルに
おいてのみ離鍵毎に実行されるようにする。すなわち、
第7図のステップ42の処理を「割当てchサーチ」プ
ログラムにおいて実行する代わり、第6図のステップ7
0〜73からなるrIIi鍵イベソイベント処理ルーチ
ン鍵されているチャンネルにおいてのみ実行するように
するまた、持続系の楽音のエンベロープ波形振幅値にお
いては、前記減衰時定数DTが音高が低くなるに従って
第3B図に一点鎖線で示すように変化し、かつ前記一定
レベルSLは鍵タッチ強さが大きくなるに従って第3B
図に二点鎖線で示すように変化する。さらに、持続系の
楽音を制御するために利用される鍵タノチキ食出装置は
通常押鍵深さ又は押鍵圧力を押鍵巾検出し続けるいわゆ
るアフタータッチセンサにより構成することもでき、前
記一定レベルSLはこの検出結果に基づき変更制御され
るので、この種のタッチ検出装置を有する電子楽器にこ
の発明に係る押鍵割当て装置を通用する場合、鍵タッチ
強さによる優先順位データPRD(1)〜PRD(N)
の重み付けは離鍵時に行うようにする。すなわち、第9
図のステップ55a、55bの処理は第6図のステップ
72又はステップ73の処理後に実行するようにし、こ
の場合には割当てチャンネル番号データACHNでなく
、ステップ72にて検出される離鍵チャンネルにより指
定されるチャンネルの優先順位データPRDを鍵タッチ
強さに応じて重み付けするとよい。
e. Other Embodiments In the above embodiments, an example has been described in which the key press assignment device according to the present invention is applied to an electronic musical instrument in which the musical tone generating circuit 13 generates attenuated musical tones such as a piano or a harpsichord. The key press assignment device according to the present invention is also applicable to electronic musical instruments in which the musical tone generating circuit 13 generates sustained musical tones such as flutes, violins, and the like. In this case, as shown by the solid line in FIG. 3B, the envelope waveform amplitude value rapidly rises at the same time as the key is pressed, and remains almost constant during the key depression.
is maintained and gradually attenuates in accordance with the decay time constant DT after key release.In this case, the decay time of the musical tone is not determined by the key press timing but by the key release timing, so the priority data PRD (11~PRD
Subtraction of (N) is %! IG3! It is executed every time the key is released only on the channel where the key is released. That is,
Instead of executing the process of step 42 in FIG. 7 in the "allocation channel search" program, step 7 in FIG.
The rIIi key eveso event processing routine consisting of 0 to 73 is executed only on the keyed channel.In addition, in the envelope waveform amplitude value of a sustained musical tone, the attenuation time constant DT changes as the pitch becomes lower. The constant level SL changes as shown by the dashed line in FIG. 3B, and the constant level SL increases as the key touch strength increases.
It changes as shown by the two-dot chain line in the figure. Furthermore, the key tanochiki ejection device used for controlling sustained musical tones can also be configured with a so-called aftertouch sensor that continuously detects the key depression depth or key depression pressure over the key depression width, and the key depression device used to control sustained musical tones can be configured with a so-called aftertouch sensor that continuously detects the key depression depth or key depression pressure. Since the SL is changed and controlled based on this detection result, when the key press assignment device according to the present invention is used in an electronic musical instrument having this type of touch detection device, the priority data PRD(1) to SL based on the key touch strength are used. PRD(N)
The weighting is performed when the key is released. That is, the ninth
The processing in steps 55a and 55b in the figure is executed after the processing in step 72 or step 73 in FIG. It is preferable to weight the priority order data PRD of the channels to be used depending on the key touch strength.

また、上記実施例においては、各鍵毎に設けられた押鍵
速度検出回路又は押鍵圧力検出回路から各鍵タッチ強さ
を表す信号が出力されるようにしたが、各鍵毎に第1及
び第2の固定接点と押鍵操作により可動する可動接点を
備えた切換え型のスイッチを有し、押鍵操作に応じて可
動接点が第1の固定接点から第2の固定接点に切換ねる
時間を計数手段により計測して押鍵速度を検出し、又は
各鍵毎に固定接点と押1!操作に応じて可動する可動接
点とを備えた2組のスイッチを有し、押1!操作に応じ
て2組のスイッチが各々閉成(又開成)されるタイミン
グ差を計数手段により計測して押鍵速度を検出する場合
には、前記計数手段を楽音発生チャンネル数分だけ用意
するようにし、押鍵割当てとともに前記計数手段の割当
てを行うようにして該計数手段の計数結果に応じて押鍵
に伴う鍵タッチ強さを表すデータを得るようにしてもよ
い。
In addition, in the above embodiment, a signal representing each key touch strength is output from the key press speed detection circuit or the key press pressure detection circuit provided for each key. and a changeover type switch including a second fixed contact and a movable contact that is movable by key press operation, and the time period during which the movable contact switches from the first fixed contact to the second fixed contact in response to the key press operation. is measured by a counting means to detect the key pressing speed, or by pressing a fixed contact for each key. It has two sets of switches with movable contacts that move according to the operation, and press 1! In the case where the key press speed is detected by measuring the timing difference between the closing (or opening) of two sets of switches in response to an operation using a counting means, it is preferable to prepare as many counting means as the number of musical sound generation channels. Then, the counting means may be assigned together with the key press assignment, so that data representing the key touch strength associated with the key press may be obtained in accordance with the counting result of the counting means.

また、上記実施例では、鍵盤10にて押された鍵は楽音
発生チャンネルのいずれ秀一つに割当てられ、該楽音発
生チャンネルは操作子群11の操作により選択された一
つの楽音を発生するようにしたので、優先順位データP
 RD (1)〜PRD(N)を音色に応じて重み付け
しなかったが、この発明に係る押鍵割当て装置を一押鍵
に対して異なる音色毎に複数の楽音発生チャンネルへの
割当てを行うようにした電子楽器に通用した場合、音色
毎に減衰時定数DTは変化するので上記音色毎の割当て
と同時に優先順位データP RD (1)〜PRD(N
)を割当て音色に応じて重み付けするようにするとよい
Further, in the above embodiment, a key pressed on the keyboard 10 is assigned to one of the musical tone generation channels, and the musical tone generation channel is configured to generate one musical tone selected by the operation of the operator group 11. Therefore, the priority data P
Although RD (1) to PRD (N) are not weighted according to the tone, the key press assignment device according to the present invention can be used to assign different tones to a plurality of musical sound generation channels for one pressed key. If the decay time constant DT changes for each tone, the priority data P RD (1) to PRD (N
) may be weighted according to the assigned timbre.

なお、上記実施例においては、割当ての優先順位を表す
優先順位データP RD (1)〜PRD (N)に基
づいて「割当てchサーチ」プログラムのステップ45
a、45b、45d (第7図)の処理により新たに押
された鍵の割当てチャンネルを決定するようにしたが、
上記〔従来技術〕の項で引用した特開昭52−2223
8号公報に示されるように、楽音発生回路13にて発生
されている実際の楽音の音量レベルが最小である楽音発
生チャンネルを探し出すことにより、前記割当てチャン
ネルを決定するようにしてもよい。この場合、CPU1
4は、上記ステップ45a、45b、45dにて、上記
実施例のような優先順位データPRD (1)〜(N)
の最小値を検出する処理に換え、楽音発生回路13の各
楽音発生チャンネルにおける楽音の音量レベル制御用の
エンベロープ波形振幅値を各々比較し、エンベロープ波
形振幅値が最も小さい(最低音量レベルの)楽音発生チ
ャンネルを検出して該チャンネルを割当てチャンネル番
号データACHNとして決定するようにするとよい。
In the above embodiment, step 45 of the "allocation channel search" program is performed based on the priority order data PRD (1) to PRD (N) representing the priority order of allocation.
The channels a, 45b, and 45d (Fig. 7) are used to determine the channel to which the newly pressed key is assigned.
JP-A-52-2223 cited in the [Prior Art] section above
As shown in Japanese Patent Application No. 8, the assigned channel may be determined by searching for a musical tone generating channel in which the volume level of the actual musical tone generated by the musical tone generating circuit 13 is the lowest. In this case, CPU1
4 is the priority order data PRD (1) to (N) as in the above embodiment in steps 45a, 45b, and 45d.
Instead of the process of detecting the minimum value of , the envelope waveform amplitude values for controlling the volume level of musical tones in each musical tone generation channel of the musical tone generation circuit 13 are compared, and the musical tone with the smallest envelope waveform amplitude value (lowest volume level) is selected. It is preferable to detect the generated channel and determine the channel as the assigned channel number data ACHN.

また、上記実施例においては、サスティンペダル12が
踏込まれていない状態においては、第11図のステップ
84dの処理により最低音キーコードLKCをクリアす
ることにより割当てキーデータA K D (1)〜A
KD(N)の中から最低音が検出されないようにして、
第7図のステップ44a。
Further, in the above embodiment, when the sustain pedal 12 is not depressed, the assigned key data A K D (1) to A are cleared by clearing the lowest note key code LKC through the process of step 84d in FIG.
In order to prevent the lowest note from being detected in KD(N),
Step 44a of FIG.

45bの処理により最低音に対応する鍵が割当てられて
いる楽音発生チャンネルにも新たに押された鍵が割当て
られる、すなわち上記楽音発生チャンネルを他の楽音発
生チャンネルとは区別せず、新たに押された鍵の割当て
られるべき楽音発生チャン”ネルが所定の優先順位に基
づき全ての楽音発生チャンネルの中から決定されるよう
にしたが、このことは第7図の「割当てchサーチ」プ
ログラムを第12図のフローチャートにより表されたプ
ログラムのように変形しても実現される。この第12図
のフローチャートに対応するプログラムにおいては、第
7図の場合に比べ、ステップ140.141,142の
処理が付加されており、CPU14bはステップ140
にてサスティンデータSUSに基づきサスティンペダル
12の状態を判断し、サスティンペダル12が踏込まれ
ていれば、ステップ44aにて上記実施例と同様最低音
でなくかつ離鍵に関する割当てキーデータAKDを記憶
するチャンネルを抽出し、サスティンペダル12の踏込
みが解除されていればステップ141にて最低音とは無
関係に離鍵に関する割当てキーデータAKDを記憶する
チャンネルを抽出し、上記抽出により該当チャンネルが
ある場合にはステップ44b、45aの処理により該当
チャンネルの中から優先順位データPRDに基づき割当
てチャンネルが決定される。そして、上記該当チャンネ
ルがない場合には、ステップ142にて再びサスティン
データSUSに基づきサスティンペダル12の状態が判
断され、サスティンペダル12が踏込まれていればステ
ップ45bにて最低音に対応する鍵が割当てられていな
い楽音発生チャンネルの中から優先順位データPRDに
基づき割当てチャンネルが決定され、またサスティンペ
ダル12の踏込みが解除されていればステップ45dに
て最低音とは無関係に全ての楽音発生チャンネルの中か
ら優先順位データPRDに基づき割当てチャンネルが決
定される。これにより、上記実施例と同等な効果が達成
される。
As a result of the processing in step 45b, the newly pressed key is also assigned to the musical sound generation channel to which the key corresponding to the lowest note has been assigned. The musical tone generation channel to which the assigned key is to be assigned is determined from among all the musical tone generation channels based on a predetermined priority order. It can also be realized by modifying the program as shown in the flowchart of FIG. In the program corresponding to the flowchart of FIG. 12, steps 140, 141, and 142 are added compared to the case of FIG.
In step 44a, the state of the sustain pedal 12 is determined based on the sustain data SUS, and if the sustain pedal 12 is depressed, in step 44a, assigned key data AKD relating to a key release that is not the lowest note is stored, as in the above embodiment. The channel is extracted, and if the sustain pedal 12 is released, the channel for storing the assigned key data AKD related to key release is extracted regardless of the lowest note in step 141, and if there is a corresponding channel by the above extraction, the channel is extracted. In step 44b and step 45a, an assigned channel is determined from among the corresponding channels based on the priority order data PRD. If there is no corresponding channel, the state of the sustain pedal 12 is determined again based on the sustain data SUS in step 142, and if the sustain pedal 12 is depressed, the key corresponding to the lowest note is selected in step 45b. An assigned channel is determined based on the priority data PRD from among unassigned musical tone generation channels, and if the sustain pedal 12 is released, all musical tone generation channels are assigned regardless of the lowest note in step 45d. An allocated channel is determined from among them based on the priority order data PRD. Thereby, effects equivalent to those of the above embodiment can be achieved.

また、上記実施例では、サスティンペダル12が踏込ま
れている状態にて最低音に対応する鍵が割当てられてい
る楽音発生チャンネルのみ新たに押された鍵の割当てを
禁止するようにしたが、最低音キーコードLKCの設定
処理及び第7図(又は第12図)のステップ44a、4
5bの処理を変更することにより、上記鍵が、 (11最・高音に対応する鍵が割当てられている楽音発
生チャンネル、 (2)低音側又は高音側から2音若しくは3音に対応す
る鍵が割当てられている楽音発生チャンネル、(3)最
低音又は最高音から所定音域例えば1乃至2オクタ一ブ
程度の所定音域に含まれる音に対応する鍵が割当てられ
ている楽音発生チャンネル、(4)所定音域(例えば低
音域、中音域、高音域)に属する音に対応する鍵が割当
てられている楽音発生チャンネル、または、 (5)上記(1)〜(4)を各々組合せた楽音発生チャ
ンネル、には、割当てられないようにしてもよい。この
場合、上記楽音発生チャンネルにて発生される楽音の減
衰時間を長くする(減衰時定数DTを大きくする)こと
により、上記楽音を他の楽音に比べ長く発生させ続ける
ことができ、今までにない演奏効果が達成される。なお
、サスティンペダル12の踏込み又は踏込み解除には関
係なく楽音の減衰時間がある程度長い場合又はサスティ
ンペダル12がない場合には、サスティンペダル12の
状態を上記割当て禁止の条件とする必要はない。
Further, in the above embodiment, the assignment of a newly pressed key is prohibited only to the musical sound generation channel to which the key corresponding to the lowest note is assigned while the sustain pedal 12 is depressed. Sound key code LKC setting process and steps 44a and 4 in FIG. 7 (or FIG. 12)
By changing the process in step 5b, the above key is changed to (11) the musical sound generation channel to which the key corresponding to the highest note is assigned, (2) the key corresponding to the second or third note from the bass side or the treble side. (3) A musical sound generation channel to which a key corresponding to a sound included in a predetermined range from the lowest or highest note, for example, about 1 to 2 octaves, is assigned; (4) A musical sound generation channel to which keys corresponding to sounds belonging to a predetermined sound range (for example, a low range, a middle range, and a high range) are assigned, or (5) a musical sound generation channel that is a combination of each of (1) to (4) above; In this case, by lengthening the decay time of the musical tone generated in the musical tone generation channel (increasing the decay time constant DT), the musical tone may be assigned to other musical tones. It can continue to be generated for a longer time than before, and an unprecedented performance effect can be achieved.In addition, if the decay time of the musical tone is long to some extent regardless of whether the sustain pedal 12 is depressed or released, or if the sustain pedal 12 is not present. In this case, it is not necessary to set the state of the sustain pedal 12 as a condition for prohibiting the above-mentioned allocation.

さらに、上記実施例では、この発明に係る押鍵割当て装
置を既存のマイクロコンピュータを用いて構成するよう
にしたが、この押鍵割当て装置を上記実施例のプログラ
ムの各処理に応じた機能を有する各電気回路を組合せた
ハード回路により構成するようにしてもよい。
Further, in the above embodiment, the key press assignment device according to the present invention is configured using an existing microcomputer, but this key press assignment device has functions corresponding to each process of the program of the above embodiment. It may be configured by a hard circuit that combines each electric circuit.

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

第1図は特許請求の範囲に記載した発明の構成に対応す
る図、第2図はこの発明が通用される電子楽器の一実施
例を示す概略図、第3A図及び第3B図は楽音のエンベ
ロープ波形を示す図、第4A図乃至第4F図は第2図の
マイクロコンピュータ部14内に設けられたRAM14
Cのメモリマツプの一例を示す図、第5図乃至第9図及
び第11図は第2図のマイクロコンピュータ部14で実
行されるプログラムに対応するフローチャートの一例を
示す図、第10図は音高に対応する優先順位データの初
期値の一例を示す図、及び第12図は第7図に示された
プログラムを一部変形した変形プ゛ログラムに対応する
フローチャートの一例を示す図である。 符号の説明 10・・・g!!盤、10a・・・鍵スィッチ回路、1
0b・・・鍵タッチ検出回路、11・・・操作子群、l
la・・・操作子スイッチ回路、12・・・サスティン
ペダル、12a・・・サスティンペダルスイッチ回路、
13・・・楽音発生回路、14・・・マイクロコンピュ
ータ部。 出願人  日本楽器製造株式会社 代理人  弁理士 長 谷 照 − (外1名) 第3A図       第3B図 割当チーF−?ン木ル    押鍵・操作検出    
一般レジスタレジスタ          レジスタ第
4E図   第4F図
FIG. 1 is a diagram corresponding to the configuration of the invention described in the claims, FIG. 2 is a schematic diagram showing an embodiment of an electronic musical instrument to which this invention is applicable, and FIGS. 3A and 3B are diagrams showing musical tones. 4A to 4F are diagrams showing envelope waveforms of the RAM 14 provided in the microcomputer section 14 of FIG.
5 to 9 and 11 are diagrams showing an example of a flowchart corresponding to the program executed by the microcomputer section 14 of FIG. 2, and FIG. FIG. 12 is a diagram showing an example of an initial value of priority order data corresponding to the program shown in FIG. Explanation of symbols 10...g! ! Panel, 10a...Key switch circuit, 1
0b... Key touch detection circuit, 11... Operator group, l
la...operator switch circuit, 12...sustain pedal, 12a...sustain pedal switch circuit,
13... musical tone generation circuit, 14... microcomputer section. Applicant Nippon Musical Instruments Co., Ltd. Agent Patent Attorney Teru Hase - (1 other person) Figure 3A Figure 3B Assignment Chi F-? Key press/operation detection
General Register Register Register Figure 4E Figure 4F

Claims (1)

【特許請求の範囲】 鍵盤にて押された鍵を鍵の数より少ない複数の楽音発生
チャンネルのいずれかに割当てる電子楽器の押鍵割当て
装置において、 前記鍵盤の鍵を表すとともに前記楽音発生チャンネルに
て発生されるべき楽音の音高を指定するキー情報を各々
前記各楽音発生チャンネルに対応して記憶する複数の記
憶チャンネルからなるキー情報記憶手段と、 前記鍵盤にて新たに押された鍵を表すキー情報と同一キ
ー情報を記憶している前記記憶チャンネルの数を検出す
るチャンネル数検出手段と、前記検出した記憶チャンネ
ルの数が2以上かつ前記楽音発生チャンネルの数未満の
所定整数値より小さいとき前記新たに押された鍵を表す
キー情報を前記記憶チャンネルのうちのいずれかに記憶
させることにより前記新たに押された鍵の割当てを制御
し、かつ前記検出した記憶チャンネルの数が前記所定整
数値以上のとき前記新たに押された鍵を表すキー情報を
該キー情報と同一キー情報を記憶している前記記憶チャ
ンネルのうちのいずれかに記憶させることにより前記新
たに押された鍵の割当てを制御する割当て制御手段と を備えたことを特徴とする電子楽器の押鍵割当て装置。
[Scope of Claims] A key press assignment device for an electronic musical instrument that assigns a key pressed on a keyboard to one of a plurality of musical sound generation channels smaller than the number of keys, wherein a key representing a key of the keyboard and a key assigned to the musical sound generation channel is provided. key information storage means comprising a plurality of storage channels for storing key information specifying the pitch of a musical tone to be generated in correspondence with each of the musical tone generation channels; channel number detection means for detecting the number of said storage channels storing the same key information as the expressed key information; and the number of said detected storage channels is smaller than a predetermined integer value of 2 or more and less than the number of musical tone generation channels. when the assignment of the newly pressed key is controlled by storing key information representing the newly pressed key in one of the storage channels, and the number of the detected storage channels is within the predetermined number. When the value is greater than or equal to an integer value, key information representing the newly pressed key is stored in one of the storage channels that stores the same key information as the key information. 1. A key press assignment device for an electronic musical instrument, comprising: assignment control means for controlling assignment.
JP61108986A 1986-05-13 1986-05-13 Keying allotter for electronic musical apparatus Granted JPS6291996A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61108986A JPS6291996A (en) 1986-05-13 1986-05-13 Keying allotter for electronic musical apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61108986A JPS6291996A (en) 1986-05-13 1986-05-13 Keying allotter for electronic musical apparatus

Publications (2)

Publication Number Publication Date
JPS6291996A true JPS6291996A (en) 1987-04-27
JPH0335679B2 JPH0335679B2 (en) 1991-05-29

Family

ID=14498688

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61108986A Granted JPS6291996A (en) 1986-05-13 1986-05-13 Keying allotter for electronic musical apparatus

Country Status (1)

Country Link
JP (1) JPS6291996A (en)

Also Published As

Publication number Publication date
JPH0335679B2 (en) 1991-05-29

Similar Documents

Publication Publication Date Title
JPH03174590A (en) Electronic musical instrument
JP2655905B2 (en) Electronic musical instrument channel assignment device
JPS6290697A (en) Keying allotter for electronic musical apparatus
JPS6291996A (en) Keying allotter for electronic musical apparatus
JP2531317B2 (en) Key press assigning device for electronic musical instruments
JP3008419B2 (en) Electronic musical instrument
JPH0335680B2 (en)
JP2629418B2 (en) Music synthesizer
JP2526636B2 (en) Electronic musical instrument
JP3114283B2 (en) Music signal generator
JPH0572596B2 (en)
JP2640267B2 (en) Electronic musical instrument
JPH0127439B2 (en)
JP2953217B2 (en) Electronic musical instrument
JPH08278781A (en) Sound source module
JPH05281967A (en) Key assignor of electronic musical instrument
JPH0127438B2 (en)
JPH0515279B2 (en)
JP2023045357A (en) Electronic music instrument, method and program
JP2685419B2 (en) Electronic musical instrument channel assignment device and channel assignment method
JP3143039B2 (en) Automatic performance device
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP3861897B2 (en) Performance data processing device
JP2814479B2 (en) Electronic musical instrument
JPH08335082A (en) Electronic musical instrument having automatic playing function

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term