JPH0728464A - Electronic musical instrument - Google Patents

Electronic musical instrument

Info

Publication number
JPH0728464A
JPH0728464A JP5195360A JP19536093A JPH0728464A JP H0728464 A JPH0728464 A JP H0728464A JP 5195360 A JP5195360 A JP 5195360A JP 19536093 A JP19536093 A JP 19536093A JP H0728464 A JPH0728464 A JP H0728464A
Authority
JP
Japan
Prior art keywords
channel
key
time
data
performance data
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
JP5195360A
Other languages
Japanese (ja)
Other versions
JP2674476B2 (en
Inventor
Takashi Ikeda
隆志 池田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP5195360A priority Critical patent/JP2674476B2/en
Publication of JPH0728464A publication Critical patent/JPH0728464A/en
Application granted granted Critical
Publication of JP2674476B2 publication Critical patent/JP2674476B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

PURPOSE:To prevent a musical sound from being broken owing to truncation by selecting a channel among allocated automatic performance data on the basis of key-OFF time information corresponding to each automatic performance data unless there is a free channel among time-division channels. CONSTITUTION:This electronic musical instrument has the time-division channels for an automatic musical performance, the automatic performance data are assigned to the time-division channels and supplied to a sound source circuit, and musical sound signals are generated on the basis of the automatic performance data assigned by the channels. A buffer a2 is a key-OFF preparation channel buffer and stored with the channel number of a channel to be keyed OFF at next timing on the basis of the remaining gate time of a remaining gate time buffer a3. Then when there is no free channel to be truncated in a key-OFF channel buffer a1, a channel to be truncated is selected in the key- OFF preparation channel buffer a2.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、複数の時分割チャンネ
ルの中から所望のチャンネルをトランケートし、そのチ
ャンネルにイベントデータを割り当てる電子楽器に関す
る。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic musical instrument that truncates a desired channel from a plurality of time division channels and assigns event data to the channel.

【0002】[0002]

【従来の技術】従来、複数の時分割チャンネルにイベン
トデータを割り当てることにより楽音を発生するように
構成した電子楽器において、イベントデータを時分割チ
ャンネルに割り当てる際に、空きチャンネルを検索し、
その空きチャンネルにイベントデータを割り当てるよう
にしていた。一方、このとき、全てのチャンネルにイベ
ントデータが割り当てられ、空きチャンネルが存在して
いない場合には、使用中のチャンネルの内、エンベロー
プの減衰が最も進んでいるチャンネルの楽音や、最も古
くキーオンされたチャンネルの楽音を強制的に減衰させ
る(これを、「トランケート」という)ことにより、当
該チャンネルを開放して新たなイベントデータを割り当
てるようにしていた。
2. Description of the Related Art Conventionally, in an electronic musical instrument configured to generate a musical sound by allocating event data to a plurality of time-division channels, when allocating event data to the time-division channels, a free channel is searched for,
Event data was assigned to the empty channel. On the other hand, at this time, if event data is assigned to all channels and there is no empty channel, the tone of the channel with the highest envelope attenuation among the channels in use, or the oldest key-on. By forcibly attenuating the musical sound of a channel (this is called "truncate"), the channel is released and new event data is assigned.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、上記従
来の電子楽器が各チャンネルのエンベロープレベルを監
視することができない音源回路を搭載している場合に
は、上述したエンベロープの減衰が最も進んだチャンネ
ルをトランケートする技術を用いることはできない。ま
た、最も古くキーオンされたチャンネルをトランケート
するように構成した電子楽器では、最も古くキーオンさ
れたチャンネルが最も早くキーオフされるとは限らない
ために、長く持続するはずの楽音が途中で途切れてしま
う虞があった。
However, when the above-described conventional electronic musical instrument is equipped with a sound source circuit that cannot monitor the envelope level of each channel, the channel with the most advanced envelope attenuation is selected. The technique of truncation cannot be used. Also, with electronic musical instruments configured to truncate the oldest keyed-on channel, the earliest keyed-on channel may not always be keyed off earliest, resulting in a break in the tones that should last long. I was afraid.

【0004】本発明は、上記問題に鑑みてなされたもの
で、簡単な構成で、トランケートによる楽音の途切れを
防止することが可能な電子楽器を提供することを目的と
する。
The present invention has been made in view of the above problems, and an object of the present invention is to provide an electronic musical instrument having a simple structure and capable of preventing interruption of a musical sound due to truncation.

【0005】[0005]

【課題を解決するための手段】上記目的を達成するため
本発明は、複数のチャンネルにイベントデータを割り当
てるように構成された電子楽器において、各イベントデ
ータに対応したキーオフ時間情報を含む自動演奏データ
を記憶する記憶手段と、該記憶された自動演奏データを
読み出す読み出し手段と、該読み出された自動演奏デー
タを前記チャンネルに割り当てる割当手段と、前記チャ
ンネルに空きチャンネルがないときは、前記割当手段に
より既に割り当てられた自動演奏データの中から当該各
自動演奏データに対応するキーオフ時間情報に基づいて
割り当てるチャンネルを決定する決定手段とを有し、該
決定されたチャンネルをトランケートし、前記割当手段
により新たなイベントデータを割り当てることを特徴と
する。
In order to achieve the above object, the present invention provides an automatic musical instrument data including key-off time information corresponding to each event data in an electronic musical instrument configured to assign event data to a plurality of channels. Storing means for storing the stored automatic performance data, reading means for reading the stored automatic performance data, allocating means for allocating the read automatic performance data to the channels, and the allocating means when there is no vacant channel in the channels. Determining means for deciding a channel to be assigned based on the key-off time information corresponding to each of the automatic performance data, which has already been assigned by the above, and truncating the determined channel. It is characterized by allocating new event data.

【0006】[0006]

【作用】時分割チャンネルに空きチャンネルがないとき
には、決定手段により、割当手段によって割り当てられ
た自動演奏データの中から当該各自動演奏データに対応
するキーオフ時間情報に基づいて割り当てられるチャン
ネルが決定され、当該チャンネルがトランケートされ、
そのチャンネルに新たなイベントデータが割り当てられ
る。
When there is no vacant channel in the time division channel, the deciding means decides the channel to be assigned from the automatic performance data assigned by the assigning means based on the key-off time information corresponding to each automatic performance data. The channel is truncated,
New event data is assigned to the channel.

【0007】[0007]

【実施例】以下、本発明の実施例を図面に基づき詳細に
説明する。
Embodiments of the present invention will now be described in detail with reference to the drawings.

【0008】図1は、本発明に係る電子楽器の一実施例
の概略構成を示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an electronic musical instrument according to the present invention.

【0009】同図において、楽音の音高を指定する鍵盤
1は、その押鍵状態を検出し、押鍵された鍵のキーコー
ド等を生成する検出回路2を介して、バス3に接続され
ている。同様に、テンポを設定するテンポ設定スイッチ
(図示せず)や自動演奏の開始/終了を指示するスター
ト/ストップスイッチ(図示せず)等から成るパネルス
イッチ4も各スイッチの押下状態を検出する検出回路5
を介してバス3に接続されている。
In FIG. 1, a keyboard 1 for designating the pitch of a musical tone is connected to a bus 3 via a detection circuit 2 which detects the key-depressed state and generates a key code of the depressed key. ing. Similarly, the panel switch 4 including a tempo setting switch (not shown) for setting the tempo and a start / stop switch (not shown) for instructing the start / end of automatic performance is also detected to detect the pressed state of each switch. Circuit 5
Is connected to the bus 3 via.

【0010】また、バス3には、装置全体の制御を司る
CPU6、CPU6に接続されてタイマ割り込み時間等
の時間を計時するタイマ7、RAM8、ROM9が接続
され、これらの要素は検出回路2,5等と共にバス3を
介して相互に接続されている。
Further, the bus 3 is connected with a CPU 6 which controls the entire apparatus, a timer 7 which is connected to the CPU 6 and measures a time such as a timer interrupt time, a RAM 8 and a ROM 9, and these elements are the detection circuits 2 and 3. 5 and the like are connected to each other via a bus 3.

【0011】RAM8は、演算結果や各種情報等を一時
格納するためのランダムアクセスメモリであり、本実施
例ではこれに加えて後述する各種バッファを備えてい
る。また、ROM9は、CPU6が実行する制御プログ
ラムや予めプリセットされた自動演奏データ等を格納す
るリードオンリメモリである。
The RAM 8 is a random access memory for temporarily storing calculation results, various information and the like, and in the present embodiment, in addition to this, various buffers described later are provided. The ROM 9 is a read-only memory that stores a control program executed by the CPU 6, preset automatic performance data, and the like.

【0012】さらに、バス3には、各種入力情報(例え
ば、設定されたテンポや自動演奏データの名称)等を表
示する表示回路10と、CPU6によりバス3を介して
出力された演奏データに従ってデジタル楽音信号を生成
する音源回路11とが接続されている。音源回路11に
は、デジタル信号をアナログ信号に変換するD/Aコン
バータ12が接続され、D/Aコンバータ12は、アナ
ログ楽音信号を楽音に変換するスピーカ等のサウンドシ
ステム13に接続されている。
Further, the bus 3 is provided with a display circuit 10 for displaying various input information (for example, a set tempo and a name of automatic performance data) and the like, and a digital data in accordance with the performance data output by the CPU 6 via the bus 3. A tone generator circuit 11 for generating a tone signal is connected. A D / A converter 12 that converts a digital signal into an analog signal is connected to the sound source circuit 11, and the D / A converter 12 is connected to a sound system 13 such as a speaker that converts an analog musical sound signal into a musical sound.

【0013】ここで、本実施例の電子楽器は、自動演奏
用に16チャンネルの時分割チャンネルを備え、自動演
奏データがその時分割チャンネルに割り当てられて音源
回路11に供給され、音源回路11により、各チャンネ
ル毎に割り当てられた自動演奏データに基づいた楽音信
号が生成され、それらの各楽音信号が全チャンネル分累
算された後に、D/Aコンバータ12およびサウンドシ
ステム13を介して、楽音として出力されるように構成
されている。
Here, the electronic musical instrument of the present embodiment is provided with 16 time-division channels for automatic performance, and the automatic performance data is assigned to the time-division channels and supplied to the tone generator circuit 11. Musical tone signals are generated based on the automatic performance data assigned to each channel, and the musical tone signals are accumulated for all channels and then output as musical tones via the D / A converter 12 and the sound system 13. It is configured to be.

【0014】図2は、図1のRAM8内の各種バッファ
を説明するための図である。
FIG. 2 is a diagram for explaining various buffers in the RAM 8 of FIG.

【0015】同図において、バッファa1はリングバッ
ファにより構成されたキーオフチャンネルバッファであ
り、“RP”および“WP”はそれぞれ「読み出しポイ
ンタ(Read Pointer)」および「書き込みポインタ(Wr
ite Pointer)」を示している。各ポインタRP,WP
は、右に移動しながら格納されたデータを一つづつ読み
出しまたは書き込みを行う。ここで、キーオフチャンネ
ルバッファa1に格納されるデータは、後述するゲート
タイム残り時間バッファa3のゲートタイムの残り時間
が“1”から“0”に移行したチャンネルのチャンネル
番号、即ち、キーオフされてエンベロープレベルが減衰
しているチャンネルのチャンネル番号である。そして、
読み出しポインタRPから書き込みポインタWPまでの
データ(チャンネル番号)が新しいイベントデータが割
り当て(アサイン)られるべきチャンネルのチャンネル
番号となる。
In the figure, a buffer a1 is a key-off channel buffer composed of a ring buffer, and "RP" and "WP" are a "read pointer" and a "write pointer (Wr)", respectively.
ite Pointer) ”. Each pointer RP, WP
Reads or writes the stored data one by one while moving to the right. Here, the data stored in the key-off channel buffer a1 is the channel number of the channel whose gate time remaining time in the gate time remaining time buffer a3, which will be described later, has changed from “1” to “0”, that is, the key-off and the envelope. This is the channel number of the channel whose level is attenuated. And
The data (channel number) from the read pointer RP to the write pointer WP becomes the channel number of the channel to which new event data is to be assigned (assigned).

