JPH06186973A - Pitch detecting device - Google Patents

Pitch detecting device

Info

Publication number
JPH06186973A
JPH06186973A JP4356843A JP35684392A JPH06186973A JP H06186973 A JPH06186973 A JP H06186973A JP 4356843 A JP4356843 A JP 4356843A JP 35684392 A JP35684392 A JP 35684392A JP H06186973 A JPH06186973 A JP H06186973A
Authority
JP
Japan
Prior art keywords
pitch
zero
switch
input waveform
value
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
JP4356843A
Other languages
Japanese (ja)
Other versions
JP2969138B2 (en
Inventor
Susumu Ishibashi
進 石橋
Yukihiro Kawaguchi
幸裕 河口
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 JP4356843A priority Critical patent/JP2969138B2/en
Publication of JPH06186973A publication Critical patent/JPH06186973A/en
Application granted granted Critical
Publication of JP2969138B2 publication Critical patent/JP2969138B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Electrophonic Musical Instruments (AREA)

Abstract

PURPOSE:To accurately detect the pitch of a musical sound signal by specifying a part of a sound waveform where the pitch is relatively stable and measuring the pitch of the sound waveform at the specified stable pitch part. CONSTITUTION:When the input waveform from an external electronic musical instrument is inputted to a zero-cross detecting circuit 5 and an A/D converter 6, a CPU 1 does not perform a pitch calculating process immediately, but judges whether or not the amplitude value of the input waveform exceeds a specific threshold value from the output of the A/D converter 6. When the amplitude value of the input waveform exceeds the threshold value, it is judged for the 1st time that the pitch of the input waveform becomes stable; and a zero-cross interruption process is performed in response to a zero-cross interruption signal from the zero-cross detecting circuit 5, a counted value of a half pitch of the input waveform is stored in a cycle register, and a calculation effective state is set. Namely, the pitch detecting process is made ineffective at the leading edge part of the input waveform and an unstable pitch part at the time of attenuation.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】この発明は、ギター等の電気楽器
から出力される楽音信号や音声等のピッチを検出するピ
ッチ検出装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a pitch detecting device for detecting the pitch of a musical tone signal or voice output from an electric musical instrument such as a guitar.

【0002】[0002]

【従来の技術】ピッチ検出装置は、ギター等の電気楽器
から出力される楽音信号のピッチを検出し、その検出さ
れたピッチの値が基準ピッチに対してどのくらいずれて
いるかを算出し、そのズレ量を表示するものである。従
って、演奏者(ユーザ)はそのズレ量が見ながら電気楽
器等のチューニングを行っていた。また、電子楽器等の
パラメータを設定する場合には、キーボード等と一体に
設けられたパネルスイッチ等を演奏者が操作して設定を
行っていた。
2. Description of the Related Art A pitch detecting apparatus detects the pitch of a musical tone signal output from an electric musical instrument such as a guitar, calculates the value of the detected pitch with respect to a reference pitch, and shifts the deviation. It shows the quantity. Therefore, the performer (user) tunes an electric musical instrument or the like while watching the amount of deviation. Further, when setting parameters of an electronic musical instrument or the like, a player operates a panel switch or the like provided integrally with a keyboard or the like to perform the setting.

【0003】[0003]

【発明が解決しようとする課題】ところが、従来のピッ
チ検出装置は、楽音信号が立ち上がってから減衰するま
での間、すなわちギター等の場合にはピッキングの開始
時から楽音が減衰するまでの全範囲に渡ってピッチを検
出し、その検出値を表示しているため、ピッキング開始
時や楽音減衰時にはピッチ表示用の針が必要以上に大き
く振れたり、ピッチ表示用のLEDが頻繁に点滅したり
してピッチを認識しにくいという問題があった。これ
は、ピッキング開始時や楽音減衰時には振動が不安定と
なり、楽音のピッチが比較的激しく変動しやすいからで
ある。また、電子楽器等にパラメータを設定する場合、
通常はパネルスイッチ等で設定していたため、ギター奏
者が電子楽器を使う場合(例えば、自動演奏装置等をギ
ターのバッキングとして使うような場合)には、ギター
を抱えながらパネルスイッチを操作しなければならず、
非常にめんどうであった。
However, in the conventional pitch detecting device, the entire range from the rise of the musical tone signal to the attenuation thereof, that is, in the case of a guitar or the like, from the start of picking to the attenuation of the musical tone. Since the pitch is detected over the display and the detected value is displayed, the pitch display hand may shake more than necessary when the picking starts or the musical sound is attenuated, or the pitch display LED may blink frequently. There was a problem that it was difficult to recognize the pitch. This is because the vibration becomes unstable at the start of picking or when the musical sound is attenuated, and the pitch of the musical sound tends to change relatively sharply. Also, when setting parameters for electronic musical instruments etc.,
Normally, it was set with the panel switch, so when the guitar player uses an electronic musical instrument (for example, when using an automatic performance device as the backing of the guitar), the panel switch must be operated while holding the guitar. Not
It was very troublesome.

【0004】この発明は上述の点に鑑みてなされたもの
であり、楽音信号のピッチを正確に検出することのでき
るピッチ検出装置を提供することを第1の目的とする。
この発明は、パネルスイッチ等を操作することなく電子
楽器の外部に設けられた電気楽器等から直接パラメータ
を設定することのできるピッチ検出装置を提供すること
を第2の目的とする。
The present invention has been made in view of the above points, and it is a first object of the present invention to provide a pitch detecting device capable of accurately detecting the pitch of a tone signal.
A second object of the present invention is to provide a pitch detecting device capable of setting parameters directly from an electric musical instrument or the like provided outside an electronic musical instrument without operating a panel switch or the like.

【0005】[0005]

【課題を解決するための手段】第1の発明に係るピッチ
検出装置は、外部から入力された音波形のうち比較的ピ
ッチの安定した箇所を特定する安定箇所特定手段と、こ
の安定箇所特定手段によって特定されたピッチ安定箇所
のピッチを計測し、この計測されたピッチを前記外部か
ら入力された音波形のピッチとするピッチ計測手段とを
具えたものである。
A pitch detecting device according to a first aspect of the present invention is a stable position specifying device for specifying a relatively stable pitch position of a sound waveform input from the outside, and this stable position specifying device. And a pitch measuring means for measuring the pitch of the pitch stable portion specified by the above, and setting the measured pitch as the pitch of the sound waveform inputted from the outside.

【0006】第2の発明に係るピッチ検出装置は、外部
から入力された音波形のピッチを検出するピッチ検出手
段と、このピッチ検出手段によって検出されたピッチに
基づいて電子楽器のパラメータを設定するパラメータ設
定手段とを具えたものである。
A pitch detecting device according to a second aspect of the present invention sets pitch detecting means for detecting a pitch of a sound waveform inputted from the outside, and sets a parameter of an electronic musical instrument based on the pitch detected by the pitch detecting means. It is provided with a parameter setting means.

【0007】[0007]

【作用】第1の発明に係るピッチ検出装置は、ギター等
の電気楽器の楽音信号や音声等の音波形を入力し、この
音波形のピッチを検出する。このとき、安定箇所特定手
段は音波形のうち比較的ピッチの安定した箇所を特定す
る。すなわち、楽音信号や音声等の立上り部分や減衰部
分はピッチが激しく変動し不安定なので、この部分のピ
ッチを検出したとしても音波形のピッチとしては不正確
なものを計測することになってしまう。そこで、音波形
のうち比較的ピッチの安定した箇所を安定箇所特定手段
で特定し、ピッチ計測手段は特定されたピッチ安定箇所
における音波形のピッチを計測する。これによって、ピ
ッチ計測手段は音波形の正確なピッチを計測することが
できる。
The pitch detecting apparatus according to the first aspect of the present invention inputs a tone waveform of a musical tone signal or voice of an electric musical instrument such as a guitar and detects the pitch of this tone waveform. At this time, the stable part specifying means specifies a part of the sound waveform with a relatively stable pitch. That is, since the pitch of the rising portion and the attenuation portion of the musical tone signal or voice is drastically changed and unstable, even if the pitch of this portion is detected, an inaccurate sound wave pitch is measured. . Therefore, the place having a relatively stable pitch in the sound waveform is specified by the stable part specifying means, and the pitch measuring means measures the pitch of the sound wave at the specified pitch stable part. As a result, the pitch measuring means can measure the accurate pitch of the sound waveform.

【0008】なお、安定箇所特定手段は音波形の振幅レ
ベルが所定値以下の場合を不安定箇所、所定値以上の場
合を安定箇所と特定したり、音波形が入力してから所定
時間経過するまでを不安定箇所、所定時間経過後を安定
箇所と特定し、この安定箇所におけるピッチ計測終了後
は次の音波形が入力するまでの間を再び不安定箇所と特
定したり、又は音波形が入力してから所定時間経過後に
振幅レベルが所定値以上の場合に限り安定箇所と特定し
たりしてもよい。また、ピッチ計測手段は、安定箇所又
は不安定箇所に係わらず常にピッチを計測しておき、計
測したピッチのうち、安定箇所におけるピッチを有効な
ものとして処理し、不安定箇所におけるピッチを無効な
ものとして処理してもよいし、又は安定箇所におけるピ
ッチのみを計測するようにして、不安定箇所におけるピ
ッチの計測を行わないようにしてもよい。
The stable point specifying means specifies an unstable point when the amplitude level of the sound waveform is below a predetermined value and a stable point when the amplitude level of the sound wave is above a predetermined value, or passes a predetermined time after the sound wave is input. Is identified as an unstable point, and after a predetermined time has elapsed is identified as a stable point, and after the pitch measurement at this stable point is completed, it is identified again as an unstable point until the next sound waveform is input, or the sound waveform is A stable location may be specified only when the amplitude level is equal to or higher than a predetermined value after a predetermined time has elapsed after the input. Further, the pitch measuring means always measures the pitch regardless of the stable portion or the unstable portion, processes the pitch in the stable portion among the measured pitches as valid, and invalidates the pitch in the unstable portion. Alternatively, the pitch may be measured only at stable points, and the pitch may not be measured at unstable points.

【0009】第2の発明に係るピッチ検出装置は、外部
から入力された音波形のピッチを検出するピッチ検出手
段によって検出されたピッチに基づいて電子楽器のパラ
メータを設定する。ピッチ検出手段は外部から入力され
る音波形が同じピッチのものであれば、再現性よく同じ
ピッチを検出するので、検出されたピッチに対して特定
のメッセージを割り当てることによって、電子楽器のパ
ラメータを設定することができる。例えば、検出された
ピッチをルートとしてコードを作成したり、それぞれの
ピッチにMIDIメッセージ等のデータを割り当てるこ
とによって、そのピッチを検出したらそのピッチに対応
したMIDIメッセージが入力したものとしてパラメー
タを設定したりすることができる。なお、パラメータ設
定手段により電子楽器のパラメータを一旦設定した後
は、設定したパラメータが変動しないように設定動作を
終了するのが望ましい。
The pitch detecting device according to the second aspect of the invention sets the parameters of the electronic musical instrument based on the pitch detected by the pitch detecting means for detecting the pitch of the sound waveform input from the outside. If the sound waveform input from the outside has the same pitch, the pitch detection means detects the same pitch with good reproducibility. Therefore, by assigning a specific message to the detected pitch, the parameters of the electronic musical instrument can be set. Can be set. For example, by creating a chord with the detected pitch as a root or assigning data such as a MIDI message to each pitch, when the pitch is detected, the parameters are set as if the MIDI message corresponding to the pitch is input. You can It should be noted that, once the parameter of the electronic musical instrument is once set by the parameter setting means, it is desirable to end the setting operation so that the set parameter does not change.

【0010】[0010]

【実施例】以下、この発明の実施例を添付図面に従って
詳細に説明する。図1はこの発明に係るピッチ検出装置
(チューニング装置)を内蔵した楽音処理装置の全体構
成を示すハードブロック図である。この実施例で説明す
る楽音処理装置は、効果付与装置と自動演奏装置とチュ
ーニング装置とが一体で構成された自動演奏及びチュー
ニング機能付き効果付与装置である。
Embodiments of the present invention will now be described in detail with reference to the accompanying drawings. FIG. 1 is a hardware block diagram showing the overall construction of a musical tone processing apparatus incorporating a pitch detecting apparatus (tuning apparatus) according to the present invention. The tone processing apparatus described in this embodiment is an effect imparting apparatus with an automatic performance and tuning function in which an effect imparting apparatus, an automatic performance apparatus and a tuning apparatus are integrally formed.

【0011】マイクロプロセッサユニット(CPU)1
は、この効果付与装置全体の動作を制御するものであ
る。このCPU1に対して、データ及びアドレスバス1
9を介してROM2、RAM3、タイマ4、A/D変換
器6、MIDIインターフェイス7、音源回路8、デジ
タル信号処理プロセッサ(DSP)9、ミュート回路1
1、音量制御回路13、スイッチ検出回路15、表示回
路16が接続されている。この実施例では1つのCPU
1によって効果付与処理、自動演奏処理及びチューニン
グ処理を実行する効果付与装置について説明するが、効
果付与処理、自動演奏処理及びチューニング処理をそれ
ぞれ別個のCPUで処理するように構成されたものにも
同様に適用できる。
Microprocessor unit (CPU) 1
Controls the operation of the entire effect imparting device. Data and address bus 1 for this CPU 1
ROM 2, RAM 3, timer 4, A / D converter 6, MIDI interface 7, tone generator circuit 8, digital signal processor (DSP) 9, mute circuit 1
1, a volume control circuit 13, a switch detection circuit 15, and a display circuit 16 are connected. One CPU in this embodiment
The effect imparting device for executing the effect imparting process, the automatic performance process, and the tuning process will be described with reference to item 1. However, the same applies to those configured such that the effect imparting process, the automatic performance process, and the tuning process are processed by separate CPUs. Applicable to

【0012】ROM2はCPU1の制御プログラムやD
SP9に設定される複数のマイクロプログラムや各種の
データを記憶するものであり、リードオンリーメモリ
(ROM)で構成されている。従って、エフェクトの種
類を切り換える場合には、このROM2から対応したマ
イクロプログラムを読み出して、DSP9に設定すれば
よい。RAM3は、CPU1が制御プログラムを実行す
る際に発生する各種データを一時的に記憶する各種レジ
スタやフラグとして利用されるメモリ領域や、自動演奏
データを記憶するメモリ領域、エフェクトのパラメータ
を記憶するメモリ領域等に分割され、ランダムアクセス
メモリ(RAM)の所定のアドレス領域が適当に割り当
てられる。自動演奏データは、伴奏パターンを記憶する
パターンデータ領域と、パターンデータの演奏順を曲の
進行順に記憶したソング領域とから構成される。そし
て、ソング領域には、コードの進行順を指示するデータ
やエフェクトの切り換えを指示するプログラムチェンジ
データ等が記録されている。このプログラムチェンジデ
ータによって外部入力音に対して付与するエフェクトを
曲の進行状況に同期させて順次自動的に切り換えること
ができる。
The ROM 2 is a control program for the CPU 1 and D
It stores a plurality of micro programs and various data set in SP9, and is composed of a read only memory (ROM). Therefore, when switching the effect type, the corresponding microprogram may be read from the ROM 2 and set in the DSP 9. The RAM 3 is a memory area used as various registers and flags for temporarily storing various data generated when the CPU 1 executes the control program, a memory area for storing automatic performance data, and a memory for storing effect parameters. It is divided into areas and the like, and a predetermined address area of the random access memory (RAM) is appropriately allocated. The automatic performance data is composed of a pattern data area for storing accompaniment patterns and a song area for storing the performance order of the pattern data in the order of progression of the music. In the song area, data for instructing the chord progression order, program change data for instructing effect switching, and the like are recorded. With this program change data, the effect applied to the external input sound can be sequentially and automatically switched in synchronization with the progress of the music.

【0013】タイマ4は、CPU1によって設定された
所定時間毎にCPU1に対して割り込み指令を出力す
る。ゼロクロス検出回路5はギター等の電気楽器からの
アナログ信号(外部音の入力信号)のピッチを計算する
ために、そのアナログ信号波形のゼロクロス点を検出す
るものであり、ゼロクロスを検出する毎にCPU1に対
して割り込み指令を出力する。A/D変換器はギター等
の電気楽器からのアナログ信号をデジタル信号に変換
し、そのデジタル信号を直接DSP9に出力すると共に
データ及びアドレスバス19を介してCPU1に出力す
る。
The timer 4 outputs an interrupt command to the CPU 1 every predetermined time set by the CPU 1. The zero-cross detection circuit 5 detects the zero-cross point of the analog signal waveform in order to calculate the pitch of the analog signal (the input signal of the external sound) from an electric musical instrument such as a guitar, and the CPU 1 detects the zero-cross every time the zero-cross is detected. The interrupt command is output to. The A / D converter converts an analog signal from an electric musical instrument such as a guitar into a digital signal, and directly outputs the digital signal to the DSP 9 and the CPU 1 via the data and address bus 19.

【0014】MIDIインターフェイス7はMIDI対
応の外部機器からMIDIデータを入力したり、外部機
器に対してMIDIデータを出力したりするためのイン
ターフェイスであり、外部機器からMIDIデータを入
力したときはCPU1に対して割り込み指令を出力す
る。音源回路8は複数のチャンネルで楽音信号の同時発
生が可能であり、データ及びアドレスバス19を経由し
て与えられた演奏データ(MIDI規格に準拠したノー
トオンデータ、ノートナンバデータ、ベロシティデータ
や波形データ等)を入力し、このデータに基づき自動演
奏用の楽音信号を発生するものである。音源回路8から
発生された楽音信号は、DSP9に供給される。
The MIDI interface 7 is an interface for inputting MIDI data from an external device compatible with MIDI and outputting MIDI data to the external device. When the MIDI data is input from the external device, the MIDI interface 7 is sent to the CPU 1. An interrupt command is output to the device. The tone generator circuit 8 is capable of simultaneously generating musical tone signals on a plurality of channels, and provides performance data (note-on data, note number data, velocity data and waveform conforming to the MIDI standard) given via the data and address bus 19. Data, etc.) is input and a musical tone signal for automatic performance is generated based on this data. The tone signal generated by the tone generator circuit 8 is supplied to the DSP 9.

