A sensor-based air pressure calibration method
By adding independent sensors to electronic instruments, detecting changes in ambient air pressure and performing air pressure calibration, the error problem caused by the air pressure sensor during environmental changes is solved, and more accurate audio output is achieved.
Patent Information
- Application Number
- CN202211032249.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-26
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-08-26
AI Technical Summary
Because the air pressure sensor in electronic musical instruments is sensitive to ambient air pressure and temperature, the air pressure does not return to zero when the external environment changes, resulting in inaccurate air pressure data, which in turn causes sound distortion or pronunciation when it should not be pronounced.
The independent sensor detects the air pressure change in the environment, calculates the air pressure difference value, and calibrates the air pressure value of the pronunciation sensor based on the difference value to obtain the volume loudness value, and then adjusts the note volume during playing.
In the case of a small amount of cost, the calibration algorithm avoids errors caused by the ambient air pressure or temperature changes of the pronunciation sensor, making the pronunciation of the electronic instrument more accurate.
Smart Images

Figure CN115440179B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of air pressure calibration, and particularly to an air pressure calibration method based on a sensor. Background Art
[0002] Electronic musical instruments use air pressure sensors to convert the air pressure signals of blowing and sucking into electrical signals, thereby controlling the waveform digital streams of various real musical instruments collected in advance. After processing, an audio electrical signal is formed, which is amplified by power and then sounds through a speaker.
[0003] For electronic musical instruments such as electronic harmonicas and electric wind instruments, due to changes in the external environment (such as environmental factors like altitude and temperature, which cause errors due to the impact on the environmental air pressure), the air pressure of the air pressure sensor does not return to zero, resulting in inaccurate air pressure data detected, and thus causing sound distortion or the instrument sounding when it should not. This is because the air pressure sensor is sensitive to air pressure and temperature. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the present invention compares the air pressure detected by an independent sensor with a preset air pressure to obtain an air pressure difference, calibrates and calculates the air pressure value of the sound - producing sensor according to the air pressure difference to obtain a volume loudness value, and adjusts the note volume during performance according to the volume loudness value.
[0005] The technical solution adopted by the present invention is: an air pressure calibration method based on a sensor includes the following steps:
[0006] After the electronic musical instrument is powered on and before playing music, the sound - producing sensor and the independent sensor detect and collect the air pressure value of the pressure - building air chamber of the instrument in the current environment.
[0007] Step 1: Collect the air pressure value of the pressure - building air chamber in the current environment through the sound - producing sensor and the independent sensor to obtain the current air pressure values of the sound - producing sensor and the independent sensor;
[0008] Step 2: Calculate the change rate of the current air pressure value of the independent sensor with respect to the default value of the independent sensor;
[0009] Furthermore, the change rate formula = (the current air pressure value of the independent sensor - the default value of the independent sensor) / the default value of the independent sensor;
[0010] Step 3: Adjust the default value of the sound - producing sensor proportionally according to the change rate of the independent sensor to obtain the reference default value of the sound - producing sensor;
[0011] Step 4: Calculate the difference between the current air pressure value of the pronunciation sensor and the reference default value of the pronunciation sensor, and quantify the difference to 1 - 256 to obtain a difference quantization value. The quantization method is as follows: According to the empirical values of the experiment, if the difference exceeds the range of 256, set a quantization coefficient and scale it down proportionally to make it within the range of 1 - 256. If the data still exceeds 256, calculate it as 256. The following will no longer elaborate on this quantization method; Compare the quantized difference (difference quantization value) with the pronunciation threshold.
[0012] Further, the pronunciation threshold = 10.
[0013] Step 5: Look up the volume loudness value through the volume correspondence table with the difference quantization value, and send the volume loudness value to the microprocessor. The microprocessor adjusts the note volume during performance according to the volume loudness value.
[0014] Further, the difference between the current air pressure value of the pronunciation sensor and the reference default value of the pronunciation sensor and the volume correspondence table are as follows:
[0015]
[0016]
[0017]
[0018] Among them, 1 - 256 represents the difference between the current air pressure value of the pronunciation sensor and the reference default value of the pronunciation sensor, and is quantified to a value between 1 - 256. 0x07 - 0x7f represents the volume loudness value.
[0019] Further, several groups of pronunciation sensors are provided;
[0020] Both the pronunciation sensor and the independent sensor are air pressure sensors of the same model. The number of pronunciation sensors is determined by the type of musical instrument. For example, the number of pronunciation sensors of an electronic harmonica can be set to more than 10, while the number of pronunciation sensors of an electronic wind instrument can be 1.
[0021] Advantages of the present invention:
[0022] 1. Adding an independent sensor in an electronic musical instrument can, with a small increase in cost, avoid errors caused by the air pressure or temperature of the environment in the pronunciation sensor through a calibration algorithm, making the pronunciation of the electronic musical instrument more accurate. Brief Description of the Drawings
[0023] Figure 1 is a flowchart of the air pressure calibration method based on sensors of the present invention;
[0024] Figure 2 is a schematic structural diagram of an electronic wind instrument of the present invention. Detailed Embodiments
[0025] The present invention will be further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner. Therefore, it only shows the components related to the present invention.
[0026] Take Figure 2 the electric wind instrument as an example to illustrate the relationship between the independent sensor and the sound - generating sensor. It should be noted and clarified that: the musical instruments are not exhaustive, and as long as the independent sensor is used to calibrate the method of the present invention, it is within the protection scope of the present invention; there is an independent sensor built - in the electric wind instrument. The cavity where the pressure - building air chamber for measurement is not airtight and is in communication with the outside world. Its air pressure data is read by the micro - processor. When there are environmental changes outside, its air pressure data will also change to a certain extent, and this data change can be detected and saved; the sound - generating sensor converts the blowing and sucking air pressures of the pressure - building chamber into volume. When the micro - processor processes the normal sound - generating sensor data, it needs to use the change amount of the independent sensor to obtain the volume value of the sound - generating sensor, so that the sound - generating sensor data can be relatively accurate and reliable. Both the independent sensor and the sound - generating sensor are air pressure sensors and are electrically connected to the micro - processor.
[0027] For example Figure 1 as shown, a method for calibrating air pressure based on sensors includes the following steps:
[0028] Step 1: Collect the air pressure values of the pressure - building air chamber in the current environment through the sound - generating sensor and the independent sensor to obtain the current air pressure values of the sound - generating sensor and the independent sensor.
[0029] Before playing after the electric wind instrument is turned on, the air pressure values collected by the sound - generating sensor and the independent sensor under the current environmental temperature and air pressure conditions are 6250 and 5500 respectively.
[0030] Step 2: Calculate the change rate of the current air pressure value of the independent sensor and its default value.
[0031] In the micro - processor, the default values of the first and independent sensors are set to 5600 and 5000 respectively.
[0032] The change rate of the independent sensor=(5500 - 5000) / 5000 = 10%, that is, the change rate is an increase of 10%.
[0033] Step 3: Adjust the default value of the sound - generating sensor proportionally according to the change rate to obtain the reference default value of the sound - generating sensor.
[0034] The reference default value of the sound - generating sensor = 5600*(1 + 10%) = 6160;
[0035] Step 4: Compare the difference between the current air pressure value of the pronunciation sensor and the reference default value of the pronunciation sensor with the air pressure difference threshold of the pronunciation sensor;
[0036] Assume that the quantization coefficient is 1. The current air pressure value of the pronunciation sensor - the reference default value of the pronunciation sensor = 6250 - 6160 = 90. Then the quantized value of the difference is 90, that is, the difference quantization value = 90;
[0037] Assume that the pronunciation threshold is 10. Since 90 > 10, step 5 is continued; if the difference quantization value is less than the pronunciation threshold, no processing is performed;
[0038] Step 5: Obtain the volume loudness value according to the difference quantization value in step 4 and the volume correspondence table, and send the volume loudness value to the microprocessor. The microprocessor adjusts the volume output during performance according to the volume loudness value;
[0039] Obtain from Table 1 that the volume loudness value corresponding to the difference quantization value of 90 is 0x31, corresponding to decimal 49. Send the volume loudness value to the microprocessor. When the electronic wind instrument performs, after the microprocessor is externally connected to the speaker, adjust the output note volume of the speaker according to the volume loudness value of 49.
[0040] Table 1 The correspondence table between air pressure difference and volume loudness value is as follows:
[0041]
[0042]
[0043]
[0044] An independent sensor is added to the electronic musical instrument of the present invention. With a small increase in cost, through the calibration algorithm, the error caused by the air pressure or temperature of the environment in the pronunciation sensor can be avoided, making the pronunciation of the electronic musical instrument more accurate.
[0045] Inspired by the ideal embodiments of the present invention described above, through the above description, relevant staff can completely make various changes and modifications without departing from the technical idea of the present invention. The technical scope of the present invention is not limited to the content in the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A sensor-based air pressure calibration method, characterized in that, an independent sensor is built inside the electric wind instrument. The cavity where the pressure-building air chamber for measurement is located is not airtight and communicates with the outside world; the air pressure data of the pressure-building air chamber is read by the microprocessor; the pronunciation sensor converts the blowing and sucking air pressures of the pressure-building air chamber into volume; when the microprocessor processes the data of the normal pronunciation sensor, it needs to use the change amount of the independent sensor to obtain the volume value of the pronunciation sensor. Both the independent sensor and the pronunciation sensor are air pressure sensors and are electrically connected to the microprocessor; the air pressure calibration method includes the following steps: Step 1.1: Collect the air pressure value of the pressure-building air chamber in the current environment through the pronunciation sensor and the independent sensor to obtain the current air pressure values of the pronunciation sensor and the independent sensor; Step 1.2: Calculate the change rate of the current air pressure value of the independent sensor and the default value of the independent sensor; The calculation formula of the change rate is: change rate = (current air pressure value of the independent sensor - default value of the independent sensor) / default value of the independent sensor; Step 1.3: Adjust the default value of the pronunciation sensor proportionally according to the change rate to obtain the reference default value of the pronunciation sensor; Step 2.1: Calculate the difference between the current air pressure value of the pronunciation sensor and the reference default value of the pronunciation sensor, and quantify the difference to obtain the difference quantization value, and compare the difference quantization value with the pronunciation threshold of the pronunciation sensor; When the difference quantization value > the pronunciation threshold of the pronunciation sensor, execute Step 2.2; if the difference quantization value < the pronunciation threshold of the pronunciation sensor, no processing is performed; Step 2.2: Look up the difference quantization value in the volume correspondence table to obtain the volume loudness value, and send the volume loudness value to the microprocessor. The microprocessor adjusts the note volume during performance according to the volume loudness value.
2. The sensor-based air pressure calibration method according to claim 1, characterized in that: the pronunciation threshold is set to 10.
3. The sensor-based air pressure calibration method according to claim 1, characterized in that, several groups of pronunciation sensors are provided.
Citation Information
Patent Citations
Volume adjusting apparatus and volume adjusting method
CN101625868A
Digital harmonica
CN111599330A