JPH07122796B2 - Processor - Google Patents

Processor

Info

Publication number
JPH07122796B2
JPH07122796B2 JP63334164A JP33416488A JPH07122796B2 JP H07122796 B2 JPH07122796 B2 JP H07122796B2 JP 63334164 A JP63334164 A JP 63334164A JP 33416488 A JP33416488 A JP 33416488A JP H07122796 B2 JPH07122796 B2 JP H07122796B2
Authority
JP
Japan
Prior art keywords
musical
tone
program
processing
interrupt
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.)
Expired - Lifetime
Application number
JP63334164A
Other languages
Japanese (ja)
Other versions
JPH02179697A (en
Inventor
康祐 斯波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP63334164A priority Critical patent/JPH07122796B2/en
Publication of JPH02179697A publication Critical patent/JPH02179697A/en
Publication of JPH07122796B2 publication Critical patent/JPH07122796B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

【発明の詳細な説明】 [発明の技術分野] この発明は処理装置に関し、特に処理装置における楽音
合成の構造的なアーキテクチャーに関する。
Description: TECHNICAL FIELD OF THE INVENTION The present invention relates to a processor, and more particularly to a structural architecture of musical sound synthesis in the processor.

[発明の背景] 近年、電子楽器はコンピュータ化されている。しかし、
大量で高速のデータ演算が必要な楽音の生成に係る部分
は音源回路と呼ばれる専用構造のハードウェアで行われ
ており、マイクロコンピュータは楽器への制御入力(鍵
盤やコンソールパネルからの入力、MIDIその他の外部制
御入力、内部または外部の演奏メモリからの入力等)を
処理し、音源回路に適したコマンドを音源回路に転送す
るに留まっている。
BACKGROUND OF THE INVENTION In recent years, electronic musical instruments have been computerized. But,
The part related to the generation of musical sounds that requires a large amount of high-speed data calculation is performed by hardware with a dedicated structure called a tone generator circuit, and the microcomputer is a control input to the musical instrument (input from the keyboard or console panel, MIDI etc. External control input, input from an internal or external performance memory, etc.) and transfer commands suitable for the tone generator circuit to the tone generator circuit.

楽音生成処理は音源回路ハードウェアで行い、楽器の制
御入力の処理をマイクロコンピュータで行うという電子
楽器のシステムアーキテクチャーにはいくつかの問題が
ある。第1に音源回路ハードウェアは楽音パラメータを
処理する種々の処理段階の随所にデータを一時的に保持
する記憶装置、演算を行う演算回路から構成されるの
で、必然的に回路規模が大きくなる。代表的にはマイク
ロコンピュータの2倍程度の規模となる。第2に音源回
路ハードウェアで行う楽音合成の仕方をマイクロコンピ
ュータで可変に制御するに限界がある。例えば、同時発
音数(ポリフォニック数)はハード的に固定されている
のでマイクロコンピュータからのコマンドで変えること
はできない。また、楽音のサンプリング周波数も音源回
路のハードウェアにより固定されているため、マイクロ
コンピュータからのコマンドで変更することはできな
い。このような制御の限界は新しい音源回路ハードウェ
アを設計する場合の障壁になる。すなわち、しばしば大
規模な回路変更が余儀なくなり、多大の開発時間、労力
を要する。更に、マイクロコンピュータと音源回路ハー
ドウェアとの通信プロトコルあるいはインタフェース
(転送方式、コマンドのセット等)についても、音源回
路ハードウェアごとに検討し直し、開発し直す必要があ
る。
There are some problems in the system architecture of an electronic musical instrument in which tone generation processing is performed by sound source circuit hardware, and control input processing of a musical instrument is performed by a microcomputer. First, since the tone generator circuit hardware is composed of a storage device for temporarily holding data at various stages of processing various tone parameters and an arithmetic circuit for performing arithmetic operations, the circuit scale is inevitably large. Typically, it is about twice as large as a microcomputer. Secondly, there is a limit in variably controlling the method of synthesizing the musical tone performed by the tone generator circuit hardware by the microcomputer. For example, the polyphonic number (polyphonic number) is fixed in hardware and cannot be changed by a command from the microcomputer. Further, since the sampling frequency of the musical sound is fixed by the hardware of the tone generator circuit, it cannot be changed by a command from the microcomputer. Such control limits become a barrier when designing new sound source circuit hardware. That is, a large-scale circuit change is often unavoidable, which requires a great deal of development time and labor. Furthermore, the communication protocol or interface (transfer method, command set, etc.) between the microcomputer and the tone generator circuit hardware must be reexamined and redeveloped for each tone generator circuit hardware.

以上の理由から、本件出願人は音源回路ハードウェアを
使用することなく、マイクロコンピュータのプログラム
制御だけで楽音を生成することのできる新しい電子楽器
のシステムアーキテクチャーの研究を続け、ついに、そ
の実現を見た。
For the above reasons, the applicant of the present application has continued research on the system architecture of a new electronic musical instrument that can generate musical tones only by program control of a microcomputer without using sound source circuit hardware, and finally realizes it. saw.

新しい電子楽器のシステムアーキテクチャーを実現する
上で解決すべき課題として、処理すべき仕事量がそのと
きそのときのシステムの状態によって変動せざるを得な
いマイクロコンピュータにおいて、楽音のサンプリング
周波数、すなわちマイクロコンピュータがデジタル楽音
信号を生成する間隔をどのようにしたら有効に維持する
ことができるか、という問題があった。更に、電子楽器
の種々の使用、例えば楽音の合成の仕方、その処理の複
雑さの度合、ポリフォニック数などに合わせて最適の楽
音サンプリング周波数を容易に設定できるような機構が
望まれた。
In order to realize a new system architecture of electronic musical instruments, one of the problems to be solved is the sampling frequency of the musical sound There has been a problem of how to effectively maintain the interval at which a computer generates a digital tone signal. Further, there has been desired a mechanism capable of easily setting an optimum musical tone sampling frequency in accordance with various uses of electronic musical instruments, for example, a method of synthesizing musical tones, a degree of complexity of the processing, a polyphonic number and the like.

[発明の目的] したがって、この発明の目的は従来のような音源回路ハ
ードウェアを必要とすることなくプログラム制御によ
り、マイクロコンピュータ自身が楽音を生成することが
でき、かつプログラム制御に起因する問題、特に動作時
の楽音サンプリング周期の確立の問題を解決するととも
に電子楽器の機能に関する種々の仕様変更、設計変更、
ポリフォニック数の変更、楽音合成方式の変更、楽器制
御処理の変更等に対してただちに対応できるような最適
の楽音サンプリング周期の選定機能を実現した処理装置
を提供することである。
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to allow a microcomputer to generate a musical tone by program control without the need for sound source circuit hardware as in the conventional art, and to solve the problem caused by program control. In particular, it solves the problem of establishing a musical sound sampling period during operation, and changes various specifications and designs related to the functions of electronic musical instruments.
It is an object of the present invention to provide a processing device that realizes a function of selecting an optimum musical tone sampling period that can immediately cope with a change in the number of polyphonics, a change in a musical tone synthesis method, a change in musical instrument control processing, and the like.

[発明の構成、作用] この発明によれば、上記の目的を達成するため、楽器を
制御する入力を処理するためのプログラムと楽音を生成
するためのプログラムを記憶するプログラム記憶手段
と、このプログラム記憶手段のアドレスを制御するアド
レス制御回路手段と、楽音の生成に必要なデータを記憶
するデータ記憶手段と、演算回路手段と、前記プログラ
ム記憶手段のプログラムの各命令を解読して前記各手段
の動作を制御するオペレーション制御回路手段とを備え
るマイクロコンピュータから成り、更に、前記マイクロ
コンピュータは楽音のサンプリング周期でインタラプト
信号を発生するタイマーインタラプト制御回路手段を有
し、このタイマーインタラプト制御回路手段からのイン
タラプト信号に応答して前記楽音を生成するためのプロ
グラムが前記マイクロコンピュータにおいて実行される
ことにより楽音が生成され、更に前記タイマーインタラ
プト制御回路手段において前記インタラプト信号が発生
する間隔である前記楽音のサンプリング周期を可変にプ
ログラム可能にしたことを特徴とする処理装置が提供さ
れる。
According to the present invention, in order to achieve the above object, a program storage means for storing a program for processing an input for controlling a musical instrument and a program for generating a musical tone, and this program. An address control circuit means for controlling the address of the storage means, a data storage means for storing data necessary for generating a musical tone, an arithmetic circuit means, and each instruction of the program of the program storage means to decode the respective means of the respective means. An operation control circuit means for controlling an operation, and a microcomputer having timer interrupt control circuit means for generating an interrupt signal at a sampling period of a musical sound, and the interrupt from the timer interrupt control circuit means. A program for generating the musical sound in response to a signal. A musical tone is generated by executing the program in the microcomputer, and the sampling period of the musical tone, which is an interval at which the interrupt signal is generated, is variably programmable in the timer interrupt control circuit means. A processing device is provided.

すなわち、この発明では、タイマーインタラプト制御回
路手段からインタラプト信号によりマイクロコンピュー
タが行っている仕事を中断させ、楽音を生成するプログ
ラムを実行させているので、楽音のサンプリング周期ご
とに楽音のサンプルを生成するという課題がプログラム
制御方式において有効に解決される。すなわち、楽音を
生成する処理は他の処理に優先され、タイマーインタラ
プト制御回路手段からインタラプト信号が発生する都
度、実行される。タイマーインタラプト制御回路手段は
基本的にタイマー(カウンタ)で構成されるわけである
から、そのインタラプト信号の発生間隔は非常に安定し
ている。またインタラプト信号の発生ごとに楽音のサン
プルが生成されるわけであるから、インタラプト信号の
発生間隔は楽音のサンプリング周期にほかならない。更
に、この発明によれば、このタイマーインタラプト制御
回路手段はプログラム可能である。したがって、ポリフ
ォニック数、楽音の合成の仕方などに合わせて、最適の
間隔でタイマーインタラプト制御回路手段からインタラ
プト信号を発生させることができる。例えば、タイマー
インタラプト制御回路手段をプリセット可能なダウンカ
ウンタで構成したとする。マイクロコンピュータは適当
なとき(例えばパワーオン時の初期設定処理時)に、こ
のカウンタにサンプリング周期を表わすデータをプリセ
ットする。カウンタはクロック(水晶発振器等のマスタ
ークロック源からの信号)ごとにカウント値をデクリメ
ントする。カウント値がゼロになるとカウンタからイン
タラプト信号が発生し、マイクロコンピュータに割込を
要求する。更にこのインタラプト信号によりプリセット
データ(保持されている)が再度、カウンタにセットさ
れる。以上により、マイクロコンピュータが望むサンプ
リング周期で、タイマーインタラプト制御回路手段から
割込がかかり、その都度マイクロコンピュータは楽音生
成処理を実行する。
That is, according to the present invention, the timer interrupt control circuit means interrupts the work performed by the microcomputer by an interrupt signal and executes a program for generating a musical tone, so that a musical tone sample is generated at each musical tone sampling cycle. This problem is effectively solved in the program control method. That is, the process of generating a musical tone is prioritized over other processes, and is executed each time an interrupt signal is generated from the timer interrupt control circuit means. Since the timer interrupt control circuit means is basically composed of a timer (counter), the interval of generation of the interrupt signal is very stable. Further, since a musical tone sample is generated each time an interrupt signal is generated, the interrupt signal generation interval is nothing but the musical tone sampling period. Further, according to the invention, the timer interrupt control circuit means is programmable. Therefore, the interrupt signal can be generated from the timer interrupt control circuit means at an optimum interval in accordance with the polyphonic number, the method of synthesizing the musical sound, and the like. For example, it is assumed that the timer interrupt control circuit means is composed of a presettable down counter. The microcomputer presets data representing the sampling period in this counter at an appropriate time (for example, at the time of initial setting processing at power-on). The counter decrements the count value for each clock (a signal from a master clock source such as a crystal oscillator). When the count value reaches zero, an interrupt signal is generated from the counter and requests the microcomputer to interrupt. Further, this interrupt signal resets the preset data (held) to the counter. As described above, the timer interrupt control circuit means interrupts at the sampling cycle desired by the microcomputer, and the microcomputer executes the tone generation processing each time.

楽音生成処理(インタラプト処理)はタイマーインタラ
プト制御回路手段から次のインタラプト信号が出力され
るより前に、完了しなければならない。これができなけ
れば、楽音のサンプリング周期を維持できない。楽音生
成処理に要する時間は、その内容、例えばポリフォニッ
ク数、楽音合成の仕方、処理の複雑さの度合に依存す
る。換言すれば、楽音生成処理プログラムの実行時間に
依存する。例えば、他の条件を同じとし、ポリフォニッ
ク数で半分にすれば、その楽音生成処理プログラムの実
行時間はほぼ半分になる。この場合、楽音のサンプリン
グ速度を速くしても問題はない。むしろ、デジタル・ア
ナログ変換器の変換を考慮すれば、サンプリング速度を
速くした方がよい。一方、用途によっては、高品質でス
ペクトルの豊かな楽音が要求される場合もある。この場
合、ポリフォニック数は犠牲になるが、1つの音を複雑
な処理で合成して要求される条件にかなう楽音を提供す
る必要がある。このような場合にも、それに適した楽音
サンプリング周期が考えられる。この発明は、以上のよ
うな様々な仕様条件を考慮して、それぞれの条件に合っ
た楽音サンプリング周期での楽音の生成を可能にしたも
のである。
The tone generation processing (interrupt processing) must be completed before the next interrupt signal is output from the timer interrupt control circuit means. If this cannot be done, the sampling cycle of the musical sound cannot be maintained. The time required for the tone generation processing depends on the content thereof, for example, the number of polyphonics, the method of synthesizing the tone, and the degree of complexity of processing. In other words, it depends on the execution time of the tone generation processing program. For example, if the other conditions are the same and the polyphonic number is halved, the execution time of the tone generation processing program is halved. In this case, there is no problem even if the sampling rate of the musical sound is increased. Rather, considering the conversion of the digital / analog converter, it is better to increase the sampling speed. On the other hand, depending on the application, there are cases where high-quality and spectrum-rich musical tones are required. In this case, the polyphonic number is sacrificed, but it is necessary to synthesize one sound by complicated processing to provide a musical sound that meets the required conditions. Even in such a case, a musical tone sampling cycle suitable for it can be considered. The present invention makes it possible to generate musical tones in a musical tone sampling cycle that meets each of the above-described various specification conditions.

一構成例において、上記マイクロコンピュータは集積回
路チップで実現され、このチップ上に上記手段を加え、
生成したデジタル楽音信号をアナログ信号に変換するデ
ジタル・アナログ(D/A)変換器と楽器を制御する入力
を受けるポートも実装される。したがって、音源回路ハ
ードウェアが不要であるので、全体の回路規模を大幅に
縮少することができる。従来の場合、音源回路LSIチッ
プの回路規模が大きいため、チップ製造における歩留り
に限界がある(歩留りはチップ面積にほぼ反比例す
る)。したがって、この発明は装置の製造コストを大幅
に下げることができる。
In one configuration example, the microcomputer is realized by an integrated circuit chip, and the means is added on the chip,
A digital-analog (D / A) converter that converts the generated digital musical tone signal to an analog signal and a port that receives an input that controls the musical instrument are also mounted. Therefore, sound source circuit hardware is not required, and the overall circuit scale can be greatly reduced. In the conventional case, since the circuit scale of the sound source circuit LSI chip is large, there is a limit to the yield in the chip manufacturing (the yield is almost inversely proportional to the chip area). Therefore, the present invention can significantly reduce the manufacturing cost of the device.

[実施例] 以下、図面を参照してこの発明の実施例を説明する。Embodiments Embodiments of the present invention will be described below with reference to the drawings.

本実施例に係る電子楽器の全体構成を第1図に示す。装
置全体の制御はマイクロコンピュータ1により行われ
る。特に、この発明に従い、楽器の制御入力の処理のみ
ならず、楽音を生成する処理もマイクロコンピュータ1
で実行され、楽音生成用の音源回路ハードウェアは必要
としない。鍵盤2と機能キー3とから成るスイッチ部4
は楽器の制御入力源であり、スイッチ部4から入力され
た情報はマイクロコンピュータ1で処理される。マイク
ロコンピュータ1の生成したアナログ変換後の楽音信号
はローパスフィルタ5でフィルタリングされ、アンプ6
で増幅され、スピーカ7を介して放音される。電源回路
8はマイクロコンピュータ1、ローパスフィルタ、アン
プ6に必要な電源を供給する。
FIG. 1 shows the overall configuration of the electronic musical instrument according to this embodiment. The entire apparatus is controlled by the microcomputer 1. In particular, according to the present invention, the microcomputer 1 performs not only the control input process of the musical instrument but also the process of generating a musical sound.
It does not require any tone generator circuit hardware for tone generation. Switch section 4 consisting of keyboard 2 and function keys 3
Is a control input source of the musical instrument, and the information input from the switch unit 4 is processed by the microcomputer 1. The analog-converted tone signal generated by the microcomputer 1 is filtered by the low-pass filter 5, and the amplifier 6
Is amplified and is emitted through the speaker 7. The power supply circuit 8 supplies necessary power to the microcomputer 1, the low pass filter, and the amplifier 6.

上記マイクロコンピュータ1の内部構造を第2図にブロ
ック図で示す。図示の各要素はワンチップ上に実装され
ている。実際に製作したものは5×5mmのチップサイ
ズ、8音ポリフォニックの同時発音数をもち、楽音合成
方式はPCM(波形読み出し方式)であるが、本発明は他
のポリフォニック数、他の楽音合成方式にも適用でき
る。
The internal structure of the microcomputer 1 is shown in a block diagram in FIG. The illustrated elements are mounted on a single chip. The actually manufactured one has a chip size of 5 × 5 mm, the number of simultaneous polyphonic sounds of 8 tones, and the musical tone synthesis method is PCM (waveform reading method). However, the present invention uses other polyphonic numbers and other musical tone synthesis methods. Can also be applied to.

制御用ROM31には楽器の各種制御入力を処理するプログ
ラムと楽音を生成するプログラムが記憶されており、RO
Mアドレス制御部39からROMアドレスデコーダ32を介して
指定されたアドレスのプログラム語(命令)を順次出力
していく。なお、具体的実施例では、プログラム語長は
28ビットであり、プログラム語の一部が次に読み出され
るべきアドレスの下位部(ページ内アドレス)としてRO
Mアドレス制御部39に入力されるネクストアドレス方式
となっているが、プログラムカウンタ方式のものにも本
発明を適用し得る。RAMアドレス制御部33は制御用ROM31
からの命令のオペランドがレジスタを指定している場合
に、RAM34内の対応するレジスタのアドレスを指定す
る。RAM34はレジスタ群であり、汎用演算、フラグ演
算、楽音の演算時に使用される。加減算器及び論理演算
部35と乗算器36は制御用ROM32からの命令が演算命令の
ときに用いられる。特に乗算器36は楽音波形の演算に使
用しており、そのための最適化として第1と第2のデー
タ入力(例えば16ビットデータ)を乗算して入力と同じ
長さ(16ビット)のデータを出力するようになってい
る。上記RAM34、加減算器35、乗算器36により、演算回
路(AU)が構成される。制御データ兼波形用ROM37には
ピッチデータ、エンベロープデータ(レート、レベル)
などの各種楽音制御パラメータと、PCM(パルス符号変
調)の楽音波形データが記憶されている。エンベロープ
データと楽音波形データは楽音の音色ごとに用意され
る。オペレーション解析部(オペレーション制御回路)
38は制御用ROM31からの命令のオペコードを解読し、指
示されるオペレーションを実行するために、回路の各部
に制御信号を送る。
The control ROM 31 stores a program for processing various control inputs of the musical instrument and a program for generating musical tones.
The program word (command) of the designated address is sequentially output from the M address control unit 39 via the ROM address decoder 32. In the concrete example, the program word length is
It is 28 bits, and a part of the program word is RO as the lower part (address within page) of the address to be read next.
Although the next address method is input to the M address control unit 39, the present invention can be applied to a program counter method. RAM address control unit 33 is control ROM 31
Specifies the address of the corresponding register in the RAM 34 when the operand of the instruction from specifies a register. The RAM 34 is a register group and is used in general-purpose calculation, flag calculation, and calculation of musical tones. The adder / subtractor / logical operation unit 35 and the multiplier 36 are used when the instruction from the control ROM 32 is an operation instruction. In particular, the multiplier 36 is used for the calculation of the musical tone waveform, and as an optimization therefor, the first and second data inputs (for example, 16-bit data) are multiplied to obtain the data of the same length (16 bits) as the input. It is designed to output. The RAM 34, the adder / subtractor 35, and the multiplier 36 constitute an arithmetic circuit (AU). Pitch data, envelope data (rate, level) in ROM37 for control data and waveform
Various tone control parameters such as, and tone waveform data of PCM (pulse code modulation) are stored. The envelope data and the tone waveform data are prepared for each tone color of the tone. Operation analysis unit (operation control circuit)
38 decodes the operation code of the instruction from the control ROM 31 and sends a control signal to each part of the circuit in order to execute the instructed operation.

所定時間ごとに制御用ROM31の楽音生成プログラムを実
行するため、本装置ではタイマーインタラプトを採用し
ている。すなわち、タイマーを有するインタラプト制御
部40により、一定時間ごとにROMアドレス制御部39に制
御信号(インタラプト信号)を送り、この信号により、
ROMアドレス制御部39は次に行うメインプログラムの命
令のアドレスを退避(保持)し、楽音の生成が行われる
インタラプト処理プログラム(サブルーチン)の先頭ア
ドレスを代りにセットする。これにより、インタラプト
処理プログラムが開始される。インタラプト処理プログ
ラムの最後にはリターン命令があるので、このリターン
命令がオペレーション解析部38で解読された時点で、RO
Mアドレス制御部39は退避してあったアドレスを再度セ
ットし、メインプログラムに復帰する。
In order to execute the musical sound generation program of the control ROM 31 every predetermined time, this device employs a timer interrupt. That is, the interrupt control unit 40 having a timer sends a control signal (interrupt signal) to the ROM address control unit 39 at regular intervals, and by this signal,
The ROM address control unit 39 saves (holds) the address of the instruction of the main program to be executed next, and sets the start address of the interrupt processing program (subroutine) for generating a musical sound instead. As a result, the interrupt processing program is started. Since there is a return instruction at the end of the interrupt processing program, when this return instruction is decoded by the operation analysis unit 38, RO
The M address control unit 39 sets the saved address again and returns to the main program.

上記インタラプト制御部40はこの発明に従いプログラマ
ブルである。すなわち、インタラプト制御部40のインタ
ラプト信号の発生間隔(楽音サンプリング周期)をマイ
クロコンピュータ1で自由に設定できる。詳細は後述す
る。
The interrupt controller 40 is programmable according to the present invention. That is, the microcomputer 1 can freely set the interval at which the interrupt signal is generated by the interrupt controller 40 (sound sampling period). Details will be described later.

入力ポート41と出力ポート42は鍵盤2、機能キー3のキ
ースキャンのために使用される。インタラプト処理プロ
グラムにおいて生成された楽音はデジタル/アナログ変
換器43でアナログ信号に変換され、外部に出力される。
The input port 41 and the output port 42 are used for key scanning of the keyboard 2 and the function keys 3. The musical sound generated in the interrupt processing program is converted into an analog signal by the digital / analog converter 43 and output to the outside.

第3図(A)に本実施例のマイクロコンピュータ1のメ
インプログラムのフローを示す。A1は電源投入時のイニ
シャル処理であり、マイクロコンピュータ1のRAM(レ
ジスタ群)34のクリアや、リズムテンポ等の初期値の設
定等を行う。更に、このイニシャル処理において、イン
タラプト制御部40に対する楽音サンプリング周期データ
の設定が行われる。A2でマイクロコンピュータ1は出力
ポート42からキー走査のための信号を出力し、スイッチ
部4の状態を入力ポート41から取り込むことにより、機
能キー、鍵盤キーの状態をRAM34のキーバッファエリア
に記憶する。A3ではA2で得た機能キー3の状態から、状
態の変化した機能キーを識別し、指示される機能の実行
を行う(例えば、楽音番号のセット、エンベロープ番号
のセット、リズム番号のセット等)。A4ではA2で得た鍵
盤2の状態から、変化した鍵(押鍵、離鍵)を識別す
る。次のA5でA4の処理結果から、発音処理A9のためのキ
ーアサイン処理を行う。A6では機能キー3でデモ演奏キ
ーが押鍵されたとき制御データ兼波形用ROM37から、デ
モ演奏データ(シーケンサデータ)を順次読み出し、処
理することにより、発音処理A9のためのキーアサイン処
理等を行う。A7ではリズムスタートキーが押鍵されたと
き制御データ兼波形用ROM37からリズムデータを順次読
み出し、発音処理A9のためのキーアサイン処理を行う。
フロー一周タイマー処理A8では、メインフローで必要な
イベントのタイミングを知るために、フロー一周時間
(これは、フローを一周する間に実行されたタイマーイ
ンタラプトの回数を計数することで得られる。この計数
処理は後述のインタラプトタイマー処理B3で行われ
る。)を基に演算を行い、エンベロープ用タイマー(エ
ンベロープの演算周期)やリズム用の基準値を得る。発
音処理A9ではA5、A6、A7でセットされたデータから、実
際に楽音を発音させるための各種演算を行い、結果をRA
M34内の音源処理レジスタ(第6図)にセットする。A10
は次のメインフローのパスのための準備処理であり、今
回のパスで得た押鍵状態への変化を示すNEW ON状態をO
N中にしたり、離鍵状態への変化を示すNEW OFF状態をO
FF中に変える等の処理を行う。
FIG. 3A shows the flow of the main program of the microcomputer 1 of this embodiment. A1 is an initial process when the power is turned on, and clears the RAM (register group) 34 of the microcomputer 1 and sets initial values such as rhythm tempo. Further, in this initial processing, the musical tone sampling period data is set in the interrupt control unit 40. At A2, the microcomputer 1 outputs a signal for key scanning from the output port 42 and takes in the state of the switch section 4 from the input port 41 to store the states of the function keys and keyboard keys in the key buffer area of the RAM 34. . At A3, the function key whose state has changed is identified from the state of the function key 3 obtained at A2, and the instructed function is executed (for example, musical tone number set, envelope number set, rhythm number set, etc.). . At A4, the changed key (key depression, key release) is identified from the state of the keyboard 2 obtained at A2. Next, at A5, key assignment processing for sound generation processing A9 is performed from the processing result of A4. In A6, when the demo performance key is pressed with the function key 3, the demo performance data (sequencer data) is sequentially read from the control data / waveform ROM 37 and processed, thereby performing the key assignment processing for the sound generation processing A9. To do. At A7, when the rhythm start key is pressed, the rhythm data is sequentially read from the control data / waveform ROM 37, and the key assign process for the tone generation process A9 is performed.
In the flow round timer processing A8, in order to know the timing of an event required in the main flow, the flow round time (this is obtained by counting the number of timer interrupts executed during one round of the flow. The processing is performed based on the interrupt timer processing B3 described later.) To obtain an envelope timer (envelope calculation cycle) and a rhythm reference value. In the pronunciation processing A9, various calculations are performed to actually generate musical tones from the data set in A5, A6 and A7, and the result is RA
Set it in the sound source processing register (Fig. 6) in M34. A10
Is a preparation process for the next main flow pass, and the NEW ON state indicating the change to the key depression state obtained in this pass is set to O
N OFF or NEW OFF state that indicates a change to the key release state O
Perform processing such as changing during FF.

楽音の生成が行われるインタラプト処理プログラムのフ
ローを第3B図に示す。B1で前回のインタラプトの音源処
理B2で生成してある楽音波形データ(8音分の累算波形
値)をD/A変換器43に送出する。これにより、一定周期
でD/A変換器43に楽音のサンプルが与えられることにな
る。次の音源処理B2で各チャンネルの楽音が生成され累
算される。従来はこの処理を音源回路ハードウェア上で
行っていた。詳細は後述する。次のインタラプトタイマ
ー処理B3ではインタラプトが所定時間ごとにかかること
を利用して、フロー一周計時用のタイマーレジスタ(RA
M34内)を通過の都度、プラス1する。
FIG. 3B shows the flow of the interrupt processing program for generating the musical sound. At B1, the musical tone waveform data (accumulated waveform value for 8 sounds) generated at the previous interrupt sound source processing B2 is sent to the D / A converter 43. As a result, the musical tone samples are given to the D / A converter 43 in a constant cycle. In the next sound source processing B2, musical tones of each channel are generated and accumulated. In the past, this processing was performed on the tone generator circuit hardware. Details will be described later. In the next interrupt timer processing B3, the interrupt takes every predetermined time, so that the timer register (RA
Add 1 each time you pass through (inside M34).

なお、この実施例ではインタラプト処理プログラム内で
はメインプログラムで書込を行うレジスタについては、
内容の書替を行わないようにしているので、通常のイン
タラプト処理の開始時と終了時に行われるレジスタの退
避と回復の処理は不要である。すなわち、RAM34上のレ
ジスタは楽音処理に関係するレジスタとその他の処理に
関係するレジスタとが独立しているので、メインプログ
ラムからインタラプト処理への移行が可及的に遅れなし
で行われる。
In this embodiment, the registers to be written by the main program in the interrupt processing program are
Since the contents are not rewritten, the register save and restore processes that are performed at the start and end of the normal interrupt process are unnecessary. That is, since the registers on the RAM 34 are independent of the registers related to the musical tone processing and the registers related to other processing, the transition from the main program to the interrupt processing can be performed without delay as much as possible.

音源処理B2の詳細を第3C図に示す。C1で波形加算用RAM
領域(第6図参照)をクリアした後、8チャンネル分の
処理C2〜C9を順番に行っている。各チャンネル処理の最
後で、チャンネルの楽音波形値が波形加算用RAM領域の
データに加算される。
Details of the sound source processing B2 are shown in FIG. 3C. RAM for waveform addition with C1
After clearing the area (see FIG. 6), processing C2 to C9 for eight channels is performed in order. At the end of each channel processing, the tone waveform value of the channel is added to the data in the RAM area for waveform addition.

第4図は、時間に沿って実施例の動作の流れを描いたも
のである。A、B、C、D、E、Fはメインプログラム
(第3A図)の断片であり、一定時間(楽音サンプリング
タイム)ごとにインタラプト処理(第3B図)が実行され
る。タイムチャートで示すと第5図のようになる。図示
のように、インタラプトに入る都度、D/A変換器43に楽
音波形信号が入力され、対応するアナログ信号が外部に
出力されていく。
FIG. 4 illustrates the flow of operation of the embodiment over time. A, B, C, D, E, and F are fragments of the main program (FIG. 3A), and interrupt processing (FIG. 3B) is executed at regular intervals (musical sound sampling time). The time chart shows it as shown in FIG. As shown in the figure, each time an interrupt is entered, a tone waveform signal is input to the D / A converter 43, and a corresponding analog signal is output to the outside.

第3C図のC2〜C9の処理を1チャンネル分について詳細に
示したのが第7図である。チャンネル処理は大きく分け
てエンベロープ処理(D1〜D7)と波形処理(D8〜D21)
から成る。
FIG. 7 shows the processing of C2 to C9 in FIG. 3C in detail for one channel. Channel processing is roughly divided into envelope processing (D1 to D7) and waveform processing (D8 to D21).
Consists of.

第8図はエンベロープ処理で生成されるエンベロープを
示したものである。1つの楽音のエンベロープはいくつ
かのステップ(セグメント)から成っている。図では4
セグメントで示してある。図中の△xはエンベロープの
サンプリング周期であり、△yはエンベロープ値の変化
幅である。チャンネルのエンベロープ処理(D1〜D7)で
は、サンプリングタイムごとのエンベロープの計算とス
テップの目標レベルに達したかどうかのチェックを行っ
ている。一致したときには現在エンベロープレジスタ
(第6図参照)に目標値が設定されるので、メインプロ
グラムの発音処理A9内でそれを検知して、次のステップ
のエンベロープのためのデータ(△x、△y、目標エン
ベロープ値)を各レジスタにセットしている。
FIG. 8 shows an envelope generated by the envelope processing. A musical tone envelope is composed of several steps (segments). 4 in the figure
Shown in segments. In the figure, Δx is the sampling period of the envelope, and Δy is the change width of the envelope value. In the channel envelope processing (D1 to D7), the envelope is calculated for each sampling time and it is checked whether the step target level has been reached. When they match, the target value is currently set in the envelope register (see FIG. 6), so that it is detected in the tone generation processing A9 of the main program, and the data (Δx, Δy) for the envelope of the next step is detected. , Target envelope value) is set in each register.

詳細に述べると、D1でエンベロープの演算周期△xと比
較するためのタイマーレジスタとインタラプトごとにイ
ンクリメントし、D2で△xと一致したときD3でエンベロ
ープ変位分のデータ△yの加減算フラグ(符号ビット)
をテストしてエンベロープが上昇中か下降中かを判別
し、D4、D5でそれぞれ現在エンベロープの減算または加
算を行う。D6で現在エンベロープが目標エンベロープ値
に達したかどうかをチェックし、達しておれば、現在エ
ンベロープに目標レベルをセットする。これによりメイ
ンプログラムの発音処理A9で次のエンベロープステップ
のデータがセットされることになる。また発音処理A9で
ゼロの現在エンベロープを読んだときには発音の終了と
して処理される。
In detail, D1 increments every timer register and interrupt for comparing with the envelope calculation cycle Δx, and when D2 matches Δx, the addition / subtraction flag of the data Δy of the envelope displacement at D3 (sign bit )
To determine whether the envelope is rising or falling, and subtract or add the current envelope with D4 and D5, respectively. At D6, it is checked whether the current envelope has reached the target envelope value, and if so, the target level is set to the current envelope. As a result, the data of the next envelope step is set in the tone generation processing A9 of the main program. When the current envelope of zero is read in the pronunciation processing A9, it is processed as the end of the pronunciation.

次に、波形処理D8〜D21について述べる。波形処理で
は、現在アドレスの整数部を使って波形ROMから隣り合
う2つアドレスの波形データを読み出し、(整数部+小
数部)で示される現在アドレスに対して想定される波形
値を補間で求めている。補間が必要な理由は、インタラ
プトによる波形サンプリング周期が一定であり、アドレ
スの加算値(ピッチデータ)が楽器への応用上、ある音
域にわたるためである(音階音しか出力しない楽器で音
階音ごとに波形データを用意すれば補間の必要はないが
許容できない記憶容量の増大となる)。補間による音色
の劣化、歪みは高音域の方が著しいため、通常は、原音
の記録サンプリング周期より高速の周期で原音を再生す
る。この実施例では原音(A4)再生の周期を2倍にして
いる(第9図)。したがって、アドレス加算値が0.5の
とき、A4の音が得られるようになっている。この場合、
A#4ではアドレス加算値は0.529となり、A3のとき、
1となる。これらのアドレス加算値はピッチデータとし
て制御データ兼波形ROM37に記憶されており、押鍵時に
は発音処理A9において、鍵に対応するピッチデータと選
択されている音色の波形スタートアドレス、波形エンド
アドレス及び波形ループアドレスがRAM34の対応するレ
ジスタ、すなわち、アドレス加算値レジスタ、スタート
アドレス兼現在アドレスレジスタ、エンドアドレスレジ
スタ、ループアドレスレジスタにセットされる。
Next, the waveform processing D8 to D21 will be described. In the waveform processing, the waveform data of two adjacent addresses is read from the waveform ROM using the integer part of the current address, and the expected waveform value for the current address indicated by (integer part + fractional part) is calculated by interpolation. ing. The reason why interpolation is necessary is that the waveform sampling period by interrupt is constant and the added value of the address (pitch data) covers a certain range for application to musical instruments. If waveform data is prepared, there is no need for interpolation, but the storage capacity will be unacceptable.) Since the deterioration and distortion of the tone color due to the interpolation are more remarkable in the high tone range, the original sound is usually reproduced at a cycle faster than the recording sampling cycle of the original sound. In this embodiment, the cycle of reproduction of the original sound (A4) is doubled (Fig. 9). Therefore, when the address addition value is 0.5, the sound of A4 can be obtained. in this case,
In A # 4, the added address value is 0.529, and when A3,
It becomes 1. These address addition values are stored as pitch data in the control data / waveform ROM 37.When the key is pressed, the pitch data corresponding to the key and the waveform start address, waveform end address, and waveform of the selected tone color are generated in the tone generation process A9. The loop address is set in the corresponding register of the RAM 34, that is, the address addition value register, the start address / current address register, the end address register, and the loop address register.

