JPH02179697A - Processor for electronic musical instrument - Google Patents

Processor for electronic musical instrument

Info

Publication number
JPH02179697A
JPH02179697A JP63334164A JP33416488A JPH02179697A JP H02179697 A JPH02179697 A JP H02179697A JP 63334164 A JP63334164 A JP 63334164A JP 33416488 A JP33416488 A JP 33416488A JP H02179697 A JPH02179697 A JP H02179697A
Authority
JP
Japan
Prior art keywords
musical
processing
interrupt
microcomputer
program
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
JP63334164A
Other languages
Japanese (ja)
Other versions
JPH07122796B2 (en
Inventor
Kosuke Shiba
斯波 康祐
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

Abstract

PURPOSE:To generate musical sounds according with functions of an electronic musical instrument and the degree of complication of processing by generating musical sounds in response to the interrupt signal generated with the sampling period from a timer interrupt control circuit and varying the sampling period. CONSTITUTION:A microcomputer performs interrupt handling to generate musical sounds at each time of generation of the interrupt signal from an interrupt control part 40 having a timer, a thereby keeping the musical sound sampling period during the operation. The generation interval of the interrupt signal generated by the control part 40, namely, the sampling period of musical sounds is variably programmed by the microcomputer 1. Thus, musical sounds are generated with the musical sound sampling period according with functions of the electronic musical instrument, the number of polyphonics, the manner of musical sound synthesis, and the degree of complication of processing.

Description

【発明の詳細な説明】 [発明の技術分野] この発明は電子楽器用処理装置に関し、特に電子楽器用
処理装置における楽音合成の構造的なアーキテクチャ−
に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention relates to a processing device for an electronic musical instrument, and in particular to a structural architecture for musical tone synthesis in a processing device for an electronic musical instrument.
Regarding.

[発明の背景] 近年、電子楽器はコンピユータ化されている。[Background of the invention] In recent years, electronic musical instruments have been computerized.

しかし、大量で高速のデータ演算が必要な楽音の生成に
係る部分は音源回路と呼ばれる専用構造のハードウェア
で行われており、マイクロコンピュータは楽器への制御
入力(鍵盤やコンソールパネルからの入力、MIDIそ
の他の外部制御入力、内部または外部の演奏メモリから
の入力等)を処理し、音源回路に適したコマンドを音源
回路に転送するに留まっている。
However, the part involved in generating musical sounds, which requires large amounts of high-speed data calculation, is performed by specialized hardware called a sound source circuit, and a microcomputer is used to input control inputs to musical instruments (inputs from the keyboard and console panel, etc.). It merely processes MIDI and other external control inputs, inputs from internal or external performance memories, etc.) and transfers appropriate commands to the tone generator circuit.

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

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

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

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

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

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

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

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

