A method for identifying string instrument playing movements and playing grades
Through multi-channel string signal acquisition devices and signal processing technology, the problems of complexity and low accuracy in string instrument playing recognition are solved, and low-cost, high-precision playing data acquisition is achieved, which is suitable for playing error correction, performance recording and remote teaching.
Patent Information
- Application Number
- CN202211150986.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-21
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2042-09-21
AI Technical Summary
In the existing technology, string instrument playing recognition methods are complex, costly, have low recognition accuracy, and high latency. They cannot be effectively run on embedded MCUs or single-chip microcomputers, and the recognition accuracy is insufficient in noisy environments.
A multi-channel string signal acquisition device is used, including an analog signal acquisition module, a signal amplification module, a multi-channel analog-to-digital conversion module and an operation module. By identifying the electrical signal generated by the vibration of the strings, combined with time domain and frequency domain data processing, the fundamental frequency value is calculated to identify the playing action and quality.
It provides a simple, low-cost recognition solution, improves recognition accuracy, reduces computing power requirements, and realizes real-time and accurate acquisition of playing data. It is suitable for playing error correction, performance recording, composition and remote teaching.
Smart Images

Figure CN115691455B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of musical instruments, and in particular to a method for identifying playing actions and playing grades of string instruments. Background Art
[0002] With the advancement of science and technology and people's pursuit of artistic life, various technologies to assist in learning to play musical instruments have emerged.
[0003] The guitar is a popular instrument among young people. To make it easier for beginners to learn guitar, new guitars have emerged that can detect guitar playing movements and provide error correction. Guitar chord detection typically involves using a terminal (such as a mobile phone or computer) to capture the guitar sound through a microphone, or using a sound card to capture the waveform of a piezoelectric pickup. The collected data is then subjected to envelope detection. After time-domain and frequency-domain conversion, the extracted harmonic component information is converted into a chromatogram. This is then compared with the pitch class profile (PCP) of each chord to ultimately determine the correct chord.
[0004] However, due to the need for Pitch Class Profile (PCP) matching, the recognition algorithm is complex and requires high storage space and computing power on the terminal, making it impossible to run on embedded MCUs or single-chip microcontrollers. Furthermore, products that use microphones to pick up sound for chord recognition often have an accuracy rate of less than 80% in quiet environments and are virtually impossible to recognize in loud ambient noise or human voices. Summary of the Invention
[0005] Based on this, it is necessary to propose a method for identifying the playing movements and playing frets of string instruments to solve the problems of complex detection methods, high costs, low recognition accuracy, high delay, and inability to detect specific frets when identifying the playing of string instruments.
[0006] A method for identifying playing movements and playing quality of a string instrument. The string instrument includes a body and a multi-channel string signal acquisition device and a signal processing device disposed on the body. The body includes a nut and strings mounted on the nut. The multi-channel string signal acquisition device is disposed below the strings and near the nut. A strong magnetic magnet is disposed on each channel of the multi-channel string signal acquisition device. The multi-channel string signal acquisition device includes an analog signal acquisition module. The signal processing device includes a signal amplification module, a multi-channel analog-to-digital conversion module, a calculation module, and a communication module. The method includes the following steps:
[0007] The analog signal acquisition module collects the electrical signal generated by the vibration of the string cutting the magnetic field lines of the strong magnetic magnet and outputs an analog signal;
[0008] The signal amplification module filters, amplifies and biases the analog signal and then outputs a DC signal;
[0009] The multi-channel analog-to-digital conversion module samples the DC signal and converts it into a digital signal;
[0010] The operation module operates the digital signal and outputs the detection result;
[0011] The communication module sends the detection results to the terminal.
[0012] Preferably, the multi-channel string signal acquisition device is arranged at a distance of 2 cm-5 cm from the nut, the strings are mounted on the nut and extend across the multi-channel string signal acquisition device, and the distance between the multi-channel string signal acquisition device and the strings is 1 mm-2 mm.
[0013] Preferably, the step of the operation module operating the digital signal and outputting the detection result includes the following steps:
[0014] Identify plucking movements on the strings;
[0015] Detect time domain data;
[0016] Convert time domain data into frequency domain data;
[0017] Calculate the fundamental frequency value using time domain data and frequency domain data;
[0018] A frequency information table for each fret of a string instrument is established based on the standard interval relationship of the string instrument, and the string and fret corresponding to the fundamental frequency value are obtained by a table lookup method.
[0019] Preferably, the step of identifying the playing action on the strings comprises the following steps:
[0020] According to the open string vibration frequency Freq of each string, the number of sampling points SP required for two vibration cycles is calculated;
[0021] Continuously compare SP sampling values, find the maximum value SVmax and the minimum value SVmin, and calculate the current signal amplitude Samp = SVmax-SVmin;
[0022] Compare the current signal amplitude Samp with the previous signal amplitude Samp_last, calculate the difference Samp_delta = Samp - Samp_last, and determine whether the current signal amplitude is increasing or decreasing;
[0023] If the signal amplitude increases, the number of times the signal increases continuously is recorded. If the signal amplitude decreases, the current signal is judged based on the change in signal amplitude to determine whether it is generated by the user plucking the string or by other interference factors and marked.
[0024] Preferably, the step of determining whether the current signal is generated by the user plucking the string or by other interference factors and marking the current signal comprises the following steps:
[0025] Establish a magnetic field line energy leakage ratio table;
[0026] The signal that rebounds slightly during the decay process is marked as a non-plucked signal;
[0027] The signal whose number of consecutive increases is greater than or equal to 4 is marked as a resonance signal;
[0028] The signal whose number of consecutive increases is less than 4 and whose amplitude is less than the corresponding value in the magnetic field energy leakage ratio table is marked as a leakage signal;
[0029] The signal whose number of consecutive increases is less than 4 and is greater than the corresponding amplitude in the magnetic field energy leakage ratio table is marked as a signal of a new user plucking action.
[0030] Preferably, the step of detecting time domain data includes the following steps:
[0031] Calculate the maximum value SVmax and the minimum value SVmin found by continuously comparing SP sampling values in the step of identifying the playing action on the strings;
[0032] The peak points are detected in real time to obtain the time difference between the peak points and calculate the peak period data.
[0033] Preferably, the step of converting the time domain data into frequency domain data comprises the following steps:
[0034] The two acquisition data groups are packaged into 1024 sampling data and then fast Fourier transform is performed to convert the time domain data into frequency domain data FFT_Data
[512] .
[0035] Preferably, the step of calculating the fundamental frequency value using the time domain data and the frequency domain data includes the following steps:
[0036] Traverse the calculation results of the fast Fourier transform of the collected data, find the point with the largest amplitude FFT_max, and calculate the maximum frequency max_amp_freq through the frequency-amplitude mean formula;
[0037] Detect signal validity;
[0038] Detect harmonics;
[0039] Combine the time domain and frequency domain to calculate the final basic frequency final_basic_freq.
[0040] Preferably, the method for identifying string instrument playing movements and playing quality further comprises the following steps:
[0041] For signals marked as leaked signals, the final basic frequency final_basic_freq is compared with the frequencies detected by other strings. If the frequencies are consistent, the signal is confirmed to be a leaked signal and discarded.
[0042] For a signal marked as a new user string plucking action signal, the found string number and fret information are sent to the terminal and the marking status is cleared;
[0043] When it is detected that the fret of the current string number has changed, and there is no new user plucking action marked, and the difference between the current fret value and the previous fret value is less than or equal to 2, it means that a slide action has occurred, and the string number, slide direction, current fret value, and previous fret value information are sent to the terminal.
[0044] The method for identifying the playing action and playing quality of a string instrument provided by the present invention comprises the following steps: collecting the electrical signal generated by the string vibrating when the string cuts the magnetic field lines of a strong magnetic magnet and outputting an analog signal; filtering, amplifying and biasing the analog signal and then outputting a DC signal;
[0045] The DC signal is sampled and converted into a digital signal; the digital signal is calculated and the test results are output, which are then sent to the terminal. To address the current problems of low accuracy and high latency in string instrument performance detection, this system provides a simple, convenient, and low-cost solution. This allows users to obtain a set of performance detection tools at a reasonable price, accurately capturing their performance data in real time. This tool can be widely used in scenarios such as performance correction, performance recording, music composition, chord recognition, and remote teaching. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0047] Figure 1 A flow chart of identifying the plucking action on the strings of a method for identifying the plucking action and the plucking frets of a string instrument provided in one embodiment;
[0048] Figure 2 A flowchart of real-time peak point detection of a method for identifying string instrument playing movements and playing qualities provided by one embodiment;
[0049] Figure 3A flowchart of a detection signal validity method for identifying string instrument playing movements and playing frets provided by an embodiment;
[0050] Figure 4 A flowchart of detecting harmonics in a method for identifying string instrument playing movements and playing frets provided in one embodiment;
[0051] Figure 5 A flowchart of calculating the final fundamental frequency of a method for identifying string instrument playing movements and playing frets provided by one embodiment;
[0052] Figure 6 A waveform diagram of a collected signal in which the number of sampling points SP in one vibration cycle is 390 in a method for identifying string instrument playing movements and playing grades provided by one embodiment;
[0053] Figure 7 A waveform diagram of the vibration frequency of the sixth string of a string instrument at 80 Hz in a method for identifying the playing action and playing frets of a string instrument provided in one embodiment;
[0054] Figure 8 for Figure 7 Schematic diagram of the highest peak threshold and the lowest peak threshold of the waveform shown;
[0055] Figure 9 The method for identifying string instrument playing action and playing quality provided by an embodiment is as follows Figure 2 The waveform diagram obtained after the real-time detection of the peak point is shown;
[0056] Figure 10 A waveform diagram of 1024 points collected when three open strings are played in a method for identifying string instrument playing movements and playing frets provided in one embodiment;
[0057] Figure 11 A schematic diagram of amplitude data corresponding to each frequency point obtained after FFT calculation in a method for identifying string instrument playing movements and playing frets provided in one embodiment; and
[0058] Figure 12 This is the signal energy simulation result corresponding to each frequency point of the three strings in the method for identifying the playing movements and playing frets of a string instrument provided by an embodiment. DETAILED DESCRIPTION
[0059] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0060] As used in this application, the terms "component," "module," and "system" are intended to refer to a computer-related entity, which can be hardware, a combination of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration, both an application running on a server and the server can be a component. One or more components can reside within a process and / or thread of execution.
[0061] And components can be localized within one computer and / or distributed between two or more computers.
[0062] As used herein, the terms "inference" or "inference" generally refer to the process of inferring or reasoning about the state of a system, environment, and / or user from a set of observations captured via events and / or data. For example, inference can be used to identify a specific context or action, or can generate a probability distribution over states. Inference can be probabilistic, that is, a probability distribution over states of interest is computed based on a consideration of data and events. Inference can also refer to techniques for synthesizing higher-level events from a set of events and / or data. Such inference results in the construction of new events or actions from a set of observed events and / or stored event data, regardless of whether the events are related in adjacent time and regardless of whether the events and data come from one or several event and data sources.
[0063] The present invention provides a method for identifying the playing movements and playing quality of a string instrument, wherein the string instrument includes a body and a multi-channel string signal acquisition device and a signal processing device disposed on the body. The body includes a nut and strings mounted on the nut, and the multi-channel string signal acquisition device is disposed below the strings and near the nut. Each channel of the multi-channel string signal acquisition device is provided with a strong magnetic magnet. The multi-channel string signal acquisition device includes an analog signal acquisition module, and the signal processing device includes a signal amplification module, a multi-channel analog-to-digital conversion module, a calculation module, and a communication module. For example, a guitar is a string instrument. A guitar has six metal strings, and the multi-channel string signal acquisition device has six channels.
[0064] The method for identifying string instrument playing movements and playing frets comprises the following steps:
[0065] S100, the analog signal acquisition module acquires the electrical signal generated by the vibration of the string cutting the magnetic field lines of the strong magnetic magnet and outputs the analog signal;
[0066] S200, the signal amplification module performs filtering, amplification and bias processing on the analog signal and then outputs a DC signal;
[0067] S300, a multi-channel analog-to-digital conversion module samples the DC signal and converts it into a digital signal;
[0068] S400, the operation module operates the digital signal and outputs the detection result;
[0069] S500: The communication module sends the detection result to the terminal.
[0070] Specifically, in step S100, when the metal strings vibrate, they cut the magnetic lines of force of the strong magnetic magnet to generate a changing electrical signal, and finally output 6 independent audio signals, specifically analog signals with a signal amplitude between -40mv and +40mv. In contrast, ordinary piezoelectric pickups mix the 6 channels before outputting them. When multiple strings are played at the same time, it is impossible to accurately determine which string and which fret the audio is coming from. By using 6 independent signal outputs, there is no superposition of sounds, the frequency detection-related algorithms can be made simpler, and the computing power requirements are greatly reduced. In particular, according to the level of the lowest vibration frequency of different strings, the induction coils of the multi-channel string signal acquisition device use different numbers of winding turns to achieve maximum induction sensitivity.
[0071] In step S200 , the signal amplification module performs filtering, amplification, and bias processing on the analog signal output by the analog signal acquisition module, and then outputs a DC signal of 0 to +3.3V.
[0072] In step S300, the multi-channel analog-to-digital conversion module uses a 16 kHz sampling frequency to collect DC signals and converts them into digital signals. Each time 32 ms of data (512 sampling points) is collected, the collected data array (SampleData
[512] ) is output. Since the lowest vibration frequency of standard guitar theory is 82 Hz, the 32 ms of collected data can contain data from two complete signal cycles, ensuring the accuracy of subsequent frequency detection related calculations while also taking into account low latency.
[0073] In step S400, the step of the operation module operating the digital signal and outputting the detection result includes the following steps:
[0074] S410, identifying a playing action on the strings;
[0075] S420, detecting time domain data;
[0076] S430, converting the time domain data into frequency domain data;
[0077] S440, calculating a fundamental frequency value using the time domain data and the frequency domain data;
[0078] S450: establishing a frequency information table for each fret of the string instrument according to the standard interval relationship of the string instrument, and obtaining the string and fret corresponding to the fundamental frequency value by a table lookup method.
[0079] It is known that signals generated by factors such as the user plucking the strings, string resonance caused by guitar cavity vibration, energy leakage from adjacent strings, and power supply ripple will all be collected. However, only the waveform data generated by the user plucking the strings is valid data. Signals generated by other factors are interference signals and must be filtered out. Based on the waveform analysis of each signal, the following conclusions are drawn:
[0080] When the user plucks the string, the signal amplitude will increase rapidly in a short period of time, generally reaching a peak value within 1 to 8 frequency cycles (the peak value varies depending on the force of plucking the string, and the effective range is 200mV to 4000mV), and then the amplitude begins to slowly decay.
[0081] Because guitar sound is produced by the vibration of the guitar strings, which in turn changes the air inside the guitar cavity, every time a user plucks a string, the other strings will vibrate to varying degrees, and the induction coil will pick up a signal. However, because the energy is transmitted through vibration, the amplitude of the resonant string's swing increases slowly, typically reaching a peak within 18 to 40 frequency cycles. Furthermore, the signal amplitude is relatively small, typically between 200mV and 600mV.
[0082] Since each channel of the multi-channel string signal acquisition module has a strong magnet, the magnetic lines of force between adjacent strings intersect, resulting in energy leakage between adjacent strings. For example, when string 2 vibrates, a basically fixed proportion of energy will leak to the adjacent induction coils of strings 1 and 3. Therefore, a magnetic line energy leakage ratio table can be established.
[0083] Table 1 is the energy leakage ratio table.
[0084]
[0085] Table 1
[0086] For example, the energy leaked from string 2 to string 3 is 0.4. When the signal amplitude detected on string 2 is 1000mV, the signal amplitude on string 3 is 1000mV*0.4=400mV. If the signal amplitude detected on string 3 is less than 400mV, it is possible that the energy leaked from string 2 is present.
[0087] The signal amplitude of the power supply ripple generally varies within 100mV.
[0088] Figure 1 A flowchart for identifying the plucking action on the strings, such as Figure 1 As shown, the step S410 of identifying the playing action on the strings includes the following steps:
[0089] S411 , according to the open string vibration frequency Freq of each string, the number of sampling points SP required for two vibration cycles is calculated as SP=16000 / (Freq / 2).
[0090] For example, the frequency Freq of the open 6-string is 82 Hz, and the number of sampling points in one vibration cycle SP = 16000 / (82 / 2) = 390.
[0091] S412 , continuously compare SP sampling values, find the maximum value SVmax and the minimum value SVmin, and calculate the current signal amplitude Samp=SVmax-SVmin. Figure 6 The waveform of the collected signal is shown when the number of sampling points SP in one vibration cycle is 390.
[0092] S413 compares the current signal amplitude Samp with the previous signal amplitude Samp_last, and calculates the difference Samp_delta = Samp - Samp_last to determine whether the current signal amplitude is increasing or decreasing. Analysis of the collected signal shows that the frequency of the signal is very unstable during the period of increasing amplitude, while the signal waveform remains largely stable during the period of decreasing amplitude. Therefore, signal frequency analysis is required during the decreasing period.
[0093] S414: If the signal amplitude increases (Samp_delta>0), the number of times the signal increases continuously is recorded (Rasing_Count=Rasing_Count+1). If the signal amplitude decreases, the current signal is determined based on the change in the signal amplitude to determine whether it is a signal generated by the user plucking the string or a signal generated by other interference factors and marked.
[0094] Furthermore, the step of determining whether the current signal is generated by the user plucking the string or by other interference factors and marking the current signal includes the following steps:
[0095] S415, establishing a magnetic field line energy leakage ratio table (see Table 1);
[0096] S416, marking the signal that rebounds slightly during the decay process as a non-plucked signal;
[0097] S417, marking a signal whose number of consecutive increases is greater than or equal to 4 as a resonance signal;
[0098] S418, marking a signal whose number of consecutive increases is less than 4 and whose amplitude is less than the corresponding value in the magnetic field energy leakage ratio table as a leakage signal;
[0099] S419: Mark the signal whose number of consecutive increases is less than 4 and is greater than the corresponding amplitude in the magnetic field energy leakage ratio table as a signal of a new user plucking action.
[0100] Next, we need to detect the time domain data.
[0101] According to the analysis of the continuously acquired signal waveform, the number of sampling points between two peaks is a vibration period, and the corresponding vibration frequency Freq is calculated as follows:
[0102] Fre = 16000 / (current peak sampling point number - previous peak sampling point number)
[0103] like Figure 7 As shown in the figure, the waveform of the vibration frequency of the 6-string at 80Hz has 3 peak points marked.
[0104] The formula for calculating application frequency is:
[0105] 16000 / (376-178)=80.8Hz
[0106] 16000 / (577-376)=79.6Hz
[0107] The step S420 of detecting the time domain data includes the following steps:
[0108] S421 , calculating a maximum peak threshold high_peak_threshold and a minimum peak threshold low_peak_threshold according to the maximum value SVmax and the minimum value SVmin found by continuously comparing SP sampling values in the step of identifying the playing action on the strings.
[0109] like Figure 8 As shown, because the signal is constantly changing, this peak point will not have a fixed value. In step S312, the maximum value SVmax and the minimum value SVmin of the signal amplitude in the recent period are obtained. The highest peak threshold high_peak_threshold and the lowest peak threshold low_peak_threshold can be calculated by applying the following formula:
[0110] high_peak_threshold=SVmax*0.7
[0111] low_peak_threshold=SVmin*0.7
[0112] S422, real-time detection of peak points to obtain collected data. Figure 2 After processing the process shown in Figure 9 The waveform shown.
[0113] The step S330 of converting the time domain data into frequency domain data includes the following steps:
[0114] S431, perform fast Fourier transform on the collected data to convert the time domain data into frequency domain data FFT_Data
[512] .
[0115] Specifically, the time domain data is converted into frequency domain data FFT_Data
[512] by performing a fast Fourier transform (FFT) on the collected data. Because it is to be run on an embedded device, 1024 sampled data are used for FFT to reduce the computing power required. Since the multi-channel ADC conversion module only collects 512 data at a time, it is necessary to package the previous set of data with the current data to form a package of 1024 data. Figure 10 This is a waveform diagram of 1024 points collected when playing the 3 open strings.
[0116] like Figure 11 As shown in FIG, after FFT calculation, a schematic diagram of the amplitude data corresponding to each frequency point is obtained.
[0117] Through the analysis of the above figure, the sound produced by each string is composed of the main frequency and its harmonics. Take the open 3-string as an example: its fundamental frequency is 196Hz, the first harmonic is 196*2=392Hz, the second harmonic is 196*3=588Hz, and so on.
[0118] According to the resolution formula of Fast Fourier Transform (FFT): At present, the resolution calculated with 16KHz sampling frequency and 1024 sampling points is 16000Hz / 1024=15.625Hz. In other words, the frequency value of the input signal cannot be accurately obtained by FFT calculation alone, but only an approximate value can be obtained. By analyzing the characteristics of FFT results, it can be known that if the frequency of the detected signal is not a multiple of the resolution, then the energy of the signal will be proportionally distributed to the two frequency points close to it, such as Figure 12 As shown, taking the open 3rd string (196Hz) as an example, 196 / 15.625=12.544, so this frequency falls exactly between the 12th and 13th points of the FFT result.
[0119] Therefore, the following frequency-amplitude mean formula can be derived:
[0120] Freq=FFT_left*15.625+(FFT_Data[FFT_left] / (FFT_Data[FFT_left]+FFT_Data[FFT_right]))*15.625.
[0121] The frequency point can be accurately calculated based on the result value of FFT, where FFT_left is the point where the FFT is slightly smaller than the input signal frequency, FFT_Data[FFT_left] is the signal amplitude of the point where the FFT is slightly smaller than the input signal frequency, and FFT_Data[FFT_right] is the signal amplitude of the point where the FFT is slightly larger than the input signal frequency.
[0122] Substituting the data in the above figure into the formula, we can get:
[0123] 12*15.625+(30.3 / (27.9+30.3))*15.625=195.6 Hz, which is approximately equal to the original signal of 196 Hz.
[0124] If the signal waveform is relatively clean when a single string is played individually, the fundamental frequency value can be accurately determined in most cases using the time-domain-based fundamental frequency detection algorithm or the time-frequency conversion algorithm. However, if multiple strings are played simultaneously or consecutively, factors such as string resonance caused by guitar cavity vibration, energy leakage from adjacent strings, power supply ripple, loose strings, and envelope adhesion caused by consecutive string strums can all contribute to unclear time-domain signal periodicity, loss of the FFT fundamental frequency, and loss of FFT harmonics. This makes it difficult to accurately identify the input frequency using only one algorithm, necessitating the simultaneous calculation of the correct fundamental frequency value using both the time and frequency domains.
[0125] The step S440 of calculating the fundamental frequency value using the time domain data and the frequency domain data includes the following steps:
[0126] S441, traverse the calculation results of the fast Fourier transform of the collected data, find the point with the maximum amplitude FFT_max, and calculate the maximum frequency max_amp_freq using the frequency-amplitude mean formula;
[0127] S442, detecting signal validity;
[0128] S443, detection of harmonics;
[0129] S444: Calculate the final basic frequency final_basic_freq by combining the time domain and the frequency domain.
[0130] Specifically, in step S441, it is known that after FFT processing, the point with the largest amplitude must be the fundamental frequency or the nth harmonic of the fundamental frequency, so we first traverse the FFT calculation result values, find the point with the maximum amplitude FFT_max, and calculate the frequency max_amp_freq through the frequency-amplitude mean formula.
[0131] Because the data of FFT_Data[] contains many frequencies introduced by interference factors, to obtain the actual frequency of a certain point in FFT_Data[], it is necessary to first perform signal validity detection and calculate the correct frequency based on the relationship between the amplitude of a certain point and the amplitude of adjacent points, such as Figure 3 .
[0132] Because the harmonics are multiples of the fundamental frequency, the harmonics are divided by a certain value to get the fundamental frequency, and then the fundamental frequency is checked to see if there are 2, 3, 5, or 7 times the harmonics. Figure 4 .
[0133] Finally, the final base frequency final_basic_freq is calculated by combining the time domain and frequency domain, such as Figure 5 .
[0134] According to the standard interval relationship of the guitar, the frequency information of each fret on the guitar can be obtained. Table 2 is a guitar fret frequency comparison table.
[0135]
[0136] Table 2
[0137] In this embodiment, the method for identifying string instrument playing movements and playing frets further includes the following steps:
[0138] For the signal marked as a leaked signal, compare the final fundamental frequency final_basic_freq with the frequencies detected by other strings. If the frequencies are consistent, the signal is confirmed to be a leaked signal and discarded.
[0139] For a signal marked as a new user string plucking action signal, the found string number and fret information are sent to the terminal and the marking status is cleared;
[0140] When the current string number is detected to have changed in quality, and there is no new user string plucking action, and the difference between the current quality value and the previous quality value is less than or equal to 2, it means that the string has changed.
[0141] When a slide action occurs, the string number, slide direction, current fret value, and previous fret value information are sent to the terminal.
[0142] When all algorithm processing is completed, the fundamental frequency information corresponding to the currently collected signal, the string number and fret information, and the glissando information can be sent to the terminal in a timely manner. The terminal can perform lighting interaction, performance recording, chord recognition and other processing based on these raw data to increase the fun.
[0143] In addition, the terminal can adjust the relevant thresholds of the time-domain-based fundamental frequency detection algorithm and the fundamental frequency derivation algorithm according to the installation location of the multi-channel string signal acquisition device, so as to increase or decrease the detection sensitivity, and adjust the open string frequency to achieve the purpose of pitch change.
[0144] The method provided by the present invention for identifying the playing movements and playing quality of a string instrument comprises the following steps: collecting the electrical signal generated by the magnetic lines of force of a strong magnetic magnet when the string vibrates and outputting an analog signal; filtering, amplifying and biasing the analog signal and then outputting a DC signal; sampling the DC signal and converting it into a digital signal; performing calculations on the digital signal and outputting a detection result, which is then sent to a terminal. To address the current problems of low accuracy and high latency in string instrument playing detection, a simple, convenient, and low-cost solution is provided, allowing users to obtain a set of playing detection tools within a limited price, accurately obtaining the user's playing data in real time, and having a wide range of applications in scenarios such as playing error correction, performance recording, composing music scores, chord recognition, and remote teaching.
[0145] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying playing movements and playing quality of a string instrument, wherein the string instrument comprises a body and a multi-channel string signal acquisition device and a signal processing device provided on the body, characterized in that: The body includes a nut and strings mounted on the nut. The multi-channel string signal acquisition device is disposed below the strings and close to the nut. A strong magnetic magnet is provided on each channel of the multi-channel string signal acquisition device. The multi-channel string signal acquisition device includes an analog signal acquisition module. The signal processing device includes a signal amplification module, a multi-channel analog-to-digital conversion module, a calculation module, and a communication module. The method includes the following steps: The analog signal acquisition module acquires the electrical signal generated by the vibration of the string when it cuts the magnetic field lines of the strong magnetic magnet and outputs an analog signal; The signal amplification module performs filtering, amplification and biasing processing on the analog signal and then outputs a DC signal; The multi-channel analog-to-digital conversion module samples the DC signal and converts it into a digital signal; The operation module operates on the digital signal and outputs a detection result; The communication module sends the detection result to the terminal; The step of the operation module operating the digital signal and outputting the detection result comprises the following steps: identifying a plucking motion on the strings; Detect time domain data; Converting the time domain data into frequency domain data; Calculating a fundamental frequency value using the time domain data and the frequency domain data; Establishing a frequency information table for each fret of the string instrument according to the standard interval relationship of the string instrument, and obtaining the string and fret corresponding to the fundamental frequency value by a table lookup method; The step of identifying the playing action on the strings comprises the following steps: Calculating the number of sampling points SP required for two vibration cycles according to the open string vibration frequency Freq of each string; Continuously compare SP sampling values, find the maximum value SVmax and the minimum value SVmin, and calculate the current signal amplitude Samp = SVmax-SVmin; Compare the current signal amplitude Samp with the previous signal amplitude Samp_last, calculate the difference Samp_delta=Samp-Samp_last, and determine whether the current signal amplitude is increasing or decreasing; If the signal amplitude increases, the number of times the signal increases continuously is recorded. If the signal amplitude decreases, the change in signal amplitude is used to determine whether the current signal is generated by the user plucking the string or by other interference factors and mark it. The step of determining whether the current signal is a signal generated by the user plucking the string or a signal generated by other interference factors and marking the signal comprises the following steps: Establish a magnetic field line energy leakage ratio table; The signal that rebounds slightly during the decay process is marked as a non-plucked signal; The signal whose number of consecutive increases is greater than or equal to 4 is marked as a resonance signal; Mark the signal whose number of consecutive increases is less than 4 and whose amplitude is less than the corresponding value in the magnetic field energy leakage ratio table as a leakage signal; A signal whose number of consecutive increases is less than 4 and is greater than the corresponding amplitude in the magnetic field energy leakage ratio table is marked as a signal of a new user plucking action.
2. The method for identifying string instrument playing movements and playing frets according to claim 1, wherein: The multi-channel string signal acquisition device is set at a position 2cm-5cm away from the nut, the strings are mounted on the nut and extend across the multi-channel string signal acquisition device, and the distance between the multi-channel string signal acquisition device and the strings is 1mm-2mm.
3. The method for identifying string instrument playing movements and playing frets according to claim 1, wherein: The step of detecting time domain data comprises the following steps: Calculate the maximum value SVmax and the minimum value SVmin found by continuously comparing SP sampling values in the step of identifying the playing action on the strings; The peak points are detected in real time to obtain the time difference between the peak points and calculate the peak period data.
4. The method for identifying string instrument playing movements and playing frets according to claim 3, wherein: The step of converting the time domain data into frequency domain data comprises the following steps: The two acquisition data groups are packaged into 1024 sampling data and then fast Fourier transform is performed to convert the time domain data into frequency domain data FFT_Data[512].
5. The method for identifying string instrument playing movements and playing frets according to claim 4, wherein: The step of calculating the fundamental frequency value using the time domain data and the frequency domain data comprises the following steps: Traverse the calculation results of the fast Fourier transform of the collected data, find the point with the largest amplitude FFT_max, and calculate the maximum frequency max_amp_freq using the frequency-amplitude mean formula; Detect signal validity; Detect harmonics; Combine the time domain and frequency domain to calculate the final basic frequency final_basic_freq.
6. The method for identifying string instrument playing movements and playing frets according to claim 5, wherein: The following steps are also included: For the signal marked as a leakage signal, the final basic frequency final_basic_freq is compared with the frequencies detected by other strings. If the frequencies are consistent, the signal is confirmed to be a leakage signal and discarded. For the signal marked as a new user string plucking action signal, the found string number and fret information are sent to the terminal and the marking state is cleared; When it is detected that the fret of the current string number has changed, and there is no new user plucking action marked, and the difference between the current fret value and the previous fret value is less than or equal to 2, it means that a slide action has occurred, and the string number, slide direction, current fret value, and previous fret value information are sent to the terminal.
Citation Information
Patent Citations
Musical instrument music signal and chord identification method
CN115083373A
Intelligence string instrument
CN205959602U