【0015】DSP9はA/D変換器6からの外部音及
び音源回路8からの自動演奏用楽音信号に対して内部メ
モリに記憶されているマイクロプログラムに応じたエフ
ェクトを付与してミュート回路11に出力する。DSP
9は外部音と自動演奏用楽音信号の2系統に対してそれ
ぞれ異なる演算を施して、それぞれ異なるエフェクトを
付与する。例えば、DSP9は外部音に対してはコンプ
レッサ、ディストーション、イコライザ、コーラス、デ
ィレイ、リバーブ等のエフェクトを付与し、自動演奏用
楽音信号に対してはリバーブ等のエフェクトを付与す
る。従って、このDSP9には、ディレイ及びリバーブ
用のディレイRAM10が接続されている。
The DSP 9 applies an effect corresponding to the microprogram stored in the internal memory to the external sound from the A / D converter 6 and the musical tone signal for automatic performance from the tone generator circuit 8 to the mute circuit 11. Output. DSP
Reference numeral 9 applies different calculations to the two systems of the external sound and the musical tone signal for automatic performance to give different effects. For example, the DSP 9 applies effects such as compressor, distortion, equalizer, chorus, delay, reverb to external sounds, and effects such as reverb to musical tone signals for automatic performance. Therefore, the DSP 9 is connected to the delay RAM 10 for delay and reverb.

【0016】ミュート回路11はDSP9のマイクロプ
ログラムを書き換える際に発生するノイズをカットする
ためのものであり、外部音用と自動演奏用の2系統が用
意されている。通常はミュート解除状態にあるが、DS
P9のマイクロプログラムが書き換えられる時には、対
応する系統の回路がミュート状態となる。従って、ミュ
ート回路11を通過した信号はD/A変換器12を介し
て音量制御回路13に入力する。D/A変換器12はミ
ュート回路を通過してきたデジタル信号をアナログ信号
に変換して音量制御回路13に出力する。音量制御回路
13は外部音と自動演奏用楽音の音量バランスを制御
し、それらのアナログ信号を外部のサウンドシステム等
に出力する。
The mute circuit 11 is for cutting noise generated when the microprogram of the DSP 9 is rewritten, and two systems for external sound and automatic performance are prepared. Normally in mute release state, but DS
When the microprogram of P9 is rewritten, the circuit of the corresponding system is in the mute state. Therefore, the signal that has passed through the mute circuit 11 is input to the volume control circuit 13 via the D / A converter 12. The D / A converter 12 converts the digital signal passing through the mute circuit into an analog signal and outputs it to the volume control circuit 13. The volume control circuit 13 controls the volume balance between the external sound and the musical tone for automatic performance, and outputs those analog signals to an external sound system or the like.

【0017】パネルスイッチ14は、エフェクタのパラ
メータ設定スイッチEP、エフェクト切り換えスイッチ
EC、自動演奏スタート/ストップスイッチST、自動
演奏データ入力スイッチDI、テンポ変更スイッチT
P、フットスイッチFS1〜FS5、アサイン用フット
スイッチASFS、その他の各種操作子や液晶パネルL
CD、発光ダイオードLED等を有する。液晶パネルL
CDはパネルスイッチ14の表面に設けられ、エフェク
トのプログラム番号、パラメータ、自動演奏データ、テ
ンポ、検出した外部音のピッチ等を表示し、発光ダイオ
ードLEDはフットスイッチFS1〜FS5,ASFS
の上側に設けられており、現在どのフットスイッチがオ
ン状態であるかを点灯表示する。スイッチ検出回路15
は、パネルスイッチ14上の各種スイッチの操作状態を
検出し、データ及びアドレスバス19を介してCPU1
にスイッチ割り込み信号として出力する。 表示回路1
6はパネルスイッチ14上の液晶パネルLCDや発光ダ
イオードLED等のを駆動制御するものである。
The panel switch 14 includes effector parameter setting switch EP, effect switching switch EC, automatic performance start / stop switch ST, automatic performance data input switch DI, tempo change switch T.
P, foot switches FS1 to FS5, assigning foot switch ASFS, other various operators and liquid crystal panel L
It has a CD, a light emitting diode LED and the like. LCD panel L
The CD is provided on the surface of the panel switch 14 and displays the effect program number, parameters, automatic performance data, tempo, detected external sound pitch, etc., and the light emitting diode LEDs are the foot switches FS1 to FS5 and ASFS.
Is provided on the upper side of and lights up to indicate which foot switch is currently in the ON state. Switch detection circuit 15
Detects the operating states of various switches on the panel switch 14 and sends the data to the CPU 1 via the data and address bus 19.
To switch interrupt signal. Display circuit 1
Reference numeral 6 is for driving and controlling the liquid crystal panel LCD, the light emitting diode LED, and the like on the panel switch 14.

【0018】次に、CPU1によって実行される図1の
自動演奏及びチューニング機能付き効果付与装置の処理
の一例を図2以下のフローチャートに基づいて説明す
る。CPU1の処理は、図2から図4までのメインルー
チン処理と、図5から図11までの割り込み処理とから
構成されている。図2はCPU1が処理するメインルー
チンの一例を示すフローチャート図である。このメイン
ルーチンでは、電源が投入されると、CPU1はROM
2に格納されている制御プログラムに応じた処理を開始
し、RAM3内の各種レジスタ及びフラグ等を初期設定
するイニシャライズ処理を行う。このイニシャライズ処
理の後、CPU1はマイクロプログラムロード処理とピ
ッチ計算処理を繰り返し実行する。
Next, an example of the processing of the automatic performance and effect imparting device with tuning function of FIG. 1 executed by the CPU 1 will be described with reference to the flowcharts of FIG. The processing of the CPU 1 is composed of the main routine processing shown in FIGS. 2 to 4 and the interrupt processing shown in FIGS. 5 to 11. FIG. 2 is a flowchart showing an example of a main routine processed by the CPU 1. In this main routine, when the power is turned on, the CPU 1
A process according to the control program stored in 2 is started, and an initialization process for initializing various registers and flags in the RAM 3 is performed. After this initialization processing, the CPU 1 repeatedly executes the micro program loading processing and the pitch calculation processing.

【0019】図3は図2のマイクロプログラムロード処
理の詳細を示すフローチャート図である。CPU1はこ
のマイクロプログラムロード処理を次のようなステップ
で順番に実行する。 ステップ31:プログラムチェンジ指示有りかどうかを
判定し、有り(YES)の場合は次のステップに進み、
無し(NO)の場合はリターンしてピッチ計算処理を実
行する。ここで、プログラムチェンジ指示が有りと判定
されるのは、パネルスイッチ14上のエフェクト切り換
えスイッチECが操作された場合、図5のMIDI割り
込み処理においてMIDIのプログラムチェンジコマン
ドが受信された場合、図8の自動演奏割り込み処理にお
いて演奏データとしてプログラムチェンジデータが読み
出された場合、または図9のスイッチモニタ割り込み処
理においてエフェクトモードでフットスイッチFS1〜
FS5が押された場合のいずれかである。
FIG. 3 is a flow chart showing details of the microprogram loading process of FIG. The CPU 1 sequentially executes this microprogram loading process in the following steps. Step 31: It is judged whether or not there is a program change instruction, and if there is (YES), proceed to the next step,
If not present (NO), the process returns and the pitch calculation process is executed. Here, it is determined that the program change instruction is present, when the effect change switch EC on the panel switch 14 is operated, when the MIDI program change command is received in the MIDI interrupt processing of FIG. When the program change data is read as the performance data in the automatic performance interruption processing of No. 1 or in the switch monitor interruption processing of FIG.
Either is when FS5 is pressed.

【0020】前のステップでプログラムチェンジ指示有
りと判定された場合には、CPU1はDSP9の内部メ
モリに記憶されているマイクロプログラムを指示された
マイクロプログラムに書き換えるためにステップ32か
らステップ36までのエフェクト切り換え処理を実行す
る。 ステップ32:マイクロプログラムの書き換え処理時に
発生するノイズをカットするためにCPU1はミュート
回路11にミュート動作の開始を指示する。これによっ
て、ミュート回路11はDSP9から出力されたデータ
をミュートする。
If it is determined in the previous step that there is a program change instruction, the CPU 1 rewrites the microprogram stored in the internal memory of the DSP 9 with the instructed microprogram, and effects from step 32 to step 36 Execute the switching process. Step 32: The CPU 1 instructs the mute circuit 11 to start the mute operation in order to cut noise generated during the rewriting process of the microprogram. As a result, the mute circuit 11 mutes the data output from the DSP 9.

【0021】ステップ33:マイクロプログラムの書き
換えに伴ってディレイ用RAM10内に記憶されている
前のエフェクト処理で使用した不要なデータをクリアす
る。 ステップ34:指定されたエフェクトに対応するマイク
ロプログラムをROM2から読み出し、DSP9の内部
メモリに転送して書き込む。 ステップ35:ステップ33のディレイRAM10のク
リア動作が完了したかどうかを判定し、完了した(YE
S)場合には次のステップに進み、完了していない(N
O)場合は完了するまでこの判定を繰り返す。 ステップ36:マイクロプログラムの書き換え処理が終
了したので、ミュート回路11にミュート動作の解除を
指示する。
Step 33: Clear unnecessary data used in the previous effect processing which is stored in the delay RAM 10 as the microprogram is rewritten. Step 34: The microprogram corresponding to the designated effect is read from the ROM 2, transferred to the internal memory of the DSP 9 and written. Step 35: It is judged whether or not the clear operation of the delay RAM 10 in Step 33 is completed, and the operation is completed (YE
If S), proceed to the next step and do not complete (N
In the case of O), this judgment is repeated until it is completed. Step 36: Since the rewriting process of the microprogram is completed, the mute circuit 11 is instructed to cancel the mute operation.

【0022】図4は図2のピッチ計算処理の詳細を示す
フローチャート図である。CPU1はこのピッチ計算処
理を次のようなステップで順番に実行する。 ステップ41:計算有効状態かどうかを判定し、計算有
効(YES)の場合は次のステップに進み、計算無効
(NO)の場合はリターンしてマイクロプログラムロー
ド処理を実行する。ここで、計算有効状態となるのは、
図6のゼロクロス割り込み処理が実行され、サイクルレ
ジスタCYCLEに入力波形の半ピッチ分のカウント値
が格納された場合である。すなわち、外部の電気楽器か
ら図12のような入力波形がゼロクロス検出回路5及び
A/D変換器6に入力した場合、CPU1は直ちにピッ
チ計算処理を実行するのではなく、その入力波形の振幅
値が所定のしきい値RV以上となったかどうかをA/D
変換器6からの出力に基づいて判断する。そして、入力
波形の振幅値がしきい値RV以上になった場合に初め
て、入力波形のピッチが安定したと判断して、ゼロクロ
ス検出回路5からのゼロクロス割り込み信号に応じて図
6のゼロクロス割り込み処理を実行し、サイクルレジス
タCYCLEに入力波形の半ピッチ分のカウント値を格
納し、計算有効状態にする。図6のゼロクロス割り込み
処理が一通り実行されない限りこのピッチ計算処理は行
わない。すなわち、この実施例では入力波形の立上り部
分や減衰時のようにピッチの不安定な部分ではピッチ検
出処理を無効とする。なお、図6のゼロクロス割り込み
処理の詳細について後述する。
FIG. 4 is a flow chart showing the details of the pitch calculation process of FIG. The CPU 1 sequentially executes this pitch calculation process in the following steps. Step 41: It is judged whether or not the calculation is valid. If the calculation is valid (YES), the process proceeds to the next step. If the calculation is invalid (NO), the process returns to execute the microprogram loading process. Here, the calculation valid state is
This is the case where the zero-cross interrupt process of FIG. 6 is executed and the count value for half the pitch of the input waveform is stored in the cycle register CYCLE. That is, when an input waveform as shown in FIG. 12 is input to the zero cross detection circuit 5 and the A / D converter 6 from an external electric musical instrument, the CPU 1 does not immediately execute the pitch calculation process, but the amplitude value of the input waveform. A / D whether or not the value exceeds a predetermined threshold value RV
The judgment is made based on the output from the converter 6. Only when the amplitude value of the input waveform becomes equal to or greater than the threshold value RV, the pitch of the input waveform is determined to be stable, and the zero-cross interrupt processing of FIG. 6 is performed according to the zero-cross interrupt signal from the zero-cross detection circuit 5. Is executed, the count value for half the pitch of the input waveform is stored in the cycle register CYCLE, and the calculation is enabled. This pitch calculation process is not performed unless the zero cross interrupt process of FIG. 6 is executed once. That is, in this embodiment, the pitch detection process is invalidated at the rising portion of the input waveform or the portion where the pitch is unstable such as at the time of attenuation. The details of the zero-cross interrupt processing in FIG. 6 will be described later.

【0023】ステップ42:前のステップ41で計算有
効状態と判定されたので、ここではサイクルレジスタC
YCLEに格納されている入力波形の半ピッチ分のカウ
ント値に基づいてその入力波形のピッチ計算を行う。こ
こで、ピッチの計算はサイクルレジスタCYCLEに格
納されている入力波形の半ピッチ分のカウント値を複数
用いて計算をする。図12においてt7からtdまでの
6回分のサイクルレジスタCYCLEのカウント値を例
えば平均してピッチの計算をする。このステップ42に
おいては、6回分のサイクルレジスタCYCLEのカウ
ント値が蓄積されるまでは、1回分のサイクルレジスタ
CYCLEのカウント値を蓄積後すぐにリターンする。 ステップ43:前のステップ42で計算された計算値す
なわち入力波形のピッチデータをピッチレジスタPIT
CHに格納する。
Step 42: Since it was determined in the previous step 41 that the calculation is in the valid state, the cycle register C is used here.
The pitch of the input waveform is calculated based on the count value of the half pitch of the input waveform stored in YCLE. Here, the pitch is calculated by using a plurality of half pitch count values of the input waveform stored in the cycle register CYCLE. In FIG. 12, the count value of the cycle register CYCLE for six times from t7 to td is averaged, for example, to calculate the pitch. In this step 42, until the count value of the cycle register CYCLE for six times is accumulated, the count value of the cycle register CYCLE for one time is accumulated and then the process immediately returns. Step 43: The calculated value calculated in the previous step 42, that is, the pitch data of the input waveform is stored in the pitch register PIT.
Store in CH.

【0024】ステップ44:効果付与装置の現在のモー
ドがルートアサインモードかどうかを判定し、ルートア
サインモード(YES)の場合は次のステップ45に進
み、そうでない(NO)場合はステップ48に進む。 ステップ45:前のステップ44で現在のモードがルー
トアサインモードであると判定されたので、ここでは、
ピッチレジスタPITCHのピッチデータに対応する音
名を求め、アサイン状態にあるフットスイッチFS1〜
FS5のいずれかにその音名に応じたルートを設定す
る。すなわち、ここでは、検出されたピッチに応じてフ
ットスイッチのルートパラメータを設定するという処理
を行う。
Step 44: It is judged whether or not the current mode of the effect imparting device is the route assign mode. If the route assign mode (YES), the process proceeds to the next step 45, and if not (NO), the process proceeds to step 48. . Step 45: Since it was determined in the previous step 44 that the current mode is the route assign mode, here,
A pitch name corresponding to the pitch data of the pitch register PITCH is calculated, and the assigned foot switches FS1 to FS1
A route corresponding to the note name is set in any of FS5. That is, here, the process of setting the route parameter of the foot switch according to the detected pitch is performed.

【0025】ステップ46:ルートアサインモードを解
除する。これによって、ステップ45においてルートパ
ラメータが設定された後にルートパラメータが変動する
ことを防ぐことができる。 ステップ47:前のステップ44で現在のモードがルー
トアサインモードでないと判定されたので、チューニン
グモードかどうかを判定し、チューニングモード(YE
S)の場合は次のステップ48に進み、そうでない(N
O)場合はステップ49に進む。 ステップ48:ピッチレジスタPITCHに格納されて
いるピッチデータに対応したピッチの値をパネルスイッ
チ14上の液晶パネルLCDに表示し、操作者に知らせ
る。 ステップ49:計算無効状態及びピッチ無効状態にして
リターンする。
Step 46: Cancel the route assign mode. This can prevent the route parameter from changing after the route parameter is set in step 45. Step 47: Since it is determined in the previous step 44 that the current mode is not the route assign mode, it is determined whether or not it is the tuning mode, and the tuning mode (YE
If S), go to the next step 48, otherwise (N
O), the process proceeds to step 49. Step 48: The value of the pitch corresponding to the pitch data stored in the pitch register PITCH is displayed on the liquid crystal panel LCD on the panel switch 14 to inform the operator. Step 49: Return to the calculation invalid state and the pitch invalid state and return.

【0026】図5から図11までの割り込み処理は、優
先度に応じて優先レベル1から優先レベル6までに分類
されている。優先レベル1の割り込み処理が最も優先度
の低い処理であり、優先レベル6が最も優先度の高い処
理である。優先レベル1の処理は図8の自動演奏割り込
み処理と図9のスイッチモニタ割り込み処理である。優
先レベル2の処理は図11の1.6msec毎に実行さ
れるタイマ割り込み処理2である。優先レベル3の処理
は図7のテンポ割り込み処理である。優先レベル4の処
理は図10の2msec毎に実行されるタイマ割り込み
処理1である。優先レベル5の処理は図6のゼロクロス
割り込み処理である。優先レベル6の処理は図5のMI
DI割り込み処理である。これらの各割り込み処理はそ
の優先レベルの高いものが優先的に実行される。すなわ
ち、これらの各割り込み処理は自分よりも優先レベルの
低い割り込み処理が実行されている場合には、その割り
込み処理に割り込んで優先的に実行されるが、自分より
も優先レベルの高い割り込み処理が実行されている場合
にはその割り込み処理が終了するまで、待たされる。
The interrupt processes shown in FIGS. 5 to 11 are classified into priority levels 1 to 6 according to their priorities. Priority level 1 interrupt processing is the lowest priority processing, and priority level 6 is the highest priority processing. The processing of priority level 1 is the automatic performance interruption processing of FIG. 8 and the switch monitor interruption processing of FIG. The processing of priority level 2 is the timer interrupt processing 2 executed every 1.6 msec in FIG. The processing of priority level 3 is the tempo interrupt processing of FIG. The processing of priority level 4 is the timer interrupt processing 1 executed every 2 msec in FIG. The processing of priority level 5 is the zero-cross interrupt processing of FIG. The processing of priority level 6 is performed by MI in FIG.
This is DI interrupt processing. For each of these interrupt processes, the one with the higher priority level is preferentially executed. In other words, each of these interrupt processes interrupts the interrupt process having a lower priority level than itself and is executed with priority, but interrupt processes with a higher priority level than itself are executed. If it is being executed, it is kept waiting until the interrupt processing is completed.

【0027】図5は優先レベル6のMIDI割り込み処
理の詳細を示す図である。このMIDI割り込み処理は
発音遅れ等の不都合が生じないように最優先で実行され
る。このMIDI割り込み処理は、MIDIインターフ
ェイス7を介して外部のMIDI機器からMIDIデー
タが入力されたとき、MIDIインターフェイスからC
PU1に対して与えられるMIDI割り込み信号によっ
て起動する。CPU1はこのMIDI割り込み処理を次
のようなステップで順番に実行する。
FIG. 5 is a diagram showing details of priority level 6 MIDI interrupt processing. This MIDI interrupt processing is executed with the highest priority so that inconvenience such as sound generation delay does not occur. This MIDI interrupt process is performed by the MIDI interface C when MIDI data is input from an external MIDI device through the MIDI interface 7.
It is activated by a MIDI interrupt signal given to PU1. The CPU 1 sequentially executes this MIDI interrupt processing in the following steps.

【0028】ステップ51:MIDIインターフェイス
7のMIDIレシーブバッファ内のMIDIデータを読
み出す。 ステップ52:読み出したMIDIデータに応じた処理
を実行する。 ステップ53:MIDIレシーブバッファ内の全データ
を読み出したかどうかを判定し、全データを読み出した
(YES)場合はリターンして他の割り込み処理やメイ
ンルーチンを処理し、全データの読み出しが終了してい
ない(NO)場合はステップ51にリターンし、全デー
タの読み出しが終了するまで、ステップ51〜53の処
理を繰り返し実行する。
Step 51: Read the MIDI data in the MIDI receive buffer of the MIDI interface 7. Step 52: Perform processing according to the read MIDI data. Step 53: It is judged whether or not all the data in the MIDI receive buffer has been read, and if all the data has been read (YES), the process returns and other interrupt processing and the main routine are processed, and the reading of all the data is completed. If not (NO), the process returns to step 51, and the processes of steps 51 to 53 are repeatedly executed until the reading of all data is completed.

【0029】図6は優先レベル5のゼロクロス割り込み
処理の詳細を示す図である。このゼロクロス割り込み処
理は、テンポ計算の精度に関係するので、MIDI割り
込み処理の次の優先度で実行される。このゼロクロス割
り込み処理は、図12のような入力波形が外部の電気楽
器からゼロクロス検出回路5に入力した場合において、
ゼロクロス回路5がその入力波形のゼロクロスを検出す
る毎に発生するゼロクロス検出信号に同期して起動す
る。図12の場合、ゼロクロス回路5は時刻t0,t
1,t2,t3・・・でゼロクロス検出信号を出力す
る。CPU1はこれらの各時刻t0,t1,t2,t3
・・・でこのゼロクロス割り込み処理を次のようなステ
ップで順番に実行する。
FIG. 6 is a diagram showing details of the zero-cross interrupt process of priority level 5. Since this zero-cross interrupt process is related to the accuracy of tempo calculation, it is executed at the next priority level of the MIDI interrupt process. This zero-cross interrupt processing is performed when an input waveform as shown in FIG. 12 is input to the zero-cross detection circuit 5 from an external electric musical instrument.
The zero-cross circuit 5 is activated in synchronization with the zero-cross detection signal generated every time the zero-cross of the input waveform is detected. In the case of FIG. 12, the zero-cross circuit 5 operates at times t0 and t.
A zero-crossing detection signal is output at 1, t2, t3 ... The CPU 1 uses these times t0, t1, t2, t3.
Then, the zero crossing interrupt process is sequentially executed in the following steps.

【0030】ステップ61:ピッチ有効かどうかを判定
し、ピッチ有効(YES)の場合はステップ66に進
み、ピッチ無効(NO)の場合はステップ62に進む。
ここで、ピッチ有効は入力波形の振幅値が所定のしきい
値RV以上になった後の最初のゼロクロス割り込み処理
で設定され、ピッチ無効は図4のピッチ計算処理のステ
ップ49で設定される。例えば、図12の入力波形の場
合は時刻txでしきい値RVを越えたので、次のゼロク
ロス検出時点t7でピッチ有効となり、時刻tcと時刻
tdで図4のステップ42のピッチ計算が行われ、図4
のステップ49でピッチ無効となる。従って、通常はピ
ッチ無効(NO)と判定され、ステップ62に進む。
Step 61: It is judged whether or not the pitch is valid. If the pitch is valid (YES), the routine proceeds to step 66, and if it is invalid (NO), the routine proceeds to step 62.
Here, the pitch valid is set in the first zero-cross interrupt process after the amplitude value of the input waveform becomes equal to or more than the predetermined threshold value RV, and the pitch invalid is set in step 49 of the pitch calculation process of FIG. For example, in the case of the input waveform of FIG. 12, the threshold value RV is exceeded at time tx, so the pitch becomes valid at the next zero-cross detection time t7, and the pitch calculation of step 42 of FIG. 4 is performed at time tc and time td. , Fig. 4
In step 49, the pitch becomes invalid. Therefore, it is normally determined that the pitch is invalid (NO), and the routine proceeds to step 62.

【0031】ステップ62:入力波形の振幅値が所定の
しきい値RVを始めて越えたかどうかを判定し、越えた
(YES)場合はステップ63に進み、越えていない
(NO)場合はリターンする。すなわち、CPU1は入
力波形の振幅値が所定のしきい値RV以上となったかど
うかをA/D変換器6からの出力に基づいて判断してい
るので、図12における時刻t0〜t6におけるゼロク
ロス割り込み処理においては、ステップ61及び62で
は共にNOと判定されるだけである。そして、入力波形
が始めてしきい値を越えた時刻txの次のゼロクロス検
出時刻t7におけるステップ62でYESと判定され、
ステップ63〜65の処理が行われる。
Step 62: It is judged whether or not the amplitude value of the input waveform exceeds a predetermined threshold value RV for the first time. If it exceeds (YES), the process proceeds to step 63, and if it does not exceed (NO), the process returns. That is, since the CPU 1 determines whether or not the amplitude value of the input waveform has become equal to or greater than the predetermined threshold value RV based on the output from the A / D converter 6, the zero cross interrupt at time t0 to t6 in FIG. In the process, both of steps 61 and 62 are simply determined as NO. Then, at step 62 at the zero cross detection time t7 next to the time tx when the input waveform first exceeds the threshold value, YES is determined in the step 62,
The processing of steps 63 to 65 is performed.

【0032】ステップ63:ピッチ有効を設定し、入力
波形の振幅値が所定のしきい値RVを越え、ピッチの計
測が可能になったことを示す。従って、CPU1はピッ
チ計測用のカウンタをリセットし、次のゼロクロス割り
込み時にそのカウント値を読み取れば、入力波形の半ピ
ッチ分のカウント値を計測することができる。例えば、
図12の場合には、時刻t7でピッチ計測用カウンタを
リセットし、次のゼロクロス割り込み時刻t8でそのカ
ウント値を読み取って、入力波形の半ピッチの周期を計
測する。
Step 63: Pitch valid is set, and the amplitude value of the input waveform exceeds a predetermined threshold value RV, indicating that the pitch can be measured. Therefore, the CPU 1 can measure the count value for half the pitch of the input waveform by resetting the counter for pitch measurement and reading the count value at the next zero-cross interrupt. For example,
In the case of FIG. 12, the pitch measuring counter is reset at time t7, the count value is read at the next zero-cross interrupt time t8, and the half-pitch cycle of the input waveform is measured.

【0033】ところが、この実施例の図6のゼロクロス
割り込み処理及び図7のテンポ割り込み処理では、1つ
の16ビットフリーランカウンタを共用することによっ
て、ハード構成の単純化を図っている。すなわち、この
実施例では入力波形の半ピッチ周期を計測するためのピ
ッチ用カウンタとテンポ割り込み信号を発生するための
テンポ用カウンタとが別々に設けられておらず、1つの
カウンタで入力波形の半ピッチ周期を計測すると共にテ
ンポ割り込みタイミングレジスタTIMEを使用して、
テンポ割り込み信号を発生するようにしている。従っ
て、次のステップ64では、このカウンタの共用化に伴
い、フリーランカウンタをクリアする前にテンポ割り込
みタイミングレジスタTIMEの値を修正している。
However, in the zero-cross interrupt processing of FIG. 6 and the tempo interrupt processing of FIG. 7 of this embodiment, one 16-bit free-run counter is shared to simplify the hardware configuration. That is, in this embodiment, the pitch counter for measuring the half pitch period of the input waveform and the tempo counter for generating the tempo interrupt signal are not separately provided, but one counter can be used for half the input waveform. Using the tempo interrupt timing register TIME while measuring the pitch period,
The tempo interrupt signal is generated. Therefore, in the next step 64, the value of the tempo interrupt timing register TIME is corrected before clearing the free-run counter due to the sharing of this counter.

【0034】ステップ64:入力波形の振幅値がしきい
値RVを越えてから最初のゼロクロス割り込み処理時刻
のカウンタの値をテンポ割り込みタイミングレジスタT
IMEの格納値から減算し、その減算値をテンポ割り込
みタイミングレジスタTIMEに再び格納する。すなわ
ち、タイマ4はカウンタの値がテンポ割り込みタイミン
グレジスタTIMEの値に等しくなった時点で、テンポ
割り込み信号をCPU1に出力するが、両者の値が等し
くなる前にゼロクロス割り込み処理が実行されると、ス
テップ65でカウンタの値がクリアされるので、その前
に両者の差分値を新たなテンポ割り込み信号の発生タイ
ミングとしてテンポ割り込みタイミングレジスタTIM
Eに格納する。
Step 64: The counter value at the first zero-cross interrupt processing time after the amplitude value of the input waveform exceeds the threshold value RV is set to the tempo interrupt timing register T.
Subtract from the stored value of IME, and store the subtracted value in the tempo interrupt timing register TIME again. That is, the timer 4 outputs the tempo interrupt signal to the CPU 1 when the value of the counter becomes equal to the value of the tempo interrupt timing register TIME, but if the zero-cross interrupt process is executed before both values become equal, Since the counter value is cleared in step 65, the difference value between the two is used as the timing for generating a new tempo interrupt signal before the tempo interrupt timing register TIM.
Store in E.

【0035】ステップ65:カウンタの値をクリアし、
次回のピッチ計測及びテンポ割り込み信号の発生に備え
る。 ステップ66:カウンタの値をサイクルレジスタCYC
LEに格納する。前回のゼロクロス割り込み処理時にカ
ウンタの値はリセットされているので、今回のゼロクロ
ス割り込み処理時におけるカウンタには、前回のゼロク
ロス割り込み処理時刻から今回のゼロクロス割り込み処
理時刻までの時間に対応した値が格納されている。例え
ば、図12の入力波形の場合には、カウンタには時刻t
7から時刻t8までの時間に対応した値が格納されてい
る。
Step 65: Clear the counter value,
Prepare for the next pitch measurement and tempo interrupt signal generation. Step 66: Set the counter value to the cycle register CYC
Store in LE. Since the counter value was reset during the previous zero-cross interrupt processing, the counter during the current zero-cross interrupt processing stores the value corresponding to the time from the previous zero-cross interrupt processing time to the current zero-cross interrupt processing time. ing. For example, in the case of the input waveform shown in FIG.
The value corresponding to the time from 7 to time t8 is stored.

【0036】ステップ67:前のステップ64と同様に
カウンタの共用化に伴い、カウンタをクリアする前にテ
ンポ割り込みタイミングレジスタTIMEの値を修正す
る。すなわち、ゼロクロス割り込み処理が発生した時刻
に対応するカウンタの値をテンポ割り込みタイミングレ
ジスタTIMEの格納値から減算し、その減算した値を
テンポ割り込みタイミングレジスタTIMEに再び格納
する。 ステップ68:ステップ65と同様にカウンタの値をク
リアし、次回のピッチ計測及びテンポ割り込み信号の発
生に備える。 ステップ69:計算有効に設定してリターンする。例え
ば、図12の入力波形の場合は、時刻t8で計算有効と
なる。従って、計算有効が設定された後は、図4のピッ
チ計算処理のステップ41の判定がYESとなり、ピッ
チ計算が行われる。
Step 67: As in the case of the previous step 64, the value of the tempo interrupt timing register TIME is corrected before the counter is cleared due to the sharing of the counter. That is, the value of the counter corresponding to the time when the zero-cross interrupt process occurs is subtracted from the value stored in the tempo interrupt timing register TIME, and the subtracted value is stored again in the tempo interrupt timing register TIME. Step 68: Similar to step 65, the counter value is cleared to prepare for the next pitch measurement and tempo interrupt signal generation. Step 69: Set calculation valid and return. For example, in the case of the input waveform in FIG. 12, the calculation becomes valid at time t8. Therefore, after the calculation valid is set, the determination in step 41 of the pitch calculation process of FIG. 4 becomes YES, and the pitch calculation is performed.

【0037】図10は約2msec毎に実行される優先
レベル4のタイマ割り込み処理1の詳細を示す図であ
る。このタイマ割り込み処理1では、エフェクト制御用
のLFO作成処理、スイッチスキャン処理及びA/D変
換出力スキャン処理を順番に行う。LFO作成処理で
は、オートワウ効果におけるバンドパスフィルタの中心
周波数を振るための出力波形を作成する。スイッチスキ
ャン処理では、スイッチ検出回路15をスキャンしてパ
ネルスイッチ14上のスイッチの操作状態等を検出す
る。A/D変換出力スキャン処理では、A/D変換器6
の出力すなわち電気楽器からの入力波形の振幅値等を検
出する。従って、LFO作成処理では出力波形に滑らか
な変化を与えなければならないこと、スイッチスキャン
処理及びA/D変換出力スキャン処理ではほぼ一定時間
ごとにスキャン処理を行わなければならないことから、
比較的高い優先度が割り当てられている。このスイッチ
スキャン処理の結果に応じて、図9のスイッチモニタ割
り込み処理が行われる。また、A/D変換出力スキャン
処理の結果に応じて、図6のステップ62の判定が行わ
れる。
FIG. 10 is a diagram showing details of the timer interrupt processing 1 of priority level 4 which is executed about every 2 msec. In the timer interrupt processing 1, the LFO creation processing for effect control, the switch scan processing, and the A / D conversion output scan processing are sequentially performed. In the LFO creation processing, an output waveform for oscillating the center frequency of the bandpass filter in the auto wah effect is created. In the switch scan process, the switch detection circuit 15 is scanned to detect the operation state of the switches on the panel switch 14. In the A / D conversion output scan processing, the A / D converter 6
Output, that is, the amplitude value of the input waveform from the electric musical instrument is detected. Therefore, since it is necessary to give a smooth change to the output waveform in the LFO creation process, and the scan process must be performed at almost constant time intervals in the switch scan process and the A / D conversion output scan process.
It is assigned a relatively high priority. The switch monitor interrupt process of FIG. 9 is performed according to the result of the switch scan process. Further, the determination in step 62 of FIG. 6 is performed according to the result of the A / D conversion output scan processing.

【0038】図11は約1.6msec毎に実行される
優先レベル2のタイマ割り込み処理2の詳細を示す図で
ある。このタイマ割り込み処理2では、エフェクトの
(リアルタイム)パラメータをDSP9に転送する処理
である。従って、比較的正確な時間間隔で実行しなくて
もよいが、あまりにもその転送間隔が乱れると不自然な
エフェクトとなるので、レベク2程度の優先度が割り当
てられている。
FIG. 11 is a diagram showing details of the priority level 2 timer interrupt processing 2 which is executed about every 1.6 msec. The timer interrupt process 2 is a process of transferring the (real-time) parameter of the effect to the DSP 9. Therefore, it is not necessary to execute at a relatively precise time interval, but if the transfer interval is disturbed too much, an unnatural effect will result, so a priority level of about 2 is assigned.

【0039】図7は優先レベル3のテンポ割り込み処理
の詳細を示す図である。このテンポ割り込み処理は、自
動演奏のテンポを決定する処理であり、正確なテンポを
実現するために、この程度の優先度が割り当てられてい
る。このテンポ割り込み処理は、テンポレジスタTEM
Pの設定値に応じた割り込み間隔で処理を実行する。例
えば、4分音符当たり24回のテンポ割り込みを行う。
CPU1はテンポ割り込み処理を次のようなステップで
順番に実行する。
FIG. 7 is a diagram showing details of the tempo interrupt processing of priority level 3. This tempo interrupt process is a process for determining the tempo of automatic performance, and in order to realize an accurate tempo, this degree of priority is assigned. This tempo interrupt processing is performed by the tempo register TEM.
The process is executed at an interrupt interval according to the set value of P. For example, the tempo interruption is performed 24 times per quarter note.
The CPU 1 sequentially executes tempo interrupt processing in the following steps.

【0040】ステップ71:テンポ変更有りかどうか、
すなわちパネルスイッチ14上のテンポ変更スイッチT
Pが操作されたかどうかを判定し、変更有り(YES)
の場合は次のステップ72に進み、そうでない場合はス
テップ73に進む。 ステップ72:前のステップ71でテンポ変更有りと判
定されたので、ここではテンポ変更スイッチTPの操作
量に応じて変更されたテンポの値をテンポレジスタTE
MPに格納する。
Step 71: Whether the tempo is changed,
That is, the tempo change switch T on the panel switch 14
It is determined whether P has been operated and there is a change (YES).
If so, the process proceeds to the next step 72, and if not, the process proceeds to step 73. Step 72: Since it has been determined in the previous step 71 that the tempo has been changed, here the tempo value changed according to the operation amount of the tempo change switch TP is set to the tempo register TE.
Store in MP.

【0041】ステップ73:前述のようにこの実施例で
は、図6のゼロクロス割り込み処理と図7のテンポ割り
込み処理において、1つの16ビットフリーランカウン
タを共用しているので、ここでは、このフリーランカウ
ンタの残りのカウント数(FFFF−TIME)がテン
ポレジスタTEMPの値よりも大きいかどうかを判定
し、大きい(YES)場合には次のステップ74に進
み、小さい(NO)場合にはステップ75に進む。
Step 73: As described above, in this embodiment, since one 16-bit free-run counter is shared by the zero-cross interrupt process of FIG. 6 and the tempo interrupt process of FIG. 7, this free-run counter is used here. It is determined whether or not the remaining count number (FFFF-TIME) of the counter is larger than the value of the tempo register TEMP. If it is larger (YES), the process proceeds to the next step 74, and if it is smaller (NO), the process proceeds to step 75. move on.

【0042】ステップ74:前のステップ73でフリー
ランカウンタの残りのカウント数(FFFF−TIM
E)がテンポレジスタTEMPの値よりも大きいと判定
されたので、このステップではテンポ割り込みタイミン
グレジスタTIMEの値にテンポレジスタTEMPの値
を単純に加算し、その加算値を次回のテンポ割り込みの
タイミングとしてテンポ割り込みタイミングレジスタT
IMEに格納する。
Step 74: The remaining count of the free-run counter in the previous step 73 (FFFF-TIM
Since it is determined that E) is larger than the value of the tempo register TEMP, in this step, the value of the tempo register TEMP is simply added to the value of the tempo interrupt timing register TIME, and the added value is used as the timing of the next tempo interrupt. Tempo interrupt timing register T
Store in IME.

【0043】ステップ75:前のステップ73でフリー
ランカウンタの残りのカウント数(FFFF−TIM
E)がテンポレジスタTEMPの値以下だと判定された
ので、このステップではテンポ割り込みタイミングレジ
スタTIMEの値とテンポレジスタTEMPの値とを加
算し、その加算値からフリーランカウンタの最大カウン
ト数FFFFを減算し、その演算結果を次回のテンポ割
り込みのタイミングとしてテンポ割り込みタイミングレ
ジスタTIMEに格納する。 ステップ76:自動演奏処理を起動させる。すなわち、
自動演奏割り込み信号を発生し、図8の自動演奏割り込
み処理を実行させる。
Step 75: The remaining count of the free-run counter in the previous step 73 (FFFF-TIM
Since it is determined that E) is less than or equal to the value of the tempo register TEMP, the value of the tempo interrupt timing register TIME and the value of the tempo register TEMP are added in this step, and the maximum count number FFFF of the free-run counter is calculated from the added value. The subtraction result is stored in the tempo interrupt timing register TIME as the timing of the next tempo interrupt. Step 76: Start the automatic performance process. That is,
An automatic performance interrupt signal is generated and the automatic performance interrupt processing of FIG. 8 is executed.

【0044】図8は優先レベル1の自動演奏割り込み処
理の詳細を示す図である。この自動演奏割り込み処理
は、実際にメモリに記憶されている演奏データを順次読
み出して発音する処理である。従って、あまりにも遅れ
が目立つ程度でなければ、多少の遅れを許容することの
できる処理である。CPU1はこの自動演奏割り込み処
理を次のようなステップで順番に実行する。
FIG. 8 is a diagram showing details of the priority level 1 automatic performance interrupt processing. This automatic performance interruption process is a process of sequentially reading out performance data actually stored in the memory and producing a sound. Therefore, if the delay is not too conspicuous, the processing can allow a slight delay. The CPU 1 sequentially executes this automatic performance interruption process in the following steps.

【0045】ステップ81:クロックレジスタCLKと
演奏データのタイミングとが一致したかどうかを判定
し、両者一致(YES)の場合は次のステップに進み、
両者不一致(NO)の場合はステップ8Aにジャンプす
る。 ステップ82:前のステップ81でクロックレジスタC
LKと演奏データのタイミングとが一致したと判定され
たので、ここではその演奏データがノートイベントデー
タかどうかを判定し、ノートイベントデータ(YES)
の場合は次のステップ83に進み、そうでない(NO)
場合はステップ86に進む。
Step 81: It is judged whether or not the timing of the clock register CLK and the timing of the performance data match, and if they match (YES), the process proceeds to the next step,
If they do not match (NO), the process jumps to step 8A. Step 82: Clock register C in previous step 81
Since it is determined that the timings of LK and performance data match, it is determined here whether the performance data is note event data, and note event data (YES)
In the case of, proceed to the next step 83, otherwise (NO)
If so, go to step 86.

【0046】ステップ83:前のステップ82で演奏デ
ータがノートイベントデータであると判定されたので、
ここではルート(根音)レジスタROOT及びタイプレ
ジスタTYPEに格納されているデータに基づいてノー
ト変換を行う。 ステップ84:音源回路8へノートイベントデータを出
力する。 ステップ85:MIDIのノートデータをMIDIイン
ターフェイス7を介して外部に出力する。
Step 83: Since it was determined in the previous step 82 that the performance data was note event data,
Here, note conversion is performed based on the data stored in the root register ROOT and the type register TYPE. Step 84: Output note event data to the tone generator circuit 8. Step 85: The MIDI note data is output to the outside via the MIDI interface 7.

【0047】ステップ86:前のステップ82で演奏デ
ータがノートイベントデータではないと判定されたの
で、ここでは、演奏データがプログラムチェンジデータ
かどうかを判定し、プログラムチェンジデータ(YE
S)の場合は次のステップ87に進み、そうでない(N
O)場合はステップ89に進む。 ステップ87:前のステップ87で演奏データがプログ
ラムチェンジデータであると判定されたので、ここでは
プログラムチェンジ指示を行う。これによって、図3の
マイクロプログラムロード処理でDSP9の内部メモリ
に記憶されているマイクロプログラムが指示されたマイ
クロプログラムに書き換えられ、エフェクト切り換え処
理が行われる。 ステップ88:MIDIのプログラムチェンジデータを
MIDIインターフェイス7を介して外部に出力する。 ステップ89:演奏データの内容がノートイベントデー
タ及びプログラムチェンジデータ以外だったので、それ
に応じたその他の処理を実行する。 ステップ8A:クロックレジスタCLKの値を更新すな
わち歩進してリターンする。
Step 86: Since it was determined in the previous step 82 that the performance data was not note event data, it is determined here whether the performance data is program change data, and the program change data (YE
In the case of S), the process proceeds to the next step 87, otherwise (N
O), the process proceeds to step 89. Step 87: Since it was determined in the previous step 87 that the performance data was program change data, a program change instruction is given here. As a result, in the microprogram loading process of FIG. 3, the microprogram stored in the internal memory of the DSP 9 is rewritten to the instructed microprogram, and the effect switching process is performed. Step 88: Output MIDI program change data to the outside through the MIDI interface 7. Step 89: Since the content of the performance data is other than the note event data and the program change data, other processing corresponding to it is executed. Step 8A: Update the value of the clock register CLK, that is, increment the value and return.

【0048】図9は優先レベル1のスイッチモニタ割り
込み処理の詳細を示す図である。このスイッチモニタ割
り込み処理は、図10のスイッチスキャン処理の結果、
パネルスイッチ14上のいずれかのスイッチが操作され
ていた場合に行われる処理である。この処理も図8の自
動演奏割り込み処理と同様にあまり遅れが目立つ程度で
なければ、多少の遅れを許容することのできる。
FIG. 9 is a diagram showing details of the priority level 1 switch monitor interrupt process. This switch monitor interrupt process is performed as a result of the switch scan process of FIG.
This is a process performed when any switch on the panel switch 14 is operated. Similar to the automatic performance interruption process of FIG. 8, this process can also allow a slight delay if the delay is not so noticeable.

【0049】なお、この実施例では、パネルスイッチ1
4上の5つのフットスイッチFS1〜FS5は、効果付
与装置の動作モードに応じてエフェクトプログラム切換
え用スイッチ、自動演奏制御用スイッチ、コードリコー
ル用スイッチ及びルートアサイン用スイッチとして機能
するようになっている。以下、これらの各機能について
説明する。動作モードがエフェクトモードの場合には、
フットスイッチFS1〜FS5はエフェクトプログラム
切換え用スイッチとして機能する。すなわち、各フット
スイッチFS1〜FS5に対してエフェクトの種類が予
め割り当てられているので、エフェクトモードでフット
スイッチが操作されると、その操作されたフットスイッ
チに割り当てられているエフェクトに対応したマイクロ
プログラムがROM2から読み出され、DSP9に書き
込まれる。
In this embodiment, the panel switch 1
The five foot switches FS1 to FS5 on 4 function as an effect program switching switch, an automatic performance control switch, a chord recall switch, and a route assign switch according to the operation mode of the effect imparting device. . Each of these functions will be described below. When the operation mode is effect mode,
The foot switches FS1 to FS5 function as effect program switching switches. That is, since the type of effect is assigned in advance to each of the foot switches FS1 to FS5, when the foot switch is operated in the effect mode, a microprogram corresponding to the effect assigned to the operated foot switch. Is read from the ROM 2 and written in the DSP 9.

【0050】動作モードが自動演奏可能なシーケンサモ
ードの場合には、フットスイッチFS1〜FS5は自動
演奏制御用スイッチとして機能する。すなわち、効果付
与装置がシーケンサモードで動作している場合には、エ
フェクトの切換えは自動演奏データ中に記憶してあるプ
ログラムチェンジデータによって曲の進行に応じて自動
的に切換えられるため、前述のようなエフェクトプログ
ラム切換え機能は不要となる。従って、各フットスイッ
チFS1〜FS5はそれぞれ自動演奏のスタートスイッ
チ、ストップスイッチ、フィルインスイッチ、ソング/
パターン切換えスイッチ等として動作する。
When the operation mode is the sequencer mode in which automatic performance is possible, the foot switches FS1 to FS5 function as automatic performance control switches. That is, when the effect imparting device is operating in the sequencer mode, the effect switching can be automatically switched according to the progress of the music by the program change data stored in the automatic performance data. The effect program switching function is unnecessary. Therefore, the foot switches FS1 to FS5 are respectively the start switch, stop switch, fill-in switch, song /
Operates as a pattern changeover switch.

【0051】動作モードがコードリコールモードの場合
には、各フットスイッチFS1〜FS5は予め割り当て
られたコード(ルートとタイプ)をリアルタイムに呼び
出すためのコードリコール用スイッチとして機能する。
すなわち、効果付与装置がコードリコールモードで伴奏
パターンを自動演奏している時に、このフットスイッチ
FS1〜FS5を押してコードを指定すると、その伴奏
パターンの音高を指定されたコードに対応した音高に修
正し、曲として成り立つようにする。また、フットスイ
ッチFS1〜FS5で指定したコードを曲の進行順に記
録してコードシーケンサとして機能させてもよい。
When the operation mode is the cord recall mode, each of the foot switches FS1 to FS5 functions as a cord recall switch for calling a cord (route and type) assigned in advance in real time.
That is, when the effect imparting device is automatically playing the accompaniment pattern in the chord recall mode, if the foot switch FS1 to FS5 is pressed to specify a chord, the pitch of the accompaniment pattern becomes a pitch corresponding to the designated chord. Modify and make it a song. Further, the chords designated by the foot switches FS1 to FS5 may be recorded in the order of progression of the music pieces to function as a chord sequencer.

【0052】なお、各フットスイッチFS1〜FS5へ
のコードの割当ては、パネルスイッチ14を操作するこ
とによって任意に行うことができ(詳細は省略する)、
コードのルートに関しては後述のようにして外部入力音
のピッチに応じて外部から指定することができる。この
実施例では、フットスイッチFS1〜FS5の隣に設け
られているアサインスイッチASFSを押す毎にシーケ
ンサモードとコードリコールモードとが切り替わるよう
になっている。すなわち、シーケンサモードからアサイ
ンスイッチを1回押せばこのコードリコールモードに切
り替わり、コードリコールモードからアサインスイッチ
を1回押せばシーケンサモードに切り替わる。
Codes can be assigned to the foot switches FS1 to FS5 by operating the panel switch 14 (details are omitted).
The chord root can be designated from the outside according to the pitch of the external input sound as described later. In this embodiment, each time the assign switch ASFS provided next to the foot switches FS1 to FS5 is pressed, the sequencer mode and the chord recall mode are switched. That is, if the assign switch is pressed once from the sequencer mode, the code recall mode is switched to, and if the assign switch is pressed once from the code recall mode, the sequencer mode is switched to.

【0053】動作モードがコードリコールモードの場合
には、各フットスイッチFS1〜FS5は、コードのル
ートを外部入力音のピッチにて指定する際の対象となる
フットスイッチを指定するためのルートアサインスイッ
チとしても機能する。すなわち、コードリコールモード
においてアサインスイッチを押し、それを押したままの
状態でフットスイッチFS1〜FS5のいずれか1つを
押すと、その押されたフットスイッチがルートアサイン
モードになる。このとき外部音のピッチが検出されると
そのピッチに対応した音名がルートとして、その押され
たフットスイッチに割り当てられる。すなわち、この実
施例はチューニング装置で検出された外部音のピッチを
用いてパラメータ設定を行っている。このとき、コード
タイプはそれ以前に割り当てられていたものと同様のタ
イプを使用する。このようにして、ギター奏者等が演奏
状態のまま、スイッチに割り当てられるべきルートパラ
メータを直接指定することができる。CPU1は以上の
ような4つの機能に対応したスイッチモニタ割り込み処
理を次のようなステップで順番に実行する。
When the operation mode is the chord recall mode, each of the foot switches FS1 to FS5 is a root assign switch for designating a foot switch which is a target when the chord root is designated by the pitch of the external input sound. Also works as. That is, when the assign switch is pressed in the code recall mode and any one of the foot switches FS1 to FS5 is pressed while the switch is being pressed, the pressed foot switch becomes the root assign mode. At this time, when the pitch of the external sound is detected, the pitch name corresponding to the pitch is assigned to the pressed foot switch as a route. That is, in this embodiment, the parameter setting is performed using the pitch of the external sound detected by the tuning device. At this time, the code type uses the same type as that previously assigned. In this way, the route parameter to be assigned to the switch can be directly specified while the guitar player or the like is still playing. The CPU 1 sequentially executes the switch monitor interrupt processing corresponding to the above four functions in the following steps.

【0054】ステップ91:パネルスイッチ14上で操
作されたスイッチがフットスイッチFS1〜FS5であ
るかどうかを判定し、フットスイッチ(YES)の場合
には次のステップ92に進み、そうでない(NO)場合
はステップ9Bにジャンプする。 ステップ92:前のステップ91で操作されたスイッチ
がフットスイッチFS1〜FS5のいずれか1つである
と判定されたので、ここでは現在の動作モードがエフェ
クトモードかどうかを判定し、エフェクトモード(YE
S)の場合は次のステップに進み、そうでない(NO)
場合はステップ95に進む。
Step 91: It is judged whether or not the switches operated on the panel switch 14 are foot switches FS1 to FS5. If the switch is a foot switch (YES), the process proceeds to the next step 92, otherwise (NO). If so, jump to step 9B. Step 92: Since it is determined that the switch operated in the previous step 91 is any one of the foot switches FS1 to FS5, it is determined here whether the current operation mode is the effect mode, and the effect mode (YE
If S), proceed to the next step, otherwise (NO)
If so, go to step 95.

【0055】ステップ93:前のステップ92でエフェ
クトモードと判定されたので、押されたフットスイッチ
FS1〜FS5に割り当てられているエフェクトの種類
を示すデータと共にプログラムチェンジの指示を行う。
すなわち、動作モードがエフェクトモードなので、フッ
トスイッチFS1〜FS5はエフェクトプログラム切換
え用スイッチとして機能する。従って、図3のマイクロ
プログラムロード処理によって、エフェクトの種類を示
すデータに応じたマイクロプログラムがROM2から読
み出されてDSP9に書き込まれる。 ステップ94:MIDIのプログラムチェンジデータ及
びエフェクトの種類を示すデータをMIDIインターフ
ェイス7を介して外部に出力する。
Step 93: Since the effect mode is determined in the previous step 92, a program change instruction is issued together with data indicating the type of effect assigned to the pressed foot switches FS1 to FS5.
That is, since the operation mode is the effect mode, the foot switches FS1 to FS5 function as an effect program switching switch. Therefore, by the microprogram loading process of FIG. 3, the microprogram corresponding to the data indicating the effect type is read from the ROM 2 and written in the DSP 9. Step 94: The MIDI program change data and the data indicating the effect type are output to the outside via the MIDI interface 7.

【0056】ステップ95:前のステップ92で現在の
動作モードがエフェクトモードではないと判定されたの
で、シーケンサモードかどうかを判定し、シーケンサモ
ード(YES)の場合は次のステップ96に進み、そう
でない(NO)場合はステップ97に進む。 ステップ96:動作モードがシーケンサモードなので、
フットスイッチFS1〜FS5は自動演奏制御用スイッ
チ(自動演奏のスタートスイッチ、ストップスイッチ、
フィルインスイッチ、ソング/パターン切換えスイッチ
等)として機能する。従って、押されたフットスイッチ
に応じたシーケンサ制御を行う。
Step 95: Since it is determined in the previous step 92 that the current operation mode is not the effect mode, it is determined whether or not it is the sequencer mode. If it is the sequencer mode (YES), the process proceeds to the next step 96, and If not (NO), the process proceeds to step 97. Step 96: Since the operation mode is the sequencer mode,
The foot switches FS1 to FS5 are automatic performance control switches (automatic performance start switch, stop switch,
Function as a fill-in switch, song / pattern switch, etc.). Therefore, sequencer control according to the pressed foot switch is performed.

【0057】ステップ97:前のステップ92及び95
の判定の結果、現在の動作モードはコードリコールモー
ドなので、ここではアサインフラグASSIGNが
『1』かどうか、すなわちパネルスイッチ14上のアサ
インスイッチSAFSが押されているかどうかを判定
し、押されていない(NO)場合はステップ9Aに進
み、押されている(YES)場合はステップ98に進
む。
Step 97: Previous Steps 92 and 95
As a result of the determination, the current operation mode is the code recall mode, so here it is determined whether the assign flag ASSIGN is "1", that is, whether the assign switch SAFS on the panel switch 14 is pressed, and it is not pressed. If it is (NO), the process proceeds to step 9A, and if it is pressed (YES), the process proceeds to step 98.

【0058】ステップ98:前のステップ92及び95
で現在の動作モードがコードリコールモードであると判
定され、ステップ97でアサインスイッチASFSが押
されていると判定されたので、このステップでは押され
た(オン)されたフットスイッチをルートアサインモー
ドに設定する。 ステップ99:シーケンサモードとコードリコールモー
ドを反転する。すなわち現在の動作モードはコードリコ
ールモードなので、それをシーケンサモードに切り替え
る。なお、ここで切り替えられたモードはアサインスイ
ッチASFSがオフされた時点におけるステップ9D及
び9Eの処理によって元に戻るようになっている。
Step 98: Previous Steps 92 and 95
In step 97, it is determined that the current operation mode is the chord recall mode, and in step 97 it is determined that the assign switch ASFS is pressed. Therefore, in this step, the pressed (on) foot switch is set to the root assign mode. Set. Step 99: Reverse the sequencer mode and the code recall mode. That is, since the current operation mode is the code recall mode, it is switched to the sequencer mode. The mode switched here is returned to the original state by the processing of steps 9D and 9E at the time when the assign switch ASFS is turned off.

【0059】ステップ9A:前のステップ92及び95
で現在の動作モードがコードリコールモードであると判
定され、ステップ97でアサインスイッチSAFSは押
されていないと判定されたので、このステップではルー
トレジスタROOT及びタイプレジスタTYPEに操作
(オン)されたフットスイッチにアサインされているル
ートとタイプを書き込むコードリコール処理を行う。 ステップ9B:パネルスイッチ14上のアサインスイッ
チASFSがオン状態になったかどうか、すなわち押さ
れていない状態から押された状態に変化したかどうかを
判定し、オン状態になった(YES)場合は次のステッ
プ9Cに進み、そうでない(NO)場合はステップ9D
に進む。 ステップ9C:前のステップ9BでアサインスイッチA
SFSがオン状態になったと判定されたので、アサイン
フラグASSIGNを『1』にセットする。従って、ア
サインスイッチASFSがオン状態でフットスイッチF
S1〜FS5のいずれか一つが押された場合には、ステ
ップ98及び99の処理が実行される。
Step 9A: Previous Steps 92 and 95
In step 97, it is determined that the current operation mode is the code recall mode, and in step 97 it is determined that the assign switch SAFS is not pressed. Therefore, in this step, the foot operated by the route register ROOT and the type register TYPE is turned on. Performs a code recall process that writes the route and type assigned to the switch. Step 9B: It is judged whether or not the assign switch ASFS on the panel switch 14 is in the ON state, that is, whether or not the state is changed from the non-pressed state to the pressed state. If not (NO), proceed to step 9C of step 9D.
Proceed to. Step 9C: Assign Switch A in the previous Step 9B
Since it is determined that the SFS has been turned on, the assign flag ASSIGN is set to "1". Therefore, with the assign switch ASFS turned on, the foot switch F
When any one of S1 to FS5 is pressed, the processes of steps 98 and 99 are executed.

【0060】ステップ9D:パネルスイッチ14上のア
サインスイッチASFSがオフ状態になったかどうか、
すなわち押された状態から離されたかどうかを判定し、
オフ状態になった(YES)場合は次のステップ9Eに
進み、そうでない(NO)場合はステップ9Gに進む。 ステップ9E:シーケンサモードとコードリコールモー
ドを反転する。すなわち現在の動作モードがシーケンサ
モードの場合にはコードリコールモードに、コードリコ
ールモードの場合にはシーケンサモードに切り替える。
従って、ステップ9Aでシーケンサモードに切り替えら
れてもこのステップで再び元のコードリコールモードに
切り替えられるようになっているため、コードリコール
モード中にルートアサインモードになった場合にも、コ
ードリコールモードが維持される。
Step 9D: Whether or not the assign switch ASFS on the panel switch 14 has been turned off,
That is, it is determined whether or not the pressed state is released,
If it is turned off (YES), the process proceeds to the next step 9E, and if not (NO), the process proceeds to step 9G. Step 9E: Reverse the sequencer mode and the code recall mode. That is, when the current operation mode is the sequencer mode, the mode is switched to the code recall mode, and when the current operation mode is the code recall mode, the mode is switched to the sequencer mode.
Therefore, even if the code recall mode is switched to the sequencer mode in step 9A, the code recall mode is switched to the original code recall mode again in this step. Maintained.

【0061】ステップ9F:ステップ9Dでアサインス
イッチASFSがオフ状態になったと判定されたので、
アサインフラグASSIGNを『0』にリセットする。 ステップ9G:図10のスイッチスキャン処理の結果、
操作されたスイッチとしてフットスイッチFS1〜FS
5及びアサインスイッチASFS以外のスイッチが存在
する場合に、その操作されたスイッチに対応したスイッ
チ処理を行う。
Step 9F: Since it is determined in step 9D that the assign switch ASFS has been turned off,
The assign flag ASSIGN is reset to "0". Step 9G: As a result of the switch scan process of FIG.
Foot switches FS1 to FS as operated switches
5 and a switch other than the assign switch ASFS are present, the switch process corresponding to the operated switch is performed.

【0062】上述の実施例から次のことがいえる。図8
の自動演奏割り込み処理は図2のメインルーチン内のマ
イクロプログラムロード処理、すなわちエフェクト切り
換え処理よりも高い優先度で処理を行うとよい。マイク
ロプログラムのロードに正確な時間は必要ではないが、
自動演奏にはほぼ正確な時間が必要だからである。ま
た、図8の自動演奏割り込み処理は図2のメインルーチ
ン内のピッチ計算処理よりも高い優先度で処理を行うと
よい。ピッチの計算には正確な時間(高速性)は必要な
いからである。一方、図6のゼロクロス割り込み処理は
自動演奏割り込み処理よりも優先度を高くするとよい。
なぜなら、例えば440Hzの楽音信号のピッチを検出
する場合、その周期は2.27msec程度であり、ピ
ッチ検出はこの時間よりも大幅に高い精度の時間を計測
しなければならないが、自動演奏の場合は、4分音符当
たり24を最小分解能とし、テンポを120とした場合
の周期は20.83msecであり、ピッチ検出よりも
精度が低くてもあまり影響がないと考えられるからであ
る。
The following can be said from the above embodiment. Figure 8
The automatic performance interruption processing of (1) is preferably performed with a higher priority than the microprogram loading processing in the main routine of FIG. 2, that is, the effect switching processing. You don't need the exact time to load the microprogram,
This is because the automatic performance requires almost accurate time. Further, the automatic performance interrupt process of FIG. 8 is preferably performed with a higher priority than the pitch calculation process in the main routine of FIG. This is because accurate time (high speed) is not required to calculate the pitch. On the other hand, the zero-cross interrupt processing in FIG. 6 should have a higher priority than the automatic performance interrupt processing.
This is because, for example, when detecting the pitch of a musical sound signal of 440 Hz, the period is about 2.27 msec, and pitch detection must measure a time with a much higher accuracy than this time, but in the case of automatic performance This is because, when the minimum resolution is 24 per quarter note and the tempo is 120, the cycle is 20.83 msec, and it is considered that even if the accuracy is lower than the pitch detection, there is not much influence.

【0063】上述の実施例では、ピッチの計測は入力さ
れた外部入力波形の振幅レベルが所定のしきい値RVを
越えたときに初めてピッチ計測可能状態(ピッチ有効)
としているが、これはギター等のピッキング直後は入力
波形の振動が不安定でありピッチの変動が激しいので、
この間にピッチ計測処理を行っても信頼性の低いものと
なるからである。従って、この実施例では、入力波形の
振幅レベルがしきい値RV以上に達した場合に、入力波
形の振動が安定し、落ちついた後にピッチの計測を行う
ようにして、ピッチ計測の正確性を向上させている。ま
た、1度ピッチの計測を行った後は、次に新たにしきい
値RVを越えるまでピッチの計算は行わない。これは、
楽音の減衰状態においてもピッチの入力波形の振動が不
安定であり、いつまでもピッチ計測を続けるとピッチの
変動により表示が見づらくなり、後述するルートアサイ
ン処理におけるルートの特定が困難となり、安定しなく
なるからである。故に、この実施例では、しきい値RV
を越えた次のゼロクロス検出時における1回のピッチ計
測により計算有効としている。なお、これに限らず、し
きい値RVを越えた後にピッチ計測を所定回数繰り返
し、その平均値をピッチとして採用するようにしてもよ
い。
In the above-described embodiment, pitch measurement is possible only when the amplitude level of the input external input waveform exceeds a predetermined threshold value RV (pitch measurement is enabled).
However, this is because the vibration of the input waveform is unstable immediately after picking of a guitar etc. and the fluctuation of the pitch is severe, so
Even if the pitch measurement process is performed during this period, the reliability is low. Therefore, in this embodiment, when the amplitude level of the input waveform reaches the threshold value RV or higher, the pitch measurement is performed after the vibration of the input waveform is stabilized and settles down, thereby improving the accuracy of the pitch measurement. Is improving. Further, after once measuring the pitch, the pitch is not calculated until the threshold value RV is newly exceeded. this is,
The vibration of the input waveform of the pitch is unstable even when the tone is attenuated, and if the pitch measurement is continued forever, the display becomes difficult to see due to the fluctuation of the pitch, and it becomes difficult to identify the route in the route assignment processing described later, and it becomes unstable. Is. Therefore, in this embodiment, the threshold value RV
The calculation is validated by one pitch measurement at the time of the next zero cross detection that exceeds the value. However, not limited to this, the pitch measurement may be repeated a predetermined number of times after exceeding the threshold value RV, and the average value thereof may be adopted as the pitch.

【0064】また、上述の実施例では、ゼロクロス割り
込み処理とテンポ割り込み処理とでフリーランカウンタ
を共用し、ゼロクロスの周期をフリーランカウンタのゼ
ロリセット時から次のゼロクロス時までのカウント値に
基づいて周期を算出する場合について説明したが、これ
に限らず、前回のゼロクロス時のカンウタ値を記憶して
おき、それと今回のカウンタ値との差に基づいて周期を
算出するようにしてもよい。また、テンポ割り込み処理
側でカウンタをリセットするようにしてもよい。また、
各処理の優先度は必ずしもこの実施例と同一でなくとも
よい。要は、自動演奏割り込み処理がマイクロプログラ
ムロード処理よりも優先的に実行され、ゼロクロス割り
込み処理が自動演奏割り込み処理よりも優先的に実行さ
れ、かつ自動演奏割り込み処理がピッチ計算処理よりも
優先的に実行されるように構成されていればよい。さら
に、上述の実施例では、CPU1が一個で各処理の優先
度に応じて処理を実行する場合について説明したが、こ
れに限らず、マルチプロセッサ構成とし、処理の優先度
を各プロセッサ間で制御するようにしてもよい。
In the above embodiment, the free-run counter is shared by the zero-cross interrupt process and the tempo interrupt process, and the zero-cross cycle is based on the count value from the zero reset of the free-run counter to the next zero-cross time. Although the case of calculating the cycle has been described, the present invention is not limited to this, and the counter value at the time of the last zero cross may be stored and the cycle may be calculated based on the difference between the counter value and the current counter value. Further, the counter may be reset on the tempo interrupt processing side. Also,
The priority of each process is not necessarily the same as that of this embodiment. In short, the automatic performance interrupt processing is executed prior to the microprogram load processing, the zero-cross interrupt processing is executed prior to the automatic performance interrupt processing, and the automatic performance interrupt processing is prioritized over the pitch calculation processing. It only needs to be configured to be executed. Further, in the above-described embodiment, the case where one CPU 1 executes the processing in accordance with the priority of each processing has been described, but the present invention is not limited to this, and the processing priority is controlled between the processors. You may do it.