[実施例J 以下、図面を参照してこの発明の詳細な説明する。[Example J Hereinafter, the present invention will be described in detail with reference to the drawings.

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

上記マイクロコンピュータlの内部構造を第2図にブロ
ック図で示す0図示の各要素はワンチップ上に実装され
ている。実際に製作したものは5 X 5 m mのチ
ップサイズで、8音ポリフオニツクの同時発音数をもち
、楽音合成方式はPCM(波形読み出し方式)であるが
、本発明は他のポリフォニック数、他の楽音合成方式に
も適用できる。
The internal structure of the microcomputer 1 is shown in a block diagram in FIG. 2. Each element shown in FIG. 0 is mounted on one chip. The actually manufactured chip has a chip size of 5 x 5 mm, has an eight-note polyphonic polyphony, and uses PCM (waveform readout method) as the tone synthesis method. It can also be applied to musical tone synthesis methods.

制御用ROM31には楽器の各種制御入力を処理するプ
ログラムと楽音を生成するプログラムが記憶されており
、ROMアドレス制御部39からROMアドレスデコー
ダ32を介して指定されたアドレスのプログラム語(命
令)を順次出力していく、なお、具体的実施例では、プ
ログラム語長は28ビツトであり、プログラム語の一部
が次に読み出されるべきアドレスの下位部(ページ内ア
ドレス)としてROMアドレス制御部39に入力される
ネタストアドレス方式となっているが、プログラムカウ
ンタ方式のものにも本発明を適用し得る。RAM7ドレ
ス制御部33は制御用ROM31からの命令のオペラン
ドがレジスタを指定している場合に、RAM34内の対
応するレジスタのアドレスを指定する。RAM34はレ
ジスタ群であり、汎用rJi4算、フラグ演算、楽音の
演算等に使用される。加減算器及び論理演算部35と乗
算器36は制御用ROM32からの命令が演算命令のと
きに用いられる。特に乗算器36は楽音波形の演算に使
用しており、そのための最適化として第1と第2のデー
タ入力(例えば16ビツトデータ)を乗算して入力と同
じ長さ(16ビツト)のデータを出力するようになって
いる。上記RAM34、加減算器351乗算器36によ
り、演算回路(AU)が構成される。制御データ兼波形
用ROM37にはピッチデータ、エンベロープデータ(
レート、レベル)などの各種楽音制御パラメータと、P
CM(パルス符号変調)の楽音波形データが記憶されて
いる。エンベロープデータと楽音波形データは楽音の音
色ごとに用意される。
The control ROM 31 stores a program for processing various control inputs of the musical instrument and a program for generating musical tones, and a program word (instruction) at a specified address is sent from the ROM address control unit 39 via the ROM address decoder 32. Note that in the specific embodiment, the program word length is 28 bits, and a part of the program word is sent to the ROM address control unit 39 as the lower part (in-page address) of the address to be read next. Although the system uses a netast address input method, the present invention can also be applied to a program counter system. The RAM 7 address control unit 33 specifies the address of a corresponding register in the RAM 34 when an operand of an instruction from the control ROM 31 specifies a register. The RAM 34 is a group of registers, and is used for general-purpose rJi4 calculations, flag calculations, musical tone calculations, and the like. The adder/subtractor and logic operation section 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 to calculate musical waveforms, and as an optimization for this purpose, it multiplies the first and second data inputs (for example, 16-bit data) to obtain data of the same length (16 bits) as the input. It is designed to be output. The RAM 34, adder/subtractor 351 and multiplier 36 constitute an arithmetic circuit (AU). The control data and waveform ROM 37 contains pitch data and envelope data (
various musical tone control parameters such as rate, level),
CM (pulse code modulation) musical waveform data is stored. Envelope data and musical waveform data are prepared for each musical tone.

オペレーション解析部(オペレーション制御回路)3B
は制御用ROM31からの命令のオペコードを解読し、
指示されるオペレージ□ンを実行するために、回路の各
部に制御信号を送る。
Operation analysis section (operation control circuit) 3B
decodes the operation code of the instruction from the control ROM 31,
Control signals are sent to each part of the circuit to execute the instructed operation.

所定時間ごとに制御用ROM31の楽音生成プログラム
を実行するため、本装置ではタイマーインタラプトを採
用している。すなわち、タイマーを有するインタラプト
制御部40により、一定時間ごとにROM7ドレス制御
部39に制御信号(インタラプト信号)を送り、この信
号により、ROMアドレス制御部39は次に行うメイン
プログラムの命令のアドレスを退避(保持)し、楽音の
生成が行われるインタラプト処理プログラム(サブルー
チン)の先頭アドレスを代りにセットする。これにより
、インタラプト処理プログラムが開始される。インタラ
プト処理プログラムの最後にはリターン命令があるので
、このリターン命令がオペレーション解析部38で解読
された時点で、ROMアドレス制御部39は退避してあ
ったアドレスを再度セットし、メインプログラムに復帰
する。
In order to execute the musical tone generation program in the control ROM 31 at predetermined intervals, 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 7 address control unit 39 at regular intervals, and based on this signal, the ROM address control unit 39 determines the address of the next main program command. It is saved (retained) and the start address of the interrupt processing program (subroutine) in which musical tones are generated is set instead. This starts the interrupt processing program. Since there is a return instruction at the end of the interrupt processing program, when this return instruction is decoded by the operation analysis section 38, the ROM address control section 39 sets the saved address again and returns to the main program. .

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

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

第3図(A)に本実施例のマイクロコンピュータlのメ
インプログラムのフローを示す、AIは電源投入時のイ
ニシャル処理であり、マイクロコンピュータlのRAM
 (レジスタ群)34のクリアや、リズムテンポ等の初
期値の設定等を行う。
FIG. 3(A) shows the flow of the main program of the microcomputer l of this embodiment. AI is the initial processing when the power is turned on, and the RAM of the microcomputer l
Clears (register group) 34, sets initial values such as rhythm tempo, etc.

更に、このイニシャル処理において、インタラプト制御
部40に対する楽音サンプリング周期データの設定が行
われる。A2でマイクロコンピュータlは出力ポート4
2からキー走査のための信号を出力し、スイッチ部4の
状態を入力ポート41から取り込むことにより、機能キ
ー、1191キーの状態をRAM34のキーバッファエ
リアに記憶する。A3ではA2で得た機能キー3の状態
から。
Furthermore, in this initial processing, musical tone sampling period data is set for the interrupt control section 40. Microcomputer l in A2 is output port 4
By outputting a signal for key scanning from 2 and taking in the state of the switch section 4 from the input port 41, the state of the function key 1191 key is stored in the key buffer area of the RAM 34. In A3, from the state of function key 3 obtained in A2.

状態の変化した機能キーを識別し、指示される機能の実
行を行う(例えば、楽音番号のセット、エンベロープ番
号のセット、リズム番号のモー2ト等)、A4ではA2
で得た鍵盤2の状態から、変化した鍵(押鍵、離鍵)を
識別する0次のA5でA4の処理結果から1発音処理A
9のためのキーアサイン処理を行う、A6では機能キー
3でデモ演奏キーが押鍵されたとき制御データ兼波形用
ROM37から、デモ演奏データ(シーケンサデータ)
を順次読み出し、処理することにより、発音処理A9の
ためのキーアサイン処理等を行う。
Identifies the function key whose state has changed and executes the instructed function (for example, setting musical note numbers, setting envelope numbers, mode 2 rhythm numbers, etc.).
From the state of keyboard 2 obtained in , identify the key that changed (key pressed, key released) 1 sound generation processing A from the processing result of A4 in 0th order A5
In A6, when the demo performance key is pressed with the function key 3, the demo performance data (sequencer data) is transferred from the control data/waveform ROM 37.
By sequentially reading and processing the key assignment processing for the sound production processing A9, etc.

A7ではリズムスタートキーが押鍵されたとき制御デー
タ兼波形用ROM37からリズムデータを順次読み出し
1発音処理A9のためのキーアサイン処理を行う、フロ
ー−周タイマー処理A8では、メインフローで必要なイ
ベントのタイミングを知るために、フロー−同時間(こ
れは、フローを一周する間に実行されたタイマーインタ
ラプトの回数を計数することで得られる。この計数処理
は後述のインタラプトタイマー処理B3で行われる。)
を基に演算を行い、エンベロープ用タイマー(エンベロ
ープの演算周期)やリズム用の基準値を得る0発音処理
A9ではA5、A6、A7でセットされたデータから、
実際に楽音を発音させるための各種演算を行い、結果を
RAM34内の音源処理レジスタ(第6図)にセットす
る。A10は次のメインフローのパスのための準備処理
であり、今回のバスで得た押鍵状態への変化を示すNE
W  ON状態をON中にしたり、離鍵状態への変化を
示すNEW  OFF状態をOFF中に変える等の処理
を行う。
A7 sequentially reads rhythm data from the control data/waveform ROM 37 when the rhythm start key is pressed and performs key assignment processing for the 1st sound generation processing A9.Flow-period timer processing A8 performs event necessary in the main flow. In order to know the timing of flow-same time (this can be obtained by counting the number of timer interrupts executed during one cycle of the flow. This counting process is performed in interrupt timer process B3, which will be described later). )
In the 0 sound processing A9, calculations are performed based on the data set in A5, A6, and A7 to obtain the reference value for the envelope timer (envelope calculation cycle) and rhythm.
Various calculations are performed to actually generate musical tones, and the results are set in the sound source processing register (FIG. 6) in the RAM 34. A10 is a preparation process for the next main flow pass, and NE indicating the change to the key press state obtained on this bus.
Processes such as changing the W ON state to ON or changing the NEW OFF state indicating a change to the key released state to OFF are performed.

楽音の生成が行われるインタラプト処理プログラムのフ
ローを第3B図に示す、B1で前回のインタラプトの音
源処理B2で生成しである楽音波形データ(8音分の累
算波形値)をD/A変換器43に送出する。これにより
、一定周期でD/A変換器43に楽音のサンプルが与え
られることになる9次の音源処理B2で各チャンネルの
楽音が生成され累算される。従来はこの処理を音源回路
ハードウェア上で行っていた。詳細は後述する。
The flow of the interrupt processing program in which musical tones are generated is shown in Figure 3B. In B1, musical waveform data (cumulative waveform values for 8 tones) generated in B2 of the previous interrupt sound source processing is D/A converted. The signal is sent to the device 43. As a result, the musical tones of each channel are generated and accumulated in the ninth-order sound source processing B2 in which musical tone samples are provided to the D/A converter 43 at regular intervals. Conventionally, this processing was performed on the sound source circuit hardware. Details will be described later.

次のインタラプトタイマ7処理B3ではインタラプトが
所定時間ごとにかかることを利用して、フロー−置針時
用のタイマーレジスタ(RAM34内)を通過の都度、
プラス1する。
In the next interrupt timer 7 process B3, taking advantage of the fact that the interrupt takes a predetermined time, each time the flow-hand setting timer register (in RAM 34) is passed,
Add 1.

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

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

第4図は1時間に沿って実施例の動作の流れを描いたも
のである。A、B、C,D、E、Fはメインプログラム
(第3A図)の断片であり、一定時間(楽音サンプリン
グタイム)ごとにインタラプト処理(第3B図)が実行
される。タイムチャートで示すと第5図のようになる0
図示のように、インタラプトに入る都度、D/A変換器
43に楽音波形信号が入力され、対応するアナログ信号
が外部に出力されていく。
FIG. 4 depicts the flow of the operation of the embodiment over one hour. A, B, C, D, E, and F are fragments of the main program (FIG. 3A), and interrupt processing (FIG. 3B) is executed at fixed time intervals (musical sound sampling times). When shown in a time chart, 0 is shown in Figure 5.
As shown in the figure, each time an interrupt occurs, a musical 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)と波形処理(
08〜021)から成る。
FIG. 7 shows in detail the processing of C2 to C9 in FIG. 3C for one channel. Channel processing can be broadly divided into envelope processing (D1 to D7) and waveform processing (
08-021).

