Piano keyboard pressure compensation method based on double-contact time difference threshold
By using a calibration method based on the time difference threshold of two contacts, the problems of inconsistent calibration and mechanical error in digital piano keyboards are solved, achieving efficient and simple consistency in keyboard pressure response, which is applicable to the production and maintenance of various digital pianos.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-03-13
AI Technical Summary
Existing electric piano keyboard calibration technology suffers from significant mechanical structural errors, poor calibration consistency, and cumbersome software compensation processes, making it difficult to adapt to time drift caused by mechanical wear and component aging.
A calibration method based on the time difference threshold of two contacts is adopted. By calculating the mean and percentage difference of the contact time, compensation is directly based on the time difference, avoiding conversion algorithm bias and digital quantization loss, and simplifying the calibration process.
It improves the consistency of pressure response across the entire keyboard, reduces the impact of mechanical structural errors, simplifies calibration operations, and lowers labor costs and maintenance complexity, making it suitable for the production and upgrading of digital pianos at different price points.
Smart Images

Figure CN121662004A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention generally relate to the field of electric piano manufacturing calibration technology, and more particularly to a piano keyboard pressure compensation method based on a dual-contact time difference threshold. Background Technology
[0002] The core performance and user experience of a digital piano depend on the accuracy of its key pressure sensing and the consistency of each key's response. This characteristic directly determines the precise control of volume and timbre during performance. Currently, digital pianos generally employ dual-contact sensing technology for force detection. This technology works by placing two contacts with a fixed height difference below each key. When a key is pressed, the two contacts conduct sequentially, creating a time difference. The system uses this time difference to reflect the original pressure applied to the key, thus providing a basis for adjusting key performance. The ultimate goal is to achieve uniform pressure response across the entire keyboard, meeting the tactile requirements of both professional performance and everyday use.
[0003] However, existing pressure calibration technologies for digital piano keyboards still have significant shortcomings. First, current calibration schemes often directly convert the time difference between the two contacts into a force value during the initial testing phase, with subsequent calibrations based on this conversion. However, factors such as mechanical friction between different keys and differences in the elasticity of contact components can lead to actual deviations in the conversion coefficient. Furthermore, digital quantization processing can cause a loss of accuracy in the original data, ultimately affecting calibration accuracy. Second, during the manufacturing process, machining errors in the mechanical structure of the keys, such as the push rod height and contact spacing, directly cause the time difference between the two contacts of each key to deviate from the standard range. However, current technology lacks a quantitative calibration step based on the absolute value of the time difference, relying excessively on the initial force value conversion result for adjustment. This makes it difficult to accurately correct deviations caused by mechanical errors, resulting in poor consistency of keys within the same batch of products. In addition, software-level compensation technology requires pre-storing a large amount of standard force value data. The correction process involves multiple steps, which not only lacks real-time performance but also makes the standard database prone to failure when the key mechanical structure wears down or components age, causing time difference drift. This necessitates re-collecting and recalibrating all keyboard data, making the operation cumbersome and inefficient. Summary of the Invention
[0004] To address the above issues, the core logic of this invention, which calculates and compensates for time differences, avoids the accuracy loss caused by conversion algorithm deviations and digital quantization processing, significantly reduces the impact of mechanical structure errors on calibration results, and optimizes the consistency of full keyboard pressure response.
[0005] According to an embodiment of the present invention, a piano keyboard pressure compensation method based on a dual-contact time difference threshold is provided.
[0006] In a first aspect of the invention, a method for piano keyboard pressure compensation based on a two-touch time difference threshold is provided. The method includes: Step S01: Install two contacts under each key of the electric piano to be calibrated; Step S02: The electric piano mainboard is powered on and enters calibration mode. The pressure device is ready to press the button according to the set pressure. Step S03: The motherboard continuously detects the key status to determine if any key is pressed. If no key is pressed, it continues to detect the key status. Step S04: If a key is pressed, determine whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Step S05: The computer-side detection software calculates the average contact time of the white keys and / or black keys, and calculates the percentage difference between the contact time of each white key and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds the set threshold. Step S06: If the percentage difference does not exceed the set threshold, the computer-side detection software will send the percentage difference to the keyboard scanning plate for storage and execution to complete the calibration.
[0007] Furthermore, of the two contacts mentioned in step S01, one contact is installed above the key travel and the other contact is installed below the key travel.
[0008] Furthermore, the pressure device mentioned in step S02 is a servo electric cylinder, and the crossbar of the servo electric cylinder presses down on multiple buttons at once to generate the same pressure.
[0009] Furthermore, step S03, before determining whether a key is pressed, also includes determining whether a function key is pressed. The specific steps are as follows: The motherboard continuously detects the key status to determine whether a function key is pressed. If no function key is pressed, it continues to detect whether a key is pressed. If a function key is pressed, it determines whether it is a save function key. If it is a save function key, it checks whether the percentage difference of each key exceeds a set threshold. If any key exceeds the threshold, the save operation is prohibited. If all keys do not exceed the threshold, the percentage difference is written to the keyboard scanning board. If the pressed key is not a save function key, it determines whether it is an erase function key. If it is an erase function key, the percentage difference stored in the keyboard scanning board is erased. If it is not an erase function key, it continues to detect the key status.
[0010] Furthermore, the formula for calculating the average contact time of the contacts under the white and / or black keys in step S05 is as follows: Mean contact time of white keys ,in, The total number of white keys. For the first A white key, For the first Contact time of each white key's contact point; Mean contact time of black keys ,in, This represents the total number of black keys. For the first A black key. For the first Contact time of each black key's contact point; The formula for calculating the percentage difference between the contact time of each white and / or black key and the mean, as described in step S05, is as follows: No. Percentage difference between white bonds:
[0011] No. Percentage difference between black keys: .
[0012] Furthermore, the average contact time of the white key and / or black key mentioned in step S05 is calculated by repeatedly performing the pressure device pressing operation and statistically analyzing the average contact time of the white key / black key contacts multiple times.
[0013] Furthermore, the step S05, which involves determining whether to send the difference percentage to the keyboard scanning board based on whether the difference percentage exceeds a set threshold, specifically involves: if the difference percentage of any white key and / or black key exceeds the set threshold, a reminder for manual adjustment is issued; if the difference percentage of all white keys and / or black keys does not exceed the set threshold, the difference percentage is sent to the keyboard scanning board.
[0014] In a second aspect of the invention, an apparatus for piano keyboard pressure compensation based on a two-touch time difference threshold is provided. The apparatus includes: Contact mounting module: used to install two contacts under each key of the digital piano to be calibrated; Calibration preparation module: Used for powering on the electric piano motherboard and entering calibration mode, and for the pressure device to prepare to press the button according to the set pressure. Key press detection module: Used by the motherboard to continuously detect the key status and determine whether a key is pressed. If no key is pressed, the key status detection continues. Black / White Key Detection Module: Used to determine whether a key is pressed and whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Compensation calculation module: used by the computer-side detection software to calculate the average contact time of the white and / or black keys, and to calculate the percentage difference between the contact time of each white and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds a set threshold. Compensation execution module: If the percentage difference does not exceed the set threshold, the computer-side detection software sends the percentage difference to the keyboard scanner for storage and execution to complete the calibration.
[0015] In a third aspect of the invention, an electronic device is provided. The electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the program to implement the method according to a first aspect of the invention.
[0016] In a fourth aspect of the invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method according to a first aspect of the invention.
[0017] The core logic of this invention, which calculates and compensates for time differences, avoids the accuracy loss caused by conversion algorithm deviations and digital quantization processing, significantly reduces the impact of mechanical structure errors on calibration results, and optimizes the consistency of full keyboard pressure response.
[0018] It should be understood that the description in the Summary of the Invention is not intended to limit the key or essential features of the embodiments of the present invention, nor is it intended to restrict the scope of the invention. Other features of the invention will become readily apparent from the following description.
[0019] The beneficial effects of this invention are: 1. The core logic of calculating the time difference and using the time difference for compensation is adopted. The quantitative comparison is directly based on the conduction time difference of the two contacts. This avoids the algorithm deviation and digital quantization loss caused by the conversion of force value in the initial detection stage of existing technologies, greatly reduces the impact of mechanical structure error on calibration results, and significantly improves the consistency of full keyboard pressure response. 2. Using percentage difference for compensation reduces the delay caused by multi-step conversion processes. For time difference drift caused by mechanical wear and component aging, compensation parameters can be quickly adjusted directly based on time difference data without the need to re-collect full keyboard force data, thus extending the stable service life of the device. 3. During production calibration, the time difference threshold is used as a clear standard, making mechanical structure adjustments more targeted, replacing traditional experience-based operations, and reducing labor costs and calibration cycles; during later maintenance, there is no need for complicated force value calibration procedures, and core calibration can be completed simply through time difference detection, which is simple to operate, more efficient, and reduces user usage and maintenance costs. 4. It is compatible with the existing dual-contact hardware structure of digital pianos, without the need to add complex sensing components. The modification is simple and the cost is controllable. It can be widely used in the production calibration and upgrading of old equipment for digital pianos of different grades, and has both technical feasibility and market promotion value. Attached Figure Description
[0020] The above and other features, advantages, and aspects of the various embodiments of the present invention will become more apparent from the accompanying drawings and the following detailed description. Wherein: Figure 1 A flowchart of a method for piano keyboard pressure compensation based on a dual-touch time difference threshold according to an embodiment of the present invention is shown; Figure 2 A flowchart according to an embodiment of the present invention is shown; Figure 3 A block diagram of a piano keyboard pressure compensation device based on a dual-touch time difference threshold according to an embodiment of the present invention is shown. Figure 4 A schematic diagram of a piano keyboard pressure compensation device based on a dual-contact time difference threshold according to an embodiment of the present invention is shown. Detailed Implementation
[0021] 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, and 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.
[0022] According to an embodiment of the present invention, a piano keyboard pressure compensation method based on a dual-contact time difference threshold is proposed. The core logic of calculating the time difference and using the time difference for compensation avoids the accuracy loss caused by conversion algorithm deviation and digital quantization processing, significantly reduces the impact of mechanical structure error on calibration results, and optimizes the consistency of the full keyboard pressure response.
[0023] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments.
[0024] Figure 1 This is a schematic flowchart of a piano keyboard pressure compensation method based on a dual-contact time difference threshold according to an embodiment of the present invention. The method includes: Step S01: Install two contacts under each key of the electric piano to be calibrated; Step S02: The electric piano mainboard is powered on and enters calibration mode. The pressure device is ready to press the button according to the set pressure. Step S03: The motherboard continuously detects the key status to determine if any key is pressed. If no key is pressed, it continues to detect the key status. Step S04: If a key is pressed, determine whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Step S05: The computer-side detection software calculates the average contact time of the white keys and / or black keys, and calculates the percentage difference between the contact time of each white key and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds the set threshold. Step S06: If the percentage difference does not exceed the set threshold, the computer-side detection software will send the percentage difference to the keyboard scanning plate for storage and execution to complete the calibration.
[0025] It should be noted that although the operation of the method of the present invention has been described in a specific order in the above embodiments and figures, this does not require or imply that the operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0026] To provide a clearer explanation of the piano keyboard pressure compensation method based on the dual-contact time difference threshold, a specific embodiment will be used for illustration below. However, it is worth noting that this embodiment is only for better illustrating the present invention and does not constitute an improper limitation of the present invention.
[0027] The following example will further illustrate the piano keyboard pressure compensation method based on a dual-contact time difference threshold: This embodiment uses an 88-key digital piano as an example. This digital piano contains 52 white keys and 36 black keys.
[0028] Step S01: Install two contacts under each key of the electric piano to be calibrated.
[0029] Specifically, the first contact is installed above the key travel, and the second contact is located below the key travel.
[0030] Step S02: The mainboard of the electric piano is powered on and enters the calibration mode. The pressure device is ready to press the button according to the set pressure.
[0031] The pressure device is a servo electric cylinder, which ensures that pressing down the crossbar once produces the same pressure on multiple buttons, with different pressure applied to the white and black buttons.
[0032] In this implementation example, the downward pressure of the black key of the servo electric cylinder is set to 5. The downward pressure of the white bond is 4. .
[0033] Step S03: The motherboard continuously monitors the key status to determine if any keys are pressed. If no keys are pressed, it continues to monitor the key status.
[0034] Specifically, before determining if a key is pressed, it is necessary to determine if a function key is pressed. If no function key is pressed, the process continues to determine if a key is pressed. If a function key is pressed, it is determined if it is a save function key. If it is a save function key, it is checked whether the percentage difference of each key exceeds a set threshold. If any key exceeds the threshold, the save operation is prohibited. If all keys do not exceed the threshold, the percentage difference is written to the keyboard scanner. If the key pressed is not a save function key, it is determined whether it is an erase function key. If it is an erase function key, the percentage difference stored in the keyboard scanner is erased. If it is not an erase function key, the key status is checked again.
[0035] Step S04: If a key is pressed, determine whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software.
[0036] Step S05: The computer-side detection software calculates the average contact time of the white and / or black keys, and calculates the percentage difference between the contact time of each white and / or black key and the average. Based on whether the percentage difference exceeds a set threshold, it determines whether to send the percentage difference to the keyboard scanning board.
[0037] In this embodiment, the threshold is set to ±15%.
[0038] Calculate the mean contact time of the contacts: Mean contact time of white keys ,in, The total number of white keys. For the first A white key, For the first Contact time of each white key's contact point; Mean contact time of black keys ,in, This represents the total number of black keys. For the first A black key. For the first The contact time of each black key's contact point.
[0039] Calculate the percentage difference of single bonds: No. Percentage difference between white bonds:
[0040] No. Percentage difference between black keys: .
[0041] To reduce errors, the pressure device was repeatedly pressed down, and the average contact time of the white / black keys was calculated multiple times to determine the percentage difference.
[0042] If the percentage difference between any white key and / or black key exceeds a set threshold, a reminder for manual adjustment will be issued; if the percentage difference between all white keys and / or black keys does not exceed the set threshold, the percentage difference will be sent to the keyboard scanner.
[0043] Step S06: If the percentage difference does not exceed the set threshold, the computer-side detection software will send the percentage difference to the keyboard scanning plate for storage and execution to complete the calibration.
[0044] In this embodiment, the contact time and percentage difference data of the white keys are shown in Table 1, and the mean contact time of the white keys is... : Table 1
[0045] Table 2 shows the contact time and percentage difference data for the black keys. The mean contact time of the black keys is... : Table 2
[0046] The computer-based testing software identified the following piano keys that exceeded the threshold: white keys: 1, 2, 32, 33, 34; black keys: 1, 2, 23. The software displayed a red warning, indicating that the key errors were too large and manual adjustment was required.
[0047] Based on the same inventive concept, this invention also proposes a device for piano keyboard pressure compensation based on a dual-contact time difference threshold. The implementation of this device can be found in the implementation of the method described above; repeated details will not be elaborated further. Figure 3 As shown, the device 100 includes: Contact mounting module: used to install two contacts under each key of the digital piano to be calibrated; Calibration preparation module: Used for powering on the electric piano motherboard and entering calibration mode, and for the pressure device to prepare to press the button according to the set pressure. Key press detection module: Used by the motherboard to continuously detect the key status and determine whether a key is pressed. If no key is pressed, the key status detection continues. Black / White Key Detection Module: Used to determine whether a key is pressed and whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Compensation calculation module: used by the computer-side detection software to calculate the average contact time of the white and / or black keys, and to calculate the percentage difference between the contact time of each white and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds a set threshold. Compensation execution module: If the percentage difference does not exceed the set threshold, the computer-side detection software sends the percentage difference to the keyboard scanner for storage and execution to complete the calibration.
[0048] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0049] like Figure 4 As shown, the device includes a central processing unit (CPU), which can perform various appropriate actions and processes based on computer program instructions stored in read-only memory (ROM) or loaded from storage units into random access memory (RAM). The RAM can also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.
[0050] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0051] The processing unit executes the various methods and processes described above, such as method steps S01 to S06. For example, in some embodiments, method steps S01 to S06 may be implemented as a computer software program tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of method steps S01 to S06 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute method steps S01 to S06 by any other suitable means (e.g., by means of firmware).
[0052] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload programmable logic devices (CPLDs), and so on.
[0053] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0054] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0055] Furthermore, although the operations are described in a specific order, this should be understood as requiring that such operations be performed in the specific order shown or in sequential order, or requiring that all illustrated operations be performed to achieve the desired result. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the invention. Certain features described in the context of individual embodiments may also be implemented in combination in a single implementation. Conversely, various features described in the context of a single implementation may also be implemented individually or in any suitable sub-combination in multiple implementations.
[0056] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for piano keyboard pressure compensation based on a dual-contact time difference threshold, characterized in that, The method includes: Step S01: Install two contacts under each key of the electric piano to be calibrated; Step S02: The electric piano mainboard is powered on and enters calibration mode. The pressure device is ready to press the button according to the set pressure. Step S03: The motherboard continuously detects the key status to determine if any key is pressed. If no key is pressed, it continues to detect the key status. Step S04: If a key is pressed, determine whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Step S05: The computer-side detection software calculates the average contact time of the white keys and / or black keys, and calculates the percentage difference between the contact time of each white key and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds the set threshold. Step S06: If the percentage difference does not exceed the set threshold, the computer-side detection software will send the percentage difference to the keyboard scanning plate for storage and execution to complete the calibration.
2. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, The two contacts mentioned in step S01, one of which is installed above the key travel and the other of which is installed below the key travel.
3. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, The pressure device mentioned in step S02 is a servo electric cylinder. The crossbar of the servo electric cylinder presses down on multiple buttons at once to generate the same pressure.
4. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, Before determining whether a key is pressed in step S03, a function key press determination is also included. The specific steps are as follows: The motherboard continuously detects the key status to determine whether a function key is pressed. If no function key is pressed, it continues to detect whether a key is pressed. If a function key is pressed, it determines whether it is a save function key. If it is a save function key, it checks whether the difference percentage of each key exceeds a set threshold. If any key exceeds the threshold, the save operation is prohibited. If all keys do not exceed the threshold, the difference percentage is written to the keyboard scan board. If the pressed key is not a save function key, it determines whether it is an erase function key. If it is an erase function key, the difference percentage stored in the keyboard scan board is erased. If it is not an erase function key, it continues to detect the key status.
5. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, The formula for calculating the average contact time of the white and / or black keys in step S05 is as follows: Mean contact time of white keys ,in, The total number of white keys. For the first A white key, For the first Contact time of each white key's contact point; Mean contact time of black keys ,in, This represents the total number of black keys. For the first A black key. For the first Contact time of each black key's contact point; The formula for calculating the percentage difference between the contact time of each white and / or black key and the mean, as described in step S05, is as follows: No. Percentage difference between white bonds: No. Percentage difference between black keys: .
6. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, The average contact time of the white key and / or black key mentioned in step S05 is calculated by repeatedly performing the pressure device pressing operation and statistically analyzing the average contact time of the white key / black key contacts multiple times.
7. The method for piano keyboard pressure compensation based on a dual-contact time difference threshold according to claim 1, characterized in that, The step S05, which determines whether to send the difference percentage to the keyboard scanning board based on whether the difference percentage exceeds the set threshold, specifically means: if the difference percentage of any white key and / or black key exceeds the set threshold, a reminder for manual adjustment is issued; if the difference percentage of all white keys and / or black keys does not exceed the set threshold, the difference percentage is sent to the keyboard scanning board.
8. A device for piano keyboard pressure compensation based on a dual-contact time difference threshold, characterized in that, The device implements the method as described in any one of claims 1 to 7, comprising: Contact mounting module: used to install two contacts under each key of the digital piano to be calibrated; Calibration preparation module: Used for powering on the electric piano motherboard and entering calibration mode, and for the pressure device to prepare to press the button according to the set pressure. Key press detection module: Used by the motherboard to continuously detect the key status and determine whether a key is pressed. If no key is pressed, the key status detection continues. Black / White Key Detection Module: Used to determine whether a key is pressed and whether it is a white key. If it is a white key, the motherboard collects the contact time of each white key and sends it to the computer detection software; if it is a black key, the motherboard collects the contact time of each black key and sends it to the computer detection software. Compensation calculation module: used by the computer-side detection software to calculate the average contact time of the white and / or black keys, and to calculate the percentage difference between the contact time of each white and / or black key and the average value. It determines whether to send the percentage difference to the keyboard scanning board based on whether the percentage difference exceeds a set threshold. Compensation execution module: If the percentage difference does not exceed the set threshold, the computer-side detection software sends the percentage difference to the keyboard scanner for storage and execution to complete the calibration.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1 to 7.