JP6168117B2 - Musical score information generating apparatus, musical score information generating method, and program - Google Patents

Musical score information generating apparatus, musical score information generating method, and program Download PDF

Info

Publication number
JP6168117B2
JP6168117B2 JP2015183511A JP2015183511A JP6168117B2 JP 6168117 B2 JP6168117 B2 JP 6168117B2 JP 2015183511 A JP2015183511 A JP 2015183511A JP 2015183511 A JP2015183511 A JP 2015183511A JP 6168117 B2 JP6168117 B2 JP 6168117B2
Authority
JP
Japan
Prior art keywords
score
data file
music data
image data
symbol
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
JP2015183511A
Other languages
Japanese (ja)
Other versions
JP2016014892A (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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2015183511A priority Critical patent/JP6168117B2/en
Publication of JP2016014892A publication Critical patent/JP2016014892A/en
Application granted granted Critical
Publication of JP6168117B2 publication Critical patent/JP6168117B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、表示される楽譜についての楽譜データと、当該楽譜に基づく楽曲の演奏についての音楽データとを関連付ける楽譜情報を用いて、音楽データに基づく楽曲の再生を制御する楽譜情報生成装置、楽譜情報生成方法及びプログラムに関する。 The present invention relates to a musical score information generating apparatus, a musical score, and a musical score information for controlling the reproduction of music based on music data, using musical score information associating musical score data on the displayed musical score with music data on the performance of the music based on the musical score. The present invention relates to an information generation method and a program .

電子楽器や音楽再生装置において、表示部の画面上に楽譜を表示しつつ、楽譜に表示された音符に対応する楽音を発音させることで楽曲の演奏を実現する技術が提案されている。   In an electronic musical instrument or a music playback device, there has been proposed a technique for realizing a musical performance by generating a musical sound corresponding to a note displayed on a score while displaying the score on a screen of a display unit.

たとえば、特許文献1には、鍵盤を押鍵して得た演奏データと、楽譜データとを比較して、演奏者による演奏されている楽譜の位置を検索し、楽譜中の検索された位置を、表示する装置が提案されている。   For example, Patent Document 1 compares performance data obtained by pressing a key with musical score data, searches for the position of a musical score played by the performer, and finds the searched position in the musical score. A display device has been proposed.

また、特許文献2においては、MIDIデータファイルと、小節ごとの楽譜を示す楽譜画像データを格納した楽譜画像データファイルと、各小節についての制御コードを含む練習支援データが用いられている。制御コードは、楽譜上での所属ページ、MIDIデータの対応部分、対応する楽譜画像データを指定するコードを含む。特許文献2に示す装置においては、制御コードに基づいて、練習対象となった小節の所属ページが認識され、当該ページに属する小節に対応する楽譜を表示するように構成されている。   In Patent Document 2, a MIDI data file, a score image data file storing score image data indicating a score for each measure, and practice support data including a control code for each measure are used. The control code includes a code for designating the page to which the musical score belongs, the corresponding portion of the MIDI data, and the corresponding musical score image data. The apparatus shown in Patent Document 2 is configured to recognize a page to which a practice target bar belongs based on a control code and display a score corresponding to the bar belonging to the page.

特許第3077269号公報Japanese Patent No. 3077269 特開平10−240117号公報Japanese Patent Laid-Open No. 10-240117

実際の楽譜は、通常は種々の繰り返し記号が含まれ、同一の小節が複数回にわたって演奏される。その一方、楽曲を演奏するための音楽データ(たとえば、MIDIデータを格納したSMF(Standard Midi File))は、発音開始に対応するオートオンイベント、発音終了(消音)に対応するノートオフイベント、および、イベント間の時間情報から構成されるため、繰り返しが考慮されないものである。したがって、楽譜上の音符と、音楽データ上のイベントとは必ずしも一意的に対応していないため、楽譜上の所定の位置(たとえば、小節)を指定した場合に、適切な楽曲の演奏ができない場合がある。
また、この繰り返し記号の形状は楽譜を構成する他の要素である五線、小節線と比べて複雑であるため、この繰り返し記号を画像データ上から認識する精度は低い。このため、楽譜の構成要素として、楽譜の画像データ上ある複数の繰り返し記号及びその位置夫々を特定することは困難な場合が多い。
An actual score usually includes various repeated symbols, and the same measure is played a plurality of times. On the other hand, music data for playing a music (for example, SMF (Standard Midi File) storing MIDI data) is an auto-on event corresponding to the start of pronunciation, a note-off event corresponding to the end of pronunciation (mute), and Since it is composed of time information between events, repetition is not considered. Therefore, the notes on the score and the events on the music data do not necessarily correspond uniquely, so that when a predetermined position (for example, a measure) on the score is specified, an appropriate piece of music cannot be played. There is.
In addition, since the shape of this repeated symbol is more complex than the staff and bar lines that are other elements constituting the score, the accuracy of recognizing this repeated symbol from the image data is low. For this reason, it is often difficult to specify a plurality of repetitive symbols and their positions on the musical score image data as constituent elements of the musical score.

本発明は、楽譜の画像データ上の繰り返し記号及びその位置を精度よく特定し、当該特定された繰り返し記号に基づいて、小節ごとの音楽データファイルに含まれる音楽データを読み出して楽曲を適切に再生する楽譜情報生成装置、楽譜情報生成方法及びプログラムを提供することを目的とする。 The present invention accurately identifies a repetition symbol and its position on image data of a musical score, reads music data contained in a music data file for each measure based on the identified repetition symbol, and appropriately reproduces the music An object of the present invention is to provide a musical score information generating apparatus, a musical score information generating method, and a program .

本発明の目的は、楽曲の楽譜の画像データを格納した画像データファイル中の楽譜において、前記楽譜の構成要素である五線および小節線の位置に基づいて、前記楽譜における小節の各々の領域を特定する小節特定処理と、前記楽譜の画像データ中の各エリア内の画像データのうち、繰り返し記号の種別を表わす画像データとの一致度が予め定められた値以上の画像データを含むエリアを特定するエリア特定処理と、前記特定されたエリアに対応する前記楽譜の画像データ上の位置に、前記繰り返し記号の種別に対応するシンボルを描画するシンボル描画処理と、前記楽曲を構成する一連の楽音について、発音すべき音高を示す情報および発音タイミングを示す時間情報を含む音楽データを格納した音楽データファイル中の前記時間情報に基づいて、前記音楽データファイルを分割して、小節ごとの、音高を示す情報および時間情報を含む、複数の単位音楽データファイルを生成する音楽データファイル分割処理と、前記画像データファイル中の楽譜において、前記楽譜の構成要素である前記五線および小節線の位置と、前記描画されたシンボルおよびその位置と、に基づき、前記シンボルの位置する小節を特定して、前記複数の単位音楽データファイルから、繰り返しにより重複する単位音楽データファイルを排除して、重複のない単位音楽データファイルを取得する単位音楽データファイル取得処理と、前記楽譜における五線および小節線が存在する位置、小節の各々の領域、前記繰り返し記号の種別および位置を含む、楽譜要素データを格納した楽譜要素データファイルを生成する楽譜要素データファイル生成処理と、を実行する処理部を備えた楽譜情報生成装置により達成される。 An object of the present invention, in the musical score of the image data file containing image data of the music score, based on the position of the components in a staff and bar lines of the musical score, each of the regions of the bar in the score Identifies an area including image data whose degree of coincidence between the specified bar specifying process and image data in each area in the image data of the score is equal to or greater than a predetermined value. An area specifying process, a symbol drawing process for drawing a symbol corresponding to the type of the repetitive symbol at a position on the image data of the score corresponding to the specified area, and a series of musical sounds constituting the music , based on the time information of the music in the data file storing the music data including the time information indicating information and sound generation timing indicating the pitch to be sounded There are, by dividing the music data file, for each measure, the sound containing information and time information indicating the height, and the music data file division processing for generating a plurality of unit music data file, the music in the image data file the position of the staff and bar lines the is a component of music, from the the drawing symbol and its location, based on, identify the measure of the position of the symbol, the plurality of unit music data file , Unit music data file acquisition processing for acquiring unit music data files that are not duplicated by eliminating unit music data files that are duplicated by repetition, and positions of staves and bar lines in the score, each area of the bar , including the type and position of the repeating symbols, the score element data file containing the score element data raw A score element data file generation process is achieved by score information generating apparatus having a processor for execution.

本発明によれば、楽譜画像データ上から精度よく特定された繰り返し記号に基づいて、小節ごとの音楽データファイルに含まれる音楽データを読み出して楽曲を適切に再生する楽音生成制御装置および楽音生成制御プログラムを提供することが可能となる。   According to the present invention, a musical tone generation control apparatus and musical tone generation control for reading out music data contained in a music data file for each measure and appropriately reproducing a musical piece based on repeated symbols accurately identified from the score image data A program can be provided.

図1は、本発明の実施の形態にかかる楽音再生システムの構成を示すブロックダイヤグラムである。FIG. 1 is a block diagram showing a configuration of a musical sound reproduction system according to an embodiment of the present invention. 図2は、本実施の形態にかかる端末装置の構成を示すブロックダイヤグラムである。FIG. 2 is a block diagram showing the configuration of the terminal device according to this embodiment. 図3は、本実施の形態にかかる端末装置の外観を示す略正面図である。FIG. 3 is a schematic front view showing the appearance of the terminal device according to the present embodiment. 図4は、本実施の形態にかかるセンタ装置10の機能を示すブロックダイヤグラムである。FIG. 4 is a block diagram showing functions of the center device 10 according to the present embodiment. 図5は、本実施の形態にかかる楽譜要素抽出部により実行される処理(直線等検出処理)の例を示すフローチャートである。FIG. 5 is a flowchart showing an example of processing (straight line detection processing) executed by the score element extraction unit according to the present embodiment. 図6は、楽譜データに基づく楽譜の例を示す図である。FIG. 6 is a diagram illustrating an example of a score based on score data. 図7は、ステップ502(パート線の検出処理)の処理例をより詳細に示すフローチャートである。FIG. 7 is a flowchart showing in more detail a processing example of step 502 (part line detection processing). 図8は、ステップ503(五線の検出処理)の処理例をより詳細に示すフローチャートである。FIG. 8 is a flowchart showing in more detail a processing example of step 503 (staff detection processing). 図9は、二値化された楽譜においてy座標のそれぞれについての画素数を示すグラフである。FIG. 9 is a graph showing the number of pixels for each y coordinate in the binarized score. 図10は、ステップ504(小節線の検出処理)の処理例をより詳細に示すフローチャートである。FIG. 10 is a flowchart showing in more detail a processing example of step 504 (bar line detection processing). 図11は、本実施の形態にかかる繰り返し記号の検出処理の例を示すフローチャートである。FIG. 11 is a flowchart illustrating an example of the repeated symbol detection process according to the present embodiment. 図12(a)〜(e)は、繰り返し記号および対応するシンボルの例を示す図である。12A to 12E are diagrams showing examples of repeated symbols and corresponding symbols. 図13(a)〜(d)は、繰り返し記号および対応するシンボルの例を示す図である。FIGS. 13A to 13D are diagrams showing examples of repeated symbols and corresponding symbols. 図14は、本実施の形態にかかる楽譜要素データファイルの生成処理の例を示すフローチャートである。FIG. 14 is a flowchart showing an example of a score element data file generation process according to the present embodiment. 図15は、音楽データ分割部により実行される単位音楽データファイル生成処理の例を示すフローチャートである。FIG. 15 is a flowchart showing an example of unit music data file generation processing executed by the music data dividing unit. 図16(a)は、ある楽曲の楽譜の構造を概略的に示す図、図16(b)は、当該楽曲のオリジナル音楽データの構造を概略的に示す図である。FIG. 16A schematically shows the structure of a musical score of a certain music piece, and FIG. 16B schematically shows the structure of original music data of the music piece. 図17は、取得された、重複の無い複数の単位音楽データファイルの例を示す図である。FIG. 17 is a diagram illustrating an example of a plurality of unit music data files that are obtained without duplication. 図18は、本実施の形態にかかる端末装置において実行される処理の例を示すフローチャートである。FIG. 18 is a flowchart illustrating an example of processing executed in the terminal device according to the present embodiment. 図19は、本字嫉視の形態にかかるパネルスイッチ処理の例を示すフローチャートである。FIG. 19 is a flowchart illustrating an example of the panel switch processing according to the form of the full-length character. 図20は、本実施の形態にかかるソング選択処理の例を示すフローチャートである。FIG. 20 is a flowchart showing an example of song selection processing according to the present embodiment. 図21は、本実施の形態にかかるスタート・ストップスイッチ処理の例を示すフローチャートである。FIG. 21 is a flowchart showing an example of start / stop switch processing according to the present embodiment. 図22は、本実施の形態にかかる演奏操作検出処理の例を示すフローチャートである。FIG. 22 is a flowchart showing an example of performance operation detection processing according to the present embodiment. 図23は、本実施の形態にかかる演奏操作検出処理の例を示すフローチャートである。FIG. 23 is a flowchart illustrating an example of the performance operation detection process according to the present embodiment. 図24は、本実施の形態にかかる演奏操作検出処理の例を示すフローチャートである。FIG. 24 is a flowchart showing an example of a performance operation detection process according to the present embodiment. 図25は、端末装置の表示部の画面上に楽譜が表示された例を示す図である。FIG. 25 is a diagram illustrating an example in which a score is displayed on the screen of the display unit of the terminal device. 図26は、図22のステップ2203をより詳細に示すフローチャートである。FIG. 26 is a flowchart showing step 2203 of FIG. 22 in more detail. 図27は、図22のステップ2203をより詳細に示すフローチャートである。FIG. 27 is a flowchart showing step 2203 of FIG. 22 in more detail. 図28は、図27のステップ2703をより詳細に示すフローチャートである。FIG. 28 is a flowchart showing step 2703 of FIG. 27 in more detail. 図29は、本実施の形態にかかるリピート記号処理の例を示すフローチャートである。FIG. 29 is a flowchart showing an example of repeat symbol processing according to the present embodiment. 図30は、本実施の形態にかかるソング処理の例を示すフローチャートである。FIG. 30 is a flowchart showing an example of song processing according to the present embodiment. 図31は、ステップ1504の処理例をより詳細に示すフローチャートである。FIG. 31 is a flowchart showing in more detail the processing example of step 1504. 図32は、本実施の形態にかかる画像更新処理の例を示すフローチャートである。FIG. 32 is a flowchart illustrating an example of the image update process according to the present embodiment.

以下、添付図面を参照して、本発明の実施の形態について説明する。図1は、本発明の実施の形態にかかる楽音再生システムの構成を示すブロックダイヤグラムである。図1に示すように、本実施の形態にかかる楽音再生システムは、センタ装置10と、端末装置30とを有している。本実施の形態にかかるセンタ装置10は、CPU11、入力部12、表示部13、ROM14、RAM15、フラッシュメモリ16、通信インタフェース(I/F)17およびサウンドシステム18を有している。センタ装置10として、たとえば、パーソナルコンピュータやサーバを用いることができる。   Embodiments of the present invention will be described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing a configuration of a musical sound reproduction system according to an embodiment of the present invention. As shown in FIG. 1, the musical tone reproduction system according to the present embodiment includes a center device 10 and a terminal device 30. The center device 10 according to the present embodiment includes a CPU 11, an input unit 12, a display unit 13, a ROM 14, a RAM 15, a flash memory 16, a communication interface (I / F) 17, and a sound system 18. As the center device 10, for example, a personal computer or a server can be used.

本実施の形態において、センタ装置10は、楽曲を演奏するための音楽データを含む音楽データファイル、楽曲の楽譜の画像データを含む楽譜データファイルを、記憶装置(たとえば、フラッシュメモリ16など)に格納している。センタ装置10は、上記音楽データおよび画像データを関連付けるためのデータ(後述する楽譜要素データ)を含むファイルである楽譜要素データファイル生成して、音楽データファイルおよび楽譜データファイルとともに、端末装置30に送信する。   In the present embodiment, the center device 10 stores a music data file including music data for playing music and a score data file including image data of music scores in a storage device (for example, the flash memory 16). doing. The center device 10 generates a musical score element data file which is a file including data (musical score element data described later) for associating the music data and the image data, and transmits it to the terminal device 30 together with the music data file and the musical score data file. To do.

CPU11は、楽譜データを読み出して、楽譜データ中の五線や小節線などの楽譜要素を抽出する処理、抽出された楽譜要素に基づいて、音楽データを小節毎に分割して、小節単位の音楽データを含む単位音楽データファイルを生成する処理など種々の処理を実行する。入力部12は、キーボード、マウスなどの入力装置を含む。また、表示部13は、たとえば液晶表示装置を含む。   The CPU 11 reads the musical score data, extracts musical score elements such as staffs and bar lines in the musical score data, divides the music data into bars based on the extracted musical score elements, and performs music in units of bars. Various processes such as a process of generating a unit music data file including data are executed. The input unit 12 includes input devices such as a keyboard and a mouse. Moreover, the display part 13 contains a liquid crystal display device, for example.

ROM14は、楽譜データを読み出して、楽譜データ中の五線や小節線などの楽譜要素を抽出する処理、抽出された楽譜要素に基づいて、音楽データを小節毎に分割して、小節単位の音楽データを含む単位音楽データファイルを生成する処理などの処理プログラムを格納する。RAM15は、ROM14から読み出されたプログラムや、処理の過程で生じたデータを記憶する。また、フラッシュメモリ16には、種々の楽曲の音楽データを含む音楽データファイルおよび当該楽曲の楽譜データを含む楽譜データファイルが格納される。   The ROM 14 reads the musical score data, extracts musical score elements such as staffs and bar lines in the musical score data, divides the music data into bars based on the extracted musical score elements, and performs music in units of bars. A processing program such as processing for generating a unit music data file including data is stored. The RAM 15 stores a program read from the ROM 14 and data generated in the course of processing. The flash memory 16 stores a music data file including music data of various musical pieces and a musical score data file including musical score data of the musical pieces.

通信I/F17は、インターネットなどの外部ネットワークを介したデータ送受信を制御する。サウンドシステム18は、音源部19、オーディオ回路20およびスピーカ21を有する。   The communication I / F 17 controls data transmission / reception via an external network such as the Internet. The sound system 18 includes a sound source unit 19, an audio circuit 20, and a speaker 21.

図2は、本実施の形態にかかる端末装置の構成を示すブロックダイヤグラムである。図2に示すように、本実施の形態にかかる端末装置30は、CPU31、タッチパネル32、表示部13、ROM34、RAM35、フラッシュメモリ36、通信インタフェース(I/F)37およびサウンドシステム38を有している。端末装置30として、たとえば、スマートフォンを用いることができる。   FIG. 2 is a block diagram showing the configuration of the terminal device according to this embodiment. As shown in FIG. 2, the terminal device 30 according to the present embodiment includes a CPU 31, a touch panel 32, a display unit 13, a ROM 34, a RAM 35, a flash memory 36, a communication interface (I / F) 37, and a sound system 38. ing. As the terminal device 30, for example, a smartphone can be used.

本実施の形態において、端末装置30は、センタ装置10から音楽データファイル(後述する単位音楽データファイル)、楽譜データファイルおよび楽譜要素データファイルを受信して、これらデータファイルに含まれるデータに基づき、楽譜を表示し、また、指定された小節から楽曲を演奏し、或いは、指定された小節を繰り返す。   In the present embodiment, the terminal device 30 receives a music data file (unit music data file to be described later), a score data file, and a score element data file from the center device 10, and based on the data included in these data files, The musical score is displayed, the music is played from the specified bar, or the specified bar is repeated.

CPU31は、表示部13の画面上に表示すべき楽譜やアイコン等の表示、タッチパネルへの接触の検出、楽譜要素データファイルおよび単位音楽データファイルに基づく楽曲の演奏など、種々の処理を実行する。タッチパネル32は、液晶表示装置を含む表示部33に重ねられて配置されている。   The CPU 31 executes various processes such as display of musical scores and icons to be displayed on the screen of the display unit 13, detection of touch on the touch panel, performance of music based on the musical score element data file and the unit music data file. The touch panel 32 is disposed so as to overlap the display unit 33 including the liquid crystal display device.

ROM34は、表示部13の画面上に表示すべき楽譜やアイコン等の表示、タッチパネルへの接触の検出、楽譜要素データファイルおよび単位音楽データファイルに基づく楽曲の演奏など、種々の処理プログラムを格納する。RAM35は、ROM34から読み出されたプログラムや、処理の過程で生じたデータを記憶する。フラッシュメモリ36は、受信した楽譜データファイル、楽譜要素データファイルおよび単位音楽データファイルを格納することができる。通信I/F37は、インターネットなどの外部ネットワークを介したデータ送受信を制御する。サウンドシステム38は、音源部39、オーディオ回路40およびスピーカ41を有する。   The ROM 34 stores various processing programs such as display of musical scores and icons to be displayed on the screen of the display unit 13, detection of touch on the touch panel, performance of music based on musical score element data files and unit music data files. . The RAM 35 stores a program read from the ROM 34 and data generated in the course of processing. The flash memory 36 can store the received musical score data file, musical score element data file, and unit music data file. The communication I / F 37 controls data transmission / reception via an external network such as the Internet. The sound system 38 includes a sound source unit 39, an audio circuit 40, and a speaker 41.

図3は、本実施の形態にかかる端末装置の外観を示す略正面図である。図3に示すように、端末装置30は、液晶表示装置を含む表示部33と、タッチパネル32とが重ねられて配置される。表示部33の画面上には、たとえば、楽譜(符号300参照)や、種々のアイコン(符号310〜312参照)を含む入力部301が表示される。使用者は、楽譜300の所望の位置に触れることにより、楽譜中の小節などを指定することができる。また、使用者は、所望のアイコンに触れることにより、コマンドを入力することが可能である。   FIG. 3 is a schematic front view showing the appearance of the terminal device according to the present embodiment. As shown in FIG. 3, the terminal device 30 is arranged such that a display unit 33 including a liquid crystal display device and a touch panel 32 are overlapped. On the screen of the display unit 33, for example, an input unit 301 including a score (see reference numeral 300) and various icons (see reference numerals 310 to 312) is displayed. The user can specify a measure or the like in the score by touching a desired position on the score 300. In addition, the user can input a command by touching a desired icon.

以下、センタ装置10にて実行される処理について説明する。図4は、本実施の形態にかかるセンタ装置10の機能を示すブロックダイヤグラムである。図4に示すように、センタ装置10は、楽譜要素抽出部42、データファイル生成部43および音楽データ分割部44を有する。本実施の形態において、センタ装置10のフラッシュメモリ16には、楽曲の音楽データであるオリジナル音楽データを含むオリジナル音楽データファイル400と、当該楽曲の楽譜データであるオリジナル楽譜データを含むオリジナル楽譜データファイル401とが格納されている。   Hereinafter, processing executed by the center apparatus 10 will be described. FIG. 4 is a block diagram showing functions of the center device 10 according to the present embodiment. As shown in FIG. 4, the center device 10 includes a score element extraction unit 42, a data file generation unit 43, and a music data division unit 44. In the present embodiment, the flash memory 16 of the center device 10 stores an original music data file 400 including original music data that is music data of a music piece, and an original musical score data file that includes original music data that is music data of the music piece. 401 is stored.

オリジナル音楽データファイル400は、いわゆるスタンダードMIDIファイル(SMF)であり、楽音の発音を含むイベント間の時間間隔を示す時間情報(デルタタイム)、ノートオンイベントやノートオフイベントなどイベントの種別を示す情報などを含む。また、オリジナル楽譜データファイル401は、たとえば、PDFファイルなど既知のフォーマットの画像データファイルである。   The original music data file 400 is a so-called standard MIDI file (SMF), which is information indicating the event type such as time information (delta time) indicating a time interval between events including the sound generation, note-on event and note-off event. Etc. The original score data file 401 is an image data file in a known format such as a PDF file.

楽譜要素抽出部42は、オリジナル楽譜データファイル401を読み出して、ファイル中のデータから、端末装置30に送信するための表示用楽譜データファイル403を生成する。表示用楽譜データファイル403は、たとえば、PNG(Portable Network Graphic)ファイルである。無論、PNG以外の他のフォーマットの画像データであっても良い。また、楽譜要素抽出部42は、オリジナル楽譜データファイル401を二値化して、たとえば、ビットマップの二値化データファイル402を生成する。   The score element extraction unit 42 reads the original score data file 401 and generates a display score data file 403 for transmission to the terminal device 30 from the data in the file. The display score data file 403 is, for example, a PNG (Portable Network Graphic) file. Of course, it may be image data of a format other than PNG. The musical score element extraction unit 42 binarizes the original musical score data file 401 to generate, for example, a bitmap binary data file 402.

さらに、楽譜要素抽出部42は、二値化データファイル402を参照して、楽譜の構成要素であるパート線、五線、小節線などを抽出する。なお、本実施の形態において、楽譜構成要素は、楽譜中の五線、パート線や小節線など、楽譜中の時間領域やパートを規定するための線、および、繰り返し記号を含む。楽譜構成要素には、楽曲において演奏される楽曲を直接規定する音符は含まれない。   Further, the musical score element extraction unit 42 refers to the binarized data file 402 and extracts part lines, staffs, bar lines, and the like, which are musical score components. In the present embodiment, the score component includes a line for defining a time region or part in the score, such as a staff in a score, a part line or a bar line, and a repetition symbol. The musical score component does not include notes that directly define the musical piece to be played in the musical piece.

また、楽譜要素抽出部42は、抽出された楽譜の構成要素の座標データを取得する。デーファイル生成部43は、楽譜要素抽出部42にて取得された情報に基づき、楽譜要素の種別およびその位置を特定する情報を含む楽譜要素データファイル404を生成する。生成された表示用楽譜データファイル403、二値化データファイル402、楽譜要素データファイル404は、たとえば、フラッシュメモリ16に格納される。   The musical score element extraction unit 42 acquires the coordinate data of the constituent elements of the extracted musical score. The day file generation unit 43 generates a score element data file 404 including information specifying the type and position of the score element based on the information acquired by the score element extraction unit 42. The generated musical score data file for display 403, binarized data file 402, and musical score element data file 404 are stored in the flash memory 16, for example.

音楽データ分割部44は、オリジナル音楽データファイル400中の音楽データと、楽譜要素データファイル中の楽譜要素データ404とに基づいて、音楽データを、小節毎の単位音楽データに分割し、かつ、繰り返し記号などによる重複を排除して、所定の単位音楽データファイル405を生成する。単位音楽データファイル405も、例えば、フラッシュメモリ16に格納される。   The music data dividing unit 44 divides the music data into unit music data for each measure based on the music data in the original music data file 400 and the score element data 404 in the score element data file, and repeatedly. A predetermined unit music data file 405 is generated by eliminating duplication due to symbols and the like. The unit music data file 405 is also stored in the flash memory 16, for example.

なお、楽譜要素抽出部42、データファイル生成部43および音楽データ分割部44は、主として、図1に示すCPU11により実現される。以下、これらにより実行される処理についてより詳細に説明する。図5は、本実施の形態にかかる楽譜要素抽出部により実行される処理(直線等検出処理)の例を示すフローチャートである。図4に示すように、画像要素抽出部42は、オリジナル楽譜データを二値化して、生成された二値化データを含む二値化データファイルRAM15に格納する(ステップ501)。たとえば、二値化データはビットマップデータである。なお、オリジナル画像データファイルが既に二値化データである場合には、ステップ501は省略される。   The musical score element extraction unit 42, the data file generation unit 43, and the music data division unit 44 are mainly realized by the CPU 11 shown in FIG. Hereinafter, the processing executed by these will be described in more detail. FIG. 5 is a flowchart showing an example of processing (straight line detection processing) executed by the score element extraction unit according to the present embodiment. As shown in FIG. 4, the image element extraction unit 42 binarizes the original score data and stores it in the binarized data file RAM 15 including the generated binarized data (step 501). For example, the binarized data is bitmap data. If the original image data file is already binarized data, step 501 is omitted.

次いで、楽譜要素抽出部42は、二値化データからパート線を検出する(ステップ502)。パート線は、パート垂直線とも称されるものである。図6は、楽譜データに基づく楽譜の例を示す図である。パート線とは、パート線で結ばれたパートは同時に演奏することを示すものであり、楽譜の段を規定するものである。通常、パート線は、楽譜の左端に位置している。図6において、符号601に示す線がパート線である。この例では、いわゆるパート線により大譜表が画定されている。いわゆるスコア(総譜)では、複数のパートの五線の左端が、パート線により連結されることになる。   Next, the score element extraction unit 42 detects a part line from the binarized data (step 502). The part line is also referred to as a part vertical line. FIG. 6 is a diagram illustrating an example of a score based on score data. The part line indicates that the parts connected by the part line are played at the same time, and defines the stage of the score. Normally, the part line is located at the left end of the score. In FIG. 6, a line indicated by reference numeral 601 is a part line. In this example, a grand staff is defined by a so-called part line. In the so-called score (total score), the left ends of the staves of a plurality of parts are connected by the part lines.

図7は、ステップ502(パート線の検出処理)の処理例をより詳細に示すフローチャートである。図7に示すように、楽譜要素抽出部42は、楽譜の画像中、左端から所定の範囲の領域において、所定値より多く連続する垂直線を検出する(ステップ701)。垂直線が検出された場合には(ステップ702でYes)、楽譜要素抽出部42は、垂直線に相当する画素群を特定し(ステップ703)、さらに、見出された垂直線から下方に位置する画素を参照して、所定値より多く連続する別の垂直線を検出する(ステップ704)。   FIG. 7 is a flowchart showing in more detail a processing example of step 502 (part line detection processing). As shown in FIG. 7, the musical score element extraction unit 42 detects vertical lines that are more than a predetermined value in a region within a predetermined range from the left end in the musical score image (step 701). If a vertical line is detected (Yes in step 702), the musical score element extraction unit 42 specifies a pixel group corresponding to the vertical line (step 703), and is further positioned below the found vertical line. Referring to the pixel to be detected, another vertical line that continues for more than a predetermined value is detected (step 704).

当該別の垂直線が検出された場合には(ステップ705でYes)、楽譜要素抽出部42は、当該別の垂直線に相当する画素群を特定する(ステップ706)。なお、楽譜要素抽出部42は、上記画素群の位置情報をRAM15に記憶しておくことにより、画素群を特定することができる。楽譜要素抽出部42は、楽譜の画像中、下端まで垂直線の検索が終了したかを判断する(ステップ707)。ステップ707でNoと判断された場合には、ステップ704に戻る。その一方、ステップ707でYesと判断された場合には、楽譜要素抽出部42は、検出された垂直線の位置情報(座標)をRAM15に格納し(ステップ708)、その後、パート線の検出処理を終了する。   When the other vertical line is detected (Yes in Step 705), the score element extraction unit 42 specifies a pixel group corresponding to the other vertical line (Step 706). The musical score element extraction unit 42 can specify the pixel group by storing the position information of the pixel group in the RAM 15. The score element extraction unit 42 determines whether or not the search for the vertical line to the lower end of the score image has been completed (step 707). If it is determined No in step 707, the process returns to step 704. On the other hand, if it is determined Yes in step 707, the musical score element extraction unit 42 stores the position information (coordinates) of the detected vertical line in the RAM 15 (step 708), and then the part line detection process. Exit.

パート線の検出処理においては、図6において、左端に位置する垂直線であるパート線(符号601が検出される)。また、検出された垂直線(符号601参照)から下方(符号619参照)に位置する他の垂直線(図6においては図示せず)が検出されることになる。   In the part line detection process, in FIG. 6, the part line which is a vertical line located at the left end (reference numeral 601 is detected). Further, another vertical line (not shown in FIG. 6) located below (see reference numeral 619) from the detected vertical line (see reference numeral 601) is detected.

パート線の検出処理が終了すると、楽譜要素抽出部42は、楽譜中の五線を検出する(ステップ503)。図8は、ステップ503(五線の検出処理)の処理例をより詳細に示すフローチャートである。図8に示すように、楽譜要素抽出部42は、垂直方向においてパート線が位置する範囲を特定する(ステップ801)。次いで、楽譜要素抽出部42は、ステップ801で特定された範囲で、水平方向における黒点に相当する画素数をカウントする(ステップ802)。楽譜要素抽出部42は、パート線が位置する全ての範囲で画素数のカウントが終了したかを判断する(ステップ803)。ステップ803でNoと判断された場合には、ステップ802に戻る。   When the part line detection process ends, the score element extraction unit 42 detects a staff in the score (step 503). FIG. 8 is a flowchart showing in more detail a processing example of step 503 (staff detection processing). As shown in FIG. 8, the musical score element extraction unit 42 specifies a range where the part line is located in the vertical direction (step 801). Next, the musical score element extraction unit 42 counts the number of pixels corresponding to black spots in the horizontal direction within the range specified in step 801 (step 802). The musical score element extraction unit 42 determines whether the pixel count has been completed in the entire range where the part line is located (step 803). If NO is determined in step 803, the process returns to step 802.

ステップ802においては、パート線が位置する範囲で、y軸方向(垂直方向)の座標(y座標)ごとに、同一のy座標を有する画素のそれぞれの値(画素値)が参照され、黒点を示す値であれば、カウント値がインクリメントされる。このようにして、パート線が位置するy座標のそれぞれについて、横方向(x軸方向)の黒点に相当する画素数がカウント値として取得される。図9は、y座標のそれぞれについての画素数を示すグラフである。図9において、横軸は、y軸方向(垂直方向)の位置、縦軸は、画素数(カウント値)を示している。   In step 802, each value (pixel value) of a pixel having the same y coordinate is referred to for each coordinate (y coordinate) in the y-axis direction (vertical direction) in the range where the part line is located, and the black point is determined. If it is a value shown, the count value is incremented. In this way, the number of pixels corresponding to the black point in the horizontal direction (x-axis direction) is acquired as the count value for each y coordinate where the part line is located. FIG. 9 is a graph showing the number of pixels for each y coordinate. In FIG. 9, the horizontal axis indicates the position in the y-axis direction (vertical direction), and the vertical axis indicates the number of pixels (count value).

図6から理解できるように、楽譜では、五線(符号602、603)を構成する線(第一線〜第五線)の位置において、水平方向に直線が延びる。したがって、その位置における画素数(カウント値)は、他の位置と比較して顕著に大きい。図9の例では、符号901〜905に示すように、一定間隔の5つの位置のカウント値が、他の位置でのカウント値(たとえば、符号910、911参照)と比較して顕著に大きい。本実施の形態においては、このように一定間隔で5つのまとまりで位置する、カウント値が顕著に大きい位置を見出し、この位置を五線の位置であると判断する。このような五線の位置を判定するために、ステップ804以下の処理が実行される。   As can be understood from FIG. 6, in the musical score, a straight line extends in the horizontal direction at the positions of the lines (first line to fifth line) constituting the staff (reference numerals 602 and 603). Therefore, the number of pixels (count value) at that position is significantly larger than other positions. In the example of FIG. 9, as indicated by reference numerals 901 to 905, the count values at five positions at regular intervals are significantly larger than the count values at other positions (see, for example, reference numerals 910 and 911). In the present embodiment, a position where the count value is remarkably large is located in a group of five at regular intervals as described above, and this position is determined to be a staff position. In order to determine the position of such a staff, the processing after step 804 is executed.

楽譜要素抽出部42は、カウント値の最大値(カウント最大値)より所定割合(たとえば、20パーセント)より小さいカウント値を示す位置を、五線の候補位置から除外する(ステップ804)。次いで、楽譜要素抽出部42は、カウント値の極大値を見出して、極大値を示す位置およびその周辺所定範囲の位置をマージする(ステップ805)。ステップ805においては、前記周辺の所定範囲を同一位置とみなして、所定範囲の位置についても見いだされた極大値を与えれば良い。また、楽譜要素抽出部42は、カウント値の最大偏差σを算出し、その所定倍(たとえば3倍:3σ)以下のカウント値を示す位置を、五線の候補位置から除外する(ステップ806)。楽譜要素抽出部42は、候補位置から除外された位置を除き、所定間隔で位置する5つのカウント値を特定する(ステップ807)。この5つの位置が五線位置となる。楽譜要素抽出部42は、当該五線位置の情報をRAM15に格納する(ステップ808)。   The musical score element extraction unit 42 excludes positions indicating count values smaller than a predetermined ratio (for example, 20%) from the maximum count value (maximum count value) from the staff candidate positions (step 804). Next, the musical score element extraction unit 42 finds the maximum value of the count value, and merges the position indicating the maximum value and the position of the surrounding predetermined range (step 805). In step 805, the predetermined range in the periphery is regarded as the same position, and the maximum value found for the position in the predetermined range may be given. The musical score element extraction unit 42 calculates the maximum deviation σ of the count value, and excludes the position indicating the count value less than a predetermined multiple (for example, 3 times: 3σ) from the staff candidate positions (step 806). . The musical score element extraction unit 42 specifies five count values located at predetermined intervals, excluding positions excluded from the candidate positions (step 807). These five positions are staff positions. The musical score element extraction unit 42 stores the information on the staff position in the RAM 15 (step 808).

五線の検出処理が終了すると、楽譜要素抽出部42は、楽譜中の小節線を検出する(ステップ504)。図10は、ステップ504(小節線の検出処理)の処理例をより詳細に示すフローチャートである。小節線は、ある小節と次の小節とを区切るための、五線上、或いは、パート線と同じ長さでの垂直線である(図6の符号604〜606参照)。図10に示すように、楽譜要素抽出部42は、まず、五線譜の線上或いは線間に配置された音符を検出する(符号1010参照)。   When the staff detection process ends, the score element extraction unit 42 detects a bar line in the score (step 504). FIG. 10 is a flowchart showing in more detail a processing example of step 504 (bar line detection processing). The bar line is a vertical line on the staff or the same length as the part line for separating a bar from the next bar (see reference numerals 604 to 606 in FIG. 6). As shown in FIG. 10, the musical score element extraction unit 42 first detects notes placed on or between lines of the staff (see reference numeral 1010).

より詳細には、楽譜要素抽出部42は、垂直方向において、パート線およびその上下所定範囲を含む、長方形の領域を特定する(ステップ1001)。特定された領域は、音符が配置される可能性がある領域にほぼ対応する。次いで、五線を構成する線の間隔に一致する大きさの楕円形を検出する(ステップ1002)。ステップ1002においては、たとえば、検出された楕円形の中心位置の座標がRAM15に格納される。楽譜要素抽出部42は、全てのパート線に関して、ステップ1002が実行されたかを判断する(ステップ1003)。ステップ1003でNoと判断された場合には、ステップ1002に戻り、次のパート線について特定された領域について、音符のタマの位置が検出される。   More specifically, the score element extraction unit 42 specifies a rectangular area including the part line and a predetermined range above and below the part line in the vertical direction (step 1001). The identified area substantially corresponds to the area where the note may be placed. Next, an ellipse having a size that matches the interval between the lines constituting the staff is detected (step 1002). In step 1002, for example, the coordinates of the detected center position of the ellipse are stored in the RAM 15. The musical score element extraction unit 42 determines whether step 1002 has been executed for all part lines (step 1003). If it is determined No in step 1003, the process returns to step 1002 to detect the position of the note tama for the area specified for the next part line.

ステップ1003でYesと判断された場合には、楽譜要素抽出部42は、上記パート線およびその上下所定の範囲を含む領域において、検出された音符に対応する楕円形と所定距離以上離間し、かつ、パート線と近似する長さを有する垂直線を見出す(ステップ1004)。楽譜要素抽出部42は、検出された垂直線の情報を、RAM15に格納する(ステップ1005)。楽譜要素抽出部42は、全てのパート線に関して、ステップ1004、1005が実行されたかを判断する(ステップ1006)。ステップ1006でNoと判断された場合には、ステップ1004に戻り、次のパート線について特定された領域について、同様の処理が実行される。ステップ1006でYesと判断された場合には、小節線の検出処理を終了する。   If it is determined Yes in step 1003, the score element extraction unit 42 is separated from the ellipse corresponding to the detected note by a predetermined distance or more in an area including the part line and a predetermined range above and below the part line, and A vertical line having a length approximating the part line is found (step 1004). The musical score element extraction unit 42 stores the detected vertical line information in the RAM 15 (step 1005). The score element extraction unit 42 determines whether steps 1004 and 1005 have been executed for all part lines (step 1006). If it is determined No in step 1006, the process returns to step 1004, and the same processing is executed for the area specified for the next part line. If it is determined YES in step 1006, the bar line detection process is terminated.

小節線の検出(図5のステップ504)が終了すると、楽譜要素抽出部42は、繰り返し記号を検出する。図11は、本実施の形態にかかる繰り返し記号の検出処理の例を示すフローチャートである。図11に示すように、楽譜要素検出部42は、RAM15に格納された二値化された楽譜データを取得する(ステップ1101)。次いで、楽譜要素検出部42は、検出対象となる繰り返し記号を選択する。繰り返し記号(反復記号)としては、図12、図13に示すように、繰り返しの先頭記号(符号1201)、繰り返しの後端記号(符号1211)、1番カッコ(符号1231)、2番カッコ(符号1241)、トゥコーダ(符号1301)、ヴィーデ或いはコーダマーク(符号1311)、セーニョ(符号1321)、ダルセーニョ(符号1331)、ダカーポ(図示せず)などが含まれる。これら繰り返し記号の図形を含む画像データが、RAM15に予め格納され、ステップ1102においては、楽譜要素抽出部42は、所定の記号の画像データを読み出せば良い。   When the bar line detection (step 504 in FIG. 5) ends, the musical score element extraction unit 42 detects a repeated symbol. FIG. 11 is a flowchart illustrating an example of the repeated symbol detection process according to the present embodiment. As shown in FIG. 11, the musical score element detection unit 42 acquires binarized musical score data stored in the RAM 15 (step 1101). Next, the score element detection unit 42 selects a repeated symbol to be detected. As shown in FIG. 12 and FIG. 13, the repetition symbol (repetition symbol) includes a repetition first symbol (reference numeral 1201), a rear end symbol (reference numeral 1211), a first parenthesis (reference numeral 1231), a second parenthesis ( Reference numeral 1241), Tocoder (reference numeral 1301), Vide or coder mark (reference numeral 1311), Seño (reference numeral 1321), Dalseiyo (reference numeral 1331), Dacapo (not shown), and the like are included. Image data including these repeated symbol graphics is stored in the RAM 15 in advance, and in step 1102, the musical score element extraction unit 42 may read image data of a predetermined symbol.

次いで、楽譜要素抽出部42は、記号のサイズを五線の幅に基づいて正規化する(ステップ1103)。次いで、楽譜要素抽出部42は、記号と楽譜データの所定のエリアとの一致係数(相関値)を算出する(ステップ1104)。たとえば、記号の画像データの画素と、所定のエリアの画像データの画素とを比較して、画素値が一致した場合には、一致係数をインクリメントして、最終的な一致係数を相関値とする。楽譜要素抽出部42は、楽譜データにおいて、エリアをシフトすることで、全てのエリアについての相関値を算出する。楽譜要素抽出部42は、相関値が最大となるエリアを特定し(ステップ1105)、当該エリアの画素データを取り出す(ステップ1106)。   Next, the musical score element extraction unit 42 normalizes the symbol size based on the staff width (step 1103). Next, the score element extraction unit 42 calculates a coincidence coefficient (correlation value) between the symbol and a predetermined area of the score data (step 1104). For example, when the pixel value of the symbol image data is compared with the pixel of the image data in a predetermined area and the pixel values match, the match coefficient is incremented and the final match coefficient is used as the correlation value. . The score element extraction unit 42 calculates correlation values for all areas by shifting areas in the score data. The musical score element extraction unit 42 specifies an area having the maximum correlation value (step 1105), and extracts pixel data of the area (step 1106).

次いで、楽譜要素抽出部42は、取り出された画像データの画素と、楽譜データにおける所定のエリアの画像データの画素とを比較して相関値を算出する(ステップ1107)。ステップ1105で検出されたエリアに存在する繰り返し記号が、この楽譜の中で用いられている記号であるため、同一の記号をより精度良く検出するために、ステップ1107において、検出されたエリアの画像データを用いて、記号を再度検出している。楽譜要素抽出部42は、相関値が一定の閾値より大きなエリアを特定する(ステップ1108)。その後、楽譜要素抽出部42は、楽譜データにおいて、特定されたエリアに、繰り返し記号に対応する所定のシンボルを描画する(ステップ1109)。楽譜要素抽出部42は、全ての繰り返し記号について処理を終了したかを判断する(ステップ1110)。ステップ1110でYesと判断された場合には、処理を終了し、ステップ1110でNoと判断された場合には、ステップ1102に戻る。   Next, the score element extraction unit 42 compares the pixel of the extracted image data with the pixel of the image data in a predetermined area in the score data to calculate a correlation value (step 1107). Since the repeated symbols existing in the area detected in step 1105 are the symbols used in the score, in order to detect the same symbol with higher accuracy, in step 1107, the image of the detected area is displayed. The symbol is detected again using the data. The musical score element extraction unit 42 identifies an area where the correlation value is larger than a certain threshold (step 1108). Thereafter, the musical score element extraction unit 42 draws a predetermined symbol corresponding to the repeated symbol in the specified area in the musical score data (step 1109). The musical score element extraction unit 42 determines whether the processing has been completed for all the repeated symbols (step 1110). If it is determined YES in step 1110, the process ends. If it is determined NO in step 1110, the process returns to step 1102.

以下、繰り返し記号に対応するシンボルについて説明する。図12(a)〜(e)、図13(a)〜(d)において、右側に記載された繰り返し記号(符号1200〜1240、1300〜1330参照)に対応するシンボルを左側に示す(符号1201〜1241、1301〜1331参照)。繰り返しの先頭記号1201に対応するシンボル1200は、所定数の画素から構成されている。ここで、上側2ドット(符号1202参照)は、
繰り返しの先頭記号、繰り返しの後端記号、1番カッコ、2番カッコを表すために用いられ、下側2ドット(符号1203参照)は、トゥコーダ、コーダマーク、セーニョ、ダルセーニョ、ダカーポを表すために用いられる。繰り返しの先頭記号と後端記号とは、第1階層の上側において反対向きに黒の画素を配置することで区別される(符号1200、1210、1220参照)。また、繰り返しのカッコは、第1階層の下側において反対向きに黒の画素を配置することで区別される(符号1230、1240参照)。
Hereinafter, a symbol corresponding to a repetition symbol will be described. In FIGS. 12A to 12E and FIGS. 13A to 13D, symbols corresponding to repetitive symbols (see reference numerals 1200 to 1240 and 1300 to 1330) described on the right side are shown on the left side (reference numeral 1201). ~ 1241, 1301-1331). A symbol 1200 corresponding to the repeated head symbol 1201 is composed of a predetermined number of pixels. Here, the upper two dots (see reference numeral 1202) are
It is used to represent the first symbol of the repetition, the last symbol of the repetition, the first parenthesis, the second parenthesis, and the lower two dots (see reference numeral 1203) to represent tocoda, coder mark, seño, darseño, dacapo Used. The repeated head symbol and rear end symbol are distinguished by disposing black pixels in the opposite direction on the upper side of the first layer (see reference numerals 1200, 1210, and 1220). Further, repeated parentheses are distinguished by arranging black pixels in the opposite direction below the first layer (see reference numerals 1230 and 1240).

