JP2006078656A - System for generating fingering information, and program - Google Patents

System for generating fingering information, and program Download PDF

Info

Publication number
JP2006078656A
JP2006078656A JP2004261020A JP2004261020A JP2006078656A JP 2006078656 A JP2006078656 A JP 2006078656A JP 2004261020 A JP2004261020 A JP 2004261020A JP 2004261020 A JP2004261020 A JP 2004261020A JP 2006078656 A JP2006078656 A JP 2006078656A
Authority
JP
Japan
Prior art keywords
value
fingering
information
variable
performance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004261020A
Other languages
Japanese (ja)
Other versions
JP2006078656A5 (en
JP4301126B2 (en
Inventor
Junichiro Soejima
淳一郎 副島
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 JP2004261020A priority Critical patent/JP4301126B2/en
Publication of JP2006078656A publication Critical patent/JP2006078656A/en
Publication of JP2006078656A5 publication Critical patent/JP2006078656A5/ja
Application granted granted Critical
Publication of JP4301126B2 publication Critical patent/JP4301126B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Electrophonic Musical Instruments (AREA)
  • Auxiliary Devices For Music (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a technique for quickly generating appropriate fingering information, in response to the performance content indicated by performance information. <P>SOLUTION: In a step SB1, a fingering information generating system executes successive generating processings to generate fingering information. Fingering indicated in the generated fingering information corrects an object, in which the cost corrected in the execution of cost correction processing of the step SB7 is larger than a constant THRCOST that is the threshold, by calculating in execution of designated sound cost calculation processing of the step SB6 without falling under inhibition items, while successively modifying target note, by repeatedly executing the processing loop formed in steps SB3-SB9, until the decision in step SB3 becomes "YES". Thereby, the fingering information generated is corrected, as needed, so that it becomes more appropriate. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成するための技術に関する。   The present invention relates to a technique for generating fingering information indicating fingering when a musical piece is operated by operating a group of performance operators provided in a musical instrument.

現在では、多くの鍵盤楽器に、演奏の進行に応じて押鍵(操作)すべき鍵を順次、ユーザ(演奏者)に通知していくナビゲーション機能が搭載されている。しかし、ナビゲーション機能を利用するユーザの多くは技術的に未熟であり、そのナビゲーション機能によって次に押鍵すべき鍵を知ることができても、その鍵をどの指で押鍵すべきかが判らないのが実状である。このことから、鍵の押鍵に使うべき指を表示する演奏動作表示装置を搭載した鍵盤楽器も製品化されている。その演奏動作表示装置を利用することにより、指の運び方を意識した演奏を行えるため、ユーザにとってはより効率的な練習(学習)を行うことができる。   Currently, many keyboard instruments are equipped with a navigation function that sequentially notifies the user (performer) of keys to be pressed (operated) as the performance progresses. However, many users who use the navigation function are technically immature, and even if the navigation function can know the key to be pressed next, it does not know with which finger the key should be pressed. This is the actual situation. For this reason, a keyboard instrument equipped with a performance display device for displaying a finger to be used for pressing a key has been commercialized. By using the performance operation display device, it is possible to perform the performance while taking into account how to carry the finger, so that the user can perform more efficient practice (learning).

運指情報生成装置は、楽曲の演奏内容を示す演奏情報を参照して、楽器に備えられた鍵盤(演奏操作子群)を操作してその楽曲を演奏していく際の指の運びである運指を示す運指情報を自動的に生成するものである。通常、上記演奏動作表示装置では、運指情報を参照して、演奏の進行に応じて順次、押鍵すべき鍵の押鍵に使うべき指、その指を離鍵させるべきタイミング、等を教示するようになっている。従来の運指情報生成装置としては、例えば特許文献1に記載されたものがある。   The fingering information generation device refers to performance information indicating the performance content of a music piece, and carries a finger when playing the music piece by operating a keyboard (a group of performance operators) provided on the musical instrument. Fingering information indicating fingering is automatically generated. Usually, the performance operation display device refers to fingering information, and sequentially teaches the finger to be used to press the key to be pressed, the timing to release the finger, etc., as the performance progresses It is supposed to be. As a conventional fingering information generation device, for example, there is one described in Patent Document 1.

特許文献1に記載された従来の運指情報生成装置では、押鍵すべき鍵の押鍵に使うべき指として、その鍵の押鍵を行う難易度を示すコストを指別に算出することにより、その押鍵が比較的に容易に行える指を割り当てている。その鍵以降に押鍵すべき鍵も考慮することにより、滑らかに演奏できるようにさせている。また、和音等の楽曲上の構造(演奏内容の種類)や、指潜り等の運指(演奏)方法に着目してフレーズを判定することにより、フレーズ別に適切な方法で指の割り当てを行うようにさせている。   In the conventional fingering information generating device described in Patent Document 1, as a finger to be used for pressing a key to be pressed, a cost indicating a difficulty level for pressing the key is calculated for each finger, Fingers that can be pressed relatively easily are assigned. Considering the keys that should be pressed after that key, it is possible to play smoothly. Also, by assigning fingers in an appropriate manner for each phrase by judging phrases by focusing on the structure (type of performance content) such as chords and fingering (performance) methods such as finger dive, etc. I am letting you.

上記コストや楽曲の構造(演奏内容の種類)、及び運指方法に着目することにより、ユーザにとってより容易な(適切な)運指情報を生成することができる。上記従来の運指情報生成装置では、それらを全て考慮しつつ、運指情報を生成していくようになっていた。このため、演奏情報が示す演奏内容に係わらず、運指情報の生成に常に長い時間がかかるという問題点があった。   By focusing on the cost, the structure of the music (the type of performance content), and the fingering method, fingering information that is easier (appropriate) for the user can be generated. In the conventional fingering information generation device, fingering information is generated while taking all of them into consideration. For this reason, there is a problem that it always takes a long time to generate fingering information regardless of the performance content indicated by the performance information.

楽曲のなかには、その構造等を考慮しなくとも最適、或いはそれに近い運指情報を生成できるものも存在する。ユーザのより快適な利用を可能とさせるために、そのような楽曲の運指情報はより迅速に生成できるようにすることが望ましいと考えられる。
特開2001−331173号公報
Some music pieces can generate fingering information that is optimal or close to that without considering its structure and the like. It would be desirable to be able to generate fingering information for such music more quickly so that the user can use it more comfortably.
JP 2001-331173 A

本発明の課題は、演奏情報が示す演奏内容に応じて、より適切な運指情報の生成をより迅速に行えるようにするための技術を提供することにある。   An object of the present invention is to provide a technique for enabling generation of more appropriate fingering information more quickly according to the performance content indicated by the performance information.

本発明の第1、及び第2の態様の運指情報生成装置は共に、楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成することを前提とし、それぞれ以下の手段を具備する。   Both the fingering information generation devices according to the first and second aspects of the present invention indicate fingering that is a finger carry when playing a musical piece by operating a group of performance operators provided in a musical instrument. On the premise that fingering information is generated, each has the following means.

第1の態様の運指情報生成装置は、楽曲の演奏内容を示す演奏情報を取得する演奏情報取得手段と、演奏情報取得手段が取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する運指情報生成手段と、運指情報生成手段が生成した運指情報を参照して、該運指情報が示す運指を行ううえでの難易度を算出する難易度算出手段と、難易度算出手段が算出した難易度を基に、運指情報生成手段が生成した運指情報の修正を行う運指情報修正手段と、を具備する。   The fingering information generating device according to the first aspect includes a performance information acquisition means for acquiring performance information indicating the performance content of a music, and the performance information acquired by the performance information acquisition means. The fingering information generating means for generating the fingering information of the music shown, and the fingering information generated by the fingering information generating means are referred to, and the difficulty in performing the fingering indicated by the fingering information is calculated. And a fingering information correcting unit for correcting the fingering information generated by the fingering information generating unit based on the difficulty level calculated by the difficulty calculating unit.

なお、上記難易度算出手段は、演奏情報を参照して該演奏情報を1つ以上の部分演奏情報に仮想的に分割し、該部分演奏情報が表す演奏内容、及び該部分演奏情報のつながりのうちの少なくとも一方に着目して難易度を算出する、ことが望ましい。部分演奏情報が表す演奏内容としては、発音される楽音間の発音開始タイミングの差、同時に発音させる楽音数、該楽音間で発音期間が重なる割合、及び跳躍進行の有無のうちの少なくとも一つに着目する、ことが望ましい。また、難易度算出手段は、運指情報が示す運指のなかで予め定めた条件を満たす運指を対象外として難易度を算出し、運指情報修正手段は、難易度算出手段が難易度を算出する運指を対象にして修正を行う、ことが望ましい。   The difficulty level calculation means refers to the performance information and virtually divides the performance information into one or more partial performance information, and the performance content represented by the partial performance information and the connection of the partial performance information. It is desirable to calculate the difficulty level by paying attention to at least one of them. The performance content represented by the partial performance information includes at least one of the difference in the sound generation start timing between the sounds to be generated, the number of sounds to be generated simultaneously, the ratio of the sound generation period overlapping between the sounds, and the presence or absence of jumping progress. It is desirable to pay attention. Further, the difficulty level calculating means calculates the difficulty level by excluding the fingering satisfying a predetermined condition among the fingerings indicated by the fingering information, and the fingering information correcting means includes the difficulty level calculating means. It is desirable to correct the fingering for calculating

第2の態様の運指情報生成装置は、楽曲の演奏内容を示す演奏情報を取得する演奏情報取得手段と、演奏情報取得手段が取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する運指情報生成手段と、運指情報生成手段が生成した運指情報を参照して、該運指情報が示す運指のなかで修正対象とすべき運指を抽出する運指抽出手段と、運指抽出手段が抽出した運指を対象に修正を行う運指情報修正手段と、を具備する。   The fingering information generating apparatus according to the second aspect includes a performance information acquisition means for acquiring performance information indicating the performance content of a music piece, and the performance information acquired by the performance information acquisition means. The fingering information generating means for generating fingering information of the music indicated, and the fingering to be corrected in the fingering indicated by the fingering information with reference to the fingering information generated by the fingering information generating means And a fingering information correcting unit for correcting the fingering extracted by the fingering extracting unit.

本発明の第1、及び第2の態様のプログラムはそれぞれ、上記第1、及び第2の態様の運指情報生成装置が具備する手段を実現させるための機能を搭載している。   Each of the programs according to the first and second aspects of the present invention has a function for realizing the means included in the fingering information generating device according to the first and second aspects.

本発明は、演奏情報を参照して、その演奏情報が演奏内容を示す楽曲の運指情報を生成し、生成した運指情報を参照して、その運指情報が示す運指を行ううえでの難易度を算出し、算出した難易度を基に、生成した運指情報の修正を行う。   The present invention refers to the performance information, generates fingering information of the music whose performance information indicates the performance content, and refers to the generated fingering information to perform the fingering indicated by the fingering information. The degree of difficulty is calculated, and the generated fingering information is corrected based on the calculated degree of difficulty.

生成した運指情報が示す運指のなかで修正すべき運指を難易度を基に抽出して修正するようにしたことから、運指情報の生成には比較的に簡単なアルゴリズムを採用することができる。そのため、簡単なアルゴリズムで最適、或いはそれに近い運指情報の生成が可能な楽曲(演奏情報)では、その生成を迅速に行えるようになる。そうでない楽曲でも、生成後の修正により、最適、或いはそれに近い運指情報を得ることができる。このようなことから、結果として、最適、或いはそれに近い運指情報は必要最小限の時間で確実に得られることとなる。   Since the fingering to be corrected is extracted and corrected based on the degree of difficulty in the fingering indicated by the generated fingering information, a relatively simple algorithm is used to generate the fingering information be able to. Therefore, the music (performance information) that can generate fingering information that is optimal or close to that with a simple algorithm can be quickly generated. Even for music that is not so, it is possible to obtain fingering information that is optimal or close to it by correction after generation. As a result, as a result, the fingering information that is optimal or close to that is surely obtained in the minimum necessary time.

以下、本発明の実施の形態について、図面を参照しながら詳細に説明する。
図1は、本実施の形態による運指情報生成装置を搭載した電子楽器の構成を説明する図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
FIG. 1 is a diagram for explaining the configuration of an electronic musical instrument equipped with a fingering information generating apparatus according to this embodiment.

その電子楽器は、図1に示すように、楽器全体の制御を行うCPU1と、そのCPU1が実行するプログラムや各種制御用データを格納したROM2と、CPU1がワークに用いるRAM3と、各種スイッチ等の操作子を有する入力部4と、例えば液晶表示装置である表示部5と、各種データの格納に用いることができる外部記憶装置6と、演奏操作の対象となる演奏操作子群である鍵盤7と、CPU1の指示に従って楽音を発音させるサウンドシステム8と、を備えている。   As shown in FIG. 1, the electronic musical instrument includes a CPU 1 that controls the entire musical instrument, a ROM 2 that stores programs executed by the CPU 1 and various control data, a RAM 3 that the CPU 1 uses for work, and various switches. An input unit 4 having an operator, a display unit 5 that is, for example, a liquid crystal display device, an external storage device 6 that can be used for storing various data, and a keyboard 7 that is a group of performance operators to be subjected to performance operations And a sound system 8 for generating musical sounds in accordance with instructions from the CPU 1.

なお、上記外部記憶装置6は、例えば着脱自在な記録媒体にアクセスするものである。入力部4に備えられた運指情報の生成に係わる操作子としては、運指情報生成の対象となる曲(演奏情報)を指定するための曲指定スイッチ、及び運指情報の生成を指示するための運指生成スイッチ、などが設けられている。   The external storage device 6 accesses, for example, a removable recording medium. As an operator related to generation of fingering information provided in the input unit 4, a music designation switch for designating a music (performance information) for which fingering information is to be generated, and instructing generation of fingering information For example, a fingering generation switch is provided.

運指情報生成の対象となる演奏データ(情報)は、例えば曲指定スイッチを操作して、外部記憶装置6がアクセス可能なもののなかから選択するようになっている。CPU1は、ユーザが選択した演奏データを外部記憶装置6に読み出させ、それをRAM3に格納する。   The performance data (information) that is the target of fingering information generation is selected from those that can be accessed by the external storage device 6 by, for example, operating a song designation switch. The CPU 1 causes the external storage device 6 to read the performance data selected by the user and stores it in the RAM 3.

図2は運指情報生成のためにRAM3に格納される演奏データの構成を説明する図である。その演奏データは、曲の演奏内容を音符単位で示すデータ(以降「演奏音符データ」と呼ぶ)の他に、音符単位で運指(押鍵すべき鍵の押鍵に割り当てた指)を示すデータ(以降「運指音符データ」と呼ぶ)、及び運指音符データ生成用のデータ、を有するデータ(以降「音符データ」と呼ぶ)が音符の演奏(発音)順に並べられた形で構成されている。その音符データは、図2中に括弧を付して表記の「ME」に相当する。括弧内の数値は、音符データを指定するインデックス(値)である。以降、インデックスが判明している音符データには「ME」、及びそれに続けて括弧内にインデックスを示す数値、或いは変数のシンボルを表記したものを付して例えば「音符データME[0]」といったように記載し、そのインデックスが判明していない音符データには単に「ME」を付して記載することとする。これは他でも同様である。   FIG. 2 is a diagram for explaining the configuration of performance data stored in the RAM 3 for generating fingering information. The performance data indicates fingering (a finger assigned to the key to be pressed) in units of notes, in addition to data indicating the performance of the song in units of notes (hereinafter referred to as “performance musical data”). Data (hereinafter referred to as “finger note data”) and data for generating fingering note data (hereinafter referred to as “note data”) are arranged in the order in which the notes are played (pronunciation). ing. The note data corresponds to “ME” indicated in parentheses in FIG. The numerical value in the parenthesis is an index (value) for designating note data. Thereafter, “ME” is added to the note data for which the index is known, followed by a numerical value indicating the index or a symbol representing a variable in parentheses, for example, “note data ME [0]”. The note data for which the index is not known is simply described with “ME” attached. The same applies to other cases.

その音符データMEは、「time」と表記の発音開始時刻、「gate」と表記の発音継続時間、「pitch」と表記の発音ピッチ(ノート番号)、「posx」と表記の発音ピッチに対応する鍵の鍵盤座標、「tend」と表記のピッチ増減傾向、「tendstep」と表記の次の極点に達するまでのピッチ変化数、「fig」と表記の運指番号(その鍵の押鍵に使うべき指を示す番号)、「cost」と表記の運指コスト(その鍵を押鍵するうえでの難易度)、「np」と表記の禁止事項フラグ、「so」と表記の発音数、「hmny」と表記の和音フラグ、「arp」と表記の分散和音フラグ、「nhtop」と表記の次の音符群の先頭音インデックス、「nhtail」と表記の次の音符群の末端音インデックス、「phtop」と表記の前の音符群の先頭音インデックス、及び「phtail」と表記の前の音符群の先頭音インデックス、の各データを備えた構成となっている。   The note data ME corresponds to the sounding start time denoted by “time”, the sounding duration denoted by “gate”, the sounding pitch (note number) denoted by “pitch”, and the sounding pitch denoted by “posx”. Key coordinates of key, pitch increase / decrease tendency indicated as “tend”, number of pitch changes until reaching the next extreme point indicated as “tendstep”, fingering number indicated as “fig” (to be used for pressing the key) Finger number), “cost” fingering cost (difficulty in pressing the key), “np” notation flag, “so” notation, “hmny” ”Chord flag,“ arp ”, distributed chord flag,“ nhtop ”, next note group start note index,“ nhtail ”, next note group end note index,“ phto ” Top sound index "the head sound index note groups previous notation, and" phtail "and notes group previous notation, has a configuration having a respective data.

図示していないデータとしては、鍵の押鍵に使うべき指が右手か否かを示すパートや、その押鍵時の強さを示すベロシティなども存在する。しかし、ここでは説明上、便宜的に省略している。なお以後の説明で用いられる演奏データは、右手パート用に作成されたものであるとする。   As data not shown, there are a part indicating whether the finger to be used for pressing the key is the right hand, a velocity indicating the strength at the time of pressing the key, and the like. However, it is omitted here for convenience of explanation. The performance data used in the following description is assumed to be created for the right-hand part.

データposxは、MIDIフォーマットで60のノート番号が割り当てられた鍵を基準(0)として、白鍵毎に2つずつ変化させる値で鍵盤座標を表現したものである。そのように変化させることにより、白鍵は偶数、黒鍵は奇数とさせている。これは、白鍵と黒鍵とでは鍵盤7の長手方向の交差方向上の位置に違いがあるからである。   The data posx expresses the keyboard coordinates with a value that is changed by two for each white key, with a key assigned 60 note numbers in the MIDI format as a reference (0). By changing in such a manner, the white key is an even number and the black key is an odd number. This is because there is a difference in the position in the cross direction of the longitudinal direction of the keyboard 7 between the white key and the black key.

上記ピッチ増減傾向は、その増減の切り替わる点に当たる音符では0、前の音符と同じピッチ(音高)の音符では±1、前の音符のピッチと異なる音符では±2、で表現するようにしている。その符号は+はピッチが増加中であることを示し、「−」はピッチが減少中であることを示している。次の極点に達するまでのピッチ変化数は、対応する音符から次の極点とする音符の間に存在する、次の音符とピッチが異なる音符数である。   The pitch increase / decrease tendency is expressed as 0 for a note corresponding to the point where the increase / decrease changes, ± 1 for a note having the same pitch (pitch) as the previous note, and ± 2 for a note different from the pitch of the previous note. Yes. As for the sign, + indicates that the pitch is increasing, and “−” indicates that the pitch is decreasing. The number of pitch changes until the next pole is reached is the number of notes having a pitch different from that of the next note existing between the corresponding note and the note at the next pole.

上記運指番号としては、親指は0、人指し指は1,中指は2、薬指は3、小指は4をそれぞれ割り当てている。上記禁止事項フラグは、設定した運指が禁止事項として定めた条件を満たしているか否かを示すフラグである。その条件を満たしていれば1、そうでなければ0が設定される。   As the fingering numbers, 0 is assigned to the thumb, 1 is assigned to the index finger, 2 is assigned to the middle finger, 3 is assigned to the ring finger, and 4 is assigned to the little finger. The prohibited matter flag is a flag indicating whether or not the set fingering satisfies a condition defined as a prohibited matter. If the condition is satisfied, 1 is set, otherwise 0 is set.

データsoとして設定される発音数は、対応する音符の発音開始時刻に発音中の他の音符数、或いはその発音終了時刻(=time+gate)前に発音を開始する他の音符数、である。それらの数を区別するために、後者は負の値で表している。   The number of pronunciations set as the data so is the number of other notes that are sounding at the sounding start time of the corresponding note, or the number of other notes that start sounding before the sounding end time (= time + gate). In order to distinguish these numbers, the latter is represented by a negative value.

上記和音フラグは、対応する音符が和音の構成音か否かを示すものである。構成音でなければ0、構成音であれば正の値で先頭音からの位置を示す値が設定される。その位置を示す値の初期値は1である。これは、上記分散構成音フラグも同様である。   The chord flag indicates whether the corresponding note is a constituent sound of a chord. A value indicating the position from the head sound is set to 0 if it is not a constituent sound and a positive value if it is a constituent sound. The initial value of the value indicating the position is 1. The same applies to the distributed constituent sound flag.

本実施の形態では、演奏データが示す演奏全体を、和音、或いは分散和音を構成する音符群、それらの音符群の間に存在する単音の音符に仮想的に分割するようにしている。データnhtop、nhtail、phtop、phtailとして設定される各種インデックスは、そのように分割した場合のものである。データnhtopでは、次の音符群が存在しない場合、−1を設定するようになっている。   In the present embodiment, the entire performance indicated by the performance data is virtually divided into a group of notes constituting a chord or distributed chord, and a single note existing between these notes. Various indexes set as the data nhtop, nhtail, phtop, and phtail are obtained when such division is performed. In the data nhtop, when the next note group does not exist, −1 is set.

上記データtime、gate、及びpitchは、外部記憶装置6から読み出された演奏データを構成するデータか、或いはそのデータから生成されるものであり、演奏音符データに相当する。その演奏音符データをRAM3に格納する際に、その数をカウントして得られる総数が変数ev_maxに代入される。上記データposx、及びfigは、運指音符データに相当する。それら以外は、運指音符データ生成用のデータである。   The data time, gate, and pitch are data constituting performance data read from the external storage device 6 or generated from the data, and correspond to performance note data. When the performance note data is stored in the RAM 3, the total number obtained by counting the number is substituted into the variable ev_max. The data posx and fig correspond to fingering note data. The others are data for generating fingering note data.

以降は、図3〜図8、及び図10〜図21に示す各種処理のフローチャート、並びに図9に示す説明図を参照しつつ、電子楽器の動作について詳細に説明する。なお、それらの図に示す各処理は、CPU1がROM2に格納されたプログラムを実行することで実現される。   Hereinafter, the operation of the electronic musical instrument will be described in detail with reference to flowcharts of various processes illustrated in FIGS. 3 to 8 and 10 to 21 and an explanatory diagram illustrated in FIG. 9. Each process shown in these drawings is realized by the CPU 1 executing a program stored in the ROM 2.

図3は、全体処理のフローチャートである。始めに図3を参照して、全体処理について詳細に説明する。
電源がオンされると、先ず、ステップSA1で初期処理を実行し、電子楽器を所定の状態に設定する。続くステップSA2では、曲指定スイッチがオンしたか否か判定する。そのスイッチをユーザが操作したことで入力部4からその旨を示す信号を受け取った場合、判定はYESとなり、次にステップSA3において、ユーザの入力部4への操作により指定される曲(演奏データ)を外部記憶装置6から取り込むための処理を実行してからステップSA4に移行する。一方、そうでない場合には、判定はNOとなり、次にそのステップSA4の処理を実行する。
FIG. 3 is a flowchart of the entire process. First, the entire process will be described in detail with reference to FIG.
When the power is turned on, first, an initial process is executed in step SA1 to set the electronic musical instrument to a predetermined state. In the subsequent step SA2, it is determined whether or not the music designation switch is turned on. If a signal indicating that is received from the input unit 4 because the user has operated the switch, the determination is YES, and in step SA3, a song (performance data) designated by the user's operation on the input unit 4 is determined. ) Is executed from the external storage device 6, and then the process proceeds to step SA4. On the other hand, if not, the determination is no, and the process of step SA4 is then executed.

ステップSA3での演奏データの取り込みにより、RAM3には図2に示す構成で演奏データが格納される。そのために、音符データMEの個数をカウントして、そのカウント値から1を引いた値を変数ev_maxに代入する。また、曲の構造解析を行い、その解析結果に従って、各音符データMEを構成するデータtime、gate、pitch、posx、tend、tendstep、so、hmny、arp、nhtop、nhtail、phtop、及びphtailの設定を行う。データfig、cost、及びnpには予め定めた値を初期値として設定する。それら各種データの設定を行える構造解析は周知技術であることから、ここでは詳細な説明は省略する。   By taking in the performance data at step SA3, the performance data is stored in the RAM 3 in the configuration shown in FIG. For this purpose, the number of note data ME is counted, and a value obtained by subtracting 1 from the count value is substituted into a variable ev_max. Also, the structure of the music is analyzed, and the data time, gate, pitch, posx, tend, tendstep, so, hmny, arp, nhtop, nhtail, phtop, and phtail are set according to the analysis result. I do. Predetermined values are set as initial values for the data fig, cost, and np. Since the structural analysis that can set these various data is a well-known technique, a detailed description is omitted here.

ステップSA4では、運指生成スイッチがオンしたか否か判定する。そのスイッチをユーザが操作した場合、判定はYESとなり、次にステップSA5で運指情報の生成を行うための運指生成処理を実行した後、ステップSA6に移行する。そうでない場合には、次にそのステップSA6に移行する。   In step SA4, it is determined whether or not the fingering generation switch is turned on. If the switch is operated by the user, the determination is YES, and after performing fingering generation processing for generating fingering information in step SA5, the process proceeds to step SA6. If not, the process proceeds to step SA6.

ステップSA6では、入力部4に設けられたその他のスイッチへの操作に対応するためのその他スイッチ処理を実行する。続くステップSA7では、鍵盤7へのユーザの操作に応じて楽音を発音させるための鍵盤処理を実行する。その次のステップSA8では、ユーザに曲を指定させ、指定された曲の自動演奏を実現させるための自動演奏処理を実行する。それ以降は、ステップSA9で表示部5に表示させるべき情報を表示させる表示処理、ステップSA10でその他処理を実行してから、上記ステップSA2に戻る。   In step SA6, other switch processing for responding to operations on other switches provided in the input unit 4 is executed. In the subsequent step SA7, a keyboard process for generating a musical tone in accordance with a user operation on the keyboard 7 is executed. In the next step SA8, the user is allowed to designate a song, and an automatic performance process for realizing the automatic performance of the designated song is executed. Thereafter, display processing for displaying information to be displayed on the display unit 5 in step SA9, and other processing in step SA10 are executed, and then the process returns to step SA2.

図4は、上記ステップSA5として実行される運指生成処理のフローチャートである。次に図4を参照して、その生成処理について詳細に説明する。
先ず、ステップSB1では、1音符毎に運指情報(運指音符データ)を生成する逐次生成処理を実行する。次のステップSB2では、変数meに1を代入する。その次に移行するステップSB3では、変数meの値が変数ev_maxの値と等しいか否か判定する。それらの値が一致していた場合、判定はYESとなり、ここで一連の処理を終了する。そうでない場合には、判定はNOとなってステップSB4に移行する。
FIG. 4 is a flowchart of the fingering generation process executed as step SA5. Next, the generation process will be described in detail with reference to FIG.
First, in step SB1, sequential generation processing for generating fingering information (fingering note data) for each note is executed. In the next step SB2, 1 is substituted into the variable me. In the next step SB3, it is determined whether or not the value of the variable me is equal to the value of the variable ev_max. If these values match, the determination is yes, and the series of processing ends here. Otherwise, the determination is no and the process moves to step SB4.

ステップSB4では、変数meの値で指定される音符データME(演奏上は発音させる音符に相当することから単に「音符」とも表記する)に着目して、禁止事項とする条件が満たされているか否か検索(確認)するための禁止事項検索処理を実行する。その実行後はステップSB5に移行して、変数meの値で指定される音符データME中のデータnp(図中「ME[me].np」と表記。以降、その表記法も併用する)として0が設定されているか否か判定する。禁止事項に該当しないと判定された場合、データnpとして0が設定されることから、判定はYESとなってステップSB6に移行し、そうでない場合には、判定はNOとなり、ステップSB10で変数meの値をインクリメントしてから上記ステップSB3に戻る。   In step SB4, whether or not the prohibited condition is satisfied by paying attention to the note data ME specified by the value of the variable me (which is simply expressed as “note” because it corresponds to a note to be generated in the performance). Execute prohibited matter search processing for searching (confirming) whether or not. After the execution, the process proceeds to step SB5, where the data np in the note data ME specified by the value of the variable me (denoted as “ME [me] .np” in the figure. The notation is also used hereinafter). It is determined whether 0 is set. If it is determined that it does not correspond to the prohibited matter, 0 is set as the data np. Therefore, the determination is YES and the process proceeds to Step SB6. Otherwise, the determination is NO and the variable me is determined in Step SB10. After the value is incremented, the process returns to step SB3.

ステップSB6〜SB9では、禁止事項に該当しないと判定された運指を対象に、その運指のコストに応じてそのコストをより低減させるための処理が行われる。
先ず、ステップSB6では、変数meの値で指定する音符(指定音)のコストを算出する指定音コスト算出処理を実行する。続くステップSB7では、その算出処理の実行により算出されたコストの補正を行うコスト補正処理を実行する。次に実行するステップSB8では、指定音のコスト(図中「ME[me].cost」と表記)が、閾値として定めた定数THRCOSTより大きいか否か判定する。その値が定数THRCOSTより大きい場合、判定はYESとなり、ステップSB9で運指を修正するための運指修正処理を実行した後、上記ステップSB10に移行する。そうでない場合には、判定はNOとなり、次にそのステップSB10の処理を実行する。
In steps SB6 to SB9, a process for further reducing the cost according to the cost of the fingering is performed on the fingering determined not to fall under the prohibited items.
First, in step SB6, a designated sound cost calculation process for calculating the cost of a note (designated sound) designated by the value of the variable me is executed. In subsequent step SB7, a cost correction process for correcting the cost calculated by executing the calculation process is executed. In step SB8 to be executed next, it is determined whether or not the cost of the designated sound (indicated as “ME [me] .cost” in the figure) is larger than a constant THRCOST defined as a threshold value. If the value is larger than the constant THRCOST, the determination is YES, and after performing the fingering correction process for correcting the fingering in step SB9, the process proceeds to step SB10. Otherwise, the determination is no and the process of step SB10 is next executed.

運指修正処理での運指の修正は、特に詳細な説明は省略するが、例えば指定音の前後の部分を考慮して処理対象とする区間を決定し、決定した区間内の演奏を行ううえで可能性のある全ての運指の組み合わせのなかからコストが最小となる組み合わせを抽出することで行っている。それにより、指定音に対して最適な運指を修正時には確実に設定させている。   Although the detailed description of the fingering correction in the fingering correction process is omitted, for example, the section to be processed is determined in consideration of the parts before and after the specified sound, and the performance in the determined section is performed. This is done by extracting the combination with the lowest cost from all possible fingering combinations. This ensures that the optimal fingering for the specified sound is set at the time of correction.

このようにして本実施の形態では、補正後のコストが定数THRCOSTとして設定した許容範囲内となっていない運指のみを修正の対象として、より適切なものとなるように修正を行うようにしている。それにより、ステップSB1で生成した運指情報は、運指(音符)単位で必要に応じて修正するようにしている。   In this way, in the present embodiment, only the fingering whose corrected cost is not within the allowable range set as the constant THRCOST is corrected, and correction is performed so as to be more appropriate. Yes. Thereby, the fingering information generated in step SB1 is corrected as needed in units of fingering (notes).

必要に応じた修正を行うようにしたことにより、逐次生成処理での運指情報の生成には比較的に簡単なアルゴリズムを採用することができる。このため、簡単なアルゴリズムで最適、或いはそれに近い運指情報の生成が可能な曲(演奏データ)では、その生成を迅速に行うことができる。そうでない楽曲でも、生成後の必要に応じた修正により、最適、或いはそれに近い運指情報を得ることができる。   By making corrections as necessary, it is possible to employ a relatively simple algorithm for generating fingering information in the sequential generation process. For this reason, music (performance data) that can generate fingering information that is optimal or close to that with a simple algorithm can be generated quickly. Even for music that is not so, it is possible to obtain fingering information that is optimal or close to that by correction as necessary after generation.

以降は、上記運指生成処理内で直接的、或いは間接的に呼び出されるサブルーチン処理について詳細に説明する。
図5、及び図6は、上記ステップSB4として実行される禁止事項検索処理のフローチャートである。そのサブルーチン処理としては、始めに図5、及び図6を参照して、その検索処理について詳細に説明する。
Hereinafter, a subroutine process called directly or indirectly in the fingering generation process will be described in detail.
5 and 6 are flowcharts of the prohibited matter search process executed as step SB4. As the subroutine processing, first, the search processing will be described in detail with reference to FIG. 5 and FIG.

例えば親指や小指はその長さ、手の位置などの理由により、鍵盤7上の黒鍵の押鍵はそれ以外の指よりも困難である。同じ指を使った連続する押鍵は、離鍵から押鍵までの時間間隔、押鍵する鍵間の距離(音高(ピッチ)差)などに応じて難易度(コスト)が変化する。時間間隔が短く、且つ鍵間の距離が大きいような場合、その押鍵は不可能か、或いは極めて困難となる。他にも不可能、或いは極めて困難な運指は存在する。このようなことから、禁止事項検索処理では、指定音に割り当てられた運指が不可能、或いは極めて困難と考えられる条件(禁止事項)の何れにも相当していないか否か検索により確認するようになっている。   For example, pressing a black key on the keyboard 7 is more difficult than other fingers because of the length of the thumb and little finger, the position of the hand, and the like. The degree of difficulty (cost) of successive key presses using the same finger changes according to the time interval from key release to key press, the distance between keys to be pressed (pitch (pitch) difference), and the like. When the time interval is short and the distance between the keys is large, the key depression is impossible or extremely difficult. There are other fingerings that are impossible or extremely difficult. For this reason, in the prohibited matter search process, it is confirmed by searching whether the fingering assigned to the designated sound does not correspond to any of the conditions (prohibited items) considered impossible or extremely difficult. It is like that.

先ず、ステップSD1では、データの設定、及び変数への値の代入を行う。具体的には、データではME[me].npとして0を設定し、変数では、変数fにME[me].fig、変数pにME[me].posx、変数bwに変数pの値を2で割った余り(=p%2)、変数nfにME[me+1].fig、変数npにME[me+1].posx、変数pfにME[me−1].fig、及び変数ppにME[me−1].posx、をそれぞれ代入する。ステップSD2にはその後に移行する。   First, in step SD1, data is set and a value is assigned to a variable. Specifically, ME [me]. np is set to 0, and for variables, ME [me]. fig, ME [me]. posx, the remainder of dividing the value of the variable p by 2 into the variable bw (= p% 2), ME [me + 1]. fig, ME [me + 1]. posx, ME [me-1]. fig and the variable pp are ME [me-1]. posx is substituted respectively. Then, the process proceeds to step SD2.

ステップSD2では、変数pの値が0、或いは4で、かつ変数bwの値が1か否か判定する。変数pの値としての0、4は親指、小指を表し、変数bwの値としての1は押鍵すべき鍵が黒鍵であることを表している。このことから、指定音を発音させるための鍵が黒鍵でないか、或いは黒鍵であっても押鍵に親指、及び小指の何れも設定されていない場合、判定はNOとなってステップSD5に移行する。そうでない場合には、つまり、その鍵が黒鍵であり、かつその押鍵に親指、或いは小指が設定されていた場合、判定はYESとなってステップSD3に移行する。   In step SD2, it is determined whether the value of the variable p is 0 or 4 and the value of the variable bw is 1. 0 and 4 as the value of the variable p represent the thumb and little finger, and 1 as the value of the variable bw represents that the key to be pressed is a black key. Therefore, if the key for generating the designated sound is not a black key, or if neither the thumb nor the little finger is set as the key press even if it is a black key, the determination is no and the process returns to step SD5. Transition. If not, that is, if the key is a black key and a thumb or little finger is set as the key pressed, the determination is yes and the process moves to step SD3.

ステップSD3では、変数pの値から変数npの値を引いた値の絶対値が2未満か、或いは変数pの値から変数ppの値を引いた値の絶対値が2未満か否か判定する。指定音とその前音符の間、及び指定音とその次音符の間のピッチ差のいずれかが絶対値で2未満であった場合、判定はYESとなり、禁止事項を満たしているとして、ステップSD4でME[me].npとして1を設定した後、一連の処理を終了する。そうでない場合には、判定はNOとなってステップSD5に移行する。   In step SD3, it is determined whether the absolute value of the value obtained by subtracting the value of the variable np from the value of the variable p is less than 2, or whether the absolute value of the value obtained by subtracting the value of the variable pp from the value of the variable p is less than 2. . If any of the pitch differences between the designated sound and the preceding note and between the designated sound and the next note is less than 2 in absolute value, the determination is YES, and it is determined that the prohibited items are satisfied, and step SD4 And ME [me]. After 1 is set as np, a series of processing ends. Otherwise, the determination is no and the process moves to step SD5.

ステップSD5では、ME[me].hmnyが0でなく、かつME[me−1].hmnyが0でないか否か判定する。変数me、及びその値から1を引いた値で指定される、隣り合う2つの音符が共に和音の構成音であった場合、それらのデータhmnyとして0ではない値が設定されていることから、判定はYESとなってステップSD6に移行し、そうでない場合には、つまりそれら2つの音符の内の少なくとも一方が和音の構成音でない場合には、判定はNOとなってステップSD7に移行する。   In step SD5, ME [me]. hmny is not 0 and ME [me-1]. It is determined whether hmny is not zero. When two adjacent notes specified by a variable me and a value obtained by subtracting 1 from the value are both chord constituent sounds, values other than 0 are set as the data hmny. If the determination is YES and the process proceeds to step SD6, otherwise, that is, if at least one of the two notes is not a chord component, the determination is NO and the process proceeds to step SD7.

ステップSD7では、変数fの値から変数nfの値を引いた値の絶対値が2以下であり、かつ変数pの値から変数npの値を引いた値の絶対値が6より大きいか否か判定する。隣り合う2つの音符の押鍵にそれぞれ割り当てられた2つの指は隣り合うか、或いはその間に1本の指が位置する関係にあり、かつその2つの音符のピッチ差が鍵6個分より大きい場合、判定はYESとなってステップSD4に移行する。それにより、不可能と考える程、指を開かなければならないような運指は禁止事項に該当していると見なす。そうでない場合には、つまり指の開き具合によって2つの音符を発音させるための押鍵が行えるような運指であった場合には、判定はNOとなって図6のステップSD8に移行する。   In step SD7, whether or not the absolute value of the value obtained by subtracting the value of the variable nf from the value of the variable f is 2 or less and whether the absolute value of the value obtained by subtracting the value of the variable np from the value of the variable p is greater than 6 judge. Two fingers assigned to the keys of two adjacent notes are adjacent to each other, or one finger is positioned between them, and the pitch difference between the two notes is greater than the six keys In this case, the determination is yes and the process proceeds to step SD4. As a result, fingering that must be opened to the extent that it is considered impossible is regarded as a prohibited matter. If not, that is, if the fingering is such that the key can be depressed to generate two notes depending on how the fingers are opened, the determination is no and the process moves to step SD8 in FIG.

図6のステップSD8では、変数socntにME[me].soの絶対値、変数mepolyに変数meの値を代入する。次のステップSD9では、ME[me].soが0より大きいか否か判定する。変数meの値で指定される音符の発音開始時刻に発音中の他の音符が存在する場合、ME[me].soの値として0より大きい値が設定されることから、判定はYESとなってステップSD10に移行し、そうでない場合には、つまり、そのような音符が存在しないような場合には、判定はNOとなってステップSD17に移行する。   In step SD8 of FIG. 6, ME [me]. The value of the variable me is substituted for the absolute value of so and the variable mepoly. In the next step SD9, ME [me]. It is determined whether or not so is greater than zero. If there is another note that is sounding at the note start time specified by the value of the variable me, ME [me]. Since a value greater than 0 is set as the value of so, the determination is YES and the process proceeds to step SD10. If not, that is, if there is no such note, the determination is It becomes NO and moves to step SD17.

ステップSD10〜SD16では、変数meの値で指定される音符の発音開始時刻に発音中の他の音符が存在する場合を想定して決定した禁止事項に該当するものを抽出するための処理が行われる。   In steps SD10 to SD16, a process is performed to extract a thing corresponding to the prohibited matter determined assuming that there is another note that is sounding at the sounding start time of the note specified by the value of the variable me. Is called.

先ず、ステップSD10では、変数socntの値が0より大きいか否か判定する。その値が0以下であった場合、判定はNOとなり、ここで一連の処理を終了する。そうでない場合には、判定はYESとなり、ステップSD11で変数mepolyの値をデクリメントし、更にME[mepoly].timeの値にME[mepoly].gateの値を加算し、その加算結果からME[me].timeの値を引いた値をME[me].gateの値で割って得られる値(=(ME[mepoly].time+ME[mepoly].gate−ME[me].time)/ME[me].gate)を変数overに代入してからステップSD12に移行する。変数overに代入される値は、変数mepolyの値で指定される音符の発音終了時刻と、変数meの値で指定される音符の発音開始時刻との間の時間間隔を後者の発音時間で割って得られる値、つまり後者の発音開始時刻となって以降に前者が発音終了される時間を後者の発音時間で割って得られる値である。   First, in step SD10, it is determined whether or not the value of the variable socnt is greater than zero. If the value is 0 or less, the determination is no, and the series of processing ends here. Otherwise, the determination is yes, and in step SD11, the value of the variable mepoly is decremented, and further ME [mepo]]. The value of time is ME [mepoly]. gate value is added, and ME [me]. The value obtained by subtracting the value of time is ME [me]. The value obtained by dividing by the value of gate (= (ME [mep]]. time + ME [mep] [gate-ME [me] .time) / ME [me] .gate) is assigned to the variable “over”, and then to step SD12. Transition. The value assigned to the variable “over” is obtained by dividing the time interval between the pronunciation end time of the note specified by the value of the variable “mepoly” and the pronunciation start time of the note specified by the value of the variable “me” by the latter pronunciation time. The value obtained by dividing the time when the former sound generation is ended after the latter sounding start time is divided by the latter sounding time.

ステップSD12では、変数overの値が定数POLYRATIOより大きく、且つME[mepoly].timeの値がME[me].timeの値未満か否か判定する。定数POLYRATIOは、2つの音符の間で発音時間の重なっている期間の割合が一定以上の音符を抽出するために用意した閾値である。このことから、その割合が一定以上の2つの音符を異なるタイミングで押鍵しなければならないような場合、判定はYESとなってステップSD13に移行し、そうでない場合には、判定はNOとなり、ステップSD12Aで、変数overが0より大きい場合に変数socntの値をデクリメントしてから上記ステップSD10に戻る。   In step SD12, the value of the variable “over” is larger than the constant POLYRATIO, and ME [memory]. The value of time is ME [me]. It is determined whether it is less than the value of time. The constant POLYRATIO is a threshold value prepared for extracting a note in which the ratio of the period in which sound generation time overlaps between two notes exceeds a certain value. For this reason, if two notes with a certain ratio or more must be pressed at different timings, the determination is YES and the process moves to step SD13. Otherwise, the determination is NO, In step SD12A, when the variable over is larger than 0, the value of the variable socnt is decremented, and then the process returns to step SD10.

ステップSD13では、変数f1にME[me].figの値、変数f2にME[mepoly].figの値、変数p1にME[me].posxの値、変数p2にME[mepoly].posxの値をそれぞれ代入する。それに続くステップSD14〜SD16では、変数me、mepolyの各値で指定される2つの音符が、同じ指を用いて押鍵すべきピッチの異なる音符である、親指、或いは親指に近いほうの指をピッチの大きいほうの音符の押鍵に使わなければならない、或いはその逆に、小指、或いは小指に近いほうの指をピッチの小さいほうの音符の押鍵に使わなければならない、の何れかの禁止事項に該当しているか否か判定するための処理を行う。それら禁止事項の何れにも該当していない場合、最終的にステップSD16の判定がNOとなって上記ステップSD12Aに移行する。そうでない場合には、ステップSD14〜SD16の何れかの判定がYESとなって図5のステップSD4に移行する。後者の2つの禁止事項の何れかに該当している場合、2つの音符に対応する鍵の押鍵時に指は交差させることになる。   In step SD13, ME [me]. fig, the variable f2 is ME [memory]. fig, ME [me]. The value of posx, the variable p2 is ME [memory]. The value of posx is substituted respectively. In subsequent steps SD14 to SD16, the two notes specified by the values of the variables me and meply are the notes having different pitches to be depressed using the same finger, and the thumb or the finger closer to the thumb is moved. Must be used to press the note with the larger pitch, or vice versa, the little finger or the finger closer to the little finger must be used to press the note with the smaller pitch A process for determining whether or not the item is applicable is performed. If none of the prohibited items correspond, the determination in step SD16 is finally NO and the process proceeds to step SD12A. Otherwise, the determination in any of steps SD14 to SD16 is YES, and the process proceeds to step SD4 in FIG. If one of the latter two prohibitions is applicable, the fingers cross each other when the keys corresponding to the two notes are pressed.

上記ステップSD9の判定がNOとなって移行するステップSD17では、ME[me].soが0未満か否か判定する。変数meの値で指定される音符の発音終了時刻前に発音を開始する他の音符が存在する場合、ME[me].soの値として0未満の値が設定されることから、判定はYESとなってステップSD18に移行し、そうでない場合には、つまり、そのような音符が存在しないような場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SD17 in which the determination in step SD9 is NO and the process proceeds to ME [me]. It is determined whether so is less than zero. When there is another note that starts sounding before the note end time specified by the value of the variable me, ME [me]. Since a value less than 0 is set as the value of so, the determination is yes and the process proceeds to step SD18. If not, that is, if such a note does not exist, the determination is The answer is NO, and the series of processing ends here.

ステップSD18〜SD24では、変数meの値で指定される音符の発音終了時刻前に発音が開始される他の音符が存在する場合を想定して決定した禁止事項に該当するものを抽出するための処理が行われる。その禁止事項は、変数meの値で指定される音符の発音開始時刻に発音中の他の音符が存在する場合を想定して決定したものと基本的に同じである。また、ステップSD18〜SD24の処理内容、及びその流れも上述のステップSD10〜SD16のそれと同様である。これらのことから、詳細な説明は省略する。   Steps SD18 to SD24 are for extracting the ones corresponding to the prohibited items determined on the assumption that there is another note whose sounding is started before the sounding end time of the note specified by the value of the variable me. Processing is performed. The prohibition items are basically the same as those determined assuming that there is another note that is sounding at the sounding start time of the note specified by the value of the variable me. Further, the processing contents and the flow of steps SD18 to SD24 are the same as those of steps SD10 to SD16 described above. For these reasons, detailed description is omitted.

このようにして、指定音(変数meの値で指定される音符)の前後に位置する音符を含めて考慮し、その指定音を発音させるために設定した運指が禁止事項の何れかに該当しているか否か確認し、何れかの禁止事項に該当している場合に、データnp(ME[me].np)として1を設定するようになっている。   In this way, taking into account the notes located before and after the specified sound (notes specified by the value of the variable me), the fingering set to pronounce the specified sound falls under any of the prohibited items If any of the prohibited items is satisfied, 1 is set as data np (ME [me] .np).

図7は、図4に示す運指生成処理内でステップSB6として実行される指定音コスト算出処理のフローチャートである。次にその算出処理について、図7に示すそのフローチャートを参照して詳細に説明する。   FIG. 7 is a flowchart of the designated sound cost calculation process executed as step SB6 in the fingering generation process shown in FIG. Next, the calculation process will be described in detail with reference to the flowchart shown in FIG.

先ず、ステップSG1では、変数ev1、及びev2にそれぞれ、変数meの値、その値に1を加算した値を代入する。次のステップSG2では、指定音とその次音符間のコストを算出する2音間コスト算出処理を実行する。その次に移行するステップSG3では、その算出処理の実行によりコストの値として変数cost2evに代入された値を、指定音のコストとして設定(ME[me].cost←cost2ev)する。その後はステップSG4に移行して、設定したコストの値が定数MAXCOSTと等しいか否か判定する。その定数MAXCOSTは、コストの最大値として設定したものである。その定数MAXCOSTが変数cost2evに代入されていた場合、判定はYESとなり、ここで一連の処理を終了する。そうでない場合には、判定はNOとなってステップSG5に移行する。   First, in step SG1, the value of the variable me and the value obtained by adding 1 to the value are substituted for the variables ev1 and ev2, respectively. In the next step SG2, a cost calculation process between two sounds for calculating the cost between the designated sound and the next note is executed. In the next step SG3, the value assigned to the variable cost2ev as the cost value by executing the calculation process is set as the cost of the designated sound (ME [me] .cost ← cost2ev). Thereafter, the process proceeds to step SG4, and it is determined whether or not the set cost value is equal to the constant MAXCOST. The constant MAXCOST is set as the maximum value of cost. If the constant MAXCOST has been assigned to the variable cost2ev, the determination is yes, and the series of processing ends here. Otherwise, the determination is no and the process moves to step SG5.

ステップSG5では、各種変数への値の代入を行う。具体的には、変数nには0、変数coefには1、変数tdにはME[ev2].timeの値からME[ev1].timeの値を引いた値(変数ev1、及びev2の値で指定される2つの音符間の発音開始時刻の時間間隔)をそれぞれ代入する。その後に移行するステップSG6では、変数nの値が定数MAXOS未満か否か判定する。その値が定数MAXOS以上であった場合、判定はNOとなってステップSG10に移行し、そうでない場合には、判定はYESとなってステップSG7に移行する。   In step SG5, values are assigned to various variables. Specifically, the variable n is 0, the variable coef is 1, and the variable td is ME [ev2]. From the value of time, ME [ev1]. The value obtained by subtracting the value of time (the time interval of the sounding start time between two notes specified by the values of the variables ev1 and ev2) is substituted. In step SG6 that moves to thereafter, it is determined whether or not the value of the variable n is less than the constant MAXOS. If the value is equal to or greater than the constant MAXOS, the determination is no and the process proceeds to step SG10, and if not, the determination is yes and the process proceeds to step SG7.

ステップSG7では、変数tdの値が、コスト補正テーブルTMCFの変数nの値で指定されるレコードに格納されたデータdiff(図中「TMCF[n].diff」と表記。以降、この表記法も併せて用いる)の値以下か否か判定する。変数tdの値がデータdiffの値以下であった場合、判定はYESとなり、ステップSG9で変数coefに、コスト補正テーブルTMCFの変数nの値で指定されるレコードに格納されたデータcoef(図中「TMCF[n].coef」と表記)の値を代入し、その代入後、変数cost2evに、それまでの値に変数coefの値を掛けた値を代入してからステップSG10に移行する。そうでない場合には、判定はNOとなり、ステップSG8で変数nの値をインクリメントしてから上記ステップSG6に戻る。   In step SG7, the value of the variable td is expressed as data diff ("TMCF [n] .diff" in the figure. This notation is also shown below) stored in the record designated by the value of the variable n in the cost correction table TMCF. It is determined whether the value is equal to or less than the value of If the value of the variable td is less than or equal to the value of the data diff, the determination is YES, and the data coef stored in the record designated by the value of the variable n of the cost correction table TMCF is stored in the variable coef (step SG9). The value of “TMCF [n] .coef”) is substituted, and after the substitution, the value obtained by multiplying the previous value by the value of the variable coef is substituted for the variable cost2ev, and then the process proceeds to step SG10. Otherwise, the determination is no, the value of variable n is incremented in step SG8, and then the process returns to step SG6.