【0016】次に、バッファa2は、キーオフ準備チャ
ンネルバッファであり、ゲートタイム残り時間バッファ
a3のゲートタイムの残り時間が“2”から“1”に移
行したチャンネルのチャンネル番号、即ち、次のタイミ
ング(後述する割り込みタイミング)でキーオフされる
チャンネルのチャンネル番号が格納される。そして、前
記キーオフチャンネルバッファa1にトランケートする
べきチャンネルがないときに、このキーオフ準備チャン
ネルバッファa2からトランケートされるチャンネルが
選択される。
Next, the buffer a2 is a key-off preparation channel buffer, and the channel number of the channel in which the remaining gate time of the gate time remaining time buffer a3 has changed from "2" to "1", that is, the next timing. The channel number of the channel keyed off at (interrupt timing described later) is stored. Then, when there is no channel to be truncated in the key-off channel buffer a1, the channel to be truncated is selected from the key-off preparation channel buffer a2.

【0017】さらに、バッファa3は、前記ゲートタイ
ム残り時間バッファであり、このゲートタイム残り時間
バッファa3には前述した時分割チャンネル(16チャ
ンネル)分のゲートタイムの残り時間が格納され、タイ
マー割り込みのタイミングで“1”ずつデクリメントさ
れる。そして、ゲートタイムの残り時間が“2”から
“1”になったときのチャンネルのチャンネル番号が全
て前記キーオフ準備チャンネルバッファa2に書き込ま
れ、ゲートタイムの残り時間が“1”から“0”になっ
たときにキーオフ準備チャンネルバッファa2に書き込
まれたチャンネル番号が全て、キーオフチャンネルバッ
ファa1に、書き込みポインタWPにより指示される位
置から順次書き込まれる。
Further, the buffer a3 is the gate time remaining time buffer, and the gate time remaining time buffer a3 stores the remaining time of the gate time for the time-division channels (16 channels) described above, which is a timer interrupt. The timing is decremented by "1". Then, all the channel numbers of the channels when the remaining gate time changes from "2" to "1" are written in the key-off preparation channel buffer a2, and the remaining gate time changes from "1" to "0". All the channel numbers written in the key-off preparation channel buffer a2 when the time is reached are sequentially written in the key-off channel buffer a1 from the position designated by the write pointer WP.

