Universal real-time musical instrument playing evaluation system
Technical Field
The invention belongs to the field of music signal processing, and particularly relates to a universal real-time musical instrument playing evaluation system.
Background
Music is inherited from ancient times by its unique artistic charm and value. Musical instrument performance is one of the main expression forms of music, and can be used for mastering temperament and practice and promoting the improvement of aesthetic consciousness and musical literacy. With the improvement of living standard, people's enthusiasm for learning musical instrument playing is increasing, and parents pay more and more attention to the cultivation of child's music literacy. However, learning musical instrument performance requires a professional teacher to perform guidance and a large accumulation of exercises.
With the development of computer technology and music digitization technology, many music-related problems can be handled by computers. Music Extensible Markup Language (MusicXML) is an electronic score exchange and distribution format. MusicXML overcomes the disadvantage that the mature MIDI (Musical Instrument digital interface) format does not support some structural information of music (such as bars, repeats, linguistics, etc.) and other information important to the representation of music.
At present, in patent specification CN104183171A, there is disclosed a system and method for accurate judgment of the performance level of an electronic score-based musical instrument, in which a learner is required to start a performance from the starting position of a score and follow the score to perform at a designated speed. Since the frequency spectrum calculated from the music score and the frequency spectrum calculated from the collected audio information of the acoustic musical instrument are directly compared to obtain a judgment result, it is impossible to clearly judge which note is played more or less when a performance error occurs.
Disclosure of Invention
In view of the above defects or improvement requirements of the prior art, the present invention provides a universal real-time musical instrument playing evaluation system, which aims to obtain and display the performance correctness evaluation result in real time by analyzing the electronic music score, performing real-time music score tracking and automatic music transcription on the musical instrument playing, and calculating and scoring the performance level of the user, thereby solving the problems of player playing inflexibility and low evaluation accuracy in the prior art.
To achieve the above object, the present invention provides a universal real-time musical instrument performance evaluation system, comprising: the system comprises a main control module, a database, a music selection module, an electronic music score analysis module, a music score typesetting display module, an audio acquisition module, a music score tracking module, a musical instrument playing correctness evaluation module and a grading calculation module;
the main control module (10) is used for regulating and controlling each module, transmitting data among the modules and enabling the modules to work coordinately under a correct time sequence;
the database (11) is used for storing a music score file (111), a music score audio file (112), a music score information file (113), a performance audio file (114), a spectrum template file (115) and an evaluation result (116) in MusicXML format;
the music selection module (12) is used for inquiring the database (11) and displaying a music score list, and a player can select a music to be played from the music score list; determining a music score file (111) and a music score audio file (112) in MusicXML format for playing music;
the electronic music score analysis module (13) is used for converting the music score file (111) in the musicXML format selected by the music selection module (12) into a music score information file (113);
the music score typesetting display module (14) is used for displaying the received music score information in display equipment with various sizes, calculating the appropriate number of lines and the number of small sections of each line according to the size of the display equipment, displaying in lines, automatically sliding the music score upwards by one line after playing the middle displayed line, and marking the received playing progress and correctness to the corresponding position in the music score in real time;
the audio acquisition module (15) is used for acquiring sound signals played by a user in real time, storing the sound signals played by the user as a playing audio file (114) into the database (11) by adopting Pulse Code Modulation (PCM) coding;
the music score tracking module (16) is used for converting a music score audio file into a frequency spectrum of a music score audio after receiving the music score audio file, and calculating a corresponding audio fingerprint library; converting the received current performance sound signal into a current performance frequency spectrum, and converting the current performance frequency spectrum into a corresponding audio fingerprint; searching fingerprints matched with the playing audio fingerprints in a music score audio fingerprint library in real time, and counting the positions of playing sound signals corresponding to the music score;
the musical instrument playing correctness evaluating module (17) is used for deducing musical instruments and notes to be played at the current playing moment according to the received music score information and the music score tracking result of the music score tracking module (16); detecting the musical instruments and notes of the currently played sound signals in real time; comparing the detected musical instruments and notes of the current playing sound signals, and evaluating whether the playing is correct or not in real time; and transmitting the evaluation result to a music score typesetting display module (14) in real time; after the user finishes playing, all evaluation results are transmitted to a score calculation module (18);
and the score calculating module (18) is used for summarizing the evaluation result of the musical instrument playing correctness and calculating the score when the playing is finished.
Further, the main control module (10) is specifically configured to:
before a user starts playing the musical instrument, transmitting a music score information file (113) obtained by analysis to a music score typesetting display module (14) and a musical instrument playing correctness evaluation module (17), and transmitting a music score audio file (112) selected by the user to a music score tracking module (16);
when a user starts playing the musical instrument, a playing sound signal collected by the audio collection module (15) is received, and a music score tracking module (16) and a musical instrument playing correctness evaluation module (17) are synchronously started;
when a user plays an instrument, sound signals collected by the audio acquisition module (15) to be played are transmitted to the music score tracking module (16) and the instrument playing correctness evaluation module (17) in real time; transmitting the performance sound signals obtained by real-time statistics of the music score tracking module (16) to a music score display module (14) and a musical instrument performance correctness evaluation module (17) corresponding to the positions in the music score; transmitting the evaluation result of the musical instrument playing correctness evaluation module (17) to a music score typesetting display module (14) in real time; transmitting the evaluation result of the musical instrument playing correctness evaluation module (17) to a score calculation module (18);
when the playing of the user musical instrument is finished, the notification score calculation module (18) collects the received evaluation results of the musical instrument playing correctness and calculates the score.
Further, the score tracking module (16) preferably uses Shazam algorithm to convert the frequency spectrum of the score audio into an audio fingerprint library of the score; and converting the frequency spectrum of the playing sound signal into a corresponding audio fingerprint.
Further, the musical instrument performance correctness evaluating module (17) includes the following sub-modules:
an automatic music transcription sub-module (171) for reading a spectrum template file (115) of a musical instrument corresponding to the score information of the current performance from the database; converting the currently received playing sound signal into a playing frequency spectrum, and then calculating the currently played musical instrument and note by the current playing frequency spectrum and a frequency spectrum template file (115), preferably adopting a non-negative matrix decomposition algorithm
V=WH,
Substituting the frequency spectrum V and the frequency spectrum template W of the played sound signal to obtain H so as to deduce the played musical instrument or note;
and the comparison evaluation sub-module (172) is used for comparing the currently played musical instruments and notes with the musical instruments and notes which should be played in the music score information at the current moment, and evaluating whether the elements in the music score information are correctly played in real time, wherein the conditions comprise 3 conditions of correct playing, more plays and missed plays.
Generally, compared with the prior art, the technical scheme of the invention has the following technical characteristics and beneficial effects:
(1) after the music score is selected, a player can play from any music score paragraph at will without playing from the starting position of the music score or playing at the designated speed of the music score, and the playing freedom degree is higher;
(2) the evaluation of the playing correctness directly compares the notes played by the musical instrument with the musical instrument, and the evaluation result can more clearly indicate the error reasons.
Drawings
FIG. 1 is a block diagram of the overall architecture of the system of the present invention;
fig. 2 is a functional block diagram of a musical instrument performance correctness evaluating module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
As shown in fig. 1, the system of the present invention comprises: the system comprises a main control module, a database, a music selection module, an electronic music score analysis module, a music score typesetting display module, an audio acquisition module, a music score tracking module, a musical instrument playing correctness evaluation module and a grading calculation module;
the main control module (10) is used for regulating and controlling each module, transmitting data among the modules and enabling the modules to work coordinately under a correct time sequence; the method is specifically used for:
before a user starts playing the musical instrument, transmitting a music score information file (113) obtained by analysis to a music score typesetting display module (14) and a musical instrument playing correctness evaluation module (17), and transmitting a music score audio file (112) selected by the user to a music score tracking module (16);
when a user starts playing the musical instrument, a playing sound signal collected by the audio collection module (15) is received, and a music score tracking module (16) and a musical instrument playing correctness evaluation module (17) are synchronously started;
when a user plays an instrument, sound signals collected by the audio acquisition module (15) to be played are transmitted to the music score tracking module (16) and the instrument playing correctness evaluation module (17) in real time; transmitting the performance sound signals obtained by real-time statistics of the music score tracking module (16) to a music score display module (14) and a musical instrument performance correctness evaluation module (17) corresponding to the positions in the music score; transmitting the evaluation result of the musical instrument playing correctness evaluation module (17) to a music score typesetting display module (14) in real time; transmitting the evaluation result of the musical instrument playing correctness evaluation module (17) to a score calculation module (18);
when the playing of the user musical instrument is finished, the notification score calculation module (18) collects the received evaluation results of the musical instrument playing correctness and calculates the score.
The database (11) is used for storing a music score file (111), a music score audio file (112), a music score information file (113), a performance audio file (114), a spectrum template file (115) and an evaluation result (116) in MusicXML format;
the music selection module (12) is used for inquiring the database (11) and displaying a music score list, and a player can select a music to be played from the music list and determine a music score file (111) and a music score audio file (112) in MusicXML format for playing music;
the electronic music score analysis module (13) is used for converting the music score file (111) in the musicXML format selected by the music selection module (12) into a music score information file (113);
the music score typesetting display module (14) is used for displaying the received music score information in display equipment with various sizes, calculating the appropriate number of lines and the number of small sections of each line according to the size of the display equipment, displaying in lines, automatically sliding the music score upwards by one line after playing the middle displayed line, and marking the received playing progress and correctness to the corresponding position in the music score in real time;
the audio acquisition module (15) is used for acquiring sound signals played by a user in real time, storing the sound signals played by the user as a playing audio file (114) into the database (11) by adopting Pulse Code Modulation (PCM) coding;
the music score tracking module (16) is used for converting a music score audio file into a frequency spectrum of a music score audio after receiving the music score audio file, and calculating a corresponding audio fingerprint library; converting the received current performance sound signal into a current performance frequency spectrum, and converting the current performance frequency spectrum into a corresponding audio fingerprint; searching fingerprints matched with the playing audio fingerprints in a music score audio fingerprint library in real time, and counting the positions of playing sound signals corresponding to the music score; the score tracking module (16) preferably adopts Shazam algorithm to convert the frequency spectrum of the score audio into an audio fingerprint library of the score; converting the frequency spectrum of the playing sound signal into a corresponding audio fingerprint;
the musical instrument playing correctness evaluating module (17) is used for deducing musical instruments and notes to be played at the current playing moment according to the received music score information and the music score tracking result of the music score tracking module (16); detecting the musical instruments and notes of the currently played sound signals in real time; comparing the detected musical instruments and notes of the current playing sound signals, and evaluating whether the playing is correct or not in real time; and transmitting the evaluation result to a music score typesetting display module (14) in real time; after the user finishes playing, all evaluation results are transmitted to a score calculation module (18);
and the score calculating module (18) is used for summarizing the evaluation result of the musical instrument playing correctness and calculating the score when the playing is finished.
The musical instrument performance correctness evaluating module (17) shown in fig. 2 includes the following sub-modules:
an automatic music transcription sub-module (171) for reading a spectrum template file (115) of a musical instrument corresponding to the score information of the current performance from the database; converting the currently received playing sound signal into a playing frequency spectrum, and then calculating the currently played musical instrument and note by the current playing frequency spectrum and a frequency spectrum template file (115), preferably adopting a non-negative matrix decomposition algorithm
V=WH,
Substituting the frequency spectrum V and the frequency spectrum template W of the played sound signal to obtain H so as to deduce the played musical instrument or note;
and the comparison evaluation sub-module (172) is used for comparing the currently played musical instruments and notes with the musical instruments and notes which should be played in the music score information at the current moment, and evaluating whether the elements in the music score information are correctly played in real time, wherein the conditions comprise 3 conditions of correct playing, more plays and missed plays.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.