ここで、上記ステップSG6〜SG9によって行われるコスト補正方法、及び上記2音間コスト算出処理で行われるコスト算出方法について図9を参照して具体的に説明する。その図9は、ROM2に格納されたテーブルのデータ構成を説明する図であり、図9(a)は運指コストテーブル、図9(b)はコスト補正テーブルのそれを示している。   Here, the cost correction method performed in steps SG6 to SG9 and the cost calculation method performed in the cost calculation process between two sounds will be specifically described with reference to FIG. FIG. 9 is a diagram for explaining the data structure of a table stored in the ROM 2. FIG. 9A shows a fingering cost table, and FIG. 9B shows that of a cost correction table.

始めに、2音間コスト算出処理でのコスト算出方法について図9(a)を参照して具体的に説明する。
図9(a)中、「bw」は鍵盤種類(0は白鍵、1は黒鍵)、「pm」はピッチ変化方向(0は増加方向、1は減少方向)、「fig1」は変数ev1の値で指定される音符の指番号、「fig2」は変数ev2の値で指定される音符の指番号、「intv」はそれら2つの音符間のピッチ差、をそれぞれ表している。それにより、テーブルCTは、それらのデータの各値の組み合わせで示される状況別に、その状況下での運指のコストを格納したものとなっている。このことから、2音間コスト算出処理では、それらのデータを求め、定数MAXCOSTを代入すべき条件が満たされていない場合に、各値の組み合わせで指定される欄に格納されたコスト(値)を抽出して変数cost2evに代入するようになっている。運指コストテーブルCTは、5個の値によって示される状況別にコストの値を格納したものであることから、5次元の配列変数CTの形での表記も併用することとする。
First, a cost calculation method in the cost calculation process between two sounds will be specifically described with reference to FIG.
In FIG. 9A, “bw” is the keyboard type (0 is the white key, 1 is the black key), “pm” is the pitch changing direction (0 is the increasing direction, 1 is the decreasing direction), and “fig1” is the variable ev1. The finger number of the note specified by the value of “”, “fig2” represents the finger number of the note specified by the value of the variable ev2, and “intv” represents the pitch difference between the two notes. Thereby, the table CT stores the cost of fingering under the situation according to the situation indicated by the combination of each value of the data. From this, in the cost calculation process between two sounds, those data are obtained, and the cost (value) stored in the column designated by the combination of each value when the condition for substituting the constant MAXCOST is not satisfied. Is extracted and substituted into the variable cost2ev. Since the fingering cost table CT stores cost values for each situation indicated by five values, the notation in the form of a five-dimensional array variable CT is also used.