【0018】図3は、図1のROM9にプリセットされ
た自動演奏データのデータフォーマットを示す図であ
る。
FIG. 3 is a diagram showing a data format of automatic performance data preset in the ROM 9 of FIG.

【0019】自動演奏データは、イベントデータの発音
タイミングを示すタイミングデータb1と、発音する音
高を示すノートナンバ、その強さを示すベロシティ、前
記ゲートタイムから成るノートイベントb2と、該ノー
トイベントb2以外のデータ、例えば音量制御やピッチ
ベンド等のデータを示すコントロールチェンジデータb
3と、1小節の区切りを示す小節線データb4と、自動
演奏データの終わりを示すエンドデータb5とにより構
成されている。
The automatic performance data includes timing data b1 indicating the sounding timing of the event data, a note number indicating the pitch to be sounded, a velocity indicating its strength, a note event b2 consisting of the gate time, and the note event b2. Control change data b indicating data other than the above, such as data for volume control and pitch bend
3 and 3, bar line data b4 indicating a 1-bar division, and end data b5 indicating the end of the automatic performance data.

【0020】以上のように構成された電子楽器におい
て、CPU6が実行する制御処理を、図4〜図10のフ
ローチャートを参照して説明する。
The control processing executed by the CPU 6 in the electronic musical instrument configured as described above will be described with reference to the flow charts of FIGS.

【0021】図4は、メインルーチンの処理手順を示す
フローチャートである。
FIG. 4 is a flow chart showing the processing procedure of the main routine.

【0022】まず、ステップS1で各種バッファやCP
U6等の初期設定を行い、ステップS2で図1の鍵盤1
による鍵のキーオン/キーオフ処理である鍵盤処理を行
い、ステップS3で図1のパネルスイッチ4に配設され
た前記テンポ設定スイッチや前記スタート/ストップス
イッチ等の押下処理であるパネルスイッチ処理を行い、
ステップS4で表示処理等のその他の処理を行った後
に、ステップS2に戻ってステップS2〜ステップS4
の処理を繰り返す。
First, in step S1, various buffers and CP
Initialize U6, etc., and in step S2, play the keyboard 1
The keyboard processing is the key-on / key-off processing of the key by the key processing, and the panel switch processing, which is the pressing processing of the tempo setting switch and the start / stop switch provided in the panel switch 4 of FIG.
After performing other processing such as display processing in step S4, the process returns to step S2 and steps S2 to S4.
The process of is repeated.

【0023】図5は、タイマ割り込み処理の手順を示す
フローチャートである。
FIG. 5 is a flowchart showing the procedure of timer interrupt processing.

【0024】本実施例において、タイマ割り込み要求
は、図1のタイマ7により96分長毎に1回の割合でな
されるように構成されている。即ち、タイマ7は96分
長に相当する時間を計時する毎に、CPU6に対して割
り込み要求を出力して、CPU6は、この割り込み要求
を受けてメインルーチンからタイマ割り込みルーチンへ
処理を移行させる。この96分長に相当する時間は、テ
ンポの変更に従って変化するため、テンポにより割り込
み要求がなされる時間間隔は変化することになる。
In this embodiment, the timer interrupt request is made by the timer 7 of FIG. 1 once every 96 minutes. That is, the timer 7 outputs an interrupt request to the CPU 6 each time the time corresponding to the length of 96 minutes is counted, and the CPU 6 receives the interrupt request and shifts the processing from the main routine to the timer interrupt routine. Since the time corresponding to this 96 minute length changes according to the change in tempo, the time interval at which an interrupt request is made changes depending on the tempo.

【0025】まず、ステップS11でキーオン処理サブ
ルーチンを実行する。
First, in step S11, a key-on processing subroutine is executed.

