A foot pedal modification method and system
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUXIAN HONGYIN (CHONGQING) TECHNOLOGY CO LTD
- Filing Date
- 2026-02-05
- Publication Date
- 2026-06-02
Smart Images

Figure CN121662002B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pedal data processing technology, specifically to a pedal modification method and system. Background Technology
[0002] The demand for piano learning is currently very strong, covering multiple scenarios such as children's music enlightenment, teenagers' art exam preparation, and adults' interest cultivation, making it a popular choice for the public to improve their artistic literacy. The use of the piano pedals is key to enhancing the performance: the right pedal extends the pitch and enriches resonance, the left pedal softens the tone and reduces volume, and the middle pedal locks in the bass and avoids reverberation. The flexible use of these three pedals can make the melody more layered and emotional. Piano pedals are usually integrated under the piano body, allowing users to extend the tone, adjust reverberation, and create dynamic changes by pressing the pedals.
[0003] However, some pianists (such as children with short legs, elderly or disabled people who cannot exert force with their legs, or beginners who do not know how to use the pedals) may not be able to use the pedals correctly to achieve the desired playing effect.
[0004] Furthermore, piano beginners often lack systematic training in pedal technique and experience in judging the timing and duration of pedaling. As a result, they often struggle to accurately match the rhythm and emotional needs of the music. This not only prevents them from fully utilizing the pedal's optimization function but may also disrupt the overall harmony of the music due to incorrect pedaling.
[0005] Therefore, there is an urgent need for a foot pedal data processing method that can meet users' personalized needs. Summary of the Invention
[0006] The purpose of this invention is to provide a foot pedal modification method and system that partially solves or alleviates the above-mentioned shortcomings in the prior art, and can greatly improve the efficiency of music production, teaching assistance and performance analysis.
[0007] To solve the aforementioned technical problems, the present invention specifically adopts the following technical solution:
[0008] A first aspect of the present invention provides a pedal modification method, comprising: S201, acquiring a playback file of a song, the playback file recording at least one trigger event, the trigger event including a pedal event; the basic information of the pedal event including a pedal curve, the pedal curve being used to describe the relationship between pedal value and time; the pedal curve including a pedal-on segment, a holding segment, and a pedal-off segment; S202, acquiring a pedal correction rule, the pedal correction rule including a style correction rule, the style correction rule being obtained through the performance preference of the song, wherein the style correction rule is used to define the pedal-on speed or pedal-off speed, the performance preference including: pedal depth, performer style, or musical style; S203, modifying the pedal curve according to the pedal correction rule to obtain a corrected pedal curve; S204, replacing the corresponding pedal curve in the playback file with the corrected pedal curve.
[0009] In some embodiments, S203 includes the following steps: S2031, obtaining the pedal segment and correcting the pedal segment to obtain a corrected pedal segment; S2032, obtaining the release segment and correcting the release segment to obtain a corrected release segment; S2033, forming the corrected pedal curve based on the corrected pedal segment, the holding segment, and the corrected release segment.
[0010] In some embodiments, before S204, the method further includes the step S205, which determines whether the time interval corresponding to the modified pedal curve is within the recommended time interval. If yes, step S204 is executed; otherwise, the method returns to S2031 or S2032.
[0011] In some embodiments, the playback file further includes: a note event. Correspondingly, the method further includes: S206, generating the recommended time interval based on the note event, wherein the basic information of the note event includes: note identifier, trigger time, and release time.
[0012] In some embodiments, the step of generating the recommended time interval based on the note event includes: obtaining the current chord where the pedal event is located based on the note event; when a chord change occurs between the current chord and its corresponding adjacent chord, obtaining the sounding time point of the adjacent chord; the sounding time point is the end time of the sounding of the chord preceding the current chord, or the sounding time point is the start time of the sounding of the chord following the current chord; generating a recommended start time and / or a recommended end time of the pedal event based on the sounding time point; and generating the recommended time interval based on the recommended start time and / or the recommended end time.
[0013] In some embodiments, the step of generating the recommended time interval based on the musical note event includes: identifying whether the foot pedal event has entered a silent period, wherein the silent period is a period in which no musical note event occurs and the duration is longer than a preset silent duration; if so, generating a recommended end time based on the silent period and generating the recommended time interval based on the recommended end time.
[0014] In some embodiments, the method further includes the steps of: S207, identifying whether the musical phrase covered by the pedal event has a musical phrase boundary; if the determination result of S207 is yes, proceeding to S208; if the determination result of S207 is no, generating a retention suggestion; S208, determining whether a chord change occurs between the musical phrase boundary and the next musical phrase; if the determination result of S208 is yes, generating a retention suggestion for the pedal event; if the determination result of S208 is no, generating a deletion suggestion for the pedal event, wherein the deletion suggestion is used to delete at least a portion of the data of the pedal event.
[0015] In some embodiments, the musical segment includes a first sub-segment and a second sub-segment. Correspondingly, S207 includes the steps of: identifying a first effective density of the first sub-segment and a second effective density of the second sub-segment; wherein the first effective density and the second effective density are used to define the effective density of notes; when the first effective density is greater than the second effective density, and the difference between the first effective density and the second effective density is greater than a preset change threshold, the second sub-segment is identified as the boundary of the musical segment.
[0016] In some embodiments, the method further includes: identifying a user style based on the playback file or the user's historical performance data, the user style including at least one of the following: pedal speed preference, pedal release speed preference, pedal node change preference; and selecting or generating the style correction rule based on the user style and the performance preference.
[0017] A second aspect of the present invention provides a pedal modification system, comprising: a playback file acquisition module for acquiring a playback file of a track, the playback file recording at least one trigger event, the trigger event including a pedal event; basic information of the pedal event including a pedal curve, the pedal curve describing the change relationship of pedal value over time; the pedal curve including a pedal-on segment, a holding segment, and a pedal-off segment; a correction rule acquisition module for acquiring pedal correction rules, the pedal correction rules including a style correction rule, the style correction rule being obtained through the performance preference of the track, wherein the style correction rule is used to define the pedal-on speed or pedal-off speed, the performance preference including: pedal depth, performer style, or musical style; a pedal curve correction module for modifying the pedal curve according to the pedal correction rules to obtain a corrected pedal curve; and a pedal curve replacement module for replacing the corresponding pedal curve in the playback file with the corrected pedal curve.
[0018] Beneficial technical effects:
[0019] Firstly, this invention proposes a restrictive pedal style segmentation correction mechanism. This mechanism requires selecting style correction rules based on performance preferences, preserving the basic function of pedal sustain without regenerating the entire pedal curve (e.g., only replacing the pedal segment). This achieves a good balance between correction efficiency and performance quality. From another perspective, the restrictive pedal segmentation correction mechanism employed in this invention can also reduce the computational burden on the computer system to some extent. In other words, this restrictive pedal correction mechanism can reduce the difficulty of pedal correction in a computer system to a certain degree.
[0020] Secondly, this invention filters the range of inserted nodes based on note density to avoid negative impacts on the playback file caused by too many selected nodes (such as excessive sustain effects leading to muddy sound). It also reduces the difficulty of automatically inserting pedal data. From another perspective, restricting the insertion of pedal data not only helps reduce computational consumption during the insertion process but also effectively reduces the operational complexity of data matching and other steps, thereby significantly reducing the overall difficulty of pedal data insertion and improving the stability and feasibility of the pedal data insertion process.
[0021] Third, this invention selects or generates style correction rules based on the user's style, playing preferences, and corresponding reference levels. This avoids or reduces user resistance caused by significant changes in pedal style (e.g., "This doesn't sound like me at all"), and instead provides a more natural and user-acceptable pedal style correction experience (e.g., "This is the optimized version I played"). In other words, for different types of users, this compromise pedal correction scheme allows the playing effect to be close to the standard template while retaining the user's personal characteristics. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. In all the drawings, similar elements or parts are generally identified by similar reference numerals. The elements or parts in the drawings are not necessarily drawn to scale. Obviously, the drawings described below are some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.
[0023] Figure 1 A schematic diagram of a foot pedal curve provided by the present invention;
[0024] Figure 2 This is a before-and-after comparison diagram of the pedaling speed of the pedal segment being corrected according to style correction rules, as provided by the present invention.
[0025] Figure 3 This is a schematic diagram illustrating the generation of insertion nodes based on the foot pedal insertion rules of a musical score file, as provided by the present invention.
[0026] Figure 4 A schematic diagram of the original curve of the foot pedal section provided by the present invention;
[0027] Figure 5 A schematic diagram of the modified foot pedal section provided by the present invention;
[0028] Figure 6 Another schematic diagram of the modified foot pedal section provided by the present invention;
[0029] Figure 7 A schematic diagram of the original curve of the loose pedal section provided by the present invention;
[0030] Figure 8 A schematic diagram of the modified loose pedal section provided by the present invention;
[0031] Figure 9 Another schematic diagram of the modified loose pedal section provided by the present invention;
[0032] Figure 10This is a schematic diagram of the XML_note_info data structure provided by the present invention;
[0033] Figure 11 This is a schematic diagram of the data structure of pedal_action provided by the present invention;
[0034] Figure 12 A schematic block diagram of the structure of a computer device provided by the present invention;
[0035] Figure 13 A flowchart illustrating a foot pedal modification method provided by the present invention;
[0036] Figure 14 This invention provides a schematic diagram of the structure of a foot pedal modification system;
[0037] Figure 15 This is a flowchart illustrating a method for replacing pedal data in a playback file according to the present invention.
[0038] Figure 16 This is a schematic diagram of a system for replacing pedal data in a playback file, provided by the present invention.
[0039] Summary of reference numerals in the attached diagram: 1. Simulation node I; 2. Simulation node II; 3. Simulation node III; 4. Deleted node; 5. Inserted node I; 6. Inserted node II; 7. Playback file; 8. New playback file. Detailed Implementation
[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. In this document, suffixes such as "module," "component," or "unit" used to represent elements are only for the purpose of illustrative purposes and have no specific meaning in themselves. Therefore, "module," "component," or "unit" can be used interchangeably. In this document, the terms "upper," "lower," "inner," "outer," "front," "rear," "one end," "the other end," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. In this document, unless otherwise explicitly specified and limited, the terms "installed," "equipped with," "connected," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium; it can be a connection within two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances. "And / or" in this document includes any and all combinations of one or more of the listed related items. "A plurality" in this document means two or more, i.e., it includes two, three, four, five, etc. As used in this specification, the term "about" typically means + / -5% of the value, more typically + / -4%, more typically + / -3%, more typically + / -2%, even more typically + / -1%, even more typically + / -0.5%. In this specification, certain embodiments may be disclosed in a format within a certain range. It should be understood that this description of "within a certain range" is merely for convenience and brevity and should not be interpreted as a rigid limitation on the disclosed range. Therefore, a range description should be considered as having specifically disclosed all possible subranges and the individual numeric values within those ranges. For example, a description of the range 1-6 should be considered as having specifically disclosed subranges such as from 1 to 3, from 1 to 4, from 1 to 5, from 2 to 4, from 2 to 6, from 3 to 6, etc., as well as the individual numbers within that range, such as 1, 2, 3, 4, 5, and 6. This rule applies regardless of the breadth of the range.
[0041] Definition of the noun:
[0042] MusicXML is a standardized file format for digital music score exchange and distribution, providing a universal representation of musical notation.
[0043] Example 1:
[0044] In some embodiments, see Figure 13 This invention proposes a pedal modification method, comprising: S201, acquiring a playback file of a song, wherein the playback file records at least one trigger event, the trigger event including a pedal event; the basic information of the pedal event includes a pedal curve, the pedal curve being used to describe the change relationship of pedal value over time; the pedal curve including a pedal-on segment, a holding segment, and a pedal-off segment; S202, acquiring pedal correction rules, the pedal correction rules including a style correction rule, the style correction rule being obtained through the performance preference of the song, wherein the style correction rule is used to define the pedal-on speed or pedal-off speed, the performance preference including: pedal depth, performer style, or musical style; S203, modifying the pedal curve according to the pedal correction rules to obtain a corrected pedal curve; S204, replacing the corresponding pedal curve in the playback file with the corrected pedal curve.
[0045] In some embodiments, the basic information of the pedal event may also include: pedal time, pedal release time, and at least one pedal depth.
[0046] In some embodiments, the playback file can be a music instruction file, such as a MIDI file, that records performance data generated by a user playing the piano. For example, the playback file may include structured performance data, such as the key identifier, touch time, and duration corresponding to note events; or the timestamp and foot pedal action (pressing down, releasing) corresponding to pedal events. In some embodiments, a MIDI file (Musical Instrument Digital Interface) can be an instruction-type music file. It does not directly store sound waveform data, but records digital instructions related to performance, such as pitch, duration, velocity, timbre selection, pedal control, and tempo. These instructions can be recognized and converted into corresponding sounds by electronic musical instruments, music production software, or automatic playing devices. It has the characteristics of small memory size and flexible editing and modification, and is widely used in the music field.
[0047] Alternatively, the playback file can be any music file that records foot pedal events and note events, such as a MusicXML file.
[0048] In some embodiments, the playback file can be used for direct playback or for repetition (i.e., driving the piano to reproduce the performance process, such as automatically playing according to the playback file). For example, the piano can be driven to repeat the playback file according to the automatic piano playing driving method described in patent application CN120472871A.
[0049] Among them, sensors (such as speed sensors, displacement sensors or acceleration sensors, which can detect the speed, displacement or acceleration of the corresponding pedal being triggered in real time) and / or image acquisition modules (such as cameras) can be used to identify the trigger information of the triggering event (such as the depth of the pedal being pressed).
[0050] In some embodiments, the triggering event may include a note event, a pedal event, etc., which may refer to a complete triggering process of an instrument, such as triggering a piano key (or pressing a piano key) or triggering a pedal (or pressing a pedal). In some embodiments, a pedal event may refer to the complete process from the start of pressing the pedal to the complete release of the pedal.
[0051] In some embodiments, pedal correction rules refer to rules that adjust pedal values (or pedal depth) to correct pedal data so that the pedal data is more compatible with the playback file.
[0052] In some embodiments, the pedal correction rules may also include a sustain correction rule. For example, the sustain duration of the pedal curve may be adjusted based on the user's individual pedaling habits or playing level.
[0053] For example, style correction rules can be obtained by selecting at least one rule combination from a preset rule base.
[0054] In some embodiments, selecting a style correction rule based on the performance preference of the score may include: obtaining the performance preference of at least one score; selecting at least one rule corresponding to the performance preference from a preset rule library to combine and obtain a style correction rule; wherein, in the preset rule library, each performance preference corresponds to at least one rule.
[0055] For example, if a user inputs their preferred musical style (i.e., a performance preference) as Romantic, then a rule can be matched from the rule base based on Romantic style (e.g., Romantic style typically corresponds to slower pedal speeds) as a style correction rule. Correspondingly, the pedal speed can be appropriately reduced based on this style correction rule. Alternatively, if the user prefers a deeper pedal depth (i.e., a performance preference), then a rule can be matched from the rule base based on deeper pedal depth (e.g., deeper pedal depth typically corresponds to faster pedal speeds) as a style correction rule. Correspondingly, the pedal speed can be appropriately increased based on this style correction rule.
[0056] In some embodiments, performance preferences define a user's preference for different pedal pressing methods. Pedal depth can define the user's preferred pedal pressing depth. For example, some users (such as beginners) may not fully understand the function of the pedals and therefore may press too shallowly, resulting in low pedal speed. Performer style defines the user's preferred pedal pressing method for a particular performer. For example, different performer styles correspond to different types of pedal data (such as pedal speed, release speed, or pedal depth preference), and the user can select the corresponding type of pedal data based on their preferred performer style. Musical style defines the user's preferred musical style. For example, for the same piece of music, a user can freely choose to play in a more lyrical style or a more upbeat style. Furthermore, different pedal pressing methods can be set for different musical styles (such as providing recommended numerical ranges for pedal speed, release speed, or pedal depth). Romantic styles typically require slower pedaling (i.e., slower pedaling speed) to utilize resonance to create a full, lyrical tone.
[0057] In some embodiments, the pedaling segment, holding segment, and releasing segment (e.g., length, height, slope, etc.) can be modified according to the pedal correction rules to obtain a corrected pedal curve.
[0058] In some embodiments, the corrected pedal curve can be connected to the uncorrected original pedal curve to generate a continuous pedal curve. In some embodiments, a method for visualizing performance data as described in patent CN120833765A can be used to generate pedal curves on the score to improve the smoothness and completeness of pedal data display and optimize the user experience. Alternatively, please see... Figure 1 Alternatively, a pedal curve can be plotted directly based on multiple pedal values at consecutive timestamps to reflect the pedaling motion. The horizontal axis represents the timestamp, and the vertical axis represents the pedal value (i.e., the depth of the pedal being pressed down at the corresponding time point). Figure 1In the diagram, the larger the vertical axis, the deeper the pedal is depressed. A gradually increasing vertical axis over time corresponds to the pedal-pressing phase, where the pedal is depressed; a gradually decreasing vertical axis over time corresponds to the pedal-releasing phase, where the pedal is released; and a very small fluctuation in the vertical axis over time corresponds to the sustain phase, where the pedal remains depressed (usually the stage where sustained notes are needed in a performance).
[0059] It should be understood that dividing the pedal curve into pedaling, holding, and releasing segments allows for relatively independent style adjustments based on different stages of the pedaling action (for example, only pedaling speed can be increased, or only releasing speed can be increased), improving the adaptability of pedal data to user habits or preferences.
[0060] The applicant noted that different users have different habits or preferences regarding pedal operation. For example, some users prefer rapid pedaling and releasing; some prefer slow pedaling and releasing; some prefer rapid pedaling and slow releasing; and some prefer slow pedaling and rapid releasing. To address this, this embodiment utilizes performance preference selection style correction rules to locally modify the pedal curves (such as pedal speed) and release speed. This transforms highly abstract musical preferences into corresponding speed parameters (such as increasing or decreasing pedal speed) and visual lines (such as visually steepening or softening the pedal segment of the pedal curve). This allows users to achieve the desired performance effect without controlling the pedals, significantly lowering the barrier to piano playing. In other words, by locally modifying pedal data within a specific range, the correction pressure can be reduced, and the actual performance effect can be reflected.
[0061] It should be noted that in this embodiment, the purpose of correcting the pedal data is to guide the execution effect, rather than to perfectly reproduce the actual pedal details from a data perspective. Instead, the applicant notes that by locally correcting key intervals, not only can the correction pressure be reduced, but also by adjusting key expressive elements such as the sound extension, timbre blending, and musical breathiness affected by the pedals (these expressive elements are affected by pedal speed, release speed, etc.), the user can perceive relatively obvious performance characteristics (such as feeling stylistic differences) through auditory effects. In other words, this local correction reduces the difficulty of correction and is compatible with human auditory perception. That is to say, this invention proposes a restrictive pedal style segmentation correction mechanism, which requires selecting style correction rules based on performance preferences. While preserving the basic function of pedal sustain, it avoids regenerating the entire pedal curve (e.g., only replacing the pedal-pressing segment), achieving a good balance between correction efficiency and performance effect. From another perspective, the restrictive pedal segmentation correction mechanism adopted in this invention can also reduce the computational pressure on the computer system to a certain extent. In other words, this restrictive pedal correction mechanism can reduce the difficulty of pedal correction in computer systems to some extent.
[0062] In some embodiments, S203 includes the following steps: S2031, obtaining the pedal segment and correcting the pedal segment to obtain a corrected pedal segment; S2032, obtaining the release segment and correcting the release segment to obtain a corrected release segment; S2033, forming the corrected pedal curve based on the corrected pedal segment, the holding segment, and the corrected release segment.
[0063] In this embodiment, the style correction rule provides an optimal range for the speed of pedaling and releasing, and the pedaling and releasing speeds can be corrected accordingly based on the optimal speed.
[0064] For example, please see Figure 2 , Figures 4-9 , Figures 4-9 Examples of style modifications for the pedaling and releasing phases are shown. Figures 4-9 The horizontal axis represents the timestamp, and the vertical axis represents the foot position (i.e., the depth to which the foot was pressed at the corresponding time point). Figure 4 , Figure 7 These are the original pedal section and the original pedal release section before the correction. Figure 5 , Figure 6 These are two modified pedal segments obtained by modifying the original pedal segment according to different style correction rules, each corresponding to a different type of pedal (e.g., ...). Figure 5It exhibits a linear upward trend, corresponding to crisp and powerful pedaling motions, and is typically found in rhythmically distinctive styles such as modern pop and jazz. Figure 8 , Figure 9 These are two modified loose pedal sections obtained by modifying the original loose pedal section according to different style correction rules. They correspond to different types of loose pedals (such as...). Figure 9 The downward trend in the middle section corresponds to a gentle and slow pedaling motion, and is usually seen in classical, romantic, and other lyrical musical styles.
[0065] In some embodiments, the corrected pedal segment, the holding segment, and the corrected pedal release segment can be connected to form a corrected pedal curve. For example, in some embodiments, taking the correction of the pedal segment as an example, the correction process can be: keeping the maximum pedal value of the pedal segment unchanged, and extending the length of the pedal segment to reduce the pedaling speed.
[0066] In some embodiments, before S204, the method further includes the step S205, which determines whether the time interval corresponding to the modified pedal curve is within the recommended time interval. If yes, step S204 is executed; otherwise, the method returns to S2031 or S2032.
[0067] In this embodiment, two or more corrections can be made until the corrected pedal curve meets the requirements of the recommended time interval.
[0068] In other words, the restrictive pedal style correction mechanism proposed in this invention also includes: verifying the time range covered by the corrected pedal curve (or the start and end times of the pedal curve). When the corrected pedal curve is not within the recommended time range (for example, pressing the pedal when it should not be pressed, or not releasing the pedal when it should be released), it is not recommended to replace the pedal curve with the corrected pedal curve. Instead, return to S2031 or S2032 to readjust the pedal curve until a corrected pedal curve that satisfies both personalized performance preferences and meets the hard time requirements of performance is generated.
[0069] In some embodiments, the playback file further includes: note events. Correspondingly, the method further includes: S206, generating the recommended time interval based on the note events, wherein the basic information of the note events includes: note identifier, trigger time, and release time. It should be understood that generating the recommended time interval based on note events can provide a hard constraint on the rhythm of the music itself for pedal curve correction, so as to avoid or reduce the negative impact of personalized pedal style correction on the clarity of the music structure (such as pressing the pedal in a musical phrase where a sustain effect should not occur, resulting in a poor listening experience).
[0070] In some embodiments, the step of generating the recommended time interval based on the note event includes: obtaining the current chord where the pedal event is located based on the note event; when a chord change occurs between the current chord and its corresponding adjacent chord, obtaining the sounding time point of the adjacent chord; the sounding time point is the end time of the sounding of the chord preceding the current chord, or the sounding time point is the start time of the sounding of the chord following the current chord; generating a recommended start time and / or a recommended end time of the pedal event based on the sounding time point; and generating the recommended time interval based on the recommended start time and / or the recommended end time.
[0071] In some embodiments, the time after the end of the chord preceding the current chord can be used as the recommended start time for the pedal action corresponding to the current chord, and the time before the start of the chord following the current chord can be used as the recommended end time for the pedal action corresponding to the current chord.
[0072] For example, if the current chord A ends at 22 seconds and the chord B following chord A begins at 24 seconds (i.e., the interval between the current chord A and chord B is 2 seconds), then the recommended end time for the pedal event corresponding to the current chord A can be the time between the end of chord A and the beginning of chord B, such as 23 seconds.
[0073] For example, if the current chord A begins at the 22nd second and the preceding chord C ends at the 20th second (i.e., the interval between the current chord A and chord C is 2 seconds), then the recommended start time for the pedal event corresponding to the current chord A can be the time between the start of chord A and the end of chord C, such as the 21st second.
[0074] Furthermore, a recommended time interval can be generated from a set of recommended start and end times corresponding to the current chord. It should be understood that the recommended time interval for the pedal event can, to a certain extent, ensure that the duration of the pedal event conforms to the sounding time of the note event, maintaining a clear and clean sound in the piano performance. Alternatively, determining the recommended time interval for the pedal event based on the chord's end time / start time can reduce the computational burden on the computer system. In some embodiments, the recommended time interval set by this invention is used to limit the start or end point of the pedal curve. In other words, this invention can determine the duration of the corresponding pedal event based on the duration of the current chord.
[0075] In some embodiments, the recommended time interval can also be generated based on the pedal markings. For example, the time interval corresponding to the associated region of a pedal marking can be used as the recommended time interval. The associated region of a pedal marking refers to the range of target notes covered in time by the pedal event corresponding to the pedal marking. For example, a pedal marking may be used to mark a measure, in which case the associated region is the measure containing the pedal marking. Alternatively, a pedal marking may be used to mark a musical phrase, in which case the associated region of the pedal marking is the musical phrase containing the pedal marking. In some embodiments, the associated region corresponding to a pedal marking can be predetermined by the user (e.g., the composer). In some embodiments, pedal markings include at least one of pressing a marking, releasing a marking, or holding a marking.
[0076] In some embodiments, please refer to Table 1, where chord types can be preset to identify chord change nodes in the playback file.
[0077] Table 1:
[0078]
[0079] For example, a section is the sequence of ideographic elements "FCFAC". According to Table 1, this section belongs to the fourth basic group.
[0080] In some embodiments, whether a sequence of ideographic elements belongs to a certain chord type can be determined based on whether it matches. For example, a match can mean that the sequence of ideographic elements is exactly the same as a preset chord type (i.e., an exact match); or it can mean that the similarity between the sequence of ideographic elements and the preset chord type is greater than a preset similarity (e.g., 80%, i.e., a fuzzy match). Furthermore, if the current chord and its corresponding adjacent chord belong to different chord types, it can be considered that a chord change has occurred between the current chord and its corresponding adjacent chord.
[0081] For example, please see Figure 10 The "measure start time" corresponds to key points in chord changes (e.g., measure 7 begins at 24:00; measure 8 begins at 28:00). These time points are chord change nodes. Please refer to [link / reference]. Figure 11 At chord transition nodes (e.g., 24.00, 28.00, 32.00), the pedal "up" (release) action is executed; immediately following at the same time point (e.g., 24.01, 28.01, 32.01), the pedal "down" (press) action is executed. In some embodiments, the duration of the pedal press can be calculated by subtracting the duration of the current "down" (press) action from the duration of the next "up" (i.e., the time corresponding to releasing the pedal).
[0082] It should be understood that chord transformation nodes can be used to identify insertion nodes in both playback files and sheet music files.
[0083] It should be understood that, taking the sustain pedal as an example, its mechanism is: lifting the damper allows the strings to continue vibrating, thereby producing reverberation and resonance. In other words, this invention uses the chord switching point (or chord change node) as the start and end points of the pedal curve. This means that before entering a new chord, the pedal can be released to cut off the residual sound of the previous chord, and then the pedal can be pressed down again to create a new sound effect according to the needs of the new chord. It should be understood that determining the recommended time interval for pedal data based on the chord change node ensures a high degree of consistency between the pedal accompaniment and the logic of the music itself, greatly reducing the complexity of calculating the pedal data insertion node, and avoiding or reducing harmonic confusion caused by misaligned time nodes. Simultaneously, based on the chord change node, the insertion position of the pedal data can be determined more accurately, which helps to synchronize standard pedal data with the actual playing rhythm. In other words, with the synergistic effect of the dual references of the score file and the playback file, a positioning basis that is both standardized and personalized can be provided for pedal data insertion.
[0084] In some embodiments, a long period without any note events can be identified as a silent period, and the start time of the silent period can be used as a recommended end time to avoid unnecessary or unnatural continuous echoes during the silent period when the music is paused. For example, a lively musical phrase ends at t=10.0 seconds, and there are no note events until t=11.5 seconds. When this 1.5-second silent period is identified, a recommended end time interval of t=10.0 seconds can be generated for the pedal events covering this musical phrase, that is, it is recommended to release the pedal before the music stops.
[0085] In some embodiments, the method further includes the steps of: S207, identifying whether the musical phrase covered by the pedal event has a musical phrase boundary; if the determination result of S207 is yes, proceeding to S208; if the determination result of S207 is no, generating a retention suggestion; S208, determining whether a chord change occurs between the musical phrase boundary and the next musical phrase; if the determination result of S208 is yes, generating a retention suggestion for the pedal event; if the determination result of S208 is no, generating a deletion suggestion for the pedal event, wherein the deletion suggestion is used to delete at least a portion of the data of the pedal event. In some embodiments, the deletion suggestion may be used to end the pedal event early, corresponding to releasing the pedal action early, i.e., deleting a portion of the sustaining segment, so that the pedal event has ended before entering the musical phrase boundary.
[0086] In some embodiments, a musical phrase boundary can refer to the dividing point between relatively complete musical segments in a piece of music (such as the boundary between a prelude or a theme). In some embodiments, a musical phrase boundary can be a rest.
[0087] It should be understood that in this embodiment, it can first be determined whether there are musical segment boundaries in the musical segment corresponding to the pedal data. If not, it can be suggested to retain the corresponding pedal event; if there are musical segment boundaries in the musical segment corresponding to the pedal data, it can be suggested to delete the pedal event. This can avoid or reduce the muddy sound of the music caused by improper pedal use, making the segment hierarchy of the musical segment clearer. Alternatively, appropriately suggesting the deletion of pedal events can also remove some potentially redundant or erroneous pedal events, reducing the unnecessary pedal modification computation pressure to a certain extent.
[0088] In some embodiments, the musical segment includes a first sub-segment and a second sub-segment. Correspondingly, S207 includes the steps of: identifying a first effective density of the first sub-segment and a second effective density of the second sub-segment; wherein the first effective density and the second effective density are used to define the effective density of a note (or may also be referred to as note density); when the first effective density is greater than the second effective density, and the difference between the first effective density and the second effective density is greater than a preset change threshold, the second sub-segment is identified as the boundary of the musical segment.
[0089] In some embodiments, effective density can be used to define the number of note events triggered per unit time, which can characterize the tempo of a musical phrase. In some embodiments, the effective density of two sub-segments (such as two musical phrases) within the area covered by the pedal event can be calculated. If the effective density of the two sub-segments differs significantly, it can be considered that there is a significant change in their rhythm, i.e., there is a clear musical phrase boundary. In some embodiments, the higher the note density, the fewer pedal insertion nodes are set. In some embodiments, when a musical phrase (such as a measure) has a large number of notes, i.e., a high note density, the pedaling can be appropriately reduced or avoided to allow for relatively clear intervals between different sounds / voices, thereby making the main melody relatively prominent. Conversely, if the note density is low, the pedaling can be appropriately increased or retained without worrying that the sustain pedal will make the different voices too closely connected, making them difficult to distinguish. In some embodiments, a recommended number of insertions can be given to the user based on the note density, such as recommending a range of 5-8 insertions. The user can choose their desired insertion number from the recommended range.
[0090] In other words, this invention filters the range of inserted nodes based on note density to avoid negative impacts on the playback file caused by too many selected nodes (such as excessive sustain effects leading to muddy sound). It also reduces the difficulty of automatically inserting pedal data. From another perspective, restricting the insertion of pedal data not only helps reduce computational consumption during the insertion process but also effectively reduces the operational complexity of data matching and other steps, thereby significantly reducing the overall difficulty of pedal data insertion and improving the stability and feasibility of the pedal data insertion process.
[0091] In some embodiments, note density can be generated based on valid information of note events. For example, the valid information includes an influence factor, which includes at least one of the following: register position, duration of articulation, and whether it is a root note. Correspondingly, the step of generating note density based on the valid information includes: generating a true count for the note event; when the valid information includes the influence factor, updating the corresponding true count to a weighted count based on the influence factor; and generating the note density of the musical segment based on the weighted count and / or the true count.
[0092] In some embodiments, the note density may not be an absolute number, but may be a weighted number. In some embodiments, the register position may include the high register, low register, middle register, etc.
[0093] In this invention, higher weight is preferably given to bass notes, meaning that pedal use is reduced more cautiously when bass notes are played to prevent sustained bass from masking the melody and harmony in the mid-to-high range, thus compromising the clarity of the music. In some embodiments, for notes of different durations (e.g., long, medium-long, and short notes), higher weight is preferably given to long notes, meaning pedal use is reduced more cautiously when long, sustained notes are played to prevent sustain effects from affecting the listening experience. The root note of a chord is the lowest note in the chord, also known as the fundamental note. In some embodiments, higher weight is preferably given to the root note of a chord, meaning pedal use is reduced more cautiously when the root note is played to ensure the chord's clarity and prevent the root note from mixing with notes not belonging to the same chord, resulting in blurred harmonic properties and affecting the listening experience.
[0094] For example, a musical phrase may contain four notes (such as note A, note B, note C, and note D), and its actual count is 4. For instance, using register position as an influence factor, note A is in the high register (0.8), note B is in the high register (0.8), note C is in the low register (1.2), and note D is in the middle register (1). In this case, the weighted count of the four notes A, B, C, and D is 3.8. For instance, using duration as an influence factor, note A is a long note (1.3), note B is a short note (0.7), note C is a short note (0.7), and note D is a medium-long note (1.1). In this case, the weighted count of the four notes A, B, C, and D is 3.8. For example, if we take whether a note is the root note as an influencing factor (e.g., root note, not root note), note A is the root note and is counted as 1.5, note B is not the root note and is counted as 0.8, note C is not the root note and is counted as 0.8, and note D is the root note and is counted as 1.5. In this case, the weighted count of the four notes A, B, C, and D is 4.6.
[0095] In some embodiments, different weighted counts can be pre-set for different influence factors.
[0096] In some embodiments, when the effective information includes the influence factor, the present invention preferably updates the corresponding true count to a weighted count based on the influence factor. That is, when judging the magnitude of the note density, the present invention considers not only "how many notes are played", but also identifies the notes that need to be focused on in combination with the context of the score, and appropriately increases their "weight" (i.e., weighted count) to calculate a note density that is more in line with the real scene, so as to more accurately identify the boundaries of the musical segment.
[0097] In some embodiments, the method further includes: identifying a user style based on the playback file or the user's historical performance data, wherein the user style includes at least one of the following: pedal speed preference, pedal release speed preference, and pedal node change preference; and selecting or generating the style correction rule based on the user style and the performance preference. The pedal node change preference can be used to define the frequency at which the user presses the pedal within a unit of musical phrase (e.g., a measure). For example, the pedal node change preference could be a preference for frequently pressing / releasing the pedal, or a preference for maintaining the pedal for a long time. In some embodiments, the pedal node change preference can be used to describe the node position at which the user tends to switch pedals. For example, in the user's historical performance data, the time difference between the pedal switching node and the chord change node is usually very small; in this case, the user's pedal node change preference can be considered as "a preference that strictly follows chord changes." In some embodiments, the pedal speed preference can be defined based on the numerical value of the user's pedal speed. For example, if a user's pedal speed is greater than a preset pedal speed value, their pedal speed preference can be considered to be pressing / releasing the pedal quickly; if the user's pedal speed is less than the preset pedal speed value, their pedal speed preference can be considered to be pressing / releasing the pedal slowly. For instance, a user's pedal speed preference can be calculated based on the average pedal speed of the user for the same type of chord (such as one type of chord in Table 1).
[0098] In some embodiments, selecting or generating the style correction rule based on the user style and the performance preference is essentially selecting or generating a compromise pedal style correction rule based on personal habits and target style, so as to achieve a balance between user habits and expected style to a certain extent.
[0099] In some embodiments, selecting or generating style correction rules based on user style and performance preference includes the steps of: obtaining a first reference degree of the user style; obtaining a second reference degree of the performance preference; and selecting or generating the style correction rules based on the first reference degree and the second reference degree and the corresponding user style and performance preference.
[0100] For example, taking the correction of pedal speed preference as an example, the user's preferred pedal speed is a, and the first reference degree is x; the pedal speed obtained according to the performance preference is b, and the second reference degree is y. The style correction rule for the pedal speed can be calculated by ax + by, thereby increasing or decreasing the pedal speed to locally switch the pedal data to a style that takes into account both the user's style and the performance preference.
[0101] It should be understood that selecting or generating style correction rules based on user style, playing preferences, and corresponding reference levels can avoid or reduce user resistance caused by significant changes in pedal style (e.g., "This doesn't sound like me at all"), and instead provide a more natural and user-acceptable pedal style correction experience (e.g., "This is the optimized version I played"). In other words, for different types of users, this compromise pedal correction scheme can make the playing effect both close to the standard template and retain the user's personal characteristics.
[0102] In some embodiments, the first reference degree and the second reference degree can be preset by the user.
[0103] In some embodiments, obtaining a first reference level for the user's style includes: obtaining the user's performance level; and setting the first reference level based on the performance level. In some embodiments, the user's performance level can be filled in or selected by the user. In some embodiments, the higher the performance level, the higher the first reference level; the lower the performance level, the lower the first reference level.
[0104] It should be understood that the lower the playing level, the less skilled the user may be in pedal control, and therefore the more errors they may make. Correspondingly, setting the first reference level lower can avoid or reduce data noise caused by their technical flaws (for example, incorrectly identifying excessively fast pedal release due to insufficient foot control as a user style of releasing the pedal quickly). For users with higher playing levels, "fast pedal release" may be a deliberate playing habit or preference, so a higher reference level can be set for their deliberately pursued user style, allowing the selection or generation of pedal style correction rules to be largely based on their wishes.
[0105] In some embodiments, see Figure 14 This invention provides a pedal modification system, comprising: a playback file acquisition module for acquiring a playback file of a track, wherein the playback file records at least one trigger event, the trigger event including a pedal event; the basic information of the pedal event includes a pedal curve, the pedal curve being used to describe the relationship between pedal value and time; the pedal curve including a pedal-on segment, a holding segment, and a pedal-off segment; a correction rule acquisition module for acquiring pedal correction rules, the pedal correction rules including a style correction rule, the style correction rule being obtained through the performance preference of the track, wherein the style correction rule is used to define the pedal-on speed or pedal-off speed, the performance preference including: pedal depth, performer style, or musical style; a pedal curve correction module for modifying the pedal curve according to the pedal correction rules to obtain a corrected pedal curve; and a pedal curve replacement module for replacing the corresponding pedal curve in the playback file with the corrected pedal curve.
[0106] It should be understood that the foot pedal modification system provided by the present invention can be used to implement any of the embodiments described in the present invention.
[0107] Example 2:
[0108] In some embodiments, see Figure 15 The present invention also provides a method for replacing pedal data in a playback file, comprising: S300, acquiring a playback file of a track, the playback file recording multiple trigger events, the trigger events including pedal events and note events, and the basic information of the pedal events including pedal pressing time, pedal releasing time, and at least one pedal depth, the basic information of the note events including note identifier, trigger time, and release time; S301, acquiring a sheet music file corresponding to the track, the sheet music file including basic information of semantic elements, the basic information including the category and position of the semantic elements, and the category including: note, staff, performance technique mark and / or key signature; S302, generating an insertion node according to the sheet music file and pedal insertion rules, and / or according to the playback file, the pedal insertion rules including: chord rules; S303, selecting replacement pedal data in response to a user selection signal; the selection signal including: specifying a style or specifying a pedal file; S304, inserting the replacement data into the insertion node to form a new playback file.
[0109] In some embodiments, the basic information of a pedaling event can be recorded as a pedaling curve, which describes the relationship between pedaling value and time; the pedaling curve includes: a pedaling segment, a holding segment, and a pedaling release segment.
[0110] In some embodiments, the categories of ideographic elements may also include rests (such as half rests, quarter rests, etc.), accidentals (such as sharps, flats, etc.), dynamic markings (such as crescendos, diminuendos, etc.), and / or structural markings (such as repeats, jumps, etc.). It should be understood that ideographic elements are symbols or graphics in a musical score file that have specific musical meanings. In some embodiments, ideographic elements refer to musical notation symbols, and the position of an ideographic element is used to define the specific way the corresponding ideographic element is expressed in the score (e.g., in which musical phrase it is pronounced).
[0111] In some embodiments, insertion nodes can be generated based on the pedal insertion rules of the score file. Preferably, the pedal insertion rules are chord rules. The chord rules can be implemented with reference to the method described in Embodiment 1 for identifying insertion nodes based on chord change nodes.
[0112] In some embodiments, in addition to the chord rules described in Embodiment 1 (i.e., determining the pedal insertion node based on the chord transformation node), the chord rules may also include: chord function attribute rules, chord consonance rules, etc.
[0113] For example, chord function attribute rules can refer to determining the pedal insertion point based on the chord's functional stability in tonality. For instance, when an unstable chord (such as a dominant seventh or diminished seventh) is detected, a shallower or shorter pedal insertion point is tended to be inserted to preserve the tension of the unstable chord. Conversely, for stable chords (such as tonic chords), a longer-lasting and deeper pedal insertion point is permissible on top of their sustained harmony, creating a fuller, more stable sound. For example, tonic chords typically have higher functional stability, while modulated chords typically have lower functional stability.
[0114] For example, chord consonance rules can adjust the pedal frequency based on the consonance of a chord. For instance, for highly dissonant chords (such as altered chords with numerous augmented or diminished intervals, or superimposed chords), shorter, shallower pedal data can be generated to appropriately reduce the dissonance exacerbated by the reverberation effect produced by the pedal. The functional stability and consonance of a chord within its tonality can be determined based on basic music theory, and will not be elaborated upon here.
[0115] Alternatively, the pedal insertion rules can also include: positional rules and quantity rules. Quantity rules refer to the constraints imposed by the musical style on the number of pedal movements used, i.e., the limit on the number of nodes that can be inserted using pedal data in that musical style. For example, the Baroque style typically requires less use of pedal data (e.g., only allowing 3 insertion nodes out of 12 variations) to ensure separation and clarity of each voice as much as possible; conversely, the Romantic style typically requires more use of pedal data (e.g., allowing 8 insertion nodes out of 12 variations) to create a rich harmonic atmosphere and abundant sonic resonance. Further, in some embodiments, when less pedal use is required (e.g., in the Baroque style), the pedal movement is preferably placed in special positions such as a full cadence (e.g., at the end of a phrase or movement, a brief pedal movement can increase the resonance and solemnity of the ending), a half cadence, or the end of an important phrase (e.g., when a complete musical idea is stated). Alternatively, in some embodiments, when a long note lasting several measures appears in the bass voice, the pedal can be pressed at the beginning of the long note. Alternatively, in other embodiments, the setting preference for the foot pedal action position (i.e., the node position) can be determined by the user. In some embodiments, the position rules include: a staccato rule, wherein when the pitch difference between the two notes before and after the changed node is greater than a preset pitch level, the changed node is designated as the first insertion node; and / or a bass rule, wherein when the pitch of the next lower part after the changed node is lower than a preset pitch threshold, the duration of the lower part is higher than a preset duration threshold, and the note density of the upper part is greater than a preset density threshold, the changed node is designated as the first insertion node.
[0116] In some embodiments, the position rule refers to the restriction imposed by the style of the music on the insertion position of the pedal data node. That is, when the change node satisfies the position rule, the present invention preferably uses the change node as the insertion node. Taking the staccato rule as an example, if there is a large leap of more than an octave in the chord, such as from low C to high G, pedal data can be inserted between these two notes. By increasing the pedal connection, the smoothness of the performance can be improved, which helps to avoid the disjointed sound caused by the inability to connect the fingering. Taking the bass rule as an example, if there is a bass note that lasts for a long time (such as a duration higher than a preset duration threshold) in a musical passage (such as the pitch of the lower voice being lower than a preset pitch threshold), and there are many high notes (such as the note density of the upper voice being greater than a preset density threshold), the corresponding change node can be used as the insertion node (such as inserting a faster, shallower pedal data segment) to maintain the continuity of the bass note while providing basic resonance for the dense high notes.
[0117] In some embodiments, S302 includes the steps of: selecting a pedal insertion rule for the score file according to performance preferences, the performance preferences including: pedal depth, performer style or musical style; and selecting the insertion node in the score file according to the pedal insertion rule.
[0118] In some embodiments, different pedal insertion rules can be preset for different performance preferences. Taking musical style as an example, if the performance preference is Baroque, which does not require too much pedal data, more pedal insertion rules can be applied to suggest deleting more pedal insertion nodes, or in other words, to limit the use of pedal data. If the performance preference is Romantic, which requires more pedal data, fewer pedal insertion rules can be applied to suggest retaining more pedal insertion nodes.
[0119] In some embodiments, S302 includes the step of generating the insertion node based on the location of the foot stomp event.
[0120] In other words, the insertion node can be selected either based on the foot pedal insertion rules in the sheet music file or directly based on the position of the foot pedal event in the playback file. Alternatively, in some embodiments, the insertion node can be generated directly from the playback file, such as based on the position of the foot pedal event in the playback file. For example, the position of the foot pedal event can be determined directly based on the user's annotations in the playback file (e.g., "Remember to step on the pedal here") or based on the timestamp of the user actually stepping on the pedal, thus using the position of the foot pedal event as the insertion node.
[0121] In some embodiments, the user's selection signal is used to define the user's desired pedal data replacement, such as specifying the style of the pedal data (e.g., romantic style) or specifying a pedal file (e.g., a live version of a musician's pedal data from a concert). Preferably, the original pedal data of the inserted node can be deleted, and then the replacement data corresponding to the inserted node can be inserted into the inserted node to form a new playback file.
[0122] In this embodiment, the present invention also proposes a batch pedal data replacement mechanism. Specifically, at the generated insertion node, the original pedal data is overwritten (or completely replaced) with replacement data. Users can quickly apply new, stylistically consistent pedal data to the entire playback file of a song, greatly improving the efficiency of music production, teaching assistance, and performance analysis. For example, the original pedal effect of an etude can be replaced with a jazz style with a single click. Furthermore, since the replacement data (whether specifying a style or a specific file) has a consistent internal style, the replaced playback file maintains a high degree of stylistic coherence and consistency.
[0123] In some embodiments, S302 includes the following steps: S3021, generating a simulated node for a current pedal event, wherein the simulated node is set to have a first probability value, and the first probability value is an initial setting value; S3022, generating a second probability value for the simulated node according to the sheet music file and the pedal insertion rule; S3023, generating a recommended probability value for the simulated node according to the first probability value and / or the second probability value; S3024, when the recommended probability value is greater than a preset first probability threshold, then using the simulated node as the insertion node.
[0124] In this embodiment, the present invention sets simulated nodes for the pedal events in the playback file and calculates their corresponding recommended probability values to filter out the best insertion nodes that conform to the score rules and the user's skill level, rather than directly using the node positions where the original pedal data in all playback files are located. This effectively avoids the problem that the replacement data may not match the original playback file due to possible deviations between the standard performance information (i.e., the corresponding score file) and the actual performance data (i.e., the corresponding playback file). In other words, this method can recalculate better insertion nodes to adapt to the new style when the user specifies a pedal style that differs significantly from the original style. That is to say, the present invention can determine whether to generate an insertion node by combining the user's own performance data (i.e., the playback file) and the professional guidance of the score file (such as standardized pedal insertion rules). If the recommended probability value is high, it can be determined that pedal data can be inserted at that position.
[0125] The initial settings can be preset based on the user's historical performance data or the performance status of the currently playing file.
[0126] In some embodiments, S302 further includes the steps of: obtaining the user's performance score; and generating a corresponding initial setting value based on the performance score. For example, if the user's performance score is high, a higher initial setting value can be generated.
[0127] For example, a high performance score calculated based on a user's historical performance data (such as the number of mistakes) may indicate a high level of performance, suggesting that the user's pedaling movements are a conscious artistic expression rather than a mistake. In this case, a higher initial setting value can be set to fully consider the user's existing pedal insertion nodes. Conversely, a low performance score may indicate numerous problems in the user's performance, suggesting that the existing pedal insertion nodes may contain errors. Therefore, a lower initial setting value can be generated, reducing reliance on the user's past habits and relying more on the professional rules in the score in subsequent decisions.
[0128] In some embodiments, a second probability value can be generated for the simulated node based on the score file and the pedal insertion rules. For example, the simulated node (or the second insertion node) can be matched to the corresponding node position in the score file (or the first insertion node), and the cumulative score of the first insertion node can be determined according to at least one pedal insertion rule. For example, if the first insertion node is located at a chord change point, conforms to the chord rules, and scores 1 point; and if the musical phrase in which the first insertion node is located has a pedal mark, it also scores 1 point. Therefore, the cumulative score of the first insertion node can be calculated to be 2 points.
[0129] In some embodiments, the higher the cumulative score of the first insertion node, i.e. the more foot insertion rules are satisfied, the greater the corresponding second probability value.
[0130] In some embodiments, the average of the first probability value and the second probability value can be used as the recommended probability value. Alternatively, in some embodiments, one of the first probability value and the second probability value can be directly used as the recommended probability value. For example, if one probability value is much lower than the usual probability, the other probability value can be directly used as the recommended probability value. Alternatively, in some embodiments, the user can preset the weights of the first probability value and the second probability value, calculate a weighted sum based on the first probability value, the second probability value, and their corresponding weights, and use this weighted sum as the recommended probability value.
[0131] In some embodiments, when the recommended probability value of a candidate simulated node is high, the simulated node can be used as the insertion node. In other words, pedal events and note events are highly correlated. Therefore, when a user selects a specified style or a specified pedal file, this invention preferably re-evaluates the rationality of the pedal event position, rather than simply using or completely clearing it. This ensures, to a certain extent, that the replacement data not only meets the requirements of the score but also satisfies personalized performance needs, while maintaining perfect synchronization with note events.
[0132] In some embodiments, the first probability threshold can be preset by the user. For example, if the user wants to retain as many insertion nodes as possible corresponding to their foot stomping events, they can set a lower first probability threshold.
[0133] In some embodiments, S302 further includes the step of: when the second probability value is lower than a preset second probability threshold and greater than or equal to a third probability threshold, proceeding to the step of: identifying the current musical phrase of the current pedal event; identifying at least one similar musical phrase similar to the current musical phrase; obtaining reference pedal data of the similar musical phrase; when there is similar pedal data similar to the current pedal data in the reference pedal data, generating or updating the first probability value according to the frequency of occurrence of the similar pedal data.
[0134] In some embodiments, when the second probability value is in the middle range of neither high nor low, it is possible to further analyze the musical structure patterns within the same piece of music and use the experience of repeated occurrences in other similar sections to assist in decision-making, thereby more intelligently adjusting the initial evaluation (i.e., the first probability value) of the simulated node.
[0135] For example, if reference pedal data for similar musical passages appears repeatedly in multiple similar passages, it may indicate that the corresponding pedal handling is a common practice for that piece of music, or a deliberate attempt by the user. In this case, the first probability value can be appropriately increased to make an insertion node decision that is more in line with the actual situation. Alternatively, for example, if most users use similar pedal handling methods at corresponding positions in similar musical passages, then the insertion node is likely to be retained.
[0136] It is important to note that professional sheet music files often contain multiple chapters. Similarly, a complete playback file also has a large file size. Furthermore, the execution of pedal movements is often determined by multiple factors, such as general pedal rules, user habits, or playing level. Therefore, the large data volume and high uncertainty of sheet music and playback files pose significant challenges to the computer's automatic replacement / modification process. To address this, this invention proposes a probabilistic optimization mechanism based on musical phrase similarity. When the process of deciding whether to insert a simulated node is in an uncertain range, the recurring patterns in similar musical phrases can be used to determine whether to retain the simulated node. This helps calculate a more accurate recommendation probability value. Additionally, from another perspective, this probabilistic optimization mechanism can also reduce the computational burden on the computer system to some extent. In other words, this mechanism can reduce the difficulty of calculating the recommendation probability for the computer system (e.g., providing more reasonable retention or deletion suggestions when a decision is difficult to make).
[0137] In some embodiments, the step of identifying at least one similar musical phrase similar to the current musical phrase includes: acquiring at least one other musical phrase; identifying the chord similarity of the chord sequences of the current musical phrase and the other musical phrase; and identifying the other musical phrase as the similar musical phrase when the chord similarity is greater than a preset chord similarity threshold. In some embodiments, the chord similarity can be determined based on the percentage overlap of the semantic element sequences of the current musical phrase and the other musical phrase. For example, if the current musical phrase has 5 notes (e.g., "GBDFA"), and the other musical phrase has 4 notes and the note order is exactly the same as the current musical phrase (e.g., "CBDFA"), then the percentage of overlap is 80%, in which case the chord similarity can be considered high, and the corresponding other musical phrase can be identified as a similar musical phrase.
[0138] In some embodiments, the method further includes the steps of: identifying the trigger position of the current pedal data in the current musical phrase; identifying whether there is corresponding reference pedal data in the similar musical phrase at the trigger position, and if so, identifying the reference pedal data as similar pedal data. In some embodiments, the trigger position may be a beat position. For example, the trigger position in the current musical phrase may refer to the beat at which the user pedals. Correspondingly, it can be identified whether there is corresponding reference pedal data at the corresponding beat position in the similar musical phrase. Preferably, the similarity between the pedal speed, pedal depth peak value, or duration of the similar pedal data and the pedal speed, pedal depth peak value, or duration of the current pedal data is greater than a preset similarity. For example, taking duration as an example, the time difference between the durations of the similar pedal data and the current pedal data is less than a preset time difference.
[0139] In some embodiments, S3023 includes the step of: when the second probability value is less than the third probability threshold, generating the recommended probability value based on the second probability value.
[0140] In some embodiments, if the second probability value is small (which may indicate a typical user error, and the corresponding simulated node is not reasonably suitable as an insertion node), it may be recommended to directly delete the corresponding insertion node. For example, when the second probability value is small, it can be directly used as the recommended probability value to avoid the decision being influenced by the initial setting value in user error scenarios (e.g., if the initial setting value is too large, the corresponding calculated recommended probability value will be too large). For example, typical user error scenarios may include: not releasing the pedal after a new chord has sounded, causing the sounds of two different chords to be forcibly mixed (or what could be called harmonic pollution); stepping on the pedal at a clear rest or the end of a musical phrase, disrupting the breath and syntax of the music (or what could be called structural damage); and continuously using a heavy pedal in passages that require extreme clarity (such as Baroque fugues or Classical allegro) (or what could be called functional contradiction).
[0141] In summary, this invention also provides a hierarchical insertion node selection mechanism. Specifically, when the second probability value is within the middle range, it is preferable to further generate or update the first probability value based on the frequency of similar pedal data occurrences (i.e., determining whether to retain the corresponding insertion node). This allows the system to learn the user's personalized pedal usage habits or the specific performance requirements of the piece, thus achieving a better balance between user personalization and basic accuracy. Alternatively, when the second probability value is low, it can be directly used as the recommended probability value. This avoids or reduces the unreasonable retention of obviously erroneous insertion nodes, ensuring the basic accuracy of the output results while significantly reducing system computational overhead (e.g., initiating high-consumption similar pedal data analysis for obviously erroneous insertion nodes).
[0142] In some embodiments, when the second probability value is large, a larger recommended probability value may be generated to suggest retaining the corresponding inserted node. For example, please refer to [link to relevant documentation]. Figure 3 In this process, analog node 1 can be deleted, analog node 2 can be retained, and analog node 3 can be retained in the playback file 7 to obtain the corresponding deleted node 4, inserted node 5, and inserted node 6. In some embodiments, foot pedal data of a specified version / file can be inserted into inserted node 5 and inserted node 6 according to the user's selection signal to obtain a new playback file 8.
[0143] The piano playing community is very broad, including children, adults, and the elderly; some are physically able, while others have disabilities. Among these pianists, some may, for various reasons, be unable to reach the pedals or lack the strength to do so. If the pedals cannot be reached or the appropriate strength is not provided, the quality of the piano playing or the quality of the repetition is often poor. Additionally, some pianists may feel that their pedal control is insufficient and wish to directly use the pedal data of others (such as teachers) during performances or recordings. To address these issues, the method proposed in this invention will be illustrated below with specific embodiments:
[0144] In some embodiments, the present invention proposes a real-time foot pedal accompaniment method, in which the user can set to enable automatic foot pedal accompaniment mode in the operation interface: select the MusicXML file (i.e. the corresponding sheet music file) corresponding to the current song, and select the operation type (specify style or specify foot pedal file).
[0145] MusicXML files can be used to structure and transmit musical score elements (such as notes, clefs, performance technique markings, key signatures, etc.). SPMID files are a playback file format used to record a complete stream of trigger events from a piano performance with high fidelity. They contain actual triggered note events (such as key duration) and pedal events (such as pedal depth).
[0146] Please see Figure 10 XML_note_info is a structured information object about a single ideographic element that is parsed and extracted from a MusicXML file. It typically includes standard information such as the corresponding key identifier (i.e., the corresponding pitch) and the duration of the key press (i.e., the corresponding note value).
[0147] spmid_note_info is a structured information object about a single ideographic element that is parsed and extracted from the spmid file. It typically includes real-time information such as the corresponding key identifier (i.e., the corresponding pitch) and the duration of the key press (i.e., the corresponding note value).
[0148] Please see Figure 11 The `pedal_action` refers to the pedal event record, or pedal event record. It typically includes the triggering action (such as pressing down or releasing the pedal) and the corresponding timestamp.
[0149] touch_info typically includes the pedal depth and the corresponding timestamp. mcu_timestamp usually marks the precise moment on the timeline when each event (such as a note event or pedal event) occurred.
[0150] In some embodiments, after selecting a pedal style accompaniment, the content of the specified MusicXML file is parsed into a structured data block XML_note_info with a specified format. Then, based on chord transformation rules, all pedal press / release events and their corresponding times are organized and recorded in the pedal_action data structure from the XML_note_info. After the accompaniment begins, the real-time note matching and analysis processing module starts collecting key information (i.e., corresponding note events) in real time and uses this information to search and match with the information in XML_note_info to find the position in MusicXML corresponding to the current playing progress. After finding the position in MusicXML corresponding to the current playing progress, the pedal_action data for the corresponding time point is found. Based on the pedal style specified by the user and the length of time the corresponding pedal_action is pressed (i.e., the recommended time interval), pedal data of the specified style is generated.
[0151] In some embodiments, after selecting a specified accompaniment file, the content of the specified MusicXML file is parsed into a structured data block XML_note_info in a specified format. Then, according to the chord transformation rules, all pedal press / release events and their corresponding times are organized and recorded in the pedal_action data structure. For each pedal press event in pedal_action, the corresponding pedal curve data in the touch_info structure is located in the spmid file, mapped and stored, and will be used later after the accompaniment begins. The basic method for locating in the spmid file is to use the note features (in XML_note_info) of the pedal to be located in pedal_action to sequentially search in spmid_note_info. The search matching rules can be exact matching or fuzzy matching. After the accompaniment begins, the real-time note matching analysis and processing module begins to collect key information in real time and uses this information to search and match with the information in XML_note_info to find the position in MusicXML corresponding to the current playing progress. After finding the location in MusicXML corresponding to the current playing progress, we can find the time point corresponding to the pedal_action, and thus find the foot pedal curve data of the touch_info structure corresponding to that time point that was previously mapped and stored.
[0152] In some embodiments, users can record accompaniment without using the pedals, directly using a specified pedal style, and generate a repeatable piano playback file in that pedal style. Alternatively, in some embodiments, during the recording process, users can record accompaniment without using the pedals, and after recording, directly use existing pedal data (such as data recorded by a teacher or celebrity) to generate a repeatable piano playback file containing that pedal data. In some embodiments, if the user selects a specific pedal style, they can specify one of the following: pedal depth (clean, saturated, etc.), performer style, or musical style (Japanese rock, classical, pop, etc.).
[0153] In some embodiments, this invention proposes a real-time pedal accompaniment system, comprising: a user interface, a MusicXML file structure processing module, a spmid file structure processing module, a search and matching algorithm module, an existing spmid file pedal data extraction module, a real-time note matching and analysis processing module, a pedal data generation module, a note parsing and playback control module, a PID motion control algorithm (Proportional, Integral, Differential, i.e., a control algorithm combining proportional, integral, and derivative elements) module, and a motor. The MusicXML file structure processing module parses the MusicXML file into a data structure, XML_note_info, that facilitates software search and matching. XML_note_info contains the complete note sequence and start / end times from the MusicXML file; this information is used to match (including precise matching and fuzzy matching) the spmid_note_info note data information from the spmid file. The spmid file structure processing module reads the data from the spmid file into memory to facilitate search and matching with XML_note_info during pedal accompaniment. The search and matching algorithm module extracts the XML_note_info and spmid_note_info files. For each pedal press event in pedal_action, it locates the corresponding pedal curve data in the touch_info structure from the spmid file and maps and stores it. The basic method for locating from the spmid file is to use the note features following the pedal to be located in pedal_action (in XML_note_info) to sequentially search in spmid_note_info. The search and matching rules can be exact matching or fuzzy matching. The existing spmid file pedal data extraction module copies the corresponding pedal note curve data (mainly temporal positioning) from the specified spmid file to the touch_info structure after note matching and location are completed. The real-time note matching analysis module detects which key was pressed and for how long after it was pressed when the player starts playing. After the piano obtains the timing of the key presses, it searches and compares the timing of the most recent keys (e.g., 6 or 4) with the XML_note_info generated by MusicXML to determine the current playing progress and its corresponding time on the score. The pedal data generation module is used to adjust the touch data of pedal pressing or releasing using different curves, such as gentle or forceful.The note analysis and playback control module controls the foot pedal motor, ensuring that the key position is at the corresponding position (touch depth) at each point's mcu_timestamp. This process can be controlled by a PID motion control algorithm. The motor is a physical motion unit, such as a drive device. For example, the motor can use the drive mechanism described in patent CN120783708B to drive the foot pedal.
[0154] In some embodiments, see Figure 16 The present invention also provides a system for replacing pedal data in a playback file, comprising: a first acquisition module for acquiring a playback file of a track, the playback file recording multiple trigger events, the trigger events including pedal events and note events, and the basic information of the pedal events including pedal pressing time, pedal releasing time, and at least one pedal depth, the basic information of the note events including note identifier, trigger time, and release time; a second acquisition module for acquiring a sheet music file corresponding to the track, the sheet music file including basic information of semantic elements, the basic information including the category and position of the semantic elements, and the category including: note, clef, performance technique mark and / or key signature; a node module for generating an insertion node according to the pedal insertion rules of the sheet music file and / or the playback file, the pedal insertion rules including at least one chord rule; a response module for selecting replacement pedal data in response to a user selection signal, the selection signal including: specifying a style or specifying a pedal file; and a replacement module for inserting the replacement data into the insertion node to form a new playback file. It should be understood that the system for replacing pedal data in a playback file provided by the present invention can be used to implement any of the embodiments described in the present invention.
[0155] In some embodiments, this application also provides a schematic block diagram of the structure of a computer device, please see... Figure 12 Computer programs can be used in situations such as Figure 12 It runs on the computer device shown. Figure 12 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The memory may include non-volatile storage media and internal memory. The non-volatile storage media may store an operating system and computer programs. The computer programs include program instructions that, when executed, cause the processor to perform arbitrary methods. The processor provides computational and control capabilities to support the operation of the entire computer device. The internal memory provides an environment for the execution of the computer programs in the non-volatile storage media; when executed by the processor, these programs cause the processor to perform arbitrary methods. The network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 12 The structures shown are merely block diagrams of a portion of the structure related to the present application and do not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figures, or combine certain components, or have different component arrangements. It should be understood that the processor may be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0156] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0157] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a computer terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention. The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art, under the guidance of the present invention, can make many other forms without departing from the spirit and scope of the claims of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A method for modifying a foot pedal, characterized in that, include: S201, Obtain the playback file of the track. The playback file records at least one trigger event, including a pedal event. The basic information of the pedal event includes a pedal curve, which describes the relationship between the pedal value and time. The pedal curve includes a pedal-pressing segment, a holding segment, and a pedal-release segment. S202, Obtain pedal correction rules, the pedal correction rules include: style correction rules, the style correction rules are obtained through the performance preferences of the piece, wherein the style correction rules are used to define the pedal speed or the speed of releasing the pedal, and the performance preferences include: pedal depth, performer style or musical style. S203, Modify the pedal curve according to the pedal correction rule to obtain the corrected pedal curve; S204, replace the pedal curve corresponding to the playback file with the corrected pedal curve.
2. The method according to claim 1, characterized in that, S203 includes the following steps: S2031, Obtain the pedal segment, and modify the pedal segment to obtain the modified pedal segment; S2032, Obtain the loose pedal section, and correct the loose pedal section to obtain a corrected loose pedal section; S2033, the corrected pedal curve is formed according to the corrected pedaling segment, the maintaining segment, and the corrected pedal releasing segment.
3. The method according to claim 2, characterized in that, Before S204, the following steps are also included: S205, determine whether the time interval corresponding to the modified pedal curve is within the recommended time interval. If yes, proceed to step S204; otherwise, return to S2031 or S2032.
4. The method according to claim 3, characterized in that, The playback file also includes: note events; correspondingly, the method also includes: S206, Generate the recommended time interval based on the note event, wherein the basic information of the note event includes: note identifier, trigger time, and release time.
5. The method according to claim 4, characterized in that, The steps for generating the recommended time interval based on the musical note event include: The current chord to which the pedal event is located is obtained based on the note event; When a chord change occurs between the current chord and its corresponding adjacent chord, the sounding time point of the adjacent chord is obtained; the sounding time point is the end time of the sounding of the chord located before the current chord, or the sounding time point is the start time of the sounding of the chord located after the current chord. Generate a recommended start time and / or recommended end time for the foot pedal event based on the sound emission time. The recommended time interval is generated based on the recommended start time and / or the recommended end time.
6. The method according to claim 4, characterized in that, The steps for generating the recommended time interval based on the musical note event include: Identify whether the foot pedal event has entered a silent period, wherein the silent period is a period in which no note event occurs and the duration is longer than a preset silent duration; If so, then generate the recommended end time based on the silent period, and generate the recommended time interval based on the recommended end time.
7. The method according to claim 1, characterized in that, It also includes the following steps: S207, Identify whether the musical phrase covered by the foot pedal event has a musical phrase boundary; If the result of S207 is yes, proceed to S208; if the result of S207 is no, generate a retention suggestion. S208, determine whether a chord change occurs between the boundary of the musical phrase and the next musical phrase; If the judgment result of S208 is yes, then a retention suggestion is generated for the foot pedal event; If the judgment result of S208 is negative, a deletion suggestion is generated for the pedal event, and the deletion suggestion is used to delete at least part of the data of the pedal event.
8. The method according to claim 7, characterized in that, The musical phrase includes a first sub-phrase and a second sub-phrase; correspondingly, S207 includes the following steps: Identify the first effective density of the first sub-section and the second effective density of the second sub-section; wherein the first effective density and the second effective density are used to define the effective density of the notes; When the first effective density is greater than the second effective density, and the difference between the first effective density and the second effective density is greater than a preset change threshold, the second sub-segment is identified as the segment boundary.
9. The method according to claim 1, characterized in that, Also includes: The user style is identified based on the playback file or the user's historical performance data. The user style includes at least one of the following: pedal speed preference, pedal release speed preference, and pedal node change preference. The style correction rule is selected or generated based on the user's style and performance preferences.
10. A foot pedal modification system, characterized in that, include: The playback file acquisition module is used to acquire the playback file of the track. The playback file records at least one trigger event, which includes a pedal event. The basic information of the pedal event includes a pedal curve, which describes the relationship between the pedal value and time. The pedal curve includes a pedal-pressing segment, a holding segment, and a pedal-release segment. The correction rule acquisition module is used to acquire pedal correction rules, which include style correction rules. The style correction rules are obtained through the performance preferences of the piece. The style correction rules are used to define the pedal speed or the speed at which the pedal is released. The performance preferences include pedal depth, performer style or musical style. The pedal curve correction module is used to modify the pedal curve according to the pedal correction rules to obtain a corrected pedal curve; The pedal curve replacement module is used to replace the corresponding pedal curve in the playback file with the corrected pedal curve.