JP2014153434A - Electronic stringed instrument, musical sound generation method and program - Google Patents

Electronic stringed instrument, musical sound generation method and program Download PDF

Info

Publication number
JP2014153434A
JP2014153434A JP2013020840A JP2013020840A JP2014153434A JP 2014153434 A JP2014153434 A JP 2014153434A JP 2013020840 A JP2013020840 A JP 2013020840A JP 2013020840 A JP2013020840 A JP 2013020840A JP 2014153434 A JP2014153434 A JP 2014153434A
Authority
JP
Japan
Prior art keywords
string
pitch
detected
strings
state
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.)
Pending
Application number
JP2013020840A
Other languages
Japanese (ja)
Inventor
Akio Iba
章雄 伊庭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2013020840A priority Critical patent/JP2014153434A/en
Publication of JP2014153434A publication Critical patent/JP2014153434A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To suppress delay of generation of musical sound in an electronic stringed instrument.SOLUTION: An electronic guitar has strings having the same thickness and stretched for each string number. In the electronic guitar, a fret scan section detects a contact state between a plurality of frets and between the plurality of strings, and a pitch extraction circuit PC extracts a pitch of a picked string. A microcomputer MCP determines an initial musical interval in accordance with a pressed string state detected by the fret scan section and a picked string detected by the pitch extraction circuit PC and causes a sound source SS to generate musical sound. The microcomputer MCP corrects the extraction result (pitch), extracted by the pitch extraction circuit PC, of the picked string on the basis of correction information stored in a memory and, as sound generated by a string of the string number thereof, changes to musical sound of further exact musical interval.

Description

本発明は、電子ギター等の電子弦楽器に係り、特にその入力波形信号からピッチ抽出を行って種々の音高の楽音を発生する電子弦楽器、楽音生成方法及びプログラムに関する。   The present invention relates to an electronic stringed musical instrument such as an electronic guitar, and more particularly to an electronic stringed musical instrument, a musical sound generating method, and a program that generate musical tones of various pitches by extracting pitches from input waveform signals.

従来より、自然楽器の演奏操作によって発生する波形信号からピッチ(基本周波数)を抽出し、電子回路で構成された音源装置を制御して、人工的に楽音等の音響を得るようにした楽音生成装置が開発されている。
例えば、特許文献1に記載されているように、電子ギター等の電子弦楽器においては、弦を指で押さえるフレットと、弦を弾くピッキングとが演奏操作として行われ、これらの演奏操作に応じた楽音を発生させる。
Conventionally, musical tone generation is performed by extracting the pitch (fundamental frequency) from the waveform signal generated by the performance operation of a natural musical instrument and controlling the sound source device composed of electronic circuits to artificially obtain sounds such as musical sounds. Equipment has been developed.
For example, as described in Patent Document 1, in an electronic stringed instrument such as an electronic guitar, a fret for pressing a string with a finger and picking for playing the string are performed as performance operations, and musical sounds corresponding to these performance operations are performed. Is generated.

特開2009−139745公報JP 2009-139745 A

しかしながら、従来の電子弦楽器においては、実際の楽器と同様に、音高に応じた異なる太さの弦が備えられている。そのため、低音用の太い弦に対するピッキングが行われた場合に、振動の周波数が低いことから、ピッキングが抽出されるまでの立ち上がりが遅く、楽音の発生が遅れる場合があった。   However, in conventional electronic stringed instruments, like actual instruments, strings with different thicknesses according to pitches are provided. For this reason, when picking is performed on a thick string for bass, since the frequency of vibration is low, the rise until picking is extracted may be delayed, and the generation of musical sounds may be delayed.

本発明は、このような状況に鑑みてなされたものであり、電子弦楽器による楽音の発生の遅れを抑制することを目的とする。   The present invention has been made in view of such a situation, and an object thereof is to suppress a delay in the generation of musical sounds by an electronic stringed instrument.

上記目的を達成するため、本発明の一態様の電子弦楽器は、複数のフレットが設けられた指板部上に張設された複数の弦と、前記複数の弦夫々における補正情報を記憶する記憶手段と、前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、前記複数の弦のいずれかが弾弦されたことを検出する弾弦検出手段と、前記弾弦検出手段による弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う発音指示手段と、前記弾弦検出手段によって弾弦の検出された弦の振動ピッチを検出するピッチ検出手段と、前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記ピッチ検出手段により検出された振動ピッチを補正する補正手段と、前記接続された音源にて発音されている楽音のピッチを、前記補正手段により補正された振動ピッチに変更する変更手段と、を有する。   In order to achieve the above object, an electronic stringed musical instrument according to an aspect of the present invention stores a plurality of strings stretched on a fingerboard portion provided with a plurality of frets and correction information for each of the plurality of strings. Means, state detecting means for detecting a contact state between each of the plurality of frets and each of the plurality of strings, and a string detecting means for detecting that one of the plurality of strings has been played. In response to detection of a string by the string detection means, a tone generation instruction for a musical tone having a pitch obtained based on the string in which the string is detected and the frets in contact with the string by the state detection means A sound generation instruction means for performing on the connected sound source, a pitch detection means for detecting the vibration pitch of the string whose string has been detected by the string detection means, and the string of the string stored in the storage means. Correction information corresponding to the detected string Based on the correction means for correcting the vibration pitch detected by the pitch detection means, and the change means for changing the pitch of the musical sound generated by the connected sound source to the vibration pitch corrected by the correction means. And having.

本発明によれば、電子弦楽器による楽音の発生の遅れを抑制することができる。   ADVANTAGE OF THE INVENTION According to this invention, the delay of generation | occurrence | production of the musical tone by an electronic stringed instrument can be suppressed.

本実施例に係る電子ギターの主要部の構成を示す模式図である。It is a schematic diagram which shows the structure of the principal part of the electronic guitar which concerns on a present Example. 全体の回路を示すブロック図である。It is a block diagram which shows the whole circuit. フレットの押弦状態を検出するためのフレット検出回路を示す図である。It is a figure which shows the fret detection circuit for detecting the stringing state of a fret. ピッチ抽出回路及びマイコンの具体的な機能構成を示すブロック図である。It is a block diagram which shows the concrete function structure of a pitch extraction circuit and a microcomputer. フレット−周波数データテーブルを示す模式図である。It is a schematic diagram which shows a fret-frequency data table. フレット−周波数データテーブルの一部(太線で囲まれた部分)を拡大して詳細を示した図である。It is the figure which expanded and showed the detail (part enclosed by the thick line) of the fret-frequency data table. 音程データ変換テーブルを示す図である。It is a figure which shows a pitch data conversion table. マイコンが楽音を発生する際の処理の概要を示す模式図である。It is a schematic diagram which shows the outline | summary of the process at the time of a microcomputer generating a musical sound. マイコンが実行するフレット検出処理ルーチンを示すフローチャートである。It is a flowchart which shows the fret detection process routine which a microcomputer performs. マイコンへインタラプトがかけられたときの処理を示すインタラプトルーチンを示すフローチャートである。It is a flowchart which shows the interrupt routine which shows a process when an interrupt is applied to the microcomputer. メインルーチンを示すフローチャートである。It is a flowchart which shows a main routine. 図11のM5として示すステップ0(STEP0)のときのフローチャートである。It is a flowchart at the time of step 0 (STEP0) shown as M5 of FIG. 図11にM6として示すSTEP1のフローチャートの詳細である。It is the detail of the flowchart of STEP1 shown as M6 in FIG. 図11にM7として示すSTEP2のフローチャートの詳細である。FIG. 11 is a detailed flowchart of STEP2 shown as M7 in FIG. 図11にM8として示すSTEP3のフローチャートである。It is a flowchart of STEP3 shown as M8 in FIG. S311のサブルーチンの詳細な内容を示す図である。It is a figure which shows the detailed content of the subroutine of S311. 図11のM9として示すSTEP4のフローチャートである。It is a flowchart of STEP4 shown as M9 of FIG. P1のサブルーチンの詳細な内容を示す図である。It is a figure which shows the detailed content of the subroutine of P1.

以下、本発明の実施形態について、図面を用いて説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[実施例]
以下、この発明の実施例について図面を参照して説明するが、ここではこの発明を電子ギター(ギターシンセサイザ)に適用した場合を例に挙げて説明する。なお、これに限らず他のタイプの電子楽器であっても同様に適用できる。
[Example]
Hereinafter, embodiments of the present invention will be described with reference to the drawings. Here, a case where the present invention is applied to an electronic guitar (guitar synthesizer) will be described as an example. Note that the present invention is not limited to this and can be applied to other types of electronic musical instruments.

図1は、本実施例に係る電子ギター1の主要部の構成を示す模式図である。
図1に示すように、電子ギター1は、指板FB上に張設された6つの弦STG1〜STG6を備えており、各弦に対して、フレット及びピッキングを行うことにより、アコースティックギター等の自然楽器と同様の操作でユーザの演奏を可能とするものである。図1に示すように、電子ギター1は、指板FB上に張設された6つの弦STG1〜STG6に夫々設けられ、各弦にスキャンパルスを入力するスキャンパルス発生器PGを備えている。そして、電子ギター1は、各弦に対するフレットあるいはピッキングが行われた場合に、フレットスキャン部FS及びピッチ抽出回路PCによって、各操作を検出する。
図2は、全体の回路を示すブロック図である。ピッチ抽出回路PCは、各弦の振動を電気信号に変換し、振動波形のゼロクロス点及び振幅の絶対値を取得して、マイコンMCPに出力する。
FIG. 1 is a schematic diagram illustrating a configuration of a main part of an electronic guitar 1 according to the present embodiment.
As shown in FIG. 1, the electronic guitar 1 includes six strings STG1 to STG6 stretched on the fingerboard FB. By performing fret and picking on each string, the electronic guitar 1 The user can perform with the same operation as a natural musical instrument. As shown in FIG. 1, the electronic guitar 1 includes a scan pulse generator PG that is provided on each of the six strings STG1 to STG6 stretched on the fingerboard FB and inputs a scan pulse to each string. The electronic guitar 1 detects each operation by the fret scanning unit FS and the pitch extraction circuit PC when fret or picking is performed on each string.
FIG. 2 is a block diagram showing the entire circuit. The pitch extraction circuit PC converts the vibration of each string into an electrical signal, acquires the zero-cross point of the vibration waveform and the absolute value of the amplitude, and outputs them to the microcomputer MCP.

マイコンMCPは、後述する音程データ変換テーブル(ピッチテーブル)を含むメモリ例えばROM及びRAMを有するとともに、タイマーTMRを有し、音源発生装置SOBに与える為の信号を制御するものである。音源発生装置SOBは音源SSとデジタル−アナログ変換回路D/Aと、増幅回路AMCと、スピーカSPとからなり、マイコンMCPからのノートオン(発音)、ノートオフ(消音)、周波数を変える音高指示信号に応じた音高の楽音を放音するものである。なお、音源SSの入力側とマイコンMCPのデータバスBUSとの間に、MIDI(Musical Instrument Digital Interface)形式のインターフェースが設けられている。勿論、ギター本体に音源SSを設けるときは、別のインターフェースを介してもよい。アドレスデコーダDCDは、マイコンMCPからのアドレス読み出し信号ARが入力されたとき、弦番号の読込み信号RDI、時刻読込み信号RDj(j=1〜6)とMAX,MINのピーク値及びその時点その時点の瞬時値読込み信号RDAI(I=1〜18)をピッチ抽出回路PCに出力する。   The microcomputer MCP has a memory such as a ROM and a RAM including a pitch data conversion table (pitch table), which will be described later, and a timer TMR, and controls signals to be supplied to the sound source generator SOB. The sound generator SOB includes a sound source SS, a digital-analog converter circuit D / A, an amplifier circuit AMC, and a speaker SP. Note-on (sounding), note-off (silence) from the microcomputer MCP, and a pitch for changing the frequency. A musical tone having a pitch corresponding to the instruction signal is emitted. Note that an interface in the MIDI (Musical Instrument Digital Interface) format is provided between the input side of the sound source SS and the data bus BUS of the microcomputer MCP. Of course, when the sound source SS is provided in the guitar body, another interface may be used. When the address read signal AR from the microcomputer MCP is input, the address decoder DCD reads the string number read signal RDI, the time read signal RDj (j = 1 to 6), the peak values of MAX and MIN, and the current value at that time. Instantaneous value read signal RDAI (I = 1 to 18) is output to pitch extraction circuit PC.

マイコンMCPは、一定時間毎(例えば1ms毎)の割り込み処理として、各弦における各フレットの押弦状態を常に検出している。押弦状態の検出処理は、各弦のピッキングによるピッチ抽出とは別に並列処理として実行されている。
図3は、フレットの押弦状態を検出するためのフレット検出回路FDCを示す図である。フレット検出回路FDCは、フレットスキャン部FSに備えられている。
図3に示すように、フレット検出回路FDCは、フレットの数に対応する22の選択線KI0〜KI21と、弦の数に対応する6の信号線KC0〜KC5とがマトリクス状に配列された構成を有している。
The microcomputer MCP always detects the stringed state of each fret in each string as interrupt processing at regular intervals (for example, every 1 ms). The pressed state detection process is executed as a parallel process separately from pitch extraction by picking each string.
FIG. 3 is a diagram showing a fret detection circuit FDC for detecting a fret-pressed state. The fret detection circuit FDC is provided in the fret scan unit FS.
As shown in FIG. 3, the fret detection circuit FDC has a configuration in which 22 selection lines KI0 to KI21 corresponding to the number of frets and 6 signal lines KC0 to KC5 corresponding to the number of strings are arranged in a matrix. have.

各選択線KI0〜KI21は、所定時間(例えば1ms)毎に順次アクティブな状態にスイッチングされる。これら選択線KI0〜KI21は、ハイレベル(例えば5v)にプルアップされている。アクティブな状態とされた選択線KI0〜KI21に対し、押弦により指板FBに接触されている弦があると、その弦に対応する信号線KC0〜KC5からはハイレベルの信号が読み出される。
すなわち、フレット検出回路FDCは、所定時間毎に選択線KI0〜KI21を1つずつアクティブな状態に切り替え、信号線KC0〜KC5の状態(ハイレベルまたはローレベル)を読み出して、すべてのフレットについて、いずれの位置が押弦されているかを検出する。
The selection lines KI0 to KI21 are sequentially switched to an active state every predetermined time (for example, 1 ms). These selection lines KI0 to KI21 are pulled up to a high level (for example, 5v). If there is a string that is in contact with the fingerboard FB by pressing the selected line KI0 to KI21 in an active state, a high level signal is read from the signal lines KC0 to KC5 corresponding to the string.
That is, the fret detection circuit FDC switches the selection lines KI0 to KI21 to an active state one by one every predetermined time, reads the state (high level or low level) of the signal lines KC0 to KC5, and for all the frets, Detect which position is pressed.

図4は、ピッチ抽出回路PC及びマイコンMCPの具体的な機能構成を示すブロック図である。ピッチ抽出は、主にピッチ抽出回路PC及びマイコンMCPの以下に説明する機能によって実行される。
図4に示すように、ピッチ抽出回路PCは、ローパスフィルタLPFと、増幅回路AMCと、ゼロクロス点取込回路ZCRと、絶対値取込回路ABSとを備えている。
ローパスフィルタLPFには、ピッキングが行われることにより各弦において発生する波形の信号がヘキサピックアップから入力され、ローパスフィルタLPFは、入力された信号の高周波成分をカットし、低周波成分のみを通過させる。
増幅回路AMCは、ローパスフィルタLPFの出力信号を設定されたゲインに応じて増幅し、ゼロクロス点取込回路ZCR及び絶対値取込回路ABSに出力する。
FIG. 4 is a block diagram showing specific functional configurations of the pitch extraction circuit PC and the microcomputer MCP. The pitch extraction is executed mainly by functions described below of the pitch extraction circuit PC and the microcomputer MCP.
As shown in FIG. 4, the pitch extraction circuit PC includes a low-pass filter LPF, an amplifier circuit AMC, a zero-cross point capturing circuit ZCR, and an absolute value capturing circuit ABS.
A signal having a waveform generated in each string by picking is input to the low-pass filter LPF from the hex pickup, and the low-pass filter LPF cuts the high-frequency component of the input signal and passes only the low-frequency component. .
The amplifier circuit AMC amplifies the output signal of the low-pass filter LPF according to the set gain, and outputs the amplified signal to the zero-cross point capturing circuit ZCR and the absolute value capturing circuit ABS.

ゼロクロス点取込回路ZCRは、入力された波形の信号のゼロクロス点を検出し、ゼロクロス点より正側の場合にハイレベル信号、負側の場合にローレベル信号を出力する。なお、ゼロクロス点取込回路ZCRの出力信号は、反転したもの(反転出力)と非反転のもの(非反転出力)との両方がマイコンMCPに入力される。
絶対値取込回路ABSは、入力された波形の信号の正負両側におけるピーク値を夫々検出し、ピーク値の絶対値及び符号をマイコンMCPに入力する。
The zero-cross point capturing circuit ZCR detects a zero-cross point of the input waveform signal, and outputs a high-level signal when the signal is positive from the zero-cross point and a low-level signal when the signal is negative. Note that both the inverted signal (inverted output) and the non-inverted signal (non-inverted output) are input to the microcomputer MCP as the output signals of the zero-cross point capturing circuit ZCR.
The absolute value fetch circuit ABS detects peak values on both positive and negative sides of the input waveform signal, and inputs the absolute value and sign of the peak value to the microcomputer MCP.

マイコンMCPは、割込制御回路ICと、タイマーTMRと、アナログ−デジタル変換回路A/Dと、メモリMEMとを備えている。
割込制御回路ICは、ゼロクロス点取込回路ZCRの非反転出力及び反転出力が入力され、これらの立ち上がりエッジで割り込み信号を発生させる。すなわち、割込制御回路ICは、ピッキングによって各弦に発生した波形の信号がゼロクロスするタイミングで、割り込み信号を発生させる。割込制御回路ICは、発生した割り込み信号をタイマーTMRに出力する。
The microcomputer MCP includes an interrupt control circuit IC, a timer TMR, an analog-digital conversion circuit A / D, and a memory MEM.
The interrupt control circuit IC receives the non-inverted output and the inverted output of the zero-cross point capturing circuit ZCR, and generates an interrupt signal at these rising edges. That is, the interrupt control circuit IC generates an interrupt signal at the timing when the waveform signal generated in each string by picking crosses zero. The interrupt control circuit IC outputs the generated interrupt signal to the timer TMR.

タイマーTMRは、割込制御回路ICから割り込み信号が入力されると、入力された時間t(非反転出力による割り込み信号の場合)及び時間T(反転出力による割り込み信号の場合)をメモリMEMに出力する。
アナログ−デジタル変換回路A/Dは、絶対値取込回路ABSから入力されたピーク値の絶対値をデジタル信号に変換し、メモリMEMに出力する。なお、アナログ−デジタル変換回路A/Dは、ピーク値の絶対値とともに入力される符号をデジタル化されたピーク値と併せてメモリMEMに出力する。
When an interrupt signal is input from the interrupt control circuit IC, the timer TMR outputs the input time t (in the case of an interrupt signal by non-inverted output) and time T (in the case of an interrupt signal by inverted output) to the memory MEM. To do.
The analog-digital conversion circuit A / D converts the absolute value of the peak value input from the absolute value acquisition circuit ABS into a digital signal and outputs it to the memory MEM. The analog-to-digital conversion circuit A / D outputs the code input together with the absolute value of the peak value together with the digitized peak value to the memory MEM.

メモリMEMは、タイマーTMRから入力された時間t,Tと、ピーク値の絶対値(デジタル値)及び符号を記憶する。メモリMEMに記憶された時間t,Tは、マイコンMCPが前回記憶された時間t,Tと今回記憶された時間t,Tの差分を算出して周波数(発生させる楽音の音程であるピッチ)を求める際に用いられる。
また、メモリMEMは、各弦のフレットと周波数との関係を示すフレット−周波数データテーブルを記憶している。
The memory MEM stores the times t and T input from the timer TMR, the absolute value (digital value) of the peak value, and the sign. The times t and T stored in the memory MEM are calculated by calculating the difference between the times t and T stored last time by the microcomputer MCP and the times t and T stored this time, and calculating the frequency (pitch which is the pitch of the musical sound to be generated). Used when seeking.
Further, the memory MEM stores a fret-frequency data table indicating the relationship between the frets of each string and the frequency.

図5は、フレット−周波数データテーブルを示す模式図である。また、図6は、フレット−周波数データテーブルの一部(太線で囲まれた部分)を拡大して詳細を示した図である。
図5及び図6において、フレット−周波数データテーブルでは、スケールA4を442Hzとし、各弦がいずれの周波数に対応するか、また、フレット位置による音程のコード(キーコード)が関連付けて記憶されている。
FIG. 5 is a schematic diagram showing a fret-frequency data table. FIG. 6 is an enlarged view showing a part of a fret-frequency data table (a part surrounded by a thick line).
5 and 6, in the fret-frequency data table, the scale A4 is set to 442 Hz, and each string corresponds to which frequency, and a pitch code (key code) according to the fret position is stored in association with each other. .

本実施形態においては、自然楽器のギターにおける第1弦に用いる弦を他の弦、例えば第2弦の位置に張り、その弦に予め設定された範囲内のテンションを与えておく。この状態で第2弦がピッキングされた場合の音を、ピッチ抽出処理によって周波数を求めることにより実測の基準音(例えば、図6の実線で囲まれた3,013μs)としている。また、実測の基準音は、図7に示す音程データ変換テーブルによって、cent比例した音程データ(キーコード)に変換される。上記3,013μsの場合、図7に示す音程データ変換テーブルによって、64.04に変換される。なお、整数部(64)は、キーコード、小数部(0.4)は、ピッチベントデータとなる。実測の基準音は、メモリMEMに記憶される(例えば、図6の破線で囲まれた4,031μs)。   In this embodiment, a string used as the first string in a natural musical instrument guitar is stretched to the position of another string, for example, the second string, and a tension within a preset range is applied to the string. In this state, the sound when the second string is picked is used as an actually measured reference sound (for example, 3,013 μs surrounded by a solid line in FIG. 6) by obtaining the frequency by pitch extraction processing. The actually measured reference sound is converted into pitch data (key code) proportional to cent by the pitch data conversion table shown in FIG. In the case of 3,013 μs, the pitch is converted to 64.04 by the pitch data conversion table shown in FIG. The integer part (64) is a key code, and the decimal part (0.4) is pitch vent data. The actually measured reference sound is stored in the memory MEM (for example, 4,031 μs surrounded by a broken line in FIG. 6).

また、第2弦の理論上の基準周波数が4,031μs=59.00(音程データ)として予めメモリMEMに記憶されている(例えば、図6の破線で囲まれたキーコード59)。
マイコンMCPは、メモリMEMに記憶されたこれらのデータを参照ながら、ピッキングが行われた場合に、フレットスキャンの結果及びピッチ抽出の結果に応じて、音程を決定し、楽音を発生する。
The theoretical reference frequency of the second string is stored in advance in the memory MEM as 4,031 μs = 59.00 (pitch data) (for example, the key code 59 surrounded by a broken line in FIG. 6).
When picking is performed while referring to these data stored in the memory MEM, the microcomputer MCP determines a pitch according to the result of the fret scan and the result of the pitch extraction, and generates a musical sound.

以下、第2弦の2フレット目を押さえてトリガーされ、チョーキングが行われた場合に楽音が発生される際の音程(周波数)の決定手順について説明する。
まず、押弦状態として、フレットスキャンによりキーコード61(10進)が定まる(図6の実線の三角で囲まれたキーコード61)。そして、予め設定されたトリガーによって、音程61を音程の初期値として楽音が暫定発音される。
次に、ピッチ抽出処理によって、現在演奏している(ピッキングで物理的に発生されている)周波数として、2,387μs(音程データの68.07)が抽出される(図6の一点鎖線で囲まれた2,387μs及びキーコード68)。
Hereinafter, a procedure for determining a pitch (frequency) when a musical sound is generated when the second fret of the second string is pressed and choked is performed will be described.
First, as a pressed state, a key code 61 (decimal) is determined by fret scanning (key code 61 surrounded by a solid triangle in FIG. 6). Then, a musical tone is tentatively generated by using a preset trigger with the pitch 61 as an initial value of the pitch.
Next, by the pitch extraction process, 2,387 μs (pitch data 68.07) is extracted as a frequency currently played (physically generated by picking) (encircled by a one-dot chain line in FIG. 6). 2,387 μs and key code 68).

抽出結果によって決定される新しい音程は、現在演奏している周波数68.07−(第2弦の実測の基準音周波数64.04−理論上の基準周波数59.00)=63.03となる。
現在、キーコード61で暫定発音していることから、63.03−61=2.03、すなわち、203cent音程を補正すればよい。203centの補正量は、ピッチベントデータとされる。
The new pitch determined by the extraction result is the currently playing frequency 68.07− (the second reference string actual measurement frequency 64.04−theoretical reference frequency 59.00) = 63.03.
Currently, provisional pronunciation is performed with the key code 61, so that 63.03-61 = 2.03, that is, the 203cent pitch may be corrected. The correction amount of 203 cent is the pitch vent data.

次に、マイコンMCPが楽音を発生する際の処理の概要について説明する。
図8は、マイコンMCPが楽音を発生する際の処理の概要を示す模式図である。
図8において、ピッチ抽出回路PCに図8(c)に示す波形の信号が入力されたとすると、これに対するゼロクロス点取込回路ZCRの非反転出力は、図8(a)に示す波形となり、反転出力は、図8(b)に示す波形となる。
Next, an outline of processing when the microcomputer MCP generates musical sounds will be described.
FIG. 8 is a schematic diagram showing an outline of processing when the microcomputer MCP generates a musical sound.
In FIG. 8, if the signal having the waveform shown in FIG. 8C is input to the pitch extraction circuit PC, the non-inverted output of the zero cross point capturing circuit ZCR corresponding to this is the waveform shown in FIG. The output has the waveform shown in FIG.