【0026】図6は、キーオン処理サブルーチンの詳細
な手順を示すフローチャートである。
FIG. 6 is a flow chart showing the detailed procedure of the key-on processing subroutine.

【0027】ステップS21でキーオンフラグの値を判
別し、いずれかのキーオンフラグが“1”、即ちキーオ
ンすべきときにはステップS22に進み、キーオン信
号、ノートナンバ、ベロシティを図1の音源回路11の
対応するチャンネルへ出力し、ステップS23でキーオ
ンフラグをクリアした後に、本サブルーチン処理を終了
する。一方、ステップS21でキーオンフラグが“0”
のときにはステップS22およびステップS23の処理
をスキップして本サブルーチン処理を終了する。
In step S21, the value of the key-on flag is determined. If any one of the key-on flags is "1", that is, if the key-on should be made, the process proceeds to step S22, and the key-on signal, the note number, and the velocity are determined by the tone generator circuit 11 of FIG. After that, the key-on flag is cleared in step S23, and then this subroutine processing is ended. On the other hand, in step S21, the key-on flag is "0".
In case of, the processing of step S22 and step S23 is skipped and the present subroutine processing is ended.

【0028】ここで、キーオンフラグ、後述するキーオ
フフラグ、ノートナンバ、ベロシティは、図示しないが
各チャンネル毎に設けられたチャンネルステータスエリ
アと呼ばれる領域(RAM8内)に格納され、キーオン
フラグは、アサインされたチャンネルがあるか否かを判
別するためのフラグであり、キーオフフラグは、図2の
キーオフチャンネルバッファa1にチャンネル番号が書
き込まれたときに当該チャンネルに対してキーオフ処理
を指示するためのフラグであり、ノートナンバおよびベ
ロシティは、アサインされたチャンネルに出力される自
動演奏データ、即ち、ステップS22で音源回路11に
出力される自動演奏データである。
Here, the key-on flag, the key-off flag described later, the note number, and the velocity are stored in an area (in the RAM 8) called a channel status area (not shown) provided for each channel, and the key-on flag is assigned. The key-off flag is a flag for instructing key-off processing for the channel when the channel number is written in the key-off channel buffer a1 of FIG. The note number and velocity are the automatic performance data output to the assigned channel, that is, the automatic performance data output to the tone generator circuit 11 in step S22.

【0029】図5のフローチャートに戻り、ステップS
12でキーオフ処理サブルーチンを実行する。
Returning to the flowchart of FIG. 5, step S
At 12, the key-off processing subroutine is executed.

【0030】図7は、キーオフ処理サブルーチンの詳細
な手順を示すフローチャートである。
FIG. 7 is a flowchart showing the detailed procedure of the key-off processing subroutine.

【0031】ステップS31で前記キーオフフラグの値
を判別し、いずれかのキーオフフラグが“1”、即ちキ
ーオフすべきときには音源回路11の対応するチャンネ
ルへキーオフ信号を出力し(ステップS32)、キーオ
フフラグをクリアした(ステップS33)後に、本サブ
ルーチン処理を終了する。一方、ステップS31の判別
で、キーオフフラグが“0”のときには、本サブルーチ
ン処理を終了する。
In step S31, the value of the key-off flag is discriminated, and when any one of the key-off flags is "1", that is, when the key-off should be made, a key-off signal is output to the corresponding channel of the tone generator circuit 11 (step S32), and the key-off flag is outputted. After clearing (step S33), this subroutine process is terminated. On the other hand, if it is determined in step S31 that the key-off flag is "0", this subroutine processing is ended.

【0032】再び図5のフローチャートに戻り、ステッ
プS13でキーオン処理およびキーオフ処理以外のデー
タの処理を実行し、ステップS14でチャンネル確保処
理サブルーチンを実行する。
Returning again to the flowchart of FIG. 5, the data processing other than the key-on processing and the key-off processing is executed in step S13, and the channel securing processing subroutine is executed in step S14.

【0033】図8は、チャンネル確保処理サブルーチン
の詳細な手順を示すフローチャートである。
FIG. 8 is a flow chart showing the detailed procedure of the channel securing process subroutine.

【0034】ステップS41で図2のキーオフ準備チャ
ンネルバッファa2のデータ(チャンネル番号)をキー
オフチャンネルバッファa1へ書き込み、ステップS4
2で、前記書き込みを行ったチャンネル番号に対応する
チャンネルステータスエリアのキーオフフラグを“1”
に設定する。続くステップS43ではゲートタイム残り
時間バッファa3の残り時間データを“1”だけデクリ
メントする。このとき、残り時間データがすでに“0”
となっている場合にはデクリメントを行わずにステップ
S44に進む。
In step S41, the data (channel number) of the key-off preparation channel buffer a2 of FIG. 2 is written in the key-off channel buffer a1, and step S4
In step 2, set the key-off flag in the channel status area corresponding to the written channel number to "1".
Set to. In the subsequent step S43, the remaining time data in the remaining gate time buffer a3 is decremented by "1". At this time, the remaining time data is already "0"
If it is, the process proceeds to step S44 without decrementing.

【0035】ステップS44では残り時間データが
“1”となったチャンネルがあるか否かを判別し、その
判別結果がYESのときにはステップS45に進み、当
該チャンネルのチャンネル番号をキーオフ準備チャンネ
ルバッファa2へ書き込み、一方、ステップS44の判
別結果がNOのときにはステップS45をスキップし
て、本サブルーチン処理を終了する。
In step S44, it is determined whether or not there is a channel whose remaining time data is "1". If the result of the determination is YES, the process proceeds to step S45, and the channel number of the relevant channel is stored in the key-off preparation channel buffer a2. On the other hand, if the determination result of step S44 is NO, step S45 is skipped and the present subroutine processing is ended.

【0036】さらに、図5のフローチャートに戻り、ス
テップS15で演奏データ読み出し処理サブルーチンを
実行した後に、本タイマ割り込み処理を終了する。
Further, returning to the flowchart of FIG. 5, after the performance data read processing subroutine is executed in step S15, the timer interrupt processing is ended.

【0037】図9および図10は、演奏データ読み出し
処理サブルーチンの詳細な手順を示すフローチャートで
ある。
9 and 10 are flowcharts showing the detailed procedure of the performance data read processing subroutine.

【0038】まず、ステップS51で、図3で説明した
自動演奏データの内、演奏データ読み出しポインタが示
す位置のタイミングデータを読み出し、続くステップS
52で、その読み出されたタイミングデータとカウンタ
TIMEの値とを比較し、その結果が一致しているとき
にはステップS53に進み、演奏データ読み出しポイン
タを進めてタイミングデータの次に格納されているデー
タであるイベントデータを読み出し、ステップS54
で、読み出されたイベントデータがノートイベントであ
るか否かを判別する。ステップS54の判別において、
イベントデータがノートイベント以外のデータのときに
はステップS55に進み、当該データに応じたその他の
処理、例えば音量制御やピッチベンド等の処理を行い、
一方、イベントデータがノートイベントのときには図1
0のステップS60に進む。
First, in step S51, the timing data at the position indicated by the performance data read pointer is read out from the automatic performance data described in FIG.
At 52, the read timing data is compared with the value of the counter TIME, and if the results match, the process proceeds to step S53, where the performance data read pointer is advanced to store the data stored next to the timing data. Event data is read, and step S54
Then, it is determined whether the read event data is a note event. In the determination of step S54,
When the event data is data other than the note event, the process proceeds to step S55 to perform other processing according to the data, for example, volume control and pitch bend processing.
On the other hand, when the event data is note event,
0 to step S60.

【0039】ここで、カウンタTIMEは、図1のRA
M8の所定領域に確保されたソフトカウンタであり、1
小節区間を96分長に一回の割合でカウントし、小節の
先頭でリセットされるように構成されている。そして、
このカウンタTIMEは、そのカウント値が図3のタイ
ミングデータb1に一致すると、CPU6の処理を、ア
サインされた時分割チャンネルに次のイベントデータを
割り当てる処理に移行させる。
Here, the counter TIME is the RA of FIG.
A soft counter secured in a predetermined area of M8.
The bar section is counted once every 96 minutes, and is reset at the beginning of the bar. And
When the count value of the counter TIME matches the timing data b1 of FIG. 3, the processing of the CPU 6 shifts to the processing of allocating the next event data to the assigned time division channel.

【0040】次に、ステップS56では演奏データ読み
出しポインタを次のデータを指示するように進め、ステ
ップS57では前記カウンタTIMEの値が“95”で
あるか否かを判別する。この値“95”は、テンポが4
/4拍子のときにカウンタTIMEによりカウントされ
る1小節分のカウント値である。即ち、カウンタTIM
Eは1小節区間をカウントするカウンタであるため、カ
ウンタTIMEの値が“95”になるまでは“1”づつ
カウントアップし(ステップS58)、カウンタTIM
Eの値が“95”になると、カウンタTIMEをクリア
して(ステップS59)、本サブルーチン処理を終了す
る。なお、ステップS57の値“95”は、拍子によっ
て変わり、例えば3/4拍子では値“71”になる。
Next, in step S56, the performance data read pointer is advanced so as to point to the next data, and in step S57 it is determined whether or not the value of the counter TIME is "95". This value “95” has a tempo of 4
This is a count value for one bar counted by the counter TIME when the time signature is / 4. That is, the counter TIM
Since E is a counter that counts one bar section, it counts up by "1" until the value of the counter TIME becomes "95" (step S58).
When the value of E becomes "95", the counter TIME is cleared (step S59), and this subroutine processing is ended. The value "95" in step S57 changes depending on the time signature, and becomes "71" in the case of 3/4 time signature, for example.

【0041】一方、ステップS52の判別において、タ
イミングデータがカウンタTIMEの値に一致していな
い場合にはステップS53〜ステップS56の処理をス
キップしてステップS57に進む。
On the other hand, if it is determined in step S52 that the timing data does not match the value of the counter TIME, the processes of steps S53 to S56 are skipped and the process proceeds to step S57.

【0042】次に、図10のステップS60では前記キ
ーオフチャンネルバッファa1に空きチャンネルがある
か否か、即ち、読み出しポインタRPと書き込みポイン
タWPとの間にチャンネル番号が格納されているか否か
を判別し、空きチャンネルがある場合にはステップS6
1に進み、読み出しポインタRPが示すチャンネルをア
サインチャンネル(割当てチャンネル)とした後に、ス
テップS62で読み出しポインタRPを進める。続くス
テップS63ではトランケート処理を行う。本実施例に
おけるトランケート処理は、アサインチャンネルへキー
オフデータを出力するとともにリリースレート(エンベ
ロープの減衰直線の傾きの割合)を最大にすることによ
り行う。
Next, in step S60 of FIG. 10, it is determined whether or not there is an empty channel in the key-off channel buffer a1, that is, whether or not a channel number is stored between the read pointer RP and the write pointer WP. If there is a free channel, step S6
After proceeding to step 1 and setting the channel indicated by the read pointer RP as the assign channel (assigned channel), the read pointer RP is advanced in step S62. In the subsequent step S63, a truncation process is performed. The truncate processing in this embodiment is performed by outputting the key-off data to the assign channel and maximizing the release rate (ratio of the slope of the attenuation straight line of the envelope).

【0043】さらに、ステップS64では、アサインチ
ャンネルに対応するチャンネルステータスエリアのキー
オンフラグを“1”に設定し、現在読み出されているノ
ートイベント中のノートナンバおよびベロシティをそれ
ぞれチャンネルステータスエリア中の当該領域に書き込
み、ステップS65では現在読み出されているノートイ
ベント中のゲートタイムデータをゲートタイム残り時間
バッファa3に書き込み、前記ステップS56に進む。
Further, in step S64, the key-on flag of the channel status area corresponding to the assigned channel is set to "1", and the note number and velocity in the currently read note event are respectively set in the channel status area. The data is written in the area, and in step S65, the gate time data in the currently read note event is written in the gate time remaining time buffer a3, and the process proceeds to step S56.