【0065】上述の実施例ては、外部入力音のピッチで
決定するパラメータとしてコードのルートを例に説明し
たが、これに限らず、例えば、電子楽器のトランスポー
ズ、チューニング、ノートリミット(発音の範囲:設定
した範囲を超えた音高を指定しても発音しないようにす
る)やその他スライダ等の代わりに用いてもよい。ま
た、楽音信号の立上り部を無効にする手段は、入力波形
のレベルが所定のしきい値を超えたか否かを検出するも
のに限らず、楽音を検出してから所定時間経過後以降に
有効としてピッチ検出処理を行うようにしてもよいし、
楽音を検出してから所定時間経過後に入力波形のレベル
が所定のしきい値を超えた場合に有効としてピッチ検出
処理を行うようにしてもよい。
In the above-described embodiment, the chord root is described as an example of the parameter determined by the pitch of the external input sound, but the present invention is not limited to this. For example, transpose, tuning, note limit (pronunciation of an electronic musical instrument) Range: Do not sound even if a pitch exceeding the set range is specified) or other sliders. Further, the means for invalidating the rising portion of the musical tone signal is not limited to detecting whether the level of the input waveform exceeds a predetermined threshold value, but is effective after a predetermined time has elapsed after the musical tone was detected. Alternatively, the pitch detection process may be performed,
The pitch detection process may be performed as effective when the level of the input waveform exceeds a predetermined threshold value after a lapse of a predetermined time after detecting the musical sound.

【0066】ピッチの表示方法としては、例えば「44
0.25Hz」のように計算結果をそのまま表示するも
のに限らず、例えば「G4」のように音名で表示して
も、又は「440Hz+10セント」のように基準値か
らのずれ量で表示するようにしてもよい。上述の実施例
では、入力波形のレベルが所定のしきい値以下であって
もゼロクロス回路5が入力波形のゼロクロスを検出する
毎にゼロクロス割込み処理を行う場合について説明した
が、入力波形のレベルがしきい値以上のときにゼロクロ
ス回路5は入力波形のゼロクロスを検出するようにして
もよい。
As a method of displaying the pitch, for example, "44
The calculation result is not limited to be displayed as it is, such as “0.25 Hz”, and may be displayed with a pitch name such as “G4” or a deviation amount from the reference value such as “440 Hz + 10 cents”. You may do it. In the above-described embodiment, the case where the zero-crossing circuit 5 performs the zero-crossing interrupt process every time the zero-crossing circuit 5 detects the zero-crossing of the input waveform even when the level of the input waveform is equal to or lower than the predetermined threshold value is described. The zero-cross circuit 5 may detect the zero-cross of the input waveform when it is equal to or more than the threshold value.

【0067】[0067]

【発明の効果】第1の発明に係るピッチ検出装置によれ
ば、音波形のピッチを正確に検出することができるの
で、操作者は電気楽器等のチューニングを容易かつ確実
に行うことができる。また、第2の発明に係るピッチ検
出装置によれば、同じピッチの音波形であればピッチ検
出手段が再現性よくそのピッチを検出するので、音波形
のピッチを特定のメッセージとして事前に割り当ててお
けば、操作者は電気楽器等を演奏することによってパラ
メータを設定することができる。
According to the pitch detecting apparatus of the first aspect of the present invention, since the pitch of the sound wave can be detected accurately, the operator can easily and surely tune the electric musical instrument or the like. Further, according to the pitch detecting device of the second invention, the pitch detecting means detects the pitch with good reproducibility if the sound waveforms have the same pitch. Therefore, the pitch of the sound waveform is assigned in advance as a specific message. In this case, the operator can set parameters by playing an electric musical instrument or the like.

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

【図1】 この発明に係る楽音処理装置の全体構成を示
すハードブロック図である。
FIG. 1 is a hardware block diagram showing an overall configuration of a musical sound processing apparatus according to the present invention.

【図2】 図1のCPUが処理するメインルーチンの一
例を示すフローチャート図である。
FIG. 2 is a flow chart showing an example of a main routine processed by the CPU of FIG.

【図3】 図2のマイクロプログラムロード処理の詳細
を示すフローチャート図である。
FIG. 3 is a flowchart showing details of the microprogram loading process of FIG.

【図4】 図2のピッチ計算処理の詳細を示すフローチ
ャート図である。
FIG. 4 is a flowchart showing details of the pitch calculation process of FIG.

【図5】 優先レベル6のMIDI割り込み処理の詳細
を示す図である。
FIG. 5 is a diagram showing the details of priority level 6 MIDI interrupt processing.

【図6】 優先レベル5のゼロクロス割り込み処理の詳
細を示す図である。
FIG. 6 is a diagram showing details of a zero-cross interrupt process of priority level 5;

【図7】 優先レベル3のテンポ割り込み処理の詳細を
示す図である。
FIG. 7 is a diagram showing details of tempo interrupt processing of priority level 3;

【図8】 優先レベル1の自動演奏割り込み処理の詳細
を示す図である。
FIG. 8 is a diagram showing details of priority level 1 automatic performance interrupt processing.

【図9】 優先レベル1のスイッチモニタ割り込み処理
の詳細を示す図である。
FIG. 9 is a diagram showing details of priority level 1 switch monitor interrupt processing.

【図10】 約2msec毎に実行される優先レベル4
のタイマ割り込み処理1の詳細を示す図である。
FIG. 10: Priority level 4 executed about every 2 msec
It is a figure which shows the detail of the timer interruption process 1 of.

【図11】 約1.6msec毎に実行される優先レベ
ル2のタイマ割り込み処理2の詳細を示す図である。
FIG. 11 is a diagram showing details of timer interrupt processing 2 of priority level 2 executed every about 1.6 msec.

【図12】 外部の電気楽器からゼロクロス検出回路に
入力する入力波形の一例を示す図である。
FIG. 12 is a diagram showing an example of an input waveform input from an external electric musical instrument to the zero-cross detection circuit.

【符号の説明】[Explanation of symbols]

1…CPU、2…ROM、3…RAM、4…タイマ、5
…ゼロクロス検出回路、6…A/D変換器、7…MID
Iインターフェイス、8…音源回路、9…DSP、10
…ディレイ用RAM、11…ミュート回路、12…D/
A変換器、13…音量制御回路、14…パネルスイッ
チ、15…スイッチ検出回路、16…表示回路
1 ... CPU, 2 ... ROM, 3 ... RAM, 4 ... Timer, 5
... Zero cross detection circuit, 6 ... A / D converter, 7 ... MID
I interface, 8 ... tone generator circuit, 9 ... DSP, 10
... delay RAM, 11 ... mute circuit, 12 ... D /
A converter, 13 ... Volume control circuit, 14 ... Panel switch, 15 ... Switch detection circuit, 16 ... Display circuit

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 外部から入力された音波形のうち比較的
ピッチの安定した箇所を特定する安定箇所特定手段と、 この安定箇所特定手段によって特定されたピッチ安定箇
所のピッチを計測し、この計測されたピッチを前記外部
から入力された音波形のピッチとするピッチ計測手段と
を具えたことを特徴とするピッチ検出装置。
1. A stable part specifying means for specifying a part having a relatively stable pitch in a sound waveform input from the outside, and a pitch of a pitch stable part specified by the stable part specifying means is measured. And a pitch measuring unit that sets the generated pitch as a pitch of a sound waveform input from the outside.
【請求項2】 外部から入力された音波形のピッチを検
出するピッチ検出手段と、 このピッチ検出手段によって検出されたピッチに基づい
て電子楽器のパラメータを設定するパラメータ設定手段
とを具えたことを特徴とするピッチ検出装置。
2. A pitch detecting means for detecting a pitch of a sound waveform inputted from the outside, and a parameter setting means for setting a parameter of an electronic musical instrument based on the pitch detected by the pitch detecting means. Characteristic pitch detection device.
JP4356843A 1992-12-21 1992-12-21 Pitch detection device Expired - Fee Related JP2969138B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4356843A JP2969138B2 (en) 1992-12-21 1992-12-21 Pitch detection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4356843A JP2969138B2 (en) 1992-12-21 1992-12-21 Pitch detection device

Publications (2)

Publication Number Publication Date
JPH06186973A true JPH06186973A (en) 1994-07-08
JP2969138B2 JP2969138B2 (en) 1999-11-02

Family

ID=18451045

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4356843A Expired - Fee Related JP2969138B2 (en) 1992-12-21 1992-12-21 Pitch detection device

Country Status (1)

Country Link
JP (1) JP2969138B2 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207455A (en) * 1996-11-20 1998-08-07 Yamaha Corp Sound signal analyzing device and its method
JP2000066667A (en) * 1998-08-25 2000-03-03 Korg Inc Tuning instrument
JP2004334240A (en) * 1996-11-20 2004-11-25 Yamaha Corp Sound signal analysis device and method
JP2004334238A (en) * 1996-11-20 2004-11-25 Yamaha Corp Sound signal analyzing device and method
JP2011524574A (en) * 2008-06-11 2011-09-01 クゥアルコム・インコーポレイテッド Method and system for measuring task load
JP2015114385A (en) * 2013-12-09 2015-06-22 ヤマハ株式会社 Acoustic signal analysis control program, and acoustic signal analysis control device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62223796A (en) * 1986-03-25 1987-10-01 ヤマハ株式会社 Automatic accompanying apparatus
JPH01198794A (en) * 1987-10-07 1989-08-10 Casio Comput Co Ltd Electronic stringed instrument
JPH01240825A (en) * 1988-03-22 1989-09-26 Seiko Instr & Electron Ltd Tuning device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62223796A (en) * 1986-03-25 1987-10-01 ヤマハ株式会社 Automatic accompanying apparatus
JPH01198794A (en) * 1987-10-07 1989-08-10 Casio Comput Co Ltd Electronic stringed instrument
JPH01240825A (en) * 1988-03-22 1989-09-26 Seiko Instr & Electron Ltd Tuning device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207455A (en) * 1996-11-20 1998-08-07 Yamaha Corp Sound signal analyzing device and its method
JP2004334240A (en) * 1996-11-20 2004-11-25 Yamaha Corp Sound signal analysis device and method
JP2004334238A (en) * 1996-11-20 2004-11-25 Yamaha Corp Sound signal analyzing device and method
JP2000066667A (en) * 1998-08-25 2000-03-03 Korg Inc Tuning instrument
JP2011524574A (en) * 2008-06-11 2011-09-01 クゥアルコム・インコーポレイテッド Method and system for measuring task load
US8594816B2 (en) 2008-06-11 2013-11-26 Qualcomm Incorporated Method and system for measuring task load
JP2015114385A (en) * 2013-12-09 2015-06-22 ヤマハ株式会社 Acoustic signal analysis control program, and acoustic signal analysis control device

Also Published As

Publication number Publication date
JP2969138B2 (en) 1999-11-02

Similar Documents

Publication Publication Date Title
US7112738B2 (en) Electronic musical instrument
JP2022179645A (en) Electronic musical instrument, sounding method of electronic musical instrument, and program
JP2580941B2 (en) Music processing unit
JP2969138B2 (en) Pitch detection device
JPH09325778A (en) Music sound generating method
JP3430267B2 (en) Electronic musical instrument
US5281756A (en) Electronic musical instrument capable of assigning desired tones to a performance operator
JPH0717116Y2 (en) Electronic musical instrument
US5942711A (en) Roll-sound performance device and method
JP3725247B2 (en) Music generation processing method
JP2551195B2 (en) Automatic playing device
JP3632744B2 (en) Sound generation method
JP3627557B2 (en) Musical sound generating apparatus and method
JP2552002B2 (en) Electronic instrument tone color setting method
JPH0944160A (en) Musical tone generating method
JP2780475B2 (en) Tempo controller
JP2578327B2 (en) Automatic performance device
JP3716701B2 (en) Sound channel assignment method and apparatus
JPH0679221B2 (en) Electronic musical instrument
JP2513014B2 (en) Electronic musical instrument automatic performance device
JP3627590B2 (en) Sound generation method
JP5449963B2 (en) Automatic melody performance device and program for automatic melody performance function
JP4311667B2 (en) Electronic musical sound generator
JPH07199931A (en) Frequency data generation device
JPH05188953A (en) Electronic musical instrument

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20070827

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20080827

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090827

Year of fee payment: 10

LAPS Cancellation because of no payment of annual fees