JPH02179698A - Processor for electronic musical instrument - Google Patents

Processor for electronic musical instrument

Info

Publication number
JPH02179698A
JPH02179698A JP63334166A JP33416688A JPH02179698A JP H02179698 A JPH02179698 A JP H02179698A JP 63334166 A JP63334166 A JP 63334166A JP 33416688 A JP33416688 A JP 33416688A JP H02179698 A JPH02179698 A JP H02179698A
Authority
JP
Japan
Prior art keywords
program
data
musical
storage means
processing
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
JP63334166A
Other languages
Japanese (ja)
Other versions
JP2576618B2 (en
Inventor
Kazuo Ogura
和夫 小倉
Ryuji Usami
隆二 宇佐美
Kosuke Shiba
斯波 康祐
Koichiro Oki
広一郎 太期
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 JP63334166A priority Critical patent/JP2576618B2/en
Priority to KR8920242A priority patent/KR930005221B1/en
Priority to DE68917113T priority patent/DE68917113T2/en
Priority to EP89124128A priority patent/EP0376342B1/en
Publication of JPH02179698A publication Critical patent/JPH02179698A/en
Priority to US07/855,431 priority patent/US5319151A/en
Priority to US08/223,589 priority patent/US5726371A/en
Application granted granted Critical
Publication of JP2576618B2 publication Critical patent/JP2576618B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the processing time by providing a storage means for operation having a register group where various musical sound parameters are exclusively stored and a data storage means which is indirectly addressed through this register group. CONSTITUTION:A RAM 34 consists of the register group and is exclusively used for operation of musical sounds. Various musical sound control parameters and musical sound waveform data are stored in a ROM 37 for control data as well as waveform as the data storage device. Register contents on the RAM 34 designated by the operand of a program in a control ROM 31 are referred to indirectly access the ROM 37. Only registers exclusively used for operation of musical sounds are used in the execution of the musical sound generating program in this manner. Consequently, registers used by another interrupted program are not rewritten during the execution of the musical sound generating program. Thus, it is unnecessary to save and restore the process state, and the processing time is shortened.

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 more particularly to its structural architecture.

[従来技術とその問題点] 近年、電子楽器はコンピユータ化されている。[Prior art and its problems] In recent years, electronic musical instruments have been computerized.

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

楽器への制御入力処理をマイクロコンピュータで行い、
楽音の生成を音源回路ハードウェアで行うという構造(
アーキテクチャ−)には、全体の回路規模が大きくなる
という問題(代表的には音源回路ハードウェアはマイク
ロコンピュータの2倍程度のチップ面積を占める)、マ
イクロコンピュータで音源回路ハードウェアを制御でき
る範囲が、狭くならざるを得ないという問題、楽音信号
の生成の仕方、ポリフォニック数の変更等の仕様変更を
実現するために必要となる音源回路ハードウェアの大幅
な回路設計変更の問題等がある。
A microcomputer performs control input processing to the musical instrument.
A structure in which musical tones are generated using sound source circuit hardware (
architecture) has the problem of increasing the overall circuit scale (typically, the sound source circuit hardware occupies about twice the chip area of the microcomputer), and the range in which the sound source circuit hardware can be controlled by the microcomputer. There are problems such as the problem of having to become narrower, and the problem of major circuit design changes in the sound source circuit hardware that are required to realize specification changes such as changes in the method of generating musical tone signals and changes in the number of polyphonic sounds.

これらの点に鑑み、本件出願人はマイクロコンピュータ
だけで、楽器の制御入力の処理と楽音の生成が同時に行
えるアーキテクチャ−について研究を続け、ついにその
実現をみた。
In view of these points, the applicant has continued to research an architecture that can simultaneously process musical instrument control inputs and generate musical tones using only a microcomputer, and has finally achieved its realization.

このような斬新なアーキテクチャ−による電子楽器用制
御装置を実現する上において、大量で高速なデータ処理
が要求される楽音の生成が可能なマイクロコンピュータ
の構造が追求され、模索された。
In order to realize a control device for an electronic musical instrument based on such a novel architecture, a microcomputer structure capable of generating musical tones that requires high-volume and high-speed data processing has been sought and explored.

例えば、典型的なマイクロコンピュータにおいては、演
算データの一時的な記憶手段として7キユームレータと
呼ばれる内部レジスタあるいは汎用の内部レジスタを使
用する。あるときには、アキュームレータにはデータメ
モリからのデータが入り、あるときにはデータメモリ上
の2個のデータを演算回路で演算(例えば加算)した結
果が入る。アキュームレータに一時的に置かれるデータ
は再度、データメモリ上の指定された記憶場所に戻され
る。このような構成のマイクロコンピュータを使って、
楽音生成処理を行うとすると、データメモリと7キユー
ムレータ(または汎用レジスタ)間の頻繁なデータ転送
のために相当の時間を要し、大量のデータを扱う必要の
ある楽音生成処理を達成する上で支障をきたす。
For example, in a typical microcomputer, an internal register called a 7-cumulator or a general-purpose internal register is used as a temporary storage means for operation data. At some times, data from the data memory is input into the accumulator, and at other times, the result of arithmetic operation (for example, addition) of two pieces of data on the data memory is input into the accumulator. The data temporarily placed in the accumulator is returned to the designated storage location on the data memory. Using a microcomputer configured like this,
When performing musical tone generation processing, it takes a considerable amount of time due to frequent data transfers between the data memory and the 7 cumulators (or general-purpose registers), and it is difficult to achieve musical tone generation processing that requires handling a large amount of data. cause trouble.

[発明の目的] したがって、この発明の目的は、従来のような音源回路
ハードウェアを使用することなくマイクロコンピュータ
のプログラム制御だけで、実時間での楽音生成が可能な
電子楽器用処理装置を提供することである。
[Object of the Invention] Therefore, an object of the present invention is to provide a processing device for an electronic musical instrument that is capable of generating musical tones in real time only by program control of a microcomputer without using conventional sound source circuit hardware. It is to be.

[発明の構成1作用] この発明によれば、上記の目的を達成するため、楽器を
制御する入力を処理するためのプログラムと楽音を生成
するためのプログラムを記憶するプログラム記憶手段と
、このプログラム記憶手段のアドレスを制御するアドレ
ス制御回路手段と、プログラム記憶手段のプログラムに
より直接的にアドレス指定回部な多数のレジスタから成
る演算用記憶手段と、この演算用記憶手段のレジスタ間
の演算操作が可能な演算回路手段と、楽音の生成に必要
なデータを記憶し、前記プログラム記憶手段のプログラ
ムにより、前記演算用記憶手段のレジスタを介して間接
的にアドレス指定されるデータ記憶手段と、前記プログ
ラム記憶手段のプログラムの命令を解読して前記各手段
の動作を制御するオペレーション制御回路手段とを備え
、前記楽音を生成するためのプログラムの実行により楽
音のデジタルデータサンプルが生成され、更に、前記演
算用記憶手段は、前記楽音を生成するためのプログラム
の実行において、演算のために使用され、各種の楽音パ
ラメータを専用的に格納するレジスタ群を含むことを特
徴とするマイクロコンピュータから成る電子楽器用処理
装置が提供される。
[Structure 1 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 the program. Address control circuit means for controlling the addresses of the storage means; an arithmetic storage means comprising a number of registers that are directly addressed by a program in the program storage means; and arithmetic operations between the registers of the arithmetic storage means. a data storage means that stores data necessary for generating musical tones and is indirectly addressed by a program of the program storage means via a register of the calculation storage means; operation control circuit means for decoding the instructions of the program in the storage means and controlling the operations of the respective means, wherein a digital data sample of the musical tone is generated by executing the program for generating the musical tone; The storage means for electronic musical instruments is composed of a microcomputer, and is used for calculations in executing the program for generating musical tones, and includes a register group for exclusively storing various musical tone parameters. A processing device is provided.

この構成の場合、演算用記憶手段内のレジスタが、いわ
ゆるアキュームレータとしても機能し得るし、データを
記憶する手段としても機能し得る。したがって1通常の
7キユームレータは不要である。更に、演算用記憶手段
内の各レジスタはプログラム記憶手段のプログラムによ
り直接的にアドレス指定可能である(ただし、この意味
はインデクスによるアドレッシング等の間接的なアドレ
ッシングができないということではない)、シたがって
、演算回路手段を使って、レジスタ間の演算操作を直接
的に(アキュームレータを介することなく)行える。更
に、演算用記憶手段内の各レジスタは専用化することが
できる(汎用的に使用することも可能であり、一部のレ
ジスタを汎用的に使用することを否定する意味ではない
)、特に、演算用記憶手段には、楽音生成プログラムの
実行中において、演算のために使用され、各種の楽音パ
ラメータ(例えばエンベロープレート、位相値パラメー
タ、位相変化幅パラメータ等々)を専用的に格納するレ
ジスタ群が含まれる。したがって、楽音プログラムの実
行により、楽音のデジタルデータサンプルを得るまでの
処理過程において、これらの各種楽音パラメータ専用の
レジスタ間で演算操作を効率的(最大限)に行うことが
でき、それにより、データ記憶手段へのデータの参照の
頻度を減らすことが可能となる。それ故に。
In this configuration, the register in the calculation storage means can function both as a so-called accumulator and as a means for storing data. Therefore, 1 normal 7 cumulators are not required. Furthermore, each register in the operational storage means is directly addressable by the program in the program storage means (although this does not mean that indirect addressing, such as addressing by index, is not possible); Therefore, using the arithmetic circuit means, arithmetic operations between registers can be performed directly (without going through an accumulator). Furthermore, each register in the arithmetic storage means can be dedicated (it can also be used for general purpose, and this does not mean to deny the use of some registers for general purpose), in particular, The calculation storage means includes a group of registers that are used for calculations during execution of the musical tone generation program and exclusively store various musical tone parameters (for example, envelope plate, phase value parameter, phase change width parameter, etc.). included. Therefore, by executing a musical tone program, arithmetic operations can be performed efficiently (to the maximum extent possible) between registers dedicated to these various musical tone parameters in the process of obtaining digital data samples of musical tones. It becomes possible to reduce the frequency of referencing data to the storage means. Therefore.

大琶のデータ(楽音パラメータ)の処理が高速に行え、
実時間での楽音生成が容易となる0例えばあるレジスタ
は現在の位相(波形の位相)値の格納場所として専用的
に使用され、別のあるレジスタは位相値の変化幅のデー
タの格納場所として専用的に記憶される。楽音生成処理
において、現在位相値を更新すべき条件が整ったときに
、楽音生成プログラムは現在位相値に変化幅を加算すべ
き指示を出すことになる。その際、現在位相値と変化幅
のデータのデータ記憶手段からの読出しと演算結果のエ
ンベロープ値の記憶は格別に必要でなく、直接的な指定
で、現在位相値格納用のレジスタ(第ルジスタ)を第1
オペランド(被演算子)とし、変化幅格納用のレジスタ
(第2レジスタ)を第2オペランド(演算子)として両
者の加算をオペコードで指示すれば、自動的に、すなわ
ち、オペレーション制御回路手段の制御のもとに、第ル
ジスタと第2レジスタのデータが出力され、加算器が動
作する演算回路手段に入力され、その出力(新しい位相
値)が第ルジスタに戻される。また、もう少し複雑で位
相値の変化幅が位相範囲によって変化するような系では
、それぞれの範囲内における変化幅のデータを専用的に
格納するレジスタ群(A群と呼ぶことにする)と、それ
ぞれの範囲の境界の位相(境界値データ)を専用に記憶
するレジスタ群(B群)を用意し、位相値の加算を実行
する前に、B群のレジスタの境界値と現在位相値とを比
較することで、A群のなかから選択する変化幅のレジス
タが決まる。この2つの例の処理過程では、データ記憶
手段に対しデータ(楽音パラメータ)をアクセスする必
要は全くない、つまり、典型的なマイクロコンピュータ
のように、データ記憶手段からデータをリードしてアキ
ュームレータ(あるいは汎用レジスタ)に格納するよう
な処理は省略できるわけである。
Daiwa data (musical tone parameters) can be processed at high speed,
For example, one register is used exclusively to store the current phase (waveform phase) value, and another register is used to store data about the change width of the phase value. Stored exclusively. In the musical tone generation process, when the conditions for updating the current phase value are met, the musical tone generation program issues an instruction to add the change width to the current phase value. In this case, it is not particularly necessary to read out the data of the current phase value and change width from the data storage means and to store the envelope value of the calculation result. The first
By using an operation code as an operand and using a register (second register) for storing the variation width as the second operand (operator), the operation control circuit automatically controls the operation control circuit. , the data of the first register and the second register are outputted and input to the arithmetic circuit means in which an adder operates, and the output (new phase value) is returned to the second register. In addition, in a slightly more complex system in which the width of change in phase value changes depending on the phase range, a group of registers (referred to as group A) that specifically stores data on the width of change within each range is used. Prepare a register group (group B) that exclusively stores the phase of the boundary of the range (boundary value data), and compare the boundary value of the register of group B with the current phase value before executing the addition of phase values. By doing so, the register with the change width to be selected from the A group is determined. In the processing steps in these two examples, there is no need to access data (musical tone parameters) from the data storage means; in other words, like a typical microcomputer, data is read from the data storage means and stored in the accumulator (or This means that processing such as storing data in general-purpose registers can be omitted.

また、楽音生成のサンプリング周期を維持するための有
効な一手段として、タイマーインタラブドの制御機構を
活用し、インタラブドの要求の都度、楽音生成プログラ
ムを実行させる構成が考えられる(後述する実施例では
タイマーインタラブド処理プログラムのなかで楽音を生
成している)6通常のマイクロコンピュータではインタ
ラブドの要求に対し、その時点のプロセスの状態を退避
する必要がある(インタラブド終了後、そのプロセスを
回復し、続行するために)、この場合において、この発
明に従い、楽音生成プログラム(割り込んだ方のプログ
ラム)の実行では楽音パラメータの格納場所として専用
化されたレジスタしか使用されない、とすれば、割り込
まれた方のプログラムで使用するレジスタに対してその
書替が楽音生成プログラムの実行中には生じないことに
なる。プロセスの状態の退避はそのプロセスに係るレジ
スタの内容が変更されないのであれば、その必要がない
、したがって、プロセスの状態(汎用レジスタの状態)
を退避、及び回復させる処理が不要となり、そのための
処理時間が節約できる(インタラブド開始時にプログラ
ムカウンタあるいはそれに相当するもののみ、退避させ
ればよい)。
Furthermore, as an effective means for maintaining the sampling period of musical tone generation, it is conceivable to use a timer interconnected control mechanism and execute a musical tone generation program every time an interrelated request is made (in the example described later). Musical tones are generated in the timer interwoven processing program) 6 In a normal microcomputer, in response to an interrelated request, it is necessary to save the state of the process at that point in time (after the interrelated ends, the process is restored, In this case, in accordance with the present invention, if the execution of the musical tone generation program (the program that interrupted) uses only dedicated registers to store musical tone parameters, then This means that the registers used in the program will not be rewritten during the execution of the musical tone generation program. There is no need to save the state of a process if the contents of registers related to that process are not changed. Therefore, the state of the process (state of general-purpose registers)
There is no need to save and restore the program counter, and processing time can be saved.

この発明の一構成例においては、マイクロコンピュータ
は集積回路チップで実現される。後述する実施例では、
単一の集積回路チップ上に、楽器への制御入力を受ける
入出力ポート、タイマーインタラブドをかけるためのタ
イマーインタラブド制御回路、生成された楽音のデジタ
ルデータサンプルをアナログ信号に変換するためのD/
A変換器も実装されている。また、演算回路手段には波
形データの演算に使用する乗算回路も加えられている。
In one configuration example of the invention, the microcomputer is implemented with an integrated circuit chip. In the examples described below,
On a single integrated circuit chip, there is an input/output port for receiving control inputs to the instrument, a timer-interconnected control circuit for applying the timer-interconnected circuit, and a D for converting the digital data samples of the generated musical tones into analog signals. /
An A converter is also implemented. The arithmetic circuit means also includes a multiplication circuit used for arithmetic operations on waveform data.

【実施例] 以下1図面を参照してこの発明の詳細な説明する。【Example] The present invention will be described in detail below with reference to one drawing.

本実施例に係る電子楽器の全体構成を第1図に示す、装
置全体の制御はマイクロコンピュータ1により行われる
。特に、この発明に従い、楽器の制御入力の処理のみな
らず、楽音を生成する処理もマイクロコンピュータlで
実行され、楽音生成用の音源回路ハードウェアは必要と
しない、鍵盤2と機能キー3とから成るスイッチ部4は
楽器の制御入力源であり、スイッチ部4から入力された
情報はマイクロコンピュータlで処理される。マイクロ
コンピュータ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 1. 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 l, 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 a microcomputer l. 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
supplies the necessary power to the microcomputer 1, low-pass filter 5, and 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に入力される
ネクストアドレス方式となっているが、プログラムカウ
ンタ方式のものにも本発明を適用し得る。RAMアドレ
ス制御部33は制御用ROM31からの命令のオペラン
ドがレジスタを指定している場合に、RAM34内の対
応するレジスタのアドレスを指定する。オペランドは即
値の場合もある(レジスタに数値をセットするような場
合)、RAM34はレジスタ群であり、汎用演算、フラ
グ演算、楽音の演算等に使用される。第6図に例示する
ように、楽音の演算用として多くのレジスタが専用化さ
れている。加減算器及び論理演算部35と乗算器36は
演算回路(A U)を構成し、制御用ROM32からの
命令が演算命令のときに用いられる。特に乗算器36は
楽音波形の演算に使用しており、そのための最適化とし
て第1と第2のデータ入力(例えば16ビツトデータ)
を乗算して入力と同じ長さ(16ビツト)のデータを出
力するようになっている。データ記憶装置としての制御
データ兼波形用ROM37にはピッチデータ、エンベロ
ープデータ(レート、レベル)などの各種楽音制御パラ
メータと、PCM(パルス符号変調)の楽音波形データ
が記憶されている。エンベロープデータと楽音波形デー
タは楽音の音色ごとに用意される0図示のように、制御
データ兼波形用ROM37へのアクセスは、制御用RA
M31のプログラムのオペランドで指定されるRAM3
4上のレジスタの内容を参照することによって間接的に
行われる(もっとも本実施例の場合、ROM37は内部
メモリであり、RAM34の動作を制御するのと同じオ
ペレーション制御回路38により直接的にその動作が制
御されるため、ROM37に対するアクセスの時間長は
RAM34に対するアクセスの時間長と変わらない)、
オペレーション解析部(オペレーション制御回路)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, 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 next address input method is used, the present invention can also be applied to a program counter method. The RAM 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 operand may be an immediate value (such as when setting a numerical value in a register), and the RAM 34 is a group of registers used for general-purpose operations, flag operations, musical tone operations, and the like. As illustrated in FIG. 6, many registers are dedicated for calculating musical tones. The adder/subtractor, logic operation unit 35, and multiplier 36 constitute an arithmetic circuit (AU), which is used when the command from the control ROM 32 is an arithmetic command. In particular, the multiplier 36 is used to calculate musical waveforms, and as an optimization for that purpose, the first and second data inputs (for example, 16-bit data) are
It is designed to output data of the same length (16 bits) as the input. A control data/waveform ROM 37 serving as a data storage device stores various tone control parameters such as pitch data and envelope data (rate, level), and PCM (pulse code modulation) tone waveform data. Envelope data and musical waveform data are prepared for each musical tone.As shown in the figure, access to the control data/waveform ROM 37 is via the control RA.
RAM3 specified by the program operand of M31
(However, in this embodiment, the ROM 37 is an internal memory, and its operation is directly controlled by the same operation control circuit 38 that controls the operation of the RAM 34.) is controlled, so the time length for accessing the ROM 37 is the same as the time length for accessing the RAM 34).
Operation analysis section (operation control circuit) 38
decodes the operation code of the instruction from the control ROM 31,
Control signals are sent to various parts of the circuit to carry out the desired operation as instructed.