【0044】ステップS60の判別において、キーオフ
チャンネルバッファa1に空きチャンネルがないときに
はステップS66に進み、キーオフ準備チャンネルバッ
ファa2にチャンネル番号が書き込まれているか否かを
判別し、書き込まれているときにはステップS67に進
み、キーオフ準備チャンネルバッファa2に格納されて
いるチャンネル番号の何れかのチャンネル(例えば、チ
ャンネル番号が最も小さいものなど)をアサインチャン
ネルとし、ステップS68でキーオフ準備チャンネルバ
ッファa2から当該アサインチャンネルのチャンネル番
号を削除した後に、前記ステップS63に進み、トラン
ケート処理を行う。
In the determination in step S60, if there is no empty channel in the key-off channel buffer a1, the process proceeds to step S66, it is determined whether or not a channel number is written in the key-off preparation channel buffer a2, and if it is written, step S67. In step S68, any one of the channel numbers stored in the key-off preparation channel buffer a2 (for example, the channel having the smallest channel number) is set as an assign channel, and in step S68, the key-off preparation channel buffer a2 is set to the assigned channel. After deleting the number, the process proceeds to step S63 to perform the truncation process.

【0045】一方、ステップS66の判別において、キ
ーオフ準備チャンネルバッファa2にチャンネル番号が
格納されていないときにはステップS69に進み、以上
説明した方法以外の従来の方法、例えば最も古くから出
力されているキーオンイベントのチャンネルをアサイン
チャンネルとする方法等によりアサインチャンネルを決
定して、前記ステップS63に進む。
On the other hand, when it is determined in step S66 that the channel number is not stored in the key-off preparation channel buffer a2, the process proceeds to step S69, and a conventional method other than the method described above, for example, the oldest key-on event output. The assigned channel is determined by a method of setting the assigned channel as the assigned channel, and the process proceeds to step S63.

【0046】図11は、キーオフ準備チャンネルバッフ
ァa2に格納されたチャンネルをアサインチャンネルに
する処理を説明するための図である。
FIG. 11 is a diagram for explaining a process of changing a channel stored in the key-off preparation channel buffer a2 to an assign channel.

【0047】同図中、縦軸はエンベロープレベルを示
し、横軸は時間を示し、横軸のスケールは96分長に相
当する時間を示している。さらに、時刻t1は、キーオ
フ準備チャンネルバッファa2に楽音Aのチャンネル番
号が書き込まれる時刻と、楽音Bのイベントデータが楽
音Aのチャンネルに対応するチャンネルステータスエリ
アに書き込まれる時刻とを示し、時刻t2は、楽音Bが
発音される時刻を示している。また、時間軸の下に示す
区間A,Bは、それぞれ楽音A,Bに関するキーオンか
らキーオフまでの時間を示している。
In the figure, the vertical axis represents the envelope level, the horizontal axis represents time, and the horizontal axis scale represents time corresponding to 96 minutes. Furthermore, time t 1 indicates the time at which the channel number of the musical sound A is written in the key-off preparation channel buffer a2 and the time at which the event data of the musical sound B is written in the channel status area corresponding to the channel of the musical sound A. 2 indicates the time at which the musical sound B is produced. Further, sections A and B shown below the time axis represent the times from key-on to key-off for the musical tones A and B, respectively.

【0048】同図において、楽音Aが発音され、時刻t
1になると、楽音Aがアサインされているチャンネル番
号がキーオフ準備チャンネルバッファa2に書き込まれ
(ステップS45)、当該チャンネルがアサインチャン
ネルにされた(ステップS67)後に、トランケート処
理がなされ(ステップS63)、楽音Bのイベントデー
タがアサインチャンネルに対応するチャンネルステータ
スエリアに書き込まれる(ステップS64)。そして、
CPU6の処理が次の割り込み処理に移行したとき(時
刻t2)に、音源回路11にアサインチャンネルのチャ
ンネル番号とともにチャンネルステータスエリアに格納
されたイベントデータが出力される(ステップS22)
ので、時刻t2から楽音Bが発音されることになる。
In the same figure, the musical sound A is produced and the time t
When it becomes 1 , the channel number to which the musical tone A is assigned is written in the key-off preparation channel buffer a2 (step S45), the channel is assigned (step S67), and then the truncation process is performed (step S63). The event data of the musical sound B is written in the channel status area corresponding to the assigned channel (step S64). And
When the processing of the CPU 6 shifts to the next interrupt processing (time t 2 ), the event data stored in the channel status area together with the channel number of the assigned channel is output to the tone generator circuit 11 (step S22).
Therefore, the musical tone B is sounded from the time t 2 .

【0049】以上説明したように、本実施例に依れば、
空きチャンネルがある場合にはそのチャンネルをアサイ
ンチャンネルとし、空きチャンネルがない場合には次の
割り込みによりキーオフされるチャンネル、即ち、キー
オフ準備チャンネルバッファa2に格納されているチャ
ンネルをアサインチャンネルとし、さらに、キーオフ準
備チャンネルバッファa2にも格納されたチャンネルが
ない場合には、従来の方法、例えば最も古くキーオンさ
れたチャンネルをトランケートしてアサインチャンネル
とするようにしたので、長く持続するばずの楽音が途中
で途切れることを最小限にとどめることができる。
As described above, according to this embodiment,
If there is a vacant channel, that channel is designated as the assign channel, and if there is no vacant channel, the channel keyed off by the next interrupt, that is, the channel stored in the keyoff preparation channel buffer a2, is designated as the assign channel. When there is no channel stored in the key-off preparation channel buffer a2, a conventional method, for example, the oldest key-on channel is truncated to be used as an assign channel, so that a long lasting musical sound of a bell It is possible to minimize the interruption.

【0050】上述した実施例においては、新たに割り当
てる楽音の割り当てを発音タイミングよりも1タイミン
グ前に行うので、トランケートに多少の時間がかかって
も正確なタイミングから発音が開始されるようになって
いる。
In the above-mentioned embodiment, since the newly assigned musical tone is assigned one timing before the tone generation timing, the tone generation can be started from the correct timing even if the truncation takes some time. There is.