また、コーダへの移行の指示(トゥコーダ)およびコーダは、第2階層の下側において反対向きに黒の画素を配置することで区別され(符号1300,1310参照)、セーニョおよびダルセーニョは、第2階層の上側において反対向きに黒の画素を配置することで区別される。   Further, the instruction to shift to the coder (Tocoder) and the coder are distinguished by arranging black pixels in the opposite direction on the lower side of the second hierarchy (see reference numerals 1300 and 1310). A distinction is made by arranging black pixels in the opposite direction above the hierarchy.

ステップ1109においては、上記所定数の画素から構成されるシンボルが、二値化された楽譜データ中、検出したエリア或いはその近傍に描画される。シンボルは、後述する画素要素データファイルを作成する際に参照される。   In step 1109, the symbol composed of the predetermined number of pixels is drawn in or around the detected area in the binarized score data. The symbol is referred to when creating a pixel element data file to be described later.

繰り返し記号の検出(図5のステップ505)が終了すると、データファイル生成部43は、ステップ502〜505で得られた情報に基づき、楽譜要素データファイルを生成する(ステップ506)。図14は、本実施の形態にかかる楽譜要素データファイルの生成処理の例を示すフローチャートである。図14に示すように、データファイル生成部43は、RAM15に格納された五線の位置情報、パート線および小節線の位置情報を、RAM15中の楽譜要素データファイルに、所定の順序および形式で格納する(ステップ1401、1402)。次いで、データファイル生成部43は、パート線の位置、小節線の位置、および、五線の位置に基づいて、小節番号と、当該小節番号を有する小節の位置とを対応付けて、RAM15中の楽譜要素データファイルに格納する(ステップ1403)。さらに、データファイル生成部43は、パート線および小節線のそれぞれの近傍に、繰り返し記号のシンボルが存在するかを判断する。シンボルが存在する場合には、シンボルに対応付けられた繰り返し記号の種別、および、その位置情報(たとえば、繰り返し記号が位置している小節番号、および、繰り返し記号に隣接するパート線或いは小節線を示す情報)を、RAM15中の楽譜要素データファイルに格納する(ステップ1404)。このようにして、楽譜に含まれる五線、パート線、小節線、繰り返し記号、および、小節の位置を含む楽譜要素の情報を格納した楽譜要素データファイルを生成することができる。さらに、楽譜が複数のパートを含む場合には、楽譜要素ファイルにおいて、五線の位置とパート(音色)とを対応させた情報を格納するのが望ましい。   When the detection of the repeated symbols (step 505 in FIG. 5) is completed, the data file generating unit 43 generates a musical score element data file based on the information obtained in steps 502 to 505 (step 506). FIG. 14 is a flowchart showing an example of a score element data file generation process according to the present embodiment. As shown in FIG. 14, the data file generation unit 43 stores the staff position information, part line and bar line position information stored in the RAM 15 in a score element data file in the RAM 15 in a predetermined order and format. Store (steps 1401, 1402). Next, the data file generation unit 43 associates the bar number with the position of the bar having the bar number based on the part line position, the bar line position, and the staff line position in the RAM 15. The musical score element data file is stored (step 1403). Furthermore, the data file generation unit 43 determines whether there is a symbol of a repetitive symbol in the vicinity of each of the part line and the bar line. If a symbol exists, the type of repetition symbol associated with the symbol and its position information (for example, the bar number where the repetition symbol is located, and the part line or bar line adjacent to the repetition symbol are displayed. Is stored in a musical score element data file in the RAM 15 (step 1404). In this way, it is possible to generate a musical score element data file that stores information on musical score elements including the staff, part line, bar line, repetition symbol, and bar position included in the musical score. Further, when the score includes a plurality of parts, it is desirable to store information in which the position of the staff is associated with the part (tone color) in the score element file.

音楽データ分割部44は、オリジナル音楽データファイルを、小節単位のデータファイル(単位音楽データファイル)に分割し、かつ、楽譜要素データファイルを参照して、繰り返し記号に基づき重複する小節を特定して、重複する単位音楽データファイルの一方を削除する。図15は、音楽データ分割部により実行される単位音楽データファイル生成処理の例を示すフローチャートである。図15に示すように、音楽データ分割部44は、フラッシュメモリ16に格納されたオリジナル音楽データファイルを取得する(ステップ1501)。オリジナル音楽データファイルは、楽音の発音(ノートオンイベント)を含むイベント間の時間間隔を示す時間情報(デルタタイム)、ノートオンイベントを含むイベントを示す情報のほか、時間の単位を示す情報(単位時間が4分音符をどれだけ分解したかを示す分解能、たとえば、240の分解能)や、楽曲の拍子を示す情報が含まれる。ノートオンイベントとノートオフイベントとの間の時間情報により、ノートオンにかかる音符の長さがわかる。   The music data dividing unit 44 divides the original music data file into bar-unit data files (unit music data files), and refers to the score element data file to identify overlapping bars based on repetition symbols. Delete one of the duplicate unit music data files. FIG. 15 is a flowchart showing an example of unit music data file generation processing executed by the music data dividing unit. As shown in FIG. 15, the music data dividing unit 44 acquires the original music data file stored in the flash memory 16 (step 1501). The original music data file contains time information (delta time) indicating the time interval between events including the sound production (note-on event), information indicating events including note-on events, and information (units) Information indicating the resolution of how much the quarter note has been decomposed (eg, resolution of 240) and the time signature of the music. Based on the time information between the note-on event and the note-off event, the length of the note applied to the note-on can be known.

音楽データ分割部44は、オリジナル音楽データにおいて、楽曲の開始部分から、イベントを示す情報および時間情報を参照して、上記分解能に基づき、音符の長さを算出し(ステップ1502)、1つのファイル中に1小節分のイベントを示す情報および時間情報を含む単位音楽データファイルを生成する(ステップ1503)。生成された単位音楽データファイルは、RAM15に格納される。次いで、音楽データ分割部44は、楽譜要素データファイルに含まれる繰り返し記号に関する情報(繰り返し記号の種別およびその位置情報)に基づき、重複する単位音楽データファイルを削除する(ステップ1504)。   In the original music data, the music data dividing unit 44 calculates the length of the note based on the above resolution with reference to the information indicating the event and the time information from the start portion of the music (step 1502). A unit music data file including information indicating an event for one measure and time information is generated (step 1503). The generated unit music data file is stored in the RAM 15. Next, the music data division unit 44 deletes the overlapping unit music data file based on the information regarding the repeated symbols (repeated symbol type and its position information) included in the musical score element data file (step 1504).

図16(a)は、ある楽曲の楽譜の構造を概略的に示す図、図16(b)は、当該楽曲のオリジナル音楽データの構造を概略的に示す図である。図16(a)および図16(b)において、括弧内の数字は小節番号を示す。また、図16(b)において、小節番号の前に付された数字は、単位音楽データファイルのファイル番号である。ファイル番号は、たとえば、図15のステップ1503においてファイルが生成されるときに、音楽データ分割部44が与えれば良い。たとえば、図16(b)における先頭の単位音楽データファイル(符号1621参照)は、ファイル番号が1番であり、括弧内に示すように第1小節に対応することが示されている。   FIG. 16A schematically shows the structure of a musical score of a certain music piece, and FIG. 16B schematically shows the structure of original music data of the music piece. In FIG. 16A and FIG. 16B, numbers in parentheses indicate bar numbers. In FIG. 16B, the number added before the measure number is the file number of the unit music data file. For example, the file number may be given by the music data dividing unit 44 when a file is generated in step 1503 of FIG. For example, the first unit music data file (see reference numeral 1621) in FIG. 16B has a file number of 1 and corresponds to the first measure as shown in parentheses.

図16(a)に示すように、この楽曲では、第5小節(符号1605)の先頭に繰り返しの先頭記号およびセーニョがあり、第8小節(符号1608)の先頭に1番カッコ、後端に繰り返しの後端記号がある。第9小節(符号1609)の先頭には2番カッコが存在する。また、第12小節(符号1612)の先頭には、トゥコーダ、第13小節(符号1613)の後端にはダルセーニョ、第14小節(符号1614)の先頭には、コーダが存在する。オリジナル音楽データファイルから小節単位で分割された単位音楽データファイルは、図16(b)に示すように、28個存在する。繰り返しが存在するため、第5小節に相当する単位音楽データファイルが複数回出現する(符号1625、1629、1637、2641参照)。   As shown in FIG. 16 (a), in this musical piece, there is a repeated head symbol and seigno at the beginning of the fifth measure (reference numeral 1605), the first parenthesis at the beginning of the eighth measure (reference numeral 1608), and the rear end. There is a trailing end symbol. There is a second parenthesis at the beginning of the ninth measure (reference numeral 1609). In addition, there is a Tocoder at the beginning of the twelfth measure (reference numeral 1612), a darseño at the rear end of the thirteenth measure (reference numeral 1613), and a coder at the beginning of the fourteenth measure (reference numeral 1614). As shown in FIG. 16B, there are 28 unit music data files divided from the original music data file in units of measures. Since there is repetition, the unit music data file corresponding to the fifth measure appears a plurality of times (see reference numerals 1625, 1629, 1637, and 2641).

図31は、図15のステップ1504の処理例をより詳細に示すフローチャートである。図31に示すように、音楽データ分割部44は、ファイル番号を示すパラメータを「1」に初期化し(ステップ3101)、ファイル番号が示す単位音楽データファイルについて、繰り返し記号を参照して、楽譜中の小節番号を算出する(ステップ3102)。小節番号は、単位音楽データファイルのファイル番号に対応付けてRAM15に格納される(ステップ3103)。音楽データ分割部44は、最後のファイル番号を有するファイルについて、小節番号の算出が終了したかを判断する(ステップ3104)。ステップ3104でNoと判断された場合には、音楽データ分割部44は、ファイル番号をインクリメントして(ステップ3105)、ステップ3102に戻る。   FIG. 31 is a flowchart showing in more detail the processing example of step 1504 of FIG. As shown in FIG. 31, the music data dividing unit 44 initializes a parameter indicating the file number to “1” (step 3101), and refers to the repetition symbol for the unit music data file indicated by the file number, The measure number is calculated (step 3102). The measure number is stored in the RAM 15 in association with the file number of the unit music data file (step 3103). The music data division unit 44 determines whether the measure number calculation has been completed for the file having the last file number (step 3104). If it is determined No in step 3104, the music data dividing unit 44 increments the file number (step 3105) and returns to step 3102.

ステップ3104でYesと判断された場合には、音楽データ分割部44は、再度、ファイル番号を「1」に初期化して(ステップ3106)、ファイル番号が示す音楽データファイルに対応付けられた小節番号が、すでに出現しているかを判断する(ステップ3107)。ステップ3107でYesと判断された場合には、当該重複する小節番号を有する単位音楽データファイルを排除する(ステップ3108)。音楽データ分割部44は、最後のファイル番号を有するファイルについて処理が終了したかを判断する(ステップ3109)。ステップ3109でNoと判断された場合には、音楽データ分割部44は、ファイル番号をインクリメントして(ステップ3110)、ステップ3107に戻る。このような処理により、排除されなかった単位音楽データファイルが、重複のない最終的な単位音楽データファイルとなる。音楽データ分割部44は、排除されなかった単位音楽データファイルを、最終的な単位音楽データファイルとして、小節番号と対応付けてRAM15に格納する(ステップ3111)。   If it is determined Yes in step 3104, the music data dividing unit 44 initializes the file number to “1” again (step 3106), and the bar number associated with the music data file indicated by the file number is obtained. Is already present (step 3107). If it is determined Yes in step 3107, the unit music data file having the overlapping measure number is excluded (step 3108). The music data dividing unit 44 determines whether the processing for the file having the last file number has been completed (step 3109). If it is determined No in step 3109, the music data dividing unit 44 increments the file number (step 3110) and returns to step 3107. By such processing, the unit music data file that is not excluded becomes the final unit music data file without duplication. The music data division unit 44 stores the unit music data file that was not excluded in the RAM 15 in association with the measure number as the final unit music data file (step 3111).

図16に示す例では、音楽データ分割部44は、楽譜要素データファイルを参照して、第5小節〜第7小節が繰り返されることに基づき、ファイル番号が第9番〜第11番の単位音楽データファイルは、繰り返しの第5小節〜第7小節であると判断し、これにより、第9番〜第11番の単位音楽データファイルを除外すべきであると判断する。同様に、楽譜要素データファイル中のダルセーニョにより第13小節から第5小節に戻ることが検出され、上述した繰り返し記号および第12小節のトゥコーダおよび第14小節のコーダも加味して、第17番〜第26番の単位音楽データファイルが重複していると判断し、これらを除外すべきであると判断する。   In the example shown in FIG. 16, the music data dividing unit 44 refers to the musical score element data file and repeats the fifth to seventh bars, and the unit music having the file numbers 9 to 11 is repeated. It is determined that the data file is a repeated fifth to seventh measure, and accordingly, it is determined that the ninth to eleventh unit music data files should be excluded. Similarly, the return from bar 13 to bar 5 is detected by the dalseño in the musical score element data file, and in addition to the repetition symbol and the coder of bar 12 and bar coder 14 above, It is determined that the 26th unit music data file is duplicated, and it is determined that these should be excluded.

このようにして、音楽データ分割部44は、図17に示すように、重複の無い、15個の最終的な単位音楽データファイルを得ることができる。音楽データ分割部44は、また、単位音楽データファイルの各々に、ファイルの順序にしたがって小節番号を付加する。たとえば、符号1701、1705で示すものが、単位音楽データファイルを示している。重複を排除した結果、単位音楽データファイルは、図16(a)に示すような楽譜の小節番号と対応するファイルのみから構成され、また、単位音楽データファイルの順序も楽譜の小節番号の順序と一致する。   In this way, the music data dividing unit 44 can obtain 15 final unit music data files without duplication as shown in FIG. The music data dividing unit 44 also adds a bar number to each unit music data file according to the order of the files. For example, reference numerals 1701 and 1705 indicate unit music data files. As a result of eliminating the duplication, the unit music data file is composed only of files corresponding to the bar numbers of the musical score as shown in FIG. 16A, and the order of the unit music data file is also the order of the bar numbers of the musical score. Match.

以下に詳述するように、単位音楽データファイルを再生して、楽音を発音させる際には、楽譜要素データファイル中の繰り返し記号が参照され、繰り返し記号にしたがって、再生すべき単位音楽データファイルが特定され得る。   As will be described in detail below, when a unit music data file is played and a musical sound is produced, the repeated symbols in the score element data file are referred to, and the unit music data file to be played back is determined according to the repeated symbols. Can be identified.

以下、本実施の形態にかかる端末装置における処理について説明する。図18は、本実施の形態にかかる端末装置において実行される処理の例を示すフローチャートである。図18に示すように、端末装置30のCPU31は、端末装置30の電源が投入されると、RAM35中のデータや、表示部33の表示画面のクリアを含むイニシャル処理を実行する(ステップ1801)。   Hereinafter, processing in the terminal device according to the present embodiment will be described. FIG. 18 is a flowchart illustrating an example of processing executed in the terminal device according to the present embodiment. As shown in FIG. 18, when the power of the terminal device 30 is turned on, the CPU 31 of the terminal device 30 executes initial processing including clearing the data in the RAM 35 and the display screen of the display unit 33 (step 1801). .

イニシャル処理(ステップ1801)が終了すると、CPU31は、タッチパネル32上のスイッチのそれぞれの操作を検出し、検出された操作にしたがった処理を実行するパネルスイッチ処理を実行する(ステップ1802)。たとえば、表示部33の画面上には、種々のアイコン(図3の符号301参照)が表示され、ユーザがアイコンに触れることにより、CPU31によりタッチパネル32上のスイッチ操作が検出される。図19は、本実施の形態にかかるパネルスイッチ処理の例を示すフローチャートである。   When the initial process (step 1801) ends, the CPU 31 detects each operation of the switch on the touch panel 32, and executes a panel switch process for executing a process according to the detected operation (step 1802). For example, various icons (see reference numeral 301 in FIG. 3) are displayed on the screen of the display unit 33, and the switch operation on the touch panel 32 is detected by the CPU 31 when the user touches the icon. FIG. 19 is a flowchart illustrating an example of panel switch processing according to the present embodiment.

図19に示すように、パネルスイッチ処理には、ソング選択処理(ステップ1901)、スタート・ストップスイッチ処理(ステップ1902)、他のパネルスイッチ処理(ステップ1903)が含まれる。図20は、本実施の形態にかかるソング選択処理の例を示すフローチャートである。図20に示すように、CPU31は、タッチパネル32においてソングボタンに対応する位置がオンされたかを判断する(ステップ2001)。ステップ2001でNoと判断された場合には、ソング選択処理が終了される。   As shown in FIG. 19, the panel switch processing includes song selection processing (step 1901), start / stop switch processing (step 1902), and other panel switch processing (step 1903). FIG. 20 is a flowchart showing an example of song selection processing according to the present embodiment. As shown in FIG. 20, the CPU 31 determines whether or not the position corresponding to the song button on the touch panel 32 is turned on (step 2001). If it is determined No in step 2001, the song selection process is terminated.

ステップ2001でYesと判断された場合には、CPU31は、通信I/F37に、センタ装置10に対するソングリスト送信依頼の送信を指示する(ステップ2002)。これに応答して、通信I/F37は、センタ装置10に対してソングリスト送信依頼を送信し、センタ装置10からソングリストを受信する。CPU31は、受理したソングリストを表示部33の画面上に表示する(ステップ2003)。ユーザは表示部33において表示されたカーソルボタンをタッチすることで、所望のソング名を指定することができる。CPU31は、表示部33の画面上に表示されたソングリストにおいてカーソルが位置するソング名を強調表示する(ステップ2004)。   If it is determined Yes in step 2001, the CPU 31 instructs the communication I / F 37 to transmit a song list transmission request to the center device 10 (step 2002). In response to this, the communication I / F 37 transmits a song list transmission request to the center apparatus 10 and receives the song list from the center apparatus 10. The CPU 31 displays the received song list on the screen of the display unit 33 (step 2003). The user can designate a desired song name by touching the cursor button displayed on the display unit 33. The CPU 31 highlights the name of the song where the cursor is located in the song list displayed on the screen of the display unit 33 (step 2004).

CPU31は、表示部33において表示された決定スイッチがオンされたことを検出すると(ステップ2005でYes)、通信I/F37に、センタ装置10に対する決定されたソング名の楽曲の表示用楽譜データファイル、一連の単位音楽データファイルおよび楽譜要素データファイルの送信依頼の送信を指示する(ステップ2006)。これに応答して、通信I/F37は、センタ装置10に、所定の楽曲の表示用楽譜データファイル、一連の単位音楽データファイルおよび楽譜要素データファイルの送信依頼を送信し、センタ装置10から、当該楽曲の表示用楽譜データファイル、一連の単位音楽データファイルおよび楽譜要素データファイルを受理する(ステップ2007)。CPU31は、受理した表示用楽譜データファイル、一連の単位音楽データファイルおよび楽譜要素データファイルを、フラッシュメモリ36に格納する(ステップ2007)。   When the CPU 31 detects that the determination switch displayed on the display unit 33 is turned on (Yes in step 2005), the communication I / F 37 displays a musical score data file for displaying the song having the determined song name for the center device 10. Then, a transmission request for a series of unit music data files and musical score element data files is instructed (step 2006). In response to this, the communication I / F 37 transmits to the center apparatus 10 a request to transmit a musical score data file for displaying a predetermined music piece, a series of unit music data files, and a musical score element data file. The musical score data file for display of the music, a series of unit music data files, and a musical score element data file are received (step 2007). The CPU 31 stores the received musical score data file for display, the series of unit music data files, and the musical score element data file in the flash memory 36 (step 2007).

次いで、CPU31は、楽譜データファイルに基づいて、表示部33の画面上に楽譜を表示する(ステップ2008)また、CPU31は、楽譜要素データファイル中の垂直線および小節線の座標に基づいて、楽譜において先頭小節に対応する領域を強調表示する(ステップ2009)。強調表示として、たとえば、その部分だけ他の色(赤色)の半透明表示とすれば良い。   Next, the CPU 31 displays the score on the screen of the display unit 33 based on the score data file (step 2008). The CPU 31 also scores the score based on the vertical line and bar line coordinates in the score element data file. In step 2009, the area corresponding to the first measure is highlighted. As the highlight display, for example, only that portion may be displayed in a translucent display of another color (red).

次に、スタート・ストップスイッチ処理について説明する。図21は、本実施の形態にかかるスタート・ストップスイッチ処理の例を示すフローチャートである。図21に示すように、CPU31は、表示部33において表示されたスタート・ストップスイッチの操作があったかを判断する(ステップ2101)。ステップ2101でNoと判断された場合には、スタート・ストップスイッチ処理を終了する。   Next, the start / stop switch process will be described. FIG. 21 is a flowchart showing an example of start / stop switch processing according to the present embodiment. As shown in FIG. 21, the CPU 31 determines whether or not the start / stop switch displayed on the display unit 33 has been operated (step 2101). If it is determined No in step 2101, the start / stop switch process is terminated.

ステップ2101でYesと判断された場合には、CPU31は、RAM35に格納されたスタートフラグSTFを反転させ(ステップ2102)、スタートフラグSTFが「1」であるかを判断する(ステップ2103)。ステップ2103でYesと判断された場合には、CPU31は、楽譜要素データファイルを参照して、所定の単位音楽データファイルを特定する(ステップ2104)。たとえば、最初のスタート・ストップスイッチのオンであれば、CPU31は、先頭の単位音楽データファイルを所定の単位音楽データファイルとして特定する。或いは、スタート・ストップスイッチの操作により楽曲の再生が停止されている状態であれば、CPU31は、停止した位置に対応する単位音楽データファイルを所定単位音楽データファイルとして特定する。   If it is determined YES in step 2101, the CPU 31 inverts the start flag STF stored in the RAM 35 (step 2102) and determines whether the start flag STF is “1” (step 2103). If it is determined Yes in step 2103, the CPU 31 refers to the score element data file and identifies a predetermined unit music data file (step 2104). For example, if the first start / stop switch is on, the CPU 31 specifies the first unit music data file as a predetermined unit music data file. Or if the reproduction | regeneration of a music is stopped by operation of a start / stop switch, CPU31 will specify the unit music data file corresponding to the stopped position as a predetermined unit music data file.

次いで、CPU31は、特定された単位音楽データファイル中、所定アドレスのデータレコードを取得する(ステップ2105)。取得されたデータレコードは、たとえば、RAM35に格納される。たとえば、最初のスタート・ストップスイッチのオンであれば、CPU31は、先頭アドレスのデータレコードを取得する。或いは、スタート・ストップスイッチの操作により楽曲の再生が停止されている状態であれば、CPU31は、停止した位置に対応するデータレコードを取得する。   Next, the CPU 31 acquires a data record at a predetermined address in the specified unit music data file (step 2105). The acquired data record is stored in the RAM 35, for example. For example, if the first start / stop switch is on, the CPU 31 obtains the data record of the head address. Or if the reproduction | regeneration of a music is stopped by operation of a start / stop switch, CPU31 will acquire the data record corresponding to the stop position.

また、CPU31は、タイマインタラプトを開始する(ステップ2106)。タイマインタラプトが開始されることにより、所定の時間間隔でタイマインタラプト処理が実行され、CPU31の内部に設けられたタイマがインクリメントされる。なお、ステップ2103でNoと判断された場合、つまり、STFが「0」である場合には、CPU31は、タイマインタラプトを停止する(ステップ2107)。   Further, the CPU 31 starts a timer interrupt (step 2106). When the timer interrupt is started, a timer interrupt process is executed at a predetermined time interval, and a timer provided in the CPU 31 is incremented. If NO is determined in step 2103, that is, if the STF is “0”, the CPU 31 stops the timer interrupt (step 2107).

その後、CPU31は、他のパネルスイッチ処理を実行する(ステップ1903)。他のパネルスイッチ処理には、テンポスイッチの操作によるテンポデータの設定およびテンポデータのRAM23への格納などが含まれる。   Thereafter, the CPU 31 executes another panel switch process (step 1903). Other panel switch processing includes setting tempo data by operating the tempo switch, storing tempo data in the RAM 23, and the like.

パネルスイッチ処理(ステップ1802)が終了すると、CPU31は、画像更新処理を実行する(ステップ1803)。画像更新処理においては、CPU31は、楽曲の再生が進行しているときに、表示された楽譜において、現在演奏中の小節の領域を強調表示し、或いは、表示部33の画面上に表示する楽譜の部分を変更する。画像更新処理については後に再度説明する。   When the panel switch process (step 1802) ends, the CPU 31 executes an image update process (step 1803). In the image update process, the CPU 31 highlights the area of the currently playing bar in the displayed score or displays the score displayed on the screen of the display unit 33 while the music is being played. Change the part. The image update process will be described later again.

画像更新処理(ステップ1803)が終了すると、CPU31は、演奏操作検出処理を実行する(ステップ1804)。図22〜図24は、本実施の形態にかかる演奏操作検出処理の例を示すフローチャートである。図22に示すように、CPU31は、表示部33において楽譜が表示された領域での操作(ユーザによる接触)があったかを判断する(ステップ2201)。図25は、端末装置の表示部の画面上に楽譜が表示された例を示す図である。図25において、たとえば、破線2501の内側の領域が、楽譜が表示された領域となる。   When the image update process (step 1803) ends, the CPU 31 executes a performance operation detection process (step 1804). 22-24 is a flowchart which shows the example of the performance operation detection process concerning this Embodiment. As shown in FIG. 22, the CPU 31 determines whether or not there has been an operation (contact by the user) in the area where the score is displayed on the display unit 33 (step 2201). FIG. 25 is a diagram illustrating an example in which a score is displayed on the screen of the display unit of the terminal device. In FIG. 25, for example, the area inside the broken line 2501 is the area where the score is displayed.

ステップ2201でYesと判断された場合には、CPU31は、ユーザにより接触された位置の座標を取得する(ステップ2202)。ステップ2202では位置の座標のほか、操作回数、操作時刻、操作時間(接触された時間長)および前回操作からの差分値を得て、これらをRAM35に格納する。次いで、CPU31は、ユーザが接触した位置の座標および楽譜要素データファイルに基づいて、接触した位置に対応する小節番号を取得する(ステップ2203)。   If it is determined Yes in step 2201, the CPU 31 acquires the coordinates of the position touched by the user (step 2202). In step 2202, in addition to the position coordinates, the number of operations, operation time, operation time (length of contact) and difference values from the previous operation are obtained and stored in the RAM 35. Next, the CPU 31 acquires a bar number corresponding to the touched position based on the coordinates of the position touched by the user and the musical score element data file (step 2203).

図26、27は、図22のステップ2203をより詳細に示すフローチャートである。図26に示すように、CPU31は、RAM35に格納された、操作された位置の座標、操作回数、操作時刻、操作時間(接触された時間長)および前回操作からの差分値を取得する。次いで、CPU31は、操作された位置が、小節線の付近であるかを判断する(ステップ2602)。ここでは、操作された位置が、小節線を含む前後左右所定の長方形の領域内であるかを判断すれば良い。   26 and 27 are flowcharts showing the step 2203 of FIG. 22 in more detail. As illustrated in FIG. 26, the CPU 31 acquires the coordinates of the operated position, the number of operations, the operation time, the operation time (the length of time of contact), and the difference value from the previous operation stored in the RAM 35. Next, the CPU 31 determines whether or not the operated position is near the bar line (step 2602). Here, it is only necessary to determine whether the operated position is within a predetermined rectangular area including front and rear, left and right including the bar line.

ステップ2602でYesと判断された場合には、CPU31は、楽譜要素データファイルを参照して、操作された位置の付近にある小節線について、リピート記号が存在するかを判断する(ステップ2603)。ステップ2603でYesと判断された場合には、CPU31は、RAM35中のリピートフラグを「1」にセットするとともに、リピート記号の情報をRAM35に格納する(ステップ2604)。   If it is determined Yes in step 2602, the CPU 31 refers to the musical score element data file and determines whether a repeat symbol exists for the bar line near the operated position (step 2603). If it is determined Yes in step 2603, the CPU 31 sets the repeat flag in the RAM 35 to “1” and stores the information of the repeat symbol in the RAM 35 (step 2604).

次いで、CPU31は、操作された位置が、小節の範囲、つまり、五線と小節線とで囲まれた領域内であるかを判断する(ステップ2605)。ステップ2605でYesと判断された場合には、CPU31は、楽譜要素データファイルを参照して、操作された位置に対応する小節番号を取得する(ステップ2606)。また、CPU31は、操作時間が、所定の閾値Th1より大きいかを判断する(ステップ2607)。ステップ2607でYesと判断された場合には、CPU31は、ミュートフラグを「1」にセットする(ステップ2608)。ステップ2608において、ミュートフラグのセットに加えて、CPU31は、楽譜要素データファイル中のパート線および五線の位置を参照して、表示されている楽譜が複数パートから構成される場合には、操作された位置に対応するパートをミュートパートとして、RAM35にパートを示す情報を格納する。パートを示す情報として、ミュートすべき五線の位置情報を利用することができる。   Next, the CPU 31 determines whether or not the operated position is within a bar range, that is, within an area surrounded by a staff and a bar line (step 2605). If it is determined Yes in step 2605, the CPU 31 refers to the score element data file and obtains a measure number corresponding to the operated position (step 2606). Further, the CPU 31 determines whether or not the operation time is longer than a predetermined threshold Th1 (step 2607). If it is determined Yes in step 2607, the CPU 31 sets the mute flag to “1” (step 2608). In step 2608, in addition to setting the mute flag, the CPU 31 refers to the position of the part line and staff in the musical score element data file, and if the displayed musical score is composed of a plurality of parts, the operation is performed. Information indicating the part is stored in the RAM 35 with the part corresponding to the set position as the mute part. As the information indicating the part, the position information of the staff to be muted can be used.

次いで、CPU31は、今回の操作された位置が、前回の操作位置から所定の範囲内であり、かつ、操作間隔である差分値が所定の閾値Th2より小さいかを判断する(ステップ2701)。ステップ2701でYesと判断された場合には、操作回数に、今回の操作回数を加算して、新たな操作回数をRAM35に格納する(ステップ2702)。その後、CPU31は、楽譜上のユーザによる操作により次に演奏すべき小節番号を取得する(ステップ2703)。   Next, the CPU 31 determines whether or not the currently operated position is within a predetermined range from the previous operation position, and whether the difference value as the operation interval is smaller than a predetermined threshold Th2 (step 2701). If YES is determined in step 2701, the current operation count is added to the operation count, and the new operation count is stored in the RAM 35 (step 2702). Thereafter, the CPU 31 obtains a measure number to be played next by a user operation on the score (step 2703).

図28は、図27のステップ2703をより詳細に示すフローチャートである。図28に示すように、CPU31は、RAM35に格納された繰り返しの完了回数が、繰り返し回数以下であるかを判断する(ステップ2801)。ステップ2801でYesと判断された場合には、小節の繰り返しが完了していないことになる。この場合には、CPU31は、繰り返し回数が2以上であるかを判断する(ステップ2802)。ステップ2802でYesと判断された場合には、CPU31は、次の小節番号を現在の小節番号と同じ番号としてRAM35に格納する(ステップ2803)。次いで、CPU31は、RAM35中の完了回数を示すパラメータをインクリメントする(ステップ2804)。ステップ2801でNoと判断された場合、つまり、完了回数が繰り返し回数より多くなった場合には、CPU31は、RAM35に格納された、繰り返し回数を示すパラメータおよび完了回数を示すパラメータを「0」にリセットする(ステップ2805)。   FIG. 28 is a flowchart showing step 2703 of FIG. 27 in more detail. As shown in FIG. 28, the CPU 31 determines whether or not the number of iterations stored in the RAM 35 is equal to or less than the number of iterations (step 2801). If it is determined Yes in step 2801, the measure has not been repeated. In this case, the CPU 31 determines whether the number of repetitions is 2 or more (step 2802). If it is determined Yes in step 2802, the CPU 31 stores the next measure number in the RAM 35 as the same number as the current measure number (step 2803). Next, the CPU 31 increments a parameter indicating the number of completions in the RAM 35 (step 2804). If it is determined No in step 2801, that is, if the number of completions is greater than the number of repetitions, the CPU 31 sets the parameter indicating the number of repetitions and the parameter indicating the number of completions stored in the RAM 35 to “0”. Reset (step 2805).

ステップ2802でNoと判断された場合、或いは、ステップ2805の後に、CPU31は、RAM35に格納されたリピートフラグが「0」であるかを判断する(ステップ2806)。ステップ2806でYesと判断された場合には、CPU31は、次の小節番号を、現在の小節番号に「1」を加えた番号としてRAM35に格納する(ステップ2807)。ステップ2806でNoと判断された場合には、リピート記号が存在していることを意味する。したがって、CPU31は、リピート先決定処理を実行する(ステップ2808)。リピート先決定処理については後に詳述する。   If it is determined No in step 2802 or after step 2805, the CPU 31 determines whether the repeat flag stored in the RAM 35 is “0” (step 2806). If YES is determined in step 2806, the CPU 31 stores the next bar number in the RAM 35 as a number obtained by adding “1” to the current bar number (step 2807). If it is determined No in step 2806, it means that a repeat symbol exists. Therefore, the CPU 31 executes a repeat destination determination process (step 2808). The repeat destination determination process will be described in detail later.

図22のステップ2203が終了すると、CPU31は、スタートフラグSTFが「1」であるかを判断する(ステップ2204)。ステップ2204では、現在楽曲が演奏されているかが判断される。ステップ2204でYesと判断された場合には、CPU31は、RAM35中のリピートフラグが「0」であり、かつ、ミュートフラグが「0」であるかを判断する(ステップ2205)。ステップ2205においては、楽曲が演奏中で表示された楽譜上の操作があったときに、それがパートのミュートや繰り返しの指示でないことが判断されている。   When step 2203 in FIG. 22 ends, the CPU 31 determines whether the start flag STF is “1” (step 2204). In step 2204, it is determined whether the music is currently being played. If it is determined Yes in step 2204, the CPU 31 determines whether the repeat flag in the RAM 35 is “0” and the mute flag is “0” (step 2205). In step 2205, when there is an operation on the score displayed while the music is being played, it is determined that this is not an instruction to mute or repeat the part.

ステップ2205でYesと判断された場合には、さらに、RAM35中の繰り返し回数を示すパラメータが「0」であるかを判断する(ステップ2206)。ステップ2206でYesと判断された場合には、CPU31は、単位音楽データファイルのデータレコードのうち、現在発音中の楽音についてノートオフイベントを生成して、音源部39に指示する(ステップ2207)。また、CPU31は、タイマインタラプトを停止する(ステップ2208)とともに、スタートフラグSTFを「0」にリセットする(ステップ2209)。   If it is determined Yes in step 2205, it is further determined whether or not the parameter indicating the number of repetitions in the RAM 35 is “0” (step 2206). If it is determined Yes in step 2206, the CPU 31 generates a note-off event for the currently sounding tone in the data record of the unit music data file and instructs the sound source unit 39 (step 2207). Further, the CPU 31 stops the timer interrupt (step 2208) and resets the start flag STF to “0” (step 2209).

ステップ2204〜2206の何れかでNoと判断された場合、或いは、ステップ2209が実行された後に、ステップ2301に進む。ステップ2301において、CPU31は、スタートフラグSTFが「1」で、かつ、ミュートフラグが「1」であるかを判断する(ステップ2301)。ステップ2301でYesと判断された場合には、CPU31は、単位音楽データファイルのデータレコードのうち、ミュートパートに対応する音色、音高の楽音についてノートオフイベントを生成して、音源部39に指示する(ステップ2302)。楽譜要素データファイル中のミュートすべき五線の位置情報に基づいて、ミュートすべきパートの音色を決定することができる。   When it is determined No in any of Steps 2204 to 2206 or after Step 2209 is executed, the process proceeds to Step 2301. In step 2301, the CPU 31 determines whether the start flag STF is “1” and the mute flag is “1” (step 2301). If it is determined Yes in step 2301, the CPU 31 generates a note-off event for the tone and pitch tone corresponding to the mute part in the data record of the unit music data file, and instructs the sound source unit 39. (Step 2302). The timbre of the part to be muted can be determined based on the position information of the staff to be muted in the musical score element data file.

また、CPU31は、次の小節番号は現在の小節番号と不一致であるかを判断する(ステップ2303)。ステップ2303でYesと判断された場合には、次の小節番号に対応する単位音楽データファイルを取得する(ステップ2304)。その後、取得された単位音楽データファイルの先頭アドレスのデータレコードを取得して、RAM35に格納する(ステップ2305)。その後、CPU31はタイマインタラプトを開始する(ステップ2306)とともに、スタートフラグSTFを「1」にセットする(ステップ2307)。   Further, the CPU 31 determines whether or not the next bar number does not match the current bar number (step 2303). If it is determined Yes in step 2303, a unit music data file corresponding to the next measure number is acquired (step 2304). Thereafter, the data record at the head address of the obtained unit music data file is obtained and stored in the RAM 35 (step 2305). Thereafter, the CPU 31 starts a timer interrupt (step 2306) and sets a start flag STF to “1” (step 2307).

ステップ2201でNoと判断された場合には、CPU31は、スタートフラグが「1」であるかを判断する(ステップ2401)。ステップ2401でYesと判断された場合には、CPU31は、単位音楽データファイルを参照して、現在発音中の楽音が小節の末尾の楽音であるかを判断する(ステップ2402)。ステップ2401或いは2402でNoと判断された場合には、演奏操作検出処理を終了する。   When it is determined No in step 2201, the CPU 31 determines whether the start flag is “1” (step 2401). If it is determined Yes in step 2401, the CPU 31 refers to the unit music data file and determines whether the musical sound currently being generated is the musical sound at the end of the measure (step 2402). When it is determined No in step 2401 or 2402, the performance operation detection process is terminated.

ステップ2402でYesと判断された場合には、CPU31は、楽譜要素データファイルを参照して、次の小節番号を特定する(ステップ2403)。後述するように、楽譜要素データファイルにおいて、現在の小節の末尾に関してリピート記号が存在しない場合には、CPU31は、次の小節番号を、現在の小節番号に「1」を加えた番号としてRAM35に格納する。また、楽譜要素データファイルにおいて現在の小節の末尾にリピート記号が存在する場合、或いは、現在の小節番号に「1」を加えた次の小節番号を得た場合に、当該次の小節番号に対応する小節の先頭にリピート記号が存在する場合には(ステップ2404でYes)、CPU31は、リピート先決定処理を実行する(ステップ2405)。ステップ2404でNoと判断された場合或いは、ステップ2405の後、ステップ2304に進む。   If it is determined Yes in step 2402, the CPU 31 refers to the musical score element data file and specifies the next measure number (step 2403). As will be described later, when there is no repeat symbol for the end of the current measure in the musical score element data file, the CPU 31 sets the next measure number in the RAM 35 as a number obtained by adding “1” to the current measure number. Store. Also, if there is a repeat symbol at the end of the current measure in the score element data file, or if the next measure number obtained by adding “1” to the current measure number is obtained, it corresponds to the next measure number. If there is a repeat symbol at the head of the measure to be performed (Yes in step 2404), the CPU 31 executes a repeat destination determination process (step 2405). If it is determined No in step 2404 or after step 2405, the process proceeds to step 2304.

図29は、本実施の形態にかかるリピート記号処理の例を示すフローチャートである。本実施の形態において、リピート記号には、いわゆる繰り返しの先頭記号および後端記号、並びに、これに関連する番号付きカッコを含む第1群と、ダルセーニョ、ダカーポ、トゥコーダ、ヴィーデ(コーダ)、セーニョを含む第2群とに分けられている。また、第1群および第2群のそれぞれについて、各記号は、開始(Start)、終端(End)、行き先(To)、出発元(From)という4つの記号種別に対応付けられている。   FIG. 29 is a flowchart showing an example of repeat symbol processing according to the present embodiment. In the present embodiment, the repeat symbol includes a first group including a so-called repeated head symbol and rear end symbol, and numbered parentheses associated therewith, and Darseiho, Dacapo, Tucoder, Vide (Coda), and Seño. It is divided into the second group including. Further, for each of the first group and the second group, each symbol is associated with four symbol types, that is, start (Start), end (End), destination (To), and departure (From).

たとえば、第1群に属するリピート記号は、以下の記号種別と対応付けられる。   For example, repeat symbols belonging to the first group are associated with the following symbol types.

繰り返しの先頭記号:開始(Start)
繰り返しの終端記号:終端(End)
番号付きカッコのうち、最終番号以外のカッコ:出発元(From)
番号付きカッコのうち、最終番号のカッコ:行き先(To)。
First symbol of repetition: Start (Start)
End symbol of repetition: End (End)
Numbered parentheses other than the final number: From
Among the numbered parentheses, the last parenthesis: destination (To).

また、第2群に属するリピート記号は、以下の記号種別と対応付けられる。   The repeat symbols belonging to the second group are associated with the following symbol types.

ダカーポ:終端(End)
ダルセーニョ:終端(End)
曲先頭:開始(Start)、ただしダカーポが存在する場合のみ
セーニョ:開始(Start)
ヴィーデ:出発元(From)
コーダ:行き先(To)。
Da Capo: End (End)
Darseño: End (End)
Top of song: Start (Start), but only if Dacapo exists Seño: Start (Start)
Wiede: From
Coda: Destination (To).

したがって、楽譜要素データファイルにおいては、小節番号に対応して、リピート記号の属する群(第1群或いは第2群)およびリピート記号の名称および記号種別が含まれる。また、番号付きのカッコについては、上記情報に加えて、リピート指定数(つまり、繰り返し番号に相当する数字)が付加される。   Therefore, in the musical score element data file, the group (first group or second group) to which the repeat symbol belongs, the name of the repeat symbol, and the symbol type are included corresponding to the measure number. For numbered parentheses, in addition to the above information, a repeat designation number (that is, a number corresponding to a repetition number) is added.

リピート記号処理は、群ごとに実行される。したがって、第1群のリピート記号についてのリピート記号処理、および、第2群のリピート記号についてのリピート記号処理がそれぞれ実行される。図29に示すように、CPU31は、リピート記号種別を参照する(ステップ2901)。リピート記号種別が開始(Start)である場合には、CPU31は、RAM35中のリピート位置として、現在の小節番号を格納する(ステップ2902)。   Repeat symbol processing is executed for each group. Therefore, repeat symbol processing for the first group of repeat symbols and repeat symbol processing for the second group of repeat symbols are performed. As shown in FIG. 29, the CPU 31 refers to the repeat symbol type (step 2901). If the repeat symbol type is Start (Start), the CPU 31 stores the current measure number as the repeat position in the RAM 35 (step 2902).

リピート種別が終端(End)である場合には、CPU31は、RAM35中の次の小節番号として、リピート位置の小節番号をセットする(ステップ2903)。また、CPU31は、RAM35中のリピート記号に関する繰り返し回数を示すパラメータをインクリメントする(ステップ2904)。リピート記号種別が行き先(To)である場合には、処理を終了する。   If the repeat type is end (End), the CPU 31 sets the measure number at the repeat position as the next measure number in the RAM 35 (step 2903). Further, the CPU 31 increments a parameter indicating the number of repetitions related to the repeat symbol in the RAM 35 (step 2904). If the repeat symbol type is a destination (To), the process ends.

リピート希望種別が出発元(From)である場合には、CPU31は、RAM35中の、リピート記号に関する繰り返し回数が、リピート指定数以上であるかを判断する(ステップ2905)。ステップ2905でNoと判断された場合には処理を終了する。その一方、ステップ2905でYesと判断された場合には、CPU31は、楽譜要素データファイル中、リピート記号種別の行き先(To)を示すリピート記号を含む小節を検索する(ステップ2906)。なお、ここでは、同じ群に属するリピート記号が検索される。CPU31は、RAM35中の次の小節番号として、検索された小節番号をセットする(ステップ2907)。また、CPU31は、リピート記号に関する繰り返し回数を「0」にリセットする(ステップ2908)。   If the desired repeat type is the departure source (From), the CPU 31 determines whether or not the number of repetitions for the repeat symbol in the RAM 35 is equal to or greater than the repeat designation number (step 2905). If NO in step 2905, the process ends. On the other hand, if it is determined Yes in step 2905, the CPU 31 searches the musical score element data file for a bar including a repeat symbol indicating the destination (To) of the repeat symbol type (step 2906). Here, repeat symbols belonging to the same group are searched. The CPU 31 sets the retrieved bar number as the next bar number in the RAM 35 (step 2907). Further, the CPU 31 resets the number of repetitions related to the repeat symbol to “0” (step 2908).

リピート記号処理によって、第1群のリピート記号では、具体的に次のような処理が実行される。たとえば、ある単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの先頭記号が含まれる場合には、CPU31は、リピート位置として、単位音楽データファイルについての小節番号を、RAM35に格納する。また、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの終端記号が含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、RAM35にリピート位置として格納された小節番号に基づいて決定する。   With the repeat symbol processing, the following processing is specifically executed for the first group of repeat symbols. For example, for a unit music data file, when a repeated head symbol is included as a repetition symbol in the score element data file, the CPU 31 stores in the RAM 35 the measure number of the unit music data file as a repeat position. When the unit music data file includes a repeated terminal symbol as a repetition symbol in the score element data file, the CPU 31 stores the unit music data file to be read out next in the measure number stored in the RAM 35 as a repeat position. Determine based on.

また、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として番号付きカッコが含まれる場合に、その番号が、繰り返し回数を示すリピート指定数より小さいのであれば、CPU31は、次に読み出すべき単位音楽データファイルを、前記リピート位置である小節番号にしたがって決定する。また、上記番号が、リピート指定数以上であれば、CPU31は、楽譜要素データファイルに含まれる、行き先を示す小節番号に基づき、次に読み出すべき単位音楽データファイルを決定する。   In addition, when a unit music data file includes a numbered parenthesis as a repetition symbol in the score element data file, if the number is smaller than the repeat designation number indicating the number of repetitions, the CPU 31 reads the unit to be read next. The music data file is determined according to the measure number that is the repeat position. If the number is equal to or greater than the repeat designation number, the CPU 31 determines a unit music data file to be read out next based on the measure number indicating the destination included in the score element data file.

また、第2群のリピート記号については、具体的に次のような処理が実行される。たとえば、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダカーポが含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、先頭の小節番号についての単位音楽データファイルと決定する。   For the second group of repeat symbols, the following processing is specifically executed. For example, when the unit music data file includes dacapo as a repetition symbol in the score element data file, the CPU 31 determines the unit music data file to be read next as the unit music data file for the first measure number. .

単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてセーニョが含まれる場合には、CPU31は、リピート位置として、当該単位音楽データファイルについての小節番号を、RAM35に格納する。また、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダルセーニョが含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、RAM35にリピート位置として格納された小節番号に基づいて決定する。   When the unit music data file includes “Seiyo” as a repetition symbol in the score element data file, the CPU 31 stores the measure number of the unit music data file in the RAM 35 as the repeat position. If the unit music data file includes a darseño as a repetition symbol in the musical score element data file, the CPU 31 selects the unit music data file to be read next based on the measure number stored in the RAM 35 as a repeat position. decide.

さらに、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてヴィーデが含まれる場合に、CPU31は、楽譜要素データファイル中、コーダを含む小節を検索し、次に読み出すべき単位音楽データファイルを、当該コーダを含む小節についての単位音楽データファイルと決定する。   Further, when the unit music data file contains a video as a repetition symbol in the score element data file, the CPU 31 searches the score element data file for a measure including a coder, and selects a unit music data file to be read next. It is determined as a unit music data file for a bar including the coder.

演奏操作検出処理(図18のステップ1804)が終了すると、CPU31は、ソング処理を実行する(ステップ1805)。図30は、本実施の形態にかかるソング処理の例を示すフローチャートである。図30に示すように、CPU31は、単位音楽データファイルのアドレスを歩進する(ステップ3001)。ステップ3001においては、アドレスの歩進により、時間を示すデータレコードのアドレスとなるようにする。CPU31は、アドレスが既に単位音楽データファイルの末尾になっているかを判断する(ステップ3002)。ステップ3002でYesと判断された場合には、CPU31は、RAM35に格納された次の小節番号を参照して、当該次の小節番号を有する単位音楽データファイルを取得する(ステップ3003)。   When the performance operation detection process (step 1804 in FIG. 18) ends, the CPU 31 executes song processing (step 1805). FIG. 30 is a flowchart showing an example of song processing according to the present embodiment. As shown in FIG. 30, the CPU 31 increments the address of the unit music data file (step 3001). In step 3001, the address of the data record indicating the time is set by the step of the address. The CPU 31 determines whether the address is already at the end of the unit music data file (step 3002). If it is determined Yes in step 3002, the CPU 31 refers to the next measure number stored in the RAM 35 and acquires a unit music data file having the next measure number (step 3003).

その後、CPU31は、単位音楽データファイルにおいて、アドレスが示すデータレコードにおける時間情報を参照して(ステップ3004)、現在時刻が、時間情報に基づく次のイベントの実行タイミングに達しているかを判断する(ステップ3005)。ステップ3005でYesと判断された場合には、CPU31は、RAM35中のミュートフラグが「1」であるかを判断する(ステップ3006)。ステップ3006でYesと判断された場合には、CPU31は、時間情報に後続するデータレコードを参照して、イベントが、ミュートパートの音色に関連するかを判断する(ステップ3007)。ステップ3007でYesと判断された場合には、ソング処理を終了する。   Thereafter, the CPU 31 refers to the time information in the data record indicated by the address in the unit music data file (step 3004), and determines whether the current time has reached the execution timing of the next event based on the time information ( Step 3005). When it is determined Yes in step 3005, the CPU 31 determines whether the mute flag in the RAM 35 is “1” (step 3006). When it is determined Yes in step 3006, the CPU 31 refers to the data record that follows the time information and determines whether the event is related to the tone of the mute part (step 3007). If it is determined YES in step 3007, the song processing is terminated.

ステップ3006でYes、或いは、ステップ3007でNoと判断された場合には、CPU31は、発音・消音処理を実行する(ステップ3008)。ステップ3008において、CPU31は、時間情報に後続するデータレコードを参照して、当該イベントがノートオンイベントであれば、データレコードが示す音色および音高での発音を示すノートオンイベントを生成して、音源部39に出力する。また、CPU31は、イベントがノートオフイベントであれば、データレコードが示す音色および音高で発音中の楽音を消音するノートオフイベントを参照して、音源部39に出力する。   When it is determined Yes in step 3006 or No in step 3007, the CPU 31 executes sound generation / mute processing (step 3008). In step 3008, the CPU 31 refers to the data record that follows the time information, and if the event is a note-on event, generates a note-on event that indicates the tone and pitch of the data record, The sound is output to the sound source unit 39. Further, if the event is a note-off event, the CPU 31 refers to the note-off event for muting the musical sound being generated with the tone color and pitch indicated by the data record, and outputs it to the sound source unit 39.

ソング処理(ステップ1805)が終了すると、音源部39において音源発音処理が実行される(ステップ1806)。音源発音処理では、音源部39が、CPU31からノートオンイベントを受理すると、ノートオンイベントに含まれる音高および音色情報に基づき、ROM34から所定の音色の波形データを、音高にしたがった速度で読み出して、所定の楽音データを生成する。また、音源部39が、CPU31からノートオフイベントを受理すると、ノートオフイベントに示される音色および音高の楽音を消音する。   When the song process (step 1805) ends, the sound source sound generation process is executed in the sound source unit 39 (step 1806). In the sound source sound generation process, when the sound source unit 39 receives a note-on event from the CPU 31, the waveform data of a predetermined tone color is read from the ROM 34 at a speed according to the tone pitch based on the pitch and tone color information included in the note-on event. Read out and generate predetermined musical tone data. When the sound source unit 39 receives a note-off event from the CPU 31, the tone of tone and pitch indicated in the note-off event are muted.

音源発音処理(ステップ1806)が終了すると、CPU31は、その他の処理を実行して(ステップ1807)、ステップ1802に戻る。その他の処理には、通信I/F37を介したセンタ装置10とのデータ送受信、メモリカードなど外部記憶媒体(図示せず)からのデータの読み出し、外部記憶媒体へのデータ書き込みなどが含まれる。   When the sound source sound generation process (step 1806) ends, the CPU 31 executes other processes (step 1807) and returns to step 1802. Other processing includes data transmission / reception with the center apparatus 10 via the communication I / F 37, reading of data from an external storage medium (not shown) such as a memory card, and writing of data to the external storage medium.

次に図18のステップ1803の画像更新処理について再度説明する。図32は、本実施の形態にかかる画像更新処理の例を示すフローチャートである。図32に示すように、CPU32は、スタートフラグSTFが「1」であるかを判断する(ステップ3201)。ステップ3201でNoと判断された場合には、画像更新処理を終了する。ステップ3201でYesと判断された場合には、CPU31は、RAM35中に次の小節番号が格納されているかを判断する(ステップ3202)。ステップ3202でYesと判断された場合には、次の小節番号に対応する小節の領域を強調表示する(ステップ3203)。その後、CPU31は、次の小節番号を現在の小節番号として、RAM35に格納するとともに、次の小節番号をクリアする(ステップ3204)。   Next, the image update process in step 1803 in FIG. 18 will be described again. FIG. 32 is a flowchart illustrating an example of the image update process according to the present embodiment. As shown in FIG. 32, the CPU 32 determines whether the start flag STF is “1” (step 3201). If it is determined No in step 3201, the image update process ends. When it is determined Yes in step 3201, the CPU 31 determines whether or not the next bar number is stored in the RAM 35 (step 3202). If it is determined Yes in step 3202, the bar area corresponding to the next bar number is highlighted (step 3203). Thereafter, the CPU 31 stores the next bar number as the current bar number in the RAM 35 and clears the next bar number (step 3204).

その後、CPU31は、現在強調表示されている小節の領域の位置を取得し(ステップ3205)、その位置が、画像中右下側(末端)の表示範囲内であるかを判断する(ステップ3206)。ステップ3206では、現在演奏中の小節が、画像中の右下側(末端)に位置しているかが判断される。ステップ3206でYesと判断された場合には、CPU31は、現在強調表示されている小節を先頭として所定小節数に対応する楽譜データファイルの部分を読み出し(ステップ3207)、読み出された楽譜データファイルの領域を、表示部33の画面上に表示する(ステップ3208)。   Thereafter, the CPU 31 obtains the position of the currently highlighted bar area (step 3205), and determines whether the position is within the display range on the lower right side (terminal) of the image (step 3206). . In step 3206, it is determined whether the currently playing bar is located on the lower right side (terminal) of the image. If it is determined YES in step 3206, the CPU 31 reads out the musical score data file portion corresponding to the predetermined number of bars starting from the currently highlighted measure (step 3207), and the read musical score data file. Is displayed on the screen of the display unit 33 (step 3208).

本実施の形態によれば、楽譜要素抽出部42が、画像データファイル中の楽譜において、当該楽譜の構成要素であるパート線、五線、および、小節線の位置に基づいて、前記楽譜における小節の各々の領域および小節番号を特定する。音楽データ分割部44は、音楽データファイル中の時間情報に基づいて、音楽データファイルを分割して、小節ごとの、音高を示す情報および時間情報を含む、複数の単位音楽データファイルを生成する。また、音楽データ分割部44は、画像データファイル中の楽譜において、当該楽譜の構成要素である繰り返し記号の種別およびその位置と、パート線、五線および小節線の位置と、に基づき、繰り返し記号の位置する小節を特定して、複数の単位音楽データファイルから、繰り返しにより重複する単位音楽データファイルを排除して、重複のない最終的な単位音楽データファイルを取得するとともに、最終的な単位音楽データファイルと、小節番号とを対応付けて、RAM35に格納する。したがって、本実施の形態においては、それぞれが楽譜の小節と1対1に対応する単位音楽データファイルを得ることが可能となる。   According to the present embodiment, the musical score element extraction unit 42, in the musical score in the image data file, based on the positions of the part line, staff, and bar line that are constituent elements of the musical score, measures in the musical score. Identify each region and measure number. The music data dividing unit 44 divides the music data file based on the time information in the music data file, and generates a plurality of unit music data files including information indicating the pitch and time information for each measure. . Further, the music data division unit 44 repeats symbols in the score in the image data file based on the type and position of the repeated symbol that is a component of the score, and the position of the part line, staff, and bar line. Is specified, and the unit music data files that are duplicated are eliminated repeatedly from a plurality of unit music data files to obtain a final unit music data file that is not duplicated. The data file and the measure number are associated with each other and stored in the RAM 35. Therefore, in the present embodiment, it is possible to obtain unit music data files each corresponding one-to-one with a musical score measure.

また、本実施の形態においては、単位音楽データファイル、楽譜要素データファイルとを用いて、CPU31は、楽譜要素データファイルを参照して、楽音の発音にかかる単位音楽データファイルについての繰り返し記号を検出し、当該繰り返し記号に基づき、次に読み出すべき単位音楽データファイルを決定する。したがって、本実施の形態においては、繰り返し記号にしたがった単位音楽データファイル中のデータ再生が可能となる。   In the present embodiment, using the unit music data file and the score element data file, the CPU 31 refers to the score element data file and detects a repetitive symbol for the unit music data file related to the sound generation. Then, based on the repetition symbol, a unit music data file to be read out next is determined. Therefore, in the present embodiment, it is possible to reproduce data in a unit music data file according to a repetition symbol.

たとえば、本実施の形態において、ある単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの先頭記号が含まれる場合には、CPU31は、リピート位置として、単位音楽データファイルについての小節番号を、RAM35に格納する。また、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの終端記号が含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、RAM35にリピート位置として格納された小節番号に基づいて決定する。これにより、繰り返しの先頭記号、繰り返しの終端記号を含む楽曲について、適切な単位音楽データファイルが選択され、その音楽データの読み出しが実現できる。   For example, in the present embodiment, when a repetition head symbol is included as a repetition symbol in a musical score element data file for a certain unit music data file, the CPU 31 sets a measure number for the unit music data file as a repeat position. And stored in the RAM 35. When the unit music data file includes a repeated terminal symbol as a repetition symbol in the score element data file, the CPU 31 stores the unit music data file to be read out next in the measure number stored in the RAM 35 as a repeat position. Determine based on. As a result, an appropriate unit music data file is selected for the music including the repeated head symbol and repeated terminal symbol, and the music data can be read out.

また、本実施の形態においては、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として番号付きカッコが含まれる場合に、その番号が、繰り返し回数を示すリピート指定数より小さいのであれば、CPU31は、次に読み出すべき単位音楽データファイルを、前記リピート位置である小節番号にしたがって決定する。また、上記番号が、リピート指定数以上であれば、CPU31は、楽譜要素データファイルに含まれる、行き先を示す小節番号に基づき、次に読み出すべき単位音楽データファイルを決定する。これにより、番号付きカッコがあり2回或いはそれ以上の繰り返しが行われる場合であっても、適切な単位音楽データファイルが選択され、その音楽データの読み出しが実現できる。   In the present embodiment, if a unit music data file includes a numbered parenthesis as a repetition symbol in the musical score element data file, if the number is smaller than the repeat designation number indicating the number of repetitions, the CPU 31. Determines the unit music data file to be read out next according to the measure number which is the repeat position. If the number is equal to or greater than the repeat designation number, the CPU 31 determines a unit music data file to be read out next based on the measure number indicating the destination included in the score element data file. As a result, even when there are numbered parentheses and the repetition is performed twice or more, an appropriate unit music data file is selected and the music data can be read out.

本実施の形態においては、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダカーポが含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、先頭の小節番号についての単位音楽データファイルと決定する。これにより、上記繰り返しの先頭記号や終端記号以外の、繰り返し記号であるダカーポが含まれる楽曲においても、適切な楽曲の再生が可能となる。   In the present embodiment, when the unit music data file includes dacapo as a repetition symbol in the score element data file, the CPU 31 selects the unit music data file to be read next as the unit music for the first measure number. Determined as a data file. As a result, it is possible to reproduce an appropriate music piece even in a music piece including a repeated symbol, dacapo, other than the repeated head symbol and terminal symbol.

また、本実施の形態においては、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてセーニョが含まれる場合には、CPU31は、リピート位置として、当該単位音楽データファイルについての小節番号を、RAM35に格納する。また、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダルセーニョが含まれる場合には、CPU31は、次に読み出すべき単位音楽データファイルを、RAM35にリピート位置として格納された小節番号に基づいて決定する。これにより、ダルセーニョおよびセーニョを用いた繰り返しが含まれる楽曲においても、適切な楽曲の再生が可能となる。   Further, in the present embodiment, when a sign music is included as a repetition symbol in the musical score element data file for the unit music data file, the CPU 31 sets the measure number for the unit music data file as the repeat position in the RAM 35. To store. If the unit music data file includes a darseño as a repetition symbol in the musical score element data file, the CPU 31 selects the unit music data file to be read next based on the measure number stored in the RAM 35 as a repeat position. decide. This makes it possible to reproduce appropriate music even for music that includes darseño and repetition using seño.

さらに、単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてヴィーデが含まれる場合に、CPU31は、楽譜要素データファイル中、コーダを含む小節を検索し、次に読み出すべき単位音楽データファイルを、当該コーダを含む小節についての単位音楽データファイルと決定する。これにより、ヴィーデおよびコーダを用いた繰り返しが含まれる楽曲においても、適切な楽曲の再生が可能となる。   Further, when the unit music data file contains a video as a repetition symbol in the score element data file, the CPU 31 searches the score element data file for a measure including a coder, and selects a unit music data file to be read next. It is determined as a unit music data file for a bar including the coder. As a result, appropriate music can be reproduced even for music that includes repetition using a vidé and a coder.

また、本実施の形態においては、楽曲の楽譜の画像データを格納した画像データファイルがRAM35に格納される。CPU31は、画像データファイルに基づく楽譜の画像を表示部33に表示する。したがって、ユーザは現在再生されている楽曲の楽譜を確認することができる。   In the present embodiment, an image data file storing image data of musical scores is stored in the RAM 35. The CPU 31 displays a score image based on the image data file on the display unit 33. Therefore, the user can check the score of the currently played music.

本発明は、以上の実施の形態に限定されることはない。たとえば、前記実施の形態においては、センタ装置10により、表示用楽譜データファイル、楽譜要素データファイル、および、単位音楽データファイルが生成され、生成されたデータファイルは、端末装置30に送信される。端末装置30は、受信した表示用楽譜データファイルを表示部33の画面上に表示するとともに、楽譜要素データファイルを参照しつつ、単位音楽データファイルに基づく楽曲の演奏を実現している。しかしながら、センタ装置10において、音源部19を含むサウンドシステム18を利用して、センタ装置10が、楽譜要素データファイルを参照しつつ、単位音楽データファイルに基づく楽曲の演奏を行っても良い。同様に、表示用楽譜データファイルに基づく楽譜の表示や小節の指定などをセンタ装置10において実現することも可能である。   The present invention is not limited to the above embodiment. For example, in the above embodiment, the center device 10 generates a display score data file, a score element data file, and a unit music data file, and the generated data file is transmitted to the terminal device 30. The terminal device 30 displays the received score data file for display on the screen of the display unit 33, and realizes the performance of the music based on the unit music data file while referring to the score element data file. However, in the center apparatus 10, the center system 10 may perform a musical piece based on the unit music data file while referring to the score element data file using the sound system 18 including the sound source unit 19. Similarly, the center device 10 can realize display of a score based on a score data file for display, designation of a measure, and the like.

以上、本発明の実施の形態について詳細に説明したが、本発明の範囲は上述の実施の形態に限定するものではなく、特許請求の範囲に記載された発明およびその均等の範囲が、本発明の範囲内に包含される。以下、本出願の願書に最初に添付した特許請求の範囲に記載された発明を付記する。なお、付記に記載した請求項の項番は、本出願の願書に最初に添付した特許請求の範囲の項番に相当する。   Although the embodiments of the present invention have been described in detail above, the scope of the present invention is not limited to the above-described embodiments, and the invention described in the claims and the equivalents thereof are described in the present invention. Is included in the range. Hereinafter, the invention described in the scope of claims attached to the application of the present application will be added. Note that the item numbers of the claims described in the appendix correspond to the item numbers of the claims first attached to the application of the present application.

[付記]
請求項1に記載された発明は、楽曲を構成する一連の楽音について、小節ごとに、当該小節を特定する小節番号、発音すべき音高を示す情報、および、その発音タイミングを示す時間情報を含む音楽データを格納した複数の単位音楽データファイルであって、楽譜における当該楽譜の構成要素である繰り返し記号の種別および位置に基づいて、繰り返しによる重複が排除されている複数の単位音楽データファイルと、
前記小節番号、および、繰り返し記号の種別を含む、楽譜要素データを格納した楽譜要素データファイルと、を格納した記憶手段と、
前記単位音楽データファイルを読み出して、前記音楽データに基づき、楽音生成手段に対して楽音の発音を指示する発音制御手段と、を備え、
前記発音制御手段が、前記楽譜要素データファイルを参照して、前記楽音の発音にかかる単位音楽データファイルについての繰り返し記号を検出し、当該繰り返し記号に基づき、次に読み出すべき単位音楽データファイルを決定するように構成された楽音生成制御装置である。
[Appendix]
According to the first aspect of the present invention, for a series of musical sounds constituting a musical piece, for each measure, a measure number identifying the measure, information indicating a pitch to be pronounced, and time information indicating the sound generation timing are provided. A plurality of unit music data files storing music data including a plurality of unit music data files in which duplication due to repetition is eliminated based on a type and position of a repetition symbol that is a component of the score in the score; ,
A storage element storing a musical score element data file storing musical score element data including the measure number and the type of repetition symbol;
Sound generation control means for reading out the unit music data file and instructing the sound generation means to generate a sound based on the music data;
The pronunciation control means refers to the musical score element data file, detects a repetition symbol for the unit music data file related to the pronunciation of the musical sound, and determines a unit music data file to be read next based on the repetition symbol This is a musical tone generation control device configured to do this.

請求項2に記載された発明は、前記繰り返し記号の種別として、繰り返しの先頭記号、および、繰り返しの終端記号を含み、
前記発音制御手段は、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの先頭記号が含まれる場合には、リピート位置として、当該単位音楽データファイルについての小節番号を、記憶手段に格納し、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として繰り返しの終端記号が含まれる場合には、次に読み出すべき単位音楽データファイルを、前記記憶手段にリピート位置として格納された小節番号に基づいて決定するように構成された楽音生成制御装置である。
The invention described in claim 2 includes, as the repetition symbol type, a repetition head symbol and a repetition terminal symbol,
The pronunciation control means includes
For the unit music data file, when a repeated head symbol is included as a repetition symbol in the score element data file, the measure number for the unit music data file is stored in the storage means as the repeat position.
When the unit music data file includes a repetition terminal symbol as a repetition symbol in the musical score element data file, the unit music data file to be read next is based on the measure number stored as the repeat position in the storage means. Is a musical tone generation control device configured to be determined.

請求項3に記載された発明は、前記繰り返し記号の種別として、番号付きカッコを含み、
前記発音制御手段は、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号として番号付きカッコが含まれる場合に、その番号が、繰り返し回数を示すリピート指定数より小さいのであれば、次に読み出すべき単位音楽データファイルを、前記リピート位置である小節番号にしたがって決定し、
前記番号が、前記リピート指定数以上であれば、前記楽譜要素データファイルに含まれる、行き先を示す小節番号に基づき、次に読み出すべき単位音楽データファイルを決定するように構成された楽音生成制御装置である。
The invention described in claim 3 includes numbered parentheses as the type of the repetition symbol,
The pronunciation control means includes
For the unit music data file, when numbered parentheses are included as repetition symbols in the musical score element data file, if the number is smaller than the repeat designation number indicating the number of repetitions, the unit music data file to be read next is , Determined according to the measure number that is the repeat position,
If the number is equal to or greater than the number of repeats specified, the musical sound generation control device is configured to determine a unit music data file to be read out next based on a bar number indicating a destination included in the score element data file. It is.

請求項4に記載された発明は、
前記繰り返し記号の種別として、ダカーポを含み、
前記発音制御手段は、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダカーポが含まれる場合には、次に読み出すべき単位音楽データファイルを、先頭の小節番号についての単位音楽データファイルと決定するように構成された楽音生成制御装置である。
The invention described in claim 4
As a type of the repeated symbol, including Dacapo,
The pronunciation control means includes
When the unit music data file contains dacapo as a repetition symbol in the musical score element data file, the unit music data file to be read next is determined as the unit music data file for the first measure number. A musical tone generation control device.

請求項5に記載された発明は、前記繰り返し記号の種別として、ダルセーニョ、セーニョを含み、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてセーニョが含まれる場合には、リピート位置として、当該単位音楽データファイルについての小節番号を、記憶手段に格納し、
前記発音制御手段は、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてダルセーニョが含まれる場合には、次に読み出すべき単位音楽データファイルを、前記記憶手段にリピート位置として格納された小節番号に基づいて決定するように構成された楽音生成制御装置である。
The invention described in claim 5 includes Darseño and Seño as the type of the repetition symbol,
For the unit music data file, if the music score element data file includes a saen as a repetition symbol, the measure number for the unit music data file is stored in the storage means as the repeat position.
The pronunciation control means includes
For the unit music data file, if dalseño is included as a repetition symbol in the score element data file, the unit music data file to be read next is determined based on the measure number stored as the repeat position in the storage means. A musical sound generation control device configured as described above.

請求項6に記載された発明は、前記繰り返し記号として、ヴィーデおよびコーダを含み、
前記発音制御手段は、
前記単位音楽データファイルについて、楽譜要素データファイルにおいて繰り返し記号としてヴィーデが含まれる場合に、前記楽譜要素データファイル中、コーダを含む小節を検索し、次に読み出すべき単位音楽データファイルを、当該コーダを含む小節についての単位音楽データファイルと決定するように構成された楽音生成制御装置である。
The invention described in claim 6 includes a Wiede and a coder as the repetition symbol,
The pronunciation control means includes
For the unit music data file, when a score is included as a repetition symbol in the score element data file, a measure including the coder is searched in the score element data file, and the unit music data file to be read next is selected as the coder. A musical sound generation control device configured to determine a unit music data file for a measure including a measure.

請求項7に記載された発明は、前記記憶手段が、前記楽曲の楽譜の画像データを格納した画像データファイルを有し、
前記画像データファイルに基づく楽譜の画像を表示する表示手段を備えた楽音生成制御装置である。
In the invention described in claim 7, the storage means has an image data file storing image data of the musical score of the music,
A musical tone generation control device comprising display means for displaying a score image based on the image data file.

請求項8に記載された発明は、楽曲を構成する一連の楽音について、小節ごとに、当該小節を特定する小節番号、発音すべき音高を示す情報、および、その発音タイミングを示す時間情報を含む音楽データを格納した複数の単位音楽データファイルであって、楽譜における当該楽譜の構成要素である繰り返し記号の種別および位置に基づいて、繰り返しによる重複が排除されている複数の単位音楽データファイルと、
前記小節番号、および、小節に含まれる繰り返し記号の種別を含む、楽譜要素データを格納した楽譜要素データファイルと、を格納した記憶手段と、を備えたコンピュータに、
前記単位音楽データファイルを読み出して、前記音楽データに基づき、楽音生成手段に対して楽音の発音を指示する発音制御ステップを実行させ、
前記発音制御ステップが、前記楽譜要素データファイルを参照して、前記楽音の発音にかかる単位音楽データファイルについての繰り返し記号を検出し、当該繰り返し記号に基づき、次に読み出すべき単位音楽データファイルを決定する楽音生成制御プログラムである。
According to the eighth aspect of the present invention, for a series of musical sounds constituting a musical piece, for each measure, a measure number specifying the measure, information indicating a pitch to be pronounced, and time information indicating the sounding timing are provided. A plurality of unit music data files storing music data including a plurality of unit music data files in which duplication due to repetition is eliminated based on a type and position of a repetition symbol that is a component of the score in the score; ,
A computer comprising: a musical score element data file storing musical score element data including the bar number and the type of repetition symbol included in the bar;
The unit music data file is read, and based on the music data, a sound generation control step for instructing the sound generation means to generate a sound is executed,
The pronunciation control step refers to the musical score element data file, detects a repetition symbol for the unit music data file related to the sound generation, and determines a unit music data file to be read next based on the repetition symbol. This is a musical sound generation control program.

10 センタ装置
30 端末装置
11、31 CPU
12 入力部
13、33 表示部
14、34 ROM
15、35 RAM
16、36 フラッシュメモリ
17、37 通信I/F
18、38 サウンドシステム
19、39 音源部
21、41 スピーカ
32 タッチパネル
42 楽譜要素抽出部
43 データファイル生成部
44 音楽データ分割部
10 Center device 30 Terminal device 11, 31 CPU
12 Input unit 13, 33 Display unit 14, 34 ROM
15, 35 RAM
16, 36 Flash memory 17, 37 Communication I / F
18, 38 Sound system 19, 39 Sound source unit 21, 41 Speaker 32 Touch panel 42 Musical score element extraction unit 43 Data file generation unit 44 Music data division unit

Claims (7)

楽曲の楽譜の画像データを格納した画像データファイル中の楽譜において、前記楽譜の構成要素である五線および小節線の位置に基づいて、前記楽譜における小節の各々の領域を特定する小節特定処理と、
前記楽譜の画像データ中の各エリア内の画像データのうち、繰り返し記号の種別を表わす画像データとの一致度が予め定められた値以上の画像データを含むエリアを特定するエリア特定処理と、
前記特定されたエリアに対応する前記楽譜の画像データ上の位置に、前記繰り返し記号の種別に対応するシンボルを描画するシンボル描画処理と、
前記楽曲を構成する一連の楽音について、発音すべき音高を示す情報および発音タイミングを示す時間情報を含む音楽データを格納した音楽データファイル中の前記時間情報に基づいて、前記音楽データファイルを分割して、小節ごとの、音高を示す情報および時間情報を含む、複数の単位音楽データファイルを生成する音楽データファイル分割処理と、
前記画像データファイル中の楽譜において、前記楽譜の構成要素である前記五線および小節線の位置と、前記描画されたシンボルおよびその位置と、に基づき、前記シンボルの位置する小節を特定して、前記複数の単位音楽データファイルから、繰り返しにより重複する単位音楽データファイルを排除して、重複のない単位音楽データファイルを取得する単位音楽データファイル取得処理と、
前記楽譜における五線および小節線が存在する位置、小節の各々の領域、前記繰り返し記号の種別および位置を含む、楽譜要素データを格納した楽譜要素データファイルを生成する楽譜要素データファイル生成処理と、を実行する処理部を備えた楽譜情報生成装置。
In a score in an image data file storing musical score image data, measure specifying processing for specifying each area of the measure in the score based on the positions of the staff and the bar line which are constituent elements of the score; ,
An area specifying process for specifying an area including image data whose degree of coincidence with image data representing the type of repetition symbol is equal to or greater than a predetermined value among the image data in each area in the image data of the score;
A symbol drawing process for drawing a symbol corresponding to the type of the repetition symbol at a position on the image data of the musical score corresponding to the specified area;
The music data file is divided based on the time information in the music data file storing the music data including the information indicating the pitch to be generated and the time information indicating the sound generation timing for a series of musical sounds constituting the music A music data file dividing process for generating a plurality of unit music data files including information indicating pitches and time information for each measure;
In the score in the image data file, the measure in which the symbol is located is specified based on the positions of the staff and bar lines that are components of the score, the drawn symbol and the position thereof, and A unit music data file acquisition process for excluding duplicate unit music data files from the plurality of unit music data files to obtain unit music data files without duplication;
A musical score element data file generation process for generating a musical score element data file storing musical score element data including positions where staff and bar lines exist in the score, each area of the bars, and the type and position of the repeated symbol; The musical score information generation device provided with the processing part which performs.
前記楽譜情報生成装置はさらに、
前記画像データファイルから、前記楽譜の構成要素である五線および小節線が存在する位置を検出する位置センサを備えた請求項1に記載の楽譜情報生成装置。
The musical score information generating device further includes:
2. The musical score information generating apparatus according to claim 1, further comprising a position sensor that detects a position where a staff and bar lines that are components of the musical score are present from the image data file.
前記処理部は、前記エリア特定処理において、
前記楽譜の画像データ中の各エリア内の画像データの中から繰り返し記号の種別を表わす画像と最も高い画像データを含むエリアを検出するエリア検出処理と、
前記検出されたエリア内の画像データと前記楽譜の画像データ中の他のエリアの画像データとを比較し、一致度が予め定められた値以上の画像データを含むエリアを特定するエリア比較処理と、
を実行する請求項1または2に記載の楽譜情報生成装置。
In the area specifying process, the processing unit includes:
An area detection process for detecting an image representing the type of repeated symbol and an area including the highest image data from the image data in each area in the image data of the score;
An area comparison process for comparing the image data in the detected area with the image data of another area in the image data of the score, and specifying an area including image data having a matching degree equal to or greater than a predetermined value; ,
The musical score information generating apparatus according to claim 1 or 2, wherein
前記処理部は、前記エリア検出処理において、
前記楽譜の画像データ中の各エリアの画像データと特定対象となる繰り返し記号の画像データとの相関値を算出する算出処理と、
前記算出された相関値が最大となるエリアを検出する最大相関値エリア検出処理と、
を実行し、
前記エリア比較処理において、
前記相関値が最大となるエリアの画像データと前記楽譜の画像データ中の他のエリアの画像との相関値を算出するとともに、前記算出された相関値が一定の閾値より大きいエリアを特定する算出処理と、
を実行する、請求項3に記載の楽譜情報生成装置。
In the area detection process, the processing unit
A calculation process for calculating a correlation value between the image data of each area in the image data of the score and the image data of the repetition symbol to be specified;
A maximum correlation value area detection process for detecting an area where the calculated correlation value is maximum;
Run
In the area comparison process,
Calculation for calculating the correlation value between the image data of the area having the maximum correlation value and the image of the other area in the image data of the score, and specifying the area where the calculated correlation value is larger than a certain threshold value Processing,
The musical score information generating apparatus according to claim 3, wherein:
前記処理部は、前記単位音楽データファイル取得処理において、
前記単位音楽データファイルごとに対応する小節番号を算出し、先頭の前記単位音楽データファイルから順次、対応付けられた小節番号が既に存在するかを判断し、存在する場合には、当該単位音楽データファイルを排除する処理を実行する、請求項1に記載の楽譜情報生成装置。
The processing unit, in the unit music data file acquisition process,
The corresponding measure number is calculated for each unit music data file, and it is determined whether or not the associated measure number already exists sequentially from the head unit music data file. The musical score information generating apparatus according to claim 1, wherein processing for excluding files is executed.
処理部を有する楽譜情報生成装置で用いられる楽譜情報生成方法であって、前記処理部が、
楽曲の楽譜の画像データを格納した画像データファイル中の楽譜において、前記楽譜の構成要素である五線および小節線の位置に基づいて、前記楽譜における小節の各々の領域を特定し、
前記楽譜の画像データ中の各エリア内の画像データのうち、繰り返し記号の種別を表わす画像データとの一致度が予め定められた値以上の画像データを含むエリアを特定し、
前記特定されたエリアに対応する前記楽譜の画像データ上の位置に、前記繰り返し記号の種別に対応するシンボルを描画し、
前記楽曲を構成する一連の楽音について、発音すべき音高を示す情報および発音タイミングを示す時間情報を含む音楽データを格納した音楽データファイル中の前記時間情報に基づいて、前記音楽データファイルを分割して、小節ごとの、音高を示す情報および時間情報を含む、複数の単位音楽データファイルを生成し、
前記画像データファイル中の楽譜において、前記楽譜の構成要素である前記五線および小節線の位置と、前記描画されたシンボルおよびその位置と、に基づき、前記シンボルの位置する小節を特定して、前記複数の単位音楽データファイルから、繰り返しにより重複する単位音楽データファイルを排除して、重複のない単位音楽データファイルを取得し、
前記楽譜における五線および小節線が存在する位置、小節の各々の領域、前記繰り返し記号の種別および位置を含む、楽譜要素データを格納した楽譜要素データファイルを生成する、楽譜情報生成方法。
A musical score information generation method used in a musical score information generation apparatus having a processing unit, wherein the processing unit includes:
In the score in the image data file storing the image data of the musical score of the music, each region of the measure in the score is specified based on the positions of the staff and the bar line that are constituent elements of the score,
Among the image data in each area in the image data of the score, specify an area including image data whose degree of coincidence with the image data representing the type of repetition symbol is equal to or greater than a predetermined value,
Draw a symbol corresponding to the type of repetitive symbol at a position on the image data of the score corresponding to the specified area,
The music data file is divided based on the time information in the music data file storing the music data including the information indicating the pitch to be generated and the time information indicating the sound generation timing for a series of musical sounds constituting the music A plurality of unit music data files including information indicating pitches and time information for each measure,
In the score in the image data file, the measure in which the symbol is located is specified based on the positions of the staff and bar lines that are components of the score, the drawn symbol and the position thereof, and From the plurality of unit music data files, duplicate unit music data files are eliminated by repetition, and a unit music data file without duplication is obtained,
A musical score information generation method for generating a musical score element data file storing musical score element data including positions where staffs and bar lines exist in the musical score, areas of each bar, and types and positions of the repeated symbols.
楽譜情報生成装置として用いられるコンピュータに、
楽曲の楽譜の画像データを格納した画像データファイル中の楽譜において、前記楽譜の構成要素である五線および小節線の位置に基づいて、前記楽譜における小節の各々の領域を特定する小節特定ステップと、
前記楽譜の画像データ中の各エリア内の画像データのうち、繰り返し記号の種別を表わす画像との一致度が予め定められた値以上の画像データを含むエリアを特定するエリア特定ステップと、
前記特定されたエリアに対応する前記楽譜の画像データ上の位置に、前記繰り返し記号の種別に対応するシンボルを描画するシンボル描画ステップと、
前記楽曲を構成する一連の楽音について、発音すべき音高を示す情報および発音タイミングを示す時間情報を含む音楽データを格納した音楽データファイル中の前記時間情報に基づいて、前記音楽データファイルを分割して、小節ごとの、音高を示す情報および時間情報を含む、複数の単位音楽データファイルを生成する音楽データファイル分割ステップと、
前記画像データファイル中の楽譜において、前記楽譜の構成要素である前記五線および小節線の位置と、前記描画されたシンボルおよびその位置と、に基づき、前記シンボルの位置する小節を特定して、前記複数の単位音楽データファイルから、繰り返しにより重複する単位音楽データファイルを排除して、重複のない単位音楽データファイルを取得する単位音楽データファイル取得ステップと、
前記楽譜における五線および小節線が存在する位置、小節の各々の領域、前記繰り返し記号の種別および位置を含む、楽譜要素データを格納した楽譜要素データファイルを生成する楽譜要素データファイル生成ステップと、
を実行させるプログラム。
In a computer used as a musical score information generating device,
A measure specifying step for specifying each region of the measure in the score based on the positions of the staff and the measure line which are components of the score in the score in the image data file storing the image data of the musical score of the music; ,
An area specifying step for specifying an area including image data having a degree of coincidence with an image representing a type of repetitive symbol among the image data in each area in the image data of the score;
A symbol drawing step of drawing a symbol corresponding to the type of the repeated symbol at a position on the image data of the score corresponding to the specified area;
The music data file is divided based on the time information in the music data file storing the music data including the information indicating the pitch to be generated and the time information indicating the sound generation timing for a series of musical sounds constituting the music A music data file dividing step for generating a plurality of unit music data files including information indicating pitches and time information for each measure;
In the score in the image data file, the measure in which the symbol is located is specified based on the positions of the staff and bar lines that are components of the score, the drawn symbol and the position thereof, and A unit music data file acquisition step of acquiring unit music data files without duplication by excluding duplicate unit music data files by repetition from the plurality of unit music data files;
A score element data file generation step for generating a score element data file storing score element data, including the positions where staff and bar lines exist in the score, the areas of each measure, and the type and position of the repetition symbol;
A program that executes
JP2015183511A 2015-09-17 2015-09-17 Musical score information generating apparatus, musical score information generating method, and program Active JP6168117B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015183511A JP6168117B2 (en) 2015-09-17 2015-09-17 Musical score information generating apparatus, musical score information generating method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015183511A JP6168117B2 (en) 2015-09-17 2015-09-17 Musical score information generating apparatus, musical score information generating method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2011151390A Division JP5810691B2 (en) 2011-03-07 2011-07-08 Musical score information generating apparatus and musical score information generating program

Publications (2)

Publication Number Publication Date
JP2016014892A JP2016014892A (en) 2016-01-28
JP6168117B2 true JP6168117B2 (en) 2017-07-26

Family

ID=55231067

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015183511A Active JP6168117B2 (en) 2015-09-17 2015-09-17 Musical score information generating apparatus, musical score information generating method, and program

Country Status (1)

Country Link
JP (1) JP6168117B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210383781A1 (en) * 2020-06-08 2021-12-09 William Frederick Moyer Systems and methods for score and screenplay based audio and video editing

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003186466A (en) * 2001-12-20 2003-07-04 Yamaha Corp Musical score generation processor and program
JP3980888B2 (en) * 2002-01-16 2007-09-26 ローランド株式会社 Electronic musical instruments
JP2004054189A (en) * 2002-05-31 2004-02-19 Victor Co Of Japan Ltd Recording medium for music teaching materials, audiovisual system, and music teaching material software distribution system
JP2003242438A (en) * 2003-02-06 2003-08-29 Kawai Musical Instr Mfg Co Ltd Musical score recognizing device
WO2011125204A1 (en) * 2010-04-08 2011-10-13 パイオニア株式会社 Information processing device, method, and computer program

Also Published As

Publication number Publication date
JP2016014892A (en) 2016-01-28

Similar Documents

Publication Publication Date Title
EP2498248B1 (en) Musical-score information generating apparatus, music-tone generation controlling apparatus, musical-score information generating method, and music-tone generation controlling method
US8536437B2 (en) Musical score playing device and musical score playing program
JP5790686B2 (en) Chord performance guide apparatus, method, and program
JP6459378B2 (en) Problem management apparatus and problem management program
JP2011182841A (en) Game device, method for controlling game device, and program
JP5549521B2 (en) Speech synthesis apparatus and program
JP5422056B2 (en) Music information processing apparatus and method, computer program, and recording medium
JP5742302B2 (en) Musical score information generating apparatus and musical score information generating program
JP6168117B2 (en) Musical score information generating apparatus, musical score information generating method, and program
JP2015163982A (en) Voice synthesizer and program
JP5810691B2 (en) Musical score information generating apparatus and musical score information generating program
JP5742303B2 (en) Musical sound generation control device and musical sound generation control program
JP5589741B2 (en) Music editing apparatus and program
JPWO2019092791A1 (en) Data generator and program
JP4613817B2 (en) Fingering display device and program
JP5935815B2 (en) Speech synthesis apparatus and program
JP2012220549A (en) Musical sound generation control device and musical sound generation control program
JP6149917B2 (en) Speech synthesis apparatus and speech synthesis method
JP6260176B2 (en) Performance practice apparatus, method, and program
JP5173725B2 (en) Electronic musical instrument and music score information processing program
WO2022209557A1 (en) Electronic musical instrument, electronic musical instrument control method, and program
JP2007178696A (en) Fingering information generating device and program
JP7107720B2 (en) fingering display program
JP5429840B2 (en) Speech synthesis apparatus and program
JP2006119512A (en) Apparatus for displaying and editing music information, and program

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160824

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161004

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161201

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170612

R150 Certificate of patent or registration of utility model

Ref document number: 6168117

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150