所定時間ごとに制御用ROM31の楽音生成プログラム
を実行するため、この実施例ではタイマーインタラブド
を採用している。すなわち、タイマーを有するインタラ
ブド制御部40により。
In order to execute the musical tone generation program in the control ROM 31 at predetermined intervals, this embodiment employs timer interaction. That is, by the interwoven control section 40 having a timer.

一定時間ごとにROMアドレス制御部39は制御信号(
割込要求信号)を送り、この信号により、1’lOMア
ドレス制御部39は次に行うメインプログラムの命令の
アドレスを退避(保持)し、楽音の生成が行われるイン
タラブド処理プログラム(サブルーチン)の先頭アドレ
スを代りにセットする。これにより、インタラブド処理
プログラムが開始される。インタラブド処理プログラム
の最後にはリターン命令があるので4このリターン命令
がオペレーション解析部38で解読された時点で、RO
Mアドレス制御部39は退避してあったアドレスを再度
セットし、メインプログラムに復帰する。
The ROM address control unit 39 outputs a control signal (
In response to this signal, the 1'lOM address control unit 39 saves (holds) the address of the next main program command, and returns the address to the beginning of the interwoven processing program (subroutine) in which musical tones are generated. Set the address instead. This starts the interwoven processing program. Since there is a return instruction at the end of the interwoven processing program, when this return instruction is decoded by the operation analysis section 38, the RO
The M address control unit 39 sets the saved address again and returns to the main program.

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

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

A2でマイクロコンピュータlは出力ボート42からキ
ー走査のための信号を出力し、スイッチ部4の状態を入
カポ−)41から取り込むことにより、機能キー、鍵盤
キーの状態をRAM34のキーバッファエリアに記憶す
る。A3ではA2で得た機能キー3の状態から、状態の
変化した機能キーを識別し、指示される機能の実行を行
う(例えば、楽音番号のセット、エンベロープ番号のセ
ット、リズム番号のセット等)、A4ではA2で得た1
1g12の状態から、変化したm!(押鍵、離鍵)を識
別する0次のA5でA4の処理結果から1発音処理A9
のためのキーアサイン処理を行う、A6では機能キー3
でデモ演奏キーが押鍵されたとき制御データ兼波形用R
OM37から、デモ演奏データ(シーケンサデータ)を
順次読み出し、処理することにより、発音処理A9のた
めのキーアサイン処理等を行う、A7ではリズムスター
トキーが押鍵されたとき制御データ兼波形用ROM37
からリズムデータを順次読み出し、発音処理A9のため
のキーアサイン処理を行う、フロー−周タイマー処理A
8では、メインフローで必要なイベントのタイミングを
知るために、フロー−同時間(これは、フローを一周す
る間に実行されたタイマーインタラブドの回数を計数す
ることで得られる。この計数処理は後述のインタラブド
タイマー処理B3で行われる。)を基に演算を行い、エ
ンベロープ用タイマー(エンベロープの演算周期)やリ
ズム用の基準値を得る0発音処理A9ではA5.A6、
A7でセットされたデータから、実際に楽音を発音させ
るための各種演算を行い、結果をRAM34内の音源処
理レジスタ(第6図)にセットする。A10は次のメイ
ンフローのパスのための準備処理であり、今回のパスで
得た押鍵状態への変化を示すNEW  ON状態をON
中にしたり、離鍵状懲への変化を示すNEW  OFF
状態をOFF中に変える等の処理を行う。
At A2, the microcomputer 1 outputs a signal for key scanning from the output port 42, receives the state of the switch section 4 from the input port 41, and stores the state of the function keys and keyboard keys in the key buffer area of the RAM 34. Remember. In A3, the function key whose state has changed is identified from the state of function key 3 obtained in A2, and the instructed function is executed (for example, setting a musical note number, setting an envelope number, setting a rhythm number, etc.) , in A4, 1 obtained in A2
m that changed from the state of 1g12! (Key press, key release) identified 1 sound generation process A9 from the processing result of A4 in 0th order A5
Function key 3 on A6
When the demo performance key is pressed, R for control data and waveform
Demo performance data (sequencer data) is sequentially read from the OM37 and processed to perform key assignment processing for the sound generation process A9.In A7, when the rhythm start key is pressed, the control data/waveform ROM37
Flow-period timer processing A that sequentially reads rhythm data from and performs key assignment processing for sound generation processing A9
8, in order to know the timing of events required in the main flow, flow-co-time (this can be obtained by counting the number of timer interludes executed while going around the flow. This counting process is In the 0 sound processing A9, A5. A6,
From the data set in A7, 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 turns ON the NEW ON state that indicates the change to the key press state obtained in this pass.
NEW OFF to indicate a change in the state of turning on or releasing the key.
Perform processing such as changing the state to OFF.

楽音の生成が行われるインタラブド処理プログラムのフ
ローを第3B図に示す、Blで前回のインタラブドの音
源処理B2で生成しである楽音波形データ(8音分の累
積波形値)をD/A変換器43に送出する。これにより
、一定偽期でD/A変換器43に楽音のサンプルが与え
られることになる1次の音源処理B2は実施例のポイン
トであり、−従来はこの処理を音源回路ハードウェア上
で行っていた。詳細は後述する0次のインタラブドタイ
マー処理B3ではインタラブドが所定時間ごとにかかる
ことを利用して、フロー−置針時用のタイマーレジスタ
(RAM34内)を通過ノ都度、プラス1する。
Figure 3B shows the flow of the interwoven processing program in which musical tones are generated. Send to 43. As a result, the primary sound source processing B2, in which musical tone samples are given to the D/A converter 43 at constant pseudoperiods, is the key point of the embodiment; conventionally, this processing was performed on the sound source circuit hardware. was. In the zero-order interwoven timer process B3, which will be described in detail later, the timer register (in RAM 34) for flow-hand positioning is incremented by 1 each time the timer register (in the RAM 34) is passed, taking advantage of the fact that the interrelated time takes a predetermined time.

なお、この実施例ではインタラブド処理プログラム内で
はメインプログラムで書込を行うレジスタについては、
内容の書替を行わないようにしているので、通常のイン
タラブド処理の開始時と終了時に行われるレジスタの退
避と回復の処理は不要である。すなわち、RAM34上
のレジスタは楽音処理に関係するレジスタとその他の処
理に関係するレジスタとが独立しているので、メインプ
ログラムからインタラブド処理への移行が可及的に遅れ
なしで行われる。
Note that in this embodiment, the registers to be written by the main program in the interwoven processing 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 interwoven processing. That is, since the registers on the RAM 34 are independent of registers related to musical tone processing and registers related to other processing, the transition from the main program to interwoven processing is performed with as little delay as possible.

音源処理B2の詳細を第3C図に示す、Ctで波形加算
用RAM領域(第6図参照)をクリアした後、8チャン
ネル分の処理02〜C9を順番に行っている。各チャン
ネル処理の最後で、チャンネルの楽音波形値が波形加算
用RAM領域のデータに加算される。
Details of the sound source processing B2 are shown in FIG. 3C. After clearing the waveform addition RAM area (see FIG. 6) at Ct, processes 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図は、時間に沿って実施例の動作の流れを描いたも
のである。A、B、C,D、E、Fはメインプログラム
(第3A図)の断片であり、一定時間ごとにインタラブ
ド処理(第3B図)が実行される。タイムチャートで示
すと第5図のようになる0図示のように、インタラブド
に入る都度、D/A変換器43に楽音波形信号が入力さ
れ、対応するアナログ信号が外部に出力されていく。
FIG. 4 depicts the flow of the operation of the embodiment along time. A, B, C, D, E, and F are fragments of the main program (FIG. 3A), and interwoven processing (FIG. 3B) is executed at regular intervals. As shown in the time chart of FIG. 5, each time an interleaved state is entered, a musical waveform signal is input to the D/A converter 43, and a corresponding analog signal is output to the outside.

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

第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はエンベロープ値の変化幅である。
ΔX in the figure is the sampling period of the envelope,
Δy is the change width of the envelope value.

チャンネルのエンベロープ処理(DI−07)では、サ
ンプリングタイムごとのエンベロープの計算とステップ
の目標レベルに達したかどうかのチエツクを行っている
。一致したときには現在エンベロープレジスタ(第6図
参照)に目標値が設定されるので、メインプログラムの
発音処理A9内でそれを検知して、次のステ7プのエン
ベロープのためのデータ(ΔX、Δy、目標エンベロー
プfla)を各レジスタにセットしている。
In the channel envelope processing (DI-07), 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 it is detected in the main program's sound generation process A9 and the data (ΔX, Δy) for the envelope in the next step 7 is set. , target envelope fla) are set in each register.

詳細に述べると、DIでエンベロープの演算周期ΔXと
比較するためのタイマーレジスタをインタラブドごとに
インクリメントし、D2でΔXと一致したときD3でエ
ンベロープ変位分のデータΔyの加減算フラグ(符号ビ
ット)をテストしてエンベロープが上昇中か下降中かを
判別し、D4、D5でそれぞれ現在エンベロープの減算
または加算を行う、D6で現在エンベロープが目標エン
ベロープ値に達したかどうかをチエツクし、達しておれ
ば、現在エンベロープに目標レベルをセットする。これ
によりメインプログラムの発音fiqA9で次のエンベ
ロープステップのデータがセットされることになる。ま
た発汗処理A9でゼロry>現在エンベロープを読んだ
ときには発音の終了として処理される。
In detail, in DI, a timer register for comparing with the envelope calculation cycle ΔX is incremented for each interconnect, 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 is set in the main program's sound generation fiqA9. Further, when the envelope is read as zero ry>current in sweat processing A9, it is processed as the end of pronunciation.

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

波形処理では、現在アドレスの整数部を使って波形RO
Mから隣り合う2つアドレスの波形データを読み出し、
(!!i数部十小数部)で示される現在アドレスに対し
て想定される波形値を補間で求めている。補間が必要な
理由は、インタラブドによる波形サンプリング周期が一
定であり、アドレスの加算値(ピッチデータ)が楽器へ
の応用上、ある2(城にわたるためである(音階音しか
出力しない楽器で音階音ごとに波形データを用意すれば
補間の必要はないが許容でさない記憶容量の増大となる
)、補間による音色の劣化、歪みは高音域の方が著しい
ため1通常は、H音の記録サンプリング周期より高速の
周期で原音を再生する。この実施例ではit = (A
 4 )再生の周期を2倍にしている(:59図)、し
たがって、アドレス加In偵が0.5のとき、A4の音
が得られるようになっている。この場合、A#4ではア
ドレス加算値は0.529となり、A3のとき、lとな
る。これらのアドレス加算値はピッチデータとして制御
データ兼波形ROM37に記憶されており、押鍵時には
発音処理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 (!!i fractional part, tens of decimal parts) is obtained by interpolation. The reason why interpolation is necessary is that the waveform sampling period by Interabdo is constant, and the added value of the address (pitch data) will be over a certain range in application to musical instruments. (If you prepare waveform data for each, there is no need for interpolation, but it would increase the storage capacity unacceptably.) Since the deterioration and distortion of the timbre due to interpolation are more pronounced in the high range, 1.Usually, recording sampling of the H note is used. The original sound is reproduced at a cycle faster than the cycle. In this embodiment, it = (A
4) The playback cycle is doubled (see Figure 59). Therefore, when the address input is 0.5, A4 sound can be obtained. In this case, the address addition value is 0.529 for A#4, and 1 for A3. These address addition values are stored as pitch data in the control data/waveform ROM 37, and when a key is pressed, the pitch data corresponding to the key, the waveform start address, waveform end address, and waveform of the selected tone are generated in the sound generation process A9. The loop address is set in the corresponding registers of the RAM 34, ie, address addition value register, start address/current address register, end address register, and loop address register.

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

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

D15、D16により、現在アドレスの整数部で波形R
OMをアクセスして今回の波形データを読み出す0次に
、D17で次回波形値から今回波形値を減算し、018
でその差に現在アドレスの小数部を乗算し、その結果を
I)19で今回の波形値に加えることにより、波形の直
線補間値を求める。この直線補間したデータに現在エン
ベローブイ4を乗算してチャンネルの楽音データ値を得
(D20)、それを波形加算用レジスタの内容に加えて
楽音データを累算する(021)。
By D15 and D16, waveform R is generated 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 in D17, and
The difference is multiplied by the decimal part of the current address in step I), and the result is added to the current waveform value in step I)19 to obtain the linearly interpolated value of the waveform. This linearly interpolated data is multiplied by the current envelope buoy 4 to obtain the tone data value of the channel (D20), which is added to the contents of the waveform addition register to accumulate the tone data (021).

第7図のチャンネル処理プログラムの場合、間接的にア
クセスされる制御データ兼波形ROM7へのデータ参照
は、全ステップのうち、014(または013)と01
6だけである。残るすべてのステップは直接的にアドレ
ス指定可能なRAM4上の専用化されたレジスタへの演
算操作である。したがってチャンネル処理(楽音生成処
理)は高速に実行される。高速性をもたらすものは、こ
のマイクロコンピュータの構造にある。その要素として
、RAM4への直接アドレス指定肩上な構成、RAM4
を構成する多数のレジスタ群、楽音生成処理において各
種楽音パラメータを専用的に格納するRAMA内の専用
レジスタ構成等が挙げられる。
In the case of the channel processing program shown in FIG. 7, the data references to the indirectly accessed control data/waveform ROM 7 are 014 (or 013) and 01 of all steps.
There are only 6. All remaining steps are operations on dedicated registers on directly addressable RAM 4. Therefore, channel processing (musical tone generation processing) is executed at high speed. What brings about high speed is the structure of this microcomputer. Its elements include direct addressing to RAM4;
Examples include a large number of register groups constituting the memory, and a dedicated register configuration within RAMA that exclusively stores various musical tone parameters in musical tone generation processing.

最後に具体的実施例(8音ポリフオニツクのPCM音源
方式)の回路規模と動作時間について述べると、制御用
ROMが112Kbit、RAM34が5.4 K b
 i t、制御データ兼波形用ROM37(汀色は10
0音色分)は508Kbitである。lマシンサイクル
は約276ナノ秒で、動作時のインタラブド処理プログ
ラムのサイクル数が最大で150程度である。インタラ
ブド処理の実行間隔(楽音の出力サンプリング周期)は
約47マイクロ秒である。
Finally, to describe the circuit scale and operating time of a specific example (8-note polyphonic PCM sound source system), the control ROM is 112 Kbits, and the RAM 34 is 5.4 Kbits.
i t, control data/waveform ROM 37 (gray color is 10
0 tone) is 508 Kbits. One machine cycle is about 276 nanoseconds, and the maximum number of cycles of the interwoven processing program during operation is about 150. The execution interval (musical tone output sampling period) of the interwoven processing is approximately 47 microseconds.

以■二のように、実施例ではマイクロコンピュータ自身
が楽音の生成を行っているので、従来のような行動回路
ハードウェアは不要であり、回路規模の縮少化、歩留り
の向上、コストの低減、設計の高い自由IJIFをもた
らすことができる。
As mentioned above, in the embodiment, the microcomputer itself generates the musical tones, so conventional behavioral circuit hardware is not required, reducing the circuit scale, improving yield, and reducing costs. , can provide high freedom of design IJIF.

[変形例] 以上で実施例の説明を終えるが、この発明の範囲を逸脱
することなく種々の変形、変更が可能である。
[Modifications] This concludes the description of the embodiments, but various modifications and changes can be made without departing from the scope of the present invention.

例えば上記実施例では所定時間ごとの楽音波形サンプル
の出力のため、タイマーインタラブドをかけ、インタラ
ブドプログラムを実行することにより、楽音を生成して
いるが、ダミー命令(N。
For example, in the above embodiment, musical tones are generated by applying a timer interlude and executing an interwoven program in order to output musical sound waveform samples at predetermined time intervals.

P命令)をプログラムに組み込むことにより。By incorporating the P command) into the program.

定時間ごとに上述したインタラブド処理に代る処理(以
下、一定時間処理と呼ぶ)が実行されるようにしてもよ
い、すなわち、プログラムの各命令の実行時間はマスタ
ークロックにより決められるので、一定時量分のメイン
プログラムの間に楽音を生成する一定時間処理プログラ
ムをサブルーチンとして挿入(分散配置)すればよいわ
けであり、詳細にはメインプログラム及びサブルーチン
の一定時間処理プログラム内のすべての分岐が同じ時間
で処理されるように、ダミー命令(No P命令)を分
散配置すればよい。
Processing instead of the above-mentioned interwoven processing (hereinafter referred to as fixed time processing) may be executed at fixed time intervals.In other words, since the execution time of each instruction of the program is determined by the master clock, All you need to do is to insert (distribute) a fixed-time processing program that generates musical tones as a subroutine between the main program and the subroutine. Dummy instructions (No P instructions) may be distributed so that they can be processed in time.

実施例と上述の変形例では、楽音の生成のサンプリング
周期を常に一定に保っている。可変のサンプリング周期
の楽音生成も可能である0例えば、PCM音源方式を例
にとると、波形の補間処理を行う代りに、波形ROMの
各アドレスの波形データをそのまま使用し、1アドレス
分進む時間(あるアドレスの波形データの読出しから次
のアドレスの波形データの読出しまでの時間)を楽音の
周波数(ピッチデータ)に比例させる0例えば、A4の
とき、lの時間なら、A3のときは2の時間とする。こ
の時間間隔の制御は1例えば、タイマーインタラブド制
御部の内部タイマーに楽音の周波数に対応するデータを
プリセットし、タイマーアウト毎にインタラブドを行え
ば、実現できる。ただし、ポリフォニックに応用する場
合、インタラブドの間隔は、各々のチャンネルを使用す
る楽音の周波数で変化するので、チャンネル別にタイマ
ーインタラブド制御部とタイマーインタラブド処理プロ
グラムを設ける。また、D/A変換器もチャンネル別に
設け、その変換周期は対応するチャンネルのタイマーイ
ンタラブド処理の周期と一致させる。
In the embodiment and the above-mentioned modification, the sampling period for musical tone generation is always kept constant. It is also possible to generate musical tones with a variable sampling period.0 For example, in the PCM sound source method, instead of performing waveform interpolation processing, the waveform data at each address in the waveform ROM is used as is, and the time that advances by one address is used. (the time from reading the waveform data of a certain address to reading the waveform data of the next address) is proportional to the frequency (pitch data) of the musical tone. Time. This time interval control can be realized, for example, by presetting data corresponding to the frequency of musical tones in an internal timer of a timer interlaced control section, and performing interlacing every time the timer runs out. However, in the case of polyphonic application, the interval between interludes changes depending on the frequency of the musical tone using each channel, so a timer interlace control section and a timer interleave processing program are provided for each channel. Further, a D/A converter is also provided for each channel, and the conversion period thereof is made to match the period of timer interwoven processing of the corresponding channel.

以りの例は、いずれもマイクロコンピュータにおける楽
音生成の動作とD/A変換器の動作とが基本的に同期す
る関係にある。この代りに非同期の方式も考えられる0
例えば、マイクロコンピュータの楽音生成出力とD/A
変換器との間にバッファa構を設ける。マイクロコンピ
ュータにD/A変換器の変換周期より高速で楽音のサン
プル列を生成する虎力をもたせる。これは、例えば、楽
音を生成するサブルーチンを多数メインプログラムに分
散配置することで実現できる。マイクロコンピュータか
らの楽音のサンプル列はバッファに占き込まれ、D/A
変換器の動作と同期して読み出され、D/A変換器に入
力される。楽音生成のサブルーチンから次のサブルーチ
ンまでの時間はプログラムの実行状態によっ°C若干変
動するが、D/A変換器の変換周期より短いとすると、
バッファへの楽音サンプル列の書込により、バッフγの
残りの容量が少なくなっていく、そこで、バッファの残
存容量に従ってマイクロコンピュータの楽音のサンプル
列の平均的な演算周期を変化させる。すなわち、楽音生
成のサブルーチン内に分岐命令をもたせ、バッファの残
存容量によって、楽音生成がサブルーチンにおいて選択
的に行われるようにする0例えば、残存容量が半分以下
になったら、2つのサブルーチンごとに1回、楽音の生
成が行われるようにする。ある構成例ではバフ2ア機構
とD/A変換器を発音チャンネル別に用意し、D/A変
換器の変換速度を可変構成にする。これは、マイクロコ
ンピュータの生成する楽音サンプル列のサンプル間の位
相の差と楽音の周波数との比が音質を高品位に保つため
、限られた音域(例えばlオクターブの音域)ごとに切
りかわるような場合に使用できる0重要なことは、サン
プル列の位相の差にかかわらずD/A変換器の出力が、
意図されている楽音周波数をもつことである。マイクロ
コンピュータは2選択されている音域内ではサンプル間
の位相の差と楽音の周波数との比を保つものとする(例
えば、1オターブの範囲内では楽音の周波数に比例する
位相の差を楽音サンプル列にもたせる)、この場合、マ
イクロコンピュータは、上記の比に相当するデータをD
/A変換器の変換周期(したがってバッファの読み出し
周期でもある)を制御する周波数制御回路(プログラマ
ブルタイマー等で構成できる)に与える。この回路は受
は取った比のデータに従ってバッファ読出しとD/A変
換のための制御タイミング信号を発生する。この結果、
D/A変換器の出力は楽音の周波数をもつアナログ信号
となる。
In all of the above examples, the musical tone generation operation in the microcomputer and the operation of the D/A converter are basically in synchronization. Instead of this, an asynchronous method can also be considered.
For example, the musical tone generation output of a microcomputer and the D/A
A buffer structure is provided between the converter and the converter. To provide a microcomputer with the ability to generate a sample sequence of musical tones at a higher speed than the conversion period of a D/A converter. This can be achieved, for example, by distributing a large number of subroutines for generating musical tones in the main program. The sample string of musical tones from the microcomputer is stored in a buffer and sent to the D/A.
It is read out in synchronization with the operation of the converter and input to the D/A converter. The time from one musical tone generation subroutine to the next subroutine varies slightly depending on the execution status of the program, but assuming it is shorter than the conversion cycle of the D/A converter,
By writing the string of musical tone samples into the buffer, the remaining capacity of the buffer γ decreases, so the average calculation cycle of the string of musical tone samples of the microcomputer is changed in accordance with the remaining capacity of the buffer. In other words, a branch instruction is provided in the musical tone generation subroutine so that musical tone generation is performed selectively in the subroutine depending on the remaining capacity of the buffer. The musical tone is generated twice. In one configuration example, a buff 2-a mechanism and a D/A converter are prepared for each sound generation channel, and the conversion speed of the D/A converter is configured to be variable. This is because the ratio between the phase difference between the samples of the musical sound sample sequence generated by the microcomputer and the frequency of the musical sound is changed every limited range (for example, one octave range) in order to maintain high quality sound. The important thing is that the output of the D/A converter is
It is to have the intended musical tone frequency. The microcomputer shall maintain the ratio between the phase difference between samples and the frequency of the musical tone within the selected range (for example, within the range of 1 otave, the phase difference proportional to the frequency of the musical tone will be maintained between the musical tone samples). In this case, the microcomputer stores data corresponding to the above ratio in D
It is applied to a frequency control circuit (which can be configured with a programmable timer or the like) that controls the conversion cycle of the /A converter (and therefore also the read cycle of the buffer). This circuit generates control timing signals for buffer reading and D/A conversion according to the received ratio data. As a result,
The output of the D/A converter becomes an analog signal having the frequency of the musical tone.

例えば、マイクロコンピュータの生成する楽音サンプル
間の位相の差が、楽音の一周期のl/Nであるとし、楽
音の周期がPであるとすると、D/A変換器はP/Hの
時間で1つのデジタル楽音サンプルをアナログ信号に変
換する。したがってN個のデジタル楽音サンプルを変換
するのに要する時間は楽音の周期Pに等しくなり、楽音
の周波数(1/P)のアナログ信号が得られる。
For example, if the phase difference between musical tone samples generated by a microcomputer is l/N of one period of the musical tone, and the period of the musical tone is P, then the D/A converter is Convert one digital musical sound sample to an analog signal. Therefore, the time required to convert N digital tone samples is equal to the period P of the tone, and an analog signal having the frequency (1/P) of the tone is obtained.

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

[発明の効果] 以上のように、この発明では、マイクロコンピュータの
構造を工夫することにより、大量で高速のデータ処理を
必要とする楽音生成をマイクロコンピュータサイドで比
較的容易に行えるようにしている。その結果、従来のよ
うな音源回路/S−ドウエアは不要となる。したがって
、装置全体の回路規模を小さくでき、歩留りを上げ、コ
ストを下げることができる。更には、設計の自由度が増
し、楽音合成方式の変更、ポリフォニック数の変更など
について容易に対応することができる0例えば、従来技
術では4音ポリフオニツク、PCM音源方式を7X7m
mのチップで実現していたのを、この発明の実施例では
8音ポリフオニツク、PCM音源方式(D/A変換器込
み)を5×5mmのチップで実現することができた。一
般に、回路規模は半分以下にすることができると考えら
れる。
[Effects of the Invention] As described above, in this invention, by devising the structure of the microcomputer, it is possible to relatively easily generate musical tones that require large amounts of high-speed data processing on the microcomputer side. . As a result, the conventional sound source circuit/S-ware is no longer necessary. Therefore, the circuit scale of the entire device can be reduced, yield can be increased, and costs can be reduced. Furthermore, the degree of freedom in design is increased, and changes in musical tone synthesis methods and polyphonic numbers can be easily accommodated.For example, in the conventional technology, a four-note polyphonic sound source system and a PCM sound source system can be changed to 7x7m.
In the embodiment of the present invention, an 8-tone polyphonic, PCM sound source system (including a D/A converter) can be realized with a 5 x 5 mm chip, which was previously achieved with a 5 mm chip. Generally, it is considered that the circuit scale can be reduced by half or less.

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

第1図はこの発明の実施例に係る電子楽器の全体構成図
、第2図は実施例のマイクロコンピュータの構成を示す
ブロック図、第3A図はマイクロコンピュータのメイン
プログラムのフローを示す図、第3B図は楽音の生成が
行われるインタラブド処理のフローチャート、第3C図
は第3B図の音源処理の詳細なフローチャート、第4図
は時間に沿ったプログラムの流れを示す図、第5図は時
間に沿った処理のa要を示すタイムチャート、第6図は
第2図のRAM54内に置かれる楽音生成用RAMのテ
ーブルを示す図、第7図は第3C図の1つのチャンネル
処理の詳細なフローチャート、第8図はエンベロープを
示す図、第9図は波形ROMの波形データを示す図、第
10図は時間に沿う補間演算波形を示す図である。 1・・・・・・マイクロコンピュータ、鶏1・・・・・
・制御用ROM、34・・・・・・RAM、35・・・
・・・加減算器及び論理演算部、36・・・・・・乗算
塁、37・・・・・・制御データ兼波形ROM、3B・
・・・・・オペレーション解析部。 特許出願人  カシオ計算機株式会社 雫1ゴ”3”S7D’7う、!、11)’7D −第3
八 因 メイ270 % 頂t!L t1 手 続 補 正 占 (方式) 補正の対象 平成1年5月24日 図面
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 interwoven 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 54 of FIG. 2, and 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, and FIG. 10 is a diagram showing an interpolation calculation waveform along time. 1...Microcomputer, chicken 1...
・Control ROM, 34...RAM, 35...
. . . Adder/subtractor and logic operation unit, 36 . . . Multiplication base, 37 . . . Control data and waveform ROM, 3B.
...Operation analysis department. Patent applicant: Casio Computer Co., Ltd. Shizuku1Go"3"S7D'7 Uh! , 11) '7D - 3rd
8 Inmei 270% top! L t1 Procedural amendment interpretation (method) Drawing dated May 24, 1999 subject to amendment

Claims (2)

【特許請求の範囲】[Claims] (1)楽器を制御する入力を処理するためのプログラム
と楽音を生成するためのプログラムを記憶するプログラ
ム記憶手段と、 前記プログラム記憶手段のアドレスを制御するアドレス
制御回路手段と、 前記プログラム記憶手段のプログラムにより直接的にア
ドレス指定可能な多数のレジスタから成る演算用記憶手
段と、 前記演算用記憶手段のレジスタ間の演算が可能な演算回
路手段と、 楽音の生成に必要なデータを記憶し、前記プログラム記
憶手段のプログラムにより、前記演算用記憶手段のレジ
スタを介して間接的にアドレス指定されるデータ記憶手
段と、 前記プログラム記憶手段のプログラムの命令を解読して
前記各手段の動作を制御するオペレーション制御回路手
段と、 を備え、 前記楽音を生成するためのプログラムの実行により楽音
のデジタルデータサンプルが生成され、更に、前記演算
用記憶手段は、前記楽音を生成するためのプログラムの
実行において、演算のために使用され、各種の楽音パラ
メータを専用的に格納するレジスタ群を含むことを特徴
とするマイクロコンピュータから成る電子楽器用処理装
置。
(1) Program storage means for storing a program for processing inputs for controlling a musical instrument and a program for generating musical tones; address control circuit means for controlling an address of the program storage means; arithmetic storage means consisting of a large number of registers that can be directly addressed by a program; arithmetic circuit means capable of performing calculations between the registers of the arithmetic storage means; data storage means that is indirectly addressed by the program of the program storage means via the register of the calculation storage means; and an operation that decodes the instructions of the program of the program storage means and controls the operation of each of the means. control circuit means, wherein a digital data sample of a musical tone is generated by executing the program for generating the musical tone; 1. A processing device for an electronic musical instrument comprising a microcomputer, the processing device being used for an electronic musical instrument and comprising a register group for exclusively storing various musical tone parameters.
(2)請求項1記載の電子楽器用処理装置において、前
記マイクロコンピュータが集積回路チップ上に実装され
てなることを特徴とする電子楽器用処理装置。
(2) A processing device for an electronic musical instrument according to claim 1, wherein the microcomputer is mounted on an integrated circuit chip.
JP63334166A 1988-12-29 1988-12-29 Processing equipment Expired - Lifetime JP2576618B2 (en)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP63334166A JP2576618B2 (en) 1988-12-29 1988-12-29 Processing equipment
KR8920242A KR930005221B1 (en) 1988-12-29 1989-12-29 Tone signal generating apparatus for electronic musical instrument
DE68917113T DE68917113T2 (en) 1988-12-29 1989-12-29 Data processing device for an electronic musical instrument.
EP89124128A EP0376342B1 (en) 1988-12-29 1989-12-29 Data processing apparatus for electronic musical instruments
US07/855,431 US5319151A (en) 1988-12-29 1992-03-23 Data processing apparatus outputting waveform data in a certain interval
US08/223,589 US5726371A (en) 1988-12-29 1994-04-06 Data processing apparatus outputting waveform data for sound signals with precise timings

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63334166A JP2576618B2 (en) 1988-12-29 1988-12-29 Processing equipment

Publications (2)

Publication Number Publication Date
JPH02179698A true JPH02179698A (en) 1990-07-12
JP2576618B2 JP2576618B2 (en) 1997-01-29

Family

ID=18274277

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63334166A Expired - Lifetime JP2576618B2 (en) 1988-12-29 1988-12-29 Processing equipment

Country Status (1)

Country Link
JP (1) JP2576618B2 (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
JPH06308966A (en) * 1993-02-10 1994-11-04 Korugu:Kk Music synthesizer with open architecture constitution performing dynamic voice allocation

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54136818A (en) * 1978-04-14 1979-10-24 Kawai Musical Instr Mfg Co Musical tone data processor
JPS6033600A (en) * 1983-08-04 1985-02-20 松下電器産業株式会社 Light source unit
JPS6145296A (en) * 1984-08-09 1986-03-05 カシオ計算機株式会社 Electronic musical instrument
JPS629395A (en) * 1985-07-08 1987-01-17 ブラザー工業株式会社 Music synthesizer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS54136818A (en) * 1978-04-14 1979-10-24 Kawai Musical Instr Mfg Co Musical tone data processor
JPS6033600A (en) * 1983-08-04 1985-02-20 松下電器産業株式会社 Light source unit
JPS6145296A (en) * 1984-08-09 1986-03-05 カシオ計算機株式会社 Electronic musical instrument
JPS629395A (en) * 1985-07-08 1987-01-17 ブラザー工業株式会社 Music 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
JPH06308966A (en) * 1993-02-10 1994-11-04 Korugu:Kk Music synthesizer with open architecture constitution performing dynamic voice allocation

Also Published As

Publication number Publication date
JP2576618B2 (en) 1997-01-29

Similar Documents

Publication Publication Date Title
US5319151A (en) Data processing apparatus outputting waveform data in a certain interval
US4438502A (en) Output processing system for a digital electronic musical instrument
US5637821A (en) Storing and interpolating means for a musical sound generating device
US5298672A (en) Electronic musical instrument with memory read sequence control
EP0376342B1 (en) Data processing apparatus for electronic musical instruments
JPH02179698A (en) Processor for electronic musical instrument
JP2576614B2 (en) Processing equipment
JPS59168493A (en) Musical tone waveform generator
JP2576617B2 (en) Processing equipment
JP2576615B2 (en) Processing equipment
JP2576613B2 (en) Processing equipment
JP2576616B2 (en) Processing equipment
JP3230449B2 (en) Signal processing device
JPH07122796B2 (en) Processor
JP2727089B2 (en) Electronic musical instrument sound generator
JP3543203B2 (en) Electronic musical instrument
JP3225796B2 (en) Signal processing device and tone processing device
JP3651675B2 (en) Electronic musical instruments
GB2040537A (en) Digital electronic musical instrument
JP3659002B2 (en) Musical sound data processing apparatus and computer system
JP3855710B2 (en) Digital signal processor for sound waveform data
JPS6352399B2 (en)
JP2956508B2 (en) Musical sound wave generator
JPH09146555A (en) Waveform memory sound source device
JPS6343760B2 (en)

Legal Events

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

Free format text: PAYMENT UNTIL: 20071107

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20081107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20081107

Year of fee payment: 12

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

Free format text: PAYMENT UNTIL: 20091107

Year of fee payment: 13

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

Free format text: PAYMENT UNTIL: 20091107

Year of fee payment: 13