Playing method and device of electronic musical instrument, electronic equipment and storage medium
By setting the sensing area in the electronic instrument, users can play the music score through simple triggering actions, solving the problem of professional skills and accurate operation of traditional electronic instruments, achieving a more intuitive and simpler music performance experience.
Patent Information
- Application Number
- CN202411582335.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-14
AI Technical Summary
Traditional electronic instruments require users to have professional playing skills and accurate button operation, which limits the expansion of the user group, especially for users who want to experience the fun of music playing in a more intuitive and simpler way.
By setting the sensing area in the electronic instrument, the user only needs to generate a trigger signal in the sensing area. The electronic instrument will automatically determine the target notes based on the target's playing score and trigger signal and play it.
Without professional playing skills, users can accurately play notes in the music score, significantly lowering the performance threshold, improving the performance experience, and allowing more non-professional users to enjoy the fun of playing musical instruments.
Smart Images

Figure CN119626185A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic musical instruments, and in particular to a playing method and device for an electronic musical instrument, an electronic device and a storage medium. Background Art
[0002] In the field of electronic musical instruments, with the advancement of technology, the design and interactive methods of electronic musical instruments are also constantly developing. The performance of electronic musical instruments usually requires users to have certain musical knowledge and playing skills, which is a challenge for beginners or users who have not received professional training. Since electronic musical instruments mainly rely on users' accurate key operations to play music, the expansion of the user group is limited, especially for those who want to experience the fun of music performance in a more intuitive and simpler way.
[0003] In the related art, some electronic musical instruments try to assist users in playing through visual or tactile feedback, but these methods still rely on the user's accurate operation of the instrument keys. For example, some electronic pianos use key light indicators to guide users to trigger the correct keys, but users still need to accurately trigger the specified keys to produce the correct tone, which does not fundamentally solve the skill barriers faced by non-professional users when playing musical instruments. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide a playing method and device for an electronic musical instrument, an electronic device and a storage medium, which enable users to play music scores without having professional playing skills.
[0005] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a playing method of an electronic musical instrument, wherein the electronic musical instrument includes a sensing area, and the method includes:
[0006] Acquire a target performance score, and determine a target note sequence according to the target performance score;
[0007] In response to acquiring a trigger signal in the sensing area, determining a target note in the target note sequence based on the trigger signal;
[0008] The target note is played through the electronic musical instrument.
[0009] In some embodiments, the electronic musical instrument includes a display screen, and the step of obtaining a target performance score and determining a target note sequence according to the target performance score includes:
[0010] Acquire a performance score list, and display the performance score list on the display screen; wherein the performance score list includes a plurality of candidate performance scores;
[0011] In response to receiving a score selection instruction, determining the target performance score from among the plurality of candidate performance scores according to the score selection instruction;
[0012] The target note sequence is determined according to the note information in the target performance score; wherein the target note sequence includes a plurality of notes arranged in a performance order.
[0013] In some embodiments, the electronic musical instrument includes a music stand, the music stand includes an optical recognition device, and the step of obtaining a target performance score and determining a target note sequence according to the target performance score includes:
[0014] The optical recognition device is used to collect an image of a paper music score placed on the music stand, and a feature code in the image of the paper music score is recognized;
[0015] The target performance score is obtained by matching the feature code in a preset score database; wherein the score database stores a plurality of candidate performance scores and their corresponding feature codes;
[0016] The target note sequence is determined according to the note information in the target performance score; wherein the target note sequence includes a plurality of notes arranged in a performance order.
[0017] In some embodiments, in response to acquiring a trigger signal in the sensing area, determining a target note in the target note sequence based on the trigger signal includes:
[0018] Acquire the trigger signal and all historical trigger signals acquired by the sensing area after the target music score starts to be played;
[0019] Determining a triggering order of the trigger signal in the historical trigger signal;
[0020] Based on the triggering sequence of the triggering signal, the target notes corresponding to the triggering sequence are obtained in the target note sequence; wherein the notes in the target note sequence are arranged in sequence according to the playing order.
[0021] In some embodiments, the electronic musical instrument is an electronic keyboard, the electronic keyboard includes a plurality of keys, and a driving device is disposed under each of the keys. Playing the target note by the electronic musical instrument includes:
[0022] Obtaining a preset note-key mapping relationship table, wherein the note-key mapping relationship table records the mapping relationship between each note and the corresponding key;
[0023] Searching the note-key mapping table according to the target note to determine the target key corresponding to the target note;
[0024] Determine key position information of the target key on the electronic piano according to the target key;
[0025] Controlling the driving device under the target key to drive the target key to perform a pressing action according to the key position information;
[0026] The target note is played.
[0027] In some embodiments, the electronic musical instrument is an electronic ukulele or an electronic guitar, the electronic ukulele or the electronic guitar comprises a plurality of strings, a string-plucking device is disposed under each of the strings, and playing the target note by the electronic musical instrument comprises:
[0028] Obtaining a preset note-string mapping relationship table, wherein the note-string mapping relationship table records the mapping relationship of the strings corresponding to each note;
[0029] Searching the note-string mapping table according to the target note to determine the target string corresponding to the target note;
[0030] Determining string position information of the target string on the electronic musical instrument according to the target string;
[0031] Controlling the string-plucking device under the target string to drive the target string to perform a string-plucking action according to the string position information;
[0032] The target note is played.
[0033] In some embodiments, in response to acquiring a trigger signal in the sensing area, before determining a target note in the target note sequence based on the trigger signal, further includes:
[0034] Obtaining the triggering time of the trigger signal and the triggering time of the previous historical trigger signal;
[0035] Calculate the time interval between two adjacent trigger signals;
[0036] comparing the time interval with a preset rhythm time threshold in the target performance score;
[0037] When the time interval is greater than the rhythm time threshold, it is determined that the current performance rhythm is abnormal;
[0038] In response to the abnormal performance rhythm, pausing acquisition of new trigger signals and displaying rhythm prompt information on the electronic musical instrument;
[0039] After waiting for a preset period of time, resume acquiring new trigger signals.
[0040] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a playing device of an electronic musical instrument, the device comprising:
[0041] An acquisition module, used for acquiring a target performance score and determining a target note sequence according to the target performance score;
[0042] a determination module, configured to determine a target note in the target note sequence based on the trigger signal in response to acquiring the trigger signal in the sensing area;
[0043] A playing module plays the target note through the electronic musical instrument.
[0044] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.
[0045] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0046] The present application proposes a playing method and device for an electronic musical instrument, an electronic device and a storage medium. The electronic musical instrument includes a sensing area, and the user only needs to generate a trigger signal in the sensing area. This design fundamentally changes the operation mode of traditional electronic musical instruments that require accurate key pressing, and significantly reduces the requirements for user operation accuracy. Users do not need to master specific key positions and professional playing skills, which greatly reduces the threshold for playing. First, by obtaining the target performance score, the target note sequence is determined according to the target performance score, and then in response to obtaining a trigger signal in the sensing area, the target note is determined in the target note sequence based on the trigger signal. This intelligent matching mechanism ensures the accuracy of the performance notes, allowing users to focus on grasping the rhythm and rhythm of the music and improving the performance experience. Finally, the target notes are played by the electronic musical instrument, so that users can play the score without having professional playing skills. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 is a flow chart of a method for playing an electronic musical instrument provided in an embodiment of the present application;
[0048] Figure 2 yes Figure 1 Flow chart of step 101 in;
[0049] Figure 3 yes Figure 1 Another flow chart of step 101 in;
[0050] Figure 4 yes Figure 1 Flowchart of step 102 in FIG.
[0051] Figure 5 yes Figure 1 Flow chart of step 103 in;
[0052] Figure 6 yes Figure 1 Another flow chart of step 103 in;
[0053] Figure 7 yes Figure 1 The flowchart before step 102 in FIG.
[0054] Figure 8 is a schematic diagram of the structure of a performance device of an electronic musical instrument provided in an embodiment of the present application;
[0055] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0057] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0058] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0059] In the field of electronic musical instruments, with the advancement of technology, the design and interaction of electronic musical instruments are also constantly developing. Traditional electronic musical instruments, whether electronic pianos, electronic guitars or other types of electronic musical instruments, require performers to have a considerable foundation in music theory and operating skills. This is a challenge for beginners or users who have not received professional training. Since electronic musical instruments mainly rely on users' accurate key operations to play music, the expansion of the user group is limited, especially for those who want to experience the fun of music performance in a more intuitive and simple way. The interactive design of electronic musical instruments often overemphasizes the accuracy of technology and ignores the needs of ordinary users for simple and intuitive music expression. Although these instruments have reached a fairly high level in hardware design and timbre restoration, the complexity of their operating modes still hinders a wider range of user groups from participating in music performance.
[0060] In the related art, some electronic musical instruments try to assist users in playing through visual or tactile feedback, but these methods still rely on the user's accurate operation of the instrument keys. For example, some electronic pianos use key light indicators to guide users to trigger the correct keys, but users still need to accurately trigger the specified keys to produce the correct tone, which does not fundamentally solve the skill barriers faced by non-professional users when playing musical instruments.
[0061] Based on this, the embodiments of the present application provide a method and device for playing an electronic musical instrument, an electronic device and a storage medium, which enable users to play music scores without having professional playing skills.
[0062] The embodiments of the present application provide a playing method and device for an electronic musical instrument, an electronic device and a storage medium, which are specifically described through the following embodiments. First, the playing method for an electronic musical instrument in the embodiments of the present application is described.
[0063] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0064] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0065] Figure 1 is an optional flow chart of the playing method of the electronic musical instrument provided in the embodiment of the present application, Figure 1 The method may include but is not limited to steps 101 to 103.
[0066] Step 101, obtaining a target performance score, and determining a target note sequence according to the target performance score;
[0067] Step 102, in response to acquiring a trigger signal in the sensing area, determining a target note in a target note sequence based on the trigger signal;
[0068] Step 103, playing the target note through an electronic musical instrument.
[0069] Steps 101 to 103 are described in detail below.
[0070] It is understandable that before the performance process begins, the electronic musical instrument first needs to obtain the target performance score that the user wants to play. The electronic musical instrument can obtain the target performance score in a variety of ways, such as reading a pre-stored score through a built-in memory, or receiving score data through an external interface such as a USB, a wireless network, etc. After obtaining the target performance score, the target performance score is parsed and converted into a target note sequence arranged in chronological order.
[0071] Exemplarily, the electronic musical instrument can have a built-in music score library to store a variety of different styles and difficulty scores. The user can select the music he wants to play from the music score library through a touch screen or a key interface to determine it as the target performance score. For example, the user can choose a simple children's song "Twinkle Twinkle Little Star" or a more complex classical music such as Beethoven's "Moonlight Sonata". Alternatively, the electronic musical instrument can be equipped with a USB interface, a MIDI interface or a wireless network module through external input, and support the import of music score files in multiple formats, such as standard formats such as MusicXML and MIDI files. For example, the user can download a MIDI file of "Canon" from a computer, transfer it to the electronic musical instrument through a USB interface, or directly download the music score file of "Butterfly Lovers" from an online music score library through a WiFi connection.
[0072] For example, after obtaining the target performance score, it is converted into a target note sequence arranged in chronological order. Take the beginning of "Für Elise" as an example. When the system obtains this score, it will first recognize that it is a 3 / 4 time piece. Taking the analysis of the first measure as an example, the first note recognized is determined to be the starting note E5 (Mi note of the fifth octave), which is an eighth note, followed by a D#5 (Re note of the fifth octave) with a semitone flat, which is also an eighth note value. The two notes are connected by a slur, forming a beautiful melody start. Then, the melody returns to the pitch of E5 again, still maintaining the eighth note value. After this eighth note, the melody drops to D#5 again. Next, the melody returns to the pitch of E5 again, but this time it leads to a lower range B4 (Si in the fourth octave). The last two notes of the first measure are D5 and C5 (Re in the fifth octave and Do in the fifth octave), both of which are eighth note values, forming a beautiful descending progression. Convert these parsed musical information into a precise time sequence to form a target note sequence for the first measure in chronological order. In this sequence, each note is given detailed parameter information. The starting E5 is marked as starting at 0 seconds and lasting for 0.25 seconds (assuming it is played at a speed of 120 beats per minute). The second note D#5 starts at 0.25 seconds and lasts for 0.25 seconds. This time mark continues until the first measure ends at 1.5 seconds. At the same time. The dynamic value of each note will also be marked. For example, this beautiful melody can be played at a medium dynamic value (marked as a dynamic value of 75), and slightly stronger or weaker changes can be set on specific notes to reflect the ups and downs of the music.
[0073] It can be understood that by determining the target note sequence based on the target performance score, the music information originally existing on the score is converted into an ordered sequence containing parameters such as precise time, pitch, duration and intensity. This sequence not only records the basic attributes of each note, but also includes detailed information such as performance expression and intensity changes, providing complete data support for subsequent automatic performance.
[0074] It is understandable that when the user makes an operation in the sensing area, the electronic musical instrument will detect a trigger signal, which can be a touch, proximity or other forms of interactive input. The electronic musical instrument will establish a correspondence between this trigger signal and a specific note in the target note sequence according to the current context, that is, the correspondence between the time point of the trigger signal and the playback time point of the note in the target note sequence, thereby ensuring that the user's operation can accurately correspond to the correct note. This design greatly reduces the difficulty of operation for users, allowing non-professional users to achieve accurate note performance through simple triggering actions.
[0075] Exemplarily, the sensing area of the electronic musical instrument can be designed as a rectangular touch panel. Taking the performance of "Twinkle Twinkle Little Star" as an example, when the electronic musical instrument has loaded and parsed the target performance score, the touch panel can be divided into several different sensing areas. Users do not need to press specific keys at specific positions like traditional pianos, but can trigger operations at any position in this sensing area. When the user makes a touch action in the left area of the touch panel, the electronic musical instrument obtains the trigger signal and matches the trigger signal with the note that should be played. For example, at the beginning of playing "Twinkle Twinkle Little Star", the first trigger signal received by the electronic musical instrument will automatically correspond to the first C4 note. At the same time, the electronic musical instrument will consider the time characteristics of the trigger signal, such as the duration of the touch can be used to control the duration of the note, and the pressure of the touch can affect the playing intensity of the note.
[0076] It is understandable that when the target note is played through an electronic musical instrument, after the target note corresponding to the trigger signal is determined, the electronic musical instrument will synthesize and play the sound according to the relevant parameters of the note. This process may involve digital sound synthesis technology. The electronic musical instrument will use the built-in sound source module to generate the corresponding sound according to the pitch, timbre, intensity and other parameters of the target note. During the playback process, the electronic musical instrument can also consider the connection between the notes to ensure the fluency and expressiveness of the music. This automated playback mechanism ensures that even users without professional training can produce professional performance effects.
[0077] Steps 101 to 103 shown in the embodiment of the present application are to obtain a target performance score, determine a target note sequence based on the target performance score; in response to obtaining a trigger signal in the sensing area, determine a target note in the target note sequence based on the trigger signal; and play the target note through an electronic musical instrument. The embodiment of the present application sets a sensing area and a smart matching method for notes, so that users only need to trigger the sensing area to accurately play the notes in the score without having to master professional keystroke skills, thereby lowering the threshold for using electronic musical instruments, improving the playing experience, and allowing more non-professional users to enjoy the fun of playing musical instruments.
[0078] See also Figure 2 In some embodiments, the electronic musical instrument includes a display screen, and step 101 may include but is not limited to steps 201 to 203.
[0079] Step 201: Obtain a performance score list, and display the performance score list on a display screen;
[0080] The performance score list includes a plurality of alternative performance scores;
[0081] Step 202: in response to receiving a score selection instruction, determining a target performance score from a plurality of candidate performance scores according to the score selection instruction;
[0082] Step 203: determining a target note sequence according to the note information in the target performance score;
[0083] The target note sequence includes a plurality of notes arranged in a performance order.
[0084] Steps 201 to 203 are described in detail below.
[0085] It is understandable that the acquisition process of obtaining the performance score list can be implemented in a variety of ways. The pre-stored score library can be read from the built-in memory, or the latest score resources can be obtained from the online database through a network connection. The obtained performance score list contains multiple alternative performance scores, which can cover different musical styles, difficulty levels and performance forms. On the display screen, the electronic musical instrument will present these alternative performance scores in a structured manner, which can be classified according to the difficulty level, such as dividing the alternative performance scores into entry-level, elementary, intermediate and advanced levels, and displaying the corresponding difficulty tracks at each level. At the same time, the electronic musical instrument can also organize the display content according to the musical style, such as different categories such as classical music, pop music, jazz, etc. In order to improve the user experience, the display interface of the display screen can be in the form of thumbnail preview, so that the user can intuitively see the basic information of the alternative performance score, including the song name, author, difficulty level, expected performance time and other key information.
[0086] Exemplarily, after the display screen of the electronic musical instrument displays the list of performance scores, it will wait for and respond to the user's score selection instruction. The score selection instruction can be triggered in a variety of ways, such as directly clicking on the required score by touching the screen. When the user clicks on an alternative performance score, the detailed information of the score will be displayed first, including a complete score preview, performance difficulty prompts, recommended practice methods, etc. The user can finally select this alternative performance score by pressing the confirmation button, and the electronic musical instrument will determine the target performance score from the alternative performance scores according to this selection instruction. The electronic musical instrument will simultaneously load all resources related to the score, such as audio examples, performance prompts and other auxiliary information. This interactive method ensures that the user can make a choice based on a full understanding of the content of the alternative performance score, thereby improving the efficiency of learning and playing.
[0087] It is understandable that after the target performance score is determined, the note information in the score needs to be converted into a standardized target note sequence. First, the basic information in the target performance score, such as the key signature, time signature, tempo marking, etc., must be identified, and then the detailed information of each note is extracted according to the performance order, including parameters such as pitch, duration, and dynamics. This information will be organized into an ordered sequence, and each note has its determined position and performance parameters in the sequence, forming a target note sequence including multiple notes arranged in the performance order.
[0088] Through the above steps 201 to 203, a performance score list is obtained and displayed on a display screen. In response to receiving a score selection instruction, a target performance score is determined from multiple alternative performance scores according to the score selection instruction, and a target note sequence is determined according to the note information in the target performance score. A clear score selection interface is provided for the user, and an ordered sequence containing complete performance parameters is generated, providing a reliable data basis for automatic performance and interactive learning.
[0089] See also Figure 3 In some embodiments, the electronic musical instrument includes a music stand, and the music stand includes an optical recognition device. Step 101 may include but is not limited to steps 301 to 303.
[0090] Step 301: collecting an image of a paper music score placed on a music stand through an optical recognition device, and recognizing a feature code in the image of the paper music score;
[0091] Step 302: obtaining a target performance score by matching the feature code in a preset score database;
[0092] The score database stores a plurality of candidate performance scores and their corresponding feature codes;
[0093] Step 303: determining a target note sequence according to the note information in the target performance score;
[0094] The target note sequence includes a plurality of notes arranged in a performance order.
[0095] Steps 301 to 303 are described in detail below.
[0096] It is understandable that the music stand of an electronic musical instrument is designed as an intelligent recognition platform, equipped with a special optical recognition device. When the user places a paper sheet of music on the music stand, the optical recognition device automatically starts the scanning process. The optical recognition device will perform high-precision scanning on the placed paper sheet of music, capturing various details in the sheet of music image. After acquiring the image, the image can be pre-processed, including image enhancement, noise removal, distortion correction and other operations, to ensure the accuracy of subsequent recognition.
[0097] For example, the feature code in the paper music score image is identified. The feature code may be a special mark printed on the paper music score image, a QR code, or feature information automatically generated according to the format characteristics of the music score, the arrangement pattern of the notes, etc. For example, for a standard piano score, not only its overall layout is identified, but also key elements such as the line characteristics of the five-line score, the position information of the notes, the key signature and the speed mark are extracted, and these information are integrated into a unique feature code.
[0098] It is understandable that after obtaining the feature code, the electronic musical instrument will be matched in a pre-established score database. The score database is a knowledge base containing a large amount of standardized score information, and each alternative performance score has its corresponding feature code stored in the database. When the electronic musical instrument is matched, an efficient feature comparison algorithm can be used to compare the identified feature code with the feature code stored in the database. For example, the electronic musical instrument will compare the extracted feature code with the standard feature code of the track in the database. After confirming that the match reaches the preset threshold, it can be determined that this is the target performance score. This matching mechanism can not only accurately identify the score, but also process partial fragments or variant versions of the score, providing users with a more flexible user experience.
[0099] Exemplarily, after determining the target performance score, the extraction and serialization of note information can be started. First, all the musical elements in the target performance score need to be parsed, including the pitch, duration, and dynamic marking of each note. The electronic instrument will organize these note information into a standardized sequence according to the time order of the performance. For example, for the first movement of Beethoven's "Moonlight Sonata", the electronic instrument will first identify its characteristic triplet rhythm pattern, and then arrange the notes in each group of triplets at precise time intervals, while retaining its dynamic markings, pedal use instructions and other performance elements. The target note sequence not only contains basic performance information, but also records all expression marks and performance prompts to ensure that the artistic expression of the work can be fully restored in the subsequent automatic performance process. This serialized processing method provides standardized data support for the intelligent performance function of electronic instruments, enabling electronic instruments to accurately perform various complex performance requirements.
[0100] Through the above steps 301 to 303, the image of the paper music score placed on the music stand is collected by the optical recognition device, the feature code in the paper music score image is recognized, and the target performance score is matched in the preset music score database according to the feature code. According to the note information in the target performance score, the target note sequence is determined. The user only needs to place the paper music score on the music stand, and the electronic musical instrument can automatically complete the recognition and conversion process and convert the recognized music score into a standardized target note sequence.
[0101] See also Figure 4 In some embodiments, step 102 may include but is not limited to steps 401 to 403 .
[0102] Step 401: Acquire a trigger signal and all historical trigger signals acquired in the sensing area after the target music score begins to be played;
[0103] Step 402: Determine the triggering order of the trigger signal in the historical trigger signals;
[0104] Step 403: based on the triggering sequence of the triggering signal, obtaining the target note corresponding to the triggering sequence in the target note sequence;
[0105] The notes in the target note sequence are arranged in sequence according to the order of playing.
[0106] Steps 401 to 403 are described in detail below.
[0107] Exemplarily, when the user starts to play, the electronic musical instrument will continuously receive the trigger signals generated by the user in the sensing area, and store these signals in chronological order, including the currently received trigger signal and all the historical trigger signals accumulated before. The electronic musical instrument needs to perform a timing analysis on the acquired trigger signal to determine its specific position in the entire performance process, which involves the precise calculation and sorting of the trigger signal time series. The electronic musical instrument will compare the newly received trigger signal with the previously recorded historical trigger signal to determine its exact position in the entire trigger sequence. This sorting not only takes into account the time sequence of the trigger, but also combines the rhythmic characteristics of the music, and considers possible special performance requirements, such as staccato, legato, etc. Such processing ensures that the electronic musical instrument can accurately understand the user's performance intentions and maintain the correct sequence relationship even in complex rhythmic patterns.
[0108] It is understandable that based on the determined trigger sequence, the electronic musical instrument will search for the corresponding target note in the target note sequence. This matching process can take into account multiple factors, including trigger timing, playing rhythm, musical syntax, etc. Since the target note sequence is pre-arranged in the order of performance, the electronic musical instrument can directly locate the target note at the corresponding position according to the sequence number of the trigger signal. For example, when playing the first movement of the "Moonlight Sonata", when the electronic musical instrument detects the user's first trigger signal, it will match it to the G#3 note at the beginning of the movement; subsequent trigger signals will correspond to subsequent triplet note groups in turn. This matching mechanism can have a certain degree of fault tolerance and can handle slight time deviations that may occur in the user to ensure the smoothness of the performance.
[0109] Through the above steps 401 to 403, the electronic musical instrument will first record each trigger signal of the user, including the trigger time point of the first note, the trigger time point of the second note, etc., and then, the electronic musical instrument will analyze the time intervals between these trigger signals to determine their relative order. Finally, the electronic musical instrument will match this trigger sequence with the preset note sequence to ensure that each trigger signal can correspond to the correct target note, helping the user to accurately achieve the expected musical performance.
[0110] See also Figure 5 In some embodiments, the electronic musical instrument is an electronic keyboard, which includes a plurality of keys, each of which has a driving device disposed under it. Step 103 may include but is not limited to steps 501 to 505.
[0111] Step 501: Obtain a preset musical note and piano key mapping relationship table;
[0112] The note-key mapping table records the mapping relationship between each note and the corresponding key.
[0113] Step 502: searching the note-key mapping table according to the target note to determine the target key corresponding to the target note;
[0114] Step 503: determining the key position information of the target key on the electronic keyboard according to the target key;
[0115] Step 504: controlling the driving device under the target key to drive the target key to perform a pressing action according to the key position information;
[0116] Step 505: Play the target note.
[0117] Steps 501 to 505 are described in detail below.
[0118] It is understandable that it is first necessary to obtain a pre-established note-key mapping relationship table, which can be a complete database that records in detail the correspondence between each note and a specific key. For example, in a standard 88-key electronic keyboard, each note has its unique corresponding key number. The note-key mapping relationship table not only records the basic correspondence, such as middle C (C4) corresponding to the 40th key, middle G (G4) corresponding to the 47th key, etc., but can also include more technical parameters, such as the MIDI number of the note, standard frequency value and other key information.
[0119] Exemplarily, after obtaining the target note information, an accurate search and match is performed in the note-key mapping table. This process needs to process multiple possible note representations. For example, when the first note E5 is to be played, the electronic musical instrument will search for the key information corresponding to this note in the note-key mapping table. The search process can not only process basic notes, but also accurately identify notes with accidentals. For example, when processing B flat (Bb4), the electronic musical instrument can recognize that it actually corresponds to the same key as A sharp (A#4), ensuring that the electronic musical instrument can accurately convert the note information of the target note into a target key with a specific key number.
[0120] It is understandable that after determining the target key, it is necessary to obtain the specific position information of the target key on the electronic keyboard. That is, the key position information. The key position information contains the precise physical coordinates of the key, the key type (black key or white key) and related physical parameters. Taking the performance of middle C (C4) as an example, the electronic keyboard will obtain specific parameters such as the distance of this key from the left edge of the keyboard, the width of the key, the movable travel distance (such as 10 mm), etc. For black keys, their special positional relationships also need to be considered, such as the position offset relative to the adjacent white keys.
[0121] Exemplarily, based on the key position information obtained, the drive device under the corresponding key is controlled to perform a pressing action. Taking the playing of a note of medium force as an example, specific control parameters are sent to the drive device: setting the pressing force, pressing speed, pressing depth, duration, etc. The drive device (which can be an electromagnet or a micro motor) will accurately perform the pressing action according to these parameters to simulate the effect of human hand playing. At the same time, these parameters can also be adjusted according to different performance requirements, such as increasing the pressing force when playing a strong note and reducing the pressing speed when playing a weak note.
[0122] It is understandable that while the driving device is pressing, the sound playback module of the electronic piano is activated. Taking the playing of a quarter note C4 as an example, the sound synthesizer is first started according to the preset timbre parameters (such as piano timbre), and then the appropriate volume value is set according to the playing intensity, and the duration of the sound is controlled. In this process, appropriate sound effects processing can also be added, such as reverberation effects, timbre gradients, etc., so that the final sound is closer to the timbre characteristics of a real piano. The key action and sound playback in the whole process are precisely synchronized in time to ensure the professionalism and naturalness of the performance effect.
[0123] Through the above steps 501 to 505, a preset note-key mapping relationship table is obtained, and the target note is searched in the note-key mapping relationship table to determine the target key corresponding to the target note, and the key position information of the target key on the electronic keyboard is determined based on the target key. According to the key position information, the driving device under the target key is controlled to drive the target key to perform a pressing action and play the target note, thereby achieving accurate conversion of the note information of the target key to the physical key, ensuring the accuracy of the performance and achieving a natural and smooth performance effect.
[0124] See also Figure 6 In some embodiments, the electronic musical instrument is an electronic ukulele or an electronic guitar, the electronic ukulele or the electronic guitar includes a plurality of strings, and a plucking device is provided under each string. Step 103 may include but is not limited to steps 601 to 605.
[0125] Step 601: Obtain a preset note-string mapping relationship table;
[0126] The note-string mapping relationship table records the mapping relationship between each note and the string.
[0127] Step 602: searching the note-string mapping table according to the target note to determine the target string corresponding to the target note;
[0128] Step 603: determining the string position information of the target string on the electronic musical instrument according to the target string;
[0129] Step 604: controlling the string-plucking device under the target string to drive the target string to perform a string-plucking action according to the string position information;
[0130] Step 605: Play the target note.
[0131] Steps 601 to 605 are described in detail below.
[0132] It is understandable that in an electronic ukulele or electronic guitar, a preset note-string mapping relationship table is obtained, which records in detail the correspondence between each note and a specific string. Taking the electronic ukulele as an example, its standard tuning is G4-C4-E4-A4 four strings, and the mapping table will record the playing possibilities of each note in different positions. For example, middle A (A4) can be played in the open position of the first string or in the 5th fret position of the second string. For the electronic guitar, the standard tuning of its six strings is E2-A2-D3-G3-B3-E4, and the mapping relationship is more complicated.
[0133] Exemplarily, after determining the target note, intelligent search and matching are performed in the note-string mapping relationship table, and the optimal playing scheme is selected. For example, when the note C4 needs to be played, the second string open position can be selected on the ukulele, while on the electronic guitar, multiple positions such as the fifth string third fret or the sixth string eighth fret can be selected. According to the context analysis, the most appropriate playing position is selected. For example, if the previous and next notes are played in lower positions, the fingering of the lower position will be preferred to ensure the fluency of the performance.
[0134] It is understandable that after the target string is determined, the specific position information of the string on the instrument is obtained, including the spatial coordinates, tension parameters and related physical properties of the string. Taking the electronic guitar as an example, it is necessary to accurately locate the starting point and end point of the string, as well as the position coordinates of the specific frets. For example, if you want to play the F3 note on the fifth fret of the third string (D string), the system needs to obtain the precise spatial coordinates of the position, the tension value of the string and other parameters. Based on the acquired string position information, the string plucking device at the corresponding position is controlled to perform the string plucking action. While the string plucking device performs the action, the sound playback module is activated to play the target note.
[0135] Through the above steps 601 to 605, a preset note-string mapping relationship table is obtained, and the note-string mapping relationship table is searched according to the target note to determine the target string corresponding to the target note, and the string position information of the target string on the electronic musical instrument is determined according to the target string. According to the string position information, the plucking device under the target string is controlled to drive the target string to perform the plucking action and play the target note. By establishing a precise note-string mapping relationship, an accurate conversion from the target note to the specific plucking action is achieved.
[0136] See also Figure 7 Before step 102, it may also include but not be limited to steps 701 to 706.
[0137] Step 701: Obtain the triggering time of the trigger signal and the triggering time of the previous historical trigger signal;
[0138] Step 702: Calculate the time interval between two adjacent trigger signals;
[0139] Step 703: Compare the time interval with a preset rhythm time threshold in the target performance score;
[0140] Step 704: when the time interval is greater than the rhythm time threshold, determining that the current playing rhythm is abnormal;
[0141] Step 705: In response to the abnormal performance rhythm, suspending acquisition of new trigger signals and displaying rhythm prompt information on the electronic musical instrument;
[0142] Step 706: Wait for a preset period of time and then resume acquiring a new trigger signal.
[0143] Steps 701 to 706 are described in detail below.
[0144] It is understandable that the specific time point at which the user generates a trigger signal in the sensing area is accurately recorded, and the actual time interval between two adjacent notes is obtained by calculating the time interval between the current trigger moment and the previous trigger moment. This time interval reflects the user's playing rhythm. The calculated time interval is compared with the rhythm time threshold specified in the score. Each piece of music has its own inherent rhythm requirements. According to the rhythm time threshold pre-set in the score, it is judged whether the user's playing rhythm deviates from the normal range.
[0145] For example, if it is found that the time interval of the user's actual performance exceeds the rhythm time threshold specified in the score, it will be considered that the user's performance rhythm is abnormal, usually manifested as too slow performance speed, or too large interval between two notes, deviating from the original rhythm requirements of the music. Once the rhythm is determined to be abnormal, two measures will be taken immediately: first, suspend receiving new trigger signals to prevent the user from continuing to play with the wrong rhythm; second, display corresponding prompt information on the display screen of the electronic musical instrument, such as "Please play according to the correct rhythm" or "The performance rhythm is too slow, please speed up", etc., to help users find and correct rhythm problems in time. The electronic musical instrument will give the user a preset adjustment time, so that the user has the opportunity to adjust his or her own performance rhythm. This preset time can be a few seconds. When the preset time ends, it will start receiving trigger signals again to allow the user to continue playing. This waiting process for the preset time not only gives the user time to adapt, but also avoids the overall learning effect being affected by continuous incorrect performance.
[0146] Through the above steps 701 to 706, the electronic musical instrument can monitor the user's playing rhythm in real time, and detect abnormal rhythm in time through accurate calculation and intelligent judgment of the trigger signal time interval. When the user's playing rhythm deviates, a visual prompt will be given immediately and the trigger signal will be suspended. This active rhythm correction mechanism can not only help users develop a good sense of rhythm, but also prevent users from developing wrong playing habits. At the same time, a reasonable waiting time is set to allow users to have sufficient time to adjust the playing state, which not only ensures the learning effect, but also takes into account the user experience, and effectively improves the user's playing level and music literacy. This intelligent rhythm auxiliary function greatly reduces the difficulty for beginners to master the correct playing rhythm, making electronic musical instruments more suitable for non-professional users.
[0147] See also Figure 8 The present application also provides an electronic musical instrument playing device, which can implement the above-mentioned electronic musical instrument playing method, and the device includes:
[0148] An acquisition module, used for acquiring a target performance score and determining a target note sequence according to the target performance score;
[0149] a determination module, configured to determine a target note in the target note sequence based on the trigger signal in response to acquiring the trigger signal in the sensing area;
[0150] A playing module plays the target note through the electronic musical instrument.
[0151] The specific implementation of the playing device of the electronic musical instrument is basically the same as the specific implementation of the playing method of the electronic musical instrument mentioned above, and will not be repeated here.
[0152] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the playing method of the electronic musical instrument when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0153] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0154] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0155] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the playing method of the electronic musical instrument in the embodiment of this application;
[0156] Input / output interface 903, used to implement information input and output;
[0157] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);
[0158] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0159] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0160] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the playing method of the electronic musical instrument is implemented.
[0161] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0162] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0163] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0164] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0165] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0166] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0167] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0168] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0169] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0170] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0171] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0172] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for playing an electronic musical instrument, characterized in that: The electronic musical instrument includes a sensing area, and the method includes: Acquire a target performance score, and determine a target note sequence according to the target performance score; In response to acquiring a trigger signal in the sensing area, determining a target note in the target note sequence based on the trigger signal; The target note is played through the electronic musical instrument.
2. The method according to claim 1, characterized in that The electronic musical instrument includes a display screen, and the step of obtaining a target performance score and determining a target note sequence according to the target performance score includes: Acquire a performance score list, and display the performance score list on the display screen; wherein the performance score list includes a plurality of candidate performance scores; In response to receiving a score selection instruction, determining the target performance score from among the plurality of candidate performance scores according to the score selection instruction; The target note sequence is determined according to the note information in the target performance score; wherein the target note sequence includes a plurality of notes arranged in a performance order.
3. The method according to claim 1, characterized in that The electronic musical instrument includes a music stand, and the music stand includes an optical recognition device. The step of acquiring a target performance score and determining a target note sequence according to the target performance score includes: The optical recognition device is used to collect an image of a paper music score placed on the music stand, and a feature code in the image of the paper music score is recognized; The target performance score is obtained by matching the feature code in a preset score database; wherein the score database stores a plurality of candidate performance scores and their corresponding feature codes; The target note sequence is determined according to the note information in the target performance score; wherein the target note sequence includes a plurality of notes arranged in a performance order.
4. The method according to claim 1, characterized in that: In response to acquiring a trigger signal in the sensing area, determining a target note in the target note sequence based on the trigger signal includes: Acquire the trigger signal and all historical trigger signals acquired by the sensing area after the target music score starts to be played; Determining a triggering order of the trigger signal in the historical trigger signal; Based on the triggering sequence of the triggering signal, the target notes corresponding to the triggering sequence are obtained in the target note sequence; wherein the notes in the target note sequence are arranged in sequence according to the playing order.
5. The method according to claim 1, characterized in that The electronic musical instrument is an electronic keyboard, which includes a plurality of keys, each of which has a driving device disposed under it, and the target note is played by the electronic musical instrument, including: Obtaining a preset note-key mapping relationship table, wherein the note-key mapping relationship table records the mapping relationship between each note and the corresponding key; Searching the note-key mapping table according to the target note to determine the target key corresponding to the target note; Determine key position information of the target key on the electronic piano according to the target key; Controlling the driving device under the target key to drive the target key to perform a pressing action according to the key position information; The target note is played.
6. The method according to claim 1, characterized in that The electronic musical instrument is an electronic ukulele or an electronic guitar, the electronic ukulele or the electronic guitar comprises a plurality of strings, a string-plucking device is arranged under each of the strings, and playing the target note by the electronic musical instrument comprises: Obtaining a preset note-string mapping relationship table, wherein the note-string mapping relationship table records the mapping relationship of the strings corresponding to each note; Searching the note-string mapping table according to the target note to determine the target string corresponding to the target note; Determining string position information of the target string on the electronic musical instrument according to the target string; Controlling the string-plucking device under the target string to drive the target string to perform a string-plucking action according to the string position information; The target note is played.
7. The method according to claim 1, characterized in that In response to acquiring a trigger signal in the sensing area, before determining a target note in the target note sequence based on the trigger signal, the method further includes: Obtaining the triggering time of the trigger signal and the triggering time of the previous historical trigger signal; Calculate the time interval between two adjacent trigger signals; comparing the time interval with a preset rhythm time threshold in the target performance score; When the time interval is greater than the rhythm time threshold, it is determined that the current performance rhythm is abnormal; In response to the abnormal performance rhythm, pausing acquisition of new trigger signals and displaying rhythm prompt information on the electronic musical instrument; After waiting for a preset period of time, resume acquiring new trigger signals.
8. A performance device for an electronic musical instrument, characterized in that: The device comprises: An acquisition module, used for acquiring a target performance score and determining a target note sequence according to the target performance score; a determination module, configured to determine a target note in the target note sequence based on the trigger signal in response to acquiring the trigger signal in the sensing area; A playing module plays the target note through the electronic musical instrument.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the playing method of the electronic musical instrument according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the playing method of the electronic musical instrument according to any one of claims 1 to 7 is implemented.