Disclosure of Invention
In order to solve the problem that the conventional automatic music score page turning system does not well process repeated note segments, which may cause page turning false triggering, the invention provides an automatic page turning system which can position the current playing position of a player in real time on the basis of accurately identifying notes, so that the accuracy of a page turning time point is ensured, and the problem that playing interruption is caused to the player due to untimely page turning is avoided.
In view of the above circumstances, the present invention provides an automatic page turning system applied to a music score, which is operated in an electronic intelligent page turning device, and is characterized in that: the voice prompt device comprises a storage module, a voice leading-in module, a calculation module and a power supply module;
the storage module is used for storing a standard music database and a fault-tolerant database;
the voice leading-in module comprises a microphone and is used for driving the microphone to lead in and recognizing the playing sound of the user;
the computing module is used for matching the playing voice imported by the voice module with a standard music database and a fault-tolerant database stored in the storage module and triggering the page turning module after matching is finished;
the power module is used for providing electric energy for the storage module, the voice leading-in module and the calculation module.
As a preferred embodiment, the storage module comprises a local module for storing the music score and a network module for downloading the standard music score and updating the fault-tolerant database.
As a preferred embodiment, the computing module includes a primary matching segment and a secondary matching segment, the primary matching segment is used for storing a playing sound imported by the speech module, and the computing module specifically includes the following steps:
s0: setting the initial length N of the primary matching section;
s1: acquiring a note segment with the same playing sound as the playing sound with the length of N in the standard music score, and marking the note segment as a primary matching segment;
s2: acquiring a note segment adjacent to the primary matching segment, marking the note segment as a secondary matching segment, if the secondary matching segment exists, jumping to S3, otherwise, jumping to S6;
s3: acquiring the playing sound of the next time period, and storing the playing sound as a segment to be matched;
s4: comparing the second-level matching segment with the segment to be matched, if the second-level matching segment is consistent with the segment to be matched, storing the first-level matching segment as the current playing segment, and if the second-level matching segment is inconsistent with the current playing segment, re-acquiring the rest second-level matching segments until the second-level matching segment is consistent with the segment to be matched;
s5: updating the secondary matching section into a primary matching section;
s6: and when the second-stage matching section is empty, triggering a page turning module.
The method for calculating the matching degree can adopt a DTW algorithm, the length of a music score corresponding to a primary matching section is preset, the length can be a fixed number of sections and can also be a fixed number of notes, after the setting is finished, the corresponding music score section is searched in a standard music database stored in a storage module by the current playing section through the DTW algorithm and is marked as the primary matching section, if the number of the primary matching section is unique, a secondary matching section of the next time period adjacent to the primary matching section is obtained, if the primary matching section is not unique, the obtained primary matching sections are respectively marked as nth primary matching sections according to the matching sequence, the corresponding secondary matching sections are marked as nth secondary matching sections, each secondary matching section is sequentially matched with the section to be matched, and the matching results are consistent, namely, the matching results are marked as the current playing section.
As a preferred embodiment, the initial values of the note lengths of the primary matching segment and the secondary matching segment are the same and include at least one note, the secondary matching segment may be obtained iteratively, and if the same primary matching segment includes at least two identical secondary matching segments, the length value of the secondary matching segment is increased by one until each secondary matching segment is distinguished.
As a preferred embodiment, S4 is provided with a fault-tolerant interval, where the fault-tolerant interval is used to calculate error notes of the to-be-matched segment and the secondary matched segment and store the error notes in a fault-tolerant database, an initial value of the fault-tolerant interval is set to 0, and when any secondary matched segment and the to-be-matched segment during the current user playing cannot be successfully matched, a note with a failed matching degree in the note segment with the highest matching degree is labeled and set as a fault-tolerant note.
In a preferred embodiment, the length of the fault tolerance interval is smaller than the length of the primary matching section.
As a preferred implementation mode, the system further comprises a pushing module, wherein the pushing module is used for pushing the fault-tolerant notes stored in the fault-tolerant database to the current user, and pre-pushing the fault-tolerant notes to other users according to the fault-tolerant database, after the music score is played, the matching segments corresponding to the fault-tolerant notes are pushed to the current user for error correction prompting, meanwhile, the fault-tolerant notes are recorded in the fault-tolerant database, and when other users play the music score by using the software, the different error prompts of the music score can be notified by pushing, so that better experience is provided for other players.
In conclusion, the invention has the following beneficial effects: on the basis of positioning music score playing notes by using DTW (dynamic time warping) in the prior art, the matching segments are set as a primary matching segment and a secondary matching segment, the primary matching segment is unique, the positioning is carried out according to the matching degree of the acquired secondary matching segment and the segment to be matched, if the primary matching segment is not unique, the positioning of the note is realized through the different secondary matching segments obtained at least once, and when the secondary matching segments are empty, the method can well solve the problem that if the current page has a plurality of same note segments on the basis of the prior art, the page flip function may be triggered by mistake, since the conventional DTW algorithm sets the matching length to a fixed value, the matching rhythm cannot be adjusted in real time according to the current playing situation to a certain extent, so that the risk can be well avoided in the page turning process, the page turning accuracy is greatly improved, and the user can obtain better experience.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings.
Example 1: the invention provides a flow schematic diagram of an automatic page turning system applied to a music score, and the page turning system mainly comprises a storage module, a voice importing module, a calculating module and a power supply module;
the storage module is used for storing a standard music database and a fault-tolerant database, the storage module comprises a local module and a network module, the local module is used for storing music scores, and the network module is used for downloading standard music scores and updating the fault-tolerant database.
The voice leading-in module comprises a microphone and is used for driving the microphone to lead in and recognizing the playing sound of the user;
the computing module is used for matching the playing voice imported by the voice module with a standard music database and a fault-tolerant database stored in the storage module and triggering the page turning module after matching is finished; the calculation module comprises a primary matching section and a secondary matching section, wherein the primary matching section is used for storing the playing sound imported by the voice module, and the calculation module specifically comprises the following steps:
s0: setting the length of the first-stage matching section to be 4;
s1: when the playing length of a user is 4 notes, obtaining a note segment which is the same as the playing sound in the standard music score, and marking the note segment as a primary matching segment;
s2: acquiring a note segment adjacent to the primary matching segment, marking the note segment as a secondary matching segment, if the secondary matching segment exists, jumping to S3, otherwise, jumping to S6;
s3: acquiring the playing sound of the next time period, and storing the playing sound as a segment to be matched;
s4: comparing the second-level matching segment with the segment to be matched, if the second-level matching segment is consistent with the segment to be matched, storing the first-level matching segment as the current playing segment, and if the second-level matching segment is inconsistent with the current playing segment, re-acquiring the rest second-level matching segments until the second-level matching segment is consistent with the segment to be matched; the method comprises the following steps that a fault-tolerant interval is further arranged, the fault-tolerant interval is used for calculating error notes of a section to be matched and a secondary matching section and storing the error notes in a fault-tolerant database, the initial value of the fault-tolerant interval is set to be 0, and when any secondary matching section and the section to be matched cannot be successfully matched when a current user plays, notes which are failed to be matched in the note section with the highest matching degree are marked and set to be fault-tolerant notes.
S5: updating the secondary matching section into a primary matching section;
s6: and when the second-stage matching section is empty, triggering a page turning module.
The initial values of the note lengths of the first-stage matching segment and the second-stage matching segment are the same and at least comprise one note, the second-stage matching segment can be obtained in an iterative mode, if the same first-stage matching segment comprises at least two identical second-stage matching segments, the length value of the second-stage matching segment is increased by one until each second-stage matching segment is distinguished.
The method for calculating the matching degree can adopt a DTW algorithm, the length of a music score corresponding to a primary matching section is preset, the length can be a fixed section number, and can also be a fixed note number, after the setting is finished, the corresponding music score section is searched in a standard music database stored in a storage module by the current playing section through the DTW algorithm and is marked as the primary matching section, if the number of the primary matching section is unique, a secondary matching section of the next time period adjacent to the primary matching section is obtained, if the primary matching section is not unique, the obtained primary matching section is respectively marked as an nth primary matching section according to the matching sequence, the corresponding secondary matching section is marked as an nth secondary matching section, each secondary matching section is sequentially matched with the section to be matched, and the matching results are consistent, namely, the matching results are marked as the current playing section.
The power module is used for providing electric energy for the storage module, the voice leading-in module and the calculation module.
The system further comprises a pushing module, wherein the pushing module is used for pushing the fault-tolerant notes stored in the fault-tolerant database to other users according to the fault-tolerant database, after music score playing is finished, the matching segments corresponding to the fault-tolerant notes are pushed to the current user for error correction prompting, meanwhile, the fault-tolerant notes are recorded in the fault-tolerant database, and when other users play the music score by using the software, the different error prompting of the music score can be informed by pushing, so that better experience is provided for other players.
The specific implementation process of the invention is as follows: firstly, a user can download a music score to be trained from a network module, the music score is stored locally, after the music score is opened locally, a voice import module is started, the user starts to practice, when the voice import module identifies that the number of notes played by the user is four, the four notes played by the user are recorded as a primary matching section, the primary matching section is matched in the current music score by using a traditional DTW algorithm, a standard music score corresponding to the primary matching section is obtained, and meanwhile, the four notes subsequent to the primary matching section in the standard music score are captured and marked as a secondary matching section; the user continues playing, the voice importing module marks the fifth note to the eighth note played by the user as a segment to be matched, matches the secondary matching segment with the segment to be matched, the matching is successful, updating the secondary matching segment into a primary matching segment, if the matching fails, marking notes of the secondary matching segment different from the segment to be matched as fault-tolerant notes, representing that the user plays the error at the place, and updating the fault-tolerant notes into a fault-tolerant database, when other users download the music score, the other users are prompted, the prompting sequence is arranged according to the fault-tolerant frequency descending order of the fault-tolerant notes, after the fault-tolerant notes are recorded, and updating the second-stage matching segment to the first-stage matching segment, so as to finish positioning, ensuring that the note segment played by the user is the only note segment of the current page, repeating the process until the second-stage matching segment is empty, and triggering a page turning module to turn pages.
Example 2: the invention provides a flow schematic diagram of an automatic page turning system applied to a music score, and the page turning system mainly comprises a storage module, a voice importing module, a calculating module and a power supply module;
the storage module is used for storing a standard music database and a fault-tolerant database, the storage module comprises a local module and a network module, the local module is used for storing music scores, and the network module is used for downloading standard music scores and updating the fault-tolerant database.
The voice leading-in module comprises a microphone and is used for driving the microphone to lead in and recognizing the playing sound of the user;
the computing module is used for matching the playing voice imported by the voice module with a standard music database and a fault-tolerant database stored in the storage module and triggering the page turning module after matching is finished; the calculation module comprises a primary matching section and a secondary matching section, wherein the primary matching section is used for storing the playing sound imported by the voice module, and the calculation module specifically comprises the following steps:
s0: setting the length of the first-stage matching section to be 4;
s1: when the playing length of a user is 4 notes, obtaining a note segment which is the same as the playing sound in the standard music score, and marking the note segment as a primary matching segment;
s2: acquiring a note segment adjacent to the primary matching segment, marking the note segment as a secondary matching segment, if the secondary matching segment exists, jumping to S3, otherwise, jumping to S6;
s3: acquiring the playing sound of the next time period, and storing the playing sound as a segment to be matched;
s4: comparing the second-level matching segment with the segment to be matched, if the second-level matching segment is consistent with the segment to be matched, storing the first-level matching segment as the current playing segment, and if the second-level matching segment is inconsistent with the current playing segment, re-acquiring the rest second-level matching segments until the second-level matching segment is consistent with the segment to be matched; the method comprises the following steps that a fault-tolerant interval is further arranged, the fault-tolerant interval is used for calculating error notes of a section to be matched and a secondary matching section and storing the error notes in a fault-tolerant database, the initial value of the fault-tolerant interval is set to be 0, and when any secondary matching section and the section to be matched cannot be successfully matched when a current user plays, notes which are failed to be matched in the note section with the highest matching degree are marked and set to be fault-tolerant notes.
S5: updating the secondary matching section into a primary matching section;
s6: and when the second-stage matching section is empty, triggering a page turning module.
The initial values of the note lengths of the first-stage matching segment and the second-stage matching segment are the same and at least comprise one note, the second-stage matching segment can be obtained in an iterative mode, if the same first-stage matching segment comprises at least two identical second-stage matching segments, the length value of the second-stage matching segment is increased by one until each second-stage matching segment is distinguished.
The method for calculating the matching degree can adopt a DTW algorithm, the length of a music score corresponding to a primary matching section is preset, the length can be a fixed section number, and can also be a fixed note number, after the setting is finished, the corresponding music score section is searched in a standard music database stored in a storage module by the current playing section through the DTW algorithm and is marked as the primary matching section, if the number of the primary matching section is unique, a secondary matching section of the next time period adjacent to the primary matching section is obtained, if the primary matching section is not unique, the obtained primary matching section is respectively marked as an nth primary matching section according to the matching sequence, the corresponding secondary matching section is marked as an nth secondary matching section, each secondary matching section is sequentially matched with the section to be matched, and the matching results are consistent, namely, the matching results are marked as the current playing section.
The power module is used for providing electric energy for the storage module, the voice leading-in module and the calculation module.
The system further comprises a pushing module, wherein the pushing module is used for pushing the fault-tolerant notes stored in the fault-tolerant database to other users according to the fault-tolerant database, after music score playing is finished, the matching segments corresponding to the fault-tolerant notes are pushed to the current user for error correction prompting, meanwhile, the fault-tolerant notes are recorded in the fault-tolerant database, and when other users play the music score by using the software, the different error prompting of the music score can be informed by pushing, so that better experience is provided for other players.
The specific implementation process of the invention is as follows: firstly, a user can download a music score to be trained from a network module, the music score is stored locally, after the music score is opened locally, a voice import module is started, the user starts to practice, when the voice import module identifies that the number of notes played by the user is four, the four notes played by the user are recorded as first-level matching segments, the four notes are matched in the current music score by using a traditional DTW algorithm, and a standard music score corresponding to the first-level matching segments is obtained; the user continues playing, the voice importing module marks the fifth note to the eighth note played by the user as a to-be-matched segment, the two second-level matching segments are respectively matched with the to-be-matched segment, if the matching is successful, the successfully-matched second-level matching segment is updated to be a first-level matching segment, if the matching is failed, the lengths of the two second-level matching segments and the to-be-matched segment are increased by one, the matching degree is calculated, after the matching is successful, the second-level matching segment is updated to the first-level matching segment, the positioning is completed so far, the note segment played by the user is ensured to be the only note segment of the current page, the process is repeated until the second-level matching segment is empty, the page turning module is triggered, and page turning is achieved.
The present embodiment is only for explaining the present invention, and it is not limited to the present invention, and those skilled in the art can make modifications of the present embodiment without inventive contribution as needed after reading the present specification, but all of them are protected by patent law within the scope of the claims of the present invention.