参考までに、第10図に時間に対する補間波形データを示
す。図中、白丸は波形ROMのアドレスにある波形データ
値、黒丸は補間値を示している。
For reference, FIG. 10 shows the interpolated waveform data with respect to time. In the figure, the white circles indicate the waveform data value at the address of the waveform ROM, and the black circles indicate the interpolated values.

補間の方式はいろいろあるが、ここでは直線補間を採用
している。第7図の波形生成処理D8〜D21を詳細に述べ
ると、まず、D8で現在アドレスにアドレス加算値を加算
して新しい現在アドレスを得る。D9で現在アドレスとエ
ンドアドレスを比較し、現在アドレス>エンドアドレス
ならば、D10、D11により、現在アドレス<エンドアドレ
スのときはD12により、物理上(番地上)または論理上
(動作上)の次のアドレスを計算し、D14でその整数部
により波形ROMをアクセスして次回波形データを得る。
ループアドレスは動作上エンドアドレスの次のアドレス
である。すなわち、第9図の場合、図示の波形は繰り返
し読み出される。したがって、現在アドレス=エンドア
ドレスのときは次のアドレスとしてループアドレスの波
形データを読み出す(D13)。D15、D16により、現在ア
ドレスの整数部で波形ROMをアクセスして今回の波形デ
ータを読み出す。次に、D17で次回波形値から今回波形
値を減算し、D18でその差に現在アドレスの小数部を乗
算し、その結果をD19で今回の波形値に加えることによ
り、波形の直線補間値を求める。この直線補間したデー
タに現在エンベロープ値を乗算してチャンネルの楽音デ
ータ値を得(D20)、それを波形加算用レジスタの内容
に加えて楽音データを累算する(D21)。
There are various interpolation methods, but linear interpolation is used here. The waveform generation processing D8 to D21 shown in FIG. 7 will be described in detail. First, at D8, the address addition value is added to the current address to obtain a new current address. The current address is compared with the end address in D9. If the current address> the end address, the next physical or logical address (operation) is set by D10 and D11, and if the current address <the end address, D12. The address of is calculated, and the waveform ROM is accessed by the integer part at D14 to obtain the next waveform data.
The loop address is the address next to the end address in operation. That is, in the case of FIG. 9, the illustrated waveform is repeatedly read. Therefore, when the current address = end address, the waveform data of the loop address is read as the next address (D13). The waveform ROM is accessed by the integer part of the current address by D15 and D16, and the current waveform data is read. Next, the current waveform value is subtracted from the next waveform value in D17, the difference is multiplied by the fractional part of the current address in D18, and the result is added to the current waveform value in D19 to obtain the linear interpolation value of the waveform. Ask. This linearly interpolated data is multiplied by the current envelope value to obtain the tone data value of the channel (D20), and the tone data is added to the contents of the waveform addition register to accumulate the tone data (D21).

