JP6531432B2 - Program, sound source device and acoustic signal generation device - Google Patents

Program, sound source device and acoustic signal generation device Download PDF

Info

Publication number
JP6531432B2
JP6531432B2 JP2015045479A JP2015045479A JP6531432B2 JP 6531432 B2 JP6531432 B2 JP 6531432B2 JP 2015045479 A JP2015045479 A JP 2015045479A JP 2015045479 A JP2015045479 A JP 2015045479A JP 6531432 B2 JP6531432 B2 JP 6531432B2
Authority
JP
Japan
Prior art keywords
sound
instruction
sound generation
sound source
generation instruction
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.)
Active
Application number
JP2015045479A
Other languages
Japanese (ja)
Other versions
JP2016166911A (en
Inventor
岡崎 雅嗣
雅嗣 岡崎
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yamaha Corp
Original Assignee
Yamaha Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yamaha Corp filed Critical Yamaha Corp
Priority to JP2015045479A priority Critical patent/JP6531432B2/en
Publication of JP2016166911A publication Critical patent/JP2016166911A/en
Application granted granted Critical
Publication of JP6531432B2 publication Critical patent/JP6531432B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)

Description

この発明は、コンピュータを発音制御装置として機能させるためのプログラム、発音制御装置からの指示に基づき音響信号を出力する音源装置、および、発音制御部と音源部とを備えた音響信号生成装置に関する。   The present invention relates to a program for causing a computer to function as a sound generation control device, a sound source device that outputs an acoustic signal based on an instruction from the sound generation control device, and an acoustic signal generation device including a sound generation control unit and a sound source unit.

従来から、楽音の発音音高や発音強度等を示すイベントをその実行タイミングと対応付けて記録したシーケンスデータに基づき、各楽音の発音指示をその予め記録されたイベントの実行タイミングで音源回路等に供給する技術が知られている。そして、その供給を受けた音源回路が発音指示に基づく音響信号を出力することにより、シーケンスデータに基づく自動演奏を行うことができる。
このような技術については、例えば特許文献1に記載されている。
Conventionally, based on sequence data in which events indicating the tone pitch and tone intensity of a tone are recorded in association with the execution timing, the tone generation instruction of each tone is stored in the tone generator circuit at the execution timing of the event previously recorded. Technologies to supply are known. Then, when the sound source circuit that has received the output outputs an acoustic signal based on the sound generation instruction, automatic performance based on the sequence data can be performed.
Such a technique is described, for example, in Patent Document 1.

特開平8−30269号公報Japanese Patent Application Laid-Open No. 8-30269

しかしながら、特許文献1に記載のような従来の技術において、発音指示を音源回路等に供給するタイミングの制御の手法は、一定周期でCPUが割り込み処理を実行し、その割り込み処理のタイミングにおいて、実行タイミングを過ぎているイベントがあれば、そのイベントに従った発音指示を音源回路等に供給する、というものである。   However, in the prior art as described in Patent Document 1, the method of controlling the timing of supplying the sound generation instruction to the tone generator circuit or the like is such that the CPU executes interrupt processing at a constant cycle and executes it at the timing of the interrupt processing. If there is an event that has passed the timing, a tone generation instruction according to the event is supplied to the sound source circuit or the like.

図10に、この処理に従った発音タイミングの概要を示す。
図10では、シーケンスデータに、再生開始から9.995秒後にノートオン(発音開始)イベントを実行すべきことが記録されているとする。また、CPUが実行する割り込み処理のタイミングは10ms(ミリ秒)毎であるとする。
FIG. 10 shows an outline of the tone generation timing according to this process.
In FIG. 10, it is assumed that the note-on (sound generation start) event is to be executed in the sequence data 9.95 seconds after the start of reproduction. Further, it is assumed that the timing of the interrupt processing executed by the CPU is every 10 ms (milliseconds).

図10の例において、CPUは、シーケンスデータの再生開始から10ms毎に割り込み処理を行い、実行タイミングを過ぎたイベントがないか判断する。経過時間9.99秒の処理までは、該当のイベントはないと判断する。その後、経過時間10.00秒の処理において、ノートオンイベントの実行タイミングが過ぎていると判断し、そのノートオンイベントと対応する発音開始指示を音源回路へ供給する。   In the example of FIG. 10, the CPU performs interrupt processing every 10 ms after the start of sequence data reproduction, and determines whether there is an event that has passed the execution timing. It is determined that there is no corresponding event until the processing with an elapsed time of 9.99 seconds. After that, it is determined that the execution timing of the note-on event has passed in the processing of the elapsed time 10.00 seconds, and the tone generation start instruction corresponding to the note-on event is supplied to the tone generator circuit.

音源回路は、CPUよりも短い間隔(例えば出力するオーディオ信号のサンプリング周波数である44.1kHz≒0.022675ms間隔)で発音指示を監視しており、発音開始指示がCPUから供給されると、直ちに(無視できる程度の遅延時間以内で)発音を開始することができる。
しかし、図10の例において、CPUから音源回路への発音開始指示の供給タイミングは、シーケンスデータにおいて設定されている9.995秒よりも5ms遅れている。従って、実際に発音が開始されるタイミングにも、これだけの遅れが生じることになる。
The sound source circuit monitors the sound generation instruction at intervals shorter than the CPU (for example, at intervals of 44.1 kHz ≒ 0.022675 ms which is the sampling frequency of the audio signal to be output), and when the sound generation start instruction is supplied from the CPU Sound generation can be started (within a negligible delay time).
However, in the example of FIG. 10, the supply timing of the tone generation start instruction from the CPU to the tone generator circuit is delayed by 5 ms from 9.995 seconds set in the sequence data. Therefore, this delay also occurs at the timing when the sound generation is actually started.

図10からわかるように、割り込み処理が正しく10ms間隔で行われたとしても、各音の発音開始タイミングには、最大で割り込み周期と同じ10msの遅れが生じる。また、CPUの処理負荷が高い場合には、割り込み処理の開始が遅れたり、あるタイミングの割り込み処理が全く実行できなかったりすることも考えられる。このような場合には、割り込み周期よりも大きな遅れが生じる可能性もある。また、再生時の状況に応じて遅れの量が変化してしまうことになる。   As can be seen from FIG. 10, even if the interrupt processing is correctly performed at intervals of 10 ms, a delay of 10 ms, which is the same as the interrupt period, occurs at the maximum at the sound generation start timing of each sound. In addition, when the processing load on the CPU is high, it is conceivable that the start of interrupt processing may be delayed, or that interrupt processing at certain timing may not be executed at all. In such a case, a delay larger than the interrupt cycle may occur. In addition, the amount of delay will change according to the situation at the time of reproduction.

この発明は、このような事情に鑑みてなされたものであり、シーケンスデータに従った音響信号の生成を、より高いタイミング精度で行えるようにすることを目的とする。   The present invention has been made in view of such circumstances, and its object is to enable generation of an audio signal according to sequence data with higher timing accuracy.

この発明のプログラムは、上記の目的を達成するため、コンピュータを、音源装置に発音指示を行う発音制御装置として機能させるためのプログラムであって、上記コンピュータを、所定の時間間隔のタイミングでそれぞれ、予め用意されたシーケンスデータに従ってそのタイミングから所定時間以内に実行すべき発音指示またはそのタイミング以降に実行すべき所定量の発音指示を、その発音指示の実行タイミングの指定と共に上記音源装置に供給する指示供給手段として機能させるためのプログラムである。   A program according to the present invention is a program for causing a computer to function as a sound generation control device for instructing a sound source device to generate a sound in order to achieve the above object, and the computer is arranged at predetermined time intervals. An instruction to supply a sound generation instruction to be executed within a predetermined time from the timing according to sequence data prepared in advance or a predetermined amount of sound generation instruction to be executed after that timing along with the specification of the execution timing of the sound generation instruction It is a program for functioning as a supply means.

このようなプログラムにおいて、上記音源装置に対する上記実行タイミングの指定は、上記所定の時間間隔よりも細かい単位で行われるものであるとよい。
さらに、上記指示供給手段が、上記予め用意されたシーケンスデータに含まれるもの以外の演奏データを検出した場合に、その演奏データと対応する発音指示を、その発音指示を直ちに実行すべき旨の指定と共に上記音源装置に供給する手段を備えるとよい。
In such a program, the designation of the execution timing for the sound source device may be performed in units smaller than the predetermined time interval.
Further, when the instruction supply means detects performance data other than those included in the previously prepared sequence data, the instruction to execute the sound generation instruction corresponding to the performance data is designated immediately. And means for supplying the sound source device.

また、この発明の音源装置は、発音指示と、その発音指示の実行タイミングとを記憶する記憶手段と、上記記憶手段に記憶されている発音指示に従った音響信号出力を、その発音指示と対応して上記記憶手段に記憶されている実行タイミングに開始する制御手段とを設け、上記制御手段が、出力する音響信号のサンプリング周期に基づき予め定めた周期で、上記記憶手段に記憶されている発音指示の実行タイミングが到来したか否かを確認するようにし、上記制御手段の機能が、上記記憶手段に記憶させるべき発音指示及び実行タイミングを供給する機能を実現するプロセッサとは異なるハードウェアにより実現され、さらに、タイマと、上記タイマがカウントする時間の情報を上記プロセッサに提供する手段とを設けたものである。 Further, the sound source device of the present invention corresponds to the sound generation instruction corresponding to the sound generation instruction, storing means for storing the sound generation instruction and the execution timing of the sound generation instruction, and the sound signal output according to the sound generation instruction stored in the storage means. and provided with control means for starting the execution timing stored in the storage means, sound the control means, at a predetermined period based on the sampling period of the output acoustic signal, which is stored in the storage means It is checked whether or not the execution timing of the instruction has arrived, and the function of the control means is realized by hardware different from the processor that realizes the function of supplying the sound generation instruction and the execution timing to be stored in the storage means. Further, a timer and means for providing information on time counted by the timer to the processor are provided .

また、この発明の別の音源装置は、発音指示と、その発音指示の実行タイミングとを記憶する記憶手段と、上記記憶手段に記憶されている発音指示に従った音響信号出力を、その発音指示と対応して上記記憶手段に記憶されている実行タイミングに開始する制御手段とを設け、上記制御手段の機能を、上記記憶手段に記憶させるべき発音指示及び実行タイミングを供給する機能を実現するプロセッサとは異なるハードウェアにより実現し、さらに、タイマと、上記タイマがカウントする時間の情報を上記プロセッサに提供する手段とを設けたものである。   According to another sound source device of the present invention, storage means for storing a sound generation instruction and an execution timing of the sound generation instruction, and sound signal output according to the sound generation instruction stored in the storage means. And a control means for starting at an execution timing stored in the storage means, and a processor for realizing a function of supplying a sound generation instruction and an execution timing to be stored in the storage means. And a timer and means for providing the information on the time counted by the timer to the processor.

また、この発明の音響信号処理装置は、音源部に発音指示を行う発音制御部と、上記音源部とを備えた音響信号生成装置であって、上記発音制御部に、所定の時間間隔のタイミングでそれぞれ、予め用意されたシーケンスデータに従ってそのタイミングから所定時間以内に実行すべき発音指示を、その発音指示の実行タイミングの指定と共に上記音源部に供給する指示供給手段を設け、上記音源部に、上記発音制御部から供給される発音指示と、その発音指示の実行タイミングとを記憶する記憶手段と、上記記憶手段に記憶されている発音指示に従った音響信号出力を、その発音指示と対応して上記記憶手段に記憶されている実行タイミングに開始する制御手段とを設けたものである。
また、この発明は、上記の形態の他、装置、システム、方法、プログラム、記録媒体等、任意の態様で実施することができる。
Further, an acoustic signal processing apparatus according to the present invention is an acoustic signal generation apparatus including a sound generation control unit for instructing a sound source unit to make a sound generation, and the sound source unit, wherein the sound generation control unit has a predetermined time interval timing. Each of the above sound source units is provided with an instruction supply means for supplying a sound generation instruction to the sound source unit together with the specification of the execution timing of the sound generation instruction according to the sequence data prepared in advance. A storage means for storing a sound generation instruction supplied from the sound generation control unit and an execution timing of the sound generation instruction, and an acoustic signal output according to the sound generation instruction stored in the storage means correspond to the sound generation instruction. Control means for starting the execution timing stored in the storage means.
Further, the present invention can be practiced in any mode other than the above-described modes, such as an apparatus, a system, a method, a program, and a recording medium.

以上のような構成によれば、楽曲データに従った音響信号の生成を、より高いタイミング精度で行うことができる。   According to the above configuration, it is possible to generate an acoustic signal according to music data with higher timing accuracy.

この発明の音響信号生成装置の一実施形態である電子音楽装置のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the electronic music apparatus which is one Embodiment of the acoustic signal production | generation apparatus of this invention. 波形メモリに記憶させる波形データの例を示す図である。It is a figure which shows the example of the waveform data memorize | stored in waveform memory. 図1に示した電子音楽装置が備える音響信号出力機能の構成を示す図である。It is a figure which shows the structure of the acoustic signal output function with which the electronic music apparatus shown in FIG. 1 is provided. シーケンスデータの例を示す図である。It is a figure which shows the example of sequence data. 音源回路のレジスタに記憶させるデータの例を示す図である。It is a figure which shows the example of the data stored in the register | resistor of a sound source circuit. 先読み用データの生成について説明するための図である。It is a figure for demonstrating generation of data for pre-reading. 図1に示した電子音楽装置のCPUが実行するメイン処理のフローチャートである。It is a flowchart of the main processing which CPU of the electronic music apparatus shown in FIG. 1 performs. 同じく割り込み処理のフローチャートである。Similarly, it is a flowchart of interrupt processing. 本発明の実施形態の効果について説明するための図である。It is a figure for demonstrating the effect of embodiment of this invention. 従来技術の問題点について説明するための図である。It is a figure for demonstrating the problem of a prior art.

以下、この発明を実施するための形態を図面に基づいて具体的に説明する。
まず、図1に、この発明の音響信号生成装置の一実施形態である電子音楽装置のハードウェア構成を示す。
図1に示すように、電子音楽装置10は、CPU11、ROM12、RAM13、記憶装置14、通信I/F15、検出回路16、表示回路17、音源回路18を備え、これらがシステムバス19により接続されている。また、操作子21を検出回路16に接続して、表示器22を表示回路17に接続して、DAC(デジタルアナログコンバータ)23を音源回路18に接続して、サウンドシステム24をDAC23に接続して、波形メモリ25を音源回路18に接続してそれぞれ設けている。
Hereinafter, a mode for carrying out the present invention will be specifically described based on the drawings.
First, FIG. 1 shows a hardware configuration of an electronic music apparatus which is an embodiment of an audio signal generation apparatus of the present invention.
As shown in FIG. 1, the electronic music apparatus 10 includes a CPU 11, a ROM 12, a RAM 13, a storage device 14, a communication I / F 15, a detection circuit 16, a display circuit 17 and a sound source circuit 18. ing. Further, the operator 21 is connected to the detection circuit 16, the display 22 is connected to the display circuit 17, the DAC (digital analog converter) 23 is connected to the sound source circuit 18, and the sound system 24 is connected to the DAC 23. The waveform memory 25 is connected to the sound source circuit 18 and provided.

このうち、CPU11は、電子音楽装置10の動作を統括制御する制御手段であり、ROM12あるいは記憶装置14に記憶された所要のプログラムを実行して電子音楽装置10の各部を制御することにより、後述する音源制御部116の機能をはじめとする種々の機能を実現する。
ROM12は、CPU11が実行するプログラムをはじめ、電源を切っても残しておくべきデータを記憶する書き換え不可能な不揮発性記憶手段である。なお、フラッシュROMのように書き換え可能な不揮発性記憶手段で構成してもよい。
RAM13は、CPU11のワークメモリとして使用する記憶手段である。
Among them, the CPU 11 is a control unit that generally controls the operation of the electronic music apparatus 10, and executes a required program stored in the ROM 12 or the storage device 14 to control each part of the electronic music apparatus 10. It realizes various functions including the function of the sound source control unit 116.
The ROM 12 is a non-rewritable non-volatile storage unit that stores programs to be executed by the CPU 11 and data that should be left even after the power is turned off. Note that it may be configured by a rewritable non-volatile storage unit such as a flash ROM.
The RAM 13 is storage means used as a work memory of the CPU 11.

記憶装置14は、MIDI(Musical Instrument Digital Interface:登録商標)形式のシーケンスデータ(ソングデータや伴奏スタイルデータなど)やオーディオ波形データ(オーディオのソングデータや伴奏スタイルデータなど)を記憶する記憶手段である。ここで、ソングデータは、1曲の楽曲を示すデータである。伴奏スタイルデータは、ユーザの演奏に対して付すための伴奏のフレーズを示すデータである。また、記憶装置14は、ハードディスク、フレキシブルディスク、コンパクトディスク(CD)、デジタル多目的ディスク(DVD)、フラッシュメモリなど、任意の記憶媒体及びその駆動装置により構成することができる。記憶媒体は、着脱可能であっても、電子音楽装置10に内蔵されていてもよい。   The storage unit 14 is a storage means for storing sequence data (such as song data and accompaniment style data) and audio waveform data (such as audio song data and accompaniment style data) in MIDI (Musical Instrument Digital Interface (registered trademark) format). . Here, the song data is data indicating one piece of music. The accompaniment style data is data indicating an accompaniment phrase to be attached to the user's performance. Further, the storage device 14 can be configured by an arbitrary storage medium such as a hard disk, a flexible disk, a compact disk (CD), a digital multipurpose disk (DVD), a flash memory, and a drive thereof. The storage medium may be removable or may be incorporated in the electronic music apparatus 10.

通信I/F15は、外部機器を電子音楽装置10に接続するためのインタフェースであり、有線と無線を問わず任意の規格のインタフェースを採用可能である。通信I/F15には、ユーザの操作に応じてあるいは自動的にMIDI形式の演奏データを生成するMIDI機器を接続し、ここからMIDIデータを入力することが考えられる。   The communication I / F 15 is an interface for connecting an external device to the electronic music apparatus 10, and can adopt an interface of any standard regardless of wired or wireless. It is conceivable that a MIDI device for generating performance data of MIDI format is connected to the communication I / F 15 automatically or automatically according to the user's operation, and MIDI data is input from this.

検出回路16は、ユーザからの操作を受け付けるための操作子21を接続し、操作子21が受け付けた操作を検出してCPU11に供給するためのインタフェースである。この操作子21は、電子音楽装置10の動作に関する設定や指示を行うためのキー、ボタン、スライダ、タッチパネル等の設定操作子に加え、演奏操作を行うための鍵盤やペダル等の演奏操作子を含んでいてもよい。
表示回路17は、表示器22を接続し、CPU11からの制御により表示器22に表示を行わせるためのインタフェースである。表示器22は、電子音楽装置10の設定状態や動作状態を表示するための表示手段であり、ランプやディスプレイ等を任意に組み合わせて構成することができる。
The detection circuit 16 is an interface for connecting the operating element 21 for receiving an operation from the user, detecting the operation received by the operating element 21, and supplying the CPU 11 with the operation. In addition to setting operators such as keys, buttons, sliders, and touch panels for setting and instructing the operation of the electronic music apparatus 10, the operators 21 include performance operators such as a keyboard and a pedal for performing a performance operation. May be included.
The display circuit 17 is an interface for connecting the display 22 and causing the display 22 to perform display under the control of the CPU 11. The display 22 is a display means for displaying the setting state and the operation state of the electronic music apparatus 10, and can be configured by arbitrarily combining a lamp, a display, and the like.

音源回路18は、CPU11とは異なるハードウェアであるLSIにより構成した波形合成回路であり、電子音楽装置10の音源部として機能する。ここでは、音源回路18はPCM(Pulse Code Modulation)音源の機能を実現するための波形レンダリングの補助回路として構成している。より具体的には、音源回路18は、波形メモリ25に記憶された楽器音等の波形データと、CPU11から供給される発音指示とに基づき音響信号であるオーディオ波形データを生成し、出力する。また、音源回路18は、オーディオ波形形式のソングデータやスタイルデータの再生も可能である。なお、CPU11と音源回路18を、CPUコアと音源コアを1つのパッケージに内蔵したLSIで構成してもよい。   The sound source circuit 18 is a waveform synthesis circuit configured by an LSI that is hardware different from the CPU 11 and functions as a sound source unit of the electronic music apparatus 10. Here, the sound source circuit 18 is configured as an auxiliary circuit for waveform rendering to realize the function of a PCM (Pulse Code Modulation) sound source. More specifically, the sound source circuit 18 generates and outputs audio waveform data, which is an acoustic signal, based on waveform data of an instrument sound or the like stored in the waveform memory 25 and a tone generation instruction supplied from the CPU 11. The tone generator circuit 18 can also reproduce song data and style data in the form of audio waveform. The CPU 11 and the sound source circuit 18 may be configured by an LSI in which the CPU core and the sound source core are incorporated in one package.

DAC23は、音源回路18が出力するデジタルのオーディオ波形データをアナログ音響信号に変換して、サウンドシステム24へ出力する機能を備える。
サウンドシステム24は、アナログ音響信号に基づき音声を出力する発音手段であり、例えばアンプとスピーカにより構成することができる。
The DAC 23 has a function of converting digital audio waveform data output from the sound source circuit 18 into an analog audio signal and outputting the analog audio signal to the sound system 24.
The sound system 24 is a sound generation unit that outputs sound based on an analog sound signal, and can be configured by, for example, an amplifier and a speaker.

波形メモリ25は、音源回路18がオーディオ波形データの生成に用いる波形データを記憶する記憶手段である。波形メモリ25は例えばROMとして構成でき、ピアノやギターのような自然楽器の楽音を所定周期でサンプリングしたPCM波形や、人工的に合成した楽音、効果音のような非楽音などのPCM波形等の波形データを記憶している。
より具体的には、波形メモリ25は、図2に示すように、所定のサンプリングレート(例えば44.1kHz)にてサンプリングされた波形サンプル値を、アドレスの進行に従って時系列的に配列されるように記憶する。
The waveform memory 25 is storage means for storing waveform data used by the sound source circuit 18 for generating audio waveform data. The waveform memory 25 can be configured as, for example, a ROM, and may be a PCM waveform obtained by sampling a musical instrument of a natural instrument such as a piano or guitar at a predetermined cycle, an artificially synthesized musical tone, or a PCM waveform such as a non-musical tone such as a sound effect. Waveform data is stored.
More specifically, as shown in FIG. 2, the waveform memory 25 arranges waveform sample values sampled at a predetermined sampling rate (for example, 44.1 kHz) in chronological order according to the progress of the address. Remember to

また、波形メモリ25においては、楽音等の音色の種類毎に、波形データが記憶されているアドレスが管理されており、そのアドレスを指定することで、所望の音色の楽音等の波形データを読み出すことができる。なお、波形メモリ25には、単音の楽音の波形データに限らず、複音や、複数の音からなる音楽的フレーズの波形データを記憶させてもよい。また、波形メモリ25をRAMで構成し、外部の記憶媒体から波形メモリ25へ波形データを読み込んで記憶させることができるようにしてもよい。
以上の電子音楽装置10は、例えば、演奏操作子を備えた電子楽器や、MIDI形式のシーケンスデータを再生するシーケンサとして構成することができる。
Further, in the waveform memory 25, an address at which waveform data is stored is managed for each kind of tone color such as a musical tone, and by specifying the address, waveform data such as a musical tone having a desired tone color is read out. be able to. The waveform memory 25 may store not only waveform data of a single tone but also waveform data of a musical phrase consisting of multiple tones or a plurality of tones. Further, the waveform memory 25 may be configured by a RAM so that waveform data can be read from the external storage medium to the waveform memory 25 and stored.
The electronic music apparatus 10 described above can be configured, for example, as an electronic musical instrument provided with a performance operator or a sequencer that reproduces MIDI sequence data.

次に、図3に、電子音楽装置10が備える音響信号出力機能の構成を示す。なお、図3に示すのは、MIDI形式のシーケンスデータあるいは演奏データに従い、CPU11が音源回路18を制御して音響信号を生成させるための機能と、音源回路18がその制御に従って音響信号を生成して出力するための機能である。またここでは、CPU11側の機能は、CPU11が所要のプログラムを実行することによって実現され、音源回路18側の機能は専用ハードウェアにより実現されるものである。ただし、後述の通り、この構成に限られない。   Next, FIG. 3 shows a configuration of an audio signal output function provided in the electronic music apparatus 10. Note that FIG. 3 shows a function for the CPU 11 to control the sound source circuit 18 to generate an acoustic signal in accordance with MIDI sequence data or performance data, and the sound source circuit 18 generates the acoustic signal according to the control. Is a function to output. Here, the function on the CPU 11 side is realized by the CPU 11 executing a required program, and the function on the sound source circuit 18 side is realized by dedicated hardware. However, as described later, it is not limited to this configuration.

図3に示すように、CPU11は、楽曲データ取得部111、先読み用データ生成部112、演奏操作検出部113、演奏データ生成部114、演奏データ取得部115、音源制御部116、タイマ117の機能を備える。
これらのうち楽曲データ取得部111は、ユーザによる再生指示に応じて、再生すべきシーケンスデータを取得する機能を備える。シーケンスデータは、記憶装置14から読み出したり、通信I/F15を介して外部装置からダウンロードしたりして取得することができる。
As shown in FIG. 3, the CPU 11 has functions of a music data acquisition unit 111, a prefetch data generation unit 112, a performance operation detection unit 113, a performance data generation unit 114, a performance data acquisition unit 115, a sound source control unit 116, and a timer 117. Equipped with
Among these, the music data acquisition unit 111 has a function of acquiring sequence data to be reproduced according to a reproduction instruction from the user. The sequence data can be read from the storage device 14 or downloaded from an external device through the communication I / F 15 and acquired.

また、シーケンスデータの構成は、例えば図4に示すものである。すなわち、シーケンスデータは、イベントのデータが、そのイベントと対応する処理を実行すべきタイミングを示すタイミング値と対応付けて時系列的に配置されたものである。このイベントには、発音開始を示すノートオン、発音停止を示すノートオフ、音量等の指定を示すコントロールチェンジ、音色の指定を示すプログラムチェンジ、テンポの指定を示すテンポチェンジ等がある。また、タイミング値は、例えば四分音符の1/480を単位とするクロックのカウント値により指定することができる。タイミング値は、前のイベントからの経過時間を示す相対クロック値で表してもよいし、演奏開始からの経過時間を示す絶対クロック値で表してもよい。
以上のシーケンスデータにより、楽曲や伴奏等の演奏内容を表すことができる。
The configuration of the sequence data is, for example, as shown in FIG. That is, the sequence data is data in which event data is arranged in time series in association with a timing value indicating a timing at which a process corresponding to the event should be performed. This event includes note-on indicating the start of sound generation, note-off indicating the sound generation stop, control change indicating designation of volume etc., program change indicating designation of timbre, and tempo change indicating designation of tempo. Further, the timing value can be designated by, for example, the count value of the clock in units of 1/480 of the quarter note. The timing value may be represented by a relative clock value indicating an elapsed time from a previous event, or may be represented by an absolute clock value indicating an elapsed time from the start of playing.
The above sequence data can represent the contents of performance such as music and accompaniment.

次に、先読み用データ生成部112は、楽曲データ取得部111が取得したシーケンスデータに基づき、シーケンスデータ中のイベントに基づく発音指示や設定変更指示等の各種指示を音源回路18のレジスタ181に書き込むタイミングを検出するための先読み用データを生成する機能を備える。この先読み用データは、シーケンスデータ中の各タイミング値を、音源回路18のタイマ182において同じ時刻を示すカウント値に置き換えたものである。その詳細については後述する。   Next, based on the sequence data acquired by the music data acquisition unit 111, the pre-reading data generation unit 112 writes various instructions such as a sound generation instruction and a setting change instruction based on an event in the sequence data in the register 181 of the sound source circuit 18. It has a function of generating pre-read data for detecting timing. The pre-reading data is obtained by replacing each timing value in the sequence data with a count value indicating the same time in the timer 182 of the sound source circuit 18. The details will be described later.

なお、本明細書において、「発音指示」には、発音開始指示だけでなく、発音停止指示も含む。また、「設定変更指示」には発音指示以外の音量設定指示等、発音に関して音源回路18に書き込む指示は全て含むものとする。なお、「設定変更指示」には、テンポ設定のように、イベントと対応する処理をCPU11側で行い、イベントと直接対応する指示を音源回路18に書き込む必要がない場合もある。   In the present specification, the "sound generation instruction" includes not only the sound generation start instruction but also the sound generation stop instruction. Further, the "setting change instruction" includes all instructions such as a volume setting instruction other than the sound generation instruction and the like which are to be written in the sound source circuit 18 regarding the sound generation. In the "setting change instruction", the CPU 11 may perform processing corresponding to an event like tempo setting, and there may be no need to write an instruction corresponding directly to the event in the tone generator circuit 18.

演奏操作検出部113は、操作子21中の演奏操作子に対してなされた演奏操作を検出する機能を備える。
演奏データ生成部114は、演奏操作検出部113が検出した演奏操作を示す演奏データを生成し、音源制御部116に供給する機能を備える。この演奏データは、シーケンスデータに含まれるイベントと同じ形式であるが、生成後ただちに実行されるべきものであり、実行タイミングの情報は持たない。
The performance operation detection unit 113 has a function of detecting a performance operation performed on a performance operation element in the operation element 21.
The performance data generation unit 114 has a function of generating performance data indicating a performance operation detected by the performance operation detection unit 113 and supplying the performance data to the sound source control unit 116. This performance data has the same format as an event included in sequence data, but should be executed immediately after generation, and has no information on execution timing.

また、演奏データ取得部115は、通信I/F15を介して外部装置から送信される演奏データを取得し、音源制御部116に供給する機能を備える。この演奏データも、シーケンスデータに含まれるイベントと同じ形式であるが、取得後ただちに実行されるべきものであり、実行タイミングの情報は持たない。演奏データの送信元としては、MIDIシーケンサや、外付けの演奏操作受付装置(キーボード等)が考えられる。   In addition, the performance data acquisition unit 115 has a function of acquiring performance data transmitted from an external device through the communication I / F 15 and supplying the data to the sound source control unit 116. This performance data also has the same format as the event included in the sequence data, but should be executed immediately after acquisition, and has no information on execution timing. As a transmission source of performance data, a MIDI sequencer or an external performance operation accepting device (keyboard or the like) can be considered.

音源制御部116は、タイマ117が計時する時間に従い、所定の時間間隔(例えば2ms間隔)で割り込み処理を行う機能を備える。この割り込み処理は、シーケンスデータ中のイベント及び、演奏データ生成部114あるいは演奏データ取得部115から供給される演奏データに基づく発音指示や設定変更指示等の各種指示を、その実行タイミングの指定と共に音源回路18に供給するための処理である。
なお、発音指示や設定変更指示等の各種指示の供給は、処理の実行時点から所定時間以内に実行すべきイベントについて行う。例えば、ある割り込み処理の実行時刻が再生開始から9.800秒であり、所定時間が5msであれば、9.800秒から9.805秒までの間に実行すべきイベントと対応する発音指示の書き込み供給を行う。
The sound source control unit 116 has a function of performing interrupt processing at predetermined time intervals (for example, 2 ms intervals) in accordance with the time counted by the timer 117. The interrupt process includes various instructions such as an event in the sequence data and a sound generation instruction and a setting change instruction based on the performance data supplied from the performance data generation unit 114 or the performance data acquisition unit 115 as well as the execution timing. It is a process for supplying the circuit 18.
The supply of various instructions such as a sound generation instruction and a setting change instruction is performed for an event to be executed within a predetermined time from the execution time of the process. For example, if the execution time of an interrupt process is 9.800 seconds from the start of reproduction and the predetermined time is 5 ms, an event and a corresponding sound generation instruction to be executed between 9.800 seconds and 9.805 seconds Make a write supply.

また、演奏データ生成部114あるいは演奏データ取得部115から供給される演奏データ、すなわち再生中のシーケンスデータに含まれるもの以外に検出した演奏データは、直ちに対応する指示を行うべきものである。従って、音源制御部116は、割り込み処理においてこれらの演奏データを検出した場合、対応する指示を、直ちに実行すべき旨の指定と共に、音源回路18に供給する。
タイマ117は、時間を計測する計時手段である。音源制御部116に専用のものである必要はない。
In addition, the performance data supplied from the performance data generation unit 114 or the performance data acquisition unit 115, that is, the performance data detected other than those included in the sequence data being reproduced, should be immediately instructed. Therefore, when the sound source control unit 116 detects these performance data in the interrupt process, the sound source control unit 116 supplies a corresponding instruction to the sound source circuit 18 along with a designation to immediately execute.
The timer 117 is a clock means for measuring time. It is not necessary for the sound source control unit 116 to be dedicated.

一方、音源回路18は、レジスタ181、タイマ182、読出回路183、楽音制御回路184を備える。
これらのうちレジスタ181は、音源回路18が行う音響信号生成に関する指示や設定を記憶する記憶手段である。レジスタ181に書き込む情報には、音源制御部116から供給された発音指示に含まれる情報をそのまま書き込むものと、音源制御部116から供給された発音指示と、音源回路18においてなされている設定とに基づき、音源回路18側で書き込む情報を決定すべきものとがある。
On the other hand, the tone generator circuit 18 includes a register 181, a timer 182, a read circuit 183, and a tone control circuit 184.
Among these, the register 181 is a storage unit that stores instructions and settings relating to sound signal generation performed by the sound source circuit 18. The information to be written in the register 181 includes the information included in the sound generation instruction supplied from the sound source control unit 116 as it is, the sound generation instruction supplied from the sound source control unit 116, and the setting made in the sound source circuit 18. On the basis of the above, there is the one that should determine the information to be written on the sound source circuit 18 side.

ここで、図5に、レジスタ181に記憶させるデータの構成を示す。
音源回路18は、複数の発音ch(チャンネル)を備えるが、図5に示すように、レジスタ181には、発音ch毎に設けた発音制御用レジスタ(A)と、全発音chに共通の設定変更イベント用レジスタ(B)及び設定用レジスタ(C)とがある。
Here, FIG. 5 shows the configuration of data to be stored in the register 181.
The tone generator circuit 18 includes a plurality of tone generation channels (channels), but as shown in FIG. 5, the register 181 includes a tone generation control register (A) provided for each tone generation channel and settings common to all tone generation channels. There are a change event register (B) and a setting register (C).

このうち発音制御用レジスタは、ノートオンイベント及びノートオフイベントと対応する発音指示を書き込むためのものである。なお、音源制御部116は、ノートオンイベントと対応する発音開始指示を音源回路18に供給する場合、発音に使用中でない発音chを検索して、発見した発音chの1つを、ノートオンイベントと対応する発音に使用する発音chとして指定する。また、音源制御部116は、ノートオフイベントと対応する発音停止指示を音源回路18に供給する場合、対応するノートオンイベントに応じた発音を行っている発音chを、発音停止の対象として指定する。そして、音源回路18は、その指定された発音chと対応する発音制御用レジスタに、音源制御部116から供給された発音指示及び実行タイミングに基づき、必要な情報を書き込む。   Among these registers, the tone generation control register is for writing a tone on instruction corresponding to the note on event and the note off event. When the sound source control unit 116 supplies the sound source circuit 18 with a sound generation start instruction corresponding to the note-on event, the sound source control unit 116 searches the sound generation ch not being used for sound generation and selects one of the found sound generation ch Designate as the pronunciation channel used for the corresponding pronunciation. Further, when the sound source control unit 116 supplies the sound source circuit 18 with a sound generation stop instruction corresponding to the note off event, the sound source control unit 116 designates a sound generation ch performing sound generation corresponding to the corresponding note on event as a target of sound generation stop. . Then, the tone generator circuit 18 writes necessary information in the tone generation control register corresponding to the designated tone generation channel, based on the tone generation instruction and the execution timing supplied from the tone generator control unit 116.

また、発音制御用レジスタは、「タイマ値」、「発音指示」、「波形アドレス」及び「その他パラメータ」を記憶する領域を備える。
このうち「タイマ値」は、書き込まれている発音指示を実行するタイミングを示す情報である。このタイミングは、タイマ182のカウント値により指定されているとよい。しかし、タイマ182のカウント値と比較を行う際に必要な換算処理を行えるのであれば、マイクロ秒単位など、別の単位で指定されていてもよい。また、音源制御部116がタイマ182のカウント値により発音指示の実行タイミングを供給し、音源回路18がその供給された値をそのままレジスタ181に設定できるようにするとよいが、この構成には限られない。なお、発音指示を直ちに実行すべき場合には、タイマ値として「0」を設定するようにするとよい。このようにすれば、読出回路183が該当の発音指示の実行タイミングを判定する際に、必ず「現時点より過去」であり、実行タイミングが到来していると判定することになるためである。
Further, the sound generation control register has an area for storing the "timer value", the "sound generation instruction", the "waveform address" and the "other parameters".
Among these, “timer value” is information indicating the timing of executing the written sound generation instruction. This timing may be designated by the count value of the timer 182. However, as long as conversion processing necessary for comparison with the count value of the timer 182 can be performed, it may be specified in another unit such as a microsecond unit. Further, it is preferable that the sound source control unit 116 supply the execution timing of the sound generation instruction by the count value of the timer 182 so that the sound source circuit 18 can set the supplied value to the register 181 as it is. Absent. When the sound generation instruction is to be immediately executed, "0" may be set as the timer value. In this way, when the reading circuit 183 determines the execution timing of the corresponding sound generation instruction, it is determined that the current time is "past from the current time" and the execution timing has come.

「発音指示」は、発音開始と発音停止の区別を示す情報である。この「発音指示」には、音源制御部116から供給された発音指示がノートオン(発音開始)であるかノートオフ(発音停止)であるかを示す値を設定すればよい。
「波形アドレス」は、発音指示に応じた音響信号生成(発音)のために波形メモリ25から波形データを読み出す際の読出位置を示す情報である。この読出位置は、例えば開始アドレス、終了アドレス、ループの開始及び終了アドレス等により特定される。これらのアドレスは、発音に用いる音色の設定によって定まり、音源制御部116から発音指示が供給された際に、音源回路18がその時の音色の設定と対応する値を設定する。
The “pronunciation instruction” is information indicating the distinction between the onset of pronunciation and the termination of pronunciation. A value indicating whether the sound generation instruction supplied from the sound source control unit 116 is note-on (sound generation start) or note-off (sound generation stop) may be set in the “sound generation instruction”.
The “waveform address” is information indicating a reading position at the time of reading out waveform data from the waveform memory 25 for generating (sounding) an acoustic signal according to a sound generation instruction. The read position is specified by, for example, a start address, an end address, and a loop start and end address. These addresses are determined by the setting of the tone color used for tone generation, and when the tone generation instruction is supplied from the sound source control unit 116, the tone source circuit 18 sets the value corresponding to the setting of the tone color at that time.

「その他パラメータ」は、発音する楽音のピッチやタイムストレッチの伸縮割合等を指定する読出速さ、音の発音強さ等を指定するベロシティ、波形メモリ25から読み出した波形データに対して付与するエンベロープやエフェクト等を規定する情報である。   "Other parameters" are the reading speed for specifying the pitch of the tone to be generated, the expansion ratio of time stretch, the velocity for specifying the sound generation strength of the sound, etc., and the envelope to be applied to the waveform data read from the waveform memory 25. It is information that defines effects and the like.

一方、設定変更イベント用レジスタは、音源回路18全体あるいは各発音chに対する設定の変更に係る設定変更指示を検出した場合に、その設定変更指示に従って実行すべき設定の変更内容を書き込むためのものである。なお、音源回路18全体に対する設定は、設定用レジスタに記憶される。
そして、設定変更イベント用レジスタは、「タイマ値」及び「変更内容」を複数組記憶する領域を備える。
On the other hand, the setting change event register is for writing setting change contents to be executed in accordance with the setting change instruction when the setting change instruction related to the setting change for the entire tone generator circuit 18 or each tone generation channel is detected. is there. The setting for the entire tone generator circuit 18 is stored in a setting register.
Then, the setting change event register has an area for storing a plurality of sets of “timer value” and “change content”.

このうち「タイマ値」は、対応して書き込まれている「変更内容」を実行するタイミングを示す情報であり、発音制御用レジスタ中の「タイマ値」と同趣旨である。
「変更内容」は、音源回路18全体、あるいはMIDIchに対する設定の変更内容を示す情報である。音源回路18は、音色の変更や、信号処理の変更等の情報を、音源制御部116から供給される設定変更指示に従ってここに書き込む。
Among these, "timer value" is information indicating the timing of executing the corresponding "change content", and has the same meaning as "timer value" in the tone generation control register.
The “change content” is information indicating the change content of the setting of the entire tone generator circuit 18 or MIDIch. The tone generator circuit 18 writes information such as tone color change and signal processing change according to the setting change instruction supplied from the sound source control unit 116 here.

また、設定用レジスタは、音源回路18全体、あるいは各MIDIchに対する設定の情報を記憶する領域を備える。この設定としては、例えば発音に用いる音色の設定や、楽音制御回路184にて行う信号処理の設定等が考えられる。読出回路183が、設定変更イベント用レジスタに記憶されている情報に従い、「タイマ値」が示す時刻に、対応する「変更内容」をこの設定用レジスタに書き込むことにより、設定用レジスタに記憶されている情報の更新を行う。   Further, the setting register has an area for storing setting information for the entire tone generator circuit 18 or each MIDI channel. This setting may be, for example, setting of a tone color used for sound generation, setting of signal processing performed by the tone control circuit 184, or the like. The read circuit 183 stores the “change content” corresponding to the setting change event register in the setting register by writing the “change content” at the time indicated by the “timer value” according to the information stored in the setting change event register. Update existing information.

図3の説明に戻ると、タイマ182は、音源回路18における発音指示や設定変更指示の実行タイミングを生成し、読出回路183へ供給するための計時手段である。また、タイマ182は、実行タイミングの周期を単位として時間の経過をカウント(ここではカウントアップとするが、カウントダウンでも構わない)する機能も備える。また、タイマ182は、シーケンスデータの再生開始時に音源制御部116からの指示によりリセットされる。   Returning to the description of FIG. 3, the timer 182 is clocking means for generating the execution timing of the tone generation instruction and the setting change instruction in the tone generator circuit 18 and supplying the timing to the readout circuit 183. The timer 182 also has a function of counting the elapsed time (counting up in this case, but counting down may be used) in units of the cycle of execution timing. Further, the timer 182 is reset by an instruction from the sound source control unit 116 at the start of reproduction of sequence data.

なお、音源回路18における発音指示や設定変更指示の実行タイミングは、CPU11において音源制御部116が実行する上述した割り込み処理の間隔よりも十分に短い間隔で周期的に発生するものである。例えばDAC23におけるDA変換処理のサイクル(DACサイクル)である44.1kHzと同じ周期(0.022675ms周期)とすることが考えられる。   The execution timing of the sound generation instruction and the setting change instruction in the tone generator circuit 18 is periodically generated at an interval sufficiently shorter than the interval of the above-described interrupt processing executed by the tone generator control unit 116 in the CPU 11. For example, it is conceivable to set the same cycle (0.022675 ms cycle) as 44.1 kHz which is the cycle (DAC cycle) of the DA conversion processing in the DAC 23.

このようにすれば、音源回路18が出力するオーディオ波形の処理周期と完全に同期したタイミングでシーケンスデータの処理を行うことができる。しかし、この周期に限らず、他の周期を採用しても構わない。ただし、DACサイクルとの自然数倍、1/自然数倍、例えば2倍、1/2倍など、DACサイクルとの関係性が明確な周期であることが望ましい。DACサイクルとは無関係の周期を採用する場合、整数より細かい時刻を発音時刻として指定し、補間器を用いて整数より細かい値を求めながら再生することで、より時間精度の高いシーケンスデータの処理を行うことができる。   In this way, processing of sequence data can be performed at timing completely synchronized with the processing period of the audio waveform output from the sound source circuit 18. However, not limited to this cycle, another cycle may be adopted. However, it is desirable that the cycle with a clear relationship with the DAC cycle, such as a natural number multiple with the DAC cycle, 1 / natural number multiple, for example 2 times, 1/2 times, etc. When using a cycle unrelated to the DAC cycle, specify a time that is finer than an integer as the pronunciation time, and use an interpolator to obtain a finer value than an integer to reproduce, thereby processing sequence data with higher time accuracy. It can be carried out.

読出回路183は、タイマ182から供給される各実行タイミングにおいて、レジスタ181に記憶されている発音指示や設定変更指示の実行に係る処理を行う制御手段の機能を備える。より具体的には、読出回路183は、各発音chの発音制御用レジスタ及び制御イベント用レジスタに記憶されている「タイマ値」と、タイマ182のカウント値とを(必要に応じて換算処理を行った上で)比較する。そして、記憶されているタイマ値(あるいは換算値)がタイマ182のカウント値以下であれば、そのタイマ値と対応する「発音指示」あるいは「制御内容」を実行する。   The reading circuit 183 has a function of control means for performing processing relating to the execution of the sound generation instruction and the setting change instruction stored in the register 181 at each execution timing supplied from the timer 182. More specifically, the reading circuit 183 converts the “timer value” stored in the tone generation control register and control event register of each tone generation channel and the count value of the timer 182 (if necessary, conversion processing is performed. Go) and compare. Then, if the stored timer value (or conversion value) is equal to or less than the count value of the timer 182, the "sound generation instruction" or "control content" corresponding to the timer value is executed.

「発音指示」が発音開始である場合には、読出回路183は、対応する「波形アドレス」に記憶されている読出開始アドレスから、波形メモリ25に記憶されている波形データの読み出しを開始し、終了アドレスに達したら読み出しを終了する。必要に応じて、ループ開始アドレスからループ終了アドレスの間の読み出しを繰り返したり、「その他パラメータ」に含まれるピッチに応じた速さで読み出しアドレスを進行させたり、補間処理を行ったり、読み出し速さパラメータに応じて波形データのタイムストレッチを行ったりする。   When the "pronunciation instruction" is the start of sound generation, the read circuit 183 starts reading of the waveform data stored in the waveform memory 25 from the read start address stored in the corresponding "waveform address", When the end address is reached, the reading is ended. As necessary, reading from the loop start address to the loop end address is repeated, the reading address is advanced at a speed corresponding to the pitch included in the "other parameters", interpolation processing is performed, and reading speed Perform time stretching of waveform data according to parameters.

なお、読出回路183は、一旦波形データの読み出しを開始すると、発音停止指示があるか、又は音量が低下した等の理由により強制的に発音を停止されるまで、DACサイクル毎に波形データの読み出しを繰り返す。従って、発音指示の実行タイミングとDACサイクルとが同じ周期であると、これらのタイミング管理を共通化できるため、音源回路18の回路構成を簡略化できて好ましい。なお、波形データの読み出しをDACサイクル毎に行うものに限らず、数DACサイクルに一回、バースト読み出しをして波形データをキャッシュし、そのキャッシュされた波形データからDACサイクル毎に、ピッチアップに応じて必要なサンプル数を読み出すようにしてもよい。   Once readout circuit 183 starts readout of waveform data, readout of waveform data is performed every DAC cycle until generation of sound is forcibly stopped due to a sound generation stop instruction or a volume decrease. repeat. Accordingly, if the execution timing of the sound generation instruction and the DAC cycle have the same cycle, these timing managements can be shared, which is preferable because the circuit configuration of the sound source circuit 18 can be simplified. The waveform data is not necessarily read out every DAC cycle, but burst read is performed once in several DAC cycles to cache the waveform data, and the cached waveform data is pitched up every DAC cycle. The necessary number of samples may be read out accordingly.

また、「発音指示」が発音停止である場合には、読出回路183は、対応する発音chに関する波形データの読み出しを停止する、あるいは、波形データに付与するエンベロープをリリース状態に移行させる等、発音停止に必要な動作を行う。
また、「変更内容」を実行する場合は、読出回路183は、その内容に従って設定用レジスタに記憶されている設定を更新する。
In addition, when the “sound generation instruction” is the sound generation stop, the reading circuit 183 stops reading the waveform data regarding the corresponding sound generation channel, or shifts the envelope applied to the waveform data to the release state, etc. Perform the action required to stop.
Further, when the “change content” is executed, the read circuit 183 updates the setting stored in the setting register in accordance with the content.

この読出回路183の機能により、再生中のシーケンスデータに基づき音源制御部116から供給されレジスタ181に書き込まれた発音指示は、CPU11における割り込み処理よりも遥かに間隔の短い、音源回路18における発音指示の実行タイミングの精度で、シーケンスデータにおいて指定されていたタイミングで実行されることになる。
また、読出回路183は、以上の他、音源制御部116からの要求に応じて、タイマ182における現在のカウント値を音源制御部116へ供給する機能も備える。
The sound generation instruction supplied from the sound source control unit 116 and written in the register 181 based on the sequence data being reproduced by the function of the read circuit 183 is a sound generation instruction in the sound source circuit 18 whose interval is much shorter than interrupt processing in the CPU 11 Is executed at the timing specified in the sequence data.
In addition to the above, the readout circuit 183 also has a function of supplying the current count value of the timer 182 to the sound source control unit 116 in response to a request from the sound source control unit 116.

楽音制御回路184は、読出回路183が読み出した波形データに対し、所定の演算を施すことにより音楽的な効果を付与したり、エンベロープに従って音量を制御したりする信号処理を行う機能を備える。楽音制御回路184が行う信号処理は、設定用レジスタに記憶されている設定に従って制御される。また、全発音chについて共通の処理であっても、発音ch毎に異なる処理であっても、それらの両方が含まれていてもよい。楽音制御回路184は、専用の処理回路により構成する他、汎用のDSP(デジタルシグナルプロセッサ)により構成してもよい。また、楽音制御回路184を省略することも考えられる。   The tone control circuit 184 has a function of performing signal processing on the waveform data read out by the read out circuit 183 by applying a predetermined operation to impart a musical effect or controlling the volume according to an envelope. The signal processing performed by the tone control circuit 184 is controlled in accordance with the settings stored in the setting register. Further, the process may be common to all the tone generation channels, or may be different processing for each tone generation channel, or both of them may be included. The tone control circuit 184 may be configured by a general purpose DSP (digital signal processor) in addition to being configured by a dedicated processing circuit. It is also conceivable to omit the tone control circuit 184.

DAC23は、音源回路18から出力される楽音制御回路184による処理後のオーディオ波形データを、DACサイクル毎にDA変換してアナログの楽音信号に変換する機能を備える。   The DAC 23 has a function of DA converting the audio waveform data processed by the tone control circuit 184 output from the tone source circuit 18 into analog tone signals every DAC cycle.

次に、図6を用いて、先読み用データ生成部112が実行する先読み用データの生成について説明する。
上述のように、先読み用データは、図4に示したシーケンスデータ中の各タイミング値を、音源回路18のタイマ182において同じ時刻を示すカウント値に置き換えることにより生成できる。
Next, generation of prefetching data to be executed by the prefetching data generation unit 112 will be described using FIG.
As described above, the pre-read data can be generated by replacing each timing value in the sequence data shown in FIG. 4 with a count value indicating the same time in the timer 182 of the sound source circuit 18.

ここで、シーケンスデータ中のタイミング値はクロック値で表されており、シーケンスデータを再生する際に指定するテンポ値に応じて、再生開始時を基準とした該当タイミング値の時刻(絶対時刻)は変動する。
ここでは、1クロック長を四分音符の1/480の長さとし、タイマ182のカウント周期を1/44100秒とする。また、指定されているテンポ値をTとする。
この場合、四分音符の時間長は60/T秒なので、1クロック長は60/480T=1/8T秒である。従って、1クロック長をタイマ182のカウント値に換算すると、(1/8T)/(1/44100)=44100/8Tとなる。
Here, the timing value in the sequence data is represented by a clock value, and the time (absolute time) of the corresponding timing value with reference to the reproduction start time is determined according to the tempo value specified when reproducing the sequence data. fluctuate.
Here, one clock length is set to 1/480 of a quarter note, and the count cycle of the timer 182 is set to 1/44 second. Also, let T be the designated tempo value.
In this case, since the time length of the quarter note is 60 / T seconds, one clock length is 60 / 480T = 1 / 8T seconds. Therefore, when one clock length is converted to the count value of the timer 182, (1 / 8T) / (1/44100) = 44100 / 8T.

従って、図6に示すように、シーケンスデータ中の各タイミング値に44100/8Tを乗じることにより、対応するカウント値を求めることができる。例えば、イベントBの発生タイミングは、480×44100/8Tのカウント値で表すことができる。
テンポが120の場合、この値は480×44100/(8×120)=22050となる。小数値となった場合、四捨五入、切り捨て、切り上げなどを行って整数値に丸めるとよい。
Therefore, as shown in FIG. 6, the corresponding count value can be obtained by multiplying each timing value in the sequence data by 44100 / 8T. For example, the occurrence timing of event B can be represented by a count value of 480 × 44100 / 8T.
When the tempo is 120, this value is 480 × 44100 / (8 × 120) = 22050. If it becomes a decimal value, round it up, round it down, round up and so on, and round it to an integer value.

なお、この先読み用データは、シーケンスデータの再生開始時に、シーケンスデータの末尾まで用意してしまってもよい。シーケンスデータ中にテンポの変更指示が含まれる場合の、その後ろについては変更後のテンポ値を用いて、前のイベントからのカウント値の増分を計算すればよい。   The pre-reading data may be prepared to the end of the sequence data at the start of reproduction of the sequence data. When the tempo data change instruction is included in the sequence data, an increment of the count value from the previous event may be calculated using the post-change tempo value after that.

しかし、ユーザの操作に従って随時テンポを変更可能である場合、テンポの変更がある度に、現在再生中の箇所より後ろについては、変更後のテンポに基づき先読み用データを作り直す必要がある。このことを考慮すると、あまり先の方まで先読み用データを作成しても無駄になってしまう可能性がある。そこで、再生の進行に応じて順次シーケンスデータを読み出し、再生に間に合う程度の短い時間分ずつ先読み用データを作成していくことが望ましい。   However, if it is possible to change the tempo at any time according to the operation of the user, whenever there is a change in the tempo, it is necessary to recreate the pre-reading data based on the changed tempo after the part currently being reproduced. If this is taken into consideration, there is a possibility that it will be wasted even if the data for prefetching is created too far ahead. Therefore, it is desirable to sequentially read out the sequence data according to the progress of reproduction, and to create pre-reading data for a short time that is in time for reproduction.

次に、図7及び図8を用いて、CPU11が実行する、図3に示した機能と対応する処理について説明する。
図7に示すのは、CPU11が起動時に実行を開始するメイン処理のフローチャートである。
CPU11は、電源投入時やリセット時等、電子音楽装置10が起動された場合に、図7のフローチャートに示す処理を開始する。
この処理において、CPU11は、所定の初期化処理(S11)を行った後、ステップS12乃至S22を繰り返し、ユーザの操作あるいは外部装置からのデータ受信を検出する(S12)と共に、その検出した操作やデータに応じた処理を行う。
Next, processing corresponding to the function shown in FIG. 3 and executed by the CPU 11 will be described using FIGS. 7 and 8.
FIG. 7 is a flowchart of the main process in which the CPU 11 starts execution at startup.
The CPU 11 starts the process shown in the flowchart of FIG. 7 when the electronic music apparatus 10 is activated, such as when the power is turned on or reset.
In this processing, after performing predetermined initialization processing (S11), CPU 11 repeats steps S12 to S22, detects user operation or data reception from an external device (S12), and also detects the detected operation or Perform processing according to the data.

まず、MIDIシーケンサのスタート指示(シーケンスデータの再生指示)を検出した場合(S13のYes)、図6を用いて説明した先読み用データの生成を行う(S14)と共に、MIDIシーケンサの動作ステータスをオン(S15)にし、音源回路18のタイマ182のカウント値を「0」にリセットする(S16)。ステップS14の処理は、楽曲データ取得部111及び先読み用データ生成部112の機能と対応するものである。ステップS15及びS16の処理は、音源制御部116の機能と対応するものである。   First, when the start instruction of the MIDI sequencer (instruction for reproducing sequence data) is detected (Yes in S13), the pre-read data described with reference to FIG. 6 is generated (S14) and the operation status of the MIDI sequencer is turned on. (S15), and the count value of the timer 182 of the sound source circuit 18 is reset to "0" (S16). The process of step S14 corresponds to the functions of the music data acquisition unit 111 and the pre-reading data generation unit 112. The processes of steps S15 and S16 correspond to the function of the sound source control unit 116.

また、演奏操作子の操作を検出した場合(S17のYes)、検出した操作と対応する演奏データを生成(S18)し、その演奏データに基づく発音指示をタイマ値「0」と共に音源回路18へ供給する(S19)。外部装置からの演奏データの受信を検出した場合(S20のYes)も、同様にその演奏データに基づく発音指示をタイマ値「0」と共に音源回路18へ供給する(S21)。音源回路18側では、この供給された発音指示及びタイマ値に基づき、レジスタ181へ必要な情報を設定する。   If an operation of a performance operator is detected (Yes in S17), performance data corresponding to the detected operation is generated (S18), and a tone generation instruction based on the performance data is sent to the tone generator circuit 18 together with the timer value "0". Supply (S19). When reception of performance data from an external device is detected (Yes in S20), a tone generation instruction based on the performance data is similarly supplied to the tone source circuit 18 together with the timer value "0" (S21). The tone generator circuit 18 sets necessary information in the register 181 based on the supplied tone generation instruction and timer value.

これらの処理により、再生中のシーケンスデータに含まれるもの以外の演奏データを検出した場合に、その演奏データと対応する発音指示を、その発音指示を直ちに実行すべき旨の指定と共に音源回路に供給することができる。ステップS18、S19及びS20の処理は、それぞれ演奏操作検出部113、演奏データ生成部114及び演奏データ取得部115の機能と対応する。
ステップS22は、ここまで説明したもの以外の操作や受信データに応じた処理である。
When performance data other than those included in the sequence data being reproduced is detected by these processes, a tone generation instruction corresponding to the performance data is supplied to the tone generator circuit along with a designation to immediately execute the tone generation instruction. can do. The processes of steps S18, S19 and S20 correspond to the functions of the musical performance operation detection unit 113, the musical performance data generation unit 114, and the musical performance data acquisition unit 115, respectively.
Step S22 is processing according to operations and received data other than those described above.

図8に示すのは、CPU11が所定の時間間隔で実行する割り込み処理のフローチャートである。
この処理において、CPU11は、MIDIシーケンサの動作ステータスが図7のステップS15でオンにされていなければ(S31のNo)、何もせずに処理を終了する。
FIG. 8 is a flowchart of an interrupt process executed by the CPU 11 at predetermined time intervals.
In this process, if the operation status of the MIDI sequencer is not turned on in step S15 of FIG. 7 (No in S31), the CPU 11 ends the process without doing anything.

しかし、オンにされていれば、CPU11は、音源回路18のタイマ182のカウント値を取得する(S32)。そして、ステップS14で作成した先読みデータ中に、ステップS32で取得したカウント値以降の所定時間内に実行すべきイベントがあれば(S33のYes)、該当のイベントに基づく発音指示を、該当のイベントと対応するタイマ値と共に音源回路18へ供給する(S34)。そして、CPU11は、先読み用データから該当のイベントを削除して(S35)、処理を終了する。ステップS35での削除は、次の処理タイミングで同じイベントに基づく発音指示を再度行ってしまわないようにするためである。音源回路18側では、ステップS34で供給された発音指示及びタイマ値に基づき、レジスタ181へ必要な情報を設定する。
なお、図8の処理では取得したカウント値以降の所定時間以内に実行すべきイベントを音源回路に供給したが、これに代えて、取得したカウント値以降のタイミングで実行すべきイベントを所定のデータ量(例えば所定のイベント数)分だけ音源回路に供給するようにしてもよい。
However, if it is turned on, the CPU 11 acquires the count value of the timer 182 of the sound source circuit 18 (S32). Then, if there is an event to be executed within the predetermined time after the count value acquired in step S32 in the pre-read data created in step S14 (Yes in S33), the sound generation instruction based on the corresponding event is the corresponding event And the corresponding timer value to the tone generator circuit 18 (S34). Then, the CPU 11 deletes the corresponding event from the pre-read data (S35), and ends the process. The deletion in step S35 is to prevent the tone generation instruction based on the same event from being issued again at the next processing timing. The tone generator circuit 18 sets necessary information in the register 181 based on the tone generation instruction and the timer value supplied in step S34.
In the process of FIG. 8, the event to be executed within a predetermined time after the acquired count value is supplied to the tone generator circuit, but instead, the event to be executed at the timing after the acquired count value is predetermined data An amount (for example, a predetermined number of events) may be supplied to the sound source circuit.

以上の処理において、ステップS32でタイマ182のカウント値を取得するので、CPU11は、音源回路18にて実際に進行中の経過時間を用いて実行タイミングの判定を行うことができる。このため、CPU11の過負荷等によりCPU11側のタイマ117が計時する時間に狂いが生じた場合でも、イベントの実行タイミングを正しく判定することができる。   In the above process, since the count value of the timer 182 is acquired in step S32, the CPU 11 can determine the execution timing using the elapsed time actually in progress in the sound source circuit 18. For this reason, even when the time measured by the timer 117 on the CPU 11 side is deviated due to the overload of the CPU 11 or the like, it is possible to correctly determine the execution timing of the event.

なお、ステップS33の条件を満たすイベントが複数あった場合、ステップS33より後の処理は、そのイベント毎に実行する。
また、図8の処理においてステップSXの判断を追加で行うようにしてもよい。必要な発音chを確保できない場合、ステップS34の処理を行うためには、いずれかの発音chで実行中の発音をトランケートさせて、その発音chに、処理対象のイベントに係る発音を予約する設定を行うことになる。しかし、イベントの実行タイミングまで時間の余裕がある場合には、あえて発音を強制的に停止させてまで現時点で予約を行う必要はないと考えられるためである。このことにより、無用な発音の停止を避けることができる。
In addition, when there exist multiple events which satisfy | fill the conditions of step S33, the process after step S33 is performed for every event.
Further, the determination of step SX may be additionally performed in the process of FIG. If the required sound generation channel can not be secured, in order to perform the process of step S34, the sound generation being executed on any of the sound generation channels is truncated, and the sound generation of the event to be processed is reserved for the sound generation channel. Will do. However, if there is ample time until the execution timing of the event, it is considered that it is not necessary to make a reservation at this time until the sound generation is forcibly stopped. By this, it is possible to avoid useless stop of pronunciation.

しかし、ステップSXの判断は行わなくてよい。この場合、必要な発音chを確保できないと、実際に発音を開始するよりも、「所定時間」だけ前にトランケートを開始できることになる。このことにより、トランケートに起因する楽曲へのダメージを軽減できる場合もある。
ステップSXの処理を行うか否かを、これらを考慮してユーザが任意に設定できるようにしてもよい。
以上の図8の処理は、音源制御部116の機能と対応するものである。
However, the determination in step SX may not be performed. In this case, if the required sound generation channel can not be secured, truncation can be started "predetermined time" before actually starting the sound generation. In some cases, this can reduce the damage to the music due to truncation.
The user may optionally set whether or not to perform the process of step SX in consideration of these.
The process of FIG. 8 described above corresponds to the function of the sound source control unit 116.

次に、図9を用いて以上説明してきた実施形態の効果について説明する。
図9は、上述した電子音楽装置10におけるシーケンスデータ中のイベントの処理タイミングを示す、図10と対応する図である。
図9の例でも、シーケンスデータに、再生開始から9.995秒後にノートオンイベントを実行すべきことが記録されているとする。また、CPUが実行する割り込み処理のタイミングは10ms毎であるとし、図8のステップS33における所定時間は20msであるとする。
Next, the effects of the embodiment described above with reference to FIG. 9 will be described.
FIG. 9 is a view corresponding to FIG. 10, showing the processing timing of the event in the sequence data in the electronic music apparatus 10 described above.
Also in the example shown in FIG. 9, it is assumed that the note-on event is to be performed in the sequence data 9.95 seconds after the start of reproduction. Further, it is assumed that the timing of the interrupt processing executed by the CPU is every 10 ms, and the predetermined time in step S33 of FIG. 8 is 20 ms.

図9の例において、CPU11は、シーケンスデータの再生開始から10ms毎に割り込み処理を行い、処理時点から20ms以内に実行タイミングが来るイベントがないか判断する(S33)。9.97秒の処理までは、該当のイベントはないと判断する。その後、9.98秒の処理において、20ms以内にノートオンイベントの実行タイミングが来ると判断し、そのノートオンイベントと対応する発音開始指示を、実行タイミングである9.995秒を示すカウント値と共に音源回路18へ供給する(S34)。   In the example of FIG. 9, the CPU 11 performs interrupt processing every 10 ms from the start of sequence data reproduction, and determines whether there is an event whose execution timing comes within 20 ms from the processing time (S33). It is judged that there is no corresponding event until the processing of 9.97 seconds. Thereafter, in the 9.98 second process, it is determined that the execution timing of the note-on event comes within 20 ms, and the tone generation start instruction corresponding to the note-on event is accompanied by a count value indicating 9.95 seconds which is the execution timing. The sound source circuit 18 is supplied (S34).

音源回路18は、この発音開始指示及び実行タイミングをレジスタ181に設定し、読出回路183が、0.022675ms周期の処理タイミング毎に、その設定した実行タイミングが来たか否か判断する。そして、9.995秒を過ぎた最初の処理タイミングで、実行タイミングが来たと判断し、発音開始指示と対応する発音を開始する。
従って、発音開始タイミングの誤差は、シーケンスデータにおいて指定されている時刻から0.022675ms以内であり、CPU11の割り込み処理の周期程度の誤差が生じ得る図10の場合と比べ、極めて高い時間精度で発音を開始することができる。
なお、ノートオン及びノートオフ以外の、設定変更などのイベントについても、同様に実行可能である。
The tone generator circuit 18 sets the tone generation start instruction and the execution timing in the register 181, and the reading circuit 183 determines whether or not the set execution timing has come for every processing timing of 0.022675 ms cycle. Then, at the first processing timing after 9.995 seconds, it is determined that the execution timing has come, and sound generation corresponding to the sound generation start instruction is started.
Therefore, the error of the tone generation start timing is within 0.022675 ms from the time specified in the sequence data, and the tone generation with extremely high time accuracy as compared with the case of FIG. Can be started.
Note that events other than note-on and note-off, such as setting change, can be performed similarly.

また、図9の例では、9.99秒の時点ではCPU11の処理負荷が大きかったため割り込み処理のタイミングに遅れが生じているが、この時点では発音開始指示を既に音源回路18へ供給済みであるので、この遅れの影響もない。図8のステップS33における所定時間としてある程度長い時間を取っておけば、いくつかの割り込み周期において割り込み処理の実行タイミングが遅れたり、処理を実行できなかったりしても、その影響を受けることなく、シーケンスデータ中の各イベントを、シーケンスデータにおいて指定されている実行時刻に実行することができる。   Further, in the example of FIG. 9, since the processing load of the CPU 11 is large at 9.99 seconds, a delay occurs in the timing of the interrupt processing, but at this time, the tone generation start instruction has already been supplied to the tone generator circuit 18 So there is no effect of this delay. If a certain long time is taken as the predetermined time in step S33 of FIG. 8, even if the execution timing of the interrupt processing is delayed in some interrupt cycles or processing can not be executed, the influence is not affected. Each event in the sequence data can be executed at the execution time specified in the sequence data.

また、自動伴奏のスタイルデータの再生のように、小節の先頭など特定のタイミングで大量のノートオンイベントが集中するような場合でも、CPU11は、時間に余裕を持ってこれと対応する発音指示を音源回路18に設定することができる。従って、イベントの集中による処理遅れも避けることができる。もしCPU11側の処理に遅れが生じたとしても、よほど大きな遅れでない限り、音源回路18における発音指示の実行タイミングに影響を与えることはない。   In addition, even when a large number of note-on events are concentrated at a specific timing such as the beginning of a measure, as in the case of automatic accompaniment style data playback, the CPU 11 has enough time to make a corresponding sound generation instruction. The sound source circuit 18 can be set. Therefore, processing delay due to concentration of events can also be avoided. Even if a delay occurs in the processing on the side of the CPU 11, it does not affect the execution timing of the tone generation instruction in the sound source circuit 18, unless it is a very large delay.

なお、ステップS33の所定時間を長くするほど、発音指示の実行タイミングずれの防止効果は大きくなる。しかし、あまり長くしすぎると、実行予約状態の発音開始指示によって多くの発音chを占有してしまうことになる。また、一旦音源回路18に発音開始を設定してしまった後で、テンポが変更され、事後的に設定内容が実際に発音すべきタイミングとずれてしまったりすることも考えられる。   The longer the predetermined time in step S33 is, the larger the effect of preventing the execution timing deviation of the sound generation instruction becomes. However, if it is made too long, many sound generation channels will be occupied by the sound generation start instruction in the execution reservation state. In addition, it is conceivable that the tempo is changed after the sound source circuit 18 has once set the sound generation start, and the setting content may be deviated from the timing when the sound should actually be sounded afterward.

一方、所定時間が短すぎると、CPU11における割り込み処理タイミングの遅れや飛びが頻発した場合に、発音指示を実行すべきタイミングまでに音源回路18への設定を行えない事態も生じ得る。しかし、このような事態が生じても、図10に示したような従来の処理との場合と同様なタイミングずれが生じるだけで、それ以上の不具合はないと捉えることもできる。
そして、ステップS33の所定時間を、割り込み処理の実行間隔と同じにするだけでも、タイミングずれの防止に一定の効果は得られる。これらを考慮して、この所定時間を設定するとよい。
On the other hand, if the predetermined time is too short, it may occur that the setting of the tone generator circuit 18 can not be performed by the timing when the sound generation instruction should be executed if delay or jump of the interrupt processing timing in the CPU 11 occurs frequently. However, even if such a situation occurs, it can be understood that there is only a timing deviation similar to that of the conventional process as shown in FIG.
Then, even if the predetermined time in step S33 is made the same as the execution interval of the interrupt processing, a certain effect can be obtained to prevent the timing shift. This predetermined time may be set in consideration of these.

なお、音源回路18は、シーケンスデータに基づき発音指示及びその実行タイミングを音源回路18に供給する機能を担うCPU11と異なるハードウェアにより実現している。このため、音源回路18は、波形データの生成及び出力専用のハードウェアとして構成できるため、処理タイミングのずれを起こすことなく、一定周期での処理実行が可能となる。このことにより、発音指示の実行タイミングにも、ずれを生じないようにすることができる。   The tone generator circuit 18 is realized by hardware different from the CPU 11 which has a function of supplying a tone generation instruction and its execution timing to the tone generator circuit 18 based on sequence data. For this reason, since the sound source circuit 18 can be configured as hardware dedicated to generation and output of waveform data, processing can be performed in a constant cycle without causing a shift in processing timing. By this, it is possible to prevent the occurrence of deviation in the execution timing of the sound generation instruction.

なお、音源回路18は、必ずしも波形データの生成専用のワイヤロジックを備えたものでなくてもよい。他の処理に影響を受けることなく必要な周期で波形データ生成に係る処理を実行することができるのであれば、例えば、マルチコアCPUのうち1コアを音源回路18の機能の実現のみに用いるといった構成も採用可能である。音源回路18の機能の実現のみに用いる専用のCPUを設けることも考えられる。   The sound source circuit 18 may not necessarily include wire logic dedicated to generation of waveform data. If processing relating to waveform data generation can be executed in a necessary cycle without being affected by other processing, for example, a configuration in which one core of a multi-core CPU is used only to realize the function of the sound source circuit 18 Is also employable. It is also conceivable to provide a dedicated CPU used only for realizing the function of the tone generator circuit 18.

以上で実施形態の説明を終了するが、装置及び機能の構成、具体的な処理の手順などが、上述の実施形態で説明したものに限られないことはもちろんである。
例えば、上述した実施形態において、CPU11は音源回路18のタイマ182のカウント値を取得し、図8のステップS33でその取得したカウント値をイベントの実行タイミングと比較した。しかし、CPU11のタイマ117と音源回路18のタイマ182との間の計時誤差が許容できるほど少ない(例えば100分で0.2ms)のであれば、CPU11のタイマ117が計時する時刻を用いて、イベントの実行タイミングと比較してもよい。この場合、必要に応じてカウント値の換算を行う。
This is the end of the description of the embodiment, but it goes without saying that the configurations of devices and functions, specific processing procedures, and the like are not limited to those described in the above-described embodiment.
For example, in the embodiment described above, the CPU 11 acquires the count value of the timer 182 of the sound source circuit 18, and compares the acquired count value with the execution timing of the event in step S33 of FIG. However, if the clocking error between the timer 117 of the CPU 11 and the timer 182 of the sound source circuit 18 is small enough (for example, 0.2 ms in 100 minutes), an event is generated using the time clocked by the timer 117 of the CPU 11. It may be compared with the execution timing of In this case, count values are converted as necessary.

また、図7のステップS19及びS21において、CPU11は、発音指示を直ちに実行するべき旨の指定として、タイマ値の最小値である「0」を音源回路18に供給するようにした。このようにすれば、音源回路18側では、現在のタイマ182のカウント値と、レジスタ181に設定されたカウント値とを比較するだけで、直ちに実行すべき発音指示を特定できるため、処理のロジックを容易なものとすることができる。しかし、この構成に限られることはなく、特定のフラグ等を用いて、発音指示を直ちに実行すべき旨を示すようにしてもよい。   Further, in steps S19 and S21 of FIG. 7, the CPU 11 supplies the sound source circuit 18 with "0", which is the minimum value of the timer value, as a designation to immediately execute the sound generation instruction. In this way, the sound source circuit 18 can identify the sound generation instruction to be immediately executed simply by comparing the current count value of the timer 182 with the count value set in the register 181. Can be made easy. However, the present invention is not limited to this configuration, and a specific flag or the like may be used to indicate that the sound generation instruction should be immediately executed.

また、上述した実施形態ではシーケンスデータの再生開始時にタイマ182をリセットするようにしていたが、これは必須ではない。シーケンスデータの再生開始時のタイマ182のカウント値を記憶しておき、現在のカウント値との差分を取れば、リセットした場合と実質的に同じカウント値を得ることができる。   Further, although the timer 182 is reset at the start of reproduction of sequence data in the above-described embodiment, this is not essential. If the count value of the timer 182 at the start of reproduction of the sequence data is stored and the difference from the current count value is taken, it is possible to obtain substantially the same count value as when reset.

また、音源回路18において、1つの発音chと対応する発音制御用レジスタに、制御イベント用レジスタの場合と同様、複数の発音指示を設定できるようにしてもよい。この場合、各発音指示と対応するタイマ値が示すタイミングで、該当の発音指示に係る処理を実行することになる。前の発音指示に応じた発音の継続中に次の発音指示に応じた発音を実行することとなった場合、前の発音を直ちに中止して次の発音を実行すればよい。   Further, in the tone generation circuit 18, a plurality of tone generation instructions may be set in the tone generation control register corresponding to one tone generation ch as in the case of the control event register. In this case, at the timing indicated by the timer value corresponding to each sound generation instruction, the process related to the corresponding sound generation instruction is executed. If sound generation according to the next sound generation instruction is to be performed while continuation of sound generation according to the previous sound generation instruction, the previous sound generation may be immediately stopped and the next sound generation may be performed.

また、図6の例では、先読み用データにおいて、タイマ値をシーケンスデータの先頭からの経過時間を示す絶対値で記録するようにしたが、前のイベントからの経過時間を示す相対値で記録するようにしてもよい。この場合、音源回路18のタイマ182もこれに合わせて相対経過時間が得られるようにイベント(発音指示)の処理毎にリセットするようにしてもよいし、前のイベントの処理時のカウント値と現在のカウント値との差分により、相対経過時間を求めるようにしてもよい。   Further, in the example of FIG. 6, in the pre-read data, the timer value is recorded as an absolute value indicating the elapsed time from the beginning of the sequence data, but is recorded as a relative value indicating the elapsed time from the previous event You may do so. In this case, the timer 182 of the sound source circuit 18 may also be reset at each processing of an event (sound generation instruction) so as to obtain a relative elapsed time accordingly, or the count value at the time of processing of the previous event. The relative elapsed time may be determined by the difference from the current count value.

また、音源回路18は、シーケンスデータに従った音響信号の生成だけでなく、同時にオーディオ波形データ(ソングデータ、伴奏スタイルデータ、短いオーディオフレーズデータ等)の再生を行ってもよい。その場合、オーディオ波形データの生成周期(DACサイクルと同じ)と、シーケンスデータに基づく発音指示の処理周期とを一致させれば、再生の都度、シーケンスデータに従って生成した音響信号と再生するオーディオ波形データとが完全に同期した再生を実現できる。
また、シーケンスデータの記述形式はMIDI形式に限られない。音源回路18等の音源装置に実行させるべき発音指示と、その実行タイミングとを示す情報とを何らかの形で表現可能なデータであれば、任意の形式のものを採用可能である。
The sound source circuit 18 may not only generate an acoustic signal according to the sequence data, but may simultaneously reproduce audio waveform data (song data, accompaniment style data, short audio phrase data, etc.). In that case, if the generation cycle of the audio waveform data (same as the DAC cycle) and the processing cycle of the sound generation instruction based on the sequence data are matched, the audio signal generated according to the sequence data and the audio waveform data to be played back Can achieve completely synchronized reproduction.
Further, the description format of the sequence data is not limited to the MIDI format. Any type of data can be adopted as long as it is data that can express the sound generation instruction to be executed by the sound source device such as the sound source circuit 18 and the like and the information indicating the execution timing in any form.

また、音源回路18における音響信号の生成方式は、波形メモリ方式に限らず、FM(Frequency Modulation)方式、物理モデル方式、アナログモデリング方式等、どのような方式であってもよい。波形メモリ方式以外の場合、レジスタ181中の発音制御用レジスタに波形アドレスを記憶させる必要はなく、代わりに楽音生成のための各種パラメータを記憶させればよい。   Further, the method of generating an acoustic signal in the sound source circuit 18 is not limited to the waveform memory method, and any method such as an FM (Frequency Modulation) method, a physical model method, an analog modeling method, etc. may be used. In the case other than the waveform memory system, it is not necessary to store the waveform address in the tone generation control register in the register 181, and instead, various parameters for generating a tone may be stored.

また、波形メモリ方式の場合、波形メモリ25に記憶されている波形データは非圧縮のデータであってもよいし、所定の圧縮方式に従って圧縮されたデータでもよい。また、ピッチを変化させたりタイムストレッチをして再生する場合は、複数の波形サンプルを補間したり読み飛ばし又は繰り返して読み出しをする等により、DACサイクルにあった波形データを用意するようにしてもよい。すなわち、もともと記憶されていた波形サンプル値をDACサイクル毎に読み出す構成には限られない。また、ピッチ変化やタイムストレッチの有無にかかわらず、読出回路183が、DACサイクルとは別の周期(例えばDACサイクルの4倍の周期)で波形データを読み出して、必要に応じて補間等の処理を行った後、上記別の周期毎にDAC23のバッファにその波形データを供給するようにしてもよい。   In the case of the waveform memory system, the waveform data stored in the waveform memory 25 may be non-compressed data or data compressed according to a predetermined compression system. In addition, in the case of changing the pitch or performing time-stretching for reproduction, even if waveform data corresponding to the DAC cycle is prepared by interpolating, skipping or repeatedly reading a plurality of waveform samples, etc. Good. That is, the present invention is not limited to the configuration in which waveform sample values originally stored are read out every DAC cycle. In addition, regardless of the presence or absence of pitch change and time stretch, the readout circuit 183 reads out waveform data in a cycle different from the DAC cycle (for example, a cycle of 4 times the DAC cycle), and processing such as interpolation as necessary. After that, the waveform data may be supplied to the buffer of the DAC 23 every other cycle.

また、この発明は、電子音楽装置10のように、図3に示したCPU11及び音源回路18の機能を合わせ持つ音響信号生成装置として実施することができる他、CPU11の機能のみを持つ発音制御装置や、音源回路18の機能のみ持つ音源装置として実施することも可能である。また、コンピュータに、CPU11の機能や音源回路18の機能を実現させるためのプログラムとしても実施可能である。   Further, the present invention can be implemented as an acoustic signal generation apparatus having the functions of the CPU 11 and the sound source circuit 18 shown in FIG. 3 as in the electronic music apparatus 10, and a sound generation control apparatus having only the functions of the CPU 11. Alternatively, the present invention can be implemented as a sound source device having only the function of the sound source circuit 18. The program can also be implemented as a program for realizing the function of the CPU 11 and the function of the tone generator circuit 18 in a computer.

このようなプログラムは、はじめからコンピュータに備えるROMや他の不揮発性記憶媒体(フラッシュメモリ,EEPROM等)などに格納しておいてもよい。しかし、メモリカード、CD、DVD、ブルーレイディスク等の任意の不揮発性記録媒体に記録して提供することもできる。それらの記録媒体に記録されたプログラムをコンピュータにインストールして実行させることにより、必要な処理をコンピュータに実行させることができる。   Such a program may be stored in the ROM or other non-volatile storage medium (flash memory, EEPROM, etc.) provided in the computer from the beginning. However, it can also be provided by being recorded on any non-volatile recording medium such as a memory card, CD, DVD, Blu-ray disc and the like. Necessary processes can be executed by the computer by installing and executing the programs recorded in those recording media in the computer.

さらに、ネットワークに接続され、プログラムを記録した記録媒体を備える外部装置あるいはプログラムを記憶手段に記憶した外部装置からダウンロードし、コンピュータにインストールして実行させることも可能である。
また、以上述べてきた構成及び変形例は、矛盾しない範囲で適宜組み合わせて適用することも可能である。
Furthermore, it is possible to download from an external device connected to a network and provided with a recording medium having a program recorded thereon or a program from the external device stored in the storage means, and install it on a computer for execution.
In addition, the configurations and modifications described above can be combined appropriately and applied as long as no contradiction arises.

以上の説明から明らかなように、この発明によれば、シーケンスデータに従った音響信号の生成を、より高いタイミング精度で行えるようにすることができる。
従って、この発明を適用することにより、シーケンスデータに従って生成される音響信号の品質を向上させることができる。
As apparent from the above description, according to the present invention, generation of an acoustic signal according to sequence data can be performed with higher timing accuracy.
Therefore, by applying the present invention, it is possible to improve the quality of the acoustic signal generated according to the sequence data.

10…電子音楽装置、11…CPU、12…ROM、13…RAM、14…記憶装置、15…通信I/F、16…検出回路、17…表示回路、18…音源回路、19…システムバス、21…操作子、22…表示器、23…DAC、24…サウンドシステム、25…波形メモリ、111…楽曲データ取得部、112…先読み用データ生成部、113…演奏操作検出部、114…演奏データ生成部、115…演奏データ取得部、116…音源制御部、117…タイマ、181…レジスタ、182…タイマ、183…読出回路、184…楽音制御回路 DESCRIPTION OF SYMBOLS 10 ... Electronic music apparatus, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Storage device, 15 ... Communication I / F, 16 ... Detection circuit, 17 ... Display circuit, 18 ... Sound source circuit, 19 ... System bus, 21: Operator, 22: Display, 23: DAC, 24: Sound system, 25: Waveform memory, 111: Music data acquisition unit, 112: Data for prefetching generation unit, 113: Performance operation detection unit, 114: Performance data Generation unit 115 Performance data acquisition unit 116 Sound source control unit 117 Timer 181 register 182 Timer 183 read circuit 184 Tone control circuit

Claims (6)

コンピュータを、音源装置に発音指示を行う発音制御装置として機能させるためのプログラムであって、
前記コンピュータを、
所定の時間間隔のタイミングでそれぞれ、予め用意されたシーケンスデータに従って該タイミングから所定時間以内に実行すべき発音指示または該タイミング以降に実行すべき所定量の発音指示を、その発音指示の実行タイミングの指定と共に前記音源装置に供給する指示供給手段として機能させるためのプログラム。
A program for causing a computer to function as a sound generation control device for instructing a sound source device to generate sound,
The computer,
A sound generation instruction to be executed within a predetermined time from the timing according to sequence data prepared at a predetermined time interval timing or a predetermined amount of sound generation instruction to be executed after the timing is A program for functioning as instruction supply means for supplying the sound source device together with specification.
請求項1に記載のプログラムであって、
前記音源装置に対する前記実行タイミングの指定は、前記所定の時間間隔よりも細かい単位で行われるものであることを特徴とするプログラム。
The program according to claim 1, wherein
The program according to the present invention, wherein the specification of the execution timing for the sound source device is performed in units smaller than the predetermined time interval.
請求項1又は2に記載のプログラムであって、
前記指示供給手段は、前記予め用意されたシーケンスデータに含まれるもの以外の演奏データを検出した場合に、該演奏データと対応する発音指示を、その発音指示を直ちに実行すべき旨の指定と共に前記音源装置に供給する手段を備えることを特徴とするプログラム。
The program according to claim 1 or 2,
When the instruction supply means detects performance data other than those included in the previously prepared sequence data, the instruction supply means may specify a tone generation instruction corresponding to the performance data, together with a designation to immediately execute the sound generation instruction. A program comprising means for supplying a sound source device.
音源装置であって、
発音指示と、該発音指示の実行タイミングとを記憶する記憶手段と、
前記記憶手段に記憶されている発音指示に従った音響信号出力を、該発音指示と対応して前記記憶手段に記憶されている実行タイミングに開始する制御手段とを備え、
前記制御手段は、出力する音響信号のサンプリング周期に基づき予め定めた周期で、前記記憶手段に記憶されている発音指示の実行タイミングが到来したか否かを確認し、
前記制御手段の機能は、前記記憶手段に記憶させるべき発音指示及び実行タイミングを供給する機能を実現するプロセッサとは異なるハードウェアにより実現され、
さらに、
タイマと、
前記タイマがカウントする時間の情報を前記プロセッサに提供する手段とを備えることを特徴とする音源装置。
A sound source device,
Storage means for storing a pronunciation instruction and an execution timing of the pronunciation instruction;
And control means for starting an acoustic signal output according to the sound generation instruction stored in the storage means at an execution timing stored in the storage means in correspondence with the sound generation instruction.
The control means confirms whether or not the execution timing of the sound generation instruction stored in the storage means has arrived at a predetermined cycle based on the sampling cycle of the sound signal to be output .
The function of the control means is realized by hardware different from a processor that realizes a function of supplying a tone generation instruction and an execution timing to be stored in the storage means,
further,
Timer and
Means for providing information on time counted by the timer to the processor .
音源装置であって、
発音指示と、該発音指示の実行タイミングとを記憶する記憶手段と、
前記記憶手段に記憶されている発音指示に従った音響信号出力を、該発音指示と対応して前記記憶手段に記憶されている実行タイミングに開始する制御手段とを備え、
前記制御手段の機能は、前記記憶手段に記憶させるべき発音指示及び実行タイミングを供給する機能を実現するプロセッサとは異なるハードウェアにより実現されており、
さらに、
タイマと、
前記タイマがカウントする時間の情報を前記プロセッサに提供する手段とを備えることを特徴とする音源装置。
A sound source device,
Storage means for storing a pronunciation instruction and an execution timing of the pronunciation instruction;
And control means for starting an acoustic signal output according to the sound generation instruction stored in the storage means at an execution timing stored in the storage means in correspondence with the sound generation instruction.
The function of the control means is realized by hardware different from a processor that realizes a function of supplying a sound generation instruction and an execution timing to be stored in the storage means,
further,
Timer and
Means for providing information on time counted by the timer to the processor.
音源部に発音指示を行う発音制御部と、前記音源部とを備えた音響信号生成装置であって、
前記発音制御部は、
所定の時間間隔のタイミングでそれぞれ、予め用意されたシーケンスデータに従って該タイミングから所定時間以内に実行すべき発音指示を、その発音指示の実行タイミングの指定と共に前記音源部に供給する指示供給手段を備え、
前記音源部は、
前記発音制御部から供給される発音指示と、該発音指示の実行タイミングとを記憶する記憶手段と、
前記記憶手段に記憶されている発音指示に従った音響信号出力を、該発音指示と対応して前記記憶手段に記憶されている実行タイミングに開始する制御手段とを備えることを特徴とする音響信号生成装置。
An acoustic signal generation device comprising: a sound generation control unit that instructs a sound source unit to sound the sound generation unit; and the sound source unit,
The sound generation control unit
The sound source unit includes instruction supply means for supplying a sound generation instruction to be executed within a predetermined time from the timing according to sequence data prepared in advance at a predetermined time interval timing and specifying the execution timing of the sound generation instruction. ,
The sound source unit is
Storage means for storing a sound generation instruction supplied from the sound generation control unit and an execution timing of the sound generation instruction;
Audio signal output according to the sound generation instruction stored in the storage means, and control means for starting the execution timing stored in the storage means in correspondence with the sound generation instruction Generator.
JP2015045479A 2015-03-09 2015-03-09 Program, sound source device and acoustic signal generation device Active JP6531432B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015045479A JP6531432B2 (en) 2015-03-09 2015-03-09 Program, sound source device and acoustic signal generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015045479A JP6531432B2 (en) 2015-03-09 2015-03-09 Program, sound source device and acoustic signal generation device

Publications (2)

Publication Number Publication Date
JP2016166911A JP2016166911A (en) 2016-09-15
JP6531432B2 true JP6531432B2 (en) 2019-06-19

Family

ID=56898319

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015045479A Active JP6531432B2 (en) 2015-03-09 2015-03-09 Program, sound source device and acoustic signal generation device

Country Status (1)

Country Link
JP (1) JP6531432B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6597583B2 (en) * 2016-12-14 2019-10-30 京セラドキュメントソリューションズ株式会社 Agitating and conveying member, developing device including the same, and image forming apparatus

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3138585B2 (en) * 1994-01-14 2001-02-26 株式会社河合楽器製作所 Electronic tone generator
JP3409642B2 (en) * 1997-05-20 2003-05-26 ヤマハ株式会社 Automatic performance device, automatic performance data processing method, and electronic information storage medium
JP3552675B2 (en) * 2001-03-27 2004-08-11 ヤマハ株式会社 Waveform generation method and apparatus
JP2007333780A (en) * 2006-06-12 2007-12-27 Oki Electric Ind Co Ltd Multi-polyphonic sounding audio source system
JP5839156B2 (en) * 2010-03-10 2016-01-06 ヤマハ株式会社 Music signal generator

Also Published As

Publication number Publication date
JP2016166911A (en) 2016-09-15

Similar Documents

Publication Publication Date Title
US8772618B2 (en) Mixing automatic accompaniment input and musical device input during a loop recording
JP6011064B2 (en) Automatic performance device and program
JP3744216B2 (en) Waveform forming apparatus and method
JP4274152B2 (en) Music synthesizer
JP6252088B2 (en) Program for performing waveform reproduction, waveform reproducing apparatus and method
JP4702160B2 (en) Musical sound synthesizer and program
US9396715B2 (en) Technique for generating audio data for loop reproduction on the basis of performance data
JP4802857B2 (en) Musical sound synthesizer and program
JP5533892B2 (en) Performance equipment
JP3878485B2 (en) Waveform playback device
JP6531432B2 (en) Program, sound source device and acoustic signal generation device
JP2010113278A (en) Music processing device and program
JP7367835B2 (en) Recording/playback device, control method and control program for the recording/playback device, and electronic musical instrument
JP4552769B2 (en) Musical sound waveform synthesizer
JP6528752B2 (en) Tone reproduction apparatus, tone reproduction method, program and electronic musical instrument
JP3904012B2 (en) Waveform generating apparatus and method
JP4236570B2 (en) Waveform playback device and waveform playback program
JP3407625B2 (en) Automatic performance apparatus, automatic performance method, and medium recording program
JP4062193B2 (en) Automatic accompaniment playback position detection device, automatic accompaniment device, automatic accompaniment playback position detection program, and automatic accompaniment control program
JP4172366B2 (en) Automatic performance device, automatic performance program, automatic performance data and recording medium recording the data
JP3757664B2 (en) Performance information reproducing apparatus and computer-readable recording medium recording performance information reproducing program
JP4031308B2 (en) Automatic performance program
JP3407563B2 (en) Automatic performance device and automatic performance method
JPH1031486A (en) Method and device for performance data storage and reproducing
JP4835433B2 (en) Performance pattern playback device and computer program therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180125

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181204

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181219

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190423

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190506

R151 Written notification of patent or utility model registration

Ref document number: 6531432

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151