マイコンMCPは、ピッチ抽出処理を実行する場合、設定された所定の波高値より小さいものはノイズとみなして波形の信号を破棄する(STEP0〜2)。そして、マイコンMCPは、所定の波高値以上となった場合、その波が新たに入力された始めてのものであるときに、波形のピーク値及び符号をベロシティVELの値として取り込む(STEP3)。このとき、マイコンMCPは、ピッチ抽出処理と並列的に実行しているフレットの押弦状態の検出処理で検出された各フレットの情報から音程(音程の初期値)を検出する。そして、マイコンMCPは、ピッチ抽出処理において検出したベロシティVELの値を基に、その音程の発音を行う(ノートオン)。具体的には、マイコンMCPは、音源SSに対して、音程及びベロシティVELの値を出力することにより、発音の指令を行う。この後、ピッチ抽出処理は継続され、マイコンMCPは、前回記憶された時間t,Tと今回記憶された時間t,Tの差分から周波数(ピッチ)を算出し(TP(b),TP(b’))、この周波数によって、すでに発音している音程に対する補正を行う。   When executing the pitch extraction process, the microcomputer MCP discards the waveform signal by regarding the pitch smaller than the predetermined peak value as noise (STEP 0 to 2). When the microcomputer MCP becomes equal to or higher than a predetermined peak value, the peak value and sign of the waveform are taken in as the value of the velocity VEL when the wave is the first input (STEP 3). At this time, the microcomputer MCP detects the pitch (the initial value of the pitch) from the information on each fret detected in the fret string detection processing executed in parallel with the pitch extraction processing. Then, the microcomputer MCP produces a sound of the pitch based on the velocity VEL value detected in the pitch extraction process (note-on). Specifically, the microcomputer MCP issues a sound generation instruction to the sound source SS by outputting the pitch and velocity VEL values. Thereafter, the pitch extraction process is continued, and the microcomputer MCP calculates the frequency (pitch) from the difference between the time t, T stored last time and the time t, T stored this time (TP (b), TP (b ')) This frequency is used to correct the pitch that is already sounding.

以下、マイコンMCPの動作についてフローチャートや波形を示す図面を参照して説明する。
初めに、図面の符号について説明する。
AD・・・図2の瞬時値読込み信号RDA13〜18によりピッチ抽出回路PCの入力波形を直接読んだ入力波高値(瞬時値)
AMP(0,1)・・・正または負の前回(old)の波高値
AMRL1・・・振幅レジスタで記憶されているリラティブ(relative)オフ(off)のチェックのための前回の振幅値である。ここで、前記リラティブオフとは波高値が急激に減衰してきたことに基づき消音することで、フレット操作をやめて開放弦へ移ったときの消音処理に相当する。
AMRL2・・・振幅レジスタで記憶されている前記リラティブオフのための前々回の振幅値で、これにはAMRL1の値が入力される。
Hereinafter, the operation of the microcomputer MCP will be described with reference to flowcharts and drawings showing waveforms.
First, reference numerals in the drawings will be described.
AD: Input peak value (instantaneous value) obtained by directly reading the input waveform of the pitch extraction circuit PC by the instantaneous value read signals RDA13 to 18 in FIG.
AMP (0, 1)... Positive or negative previous (old) peak value AMRL1... The previous amplitude value for checking the relative off stored in the amplitude register. . Here, the relative off corresponds to the silencing process when the fret operation is stopped and the string is moved to the open string by muting based on the fact that the crest value has suddenly attenuated.
AMRL2... The previous amplitude value stored in the amplitude register for the relative off, and the value of AMRL1 is input thereto.

CHTIM・・・最高音フレット(22フレット)に対応する周期
CHTIO・・・開放弦フレットに対応する周期
CHTRR・・・時定数変換レジスタで、上述の時定数変換制御回路TCC(図2)の内部に設けられている。
DUB・・・波形が続けて同一方向に来たことを示すフラグ
FOFR・・・リラティブオフカウンタ
HNC・・・波形ナンバーカウンタ
CHTIM: Period corresponding to the highest sound fret (22 fret) CHTIO: Period corresponding to the open string fret CHTRR: Time constant conversion register, inside the time constant conversion control circuit TCC (FIG. 2) Is provided.
DUB: Flag indicating that the waveform has continued in the same direction FOFR: Relative off counter HNC: Waveform number counter

K・・・半音以上と半音未満の音高コードからなる音高データ
MT・・・これからピッチ抽出を行う側のフラグ(正=1,負=0)
NCHLV・・・ノーチェンジレベル(定数)
OFTIM・・・オフタイム(例えば当該弦の開放弦周期に相当)
OFPT・・・通常オフチェック開始フラグ
ONF・・・ノートオフフラグ
RIV・・・後述のステップ(STEP)4での処理ルートの切替を行うためのフラグ
ROFCT・・・リラティブオフのチェック回数を定める定数
K: Pitch data consisting of pitch codes of more than half tone and less than half tone MT: Flag on the side from which pitch is to be extracted (positive = 1, negative = 0)
NCHLV ... No change level (constant)
OFTIM ... off time (e.g. equivalent to the open string period of the string)
OFPT: Normal off check start flag ONF: Note off flag RIV: Flag for switching the processing route in step (STEP) 4 described later ROFCT: Constant for determining the number of checks for relative off

STEP・・・マイコンMCPのフロー動作を指定するレジスタ(1〜5)
T・・・周期データ
TF・・・有効となった前回のゼロクロス時刻データ
TFN(0,1)・・・正または負のピーク値直後の前回のゼロクロス時刻データ
TFR・・・時刻記憶レジスタ
THLIM・・・周波数上限(定数)
TLLIM・・・周波数下限(定数)
STEP: Register (1-5) that specifies the flow operation of the microcomputer MCP
T: Period data TF: Previous zero cross time data that became valid TFN (0, 1): Previous zero cross time data immediately after positive or negative peak value TFR: Time memory register THLIM ..Frequency upper limit (constant)
TLLIM ... Frequency lower limit (constant)

TP(0,1)・・・正または負の前回の周期データ
TRLAB(0,1)・・・正または負の絶対トリガーレベル(ノートオンしきい値)
TRLRL・・・リラティブオン(再発音開始)
TRLRS・・・共振除去しきい値
TP (0, 1) ... Positive or negative previous cycle data TRLAB (0, 1) ... Positive or negative absolute trigger level (note-on threshold)
TRLRL: Relative on (re-pronounced)
TRLRS: Resonance elimination threshold

TTLIM・・・トリガー時の周波数下限
TTP・・・前回抽出された周期データ
TTR・・・周期レジスタ
TTU・・・定数(17/32と今回の周期情報ttの積)
TTW・・・定数(31/16と今回の周期情報ttの積)
VEL・・・速度(ベロシティー)を定める情報で、発音開始時の波形の最大ピーク値にて定まる。
TTLIM ... Lower frequency limit when triggering TTP ... Cycle data extracted last time TTR ... Cycle register TTU ... Constant (product of 17/32 and current cycle information tt)
TTW: Constant (product of 31/16 and current cycle information tt)
VEL is information that determines the velocity (velocity), and is determined by the maximum peak value of the waveform at the start of sound generation.

X・・・異常または正常状態を示すフラグ
b・・・ワーキングレジスタBに記憶されている今回正負フラグ(正ピークの次のゼロ点のとき1、負ピークの次のゼロ点のとき0)
c・・・ワーキングレジスタCに記憶されている今回波高値(ピーク値)
e・・・ワーキングレジスタEに記憶されている前々回波高値(ピーク値)
h・・・ワーキングレジスタHに記憶されている前々回抽出された周期データ
t・・・ワーキングレジスタT0に記憶されている今回のゼロクロス時刻
tt・・・ワーキングレジスタTOTOに記憶されている今回の周期情報
X: Flag indicating abnormal or normal state b: Current positive / negative flag stored in the working register B (1 at the zero point next to the positive peak, 0 at the next zero point after the negative peak)
c: Current peak value (peak value) stored in working register C
e ・ ・ ・ Previous peak value (peak value) stored in working register E
h: Period data extracted last time stored in the working register H t: Current zero crossing time stored in the working register T0 tt: Current period information stored in the working register TOTO

図9は、マイコンMCPが実行するフレット検出処理ルーチンを示すフローチャートである。
F1において、マイコンMCPは、選択線KI0〜KI21のうち1つ(例えば選択線KI0)を選択し、アクティブな状態とする。
続くF2において、マイコンMCPは、信号線KC0〜KC5の信号レベルを読み出す。このとき、押弦されている弦に対応する信号線では、信号レベルがハイレベルとなり、押弦されていない弦に対応する信号線では、信号レベルがローレベルとなる。
FIG. 9 is a flowchart showing a fret detection processing routine executed by the microcomputer MCP.
In F1, the microcomputer MCP selects one of the selection lines KI0 to KI21 (for example, the selection line KI0) to make it active.
In subsequent F2, the microcomputer MCP reads the signal levels of the signal lines KC0 to KC5. At this time, the signal level corresponding to the string being pressed has a high signal level, and the signal level corresponding to the string not being pressed has a low level.

そして、F3において、マイコンMCPは、押弦されているか否かの判定を行う。マイコンMCPは、押弦されている場合すなわちイエス(以下、Yと称する)の場合、F4の処理に移行し、押弦されていない場合すなわちノー(以下、Nと称する)の場合、F1の処理に移行する。
F4において、マイコンMCPは、音程コードを算出する。このとき、マイコンMCPは、押弦位置の音程コードを算出する。
このような処理を繰り返し、マイコンMCPは、すべてのフレットについて、各弦の押弦状態を検出する。
In F3, the microcomputer MCP determines whether or not the string is pressed. The microcomputer MCP shifts to the process of F4 when the string is pressed, that is, when yes (hereinafter referred to as Y), and shifts to the process of F1 when the string is not pressed, that is, when it is no (hereinafter referred to as N). To do.
In F4, the microcomputer MCP calculates a pitch code. At this time, the microcomputer MCP calculates a pitch code at the string-pressed position.
By repeating such processing, the microcomputer MCP detects the pressed state of each string for all the frets.

図10は、マイコンMCPへインタラプトがかけられたときの処理を示すインタラプトルーチンであり、I1において、マイコンMCPはアドレスデコーダDCDを介し、ゼロクロス時刻取込回路ZTSに対し、弦番号読み込み信号RDIを与えてインタラプトを与えた弦を指定する弦番号を読み込む。そして、その弦番号に対応する時刻情報つまりゼロクロス時刻情報をゼロクロス時刻取込回路ZTSへ時刻読込み信号RD1〜RD6のいずれか対応するものを与えて読込む。これをtとする。しかる後、I2において、同様に波高値取込み回路PVSへピーク値読込み信号RDAI(I=1〜12のうちのいずれか)を与えて、ピーク値を読取る。これをcとする。   FIG. 10 is an interrupt routine showing processing when an interrupt is applied to the microcomputer MCP. In I1, the microcomputer MCP gives a string number read signal RDI to the zero-cross time acquisition circuit ZTS via the address decoder DCD. Read the string number that specifies the string that interrupted. Then, the time information corresponding to the string number, that is, the zero cross time information is read by supplying the zero cross time acquisition circuit ZTS corresponding to any one of the time reading signals RD1 to RD6. This is t. Thereafter, at I2, the peak value read signal RDAI (any one of I = 1 to 12) is similarly applied to the peak value acquisition circuit PVS to read the peak value. Let this be c.

続くI3において、当該ピーク値は正、負のいずれかのピークであるのかを示す情報bをゼロクロス時刻取込回路ZTSより得る。そして、I4にて、このようにして得たt,c,bの値をマイコンMCP内のバッファレジスタT0,C,Bにセットする。このバッファには、割込み処理がなされる都度、このような時刻情報、ピーク値情報、ピークの種類を示す情報がワンセットとして書込まれていき、メインルーチンで、各弦毎にかかる情報に対する処理がなされる。   In the subsequent I3, information b indicating whether the peak value is a positive or negative peak is obtained from the zero cross time acquisition circuit ZTS. Then, at I4, the values of t, c, b obtained in this way are set in the buffer registers T0, C, B in the microcomputer MCP. Each time interrupt processing is performed in this buffer, such time information, peak value information, and information indicating the type of peak are written as one set, and processing for information on each string is performed in the main routine. Is made.

図11は、メインルーチンを示すフローチャートである。パワーオンすることによりM1において、各種レジスタやフラグがイニシャライズされ、レジスタSTEPが0とされる。M2で上述したバッファが空かどうかが判断され、ノーの場合にはM3に進み、バッファよりレジスタB,C,T0の内容が読まれる。これにより、M4において、レジスタSTEPはいくつか判断され、M5ではSTEP0,M6ではSTEP1,M7ではSTEP2,M8ではSTEP3,M9ではSTEP4の処理が順次行われる。   FIG. 11 is a flowchart showing the main routine. By turning on the power, various registers and flags are initialized in M1, and the register STEP is set to zero. In M2, it is determined whether or not the above-described buffer is empty. If no, the process proceeds to M3, and the contents of the registers B, C, and T0 are read from the buffer. As a result, several register STEPs are determined in M4, STEP0 in M5, STEP1 in M6, STEP2 in M7, STEP3 in M8, and STEP4 in M9.

M2でバッファが空の場合すなわちイエスの場合、M10〜M16へと順次に進み、ここで通常のノートオフのアルゴリズムの処理が行われる。このノートオフのアルゴリズムは、オフ(OFF)レベル以下の状態が所定のオフタイム時間続いたら、ノートオフするアルゴリズムである。M10でSTEP=0かどうかが判断され、Nの場合には、M11に進む。M11では、その時点の入力波高値ADが直接読まれる。これは、波高値取込み回路PVSへピーク値取込み信号RDA13〜RDA18のいずれかを与えることで達成できる。そして、この値ADが、入力波高値AD≦オフレベルかどうかが判断され、Yの場合にはM12に進む。M12では前回の入力波高値AD≦オフレベルかどうかが判断され、Yの場合にはM13に進み、ここでタイマーTMRの値≧オフタイムOFTIM(例えば当該弦の開放弦周期の定数)かどうかが判断される。Yの場合には、M14に進み、レジスタSTEPに0か書きこまれ、M15ではノートオンかどうかが判断され、Yの場合には、M16でノートオフ処理され、M2の入側のMに戻る。M12でNの場合にはM17に進み、マイコンMCP内部タイマーTMRをスタートし、M2の入側Mに戻る。M10でYの場合、及びM11、M13、M15でNの場合には、いずれもM12の入側のMに戻る。   If the buffer is empty at M2, that is, if yes, the process proceeds sequentially from M10 to M16, where normal note-off algorithm processing is performed. This note-off algorithm is an algorithm that performs note-off when a state below an OFF (OFF) level continues for a predetermined off-time period. In M10, it is determined whether STEP = 0. If N, the process proceeds to M11. At M11, the input peak value AD at that time is directly read. This can be achieved by supplying any of the peak value acquisition signals RDA13 to RDA18 to the peak value acquisition circuit PVS. Then, it is determined whether or not the value AD is the input peak value AD ≦ off level. If Y, the process proceeds to M12. In M12, it is determined whether or not the previous input peak value AD ≦ off level. If Y, the process proceeds to M13, where it is determined whether the value of the timer TMR ≧ off time OFTIM (for example, the constant of the open string period of the string). To be judged. In the case of Y, the process proceeds to M14, and 0 is written in the register STEP. In M15, it is determined whether or not the note is on. In the case of Y, the note-off process is performed in M16 and the process returns to M on the entry side of M2. . If M12 is N, the process proceeds to M17, the microcomputer MCP internal timer TMR is started, and the process returns to the entry side M of M2. If M10 is Y and M11, M13, and M15 are N, all return to M on the entry side of M12.

このように、波形入力のレベルが減衰してきた場合、オフレベル以下の入力波高値ADがオフタイムOFFTIMに相当する時間続くと、ノートオフの指示を音源SSに対しマイコンMCPは送出する。なお、スナップM15において、通常の状態ではYの判断がなされるが、後述するような処理によって、楽音の発生を指示していない場合でもレジスタSTEPは0以外の値をとっていることがあり、(例えばノイズの入力による。)そのようなときは、M14,M15の処理後M2へ戻ることで、初期設定がなされることになる。
なお、図11では、1つの弦についての処理しか示していないが、この図に示した如き処理を弦の数に相当する6回分、多重化してマイコンMCPは実行することになる。勿論、プロセッサを複数個設けて、別個独立して同等の処理を実行してもよい。
As described above, when the waveform input level is attenuated, the microcomputer MCP sends a note-off instruction to the sound source SS when the input peak value AD below the off level continues for a time corresponding to the off time OFFTIM. In the snap M15, Y is determined in a normal state. However, the register STEP may take a value other than 0 even when the generation of a musical tone is not instructed by the processing described later. (For example, due to noise input.) In such a case, the initial setting is performed by returning to M2 after the processing of M14 and M15.
In FIG. 11, only the processing for one string is shown, but the microcomputer MCP executes the processing as shown in FIG. 11 by multiplexing the processing for six times corresponding to the number of strings. Of course, a plurality of processors may be provided and the same processing may be executed separately and independently.

次に、M4にて分岐して対応する処理を行う各ルーチンの詳細について説明する。
図12は、図11のM5として示すステップ0(STEP0)のときのフローチャートであり、S01で絶対トリガーレベル(ノートオン、しきい値)TRLAB(b)<今回波高値cかどうかが判断され、Yの場合にはS02に進み共振除去がチェックされる。なお、このトリガーレベルは、正と負との極性のピーク夫々についてのチェックを行うようになっている。このTRLAB(0)とTRLAB(1)とは、実験等によって適切な値とすることになる。理想的なシステムではTRLAB(0)とTRLAB(1)とは同じでよい。S02では、共振除去しきい値TRLRS<[今回波高値c−前回波高値(b)]かどうか、すなわち今回波高値と前回波高値の差が所定値以上か否かが判断される。
Next, details of each routine that branches at M4 and performs the corresponding processing will be described.
FIG. 12 is a flowchart at step 0 (STEP 0) shown as M5 in FIG. 11. In S01, it is determined whether or not the absolute trigger level (note-on, threshold) TRLAB (b) <current peak value c. In the case of Y, the process proceeds to S02 and the resonance removal is checked. The trigger level is checked for each of positive and negative polar peaks. TRLAB (0) and TRLAB (1) are set to appropriate values through experiments or the like. In an ideal system, TRLAB (0) and TRLAB (1) may be the same. In S02, it is determined whether or not resonance elimination threshold TRLRS <[current peak value c−previous peak value (b)], that is, whether or not the difference between the current peak value and the previous peak value is equal to or greater than a predetermined value.

1つの弦をピッキングすることによって他の弦が共振を起こす場合、当該他の弦については、振動のレベルが徐々に大きくなり、その結果前回と今回とのピーク値の変化は微小なものとなって、その差は共振除去しきい値TRLRSを超えることはない。ところが、通常のピッキングでは、波形が急激に立上る(あるいは立ち下がる)ことになり、前記ピークの差は共振除去しきい値TRLRSを超える。   When picking one string causes other strings to resonate, the vibration level of the other strings gradually increases, and as a result, the change in peak value between the previous time and this time is very small. Thus, the difference does not exceed the resonance elimination threshold TRLRS. However, in normal picking, the waveform suddenly rises (or falls), and the peak difference exceeds the resonance elimination threshold TRLRS.

いま、このS02で、Yの場合つまり共振の場合でないとみなした場合には、S03において次の処理が行われる。すなわち、今回正負フラグbがフラグMTに書込まれ、レジスタSTEPに1が書込まれ、さらに今回のゼロクロス時刻tが前回のゼロクロス時刻データでTFN(b)として設定される。そして、S04では、その他フラグ類がイニシャライズされ、S05に進む。S05では、今回波高値cが前回の波高値AMP(b)としてセットされ、しかる後図11のメインフローへリターンする。   If it is determined in S02 that the case is Y, that is, the case of resonance, the following processing is performed in S03. That is, the current positive / negative flag b is written in the flag MT, 1 is written in the register STEP, and the current zero cross time t is set as TFN (b) in the previous zero cross time data. In S04, other flags are initialized, and the process proceeds to S05. In S05, the current peak value c is set as the previous peak value AMP (b), and then the process returns to the main flow of FIG.

図12において、Aはリラティブオン(再発音開始)のエントリであり、後述するSTEP4のフローからこのS06へジャンプしてくる。そして、S06では今まで出力している楽音を一度消音し、再発音開始のためにS03へ進行する。この再発音開始のための処理は、通常の発音開始のときと同様であり、以下に詳述するとおりとなる。   In FIG. 12, A is an entry for Relative On (re-sounding start), and jumps to this S06 from the flow of STEP 4 described later. In step S06, the musical tone output so far is muted once, and the process proceeds to step S03 to start re-sounding. The process for starting the re-sounding is the same as that for starting the normal sounding, and will be described in detail below.

そして、またS01でNの場合と、S02でNの場合(今回波高値c−前回波高値AMP(b)が所定値以上ない場合)には、S05に進む。従って、発音開始のための処理は進まないことになる。
以上述べたSTEP0では、フラグMTにBレジスタの内容(b=1)が書込まれ、レジスタT0の内容(t)が前回ゼロクロス時刻データTFN(1)に書込まれ、レジスタCの波高値(c)が前回の波高値AMP(1)に書込まれる。
If the answer is N in S01 and N in S02 (when the current peak value c−the previous peak value AMP (b) is not greater than or equal to a predetermined value), the process proceeds to S05. Therefore, the process for starting sound generation does not proceed.
In STEP0 described above, the contents of the B register (b = 1) are written to the flag MT, the contents (t) of the register T0 are written to the previous zero-crossing time data TFN (1), and the peak value ( c) is written in the previous peak value AMP (1).

図13は図11にM6として示すSTEP1のフローチャートの詳細を示すものであり、S11では、レジスタBの内容(b)と、フラグMtが不一致かどうかが判断され、Yの場合にはS12に進む。S12では、絶対トリガーレベル(ノートオンしきい値)TRLAB(b)<今回波高値cかどうかが判断され、Yの場合にはS13に進む。S12でYの場合にはレジスタSTEPに2がセットされ、S14でレジスタT0の内容(1)を前回のゼロクロス時刻データでTFN(b)としてセットし、さらにS15で今回波高値cを、前回の波高値AMP(b)へセットする。S11において、Nの場合すなわち入力波形信号が同一方向にきた場合S16に進み、今回波高値c>前回波高値AMP(b)かどうかが判断され、Yの場合すなわち今回の波高値cが前回の波高値AMP(b)より大の場合には、S14に進む。一方、S12においてNの場合には、S15に進み、これにより波高値のみが更新される。また、S16において、Nの場合及び、S15の処理の終了時にはメインフロー(図11)ヘリターンする。   FIG. 13 shows the details of the flowchart of STEP1 shown as M6 in FIG. 11. In S11, it is determined whether or not the contents (b) of the register B and the flag Mt are inconsistent. If Y, the process proceeds to S12. . In S12, it is determined whether or not the absolute trigger level (note-on threshold) TRLAB (b) <current peak value c. If YES, the process proceeds to S13. In the case of Y in S12, 2 is set in the register STEP, the content (1) of the register T0 is set as TFN (b) in the previous zero cross time data in S14, and the current peak value c is set in S15 in S15. Set to peak value AMP (b). In S11, if the input waveform signal comes in the same direction in N, the process proceeds to S16, and it is determined whether or not the current peak value c> the previous peak value AMP (b). In the case of Y, that is, the current peak value c is If it is larger than the peak value AMP (b), the process proceeds to S14. On the other hand, in the case of N in S12, the process proceeds to S15, whereby only the peak value is updated. In S16, the process returns to the main flow (FIG. 11) in the case of N and at the end of the process of S15.

以上述べたSTEP1では、今回正負フラグb(=0)とフラグMT=1が不一致ということで、今回のゼロクロス時刻tを前回のゼロクロス時刻データTFN(0)としてセットし、さらに今回波高値cを前回の波高値AMP(0)として書込む。   In STEP 1 described above, since the current positive / negative flag b (= 0) and the flag MT = 1 do not match, the current zero cross time t is set as the previous zero cross time data TFN (0), and the current peak value c is further set. Write as the previous peak value AMP (0).

図14は、図11にM7として示すSTEP2のフローチャートの詳細を示すもので、S20において、今回正負フラグb=フラグMTかどうかすなわちSTEP0の方向と同一のゼロクロス点の到来かどうかを判断し、Yの場合にはS21に進む。S21では、レジスタCHTRRへ開放弦周期CHTIOをセットし、S22に進む。S22では、今回波高値c>(7/8)×前回の波高値AMP(b)かどうか、つまり波高値が前回と今回とで略同一かどうかをチェックし、Yの場合つまり美しい自然減衰の場合には、S23に進み、フラグDUBを0にセットし、S24に進む。S24では、周期計算を行い、今回のゼロクロス時刻t−前回のゼロクロス時刻データTFN(b)を前回周期データTP(b)に入力し、今回のゼロクロス時刻tを前回ゼロクロス時刻データTFN(b)として入力する。S24におけるTF(b)は、STEP3でノートオン(1.5波)の条件として使用される。また、S24では、レジスタSTEPが3とセットされる。さらに、今回波高値cと、前回の波高値AMP(0)と、前回の波高値AMP(1)の内、最も大きい値をベロシティVELとして登録する。また、今回波高値cを前回の波高値AMP(b)ヘ書込む。   FIG. 14 shows the details of the flowchart of STEP2 shown as M7 in FIG. 11. In S20, it is determined whether or not the current positive / negative flag b = flag MT, that is, whether the same zero cross point as the direction of STEP0 has arrived. In this case, the process proceeds to S21. In S21, the open string period CHTIO is set in the register CHTRR, and the process proceeds to S22. In S22, it is checked whether or not the current peak value c> (7/8) × previous peak value AMP (b), that is, whether the peak value is substantially the same between the previous peak and the current peak. In this case, the process proceeds to S23, the flag DUB is set to 0, and the process proceeds to S24. In S24, a cycle calculation is performed, and the current zero cross time t−the previous zero cross time data TFN (b) is input to the previous cycle data TP (b), and the current zero cross time t is set as the previous zero cross time data TFN (b). input. TF (b) in S24 is used as a note-on (1.5 wave) condition in STEP3. In S24, the register STEP is set to 3. Further, the largest value among the current peak value c, the previous peak value AMP (0), and the previous peak value AMP (1) is registered as the velocity VEL. Further, the current peak value c is written into the previous peak value AMP (b).

S241では、この弦に対応するフレット(押弦)状態をチェックする。続くS242で、フレット検出処理ルーチンで算出された音程コードを取得する。
さらに、S243で、音程コード及びベロシティVELを出力して、ノートオンする。すなわち、S243では、ピッチ抽出結果にかかわらず、フレット検出処理の結果における音程コードと、ベロシティVELとによって、まずは音程の初期値を発音させる。S243の後、メインルーチンヘリターン(RET)する。
In S241, the fret (pressed string) state corresponding to this string is checked. In subsequent S242, the pitch code calculated in the fret detection processing routine is acquired.
In step S243, the pitch code and velocity VEL are output and the note is turned on. That is, in S243, regardless of the pitch extraction result, the initial value of the pitch is first pronounced by the pitch code and the velocity VEL in the result of the fret detection process. After S243, the process returns to the main routine (RET).

S20でNの場合には、S25に進み、フラグDUBすなわち同一方向の入力波形がきたということを意味するフラグを1にし、S26に進む。S26では、今回波高値c>前回の波高値AMP(b)かどうかが判断され、Yの場合にはS29に進む。S29では今回波高値cに前回の波高値AMP(b)が書替えられ、レジスタTの内容tに前回のゼロクロス時刻データTFN(b)が書替えられる。また、S22において、Nの場合には、S27に進み、フラグDUB=1かどうか、つまり前回STEP2を実行したとき、ダブッたか否かのチェックを行い、Yの場合つまりダブッていればS28に進む。S28では、フラグDUBを0にする。この場合にはS29に進みメインルーチンにリターンする。S24の処理の後、またS26のNのときも、同様にメインルーチンヘリターン(RET)する。   In the case of N in S20, the process proceeds to S25, in which the flag DUB, that is, the flag indicating that the input waveform in the same direction has come is set to 1, and the process proceeds to S26. In S26, it is determined whether or not the current peak value c> the previous peak value AMP (b). If Y, the process proceeds to S29. In S29, the previous peak value AMP (b) is rewritten to the current peak value c, and the previous zero cross time data TFN (b) is rewritten to the contents t of the register T. In S22, if N, the process proceeds to S27, where it is checked whether or not the flag DUB = 1, that is, whether or not the previous STEP2 was executed. If Y, that is, if it is double, the process proceeds to S28. . In S28, the flag DUB is set to zero. In this case, the process proceeds to S29 and returns to the main routine. After the process of S24 and also when S26 is N, the process returns to the main routine (RET).

以上述べたSTEP2では、今回正負フラグbとしてフラグMT=1が書替えられ、レジスタCHTRRに0フレット周期すなわち開放弦周期CHTIOが書替えられ、またフラグDUBが0にセットされ、さらにt−TFN(1)→TP(1)なる周期計算が行われ、また今回ゼロクロス時刻tに前回のゼロクロス時刻データTFN(1)が書き替えられ、今回波高値c、前回波高値AMP(0)、前回波高値AMP(1)の内最も大きい値がベロシティVELとしてセットされ、さらに今回波高値cとして前回波高値AMP(1)がセットされる。   In STEP 2 described above, the flag MT = 1 is rewritten as the current positive / negative flag b, the 0 fret period, that is, the open string period CHTIO is rewritten in the register CHTRR, the flag DUB is set to 0, and t-TFN (1) → The period calculation of TP (1) is performed, and the previous zero-cross time data TFN (1) is rewritten at the current zero-cross time t, and the current peak value c, the previous peak value AMP (0), and the previous peak value AMP ( The largest value in 1) is set as the velocity VEL, and the previous peak value AMP (1) is set as the current peak value c.

図15は、図11にM8として示すSTEP3のフローチャートであり、S30でフラグMT≠今回正負フラグbかどうかが判断され、正常の場合すなわちYのときは、S31に進む。S31では、(1/8)c<AMP(b)ならXが0、また逆の場合にはX=1にセットされ、S32に進む。S32では今回波高値cとして前回の波高値AMP(b)が書替えられる。
そしてS33において、STEP2で得られたVELより今回波高値cが大であれば、ベロシティVELは今回波高値cが入力される。もし逆ならば、このベロシティVELは変化しない。次に今回正負フラグbにフラグMTが移替えられ、これによりピッチ変更側が逆にされる。これは、後述するSTEP4からフラグMTの意味が変り、ピッチ変更側を意味している。そして、S34で[t−TFN(b)→TP(b)]なる周期計算が行われる。また、今回のゼロクロス時刻tとして前回のゼロクロス時刻データでTFN(b)が書替えられる。
FIG. 15 is a flowchart of STEP3 shown as M8 in FIG. 11. In S30, it is determined whether or not the flag MT is not the current positive / negative flag b. In S31, if (1/8) c <AMP (b), X is set to 0, and in the opposite case, X = 1 is set, and the process proceeds to S32. In S32, the previous peak value AMP (b) is rewritten as the current peak value c.
In S33, if the current peak value c is larger than the VEL obtained in STEP 2, the current peak value c is input to the velocity VEL. If vice versa, this velocity VEL does not change. Next, the flag MT is transferred to the current positive / negative flag b, thereby reversing the pitch change side. This means that the meaning of the flag MT is changed from STEP 4 described later, and means the pitch change side. Then, a period calculation of [t-TFN (b) → TP (b)] is performed in S34. Also, TFN (b) is rewritten with the previous zero cross time data as the current zero cross time t.

次に、S35において、X=0かどうかを判断し、Yの場合にはS36に進み、周波数上限THLIM<前回の周期データTP(b)かどうか、つまりピッチ抽出上限チェックを行い、その結果、最高音の周期より大きな周期をもてば、許容範囲にあるということでYとなり、S37に進む。S37では、トリガー時の周波数下限TTLIM>前回の周期データTP(b)かどうか、つまりピッチ抽出下限チェックを行い、最低音の周期
より小の周期をもてば許容範囲にあり、Yの判断をしてS38に進む。S37のピッチ抽出下限は、後述するSTEP4のピッチ抽出下限とは定数が異なる。
具体的には、周波数上限THLIMは、最高音フレットの2〜3半音上の音高周期に相当し、トリガー時の周波数下限TTLIMは、開放弦の開放弦フレットの5半音下の音高周期に相当するものとする。
Next, in S35, it is determined whether or not X = 0. If Y, the process proceeds to S36, where frequency upper limit THLIM <previous period data TP (b) is checked, that is, pitch extraction upper limit is checked. If it has a period larger than the period of the highest sound, it is Y because it is within the allowable range, and the process proceeds to S37. In S37, whether the frequency lower limit TTLIM at the time of trigger> previous cycle data TP (b) is checked, that is, the pitch extraction lower limit is checked. Then, the process proceeds to S38. The pitch extraction lower limit of S37 is different in constant from the pitch extraction lower limit of STEP 4 described later.
Specifically, the upper frequency limit THLIM corresponds to the pitch period 2 to 3 semitones above the highest note fret, and the lower frequency limit TTLIM at the time of triggering is the pitch period 5 semitones below the open string fret of the open string. It shall be equivalent.

S38では、前回の周期データTP(b)を前回抽出された周期データTTPとしてセットすなわち、ピッチ抽出側で抽出されたピッチをセーブ(これは後述するSTEP4で使用される)し、S39に進む。S39では、前回の周期データTP(b)≒TP(b’)かどうか、すなわち極性の違うゼロクロス点間の周期の略一致のチェックである1.5波ピッチ抽出チェックを行い、Yの場合にはS301で次のような処理が行われる。
すなわち、前回のゼロクロス時刻データTFN(b’)として時刻記憶レジスタTFRが書替えられ、また今回のゼロクロス時刻tが前回のゼロクロス時刻データTFとしてセットされ、波形ナンバーカウンタHNCをクリアする。このカウンタHNCは後述するSTEP4にて使用される。レジスタSTEPは4にセットされ、ノートオンフラグONFは2(発音状態)にセットされ、定数TTUは0すなわち(MIN)にセットされ、定数TTWは最高MAXにセットされる。これらはいずれも後述するSTEP4にて使用するものである。また、リラティブオフの為の前回波高値レジスタAMRL1がクリアされる。
In S38, the previous cycle data TP (b) is set as the previously extracted cycle data TTP, that is, the pitch extracted on the pitch extraction side is saved (this is used in STEP 4 described later), and the process proceeds to S39. In S39, a 1.5-wave pitch extraction check is performed to check whether the previous cycle data TP (b) ≈TP (b ′), that is, a substantially equal cycle between zero-cross points having different polarities. In S301, the following processing is performed.
That is, the time storage register TFR is rewritten as the previous zero cross time data TFN (b ′), and the current zero cross time t is set as the previous zero cross time data TF, and the waveform number counter HNC is cleared. This counter HNC is used in STEP 4 described later. The register STEP is set to 4, the note-on flag ONF is set to 2 (sounding state), the constant TTU is set to 0, that is, (MIN), and the constant TTW is set to the maximum MAX. These are all used in STEP 4 described later. Also, the previous peak value register AMRL1 for the relative off is cleared.

次にS310で、いま求まったTP(b)の周期データを、Tレジスタへ入力し、S311で音高コードKを求めるサブルーチンPITCH(図16)へジャンプし、その結果求まる音高コードにて、S312において発音開始の指示を音源SSへ出力する。ところで、このとき、音高コードのうち半音未満(100セント未満)の音高コードは、四捨五入(K←INT(K+0.5))されており、クロマチックな音高の発音開始が音源SSへ指示されることになる。またレジスタVELに記憶されているベロシティの値に従って、発生楽音の音量が決定されることになる。   Next, in S310, the period data of TP (b) obtained now is input to the T register, and in S311 jumps to a subroutine PITCH (FIG. 16) for obtaining a pitch code K. In step S312, a sound generation start instruction is output to the sound source SS. By the way, pitch codes of less than a semitone (less than 100 cents) are rounded off (K ← INT (K + 0.5)) at this time, and the sound source SS is instructed to start the chromatic pitch. Will be. Further, the volume of the generated musical sound is determined according to the velocity value stored in the register VEL.

図16は、前記S311のサブルーチンの詳細な内容を示している。
マイコンMCPは、まず、P1では、ピッチを算出するためのサブルーチン(PITCHCAL)を実行し、ピッキングに対応する音高を算出する。
そして、P2では、マイコンMCPは、現在演奏している音高コードKから、実測の基準音周波数Bと理論上の基準周波数Aとの差分を減算し、音程差を算出する。
続いて、P3では、マイコンMCPは、音程差(cent)だけピッチを補正する。
P3の処理の後、メインルーチンへリターン(RET)する。
FIG. 16 shows the detailed contents of the subroutine of S311.
First, in P1, the microcomputer MCP executes a subroutine (PITCHCAL) for calculating a pitch, and calculates a pitch corresponding to picking.
In P2, the microcomputer MCP calculates a pitch difference by subtracting the difference between the actually measured reference sound frequency B and the theoretical reference frequency A from the pitch code K currently being played.
Subsequently, in P3, the microcomputer MCP corrects the pitch by a pitch difference (cent).
After the process of P3, the process returns to the main routine (RET).

図18は、前記P1のサブルーチンの詳細な内容を示している。
マイコンMCPは、まずオクターブ値OCTを0とし(S181)、抽出ピッチデータTがマイコンMCPの内に記憶している音程データ変換テーブル(図7)内の基準ピッチデータT0「4525」より小さいか否か判断する(S182)。いま抽出ピッチデータが例えば「9800」であったとすると、このデータT「9800」は基準ピッチデータT0「4525」より大きいので、S183に進み、抽出ピッチデータT「9800」を1/2にして「4900」とし、オクターブ値OCTを−1して「−1」とし(S184)、再びS182に戻って、l/2にした抽出ピッチデータで「4900」が基準ピッチデータT0「4525」より小さいか否か判断する。
FIG. 18 shows the detailed contents of the subroutine P1.
The microcomputer MCP first sets the octave value OCT to 0 (S181), and whether the extracted pitch data T is smaller than the reference pitch data T0 “4525” in the pitch data conversion table (FIG. 7) stored in the microcomputer MCP. Is determined (S182). If the extracted pitch data is “9800”, for example, this data T “9800” is larger than the reference pitch data T0 “4525”, so that the process proceeds to S183 and the extracted pitch data T “9800” is halved to “ 4900 ", the octave value OCT is set to -1 to" -1 "(S184), the process returns to S182 again, and is" 4900 "smaller than the reference pitch data T0" 4525 "in the extracted pitch data set to l / 2? Judge whether or not.

今度も基準ピッチデータT0より大きいので、再度S183,S184の処理を繰り返し、抽出ピッチデータTをl/2にして「2450」とし、オクターブ値を−1して「−2」とし、同じく抽出ピッチデータT「2450」が基準ピッチデータT0「4525」より小さいか否か判断する(S182)。   This time, since it is larger than the reference pitch data T0, the processes of S183 and S184 are repeated again, the extracted pitch data T is set to 1/2, “2450”, the octave value is set to −1, “−2”, and the extracted pitch It is determined whether or not the data T “2450” is smaller than the reference pitch data T0 “4525” (S182).

今度は基準ピッチデータT0より小さくなるので、S185に進み、抽出ピッチデータT「2450」が1/2の基準ピッチデータT0「2262.5」より大きいか否か判断する。抽出ピッチデータT「2450」の方が大きいので、S188に進み、上記基準ピッチデータT0「4525」により抽出ピッチデータT「2450」を引いてオクターブ未満の端数データt「2075」を求め、順番データmを「0」とし(S189)、この「0」の順番データmに応じた差分ピッチデータdTm「129」より上記端数データt「2075」が小さいか否か判断する(S190)。   This time, since it becomes smaller than the reference pitch data T0, the process proceeds to S185, where it is determined whether or not the extracted pitch data T “2450” is larger than the half reference pitch data T0 “2262.5”. Since the extracted pitch data T “2450” is larger, the process proceeds to S188, and the extracted pitch data T “2450” is subtracted from the reference pitch data T0 “4525” to obtain fractional data t “2075” less than an octave. m is set to “0” (S189), and it is determined whether or not the fraction data t “2075” is smaller than the differential pitch data dTm “129” corresponding to the order data m of “0” (S190).

差分ピッチデータdTmの方が小さいので、S191に進んで、端数データt「2075」より先頭の差分ピッチデータdTm「129」を引いて「1946」とし、順番データmを+1して「1」とする(S192)。そして、端数データtが差分ピッチデータdTmより小さくなるまで、ステップS191,S192の処理を繰り返して、端数データtより差分ピッチデータdTmを順番に引いていく。
そして、差分ピッチデータdTmが「73」まで差し引かれ、順番データmが「21」になると、端数データtが残り「17」となり、次の差分ピッチデータdTm(m=21)「70」より小さくなるので、S193に進み、K=K0+12×OCT+(m+t/dTm)/2=57.0+12×(−2)+(21+17/70)/2=43.62の演算を実行して、新たな音高コードKを求める。この音高はG1♯よりやや上の音高となる。
Since the difference pitch data dTm is smaller, the process proceeds to S191, and the first difference pitch data dTm “129” is subtracted from the fraction data t “2075” to become “1946”, and the order data m is incremented by 1 to “1”. (S192). Then, until the fraction data t becomes smaller than the differential pitch data dTm, the processes of steps S191 and S192 are repeated, and the differential pitch data dTm is sequentially subtracted from the fraction data t.
When the difference pitch data dTm is subtracted to “73” and the order data m becomes “21”, the fraction data t remains “17”, which is smaller than the next difference pitch data dTm (m = 21) “70”. Therefore, the process proceeds to S193, and an operation of K = K0 + 12 × OCT + (m + t / dTm) /2=57.0+12× (−2) + (21 + 17/70) /2=43.62 is executed to obtain a new sound. Find high code K. This pitch is slightly higher than G1 #.

こうして、音程データ変換テーブルに記憶されたA3〜A4の1オクターブ分のピッチの差分データdTmだけで、他のオクターブの音高データを求めることができる。
また、抽出したピッチデータTがl/2の基準ピッチデータT0/2「2262.5」より小さければ、S185〜S187で抽出ピッチデータTが「2262.5」より大きくなるまで2倍(n=1,2,3・・・・・・)していき、以後は上述したS188〜S193の処理を行って、音高データKを求める。
In this way, pitch data of another octave can be obtained from only the difference data dTm of the pitch of one octave A3 to A4 stored in the pitch data conversion table.
Also, if the extracted pitch data T is smaller than the reference pitch data T0 / 2 “2262.5” of l / 2, the extracted pitch data T is increased by 2 n times (n in S185 to S187 until the extracted pitch data T becomes larger than “2262.5”. = 1, 2, 3,...), And thereafter, the processing of S188 to S193 described above is performed to obtain the pitch data K.

以上要約すると、マイコンMCPは、S181〜S187で、抽出ピッチデータTを2倍(n=・・・・・・,−2,−1,0,1,2・・・・・・)して、音程データ変換テーブルに記憶されているピッチデータの範囲内にはいるようにすることにより、このnの値であるオクターブ値OCTを求め、S188〜S192で、上記抽出ピッチデータTのオクターブ未満の端数データと差分ピッチデータdTmの累算データとの対応から音名を求められることになる。 In summary, the microcomputer MCP multiplies the extracted pitch data T by 2n (n =..., -2, -1, 0, 1, 2,...) In S181 to S187. The octave value OCT which is the value of n is obtained by being within the range of the pitch data stored in the pitch data conversion table, and less than the octave of the extracted pitch data T in S188 to S192. The pitch name can be obtained from the correspondence between the fraction data and the accumulated data of the differential pitch data dTm.

また、上記実施例では、音高の表示を、シリアル番号とするようにしたが、オクタープ、音階名(コード)、半音以下のデータにて表現するようにしてもよく、その他どのような表現形態であってもよい。
さらに、上記実施例ではピッチデータを50セント単位(半音の半分)でもつようにしたが、100セント単位(半音毎)にもってもよく、あるいはさらに細分化してもつようにしてもよく、加えて、1オクターブを超えてそのようなデータをもつようにしてもよい。
このようにして、周期データから、対応する音高コードを求めることができ、図16のSTEP3の処理時には、音高コードは、半音以上のものとされ(S311)、発音時の音高はクロマチックに指定されることになる。
In the above embodiment, the pitch is displayed as a serial number. However, the pitch may be represented by an octave, a scale name (code), data of less than a semitone, and any other representation form. It may be.
Further, in the above embodiment, the pitch data is held in units of 50 cents (half semitone), but may be in units of 100 cents (every semitone), or may be further subdivided. You may have such data in excess of one octave.
In this way, the corresponding pitch code can be obtained from the periodic data. During the processing of STEP 3 in FIG. 16, the pitch code is set to a semitone or more (S311), and the pitch at the time of pronunciation is chromatic. Will be specified.

さて、図16のS30において、Nの場合(同一方向のゼロクロス点検出の場合)は、S303に進み、前回の波高値AMP(b)<今回波高値cかどうかが判断され、Yの場合はS304に進む。S304では、今回波高値cが前回の波高値AMP(b)としてセットされ、ベロシティVELまたはレジスタCの値cの内のいすれか大きい値がべロシティVELにセットされる。S303,S35,S36,S37,S39のいずれの場合もNの場合には、メインルーチンヘリターン(RET)する。   In S30 of FIG. 16, in the case of N (in the case of zero cross point detection in the same direction), the process proceeds to S303, where it is determined whether or not the previous peak value AMP (b) <current peak value c. The process proceeds to S304. In S304, the current crest value c is set as the previous crest value AMP (b), and the velocity VEL is set to a velocity VEL whichever is greater of the velocity VEL or the value c of the register C. If any of S303, S35, S36, S37, and S39 is N, the process returns to the main routine (RET).

S31において、X=1すなわち異常となる場合、1/8b1<b0のときと、1/8a2<a1のときのジャッジではいずれもその条件を満足せず、X=1となる。
すなわち、波形入力初期等に入力される波形のピークは、ノイズによるもので、これらのノイズの周期を検出して発音開始を指示すると、全くおかしな音が発生してしまう。そこで、S31では、波高値が大きく変わったことを検知して、X=1とし、S35でNの判断をするようにする。そして、S31にて波形が正常な変化をすることが検知されてから、発音開始を指示するようにする。
In S31, when X = 1, that is, when there is an abnormality, the judgment when 1 / 8b1 <b0 and 1 / 8a2 <a1 do not satisfy the condition, and X = 1.
That is, the peak of the waveform input at the initial stage of waveform input or the like is due to noise, and if the period of these noises is detected and the start of sound generation is instructed, a completely strange sound will be generated. Therefore, in S31, it is detected that the peak value has changed significantly, X = 1, and N is determined in S35. Then, after it is detected in S31 that the waveform changes normally, the start of sound generation is instructed.

ここでは、TP(b)≒TP(b’)の検出がなされたときにノートオンとなる。
以上述べたSTEP3では、MT=1≠b、AMP(0)←c、max[VEL、c(のいずれか大きい方)]→VEL、MT←b=0、TP(0)←[t−TFN(0)]、TFN(0)←t、TTP←TP(0)、TFR←TFN(1)、TF←t、HNC←0、ONF←2、TTU←0(MIN)、TTW←MAX、AMRL1←0、ノートオン条件TP(0)≒TP(1)についての処理がなされる。そして、適切な波形入力に応答してこのSTEP3において、抽出されたピッチに従ったクロマチックな音高の楽音が発生開始されることになる。すなわち、周期検出を開始してから、l.5周期程度の時間経過で発音指示が音源SSに対しなされることになる。勿論、諸条件を満足しなければ、さらにおくれることは上述したとおりである。
Here, note-on occurs when TP (b) ≈TP (b ′) is detected.
In STEP 3 described above, MT = 1 ≠ b, AMP (0) ← c, max [VEL, c (whichever is greater)] → VEL, MT ← b = 0, TP (0) ← [t−TFN (0)], TFN (0) ← t, TTP ← TP (0), TFR ← TFN (1), TF ← t, HNC ← 0, ONF ← 2, TTU ← 0 (MIN), TTW ← MAX, AMRL1 Processing for ← 0, note-on condition TP (0) ≈TP (1) is performed. Then, in response to an appropriate waveform input, a musical tone having a chromatic pitch according to the extracted pitch is started in STEP3. That is, after the period detection is started, l. A sound generation instruction is given to the sound source SS after about five cycles. Of course, as described above, if the various conditions are not satisfied, further processing is performed.

図17は、図11のM9として示すSTEP4のフローチャートであり、この場合ピッチ抽出のみを行うルート(1)、実際にピッチ変更を行うルート(2)がある。先ず、S40,S41,S42,S63〜S67に示すルート(1)について説明する。S40において、波形ナンバーカウンタHNC>3が判断され、Yの場合にはS41に進む。S41では、リラティブオンしきい値TRLRL<[今回波高値c−前回の波高値AMP(b)]かどうかの判断が行われ、Nの場合にはS42に進む。S42では今回正負フラグb=フラグMTつまりピッチ変更側かどうかが判断され、Yの場合にはS43に進む。   FIG. 17 is a flowchart of STEP 4 shown as M9 in FIG. 11. In this case, there is a route (1) for performing only pitch extraction and a route (2) for actually changing the pitch. First, the route (1) shown in S40, S41, S42, and S63 to S67 will be described. In S40, the waveform number counter HNC> 3 is determined. If Y, the process proceeds to S41. In S41, it is determined whether or not the relative on threshold value TRLRL <[current peak value c−previous peak value AMP (b)]. If N, the process proceeds to S42. In S42, it is determined whether or not the current positive / negative flag b = flag MT, that is, the pitch change side. If Y, the process proceeds to S43.

ところで、初期状態では、前記波形ナンバーカウンタHNCは0である(図15のS301参照)ので、S40ではNの判断をしてS42へ進む。そして、例えば、理想的な波形入力の場合は、b=1でMT=0であるから、S42からS63へ進む。   By the way, in the initial state, the waveform number counter HNC is 0 (see S301 in FIG. 15), so in S40, N is determined and the process proceeds to S42. For example, in the case of an ideal waveform input, since b = 1 and MT = 0, the process proceeds from S42 to S63.

S63においては、同じ極性のピークが続けて入力されてきているか(ダブりであるか)、否かチェックするために、レジスタRIV=1かどうかが判断され、Yの場合にはS68に進み、また、Nの場合(ダブリでない場合)にはS64に進み、ここで以下の処理が行われる。すなわち、S64では今回波高値cが前回の波高値AMP(b)に入力され、リラティブオフ処理のために前回の振幅値AMRL1が前々回の振幅値AMRL2に入力される。なお、いまの場合はAMRL1の内容は0である(STEP3のS30参照)。さらにS64において、前回の波高値AMP(b’)と今回波高値cうちいずれか大きい方が前回振幅値AMRL1に入力される。つまり、周期の中で2つある正,負のピーク値について大きい値のピーク値が振幅値AMRL1にセットされる。そして、S65で波形ナンバーカウンタHNC>8かどうかが判断され、ここで波形ナンバーカウンタ(ピッチ変更側でないゼロクロスカウンタ)NHCが+1され、カウントアップされる。   In S63, it is determined whether or not the register RIV = 1 in order to check whether the same polarity peak has been continuously input (doubled) or not. If Y, the process proceeds to S68. , N (when not double), the process proceeds to S64, where the following processing is performed. That is, in S64, the current peak value c is input to the previous peak value AMP (b), and the previous amplitude value AMRL1 is input to the previous amplitude value AMRL2 for the relative off process. In this case, the content of AMRL1 is 0 (see S30 in STEP 3). Furthermore, in S64, the larger one of the previous peak value AMP (b ') and the current peak value c is input to the previous amplitude value AMRL1. That is, a peak value having a large value for two positive and negative peak values in the cycle is set as the amplitude value AMRL1. Then, in S65, it is determined whether or not the waveform number counter HNC> 8. Here, the waveform number counter (zero cross counter not on the pitch change side) NHC is incremented by 1 and counted up.

従って、波形ナンバーカウンタHNCは、上限が9となる。そして、S65もしくはS66の処理の後S67へ進行する。S67では、レジスタRIVを1とし、今回のゼロクロス時刻から時刻記憶レジスタTFRの内容を引算して、周期レジスタTTRへ入力する。そして、今回のゼロクロス時刻tは、時刻記憶レジスタTFRへセーブされ、この後、メインルーチンにリターン(RET)する。   Therefore, the upper limit of the waveform number counter HNC is 9. And it progresses to S67 after the process of S65 or S66. In S67, the register RIV is set to 1, and the contents of the time storage register TFR are subtracted from the current zero crossing time and input to the period register TTR. Then, the current zero crossing time t is saved in the time storage register TFR, and thereafter, the process returns to the main routine (RET).

S63でYの場合は、S68に進み今回波高値c>前回の波高値AMP(b)かどうかが判断され、Yの場合はS69に進む。S69では、今回波高値cに前回の波高値AMP(b)が書替えられ、S70に進む。S70では今回波高値c>前回の振幅値AMRL1かどうかが判断され、Yの場合にはS71に進み、ここで今回波高値cが前回の振幅値AMRL1に入力される。
もし、S68でNの判断がなされるとすぐにメインルーチンへリターンする。従って、新しい入力波形のピークが大である場合についてのみ、新しい波形の振幅値が登録される。(その場合は、倍音のピークをひろっていないと考えられるので。)
In the case of Y in S63, the process proceeds to S68, and it is determined whether or not the current peak value c> the previous peak value AMP (b). If Y, the process proceeds to S69. In S69, the previous peak value AMP (b) is rewritten to the current peak value c, and the process proceeds to S70. In S70, it is determined whether or not the current peak value c> the previous amplitude value AMRL1, and if Y, the process proceeds to S71, where the current peak value c is input to the previous amplitude value AMRL1.
If N is determined in S68, the process returns to the main routine as soon as possible. Accordingly, only when the peak of the new input waveform is large, the amplitude value of the new waveform is registered. (In that case, it seems that the peak of overtones is not widened.)

また、S70でNのときと、S71の処理の終了のときには、同様にメインルーチンヘリターンする。
以上述べたようにルート(1)は、以下のような処理がなされる。MT=0≠b、RIV=0、AMP(1)←c、AMRL2←AMRL1←max[AMP(0),c(のいずれか大きい方)]、HNC←(HNC+1)=1、RIV←1、TTR←(t−TFR)、TFR←1が処理される。従って、周期レジスタTTRに前回の同極性のゼロクロス点(STEP2→3のところ)から今回のゼロクロス点までの時刻情報の差つまり、周期情報が求まったことになる。そして、メインルーチンヘ戻り、次のゼロクロスインターラプトを待つ。
Similarly, when the answer is N in S70 and when the process of S71 is completed, the process returns to the main routine.
As described above, route (1) is processed as follows. MT = 0 ≠ b, RIV = 0, AMP (1) ← c, AMRL2 ← AMRL1 ← max [AMP (0), c (whichever is greater)], HNC ← (HNC + 1) = 1, RIV ← 1, TTR ← (t−TFR) and TFR ← 1 are processed. Therefore, the difference in time information from the previous zero-crossing point of the same polarity (from STEP2 → 3) to the current zero-crossing point, that is, the period information, is obtained in the period register TTR. Then, the process returns to the main routine and waits for the next zero cross interrupt.

次に、S40〜S62に示すルート(2)へ進んだ場合の説明を行う。いま、波形ナンバーカウンタHNC=1なので(S66参照)、S40からS42へ進む。S42では、MT=0、b=0なのでYとなり、S43へ進む。S43では、レジスタRIV=1かどうかが判断される。既にルート(1)において、レジスタRIVは1とされている(S67参照)ので、S43の判断はいまの場合Yとなり、S44へ進む。   Next, a description will be given of a case where the route proceeds to route (2) shown in S40 to S62. Since the waveform number counter HNC = 1 (see S66), the process proceeds from S40 to S42. In S42, since MT = 0 and b = 0, the result is Y, and the process proceeds to S43. In S43, it is determined whether or not the register RIV = 1. Since the register RIV is already set to 1 in the route (1) (see S67), the determination in S43 is Y in this case, and the process proceeds to S44.

S44では、レジスタSTEP=4かどうかが判断され、Yの場合にはS45に進む。S45では、今回波高値c<60H(Hは16進法表現を示す)かどうかが判断され、いま波高値は大なのでYとなり、S46に進む。S46では、前々回の振幅値AMRL2−前回の振幅値AMRL≦(l/32)×前々回の振幅値AMRL2かどうかが判断され、Yの場合にはS47に進み、リラティブオフカウンタFOFRが0にセットされる。このリラティブオフの処理については後述する。そして、S48では周期計算が行われる。具体的には(今回のゼロクロス時刻t−前回のゼロクロス時刻データTF)が今回の周期情報ttとしてレジスタTOTOにセットされる。そして、S49に進み、S49では、今回の周波数情報tt>周波数上限THLIM(発音開始後の上限)かどうかが判断され、Yの場合にはS50に進む。   In S44, it is determined whether or not the register STEP = 4. If Y, the process proceeds to S45. In S45, it is determined whether or not the current peak value c <60H (H indicates hexadecimal notation). Since the peak value is now large, the result is Y, and the process proceeds to S46. In S46, it is determined whether or not the previous amplitude value AMRL2−previous amplitude value AMRL ≦ (l / 32) × previous amplitude value AMRL2, the process proceeds to S47 in the case of Y, and the relative off counter FOFR is set to 0. The The relative off process will be described later. In S48, a period calculation is performed. Specifically, (current zero crossing time t−previous zero crossing time data TF) is set in the register TOTO as the current cycle information tt. In S49, it is determined whether or not current frequency information tt> frequency upper limit THLIM (upper limit after starting sound generation). If Y, the process proceeds to S50.

S49の周波数上限THLIMは、STEP3のS36で使用したトリガー時(発音開始時)周波数の許容範囲の上限(従って周期として最小で、最高音フレットの2〜3半音上の音高周期に相当する)と同一のものである。
次に、S50では次の処理が行われる。すなわち、レジスタRIVを0にし、今回のゼロクロス時刻tが前回のゼロクロス時刻データTFとして入力され、また前回の波高値AMP(b)が前々回波高値に入力され、さらに今回波高値cが前回の波高値AMP(b)に入力される。
The frequency upper limit THLIM in S49 is the upper limit of the allowable frequency range at the time of trigger (starting sound generation) used in S36 of STEP 3 (thus, the minimum period corresponds to the pitch period two to three semitones of the highest sound fret). Is the same.
Next, in S50, the following processing is performed. That is, the register RIV is set to 0, the current zero cross time t is input as the previous zero cross time data TF, the previous peak value AMP (b) is input to the previous peak value, and the current peak value c is further changed to the previous peak value c. It is input to the high value AMP (b).

そして、S50の処理の後S51に進み、S51では、周波数下限TLLIM>今回の周期情報ttかどうかが判断され、Yの場合すなわち今回の周期がノートオン中のピッチ抽出音域下限以下になった場合にはS52に進む。
この場合、周波数下限TLLIMは、例えば、開放弦音階の1オクターブ下にセットされる。つまり、STEP3の周波数下限TTLIM(S37参照)に比較して、許容範囲を広くしている。このようにすることで、トレモロアームの操作等による周波数変さらに対応し得るようになる。
従って、周波数の上限、下限について許容範囲に入る場合についてのみS52まで進み、そうでない場合はS49,S51よりメインルーチンへリターンする。
Then, after the process of S50, the process proceeds to S51. In S51, it is determined whether or not the frequency lower limit TLLIM> current cycle information tt. The process proceeds to S52.
In this case, the lower frequency limit TLLIM is set, for example, one octave below the open string scale. That is, the allowable range is widened compared to the lower frequency limit TTLIM (see S37) of STEP3. By doing so, it becomes possible to further cope with frequency changes due to operation of the tremolo arm or the like.
Accordingly, the process proceeds to S52 only when the upper and lower limits of the frequency are within the allowable range. Otherwise, the process returns to the main routine from S49 and S51.

次に、S52では周期データTTPが前々回抽出された周期データhに入力され、また、今回の周期情報ttが前回抽出された周期データTTPに入力される。そして、S53で今回波高値cがベロシティVELに書込まれ、S54に進む。S54では、ノーチェンジレベルNCHLV>(前々回波高値e−今回波高値c)かどうかの判断が行われ、Yの場合にはS55に進む。
すなわち、前回の同極性の波高値(e=AMP(b))と今回の波高値cとが大きく変化している場合は、その差がNCHLVを超えることになり、そのようなときに、抽出された周期情報に基づきピッチ変更を行うと、不自然な音高変化を呈することになる可能性が高い。そこで、S54でNの判断がなされると、S55以降の処理をすることなく、メインルーチンへリターンする。
Next, in S52, the cycle data TTP is input to the cycle data h extracted last time, and the current cycle information tt is input to the cycle data TTP extracted last time. In S53, the current peak value c is written into the velocity VEL, and the process proceeds to S54. In S54, it is determined whether or not the no-change level NCHLV> (previous peak value e−current peak value c). If Y, the process proceeds to S55.
That is, if the previous peak value (e = AMP (b)) of the same polarity and the current peak value c have changed greatly, the difference will exceed NCHLV. If the pitch is changed based on the periodic information, there is a high possibility that an unnatural pitch change will be exhibited. Therefore, if a determination of N is made in S54, the process returns to the main routine without performing the processes in and after S55.

次に、S54でYの場合、リラティブオフカウンタFOFR=0か否かが判断される。後述するリラティブオフ処理を行っているときは、リラティブオフカウンタFOFRは0でなくなっており、そのような場合もピッチ変更(S602を参照)の処理を行うことなく、S55でNの判断をしてメインルーチンヘリターンする。そして、S55にて、Yの判断をしたときは、S56,S57へと順次進む。
ここで2波3値一致条件が判断される。S56では今回の周期情報tt×2−7<|今回の周期情報tt−前々回周期データh|が判断され、Yの場合にはS57に進み、またS57では今回の周期情報tt×2−7<|今回の周期情報tt−周期レジスタTTRの内容|が判断され、Yの場合にはS58に進む。
Next, in the case of Y in S54, it is determined whether or not the relative off counter FOFR = 0. When the relative off process described later is being performed, the relative off counter FOFR is not 0, and in such a case, N is determined in S55 without performing the process of changing the pitch (see S602). Return to the main routine. When the determination of Y is made in S55, the process proceeds to S56 and S57 in order.
Here, the two-wave ternary matching condition is determined. In S56, current cycle information tt × 2 −7 <| current cycle information tt−previous cycle data h | is determined. If Y, the process proceeds to S57, and in S57, current cycle information tt × 2 −7 < The current cycle information tt—the contents of the cycle register TTR | is determined. If Y, the process proceeds to S58.

すなわち、S56では、今回の周期情報tt(S43参照)が、前回の周期データh(=TTP)(S52参照)の値と略一致するか否かを判断し、S57では、今回の周期情報ttの値が、それに重なる周期でTRとほぼ一致するか否かを判断する。なお、その限界範囲は、2−7×ttとして周期情報に依存してその値が変わるようになっている。勿論、これは固定の値としてもよいが、本実施形態採用技術の方が良好な結果を得ることができる。 That is, in S56, it is determined whether or not the current cycle information tt (see S43) substantially matches the value of the previous cycle data h (= TTP) (see S52). In S57, the current cycle information tt It is determined whether or not the value of the value substantially coincides with TR in the overlapping period. The limit range is 2 −7 × tt, and its value changes depending on the period information. Of course, this may be a fixed value, but a better result can be obtained by the technique employing the present embodiment.

次のS58では、今回の周期情報tt>定数TTUかどうかが判断され、YならばS59に進み、ここで今回の周期情報tt<定数TTWかどうかが判断され、YならばS60へ進む。なお、S58,S59は急激なピッチ変更を認めないための判断である。   In next S58, it is determined whether or not current cycle information tt> constant TTU. If Y, the process proceeds to S59. Here, it is determined whether current cycle information tt <constant TTW, and if Y, the process proceeds to S60. Note that S58 and S59 are judgments for preventing a rapid pitch change.

つまり、S58の定数TTUは、STEP3のS301でいま0とされ、定数TTWは同様にMAXの値とされており、初めてこのフローを通るときは必ずS58,S59でYの判断がなされるが、その後は後述するS62において、定数TTUには、(17/32)tt(略1オクターブ高音の周期情報)がセットされ、定数TTWには同様にS62にて(31/16)tt(ほぼ1オクターブ低音の周期情報)がセットされる。従って、急激にオクターブアップする(これは、フレットを離してミュート操作したとき等に生ずる)ことやオクターブダウンすること(これは波形のピークをとり逃したとき等に起る)があったときは、ピッチ変更をすると、不自然となるので、ピッチ変更をしないようにブランチする。   That is, the constant TTU of S58 is set to 0 at S301 of STEP3, and the constant TTW is similarly set to the value of MAX. When this flow is first passed for the first time, a determination of Y is always made at S58 and S59. Thereafter, in S62, which will be described later, (17/32) tt (approximately 1 octave treble period information) is set in the constant TTU, and (31/16) tt (approximately 1 octave) in S62 in the same manner in the constant TTW. Low frequency information) is set. Therefore, when there is a sudden octave up (this occurs when the mute operation is performed with the frets released) or an octave down (this occurs when a waveform peak is missed, etc.) If the pitch is changed, it becomes unnatural, so the branch is made so as not to change the pitch.

もし、S58,S59でYの判断がなされたときは、次にS60へ進む。S60では、レジスタSTEP=4にされたかどうかの判断が行われ、Yの場合には、S601へ進み、周期情報ttをレジスタTへセットし、S602にて音高コードを求める。このS602は、上述したS311と同様の音高コードを求めるサブルーチンPITCH(図16)の実行を意味する。   If YES is determined in S58 and S59, the process proceeds to S60. In S60, it is determined whether or not the register STEP = 4 is set. If Y, the process proceeds to S601, the period information tt is set in the register T, and the pitch code is obtained in S602. S602 means execution of a subroutine PITCH (FIG. 16) for obtaining a pitch code similar to S311 described above.

その結果、半音未満の音高コードを含む音高コードKが得られ、それをもって、音源SSに対しピッチ変更指示をする。
次にS62に進み、今回の周期情報ttに対応して時定数チェンジをし、また定数TTUが(17/32)×今回の周期情報ttに書替えられ、さらに定数TTTWが(31/16)×今回の周期情報ttに書替えられる。
As a result, a pitch code K including a pitch code of less than a semitone is obtained, and a pitch change instruction is given to the sound source SS.
Next, in S62, the time constant is changed corresponding to the current cycle information tt, the constant TTU is rewritten to (17/32) × current cycle information tt, and the constant TTTW is also (31/16) ×. It is rewritten to the current cycle information tt.

つまり、後述するように、リラティブオフの処理がなされたときに限り、STEP=5となるが、そのときは、ピッチ変更を行うことなく時定数チェンジを行う。この時定数チェンジの処理とは、レジスタに今回の周期情報ttの値に基づくデータをマイコンMCPがセットすることをいう。これは、既に説明したとおりである。   That is, as will be described later, STEP = 5 only when the relative-off process is performed. At that time, the time constant is changed without changing the pitch. This process of changing the time constant means that the microcomputer MCP sets data based on the value of the current cycle information tt in a register. This is as already described.

そして、S62の処理の終了でメインルーチンヘリターンする。従って、以上述べたようにルート(2)は、次の処理がなされる。
すなわち、HNC=1、MT=0=b、RIV=1、FOFR←0、tt←(t−TF)、RIV←0、TF←t、e←AMP(0)、AMP(0)←c、h←TTP、TTP←tt、VEL←cであり、
Then, the process returns to the main routine at the end of the process of S62. Therefore, as described above, the route (2) is subjected to the following processing.
That is, HNC = 1, MT = 0 = b, RIV = 1, FOFR ← 0, tt ← (t−TF), RIV ← 0, TF ← t, e ← AMP (0), AMP (0) ← c, h ← TTP, TTP ← tt, VEL ← c,

さらに、
(1)TTP≒TTR≒tt、
(2)TTU<tt<TTW、
(3)AMP(0)−c<NCHLV
の3条件の満足で、ttに従った半音未満(100セント未満)の音高変更も含むピッチ変更を行う。しかる後、TTU←(17/32)×tt、TTW←(31/16)×ttがなされる。
further,
(1) TTP≈TTR≈tt,
(2) TTU <tt <TTW,
(3) AMP (0) -c <NCHLV
When the three conditions are satisfied, the pitch is changed including the pitch change of less than a semitone (less than 100 cents) according to tt. Thereafter, TTU ← (17/32) × tt and TTW ← (31/16) × tt are made.

従って、ルート(2)にて、実際の音源SSに対するピッチ変更が行われ、続くゼロクロスインタラプトでルート(1)の処理、同様に、続くゼロクロスインタラプトで、ルート(2)の処理が行われる。このようにして、ルート(1)では、単に周期を抽出(S67参照)し、ルート(2)では実際のピッチ変更(S602参照)し、時定数チェンジ処理(S62参照)が行われることになる。   Accordingly, the pitch change for the actual sound source SS is performed in the route (2), and the processing of the route (1) is performed at the subsequent zero cross interrupt, and similarly the processing of the route (2) is performed at the subsequent zero cross interrupt. In this way, in the route (1), the period is simply extracted (see S67), in the route (2), the actual pitch is changed (see S602), and the time constant change process (see S62) is performed. .

なお、STEP4におけるS40において、ルート(1)のS66で波形ナンバーカウンタHNCが3を超えるように、カウントアップされた後は、Yの判断がなされ、次にS41へ行き、リラティブオンの条件を検出する。これは、c−AMP(b)>TRLRLであり、前回の振幅値AMRL1に比べて今回の振幅値がしきい値TRLRLを超えて増大したとき、つまり、これは弦操作後に同じ弦を市政ピッキングしたとき(トレモロ奏法等による)にこのようなことがおき、この場合はS41でリラティブオンの処理をすべくS41からS78へ進み、時定数変換制御回路TTCの時定数チェンジレジスタCHTRRへ最高音フレット(例えば22フレット)の周期CHTIMをセットする。しかる後、図17のS60へ進み、当該発音中の楽音をノートオフした後、再発音開始する。   In S40 in STEP 4, after counting up so that the waveform number counter HNC exceeds 3 in S66 of route (1), a determination of Y is made, and then the process goes to S41 to detect the condition of relative on To do. This is c-AMP (b)> TRRLL, and when the current amplitude value exceeds the threshold value TRLRL as compared to the previous amplitude value AMRL1, that is, this is the same string picking after the string operation. When this occurs (according to the tremolo technique, etc.), in this case, in S41, the process proceeds from S41 to S78 to perform the relative on process, and the highest sound fret is sent to the time constant change register CHTRR of the time constant conversion control circuit TTC. Set period CHTIM (for example, 22 frets). Thereafter, the process proceeds to S60 in FIG. 17, and the musical tone being sounded is note-off, and then re-sounding is started.

通常の演奏操作によれば、S40,S41,S42へ進み、上述したルート(1)もしくはルート(2)へ進む。
次に、リラティブオフ処理を説明する。つまり、フレット操作している状態から、開放弦状態へ移行すると、波形の振幅レベルは急激に落ちてきて、前々回の波高値AMRL2と前回の波高値AMRL1との差が(l/32)AMRL2を超えるようになると、S46からS74へ進む。そして、リラティブオフカウンタFOFRが定数ROFCTを超えるまでカウントアップするようにS74からS75へ進む。このとき、S75からS48へ行きS49〜S55の処理を行うが、FOFR=0でないので、リラティブオフ処理に入る直前ではピッチ変更を行うことなくメインルーチンへ戻る。
According to the normal performance operation, the process proceeds to S40, S41, S42, and proceeds to the route (1) or the route (2) described above.
Next, the relative off process will be described. That is, when the state of fret operation is shifted to the open string state, the amplitude level of the waveform drops rapidly, and the difference between the previous peak value AMRL2 and the previous peak value AMRL1 is (l / 32) AMRL2. If it exceeds, the process proceeds from S46 to S74. Then, the process proceeds from S74 to S75 so as to count up until the relative off counter FOFR exceeds the constant ROFCT. At this time, the process goes from S75 to S48 to perform the processes of S49 to S55. However, since FOFR = 0 is not satisfied, the process returns to the main routine without changing the pitch immediately before entering the relative off process.

そして、S74でYと判断すると、FOFRの値が3となったとき(ROFCTは2である)、S74からS75へ行く。
ただし、S46のジャッジでYの判断が一度でもあると、S46からS47へ進み、FOFRをリセットするようになる。従って、ROFCTで指定される回数だけ続けてS46の条件を満足しなければ、リラティブオフの処理はなされない。なお、ROFCTの値は、音高が高い弦について大きな値としておけば、略一定の時間経過で、いずれの弦についてもリラティブオフ処理ができる。
If it is determined as Y in S74, when the value of FOFR becomes 3 (ROFCT is 2), the process proceeds from S74 to S75.
However, if the judgment of Y is once even at the judgment of S46, the process proceeds from S46 to S47 and the FOFR is reset. Therefore, if the condition of S46 is not satisfied continuously for the number of times specified by ROFCT, the relative off process is not performed. In addition, if the value of ROFCT is set to a large value for a string with a high pitch, the relative off processing can be performed for any string in a substantially constant time.

そして、S74からS76へ行くと、リラティブオフカウンタFOFRをリセットし、レジスタSTEPを5とし、S77へ進んで音源SSに対しノートオフを指示する。このSTEPが5の状態では、ピッチ抽出処理をSTEP4の時と同様に実行するが、S60からS601、S602を介することなくS62へ進むので、音源SSに対しては、ピッチ変更はされない。ただし、S62において抽出した周期に従って時定数チェンジ処理を行う。   When the process goes from S74 to S76, the relative off counter FOFR is reset, the register STEP is set to 5, and the process goes to S77 to instruct the sound source SS to perform note-off. In this state of STEP 5, the pitch extraction process is executed in the same manner as in STEP 4, but since the process proceeds from S60 to S62 without going through S601 and S602, the pitch is not changed for the sound source SS. However, the time constant change process is performed according to the period extracted in S62.

そして、STEPが5の状態では、リラティブオンの処理を受付けるが(S41,S78)、それ以外の場合では、図11メインフローの中で、振動レベルが減少してきたことが検知されることによりM14でSTEPが0となり、初期状態に戻る。
なお、S46で使用するAMRL1、AMRL2はS64で作られており、1周期の中でレベルが大な方のピーク(最大ピークと最小ピークとの一方)が、この値とされ、最大ピークaが最小ピークb−1より必ず大である場合であって、an+1とan+2、an+2とan+3、an+3とan+4の差がいずれも所定値を超えるようになっている。
In the state where STEP is 5, the relative on process is accepted (S41, S78). In other cases, the M14 is detected by detecting that the vibration level has decreased in the main flow of FIG. Then, STEP becomes 0 and the initial state is restored.
The AMRL1 and AMRL2 used in S46 are created in S64, and the peak with the larger level (one of the maximum peak and the minimum peak) in one cycle is set to this value, and the maximum peak a k Is always larger than the minimum peak b K −1, and the difference between an + 1 and an + 2, an + 2 and an + 3, and an + 3 and an + 4 all exceed a predetermined value.

また、このときルート(2)の処理においては、最小ピークbn+1、bn+2、bn+3が極端に減少してきているので、S54でNの判断が成されて、メインルーチンヘリターンし、ピッチ変更処理はなされない。
次に、ピッチ抽出しているなかで、オクターブ関係にある倍音、つまりオクターブ高い音やオクターブ低い音が続けて検出されたときの処理について説明する。
At this time, in the processing of the route (2), since the minimum peaks bn + 1, bn + 2, and bn + 3 are extremely decreased, the determination of N is made in S54, the process returns to the main routine, and the pitch changing process is not performed. Not.
Next, a description will be given of processing when an overtone having an octave relation, that is, an octave higher sound or a lower octave sound is continuously detected during pitch extraction.

既に説明したように、S58ではttがTTUを超えなかったとき、つまり、前回抽出した周期の17/32倍した値TTUより小になったとき、S76へ進む。つまり、オクターブ高い音が抽出されたときは、指定していたフレットから指を離してミュート操作をした場合とみなし、オクターブ高い音を出力することなく、S58からS76へ行き、リラティブオフ時同様S76,S77の処理によって当該音の発音を停止する。
また、S59では、ttがTTWを超えなかったとき、つまり前回抽出した周期の31/16倍した値TTWより大となったとき、S60へ進むことなく、メインルーチンへリターンする。
As already described, when the tt does not exceed the TTU in S58, that is, when it becomes smaller than the value TTU that is 17/32 times the previously extracted period, the process proceeds to S76. In other words, when a sound with a high octave is extracted, it is considered that the mute operation is performed by releasing the finger from the designated fret, and the process goes from S58 to S76 without outputting a high octave sound. , S77 stops the sound generation.
In S59, when tt does not exceed TTW, that is, when it becomes larger than the value TTW which is 31/16 times the previously extracted period, the process returns to the main routine without proceeding to S60.

通常ノートオフ近辺の非常に波形が小さい場合、他のピッキングによってヘキサピックアップのクロストオークやボディの共振によって波形が乗ってくる。すると、1オクターブ下の入力波形が続けて検出されてしまうことがある。
このような場合、何等処理を施さないと、急にオクターブ下の音を出力してしまい、極めて不自然となる。そのために、S57,S56でTan+2≒Tan+3≒Tbn+2が検出されても、Tan+3>Tan+1×(31/16)となるので、ピッチ変更することなく、S59からメインルーチンヘリターンする。
Normally, when the waveform is very small near the note-off, the waveform is picked up by the picking up crosstalk or the resonance of the body due to other picking. Then, an input waveform that is one octave below may be detected continuously.
In such a case, if no processing is performed, a sound under octave is suddenly output, which is extremely unnatural. For this reason, even if Tan + 2≈Tan + 3≈Tbn + 2 is detected in S57 and S56, Tan + 3> Tan + 1 × (31/16), so that the routine returns from S59 to the main routine without changing the pitch.

次に、ダブリの波形が抽出される場合つまり、同じ極性のゼロクロス点が拭けて到来する場合について説明する。MT=1の場合の例を考えると、基本波周期と倍音成分の周期が非整数倍の関係にあるので、倍音の位相がずれて行き、同じ極性のゼロクロスを検出してしまうことになり、そのために誤ったピッチ変更をしないようにしないといけない。
そこで、図のダブリと書いてあるゼロクロス時のSTEP4の処理では、S42からS43へ行き、S43ではYの判断をしてS72へ行く。ここで、(an+3)と(an+2)の大きさが比較され、もし(an+3)が(an+2)より大であれは、S72でYの判断をし、AMP(1)に、(an+3)の値をセットし、もし逆の場合は何等変更処理をしない。
Next, a case where a double waveform is extracted, that is, a case where a zero-cross point having the same polarity is wiped out will be described. Considering an example in the case of MT = 1, since the fundamental wave period and the period of the harmonic component are in a non-integer multiple relationship, the phase of the harmonic will be shifted, and a zero cross of the same polarity will be detected. For this reason, it is necessary to prevent incorrect pitch changes.
Therefore, in the process of STEP 4 at the time of zero crossing, which is written as “double” in the figure, the process goes from S42 to S43, and in S43, the determination of Y is made and the process goes to S72. Here, the magnitudes of (an + 3) and (an + 2) are compared. If (an + 3) is larger than (an + 2), the determination of Y is made in S72, and the value of (an + 3) is set in AMP (1). If the reverse is true, no change processing is performed.

ところで、このダブリの場合抽出している時刻データは何等使用しないので、周期情報Tan+3は何等変わらない。また、当然周期データに基づくピッチ変更は行わない。
同様に、波形のダブリの場合の例、すなわちMT=0の状態では、ダブリの状態が生じているときに、S42からS63へ行き、Yの判断をしてS68へ行く。S68では、いまの場合(an+2)と(an+3)との比較をして、(an+3)が(an+2)より大なときに限りS69へ行き、AMP(1)を書替える。この場合は、さらに前回の振幅値AMRL1と今回の振幅情報(波高値c)の比較をS70で行って、もしYならばS71へ進み、今回の振幅情報cを前回の振幅値AMRL1へセットする。
このようにして、倍音の影響で、波形がダブったときにも、S56,S57を満足しない限りピッチ変更処理はなされないことになる。
By the way, since the extracted time data is not used in the case of this double, the cycle information Tan + 3 is not changed at all. Of course, the pitch is not changed based on the period data.
Similarly, in the case of a double wave, that is, in a state where MT = 0, when a double state occurs, the process goes from S42 to S63, and the determination of Y is made, and the process goes to S68. In S68, (an + 2) is compared with (an + 3) in this case, and only when (an + 3) is larger than (an + 2), the process goes to S69 to rewrite AMP (1). In this case, the previous amplitude value AMRL1 is compared with the current amplitude information (crest value c) in S70. If Y, the process proceeds to S71, and the current amplitude information c is set to the previous amplitude value AMRL1. .
In this way, even when the waveform is doubled due to the influence of overtones, the pitch changing process is not performed unless S56 and S57 are satisfied.

以上述べたように、本実施例に係る電子ギター1は、複数の弦と、メモリと、フレットスキャン部FSと、ピッチ抽出回路PCと、マイコンMCPとを備えている。複数の弦は、複数のフレットが設けられた指板部上に張設され、メモリは、複数の弦夫々における補正情報を記憶している。フレットスキャン部FSは、複数のフレット夫々と複数の弦夫々との間での接触状態を検出し、ピッチ抽出回路PCは、複数の弦のいずれかが弾弦されたことを検出する。マイコンMCPは、ピッチ抽出回路PCによる弾弦の検出に応答して、弾弦が検知された弦と、フレットスキャン部FSにより当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う。ピッチ抽出回路PCは、弾弦の検出された弦の振動ピッチを検出する。マイコンMCPは、メモリに記憶された弾弦の検出された弦に対応する補正情報に基づいて、ピッチ抽出回路PCにより検出された振動ピッチを補正する。マイコンMCPは、接続された音源にて発音されている楽音のピッチを、補正された振動ピッチに変更する。
すなわち、本実施例に係る電子ギター1は、各弦番号の弦に同一の太さの弦(例えば第1弦)が張設されている。また、電子ギター1は、フレットスキャン部FSによって、複数のフレット夫々と複数の弦夫々との間での接触状態を検出し、ピッチ抽出回路PCによって、弾弦された弦のピッチを抽出する。
そして、マイコンMCPは、フレットスキャン部FSによって検出された押弦状態(弦とフレットとの接触状態)と、ピッチ抽出回路PCによって弾弦が検出された弦とに応じて初期の音程を決定して、音源SSに楽音を発生させる。さらに、マイコンMCPは、メモリMEMに記憶されている補正情報(フレット−周波数データテーブル及び音程データ変換テーブル)によって、弾弦された弦のピッチ抽出回路PCによる抽出結果(ピッチ)を補正し、その弦番号の弦が発する音として、より正確な音程の楽音に変更する。
As described above, the electronic guitar 1 according to this embodiment includes a plurality of strings, a memory, a fret scan unit FS, a pitch extraction circuit PC, and a microcomputer MCP. The plurality of strings are stretched on a fingerboard portion provided with a plurality of frets, and the memory stores correction information for each of the plurality of strings. The fret scanning unit FS detects a contact state between each of the plurality of frets and each of the plurality of strings, and the pitch extraction circuit PC detects that any of the plurality of strings has been played. In response to the detection of the string by the pitch extraction circuit PC, the microcomputer MCP generates a musical tone having a pitch obtained based on the string in which the string is detected and the frets that are in contact with the string by the fret scanning unit FS. Gives pronunciation instructions to the connected sound source. The pitch extraction circuit PC detects the vibration pitch of the string from which the string has been detected. The microcomputer MCP corrects the vibration pitch detected by the pitch extraction circuit PC based on correction information corresponding to the detected string of the bullet string stored in the memory. The microcomputer MCP changes the pitch of the musical sound produced by the connected sound source to the corrected vibration pitch.
That is, in the electronic guitar 1 according to the present embodiment, strings of the same thickness (for example, the first string) are stretched around the strings of the respective string numbers. The electronic guitar 1 detects the contact state between each of the plurality of frets and each of the plurality of strings by the fret scanning unit FS, and extracts the pitch of the string that has been played by the pitch extraction circuit PC.
Then, the microcomputer MCP determines an initial pitch according to the string-pressed state (contact state between the string and the fret) detected by the fret scanning unit FS and the string from which the string is detected by the pitch extraction circuit PC. The musical sound is generated in the sound source SS. Further, the microcomputer MCP corrects the extraction result (pitch) by the pitch extraction circuit PC of the struck string by the correction information (fret-frequency data table and pitch data conversion table) stored in the memory MEM, Change the sound of the string with the string number to a more accurate pitch.

そのため、電子ギター1においては、弾弦された場合にピッチが抽出されるまでの遅れを抑制できるとともに、弦番号に対応する弦とは異なる太さの弦が発生する波形のピッチから、弦番号に対応する本来の太さの弦が発生する波形のピッチに補正することができる。
従って、本実施例に係る電子ギター1によれば、楽音の発生の遅れを抑制することが可能となる。
Therefore, in the electronic guitar 1, the delay until the pitch is extracted when the string is played can be suppressed, and the string number is determined from the pitch of the waveform in which a string having a thickness different from the string corresponding to the string number is generated. Can be corrected to the pitch of the waveform generated by the original thick string corresponding to.
Therefore, according to the electronic guitar 1 according to the present embodiment, it is possible to suppress a delay in the generation of musical sounds.

また、マイコンMCPは、複数の弦の各々と複数のフレットの各々とに基づいて決定されるピッチを記憶する音程データ変換テーブルを有し、弾弦が検知された弦及び当該弦と接触しているフレットに基づいて音程データ変換テーブルから対応するピッチを求める。
すなわち、メモリMEMに音程データ変換テーブル(ピッチテーブル)が記憶され、弾弦が検出された弦及びその弦に接触しているフレットに基づいて、音程データテーブルを参照して、対応するピッチが求められる。
従って、弾弦された弦の振動からピッチを抽出することに先立って、楽音を発生させることができるため、楽音の発生の遅れを抑制することが可能となる。
The microcomputer MCP has a pitch data conversion table for storing a pitch determined based on each of the plurality of strings and each of the plurality of frets, and is in contact with the string where the string is detected and the string. The corresponding pitch is obtained from the pitch data conversion table based on the fret.
In other words, a pitch data conversion table (pitch table) is stored in the memory MEM, and a pitch corresponding to the pitch is obtained by referring to the pitch data table based on the string from which the string was detected and the fret contacting the string. It is done.
Therefore, since the musical sound can be generated prior to extracting the pitch from the vibration of the struck string, it is possible to suppress the delay in the generation of the musical sound.

また、メモリMEMの音程データ変換テーブルには、補正情報として、弦を開放状態で振動させたときのピッチと、弦を基準のテンションで張設させて開放弦状態で振動させたときのピッチとが記憶されているため、実際の弦に対するピッキングに合わせて、発生する楽音の音程を適切に補正することが可能となる。   The pitch data conversion table of the memory MEM includes, as correction information, a pitch when the string is vibrated in the open state, and a pitch when the string is stretched with a reference tension and vibrated in the open string state. Is stored, it is possible to appropriately correct the pitch of the generated musical tone in accordance with the picking of the actual string.

また、マイコンMCPは、弦を開放弦状態で振動させたときのピッチと、弦を基準のテンションで張設させて開放弦状態で振動させたときのピッチとの差分を算出し、実際の弾弦から検出された振動ピッチから、算出された差分を減算するため、より正確な音程に補正することができる。   The microcomputer MCP calculates the difference between the pitch when the string is vibrated in the open string state and the pitch when the string is vibrated in the open string state by stretching the string with the reference tension, Since the calculated difference is subtracted from the vibration pitch detected from the string, it can be corrected to a more accurate pitch.

なお、前記実施例においては、最大ピーク点、最小ピーク点の次のゼロクロス点毎の間隔から周期抽出を行うようにしたが、その他の方式、例えは最大ピーク点間や最小ピーク点間の時間間隔から周期抽出を行ってもよい。また、それに合わせて回路構成は種々変更し得る。
また、前記実施例においては、この発明を電子ギター(ギターシンセサイザ)に適用したものであったが、それに限らない。ピッチ抽出を行って、オリジナルの信号とは別の音響信号を発生するタイプの楽器または装置であれば、種々適用可能である。
In the above embodiment, the period is extracted from the interval of each zero cross point next to the maximum peak point and the minimum peak point. However, other methods, for example, the time between the maximum peak points and the time between the minimum peak points, Period extraction may be performed from the interval. Further, the circuit configuration can be variously changed in accordance with it.
In the above embodiment, the present invention is applied to an electronic guitar (guitar synthesizer). However, the present invention is not limited to this. Any instrument or device of a type that performs pitch extraction and generates an acoustic signal different from the original signal can be applied.

上述した一連の処理は、ハードウェアにより実行させることもできるし、ソフトウェアにより実行させることもできる。
換言すると、図2及び図4等の構成は例示に過ぎず、特に限定されない。すなわち、上述した一連の処理を全体として実行できる機能が電子ギター1に備えられていれば足り、この機能を実現するためにどのような機能構成及び回路構成とするかは特に図2及び図4の例に限定されない。
また、1つの機能ブロックは、ハードウェア単体で構成してもよいし、ソフトウェア単体で構成してもよいし、それらの組み合わせで構成してもよい。
The series of processes described above can be executed by hardware or can be executed by software.
In other words, the configurations of FIGS. 2 and 4 are merely examples, and are not particularly limited. That is, it is sufficient that the electronic guitar 1 has a function capable of executing the above-described series of processing as a whole, and what functional configuration and circuit configuration are used in order to realize this function are particularly shown in FIGS. It is not limited to the example.
In addition, one functional block may be constituted by hardware alone, software alone, or a combination thereof.

一連の処理をソフトウェアにより実行させる場合には、そのソフトウェアを構成するプログラムが、コンピュータ等にネットワークや記録媒体からインストールされる。
コンピュータは、専用のハードウェアに組み込まれているコンピュータであってもよい。また、コンピュータは、各種のプログラムをインストールすることで、各種の機能を実行することが可能なコンピュータ、例えば汎用のパーソナルコンピュータであってもよい。
When a series of processing is executed by software, a program constituting the software is installed on a computer or the like from a network or a recording medium.
The computer may be a computer incorporated in dedicated hardware. Further, the computer may be a computer that can execute various functions by installing various programs, for example, a general-purpose personal computer.

このようなプログラムを含む記録媒体は、ユーザにプログラムを提供するために装置本体とは別に配布されるリムーバブルメディアにより構成されるだけでなく、装置本体に予め組み込まれた状態でユーザに提供される記録媒体等で構成される。リムーバブルメディアは、例えば、磁気ディスク(フロッピディスクを含む)、光ディスク、または光磁気ディスク等により構成される。光ディスクは、例えば、CD−ROM(Compact Disk−Read Only Memory),DVD(Digital Versatile Disk)等により構成される。光磁気ディスクは、MD(Mini−Disk)等により構成される。また、装置本体に予め組み込まれた状態でユーザに提供される記録媒体は、例えば、プログラムが記録されているROMやハードディスク等で構成される。   A recording medium including such a program is provided not only to a removable medium distributed separately from the apparatus main body in order to provide the program to the user, but also to the user in a state of being incorporated in the apparatus main body in advance. It consists of a recording medium. The removable medium is composed of, for example, a magnetic disk (including a floppy disk), an optical disk, a magneto-optical disk, or the like. The optical disk is composed of, for example, a CD-ROM (Compact Disk-Read Only Memory), a DVD (Digital Versatile Disk), or the like. The magneto-optical disk is configured by an MD (Mini-Disk) or the like. In addition, the recording medium provided to the user in a state of being preinstalled in the apparatus main body is configured by, for example, a ROM or a hard disk in which a program is recorded.

なお、本明細書において、記録媒体に記録されるプログラムを記述するステップは、その順序に沿って時系列的に行われる処理はもちろん、必ずしも時系列的に処理されなくとも、並列的あるいは個別に実行される処理をも含むものである。   In the present specification, the step of describing the program recorded on the recording medium is not limited to the processing performed in chronological order according to the order, but is not necessarily performed in chronological order, either in parallel or individually. The process to be executed is also included.

以上、本発明のいくつかの実施形態について説明したが、これらの実施形態は、例示に過ぎず、本発明の技術的範囲を限定するものではない。本発明はその他の様々な実施形態を取ることが可能であり、さらに、本発明の要旨を逸脱しない範囲で、省略や置換等種々の変更を行うことができる。これら実施形態やその変形は、本明細書等に記載された発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   As mentioned above, although several embodiment of this invention was described, these embodiment is only an illustration and does not limit the technical scope of this invention. The present invention can take other various embodiments, and various modifications such as omission and replacement can be made without departing from the gist of the present invention. These embodiments and modifications thereof are included in the scope and gist of the invention described in this specification and the like, and are included in the invention described in the claims and the equivalent scope thereof.

以下に、本願の出願当初の特許請求の範囲に記載された発明を付記する。
[付記1]
複数のフレットが設けられた指板部上に張設された複数の弦と、
前記複数の弦夫々における補正情報を記憶する記憶手段と、
前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、
前記複数の弦のいずれかが弾弦されたことを検出する弾弦検出手段と、
前記弾弦検出手段による弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う発音指示手段と、
前記弾弦検出手段によって弾弦の検出された弦の振動ピッチを検出するピッチ検出手段と、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記ピッチ検出手段により検出された振動ピッチを補正する補正手段と、
前記接続された音源にて発音されている楽音のピッチを、前記補正手段により補正された振動ピッチに変更する変更手段と、
を有する電子弦楽器。
[付記2]
前記発音指示手段は、前記複数の弦の各々と複数のフレットの各々とに基づいて決定されるピッチを記憶するピッチテーブルを有し、前記弾弦が検知された弦及び当該弦と接触しているフレットに基づいて前記ピッチテーブルから対応するピッチを求める付記1に記載の電子弦楽器。
[付記3]
前記記憶手段は、前記補正情報として、前記弦を開放弦状態で振動させたときのピッチと、前記弦を基準のテンションで張設させてかつ開放弦状態で振動させたときのピッチとを記憶する付記1に記載の電子弦楽器。
[付記4]
前記補正手段は、前記弦を開放弦状態で振動させたときのピッチと、前記弦を基準のテンションで張設させてかつ開放弦状態で振動させたときのピッチとの差分を算出するとともに、前記ピッチ検出手段により検出された振動ピッチから、前記算出された差分を減算することにより、前記検出された振動ピッチを補正する付記3に記載の電子弦楽器。
[付記5]
複数のフレットが設けられた指板部上に張設された複数の弦と、前記複数の弦夫々における補正情報を記憶する記憶手段と、前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、を有する電子弦楽器に用いられる楽音生成方法であって、
前記複数の弦のいずれかが弾弦されたことを検出し、
前記弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行い、
前記弾弦の検出された弦の振動ピッチを検出し、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記弾弦の検出された弦の振動ピッチを補正し、
前記接続された音源にて発音されている楽音のピッチを、前記補正された振動ピッチに変更する、楽音生成方法。
[付記6]
複数のフレットが設けられた指板部上に張設された複数の弦と、前記複数の弦夫々における補正情報を記憶する記憶手段と、前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、を有する電子弦楽器に用いられるコンピュータに、
前記複数の弦のいずれかが弾弦されたことを検出する弾弦検出ステップと、
前記弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う発音指示ステップと、
前記弾弦の検出された弦の振動ピッチを検出するピッチ検出ステップと、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記弾弦の検出された弦の振動ピッチを補正する補正ステップと、
前記接続された音源にて発音されている楽音のピッチを、前記補正された振動ピッチに変更する変更ステップと、
を実行させるプログラム。
The invention described in the scope of claims at the beginning of the filing of the present application will be appended.
[Appendix 1]
A plurality of strings stretched on a fingerboard portion provided with a plurality of frets;
Storage means for storing correction information in each of the plurality of strings;
State detecting means for detecting a contact state between each of the plurality of frets and each of the plurality of strings;
String detection means for detecting that one of the plurality of strings has been stringed;
In response to detection of a string by the string detection means, a tone generation instruction for a musical tone having a pitch obtained based on the string in which the string is detected and the frets in contact with the string by the state detection means A sounding instruction means for performing sound on the connected sound source;
Pitch detection means for detecting the vibration pitch of the string detected by the string detection means;
Correction means for correcting the vibration pitch detected by the pitch detection means based on correction information corresponding to the detected string of the bullet string stored in the storage means;
Changing means for changing the pitch of the musical sound produced by the connected sound source to the vibration pitch corrected by the correcting means;
Electronic stringed instrument with
[Appendix 2]
The sound generation instructing means has a pitch table that stores a pitch determined based on each of the plurality of strings and each of the plurality of frets, and is in contact with the string on which the string is detected and the string. The electronic stringed instrument according to appendix 1, wherein a corresponding pitch is obtained from the pitch table based on a fret.
[Appendix 3]
The storage means stores, as the correction information, a pitch when the string is vibrated in an open string state and a pitch when the string is stretched with a reference tension and vibrated in an open string state. The electronic stringed instrument according to appendix 1.
[Appendix 4]
The correction means calculates a difference between a pitch when the string is vibrated in an open string state and a pitch when the string is stretched with a reference tension and vibrated in an open string state; The electronic stringed instrument according to appendix 3, wherein the detected vibration pitch is corrected by subtracting the calculated difference from the vibration pitch detected by the pitch detection means.
[Appendix 5]
Between a plurality of strings stretched on a fingerboard portion provided with a plurality of frets, storage means for storing correction information on each of the plurality of strings, and between each of the plurality of frets and each of the plurality of strings. A state detecting means for detecting the contact state of
Detecting that one of the plurality of strings is struck;
In response to the detection of the string, connected to the tone generation instruction of the musical tone of the pitch obtained based on the string where the string is detected and the fret contacting the string by the state detection means To the sound source,
Detecting the vibration pitch of the detected string of the string;
Correcting the vibration pitch of the detected string of the string based on the correction information corresponding to the detected string of the string stored in the storage means;
A musical sound generation method of changing a pitch of a musical sound generated by the connected sound source to the corrected vibration pitch.
[Appendix 6]
Between a plurality of strings stretched on a fingerboard portion provided with a plurality of frets, storage means for storing correction information on each of the plurality of strings, and between each of the plurality of frets and each of the plurality of strings. A state detection means for detecting the contact state of
A string detection step of detecting that one of the plurality of strings has been played;
In response to the detection of the string, connected to the tone generation instruction of the musical tone of the pitch obtained based on the string where the string is detected and the fret contacting the string by the state detection means Pronunciation instruction steps to be performed on the sound source;
A pitch detection step for detecting a vibration pitch of the detected string of the string;
A correction step of correcting a vibration pitch of the detected string of the string based on correction information corresponding to the detected string of the string stored in the storage unit;
A change step of changing a pitch of a musical sound generated by the connected sound source to the corrected vibration pitch;
A program that executes

1・・・電子ギター、PG・・・スキャンパルス発生器、FS・・・フレットスキャン部、FDC・・・フレット検出回路、PC・・・ピッチ抽出回路、LPF・・・ローパスフィルタ、AMC・・・増幅回路、ZCR・・・ゼロクロス点取込回路、ABS・・・絶対値取込回路、FB・・・指板、MCP・・・マイコン、IC・・・割込制御回路、TMR・・・タイマー、A/D・・・アナログ−デジタル変換回路、MEM・・・メモリ、SOB・・・音源発生装置、SS・・・音源、D/A・・・デジタル−アナログ変換回路、AMC・・・増幅回路、DCD・・・アドレスデコーダ   DESCRIPTION OF SYMBOLS 1 ... Electronic guitar, PG ... Scan pulse generator, FS ... Fret scan part, FDC ... Fret detection circuit, PC ... Pitch extraction circuit, LPF ... Low pass filter, AMC ... Amplification circuit, ZCR ... Zero cross point acquisition circuit, ABS ... Absolute value acquisition circuit, FB ... Fingerboard, MCP ... Microcomputer, IC ... Interrupt control circuit, TMR ... Timer, A / D ... Analog-to-digital conversion circuit, MEM ... Memory, SOB ... Sound source generator, SS ... Sound source, D / A ... Digital-to-analog conversion circuit, AMC ... Amplifier circuit, DCD ... Address decoder

Claims (6)

複数のフレットが設けられた指板部上に張設された複数の弦と、
前記複数の弦夫々における補正情報を記憶する記憶手段と、
前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、
前記複数の弦のいずれかが弾弦されたことを検出する弾弦検出手段と、
前記弾弦検出手段による弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う発音指示手段と、
前記弾弦検出手段によって弾弦の検出された弦の振動ピッチを検出するピッチ検出手段と、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記ピッチ検出手段により検出された振動ピッチを補正する補正手段と、
前記接続された音源にて発音されている楽音のピッチを、前記補正手段により補正された振動ピッチに変更する変更手段と、
を有する電子弦楽器。
A plurality of strings stretched on a fingerboard portion provided with a plurality of frets;
Storage means for storing correction information in each of the plurality of strings;
State detecting means for detecting a contact state between each of the plurality of frets and each of the plurality of strings;
String detection means for detecting that one of the plurality of strings has been stringed;
In response to detection of a string by the string detection means, a tone generation instruction for a musical tone having a pitch obtained based on the string in which the string is detected and the frets in contact with the string by the state detection means A sounding instruction means for performing sound on the connected sound source;
Pitch detection means for detecting the vibration pitch of the string detected by the string detection means;
Correction means for correcting the vibration pitch detected by the pitch detection means based on correction information corresponding to the detected string of the bullet string stored in the storage means;
Changing means for changing the pitch of the musical sound produced by the connected sound source to the vibration pitch corrected by the correcting means;
Electronic stringed instrument with
前記発音指示手段は、前記複数の弦の各々と複数のフレットの各々とに基づいて決定されるピッチを記憶するピッチテーブルを有し、前記弾弦が検知された弦及び当該弦と接触しているフレットに基づいて前記ピッチテーブルから対応するピッチを求める請求項1に記載の電子弦楽器。   The sound generation instructing means has a pitch table that stores a pitch determined based on each of the plurality of strings and each of the plurality of frets, and is in contact with the string on which the string is detected and the string. The electronic stringed instrument according to claim 1, wherein a corresponding pitch is obtained from the pitch table based on a fret. 前記記憶手段は、前記補正情報として、前記弦を開放弦状態で振動させたときのピッチと、前記弦を基準のテンションで張設させてかつ開放弦状態で振動させたときのピッチとを記憶する請求項1に記載の電子弦楽器。   The storage means stores, as the correction information, a pitch when the string is vibrated in an open string state and a pitch when the string is stretched with a reference tension and vibrated in an open string state. The electronic stringed instrument according to claim 1. 前記補正手段は、前記弦を開放弦状態で振動させたときのピッチと、前記弦を基準のテンションで張設させてかつ開放弦状態で振動させたときのピッチとの差分を算出するとともに、前記ピッチ検出手段により検出された振動ピッチから、前記算出された差分を減算することにより、前記検出された振動ピッチを補正する請求項3に記載の電子弦楽器。   The correction means calculates a difference between a pitch when the string is vibrated in an open string state and a pitch when the string is stretched with a reference tension and vibrated in an open string state; The electronic stringed instrument according to claim 3, wherein the detected vibration pitch is corrected by subtracting the calculated difference from the vibration pitch detected by the pitch detection means. 複数のフレットが設けられた指板部上に張設された複数の弦と、前記複数の弦夫々における補正情報を記憶する記憶手段と、前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、を有する電子弦楽器に用いられる楽音生成方法であって、
前記複数の弦のいずれかが弾弦されたことを検出し、
前記弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行い、
前記弾弦の検出された弦の振動ピッチを検出し、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記弾弦の検出された弦の振動ピッチを補正し、
前記接続された音源にて発音されている楽音のピッチを、前記補正された振動ピッチに変更する、楽音生成方法。
Between a plurality of strings stretched on a fingerboard portion provided with a plurality of frets, storage means for storing correction information on each of the plurality of strings, and between each of the plurality of frets and each of the plurality of strings. A state detecting means for detecting the contact state of
Detecting that one of the plurality of strings is struck;
In response to the detection of the string, connected to the tone generation instruction of the musical tone of the pitch obtained based on the string where the string is detected and the fret contacting the string by the state detection means To the sound source,
Detecting the vibration pitch of the detected string of the string;
Correcting the vibration pitch of the detected string of the string based on the correction information corresponding to the detected string of the string stored in the storage means;
A musical sound generation method of changing a pitch of a musical sound generated by the connected sound source to the corrected vibration pitch.
複数のフレットが設けられた指板部上に張設された複数の弦と、前記複数の弦夫々における補正情報を記憶する記憶手段と、前記複数のフレット夫々と複数の弦夫々との間での接触状態を検出する状態検出手段と、を有する電子弦楽器に用いられるコンピュータに、
前記複数の弦のいずれかが弾弦されたことを検出する弾弦検出ステップと、
前記弾弦の検出に応答して、前記弾弦が検知された弦と、前記状態検出手段により当該弦と接触しているフレットとに基づいて求められるピッチの楽音の発音指示を、接続された音源に対して行う発音指示ステップと、
前記弾弦の検出された弦の振動ピッチを検出するピッチ検出ステップと、
前記記憶手段に記憶された前記弾弦の検出された弦に対応する補正情報に基づいて、前記弾弦の検出された弦の振動ピッチを補正する補正ステップと、
前記接続された音源にて発音されている楽音のピッチを、前記補正された振動ピッチに変更する変更ステップと、
を実行させるプログラム。
Between a plurality of strings stretched on a fingerboard portion provided with a plurality of frets, storage means for storing correction information on each of the plurality of strings, and between each of the plurality of frets and each of the plurality of strings. A state detection means for detecting the contact state of
A string detection step of detecting that one of the plurality of strings has been played;
In response to the detection of the string, connected to the tone generation instruction of the musical tone of the pitch obtained based on the string where the string is detected and the fret contacting the string by the state detection means Pronunciation instruction steps to be performed on the sound source;
A pitch detection step for detecting a vibration pitch of the detected string of the string;
A correction step of correcting a vibration pitch of the detected string of the string based on correction information corresponding to the detected string of the string stored in the storage unit;
A change step of changing a pitch of a musical sound generated by the connected sound source to the corrected vibration pitch;
A program that executes
JP2013020840A 2013-02-05 2013-02-05 Electronic stringed instrument, musical sound generation method and program Pending JP2014153434A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013020840A JP2014153434A (en) 2013-02-05 2013-02-05 Electronic stringed instrument, musical sound generation method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013020840A JP2014153434A (en) 2013-02-05 2013-02-05 Electronic stringed instrument, musical sound generation method and program

Publications (1)

Publication Number Publication Date
JP2014153434A true JP2014153434A (en) 2014-08-25

Family

ID=51575377

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013020840A Pending JP2014153434A (en) 2013-02-05 2013-02-05 Electronic stringed instrument, musical sound generation method and program

Country Status (1)

Country Link
JP (1) JP2014153434A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2734572C1 (en) * 2020-02-26 2020-10-20 Илья Витальевич Мамонтов Method for determining pitch in electric musical instruments of heterodyne type

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
RU2734572C1 (en) * 2020-02-26 2020-10-20 Илья Витальевич Мамонтов Method for determining pitch in electric musical instruments of heterodyne type

Similar Documents

Publication Publication Date Title
JP2615825B2 (en) Electronic string instrument
JPH0196700A (en) Input controller for electronic musical instrument
JP2734521B2 (en) Music control device
JP5732982B2 (en) Musical sound generation device and musical sound generation program
JP6135312B2 (en) Electronic stringed instrument, musical sound control method and program
JPH096340A (en) Method and apparatus for recognition of start and end of sound
JP2014153434A (en) Electronic stringed instrument, musical sound generation method and program
JP6361109B2 (en) Electronic stringed instrument, musical sound control method and program
JPH027096A (en) Electronic musical instrument
US4924746A (en) Input apparatus of electronic device for extracting pitch from input waveform signal
JP2015082092A (en) Electronic stringed instrument, method for controlling musical sound, and program
JP6149890B2 (en) Musical sound generation device and musical sound generation program
US9542923B1 (en) Music synthesizer
JP2722584B2 (en) Music control device
JP2775633B2 (en) Music control device
JP2611263B2 (en) Sound control device
JP5742592B2 (en) Musical sound generation device, musical sound generation program, and electronic musical instrument
JP2661066B2 (en) Sound control device
JP2661481B2 (en) Electronic musical instrument
JP2015172679A (en) Musical sound generation device, and musical sound generation method and program
JP5151603B2 (en) Electronic musical instruments
JP2958778B2 (en) Tone generator
JP2591000B2 (en) Electronic string instrument
JP2661065B2 (en) Sound control device
JP2591001B2 (en) Electronic string instrument