ここまでで、明らかなように、マイクロコンピュータ1
は、インタラプト制御部40からのインタラプト信号の発
生の都度、インタラプト処理を行い、楽音を生成するこ
とにより、動作中の楽音サンプリング周期を維持してい
る。更に、この発明に従い、インタラプト制御部40の発
生するインタラプト信号の発生間隔、すなわち、楽音の
サンプリング周期はマイクロコンピュータ1により可変
にプログラムすることができる。プログラマブルなイン
タラプト制御部40の構成は種々考えられる。以下、2つ
の例について説明する。
So far, as is clear, the microcomputer 1
Each time an interrupt signal is generated from the interrupt control unit 40, the interrupt processing is performed to generate a musical sound, thereby maintaining the musical sound sampling cycle during operation. Further, according to the present invention, the generation interval of the interrupt signal generated by the interrupt control unit 40, that is, the sampling period of the musical tone can be variably programmed by the microcomputer 1. Various configurations of the programmable interrupt control unit 40 can be considered. Two examples will be described below.

第11図に第1構成例のインタラプト制御部40を示す。こ
のインタラプト制御部は2通りの楽音サンプリング周期
でインタラプト信号INTFを発生することができる。詳細
に述べると、インタラプト制御部には第13図に示すよう
なクロック信号φが入力される。このクロック信号φは
クロック発振器の直接の出力あるいは、その出力を分周
回路に通した後の出力である。図示のようにクロック信
号φはリプルカウンタを構成する6つのバイナリカウン
タ11−2〜11−7の最下位のバイナリカウンタに入力さ
れる。第1のORゲート2−8にはすべてのバイナリカウ
ンタ11−2〜11−7の出力が入力され、第2のORゲート
2−9には最上位ビットのバイナリカウンタ11−7を除
いたバイナリカウンタ11−2〜11−6の出力が入力され
る。したがって、第1のORゲート2−8の出力は128回
の基本クロックφに対し、1回“0"となり、第2のORゲ
ート2−9の出力は64回の基本クロックφに対し、1回
“0"となる。この第1と第2のORゲート2−8、2−9
のいずれを選択するかをプログラム制御で設定できるよ
うにすればよい。そのために、ラッチ11−1がある。こ
のラッチ11−1は上述した実施例の場合、初期設定処理
A−1のなかで“0"または“1"に設定される。すなわ
ち、データバスの所定のビット線に128/fφ(fφは基
本クロックφの周波数)の楽音サンプリング周期を指示
するデータ“0"、またはその半分の長さの楽音サンプリ
ング周期を指示する“1"が乗った状態でコマンド解析部
38からの制御信号がラッチ11−1のクロック入力に加っ
て、データがラッチされる。ラッチ11−1の出力は第1
のORゲート2−8の出力が入力されるORゲート11−10に
入力され、またラッチ11−1の出力をインバータ11−11
で反転した信号が、第2のORゲート2−9の出力が入力
されるORゲート11−12に入力される。ORゲート11−10と
ORゲート11−12の出力はNANDゲートに入力され、その出
力がインタラプト信号INTFとなる。したがって、ラッチ
11−1にビット“0"を設定したときには、第1のORゲー
ト11−8の出力が選択され、基本クロックφの128個ご
とに1回、インタラプト信号INTFが“1"アクティブにな
り、ラッチ11−1にビット“1"を設定したときには、第
2のORゲート11−9の出力が選択され、インタラプト信
号INTFは基本クロックφの64個ごとに1回“1"アクティ
ブとなる。
FIG. 11 shows the interrupt controller 40 of the first configuration example. The interrupt control unit can generate the interrupt signal INTF at two kinds of tone sampling periods. More specifically, a clock signal φ as shown in FIG. 13 is input to the interrupt controller. The clock signal φ is the direct output of the clock oscillator or the output after passing the output through the frequency dividing circuit. As shown in the figure, the clock signal φ is input to the lowest binary counter of the six binary counters 11-2 to 11-7 forming the ripple counter. The outputs of all binary counters 11-2 to 11-7 are input to the first OR gate 2-8, and the binary OR gate 2-9 excludes the binary counter 11-7 of the most significant bit. The outputs of the counters 11-2 to 11-6 are input. Therefore, the output of the first OR gate 2-8 becomes “0” once for the 128 basic clocks φ, and the output of the second OR gate 2-9 for the basic clock φ of 64 times 1 It becomes “0” times. The first and second OR gates 2-8 and 2-9
Which of these is to be selected may be set by program control. Therefore, there is a latch 11-1. In the case of the above-described embodiment, the latch 11-1 is set to "0" or "1" in the initial setting process A-1. That is, data "0" indicating a musical tone sampling period of 128 / fφ (fφ is the frequency of the basic clock φ) is input to a predetermined bit line of the data bus, or "1" indicating a musical tone sampling period of half the length. Command parser with the
The control signal from 38 is applied to the clock input of latch 11-1 to latch the data. The output of the latch 11-1 is the first
The output of the OR gate 2-8 is input to the OR gate 11-10, and the output of the latch 11-1 is input to the inverter 11-11.
The signal inverted by (2) is input to the OR gate 11-12 to which the output of the second OR gate 2-9 is input. OR gate 11-10
The output of the OR gate 11-12 is input to the NAND gate, and its output becomes the interrupt signal INTF. Therefore, the latch
When bit "0" is set in 11-1, the output of the first OR gate 11-8 is selected, and the interrupt signal INTF becomes active "1" once every 128 basic clocks φ and latches. When the bit "1" is set in 11-1, the output of the second OR gate 11-9 is selected, and the interrupt signal INTF becomes "1" active once every 64 base clock signals φ.

第12図に第2構成例のインタラプト制御部40を示す。こ
のインタラプト制御部は第11図の構成より細かく楽音サ
ンプリング周期を調整することができる。詳細に述べる
と、1ビットラッチ11−1の代りに、データバスの4ビ
ットに接続される4ビットのラッチ12−1が使用され
る。したがって、マイクロコンピュータ1はこのラッチ
12−1に0〜15の任意の値が設定可能である。この4ビ
ットラッチ12−1の出力はコンパレータ12−8のB入力
に入力される。コンパレータ12−8のA入力には第11図
のリプルカウンタと同様な6ビットのリプルカウンタ12
−2〜12−7の出力のうち、上位4ビットのバイナリカ
ウンタ12−4〜12−7の出力が入力される。コンパレー
タ12−8は、A入力とB入力が等しいとき“1"となり、
インタラプト信号INTFを発生する。このインタラプト信
号INTFはリプルカウンタ12−2〜12−7の各リセット入
力にも入力されており、インタラプト信号INTFの発生時
にリプルカウンタ12−2〜12−7をオールゼロにリセッ
トする。したがって、第12図の構成の場合、インタラプ
ト信号INTFの発生周期(楽音のサンプリング周期)を任
意の8n/fφ(n=1〜)に設定することができる。例え
ば、4ビットラッチ12−1が8のとき(B入力=1000)
は、リプルカウンタ12−2〜12−7の値が1000000(2
進)になるごとにインタラプト信号INTFが発生する。す
なわち、64個の基本クロックφごとに1度の割りとな
る。4ビットラッチ12−1が9のときなら、72個のクロ
ックφごとに1度の割合となる。
FIG. 12 shows the interrupt controller 40 of the second configuration example. This interrupt control unit can finely adjust the tone sampling period as compared with the configuration shown in FIG. Specifically, instead of the 1-bit latch 11-1, a 4-bit latch 12-1 connected to 4 bits of the data bus is used. Therefore, the microcomputer 1 uses this latch
12-1 can be set to any value from 0 to 15. The output of the 4-bit latch 12-1 is input to the B input of the comparator 12-8. A 6-bit ripple counter 12 similar to the ripple counter of FIG. 11 is connected to the A input of the comparator 12-8.
Among the outputs of −2 to 12-7, the outputs of the upper 4-bit binary counters 12-4 to 12-7 are input. The comparator 12-8 becomes "1" when the A input and the B input are equal,
Generates interrupt signal INTF. The interrupt signal INTF is also input to the reset inputs of the ripple counters 12-2 to 12-7, and resets the ripple counters 12-2 to 12-7 to all zeros when the interrupt signal INTF is generated. Therefore, in the case of the configuration shown in FIG. 12, the generation period of the interrupt signal INTF (sound sampling period) can be set to an arbitrary 8n / fφ (n = 1 to 1). For example, when the 4-bit latch 12-1 is 8 (B input = 1000)
Value of the ripple counters 12-2 to 12-7 is 1000000 (2
The interrupt signal INTF is generated every time the input signal goes to the start. That is, it is divided once for every 64 basic clocks φ. When the 4-bit latch 12-1 is 9, the rate is once for every 72 clocks φ.

以上で実施例の説明を終えるが、この発明の範囲を逸脱
することなく種々の変形、変更が可能である。例えば、
ある用途では、電子楽器に複数の異なる楽音合成能力を
もたせることが考えられる。この場合、それぞれの楽音
合成に対するプログラムがプログラムメモリ(制御用RO
M31)に用意される。楽音合成方式ごとに最適のサンプ
リング周波数があるとする。またモード切換スイッチに
より、どの楽音合成方式を使用するかが、ユーザーで選
択できるとする。そのために、メインフロー上でモード
切換スイッチの検査を行い、選択されている楽音合成番
号をメモリ(RAM34)にセットする。更に、楽音生成処
理ごとのサンプリング周波数データのテーブル(例えば
制御用ROM41に置かれる)をアクセスし、選択された楽
音合成番号に対応するデータを見つけ、インタラプト制
御部40にセットする。インタラプト制御部40からインタ
ラプト信号が発生したら、夫々の楽音合成処理ルーチン
のエントリポイントのテーブル(例えば、制御用ROM41
に置かれる)をアクセスし、選択された楽音合成番号に
対応するエントリポイントを見つけ、その位置から開始
する楽音生成プログラムを実行する。
Although the description of the embodiment has been completed, various modifications and changes can be made without departing from the scope of the present invention. For example,
In some applications it is conceivable to give electronic musical instruments several different musical tone synthesis capabilities. In this case, the program for each tone synthesis is stored in the program memory (control RO
M31). It is assumed that there is an optimum sampling frequency for each tone synthesis method. The user can select which tone synthesis method to use by using the mode selector switch. Therefore, the mode changeover switch is inspected on the main flow, and the selected musical tone synthesis number is set in the memory (RAM 34). Further, a table of sampling frequency data for each tone generation process (for example, placed in the control ROM 41) is accessed, data corresponding to the selected tone synthesis number is found, and set in the interrupt controller 40. When an interrupt signal is generated from the interrupt control unit 40, a table of entry points of each tone synthesis processing routine (for example, the control ROM 41
Is placed) to find the entry point corresponding to the selected musical tone synthesis number and execute the musical tone generation program starting from that position.

その他、種々の変更が可能である。Other various changes are possible.

[発明の効果] 以上のように、この発明ではプログラム制御によりマイ
クロコンピュータ自身が楽音を生成する場合において、
楽音合成処理をタイマーインタラプト制御回路手段から
のインタラプト信号の合図で開始させるとともに、イン
タラプト制御手段のインタラプト信号の発生周期をマイ
クロコンピュータからプログラムできるようにしている
ので、動作時に楽音のサンプリング周期を維持すること
ができる一方で、装置の機能、ポリフォニック数、楽音
合成の仕方、処理の複雑さの度合に合った楽音のサンプ
リング周期で楽音を生成することができる。更に、この
実現のために、格別の回路の変更は不要であり、自由度
の高い装置の設計、開発が可能となるという利点があ
る。
[Effects of the Invention] As described above, according to the present invention, when the microcomputer itself generates a musical sound by program control,
The tone synthesis processing is started by the signal of the interrupt signal from the timer interrupt control circuit means, and the generation period of the interrupt signal of the interrupt control means can be programmed from the microcomputer, so that the tone sampling cycle is maintained during operation. On the other hand, it is possible to generate musical tones at a musical tone sampling cycle that matches the function of the apparatus, the number of polyphonics, the method of musical tone synthesis, and the degree of processing complexity. Further, for this realization, there is an advantage that no special circuit change is required, and a highly flexible design and development of the device becomes possible.

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

第1図はこの発明の実施例に係る電子楽器の全体構成
図、第2図は実施例のマイクロコンピュータの構成を示
すブロック図、第3A図はマイクロコンピュータのメイン
プログラムのフローを示す図、第3B図は楽音の生成が行
われるインタラプト処理のフローチャート、第3C図は第
3B図の音源処理の詳細なフローチャート、第4図は時間
に沿ったプログラムの流れを示す図、第5図は時間に沿
った処理の概要を示すタイムチャート、第6図は第2図
のRAM34内に置かれる楽音生成用RAMのテーブルを示す
図、第7図は第3C図の1つのチャンネル処理の詳細なフ
ローチャート、第8図はエンベロープを示す図、第9図
は波形ROMの波形データを示す図、第10図は時間に沿う
補間演算波形を示す図、第11図はインタラプト制御部の
第1の構成例を示す図、第12図はインタラプト制御部の
第2の構成例を示す図、第13図はインタラプト制御部の
クロック入力のタイムチャートである。 1……マイクロコンピュータ、31……制御用ROM、34…
…RAM、35……加減算器及び論理演算部、36……乗算
器、37……制御データ兼波形ROM、38……オペーレーシ
ョン解析部、40……インタラプト制御部。
1 is an overall configuration diagram of an electronic musical instrument according to an embodiment of the present invention, FIG. 2 is a block diagram showing a configuration of a microcomputer of the embodiment, FIG. 3A is a diagram showing a flow of a main program of the microcomputer, FIG. Fig. 3B is a flowchart of the interrupt process that generates musical tones, and Fig. 3C is
3B is a detailed flowchart of the sound source processing, FIG. 4 is a diagram showing a program flow along time, FIG. 5 is a time chart showing an outline of processing along time, and FIG. 6 is the RAM 34 of FIG. FIG. 7 is a diagram showing a table of a tone generation RAM placed inside, FIG. 7 is a detailed flowchart of one channel processing of FIG. 3C, FIG. 8 is a diagram showing an envelope, and FIG. 9 is waveform data of a waveform ROM. FIG. 10, FIG. 10 is a diagram showing interpolation calculation waveforms along time, FIG. 11 is a diagram showing a first configuration example of the interrupt control unit, and FIG. 12 is a diagram showing a second configuration example of the interrupt control unit. FIG. 13 is a time chart of the clock input of the interrupt control unit. 1 ... Microcomputer, 31 ... Control ROM, 34 ...
RAM, 35 ... Adder / subtractor and logical operation unit, 36 ... Multiplier, 37 ... Control data / waveform ROM, 38 ... Operation analysis unit, 40 ... Interrupt control unit.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】楽器を制御する入力を処理するためのプロ
グラムと楽音を生成するためのプログラムを記憶するプ
ログラム記憶手段と、 前記プログラム記憶手段のアドレスを制御するアドレス
制御回路手段と、 楽音の生成に必要なデータを記憶するデータ記憶手段
と、 演算回路手段と、 前記プログラム記憶手段のプログラムの各命令を解読し
て前記各手段の動作を制御するオペレーション制御回路
手段と、 を備えるマイクロコンピュータから成り、更に、前記マ
イクロコンピュータは楽音のサンプリング周期でインタ
ラプト信号を発生するタイマーインタラプト制御回路手
段を有し、このタイマーインタラプト制御回路手段から
のインタラプト信号に応答して前記楽音を生成するため
のプログラムが前記マイクロコンピュータにおいて実行
されることにより楽音が生成され、更に前記タイマーイ
ンタラプト制御回路手段において前記インタラプト信号
が発生する間隔である前記楽音のサンプリング周期を可
変にプログラム可能にしたことを特徴とする処理装置。
1. A program storing means for storing a program for processing an input for controlling a musical instrument and a program for generating a musical tone, an address control circuit means for controlling an address of the program storing means, and a musical tone generation. Data storage means for storing necessary data, arithmetic circuit means, and operation control circuit means for decoding each instruction of the program of the program storage means to control the operation of each means. Further, the microcomputer has a timer interrupt control circuit means for generating an interrupt signal at a sampling period of a musical sound, and a program for generating the musical sound in response to an interrupt signal from the timer interrupt control circuit means is provided. Run on a microcomputer Processing apparatus characterized by tone is generated, and further the timer interrupt control circuit can variably programmable sampling period of the musical tone is an interval in which the interrupt signal is generated in the means by which.
【請求項2】請求項1記載の処理装置において、前記マ
イクロコンピュータは集積回路チップで構成され、この
チップ上にデジタルの楽音信号をアナログ信号に変換す
るデジタル・アナログ変換器と楽器を制御する入力を受
けるポートが更に設けられることを特徴とする処理装
置。
2. The processing device according to claim 1, wherein said microcomputer is composed of an integrated circuit chip, and a digital / analog converter for converting a digital musical tone signal into an analog signal and an input for controlling a musical instrument are provided on this chip. A processing device, further comprising a port for receiving.
JP63334164A 1988-12-29 1988-12-29 Processor Expired - Lifetime JPH07122796B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63334164A JPH07122796B2 (en) 1988-12-29 1988-12-29 Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63334164A JPH07122796B2 (en) 1988-12-29 1988-12-29 Processor

Publications (2)

Publication Number Publication Date
JPH02179697A JPH02179697A (en) 1990-07-12
JPH07122796B2 true JPH07122796B2 (en) 1995-12-25

Family

ID=18274256

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63334164A Expired - Lifetime JPH07122796B2 (en) 1988-12-29 1988-12-29 Processor

Country Status (1)

Country Link
JP (1) JPH07122796B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5283386A (en) * 1991-08-30 1994-02-01 Casio Computer Co., Ltd. Musical-tone signal generating apparatus and musical-tone controlling apparatus including delay means and automatic reset means
SG67993A1 (en) 1996-08-30 1999-10-19 Yamaha Corp Sound source system based on computer software and method of generating acoustic waveform data

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5681900A (en) * 1979-12-10 1981-07-04 Nippon Electric Co Voice synthesizer

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5681900A (en) * 1979-12-10 1981-07-04 Nippon Electric Co Voice synthesizer

Also Published As

Publication number Publication date
JPH02179697A (en) 1990-07-12

Similar Documents

Publication Publication Date Title
US5319151A (en) Data processing apparatus outputting waveform data in a certain interval
US5659466A (en) Monolithic PC audio circuit with enhanced digital wavetable audio synthesizer
US4201105A (en) Real time digital sound synthesizer
US5742695A (en) Wavetable audio synthesizer with waveform volume control for eliminating zipper noise
JPH1020860A (en) Musical tone generator
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
JPH07122796B2 (en) Processor
JP2576614B2 (en) Processing equipment
JP2576615B2 (en) Processing equipment
JP2576616B2 (en) Processing equipment
JP2576617B2 (en) Processing equipment
JP3658826B2 (en) Music generation method
JP2576618B2 (en) Processing equipment
JP2576613B2 (en) Processing equipment
JP2950461B2 (en) Tone generator
JP2797142B2 (en) Processing equipment for electronic musical instruments
JP3832383B2 (en) Musical sound generating apparatus and program
JP2727089B2 (en) Electronic musical instrument sound generator
JP2797138B2 (en) Processing equipment for electronic musical instruments
JP3610759B2 (en) Digital signal processor
JPH096364A (en) Musical tone generating method
JP3832382B2 (en) Musical sound generating apparatus and program
JPH06195085A (en) Waveform data output device
JPH09152869A (en) Method and device for generating musical sound
JPH056171A (en) Method of compressing musical note waveform

Legal Events

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

Free format text: PAYMENT UNTIL: 20071225

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20081225

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20081225

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20091225

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091225

Year of fee payment: 14