【0051】なお、本実施例ではゲートタイムの残り時
間が“1”になったときのチャンネル、即ち、次の96
分長のタイミング(割り込みタイミング)でキーオフさ
れるチャンネルをトランケートするべきチャンネルにし
たが、これに限らず、全てのチャンネルの中でゲートタ
イムの残り時間が最小のチャンネルを検索して、当該チ
ャンネルをトランケートするべきチャンネルにしてもよ
い。
In this embodiment, the channel when the remaining time of the gate time becomes "1", that is, the next 96 channels
Although the channel that is keyed off at the timing of the length of time (interrupt timing) is set as the channel that should be truncated, this is not the only option. It searches for the channel with the minimum remaining gate time among all the channels and selects that channel. It may be a channel to be truncated.

【0052】また、本実施例では自動演奏データ中にゲ
ートタイムデータが記憶され、このデータに基づいて各
楽音のキーオフまでの残り時間を求めるように構成した
が、キーオン/キーオフデータと、これらのデータの発
生タイミングとから成る自動演奏データにおいて本発明
を適用することもできる。即ち、キーオンデータが読み
出されたときに当該キーオンデータに対応するキーオフ
データを検索し、現在のタイミングと検索したキーオフ
データの発生タイミングとの差を求め、その差からキー
オフまでの残り時間を求め、その残り時間に基づいてト
ランケートチャンネルを決定したり、また、トランケー
トするときにその時点よりも後にあり、且つ最も近い位
置にあるキーオフデータを検索し、そのキーオフデータ
に対応するキーオンデータが割り当てられているチャン
ネルをトランケートするように構成することもできる。
Further, in this embodiment, the gate time data is stored in the automatic performance data, and the remaining time until the key-off of each musical sound is obtained based on this data. However, the key-on / key-off data and these data are stored. The present invention can also be applied to automatic performance data consisting of data generation timing. That is, when the key-on data is read, the key-off data corresponding to the key-on data is searched, the difference between the current timing and the generation timing of the searched key-off data is calculated, and the remaining time until the key-off is calculated from the difference. When determining the truncate channel based on the remaining time, or when truncating, the key-off data that is after and closest to that point is searched, and the key-on data corresponding to that key-off data is assigned. It can also be configured to truncate the channel being played.

【0053】さらに、複数の音色が混在している場合、
例えば複数パートの自動演奏を行っている場合に、各音
色のリリースレートやベロシティ量を考慮し、例えばキ
ーオフまでの残り時間が同じ複数のチャンネルがあった
場合は最も早く減衰するような音色のチャンネルをトラ
ンケートチャンネルとするようにしてもよい。
Furthermore, when a plurality of tones are mixed,
For example, when you are playing multiple parts automatically, consider the release rate and velocity amount of each tone. For example, if there are multiple channels with the same remaining time until key off, the tone channel that decays earliest. May be used as a truncated channel.

【0054】また、本実施例ではキーオフ準備チャンネ
ルバッファa2を1個で構成したが、複数のキーオフ準
備チャンネルバッファa2を用いてアサインチャンネル
を決定するようにしてもよい。
Further, in the present embodiment, one key-off preparation channel buffer a2 is constructed, but a plurality of key-off preparation channel buffers a2 may be used to determine the assigned channel.

【0055】また、さらに、本実施例では自動演奏用に
時分割チャンネルを16チャンネル分とるようにした
が、鍵盤1のキーオン/キーオフにより発生したイベン
トデータもこの時分割チャンネルに割り当てるようにし
てもよい。
Further, in this embodiment, 16 time-division channels are used for automatic performance, but event data generated by key-on / key-off of the keyboard 1 may also be assigned to this time-division channel. Good.

【0056】[0056]

【発明の効果】以上説明したように、本発明によれば、
複数のチャンネルにイベントデータを割り当てるように
構成された電子楽器において、各イベントデータに対応
したキーオフ時間情報を含む自動演奏データを記憶する
記憶手段と、該記憶された自動演奏データを読み出す読
み出し手段と、該読み出された自動演奏データを前記チ
ャンネルに割り当てる割当手段と、前記チャンネルに空
きチャンネルがないときは、前記割当手段により既に割
り当てられた自動演奏データの中から当該各自動演奏デ
ータに対応するキーオフ時間情報に基づいて割り当てる
チャンネルを決定する決定手段とを有し、該決定された
チャンネルをトランケートし、前記割当手段により新た
なイベントデータを割り当てるので、簡単な構成で、ト
ランケートによる楽音の途切れを防止することが可能と
なる効果を奏する。
As described above, according to the present invention,
In an electronic musical instrument configured to assign event data to a plurality of channels, storage means for storing automatic performance data including key-off time information corresponding to each event data, and reading means for reading the stored automatic performance data. Allocating means for allocating the read automatic performance data to the channel, and when there is no vacant channel in the channel, it corresponds to each automatic performance data among the automatic performance data already allocated by the allocating means. And a decision means for deciding a channel to be assigned based on the key-off time information, the decided channel is truncated, and new event data is assigned by the assigning means. There is an effect that can be prevented

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

【図1】本発明に係る電子楽器の一実施例の概略構成を
示すブロック図である。
FIG. 1 is a block diagram showing a schematic configuration of an embodiment of an electronic musical instrument according to the present invention.

【図2】図1のRAM内の各種バッファを説明するため
の図である。
FIG. 2 is a diagram for explaining various buffers in the RAM of FIG.

【図3】図1のROMにプリセットされた自動演奏デー
タのデータフォーマットを示す図である。
3 is a diagram showing a data format of automatic performance data preset in the ROM of FIG.

【図4】メインルーチンの処理手順を示すフローチャー
トである。
FIG. 4 is a flowchart showing a processing procedure of a main routine.

【図5】タイマ割り込み処理の手順を示すフローチャー
トである。
FIG. 5 is a flowchart showing a procedure of timer interrupt processing.

【図6】図5のステップS11のキーオン処理サブルー
チンの詳細な手順を示すフローチャートである。
FIG. 6 is a flowchart showing a detailed procedure of a key-on processing subroutine of step S11 of FIG.

【図7】図5のステップS12のキーオフ処理サブルー
チンの詳細な手順を示すフローチャートである。
FIG. 7 is a flowchart showing a detailed procedure of a key-off processing subroutine of step S12 of FIG.

【図8】図5のステップS14のチャンネル確保処理サ
ブルーチンの詳細な手順を示すフローチャートである。
8 is a flowchart showing a detailed procedure of a channel securing process subroutine of step S14 of FIG.

【図9】図5のステップS15の演奏データ読み出し処
理サブルーチンの詳細な手順を示すフローチャートであ
る。
FIG. 9 is a flowchart showing a detailed procedure of a performance data read processing subroutine of step S15 of FIG.

【図10】図9演奏データ読み出し処理サブルーチンの
続きのフローチャートである。
FIG. 10 is a flowchart showing the continuation of the performance data reading processing subroutine shown in FIG. 9;

【図11】図2のキーオフ準備チャンネルバッファに格
納されたチャンネルをアサインチャンネルにする処理を
説明するための図である。
FIG. 11 is a diagram for explaining a process of changing a channel stored in a key-off preparation channel buffer of FIG. 2 to an assign channel.

【符号の説明】[Explanation of symbols]

9 ROM(記憶手段) 6 CPU(読み出し手段、割当手段、決定手段) a2 キーオフ準備チャンネルバッファ(決定手段) 9 ROM (storage means) 6 CPU (reading means, assigning means, determining means) a2 key-off preparation channel buffer (determining means)

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 複数のチャンネルにイベントデータを割
り当てるように構成された電子楽器において、 各イベントデータに対応したキーオフ時間情報を含む自
動演奏データを記憶する記憶手段と、 該記憶された自動演奏データを読み出す読み出し手段
と、 該読み出された自動演奏データを前記チャンネルに割り
当てる割当手段と、 前記チャンネルに空きチャンネルがないときは、前記割
当手段により既に割り当てられた自動演奏データの中か
ら当該各自動演奏データに対応するキーオフ時間情報に
基づいて割り当てるチャンネルを決定する決定手段とを
有し、 該決定されたチャンネルをトランケートし、前記割当手
段により新たなイベントデータを割り当てることを特徴
とする電子楽器。
1. An electronic musical instrument configured to assign event data to a plurality of channels, and storage means for storing automatic performance data including key-off time information corresponding to each event data, and the stored automatic performance data. Reading means for reading out, the assigning means for assigning the read automatic performance data to the channels, and when there is no empty channel in the channels, the respective automatic performance data from the automatic performance data already assigned by the assigning means. An electronic musical instrument comprising: a determining means for determining a channel to be assigned based on key-off time information corresponding to performance data, truncating the determined channel, and assigning new event data by the assigning means.
JP5195360A 1993-07-13 1993-07-13 Electronic musical instrument Expired - Fee Related JP2674476B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5195360A JP2674476B2 (en) 1993-07-13 1993-07-13 Electronic musical instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5195360A JP2674476B2 (en) 1993-07-13 1993-07-13 Electronic musical instrument

Publications (2)

Publication Number Publication Date
JPH0728464A true JPH0728464A (en) 1995-01-31
JP2674476B2 JP2674476B2 (en) 1997-11-12

Family

ID=16339885

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5195360A Expired - Fee Related JP2674476B2 (en) 1993-07-13 1993-07-13 Electronic musical instrument

Country Status (1)

Country Link
JP (1) JP2674476B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62135892A (en) * 1985-12-10 1987-06-18 ヤマハ株式会社 Electronic musical apparatus with sound generation allottingfunction
JPH05100671A (en) * 1991-08-30 1993-04-23 Yamaha Corp Electronic musical instrument
JPH05210388A (en) * 1992-01-31 1993-08-20 Matsushita Electric Ind Co Ltd Electronic musical instrument
JPH06259073A (en) * 1993-03-09 1994-09-16 Roland Corp Assignor of electronic musical instrument

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62135892A (en) * 1985-12-10 1987-06-18 ヤマハ株式会社 Electronic musical apparatus with sound generation allottingfunction
JPH05100671A (en) * 1991-08-30 1993-04-23 Yamaha Corp Electronic musical instrument
JPH05210388A (en) * 1992-01-31 1993-08-20 Matsushita Electric Ind Co Ltd Electronic musical instrument
JPH06259073A (en) * 1993-03-09 1994-09-16 Roland Corp Assignor of electronic musical instrument

Also Published As

Publication number Publication date
JP2674476B2 (en) 1997-11-12

Similar Documents

Publication Publication Date Title
US5446237A (en) Electronic musical instrument having a control section memory for generating musical tone parameters
JP3372124B2 (en) Electronic musical instrument
JPS5922238B2 (en) key assigner
US4872385A (en) Automatic rhythm performing apparatus with modifiable correspondence between stored rhythm patterns and produced instrument tones
JP2674476B2 (en) Electronic musical instrument
JPS62163099A (en) Guitar controller for synthesizer
JP3230265B2 (en) Sound channel assignment device for electronic musical instruments
JP3609045B2 (en) Automatic performance device
JP3282675B2 (en) Electronic musical instrument
JP2715795B2 (en) Musical sound synthesizer having pronunciation assigning means
JP3122661B2 (en) Electronic musical instrument
JP2626474B2 (en) Tone generator
JP3646611B2 (en) Music generator
JP3583575B2 (en) Electronic musical instrument
JPH0895565A (en) Automatic player
JPH0764553A (en) Electronic musical instrument
JP3673386B2 (en) Musical sound channel assignment apparatus and musical sound channel assignment method
JP3673387B2 (en) Musical sound channel assignment apparatus and musical sound channel assignment method
JP2814479B2 (en) Electronic musical instrument
JPH0863159A (en) Automatic player
JPH0728463A (en) Sound source
JPS6242519B2 (en)
JPH0764552A (en) Electronic musical instrument
JPS63316897A (en) Automatic performer
JPH03120591A (en) Electronic musical instrument

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20090718

Year of fee payment: 12

LAPS Cancellation because of no payment of annual fees