CN-116089666-B - Five-line music score marking method and device, electronic equipment and storage medium
Abstract
The embodiment of the invention discloses a method, a device, electronic equipment and a storage medium for marking a five-wire music score, and relates to the technical field of computer application. The invention aims to solve the problem that the searching and obtaining of the five-line music score are very troublesome. The staff marking method comprises the steps of performing staff identification on staff, determining at least one staff group in the staff, marking each appointed staff element in each staff group according to the sequence in the staff group by using preset characters to obtain corresponding staff group character strings, and combining the staff group character strings corresponding to the staff groups according to the sequence of the staff groups to obtain the marked character strings of the staff. Is suitable for being conveniently searched and obtained application scenario of the pentagram.
Inventors
- SUN LONGFEI
Assignees
- 小叶子(北京)科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20230106
Claims (8)
- 1. A method for marking a staff, comprising: Performing spectrum identification on the staff, and determining at least one staff group in the staff; marking each appointed music spectrum element in each staff group according to the sequence in the staff group by using preset characters to obtain a corresponding staff group character string; combining the staff group character strings corresponding to the staff groups according to the sequence of the staff groups to obtain the marked character string of the staff; the step of performing spectrum identification on the five-line music spectrum and determining at least one staff group in the five-line music spectrum comprises the following steps: carrying out music score identification on a five-line music score, and taking one music score line consisting of a plurality of bars in the five-line music score as a staff group in the five-line music score; the marking of each appointed music spectrum element in each staff group is carried out according to the sequence in the staff group by a preset character to obtain a corresponding staff group character string, which comprises the following steps: Determining respective staff in each staff set; Determining a clef in a first staff, and marking the clef with preset characters; Determining each note in a first staff, and marking each note in the first staff with a preset character based on the relative position of the symbol head of each note in the first staff; Arranging marks corresponding to the clefs and marks corresponding to all notes in the first staff according to the clefs and the sequence of all notes in the first staff to obtain a first staff character string corresponding to the first staff; and combining the staff strings according to the sequence of the staff to obtain the staff group strings.
- 2. The method of claim 1, wherein said performing a music score identification on a music score of a five-wire music score, determining at least one staff set in the music score of the five-wire music score, comprises: and carrying out music spectrum identification on the picture with the five-line music spectrum, and determining at least one staff group in the five-line music spectrum.
- 3. The method of staff notation as claimed in claim 1 wherein said determining the respective staff in each staff set includes: determining the bars in each staff set; A set of five lines in each section is determined as a staff.
- 4. A device for marking a score of a musical score, comprising: the staff set determining module is used for carrying out music spectrum identification on the five-line music spectrum and determining at least one staff set in the five-line music spectrum; the staff group character string acquisition module is used for respectively marking each appointed music spectrum element in each staff group according to the sequence in the staff group by using preset characters to obtain a corresponding staff group character string; The staff mark acquisition module is used for combining staff group character strings corresponding to the staff groups according to the sequence of the staff groups to obtain a mark character string of the staff; the staff set determining module is specifically configured to: carrying out music score identification on a five-line music score, and taking one music score line consisting of a plurality of bars in the five-line music score as a staff group in the five-line music score; the staff group character string acquisition module comprises: A staff acquisition unit for determining respective staff in each staff group; the staff character string obtaining unit is used for respectively marking each appointed music spectrum element in each staff according to the sequence in the staff by using preset characters to obtain a corresponding staff character string; The staff group character string obtaining unit is used for combining the staff character strings according to the sequence of the staff to obtain the staff group character string; the staff string acquisition unit includes: a clef marking subunit, configured to determine a clef in a first clef, and mark the clef with a preset character; A note marking subunit, configured to determine each note in a first staff, and mark each note in the first staff with a preset character based on a relative position of a symbol head of each note in the first staff; And the staff character string acquisition subunit is used for arranging marks corresponding to the staff numbers and marks corresponding to all notes in the first staff according to the staff numbers and the sequence of all notes in the first staff to obtain a first staff character string corresponding to the first staff.
- 5. The staff notation marking device of claim 4 wherein the staff set determination module is specifically configured to: and carrying out music spectrum identification on the picture with the five-line music spectrum, and determining at least one staff group in the five-line music spectrum.
- 6. The staff notation marking device according to claim 4, wherein the staff acquisition unit includes: a bar acquisition subunit for determining the bars in each staff set; a staff acquisition subunit for determining a set of five lines in each section as a staff.
- 7. An electronic device comprising a housing, a processor, a memory, a circuit board and a power supply circuit, wherein the circuit board is arranged in a space surrounded by the housing, the processor and the memory are arranged on the circuit board, the power supply circuit is used for supplying power to each circuit or device of the electronic device, the memory is used for storing executable program codes, and the processor is used for executing a program corresponding to the executable program codes by reading the executable program codes stored in the memory and executing the five-wire music score marking method according to any one of the preceding claims 1-3.
- 8. A computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs executable by one or more processors to implement the method of pentagram marking of any one of claims 1-3.
Description
Five-line music score marking method and device, electronic equipment and storage medium Technical Field The invention belongs to the technical field of computer application, and particularly relates to a method and a device for marking a staff, electronic equipment and a storage medium. Background In order to facilitate the preview of the five-wire music score on the line, the traditional paper five-wire music score needs to be converted into an electronic five-wire music score, and at present, the paper five-wire music score is mainly converted into the five-wire music score in the form of pictures. Thus, if a five-line music score is required to be searched, the search can be performed through the music score name, but if only part of the music score content is not known, the five-line music score corresponding to the part of the music score content cannot be searched. If the content of the part of the music spectrum is in the form of a picture, the corresponding five-line music spectrum of the content of the part of the music spectrum can be searched in a picture searching mode, but only the five-line music spectrum consistent with the typesetting of the content of the part of the music spectrum can be searched in a picture searching mode, and if the five-line music spectrum different from the typesetting of the content of the part of the music spectrum is stored in a database for searching the music spectrum, the five-line music spectrum cannot be acquired, so that the searching and acquiring of the five-line music spectrum are troublesome. Disclosure of Invention In view of the above, the embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for marking a musical notation, which can facilitate searching and obtaining the musical notation. In a first aspect, an embodiment of the present invention provides a method for marking a staff, including performing staff identification on a staff, determining at least one staff group in the staff, marking each specified staff element in each staff group according to a sequence in the staff group by using a preset character to obtain a corresponding staff group character string, and combining the staff group character strings corresponding to each staff group according to the sequence of each staff group to obtain the marked character string of the staff. According to a specific implementation manner of the embodiment of the invention, the method for carrying out the music score identification on the five-wire music score and determining at least one staff group in the five-wire music score comprises the steps of carrying out the music score identification on a picture with the five-wire music score and determining at least one staff group in the five-wire music score. According to a specific implementation manner of the embodiment of the invention, the method for carrying out the music score identification on the five-line music score and determining at least one staff group in the five-line music score comprises the steps of carrying out the music score identification on the five-line music score and taking one music score line consisting of a plurality of bars in the five-line music score as one staff group in the five-line music score. According to a specific implementation manner of the embodiment of the invention, the method comprises the steps of marking each appointed music spectrum element in each staff group with preset characters according to the sequence in the staff group to obtain corresponding staff group character strings, determining each staff in each staff group, marking each appointed music spectrum element in each staff according to the sequence in the staff with preset characters to obtain corresponding staff character strings, and combining each staff character string according to the sequence of each staff to obtain the staff group character strings. According to a specific implementation manner of the embodiment of the invention, the determining of the staff in each staff group comprises determining the sections in each staff group, and determining a group of five lines in each section as one staff. According to a specific implementation manner of the embodiment of the invention, the marking of each designated music score element in each staff with preset characters according to the sequence in the staff to obtain a corresponding staff character string comprises the steps of determining a staff number in a first staff, marking the staff number with preset characters, determining each note in the first staff, marking each note in the first staff with preset characters based on the relative position of the symbol head of each note in the first staff, marking the mark corresponding to the staff number, and arranging the marks corresponding to each note in the first staff according to the staff number and the sequence of each note in the first staff to obtain a first staff character st