上述したような構成の運指コストテーブルCTでは、2音間の発音開始時刻の時間間隔が考慮されていない。その時間間隔が短くなるほど、運指は困難となるのが普通である。上記ステップSG6〜SG9でのコスト補正は、図9(b)に示すコスト補正テーブルを参照して、その時間間隔をコストに反映させるために行われる。   In the fingering cost table CT configured as described above, the time interval of the sounding start time between two sounds is not considered. The shorter the time interval, the more difficult fingering is. The cost correction in steps SG6 to SG9 is performed in order to reflect the time interval on the cost with reference to the cost correction table shown in FIG.

図9(b)中の「diff」は時間間隔、「coef」はその時間間隔に対して設定した係数、をそれぞれ表している。それにより、コスト補正テーブルTMCFは、総数MAXOSの各レコードに、時間間隔、及び係数を格納した構成となっている。   In FIG. 9B, “diff” represents a time interval, and “coef” represents a coefficient set for the time interval. Thereby, the cost correction table TMCF has a configuration in which the time interval and the coefficient are stored in each record of the total number MAXOS.

レコードに格納する時間間隔は、それを指定する値(レコード番号)が小さくなるほど、より短いものとさせている。それにより、ステップSG6〜SG9では、変数nの値を順次、インクリメントしながら、格納した時間間隔が変数tdの値以上のレコードを特定し、特定したレコードのデータcoefの値を変数coefに代入して変数cost2evの値を補正(更新)するようになっている。   The time interval stored in the record is made shorter as the value (record number) specifying it becomes smaller. Thereby, in steps SG6 to SG9, while sequentially incrementing the value of the variable n, the record whose stored time interval is greater than or equal to the value of the variable td is identified, and the value of the data coef of the identified record is substituted into the variable coef. The value of the variable cost2ev is corrected (updated).

図7のステップSG10以降の説明に戻る。
そのステップSG10では、ME[ev1].timeの値にME[ev1].gateの値を加算し、その加算結果からME[ev2].timeの値を引いて得られる値(変数ev1の値で指定される音符の発音終了時刻と変数ev2の値で指定される音符の発音開始時刻との間の時間間隔)を変数overに代入する。続くステップSG11では、変数overが0より大きく、かつ変数tdの値も0より大きいか否か判定する。それらの値が共に0より大きい場合、つまり指定音の次音符は指定音の発音終了時刻前に異なるタイミングで発音を開始させなければならない場合、判定はYESとなってステップSG12に移行する。そうでない場合には、判定はNOとなってステップSG16に移行し、変数cost2evの値が定数MAXCOSTより大きければその定数MAXCOSTを変数cost2evに代入してからその値をME[me].costとして設定する。一連の処理はその後に終了する。
Returning to the explanation after step SG10 in FIG.
In step SG10, ME [ev1]. The value of time is set to ME [ev1]. gate value is added, and ME [ev2]. A value obtained by subtracting the value of time (the time interval between the note generation end time specified by the value of the variable ev1 and the note start time specified by the value of the variable ev2) is substituted into the variable over. . In the subsequent step SG11, it is determined whether or not the variable over is greater than 0 and the value of the variable td is also greater than 0. If both of these values are greater than 0, that is, if the next note of the designated sound must start sounding at a different timing before the sounding end time of the designated sound, the determination is yes and the process moves to step SG12. Otherwise, the determination is no and the process proceeds to step SG16. If the value of the variable cost2ev is larger than the constant MAXCOST, the constant MAXCOST is substituted into the variable cost2ev, and then the value is set to ME [me]. Set as cost. A series of processing is finished thereafter.

ステップSG12では、変数tdの値をME[ev1].gateの値で割った値に100を掛けて得られる値を変数blankに代入する。すなわち変数blankは、指定音の発音継続時間に対する、次音符との発音時間が重ならない時間の割合を示す値である。その代入後に移行するステップSG13では、変数blankの値が80より大きいか否か判定する。その値が80より大きい場合、判定はYESとなり、ステップSG14で変数cost2evに変数coefの値を3倍した値を代入する。そうでない場合には、判定はNOとなり、ステップSG15で変数cost2evに、それまでの値に変数coefの値を3倍した値を加算して得られる値を代入する。ステップSG14、或いはSG15の処理の実行後は上記ステップSG16に移行する。   In step SG12, the value of the variable td is set to ME [ev1]. A value obtained by multiplying the value divided by the value of gate by 100 is substituted into a variable blank. That is, the variable blank is a value indicating the ratio of the time during which the sound production time does not overlap with the next note with respect to the sound production duration time of the designated sound. In step SG13 which is shifted to after the substitution, it is determined whether or not the value of the variable blank is larger than 80. If the value is greater than 80, the determination is yes, and in step SG14, a value obtained by multiplying the value of the variable coef by 3 is substituted into the variable cost2ev. Otherwise, the determination is no, and a value obtained by adding a value obtained by multiplying the value of the variable coef by 3 to the previous value is substituted for the variable cost2ev in step SG15. After the process of step SG14 or SG15 is executed, the process proceeds to step SG16.

このようにして、指定音コスト算出処理は、上記ステップSG2として2音間コスト算出処理を実行することで変数cost2evに代入された値を、2音間の発音開始時刻の時間間隔、発音時間が重なっている割合に着目して補正するようになっている。   In this way, the designated sound cost calculation process performs the two-sound cost calculation process as step SG2 to set the value substituted for the variable cost2ev to the time interval and sound generation time of the sound start time between two sounds. Correction is made by paying attention to the overlapping ratio.

次にその2音間コスト算出処理について、図8に示すそのフローチャートを参照して詳細に説明する。その算出処理では、上述したように、必要に応じて、図9(a)に示す運指コストテーブルCTに格納されたコストを抽出して変数cost2evに代入するようになっている。   Next, the cost calculation process between two sounds will be described in detail with reference to the flowchart shown in FIG. In the calculation process, as described above, the cost stored in the fingering cost table CT shown in FIG. 9A is extracted and substituted into the variable cost2ev as necessary.

先ず、ステップSS1では、変数f1にME[ev1].figの値、変数p1にME[ev1].posxの値、変数bwに変数p1の値を2で割った余り(図中「p1%2」と表記)、変数f2にME[ev2].figの値、変数p2にME[ev2].posxの値、をそれぞれ代入する。続くステップSS2では、変数p1の値が変数p2の値未満か否か判定する。後者が前者より大きい場合、判定はYESとなり、ステップSS3で0を変数pmに、変数p2の値から変数p1の値を引いた値を変数intvにそれぞれ代入してからステップSS5に移行する。そうでない場合には、判定はNOとなり、ステップSS4で1を変数pmに、変数p1の値から変数p2の値を引いた値を変数intvにそれぞれ代入してからステップSS5に移行する。   First, in step SS1, ME [ev1]. fig, the variable p1 is ME [ev1]. The value of posx, the remainder of dividing the value of the variable p1 by 2 (denoted as “p1% 2” in the figure), and the variable f2 are ME [ev2]. fig, the variable p2 is ME [ev2]. The value of posx is substituted respectively. In a subsequent step SS2, it is determined whether or not the value of the variable p1 is less than the value of the variable p2. If the latter is greater than the former, the determination is yes, and in step SS3, 0 is substituted for the variable pm, and the value obtained by subtracting the value of the variable p1 from the value of the variable p2 is substituted for the variable intv. Otherwise, the determination is no, and in step SS4, 1 is assigned to the variable pm, and the value obtained by subtracting the value of the variable p2 from the value of the variable p1 is assigned to the variable intv, and then the process proceeds to step SS5.

ステップSS5では、変数intvの値が定数MAXINTVより小さいか否か判定する。その定数MAXINTVは、運指により押鍵を行う難易度が極めて高いと考えられる鍵間(ピッチ差)を判定するために用意したものである。このことから、着目する2つの音符の間にそのようなピッチ差が存在していない場合、判定はYESとなり、ステップSS6で変数cost2evに、変数bw、pm、f1、f2、及びintvの各値によって運指コストテーブルCTから抽出される値(図中「CT[bw][pm][f1][f2][intv]」と表記)を代入した後、一連の処理を終了する。そうでない場合には、判定はNOとなり、ステップSS7で変数cost2evに定数MAXCOSTを代入した後、一連の処理を終了する。   In step SS5, it is determined whether or not the value of the variable intv is smaller than the constant MAXINTV. The constant MAXINTV is prepared in order to determine a key interval (pitch difference) considered to be extremely difficult to press a key by fingering. Therefore, when such a pitch difference does not exist between the two notes of interest, the determination is YES, and each value of the variables bw, pm, f1, f2, and intv is changed to the variable cost2ev in step SS6. After substituting the value (denoted as “CT [bw] [pm] [f1] [f2] [intv]” in the figure) extracted from the fingering cost table CT), a series of processing ends. Otherwise, the determination is no, and after assigning the constant MAXCOST to the variable cost2ev in step SS7, the series of processing is terminated.

図4に示す運指生成処理では、図7に示す指定音コスト算出処理をステップSB6で実行した後、続くステップSB7でコスト補正処理を実行することにより、指定音(変数meの値で指定される音符)のコストとして変数ME[me].costに代入されている値を必要に応じて更に補正するようになっている。次にそのコスト補正処理について、図10に示すそのフローチャートを参照して詳細に説明する。   In the fingering generation process shown in FIG. 4, the designated sound cost calculation process shown in FIG. 7 is executed in step SB6, and then the cost correction process is executed in the subsequent step SB7, whereby the designated sound (specified by the value of the variable me is specified). Variable ME [me]. The value assigned to cost is further corrected as necessary. Next, the cost correction process will be described in detail with reference to the flowchart shown in FIG.

先ず、ステップSC1では、変数fにME[me].figの値、変数pにME[me].posxの値、変数nfにME[me+1].figの値、変数npにME[me+1].posxの値、変数samef、passf、及びexcfに0をそれぞれ代入する。続くステップSC2では、変数fの値が変数nfの値と等しく、かつ変数pの値が変数npの値と等しくないか否か判定する。指定音とその次音符が、同じ指を用いて押鍵すべきピッチの異なる音符であった場合、判定はYESとなり、ステップSC3で変数samefに1を代入してからステップSC4に移行する。そうでない場合には、判定はNOとなり、次にそのステップSC4の処理を実行する。   First, in step SC1, ME [me]. fig, the variable p is ME [me]. The value of posx, ME [me + 1]. fig, ME [me + 1]. 0 is assigned to the value of posx and the variables samef, passf, and excf, respectively. In the subsequent step SC2, it is determined whether or not the value of the variable f is equal to the value of the variable nf and the value of the variable p is not equal to the value of the variable np. If the designated note and the next note are notes having different pitches to be depressed using the same finger, the determination is YES, and 1 is assigned to the variable samef in step SC3, and then the process proceeds to step SC4. Otherwise, the determination is no and the process of step SC4 is next executed.

ステップSC4では、変数fの値が0であり、変数nfの値は0より大きく、かつ変数pの値は変数npの値より大きいか否か判定する。指定音の押鍵に使うべき指が親指であり、その次音符の押鍵に使うべき指は親指以外の指であり、かつ指定音は次音符よりピッチが大きい場合、判定はYESとなり、ステップSC5で変数passfに1を代入してからステップSC6に移行する。そうでない場合には、つまり指定音の押鍵に使うべき指が親指でない、その次音符の押鍵に使うべき指は親指である、或いは指定音のピッチは次音符のピッチ以下である場合には、判定はNOとなり、次にそのステップSC6に移行する。   In step SC4, it is determined whether or not the value of the variable f is 0, the value of the variable nf is greater than 0, and the value of the variable p is greater than the value of the variable np. If the finger to be used to press the specified note is the thumb, the finger to be used to press the next note is a finger other than the thumb, and the specified note has a pitch larger than the next note, the determination is YES, step In SC5, 1 is substituted into the variable passf, and then the process proceeds to Step SC6. Otherwise, that is, the finger to be used to press the specified note is not the thumb, the finger to be used to press the next note is the thumb, or the pitch of the specified note is less than or equal to the pitch of the next note. The determination is NO, and then the process proceeds to step SC6.

ステップSC6では、変数fの値が0より大きく、変数nfの値は0と等しく、かつ変数pの値は変数npの値より小さいか否か判定する。指定音の押鍵に使うべき指が親指以外の指であり、その次音符の押鍵に使うべき指は親指であり、かつ指定音のピッチは次音符のピッチより小さい場合、判定はYESとなり、ステップSC7で変数passfに2を代入してからステップSC8に移行する。そうでない場合には、つまり指定音の押鍵に使うべき指が親指である、その次音符の押鍵に使うべき指は親指以外の指である、或いは指定音は次音符のピッチ以上である場合には、判定はNOとなり、次にそのステップSC8に移行する。   In step SC6, it is determined whether or not the value of the variable f is greater than 0, the value of the variable nf is equal to 0, and the value of the variable p is smaller than the value of the variable np. If the finger to be used for pressing the specified note is a finger other than the thumb, the finger to be used for pressing the next note is the thumb, and the pitch of the specified note is smaller than the pitch of the next note, the determination is YES. Then, after substituting 2 for the variable passf in step SC7, the process proceeds to step SC8. Otherwise, that is, the finger to be used to press the specified note is the thumb, the finger to be used to press the next note is a finger other than the thumb, or the specified note is greater than the pitch of the next note. In this case, the determination is no, and then the process proceeds to step SC8.

ステップSC8では、変数nfの値から変数fの値を引いた値に、変数npの値から変数pの値を引いた値を掛けて得られる乗算結果が0より小さく、変数fの値は0より大きく、かつ変数npの値は0より大きいか否か判定する。その乗算結果が0より小さく、指定音の押鍵に使うべき指が親指以外の指であり、その次音符の押鍵に使うべき指も親指以外の指であった場合、判定はYESとなり、ステップSC9で変数excfに1を代入してからステップSC10に移行する。そうでない場合には、つまり乗算結果は0以上である、指定音の押鍵に使うべき指は親指である、或いはその次音符の押鍵に使うべき指は親指である場合には、判定はNOとなり、次にステップSC10に移行する。   In step SC8, the multiplication result obtained by multiplying the value obtained by subtracting the value of the variable f from the value of the variable nf and the value obtained by subtracting the value of the variable p from the value of the variable np is smaller than 0, and the value of the variable f is 0. It is determined whether or not the value of the variable np is greater than 0. If the multiplication result is smaller than 0, the finger to be used for pressing the specified sound is a finger other than the thumb, and the finger to be used for pressing the next note is also a finger other than the thumb, the determination is YES, In step SC9, 1 is substituted into the variable excf, and then the process proceeds to step SC10. Otherwise, that is, when the multiplication result is 0 or more, the finger to be used for pressing the specified note is the thumb, or the finger to be used for pressing the next note is the thumb, the determination is No, and then the process proceeds to step SC10.

変数nfの値から変数fの値を引いた値、及び変数npの値から変数pの値を引いた値の符号が同じとなるのは、次音符の押鍵に使う指は指定音のその指より小指側に位置しており、かつ次音符は指定音よりピッチが大きいという条件、或いは次音符の押鍵に使う指は指定音のその指より親指側に位置しており、かつ次音符は指定音よりピッチが小さいという条件、を満たしている場合である。上記乗算結果は、それらの条件の何れも満たされていない場合に0より小さくなる。   The sign of the value obtained by subtracting the value of the variable f from the value of the variable nf and the value obtained by subtracting the value of the variable p from the value of the variable np are the same. It is located on the little finger side of the finger and the pitch of the next note is larger than the specified note, or the finger used to press the next note is located on the thumb side of that finger of the specified note, and the next note Is the case where the condition that the pitch is smaller than the specified sound is satisfied. The multiplication result becomes smaller than 0 when none of these conditions is satisfied.

ステップSC10〜SC18では、ステップタイム補正処理、多声補正処理、指越え指くぐり補正処理、和音対分散和音補正処理、分散和音対分散和音補正処理、単音対和音補正処理、和音対単音補正処理、和音対和音補正処理、及び前方和音補正処理、を順次、実行する。ステップSC18として前方和音補正処理を実行した後、一連の処理を終了する。   In steps SC10 to SC18, step time correction processing, polyphonic correction processing, finger crossing finger correction processing, chord vs. distributed chord correction processing, distributed chord vs. distributed chord correction processing, single tone vs. chord correction processing, chord vs. single tone correction processing, A chord pair chord correction process and a forward chord correction process are sequentially executed. After the forward chord correction process is executed as step SC18, the series of processes is terminated.

上記ステップSC10〜SC18の各補正処理は、互いに異なる内容に着目してコストを補正する処理である。本実施の形態では、それら各補正処理を順次、実行することにより、指定音コスト算出処理で算出されたコストはより適切なものとなるように補正を行っている。   The correction processes in steps SC10 to SC18 are processes for correcting the cost by paying attention to different contents. In the present embodiment, correction is performed so that the cost calculated in the designated sound cost calculation process is more appropriate by sequentially executing each of the correction processes.

以降は、上記コスト補正処理内で実行される各種サブルーチン処理について詳細に説明する。
図11は、上記ステップSC10として実行されるステップタイム補正処理のフローチャートである。コスト補正処理内で実行されるサブルーチン処理としては、始めに図11を参照して、ステップタイム補正処理について詳細に説明する。そのステップタイム補正処理は、指定音と次音符間の発音開始時刻の時間間隔に着目して、指定音のコスト(ME[me].cost)の補正を行う処理である。
Hereinafter, various subroutine processes executed in the cost correction process will be described in detail.
FIG. 11 is a flowchart of the step time correction process executed as step SC10. As a subroutine process executed in the cost correction process, the step time correction process will be described in detail first with reference to FIG. The step time correction process is a process for correcting the cost (ME [me] .cost) of the designated sound by paying attention to the time interval of the pronunciation start time between the designated sound and the next note.

先ず、ステップSE1では、変数timeintに、ME[me+1].timeの値からME[me].timeの値を引いた値(指定音とその次音符間の発音開始時刻の時間間隔)を代入し、変数coefには定数BASEを代入する。ここでは便宜的に、変数timeintに代入する値はms単位で時間間隔を表す値を想定する。定数BASEは、その時間間隔に着目する場合の基準として設定した値である。   First, in step SE1, ME [me + 1]. From the value of time, ME [me]. A value obtained by subtracting the value of time (a time interval of the sounding start time between the designated note and the next note) is substituted, and a constant BASE is substituted for the variable coef. Here, for the sake of convenience, the value to be substituted for the variable timeint is assumed to be a value representing a time interval in ms units. The constant BASE is a value set as a reference when paying attention to the time interval.

ステップSE1に続くステップSE2では、変数timeintの値が示す時間間隔の判定を行う。ここでは、その時間間隔が2000msより大きいか、10ms以下か、或いはその間であるか否かの判定を行う。その時間間隔が2000msより大きいと判定するとステップSE3に、10ms以下と判定するとステップSE4に、その間、つまり11〜2000msの間と判定するとステップSE6に、それぞれ移行する。   In step SE2 following step SE1, the time interval indicated by the value of the variable timeint is determined. Here, it is determined whether or not the time interval is greater than 2000 ms, less than 10 ms, or in between. If it is determined that the time interval is greater than 2000 ms, the process proceeds to step SE3. If it is determined to be 10 ms or less, the process proceeds to step SE4. If it is determined that the time interval is between 11 and 2000 ms, the process proceeds to step SE6.

ステップSE3では、変数samefの値が0より大きい、変数passfの値が0より大きい、或いは変数excfの値が0より大きければ3、それらの値の全てが0より大きくなければ0、をME[me].costとして設定する。続くステップSE4では、ME[me].costとして、それまでの値に対し、変数coefの値を定数BASEで割った値を乗算して得られる値を設定する。その次に移行するステップSE5では、ME[me].costの値が定数MAXCOSTより大きければその定数MAXCOSTをME[me].costとして設定する。一連の処理はその後に終了する。   In step SE3, if the value of the variable samef is greater than 0, the value of the variable passf is greater than 0, or the value of the variable excf is greater than 0, then 3 if all of these values are not greater than 0, then ME [ me]. Set as cost. In the following step SE4, ME [me]. As cost, a value obtained by multiplying the value so far by a value obtained by dividing the value of the variable coef by the constant BASE is set. In the next step SE5, ME [me]. If the value of cost is greater than the constant MAXCOST, the constant MAXCOST is set to ME [me]. Set as cost. The series of processing is finished thereafter.

上記ステップSE6では、変数samefの値が0より大きい、変数passfの値が0より大きい、或いは変数excfの値が0より大きいか否か判定する。それらの値のうち一つでも0より大きい場合、判定はYESとなってステップSE4に移行し、そうでない場合には、つまりそれらの値の全てが0より大きくない場合には、判定はNOとなってステップSE7に移行する。   In step SE6, it is determined whether the value of the variable samef is greater than 0, the value of the variable passf is greater than 0, or the value of the variable excf is greater than 0. If any of these values is greater than 0, the determination is yes and the process moves to step SE4. If not, that is, if all of these values are not greater than 0, the determination is no. Then, the process proceeds to step SE7.

ステップSE7では、変数timeintの値が示す時間間隔の判定を行う。その後は、判定結果に応じたステップの処理を実行する。
その時間間隔が501〜2000の間と判定した場合、次にステップSE4の処理に移行する。その時間間隔が241〜500の間と判定した場合には、次にステップSE8で変数coefにそれまでの値に1を加算した値を代入した後、そのステップSE4に移行する。以降、同様にして、その時間間隔が181〜240の間と判定した場合には、次にステップSE9で変数coefにそれまでの値に2を加算した値を代入した後、その時間間隔が121〜180の間と判定した場合には、次にステップSE10で変数coefにそれまでの値に3を加算した値を代入した後、その時間間隔が51〜120の間と判定した場合には、次にステップSE11で変数coefにそれまでの値に4を加算した値を代入し、更にステップSE13において、変数f、及びnfの値が共に3以上ならばME[me].costにそれまでの値に変数coefの値を加算して得られる値を設定した後、その時間間隔が11〜50の間と判定した場合には、次にステップSE12で変数coefにそれまでの値に5を加算した値を代入し、更にステップSE13の処理を実行した後、そのステップSE4に移行する。それにより、変数timeintの値が示す時間間隔に応じてコストを補正する。
In step SE7, the time interval indicated by the value of the variable timeint is determined. After that, the process of the step according to the determination result is executed.
When it is determined that the time interval is between 501 and 2000, the process proceeds to step SE4. If it is determined that the time interval is between 241 and 500, then in step SE8, a value obtained by adding 1 to the variable coef is assigned to the variable coef, and then the process proceeds to step SE4. Thereafter, similarly, when it is determined that the time interval is between 181 and 240, after substituting a value obtained by adding 2 to the variable coef in step SE9, the time interval is 121. If it is determined that the time interval is between 51 and 120, after substituting a value obtained by adding 3 to the variable coef in step SE10, the time interval is determined to be between 51 and 120. Next, in step SE11, a value obtained by adding 4 to the previous value is substituted into the variable coef. Further, in step SE13, if the values of the variables f and nf are both 3 or more, ME [me]. After setting the value obtained by adding the value of the variable coef to the previous value in cost, if it is determined that the time interval is between 11 and 50, then in step SE12 the previous value is set in the variable coef. After substituting a value obtained by adding 5 to the value and further executing the process of step SE13, the process proceeds to step SE4. Thereby, the cost is corrected according to the time interval indicated by the value of the variable timeint.

図12は、図10に示すコスト補正処理内でステップSC11として実行される多声補正処理のフローチャートである。次に図12を参照して、その多声補正処理について詳細に説明する。その補正処理は、指定音の発音開始時刻に発音中の他の音符、或いはその発音終了時刻前に発音を開始する他の音符に着目して、指定音のコスト(ME[me].cost)の補正を行う処理である。   FIG. 12 is a flowchart of the polyphonic correction process executed as step SC11 in the cost correction process shown in FIG. Next, the polyphonic correction processing will be described in detail with reference to FIG. The correction process pays attention to other notes that are sounding at the start time of the specified sound, or other notes that start sounding before the end time of the sound, and the cost of the specified sound (ME [me] .cost) It is a process which correct | amends.

先ず、ステップSN1では、変数socntに、ME[me].soの値の絶対値を代入し、変数mepolyに変数meの値を代入する。続くステップSN2では、ME[me].soの値が0より大きいか否か判定する。その値が0以下であった場合、判定はNOとなってステップSN10に移行し、そうでない場合には、判定はYESとなってステップSN3に移行する。   First, in step SN1, ME [me]. The absolute value of the so value is substituted, and the value of the variable me is substituted for the variable mepoly. In the subsequent step SN2, ME [me]. It is determined whether the value of so is greater than zero. If the value is 0 or less, the determination is no and the process proceeds to step SN10, and if not, the determination is yes and the process proceeds to step SN3.

ステップSN3では、変数socntの値が0より大きいか否か判定する。その値が0以下の場合、判定はNOとなり、ステップSN9でME[me].costとして、それまでの値に対し、ME[me].soの値に1を加算した値の絶対値で割って得られる値を設定した後、一連の処理を終了する。そうでない場合には、判定はYESとなってステップSN4に移行する。   In step SN3, it is determined whether or not the value of the variable socnt is greater than zero. If the value is less than or equal to 0, the determination is no and ME [me]. cost, ME [me]. After setting a value obtained by dividing the value of so by the absolute value of 1 added, a series of processing ends. Otherwise, the determination is yes and the process moves to step SN4.

ステップSN4では、変数mepolyにそれまでの値から1を引いた値を代入し、変数overには、ME[mepoly].timeの値にME[mepoly].gateの値を加算した値からME[me].timeの値を減算し、その減算結果(指定音の発音開始後に、変数mepolyの値で指定される音符が発音している時間)をME[me].gateの値で割って得られる値を代入する。その後に移行するステップSN5では、変数overの値が定数POLYRATIOより大きく、かつME[mepoly].timeの値がME[me].timeの値未満か否か判定する。その定数POLYRATIOは、上述したように、2つの音符の間で発音時間の重なっている期間の割合が一定以上の音符を抽出するために用意した閾値である。変数mepolyの値で指定される音符は指定音の発音開始時刻、或いはその前に発音が開始される音符である。これらのことから、その割合が一定以上の2つの音符を異なるタイミングで押鍵しなければならないような場合、判定はYESとなってステップSN6に移行し、そうでない場合には、判定はNOとなり、ステップSN5Aで、変数overが0より大きい場合に変数socntの値をデクリメントしてから上記ステップSN3に戻る。   In step SN4, a value obtained by subtracting 1 from the previous value is assigned to the variable mepoly, and ME [mep]]. The value of time is ME [mepoly]. From the value obtained by adding the gate values, ME [me]. The value of time is subtracted, and the subtraction result (the time during which the note specified by the value of the variable mepoly is sounded after the start of sounding the specified sound) is expressed as ME [me]. Substitute the value obtained by dividing by the value of gate. In step SN5 to which the process proceeds thereafter, the value of the variable over is larger than the constant POLYRATIO, and ME [memory]. The value of time is ME [me]. It is determined whether it is less than the value of time. As described above, the constant POLYRATIO is a threshold value prepared for extracting a note in which the ratio of the period in which sound generation time overlaps between two notes is equal to or greater than a certain value. The note designated by the value of the variable mepoly is the note at which the sound generation starts at or before the sound generation start time of the specified sound. For these reasons, if two notes with a certain ratio or more must be pressed at different timings, the determination is yes and the process moves to step SN6. Otherwise, the determination is no. In step SN5A, if the variable over is greater than 0, the value of the variable socnt is decremented and then the process returns to step SN3.

ステップSN6では、変数ev1に変数meの値、変数ev2に変数mepolyの値をそれぞれ代入する。続くステップSN7では、それらの値で指定される2つの音符に着目させた2音間コスト算出処理を実行する。その実行後は、ステップSN8でME[me].costとして、それまでの値に変数cost2evの値を加算した値を設定してから上記ステップSN5Aに移行する。   At step SN6, the value of variable me is substituted for variable ev1, and the value of variable meply is substituted for variable ev2. In subsequent step SN7, a cost calculation process between two sounds is executed with attention paid to two notes designated by these values. After the execution, ME [me]. As cost, a value obtained by adding the value of variable cost2ev to the previous value is set, and then the process proceeds to step SN5A.

このようにして、本実施の形態では、発音時間の重なっている期間の割合が一定以上の2つの音符を異なるタイミングで押鍵しなければならないような場合、ME[me].costを、それまでの値よりも大きい値に更新する形で補正を行うようにしている。その更新は、発音時間の重なっている音符の数分、行うことから、その数が多くなるほど、より大きい値に更新されることになる。   In this way, in the present embodiment, when it is necessary to press two notes having a ratio of periods where the sound generation times overlap each other at a certain timing, ME [me]. Cost is corrected by updating it to a value larger than the previous value. Since the update is performed for the number of notes having overlapping pronunciation times, the larger the number, the larger the value is updated.

上記ステップSN2の判定がNOとなって移行するステップSN10では、ME[me].soの値が0未満か否か判定する。その値が0未満であった場合、判定はYESとなってステップSN11に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SN10 in which the determination in step SN2 is NO and the process proceeds, ME [me]. It is determined whether the value of so is less than zero. If the value is less than 0, the determination is yes and the process proceeds to step SN11. Otherwise, the determination is no and the series of processing ends here.

上記ステップSN3〜SN8では、指定音(変数meの値で指定される音符)の発音開始時刻に発音中の他の音符を考慮して指定音のコストを補正するための処理を行うようになっている。ステップSN11〜SN16では、指定音の発音終了時刻前に発音が開始される他の音符を考慮して指定音のコストを補正するための処理が行われる。そのコストの補正を行う条件、及びその補正を行う方法等は基本的に同じであるため、詳細な説明は省略することとする。   In the above steps SN3 to SN8, processing for correcting the cost of the designated sound is performed in consideration of the other notes that are sounding at the sounding start time of the designated sound (note specified by the value of the variable me). ing. In steps SN11 to SN16, a process for correcting the cost of the designated sound is performed in consideration of other notes whose pronunciation is started before the designated sound generation end time. Since the conditions for correcting the cost, the method for correcting the cost, and the like are basically the same, detailed description will be omitted.

図13は、図10に示すコスト補正処理内でステップSC12として実行される指越え指くぐり補正処理のフローチャートである。次に図13を参照して、その補正処理について詳細に説明する。その補正処理は、指定音の押鍵に必要な、指越え、或いは指くぐりという比較的に高度な演奏方法に着目して、そのコスト(ME[me].cost)の補正を行う処理である。   FIG. 13 is a flowchart of the finger passing finger correction process executed as step SC12 in the cost correction process shown in FIG. Next, the correction process will be described in detail with reference to FIG. The correction process is a process of correcting the cost (ME [me] .cost) by paying attention to a relatively advanced performance method that is necessary for pressing a designated sound, such as finger crossing or finger penetration. .

先ず、ステップSL1では、変数passfの値が1か否か判定する。その1は、次音符の押鍵は親指の上に越えさせた親指以外の指により行わせる状況であることを意味する。このことから、指越えを行う状況である場合、判定はYESとなり、ステップSL2で変数mepassに変数meの値に1を加算した値、変数menpassに変数meの値をそれぞれ代入してからステップSL5に移行する。そうでない場合には、判定はNOとなってステップSL3に移行する。   First, in step SL1, it is determined whether or not the value of the variable passf is 1. The first means that the key of the next note is pressed by a finger other than the thumb over the thumb. From this, in the situation where the finger is passed, the determination is YES, and in step SL2, a value obtained by adding 1 to the value of the variable me in the variable mepass, and the value of the variable me in the variable mepass are respectively substituted in the step SL5. Migrate to Otherwise, the determination is no and the process moves to step SL3.

ステップSL3では、変数passfの値が2か否か判定する。その2は、次音符の押鍵は親指を他の指の下にくぐらせて行わせる状況であることを意味する。このことから、指くぐりを行う状況である場合、判定はYESとなり、ステップSL4で変数mepassに変数meの値、変数menpassに変数meの値に1を加算した値をそれぞれ代入してからステップSL5に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SL3, it is determined whether or not the value of the variable passf is 2. The second means that the key of the next note is a situation where the thumb is passed under the other finger. From this, in the situation where finger penetration is performed, the determination is YES, and in step SL4, the value of the variable me is substituted for the variable mepass, and the value obtained by adding 1 to the value of the variable me is substituted for the variable mepass. Migrate to Otherwise, the determination is no and the series of processing ends here.

ステップSL5では、指定音に至る前の演奏区間の音符の並びを考慮してコストの補正を行うための指越え指くぐり基本補正処理を実行する。次のステップSL6では、発音開始時刻の時間間隔(ステップタイム)を考慮してコストの補正を行うための、ステップタイム・跳躍進行補正処理を実行する。その後はステップSL7に移行して、ME[me].costの値が定数MAXCOSTより大きければ定数MAXCOST、その値が0未満であれば0をME[me].costとして新たに設定することにより更新する。一連の処理はその後に終了する。   In step SL5, the finger over finger penetration basic correction process for correcting the cost in consideration of the arrangement of notes in the performance section before the specified sound is executed. In the next step SL6, a step time / jump progress correction process for correcting the cost in consideration of the time interval (step time) of the sound generation start time is executed. Thereafter, the process proceeds to step SL7, where ME [me]. If the cost value is greater than the constant MAXCOST, the constant MAXCOST is set. If the value is less than 0, 0 is set to ME [me]. It is updated by newly setting as cost. The series of processing is finished thereafter.

ここで、上記ステップSL5、及びSL6として実行される各サブルーチン処理について、図14、及び図15に示す各フローチャートを参照して詳細に説明する。
図14は、上記ステップSL5として実行される指越え指くぐり基本補正処理のフローチャートである。始めに図14を参照して、その補正処理について詳細に説明する。
Here, each subroutine process executed as steps SL5 and SL6 will be described in detail with reference to the flowcharts shown in FIGS.
FIG. 14 is a flowchart of the finger passing finger basic correction process executed as step SL5. First, the correction process will be described in detail with reference to FIG.

先ず、ステップSP1では、変数fにME[mepass].figの値、変数pintに、ME[me].posxの値からME[me+1].posxの値を引いた値の絶対値をそれぞれ代入する。続くステップSP2では、変数fの値が1であり、かつ変数pintの値が5より大きいか、変数fの値が2であり、かつ変数pintの値が4より大きいか、或いは変数fの値が3であり、かつ変数pintの値が3より大きいか否か判定する。変数fの値は1であり、かつ変数pintの値は5より大きい、変数fの値は2であり、かつ変数pintの値は4より大きい、或いは変数fの値は3であり、かつ変数pintの値は3より大きい場合、判定はYESとなり、ステップSP3でME[me].costとして、それまでの値に変数pintの値を加算した値を設定してからステップSP4に移行する。そうでない場合には、判定はNOとなってそのステップSP4に移行する。ステップSP2でのYESの判定は、指定音の押鍵に使うべき指、及び指定音とその次音符間のピッチ差に着目して決定した、コストをより大きく補正すべき条件を満たしていることを意味している。   First, in step SP1, ME [mepass]. The value of fig, the variable pint, ME [me]. From the value of posx, ME [me + 1]. The absolute value of the value obtained by subtracting the value of posx is substituted. In the subsequent step SP2, the value of the variable f is 1 and the value of the variable pint is greater than 5, the value of the variable f is 2 and the value of the variable pint is greater than 4, or the value of the variable f Is 3 and whether the value of the variable pint is larger than 3 is determined. The value of the variable f is 1, and the value of the variable pint is greater than 5, the value of the variable f is 2, and the value of the variable pint is greater than 4, or the value of the variable f is 3, and the variable If the value of pint is greater than 3, the determination is yes, and ME [me]. As cost, a value obtained by adding the value of the variable pint to the previous value is set, and then the process proceeds to step SP4. Otherwise, the determination is no and the process moves to step SP4. The determination of YES in step SP2 satisfies the condition for correcting the cost more greatly, determined by paying attention to the finger to be used for pressing the designated sound and the pitch difference between the designated sound and the next note. Means.

ステップSP4では、変数metmpに変数meの値を代入する。続くステップSP5では、変数metmpの値が0、またはME[metmp].tendの値が0か否か判定する。変数metmpの値が0、またはME[metmp].tendの値が0である(変数metmpの値で指定される音符が極点に位置している)場合、判定はYESとなってステップSP7に移行する。そうでない場合には、判定はNOとなり、ステップSP6で変数metmpの値をデクリメントしてから再度ステップSP5に戻る。それにより、先頭に位置する音符、或いは指定音の直前に位置する極点に相当する音符を探す。   In step SP4, the value of the variable me is substituted for the variable metmp. In the subsequent step SP5, the value of the variable metmp is 0, or ME [metmp]. It is determined whether the value of tend is 0. The value of the variable metmp is 0, or ME [metmp]. If the value of tend is 0 (the note specified by the value of variable metmp is located at the extreme point), the determination is yes and the process moves to step SP7. Otherwise, the determination is no, the value of the variable metmp is decremented in step SP6, and the process returns to step SP5 again. Thereby, a note corresponding to the note located at the head or the pole located immediately before the designated sound is searched.

ステップSP7では、ME[metmp].tendstepの値が5より大きいか否か判定する。その値が5より大きい場合、判定はYESとなってステップSP9に移行する。そうでない場合には、判定はNOとなり、ステップSP8でME[me].costとして、ME[mepass].tendstepの値とME[metmp].tendstepの値からME[mepass].tendstepの値を引いた減算値の小さい方をそれまでの値に加算して得られる値を設定した後、一連の処理を終了する。それにより、指定音の前後に位置する極点間のピッチ変化数が比較的に短い場合には、変数mepassの値で指定される音符を基準にして、その音符の前後に位置する極点までのピッチ変化数のなかで小さい方をコストの補正分として扱っている。   In step SP7, ME [metmp]. It is determined whether the value of tendstep is greater than 5. If the value is greater than 5, the determination is yes and the process moves to step SP9. Otherwise, the determination is no and ME [me]. cost, ME [mepass]. The value of tendstep and ME [metmp]. From the value of tendstep, ME [mepass]. After a value obtained by adding the smaller subtraction value obtained by subtracting the value of tendstep to the previous value is set, a series of processing ends. As a result, when the number of pitch changes between the extreme points located before and after the specified sound is relatively short, the pitch to the extreme points located before and after the note is specified based on the note specified by the value of the variable mepass. The smaller of the number of changes is treated as a cost correction.

ステップSP9では、ME[menpass].posxの値を2で割った余りが1か否か判定する。変数menpassの値で指定される音符のピッチが黒鍵に割り当てられるピッチであった場合、判定はYESとなり、ステップSP10でME[me].costとして、それまでの値に8を加算した値を設定した後、一連の処理を終了する。それにより、上を越させる指、或いはくぐらせる指で押鍵させるのが黒鍵であればコストの補正分として8を追加させる。そうでない場合には、判定はNOとなってステップSP11に移行する。   In step SP9, ME [menpass]. It is determined whether the remainder of dividing the value of posx by 2 is 1. If the pitch of the note specified by the value of the variable menpass is the pitch assigned to the black key, the determination is YES, and ME [me]. As cost, a value obtained by adding 8 to the previous value is set, and then a series of processing ends. As a result, if the key to be pressed with a finger that moves above or passes with a black key is a black key, 8 is added as a cost correction amount. Otherwise, the determination is no and the process moves to step SP11.

ステップSP11では、変数fの値を判定する。その値は1と判定すると、ステップSP12に移行して、それまでの値に4を加算した値をME[me].costとして新たに設定した後、一連の処理を終了する。同様に、その値は2と判定すると、ステップSP13に移行して、それまでの値に3を加算した値をME[me].costとして新たに設定した後、その値は3と判定すると、ステップSP14に移行して、それまでの値に5を加算した値をME[me].costとして新たに設定した後、一連の処理を終了する。その値は4と判定したときには、コストの補正を行うことなく、ここで一連の処理を終了する。このようにして、上を越させる指、或いは下をくぐらせる指の種類に応じた加算分をそれまでのコストに加算させる。   In step SP11, the value of the variable f is determined. If the value is determined to be 1, the process proceeds to step SP12, and the value obtained by adding 4 to the previous value is set to ME [me]. After newly setting as “cost”, the series of processing ends. Similarly, when it is determined that the value is 2, the process proceeds to step SP13, and the value obtained by adding 3 to the previous value is set to ME [me]. After newly setting as cost, if it is determined that the value is 3, the process proceeds to step SP14, and the value obtained by adding 5 to the previous value is ME [me]. After newly setting as “cost”, the series of processing ends. When it is determined that the value is 4, the series of processing ends here without correcting the cost. In this way, an addition corresponding to the type of finger that passes above or passes through the bottom is added to the previous cost.

次に、図13に示す指越え指くぐり補正処理内でステップSL6として実行されるステップタイム・跳躍進行補正処理について、図15に示すそのフローチャートを参照して詳細に説明する。その補正処理では、発音開始時刻の時間間隔(ステップタイム)の他に、ピッチ変化(跳躍進行)を考慮してコストの補正を行うようになっている。   Next, the step time / jump progress correction processing executed as step SL6 in the finger crossing finger penetration correction processing shown in FIG. 13 will be described in detail with reference to the flowchart shown in FIG. In the correction process, the cost is corrected in consideration of the pitch change (jumping progress) in addition to the time interval (step time) of the sound generation start time.

先ず、ステップSQ1では、変数stにME[me+1].timeの値からME[me].timeの値を引いた値、変数stave、same、及びcntに0、変数mepc、及びmencに変数meの値をそれぞれ代入する。続くステップSQ2では、変数mepcの値が0、またはME[mepc].tendの値が0か否か判定する。変数mepcの値で指定される音符が曲の先頭に位置する音符、または極点に位置する音符であった場合、判定はYESとなってステップSQ4に移行する。そうでない場合には、判定はNOとなってステップSQ3に移行し、変数tmpstにはME[mepc].timeの値からME[mepc−1].timeの値を引いた値、変数staveにはそれまでの値に変数tmpstの値を加算した値、変数sameには変数tmpstの値が変数stの値と等しければそれまでの値をインクリメントした値、変数cntにはそれまでの値をインクリメントした値、変数mepcにはそれまでの値をデクリメントした値、をそれぞれ代入してからそのステップSQ2に戻る。それにより、指定音の前に存在する、曲の先頭に位置する音符、または直前の極点に位置する音符までの区間内に存在する音符間の発音開始時刻の時間間隔を累算した累算時間は変数staveにより、その時間間隔が指定音とその次音符間のそれと等しい音符数は変数sameにより、総音符数は変数cntによりカウントされる。   First, in step SQ1, ME [me + 1]. From the value of time, ME [me]. The value obtained by subtracting the value of time, 0 to the variables stave, same, and cnt, and the value of the variable me to the variables mepc and menc, respectively. In the subsequent step SQ2, the value of the variable mepc is 0, or ME [mepc]. It is determined whether the value of tend is 0. If the note specified by the value of the variable mepc is a note located at the beginning of the song or a note located at the extreme point, the determination is yes and the process moves to step SQ4. Otherwise, the determination is no and the process proceeds to step SQ3, and ME [mepc]. From the value of time, ME [mepc-1]. The value obtained by subtracting the value of time, the value obtained by adding the value of the variable tmpst to the previous value for the variable stave, and the value obtained by incrementing the previous value if the value of the variable tmpst is equal to the value of the variable st Then, a value obtained by incrementing the previous value is assigned to the variable cnt, and a value obtained by decrementing the previous value is assigned to the variable mepc, and the process returns to step SQ2. As a result, an accumulated time that accumulates the time interval of the sounding start time between notes existing before the specified sound and within the interval from the note located at the beginning of the song to the note located at the immediately preceding extreme point Is counted by the variable stave, the number of notes whose time interval is equal to that between the designated note and the next note is counted by the variable same, and the total number of notes is counted by the variable cnt.

ステップSQ4では、変数mencの値が変数ev_maxの値と等しいか、またはME[menc].tendの値が0か否か判定する。変数mencの値で指定される音符が曲の末端に位置する音符、または極点に位置する音符であった場合、判定はYESとなってステップSQ6に移行する。そうでない場合には、判定はNOとなってステップSQ5に移行し、変数tmpstにはME[menc+1].timeの値からME[menc].timeの値を引いた値、変数staveにはそれまでの値に変数tmpstの値を加算した値、変数sameには変数tmpstの値が変数stの値と等しければそれまでの値をインクリメントした値、変数cntにはそれまでの値をインクリメントした値、変数mencにはそれまでの値をインクリメントした値、をそれぞれ代入してからそのステップSQ4に戻る。それにより、そのステップSQ4の判定がYESとなった時点では、変数mepc、及びmencの各値で指定される音符の間を対象区間として、その対象区間内に存在する音符間の発音開始時刻の時間間隔を累算した累算時間は変数staveに、その時間間隔が指定音とその次音符間のそれと等しい音符数は変数sameに、総音符数は変数cntにそれぞれ代入されることになる。   In step SQ4, the value of the variable menc is equal to the value of the variable ev_max or ME [menc]. It is determined whether the value of tend is 0. If the note specified by the value of the variable menc is a note located at the end of the song or a note located at the extreme point, the determination is yes and the process moves to step SQ6. Otherwise, the determination is no and the process proceeds to step SQ5, and ME [menc + 1]. From the value of time, ME [menc]. A value obtained by subtracting the value of time, a value obtained by adding the value of the variable tmpst to the previous value for the variable stave, and a value obtained by incrementing the previous value if the value of the variable tmpst is equal to the value of the variable st Then, a value obtained by incrementing the previous value is assigned to the variable cnt, and a value obtained by incrementing the previous value is assigned to the variable menc, and the process returns to step SQ4. Thereby, when the determination in step SQ4 is YES, the interval between the notes specified by the values of the variables mepc and menc is set as the target section, and the sounding start time between the notes existing in the target section is set. The accumulated time obtained by accumulating the time interval is assigned to the variable stave, the number of notes whose time interval is equal to that between the designated note and the next note is assigned to the variable same, and the total number of notes is assigned to the variable cnt.

ステップSQ6では、変数cntの値が0でなければそれまでの値を変数cntの値で割った値(音符間の発音開始時刻の時間間隔を平均した時間間隔)を変数staveに新たに代入する。次のステップSQ7では、変数stの値が変数staveの値未満であり、かつ変数sameの値が5未満か否か判定する。指定音とその次音符間の発音開始時刻の時間間隔が平均の時間間隔より短く、かつその次音符との時間間隔と一致する音符が比較的に少ないような場合、判定はYESとなり、ステップSQ8でそれまでの値に5を加算した値をME[me].costとして設定した値、ステップSQ9に移行する。そうでない場合には、つまり指定音とその次音符間の発音開始時刻の時間間隔が平均の時間間隔以上か、或いはその次音符との時間間隔と一致する音符が比較的に多いような場合には、判定はNOとなり、コストの補正は行う必要がないとして、そのステップSQ9に移行する。以降、隣り合う音符間の発音開始時刻の時間間隔は、前に位置する音符に着目して、例えば「指定音の時間間隔」といったように表現することとする。   In step SQ6, if the value of the variable cnt is not 0, a value obtained by dividing the previous value by the value of the variable cnt (a time interval obtained by averaging the time intervals of the pronunciation start times between notes) is newly assigned to the variable stave. . In the next step SQ7, it is determined whether or not the value of the variable st is less than the value of the variable stave and the value of the variable same is less than 5. If the time interval of the sounding start time between the specified sound and the next note is shorter than the average time interval and there are relatively few notes that coincide with the time interval with the next note, the determination is YES and step SQ8. The value obtained by adding 5 to the previous value is ME [me]. The value set as cost, the process proceeds to step SQ9. If this is not the case, that is, if the time interval between the specified note and the next note is greater than the average time interval, or there are relatively many notes that match the time interval with the next note. Since the determination is NO and it is not necessary to correct the cost, the process proceeds to step SQ9. Hereinafter, the time interval of the sound generation start time between adjacent notes will be expressed as, for example, “specified sound time interval”, focusing on the previous note.

ステップSQ9では、ME[menc].posxの値からME[mepc].posxの値を引いた値の絶対値が20以上であり、かつME[mepc].tendstepの値が8未満か否か判定する。変数mepc、及びmencの各値で指定される音符の間の区間内で1オクターブ以上、進行し、かつピッチ変化数が少ない(跳躍進行)場合、判定はYESとなってステップSQ10に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SQ9, ME [menc]. From the value of posx, ME [mepc]. The absolute value of the value obtained by subtracting the value of posx is 20 or more, and ME [mepc]. It is determined whether the value of tendstep is less than 8. If it proceeds more than one octave within the interval between the notes specified by the values of the variables mepc and menc, and the number of pitch changes is small (jumping progress), the determination is yes and the process proceeds to step SQ10. Otherwise, the determination is no and the series of processing ends here.

ステップSQ10では、ME[me].posxの値からME[mepc].posxの値を引いた値の絶対値の判定を行う。その値が14未満と判定すると、ステップSQ11に移行して、それまでの値に5を加算した値をME[me].costとして設定した後、一連の処理を終了する。その値が14と判定すると、ステップSQ12に移行して、それまでの値から5を引いた値をME[me].costとして設定した後、一連の処理を終了する。その値が14より大きいと判定したときには、ここで一連の処理を終了する。ステップSQ12でコストをそれまでより減少させるようにしているのは、1オクターブのピッチ変化がフレーズの境界となる場合が多いからである。   In step SQ10, ME [me]. From the value of posx, ME [mepc]. The absolute value of the value obtained by subtracting the value of posx is determined. If it is determined that the value is less than 14, the process proceeds to step SQ11, and a value obtained by adding 5 to the previous value is set to ME [me]. After setting as “cost”, the series of processing ends. If the value is determined to be 14, the process proceeds to step SQ12, and the value obtained by subtracting 5 from the previous value is ME [me]. After setting as “cost”, the series of processing ends. If it is determined that the value is greater than 14, a series of processing ends here. The reason why the cost is further reduced in step SQ12 is that a pitch change of one octave often becomes a boundary of phrases.

