JPH03204692A - Play data processor - Google Patents

Play data processor

Info

Publication number
JPH03204692A
JPH03204692A JP2000771A JP77190A JPH03204692A JP H03204692 A JPH03204692 A JP H03204692A JP 2000771 A JP2000771 A JP 2000771A JP 77190 A JP77190 A JP 77190A JP H03204692 A JPH03204692 A JP H03204692A
Authority
JP
Japan
Prior art keywords
data
pitch
origin
key
stored
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
JP2000771A
Other languages
Japanese (ja)
Other versions
JP2785896B2 (en
Inventor
Hideaki Shimatani
島谷 秀明
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 JP2000771A priority Critical patent/JP2785896B2/en
Publication of JPH03204692A publication Critical patent/JPH03204692A/en
Application granted granted Critical
Publication of JP2785896B2 publication Critical patent/JP2785896B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To save a memory by converting pitch data in play data into interval origin correlative data correlating with interval origin data and storing the converted data in a storage means together with reference interval origin data. CONSTITUTION:This arithmetic data processor consists of a play data input means 1, a play data converting means 2, and the storage means 3 and the play data input means 1 consists of, for example, a keyboard. The play data converting means 2 converts the pitch data in the input play data into the interval origin correlative data correlating with the specific interval origin data. The specific interval origin data is selected among plural predetermined interval origin data. The storage means 3 consists normally of a RAM and is stored with the interval origin correlative data converted by the play data converting means 2 and this storage means 3 is further stored with the specific interval origin data. Consequently, the memory is saved.

Description

【発明の詳細な説明】 (al産業上の利用分野 この発明は演奏データを記憶する演奏データ記憶手段を
備える演奏データ処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION Field of the Invention The present invention relates to a performance data processing apparatus that includes a performance data storage means for storing performance data.

(bl従来の技術 電子楽器のキーボードから入力される演奏データ等を記
憶する演奏データ記憶手段を備える装置では、従来から
所謂イベントタイプの演奏データ記憶方式が採用されて
いる(特開昭63−193191号)。このイベントタ
イプの演奏データ処理装置では、キーボードから入力さ
れる演奏データをキーボードの押鍵状態の変化を示すイ
ベントデータにキーコード等を付加したものとして記憶
する。
(bl Prior Art) A so-called event-type performance data storage system has been adopted in devices equipped with a performance data storage means for storing performance data etc. input from the keyboard of an electronic musical instrument (Japanese Patent Laid-Open No. 63-193191 In this event-type performance data processing device, performance data input from the keyboard is stored as event data indicating a change in the state of pressed keys on the keyboard with a key code or the like added thereto.

(C)発明が解決しようとする課題 しかし、従来のイベントタイプの演奏データ処理装置で
は、キーオンイベントおよびキーオンイベントの度に、
少な(ともイベント情報(キーオンイベントおよびキー
オンイベント)とキーコードをメモリに記憶しておかな
ければならない。この場合のキーコードは個々のキーに
対して直接に与えられている唯一のコードである。この
ため、全てのキーをそれぞれ表現できるビット数を用意
し、このビット数を個々のキーコードに対して与えるこ
とになるために(例えば、通常はオクターブ情報として
3ビツトを与え、音高情報として4ビツトを与える。キ
ーコードはこのオクターブ情報と音高情報で構成し、合
計7ビツトを必要とする)、長い曲を録音するにはメモ
リ容量を相当に大きくしなければならない不都合があっ
た。
(C) Problems to be Solved by the Invention However, in the conventional event-type performance data processing device, each time a key-on event occurs,
A small amount of event information (key-on events and key-on events) and a key code must be stored in memory. In this case, the key code is the only code directly given to each key. For this reason, we prepare a number of bits that can represent each key, and give this number of bits to each key code (for example, normally 3 bits are given as octave information, and 3 bits are given as pitch information). (The key code consists of this octave information and pitch information, requiring a total of 7 bits), which had the disadvantage that the memory capacity had to be considerably large to record long songs.

この発明の目的は、複数の音程原点データの中から適当
な音程原点データを選択し、その音程原点データとイベ
ントの発生したキーコードとの差分をメモリに記憶する
ことにより、メモリの節約を図ることのできる演奏デー
タ処理装置を提供することにある。
The purpose of this invention is to save memory by selecting appropriate pitch origin data from a plurality of pitch origin data and storing in memory the difference between the pitch origin data and the key code where the event occurred. An object of the present invention is to provide a performance data processing device capable of processing data.

(d)課題を解決するための手段 この発明は、演奏データ入力手段と、入力された演奏デ
ータ中の音高データを、複数の音程原点データ中の所定
の音程原点データに相関する音程原点相関データに変換
する手段と、変換された音程原点相関データおよび前記
所定の音程原点データを記憶する演奏データ記憶手段と
、を備えてなることを特徴とする。
(d) Means for Solving the Problem This invention provides a performance data input means and a pitch origin correlation that correlates pitch data in the input performance data with predetermined pitch origin data among a plurality of pitch origin data. The musical instrument is characterized by comprising means for converting into data, and performance data storage means for storing the converted pitch origin correlation data and the predetermined pitch origin data.

また、演奏データ中の音高データが音程原点データに相
関する音程原点相関データとして前記音程原点データと
ともに記憶されている演奏データ記憶手段と、前記演奏
データ記憶手段の音程原点相関データを読み出して、前
記音程原点データに基づいて元の音高データに復元する
手段と、復元した音高データを含む演奏データから楽音
信号を形成する手段と、を備えてなることを特徴とする
さらに、前記音程原点相関データは、音程原点データと
音高データとの音高差データであることを特徴とする。
Further, reading out the pitch origin correlation data of the performance data storage means and the performance data storage means in which the pitch data in the performance data is stored as interval origin correlation data with the interval origin data, The pitch origin data includes means for restoring original pitch data based on the pitch origin data, and means for forming a musical tone signal from performance data including the restored pitch data. The correlation data is characterized in that it is pitch difference data between pitch origin data and pitch data.

fe)作用 この発明の請求項1に係る演奏データ処理装置において
は、演奏データ入力時に音高データが所定の音程原点デ
ータに相関する音程原点相関データに変換される。音程
原点データは音程の原点となる音高データである。この
場合、音程原点データは複数の音程原点データの中から
選ばれる。すなわち、演奏データ処理装置がカバーする
全音程内において複数の音程原点データが設定されてお
り、その中から入力された音高データに近い音程原点デ
ータが選ばれる。音程原点相関データは、例えば、音程
原点データと音高データとの音高差データである。そし
て、音高データを直接記憶する代わりに、変換された音
程原点相関データとその変換に使用した音程原点データ
とが演奏データ記憶手段に記憶される。このように構成
することで、まず、成る音程原点データが一つ記憶され
、続いてその音程原点データがカバーできる音高データ
が続く限り、次々と入力されてくる音高データを上記音
程原点データを使用して音程原点相関データに変換しな
がら記憶していく。途中で音程の大きく離れた音高デー
タが入力された場合には、音程原点データが代えられる
fe) Operation In the performance data processing apparatus according to claim 1 of the present invention, pitch data is converted into pitch origin correlation data that correlates with predetermined pitch origin data when performance data is input. The pitch origin data is pitch data that is the origin of the pitch. In this case, the pitch origin data is selected from a plurality of pitch origin data. That is, a plurality of pitch origin data are set within all pitches covered by the performance data processing device, and pitch origin data close to the input pitch data is selected from among them. The pitch origin correlation data is, for example, pitch difference data between pitch origin data and pitch data. Then, instead of directly storing the pitch data, the converted pitch origin correlation data and the pitch origin data used for the conversion are stored in the performance data storage means. With this configuration, first, one piece of pitch origin data is stored, and then, as long as there is pitch data that can be covered by that pitch origin data, the pitch data that is input one after another is stored as the pitch origin data. is used to convert it into pitch origin correlation data and store it. If pitch data whose pitches are far apart is input midway through, the pitch origin data is changed.

上記の構成において、音程原点相関データは、入力され
た音高データを、複数の音程原点データから選ばれた一
つの音程原点データに相関するデータに変換したもので
あるため、そのビット数は少なくてよい。音程原点デー
タを余分に記憶しておく必要があるが、キーオン、キー
オフ毎に記憶する必要はなく、むしろ、音程原点相関デ
ータのビット数が小さくて済むことはメモリ消費を非常
に少なくする。このことから、演奏データ記憶手段の記
憶容量が少なくてすむ。
In the above configuration, the pitch origin correlation data is obtained by converting the input pitch data into data that correlates with one pitch origin data selected from a plurality of pitch origin data, so the number of bits is small. It's fine. Although it is necessary to store extra pitch origin data, it is not necessary to store it for each key-on and key-off, and in fact, the fact that the number of bits of pitch origin correlation data is small greatly reduces memory consumption. Therefore, the storage capacity of the performance data storage means can be reduced.

また、上記の演奏データ記憶手段を使用して、その記憶
データを演奏データに復元する演奏データ処理装置では
、音程原点データを読みだした後、そのデータをレジス
タ等に一時的に記憶し、続いて読みだした音程原点相関
データを上記音程原点データを使用して元の音高データ
に復元する。
Furthermore, in a performance data processing device that uses the performance data storage means described above and restores the stored data to performance data, after reading the pitch origin data, the data is temporarily stored in a register or the like, and then The pitch origin correlation data read out is restored to the original pitch data using the pitch origin data.

そして、音高データを含む演奏データから楽音信号を形
成する。このように構成する演奏データ処理装置でも、
演奏データ記憶手段の容量が少なくて済むことから、装
置全体のコストを下げることが可能である。
Then, musical tone signals are formed from performance data including pitch data. Even with the performance data processing device configured in this way,
Since the capacity of the performance data storage means is small, it is possible to reduce the cost of the entire apparatus.

(f)実施例 第1図(A)、(B)はこの発明の実施例に係る演奏デ
ータ処理装置の構成図を示している。
(f) Embodiment FIGS. 1(A) and 1(B) show the configuration of a performance data processing apparatus according to an embodiment of the present invention.

同図(A)は、演奏データ入力手段1と演奏データ変換
手段2と記憶手段3とで構成された装置を示す。演奏デ
ータ入力手段1は、例えばキーボードで構成される。演
奏データ変換手段2は、入力された演奏データ中の音高
データを、所定の音程原点データに相関する音程原点相
関データに変換する。前記所定の音程原点データは、予
め決められている複数の音程原点データの中から選ばれ
る。音程原点データは基準となるキーコードである。音
程原点相関データは例えば、前記所定の音程原点データ
と前記音高データとの差データである。記憶手段3は、
通常はRAMで構成され、前記演奏データ変換手段2で
変換された音程原点相関データを記憶する。更にこの記
憶手段3は前記所定の音程原点データをも記憶する。
FIG. 1A shows an apparatus comprised of performance data input means 1, performance data conversion means 2, and storage means 3. The performance data input means 1 is composed of, for example, a keyboard. The performance data conversion means 2 converts the pitch data in the input performance data into pitch origin correlation data that correlates with predetermined pitch origin data. The predetermined pitch origin data is selected from a plurality of predetermined pitch origin data. The pitch origin data is a reference key code. The pitch origin correlation data is, for example, difference data between the predetermined pitch origin data and the pitch data. The storage means 3 is
It is usually composed of a RAM and stores the pitch origin correlation data converted by the performance data converting means 2. Furthermore, this storage means 3 also stores the predetermined pitch origin data.

第1図(B)は、第1図(A)の装置の記憶手段3を使
用して、その記憶手段3に記憶されている音程原点相関
データを読み出して楽音信号に変換する装置である。
FIG. 1(B) shows an apparatus that uses the storage means 3 of the apparatus shown in FIG. 1(A) to read pitch origin correlation data stored in the storage means 3 and convert it into a musical tone signal.

記憶手段3には第1図(A)の装置で音程原点相関デー
タおよび前記所定の音程原点データが記憶されている。
In the storage means 3, pitch origin correlation data and the predetermined pitch origin data are stored in the apparatus shown in FIG. 1(A).

演奏データ復元手段4は前記記憶手段3から音程原点相
関データおよび音程原点データを読み出して、音程原点
データに基づいて、音程原点相関データを元の音高デー
タに復元する。楽音信号形成手段5は、復元した音高デ
ータを含む演奏データから楽音信号を形成する。
The performance data restoring means 4 reads the interval origin correlation data and the interval origin data from the storage means 3, and restores the interval origin correlation data to the original pitch data based on the interval origin data. The musical tone signal forming means 5 forms musical tone signals from the performance data including the restored pitch data.

第2図、第3図は上記の演奏データ処理装置の作用の概
略を説明するための図である。第2図は記憶手段3に記
憶されるデータ例を示し、第3図は音程原点データと音
程原点相関データとの関係を示す図である。第3図にお
いて、横軸はキーの配列方向を示し、左端部は最低音の
キーを表し、右端部は最高音のキーを表している。
FIGS. 2 and 3 are diagrams for explaining the outline of the operation of the above performance data processing device. FIG. 2 shows an example of data stored in the storage means 3, and FIG. 3 is a diagram showing the relationship between pitch origin data and pitch origin correlation data. In FIG. 3, the horizontal axis indicates the direction in which the keys are arranged, with the left end representing the lowest pitched key and the right end representing the highest pitched key.

今、第1図(A)の構成において、演奏データ入力手段
1 (ここではキーボードのキーである)で、Plの音
高データが入力されたとする。この時、演奏データ変換
手段2は複数の音程原点データの中からPiに近い音程
原点データを選ぶ。即ち、その音程原点データはTO3
である。同時に、この演奏データ変換手段2は音高デー
タP1を音程原点データTO3に相関する音程原点相関
データに変換する。例えば、相関方法を引算方法にした
とすると、音程原点相関データは、(TO3P1)=Δ
dlとなる。即ち、音程原点相関データはΔdlとなる
。なお、実際にはこの音程原点相関データの後に符長デ
ータが記憶されるがここではこの説明を省略する。続い
て、キーから音高データP2が入力されたとする。ここ
で、音程原点データTO3は第3図の(TO3)の幅を
カバーできる。つまり、(TO3)内にある音高データ
に対して音程原点データとなることができる、したがっ
て、音程原点データP2はこの(TO3)内にあるため
に、この段階では音程原点データの変更はない。つまり
、音程原点相関データΔdlの次に、続いて音程原点相
関データΔd2が記憶される。続いて、音高データP3
が入力されたとする。この音高データP3は(TO3)
の範囲外である。したがって、演奏データ変換手段2は
、この音高データP3が入力された時に音程原点データ
をTO3からTOIに切り換える。そして、記憶手段3
に音程原点データTO1を記憶し、続いて音程原点相関
データΔd3を記憶する。
Now, in the configuration shown in FIG. 1(A), it is assumed that pitch data of Pl is inputted by the performance data input means 1 (keyboard keys in this case). At this time, the performance data converting means 2 selects pitch origin data close to Pi from among the plurality of pitch origin data. In other words, the pitch origin data is TO3
It is. At the same time, the performance data converting means 2 converts the pitch data P1 into pitch origin correlation data that correlates with the pitch origin data TO3. For example, if the correlation method is the subtraction method, the pitch origin correlation data is (TO3P1) = Δ
It becomes dl. That is, the pitch origin correlation data becomes Δdl. Note that note length data is actually stored after this interval origin correlation data, but its explanation will be omitted here. Assume that pitch data P2 is then input from the key. Here, the pitch origin data TO3 can cover the width (TO3) in FIG. In other words, pitch data within (TO3) can be used as pitch origin data. Therefore, since pitch origin data P2 is within this (TO3), there is no change in pitch origin data at this stage. . That is, after the pitch origin correlation data Δdl, the pitch origin correlation data Δd2 is stored. Next, pitch data P3
Suppose that is input. This pitch data P3 is (TO3)
is outside the range of Therefore, the performance data converting means 2 switches the pitch origin data from TO3 to TOI when this pitch data P3 is input. And storage means 3
The pitch origin data TO1 is stored in , followed by the pitch origin correlation data Δd3.

以上のようにして順次音高データを記憶して行く。この
ような記憶方式では、音程原点相関データΔdがより少
ないビット数で表現することができる。音程原点データ
を適当に選択することにより、従来必要であったオクタ
ーブビット(3ピント)も勿論必要ない。従来の装置に
比較して音程原点データを余分に記憶しておく必要はあ
るが、キーイベント毎に記憶しておく必要はなく、音高
データが大きく飛んだ時に新たな音程原点データを記憶
すれば足りる。したがって、音程原点デー夕に必要なメ
モリ容量はそれほど大きくなく、全体としてはメモリ容
量をかなり小さくすることができる。
In the above manner, pitch data is sequentially stored. With such a storage method, the pitch origin correlation data Δd can be expressed with a smaller number of bits. By appropriately selecting pitch origin data, octave bits (3 pintos), which were conventionally necessary, are of course unnecessary. Although it is necessary to store additional pitch origin data compared to conventional devices, there is no need to store it for each key event, and new pitch origin data can be stored when the pitch data jumps significantly. That's enough. Therefore, the memory capacity required for the pitch origin data is not so large, and the memory capacity as a whole can be considerably reduced.

上記第2図に示す記憶手段を使用して楽音信号を形成す
るには、第1図(B)に示す装置で演奏データ復元手段
4によって記憶手段3の記憶データを順次読み出して行
く。そして、音程原点データを読み出すと、その音程原
点データをレジスタ等に設定しておき、その後に読み出
した音程原点相関データと、上記音程原点データから元
の音高データに復元する。この復元方法は、記憶手段3
に音程原点相関データを記憶する方法に対して逆の方法
を実施すればよい。
To form a musical tone signal using the storage means shown in FIG. 2, the data stored in the storage means 3 is sequentially read out by the performance data restoring means 4 in the apparatus shown in FIG. 1(B). When the pitch origin data is read out, the pitch origin data is set in a register or the like, and the original pitch data is restored from the pitch origin correlation data read out thereafter and the pitch origin data. This restoration method uses storage means 3.
What is necessary is to carry out a method opposite to the method of storing pitch origin correlation data.

〔具体的実施例の説明〕[Description of specific examples]

〔構成の説明〕 第4図は、この発明の実施例であるシーケンサのブロッ
ク図を示している。CPUl0は装置全体の制御を行う
。メロディメモリ14.ワーキングメモリ15はRAM
で構成される。ROM16にはプログラムの他、後述の
テーブルや各種パラメータが記憶される。トーンジェネ
レータ17は、CPU10から渡される演奏データから
楽音信号を生成してスピーカ18から出力する。テンポ
クロック発生器11は前記CPUI Oに対して一定時
間毎の割り込みをかける。その割り込みは、設定されて
いるテンポに合わせて16分符長の間に4回行う。つま
り、この装置では制御の分解能が16分符長の4分の1
に設定されている。キー12は例えば61個のキーで構
成される。操作スイッチ13は音色を設定する音色設定
スイッチ、トラックナンバーを指定するトラックスイッ
チ、各トラックのモード(レコードモード、プレイモー
ド、ノーマルモード)を表すLED等を含んでいる。
[Description of Configuration] FIG. 4 shows a block diagram of a sequencer that is an embodiment of the present invention. CPU10 controls the entire device. Melody memory 14. Working memory 15 is RAM
Consists of. In addition to programs, the ROM 16 stores tables and various parameters, which will be described later. The tone generator 17 generates a musical tone signal from the performance data passed from the CPU 10 and outputs it from the speaker 18. The tempo clock generator 11 interrupts the CPU IO at regular intervals. The interruption is performed four times during the sixteenth note length according to the set tempo. In other words, in this device, the control resolution is 1/4 of the 16th note length.
is set to . The keys 12 are composed of, for example, 61 keys. The operation switch 13 includes a tone setting switch for setting the tone, a track switch for specifying the track number, an LED indicating the mode of each track (record mode, play mode, normal mode), and the like.

第5図はこの操作スイッチ13の概略平面図を示してい
る。図において、操作スイッチパネル20の上方には液
晶表示器21が配置され、その下方に音色スイッチやそ
の他のスイッチを含むスイッチ群22が設けられている
。またその右側はニつのトラックスイッチ23が配置さ
れ、更にその右側には各トラックのモードを表示するL
ED 24が設けられている。本実施例ではトランク数
が2に設定されている。各トランク(1または2)にお
いてレコードモードに設定されている時には上側のLE
D (赤)が点灯し、プレイモードに設定されている時
には下側のLED (緑)が点灯する。またノーマルモ
ードの時には両方のLEDが点灯しない。なお、本実施
例では二つのトラックの内の何れか一つのトランクのみ
をレコードモードに設定することができ、両方のトラッ
クを同時にレコードモードにすることができない。二つ
のトラックを同時にプレイモードにすることは可能であ
る。更に、レコードモードにおいては複音を録音するこ
とができず、単音のみ録音できるようになっている。
FIG. 5 shows a schematic plan view of this operation switch 13. In the figure, a liquid crystal display 21 is arranged above an operation switch panel 20, and a switch group 22 including tone switches and other switches is provided below it. Also, on the right side there are two track switches 23, and on the right side there is an L button that displays the mode of each track.
An ED 24 is provided. In this embodiment, the number of trunks is set to two. When set to record mode on each trunk (1 or 2), the upper LE
D (red) lights up, and when set to play mode, the lower LED (green) lights up. Furthermore, both LEDs do not light up in normal mode. In this embodiment, only one trunk of the two tracks can be set to the record mode, and both tracks cannot be set to the record mode at the same time. It is possible to have two tracks in play mode at the same time. Furthermore, in record mode, it is not possible to record multiple tones, and only single tones can be recorded.

〔メモリの説明〕[Memory explanation]

本発明の記憶手段は本実施例のメロディメモリ14が対
応している。第6図はこのメロディメモリの構成図であ
る。図に示すように、このメロディメモリは2次元の配
列構造になっており、トラックTRI、TR2毎にその
矢印方向にデータが順に記憶されて行く。横方向のアド
レスはポインタDP [TR]で指定される。例えば、
トラックTR=1に、第7図に示す曲が入力された場合
には、データの配列は第8図に示すようになる。なお、
後述のように、演奏データの記憶はトラックスイッチを
操作してトラック1がレコードモードになった時からス
タートする。最初のエリアa。
The storage means of the present invention corresponds to the melody memory 14 of this embodiment. FIG. 6 is a block diagram of this melody memory. As shown in the figure, this melody memory has a two-dimensional array structure, and data is sequentially stored in the direction of the arrow for each track TRI and TR2. The horizontal address is specified by the pointer DP[TR]. for example,
When the song shown in FIG. 7 is input to track TR=1, the data arrangement becomes as shown in FIG. 8. In addition,
As will be described later, storage of performance data starts when the track switch is operated and track 1 is set to record mode. first area a.

b4こは、操作スイッチ13の音色スイッチで制定され
た(または初期設定された)音色データが記憶される。
Tone color data established (or initialized) by the tone color switch of the operation switch 13 is stored in b4.

エリアaは、次のエリア(ここではエリアb)に音色ナ
ンバー(ボイスナンバー)が記憶されることを表すコー
ドである。このコードはヘキサデシマルのFBで表され
る。次のエリアCには音程原点データが記憶される。こ
こでは音程原点データがF4であるが、その内容につい
ては後述する。次のエリアdには全休符を表すデータが
記憶される。次のエリアeには2分休符を表すデータが
記憶される。以下順に、4分休符、8分休符をそれぞれ
表すデータが記憶されていく。休符のデータの後ろには
音程原点相関データおよび符長データが順次記憶されて
いく。
Area a is a code indicating that a tone number (voice number) is stored in the next area (here, area b). This code is represented by a hexadecimal FB. In the next area C, pitch origin data is stored. Here, the pitch origin data is F4, the contents of which will be described later. The next area d stores data representing a whole rest. The next area e stores data representing a half rest. Data representing a quarter rest and an eighth rest are stored in this order. After the rest data, interval origin correlation data and note length data are sequentially stored.

本実施例では上記音程原点相関データを音程原点差デー
タとしている。この音程原点差データは音程原点データ
(が示すキーコード)と、記憶している音高データ(音
高のキーコード)との差を表すデータである(第3図参
照)。この音程原点差データと符長データはこの実施例
では合計8ビツトで表される。音程原点差データは上位
4ビツトで表され、符長データは下位4ビ・ノドで表さ
れる。例えば、エリアhでは8 (1000)が音程原
点差データを表し、3(0011)が8分音符の符長デ
ータを表している。後述の理由から、8(1000)の
音程原点差データは、それによって示されるキーコード
が音程原点データによって示されるキーコードに0を加
算した値であることを示す。即ち、このエリアhに記憶
される音程原点差データが示すキーコードは、エリアC
に記憶される音程原点データが示すキーコードに等しい
ことを示している。また、エリアiに記憶される6(0
110)の音程原点差データが示すキーコードは、エリ
アCに記憶される音程原点データが示すキーコードに2
を加算した値であることを示している。
In this embodiment, the pitch origin correlation data is used as pitch origin difference data. This pitch origin difference data is data representing the difference between the pitch origin data (the key code indicated by ) and the stored pitch data (pitch key code) (see FIG. 3). In this embodiment, the pitch origin difference data and note length data are represented by a total of 8 bits. The pitch origin difference data is represented by the upper 4 bits, and the note length data is represented by the lower 4 bits. For example, in area h, 8 (1000) represents pitch origin difference data, and 3 (0011) represents eighth note note length data. For reasons described later, pitch origin difference data of 8 (1000) indicates that the key code indicated by it is the value obtained by adding 0 to the key code indicated by the pitch origin data. That is, the key code indicated by the pitch origin difference data stored in area h is area C.
This indicates that the pitch origin data stored in the key code is equal to the key code indicated. Also, 6(0) stored in area i
110) The key code indicated by the pitch origin difference data is 2 times the key code indicated by the pitch origin data stored in area C.
This indicates that the value is the sum of

第9図はメロディ−メモリ14に記憶される各データの
コードとフォーマットを示している。同図において00
からOFは休符データを示し、10からEFは音符デー
タを示している。また、FlからFAは音程原点データ
を示している。
FIG. 9 shows the codes and formats of each data stored in the melody memory 14. In the same figure, 00
.about.OF indicates rest data, and 10.about.EF indicate note data. Further, Fl to FA indicate pitch origin data.

前記休符データは上位4ビツトがOであり、下位4ビツ
トが符長データで構成される。前記音符データは、上位
4ビツトが音程原点差データを構成し、下位4ビツトが
符長データを構成している。また前記音程原点データは
、上位4ビツトがFで表され、下位4ビツトがテーブル
ナンバーを示している。第10図はこのテーブルを表す
。本実施例のキーボードはCOから65までの5オクタ
一ブ強の音程をカバーしている。そして、その範囲内で
、音程原点データは合計10個存在している。音高の一
番低い音程原点データはFO#(キーコードは9)の音
高に設定され、最高音程原点データはC5(キーコード
は63)の音高に設定されている。
The rest data has an O in the upper 4 bits and note length data in the lower 4 bits. In the note data, the upper 4 bits constitute interval origin difference data, and the lower 4 bits constitute note length data. Furthermore, in the pitch origin data, the upper 4 bits are represented by F, and the lower 4 bits represent the table number. FIG. 10 represents this table. The keyboard of this embodiment covers pitches of just over five octaves from CO to 65. Within that range, there are a total of 10 pieces of pitch origin data. The lowest pitch origin data is set to the pitch of FO# (key code is 9), and the highest pitch origin data is set to the pitch of C5 (key code is 63).

第11図は1〜Eで示される音程原点差データが意味す
る内容を示してる。例えば音程原点差データが8である
ということは、その差データに対応するキーコードが、
音程原点データが示すキーコード+0の値であることを
示している。また、音程原点差データが1であるという
ことは、その差データに対応する音高データが音程原点
データが示すキーコード+7の値であることを示してい
る。この第11図に示すテーブルより、一つの音程原点
データは、その音程原点データが示すキーコードのキー
を中心に、キーボードの右側に(コードの大きい側に)
音程原点データが示すキーコード +7の範囲をカバー
し、キーボードの左側に(コードの小さい側に)音程原
点データが示すキーコード −6の範囲をカバーする。
FIG. 11 shows the meaning of the pitch origin difference data indicated by 1 to E. For example, the pitch origin difference data is 8, which means that the key code corresponding to that difference data is
This indicates that the value is the key code +0 indicated by the pitch origin data. Furthermore, the fact that the pitch origin difference data is 1 indicates that the pitch data corresponding to the difference data is the value of the key code +7 indicated by the pitch origin data. From the table shown in Fig. 11, one pitch origin data is located on the right side of the keyboard (on the side with the larger chord) centering on the key of the key code indicated by the pitch origin data.
It covers the key code +7 range indicated by the pitch origin data, and covers the key code -6 range indicated by the pitch origin data on the left side of the keyboard (on the smaller chord side).

第12図は符長データとそのデータが意味する内容を示
している。この表によると、例えば符長データ3は8分
音符であることを示している。なお、符長データ5は1
6分音符が連続することを示すデータである。例えば、
4分音符が次の小節の最初の音符までタイで結ばれる場
合等に、この符長データ5が使用される。詳細について
は後述する。
FIG. 12 shows note length data and the meaning of the data. According to this table, for example, note length data 3 indicates that it is an eighth note. Note length data 5 is 1
This data indicates that sixth notes are consecutive. for example,
This note length data 5 is used when quarter notes are tied to the first note of the next measure. Details will be described later.

〔フローチャートの説明〕[Flowchart explanation]

第13図以下は上記シーケンサの動作を示すフローチャ
ートである。フローチャートに出てくるレジスタ、フラ
グ類については、本明細書の最後に、まとめて機能の説
明がしである。
FIG. 13 and subsequent figures are flowcharts showing the operation of the sequencer. The functions of the registers and flags appearing in the flowcharts will be explained at the end of this specification.

〔メインフローチャート〕[Main flowchart]

第13図にメインフローチャートを示す。電源がオンさ
れると、nlに進み各種レジスタ等の初期設定が行われ
る。この後、n2でキーイベント処理が行われ、n3で
スイッチ処理が行われ、n4でその他の処理が行われる
。n4を終えると、再びn2に戻り、以下n2.n3.
n4を繰り返して行く。CPUl0は通常は、このn2
.n3n4を連続的に実行して行くが、テンポクロック
11からの割り込みがある度にテンポクロック割り込み
の処理を行う。これについては後述する〔スイッチ処理
〕 通常は、キーボードを操作する前に、音色設定等のスイ
ッチ処理が行われる。第14図はこのスイッチ処理のフ
ローチャートを示している。
FIG. 13 shows the main flowchart. When the power is turned on, the process proceeds to nl, where initial settings of various registers and the like are performed. After this, key event processing is performed at n2, switch processing is performed at n3, and other processing is performed at n4. After finishing n4, return to n2 again and proceed to n2. n3.
Repeat n4. CPU10 normally uses this n2
.. n3n4 are executed continuously, and each time there is an interrupt from the tempo clock 11, the tempo clock interrupt is processed. This will be described later [Switch processing] Normally, switch processing such as tone color setting is performed before operating the keyboard. FIG. 14 shows a flowchart of this switch processing.

まずnloでスイッチイベントがあるがどうかの判定を
行う。スイッチイベントがあった場合は、n11〜n1
3でイベントの種類を判定する。
First, it is determined in nlo whether there is a switch event. If there is a switch event, n11 to n1
Step 3 determines the type of event.

第5図に示すトラックスイッチ23が操作された時には
n14またはn15に進む。また音色スイッチ22が操
作された時にはn16に進み、n16およびn17にお
いてレコードモードに設定されているトラックの判定を
行う。
When the track switch 23 shown in FIG. 5 is operated, the process advances to n14 or n15. Further, when the tone color switch 22 is operated, the process advances to n16, and in n16 and n17, it is determined which track is set to the record mode.

まず、トラックスイッチ23の何れがか操作された時の
動作について以下に説明する。
First, the operation when any of the track switches 23 is operated will be described below.

トランクスイッチ23の「1」が操作された時には、n
14でトラックナンバーを記憶するレジスタTRを0に
する。レジスタTRが0であるということはトラックI
が指定されたことを示す。
When "1" of the trunk switch 23 is operated, n
At step 14, the register TR that stores the track number is set to 0. If register TR is 0, it means that track I
is specified.

トランクスイッチ23の[2」が操作された時には、n
15でレジスタTRを1にする。レジスタTRが1であ
るということは、トラック2が指定されたことを示す。
When [2] of the trunk switch 23 is operated, n
15, set register TR to 1. Register TR being 1 indicates that track 2 has been designated.

続いて、n18でレジスタRUN CTR]を見る。こ
のレジスタRUN [TR]は、TRで示されるトラッ
クのモードを示す。
Next, check the register RUN CTR at n18. This register RUN [TR] indicates the mode of the track indicated by TR.

そのレジスタのデータがOである時は停止モードを表し
、1である時はレコードモードを表し2である時はプレ
イモードを表す。トラックスイッチ23は、−回押す度
にモードを次のモードに進める。モードの進み方は、最
初が停止モードであり、次にレコードモードに移り、次
にプレイモードに移る。プレイモードにおいて更にもう
一度スイッチを押すと、停止モードに戻る。したがって
、上記n18においてRUN [TR] =Oである時
には、停止モードからレコードモードに移ったことを意
味し、この場合にはn20以下に進む。またRUN [
TR] =1の時はプレイモードに移ったことを意味し
、この場合にはn25以下に進む。また、RUN [T
Rコ=2の時は、プレイモードから停止モードに移った
ことを意味し、この場合にはn35以下を実行する。
When the data in the register is O, it represents a stop mode, when it is 1, it represents a record mode, and when it is 2, it represents a play mode. Each time the track switch 23 is pressed - times, the mode advances to the next mode. The mode starts with stop mode, then moves to record mode, and then moves to play mode. Pressing the switch again in play mode returns to stop mode. Therefore, when RUN [TR] = O at n18, it means that the stop mode has been shifted to the record mode, and in this case, the process proceeds to n20 and below. Also RUN [
TR]=1 means that the play mode has been entered, and in this case, the process proceeds to n25 and below. Also, RUN [T
When R = 2, it means that the play mode has shifted to the stop mode, and in this case, n35 and below are executed.

レコードモードに入る時には最初にn20においてRU
N [TRコを1に設定し、ri21で該当するトラン
クの赤色のLEDを点灯する。更に、n22でレジスタ
DP [TR]を0にする。このDP [TR]はTR
で示されるトラックのメロディ−メモリのポインタであ
る(第6図参照)。また、レジスタKONCに初期値と
してFFを設定する。このKONCは、キーオンされた
キーのキーコードを記憶する。ここでは実際のキーコー
ドではないFFを初期値としてセントしておく。n22
では、また、レジスタKOFに1を入れる。
When entering record mode, first press RU on n20.
N [Set TR to 1 and turn on the red LED of the corresponding trunk on ri21. Furthermore, the register DP [TR] is set to 0 at n22. This DP [TR] is TR
This is the melody memory pointer of the track indicated by (see FIG. 6). Further, FF is set in the register KONC as an initial value. This KONC stores the key code of the key that is turned on. Here, FF, which is not an actual key code, is set as an initial value. n22
Now, put 1 into register KOF again.

このKOFは、最も最近に押鍵されたキーの状態を記憶
する。KOFが1である時はキーオフであることを示し
、KOFが0であることはキーオンであることを示す。
This KOF stores the state of the most recently pressed key. When KOF is 1, it indicates that the key is off, and when KOF is 0, it indicates that the key is on.

また、レジスタVOICE[TR]にボイス(音色)ナ
ンバーをセットする。
Also, a voice (timbre) number is set in the register VOICE [TR].

VOI CE ETR] は、TRが示すトランクのボ
イスナンバーを記憶するレジスタである。
VOI CE ETR] is a register that stores the voice number of the trunk indicated by TR.

プレイモードに設定された時には、最初に、n25でR
UN [TRコを2に設定し、n26で該当のトランク
のLEDの内、赤色のLEDを消灯し、緑色のLEDを
点灯する。次に、n27でKOFの状態を見る。もし、
最も最近に押鍵されたキーがキーオン状態であれば、n
28に進む。この場合には、レコードモードがらプレイ
モードに移った時の最後の押鍵キーに対する音符データ
(音程原点差データと符長データからなる)を記憶しな
ければならない。更に、記憶データの最後のデータとし
てエンドデータも記憶しておく必要がある。n28.n
29はこれらの処理を行うためのステップである。即ち
、n28では音符データを記憶するためのサブルーチン
(レコード処理)を実行し、n29ではエンドデータを
意味するFF(第9図参照)を、TRが示すトランクの
メロディ−メモリ内のポインタDP [TR]で示され
るエリアにFFを記憶する。
When set to play mode, first press R on n25.
UN [Set TR to 2, turn off the red LED of the corresponding trunk LED in n26, and turn on the green LED. Next, check the state of KOF at n27. if,
If the most recently pressed key is in the key-on state, n
Proceed to step 28. In this case, note data (consisting of pitch origin difference data and note length data) for the last key pressed when the record mode is changed to the play mode must be stored. Furthermore, it is necessary to also store end data as the last data of the stored data. n28. n
29 is a step for performing these processes. That is, in n28, a subroutine (record processing) for storing musical note data is executed, and in n29, FF (see FIG. 9), which means end data, is transferred to the pointer DP in the trunk melody memory indicated by TR. FF is stored in the area indicated by ].

」:記n29を終えると、続いてn、 30においてT
Rが示すトラックのポインタDP [TR]をOにする
。これは、TRが示すメロディ−メモリの最初のエリア
からデータをリードして行くための準備である。また、
スタックポインタSP[TR]をOにする。SP [T
R]は楽譜にリピート記号がある場合に使用されるレジ
スタである。これについては後述する。更に、n30で
は、DATA[TR]に0を、バッファNExT[TR
1にメロディメモリ内の最初のデータを、入れる。この
NEXT [TR]は、メロディ−メモリから1ハイド
のデータを予めリードして記憶するバッファレジスタで
ある。このn30の段階ではNEXT [TR]にはD
P [TR]が0であるから[TR]が示すトラックの
最初のデータが記憶される。そして、NLEN [TR
]に1をセットする。
”: After completing n29, continue with n, and T at 30.
Set pointer DP [TR] of the track indicated by R to O. This is preparation for reading data from the first area of the melody memory indicated by TR. Also,
Set stack pointer SP[TR] to O. SP [T
R] is a register used when there is a repeat symbol in the musical score. This will be discussed later. Furthermore, in n30, DATA[TR] is set to 0, and buffer NExT[TR
Input the first data in the melody memory into 1. This NEXT [TR] is a buffer register that reads and stores one hide of data from the melody memory in advance. At this n30 stage, NEXT [TR] is D.
Since P [TR] is 0, the first data of the track indicated by [TR] is stored. And NLEN [TR
] is set to 1.

このようにして、再生の初期設定がされる。In this way, initial settings for playback are made.

上記n18で、RUN [TR] =2の場合は、プレ
イモードから停止モードに移ることを意味するから、n
35でRUN [TR]をOに設定し、n36で全ての
LEDを消灯する。
In n18 above, if RUN [TR] = 2, it means moving from play mode to stop mode, so n
Set RUN [TR] to O in step 35, and turn off all LEDs in step n36.

前記n10でのスイッチイベントが音色スイッチイベン
トである時には、n16.n、17に進んでレコードモ
ードにあるトラックを判定するが、もし、トランク1お
よび2ともレコードモードでなければそのままリターン
する。トランクlがレコードモードの時にはn40でT
R=Oを代入する。トラック2がレコードモードの時に
はn41でTR=1を代入する。そして、n42〜n4
6においてボイスナンバー(音色ナンバー)をメロディ
−メモリにストアする。まず、n42においてボイスナ
ンバーをレジスタVOI CE [TR,]に入れる。
When the switch event at n10 is a tone switch event, n16. The program proceeds to step n, 17 to determine which track is in record mode, but if both trunks 1 and 2 are not in record mode, the process returns directly. When trunk l is in record mode, T is n40.
Substitute R=O. When track 2 is in record mode, TR=1 is assigned in n41. And n42 to n4
In step 6, the voice number (timbre number) is stored in the melody memory. First, in n42, the voice number is entered into the register VOI CE [TR,].

なお、このボイスナンバーはスイッチによって設定され
る。次にn43でメロディ−メモリにFBを入れる。こ
のFBはボイスセットコードである(第9図参照)。続
いてn44でポインタを一つ進める。そしてn45でV
OICE[TR]に設定されているボイスナンバーをメ
ロディ−メモリにストアする。更に、n46でポインタ
を一つ進めてリターンする。
Note that this voice number is set by a switch. Next, in n43, FB is stored in the melody memory. This FB is a voice set code (see Figure 9). Next, the pointer is advanced by one at n44. And V at n45
Store the voice number set in OICE[TR] in the melody memory. Furthermore, the pointer is advanced by one at n46 and the process returns.

■演奏データのレコード 〔キーオン処理〕 演奏データのレコードは、鍵盤が押鍵または離鍵されて
いくことにより順次行われていく。
■Recording performance data (key-on processing) Recording of performance data is performed sequentially as the keys are pressed or released.

第15図は鍵盤のキーが押鍵された時に処理されるフロ
ーチャートである。
FIG. 15 is a flowchart of processing performed when a key on the keyboard is pressed.

n60でキーイベントの有無を判定する。キーオフイベ
ントであればn62においてキーオン処理を行う。キー
オフイベントであればn80においてキーオフ処理を行
う。
At n60, the presence or absence of a key event is determined. If it is a key-off event, key-on processing is performed in n62. If it is a key-off event, key-off processing is performed in n80.

キーオフイベントの場合、n63で二つのトラックの何
れかがレコードモードにあるかどうかを判定する。もし
、何方かがレコードモードであれば、n64に進み、レ
コードモードになっているトラックNO0をTRにセッ
トする。そして、n65に進み、レジスタKONCにセ
ントされているコートを判定する。このKONCはキー
オンされたキーのキーコードを記憶する。もし、このコ
ードがOであれば、即ち後述のn85でセ・ノドされた
休符を表すコードであればn66に進んで″“レコード
処理″゛をサブルーチンコールする。即ち、KONCの
データが休符を表す0である時には“レコード処理″゛
のサブルーチンに移って休符のレコード処理を行う。
In the case of a key-off event, it is determined in n63 whether either of the two tracks is in record mode. If either one is in the record mode, the process advances to n64 and the track No. 0 that is in the record mode is set in TR. Then, the process proceeds to n65, and the coat placed in the register KONC is determined. This KONC stores the key code of the key that is turned on. If this code is O, that is, if it is a code representing a rest inserted in n85, which will be described later, the process advances to n66 and calls the "record processing" subroutine. That is, if the KONC data is When the value is 0 representing a rest, the process moves to the "record processing" subroutine and performs record processing for the rest.

次に、n67でレジスタKONCの内容を判定する。つ
まり、このKONCがFFかどうかを見る。第14図の
n22のステップにおいて示しているように、最初に、
トランク1をレコードモードにした時にはKONCに対
して、未使用のデータであるFFをセットしている。し
たがって、このn67では、最初のキーオン時にはKO
NCがFFなっているから、n68へと進む。このn6
8では、ポインタDP [TR]で示すメロディ−メモ
リのエリアMD [TR]に対してボイスセントコード
であるFBをストアする。更に、ポインタを一つ進める
。続いて、n69においてVOICE [TR]を、ポ
インタが示すメロディ−メモリにストアする。このVO
I CE [TR]は、前の処理として音色スイッチが
操作されていない時には予め、モード変換した際にその
時点でセットされていた(n22)ボイスデータが設定
されている。キーオンより先に音色スイッチが操作され
ている時には、第14図のn42以下が実行されるため
に、再びこのn69でVOICE [TR]がストアさ
れることになる。このことはボイスデータが二重にスト
アされることを意味するが、動作には影響を及ぼすこと
がない。上記のストアを終えるとポインタを一つ進める
Next, in n67, the contents of register KONC are determined. In other words, check whether this KONC is FF. As shown in step n22 of FIG. 14, first,
When trunk 1 is set to record mode, FF, which is unused data, is set in KONC. Therefore, with this n67, when the first key is turned on, the KO
Since NC is FF, proceed to n68. This n6
At step 8, the voice cent code FB is stored in the melody memory area MD[TR] indicated by the pointer DP[TR]. Furthermore, the pointer is advanced by one. Subsequently, in n69, VOICE [TR] is stored in the melody memory indicated by the pointer. This VO
ICE [TR] is set in advance to the voice data (n22) that was set at the time of mode conversion when the tone switch was not operated as a previous process. When the tone switch is operated before the key is turned on, steps n42 and subsequent steps in FIG. 14 are executed, so VOICE [TR] is stored again at n69. This means that the voice data is stored twice, but does not affect operation. When the above store is completed, the pointer is advanced by one.

次に、n70においてレジスタKOFの内容を判定する
。このKOFは最後に押鍵されたキーの状態を記憶する
。KOF=0はキーオン状態を示し、KOF=1はキー
オフ状態を示す。n70においてKOF=0の時にはn
71の“レコード処理゛をサブルーチンコールする。こ
のn70.n71は次の意味を持っている。つまり、あ
るキーがオンされて、次のキーがオンされるまで、通常
は、先のキーがオフされてから次のキーがオンされるが
、先のキーがオンされたまま次のキーがオンされた時に
は、先にオンされたキーがキーオフされたものとして取
り扱うのである。即ち、先のキーがキーオンされたまま
である時には、n70→n71と進み、ここで先にオン
されたキーに対する“レコード処理“を実行する。
Next, at n70, the contents of register KOF are determined. This KOF stores the state of the last pressed key. KOF=0 indicates a key-on state, and KOF=1 indicates a key-off state. When KOF=0 in n70, n
71 "Record processing" subroutine call. These n70.n71 have the following meanings. In other words, when a key is turned on, the previous key is normally turned off until the next key is turned on. When the next key is turned on while the previous key is turned on, the key that was turned on first is treated as having been turned off. When the key remains turned on, the process proceeds from n70 to n71, where "record processing" is executed for the key that was turned on first.

そして、n72でKONCにキーオンされたキーのキー
コードをセットし、n73においてレジスタCNTとK
OFをクリアしておく。CNTはキーオンまたはキーオ
フされてからの時間をカウントするカウンタである。こ
のCNTは1小節を64等分する間隔で時間をカウント
する。KOFは前述のように最後に押鍵されたキーの状
態を記憶するものである。即ち、0にセットされること
は最後に押鍵されたキーがキーオン状態であることを意
味している。
Then, in n72, the key code of the key turned on is set in KONC, and in n73, register CNT and K are set.
Clear OF. CNT is a counter that counts the time since the key is turned on or off. This CNT counts time at intervals that divide one measure into 64 equal parts. As mentioned above, the KOF stores the state of the last key pressed. That is, being set to 0 means that the last key pressed is in the key-on state.

続いてキーオフイベントの処理について説明する。キー
オフイベントの時には、基本的にキーオンされたキーの
データ(音符データ)をストアする。まず、n80でキ
ーオフ処理を行い、n81において二つのトラックの何
れかがレコードモードになっているかどうかの判定を行
う。もし何方かがレコードモードであればn82に進む
。そして、キーオフされたキーのキーコードが、KON
Cに記憶されているキーコードと同じかどうかの判定を
行う。もし同じでなければ、KONGに記憶されている
キーの音符データの記憶を、まだ必要としないために、
そのままリターンする。“YE S ”の場合は、n8
3に進み、レコードモードになっているトラックの番号
をTRにセットする。次にn84に進み、“ルコード処
理°゛をサブルーチンコールする。即ち、゛レコード処
理゛°においてKONCに記憶されているキーに対する
“レコード処理”′を行う。そしてn85においてKO
Fを1にセットしCNTをリセットする。CNTをリセ
ットすることにより、再びこの時間から時間のカウント
が行われる。即ち、これ以後は休符のカウントが行われ
ることを意味している。続いてn86においてKONC
に休符を表すデータであるOがセットされてリターンす
る。
Next, key-off event processing will be explained. At the time of a key-off event, the data (note data) of the key that was turned on is basically stored. First, key-off processing is performed at n80, and it is determined at n81 whether either of the two tracks is in the record mode. If either one is in record mode, proceed to n82. Then, the key code of the key that was turned off is KON
It is determined whether the key code is the same as the key code stored in C. If they are not the same, in order to not need to store the key note data stored in KONG yet,
Return as is. If “YES”, n8
Proceed to step 3 and set the number of the track in record mode in TR. Next, the process advances to n84, and a subroutine is called for ``record processing''. In other words, in ``record processing'', ``record processing'' is performed for the keys stored in KONC.Then, in n85, the KO
Set F to 1 and reset CNT. By resetting the CNT, time is counted again from this time. That is, this means that rests will be counted from then on. Then KONC in n86
O, which is data representing a rest, is set in and returns.

上記の動作により、キーオンイベントがあるとCNTが
動作して音符の符長をカウントし、キーオフイベントの
あった時にその音符データのレコードが行われる。同時
に休符の符長がCNTによってカウントされて行き、新
たなキーオンイベントがあると、その休符データのレコ
ードが行われる(n66)。この動作が繰り返されて音
符と休符がメロディ−メモリに順次記憶されて行く。
Through the above operations, when a key-on event occurs, the CNT operates to count the note length of a note, and when a key-off event occurs, the note data is recorded. At the same time, the note length of the rest is counted by the CNT, and when a new key-on event occurs, the rest data is recorded (n66). This operation is repeated, and the notes and rests are sequentially stored in the melody memory.

〔レコード処理〕[Record processing]

°“レコード処理゛は、第16図に示している。 "Record processing" is shown in FIG.

このフローチャートは、n90の“音高(REC)′”
処理と、n91のパ符長(REC)”処理と、n92の
“’5TOPE処理″の三つのサブルーチンから構成さ
れている。
This flowchart shows the n90's "pitch (REC)'"
The routine consists of three subroutines: ``processing'', ``record length (REC)'' processing in n91, and ``'5TOPE processing'' in n92.

〔音高(REC)処理〕[Pitch (REC) processing]

第17図を参照して説明する。 This will be explained with reference to FIG.

まず、n100においてKONCがOであるかどうかの
判定を行う。KONC=Oであるということはレコード
しようとするデータが休符データクリアする。このDK
Cは、後述するように、キーコードと音程原点データと
の差を表す音程原点差データを記憶する。ただし休符デ
ータの場合には、このDKCをクリアしておく。
First, at n100, it is determined whether KONC is O. If KONC=O, the data to be recorded will be cleared as rest data. This DK
C stores pitch origin difference data representing the difference between the key code and pitch origin data, as will be described later. However, in the case of rest data, this DKC is cleared.

音符データのレコードの場合には、n101へと進む。In the case of a record of musical note data, the process advances to n101.

ここでは、レコードしようとする音符のキーコードが入
っているレジスタKONCからBKC[TR]を引いて
その結果をDKCに入れる。BKC[TR]は音程原点
データを記憶するレジスタである。ただし、最初の音符
データをレコードする場合には、BKC[TR]には適
当な初期データが入っている。このn101ではレコー
ドしようとする音符のキーコードと音程原点データが示
すキーコードとの差を求め、その結果を音程原点差デー
タを記憶するDKCに入れる。続いて、n102におい
てDKCに入った音程原点差データがDKCがカバーで
きる範囲内(第3図参照)にあるかどうかの判定を行う
。第11図に示すように、そのDKCのカバーできる範
囲は音程原点データが示すキーコード −6から音程原
点データが示すキーコード +7の範囲である。n10
2ではDKCのデータがこの範囲内にあるかどうかを見
ていることになる。もし、その範囲内にあればn111
に進む。n111では8からDKCを引いて、その結果
をDKCに再び入れる。
Here, BKC[TR] is subtracted from register KONC, which contains the key code of the note to be recorded, and the result is placed in DKC. BKC[TR] is a register that stores pitch origin data. However, when recording the first note data, BKC[TR] contains appropriate initial data. In step n101, the difference between the key code of the note to be recorded and the key code indicated by the pitch origin data is calculated, and the result is stored in the DKC that stores the pitch origin difference data. Subsequently, in n102, it is determined whether the pitch origin difference data entered into the DKC is within the range that can be covered by the DKC (see FIG. 3). As shown in FIG. 11, the range that the DKC can cover is from the key code -6 indicated by the pitch origin data to the key code +7 indicated by the pitch origin data. n10
Step 2 checks whether the DKC data is within this range. If it is within that range, n111
Proceed to. At n111, DKC is subtracted from 8 and the result is put back into DKC.

この演算はキーコードの差を、それを表す音程原点差デ
ータに変換する演算である。第11図において、左欄の
1〜Eがこのコード表現の音程原点差データを示してい
る。
This operation is an operation for converting the key code difference into pitch origin difference data representing the difference. In FIG. 11, 1 to E in the left column indicate pitch origin difference data of this chord expression.

上記n102においてDKCが前記範囲内になければ、
n103以下において新たな音程原点データを選択する
。この音程原点差データの選択は、KONCのデータに
近い音程原点データを選ぶことで行われる。まず、n1
03においてKONCを6で割る。その結果をレジスタ
nに入れておく。そしてn104.n105においてn
の大きさを判定する。そしてnに、1または10または
上記割算結果の整数部を入れる。更にn109において
、ポインタDP [TR]で示されるメロディ−メモリ
のエリアの上位4ビツトにFを入れ、下位4ビツトにn
を入れる。ここで上記上位4ビツトのFは、下位4ビツ
トのデータ(nで示される)が音程原点データであるこ
とを示すコードである(第9図参照)。そして下位4ピ
ントのnで表されるデータは第10図に示すテーブルの
ナンバーを表している(第9図、第10図参照)。
If DKC is not within the above range in n102 above,
At n103 and below, new pitch origin data is selected. This selection of pitch origin difference data is performed by selecting pitch origin data that is close to the KONC data. First, n1
Divide KONC by 6 in 03. The result is stored in register n. And n104. n in n105
Determine the size of. Then, 1, 10, or the integer part of the above division result is entered into n. Furthermore, at n109, F is placed in the upper 4 bits of the melody memory area indicated by pointer DP [TR], and n is placed in the lower 4 bits.
Put in. Here, the upper 4 bits of F are a code indicating that the lower 4 bits of data (indicated by n) are interval origin data (see FIG. 9). The data represented by n of the lower four focus points represents the number of the table shown in FIG. 10 (see FIGS. 9 and 10).

第18図は上記のn103以下において、新しい音程原
点データを決める時の説明図である。図の領域Aは上記
n103以下において一つの音程原点データを選ぶ時に
使用される、合計10個の各音程原点データのカバーす
る範囲を示す。また領域Bは、上記領域Aを使用するこ
とによって選ばれた一つの音程原点データがカバーする
範囲を示している。例を示す。例えば、n103におい
て演算した結果が3であったとする。この3はレジスタ
nに入る。その結果n109では、メロディ−メモリの
所定のエリアにF3がストアされる。つまりテーブルナ
ンバー3の音程原点データが選ばれたことになる。第1
0図を参照すると、このテーブルナンバー3の音程原点
データではキーコードが21である。
FIG. 18 is an explanatory diagram when determining new pitch origin data after the above n103. Area A in the figure shows the range covered by each of the ten pitch origin data, which is used when selecting one pitch origin data for the above n103 and below. Further, region B indicates the range covered by one pitch origin data selected by using the region A described above. Give an example. For example, assume that the result of the calculation at n103 is 3. This 3 goes into register n. As a result, at n109, F3 is stored in a predetermined area of the melody memory. In other words, the pitch origin data of table number 3 has been selected. 1st
Referring to Figure 0, the key code is 21 in the pitch origin data of table number 3.

n1lOでは、上記のようにして選ばれた音程原点デー
タが示すキーコードが、−旦、BKC[TR]に入れら
れ、更にキーコードの入っているKCからBKC[TR
]を引いて、その結果がDKCに入れられる。この処理
では、DKCにキーコード差が記憶される。そして、n
111では、前述のようにDKCの内容を変換して音程
原点差データが再度DKCに入れられる。
In n1lO, the key code indicated by the pitch origin data selected as described above is entered into BKC[TR], and is further transferred from the KC containing the key code to BKC[TR].
] and the result is placed in DKC. In this process, the key code difference is stored in the DKC. And n
At step 111, the contents of the DKC are converted as described above, and the pitch origin difference data is input into the DKC again.

C符長(REC)処理〕 第19図を参照して説明する。C note length (REC) processing] This will be explained with reference to FIG.

゛′符長(REC)処理″では、CNTの計数内容を利
用することによって音符の符長、または休符の符長を知
る。
In the ``note length (REC) process'', the note length of a note or the note length of a rest is determined by using the count contents of the CNT.

最初に0120においてレジスタLをリセットする。こ
のレジスタしは第12図に示した符長データ5のrcO
NT INUEJの回数をカウントする。続いて、レジ
スタNLEN [TR]にFFをセントする。このNL
EN [TR]は、符長データ(1〜5)を記憶するの
に使用される。最初は、使用しないデータOFFを初期
値として設定しておく。
First, register L is reset at 0120. This register is the rcO of note length data 5 shown in FIG.
Count the number of times NT INUEJ. Subsequently, FF is sent to register NLEN [TR]. This NL
EN [TR] is used to store note length data (1 to 5). Initially, unused data is set to OFF as the initial value.

n121ではCNTの計数値を判定する。前述のように
CPUの制御の分解能は16分符長である。ただ、実際
の処理においてはCNTの計数値が子方向に2、且つ一
方向に1を誤差範囲としている。例えば、全音符に対応
するCNTの計数値は64であるが、n122ではCN
Tが63以上であれば全音符であると判定する。n12
2〜n126においては、各音符の長さに対応する処理
を行う。CNTから各音符の長さを引いて、その結果を
CNTに再セントしているのは、次のステップの012
7以下においてrcONT INUE」の処理を必要と
するかどうかを判定するためである。例えば、全音符が
タイで次の小節に渡っている時にはCNTは64を超え
た大きさとなるが、このCNTから64を引いた時にC
NTに残りが再セットされる。n127ではその再セッ
トされたCNTが2を超えているかどうかを判定してい
る。もし、2を超えていなければ、誤差範囲であると見
做してそのままリターンする。CNTが2を超えていれ
ば、n128へ進み、CNT−4を実行する。更に、L
+1を実行する。そして、再びn127に戻る。CNT
−4を実行するのは1つのC0NTINUEが16分長
、すなわちカウントにして4つ分の長さを示すからであ
る。
In n121, the count value of CNT is determined. As mentioned above, the resolution of CPU control is 16th note length. However, in actual processing, the error range for the CNT count value is 2 in the child direction and 1 in one direction. For example, the count value of CNT corresponding to a whole note is 64, but in n122, CN
If T is 63 or more, it is determined that it is a whole note. n12
In steps 2 to n126, processing corresponding to the length of each note is performed. The next step, 012, subtracts the length of each note from CNT and re-centres the result to CNT.
This is to determine whether or not the process of ``rcONT INUE'' is required for 7 or below. For example, when a whole note is tied and extends to the next measure, the CNT will exceed 64, but if you subtract 64 from this CNT, the CNT will exceed 64.
The remainder is reset to NT. At n127, it is determined whether the reset CNT exceeds 2 or not. If it does not exceed 2, it is considered to be within the error range and returns as is. If CNT exceeds 2, proceed to n128 and execute CNT-4. Furthermore, L
Execute +1. Then, the process returns to n127 again. C.N.T.
-4 is executed because one C0NTINUE indicates a length of 16 minutes, that is, a length of 4 counts.

Lは前述のようにrcONTI NUEJの回数を計数
するカウンタである。後述のように、このLを見ること
によって2小節以上に跨る音や、2゜4.8.16分音
符で表せない長さの音の復元処理が可能になってくる。
L is a counter that counts the number of rcONTI NUEJs as described above. As will be described later, by looking at this L, it becomes possible to restore sounds that span two measures or more, or sounds that have a length that cannot be represented by 2°4, 8, or 16th notes.

上記n122〜n126においては、更にNLEN C
TR]に所定のデータを設定する。この所定のデータは
第12図に示す符長データ(0〜5)の何れかである。
In the above n122 to n126, further NLEN C
TR] is set to predetermined data. This predetermined data is any of the note length data (0 to 5) shown in FIG.

そして、それぞれの符長データでは表せない符長の場合
(例えば、付点2分音符、タイで繋がれた2分音符と8
分音符など)は、上述と同様にしてn127.n128
の処理を行い、C0NTINUEによって表す。例えば
、2分音符の場合にはNLEN [TR]に1がセット
される(n123)。
In the case of note lengths that cannot be represented by each note length data (for example, dotted half notes, tied half notes, and 8
diacritics, etc.) in the same way as above. n128
, and is represented by C0NTINUE. For example, in the case of a half note, NLEN [TR] is set to 1 (n123).

[5TORE処理] 第20図は“5TORE処理゛を示している。[5TORE processing] FIG. 20 shows "5TORE processing".

この“5TORE処理″°では、第17図で演算された
音程原点差データと、第19図で演算された符長データ
がメロディ−メモリにストアされる。
In this "5TORE process", the pitch origin difference data calculated in FIG. 17 and the note length data calculated in FIG. 19 are stored in the melody memory.

まずn130においてNLEN [TRコがFFである
かどうかの判定を行う。もしこのレジスタの内容がFF
であればCNTが2以下である。即ち、第19図におい
てn121から直接リターンしている。つまり、CNT
の計数時間が16分符長に相当する長さに達していない
。この場合にはリターンする。
First, in n130, it is determined whether NLEN [TR] is an FF. If the contents of this register are FF
If so, the CNT is 2 or less. That is, in FIG. 19, a direct return is made from n121. In other words, CNT
The counting time has not reached the length corresponding to the 16th note length. In this case, return.

NLEN [TR]に0〜4の何れかの符長データ(第
12図参照)がセットされている時には、n131にお
いて処理が行われる。ここでは、まず、DKCの下位4
ビツトがレジスタDATA [TR]の上位4ビツトに
入れられる。このDATA [TR]はメロディメモリ
に対してストアするデータを一時的に格納するか、メロ
ディメモリから読み出したデータを一時的に記憶するバ
ッファとして使用される。そして、このDATA [T
R]の下位4ビツトには、NLEN [TR]の下位4
ビツトがセットされる。DKCには、第17図のパ音高
(REC)”処理において音程原点差データが記憶され
ている。この音程原点差データは4ビツトで表されるか
ら(1〜E)、その下位4ビツトは音程原点差データを
示している。NLEN [TR]は、第19図から符長
データを(O〜4)で表している。つまりDATA C
TRIの上位4ビツトには音程原点差データがセントさ
れ、下位4ビツトには符長データがセットされる。この
段階で、音符データのフォーマットが完成する(第9図
参照)。そして、n132へ進み、DATA [TRコ
のデータが、ポインタDP CTRIで示されるメロデ
ィ−メモリのエリアにストアされる。そして、n133
においてポインタを一つ進めておく。次に0134にお
いてLが0であるかどうかの判定を行う。Lが1以上で
ある場合には、rcOT I NUEJを示しているか
らn135に進む。ここでは、DATA [TR]の上
位4ビツトにDKCの下位4ビツトを入れる。つまり音
程原点差データを入れる。そして、DATA CTRI
の下位4ビツトに5を入れる。この5は第12図に示す
ようにrcONT I NUEJを表す符長データであ
る。続いてLを一つ引いて再びn132以下を実行する
。このようにしてL=Oになるまでメロディ−メモリに
rcONTINUE」に関するデータのストアを行って
いく。
When any note length data from 0 to 4 (see FIG. 12) is set in NLEN [TR], processing is performed at n131. Here, first, the bottom four of DKC
The bits are placed in the upper 4 bits of register DATA[TR]. This DATA [TR] is used as a buffer to temporarily store data to be stored in the melody memory or to temporarily store data read from the melody memory. And this DATA [T
The lower 4 bits of NLEN[TR]
Bit is set. The DKC stores pitch origin difference data in the "Pitch pitch (REC)" process shown in FIG. indicates pitch origin difference data. NLEN [TR] indicates note length data as (0 to 4) from Fig. 19. In other words, DATA C
Pitch origin difference data is set in the upper 4 bits of TRI, and note length data is set in the lower 4 bits. At this stage, the format of the note data is completed (see Figure 9). Then, the process advances to n132, and the data of DATA[TR is stored in the area of the melody memory indicated by the pointer DP_CTRI. And n133
Advance the pointer by one. Next, at 0134, it is determined whether L is 0 or not. If L is 1 or more, it indicates rcOT I NUEJ, so proceed to n135. Here, the lower 4 bits of DKC are placed in the upper 4 bits of DATA [TR]. In other words, input pitch origin difference data. And DATA CTRI
Put 5 into the lower 4 bits of . This 5 is note length data representing rcONT I NUEJ as shown in FIG. Next, subtract L by one and execute n132 and subsequent steps again. In this way, data regarding "rcONTINUE" is stored in the melody memory until L=O.

以上の動作によってメロディ−メモリに対する演奏デー
タのレコードが行われていく。
Through the above operations, performance data is recorded in the melody memory.

■演奏データのリード 次に、上記メロディ−メモリに記憶されている演奏デー
タの読み出しの動作について説明する。
(2) Reading Performance Data Next, the operation of reading performance data stored in the melody memory will be explained.

この読み出しの動作はプレイモードで行われる。This read operation is performed in play mode.

プレイモードはトラックスイッチ23を操作することに
よって緑色のLEDを点灯することで設定される。プレ
イモードでは、後述するように、READ処理”′のサ
ブルーチンコールによってメロディメモリからデータが
読みだされ、処理される。
The play mode is set by operating the track switch 23 to turn on the green LED. In the play mode, data is read from the melody memory and processed by a subroutine call of READ processing ``'', as will be described later.

第21図はこの“READ処理”の動作を示すフローチ
ャートである。
FIG. 21 is a flowchart showing the operation of this "READ processing".

(READ処理〕 まず、n140においてNEXT [TR]の内容をD
ATA [TR]にセットする。NEXT [TR]に
は、次に処理しようとするデータが入っている。この、
次に処理しようとするデータを、今から処理するデータ
を入れるDATA [TR]に移す。そして、ポインタ
を一つ進める(n 141)。続いて、ポインタDP 
CTRIで示すメロディ−メモリのエリアのデータを、
次の処理の準備のためにNEXT [TR]に移してお
く。
(READ processing) First, in n140, the contents of NEXT [TR] are
Set to ATA [TR]. NEXT [TR] contains the data to be processed next. this,
Move the data to be processed next to DATA [TR], which will contain the data to be processed now. Then, the pointer is advanced by one (n 141). Next, pointer DP
The data in the melody memory area indicated by CTRI is
Move it to NEXT [TR] in preparation for the next process.

以上の準備を終えてから、n143においてDATA 
CTRIの内容を判定する。データは、第9図に示すよ
うに00〜FFの範囲において区分されているから、そ
のデータの内容を見ることにより、n144〜n150
の各サブルーチンコールを行う。例えば、DATA [
TR] −F 1であればn145の“′音程原点処理
パをサブルーチンコールする。以下、n144〜n15
0の各処理について説明する。
After completing the above preparations, DATA
Determine the contents of the CTRI. Since the data is classified in the range of 00 to FF as shown in Fig. 9, by looking at the contents of the data, it is possible to
Each subroutine call is made. For example, DATA [
TR] -F If 1, subroutine calls the pitch origin processing parameter of n145.Hereafter, n144 to n15
Each process of 0 will be explained.

第22図は“′音程原点処理°゛の処理を示している。FIG. 22 shows the process of ``'pitch origin processing''.

ここでは、まず、DATA [TR]の下位4ビツトを
レジスタjに入れ、そのjが表すテーブルナンバーのキ
ーコードをTABLEから読み出してBKCCTR3に
セントする。これで、BKC[TR]に音程原点データ
がセットされる。
Here, first, the lower 4 bits of DATA [TR] are placed in register j, and the key code of the table number represented by j is read from TABLE and placed in BKCCTR3. The pitch origin data is now set in BKC[TR].

n143においてDATA I:TR3=FBの時には
、n146の”VOICE処理゛がサブルーチンコール
される。このサブルーチンでは、第23図に示すように
、最初にNEXT [TR]のデータをVOICE[T
R]に入れる。つまり、NEXT [TR]にはボイス
ナンバーがセットされているから、このボイスナンバー
をVOICE[TR]にセットする。そしてn171に
おいてトラックナンバーとボイスナンバーを音源(TG
)17に出力する。音源(TG)17ではこれらのデー
タを受は取ることによって自動的にボイスのセットを行
う。n172においては、ポインタを一つ進め、n17
3においてそのポインタで示されるメロディ−メモリ1
4のエリアのデータをNEXT [TR]にセットして
おく。
When DATA I:TR3=FB in n143, the "VOICE processing" subroutine in n146 is called. In this subroutine, as shown in FIG.
R]. That is, since the voice number is set in NEXT [TR], this voice number is set in VOICE [TR]. Then, in n171, set the track number and voice number to the sound source (TG
)17. The sound source (TG) 17 automatically sets the voice by receiving and receiving these data. At n172, advance the pointer by one and n17
Melody-memory 1 indicated by the pointer at 3
Set the data in area 4 to NEXT [TR].

上記n143においてDATA [TR] =FCの時
には、n147の”REPEAT処理′″をサブルーチ
ンコールする。またDATA [TR] =FOO時に
は、n144の” RE T U RN処理′。
When DATA [TR] = FC in n143 above, the subroutine call of "REPEAT processing" in n147 is made. Also, when DATA [TR] =FOO, "RE T U RN processing" of n144.

をサブルーチンコールする。このn144とn147の
サブルーチンは曲をある範囲においてリピートする場合
に実行される。リピートに関するデータはメロディ−メ
モリにストアされている。例えば、第24図に示すよう
にメロディ−メモリ14にデータが記憶されているとす
る。この場合プレイモードにおいては、最初にエリアM
lにおいてREPEATを示すコードを発見し、その次
のエリアM2のデータをリピートする部分のスタートア
ドレスとして認識する。このスタートアドレスがM3で
あるとすると、ポインタの示すアドレスはM3に設定さ
れる。この時、スタックポインタにはM2の次のアドレ
スであるM5がセットされる。そして、ポインタがM4
を示すと、RETURNのコードを発見し、上記スタッ
クポインタにセットされているエリアM5をポインタの
示すアドレスとする。これによってエリアM3からエリ
アM4までの範囲にレコードされている曲が繰り返され
ることになる。
Call the subroutine. These subroutines n144 and n147 are executed when the song is to be repeated within a certain range. Data regarding repeats is stored in melody memory. For example, assume that data is stored in the melody memory 14 as shown in FIG. In this case, in play mode, first
1, a code indicating REPEAT is found, and the data in the next area M2 is recognized as the start address of the portion to be repeated. Assuming that this start address is M3, the address indicated by the pointer is set to M3. At this time, M5, which is the next address after M2, is set in the stack pointer. And the pointer is M4
, the RETURN code is found and the area M5 set in the stack pointer is set as the address indicated by the pointer. As a result, the songs recorded in the range from area M3 to area M4 will be repeated.

第21図のn143において、DATA [TR] =
FCの時には、“’REPEAT処理°゛をサブルーチ
ンコールするが、このサブルーチンにおいては、第24
図に示すように、ポインタの示すアドレスの変更とスタ
ックポインタの処理を中心とした処理を行う。第26図
はこの“’REPEAT処理”°を示している。まず、
n180においてデータポインタが示すアドレスの次の
アドレス(第24図ではエリアM5)を、現在のスタッ
クポインタSP [TR]が示すスタックレジスタR3
TC[TR]  [SP [TR] ]に移しておく。
At n143 in FIG. 21, DATA [TR] =
At the time of FC, the ``'REPEAT processing'' subroutine is called, but in this subroutine, the 24th
As shown in the figure, processing mainly involves changing the address indicated by the pointer and processing the stack pointer. FIG. 26 shows this "'REPEAT processing"°. first,
At n180, the address next to the address indicated by the data pointer (area M5 in FIG. 24) is transferred to the stack register R3 indicated by the current stack pointer SP [TR].
Move it to TC [TR] [SP [TR] ].

つまり、第24図の例ではエリアM5のアドレスがSP
 [TR]で示されるスタックレジスタR5TC[TR
]  [SP [TR]コにセットされる。続いてスタ
ックポインタを一つ進める(n181)。
In other words, in the example of FIG. 24, the address of area M5 is SP
Stack register R5TC[TR] indicated by [TR]
] [SP [TR] is set. Next, the stack pointer is advanced by one (n181).

次に、NEXT [TR]のデータをポインタDP[T
R]にセットする。この段階で、例えば第24図に示す
例ではDP [TR]にエリアM3のアドレスがセット
される。続いて、n183において、ポインタが示すメ
ロディ−メモリのエリアのデータがNEXT [TR]
にセットされる。第24図に示す例ではエリアM3のデ
ータがNEXT[TR]にセットされる。
Next, the data of NEXT [TR] is transferred to the pointer DP[T
R]. At this stage, for example, in the example shown in FIG. 24, the address of area M3 is set in DP [TR]. Next, at n183, the data in the melody memory area indicated by the pointer is NEXT [TR]
is set to In the example shown in FIG. 24, data in area M3 is set to NEXT[TR].

次に、上記第21図においてn144の“RETURN
処理″がサ処理−チンコールされた時の動作を第27図
を参照して説明する。この処理ではまず、n190にお
いてスタックポインタが正であるかどうかの確認を行う
。続いてn191においてスタックポインタを一つ戻す
。次にn192においてスタックポインタが示すR3T
C[TR]  [SP [TR] ]の内容をポインタ
DP[TR]に移す。第24図に示す例ではDP [T
R]にエリアM5のアドレスがセットされる。そして、
n193において、そのデータポインタDP[TRjが
示すメロディ−メモリのエリアのデータをNEXT [
TR]に移す。
Next, in FIG. 21 above, “RETURN” of n144
The operation when "process" is called is described with reference to FIG. 27.In this process, first, in n190, it is checked whether the stack pointer is positive.Next, in n191, the stack pointer is Return one.Next, in n192, R3T indicated by the stack pointer
C[TR] Move the contents of [SP[TR]] to pointer DP[TR]. In the example shown in FIG.
R] is set to the address of area M5. and,
At n193, the data in the melody memory area indicated by the data pointer DP[TRj is NEXT[
TR].

以上の第26図、第27図に示す処理によって、曲の一
部を繰り返すことを自由に行うことができる。なお、勿
論のことではあるが、曲の繰り返しループの中に更に曲
の繰り返しループを設定することも可能である。
By the above-described processing shown in FIGS. 26 and 27, it is possible to freely repeat a part of a song. Of course, it is also possible to set a repeating loop of a song within the repeating loop of a song.

次に、第21図の゛’READ処理″において、音符デ
ータ、符長データまたはFFを読み出した場合の動作に
ついて説明する。DATA [TR]が10からEFの
場合は、n148の“°音符処理”″をサブルーチンコ
ールする。第28図はこの“′音符処理′″のフローチ
ャートである。まず、n200において、“音程処理°
゛をサブルーチンコールし、続いてn201において“
符長処理゛°をサブルーチンコールする。そして、n2
02においてトラックナンバー、キーコード、キーオン
情報を音源17に出力する。音源17はこれらの情報を
受は取った時に発音を開始する。
Next, we will explain the operation when reading note data, note length data, or FF in the "READ process" in FIG. Call "" as a subroutine. FIG. 28 is a flowchart of this "'note processing'". First, in n200, “pitch processing °
Call the subroutine ``, and then call `` in n201.
Call the note length processing subroutine. And n2
At step 02, the track number, key code, and key-on information are output to the sound source 17. The sound source 17 starts producing sounds when it receives these pieces of information.

第29図は、上記n200の°“音程処理゛°の動作を
示すフローチャートである。まずn210において、D
ATA [TR]の上位4ビツトをDKCに入れる。D
ATA [TR]の上位4ビツトは、音程原点差データ
である(第9図参照)。この段階では、DKCに入れら
れる音程原点差データは、コード表現のデータである(
第11図参照)。そこで、n211において、コード表
現の音程原点差データを音程原点データが示すキーコー
ドのキーコード差に変換する。更に、n212において
、音程原点データにこの差データを加算して実際のキー
コードに変換し、そのデータをキーコードとしてKCに
入れる。
FIG. 29 is a flowchart showing the operation of "pitch processing" in n200. First, in n210, D
Put the upper 4 bits of ATA [TR] into DKC. D
The upper four bits of ATA [TR] are pitch origin difference data (see FIG. 9). At this stage, the pitch origin difference data stored in the DKC is chord expression data (
(See Figure 11). Therefore, in step n211, the pitch origin difference data expressed in the chord is converted into a key code difference between the key codes indicated by the pitch origin data. Furthermore, in n212, this difference data is added to the pitch origin data to convert it into an actual key code, and the data is entered into the KC as the key code.

第30図は“′符長処理′°の動作を示すフローチャー
トである。まずn220において、DATACTRlの
下位4ビツトをNLEN [TR]に入れる。DATA
 [TR]の下位4ビツトは、符長データを表す(第9
図参照)。そして、n221において、その符長データ
の値を判定する。符長データはOから5の中の一つの数
値である。符長データが、例えば0の時には符長は全音
符であることを意味する。この場合にはn222が実行
される。つまり、NLEN [TR]に16がセントさ
れる。ここで、4!!16は、この装置の分解能でる1
6分符長の16倍であることを示している。
FIG. 30 is a flowchart showing the operation of "code length processing". First, in n220, the lower 4 bits of DATACTRl are put into NLEN[TR].DATA
The lower 4 bits of [TR] represent note length data (9th
(see figure). Then, in n221, the value of the note length data is determined. The note length data is one value from 0 to 5. For example, when the note length data is 0, it means that the note length is a whole note. In this case, n222 is executed. In other words, 16 is sent to NLEN[TR]. Here, 4! ! 16 is the resolution of this device, 1
This shows that it is 16 times the length of a sixth note.

このNLEN [TR]は、この段階においては、プリ
セット値を記憶する。後述のように、この後、時間の経
過とともにNLEN [TR]の減算が行われて行(。
This NLEN [TR] stores a preset value at this stage. As described later, NLEN [TR] is subtracted as time passes and row (.

メロディ−メモリのエリアから8売み出したデータが音
符データの時には第29図の°“音程処理°。
When the data retrieved from the melody memory area is musical note data, the "pitch processing" shown in FIG. 29 is performed.

とともに、第30図の“符長処理′°が行われる。At the same time, the "note length processing" shown in FIG. 30 is performed.

これに対して、メロディ−メモリのエリアから読み出し
たデータが休符データの時には、第21図のサブルーチ
ンn149が実行されることになるから、この場合には
第30図の“符長処理′°のみが行われる。
On the other hand, when the data read from the melody memory area is rest data, subroutine n149 in FIG. 21 is executed, so in this case, the "note length processing" in FIG. only is done.

〔テンポクロック割込処理〕[Tempo clock interrupt processing]

ところで、第4図において説明しように、テンポクロッ
ク11はその時のテンポに合わせて16分の符長に対し
て4回の割り込みクロックを発生する。第31図は“テ
ンポクロツタ割込処理゛″の動作を示すフローチャート
である。
By the way, as explained in FIG. 4, the tempo clock 11 generates four interrupt clocks for a 16th note length in accordance with the current tempo. FIG. 31 is a flowchart showing the operation of "tempo clock interrupt processing".

この割込処理では、n300においてトラ・7り指定を
初期値のトラック1 (TR←0)にセットし、n30
1においてモードの判定を行う。プレイモードであると
判定した時は、n302に進む。ここでは、カウンタC
0UNTを読んで、その値を4で除した時の余りがOか
どうかを見る。C0UNTは、ランニングカウンタであ
り、装置の電源がオンされてから、この割込処理に入る
度にカウントアツプし続けている(n307)。つまり
、このC0UNTは1小節間を64カウントする。n3
03は、4回の割り込みに対して1回だけ次のn304
を実行するためのステップである。つまり4回の割り込
みに対して1回だけ゛PLAY処理°°を行う。これは
、CPUの制御の分解能を16分の符長に設定している
からである。PLAY処理の後トラックナンバーを一つ
増やし再びn301に戻る。そして、同様にn301〜
n304の処理をし、n305で2つのトラックについ
て処理が終わったか判定し、終わったと判定した時はn
307に進む。n307ではカウンタC0UNTとCN
Tとを1つ増やす。
In this interrupt processing, at n300, the tiger/7ri designation is set to the initial value of track 1 (TR←0), and at n300,
1, the mode is determined. When it is determined that the mode is play mode, the process advances to n302. Here, counter C
Read 0UNT and see if the remainder when dividing that value by 4 is O. C0UNT is a running counter, and continues to count up every time this interrupt processing is entered after the power of the device is turned on (n307). In other words, this C0UNT counts 64 times for one bar. n3
03 is the next n304 only once for every 4 interrupts.
This is a step to execute. In other words, the PLAY process is performed only once for every four interrupts. This is because the CPU control resolution is set to 16th note length. After the PLAY process, the track number is incremented by one and the process returns to n301. And similarly n301~
Perform the processing in n304, and in n305 judge whether the processing has finished for the two tracks. When it is judged that the processing has finished, n
Proceed to 307. In n307, counters C0UNT and CN
Increase T by one.

[PLAY処理] 第32図は、上記n304で実行される“″PLAYP
LAY処理ローチャートを示している。
[PLAY Process] FIG. 32 shows the "" PLAYP executed in n304 above.
A LAY processing flowchart is shown.

最初にn310においてNLEN [TR]にセントさ
れている符長データを一つ減らす。次に、その結果、符
長データがOになっているかどうかのチエツクを行う。
First, in n310, the note length data stored in NLEN [TR] is decreased by one. Next, it is checked whether the note length data is O as a result.

0になっていなければそのままリターンする。NLEN
 [TR] =Oであれば、今処理しているDATA 
CTR]のデータが音符データであるかそれ以外のデー
タであるかを判定する(n312)。もし音符データ以
外であれば“READ処理パ処理パワてリターンする。
If it is not 0, return as is. NLEN
[TR] If =O, the DATA currently being processed
CTR] is music note data or other data (n312). If it is other than musical note data, execute the READ processing and return.

また、音符データの時には、n313において次のアド
レスのデータも音符データかどうかの判定を行う。つま
り、NEXT [TR]には、第21図のn142にお
いて次のアドレスのデータがストアされている。もし、
次のデータも音符データである時には、rcONT I
NUEJの可能性がある。そこで、次のn314におい
て1、NEXT [TR]の下位4ビツトをレジスタX
に入れ、n315においてその値が5であるかどうかを
判定する。もし5であれば、rcONT INUEJの
処理を行う必要があるから、n316へ進み、“C0N
T処理”“のサブルーチンコールを行う。n313にお
いて、次のデータが音符データでない場合には、n31
7に進み、その時のトラックナンバーおよびキーオフ情
報を音#17に出力する。またn315においてX=5
でない場合、つまり、rcONT I NUEJを実行
する必要がない時もn317に進む。そしてn318に
進み、”READ処理゛のサブルーチンコールを行う。
When the data is musical note data, it is determined in n313 whether the data at the next address is also musical note data. In other words, data at the next address is stored in NEXT [TR] at n142 in FIG. if,
When the next data is also note data, rcONT I
Possibly NUEJ. Therefore, in the next n314, 1, the lower 4 bits of NEXT [TR] are set to register
and determines whether the value is 5 in n315. If it is 5, it is necessary to process rcONT INUEJ, so proceed to n316 and write “C0N
Make a subroutine call for the T process. In n313, if the next data is not note data, n31
7, the track number and key-off information at that time are output to sound #17. Also, in n315, X=5
If not, that is, if there is no need to execute rcONT I NUEJ, the process also proceeds to n317. Then, the process advances to n318, and a subroutine call for "READ processing" is made.

このようにして、一つの音符または休符毎に“READ
処理゛を実行し、音源17において発音等の処理を行う
In this way, for each note or rest, “READ”
Then, the sound source 17 performs processing such as pronunciation.

上記n316での゛’C0NT処理”は、第33図に示
すフローチャートで実行される。まず、n320に進む
。ここでは、NLEN [TRIに16分の符長を表す
1がセットされ、DATA [TR1に、上記n313
の時点での次の音符データまたは休符がセットされる。
The above ``C0NT processing'' at n316 is executed according to the flowchart shown in FIG. To, the above n313
The next note data or rest at the point in time is set.

そしてポインタが一つ進められる。次にn321で、ポ
インタが示すメロディ−メモリのエリアのデータをNE
XT [TRIに移す。次に、n322において″音程
処理″゛のサブルーチンコールを行い、音源17に対し
て音符データと符長データを送る。この場合の音符デー
タおよび符長データは、第32図のn312の時点にお
いてNEXT [TRIに記憶されているデータと同じ
である。そして、n323に進んで、トランクナンバー
およびキーコードを音rX17に対して出力する。以上
の“C0NT処理゛によって、例えば、第25図に示す
ような楽音の復元が可能になる。
The pointer is then advanced by one. Next, in n321, the data in the melody memory area indicated by the pointer is sent to NE.
XT [Transfer to TRI. Next, in n322, a subroutine call for "pitch processing" is made, and note data and note length data are sent to the sound source 17. The note data and note length data in this case are the same as the data stored in NEXT [TRI at the time of n312 in FIG. 32. Then, the process advances to n323 and outputs the trunk number and key code to the sound rX17. The above-described "C0NT processing" makes it possible to restore musical tones as shown in FIG. 25, for example.

上記の構成および動作により、メロディ−メモリ14に
は、演奏データが圧縮された型で記憶され、またプレイ
モードにおいては、そのデータを正しく復元して楽音信
号として出力することができる。また、本実施例ではキ
ーオンイベント情報やキーオフイベント情報を記憶して
いないために、その分更にメモリの節約を図ることがで
きる。
With the above configuration and operation, the performance data is stored in the melody memory 14 in a compressed form, and in the play mode, the data can be correctly restored and output as a musical tone signal. Further, in this embodiment, since key-on event information and key-off event information are not stored, memory can be further saved.

なお、実施例では、音程原点データを第10図に示すよ
うにテーブルナンバーで示したが、音程原点データに対
応するキーコードそのものを記憶することもできる。同
様に音程原点差データをコード表現にして記憶したが、
音程原点データと音高データの差データを直接記憶する
こともできる。また、キーコードは連続的なデータで表
現するようにしているが、オクターブコードとノートコ
ードの組み合わせで構成したものであっても、本発明を
適用することができる。
In the embodiment, the pitch origin data is shown as a table number as shown in FIG. 10, but it is also possible to store the key code itself corresponding to the pitch origin data. Similarly, I stored the pitch origin difference data in chord representation,
Difference data between pitch origin data and pitch data can also be directly stored. Furthermore, although the key code is expressed as continuous data, the present invention can also be applied to a key code composed of a combination of an octave code and a note code.

〔レジスタ〕〔register〕

(RUN [TRI )  ・・・録音/再生/停止状
態を表すモードレジスタ。
(RUN [TRI)...Mode register indicating recording/playback/stop status.

0:停止、1:録音、2:再生 (TR)  ・・・トラック階を記憶するレジスタ(D
P(TRI)・・・メロディ−メモリのポインタ。
0: Stop, 1: Record, 2: Play (TR) ...Register (D
P(TRI): Melody memory pointer.

(VOI CE [TRI )  ・・・ボイス階を記
憶するレジスタ。
(VOI CE [TRI)...A register that stores the voice floor.

(MD [TRI [X])・・・メロディ−メモリ。(MD [TRI [X])...Melody memory.

(KOF)  ・・・最後に押鍵されたキーの状態を記
憶するフラグ。
(KOF): A flag that stores the state of the last key pressed.

0:キーオン、1:キーオフ (CNT)  ・・・キーオンまたはキーオフされてか
らの時間をカウントするカウンタ。
0: Key on, 1: Key off (CNT)...Counter that counts the time since the key was turned on or off.

(KONC)  ・・・キーオンされたキーのキーコー
ドを記憶するレジスタ。
(KONC): A register that stores the key code of the key that is turned on.

(KC)  ・・・再生時にメロディメモリから読みだ
した音程原点差データが示すキーコードを憶するレジス
タ。
(KC)...A register that stores the key code indicated by the pitch origin difference data read from the melody memory during playback.

(COUNT)  ・・・0〜63をランニングカウン
トするカウンタ。
(COUNT) ... A counter that performs a running count from 0 to 63.

(BKC[TRI )  ・・・音程原点データがセッ
トされるレジスタ。
(BKC[TRI)...Register in which pitch origin data is set.

(TABLE [i ] )  ・・・音程原点データ
が記憶されているテーブル。
(TABLE [i]) ... A table in which pitch origin data is stored.

(DKC)  ・・・音程原点差データがセットされる
レジスタ。
(DKC) ...Register in which pitch origin difference data is set.

(NLEN [TRI )  ・・・符長データがセ・
ノドされるレジスタ。
(NLEN [TRI) ... note length data is
register to be read.

(L) ・・・C0NTINUEの回数がセットされる
レジスタ。
(L) ...Register in which the number of C0NTINUE is set.

(PATA [TRI )  ・・・メロディ−メモリ
からロードした(もしくはストアする)データがセット
されるレジスタ。
(PATA [TRI)...Melody - register in which data loaded (or stored) from memory is set.

(NEXT [TRI )  ・・: PATA [T
RIの次のアドレスのデータがセットされるレジスタ。
(NEXT [TRI)...: PATA [T
A register in which the data of the next address of RI is set.

(RSTC(TRI  (: i ] )  ・・・リ
ピートコールをした時の戻り番地を記憶するスタックレ
ジスタ。
(RSTC(TRI(:i))...Stack register that stores the return address when a repeat call is made.

(SP [TRI )  ・・・スタックポインタ。(SP [TRI]) ... Stack pointer.

(g)発明の効果 この発明によれば、演奏データ中の音高データを音程原
点データに相関する音程原点相関データに変換してメモ
リに記憶するようにしているために、メモリを節約する
ことができ、特に長い楽曲の記憶に関してはメモリ節約
効果が非常に顕著となる利点がある。また、上記音程原
点相関データは、基準となる音程原点データとともに演
奏データ記憶手段に記憶されているために、これらのデ
ータから元の音高データの復元が可能である。
(g) Effects of the Invention According to the present invention, the pitch data in the performance data is converted into pitch origin correlation data that correlates with the pitch origin data and is stored in the memory, thereby saving memory. This has the advantage that the memory saving effect is very significant, especially when it comes to memorizing long pieces of music. Further, since the pitch origin correlation data is stored in the performance data storage means together with the pitch origin data serving as a reference, it is possible to restore the original pitch data from these data.

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

第1図(A)、(B)は、本発明の実施例の基本構成図
である。第2図、第3図は同実施例の作用を説明するた
めの図である。第4図は本発明の具体的な実施例である
シーケンサのブロック図、第5図は操作スイッチパネル
の平面図、第6図はメロディメモリの概略構成図、第7
図はメロディメモリに記憶される楽曲の一例を示す図、
第8図は第7図の曲を記憶したメロディメモリ内のデー
タを示す図である。また、第9図はメロディメモリに記
憶されるデータのフォーマットを示す図、第10図はR
OM16に設定されるTA B L E。 第11図は音程原点データと音高データとの差を表すデ
ータとコード表現の音程原点差データとの対応関係を示
す図である。第12図は符長データを示す図である。 第13図〜第17図、第19図〜第23図、第26図〜
第33図はCPUの動作を示すフローチャートである。 また、第18図および第24図。 第25図は上記フローチャートの説明に供される図であ
る。 1−演奏データ入力手段、2−演奏データ変換手段、3
−記憶手段、4−演奏データ復元手段、5楽音体号形成
手段。 TR,1 第 図
FIGS. 1A and 1B are basic configuration diagrams of an embodiment of the present invention. FIGS. 2 and 3 are diagrams for explaining the operation of the same embodiment. FIG. 4 is a block diagram of a sequencer that is a specific embodiment of the present invention, FIG. 5 is a plan view of an operation switch panel, FIG. 6 is a schematic configuration diagram of a melody memory, and FIG.
The figure shows an example of a song stored in the melody memory.
FIG. 8 is a diagram showing data in a melody memory storing the song of FIG. 7. Also, FIG. 9 is a diagram showing the format of data stored in the melody memory, and FIG. 10 is a diagram showing the format of data stored in the melody memory.
TABLE set in OM16. FIG. 11 is a diagram showing the correspondence between data representing the difference between pitch origin data and pitch data and pitch origin difference data expressed in chords. FIG. 12 is a diagram showing note length data. Fig. 13 - Fig. 17, Fig. 19 - Fig. 23, Fig. 26 -
FIG. 33 is a flowchart showing the operation of the CPU. Also, FIGS. 18 and 24. FIG. 25 is a diagram used to explain the above flowchart. 1-Performance data input means, 2-Performance data conversion means, 3
- storage means; 4. performance data restoration means; 5. musical tone symbol formation means. TR, 1 Figure

Claims (3)

【特許請求の範囲】[Claims] (1)演奏データ入力手段と、入力された演奏データ中
の音高データを、複数の音程原点データ中の所定の音程
原点データに相関する音程原点相関データに変換する手
段と、変換された音程原点相関データおよび前記所定の
音程原点データを記憶する演奏データ記憶手段と、を備
えてなる演奏データ処理装置。
(1) Performance data input means, means for converting pitch data in the input performance data into interval origin correlation data that correlates with predetermined interval origin data among a plurality of interval origin data, and the converted pitch A performance data processing device comprising performance data storage means for storing origin correlation data and the predetermined interval origin data.
(2)演奏データ中の音高データが音程原点データに相
関する音程原点相関データとして前記音程原点データと
ともに記憶されている演奏データ記憶手段と、前記演奏
データ記憶手段の音程原点相関データを読み出して、前
記音程原点データに基づいて元の音高データに復元する
手段と、復元した音高データを含む演奏データから楽音
信号を形成する手段と、を備えてなる演奏データ処理装
置。
(2) Reading out the pitch origin correlation data of the performance data storage means and the performance data storage means stored as interval origin correlation data in which the pitch data in the performance data correlates with the interval origin data; A performance data processing device comprising: means for restoring original pitch data based on the pitch origin data; and means for forming a musical tone signal from performance data including the restored pitch data.
(3)前記音程原点相関データは、音程原点データと音
高データとの音高差データである、特許請求の範囲第1
項または第2項記載の演奏データ処理装置。
(3) The pitch origin correlation data is pitch difference data between pitch origin data and pitch data.
The performance data processing device according to item 1 or 2.
JP2000771A 1990-01-05 1990-01-05 Performance data processor Expired - Fee Related JP2785896B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000771A JP2785896B2 (en) 1990-01-05 1990-01-05 Performance data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000771A JP2785896B2 (en) 1990-01-05 1990-01-05 Performance data processor

Publications (2)

Publication Number Publication Date
JPH03204692A true JPH03204692A (en) 1991-09-06
JP2785896B2 JP2785896B2 (en) 1998-08-13

Family

ID=11482962

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000771A Expired - Fee Related JP2785896B2 (en) 1990-01-05 1990-01-05 Performance data processor

Country Status (1)

Country Link
JP (1) JP2785896B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5515137A (en) * 1978-07-18 1980-02-02 Kawai Musical Instr Mfg Co Musical play information recording system
JPH01283595A (en) * 1988-05-11 1989-11-15 Yamaha Corp Automatic playing device
JP3008394U (en) * 1994-08-30 1995-03-14 正誠 何 Board piece combination toy

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5515137A (en) * 1978-07-18 1980-02-02 Kawai Musical Instr Mfg Co Musical play information recording system
JPH01283595A (en) * 1988-05-11 1989-11-15 Yamaha Corp Automatic playing device
JP3008394U (en) * 1994-08-30 1995-03-14 正誠 何 Board piece combination toy

Also Published As

Publication number Publication date
JP2785896B2 (en) 1998-08-13

Similar Documents

Publication Publication Date Title
US5403966A (en) Electronic musical instrument with tone generation control
US5340939A (en) Instrument having multiple data storing tracks for playing back musical playing data
JP3099436B2 (en) Chord detection device and automatic accompaniment device
JPH0752349B2 (en) Electronic musical instrument
JPH03204692A (en) Play data processor
JPH0746272B2 (en) Electronic musical instrument
JP3517953B2 (en) Automatic performance device
JP2745802B2 (en) Performance data recording and playback device
US5326930A (en) Musical playing data processor
US5225620A (en) Electronic musical instrument having one-touch multitrack record and playback of automatic performance
JP2775793B2 (en) Electronic wind instrument
JP3079565B2 (en) Electronic musical instrument
JPH04242291A (en) Performance data recording device
JPH04274495A (en) Electronic musical instrument
JP2500490B2 (en) Automatic accompaniment device
JP2851075B2 (en) Automatic performance device
JP2768360B2 (en) Performance data recording and playback device
JP2595788B2 (en) Electronic musical instrument
JP3018460B2 (en) Electronic musical instrument
JP2508858B2 (en) Performance data processor
JP3630097B2 (en) Performance instruction device and electronic musical instrument
JPH08211865A (en) Automatic playing device
JP2699670B2 (en) Electronic musical instrument
JP2555829B2 (en) Electronic musical instrument
JP2803412B2 (en) Automatic accompaniment device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees