JP5189952B2 - Music score recognition apparatus and computer program - Google Patents

Music score recognition apparatus and computer program Download PDF

Info

Publication number
JP5189952B2
JP5189952B2 JP2008271369A JP2008271369A JP5189952B2 JP 5189952 B2 JP5189952 B2 JP 5189952B2 JP 2008271369 A JP2008271369 A JP 2008271369A JP 2008271369 A JP2008271369 A JP 2008271369A JP 5189952 B2 JP5189952 B2 JP 5189952B2
Authority
JP
Japan
Prior art keywords
note
tablature
staff
difference
score
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2008271369A
Other languages
Japanese (ja)
Other versions
JP2010102408A (en
Inventor
誠至 中野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kawai Musical Instrument Manufacturing Co Ltd
Original Assignee
Kawai Musical Instrument Manufacturing 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 Kawai Musical Instrument Manufacturing Co Ltd filed Critical Kawai Musical Instrument Manufacturing Co Ltd
Priority to JP2008271369A priority Critical patent/JP5189952B2/en
Publication of JP2010102408A publication Critical patent/JP2010102408A/en
Application granted granted Critical
Publication of JP5189952B2 publication Critical patent/JP5189952B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/30Character recognition based on the type of data
    • G06V30/304Music notations

Description

本発明は、楽譜認識装置、及びコンピュータプログラムに関し、特に、紙面の楽譜を認識するために用いて好適なものである。   The present invention relates to a score recognition apparatus and a computer program, and is particularly suitable for use in recognizing a score on paper.

従来から、スキャナ等を用いて、紙面上の楽譜を読み取り、読み取った楽譜のデータについて、五線、音符、及びその他の各種の音楽記号を認識して、MIDIファイルデータ等の演奏データや、表示用/印刷用のデータを生成することが行われている。
具体的に各種の音楽記号を認識する場合には、五線及び段落を認識した上で、五線消去を行った後、任意の矩形形状をした読み取り用のラベルを記号毎に設定して、当該ラベルのデータと、予め辞書に登録されているデータとをパターンマッチングするようにしている(特許文献1を参照)。ここで、ラベルとは、モノクロ画像(白黒の2値画像)の場合、例えば、4連結又は8連結している黒画素の一塊をいう。
Conventionally, a musical score on a paper surface is read using a scanner or the like, and a musical score data, musical notes, and other various musical symbols are recognized from the read musical score data, and performance data such as MIDI file data and display are displayed. Data for printing / printing is generated.
Specifically, when recognizing various musical symbols, the staff and paragraphs are recognized, and then the staff is erased, and then a reading label having an arbitrary rectangular shape is set for each symbol. The label data and the data registered in the dictionary in advance are subjected to pattern matching (see Patent Document 1). Here, in the case of a monochrome image (monochrome binary image), a label refers to a lump of black pixels that are four-connected or eight-connected, for example.

特開平11−161738号公報Japanese Patent Laid-Open No. 11-161738

しかしながら、前述した従来の技術では、パターンマッチングの結果だけから音楽記号を認識しているので、音楽記号を正確に認識することができない虞があった。例えば、タブ譜では、弦に対応する横線(以下の説明ではこの線も必要に応じて五線と称する)上に音符の数字が表記されるが、線の上に数字が表記されているため、パターンマッチングの結果だけからでは、この数字を正確に認識することができない虞があった。   However, in the conventional technique described above, music symbols are recognized only from the result of pattern matching, so there is a possibility that the music symbols cannot be accurately recognized. For example, in tablature, note numbers are shown on horizontal lines corresponding to strings (in the following explanation, these lines are also called staves as necessary), but numbers are shown on the lines. There is a possibility that this number cannot be accurately recognized only from the result of pattern matching.

本発明は、このような問題点に鑑みてなされたものであり、タブ譜を含む楽譜を従来よりも正確に認識することができるようにすることを目的とする。   The present invention has been made in view of such problems, and an object thereof is to make it possible to recognize a score including a tablature more accurately than in the past.

本発明の楽譜認識装置は、タブ譜と、当該タブ譜と対になる五線譜とを含む楽譜の画像情報を、画像読み取り手段から取得する取得手段と、前記楽譜に表記されている図形と、予め設定されている辞書とをマッチングして当該図形が、どの音楽記号に属するのかを認識する認識手段と、前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている前記五線譜の音符のノートナンバとの差を算出する算出手段と、前記算出手段により算出されたノートナンバの差に基づいて、前記認識手段により認識された音楽記号を修正する修正手段とを有することを特徴とする。   The musical score recognition apparatus according to the present invention includes an acquisition unit that acquires, from an image reading unit, image information of a musical score including a tablature and a staff score that is paired with the tablature, a graphic written in the musical score, Recognizing means for recognizing to which musical symbol the graphic belongs by matching with a set dictionary, the note number of the note on the tablature, and the music notation paired with the note on the tablature Calculating means for calculating a difference between the note number and the note number calculated by the calculating means, and correcting means for correcting the music symbol recognized by the recognition means based on the difference between the note numbers calculated by the calculating means. And

本発明のコンピュータプログラムは、タブ譜と、当該タブ譜と対になる五線譜とを含む楽譜の画像情報を、画像読み取り手段から取得する取得ステップと、前記楽譜に表記されている図形と、予め設定されている辞書とをマッチングして当該図形が、どの音楽記号に属するのかを認識する認識ステップと、前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている前記五線譜の音符のノートナンバとの差を算出する算出ステップと、前記算出ステップにより算出されたノートナンバの差に基づいて、前記認識手段により認識された音楽記号を修正する修正ステップとをコンピュータに実行させることを特徴とする。   The computer program of the present invention includes an acquisition step of acquiring, from an image reading means, image information of a score including a tablature and a staff score paired with the tablature, a figure written in the score, and a preset A step of recognizing the musical symbol to which the figure belongs by matching with a dictionary, and the note number of the note on the tablature and the note on the staff notated in the tablature Causing the computer to execute a calculation step of calculating a difference between the note number of the note and a correction step of correcting the music symbol recognized by the recognition means based on the difference of the note number calculated in the calculation step. It is characterized by.

本発明によれば、タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている音符のノートナンバとの差に基づいて、マッチングにより認識された音楽記号を修正するようにした。したがって、タブ譜を含む楽譜を従来よりも正確に認識することができる。   According to the present invention, the music symbol recognized by matching is corrected based on the difference between the note number of the note on the tablature and the note number of the note paired with the note on the tablature. . Therefore, the score including the tablature can be recognized more accurately than before.

以下、図面を参照しながら、本発明の一実施形態について説明する。
図1は、楽譜認識装置の構成の一例を示すブロック図である。
図1において、楽譜認識装置100は、CPU1、ROM2、RAM3、HDD4、FDD5、MIDIインタフェース回路6、スキャナインタフェース回路7、プリンタインタフェース回路8、キーボードインタフェース回路9、CRTインタフェース回路10、及びバス15を有している。そして、スキャナ11、プリンタ12、キーボード13、及びCRT14が楽譜認識装置100に接続されている。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram illustrating an example of a configuration of a score recognition apparatus.
In FIG. 1, the score recognition apparatus 100 includes a CPU 1, ROM 2, RAM 3, HDD 4, FDD 5, MIDI interface circuit 6, scanner interface circuit 7, printer interface circuit 8, keyboard interface circuit 9, CRT interface circuit 10, and bus 15. doing. The scanner 11, printer 12, keyboard 13, and CRT 14 are connected to the score recognition apparatus 100.

図1に示すように、本実施形態の楽譜認識装置100は、パソコン等の一般的な計算機システムに、MIDIインタフェース回路6を付加したものである。
CPU1は、ROM2に格納されたプログラムをRAM3に展開して実行すること等により、楽譜認識装置100の全体の制御を行う中央処理装置である。また、楽譜認識装置100は、予め設定された所定の周期でCPU1に割り込みをかけるタイマ回路を内蔵している。RAM3は、プログラムエリアの他、画像データバッファ、ワークエリア等として使用される。HDD(ハードディスクドライブ)4及びFDD(フレキシブルディスクドライブ)5は、プログラム、画像データ、及び演奏データ等を格納する。
As shown in FIG. 1, a score recognition apparatus 100 of this embodiment is obtained by adding a MIDI interface circuit 6 to a general computer system such as a personal computer.
The CPU 1 is a central processing unit that performs overall control of the score recognition apparatus 100 by developing a program stored in the ROM 2 on the RAM 3 and executing the program. The musical score recognition apparatus 100 has a built-in timer circuit that interrupts the CPU 1 at a predetermined cycle set in advance. The RAM 3 is used as an image data buffer, a work area, etc. in addition to a program area. An HDD (hard disk drive) 4 and an FDD (flexible disk drive) 5 store programs, image data, performance data, and the like.

CRT14は、CPU1の制御に基づき、CRTインタフェース回路10から出力される映像情報を表示する。キーボード13から入力された情報は、キーボードインタフェース回路9を経てCPU1に取り込まれる。プリンタ12は、CPU1の制御に基づき、プリンタインタフェース回路8から出力される印字情報を印字する。   The CRT 14 displays video information output from the CRT interface circuit 10 based on the control of the CPU 1. Information input from the keyboard 13 is taken into the CPU 1 through the keyboard interface circuit 9. The printer 12 prints print information output from the printer interface circuit 8 based on the control of the CPU 1.

スキャナ11は、紙面に印刷された楽譜を光学的に走査して、2値、グレイスケール、あるいはカラーの画像データに変換するものである。スキャナ11としては、フラットベッド型、ハンディ型、フィーダー型等任意のタイプのものを使用できる。スキャナ11によって読み取られた画像情報は、スキャナインタフェース回路7を介して、RAM3又はHDD4に取り込まれる。MIDIインタフェース回路6は、音源モジュール等の外部のMIDI機器との間でMIDIデータの送受信を行う回路である。バス15は、楽譜認識装置100内の各回路を接続している。尚、この他に、マウス等のポインティングデバイスや、RS232C等のシリアルインターフェース回路等を楽譜認識装置100が備えていてもよい。   The scanner 11 optically scans a score printed on paper and converts it into binary, gray scale, or color image data. As the scanner 11, an arbitrary type such as a flat bed type, a handy type, or a feeder type can be used. Image information read by the scanner 11 is taken into the RAM 3 or the HDD 4 via the scanner interface circuit 7. The MIDI interface circuit 6 is a circuit that transmits / receives MIDI data to / from an external MIDI device such as a sound module. The bus 15 connects each circuit in the score recognition apparatus 100. In addition, the score recognition apparatus 100 may include a pointing device such as a mouse, a serial interface circuit such as RS232C, and the like.

図2は、CPU1の処理の一例を説明するメインフローチャートである。尚、ここでは、本発明の実施形態を説明する上で必要な事項を中心に説明し、その他の事項の詳細な説明を省略する。
まず、ステップS1において、CPU1は、画像取り込み処理を行う。この画像取り込み処理では、スキャナ12によって読み取られた楽譜の画像データをRAM3に取り込む等の処理が行われる。図3は、楽譜認識装置100に取り込まれる楽譜の一例を示す図である。具体的に図3(a)は、五線譜とタブ譜とが対になって表記された楽譜の一部を示す図である。また、図3(b)〜図3(d)は、図3(a)の領域303におけるパターンマッチングによる認識結果の第1〜第3の例を概念的に示す図である。
図3(a)に示すように、本実施形態では、五線譜301とタブ譜302とが対になって表記された楽譜を取り込むようにしている。
FIG. 2 is a main flowchart for explaining an example of processing of the CPU 1. It should be noted that here, description will be made mainly on matters necessary for describing the embodiment of the present invention, and detailed explanation of other matters will be omitted.
First, in step S1, the CPU 1 performs an image capturing process. In this image capturing process, a process of capturing image data of a score read by the scanner 12 into the RAM 3 is performed. FIG. 3 is a diagram illustrating an example of a score that is taken into the score recognition apparatus 100. Specifically, FIG. 3A is a diagram showing a part of a score in which a staff score and a tab score are paired. FIGS. 3B to 3D are diagrams conceptually showing first to third examples of recognition results by pattern matching in the region 303 of FIG.
As shown in FIG. 3A, in this embodiment, a musical score in which a staff 301 and a tablature 302 are paired is captured.

次に、ステップS2において、CPU1は、五線認識処理を行う。この五線認識処理では、五線走査開始位置検出処理及び五線シフト量検出処理等が行われる。五線走査開始位置検出処理の概略を述べると、横(x)軸方向のある位置で、黒画素の幅と白画素の幅とを順に求め、求めた幅に基づいて、五線状に並んでいる位置を、ある程度の誤差を考慮して検出する。そして、加線(五線からはみ出した音符を記載するために付加した横線)の影響を除くために、五線状の並びの両側に、五線の間隔より大きな白画素幅があるという条件を加える。この条件に合う白黒画素の並びがある横(x)方向の各黒ランの中点を五線走査開始位置とする。ここで、ランとは、モノクロ画像(白黒の2値画像)の場合、例えば、縦又は横に黒画素又は白画素が連結している長さをいう。   Next, in step S2, the CPU 1 performs a staff recognition process. In the staff recognition processing, staff scanning start position detection processing, staff shift amount detection processing, and the like are performed. The outline of the staff scanning start position detection process is as follows. At a certain position in the horizontal (x) axis direction, the width of the black pixel and the width of the white pixel are obtained in order, and arranged in a staff based on the obtained width Detecting the position where it is coming in consideration of some error. Then, in order to remove the influence of the additional line (the horizontal line added to describe the note protruding from the staff), the condition that there is a white pixel width larger than the distance between the staffs on both sides of the staff array. Add. The midpoint of each black run in the horizontal (x) direction where black-and-white pixels are arranged that meet this condition is set as the staff scanning start position. Here, in the case of a monochrome image (monochrome binary image), the run means, for example, a length in which black pixels or white pixels are connected vertically or horizontally.

次に、五線シフト量検出処理の概略を述べる。まず、五線走査開始位置(5点の黒画素位置)から、1ドットずつ位置を左右に変えていき、5点の内、黒画素がある個数(例えば3あるいは4個)以下になった場合に、5点を上下にずらして黒画素数をチェックし、縦(y)方向のうち、黒画素の割合が高くなる方向へy座標をシフトする。この五線走査開始位置からのシフト量を五線のシフト量とする。そして、五線走査開始位置の左右方向(横方向)に、黒画素の個数が0になる位置まで走査することにより五線の検出を行う。   Next, an outline of the staff shift amount detection process will be described. First, from the staff scanning start position (5 black pixel positions), the position is changed to the left and right one dot at a time, and when the number of black pixels becomes less than a certain number (for example, 3 or 4) out of 5 points In addition, the number of black pixels is checked by shifting the five points up and down, and the y coordinate is shifted in a direction in which the ratio of black pixels increases in the vertical (y) direction. The shift amount from the staff scanning start position is defined as the staff shift amount. Then, the staff is detected by scanning to the position where the number of black pixels becomes zero in the left-right direction (horizontal direction) of the staff scanning start position.

次に、ステップS3において、CPU1は、段落認識処理を行う。段落認識処理では、段落認識処理及び大かっこ認識処理等が行われる。段落認識処理においては、画像全体で五線を検出し、五線同士で左端がほぼ同じ場所にある五線の組を探し、五線の端同士が、黒画素で結ばれているかどうかを検査し、段落を認識する。五線同士が大かっこで結ばれていた場合には、五線同士にまたがる音符等が存在する場合があるので、大かっこで結ばれた五線は1つの単位で処理を行った方が良い。大かっこについては、段落線の左の所定の範囲で認識を行う。ここで、段落線とは、同時に進行している複数のパートの五線同士の左端を繋いでいる線をいい、段落とは、段落線で繋がれた複数の五線の一塊をいう。尚、パートが1つの場合には、複数のパートの段落に相当する一塊を段落という。また、大かっことは、特にピアノの楽譜に用いられることが多い音楽記号であり、2つ又は3つの五線を纏めるための「[」で表記される括弧である。   Next, in step S3, the CPU 1 performs a paragraph recognition process. In the paragraph recognition process, a paragraph recognition process and a bracket recognition process are performed. In the paragraph recognition process, the staff is detected in the entire image, a set of staffs in which the left ends of the staffs are almost in the same place is searched, and it is inspected whether the ends of the staff are connected with black pixels. And recognize paragraphs. When staffs are connected with brackets, there may be notes that cross between staffs, so it is better to process staffs connected with brackets in one unit. . The brackets are recognized within a predetermined range to the left of the paragraph line. Here, the paragraph line refers to a line that connects the left ends of the staffs of a plurality of parts that are proceeding simultaneously, and the paragraph refers to a lump of a plurality of staffs that are connected by paragraph lines. When there is one part, a block corresponding to a plurality of part paragraphs is called a paragraph. Also, the brackets are music symbols that are often used for piano scores, in particular, parentheses indicated by “[” for collecting two or three staffs.

次に、ステップS4において、CPU1は、パート認識処理を行う。パート認識処理では、五線認識処理及び段落認識処理で認識された結果に基づいて各パートを認識する。パート認識処理では、処理矩形決定処理、五線消去処理、及び音楽記号認識処理等を行う。 処理矩形決定処理では、求められた五線を含む、ある程度広い矩形を採り、これを認識処理矩形とする。矩形の大きさは、その五線に関係する音楽記号が存在する最大領域以上で、且つ五線傾き補正により、必要な音楽記号が消えない様な大きさにする。これ以降の認識はこの矩形内で行う。   Next, in step S4, the CPU 1 performs part recognition processing. In the part recognition process, each part is recognized based on the results recognized in the staff recognition process and the paragraph recognition process. In the part recognition processing, processing rectangle determination processing, staff erasing processing, music symbol recognition processing, and the like are performed. In the process rectangle determination process, a rectangle that is fairly wide including the found staff is taken and is used as a recognition process rectangle. The size of the rectangle is not less than the maximum area where the music symbols related to the staff are present, and is adjusted so that the necessary music symbols are not erased by correcting the staff inclination. Subsequent recognition is performed within this rectangle.

五線消去処理では、求められた五線のうち、線幅が閾値以下の部分(音楽記号と重なっていない部分)を消去する。
音楽記号認識処理では、五線が消去された楽譜の画像データに対し、連続する黒画素の外縁に接するように矩形ラベルを設定し、当該矩形ラベル内の黒画素のデータと、予め辞書に登録されているデータとのパターンマッチングを行う等して各種の音楽記号を認識する。この音楽記号認識処理により、タブ譜に表記されている数字が認識される。パターンマッチングに際しては、テンプレートマッチングの他に、矩形ラベルのサイズと加重方向指数とを用いたり、ペリフェラル特徴を用いたりすることができる。
In the staff erasing process, a portion of the obtained staff whose line width is equal to or smaller than a threshold (a portion not overlapping with a music symbol) is erased.
In the music symbol recognition process, a rectangular label is set so as to touch the outer edge of continuous black pixels for the musical score image data from which the staff has been deleted, and the black pixel data in the rectangular label is registered in the dictionary in advance. Various music symbols are recognized by performing pattern matching with the recorded data. By this music symbol recognition processing, the numbers written on the tablature are recognized. In pattern matching, in addition to template matching, the size of a rectangular label and a weight direction index can be used, or a peripheral feature can be used.

次に、ステップS5において、CPU1は、結合処理を行う。結合処理では、五線認識処理で認識された五線、段落認識処理で認識された段落、パート認識処理で認識されたパートの内容等を結合して、楽譜のデータを生成する等の処理を行う。
次に、ステップS6において、CPU1は、認識結果修正処理を行う。認識結果修正処理では、音楽記号認識処理でパターンマッチングにより認識された結果を、五線譜301の音符のノートナンバと、タブ譜302の音符(フレット番号と当該フレット番号が表記されている五線の位置とから定まる音符)のノートナンバとの差に基づいて修正する。認識結果修正処理の詳細については後述する。
Next, in step S5, the CPU 1 performs a combination process. In the merging process, the score recognized by the staff recognition process, the paragraph recognized by the paragraph recognition process, the contents of the part recognized by the part recognition process, etc. are combined to generate music score data. Do.
Next, in step S6, the CPU 1 performs recognition result correction processing. In the recognition result correction process, the result of the pattern recognition in the music symbol recognition process is used as the note number of the notation of the staff 301 and the note of the tab staff 302 (the position of the staff on which the fret number and the fret number are written). Correct the note based on the difference from the note number. Details of the recognition result correction processing will be described later.

尚、本実施形態では、楽譜の認識後に当該楽譜に対して設定する必要がある設定情報を含むパートテンプレートを、予めHDD4等に記憶している。そして、前述したステップS6における認識結果修正処理が行われる前に、ステップS1で取り込まれた楽譜の各パートに対応するパートテンプレートを複数のパートテンプレートの中から抽出する。具体的に説明すると、段落の左等に表記されているパート名(パートネーム)を構成する文字を、記号マッチングを行って認識し、その文字の並びをパート名として想定される文字列辞書とマッチングし、マッチングした結果から、パート名を示す文字列を認識する。そして、認識した文字列に対応する楽器を表現するパートテンプレートを、複数のパートテンプレートの中から選択する(認識した文字列に対応する楽器IDを取得し、その楽器IDに対応するパートテンプレートを、複数のパートテンプレートの中から選択する)。
図4は、パートテンプレートの一例を示す図である。図4において、パートテンプレート401は、テンプレート名402、パート名403、パート名短縮404、移調楽器設定405、音部記号406、タブ譜線数407、及びタブ譜チューニング情報408を有する。
In the present embodiment, a part template including setting information that needs to be set for the score after the recognition of the score is stored in the HDD 4 or the like in advance. Then, before the recognition result correction process in step S6 described above is performed, a part template corresponding to each part of the score captured in step S1 is extracted from the plurality of part templates. More specifically, a character string dictionary that recognizes characters constituting a part name (part name) written on the left side of a paragraph, etc. by performing symbol matching and assumes the sequence of the characters as a part name. The character string indicating the part name is recognized from the matching result. Then, a part template representing an instrument corresponding to the recognized character string is selected from a plurality of part templates (acquisition instrument ID corresponding to the recognized character string is obtained, and the part template corresponding to the instrument ID is selected as Select from multiple part templates).
FIG. 4 is a diagram illustrating an example of a part template. In FIG. 4, a part template 401 includes a template name 402, a part name 403, a part name shortening 404, a transposing instrument setting 405, a clef 406, a tab score 407, and tab score tuning information 408.

テンプレート名402には、パートテンプレート401を識別するための文字列として、例えば、日本語の文字列又はアルファベットの文字列が格納される。
パート名403には、パートテンプレート401が適用されるパートを識別するための文字列が格納される。
パート名短縮404には、パートテンプレート401が適用されるパートの短縮表記を識別するための文字列が格納されている。
移調楽器設定405には、パートテンプレート401が適用される楽器が移調楽器であるか否かと、その楽器が移調楽器である場合にはその移調楽器がどのようなものであるかとを識別するための数値が格納されている。本実施形態では、パートテンプレート401が適用される楽器が移調楽器でない場合、移調楽器設定405には、0が格納される。また、本実施形態では、パートテンプレート401が適用される楽器がトランペット、ウッドベース、ピッコロ、アルトサックスである場合、移調楽器設定405には、夫々、−2、−12、12、−9が格納される。
The template name 402 stores, for example, a Japanese character string or an alphabetic character string as a character string for identifying the part template 401.
The part name 403 stores a character string for identifying a part to which the part template 401 is applied.
The part name shortening 404 stores a character string for identifying the short notation of the part to which the part template 401 is applied.
The transposing instrument setting 405 is used to identify whether or not the instrument to which the part template 401 is applied is a transposing instrument, and if the instrument is a transposing instrument, what the transposing instrument is. Numeric values are stored. In this embodiment, when the instrument to which the part template 401 is applied is not a transposing instrument, the transposing instrument setting 405 stores 0. In this embodiment, when the musical instrument to which the part template 401 is applied is a trumpet, a wood bass, a piccolo, or an alto saxophone, -2, -12, 12, and -9 are stored in the transposing instrument setting 405, respectively. Is done.

音部記号406には、パートテンプレート401が適用される音部記号の種類に対応した数値が格納されている。本実施形態では、パートテンプレート401が適用される音部記号がト音記号である場合、音部記号406には0が格納される。また、本実施形態では、パートテンプレート401が適用される音部記号がヘ音記号である場合、音部記号406には1が格納される。
タブ譜線数407には、パートテンプレート401が適用される"楽譜の線数(五線の数)"を表す数値が格納されている。
タブ譜チューニング情報408には、楽譜の各線に対するチューニングを表す数値が格納されている。タブ譜チューニング情報408には、パートテンプレート401が適用される"楽譜の線数"分の情報が格納されている。図5は、タブ譜チューニング情報408の一例を示す図である。
The clef 406 stores a numerical value corresponding to the type of clef to which the part template 401 is applied. In the present embodiment, when the clef to which the part template 401 is applied is a treble clef, 0 is stored in the clef 406. In this embodiment, when the clef to which the part template 401 is applied is a clef, 1 is stored in the clef 406.
The number of tablature lines 407 stores a numerical value representing the “number of musical score lines (number of staffs)” to which the part template 401 is applied.
The tablature tuning information 408 stores numerical values representing tuning for each line of the score. The tablature tuning information 408 stores information for “number of lines of musical score” to which the part template 401 is applied. FIG. 5 is a diagram illustrating an example of the tablature tuning information 408.

尚、パートテンプレート401には、移調楽器設定405、音部記号406、タブ譜線数407、及びタブ譜チューニング情報408が少なくとも含まれていればよい。ただし、テンプレート名402、パート名403は含まれていた方が好ましい。また、テンプレート名402、パート名403、パート名短縮404、移調楽器設定405、音部記号406、タブ譜線数407、及びタブ譜チューニング情報408に格納される情報は、前述したものに限定されるものではない。   The part template 401 only needs to include at least transposition instrument setting 405, clef 406, tab score 407, and tab score tuning information 408. However, it is preferable that the template name 402 and the part name 403 are included. Also, the information stored in the template name 402, part name 403, part name shortening 404, transposing instrument setting 405, clef 406, tab score 407, and tab score tuning information 408 are limited to those described above. It is not something.

そして、CPU1は、選択したパートテンプレート401のうち、パート認識処理で認識された線数(タブ譜の弦に対応する横線の数)に対応するパートテンプレート401を1つ選択し、ステップS1の画像データ取り込み処理で取り込まれた楽譜のタブ譜302に対してパートテンプレート401を適用する。   Then, the CPU 1 selects one part template 401 corresponding to the number of lines recognized in the part recognition process (the number of horizontal lines corresponding to the strings of the tablature) from the selected part templates 401, and the image of step S1. The part template 401 is applied to the tablature 302 of the musical score captured by the data capturing process.

尚、以上のようなパートテンプレート401の内容や、タブ譜302に対して適用したパートテンプレート401は、例えば、五線や段落の設定変更を行うための「段落修正画面」におけるユーザの操作に基づいて変更することができる。   The contents of the part template 401 as described above and the part template 401 applied to the tablature 302 are based on, for example, the user's operation on the “paragraph correction screen” for changing the setting of the staff or paragraph. Can be changed.

図2の説明に戻り、ステップS7において、CPU1は、その他の処理を行う。その他の処理では、MIDIファイルデータ等の演奏データを生成する等の処理を行う。
尚、前述したように、実際には、以上の処理の他に様々な処理が実行されるが、ステップS6における認識結果修正処理以外については、公知の技術によって実現できるので、ここでは、その詳細な説明を省略する。
Returning to the description of FIG. 2, in step S <b> 7, the CPU 1 performs other processing. In other processing, processing such as generating performance data such as MIDI file data is performed.
As described above, actually, various processes are executed in addition to the above process. However, since the process other than the recognition result correction process in step S6 can be realized by a known technique, the details are described here. The detailed explanation is omitted.

次に、図6のフローチャートを参照しながら、図2のステップS6における認識結果修正処理の一例を説明する。
まず、ステップS11において、CPU1は、パート認識処理により認識された音楽記号の内容に基づいて、五線譜301の音符のノートナンバを算出し、算出したノートナンバを、当該音符の情報として記憶する。このノートナンバの算出は、五線譜を演奏する際にノートナンバを検出するときと同じ方法で行うことができる。ただし、本実施形態では、楽譜(曲)の先頭から、音高に関係する音楽記号(音部記号、調号、臨時記号、タイ、オッターヴァ等)だけを考慮しながら、各音符のノートナンバを算出する。また、本実施形態では、「D.S.」や「コーダ」等の繰り返し記号があったとしても、当該繰り返し記号には従わずにノートナンバを算出する。すなわち、楽譜(曲)の最初から最後まで後戻りせずにノートナンバを検出する。
Next, an example of the recognition result correction process in step S6 of FIG. 2 will be described with reference to the flowchart of FIG.
First, in step S11, the CPU 1 calculates the note number of the note of the staff 301 based on the content of the music symbol recognized by the part recognition process, and stores the calculated note number as the note information. The calculation of the note number can be performed in the same way as when the note number is detected when playing the staff. However, in the present embodiment, the note number of each note is determined from the beginning of the score (song), taking into account only musical symbols related to the pitch (clef, key signature, accidental symbol, tie, ottava, etc.). calculate. Further, in the present embodiment, even if there is a repetition symbol such as “DS” or “coder”, the note number is calculated without following the repetition symbol. That is, the note number is detected without going backward from the beginning to the end of the score (song).

ステップS12において、CPU1は、パート認識処理により認識された音楽記号の内容に基づいて、タブ譜302の音符のノートナンバを算出し、算出したノートナンバを、当該音符の情報として記憶する。このノートナンバの算出は、タブ譜を演奏する際にノートナンバを検出するときと同じ方法で行うことができる。ただし、本実施形態では、タブ譜302の"符頭に対応する位置"に表記されている"音符の数字(フレット番号)"に、当該タブ譜302に対して適用されたパートテンプレート401内のタブ譜チューニング情報408であって、当該フレット番号が表記されている弦に対応する情報を加算したものを、ノートナンバとするようにしている。ここで、符頭とは、五線における"4分音符より短い音符の黒い玉や、2分音符より長い音符の穴あきの玉"に相当するものをいう。   In step S12, the CPU 1 calculates the note number of the note of the tablature 302 based on the content of the music symbol recognized by the part recognition process, and stores the calculated note number as the note information. The calculation of the note number can be performed in the same way as when the note number is detected when playing the tablature. However, in the present embodiment, the “note number (fret number)” written in the “position corresponding to the note head” of the tablature 302 is included in the part template 401 applied to the tablature 302. The tab score tuning information 408, which is obtained by adding the information corresponding to the string on which the fret number is written, is used as the note number. Here, note heads are those corresponding to “black balls with notes shorter than quarter notes or perforated balls with notes longer than half notes” on the staff.

次に、ステップS13において、CPU1は、前パート参照情報取得処理を行う。前パート参照情報取得処理では、タブ譜302と対になっている五線譜301の情報を参照し、参照した結果に基づいて、タブ譜302の各音符の情報に、当該音符と対になる音楽記号のインデックス情報を記憶する処理である。インデックス情報は、五線譜301の先頭から各音楽記号に対してその出現順に付されたインデックス番号と、当該音楽記号の内容を示す情報(ノートナンバ等)とを含む。この前パート参照情報取得処理の詳細については後述する。   Next, in step S13, the CPU 1 performs a previous part reference information acquisition process. In the previous part reference information acquisition process, information on the staff 301 that is paired with the tablature 302 is referred to, and based on the result of the reference, the musical symbol that is paired with the note is added to the information of each note on the tablature 302. This is a process for storing the index information. The index information includes an index number assigned to each musical symbol from the top of the staff 301 and the information (note number etc.) indicating the contents of the musical symbol. Details of this previous part reference information acquisition processing will be described later.

次に、ステップS14において、CPU1は、タブ譜302の数字(フレット番号)を修正するか否かを判定する。例えば、タブ譜302と対になっている五線譜301が存在していない場合には、タブ譜302の数字(フレット番号)を修正しないと判定することができる。また、対となる音楽記号を検出できたタブ譜302側の音符の数や割合が閾値以上である場合に、タブ譜302の数字(フレット番号)を修正すると判定し、そうでない場合にタブ譜302の数字(フレット番号)を修正しないと判定することができる。この他に、タブ譜302側の音符と対にされなかった"五線譜301側の音楽記号"の数や割合が閾値以下である場合に、タブ譜302の数字(フレット番号)を修正すると判定し、そうでない場合にタブ譜302の数字(フレット番号)を修正しないと判定することができる。尚、前記において、割合とは、例えば、該当する音符の数を、五線譜301やタブ譜302の音符の総数で割った値である。   Next, in step S14, the CPU 1 determines whether or not the number (fret number) of the tablature 302 is to be corrected. For example, when the staff 301 that is paired with the tablature 302 does not exist, it can be determined that the number (fret number) of the tablature 302 is not corrected. Further, when the number or ratio of the notes on the tablature 302 that can detect the paired music symbol is equal to or greater than the threshold value, it is determined that the number (fret number) of the tablature 302 is to be corrected. It can be determined that the numeral 302 (fret number) is not corrected. In addition, when the number or ratio of “musical symbols on the staff 301” that are not paired with the notes on the tablature 302 side is equal to or less than the threshold, it is determined that the number (fret number) of the tablature 302 is corrected. Otherwise, it can be determined that the number (fret number) of the tablature 302 is not corrected. In the above, the ratio is, for example, a value obtained by dividing the number of corresponding notes by the total number of notes in the staff 301 or the tablature 302.

この判定の結果、タブ譜302の数字(フレット番号)を修正しない場合には、ステップS24に進んで、その他の処理が行われた後、図6のフローチャートによる処理を終了する。一方、タブ譜302の数字(フレット番号)を修正する場合には、ステップS15に進む。
ステップS15に進むと、CPU1は、ノートナンバ比較表を作成する。
図7は、ノートナンバ比較表の一例を示す図である。具体的に図7(a)は、図6のステップS15で作成されるノートナンバ比較表の一例を示す図であり、図7(b)は、後述する図6のステップS19で作成されるノートナンバ比較表の一例を示す図である。
As a result of the determination, if the number (fret number) of the tablature 302 is not corrected, the process proceeds to step S24, and after other processes are performed, the process according to the flowchart of FIG. On the other hand, when correcting the number (fret number) of the tablature 302, the process proceeds to step S15.
In step S15, the CPU 1 creates a note number comparison table.
FIG. 7 is a diagram illustrating an example of a note number comparison table. Specifically, FIG. 7A is a diagram showing an example of the note number comparison table created in step S15 of FIG. 6, and FIG. 7B is a note created in step S19 of FIG. It is a figure which shows an example of a number comparison table.

まず、CPU1は、タブ譜302の音符のノートナンバと、当該音符の情報に記憶された"五線譜301の音符のインデックス情報"とに基づいて、タブ譜302の音符のノートナンバから、当該音符と対になる"五線譜301の音符"のノートナンバを減算した値を、タブ譜302の全ての音符について算出する。尚、タブ譜302の音符の情報に五線譜301の音符のインデックス情報が記憶されていない場合には、当該タブ譜302の音符については、この状態が判定できるように、ノートナンバの差を、通常ではあり得ない値(例えば「−1000」)とする。また、以下の説明では、タブ譜302の音符のノートナンバを、当該音符と対になる"五線譜301の音符"のノートナンバから減算した値を、必要に応じてノートナンバの差と称する。   First, based on the note number of the note of the tablature 302 and the “index information of the note of the staff 301” stored in the note information, the CPU 1 calculates the note and the note number from the note number of the note of the tablature 302. A value obtained by subtracting the note numbers of the “staff 301 notes” to be paired is calculated for all the notes on the tablature 302. If the note information of the tablature 302 is not stored in the note information of the tablature 302, the note number difference is set to the normal number so that this state can be determined for the notes of the tablature 302. It is assumed that the value is not possible (for example, “−1000”). Further, in the following description, a value obtained by subtracting the note number of the note of the tablature 302 from the note number of the “stave 301 note” paired with the note is referred to as a note number difference as necessary.

その後、CPU1は、各小節について、ノートナンバの差が同値であるものの数の最大値を算出し、算出した値を、図7(a)に示すノートナンバ比較表701の領域701aに記憶する。例えば、タブ譜302の小節1の弦1における音符の数が4であり、当該4つの音符と対になる音符が五線譜301に存在し、それら4つの音符のノートナンバの差が夫々「1」、「1」、「2」、「0」であったとする。この場合には、領域701aの"小節1と弦1とにより特定されるセル"には代表値として「1」が記憶される。
以上のようにして領域701aの全てのセルに値が記憶されると、各セルの値のうち、0以上の値のものを弦毎に抽出し、抽出した値が同値であるものの数の最大値を算出し、算出した値を、図7(a)に示すノートナンバ比較表701の領域701bに記憶する。例えば、Nが4であり、弦1における小節1〜4に記憶された値が夫々「1」、「1」、「0」、「1」であったとする。この場合には、領域701bの弦1に対応するセルには代表値として「1」が記憶される。
After that, the CPU 1 calculates the maximum value of the numbers having the same note number difference for each measure, and stores the calculated value in the area 701a of the note number comparison table 701 shown in FIG. For example, the number of notes in string 1 of measure 1 of tablature 302 is 4, and there are notes in paired music notation 301 in the notation 301, and the difference between the note numbers of these four notes is “1”. , “1”, “2”, “0”. In this case, “1” is stored as a representative value in the “cell specified by the bar 1 and the string 1” in the area 701a.
When the values are stored in all the cells in the area 701a as described above, the value of each cell is extracted for each string with a value of 0 or more, and the maximum number of the extracted values having the same value is extracted. The value is calculated, and the calculated value is stored in an area 701b of the note number comparison table 701 shown in FIG. For example, suppose N is 4, and the values stored in measures 1 to 4 in string 1 are “1”, “1”, “0”, and “1”, respectively. In this case, “1” is stored as a representative value in the cell corresponding to the string 1 in the region 701b.

尚、ノートナンバの差が同値であるものの数の最大値が複数ある場合には、例えば、それらのうち小さい値を選択するようにする。
また、領域701aのセルに記憶すべき値を決めるために算出したノートナンバの差の数(すなわち、領域701aのセルに対応する小節にある"五線譜301とタブ譜302の"音符の数)が閾値以下である場合には、当該セルの値を空欄にしてもよい。このようにすれば、五線譜301におけるパターンマッチングの誤認識による影響を低減することができる。この場合、当該ノートナンバの差の数を各セルに記憶し、各セルにおけるノートナンバの差の数を容易に判別できるようにしてもよい。
When there are a plurality of maximum values of the same number of note numbers, the smaller value is selected, for example.
The number of note number differences calculated to determine the value to be stored in the cell in the area 701a (that is, the number of “notes in the staff 301 and tab 302” in the bar corresponding to the cell in the area 701a) is calculated. When the value is equal to or less than the threshold value, the value of the cell may be blank. In this way, it is possible to reduce the influence of pattern matching erroneous recognition in the staff 301. In this case, the number of note number differences may be stored in each cell so that the number of note number differences in each cell can be easily determined.

次に、ステップS16において、CPU1は、チューニング情報修正処理を行う。このチューニング情報修正処理では、ステップS15で作成したノートナンバ比較表701に基づいて、タブ譜302に対して適用されたパートテンプレート401内のタブ譜チューニング情報408を修正するか否かを判定し、修正する必要がある場合には修正する。このチューニング情報修正処理の詳細については後述する。
次に、ステップS17において、CPU1は、ステップS16のチューニング情報修正処理の結果、タブ譜チューニング情報408が変更されたか否かを判定する。この判定の結果、タブ譜チューニング情報408が変更された場合には、ステップS18に進む。ステップS18に進むと、CPU1は、タブ譜302の音符のノートナンバを、変更されたタブ譜チューニング情報408に基づいて再算出する。そして、ステップS19に進む。
一方、タブ譜チューニング情報408が変更されなかった場合には、ステップS18を省略してステップS19に進む。
Next, in step S16, the CPU 1 performs tuning information correction processing. In this tuning information correction process, it is determined whether or not to correct the tab score tuning information 408 in the part template 401 applied to the tab score 302 based on the note number comparison table 701 created in step S15. If it is necessary to correct it, correct it. Details of this tuning information correction processing will be described later.
Next, in step S17, the CPU 1 determines whether or not the tablature tuning information 408 has been changed as a result of the tuning information correction processing in step S16. If the result of this determination is that the tablature tuning information 408 has been changed, the process proceeds to step S18. In step S18, the CPU 1 recalculates the note numbers of the notes of the tablature 302 based on the changed tablature tuning information 408. Then, the process proceeds to step S19.
On the other hand, if the tablature tuning information 408 has not been changed, step S18 is omitted and the process proceeds to step S19.

ステップS19に進むと、CPU1は、図7(b)に示すようなノートナンバ比較表を作成する。
まず、CPU1は、図7(a)に示したノートナンバ比較表701を作成したときと同様に、各弦、各小節により特定されるセルに、ノートナンバの差が同値であるものの数の最大値を記憶する。
その後、CPU1は、全ての弦のセルに記憶された値の平均値を小節毎に算出し、算出した値をノートナンバ比較表702の領域702aに記憶する。例えば、小節1における弦1〜6の値が夫々「1」、「1」、「2」、「2」、「3」、「3」である場合には、領域702aの小節1に対応するセルには「2(=((1+1+2+2+3+3)/6))」が記憶される。
In step S19, the CPU 1 creates a note number comparison table as shown in FIG.
First, as in the case of creating the note number comparison table 701 shown in FIG. 7A, the CPU 1 determines the maximum number of cells having the same note number difference in the cells specified by each string and each measure. Store the value.
Thereafter, the CPU 1 calculates the average value of the values stored in all the string cells for each bar, and stores the calculated value in the area 702a of the note number comparison table 702. For example, when the values of the strings 1 to 6 in the bar 1 are “1”, “1”, “2”, “2”, “3”, and “3”, they correspond to the bar 1 in the area 702a. “2 (= ((1 + 1 + 2 + 2 + 3 + 3) / 6))” is stored in the cell.

そして、CPU1は、以上のようにして領域702aに記憶した値が閾値以上である小節が連続して存在しているか否かを判定する。この判定の結果、領域702aに記憶した値が閾値以上である小節が連続して存在している場合、当該連続している小節のセルに対して記憶された値の平均値を弦毎に算出する。領域702aに記憶した値が閾値以上である小節が、小節10〜15であるとした場合、グレーで表示されている小節10〜15の値の弦毎の平均値が領域702bに記憶される。   Then, the CPU 1 determines whether or not there are consecutive bars whose values stored in the region 702a are equal to or greater than the threshold value as described above. As a result of this determination, if there are consecutive bars whose values stored in the region 702a are equal to or greater than the threshold, the average value of the values stored for the cells of the continuous bars is calculated for each string. To do. When the measure whose value stored in the region 702a is equal to or greater than the threshold is the measures 10-15, the average value for each string of the values of the measures 10-15 displayed in gray is stored in the region 702b.

次に、ステップS20において、CPU1は、ステップS19で作成されたノートナンバ比較表702に基づいて、音部記号誤認識領域が検出されたか否かを判定する。ここで、音部記号誤認識領域とは、パターンマッチングでは音部記号が存在していないと認識されたが、本来は音部記号が存在している"五線譜301の領域"をいう。具体的には、例えば、領域702bを算出した小節(図7(b)のグレーで表示した部分に対応する小節)のうち最初の小節の先頭部分の所定の領域が、音部記号誤認識領域となる。   Next, in step S20, the CPU 1 determines whether or not a clef erroneous recognition area has been detected based on the note number comparison table 702 created in step S19. Here, the clef symbol misrecognition region refers to a “stave 301 region” in which a clef symbol is recognized but no clef symbol is present in the pattern matching. Specifically, for example, a predetermined region at the beginning of the first measure in the measure for which the region 702b is calculated (the measure corresponding to the portion displayed in gray in FIG. 7B) is a clef symbol misrecognition region. It becomes.

このステップS20の処理の具体例を説明すると、まず、CPU1は、ステップS19で作成されたノートナンバ比較表702を参照し、領域702bに記憶された値のばらつき(最大値と最小値との差、もしくは標準偏差)が閾値以下(所定の範囲内)であるか否かを判定する。この判定の結果、領域702bに記憶された値のばらつきが閾値以下である場合に、音部記号誤認識領域が検出されたと判定し、そうでない場合に音部記号誤認識領域が検出されなかったと判定する。   A specific example of the processing in step S20 will be described. First, the CPU 1 refers to the note number comparison table 702 created in step S19, and varies the values stored in the area 702b (difference between the maximum value and the minimum value). Or standard deviation) is determined to be less than or equal to a threshold value (within a predetermined range). As a result of the determination, when the variation in the value stored in the area 702b is equal to or less than the threshold value, it is determined that the clef misrecognition area is detected, and if not, the clef misrecognition area is not detected. judge.

この判定の結果、音部記号誤認識領域が検出されなかった場合には、ステップS21、S22を省略して後述するステップS23に進む。一方、音部記号誤認識領域が検出された場合には、ステップS21に進む。
ステップS21に進むと、CPU1は、五線譜301のパターンマッチングによる認識の結果を変更する。このステップS21の処理の具体例を説明すると、まず、CPU1は、領域702bを算出した小節(図7(b)のグレーで表示した部分に対応する小節)における音高の平均を算出する。そして、CPU1は、その平均と、当該小節よりも前の小節に適用されている音部記号とに基づいて、当該小節(図7(b)のグレーで表示した部分に対応する小節)に適用される音部記号を推定する。CPU1は、その推定した音部記号を、音部記号認識領域に追加する。
If the result of this determination is that a clef misrecognition area has not been detected, steps S21 and S22 are omitted and the process proceeds to step S23, which will be described later. On the other hand, if a clef erroneous recognition area is detected, the process proceeds to step S21.
In step S21, the CPU 1 changes the result of recognition by pattern matching of the staff 301. A specific example of the process in step S21 will be described. First, the CPU 1 calculates the average pitch of the bars in which the area 702b is calculated (the bar corresponding to the portion displayed in gray in FIG. 7B). Then, the CPU 1 applies to the measure (the measure corresponding to the portion displayed in gray in FIG. 7B) based on the average and the clef applied to the measure before the measure. Estimate the clef to be played. The CPU 1 adds the estimated clef to the clef recognition area.

尚、図2のステップS4のパート認識処理における音楽記号認識処理で行われたパターンマッチングの結果、マッチング度(得点)が閾値以上でない音楽記号のうち、マッチング度(得点)が最も高い音楽記号を識別するための次点IDが、音部記号認識領域に対して記憶されている場合には、以上のようにして推定した音部記号と次点IDで識別される音楽記号とが一致した場合に限り、推定した音部記号を、音部記号認識領域に追加するようにしてもよい。ここでは、次点IDは、パターンマッチングではマッチング度(得点)が閾値以上でないために認識されない音楽記号のうち、該当する可能性が最も高い音楽記号を識別するためのものである。   Note that, as a result of pattern matching performed in the music symbol recognition process in the part recognition process of step S4 in FIG. 2, the music symbol having the highest matching degree (score) among the music symbols whose matching degree (score) is not equal to or greater than the threshold value. When the next point ID for identification is stored in the clef recognition area, the clef estimated as described above matches the music symbol identified by the next point ID. Only the estimated clef may be added to the clef recognition area. Here, the next point ID is used to identify a music symbol that is most likely to be applicable among music symbols that are not recognized because the degree of matching (score) is not equal to or greater than a threshold in pattern matching.

次に、ステップS22において、CPU1は、ステップS21で変更した音部記号に基づいて、当該音部記号が適用される小節の音符の音高に関する情報を変更する。そして、ステップS23に進む。
ステップS23に進むと、CPU1は、タブ譜数字修正処理を行う。このタブ譜数字修正処理では、五線譜301の音符のノートナンバと、タブ譜302の音符のノートナンバとの差が閾値以上である場合に、五線譜301の音符のノートナンバにタブ譜の音符のノートナンバを合わせて変更する。このタブ譜数字修正処理の詳細については後述する。
次に、ステップS24において、CPU1は、その他の処理を行い、図6のフローチャートによる処理を終了する。
Next, in step S22, CPU1 changes the information regarding the pitch of the note of the bar to which the clef is applied based on the clef changed in step S21. Then, the process proceeds to step S23.
In step S23, the CPU 1 performs a tab score correction process. In this tablature number correction process, if the difference between the note number of the note on the staff 301 and the note number of the note on the tablature 302 is greater than or equal to the threshold value, the note number of the tab staff is added to the note number of the note on the staff 301. Change the number together. Details of the tablature number correction process will be described later.
Next, in step S24, the CPU 1 performs other processing and ends the processing according to the flowchart of FIG.

次に、図8のフローチャートを参照しながら、図6のステップS13の前パート参照情報取得処理の一例を説明する。
まず、ステップS101において、CPU1は、タブ譜302の処理対象の音符が属する小節番号を変数nMeasureTに代入する。
次に、ステップS102において、CPU1は、変数nMeasureTで特定されるタブ譜302の小節の右端(当該小節の後ろの小節線の位置)から、音符タブ譜302の処理対象の音符までの横方向における最短距離を求め、求めた距離を変数xTに代入する。尚、図8のフローチャートの説明において、横方向における最短距離を必要に応じて最短距離と称する。
Next, an example of the previous part reference information acquisition process in step S13 in FIG. 6 will be described with reference to the flowchart in FIG.
First, in step S101, the CPU 1 substitutes the variable nMeasureT for the measure number to which the note to be processed of the tablature 302 belongs.
Next, in step S102, the CPU 1 in the horizontal direction from the right end of the measure of the tablature 302 specified by the variable nMeasureT (the position of the bar line after the measure) to the processing target note of the note tablature 302. The shortest distance is obtained, and the obtained distance is substituted into the variable xT. In the description of the flowchart of FIG. 8, the shortest distance in the horizontal direction is referred to as the shortest distance as necessary.

次に、ステップS103において、CPU1は、変数nMeasureTで特定される五線譜301の小節であって、処理対象の音符が属するタブ譜302と対になっている五線譜301の小節において、当該小節の右端からの最短距離xBが変数xTに最も近い音符を検出する。
次に、ステップS104において、CPU1は、変数xTと最短距離xBとの差の絶対値(=|xT−xB|)が閾値以下である音符が五線譜301から検出されたか否かを判定する。この判定の結果、変数xTと最短距離xBとの差の絶対値(=|xT−xB|)が閾値以下である音符が五線譜301から検出されなかった場合には、後述するステップS110に進む。一方、変数xTと最短距離xBとの差の絶対値(=|xT−xB|)が閾値以下である音符が五線譜301から検出された場合には、ステップS105に進む。
Next, in step S103, the CPU 1 starts from the right end of the bar of the staff 301 that is the bar of the staff 301 specified by the variable nMeasureT and that is paired with the tablature 302 to which the note to be processed belongs. A note whose shortest distance xB is closest to the variable xT is detected.
Next, in step S <b> 104, the CPU 1 determines whether or not a note whose absolute value (= | xT−xB |) of the difference between the variable xT and the shortest distance xB is equal to or less than a threshold is detected from the staff 301. As a result of the determination, if a note whose absolute value (= | xT−xB |) of the difference between the variable xT and the shortest distance xB is not greater than the threshold is not detected from the staff 301, the process proceeds to step S110 described later. On the other hand, if a note whose absolute value (= | xT−xB |) of the difference between the variable xT and the shortest distance xB is less than or equal to the threshold is detected from the staff 301, the process proceeds to step S105.

ステップS105に進むと、CPU1は、タブ譜302の処理対象の音符と、五線譜301の当該音符と対になる音符とのうち、少なくとも何れか一方が和音であるか否かを判定する。この判定の結果、タブ譜302の処理対象の音符と、五線譜301の当該音符と対になる音符との双方が和音でない場合には、後述するステップS111に進む。
一方、タブ譜302の処理対象の音符と、五線譜301の当該音符と対になる音符とのうち、少なくとも何れか一方が和音である場合には、ステップS106に進む。
In step S105, the CPU 1 determines whether or not at least one of the note to be processed in the tablature 302 and the note paired with the note in the staff 301 is a chord. As a result of the determination, if both the note to be processed in the tablature 302 and the note paired with the note in the staff 301 are not chords, the process proceeds to step S111 described later.
On the other hand, if at least one of the note to be processed in the tablature 302 and the note paired with the note in the staff 301 is a chord, the process proceeds to step S106.

ステップS106に進むと、CPU1は、タブ譜302の処理対象の音符のノートナンバと、五線譜301の当該音符と対になる音符のノートナンバとの差が最も小さくなる音符の組み合わせを、例えば、順列・組み合わせの計算を行って検出する。
例えば、図3(b)に示すように、タブ譜302の処理対象の和音の構成音の数が、五線譜301の当該和音と対になる和音の構成音の数と同じ場合、タブ譜302の音符312、313と、五線譜301の音符310、311とを組み合わせる。例えば、タブ譜302の音符313のノートナンバと、五線譜301の音符311のノートナンバとの差が、タブ譜302の音符312のノートナンバと、五線譜301の音符311のノートナンバとの差よりも小さく、タブ譜302の音符312のノートナンバと、五線譜301の音符310のノートナンバとの差が、タブ譜302の音符313のノートナンバと、五線譜301の音符310のノートナンバとの差よりも小さい場合には、タブ譜302の音符313と、五線譜301の音符311との組み合わせと、タブ譜302の音符312と、五線譜301の音符310との組み合わせとが検出される。
In step S106, the CPU 1 selects a combination of notes that minimizes the difference between the note number of the note to be processed in the tablature 302 and the note number of the note paired with the note in the staff 301, for example, a permutation.・ Detect by performing combination calculation.
For example, as shown in FIG. 3B, when the number of constituents of the chord to be processed in the tablature 302 is the same as the number of constituents of the chord paired with the chord in the staff 301, The notes 312 and 313 and the notes 310 and 311 of the staff 301 are combined. For example, the difference between the note number of the note 313 on the tablature 302 and the note number of the note 311 on the staff 301 is greater than the difference between the note number on the note 312 on the tablature 302 and the note number of the note 311 on the staff 301. The difference between the note number of the note 312 of the tablature 302 and the note number of the note 310 of the staff 301 is smaller than the difference between the note number of the note 313 of the tablature 302 and the note number of the note 310 of the staff 301. If it is smaller, the combination of the note 313 of the tablature 302 and the note 311 of the staff 301, the combination of the note 312 of the tablature 302 and the note 310 of the staff 301 are detected.

また、図3(c)に示すように、タブ譜302の処理対象の和音の構成音の数が、五線譜301の当該和音と対になる和音の構成音の数よりも少ない場合、タブ譜302の音符316と、五線譜301の音符314、315の何れかとを組み合わせる。例えば、タブ譜302の音符316のノートナンバと、五線譜301の音符314のノートナンバとの差が、タブ譜302の音符316のノートナンバと、五線譜301の音符315のノートナンバとの差よりも小さい場合、タブ譜302の音符316と、五線譜301の音符314との組み合わせが検出される。   Further, as shown in FIG. 3C, when the number of constituent sounds of the chord to be processed in the tablature 302 is smaller than the number of constituent sounds of the chord paired with the chord in the staff 301, the tablature 302 is displayed. Are combined with any one of the notes 314 and 315 of the staff 301. For example, the difference between the note number of the note 316 of the tablature 302 and the note number of the note 314 of the staff 301 is greater than the difference between the note number of the note 316 of the tablature 302 and the note number of the note 315 of the staff 301. If it is smaller, the combination of the note 316 on the tablature 302 and the note 314 on the staff 301 is detected.

また、図3(d)に示すように、タブ譜302の処理対象の和音の構成音の数が、五線譜301の当該和音と対になる和音の構成音の数よりも多い場合、タブ譜302の音符318、319の何れかと、五線譜301の音符317とを組み合わせる。例えば、タブ譜302の音符319のノートナンバと、五線譜301の音符317のノートナンバとの差が、タブ譜302の音符318のノートナンバと、五線譜301の音符317のノートナンバとの差よりも小さい場合、タブ譜302の音符319と、五線譜301の音符317との組み合わせが検出される。   Further, as shown in FIG. 3D, when the number of constituent sounds of the chord to be processed in the tablature 302 is larger than the number of constituent sounds of the chord paired with the chord in the staff 301, the tablature 302 is displayed. Are combined with any one of the notes 318 and 319. For example, the difference between the note number of the note 319 of the tablature 302 and the note number of the note 317 of the staff 301 is greater than the difference between the note number of the note 318 of the tablature 302 and the note number of the note 317 of the staff 301. If it is smaller, the combination of the note 319 of the tablature 302 and the note 317 of the staff 301 is detected.

以上のようにして、タブ譜302の処理対象の音符のノートナンバと、五線譜301の当該音符と対になる音符のノートナンバとの差が最も小さくなる音符の組み合わせが検出されると、ステップS107に進む。ステップS107に進むと、CPU1は、検出された組み合わせに基づいて、五線譜301の音符のインデックス情報を、タブ譜302の当該音符と組み合わさった音符の情報に追加する。   As described above, when a note combination in which the difference between the note number of the note to be processed in the tablature 302 and the note number of the note paired with the note in the staff 301 is the smallest is detected, step S107. Proceed to In step S107, the CPU 1 adds the note index information of the staff 301 to the note information combined with the note of the tab staff 302 based on the detected combination.

尚、五線譜301の音符のインデックス情報は、タブ譜302の音符を識別できる情報であれば、必ずしもタブ譜302の音符の情報に追加しなくてもよい。
この場合、タブ譜302の処理対象の和音の構成音の1つの情報に、五線譜301の当該1つの構成音と組み合わさった音符のインデックス情報を追加することができる。このようにタブ譜302の処理対象の和音の構成音の1つの情報に、五線譜301の当該1つの構成音と組み合わさった音符のインデックス情報を追加することは、タブ譜302の処理対象の和音の構成音の数と、五線譜301の当該和音と対になる和音の構成音の数とが同じ場合であっても、違う場合であっても実現することができる。
Note that the note index information of the staff 301 is not necessarily added to the note information of the tab staff 302 as long as it is information that can identify the notes of the tab staff 302.
In this case, the index information of the note combined with the one constituent sound of the staff 301 can be added to the information of the constituent sound of the chord to be processed in the tablature 302. In this way, adding the index information of the notes combined with the one constituent sound of the staff 301 to the information of the constituent sound of the chord to be processed of the tablature 302 is the chord to be processed of the tablature 302. This can be realized regardless of whether the number of constituent sounds of the chord and the number of constituent sounds of the chord paired with the chord of the staff 301 are the same or different.

次に、ステップS108において、CPU1は、タブ譜302の処理対象の音符の情報に、処理済フラグを代入する。
次に、ステップS109において、CPU1は、タブ譜302の全ての音符について処理を行ったか否かを判定する。この判定の結果、タブ譜302の全ての音符について処理を行っていない場合には、タブ譜302の次の処理対象の音符を選択してステップS101以降の処理を行う。一方、タブ譜302の全ての音符について処理を行った場合には、図8のフローチャートによる処理を終了する。
Next, in step S <b> 108, the CPU 1 assigns a processed flag to the information on the notes to be processed in the tablature 302.
Next, in step S109, the CPU 1 determines whether or not processing has been performed for all the notes of the tablature 302. If the result of this determination is that processing has not been performed for all the notes on the tablature 302, the next processing target note on the tablature 302 is selected and the processing from step S101 onward is performed. On the other hand, when all the notes on the tablature 302 have been processed, the processing according to the flowchart of FIG.

前述したように、ステップS104において、変数xTと最短距離xBとの差の絶対値(=|xT−xB|)が閾値以下である音符が五線譜301から検出されなかったと判定された場合には、ステップS110に進む。ステップS110に進むと、CPU1は、変数nMeasureTで特定される五線譜301の小節であって、処理対象の音符が属するタブ譜302と対になっている五線譜301の小節において、当該小節の右端からの最短距離xBが変数xTに最も近い"音符以外の音楽記号"を検出する。そして、ステップS111に進む。
ステップS111に進むと、CPU1は、ステップS103又はS110で検出された音符又は音符以外の音楽記号のインデックス情報を、タブ譜302の"当該音符又は音符以外の音楽記号と対となる音符"の情報に代入する。そして、前述したステップS108に進む。
As described above, when it is determined in step S104 that a note whose absolute value (= | xT−xB |) of the difference between the variable xT and the shortest distance xB is equal to or less than the threshold is not detected from the staff 301, Proceed to step S110. When proceeding to step S110, the CPU 1 starts from the right end of the measure in the measure of the staff 301 that is paired with the tablature 302 to which the note to be processed belongs, which is the measure of the staff 301 specified by the variable nMeasureT. The “musical symbols other than notes” whose shortest distance xB is closest to the variable xT are detected. Then, the process proceeds to step S111.
In step S111, the CPU 1 uses the index information of the musical symbol other than the note or the note detected in step S103 or S110 as the information on "the musical note paired with the musical symbol other than the note or the musical note" in the tablature 302. Assign to. Then, the process proceeds to step S108 described above.

次に、図9のフローチャートを参照しながら、図6のステップS16におけるチューニング情報修正処理の一例を説明する。
まず、ステップS201において、タブ譜302の音符のノートナンバと、当該タブ譜302と対になる五線譜301の音符のノートナンバとの差が「0」と見なせるか否かを判定する。このステップS201の処理の具体例を説明すると、図7(a)に示したノートナンバ比較表701の領域701bに記憶されている値の全てが0である場合に、タブ譜302の音符のノートナンバと、当該タブ譜302と対になる五線譜301の音符のノートナンバとの差が「0」と見なせると判定し、そうでない場合に、「0」と見なせないと判定する。
Next, an example of the tuning information correction process in step S16 in FIG. 6 will be described with reference to the flowchart in FIG.
First, in step S 201, it is determined whether or not the difference between the note number of the note on the tablature 302 and the note number of the note on the staff 301 that is paired with the tablature 302 can be regarded as “0”. A specific example of the process in step S201 will be described. When all the values stored in the area 701b of the note number comparison table 701 shown in FIG. It is determined that the difference between the number and the note number of the note of the staff 301 that is paired with the tablature 302 can be regarded as “0”, otherwise, it is determined that it cannot be regarded as “0”.

この判定の結果、タブ譜302の音符のノートナンバと、当該タブ譜302と対になる五線譜301の音符のノートナンバとの差が「0」と見なせる場合には、図9のフローチャートによる処理を終了する。
一方、タブ譜302の音符のノートナンバと、当該タブ譜302と対になる五線譜301の音符のノートナンバとの差が「0」と見なせない場合には、ステップS202に進む。ステップS202に進むと、CPU1は、タブ譜302の弦を識別するための変数iに1を代入する。
As a result of the determination, if the difference between the note number of the note on the tablature 302 and the note number of the note on the staff 301 that is paired with the tablature 302 can be regarded as “0”, the processing according to the flowchart of FIG. finish.
On the other hand, if the difference between the note number of the note on the tablature 302 and the note number of the note on the staff 301 that is paired with the tablature 302 cannot be regarded as “0”, the process proceeds to step S202. In step S202, the CPU 1 substitutes 1 for a variable i for identifying a string of the tablature 302.

次に、ステップS203において、CPU1は、変数iにより識別される弦におけるノートナンバの差が閾値Thrよりも小さいとみなせるか否かを判定する。このステップS203の処理の具体例を説明すると、ノートナンバ比較表701の領域701bのうち、変数iにより識別される弦に対応するセルに記憶されている値が閾値Thrよりも小さい場合に、変数iにより識別される弦におけるノートナンバの差が閾値Thrよりも小さいとみなせると判定し、そうでない場合にみなせないと判定する。閾値Thrとしては、1や2を採用することができる。このようにすれば、パターンマッチングによる臨時記号や調号の誤認識等によってノートナンバに誤差が生じていても適切に処理を行うことができる。   Next, in step S203, the CPU 1 determines whether or not it can be considered that the difference of the note numbers in the strings identified by the variable i is smaller than the threshold value Thr. A specific example of the process of step S203 will be described. When the value stored in the cell corresponding to the string identified by the variable i in the area 701b of the note number comparison table 701 is smaller than the threshold Thr, the variable It is determined that the note number difference in the string identified by i can be considered to be smaller than the threshold value Thr, and otherwise, it is determined that it cannot be considered. As the threshold Thr, 1 or 2 can be adopted. In this way, even if there is an error in the note number due to erroneous recognition of a temporary symbol or key signature by pattern matching, it is possible to appropriately perform processing.

この判定の結果、変数iにより識別される弦におけるノートナンバの差が閾値Thrよりも小さいとみなせない場合には、ステップS204を省略して、後述するステップS205に進む。一方、変数iにより識別される弦におけるノートナンバの差が閾値Thrよりも小さいとみなせる場合には、ステップS204に進む。
ステップS204に進むと、CPU1は、タブ譜302に対して適用されているパートテンプレート401内のタブ譜チューニング情報408のうち、変数iにより識別される弦の情報に、変数iにより識別される弦におけるノートナンバの差(ノートナンバ比較表701の領域701bのうち、変数iにより識別される弦に対応するセルに記憶されている値)を加算する。
As a result of this determination, if it cannot be considered that the difference of the note number in the string identified by the variable i is smaller than the threshold value Thr, the process skips step S204 and proceeds to step S205 described later. On the other hand, if the note number difference in the string identified by the variable i can be considered to be smaller than the threshold value Thr, the process proceeds to step S204.
In step S204, the CPU 1 sets the string information identified by the variable i to the string information identified by the variable i in the tab score tuning information 408 in the part template 401 applied to the tab score 302. Note number difference (value stored in the cell corresponding to the string identified by the variable i in the area 701b of the note number comparison table 701) is added.

尚、ここでは、ノートナンバ比較表701の領域701bのうち、変数iにより識別される弦に対応するセルに記憶されている値を加算するようにしたが、必ずしもこのようにする必要はない。例えば、ノートナンバの差と、タブ譜チューニング情報408を変更すべき値とを相互に対応付けてライブラリとして記憶しておく。そして、変数iにより識別される弦に対応する"領域702bのセル"に記憶されている値に最も近いノートナンバの差を、このライブラリから検索する。そして、検索したノートナンバの差に対応付けられてライブラリに登録されている値を、タブ譜チューニング情報408に設定するようにしてもよい。   Here, in the area 701b of the note number comparison table 701, the value stored in the cell corresponding to the string identified by the variable i is added, but this is not necessarily required. For example, a note number difference and a value to be changed in the tablature tuning information 408 are stored in association with each other as a library. Then, the note number difference closest to the value stored in the “cell in region 702b” corresponding to the string identified by the variable i is searched from this library. Then, a value registered in the library in association with the searched note number difference may be set in the tablature tuning information 408.

次に、ステップS205において、CPU1は、変数iが、タブ譜302の弦に対応する横線の総数であるか否かを判定する。この判定の結果、変数iが、タブ譜302の弦に対応する横線の総数でない場合には、ステップS206に進み、変数iに1を加算して、ステップS203に戻る。一方、変数iが、タブ譜302の弦に対応する横線の総数である場合には、ステップS207に進む。尚、図3、図5に示した例では、タブ譜302の弦に対応する横線の総数は「6」になる。   Next, in step S <b> 205, the CPU 1 determines whether or not the variable i is the total number of horizontal lines corresponding to the strings of the tablature 302. As a result of the determination, if the variable i is not the total number of horizontal lines corresponding to the strings of the tablature 302, the process proceeds to step S206, 1 is added to the variable i, and the process returns to step S203. On the other hand, if the variable i is the total number of horizontal lines corresponding to the strings of the tablature 302, the process proceeds to step S207. In the example shown in FIGS. 3 and 5, the total number of horizontal lines corresponding to the strings of the tablature 302 is “6”.

ステップS207に進むと、CPU1は、ステップS204で修正した後のタブ譜チューニング情報408が単純変化しているか否かを判定する。ここで、単純変化とは、図5に示すように、弦の番号の増加に伴い、タブ譜チューニング情報408の値が単純に変化(減少又は増加)していることをいう。尚、タブ譜チューニング情報408の複数の弦における値が同じである場合も、ステップS204で修正した後のタブ譜チューニング情報408が単純変化していないとする。この判定の結果、ステップS204で修正した後のタブ譜チューニング情報408が単純変化している場合には、図9のフローチャートによる処理を終了する。   In step S207, the CPU 1 determines whether or not the tablature tuning information 408 that has been corrected in step S204 has simply changed. Here, the simple change means that the value of the tablature tuning information 408 simply changes (decreases or increases) as the number of strings increases as shown in FIG. Even when the values of the plurality of strings in the tablature tuning information 408 are the same, it is assumed that the tablature tuning information 408 after the correction in step S204 does not change simply. As a result of this determination, if the tablature tuning information 408 that has been corrected in step S204 has simply changed, the process according to the flowchart of FIG. 9 ends.

一方、ステップS204で修正した後のタブ譜チューニング情報408が単純変化していない場合には、ステップS208に進む。ステップS208に進むと、CPU1は、タブ譜チューニング情報408を修正前のものに戻すか否かを判定する。このステップS208の処理の具体例を説明すると、タブ譜302の弦の数が、タブ譜チューニング情報408が単純変化しないことが考えられる楽器(4弦ウクレレ)に対応する数である場合には、タブ譜チューニング情報408を修正前のものに戻さないと判定する。また、タブ譜302が、タブ譜302の弦の数が、タブ譜チューニング情報408が単純変化しないことが考えられる楽器に対応する数でない場合には、タブ譜チューニング情報408を修正前のものに戻すと判定する。   On the other hand, if the tablature tuning information 408 that has been corrected in step S204 has not simply changed, the process proceeds to step S208. In step S208, the CPU 1 determines whether to return the tablature tuning information 408 to the one before correction. A specific example of the process of step S208 will be described. When the number of strings in the tablature 302 is a number corresponding to an instrument (four-string ukulele) for which the tablature tuning information 408 is considered not to change simply, It is determined that the tablature tuning information 408 is not returned to the one before correction. Further, when the tablature 302 is not the number corresponding to an instrument for which the tablature tuning information 408 is considered not to change simply, the tablature tuning information 408 is changed to the one before correction. Determine to return.

この判定の結果、タブ譜チューニング情報408を修正前のものに戻さない場合には、図9のフローチャートによる処理を終了する。一方、タブ譜チューニング情報408を修正前のものに戻す場合には、ステップS209に進む。ステップS209に進むと、CPU1は、ステップS204で修正した後のタブ譜チューニング情報408を修正前の値に戻す。そして、図9のフローチャートによる処理を終了する。   As a result of this determination, if the tablature tuning information 408 is not returned to the one before correction, the processing according to the flowchart of FIG. 9 is terminated. On the other hand, when returning the tablature tuning information 408 to the one before correction, the process proceeds to step S209. In step S209, the CPU 1 returns the tablature tuning information 408 corrected in step S204 to the value before correction. And the process by the flowchart of FIG. 9 is complete | finished.

次に、図10のフローチャートを参照しながら、図6のステップS23のタブ譜数字修正処理の一例を説明する。
まず、CPU1は、タブ譜302の音符のノートナンバNoteTabと、図6のステップS13(図8)の前パート参照情報取得処理で当該音符の情報に追加された"五線譜301の音符のノートナンバNoteBef"との差の絶対値が、閾値NoteDiffThrよりも大きいか否かを判定する。この判定の結果、タブ譜302の音符のノートナンバNoteTabと、五線譜301の音符のノートナンバNoteBefとの差の絶対値が、閾値NoteDiffThrよりも大きくない場合には、タブ譜302の数字の修正を行わず、後述するステップS311に進む。一方、タブ譜302の音符のノートナンバNoteTabと、五線譜301の音符のノートナンバNoteBefとの差の絶対値が、閾値NoteDiffThrよりも大きい場合には、ステップS302に進む。
Next, an example of the tab score correction process in step S23 of FIG. 6 will be described with reference to the flowchart of FIG.
First, the CPU 1 adds the note number NoteTab of the note in the tablature 302 and the note number NoteBef of the note in the staff 301 added to the note information in the previous part reference information acquisition process in step S13 (FIG. 8) in FIG. It is determined whether or not the absolute value of the difference from “is greater than the threshold NoteDiffThr. If the absolute value of the difference between the note number NoteTab of the note on the tablature 302 and the note number NoteBef of the note on the staff 301 is not greater than the threshold NoteDiffThr, the number of the tablature 302 is corrected. The process proceeds to step S311 to be described later. On the other hand, if the absolute value of the difference between the note number NoteTab of the note on the tablature 302 and the note number NoteBef of the note on the staff 301 is greater than the threshold NoteDiffThr, the process proceeds to step S302.

尚、タブ譜302の音符が和音であり、当該音符の情報に、当該和音と対となる和音の構成音の1つの情報しか含まれていない場合には、図2のステップS4のパート認識処理等で得られる音符の出現タイミングを示す情報に基づいて、タブ譜302の和音の構成音と対になる五線譜301の和音の構成音のノートナンバを抽出する。そして、図3(c)、図3(d)に示すように、パート認識処理におけるパターンマッチングによる認識の結果、タブ譜302の和音の構成音と、当該和音と対になる五線譜301の和音の構成音とが異なる場合には、図8のステップS106で説明したように、例えば、順列・組み合わせの計算を行って、タブ譜302の処理対象の音符のノートナンバと、五線譜301の当該音符と対になる音符のノートナンバとの差が最も小さくなる音符の組み合わせを検出する。そして、検出した音符同士でノートナンバの差を算出する。ここで、タブ譜302の音符と対となる五線譜301の音符が存在しない場合には、当該タブ譜302の音符についての数字の変更は行わないようにする。   Note that if the note of the tablature 302 is a chord and the information on the note contains only one piece of information on the chord that is paired with the chord, the part recognition process in step S4 in FIG. Based on the information indicating the appearance timing of notes obtained by the above method, the note number of the chord component sound of the staff 301 that is paired with the chord component sound of the tablature 302 is extracted. Then, as shown in FIGS. 3C and 3D, as a result of recognition by pattern matching in the part recognition process, the chord component of the tablature 302 and the chord of the stave 301 paired with the chord are obtained. When the constituent sounds are different, as described in step S106 in FIG. 8, for example, permutation / combination calculation is performed, and the note number of the note to be processed in the tablature 302 and the note in the staff 301 are A combination of notes with the smallest difference from the note number of the paired notes is detected. Then, a note number difference is calculated between the detected notes. Here, when there is no note of the staff 301 that is paired with the note of the tablature 302, the number of the note of the tablature 302 is not changed.

ステップS302に進むと、CPU1は、五線譜301の音符のノートナンバNoteBefから、タブ譜302の処理対象の音符に適用されるタブ譜チューニング情報408(Tuning[Loc])を減算した値を、タブ譜302の処理対象の音符の新たな数字NewNumTabとする。尚、図6のステップS16(図9)において、タブ譜チューニング情報408が修正された場合には、このステップS302において、修正された後のタブ譜チューニング情報408が用いられる。
次に、ステップS303において、CPU1は、タブ譜302の処理対象の音符の新たな数字NewNumTabが0よりも大きく28よりも小さいか否かを判定する。この判定の結果、タブ譜302の音符の新たなノートナンバNewNoteTabが0よりも大きく28よりも小さい場合には、ステップS304を省略して後述するステップS305に進む。
In step S302, the CPU 1 subtracts the tablature tuning information 408 (Tuning [Loc]) applied to the note to be processed in the tablature 302 from the note number NoteBef of the note in the staff 301. A new number NewNumTab of the note to be processed 302 is set. If the tab score tuning information 408 is corrected in step S16 (FIG. 9) in FIG. 6, the corrected tab score tuning information 408 is used in step S302.
Next, in step S303, the CPU 1 determines whether or not the new number NewNumTab of the note to be processed in the tablature 302 is greater than 0 and less than 28. If the result of this determination is that the new note number NewNoteTab of the note in the tablature 302 is greater than 0 and less than 28, step S304 is omitted and the process proceeds to step S305 described later.

一方、タブ譜302の処理対象の音符の新たな数字NewNumTabが0よりも大きくなく、28よりも小さくない場合には、ステップS304に進む。ステップS304に進むと、CPU1は、タブ譜302の処理対象の音符の新たな数字NewNumTabの十の位の値を削除する。そして、ステップS305に進む。
ステップS305に進むと、CPU1は、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方を、桁毎に分解する。例えば、ノートナンバが12の場合には、1と2にノートナンバを分解する。
On the other hand, if the new number NewNumTab of the note to be processed in the tablature 302 is not greater than 0 and not less than 28, the process proceeds to step S304. In step S304, the CPU 1 deletes the tens place value of the new number NewNumTab of the note to be processed of the tablature 302. Then, the process proceeds to step S305.
In step S305, the CPU 1 decomposes both the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 for each digit. For example, when the note number is 12, the note number is decomposed into 1 and 2.

次に、ステップS306において、CPU1は、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が二桁か否かを判定する。この判定の結果、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が二桁でない場合には、後述するステップS312に進む。
一方、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が二桁である場合には、ステップS307に進む。ステップS307に進むと、CPU1は、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在するか否かを、各桁でチェックする。
Next, in step S306, the CPU 1 determines whether or not both the original number OldNumTab of the note to be processed of the tablature 302 and the new number NewNumTab of the note to be processed of the tablature 302 are two digits. . As a result of the determination, if both the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 are not two digits, the process proceeds to step S312 described later. .
On the other hand, if both the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 are two digits, the process proceeds to step S307. In step S307, the CPU 1 checks for each digit whether or not there is a corrected number corresponding to the number before correction in a table stored in advance in the HDD 4 or the like.

すなわち、このテーブルには、修正前の数字と修正後の数字とが相互に対応付けられて記憶されている。具体的に説明すると、このテーブルには、修正前のある数字と、当該修正前のある数字に対して、記号マッチングにより誤認識する可能性のある数字とが、夫々修正前、修正後の数字として相互に対応付けられて記憶されている。
CPU1は、タブ譜302の処理対象の音符の元の数字OldNumTabの一の位の値と一致する修正前の数字と対応付けられている修正後の数字が、タブ譜302の処理対象の音符の新たな数字NewNumTabの一の位の値と一致するかどうかを判定する。この判定の結果、これらが一致する場合には、一の位については、修正前の数字に対応する修正後の数字が存在すると判定し、これらが一致しない場合には、一の位については、修正前の数字に対応する修正後の数字が存在しないと判定する。十の位についても、一の位と同様にしてチェックすることができる。
例えば、タブ譜302の処理対象の音符の元の数字OldNumTabの値が12であり、タブ譜302の処理対象の音符の新たな数字NewNumTabの値が21であり、テーブルには、修正前の数字として1、修正後の数字として2が記憶されているとする。この場合には、十の位については、修正前の数字に対応する修正後の数字が存在すると判定され、一の位については、修正前の数字に対応する修正後の数字が存在しないと判定とされる。
That is, in this table, the numbers before correction and the numbers after correction are stored in association with each other. Specifically, this table shows a number before correction and a number that may be erroneously recognized by symbol matching for the number before correction. Are stored in association with each other.
The CPU 1 determines that the corrected number associated with the uncorrected number that matches the value of the first digit OldNumTab of the note to be processed in the tablature 302 is the value of the note to be processed in the tablature 302. Determine if the new digit NewNumTab matches the one's place value. As a result of this determination, if they match, it is determined that there is a corrected number corresponding to the number before correction for the first place, and if these do not match, It is determined that there is no corrected number corresponding to the number before correction. The tenth place can be checked in the same way as the first place.
For example, the value of the original number OldNumTab of the note to be processed of the tablature 302 is 12, the value of the new number NewNumTab of the note to be processed of the tablature 302 is 21, and the table shows the number before correction. 1 and 2 are stored as corrected numbers. In this case, for the tens place, it is determined that there is a corrected number corresponding to the number before the correction, and for the first place, it is determined that there is no corrected number corresponding to the number before the correction. It is said.

次に、ステップS308において、CPU1は、全ての桁で、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在するか否かを判定する。この判定の結果、全ての桁で、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在しない場合には、後述するステップS311に進む。
一方、全ての桁で、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在する場合には、ステップS309に進む。ステップS309に進むと、タブ譜302の処理対象の音符の新たな数字NewNumTabと、五線譜301の当該音符と対となる音符のノートナンバNoteBef"との差の絶対値が、閾値TabDiffThrよりも小さいか否かを判定する。尚、この閾値TabDiffThrとしては「0」、「1」、又は「2」等を採用することができる。このように閾値TabDiffThrとして「1」以上の値を採用した場合には、臨時記号等の誤認による多少のノートナンバの違いに過剰に反応して、タブ譜302の数字の意図しない変更がなされてしまうことを防止できる。
Next, in step S308, the CPU 1 determines whether or not there is a corrected number corresponding to the number before correction in a table stored in advance in the HDD 4 or the like for all digits. As a result of this determination, if there is no corrected number corresponding to the number before correction in the table stored in advance in the HDD 4 or the like for all the digits, the process proceeds to step S311 described later.
On the other hand, if there is a corrected number corresponding to the number before correction in the table stored in advance in the HDD 4 or the like for all the digits, the process proceeds to step S309. In step S309, the absolute value of the difference between the new number NewNumTab of the note to be processed in the tablature 302 and the note number NoteBef "of the note paired with the note in the staff 301 is smaller than the threshold value TabDiffThr. It should be noted that “0”, “1”, “2” or the like can be adopted as the threshold TabDiffThr. In this way, when a value of “1” or more is adopted as the threshold value TabDiffThr, the number of the tablature 302 is unintentionally changed in response to a slight difference in the note number due to misidentification of a temporary symbol or the like. Can be prevented.

この判定の結果、タブ譜302の処理対象の音符の新たな数字NewNumTabと、五線譜301の当該音符と対となる音符のノートナンバNoteBef"との差の絶対値が、閾値TabDiffThrよりも小さい場合には、ステップS310を省略して後述するステップS311に進む。
一方、タブ譜302の処理対象の音符の新たな数字NewNumTabと、五線譜301の当該音符と対となる音符のノートナンバNoteBef"との差の絶対値が、閾値TabDiffThrよりも小さくない場合には、ステップS310に進む。ステップS310に進むと、CPU1は、タブ譜302の処理対象の音符の情報に含まれる"タブ譜の数字の情報"に、タブ譜302の処理対象の音符の新たな数字NewNumTabを代入する。そして、ステップS311に進む。
As a result of this determination, when the absolute value of the difference between the new number NewNumTab of the note to be processed of the tablature 302 and the note number NoteBef "of the note paired with the note of the staff 301 is smaller than the threshold value TabDiffThr Skips step S310 and proceeds to step S311 described below.
On the other hand, when the absolute value of the difference between the new number NewNumTab of the note to be processed in the tablature 302 and the note number NoteBef "of the note paired with the note in the staff 301 is not smaller than the threshold TabDiffThr, Proceeding to step S310, when proceeding to step S310, the CPU 1 adds a new number NewNumTab of the note to be processed of the tablature 302 to the "numbered tablature information" included in the information of the note to be processed of the tablature 302. Then, the process proceeds to step S311.

ステップS311に進むと、CPU1は、タブ譜302の全ての音符の数字をチェックしたか否かを判定する。この判定の結果、タブ譜302の全ての音符の数字をチェックしていない場合には、次の音符を指定してステップS301以降の処理を再度行う。一方、タブ譜302の全ての音符の数字をチェックした場合には、図10のフローチャートによる処理を終了する。   In step S311, the CPU 1 determines whether or not the numbers of all the notes on the tablature 302 have been checked. If the result of this determination is that the numbers of all the notes on the tablature 302 have not been checked, the next note is designated and the processing from step S301 is performed again. On the other hand, when the numbers of all the notes on the tablature 302 are checked, the processing according to the flowchart of FIG.

前述したように、ステップS306において、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が二桁でないと判定された場合には、ステップS312に進む。ステップS312に進むと、CPU1は、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が一桁であるか否かを判定する。この判定の結果、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が一桁である場合には、前述したステップS307に進む。この場合、ステップS307では、一の位についてのみチェックを行うことになる。   As described above, when it is determined in step S306 that both the original number OldNumTab of the note to be processed of the tablature 302 and the new number NewNumTab of the note to be processed of the tablature 302 are not two digits. Advances to step S312. In step S312, the CPU 1 determines whether both the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 are one digit. To do. As a result of the determination, if both the original number OldNumTab of the note to be processed of the tablature 302 and the new number NewNumTab of the note to be processed of the tablature 302 are one digit, the process proceeds to step S307 described above. move on. In this case, in step S307, only the first place is checked.

一方、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとの双方が一桁でない場合には、それらの一方が二桁であり他方が一桁であると判定して、ステップS313に進む。
ステップS313に進むと、CPU1は、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在するか否かを、一桁の値と二桁の値との間でチェックする。すなわち、CPU1は、タブ譜302の処理対象の音符の元の数字OldNumTabの一の位の値と一致する修正前の数字と対応付けられている修正後の数字が、タブ譜302の処理対象の音符の新たな数字NewNumTabの一の位の値と一致するかどうかを判定する。この判定の結果、これらが一致する場合には、一の位については、修正前の数字に対応する修正後の数字が存在すると判定し、これらが一致しない場合には、一の位については、修正前の数字に対応する修正後の数字が存在しないと判定する。
On the other hand, when both the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 are not one digit, one of them is two digits and the other Is one digit, and the process proceeds to step S313.
In step S313, the CPU 1 determines whether or not there is a corrected number corresponding to the number before correction in a table stored in advance in the HDD 4 or the like, as a one-digit value and a two-digit value. Check in between. That is, the CPU 1 determines that the corrected number associated with the number before correction that matches the value of the original digit OldNumTab of the note to be processed in the tablature 302 is the processing target of the tablature 302. Judges whether the new digit NewNumTab of the note matches the one's place value. As a result of this determination, if they match, it is determined that there is a corrected number corresponding to the number before correction for the first place, and if these do not match, It is determined that there is no corrected number corresponding to the number before correction.

また、タブ譜302の処理対象の音符の元の数字OldNumTabと、タブ譜302の処理対象の音符の新たな数字NewNumTabとのうち、二桁の方の十の位の値と一致する修正前(修正後)の数字と対応付けられている修正後(修正前)の数字が、一桁の方の一の位の数字と一致するかどうかを判定する。この判定の結果、これらが一致する場合には、十の位については、修正前の数字に対応する修正後の数字が存在すると判定し、これらが一致しない場合には、十の位については、修正前の数字に対応する修正後の数字が存在しないと判定する。   Also, before the correction (which matches the tens place value of the two digits of the original number OldNumTab of the note to be processed in the tablature 302 and the new number NewNumTab of the note to be processed in the tablature 302 ( It is determined whether or not the number after correction (before correction) associated with the number after correction matches the number of the first place of one digit. As a result of this determination, if they match, it is determined that there is a corrected number corresponding to the number before correction for the tens place, and if these do not match, It is determined that there is no corrected number corresponding to the number before correction.

例えば、タブ譜302の処理対象の音符の元の数字OldNumTabの値が14であり、タブ譜302の処理対象の音符の新たな数字NewNumTabの値が2であり、テーブルには、修正前の数字として1、修正後の数字として2が記憶されているとする。この場合には、十の位については、修正前の数字に対応する修正後の数字が存在すると判定され、一の位については、修正前の数字に対応する修正後の数字が存在しないと判定される。   For example, the value of the original number OldNumTab of the note to be processed of the tablature 302 is 14, the value of the new number NewNumTab of the note to be processed of the tablature 302 is 2, and the table shows the number before correction. 1 and 2 are stored as corrected numbers. In this case, for the tens place, it is determined that there is a corrected number corresponding to the number before the correction, and for the first place, it is determined that there is no corrected number corresponding to the number before the correction. Is done.

次に、ステップS314において、CPU1は、何れかの桁で、HDD4等に予め記憶されているテーブル内に、修正前の数字に対応する修正後の数字が存在するか否かを判定する。この判定の結果、何れかの桁で、修正前の数字に対応する修正後の数字が存在する場合には、前述したステップS309の処理を行う。一方、何れかの桁でも、修正前の数字に対応する修正後の数字が存在しない場合には、前述したステップS311に進む。   Next, in step S314, the CPU 1 determines whether there is a corrected number corresponding to the number before correction in a table stored in advance in the HDD 4 or the like at any digit. As a result of this determination, if there is a corrected number corresponding to the number before correction in any digit, the process of step S309 described above is performed. On the other hand, if there is no corrected number corresponding to the number before correction in any digit, the process proceeds to step S311 described above.

以上のように本実施形態では、タブ譜302の音符のノートナンバと、当該タブ譜302の音符と対になっている五線譜301の音符のノートナンバとの差を算出する。算出したノートナンバが閾値NoteDiffThrよりも大きい場合に、当該五線譜301の音符のノートナンバから、当該タブ譜302の音符に適用されるタブ譜チューニング情報408を減算した値を、当該タブ譜302の音符の新たな数字NewNumTabとする(図10のステップS301、S302を参照)。したがって、パターンマッチングによるタブ譜の認識に誤りがあっても、その誤りを修正することができる。   As described above, in this embodiment, the difference between the note number of the note on the tablature 302 and the note number of the note on the staff 301 that is paired with the note on the tablature 302 is calculated. When the calculated note number is larger than the threshold NoteDiffThr, a value obtained by subtracting the tab staff tuning information 408 applied to the note of the tab staff 302 from the note number of the note of the staff 301 is a note of the tab staff 302. (See steps S301 and S302 in FIG. 10). Therefore, even if there is an error in the recognition of the tablature by pattern matching, the error can be corrected.

また、本実施形態では、タブ譜302の音符のノートナンバと、当該タブ譜302の音符と対になっている五線譜301の音符のノートナンバとの差の代表値を弦毎、小節毎に求める。そして、求めたノートナンバの差の代表値が閾値よりも大きい小節が連続した場合、当該連続した小節における各弦のノートナンバの差の代表値の平均を求める。そして、当該連続した小節における各弦のノートナンバの差の代表値の平均の値のばらつきが所定の範囲にある場合には、当該連続した小節の先頭の音部記号誤認識領域に音部記号を追加する(図6のステップS19〜S22を参照)。したがって、パターンマッチングによる五線譜の認識に誤りがあった場合にも、その誤りを修正することができる。
以上のように、本実施形態では、タブ譜を含む楽譜を従来よりも正確に認識することができる。
In this embodiment, the representative value of the difference between the note number of the note of the tablature 302 and the note number of the note of the staff 301 that is paired with the note of the tablature 302 is obtained for each string and measure. . Then, when bars having a representative value of the obtained note number difference larger than the threshold value are consecutive, an average of the representative values of the note number differences of the strings in the consecutive bars is obtained. If the variation in the average value of the representative values of the note numbers of the strings in the consecutive bars is within a predetermined range, the clef in the clef misrecognition area at the beginning of the consecutive bars Is added (see steps S19 to S22 in FIG. 6). Therefore, even if there is an error in the recognition of the staff notation by pattern matching, the error can be corrected.
As described above, in this embodiment, a score including a tablature can be recognized more accurately than before.

また、本実施形態では、タブ譜302の音符のノートナンバと、当該タブ譜302の音符と対になっている五線譜301の音符のノートナンバとの差の値から第1の代表値を弦毎、小節毎に求める(図7(a)の領域701aを参照)。そして、複数の小節(例えば全小節)における第1の代表値から第2の代表値を弦毎に求める(図7(a)の領域701bを参照)。そして、第2の代表値が閾値Thr以上である場合には、当該第2の代表値を用いて、該当する弦のタブ譜チューニング情報408を変更するようにした(図9のステップS203〜S205を参照)。したがって、タブ譜に対してチューニング情報を従来よりも適切に適用することができる。   In the present embodiment, the first representative value is calculated for each string from the difference between the note number of the note on the tablature 302 and the note number of the note on the staff 301 that is paired with the note on the tablature 302. , For each measure (see region 701a in FIG. 7A). Then, a second representative value is obtained for each string from the first representative value in a plurality of bars (for example, all bars) (see region 701b in FIG. 7A). If the second representative value is equal to or greater than the threshold Thr, the tab representative tuning information 408 of the corresponding string is changed using the second representative value (steps S203 to S205 in FIG. 9). See). Therefore, the tuning information can be applied to the tablature more appropriately than in the past.

また、本実施形態では、五線譜301の小節の中から、タブ譜302の処理対象の音符が属する小節の小節番号と同じ小節番号の小節を検索する。そして、検索した小節の音符のうち、当該タブ譜302の処理対象の音符の当該音符が属する小節における位置と同じ位置関係にある音符を、当該タブ譜302の音符と対になっている五線譜301の音符として検出するようにした(図8を参照)。したがって、五線譜301の小節とタブ譜302の小節とが横方向にずれている場合でも、タブ譜302の音符と対になっている五線譜301の音符を正確に検出することができる。   In the present embodiment, a measure having the same measure number as the measure number of the measure to which the note to be processed of the tablature 302 belongs is searched from the measures of the staff 301. Then, among the notes of the retrieved bar, the musical note 301 having the same positional relationship as the position of the note to be processed of the tab score 302 in the measure to which the note belongs is paired with the note of the tab score 302. It was made to detect as a note of (refer FIG. 8). Accordingly, even when the bar of the staff 301 and the bar of the tablature 302 are shifted in the horizontal direction, the note of the staff 301 that is paired with the note of the tablature 302 can be accurately detected.

尚、本実施形態では、図6のステップS20〜S22において、ステップS19で作成されたノートナンバ比較表702を用いて、五線譜301における音部記号の認識の結果を変更するようにしたが、必ずしもこのようにする必要はない。例えば、領域702aに記憶した値が閾値以上である、連続した複数の小節がある場合(図7(b)のグレーで表示されている部分を参照)、その小節については、図6のステップS23においてタブ譜の数字の修正を行わないようにしてもよい。このようにすれば、パターンマッチングにおける臨時記号等が誤認識された場合に、タブ譜302の数字が不用意に修正されることを防止することができる。また、ステップS19で作成されたノートナンバ比較表702を用いて、音部記号以外の調号を変更するようにしてもよい。   In this embodiment, in steps S20 to S22 in FIG. 6, the note number comparison table 702 created in step S19 is used to change the result of clef recognition in the staff 301. There is no need to do this. For example, when there are a plurality of continuous bars whose values stored in the region 702a are equal to or greater than the threshold value (see the portion displayed in gray in FIG. 7B), for those bars, step S23 in FIG. It is possible not to correct the tablature numbers in. In this way, it is possible to prevent the numbers in the tablature 302 from being inadvertently corrected when a temporary symbol or the like in pattern matching is erroneously recognized. Alternatively, the key signature other than the clef may be changed using the note number comparison table 702 created in step S19.

また、図6のステップS16(図9)、ステップS20〜S22、及びステップS23(図10)、の少なくとも何れか1つを行うか否かをユーザに選択させ、行うことが選択された処理のみを実行するようにしてもよい。また、ステップS23(図10)において、タブ譜の数字の修正後の内容を表示し、ユーザによって修正が許可された場合に、該当するタブ譜の数字を修正するようにしてもよい。   In addition, the process allows the user to select whether or not to perform at least one of step S16 (FIG. 9), steps S20 to S22, and step S23 (FIG. 10) in FIG. May be executed. Further, in step S23 (FIG. 10), the content after the correction of the tablature numbers may be displayed, and when the correction is permitted by the user, the number of the corresponding tablature may be corrected.

また、図6のステップS20〜S22については、必ずしも行わなくてもよい。また、ステップS20〜S22をステップS14の前に行ってもよい。更に、図10のステップS305〜S310、S312〜S314については、必ずしも行わなくてもよい。   Further, steps S20 to S22 in FIG. 6 are not necessarily performed. Steps S20 to S22 may be performed before step S14. Furthermore, steps S305 to S310 and S312 to S314 in FIG. 10 are not necessarily performed.

また、本実施形態のように、図2のステップS6の認識結果修正処理をステップS5の結合処理の後に行うようにすれば、楽譜の全体が完成してから図2のステップS6の認識結果修正処理を実行するので、パターンマッチングによる認識の結果をより正確に修正でき好ましいが、必ずしもこのようにする必要はない。例えば、ステップS4とステップS5の間で認識結果修正処理を行うようにしてもよい。   If the recognition result correction process in step S6 in FIG. 2 is performed after the combining process in step S5 as in this embodiment, the recognition result correction in step S6 in FIG. 2 is completed after the entire score is completed. Since the process is executed, it is preferable that the recognition result by pattern matching can be corrected more accurately, but this is not always necessary. For example, the recognition result correction process may be performed between step S4 and step S5.

以上説明した本発明の実施形態は、コンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体、又はかかるプログラムを伝送する伝送媒体も本発明の実施の形態として適用することができる。また、上記プログラムを記録したコンピュータ読み取り可能な記録媒体などのプログラムプロダクトも本発明の実施の形態として適用することができる。上記のプログラム、コンピュータ読み取り可能な記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。
また、前述した各実施形態は、何れも本発明を実施するにあたっての具体化の例を示したものに過ぎず、これらによって本発明の技術的範囲が限定的に解釈されてはならないものである。すなわち、本発明はその技術思想、またはその主要な特徴から逸脱することなく、様々な形で実施することができる。
The embodiment of the present invention described above can be realized by a computer executing a program. Further, a means for supplying the program to the computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium for transmitting such a program may be applied as an embodiment of the present invention. it can. A program product such as a computer-readable recording medium in which the program is recorded can also be applied as an embodiment of the present invention. The above programs, computer-readable recording media, transmission media, and program products are included in the scope of the present invention.
In addition, each of the above-described embodiments is merely a specific example for carrying out the present invention, and the technical scope of the present invention should not be construed as being limited thereto. . That is, the present invention can be implemented in various forms without departing from the technical idea or the main features thereof.

本発明の実施形態を示し、楽譜認識装置の構成の一例を示すブロック図である。It is a block diagram which shows embodiment of this invention and shows an example of a structure of the score recognition apparatus. 本発明の実施形態を示し、CPUの処理の一例を説明するメインフローチャートである。It is a main flowchart which shows embodiment of this invention and demonstrates an example of a process of CPU. 本発明の実施形態を示し、楽譜認識装置に取り込まれる楽譜の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of the score imported into a score recognition apparatus. 本発明の実施形態を示し、パートテンプレートの一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of a part template. 本発明の実施形態を示し、タブ譜チューニング情報の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of tablature tuning information. 本発明の実施形態を示し、図2のステップS6における認識結果修正処理の一例を説明するフローチャートである。It is a flowchart which shows embodiment of this invention and demonstrates an example of the recognition result correction process in step S6 of FIG. 本発明の実施形態を示し、ノートナンバ比較表の一例を示す図である。It is a figure which shows embodiment of this invention and shows an example of a note number comparison table. 本発明の実施形態を示し、図6のステップS13の前パート参照情報取得処理の一例を説明するフローチャートである。It is a flowchart which shows embodiment of this invention and demonstrates an example of the front part reference information acquisition process of FIG.6 S13. 本発明の実施形態を示し、図6のステップS16におけるチューニング情報修正処理の一例を説明するフローチャートである。It is a flowchart which shows embodiment of this invention and demonstrates an example of the tuning information correction process in FIG.6 S16. 本発明の実施形態を示し、図6のステップS23のタブ譜数字修正処理の一例を説明するフローチャートである。It is a flowchart which shows embodiment of this invention and demonstrates an example of the tab score number correction process of step S23 of FIG.

符号の説明Explanation of symbols

1 CPU
2 ROM
3 RAM
4 HDD
5 FDD
6 MIDI
7 スキャナインタフェース回路
8 プリンタインタフェース回路
9 キーボードインタフェース回路
10 CRTインタフェース回路
11 スキャナ
12 プリンタ
13 キーボード
14 CRT
100 楽譜認識装置
1 CPU
2 ROM
3 RAM
4 HDD
5 FDD
6 MIDI
7 Scanner Interface Circuit 8 Printer Interface Circuit 9 Keyboard Interface Circuit 10 CRT Interface Circuit 11 Scanner 12 Printer 13 Keyboard 14 CRT
100 Score recognition device

Claims (7)

タブ譜と、当該タブ譜と対になる五線譜とを含む楽譜の画像情報を、画像読み取り手段から取得する取得手段と、
前記楽譜に表記されている図形と、予め設定されている辞書とをマッチングして当該図形が、どの音楽記号に属するのかを認識する認識手段と、
前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている前記五線譜の音符のノートナンバとの差を算出する算出手段と、
前記算出手段により算出されたノートナンバの差に基づいて、前記認識手段により認識された音楽記号を修正する修正手段とを有することを特徴とする楽譜認識装置。
Acquisition means for acquiring, from the image reading means, image information of a score including a tablature and a staff score paired with the tablature;
Recognizing means for recognizing which musical symbol the graphic belongs to by matching a graphic described in the score with a preset dictionary;
A calculating means for calculating a difference between a note number of the note of the tablature and a note number of the note of the staff notating the tablature note;
A musical score recognition apparatus comprising: a correction unit that corrects a music symbol recognized by the recognition unit based on a difference in note number calculated by the calculation unit.
前記五線譜の小節の中から、当該五線譜と対になるタブ譜の音符が属する小節の小節番号と同じ小節番号の小節を検索する検索手段と、
前記検索手段により検索された小節の音符のうち、当該タブ譜の音符の当該音符が属する小節における位置と同じ位置関係にある音符を、前記五線譜から検出する検出手段とを有し、
前記算出手段は、前記タブ譜の音符のノートナンバと、前記検出手段により検出された音符のノートナンバとの差を算出することを特徴とする請求項1に記載の楽譜認識装置。
Search means for searching for a bar having the same bar number as the bar number of the bar to which the note of the tablature paired with the staff is paired, from the bars of the staff.
Detecting means for detecting, from the staff notation, notes having the same positional relationship as the position in the measure to which the note of the tab note belongs among the notes of the measure searched by the search means;
2. The musical score recognition apparatus according to claim 1, wherein the calculating means calculates a difference between a note number of the note of the tablature and a note number of the note detected by the detecting means.
前記修正手段は、前記算出手段により算出された、前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている音符のノートナンバとの差に基づいて、当該タブ譜の音符の数字を修正することを特徴とする請求項1又は2に記載の楽譜認識装置。   The correcting means is based on the difference between the note number of the note on the tablature calculated by the calculation means and the note number of the note paired with the note on the tablature. The musical score recognition apparatus according to claim 1, wherein the number is corrected. 前記算出手段により算出されたノートナンバの差から、複数の小節におけるノートナンバの差の代表値を、前記タブ譜の弦毎に算出する第2の算出手段と、
前記第2の算出手段により算出された代表値を用いて、前記タブ譜における弦のチューニング情報を修正する第2の修正手段とを有することを特徴とする請求項1〜3の何れか1項に記載の楽譜認識装置。
Second calculation means for calculating a representative value of note number differences in a plurality of measures for each string of the tablature from the note number difference calculated by the calculation means;
4. The apparatus according to claim 1, further comprising: a second correction unit that corrects tuning information of a string in the tablature using the representative value calculated by the second calculation unit. The musical score recognition apparatus described in 1.
前記修正手段は、前記算出手段により算出された、前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている音符のノートナンバとの差と、前記第2の修正手段により修正されたチューニング情報とに基づいて、当該タブ譜の音符の数字を修正することを特徴とする請求項4に記載の楽譜認識装置。   The correction means includes the difference between the note number of the note on the tablature calculated by the calculation means and the note number of the note paired with the note on the tablature, and the second correction means. 5. The score recognition apparatus according to claim 4, wherein the number of notes of the tablature is corrected based on the corrected tuning information. 前記修正手段は、前記算出手段により算出された、前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている前記五線譜の音符のノートナンバとの差が閾値以上であり、且つ当該差のばらつきが閾値以下となる連続した複数の小節の先頭の所定の領域に音部記号を追加することを特徴とする請求項1〜5の何れか1項に記載の楽譜認識装置。   The correction means, the difference between the note number of the note of the tablature and the note number of the note of the staff notated in a pair with the note of the tablature calculated by the calculation means is greater than or equal to a threshold value, 6. The musical score recognition apparatus according to claim 1, wherein a clef is added to a predetermined region at the beginning of a plurality of continuous measures in which variation of the difference is equal to or less than a threshold value. タブ譜と、当該タブ譜と対になる五線譜とを含む楽譜の画像情報を、画像読み取り手段から取得する取得ステップと、
前記楽譜に表記されている図形と、予め設定されている辞書とをマッチングして当該図形が、どの音楽記号に属するのかを認識する認識ステップと、
前記タブ譜の音符のノートナンバと、当該タブ譜の音符と対になっている前記五線譜の音符のノートナンバとの差を算出する算出ステップと、
前記算出ステップにより算出されたノートナンバの差に基づいて、前記認識手段により認識された音楽記号を修正する修正ステップとをコンピュータに実行させることを特徴とするコンピュータプログラム。
An acquisition step of acquiring image information of a score including a tablature and a notation that is paired with the tablature from the image reading unit;
A recognition step for recognizing which musical symbol the graphic belongs to by matching a graphic described in the score with a preset dictionary;
A calculation step of calculating a difference between a note number of the note of the tablature and a note number of the note of the staff notating the tablature note;
A computer program for causing a computer to execute a correction step of correcting a music symbol recognized by the recognition means based on a difference of note numbers calculated in the calculation step.
JP2008271369A 2008-10-21 2008-10-21 Music score recognition apparatus and computer program Active JP5189952B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008271369A JP5189952B2 (en) 2008-10-21 2008-10-21 Music score recognition apparatus and computer program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008271369A JP5189952B2 (en) 2008-10-21 2008-10-21 Music score recognition apparatus and computer program

Publications (2)

Publication Number Publication Date
JP2010102408A JP2010102408A (en) 2010-05-06
JP5189952B2 true JP5189952B2 (en) 2013-04-24

Family

ID=42293026

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008271369A Active JP5189952B2 (en) 2008-10-21 2008-10-21 Music score recognition apparatus and computer program

Country Status (1)

Country Link
JP (1) JP5189952B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183658B (en) * 2020-10-14 2024-01-26 小叶子(北京)科技有限公司 Music score identification method and device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3577561B2 (en) * 1995-12-28 2004-10-13 カシオ計算機株式会社 Performance analysis apparatus and performance analysis method
JP3593900B2 (en) * 1998-09-24 2004-11-24 ヤマハ株式会社 Performance data editing device and recording medium
JP4738135B2 (en) * 2005-10-26 2011-08-03 株式会社河合楽器製作所 Music score recognition apparatus and music score recognition program
JP5030144B2 (en) * 2006-11-10 2012-09-19 株式会社河合楽器製作所 Music score recognition apparatus and program

Also Published As

Publication number Publication date
JP2010102408A (en) 2010-05-06

Similar Documents

Publication Publication Date Title
US6137041A (en) Music score reading method and computer-readable recording medium storing music score reading program
JP5154886B2 (en) Music score recognition apparatus and computer program
JP5030144B2 (en) Music score recognition apparatus and program
JP5335501B2 (en) Image processing apparatus, image processing method, and program
US9478201B1 (en) System and method for optical music recognition
JP4803797B2 (en) Music score recognition apparatus and music score recognition program
US11308924B2 (en) Chord information extraction device, chord information extraction method and non-transitory computer readable medium storing chord information extraction program
JP2012138009A (en) Musical score recognition device, and computer program
JP5189952B2 (en) Music score recognition apparatus and computer program
JP4738135B2 (en) Music score recognition apparatus and music score recognition program
JP2003242438A (en) Musical score recognizing device
JPWO2019049294A1 (en) Code information extraction device, code information extraction method and code information extraction program
JP5770445B2 (en) Music score recognition apparatus and computer program
JP3608674B2 (en) Score recognition device
JP2838969B2 (en) Music score reader
JP3812836B2 (en) Score recognition device
JP5116073B2 (en) Music score recognition apparatus and program
JP3445039B2 (en) Music score recognition device
JP2979409B2 (en) Music score recognition method and apparatus
JP3597343B2 (en) Method of reading musical score and computer-readable recording medium recording musical score reading program
JP3709991B2 (en) Score recognition device
WO2023176473A1 (en) Musical score-editing device
JP3558835B2 (en) Music score recognition method and computer readable recording medium recording music score recognition program
JP3613356B2 (en) Score recognition device
JP3597354B2 (en) Music score recognition method and computer readable recording medium recording music score recognition program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110826

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20121220

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: 20130108

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130125

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

Free format text: PAYMENT UNTIL: 20160201

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 5189952

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150