JPH0473690A - Microcomputer - Google Patents

Microcomputer

Info

Publication number
JPH0473690A
JPH0473690A JP2224301A JP22430190A JPH0473690A JP H0473690 A JPH0473690 A JP H0473690A JP 2224301 A JP2224301 A JP 2224301A JP 22430190 A JP22430190 A JP 22430190A JP H0473690 A JPH0473690 A JP H0473690A
Authority
JP
Japan
Prior art keywords
melody
data
signal
address
cpu
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
JP2224301A
Other languages
Japanese (ja)
Other versions
JP3158419B2 (en
Inventor
Takashi Tsukamoto
隆志 塚本
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP22430190A priority Critical patent/JP3158419B2/en
Priority to GB9020397A priority patent/GB2237435B/en
Publication of JPH0473690A publication Critical patent/JPH0473690A/en
Priority to HK25497A priority patent/HK25497A/en
Application granted granted Critical
Publication of JP3158419B2 publication Critical patent/JP3158419B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10HELECTROPHONIC MUSICAL INSTRUMENTS; INSTRUMENTS IN WHICH THE TONES ARE GENERATED BY ELECTROMECHANICAL MEANS OR ELECTRONIC GENERATORS, OR IN WHICH THE TONES ARE SYNTHESISED FROM A DATA STORE
    • G10H1/00Details of electrophonic musical instruments
    • G10H1/18Selecting circuits
    • G10H1/26Selecting circuits for automatically producing a series of tones

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Electrophonic Musical Instruments (AREA)
  • Microcomputers (AREA)
  • Electric Clocks (AREA)

Abstract

PURPOSE:To reduce a load on a CPU by providing a melody data storage device, a musical interval generator, a notation length generator, and an address designation device at a melody generator. CONSTITUTION:At the beginning stage, melody data is read out from the melody data memory device 106 based on an initial address signal from the CPU, and the musical interval generator 126 generates a musical interval signal based on the scale data of the melody data, and a performance operation is performed. The notation length generator 116 generates a notation signal based on the notation data of the melody data, and the address designation device 104 updates the address of the address designation device 104 based on the signal, and reads out the melody data from the melody data storage device 106 sequentially, and the musical interval generator 126 generates the musical interval signal based on the scale data, then, the performance operation is performed. Thereby, the load on the CPU can be reduced.

Description

【発明の詳細な説明】 [産業上の利用分野] この発明はメロディ発生機能を有するマイクロコンピュ
ータ、特にそのメロディの演奏制御に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a microcomputer having a melody generation function, and particularly to control of the performance of the melody.

[従来の技術] 従来のメロディ発生機能を有するマイクロコンピュータ
においては、メロディ発生装置としては主として音程発
生装置だけを有し、その制御はマイクロコンピュータを
制御するプログラムを記憶した記憶装置に記憶された、
メロディ発生用の制御プログラムにより行なわれていた
[Prior Art] A conventional microcomputer having a melody generation function mainly has only a pitch generation device as a melody generation device, and its control is stored in a storage device that stores a program for controlling the microcomputer.
This was done using a control program for melody generation.

[発明が解決しようとする課題] このため、従来のこの種のマイクロコンピュータは次の
ような課題を有する。
[Problems to be Solved by the Invention] Therefore, this type of conventional microcomputer has the following problems.

(1)メロディの発生には多量の制御プログラムを必要
とするため、マイクロコンピュータのそれ自体の制御も
含めると多量のプログラムを格納することができる大容
量の記憶装置を必要とする。このことは、システムのコ
ストアップにつながる。
(1) Since a large amount of control programs are required to generate a melody, a large capacity storage device that can store a large amount of programs is required, including the control of the microcomputer itself. This leads to an increase in the cost of the system.

(2)メロディ演奏中は他の制御を行なうことは難しく
、そのため、システム外部からの要求に対し、即座に応
答することができない。即ち、長いメロディを演奏する
ことはできない。
(2) It is difficult to perform other controls while the melody is being played, and therefore it is not possible to respond immediately to requests from outside the system. That is, it is not possible to play long melodies.

この発明の目的は、このような課題を解決するためにな
されたものであり、低価格でかっ、メロディ演奏中でも
外部からの要求に即座に応答することのできるマイクロ
コンピュータを提供することにある。
The purpose of the present invention was to solve the above problems, and it is an object of the present invention to provide a low-cost microcomputer that can immediately respond to external requests even while playing a melody.

[課題を解決するための手段] この発明のマイクロコンピュータは、種々のデータ処理
を行なうCPUと、メロディ信号を出力するメロディ発
生装置と、CPUに入出力されるデータを転送するデー
タバスとを有する。
[Means for Solving the Problems] A microcomputer of the present invention includes a CPU that performs various data processing, a melody generator that outputs a melody signal, and a data bus that transfers data input and output from the CPU. .

そして、メロディ発生装置は、音階データ、音符長デー
タ及び演奏メロディ終了の有無を示すエンドデータを少
な(とも含むメロディデータを記憶するメロディデータ
記憶装置と、メロディデータの音階データに基づいて音
階を発生する音階発生装置と、メロディデータの音符長
データに基づいて音符長さ信号を発生する音符長発生装
置と、CPUからの初期アドレス信号を入力してその初
期アドレス信号をメロディデータ記憶装置の読み出しア
ドレスとして供給すると共に、その初期アドレス信号に
続くアドレスを音符長信号に基づいたタイミングでメロ
ディデータ記憶装置のアドレス信号として出力するアド
レス指定装置とを有する。
The melody generator generates a scale based on the scale data of the melody data, a melody data storage device that stores the melody data including scale data, note length data, and end data indicating whether or not the performance melody has ended. a note length generator that generates a note length signal based on note length data of melody data; and a note length generator that inputs an initial address signal from a CPU and uses the initial address signal as a read address of a melody data storage device. and an addressing device that outputs the address following the initial address signal as an address signal of the melody data storage device at a timing based on the note length signal.

また、メロディ発生装置は、上記の構成に加えて、メロ
ディデータ記憶装置のエンドデータ及び音符長発生装置
の音符長信号に基づいてメロディ終了信号を出力する曲
終了信号発生回路と、メロディ終了信号を入力するとC
PUに対してメロディ終了割り込み信号を送出する割り
込み発生回路と、CPUからメロディ発生装置の演奏開
始又は停止を指示するメロディ制御信号を少なくとも入
力すると共にメロディ終了信号を入力し、演奏開始指令
信号の入力によりメロディ発生装置を構成する各装置の
作動を開始させ、演奏停止指令信号及び前記メロディ終
了信号によりその作動を停止させる制御装置とを有する
In addition to the above configuration, the melody generator also includes a song end signal generation circuit that outputs a melody end signal based on the end data of the melody data storage device and the note length signal of the note length generator; When you enter C
An interrupt generation circuit that sends a melody end interrupt signal to the PU, and a melody control signal that instructs the melody generator to start or stop playing from the CPU are input at least, a melody end signal is input, and a play start command signal is input. and a control device that starts the operation of each device constituting the melody generating device and stops the operation in response to a performance stop command signal and the melody end signal.

また、アドレス指定装置は、CPUから初期アドレス信
号が設定されるアドレスレジスタと、このアドレスレジ
スタの初期アドレス信号をプリセット値としてセットし
、音符長信号に基づいた信号が入力する度にカウントア
ツプ(又はカウントダウン)していくアドレスカウンタ
とから構成されている。
In addition, the addressing device has an address register in which an initial address signal is set from the CPU, and sets the initial address signal of this address register as a preset value, and counts up (or It consists of an address counter that counts down.

また、制御装置は、CPUからメロディ発生装置の演奏
開始又は停止を指示するメロディ制御信号を少なくとも
入力して設定するメロディ制御レジスタと、メロディ終
了信号を入力し、演奏開始指令信号の入力によりメロデ
ィ発生装置を構成する各装置の作動を開始させ、演奏停
止指令信号及び前記メロディ終了信号によりその作動を
停止させるオン/オフ制御回路とを有する。
The control device also includes a melody control register that is set by inputting at least a melody control signal instructing the melody generator to start or stop playing from the CPU, a melody end signal, and a melody generation by inputting a play start command signal. The apparatus includes an on/off control circuit that starts the operation of each device constituting the apparatus and stops the operation in response to a performance stop command signal and the melody end signal.

また、CPUは割り込み信号が入力すると、予め設定さ
れている複数の曲目の先頭アドレスに対応したアドレス
信号をアドレスレジスタに送り出す。
Further, when the CPU receives an interrupt signal, it sends an address signal corresponding to the start address of a plurality of preset songs to the address register.

そして、この発明のマイクコンピュータは、CPU、デ
ータバス及びメロディ発生装置の上述の全ての装置が、
ワンチップ上に構成される。
In the microphone computer of the present invention, all the above-mentioned devices including the CPU, data bus, and melody generator are
Constructed on one chip.

ところで、メロディ制御レジスタ及びアドレス設定レジ
スタの一方又は双方は、CPUの制御する記憶装置と同
一のアドレス空間内にある記憶装置として構成されても
よい。
Incidentally, one or both of the melody control register and the address setting register may be configured as a storage device located in the same address space as a storage device controlled by the CPU.

また、アドレスレジスタは、メロディの演奏順序に従っ
たメロディデータ記憶装置の複数のアドレスを格納し、
メロディ終了が入力する度にその順序に従ったアドレス
をアドレスカウンタにプリセット値としてセットさせる
演奏順序記憶装置を有する構成にしてもよい。
Further, the address register stores a plurality of addresses of the melody data storage device according to the playing order of the melody,
It may also be configured to include a performance order storage device that causes an address counter to set an address according to the order as a preset value each time the end of a melody is input.

更に、この発明のマイクロコンピュータは、メロディデ
ータ記憶装置からのメロディデータと前記データバスか
らのメロディデータとが入力してCPUの指令に基づい
ていずれか一方を選択し出力するデータ選択装置と、こ
のデータ選択装置からのメロディデータを入力し、一時
記憶した後に音階発生装置に音階データを出力し、音符
長発生装置に音符長データを出力する一時記憶装置とを
有する。
Furthermore, the microcomputer of the present invention includes a data selection device which receives input of melody data from the melody data storage device and melody data from the data bus and selects and outputs either one based on a command from a CPU; It has a temporary storage device that inputs melody data from the data selection device, temporarily stores it, then outputs the scale data to the scale generation device, and outputs note length data to the note length generation device.

[作 用] この発明においては、当初CPUからの初期アドレス信
号に基づいてメロディデータ記憶装置からメロディデー
タが読み出され、そして、音程発生装置はメロディデー
タの音階データに基づいて音程信号を発生し、演奏動作
をする。そして、音符長発生装置はメロディデータの音
符長データに基づいて音符長信号を発生し、アドレス指
定装置はその信号に基づいてアドレス指定装置のアドレ
スを更新させてメロディデータ記憶装置からメロディデ
ータを順次読み出していき、音程発生装置はその音階デ
ータに基づいて音程信号を発生し、演奏動作をさせる。
[Function] In this invention, melody data is initially read from the melody data storage device based on the initial address signal from the CPU, and the pitch generator generates pitch signals based on the scale data of the melody data. , make musical movements. Then, the note length generator generates a note length signal based on the note length data of the melody data, and the addressing device updates the address of the addressing device based on the signal, and sequentially reads the melody data from the melody data storage device. The pitch generator generates a pitch signal based on the pitch data, and performs a performance operation.

また、曲終了信号発生装置はメロディデータ記憶装置か
らのエンドデータ及び前記音符長発生装置からの音符長
信号に基づいてメロディ終了信号を出力し、割り込み発
生装置はメロディ終了信号を入力するとCPUに対して
メロディ終了割り込み信号を送出する。
Further, the song end signal generator outputs a melody end signal based on the end data from the melody data storage device and the note length signal from the note length generator, and when the interrupt generator receives the melody end signal, it sends the melody end signal to the CPU. and sends a melody end interrupt signal.

制御装置はCPUからの演奏開始指令信号の入力により
メロディ発生装置を構成する各装置の作動を開始させ、
演奏停止指令信号及び前記メロディ終了信号によりその
作動を停止させる。
The control device starts the operation of each device constituting the melody generating device by inputting a performance start command signal from the CPU,
The operation is stopped by the performance stop command signal and the melody end signal.

また、アドレス指定装置においては、アドレスレジスタ
はCPUから初期アドレス信号が設定され、アドレスカ
ウンタはこのアドレスレジスタの初期アドレス信号をプ
リセット値としてセットし、音符長信号に基づいた信号
が入力する度にカウントアツプ(カウントダウン)して
メロディデータ記憶装置の読み出しアドレスを更新して
いく。
In addition, in the addressing device, the address register is set with an initial address signal from the CPU, and the address counter sets the initial address signal of this address register as a preset value, and counts each time a signal based on the note length signal is input. It counts down and updates the read address of the melody data storage device.

また、制御装置において、メロディ制御レジスタはCP
Uからメロディ発生装置の演奏開始又は停止を指示する
メロディ制御信号を入力して設定し、オン/オフ制御回
路は演奏開始指令信号の入力によりメロディ発生装置を
構成する各装置の作動を開始させ、演奏停止指令信号及
びメロディ終了信号によりその作動を停止させる。
In addition, in the control device, the melody control register is CP
A melody control signal instructing the melody generating device to start or stop playing is input and set from U, and the on/off control circuit starts the operation of each device constituting the melody generating device by inputting the playing start command signal, The operation is stopped by a performance stop command signal and a melody end signal.

また、CPUは割り込み信号が入力すると、予め設定さ
れている複数の曲目の先頭アドレスに対応したアドレス
信号をアドレスレジスタに送り出す。これにより複数の
曲目が順次連続して演奏されることになる。
Further, when the CPU receives an interrupt signal, it sends an address signal corresponding to the start address of a plurality of preset songs to the address register. As a result, a plurality of pieces of music are played in sequence.

また、アドレスレジスタが演奏順序記憶装置を有する場
合には、メロディ終了が入力する度にその順序に従った
アドレスをアドレスカウンタにプリセット値としてセッ
トさせる。従って、複数の曲目が順次連続して演奏され
ることになるが、その間CPUが演奏曲目に対応してア
ドレスの入力を必要とせず、CPUの負担が軽くなる。
Furthermore, if the address register has a performance order storage device, each time the end of a melody is input, an address according to that order is set in the address counter as a preset value. Therefore, although a plurality of pieces of music are played one after another, the CPU does not need to input addresses corresponding to the pieces of music to be played during that time, which reduces the burden on the CPU.

更に、この発明において、データ選択装置はメロディデ
ータ記憶装置からのメロディデータとデータバスからの
メロディデータとが入力してCPUの指令に基づいてい
ずれか一方を選択し出力し、一時記憶装置は音階発生装
置に音階データを出力し、音符長発生装置に対して音符
長データを出力する。このようにメロディデータ記憶装
置からのメロディデータとデータバスからのメロディデ
ータとを適宜利用することができるので、自由度の高い
メロディを演奏することができる。
Furthermore, in the present invention, the data selection device receives melody data from the melody data storage device and melody data from the data bus and selects and outputs either one based on a command from the CPU. It outputs scale data to the generator, and outputs note length data to the note length generator. In this way, the melody data from the melody data storage device and the melody data from the data bus can be used as appropriate, so it is possible to play melodies with a high degree of freedom.

[実施例コ 第1図はこの発明の一実施例に係るマイクロコンピュー
タのハード構成を示すブロック図である。
Embodiment FIG. 1 is a block diagram showing the hardware configuration of a microcomputer according to an embodiment of the present invention.

マイクロコンピュータIOは、CPU12、ROMI4
、発振回路1B、システムリセット制御回路18、RA
M20、メロディ発生装置22、割り込み発生器24、
入出力ボート26、出力ボート28、データバス30、
アドレスバス32、割り込み制御線34、選択制御線3
6等から構成されている。なお、このマイクロコンピュ
ータには他の構成、例えばLCDドライバ、計時タイマ
、ストップウォッチタイマ、アナログコンパレータ等を
含んでいるが、この発明に直接関係がないので省略しで
ある。
Microcomputer IO is CPU12, ROMI4
, oscillation circuit 1B, system reset control circuit 18, RA
M20, melody generator 22, interrupt generator 24,
input/output boat 26, output boat 28, data bus 30,
Address bus 32, interrupt control line 34, selection control line 3
It consists of 6 mag. Note that this microcomputer includes other components, such as an LCD driver, a clock timer, a stopwatch timer, an analog comparator, etc., but these are omitted because they are not directly related to this invention.

第2図はメロディ発生装置22の詳細を示したブロック
図である。メロディアドレス設定レジスタ(以下アドレ
スレジスタという)102はメロディデータ記憶装置(
以下メロディROMというン10Bに記憶されているメ
ロディの開始アドレスを設定する。つまり、CP U 
12の命令に基づいてデータバス30を介してメロディ
の開始アドレスを書き込み或いは読み出しをすることが
できる。
FIG. 2 is a block diagram showing details of the melody generating device 22. As shown in FIG. The melody address setting register (hereinafter referred to as address register) 102 is a melody data storage device (
Hereinafter, the start address of the melody stored in the melody ROM 10B is set. In other words, CPU
The start address of the melody can be written or read via the data bus 30 based on the 12 commands.

メロディアドレスカウンタ(以下アドレスカウンタとい
う)104はメロディROM 106のアドレスバス1
05を介してメロディROM 10Bのアドレスを指定
するカウンタであり、アドレス増加信号117をカウン
トし、1カウント毎にメロディROM 10Bのアドレ
スを1番地ずつ進める機能をもっている。また、アドレ
スレジスタ102に設定されたメロディ開始アドレスは
、必要に応じてメロディアドレスバス103を介してア
ドレスカウンタ104に書き込まれる。メロディROM
 10Bが、一つのアドレスに書き込まれるデータの形
式が次に実行されるアドレスを含む記憶装置であれば、
このアドレスカウンタ104は必要ない。
A melody address counter (hereinafter referred to as address counter) 104 is connected to the address bus 1 of the melody ROM 106.
This counter specifies the address of the melody ROM 10B through 05, and has the function of counting the address increment signal 117 and incrementing the address of the melody ROM 10B by one address for each count. Further, the melody start address set in the address register 102 is written to the address counter 104 via the melody address bus 103 as necessary. Melody ROM
If 10B is a storage device where the format of data written to one address includes the address to be executed next, then
This address counter 104 is not necessary.

メロディROM 10Gは発生すべきメロディの情報の
内、少なくとも音階、音符長、メロディ終了の情報を記
憶している。
The melody ROM 10G stores at least information on the scale, note length, and end of the melody among the information on the melody to be generated.

第3図はメロディROM 10Bに格納されている1音
符のデータフォーマットを示す説明図である。
FIG. 3 is an explanatory diagram showing the data format of one note stored in the melody ROM 10B.

図示のように、エンドデータ、音程アドレスデータ、音
符長データ及びアタックデータから構成されている。音
符長データは音符長データバス115に、また、音階ア
ドレスデータは音階データバス11Bに出力される。
As shown in the figure, it is composed of end data, pitch address data, note length data, and attack data. The note length data is output to the note length data bus 115, and the scale address data is output to the scale data bus 11B.

曲終了信号発生回路108はメロディROM 10Bか
らのエンドデータを入力した後音符長発生回路11Bか
らのアドレス増加信号117を入力すると、そのメロデ
ィの演奏が終了したものとしてメロディ終了信号を10
9を発生し、制御回路110及びメロディ割込み発生回
路11Bに出力する。
When the song end signal generating circuit 108 inputs the end data from the melody ROM 10B and then inputs the address increment signal 117 from the note length generating circuit 11B, it assumes that the performance of the melody has ended and outputs a melody end signal of 10.
9 is generated and output to the control circuit 110 and the melody interrupt generation circuit 11B.

第4図は制御回路110の構成を示したブロック図であ
る。この制御回路110は、各種の制御データ、例えば
メロディの開始、停止の情報等を格納するメロディ制御
レジスタ140と、メロディ−終了信号に基づいてオン
/オフ制御されるオン/オフ制御回路142とから構成
されている。メロディ制御レジスタ140はデータバス
30に接続されており、CPU12の命令により書き込
み、読み出しが制御される。メロディ制御レジスタ14
0のMELCレジスタの出力はメロディ−終了信号と共
にオン/オフ制御回路142に入力し、そしてオン/オ
フ制御回路142からオン制御信号又はオフ制御信号が
出力する。また、TEMPレジスタからはテンポ制御信
号が出力し、CLKCOレジスタ及びCLKCIレジス
タからは演奏速度制御信号が出力される。
FIG. 4 is a block diagram showing the configuration of the control circuit 110. This control circuit 110 includes a melody control register 140 that stores various control data, such as information on the start and stop of a melody, and an on/off control circuit 142 that is controlled on/off based on a melody end signal. It is configured. The melody control register 140 is connected to the data bus 30, and writing and reading thereof are controlled by instructions from the CPU 12. Melody control register 14
The output of the MELC register 0 is input to the on/off control circuit 142 together with the melody end signal, and the on/off control circuit 142 outputs an on control signal or an off control signal. Further, a tempo control signal is output from the TEMP register, and a performance speed control signal is output from the CLKCO and CLKCI registers.

分周回路112は制御回路110からの演奏速度制御信
号を入力すると共に、ゲート回路120を介して入力さ
れるクロック信号を入力して、このクロック信号を演奏
速度制御信号に基づいて分周して分周信号を出力する。
The frequency dividing circuit 112 inputs the playing speed control signal from the control circuit 110 and also receives the clock signal inputted through the gate circuit 120, and divides the frequency of this clock signal based on the playing speed control signal. Outputs a divided signal.

ここで、ゲート回路120には制御回路110からのオ
ン・オフ制御信号がゲート制御信号として入力しており
、ゲート信号がオフの時には分周回路112にはクロッ
ク信号が供給されず、従って演奏は行われないことにな
る。
Here, the on/off control signal from the control circuit 110 is input to the gate circuit 120 as a gate control signal, and when the gate signal is off, no clock signal is supplied to the frequency dividing circuit 112, so that the performance cannot be performed. It will not be done.

テンポ発生回路114は、分周回路112からの分周出
力と制御回路110からのテンポ制御信号が入力して、
テンポ制御信号に対応した周波数のクロック信号を生成
して音符長発生回路■lBに出力する。
The tempo generation circuit 114 receives the divided output from the frequency dividing circuit 112 and the tempo control signal from the control circuit 110, and
A clock signal having a frequency corresponding to the tempo control signal is generated and outputted to the note length generating circuit 1B.

音符長発生回路116は、音符長データバス115から
の音符長データとクロック信号とを入力して音符長信号
を発生する。即ち、音符データに相当する時間を経過す
る度にアドレス増加信号117をアドレスカウンタ10
4及び曲終了信号発生回路108に出力する。この音符
長発生回路1111は、音符長データバス115をセッ
ト信号とするカウント値設定可能なカウンタ(プリセッ
タブルカウンタ)で構成し、テンポ発生回路114から
のクロック信号が入力する度にカウントアツプしてプリ
セット値に達したらアドレス増加信号117を出力する
The note length generation circuit 116 receives note length data and a clock signal from the note length data bus 115 and generates a note length signal. That is, the address increment signal 117 is sent to the address counter 10 every time the time corresponding to the note data elapses.
4 and the song end signal generation circuit 108. This note length generation circuit 1111 is composed of a counter (presettable counter) whose count value can be set using the note length data bus 115 as a set signal, and counts up every time the clock signal from the tempo generation circuit 114 is input. When the preset value is reached, an address increase signal 117 is output.

曲終了信号発生回路108はメロディデータのエンドデ
ータが“1”にセットされていることを検出した後、ア
ドレス増加信号117を入力したタイミングで上述の曲
終了信号109をメロディ割込み発生回路118及び制
御回路110に出力する。メロディ割込み発生回路11
Bはメロディ終了時に曲終了信号発生回路108から出
力されるメロディ終了信号109を受け、メロディ終了
割り込み信号119を割込み発生装置24に出力する。
After detecting that the end data of the melody data is set to "1", the song end signal generation circuit 108 transmits the above-mentioned song end signal 109 to the melody interrupt generation circuit 118 and control at the timing when the address increase signal 117 is input. Output to circuit 110. Melody interrupt generation circuit 11
B receives the melody end signal 109 output from the song end signal generation circuit 108 at the end of the melody, and outputs a melody end interrupt signal 119 to the interrupt generator 24.

音階ROM 122にはメロディROM 10Bに記憶
された音階アドレスデータが音階データバス121を介
してアドレス信号として入力してそのアドレス信号に対
応した種々の音階が読み出されて音程データバス125
を介して音程発生回路12Bに出力する。音程発生回路
12Bは音程データバス125からの音程データを設定
値とするカウント値設定可能なカウンタ(プリセッタブ
ルカウンタ)で構成される。周波数逓倍回路124はゲ
ート回路120を介してクロック信号を入力してそれを
逓倍して音程発生装置12Bに出力する。メロディ出力
制御回路128は音程発生回路12Bの出力即ち音程出
力を増幅してメロディ出力129として出力する。そし
て、このメロディ出力129は演奏器具(図示せず)に
演奏動作をさせる。
The scale address data stored in the melody ROM 10B is input to the scale ROM 122 as an address signal via the scale data bus 121, and various scales corresponding to the address signal are read out and sent to the scale data bus 125.
It is output to the pitch generation circuit 12B via. The pitch generation circuit 12B is composed of a counter (presettable counter) whose count value can be set using pitch data from the pitch data bus 125 as a set value. The frequency multiplier circuit 124 inputs the clock signal via the gate circuit 120, multiplies it, and outputs it to the pitch generator 12B. The melody output control circuit 128 amplifies the output of the pitch generation circuit 12B, that is, the pitch output, and outputs it as a melody output 129. This melody output 129 causes a musical instrument (not shown) to perform a musical performance.

この実施例のマイクロコンピュータは上述のように構成
されており、例えば次に示すようなメロディの制御をC
PU12の負荷を少なくして実行することができる。
The microcomputer of this embodiment is configured as described above, and for example, the following melodies can be controlled using C.
This can be executed with a reduced load on the PU 12.

(a)1曲演奏モード(一連のメロディを1回自動演奏
) (b)連続演奏モード(一連のメロディを繰り返し自動
演奏又は複数の一連のメロディを組み合わせて1つのメ
ロディを演奏) (e)強制演奏モード(演奏途中メロディの強制メロデ
ィ変更又は停止) それぞれの演奏方法について以下に詳細に示す。
(a) Single-song performance mode (automatically plays a series of melodies once) (b) Continuous performance mode (automatically plays a series of melodies repeatedly or plays a single melody by combining multiple series of melodies) (e) Forced Performance mode (forced melody change or stop during performance) Each performance method will be described in detail below.

(a)1曲演奏モード; 第5図はこの演奏モードにおけるCPU12の動作を示
すフローチャートである。なお、メロディROM 10
Bの一部には、一連のメロディが構成されるように、連
続したアドレスにそのメロディを構成する音符の情報(
第3図参照)を書き込まれているものとする(このこと
は後述する演奏モードにおいても同様であるものとする
)。
(a) Single-song performance mode; FIG. 5 is a flowchart showing the operation of the CPU 12 in this performance mode. In addition, melody ROM 10
Part of B contains information on the notes that make up the melody (in continuous addresses) so that a series of melodies is composed.
(see FIG. 3) has been written (this also applies to the performance mode described later).

(1)CPU12の命令によりアドレスレジスタ】02
に演奏希望メロディのメロディROM 10Bにおける
メロディ開始アドレス(一連のメロディの最初の音符に
関する情報が書き込まれているアドレス)をセットする
(1) Address register by instruction of CPU12】02
The melody start address (address where information regarding the first note of a series of melodies is written) of the melody desired to be played is set in the melody ROM 10B.

(2)CPU12の命令により制御回路110のMEL
Cレジスタにメロディ開始情報である“1°をセットす
る。このメロディ開始情報はオン/オフ制御回路142
を介して演奏開始信号として出力される。そして、例え
ばゲート回路120を開いてクロック信号が分周囲路1
12及び周波数逓倍回路124に出力する。また、アド
レスレジスタ102に設定されたメロディ開始アドレス
がアドレスカウンタ104に書き込まれ、その結果メロ
ディROM 10Bのアドレスは演奏希望メロディの開
始アドレスに設定され、そのアドレスに書き込まれてい
るメロディデータに基づいてメロディ演奏が開始される
(2) MEL of the control circuit 110 according to instructions from the CPU 12
Set the melody start information “1°” in the C register. This melody start information is transmitted to the on/off control circuit 142.
is output as a performance start signal. Then, for example, by opening the gate circuit 120, the clock signal is transmitted to the division circuit 1.
12 and a frequency multiplier circuit 124. Further, the melody start address set in the address register 102 is written in the address counter 104, and as a result, the address of the melody ROM 10B is set as the start address of the melody desired to be played, and based on the melody data written in that address. The melody begins to play.

指定されたアドレスの音階アドレスデータが音階ROM
 122に出力してそのアドレスデータに応じたアドレ
スの音階信号が音階ROM 122から読み出され、そ
して音階データバス125を介して音程発生回路12B
に入力する。そして、音程発生回路126は音階信号を
音程信号とて出力し、その出力がメロディ出力制御回路
128で増幅されてメロディ出力129として出力し、
演奏がなされる。
The scale address data of the specified address is stored in the scale ROM.
122, a scale signal at an address corresponding to the address data is read out from the scale ROM 122, and then sent to the pitch generation circuit 12B via the scale data bus 125.
Enter. Then, the pitch generation circuit 126 outputs the scale signal as a pitch signal, and the output is amplified by the melody output control circuit 128 and output as a melody output 129.
A performance is made.

また、指定されたアドレスに記憶されている音符長デー
タは音符長発生回路11Bに入力してセットされ、そし
てその音符長データをテンポ発生回路114からのクロ
ック信号に基づいてカウントダウンして零になると(或
いはカウントアツプしてその音符長データに相当する値
に達すると)アドレス増加信号117を仕方する。アド
レスカウンタ104はそれを受けてメロディROM 1
0Bのアドレスを1番地進める。
Further, the note length data stored at the specified address is input and set to the note length generation circuit 11B, and the note length data is counted down based on the clock signal from the tempo generation circuit 114 and becomes zero. (or when it counts up and reaches a value corresponding to the note length data) it issues an address increment signal 117. In response, the address counter 104 reads the melody ROM 1.
Advance the address of 0B by one address.

この動作を繰り返してメロディROM 10Bに記憶さ
れている一連のメロディがマイクロコンピュータの関与
無しに自動的に演奏される。
By repeating this operation, a series of melodies stored in the melody ROM 10B are automatically played without the involvement of the microcomputer.

(3)一連のメロディが終了するまでに、CPU12の
命令により制御装置110のMELCレジスタに演奏停
止情報である“0#をセットしておく。
(3) By the end of the series of melodies, "0#", which is performance stop information, is set in the MELC register of the control device 110 by a command from the CPU 12.

第6図はこの時のタイミングチャートである。FIG. 6 is a timing chart at this time.

この0”をセットした時点では、オン/オフ制御回路1
42にまだメロディ終了信号109が入力されないため
、演奏は停止されない。
At the time when this 0'' is set, the on/off control circuit 1
Since the melody end signal 109 has not yet been input to 42, the performance is not stopped.

(4)アドレスカウンタ104により指定されたアドレ
スのメロディROM 10Bのメロディデータのエンド
データに“1″がセットされていると、そのデータが一
連のメロディの最終音符アドレスであるとして、曲終了
信号発生回路10Bは音符発生回路11Gからのアドレ
ス増加信号117を入力したタイミング、すなわち最終
音符を演奏終了したタイミングでメロディ終了信号10
9を出力する。
(4) If "1" is set in the end data of the melody data in the melody ROM 10B at the address specified by the address counter 104, this data is assumed to be the last note address of a series of melodies, and a song end signal is generated. The circuit 10B generates the melody end signal 10 at the timing when the address increase signal 117 from the note generating circuit 11G is input, that is, at the timing when the final note is finished playing.
Outputs 9.

その結果、オン/オフ制御回路142はメロディ終了信
号109を人力して演奏を停止させる演奏停止信号を発
生させて、メロディ発生装置22に含まれる上述の各装
置を停止させる。また同時に、メロディ割り込み発生回
路118ではメロディ終了信号109を受けてCPU1
2にメロディ終了を知らせるメロディ終了割り込み信号
119を発生する。
As a result, the on/off control circuit 142 generates a performance stop signal that manually inputs the melody end signal 109 to stop the performance, thereby stopping each of the above-mentioned devices included in the melody generating device 22. At the same time, the melody interrupt generation circuit 118 receives the melody end signal 109 and the CPU 1
2, a melody end interrupt signal 119 is generated to notify the end of the melody.

このメロディ終了割り込み信号119は割り込み発生回
路24を介してCPU12に入力し、割り込みが許可さ
れると、CPU12においてメロディサブルーチンにジ
ャンプして割り込みフラグを読みだしてクリアし、次に
イネーブルにしてリターンする。
This melody end interrupt signal 119 is input to the CPU 12 via the interrupt generation circuit 24, and when the interrupt is permitted, the CPU 12 jumps to the melody subroutine, reads and clears the interrupt flag, then enables it and returns. .

以上のようにCP U 12の命令によりアドレスレジ
スタ102に演奏希望メロディの開始アドレスを設定し
、制御回路110のMELCレジスタにメロディの開始
情報又は停止情報を書き込むだけで、演奏希望メロディ
が自動的に演奏され、終了するので、CPU12のメロ
ディ演奏に対する負荷は非常に小さいものとなる。
As described above, simply by setting the start address of the melody desired to be played in the address register 102 by the command of the CPU 12 and writing the start information or stop information of the melody in the MELC register of the control circuit 110, the melody desired to be played is automatically set. Since the melody is played and finished, the load on the CPU 12 for playing the melody becomes very small.

(b)連続演奏モード; 第7図はこの連続演奏モードにおけるC P U 12
の動作を示すフローチャートである。
(b) Continuous performance mode; Figure 7 shows the CPU 12 in this continuous performance mode.
3 is a flowchart showing the operation of FIG.

(b−1)一連のメロディを繰り返し自動演奏する場合
(なお、この演奏モードにおいては第7図の破線で囲ん
だ部分の処理は省略される。)(1)CPU12の命令
によりアドレスレジスタ102に繰り返し演奏希望メロ
ディのメロディROM10Bにおける開始アドレス(繰
り返しメロディの最初の音符に関する情報が書き込まれ
ているアドレス)を書き込む。
(b-1) When automatically playing a series of melodies repeatedly (In this performance mode, the processing of the part surrounded by the broken line in FIG. 7 is omitted.) (1) The address register 102 is The start address of the melody desired to be repeatedly played in the melody ROM 10B (the address where information regarding the first note of the repeated melody is written) is written.

(2)CPU12の命令により制御装置110のMEL
Cレジスタにメロディ開始の情報である“1“をセット
する。この操作によりメロディ開始の情報がオン/オフ
制御回路140から出力される。そして、メロディ発生
装置22の各装置が演奏開始することのできる状態にな
り、アドレスレジスタ102に設定されたメロディ開始
アドレスがアドレスカウンタ104に書き込まれ、その
結果メロディROM 10Gのアドレスは演奏希望メロ
ディの開始アドレスに設定され、メロディ演奏が開始さ
れる。このメロディ演奏における動作は上述のモードに
おける動作と同様である。
(2) MEL of the control device 110 according to instructions from the CPU 12
Set "1", which is the melody start information, in the C register. By this operation, information on the start of the melody is output from the on/off control circuit 140. Then, each device of the melody generating device 22 becomes ready to start playing, and the melody start address set in the address register 102 is written into the address counter 104, and as a result, the address of the melody ROM 10G is set to the melody desired to be played. The address is set as the start address, and the melody starts playing. The operation in this melody performance is similar to the operation in the above-mentioned mode.

(3)メロディROMl0のアドレスが自動的に進み、
エンドデータに“1”がセットされている最終アドレス
が指定されると上述のモードの場合と同様にして曲終了
信号発生回路108からメロディ終了信号109が出力
され、制御装置110とメロディ割り込み発生回路11
8に入力する。制御袋M 110は、この時点では制御
装置110のMELCレジスタにメロディ開始の情報で
ある“1”がセットされたままであり、メロディ停止の
情報であるO”がセットされていないため、アドレスレ
ジスタ102に設定されているアドレスをアドレスカウ
ンタ104に書き込むオン制御信号をを出力する。
(3) The address of melody ROM10 automatically advances.
When the final address with "1" set in the end data is specified, the melody end signal 109 is output from the song end signal generation circuit 108 in the same manner as in the above mode, and the melody end signal 109 is output from the control device 110 and the melody interrupt generation circuit. 11
Enter 8. At this point, the control bag M 110 is set in the MELC register of the control device 110 as "1", which is the melody start information, and "O", which is the melody stop information, is not set. It outputs an on control signal to write the address set in the address counter 104 into the address counter 104.

このとき、アドレスレジスタ102にはメロディ開始情
報を制御装置110ののMELCレジスタにセットした
時と同じアドレスが設定されているため、アドレスカウ
ンタ104を介して送り出されるアドレスバス105の
アドレスデータは再び繰り返し希望メロディの開始アド
レスとなる。即ち、繰り返し希望メロディが繰り返し演
奏されることになる。
At this time, since the same address is set in the address register 102 as when the melody start information was set in the MELC register of the control device 110, the address data on the address bus 105 sent out via the address counter 104 is repeated again. This is the start address of the desired melody. In other words, the desired repeat melody will be played repeatedly.

第8図のこの時の動作を示すタイミングチャートである
9 is a timing chart showing the operation at this time in FIG. 8.

また、繰り返し希望メロディが1回演奏、終了される毎
にメロディ終了割り込み信号119が発生するため、上
述のモードの場合と同様にしてCPU12に割り込みが
かけられ、CPU12は演奏回数nをインクリメントす
る。
Furthermore, since a melody end interrupt signal 119 is generated every time the desired repeat melody is played once and finished, the CPU 12 is interrupted in the same manner as in the above mode, and the CPU 12 increments the number of plays n.

(4)CPU12において、演奏回数nが設定されてい
る希望演奏回数N−1に達すると、CPU12の命令に
より制御装置110のMELCレジスタに演奏停止情報
である“0°をセットする。その結果、その現在演奏さ
れている繰り返し希望メロディが演奏された後、メロデ
ィ発生装置22はその演奏動作を停止する。この場合の
動作は、上述の1曲演奏モードの(3) 、 (4)に
記載した動作と同じである。
(4) In the CPU 12, when the number of performances n reaches the set desired number of performances N-1, the CPU 12 commands to set "0°", which is the performance stop information, in the MELC register of the control device 110. As a result, After the currently played desired repeat melody is played, the melody generator 22 stops its playing operation.The operation in this case is as described in (3) and (4) of the one-song playing mode above. It is the same as the operation.

(b−2)複数の一連のメロディを組み合わせて1つの
メロディを演奏する場合。
(b-2) When a single melody is played by combining a plurality of melodies.

上述の(b−1)の演奏動作において、アドレスレジス
タ102に設定するアドレスをメロディ終了割り込み信
号119が発生した後変更すると、繰り返し演奏ではな
く、新たなメロディを続けて演奏することができる。
In the above performance operation (b-1), if the address set in the address register 102 is changed after the melody end interrupt signal 119 is generated, a new melody can be continuously played instead of being played repeatedly.

つまり、第7図に示すようにMELCレジスタに“1”
をセットした後、CPU12は次の演奏曲目のアドレス
をデータバス30を介してアドレスレジスタ102に予
めセットしておく。そして、最初のメロディ−の演奏が
終了して曲終了信号発生回路10gがメロディ終了信号
109を出力すると、その時にアドレスレジスタ102
にセットされている次の演奏曲目のアドレスがアドレス
カウンタ104にセットされて2番目の演奏曲目のメロ
ディデータがROM 10Bから読み出されて2番目の
演奏曲目のメロディが演奏される。
In other words, as shown in Figure 7, the MELC register is set to "1".
After setting , the CPU 12 presets the address of the next performance piece in the address register 102 via the data bus 30. When the performance of the first melody is finished and the song end signal generating circuit 10g outputs the melody end signal 109, the address register 102
The address of the next performance piece set in is set in the address counter 104, the melody data of the second performance piece is read out from the ROM 10B, and the melody of the second performance piece is played.

一方、メロディ割り込み発生回路108はメロディ終了
信号109を受けてCPU12にメロディ終了を知らせ
るメロディ終了割り込み信号119を発生する。
On the other hand, the melody interrupt generation circuit 108 receives the melody end signal 109 and generates the melody end interrupt signal 119 to notify the CPU 12 of the end of the melody.

このメロディ終了割り込み信号119は割り込み発生回
路24を介してCPU12に入力し、割り込みが許可さ
れると、CPU12においてメロディサブルーチンにジ
ャンプして、演奏回数nをインクリメントし、その演奏
回数に応じて例えばn−1の場合には3番目に演奏する
曲目のアドレスをデータバス30を介してアドレスレジ
スタ102にセ・ントし、更にテンポ制御信号を制御回
路110のメロディ制御レジスタ140のTEMPレジ
スタにセットする。そして、割り込みフラグを読みだし
てクリアし、次にイネーブルにしてリターンする。
This melody end interrupt signal 119 is input to the CPU 12 via the interrupt generation circuit 24, and when the interrupt is permitted, the CPU 12 jumps to the melody subroutine, increments the number of performances n, and depending on the number of performances, for example, n -1, the address of the third piece of music to be played is set in the address register 102 via the data bus 30, and a tempo control signal is set in the TEMP register of the melody control register 140 of the control circuit 110. Then, read and clear the interrupt flag, then enable it and return.

演奏回数nが所定の回数N−1に達すると、MELCレ
ジスタに“02をセットしておき、次にメロディ終了信
号が発生すると、制御回路110からオフ制御信号が発
生し、メロディ発生装置22の動作が停止して演奏は終
了する。
When the number of performances n reaches a predetermined number N-1, "02" is set in the MELC register, and the next time a melody end signal is generated, an off control signal is generated from the control circuit 110, and the melody generator 22 is turned off. The movement stops and the performance ends.

つまり、メロディの演奏中に次に演奏するメロディのア
ドレスをアドレスレジスタに予め記憶しておくことによ
り、異なったメロディを組み合わせて一連の長いメロデ
ィを演奏することができる。
That is, by storing the address of the next melody to be played in advance in the address register while a melody is being played, it is possible to play a series of long melodies by combining different melodies.

(e)強制演奏モード; 第9図はこの演奏モードにおけるCPU12の動作を示
すフローチャートである。システム外部の要求により演
奏途中でメロディを強制的に変更したり、停止したりす
る必要が生じた時、次ぎの手順によりその要求を実行で
きる。
(e) Forced performance mode; FIG. 9 is a flowchart showing the operation of the CPU 12 in this performance mode. When it becomes necessary to forcibly change or stop the melody during a performance due to a request from outside the system, the request can be executed by following the steps below.

(1)システム外部の要求が生じた時点で、変更希望メ
ロディの情報が記憶されているメロディROM 10B
におけるその開始アドレスをアドレスレジスタ102に
設定する。
(1) Melody ROM 10B that stores information on the melody desired to be changed when a request from outside the system occurs.
The start address at is set in the address register 102.

(2)制御装置11OのMELCレジスタにメロディ停
止情報“0°をセットした後直ぐに再びメロディ開始情
報“1”を書き込む。その結果、アドレスレジスタ10
2に設定されているアドレスが、メロディ開始情報を受
けてメロディアドレスカウンタ106にセットされ、メ
ロディROM 106のアドレスは変更希望メロディの
開始アドレスにジャンプし、その後変更希望メロディが
演奏される。第1O図はその時の動作を示すタイミング
チャートである。
(2) Immediately after setting the melody stop information “0°” to the MELC register of the control device 11O, write the melody start information “1” again.As a result, the address register 10
The address set to 2 is set in the melody address counter 106 upon receiving the melody start information, the address of the melody ROM 106 jumps to the start address of the melody desired to be changed, and then the melody desired to be changed is played. FIG. 1O is a timing chart showing the operation at that time.

(3)強制停止を行ないたい時は、変更希望メロディを
休符等の無音メロディに設定すれば、メロディは強制停
止される。
(3) If you want to force a stop, set the melody you want to change to a silent melody such as a rest, and the melody will be forced to stop.

第11図はアドレスレジスタ102がメロディROM1
06の複数のアドレスを格納する演奏順序記憶装置を有
する場合のブロック図である。このアドレスレジスタ1
02は、データバス30に接続され、CPU12の命令
により書き込み、読み出しができる演奏順序記憶装置1
44と、この演奏順序記憶装置144のアドレスを指定
するアドレスカウンタ14Bとから構成されている。こ
のアドレスカウンタ14Bはメロディ終了信号109を
入力し、その入力毎に演奏順序記憶装置144のアドレ
スを1番地ずつ増加させる。演奏順序記憶装置144が
、1つのアドレスに書き込まれるデータが次に実行され
るアドレスを含む型式の記憶装置であればこのアドレス
カウンタ14Bは必要ない。
In FIG. 11, address register 102 is melody ROM1.
FIG. 3 is a block diagram of a case where the performance order storage device stores a plurality of addresses of 06. This address register 1
02 is a performance order storage device 1 that is connected to the data bus 30 and can be written to and read out according to instructions from the CPU 12.
44, and an address counter 14B that specifies the address of this performance order storage device 144. The address counter 14B receives the melody end signal 109 and increments the address of the performance order storage device 144 by one each time the melody end signal 109 is input. If the performance order storage device 144 is of a type in which data written to one address includes an address to be executed next, the address counter 14B is not necessary.

このような構成により、CPU12におけるメロディ演
奏に対する負担をさらに軽減できる。っまリ、前述のr
 (b−2)の複数の一連のメロディを組み合わせて1
つのメロディを演奏」において述べたメロディ終了割り
込み信号109の発生毎にアドレスレジスタ102に書
き込んでいたメロディROM106のアドレスを、メロ
ディ演奏の開始前に演奏順序記憶装置144に書き込む
ことにより、一連のメロディを自動演奏できる。その動
作を次に説明する。
With such a configuration, the burden on the CPU 12 for playing the melody can be further reduced. Well, the above r
Combining multiple melodies of (b-2) to create 1
By writing the address of the melody ROM 106, which was written into the address register 102 every time the melody end interrupt signal 109 described in "Playing a Melody", into the performance order storage device 144 before starting the melody performance, a series of melodies can be played. Can be played automatically. Its operation will be explained next.

(1)一連のメロディ演奏開始前に、演奏に必要なメロ
ディROM 106のアドレスを、演奏の順序通りに、
演奏順序記憶装置144に書き込む。
(1) Before starting a series of melody performances, enter the addresses of the melody ROM 106 necessary for the performance in the order of performance.
It is written into the performance order storage device 144.

(2)上述の方法により、メロディの演奏を開始する。(2) Start playing the melody using the method described above.

(3)メロディアドレスバス103には最初に演奏され
るべきアドレスが出力され、そしてアドレスカウンタ1
04によりメロディROM 106のそのアドレス及び
そのアドレスに連続したアドレスに書き込まれたメロデ
ィ情報が読み出されてメロディが演奏される。
(3) The address to be played first is output to the melody address bus 103, and the address counter 1
04, the melody information written in that address and the addresses consecutive to that address in the melody ROM 106 is read out, and the melody is played.

(4)その一連のメロディ演奏の終了時にはメロディ終
了信号109が出力され、その結果、順序記憶装置アド
レスカウンタ14Bが演奏順序記憶装置142のアドレ
スバスを1番地進める。
(4) At the end of the series of melody performances, a melody end signal 109 is output, and as a result, the order storage device address counter 14B advances the address bus of the performance order storage device 142 by one address.

(5)メロディアドレスバス103には2番目に演奏さ
れるべきアドレスが出力される。
(5) The address to be played second is output to the melody address bus 103.

(6)上記(3) 、 (4) 、 (5)が繰り返さ
れ、一連のメロディが演奏される。
(6) The above (3), (4), and (5) are repeated to play a series of melodies.

(7)演奏の終了は、メロディ終了割り込み信号119
の発生回数を数えることにより知る事ができ、(b−2
)の演奏モードにおいて述べた演奏終了方法で終了させ
ることができる。
(7) To end the performance, use the melody end interrupt signal 119
It can be known by counting the number of occurrences of (b-2
) The performance can be ended using the performance ending method described in the performance mode.

W412図はメロディ発生装置22の他の構成例を示す
ブロック図である。この実施例においては第2図の実施
例に対してデータ選択回路130及びデーター時記憶装
置132が追加されている。このデータ選択回路130
にはデータバス30及びメロディROM 106のデー
タバス134が接続されており、例えば2人力・1出力
セレクタから構成されCPU12からの制御線36を介
して与えられる制御命令によりいずれか一方のデータバ
スを選択してそのデータを取り込む。データー時記憶装
置132は例えばレジスタから構成され、データ選択回
路130を介し入力されるデータを一時保存した後にそ
のデータを音符発生回路11B及び音階ROM122に
それぞれ出力する。それ以降の動作は第2図の実施例と
同様である。
Figure W412 is a block diagram showing another example of the configuration of the melody generating device 22. In this embodiment, a data selection circuit 130 and a data storage device 132 are added to the embodiment of FIG. This data selection circuit 130
A data bus 30 and a data bus 134 of the melody ROM 106 are connected to the ROM 106, and the data bus 134 is composed of, for example, a two-manpower/one-output selector. Select and import the data. The data storage device 132 is composed of, for example, a register, and temporarily stores the data input through the data selection circuit 130, and then outputs the data to the note generation circuit 11B and the scale ROM 122, respectively. The subsequent operations are similar to the embodiment shown in FIG.

従って、CPU12のプログラムを記憶するROM14
又はRAM20に記憶されたデータを、データバス30
及びデータ選択装置130を介してデーター時記憶装置
132に書き込むことによりメロディの演奏は可能であ
る。その結果、ROM14又はRAM20のメロディデ
ータと、メロディROM 10Bのメロディデータの双
方で制御できることになる。
Therefore, the ROM 14 that stores the program of the CPU 12
Or the data stored in the RAM 20 can be transferred to the data bus 30.
The melody can be played by writing it into the data storage device 132 via the data selection device 130. As a result, control can be performed using both the melody data in the ROM 14 or RAM 20 and the melody data in the melody ROM 10B.

このことは、このマイクロコンピュータが応用される目
的に応じて、メロディROM 10Bだけではメロディ
容量が少ないとき、ROM14又はRAM20に不足分
のメロディを記憶させて演奏させることが可能であるこ
とを意味する。
This means that depending on the purpose to which this microcomputer is applied, when the melody capacity of the melody ROM 10B is small, it is possible to store the missing melody in the ROM 14 or RAM 20 and perform it. .

また、データー時記憶装置132のデータをデータバス
30に出力できるように構成すると、メロディROM 
10Bの出荷時におけるテスト時間が短縮される。
Furthermore, if the data in the data storage device 132 is configured to be output to the data bus 30, the melody ROM
Testing time at the time of shipment of 10B is shortened.

ところで、上述の実施例において、アドレスカウンタ1
04はカウントアツプする例を示したが、メロディRO
M 10Bの記憶方法によってはカウントダウンする場
合もあることはいうまでもない。
By the way, in the above embodiment, address counter 1
04 showed an example of counting up, but Melody RO
Needless to say, depending on the method of storing M10B, the countdown may be performed.

また、データバス30に接続されたアドレスレジスタ1
02及びメロディ制御レジスタ140の双方又はいずれ
か一方を例えばRA M 20にその機能を負担させる
ように構成してもよい。
Also, the address register 1 connected to the data bus 30
02 and the melody control register 140, or either one thereof may be configured such that, for example, the RAM 20 is responsible for the functions thereof.

また、この実施例においてはメロディと言う用語を用い
ているが、その中には勿論動物等の擬音、ゲームに於け
る効果音等を含むことはいうまでもない。
Furthermore, although the term melody is used in this embodiment, it goes without saying that this includes onomatopoeic sounds of animals, sound effects in games, and the like.

[発明の効果] 以上のようにこの発明によれば、メロディ演奏の開始の
ときにのみCPUがらの制御指令を必要とし、それ以外
はメロディ発生装置により信号処理をし′C演奏をする
ようにしたので、マイクロコンピュータの負荷を少なく
することができ、その結果、マイクロコンピュータにお
ける記憶容量を少なくし、システム外部からの要求に対
し素早く応答させることができる。
[Effects of the Invention] As described above, according to the present invention, a control command from the CPU is required only when starting a melody performance, and at other times the melody generator performs signal processing to perform 'C' performance. Therefore, the load on the microcomputer can be reduced, and as a result, the storage capacity of the microcomputer can be reduced, and it can quickly respond to requests from outside the system.

また、メロディの演奏を、マイクロコンピュータの命令
を記憶した記憶装置と、メロディデータを専用に記憶し
たメロディデータ記憶装置との双方に記憶されたメロデ
ィデータにより適宜制御できるようにしたので、メロデ
ィ容量が大きなものとなり、自由度が高められている。
In addition, the melody performance can be appropriately controlled by the melody data stored in both the storage device that stores instructions from the microcomputer and the melody data storage device that stores melody data exclusively, so the melody capacity can be reduced. It's bigger and has more freedom.

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

第1図はこの発明の一実施例のマイクロコンピュータの
ハード構成を示すブロック図、第2図は第1図のメロデ
ィ発生装置の詳細を示したブロック図、第3図はメロデ
ィデータのフォーマットを示す説明図、第4図は制御回
路の構成を示すブロック図である。 第5図及び第6図は1曲演奏モードの動作を示すフロー
チャート及びタイミングチャート、第7図及び第8図は
連続演奏モードの動作を示すフローチャート及びタイミ
ングチャート、第9図及び第10図は強制演奏モードの
動作を示すフローチャート及びタイミングチャートであ
る。 第11図はアドレスレジスタの構成例を示すブロック図
、第12図はメロディ発生装置の他の実施例を示したブ
ロック図である。 12・・・CPU、30・・・データバス、22・・・
メロディ発生装置、10B・・・メロディROM、10
2・・・アドレスレジスタ、104・・・アドレスカウ
ンタ、110・・・制御回路、11B・・・音符長発生
回路、118・・・メロディ割り込み制御回路、126
・・・音階発生回路、128・・・メロディ出力制御回
路。 代理人 弁理士 佐 々 木 宗 治 第3図 第 1 図 第4図 竿 図 割り込み発生 第 図 第 図 第10図
Fig. 1 is a block diagram showing the hardware configuration of a microcomputer according to an embodiment of the present invention, Fig. 2 is a block diagram showing details of the melody generator shown in Fig. 1, and Fig. 3 shows the format of melody data. The explanatory diagram, FIG. 4, is a block diagram showing the configuration of the control circuit. Figures 5 and 6 are flowcharts and timing charts showing operations in single-song performance mode, Figures 7 and 8 are flowcharts and timing charts showing operations in continuous performance mode, and Figures 9 and 10 are forced operation. 3 is a flowchart and a timing chart showing operations in a performance mode. FIG. 11 is a block diagram showing an example of the structure of the address register, and FIG. 12 is a block diagram showing another embodiment of the melody generating device. 12...CPU, 30...Data bus, 22...
Melody generator, 10B...Melody ROM, 10
2... Address register, 104... Address counter, 110... Control circuit, 11B... Note length generation circuit, 118... Melody interrupt control circuit, 126
. . . Scale generation circuit, 128 . . . Melody output control circuit. Agent Patent Attorney Muneharu Sasaki Figure 3 Figure 1 Figure 4 Figure Interruption Occurrence Figure Figure 10

Claims (10)

【特許請求の範囲】[Claims] (1)種々のデータ処理を行なう中央演算装置(以下C
PUという)と、メロディ信号を出力するメロディ発生
装置と、前記CPUに入出力されるデータを転送するデ
ータバスとを有し、前記メロディ発生装置は、 a)少なくとも音階データ、音符長データ及びメロディ
終了の有無を示すエンドデータを含むメロディデータを
記憶するメロディデータ記憶装置と、 b)メロディデータの音階データに基づいて音程信号を
出力する音程発生装置と、 c)メロディデータの音符長データに基づいて音符長信
号を発生する音符長発生装置と、d)前記CPUからの
初期アドレス信号を入力してその初期アドレス信号をメ
ロディデータ記憶装置の読み出しアドレスとして供給す
ると共に、その初期アドレス信号に続くアドレスを前記
音符長信号に基づいたタイミングでメロディデータ記憶
装置のアドレス信号として出力するアドレス指定装置と を有することを特徴とするマイクロコンピュータ。
(1) Central processing unit (hereinafter referred to as C) that performs various data processing
PU), a melody generation device that outputs a melody signal, and a data bus that transfers data input and output to the CPU, and the melody generation device includes: a) at least scale data, note length data, and melody data; a) a melody data storage device that stores melody data including end data indicating the presence or absence of an end; b) an interval generator that outputs a pitch signal based on scale data of the melody data; and c) based on note length data of the melody data. d) a note length generator that receives an initial address signal from the CPU and supplies the initial address signal as a read address of the melody data storage device; and d) an address that follows the initial address signal. and an addressing device that outputs as an address signal for a melody data storage device at a timing based on the note length signal.
(2)前記メロディ発生装置は、更に、 e)前記メロディデータ記憶装置からのメロディデータ
のエンドデータ及び前記音符長発生装置の音符長信号に
基づいてメロディ終了信号を出力する曲終了信号発生装
置と、 f)前記メロディ終了信号が入力すると前記CPUに対
してメロディ終了割り込み信号を送出する割り込み発生
装置と、 g)前記CPUから前記データバスを介して前記メロデ
ィ発生装置の演奏開始又は停止を指示するメロディ制御
信号を少なくとも入力すると共に前記メロディ終了信号
を入力し、演奏開始指令信号の入力により前記メロディ
発生装置を構成する各装置の作動を開始させ、演奏停止
指令信号及び前記メロディ終了信号によりその作動を停
止させる制御装置と を有することを特徴とする請求項1記載のマイクロコン
ピュータ。
(2) The melody generation device further includes: e) a song end signal generation device that outputs a melody end signal based on the end data of the melody data from the melody data storage device and the note length signal of the note length generation device; f) an interrupt generating device that sends a melody end interrupt signal to the CPU when the melody end signal is input; and g) an instruction from the CPU to start or stop playing the melody generating device via the data bus. inputting at least a melody control signal and the melody end signal; inputting a performance start command signal to start the operation of each device constituting the melody generating device; and a performance stop command signal and the melody end signal to start the operation of each device. 2. The microcomputer according to claim 1, further comprising a control device for stopping the microcomputer.
(3)アドレス指定装置は、前記CPUからデータバス
を介して初期アドレス信号が設定されるアドレスレジス
タと、このアドレスレジスタの初期アドレス信号をプリ
セット値としてセットし、前記音符長信号に基づいた信
号が入力する度にカウントアップ又はカウンタダウンし
ていくアドレスカウンタとから構成されている請求項2
記載のマイクロコンピュータ。
(3) The addressing device includes an address register to which an initial address signal is set from the CPU via the data bus, and the initial address signal of this address register is set as a preset value, and a signal based on the note length signal is set. Claim 2 comprising an address counter that counts up or down each time an input is made.
The microcomputer described.
(4)制御装置は、前記CPUから前記データバスを介
して前記メロディ発生装置の演奏開始又は停止を指示す
るメロディ制御信号を少なくとも入力して設定するメロ
ディ制御レジスタと、前記メロディ終了信号を入力し、
演奏開始指令信号の入力により前記メロディ発生装置を
構成する各装置の作動を開始させ、演奏停止指令信号及
び前記メロディ終了信号によりその作動を停止させるオ
ン/オフ制御回路とを有する請求項3記載のマイクロコ
ンピュータ。
(4) The control device inputs at least a melody control signal input from the CPU via the data bus to set the melody control signal instructing the melody generating device to start or stop playing, and inputs the melody end signal. ,
4. An on/off control circuit according to claim 3, further comprising an on/off control circuit that starts the operation of each device constituting the melody generating device upon input of a performance start command signal, and stops the operation upon input of a performance stop command signal and the melody end signal. microcomputer.
(5)前記CPUは割り込み信号が入力すると、予め設
定されている複数の曲目の先頭アドレスに対応したアド
レス信号をアドレスレジスタに前記データバスを介して
送り出す請求項4記載のマイクロコンピュータ。
(5) The microcomputer according to claim 4, wherein when the CPU receives an interrupt signal, the CPU sends an address signal corresponding to a preset start address of a plurality of songs to an address register via the data bus.
(6)前記CPU、前記データバス及び前記メロディ発
生装置がワンチップ上に構成されることを特徴とする請
求項5記載のマイクロコンピュータ。
(6) The microcomputer according to claim 5, wherein the CPU, the data bus, and the melody generating device are configured on one chip.
(7)前記メロディ制御レジスタに代えて、メロディ制
御レジスタは前記CPUの制御する記憶装置と同一のア
ドレス空間内にある記憶装置として構成される請求項4
記載のマイクロコンピュータ。
(7) In place of the melody control register, the melody control register is configured as a storage device located in the same address space as a storage device controlled by the CPU.
The microcomputer described.
(8)前記アドレス設定レジスタに代えて、アドレス設
定レジスタは前記CPUの制御する記憶装置と同一のア
ドレス空間内にある記憶装置として構成される請求項3
記載のマイクロコンピュータ。
(8) In place of the address setting register, the address setting register is configured as a storage device located in the same address space as a storage device controlled by the CPU.
The microcomputer described.
(9)アドレスレジスタが、メロディの演奏順序に従っ
たメロディデータ記憶装置の複数のアドレスを格納し、
前記メロディ終了信号が入力する度にその順序に従った
アドレスをアドレスカウンタにプリセット値としてセッ
トさせる演奏順序記憶装置を有することを特徴とする請
求項1記載のマイクロコンピュータ。
(9) an address register stores a plurality of addresses of the melody data storage device according to the order in which the melody is played;
2. The microcomputer according to claim 1, further comprising a performance order storage device which causes an address counter to set an address according to the order as a preset value each time the melody end signal is input.
(10)前記メロディデータ記憶装置からのメロディデ
ータと前記データバスからのメロディデータとが入力し
て前記CPUの指令に基づいていずれか一方を選択し出
力するデータ選択装置と、このデータ選択装置からのメ
ロディデータを入力し、一時記憶した後に音程発生装置
に音階データを出力し、音符長発生装置に音符長データ
を出力する一時記憶装置とを有することを特徴とする請
求項1記載のマイクロコンピュータ。
(10) a data selection device that receives melody data from the melody data storage device and melody data from the data bus and selects and outputs either one based on a command from the CPU; 2. A microcomputer according to claim 1, further comprising a temporary storage device for inputting melody data, temporarily storing the scale data, and outputting the scale data to the note length generator, and outputting the note length data to the note length generator. .
JP22430190A 1989-09-22 1990-08-28 Microcomputer Expired - Fee Related JP3158419B2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP22430190A JP3158419B2 (en) 1989-09-22 1990-08-28 Microcomputer
GB9020397A GB2237435B (en) 1989-09-22 1990-09-18 Melody generating microcomputer
HK25497A HK25497A (en) 1989-09-22 1997-03-06 Melody generating microcomputer

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP24755389 1989-09-22
JP24755289 1989-09-22
JP1-247552 1989-09-22
JP1-247553 1989-09-22
JP2-122594 1990-05-11
JP12259490 1990-05-11
JP22430190A JP3158419B2 (en) 1989-09-22 1990-08-28 Microcomputer

Publications (2)

Publication Number Publication Date
JPH0473690A true JPH0473690A (en) 1992-03-09
JP3158419B2 JP3158419B2 (en) 2001-04-23

Family

ID=27470867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP22430190A Expired - Fee Related JP3158419B2 (en) 1989-09-22 1990-08-28 Microcomputer

Country Status (3)

Country Link
JP (1) JP3158419B2 (en)
GB (1) GB2237435B (en)
HK (1) HK25497A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009048770A (en) * 2008-10-29 2009-03-05 Renesas Technology Corp Thin film magnetic storage device

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB9123452D0 (en) * 1991-11-05 1991-12-18 Lyle Sarah Music teaching aid
DE29700359U1 (en) * 1997-01-10 1997-11-06 Schönenberger, Hans, 45891 Gelsenkirchen Camera or camcorder with sound reproduction
JP3741560B2 (en) * 1999-03-18 2006-02-01 株式会社リコー Melody sound generator

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009048770A (en) * 2008-10-29 2009-03-05 Renesas Technology Corp Thin film magnetic storage device

Also Published As

Publication number Publication date
JP3158419B2 (en) 2001-04-23
GB2237435A (en) 1991-05-01
GB2237435B (en) 1994-02-02
GB9020397D0 (en) 1990-10-31
HK25497A (en) 1997-03-06

Similar Documents

Publication Publication Date Title
JPS6230636B2 (en)
JP3047185B2 (en) Digital sound source device and external memory cartridge used therein
JPS6157640B2 (en)
JPH0473690A (en) Microcomputer
JPH10288985A (en) Musical sound generating device
JPS6116080B2 (en)
JP3637577B2 (en) Music generation method
JPS6028359B2 (en) electronic musical instruments
JPH10149161A (en) Karaoke device
JPS58126597A (en) Musical piece performer
JPS6250834B2 (en)
JPH0468638B2 (en)
JPS63261396A (en) Electronic musical instrument
JPH031195A (en) Automatic musical performance device
JPH046958B2 (en)
JPH0436394B2 (en)
JPH0719153B2 (en) Performance pattern generator
JPH0314716Y2 (en)
JP3596285B2 (en) Automatic performance device and automatic performance method
JP3455786B2 (en) Automatic performance device
JP2985379B2 (en) Automatic performance device
JPH09179718A (en) Voice generation controller
JP2559955Y2 (en) Automatic performance device
JPS5830796A (en) Electronic musical instrument
JP2694935B2 (en) Automatic ensemble device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080216

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20090216

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20090216

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100216

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees