Real-time playing error correction method based on MIDI data

By analyzing the MIDI data of the user's piano playing in real time and comparing it with the standard MIDI of the sheet music, the system identifies and provides feedback on wrong notes, missing notes, etc., which solves the problem of inaccurate playing in young piano students and improves their learning efficiency.

CN115841822BActive Publication Date: 2026-03-03HUNAN CARROD PIANO CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Young children learning piano often lack instruction on their first pieces, receive no guidance when they play the wrong keys, and struggle to grasp the rhythm, resulting in low learning efficiency.

Method used

By recording the MIDI data played by the user, comparing it with the standard MIDI score in real time, identifying and providing feedback on wrong notes, missed notes, notes played too early or too late, dividing the area into areas that need to be strengthened for practice, and transmitting the data to the terminal device in real time via wireless communication for display.

Benefits of technology

It enables real-time error correction for young piano students, improving learning efficiency and helping them quickly identify and correct playing mistakes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115841822B_ABST
    Figure CN115841822B_ABST
Patent Text Reader

Abstract

The application discloses a real-time playing error correction method based on MIDI data, comprising the following steps: collecting MIDI data when a user plays and analyzing and delivering the MIDI data to a to-be-judged queue; comparing a tick time when the user currently presses a key with a music score standard MIDI of a current beat time, determining whether there is an effective note within a preset time error range, if there is, matching a key value corresponding to the tick time when the user presses the key with a key value of the music score standard MIDI, if the matching succeeds, respectively analyzing whether key values corresponding to a previous tick time and a next tick time are matched with key values corresponding to a beat time of the music score standard MIDI, if both are matched, confirming that the currently pressed key is correct, otherwise, judging that the currently pressed key is incorrect; after the user finishes playing, saving and summarizing results of each key, dividing a to-be-enhanced practice area, taking out data according to the beat time, merging and sending to a data display layer for display. The application effectively improves the error correction effect and improves the learning efficiency of a piano child.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent piano technology, and in particular relates to a real-time playing error correction method based on MIDI data. Background Technology

[0002] As people's living standards improve, they are increasingly seeking spiritual enjoyment in addition to material pursuits. The piano, as a representative of classical instruments, is gaining popularity among more and more people.

[0003] For young piano students, the lack of instruction on beginner pieces, guidance on misplaying keys, and accurate rhythm lead to low learning efficiency. Therefore, correcting errors in note playing is an urgent problem to be solved. Summary of the Invention

[0004] To address the above technical problems, this invention provides a real-time playing error correction method based on MIDI data.

[0005] The technical solution adopted by this invention to solve its technical problem is:

[0006] A real-time playing error correction method based on MIDI data, the method includes the following steps:

[0007] S100: Records the start time of the user's playing, turns on the electronic metronome, collects MIDI data during the user's playing, and parses the MIDI data;

[0008] S200: Transfers the parsed MIDI data to the queue to be judged;

[0009] S300: Orderly retrieve MIDI data from the queue, extract the key value of the corresponding key in the MIDI, and the key press time, and convert the key press time into the corresponding tick time of the score.

[0010] S400: Compare the tick time of the user's currently pressed button with the standard MIDI score of the current beat time to determine if there is a valid note within the preset time error range; if there is a valid note, match the key value corresponding to the user's pressed button tick time with the key value of the standard MIDI score. If the match is successful, analyze whether the key value corresponding to the previous tick time and the key value corresponding to the next tick time match the key value corresponding to the beat time of the standard MIDI score. If both match, the pressed button is confirmed to be correct; otherwise, the pressed button is judged to be incorrect.

[0011] S500: After the user finishes playing, the results of each key press are saved and summarized. Based on the summarized results, areas to be strengthened for practice are divided. Data is retrieved according to the beat time. The retrieved data and the areas to be strengthened for practice are merged and sent to the data display layer for display.

[0012] Preferably, in S400, the tick time of the user's currently pressed button and the standard MIDI score of the current beat time are compared to determine whether there are valid notes within a preset time error range, including:

[0013] S410: Based on the tick time of the currently pressed button by the user, iterate and match the tick value that is closest to the standard MIDI of the music score. Extract the corresponding note from the standard MIDI of the music score using the tick value that is closest to the standard MIDI of the music score. Then extract the note of the previous tick and the note of the next tick value as a set.

[0014] S420: Match the key value corresponding to the tick time of the user pressing the button with the above set. When it is confirmed that there is a key value in the set that matches the key value corresponding to the tick time of the user pressing the button, it means that there is a valid note within the preset time error range.

[0015] Preferably, in S400, determining that the currently pressed key is incorrect includes:

[0016] Based on the tick time of the user pressing the button and the standard MIDI of the score, the position of the tick time closest to the standard pitch is found. When the difference between the tick time of the user pressing the button and the tick time closest to the standard pitch is within the preset standard time range, the position of the tick time closest to the standard pitch is marked as a wrong note; when the difference between the tick time of the user pressing the button and the tick time closest to the standard pitch exceeds the preset standard time range, the position of the tick time closest to the standard pitch is marked as a missed note.

[0017] Preferably, after the user finishes playing a piece and the results of each key press are saved and summarized in S500, the following is also included:

[0018] Iterate through the current correct notes, and subtract the time when the user started playing, recorded in S100, from the time when the currently parsed MIDI data was added to the queue to obtain the difference;

[0019] The difference is compared with the start time of the standard MIDI score. If the difference is less than the preset number of beats, it means the performance was accurate. If the difference is greater than the start time of the standard MIDI score, it means the performance was too late. Otherwise, it means the performance was too early.

[0020] Preferably, after S200, the process further includes: saving the time when the currently parsed MIDI data is added to the queue; in S500, based on the summarized results, dividing the area to be strengthened into practice zones, retrieving data according to beat time, merging the retrieved data with the practice zones to be strengthened, and sending the merged data to the data display layer for display, including:

[0021] All wrong notes, missed notes, notes played too early, and notes played too late are selected as notes to be strengthened for practice. These notes are divided into measures, and the measures to be strengthened for practice are marked according to preset rules. Based on the measure information, the areas to be strengthened for practice are further divided. Data is extracted according to the beat time. The extracted data and the areas to be strengthened for practice are merged and returned to the data display layer in the form of an array.

[0022] Preferably, the preset rules include:

[0023] Single note marking: Based on the note unit, if a single note is wrong and does not meet the condition of consecutive wrong notes, only single note marking is performed, and it does not need to be included in the section to be strengthened.

[0024] 1. Color marking of areas within a measure: The measure must contain at least 3 notes. If the number of notes to be practiced is at least 50%, the measure will be marked as an area that is not yet proficient. Alternatively, if the number of notes in a measure is more than 10, and the number of notes to be practiced is at least 5, the measure will be marked as a measure that needs to be practiced.

[0025] Color marking of areas within two measures: The two measures are used as a unit. The number of notes in the two measures must be ≥4. If the number of notes to be strengthened is ≥50%, then both measures are marked as measures to be strengthened.

[0026] Preferably, the areas to be reinforced are further divided based on the section information, including:

[0027] If one measure meets the marking condition and the next measure also meets the marking condition, then the two measures are marked together; if two measures meet the marking condition and the next measure also meets the marking condition, then the three measures are marked together; if two measures meet the marking condition and the next two measures also meet the marking condition, then the four measures are marked together; if any measure has ≥1 note to be reinforced, then the entire measure is marked as the area to be reinforced.

[0028] The aforementioned real-time playing error correction method based on MIDI data compares the MIDI data played by the user with the standard MIDI score to achieve real-time error identification and correction. The MIDI data is transmitted to the terminal device in real time via wireless communication, and feedback is provided in real time, which effectively improves the error correction effect and enhances the learning efficiency of young musicians. Attached Figure Description

[0029] Figure 1This is a flowchart of a real-time playing error correction method based on MIDI data in one embodiment of the present invention;

[0030] Figure 2 This is a flowchart illustrating a real-time playing error correction method based on MIDI data in one embodiment of the present invention. Detailed Implementation

[0031] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0032] In one embodiment, such as Figure 1 , 2 As shown, a real-time playing error correction method based on MIDI data includes the following steps:

[0033] S100: Records the start time of the user's playing, turns on the electronic metronome, collects MIDI data during the user's playing, and parses the MIDI data;

[0034] S200: Transfers the parsed MIDI data to the queue to be judged;

[0035] S300: Orderly retrieve MIDI data from the queue, extract the key value of the corresponding key in the MIDI, and the key press time, and convert the key press time into the corresponding tick time of the score.

[0036] S400: Compare the tick time of the user's currently pressed button with the standard MIDI score of the current beat time to determine if there is a valid note within the preset time error range; if there is a valid note, match the key value corresponding to the user's pressed button tick time with the key value of the standard MIDI score. If the match is successful, analyze whether the key value corresponding to the previous tick time and the key value corresponding to the next tick time match the key value corresponding to the beat time of the standard MIDI score. If both match, the pressed button is confirmed to be correct; otherwise, the pressed button is judged to be incorrect.

[0037] S500: After the user finishes playing, the results of each key press are saved and summarized. Based on the summarized results, areas to be strengthened for practice are divided. Data is retrieved according to the beat time. The retrieved data and the areas to be strengthened for practice are merged and sent to the data display layer for display.

[0038] Specifically, the data presentation layer is a terminal device, such as a mobile phone or tablet, and further, it is transmitted via wireless communication methods such as Bluetooth or WIFI.

[0039] The aforementioned real-time playing error correction method based on MIDI data compares the MIDI data played by the user with the standard MIDI score to achieve real-time error identification and correction. The MIDI data is transmitted to the terminal device in real time via wireless communication, and feedback is provided in real time, which effectively improves the error correction effect and enhances the learning efficiency of young musicians.

[0040] In one embodiment, S400 compares the tick time of the user's currently pressed button with the standard MIDI score of the current beat time to determine whether there are valid notes within a preset time error range, including:

[0041] S410: Based on the tick time of the currently pressed button by the user, iterate and match the tick value that is closest to the standard MIDI of the music score. Extract the corresponding note from the standard MIDI of the music score using the tick value that is closest to the standard MIDI of the music score. Then extract the note of the previous tick and the note of the next tick value as a set.

[0042] S420: Match the key value corresponding to the tick time of the user pressing the button with the above set. When it is confirmed that there is a key value in the set that matches the key value corresponding to the tick time of the user pressing the button, it means that there is a valid note within the preset time error range.

[0043] Specifically, for example, based on the tick time of the user's current button press, the system iterates and matches the tick value closest to the standard MIDI score. The corresponding note 60 is extracted from the standard MIDI score using the tick value closest to the standard MIDI score. The note of the previous tick is 46, and the note of the next tick is 63. The set is then {60 46 63}. If the user inputs 63, the system matches it against the set. If 63 exists in the set, it means that there is a valid note within the preset time error range.

[0044] In one embodiment, determining in S400 that the currently pressed key is incorrect includes:

[0045] Based on the tick time of the user pressing the button and the standard MIDI of the score, the position of the tick time closest to the standard pitch is found. When the difference between the tick time of the user pressing the button and the tick time closest to the standard pitch is within the preset standard time range, the position of the tick time closest to the standard pitch is marked as a wrong note; when the difference between the tick time of the user pressing the button and the tick time closest to the standard pitch exceeds the preset standard time range, the position of the tick time closest to the standard pitch is marked as a missed note.

[0046] In one embodiment, after the user finishes playing and the results of each key press are saved and summarized in S500, the process further includes:

[0047] Iterate through the current correct notes, and subtract the time when the user started playing, recorded in S100, from the time when the currently parsed MIDI data was added to the queue to obtain the difference;

[0048] The difference is compared with the start time of the standard MIDI score. If the difference is less than the preset number of beats, it means the performance was accurate. If the difference is greater than the start time of the standard MIDI score, it means the performance was too late. Otherwise, it means the performance was too early.

[0049] Specifically, in this embodiment, if the difference is less than 1 / 6 of a beat (the time varies depending on the playing speed and number of beats), it represents accurate playing.

[0050] In one embodiment, after S200, the method further includes: saving the time when the currently parsed MIDI data is added to the queue; and in S500, dividing the area to be strengthened for practice based on the summarized results, retrieving data according to the beat time, merging the retrieved data and the area to be strengthened for practice, and sending it to the data display layer for display, including:

[0051] All wrong notes, missed notes, notes played too early, and notes played too late are selected as notes to be strengthened for practice. These notes are divided into measures, and the measures to be strengthened for practice are marked according to preset rules. Based on the measure information, the areas to be strengthened for practice are further divided. Data is extracted according to the beat time. The extracted data and the areas to be strengthened for practice are merged and returned to the data display layer in the form of an array.

[0052] Specifically, after the entire piece has been played, all problematic notes are filtered out, divided into measures, and the problematic measures are identified according to rules. Based on the measure information, the areas of unfamiliarity are further divided, and the data is returned to the data display layer in the form of an array. At this point, the entire error correction process is complete. The piece played by the user is displayed in real time on a tablet / phone, allowing the student to immediately know whether the pitch is inaccurate, the rhythm is stable, and other issues.

[0053] In one embodiment, the preset rules include:

[0054] Single note marking: Based on the note unit, if a single note is wrong and does not meet the condition of consecutive wrong notes, only single note marking is performed, and it does not need to be included in the section to be strengthened.

[0055] 1. Color marking of areas within a measure: The measure must contain at least 3 notes. If the number of notes to be practiced is at least 50%, the measure will be marked as an area that is not yet proficient. Alternatively, if the number of notes in a measure is more than 10, and the number of notes to be practiced is at least 5, the measure will be marked as a measure that needs to be practiced.

[0056] Color marking of areas within two measures: The two measures are used as a unit. The number of notes in the two measures must be ≥4. If the number of notes to be strengthened is ≥50%, then both measures are marked as measures to be strengthened.

[0057] In one embodiment, the area to be reinforced is further subdivided based on the section information, including:

[0058] If one measure meets the marking condition and the next measure also meets the marking condition, then the two measures are marked together; if two measures meet the marking condition and the next measure also meets the marking condition, then the three measures are marked together; if two measures meet the marking condition and the next two measures also meet the marking condition, then the four measures are marked together; if any measure has ≥1 note to be reinforced, then the entire measure is marked as the area to be reinforced.

[0059] The aforementioned real-time playing error correction method based on MIDI data compares the MIDI data played by the user with the standard MIDI score to achieve real-time error identification and correction. The MIDI data is transmitted to the terminal device in real time via wireless communication, and feedback is provided in real time, which effectively improves the error correction effect and enhances the learning efficiency of young musicians.

[0060] The above provides a detailed description of a real-time playing error correction method based on MIDI data provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

Claims

1. A real-time playing error correction method based on MIDI data, characterized in that, The method comprises the following steps: S100: record the start time of user playing, start the electronic metronome, collect the MIDI data of user playing and analyze the MIDI data; S200: deliver the analyzed MIDI data to the to-be-judged queue; S300: sequentially take out the MIDI data in the queue, take out the key value of the corresponding key in the MIDI and the time of pressing the key, and convert the time of pressing the key into the tick time corresponding to the musical score; S400: compare the tick time of the key pressed by the user and the musical score standard MIDI of the current beat time, determine whether there is an effective note within the preset time error range, if there is an effective note, match the key value corresponding to the tick time of the key pressed by the user with the key value of the musical score standard MIDI, if the matching is successful, analyze whether the key value corresponding to the last tick time and the key value corresponding to the next tick time match the key value corresponding to the beat time of the musical score standard MIDI, if both are matched, it is confirmed that the key pressed is correct, otherwise it is judged that the key pressed is incorrect; S500: after the user finishes playing, save and summarize the results of each key, and divide the to-be-strengthened practice area according to the summarized results, take out the data according to the beat time, merge the taken-out data and the to-be-strengthened practice area, and send to the data display layer for display; In S400, the tick time of the key pressed by the user and the musical score standard MIDI of the current beat time are compared to determine whether there is an effective note within the preset time error range, comprising: S410: according to the tick time of the key pressed by the user, match the tick value closest to the musical score standard MIDI, take out the corresponding sound from the musical score standard MIDI through the tick value closest to the musical score standard MIDI, and take out the sound of the last tick and the sound of the next tick as a set; S420: according to the key value corresponding to the tick time of the key pressed by the user, match the key value corresponding to the tick time of the key pressed by the user, when it is confirmed that there is a key value in the set that matches the key value corresponding to the tick time of the key pressed by the user, it is indicated that there is an effective note within the preset time error range; In S400, it is judged that the key pressed is incorrect, comprising: According to the tick time of the key pressed by the user and the musical score standard MIDI, find the position of the tick time closest to the standard sound, when the difference between the tick time of the key pressed by the user and the tick time closest to the standard sound is within the preset standard time range, mark the position of the tick time closest to the standard sound as a wrong sound; when the difference between the tick time of the key pressed by the user and the tick time closest to the standard sound exceeds the preset standard time range, mark the position of the tick time closest to the standard sound as a missed sound; In S500, after the user finishes playing, the results of each key are saved and summarized, and the to-be-strengthened practice area is divided according to the summarized results, the data is taken out according to the beat time, the taken-out data and the to-be-strengthened practice area are merged, and sent to the data display layer for display. Traverse the current correct sound, according to the current parsed MIDI data added to the queue time minus S100 record the user start playing time, get the difference; According to the difference and the standard MIDI of the beginning of the score, if the difference is less than in the preset beat, it represents accurate playing; If the difference is greater than the beginning of the standard MIDI of the score, it represents playing late, otherwise it represents playing early.

2. The method of claim 1, wherein, S200 also includes: save the current parsed MIDI data added to the queue time; In S500, according to the results of the summary, the area to be strengthened is divided out, the data is taken out according to the beat time, the data taken out and the area to be strengthened are merged, and then sent to the data display layer for display, including: Filter out all wrong notes, missed notes, early and late notes as the notes to be strengthened, divide by measure, mark the measure to be strengthened according to the preset rule, divide the area to be strengthened according to the measure information, take out the data according to the beat time, merge the data taken out and the area to be strengthened, and return to the data display layer through the form of array.

3. The method of claim 2, wherein, The preset rule includes: Single note color: in units of notes, 1 note error and not meeting the continuous wrong note condition, only single note color, no need to be counted into the measure to be strengthened; 1 measure area color: in units of measures, the number of measure notes needs to be ≥3, when the number of notes to be strengthened ≥50%, the measure is marked as an unskilled area; Or, the number of measure notes >10, when the number of notes to be strengthened ≥5, the measure is directly marked as the measure to be strengthened; Two measure area color: in units of two measures, the number of two measure notes needs to be ≥4, when the number of notes to be strengthened ≥50%, both two measures are marked as the measure to be strengthened.

4. The method of claim 3, wherein, The area to be strengthened according to the measure information includes: When 1 measure meets the marking condition, the next measure also meets the marking condition, then two measures are merged and marked; When 2 measures meet the marking condition, the next measure also meets the marking condition, then three measures are merged and marked; When 2 measures meet the marking condition, the next two measures also meet the marking condition, then four measures are merged and marked; When there is any one measure with the number of notes to be strengthened ≥1, mark the whole as the area to be strengthened.

Citation Information

Patent Citations

  • A playing evaluation method and device

    CN106228961A

  • Piano playing smart evaluation method and system

    CN107767847A