第8図はエンベロープ処理で生成されるエンベロープな
示したものである。1つの楽音のエンベロープはいくつ
かのステップ(セグメント)から成っている0図では4
セグメントで示しである。
FIG. 8 shows an envelope generated by envelope processing. The envelope of one musical note consists of several steps (segments).
It is shown in segments.

図中のムXはエンベロープのサンプリング周期であり、
Δyはエンベロープ値の変化幅である。
MuX in the figure is the sampling period of the envelope,
Δy is the change width of the envelope value.

チャンネルのエンベロープ処理(DI−D7)では、サ
ンプリングタイムごとのエンベロープの計算とステップ
の目標レベルに達したかどうかのチエツクを行っている
。一致したときには現在エンベロープレジスタ(第6図
参照)に目標値が設定されるので、メインプログラムの
発音処理A9内でそれを検知して、次のステップのエン
ベロープのためのデータ(ΔX、Δy、目標エンベロー
プ値)を各レジスタにセットしている。
In the channel envelope processing (DI-D7), an envelope is calculated for each sampling time and a check is made to see if the target level of the step has been reached. When they match, the target value is set in the current envelope register (see Figure 6), so this is detected in the main program's sound generation process A9 and the data (ΔX, Δy, target value) for the next step's envelope is set. envelope value) is set in each register.

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

次に、波形処理D8〜021について述べる。Next, waveform processing D8-021 will be described.

波形処理では、現在アドレスの整数部を使って波形RO
Mから隣り合う2つアドレスの波形データを読み出し、
(整数部子小数部)で示される現在アドレスに対して想
定される波形値を補間で求めている。補間が必要な理由
は、インタラプトによる波形サンプリング周期が一定で
あり、アドレスの加算値(ピッチデータ)が楽器への応
用上、あるa域にわたるためである(音階音しか出力し
ない楽器で音階音ごとに波形データを用意すれば補間の
必要はないが許容できない記憶容量の増大となる)、補
間による音色の劣化、歪みは高音域の方が著しいため1
通常は1M音の記録サンプリング周期より高速の周期で
原音を再生する。この実施例では原音(A4)再生の周
期を2倍にしている(第9図)、シたがって、アドレス
加算値が0.5のとき、A4の音が得られるようになっ
ている。この場合、A#4ではアドレス加算値は0.5
29となり、A3のとき、lとなる。これらのアドレス
加算値はピッチデータとして制御データ韮波形ROM3
7に記憶されており、押鍵時には発音処理A9において
、鍵に対応するピッチデータと選択されている音色の波
形スタートアドレス、波形エンドアドレス及び波形ルー
プアドレスがRAM34の対応するレジスタ、すなわち
、アドレス加算値レジスタ、スタートアドレス兼現在ア
ドレスレジスタ、エンドアドレスレジスタ、ループアド
レスレジスタにセットされる。
In waveform processing, the integer part of the current address is used to convert the waveform RO
Read the waveform data of two adjacent addresses from M,
The expected waveform value for the current address indicated by (integer part to decimal part) is obtained by interpolation. The reason why interpolation is necessary is that the waveform sampling period due to interrupts is constant, and the added value of the address (pitch data) covers a certain range of a when applied to musical instruments. If the waveform data is prepared in
Normally, the original sound is reproduced at a faster cycle than the recording sampling cycle of 1M sound. In this embodiment, the period of reproduction of the original sound (A4) is doubled (FIG. 9). Therefore, when the address addition value is 0.5, the A4 sound can be obtained. In this case, the address addition value for A#4 is 0.5
29, and when A3, it becomes l. These address addition values are stored as pitch data in the control data dwarf waveform ROM3.
7, and when a key is pressed, in the sound generation process A9, the pitch data corresponding to the key, the waveform start address, waveform end address, and waveform loop address of the selected tone are stored in the corresponding register of the RAM 34, that is, address addition Set in the value register, start address/current address register, end address register, and loop address register.

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

補間の方式はいろいろあるが、ここでは直線補間を採用
している。第7図の波形生成処理D8〜021を詳細に
述べると、まず、DBで現在アドレスにアドレス加算値
を加算して新しい現在アドレスを得る。D9で現在アド
レスとエンドアドレスを比較し、現在アドレス〉エンド
アドレスなら4f、Dlo、Dllにより、現在アドレ
スくエンドアドレスのときは012により、物理上(番
地上)または論理上(動作上)の次のアドレスを計算し
、014でその整数部により波形ROMをアクセスして
次回波形データを得る。ループアドレスは動作上エンド
アドレスの次のアドレスである。すなわち、第9図の場
合1図示の波形は繰り返し読み出される。したがって、
現在アドレス=エンドアドレスのときは次のアドレスと
してループアドレスの波形データを読み出す(D l 
3) 。
There are various interpolation methods, but here we use linear interpolation. To describe the waveform generation processing D8 to D021 in FIG. 7 in detail, first, an address addition value is added to the current address in the DB to obtain a new current address. D9 compares the current address with the end address, and if the current address > the end address, use 4f, Dlo, and Dll, and if the current address is the end address, use 012 to specify the next physical (address) or logical (operational) address. The waveform ROM is accessed using the integer part at 014 to obtain the next waveform data. The loop address is operationally the next address after the end address. That is, in the case of FIG. 9, the waveform shown in FIG. 1 is repeatedly read out. therefore,
When the current address = end address, read the waveform data of the loop address as the next address (D l
3).

015.016により、現在アドレスの整数部で波形R
OMをアクセスして今回の波形データを読み出す0次に
、017で次回波形値から今回波形値を減算し、D18
でその差に現在アドレスの小数部を乗算し、その結果を
019で今回の波形値に加えることにより、波形の直線
補間値を求める。この直線補間したデータに現在エンベ
ロープ値を乗算してチャンネルの楽音データ値を得(D
20)、それを波形加算用レジスタの内容に加えて楽音
データを累算する(021)。
015.016, the waveform R at the integer part of the current address
Access the OM and read the current waveform data. Next, subtract the current waveform value from the next waveform value at 017, and D18
By multiplying the difference by the decimal part of the current address at 019 and adding the result to the current waveform value at 019, the linearly interpolated value of the waveform is obtained. This linearly interpolated data is multiplied by the current envelope value to obtain the musical tone data value of the channel (D
20), and adds it to the contents of the waveform addition register to accumulate musical tone data (021).

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

第11図に第1構成例のインタラプト制御部40を示す
、このインタラプト制御部は2通りの楽音サンプリング
周期でインタラプト信号I NTFを発生することがで
きる。詳細に述べると、インタラプト制御部には第13
図に示すようなりロック信号φが入力される。このクロ
ック信号φはクロック発振器の直接の出力あるいは、そ
の出力を分周回路に通した後の出力である0図示のよう
にクロック信号φはリプルカウンタを構成する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回“O”となり、第2のORゲート2−9の
出力は64回の基本クロックφに対し、1回“O”とな
る、この第1と第2のORゲー)2−8.2−9のいず
れを選択するかをプログラム制御で設定できるようにす
ればよい、そのために、ラッチ11−1がある。このラ
ッチ11−1は上述した実施例の場合、初期設定処理へ
−1のなかで“0”または“1″に設定される。
FIG. 11 shows a first configuration example of the interrupt control section 40. This interrupt control section can generate the interrupt signal INTF at two musical tone sampling periods. To be more specific, the interrupt control section has a 13th
A lock signal φ is input as shown in the figure. This clock signal φ is the direct output of the clock oscillator or the output after passing the output through a frequency dividing circuit. -7 is input to the lowest binary counter. The outputs of all the binary counters 11-2 to 11-7 are input to the first OR gate 2-8, and the outputs of all binary counters 11-2 to 11-7 are input to the second OR gate 2-9. counter 11
-2 to 11-6 outputs are input. Therefore, the first
The output of OR gate 2-8 is 128 times basic clock φ
The output of the second OR gate 2-9 becomes "O" once for 64 basic clocks φ. 8. Which of 2-9 should be selected can be set by program control. For this purpose, the latch 11-1 is provided. In the case of the above-described embodiment, this latch 11-1 is set to "0" or "1" in the -1 to the initial setting process.

すなわち、データバスの所定のビット線に128/fφ
(fφは基本クロックφの周波数)の楽音サンプリング
周期を指示するデータ“0”、またはその半分の長さの
楽音サンプリング周期を指示する“l”が乗った状態で
コマンド解析部38からの制御信号がラッチ11−1の
クロック入力に加って、データがラッチされる。ラッチ
11−1の出力は第1のORゲート2−8の出力が入力
されるORゲート11−10に入力され、またラッチ1
1−1の出力をインバータl 1−11で反転した信号
が、第2のORゲート2−9の出力が入力されるORゲ
ート11−12に入力される。
That is, 128/fφ is applied to a predetermined bit line of the data bus.
(fφ is the frequency of the basic clock φ) The control signal from the command analysis unit 38 is loaded with data “0” indicating a musical tone sampling period of half the length, or “l” indicating a musical tone sampling period of half the length. is added to the clock input of latch 11-1, and data is latched. The output of the latch 11-1 is input to an OR gate 11-10 to which the output of the first OR gate 2-8 is input.
A signal obtained by inverting the output of the second OR gate 1-1 by the inverter l1-11 is input to the OR gate 11-12 to which the output of the second OR gate 2-9 is input.

ORゲート11−10とORゲート11−12の出力は
NANDゲートに入力され、その出力がインタラプト信
号INTFとなる。したがって、ラッチ11−1にビッ
ト“O″を設定したときには、第1のORゲー)11−
8の出力が選択され、基本クロックφの128個ごとに
1回、インタラプト信号I NTFが“1″アクテイブ
になり、ラッチ11−1にビット“1”を設定したとき
には、第2のORゲー)11−9の出力が選択され、イ
ンタラプト信号I NTFは基本クロックφの64個ご
とに1回“1′″アクテイブとなる。
The outputs of the OR gates 11-10 and 11-12 are input to a NAND gate, and the output thereof becomes the interrupt signal INTF. Therefore, when bit "O" is set in the latch 11-1, the first OR game) 11-
When the output of 8 is selected and the interrupt signal INTF becomes "1" active once every 128 basic clocks φ and the bit "1" is set in the latch 11-1, the second OR game) The output of 11-9 is selected, and the interrupt signal INTF becomes "1'" active once every 64 basic clocks φ.

第12図に第2構成例のインタラプト制御部40を示す
、このインタラプト制御部は第11図の構成より細か〈
楽音サンプリング周期を調整することができる。詳細に
述べると、1ビットラッチ11−1の代りに、データバ
スの4ビツトに接続される4ビツトのラッチ12−1が
使用される。したがって、マイクロコンピュータ1はこ
のラッチ12−1にo−isの任意の値が設定可能であ
る。この4ビットラッチ12−1の出力はコンパレータ
12−8のB入力に入力される。コンパレータ12−8
の八人力には第11図のリプルカウンタと同様な6ビツ
トのリプルカウンタ12−2〜12−7の出力のうち、
上位4ビツトのバイナリカウンタ12−4〜12−7の
出力が入力される。コンパレータ12−8は、八人力と
B入力が等しいとき“工”となり、インタラプト信号I
 NTFを発生する。このインタラプト信号INTFは
リプルカウンタ12−2〜12−7の各リセット入力に
も入力されており、インタラプト信号INTFの発生時
にリプルカウンタ12−2〜12−7をオールゼロにリ
セットする。したがって、第12図の構成の場合、イン
タラプト信号INTFの発生周期(楽音のサンプリング
周期)を任意の8n/fφ(n=1〜)に設定すること
ができる0例えば、4ビットラッチ12−1が8のとき
(B入力=1000)は、リプルカウンタ12−2〜1
2−7の値が1000000 (2進)になるごとにイ
ンタラプト信号INTFが発生する。すなわち、64個
の基本クロックφごとに1度の割りとなる。4ビットラ
ッチ12−1が9のと息なら、72個のクロシフφごと
に1度の割合となる。
FIG. 12 shows an interrupt control section 40 of a second configuration example. This interrupt control section is more detailed than the configuration shown in FIG. 11.
The musical sound sampling period can be adjusted. Specifically, a 4-bit latch 12-1 connected to 4 bits of the data bus is used in place of the 1-bit latch 11-1. Therefore, the microcomputer 1 can set any value of o-is in this latch 12-1. The output of this 4-bit latch 12-1 is input to the B input of the comparator 12-8. Comparator 12-8
Among the outputs of 6-bit ripple counters 12-2 to 12-7 similar to the ripple counter in FIG.
The outputs of the upper 4 bits of binary counters 12-4 to 12-7 are input. The comparator 12-8 becomes "work" when the input power and the B input are equal, and the interrupt signal I
Generates NTF. This interrupt signal INTF is also input to each reset input 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 cycle (musical tone sampling cycle) of the interrupt signal INTF can be set to any arbitrary value of 8n/fφ (n=1~).For example, the 4-bit latch 12-1 8 (B input = 1000), ripple counters 12-2 to 1
An interrupt signal INTF is generated every time the value of 2-7 becomes 1000000 (binary). That is, it is divided once every 64 basic clocks φ. If the 4-bit latch 12-1 has 9 breaths, the rate is once every 72 crossshifts φ.

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

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

[発1jlの効果〕 以上のように、この発明ではプログラム制御によりマイ
クロコンピュータ自身が楽音を生成する場合において、
楽音合成処理をタイマーインタラプト制御回路手段から
のインタラプト信号の合図で開始させるとともに、イン
タラプト制御手段のインタラプト信号の発生周期をマイ
クロコンピュータからプログラムできるようにしている
ので、動作時に楽音のサンプリング周期を維持すること
ができる一方で、電子楽器の機能、ポリフォニック数、
楽音合成の仕方、処理の複雑さの度合に合った楽音のサ
ンプリング周期で楽音を生成することができる、更に、
この実現のために、格別の回路の変更は不要であり、自
由度の高い電子楽器の設計、開発が可能となるという利
点がある。
[Effect of generation 1jl] As described above, in this invention, when the microcomputer itself generates musical tones under program control,
The musical tone synthesis process is started in response to an interrupt signal signal from the timer interrupt control circuit means, and the generation cycle of the interrupt signal of the interrupt control means can be programmed from the microcomputer, so that the sampling cycle of musical tones can be maintained during operation. On the other hand, electronic musical instruments feature polyphonic numbers,
It is possible to generate musical tones at a sampling period suitable for the method of musical tone synthesis and the degree of complexity of processing, and further,
In order to realize this, there is no need to make any special changes to the circuit, and there is an advantage that electronic musical instruments can be designed and developed with a high degree of freedom.

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

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

Claims (2)

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

Cited By (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
USRE41757E1 (en) 1996-08-30 2010-09-28 Yamaha Corporation 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

Cited By (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
USRE41757E1 (en) 1996-08-30 2010-09-28 Yamaha Corporation Sound source system based on computer software and method of generating acoustic waveform data

Also Published As

Publication number Publication date
JPH07122796B2 (en) 1995-12-25

Similar Documents

Publication Publication Date Title
US5319151A (en) Data processing apparatus outputting waveform data in a certain interval
US5691493A (en) Multi-channel tone generation apparatus with multiple CPU's executing programs in parallel
JPH02179697A (en) Processor for electronic musical instrument
JP2619242B2 (en) Electronic musical instruments that generate musical tones with time-varying spectra
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
JP2576614B2 (en) Processing equipment
JP2576617B2 (en) Processing equipment
JP2576616B2 (en) Processing equipment
JP3658826B2 (en) Music generation method
JP2576615B2 (en) Processing equipment
JP2950461B2 (en) Tone generator
JP2797142B2 (en) Processing equipment for electronic musical instruments
JPH02179698A (en) Processor for electronic musical instrument
JP2576613B2 (en) Processing equipment
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
JP2968320B2 (en) Distortion device
Kahrs Digital audio system architecture
JP2510090Y2 (en) Music signal generator
JPH06195085A (en) Waveform data output device
JPH08328552A (en) Method for generating musical tone waveform
JPH056171A (en) Method of compressing musical note waveform
JPH07295572A (en) Sound source device of electronic musical instrument

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