図10に示すコスト補正処理内で実行されるサブルーチン処理の説明に戻る。
図16は、ステップSC13として実行される和音対分散和音補正処理のフローチャートである。次にその補正処理について、図16を参照して詳細に説明する。その補正処理は、和音とそれに続く分散和音間の相互関係に着目して、コストの補正を行うための処理である。
Returning to the description of the subroutine processing executed in the cost correction processing shown in FIG.
FIG. 16 is a flowchart of the chord versus distributed chord correction process executed as step SC13. Next, the correction process will be described in detail with reference to FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between the chord and the subsequent distributed chord.

先ず、ステップSJ1では、ME[me].hmnyの値が1より大きいか否か判定する。変数meの値で指定される音符が和音の先頭に位置しない構成音であった場合、その値は1より大きい値であることから、判定はYESとなってステップSJ2に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SJ1, ME [me]. It is determined whether the value of hmny is greater than 1. If the note specified by the value of the variable me is a constituent sound that is not located at the beginning of the chord, the value is greater than 1, so the determination is yes and the process moves to step SJ2. Otherwise, the determination is no and the series of processing ends here.

ステップSJ2では、変数ev1に変数meの値、変数ev2にME[me].nhtopの値(次の音符群の先頭に位置する音符を指定するインデックス値)をそれぞれ代入する。続くステップSJ3では、変数ev2の値が−1でないか否か判定する。指定音が属する音符群に続く音符群が存在しない場合、ME[me].nhtopの値として−1が設定されていることから、判定はNOとなり、ここで一連の処理を終了する。そうでない場合には、判定はYESとなってステップSJ4に移行する。   In step SJ2, the value of variable me is set in variable ev1, and ME [me]. The value of nhtop (index value specifying the note located at the head of the next note group) is substituted. In a succeeding step SJ3, it is determined whether or not the value of the variable ev2 is not -1. If there is no note group following the note group to which the specified note belongs, ME [me]. Since -1 is set as the value of nhtop, the determination is no, and the series of processing ends here. Otherwise, the determination is yes and the process moves to step SJ4.

ステップSJ4では、それまでの値にME[ev1].hmnyの値を加算した値から1を引いた値を変数ev2に代入する。そのようにして、分散和音が続くという想定の下で、変数meの値で指定される音符の和音の先頭からの順番と同じ順番となっているその分散和音の構成音を指定する値を変数ev2に代入した後、ステップSJ5に移行して、変数ev2の値が変数ev_maxの値以下であり、かつME[ev2].arpの値が0でないか否か判定する。変数ev2の値で指定される音符が分散和音の構成音であった場合、判定はYESとなり、ステップSJ6で図8に示す2音間コスト算出処理を実行し、更にステップSJ7でそれまでの値に変数cost2evの値を加算した値を2で割って得られる値(=(ME[me].cost+cost2ev)/2)をME[me].costとして新たに設定した後、一連の処理を終了する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SJ4, ME [ev1]. A value obtained by subtracting 1 from the value obtained by adding the value of hmny is substituted into the variable ev2. As such, under the assumption that the distributed chord will continue, the value specifying the constituent sound of the distributed chord that is in the same order as the order from the beginning of the chord of the note specified by the value of the variable me After substituting for ev2, the process proceeds to step SJ5, where the value of variable ev2 is less than or equal to the value of variable ev_max, and ME [ev2]. It is determined whether or not the value of arp is not zero. If the note specified by the value of the variable ev2 is a constituent sound of a distributed chord, the determination is YES, the cost calculation process between two sounds shown in FIG. 8 is executed in step SJ6, and the value up to that point is further determined in step SJ7. Is obtained by dividing the value obtained by adding the value of the variable cost2ev to 2 (= (ME [me] .cost + cost2ev) / 2) ME [me]. After newly setting as “cost”, the series of processing ends. Otherwise, the determination is no and the series of processing ends here.

図17は、図10に示すコスト補正処理内でステップSC14として実行される分散和音対分散和音補正処理のフローチャートである。次にその補正処理について、図17を参照して詳細に説明する。その補正処理は、分散和音とそれに続く分散和音間の相互関係に着目して、コストの補正を行うための処理である。   FIG. 17 is a flowchart of the distributed chord to distributed chord correction process executed as step SC14 in the cost correction process shown in FIG. Next, the correction process will be described in detail with reference to FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between the distributed chord and the subsequent distributed chord.

先ず、ステップSK1では、ME[me].arpの値が0でないか否か判定する。変数meの値で指定される音符が分散和音の構成音であった場合、その値は0でない値であることから、判定はYESとなってステップSK2に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SK1, ME [me]. It is determined whether or not the value of arp is not zero. If the note specified by the value of the variable me is a constituent sound of a distributed chord, the value is a non-zero value, so the determination is yes and the process moves to step SK2. Otherwise, the determination is no and the series of processing ends here.

ステップSK2では、変数ev1に変数meの値、変数ev2にME[me].nhtopの値をそれぞれ代入する。続くステップSK3では、変数ev2の値が−1でないか否か判定する。指定音が属する音符群に続く音符群が存在しない場合、ME[me].nhtopの値として−1が設定されていることから、判定はNOとなり、ここで一連の処理を終了する。そうでない場合には、判定はYESとなってステップSK4に移行する。   In step SK2, the value of variable me is set in variable ev1, and ME [me]. Substitute the value of nhtop respectively. In a succeeding step SK3, it is determined whether or not the value of the variable ev2 is not -1. If there is no note group following the note group to which the specified note belongs, ME [me]. Since -1 is set as the value of nhtop, the determination is no, and the series of processing ends here. Otherwise, the determination is yes and the process moves to step SK4.

ステップSK4では、それまでの値にME[ev1].arpの値を加算した値から1を引いた値を変数ev2に代入する。そのようにして、分散和音が続くという想定の下で、変数meの値で指定される音符の分散和音の先頭からの順番と同じ順番となっているその分散和音の構成音を指定する値を変数ev2に代入した後、ステップSK5に移行して、変数ev2の値が変数ev_maxの値以下であり、かつME[ev2].arpの値が0でないか否か判定する。変数ev2の値で指定される音符が分散和音の構成音であった場合、判定はYESとなり、ステップSK6で図8に示す2音間コスト算出処理を実行し、更にステップSK7でそれまでの値に変数cost2evの値を加算した値を2で割って得られる値(=(ME[me].cost+cost2ev)/2)をME[me].costとして新たに設定した後、一連の処理を終了する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SK4, ME [ev1]. A value obtained by subtracting 1 from the value obtained by adding the values of arp is substituted into the variable ev2. As such, under the assumption that the distributed chord continues, a value that specifies the constituent sound of the distributed chord that is in the same order as the order from the beginning of the distributed chord of the note specified by the value of the variable me. After substituting for the variable ev2, the process proceeds to step SK5, where the value of the variable ev2 is less than or equal to the value of the variable ev_max and ME [ev2]. It is determined whether or not the value of arp is not zero. If the note specified by the value of the variable ev2 is a constituent sound of a distributed chord, the determination is YES, the cost calculation process between two sounds shown in FIG. 8 is executed in step SK6, and the value up to that point in step SK7. Is obtained by dividing the value obtained by adding the value of the variable cost2ev to 2 (= (ME [me] .cost + cost2ev) / 2) ME [me]. After newly setting as “cost”, the series of processing ends. Otherwise, the determination is no and the series of processing ends here.

図18は、図10に示すコスト補正処理内でステップSC15として実行される単音対和音補正処理のフローチャートである。次に図18を参照して、その補正処理について詳細に説明する。その補正処理は、単音とそれに続く和音間の相互関係に着目して、コストの補正を行うための処理である。   FIG. 18 is a flowchart of the single-tone chord correction process executed as step SC15 in the cost correction process shown in FIG. Next, the correction process will be described in detail with reference to FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between a single tone and the following chord.

先ず、ステップSM1では、ME[me].hmnyの値が0であり、かつME[me].arpの値が0か否か判定する。変数meの値で指定される音符(指定音)が和音や分散和音の音符群に属さない単音である場合、判定はYESとなってステップSM2に移行する。そうでない場合には、つまり指定音が単音でない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SM1, ME [me]. hmny has a value of 0 and ME [me]. It is determined whether or not the value of arp is 0. If the note (designated note) designated by the value of the variable me is a single note that does not belong to the chord group or the distributed chord note group, the determination is yes and the process proceeds to step SM2. If not, that is, if the designated sound is not a single note, the determination is no, and the series of processing ends here.

ステップSM2では、変数ev1に変数meの値、変数ev2にME[me].nhtopの値をそれぞれ代入する。続くステップSM3では、変数ev2の値が−1でなく、かつME[ev2].hmnyの値が0でないか否か判定する。指定音に続く音符群が存在し、かつ続く音符群が和音の音符群であった場合、判定はYESとなってステップSM4に移行する。そうでない場合には、つまり指定音に続く音符群が存在しないか、または続く音符群が和音の音符群でない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SM2, the value of variable me is set in variable ev1, and ME [me]. Substitute the value of nhtop respectively. In the subsequent step SM3, the value of the variable ev2 is not -1, and ME [ev2]. It is determined whether the value of hmny is not zero. If there is a note group following the specified sound and the subsequent note group is a chord note group, the determination is yes and the process moves to step SM4. If not, that is, if there is no note group following the specified sound, or if the subsequent note group is not a chord note group, the determination is no, and the series of processing ends here.

ステップSM4では、図8に示す2音間コスト算出処理を実行する。続くステップSM5では、ME[me].costとして、それまでの値に変数cost2evの値を加算した値を設定し、変数ev2の値をインクリメントする。その後に移行するステップSM6では、変数ev2の値が、ME[me].nhtailの値より大きいか否か判定する。指定音と続く和音の音符群を構成する全ての音符間との間でコストの算出が終了した場合、その関係が満たされることから、判定はYESとなってステップSM7に移行し、ME[me].costとして、ME[me].nhtailの値からME[me].nhtopの値を引いた値に2を加算した値でそれまでの値を割って得られる値(=ME[me].cost/(ME[me].nhtail−ME[me].nhtop+2))を新たに設定した後、一連の処理を終了する。そうでない場合には、判定はNOとなって上記ステップSM4に戻る。それにより、和音の音符群を構成する全ての音符間との間でコストの算出が終了するまで、ステップSM4〜SM6で形成される処理ループを繰り返し実行する。   In step SM4, a cost calculation process between two sounds shown in FIG. 8 is executed. In the following step SM5, ME [me]. As cost, a value obtained by adding the value of variable cost2ev to the previous value is set, and the value of variable ev2 is incremented. In step SM6 which moves to after that, the value of the variable ev2 is ME [me]. It is determined whether it is larger than the value of nhtail. When the calculation of the cost is completed between the specified note and all the notes constituting the subsequent chord note group, the relationship is satisfied, so the determination is YES and the process proceeds to step SM7 and ME [me ]. cost, ME [me]. From the value of nhtail, ME [me]. The value obtained by dividing the previous value by the value obtained by adding 2 to the value obtained by subtracting the value of nhtop (= ME [me] .cost / (ME [me] .nhtail-ME [me] .nhtop + 2)) After a new setting, the series of processing is terminated. Otherwise, the determination is no and the process returns to step SM4. Thereby, the process loop formed by steps SM4 to SM6 is repeatedly executed until the calculation of the cost is completed between all the notes constituting the chord note group.

次に、図10に示すコスト補正処理内でステップSC16として実行される和音対単音補正処理について、図19に示すそのフローチャートを参照して詳細に説明する。その補正処理は、和音とそれに続く単音の音符群間の相互関係に着目して、コストの補正を行うための処理である。   Next, the chord to single tone correction process executed as step SC16 in the cost correction process shown in FIG. 10 will be described in detail with reference to the flowchart shown in FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between the chord and the subsequent note group.

先ず、ステップSH1では、ME[me].hmnyの値が1か否か判定する。変数meの値で指定される音符が和音の先頭に位置する構成音であった場合、その値は1であることから、判定はYESとなってステップSH2に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SH1, ME [me]. It is determined whether the value of hmny is 1. If the note specified by the value of the variable me is a constituent sound located at the beginning of the chord, the value is 1, so the determination is yes and the process moves to step SH2. Otherwise, the determination is no and the series of processing ends here.

ステップSH2では、変数ev1に変数meの値、変数ev2にME[me].nhtopの値をそれぞれ代入する。続くステップSH3では、変数ev2の値が−1でなく、ME[ev2].hmnyの値が0であり、かつME[ev2].arpの値が0か否か判定する。指定音が属する音符群に続く単音が存在する場合、判定はYESとなってステップSH4に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SH2, the value of the variable me is set in the variable ev1, and ME [me]. Substitute the value of nhtop respectively. In the subsequent step SH3, the value of the variable ev2 is not -1, but ME [ev2]. hmny has a value of 0 and ME [ev2]. It is determined whether or not the value of arp is 0. If there is a single note following the note group to which the designated sound belongs, the determination is yes and the process moves to step SH4. Otherwise, the determination is no and the series of processing ends here.

ステップSH4では、ME[ev1].posxの値はME[ev2].posxの値より大きいか否か判定する。和音に続く単音のピッチが和音の先頭に位置する構成音のピッチ(最小ピッチ)より低い場合、判定はYESとなり、ステップSH5で図8に示す2音間コスト算出処理を実行し、更にステップSH6でそれまでの値に変数cost2evの値を加算した値を2で割って得られる値(=(ME[me].cost+cost2ev)/2)をME[me].costとして新たに設定した後、一連の処理を終了する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   In step SH4, ME [ev1]. The value of posx is ME [ev2]. It is determined whether or not the value is greater than the value of posx. If the pitch of the single tone following the chord is lower than the pitch (minimum pitch) of the constituent sound located at the head of the chord, the determination is YES, the cost calculation process between two sounds shown in FIG. 8 is executed in step SH5, and further, step SH6 is executed. Then, the value obtained by adding the value of the variable cost2ev to the previous value divided by 2 (= (ME [me] .cost + cost2ev) / 2) is obtained as ME [me]. After newly setting as “cost”, the series of processing ends. Otherwise, the determination is no and the series of processing ends here.

図20は、図10に示すコスト補正処理内でステップSC17として実行される和音対和音補正処理のフローチャートである。次に図20に示すフローチャートを参照して、その補正処理について詳細に説明する。その補正処理は、和音とそれに続く和音間の相互関係に着目して、コストの補正を行うための処理である。   FIG. 20 is a flowchart of the chord to chord correction process executed as step SC17 in the cost correction process shown in FIG. Next, the correction process will be described in detail with reference to the flowchart shown in FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between a chord and the following chord.

先ず、ステップSF1では、ME[me].hmnyの値が0でないか否か判定する。変数meの値で指定される音符が和音の構成音であった場合、その値は0でないことから、判定はYESとなってステップSF2に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SF1, ME [me]. It is determined whether the value of hmny is not zero. If the note specified by the value of the variable me is a chord component, the value is not 0, so the determination is yes and the process moves to step SF2. Otherwise, the determination is no and the series of processing ends here.

ステップSF2では、変数menearに、ME[me].nhtopの値を代入する。続くステップSF3では、変数menearの値が−1でなく、かつME[menear].hmnyの値が0でないか否か判定する。和音以外の音符群が続く場合、判定はNOとなり、ここで一連の処理を終了する。そうでない場合には、判定はYESとなり、ステップSF4でME[menear].posxの値からME[me].posxの値を引いた値の絶対値を変数piに代入し、変数menearの値に1を加算した値を変数metmpに代入した後、ステップSF5に移行する。   In step SF2, ME [me]. Substitute the value of nhtop. In the following step SF3, the value of the variable mean is not -1, and ME [menear]. It is determined whether the value of hmny is not zero. If a note group other than chords continues, the determination is no, and the series of processing ends here. Otherwise, the determination is yes, and ME [menear]. From the value of posx, ME [me]. The absolute value of the value obtained by subtracting the value of posx is substituted into the variable pi, and the value obtained by adding 1 to the value of the variable menear is substituted into the variable metmp. Then, the process proceeds to step SF5.

本実施の形態では、続く和音の構成音のなかでピッチが指定音と最も近い構成音とその指定音の間でコストの算出を行うようにしている。ステップSF5〜SF9では、指定音とピッチが最も近い構成音を特定するための処理が行われる。   In the present embodiment, the cost is calculated between a constituent sound whose pitch is closest to the designated sound among the constituent sounds of the following chords and the designated sound. In steps SF5 to SF9, processing for specifying a constituent sound having the closest pitch to the designated sound is performed.

先ず、ステップSF5では、変数pitmpに、ME[metmp].posxの値からME[me].posxの値を引いた値の絶対値を代入する。次のステップSF6では、変数piの値が変数pitmpの値より大きいか否か判定する。変数piの値が変数pitmpの値より大きい場合、判定はYESとなり、ステップSF7で変数piに変数pitmpの値、変数menearに変数metmpの値をそれぞれ代入し、更にステップSF8で変数metmpの値をインクリメントした後、ステップSF9に移行する。そうでない場合には、判定はNOとなり、次にステップSF8の処理を実行する。   First, in step SF5, ME [metmp]. From the value of posx, ME [me]. The absolute value of the value obtained by subtracting the value of posx is substituted. In the next step SF6, it is determined whether or not the value of the variable pi is larger than the value of the variable pitmp. If the value of the variable pi is greater than the value of the variable pitmp, the determination is YES, and in step SF7, the value of the variable pitmp is substituted for the variable pi, the value of the variable metmp is substituted for the variable mean, and the value of the variable metmp is further substituted in step SF8. After incrementing, the process proceeds to step SF9. Otherwise, the determination is no and next, the process of step SF8 is executed.

ステップSF9では、変数metmpの値がME[me].nhtailの値より大きいか否か判定する。変数metmpの値がME[me].nhtailの値より大きい場合、判定はYESとなってステップSF10に移行する。そうでない場合には、判定はNOとなって上記ステップSF5に戻る。   In step SF9, the value of the variable metmp is ME [me]. It is determined whether it is larger than the value of nhtail. The value of variable metmp is ME [me]. If it is greater than the value of nhtail, the determination is yes and the process moves to step SF10. Otherwise, the determination is no and the process returns to step SF5.

ステップSF10では、変数ev1に変数meの値、変数ev2に変数menearの値をそれぞれ代入する。続くステップSF11では、図8に示す2音間コスト算出処理を実行する。その次に移行するステップSF12では、ME[me].costとして、それまでの値に変数cost2evの値を加算した値を2で割って得られる値(=(ME[me].cost+cost2ev)/2)を新たに設定する。一連の処理はその後に終了する。   In step SF10, the value of the variable me is substituted for the variable ev1, and the value of the variable minor is substituted for the variable ev2. In the following step SF11, the cost calculation process between two sounds shown in FIG. 8 is executed. In the next step SF12 to be transferred, ME [me]. As cost, a value (= (ME [me] .cost + cost2ev) / 2) obtained by dividing the value obtained by adding the value of the variable cost2ev to the previous value by 2 is newly set. The series of processing is finished thereafter.

図21は、図10に示すコスト補正処理内でステップSC18として実行される前方和音補正処理のフローチャートである。最後に図21に示すフローチャートを参照して、その補正処理について詳細に説明する。その補正処理は、和音とその直前に位置する和音間の相互関係に着目して、コストの補正を行うための処理である。   FIG. 21 is a flowchart of the forward chord correction process executed as step SC18 in the cost correction process shown in FIG. Finally, the correction process will be described in detail with reference to the flowchart shown in FIG. The correction process is a process for correcting the cost by paying attention to the mutual relationship between the chord and the chord located immediately before the chord.

先ず、ステップSR1では、ME[me].hmnyの値が0でないか否か判定する。変数meの値で指定される音符が和音の構成音であった場合、その値は0でないことから、判定はYESとなり、ステップSH2で変数menearに、ME[me].phtopの値を代入した後、ステップSR3に移行する。そうでない場合には、判定はNOとなり、ここで一連の処理を終了する。   First, in step SR1, ME [me]. It is determined whether the value of hmny is not zero. If the note specified by the value of the variable me is a chord component, the value is not 0, so the determination is YES, and in step SH2, the variable mean is set to ME [me]. After substituting the value of phtop, the process proceeds to step SR3. Otherwise, the determination is no and the series of processing ends here.

ステップSR3〜SR12で実行される処理、及びその流れは、上記和音対和音補正処理におけるステップSF3〜SF12のそれらと基本的に同じである。このことから、ステップSR3〜SR12の処理の説明は省略する。   The processing executed in steps SR3 to SR12 and the flow thereof are basically the same as those in steps SF3 to SF12 in the chord pair chord correction processing. For this reason, the description of the processing of steps SR3 to SR12 is omitted.

なお、本実施の形態では、図4に示すステップSB1(逐次生成処理)で生成した運指情報を参照した最終的なコストの算出は、ステップSB6(指定音コスト算出処理)でのコストの算出、続くステップSB7(コスト補正処理)でのコストの補正により2段階で行うようにしているが、1段階でその算出を行うようにしても良い。コストの補正を行ううえで着目する内容については本実施の形態に限定されるものではない。   In the present embodiment, the final cost calculation with reference to the fingering information generated in step SB1 (sequential generation processing) shown in FIG. 4 is performed in step SB6 (designated sound cost calculation processing). The calculation is performed in two stages by correcting the cost in the subsequent step SB7 (cost correction process), but the calculation may be performed in one stage. The content to be focused on when correcting the cost is not limited to the present embodiment.

生成した運指情報が示す運指のなかで修正の対象とする運指は、禁止事項に該当しておらず、かつ最終的に算出したコストが定数THRCOSTより大きいものとしているが、禁止事項に該当しているか否かに係わらずに修正を行うようにしても良い。或いは、禁止事項に該当していない運指を全て修正の対象とさせても良い。このようなことを含め、様々な変形を行うことができる。   The fingering to be corrected in the fingering indicated by the generated fingering information is not a prohibited item, and the finally calculated cost is assumed to be larger than the constant THRCOST. You may make it correct regardless of whether it corresponds. Or you may make all the fingerings which do not correspond to a prohibition matter be the object of correction. Various modifications including this can be made.

上述したような運指情報生成装置を実現させるようなプログラムは、CD−ROM、DVD、或いは着脱自在なフラッシュメモリ等の記録媒体に記録させて配布しても良い。公衆網等の通信ネットワークを介して、そのプログラムの一部、若しくは全部を配信するようにしても良い。そのようにした場合には、ユーザーはプログラムを取得してデータ処理装置にロードすることにより、その装置に本発明を適用させることができる。このことから、記録媒体は、プログラムを配信する装置がアクセスできるものであっても良い。   A program for realizing the fingering information generation apparatus as described above may be distributed by being recorded on a recording medium such as a CD-ROM, a DVD, or a removable flash memory. Part or all of the program may be distributed via a communication network such as a public network. In such a case, the user can apply the present invention to the device by acquiring the program and loading it into the data processing device. Therefore, the recording medium may be accessible by a device that distributes the program.

本実施の形態による運指情報生成装置を搭載した電子楽器の構成を説明する図である。It is a figure explaining the structure of the electronic musical instrument carrying the fingering information generation apparatus by this Embodiment. 電子楽器のRAMに格納される演奏データの構成を説明する図である。It is a figure explaining the structure of the performance data stored in RAM of an electronic musical instrument. 全体処理のフローチャートである。It is a flowchart of the whole process. 運指生成処理のフローチャートである。It is a flowchart of a fingering production | generation process. 禁止事項検索処理のフローチャートである。It is a flowchart of a prohibition matter search process. 禁止事項検索処理のフローチャートである(続き)。It is a flowchart of a prohibition matter search process (continuation). 指定音コスト算出処理のフローチャートである。It is a flowchart of a designated sound cost calculation process. 2音間コスト算出処理のフローチャートである。It is a flowchart of a cost calculation process between two sounds. 電子楽器のROMに格納されたデータを説明する図である。It is a figure explaining the data stored in ROM of the electronic musical instrument. コスト補正処理のフローチャートである。It is a flowchart of a cost correction process. ステップタイム補正処理のフローチャートである。It is a flowchart of a step time correction process. 多声補正処理のフローチャートである。It is a flowchart of a polyphonic correction process. 指越え指くぐり補正処理のフローチャートである。It is a flowchart of a finger crossing finger penetration correction process. 指越え指くぐり基本補正処理のフローチャートである。It is a flowchart of a finger passing fingerhole basic correction process. ステップタイム・跳躍進行補正処理のフローチャートである。It is a flowchart of a step time and jump progress correction process. 和音対分散和音補正処理のフローチャートである。It is a flowchart of a chord pair dispersion chord correction process. 分散和音対分散和音補正処理のフローチャートである。It is a flowchart of a dispersion chord pair dispersion chord correction process. 単音対和音補正処理のフローチャートである。It is a flowchart of a single tone pair chord correction process. 和音対単音補正処理のフローチャートである。It is a flowchart of a chord versus single tone correction process. 和音対和音補正処理のフローチャートである。It is a flowchart of a chord pair chord correction process. 前方和音補正処理のフローチャートである。It is a flowchart of a front chord correction process.

符号の説明Explanation of symbols

1 CPU
2 ROM
3 RAM
4 入力部
5 表示部
6 外部記憶装置
1 CPU
2 ROM
3 RAM
4 Input unit 5 Display unit 6 External storage device

Claims (7)

楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成する装置であって、
前記楽曲の演奏内容を示す演奏情報を取得する演奏情報取得手段と、
前記演奏情報取得手段が取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する運指情報生成手段と、
前記運指情報生成手段が生成した運指情報を参照して、該運指情報が示す運指を行ううえでの難易度を算出する難易度算出手段と、
前記難易度算出手段が算出した難易度を基に、前記運指情報生成手段が生成した運指情報の修正を行う運指情報修正手段と、
を具備することを特徴とする運指情報生成装置。
A device for generating fingering information indicating fingering when carrying a musical piece by operating a group of performance operators provided in a musical instrument,
Performance information acquisition means for acquiring performance information indicating the performance content of the music;
With reference to the performance information acquired by the performance information acquisition means, fingering information generation means for generating fingering information of the music whose performance information indicates the performance content;
A difficulty level calculating means for calculating the difficulty level in performing the fingering indicated by the fingering information with reference to the fingering information generated by the fingering information generating means;
Fingering information correction means for correcting the fingering information generated by the fingering information generation means based on the difficulty level calculated by the difficulty level calculation means;
A fingering information generation device comprising:
前記難易度算出手段は、前記演奏情報を参照して該演奏情報を1つ以上の部分演奏情報に仮想的に分割し、該部分演奏情報が表す演奏内容、及び該部分演奏情報のつながりのうちの少なくとも一方に着目して前記難易度を算出する、
ことを特徴とする請求項1記載の運指情報生成装置。
The difficulty level calculation means virtually divides the performance information into one or more partial performance information with reference to the performance information, and includes the performance content represented by the partial performance information and the connection of the partial performance information. Calculating the degree of difficulty by focusing on at least one of
The fingering information generation device according to claim 1.
前記部分演奏情報が表す演奏内容としては、発音される楽音間の発音開始タイミングの差、同時に発音させる楽音数、該楽音間で発音期間が重なる割合、及び跳躍進行の有無のうちの少なくとも一つに着目する、
ことを特徴とする請求項2記載の運指情報生成装置。
The performance content represented by the partial performance information includes at least one of a difference in sound generation start timing between the sounds to be generated, the number of sounds to be simultaneously generated, a ratio of overlapping sound generation periods between the sounds, and presence / absence of jumping progress. Focus on
The fingering information generating device according to claim 2, wherein
前記難易度算出手段は、前記運指情報が示す運指のなかで予め定めた条件を満たす運指を対象外として前記難易度を算出し、
前記運指情報修正手段は、前記難易度算出手段が前記難易度を算出する運指を対象にして修正を行う、
ことを特徴とする請求項1、2、または3記載の運指情報生成装置。
The difficulty level calculation means calculates the difficulty level excluding fingering that satisfies a predetermined condition among the fingerings indicated by the fingering information,
The fingering information correcting means corrects the fingering for which the difficulty level calculating means calculates the difficulty level.
The fingering information generation device according to claim 1, 2, or 3.
楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成する装置であって、
前記楽曲の演奏内容を示す演奏情報を取得する演奏情報取得手段と、
前記演奏情報取得手段が取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する運指情報生成手段と、
前記運指情報生成手段が生成した運指情報を参照して、該運指情報が示す運指のなかで修正対象とすべき運指を抽出する運指抽出手段と、
前記運指抽出手段が抽出した運指を対象に修正を行う運指情報修正手段と、
を具備することを特徴とする運指情報生成装置。
A device for generating fingering information indicating fingering when carrying a musical piece by operating a group of performance operators provided in a musical instrument,
Performance information acquisition means for acquiring performance information indicating the performance content of the music;
With reference to the performance information acquired by the performance information acquisition means, fingering information generation means for generating fingering information of the music whose performance information indicates the performance content;
With reference to the fingering information generated by the fingering information generating means, fingering extraction means for extracting a finger to be corrected among the fingerings indicated by the fingering information;
Fingering information correction means for correcting the fingering extracted by the fingering extraction means;
A fingering information generation device comprising:
楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成する運指情報生成装置に実行させるプログラムであって、
前記楽曲の演奏内容を示す演奏情報を取得する機能と、
前記取得する機能により取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する機能と、
前記生成する機能により生成した運指情報を参照して、該運指情報が示す運指を行ううえでの難易度を算出する機能と、
前記算出する機能により算出した難易度を基に、前記生成する機能により生成した運指情報の修正を行う機能と、
を実現させるためのプログラム。
A program to be executed by a fingering information generating device that generates fingering information indicating fingering when a musical piece is operated by operating a group of performance operators provided in a musical instrument,
A function of obtaining performance information indicating the performance content of the music;
A function of generating fingering information of a music piece that indicates the performance content with reference to the performance information acquired by the function to be acquired;
A function of referring to the fingering information generated by the function to be generated and calculating the degree of difficulty in performing the fingering indicated by the fingering information;
A function for correcting fingering information generated by the function to be generated based on the degree of difficulty calculated by the function to be calculated;
A program to realize
楽器に備えられた演奏操作子群を操作して楽曲を演奏していく際の指の運びである運指を示す運指情報を生成する運指情報生成装置に実行させるプログラムであって、
前記楽曲の演奏内容を示す演奏情報を取得する機能と、
前記取得する機能により取得した演奏情報を参照して、該演奏情報が演奏内容を示す楽曲の運指情報を生成する機能と、
前記生成する機能により生成した運指情報を参照して、該運指情報が示す運指のなかで修正対象とすべき運指を抽出する機能と、
前記抽出する機能により抽出した運指を対象に修正を行う機能と、
を実現させるためのプログラム。
A program to be executed by a fingering information generating device that generates fingering information indicating fingering when a musical piece is operated by operating a group of performance operators provided in a musical instrument,
A function of obtaining performance information indicating the performance content of the music;
A function of generating fingering information of a music piece that indicates the performance content with reference to the performance information acquired by the function to be acquired;
A function of referring to fingering information generated by the function to be generated and extracting a finger to be corrected among the fingerings indicated by the fingering information;
A function for correcting fingering extracted by the extracting function;
A program to realize
JP2004261020A 2004-09-08 2004-09-08 Fingering information generation device and program Expired - Fee Related JP4301126B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004261020A JP4301126B2 (en) 2004-09-08 2004-09-08 Fingering information generation device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004261020A JP4301126B2 (en) 2004-09-08 2004-09-08 Fingering information generation device and program

Publications (3)

Publication Number Publication Date
JP2006078656A true JP2006078656A (en) 2006-03-23
JP2006078656A5 JP2006078656A5 (en) 2009-03-12
JP4301126B2 JP4301126B2 (en) 2009-07-22

Family

ID=36158184

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004261020A Expired - Fee Related JP4301126B2 (en) 2004-09-08 2004-09-08 Fingering information generation device and program

Country Status (1)

Country Link
JP (1) JP4301126B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007135791A1 (en) * 2006-05-19 2007-11-29 Konami Digital Entertainment Co., Ltd. Data computing unit for music game, data computing program for music game, and data computing method for music game
DE102010029365A1 (en) 2009-05-29 2011-01-20 Casio Computer Co., Ltd. Method and apparatus for calculating the difficulty level of the music
JP2011242561A (en) * 2010-05-18 2011-12-01 Casio Comput Co Ltd Score display system

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007135791A1 (en) * 2006-05-19 2007-11-29 Konami Digital Entertainment Co., Ltd. Data computing unit for music game, data computing program for music game, and data computing method for music game
KR101075370B1 (en) 2006-05-19 2011-10-24 가부시키가이샤 코나미 데지타루 엔타테인멘토 Data computing unit for music game, computer readable medium on which data computing program for music game is recorded, and data computing method for music game
DE102010029365A1 (en) 2009-05-29 2011-01-20 Casio Computer Co., Ltd. Method and apparatus for calculating the difficulty level of the music
US8106281B2 (en) 2009-05-29 2012-01-31 Casio Computer Co., Ltd. Music difficulty level calculating apparatus and music difficulty level calculating method
DE102010029365B4 (en) * 2009-05-29 2013-08-22 Casio Computer Co., Ltd. Method and apparatus for calculating the difficulty level of the music
JP2011242561A (en) * 2010-05-18 2011-12-01 Casio Comput Co Ltd Score display system

Also Published As

Publication number Publication date
JP4301126B2 (en) 2009-07-22

Similar Documents

Publication Publication Date Title
JP6402878B2 (en) Performance device, performance method and program
JP4301126B2 (en) Fingering information generation device and program
JP6056394B2 (en) Audio processing device
JP4742288B2 (en) Practice procedure generation device and practice procedure generation processing program
JP5557087B2 (en) Automatic accompaniment apparatus and program
JP4301125B2 (en) Fingering information generation device and program
JP4517299B2 (en) Code learning device and code learning program
JP2006259401A (en) Karaoke machine
JP2007316416A (en) Karaoke machine and karaoke processing program
JP2000259154A (en) Code judging device
JP4978176B2 (en) Performance device, performance realization method and program
JP4482880B2 (en) Fingering information generation apparatus and fingering information generation processing program
JPH05204297A (en) Syllable name generator
JP2005049628A (en) Music learning device and music learning program
JP2007140000A (en) Song grading device and program for processing song grading
JP6217896B2 (en) Rhythm display device, electronic musical instrument, rhythm display method and program
JP4189605B2 (en) Fingering information generation apparatus and fingering information generation processing program
JP4508218B2 (en) Fingering information generation apparatus and fingering information generation processing program
JP4035715B2 (en) Accompaniment generation apparatus and accompaniment generation program
JP5029770B2 (en) Performance support information generation apparatus and performance support information generation program
JPH11194774A (en) Automatic playing device
JP4816930B2 (en) Performance support information generation apparatus and performance support information generation program
JP4492680B2 (en) Music generator
JP2022177297A (en) Electronic wind instrument, control method of electronic wind instrument, and program for electronic wind instrument
JP2004318019A (en) Apparatus and program for assisting musical performance

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070611

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090123

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090127

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090306

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090331

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

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

Free format text: PAYMENT UNTIL: 20120501

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4301126

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090413

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

Free format text: PAYMENT UNTIL: 20120501

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130501

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130501

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees