A method for generating a vibration feedback signal, an electronic device, and a storage medium
By generating and splicing vibration feedback signals of audio clips, the problem of insufficient rationality in matching audio and vibration feedback signals is solved, and rich vibration effects and sensory experience are achieved.
Patent Information
- Application Number
- CN202211564092.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-07
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2042-12-07
AI Technical Summary
In the existing technology, the matching rationality between audio and vibration feedback signals is poor, resulting in a single vibration feedback effect and an inability to bring a refreshing sensory experience for different types of audio.
An energy change trend curve is generated based on the audio data. By comparing it with the preset energy change threshold, the audio is divided into multiple segments. The corresponding vibration feedback signals are matched according to the rhythm change trend of the segments, and finally spliced into the target vibration feedback signal.
The rationality of matching audio and vibration feedback signals is improved, and the richness of vibration feedback signals is enhanced, so that different types of audio can bring a refreshing sensory experience.
Smart Images

Figure CN116185171B_ABST
Abstract
Description
[0001] The present application relates to the technical field of tactile feedback, and particularly relates to a vibration feedback signal generation method, an electronic device and a storage medium.
[0002] With the development of science and technology and the progress of the times, vibration feedback is gradually applied to consumer electronic devices such as mobile phones, tablet computers, gamepads and smart watches, and its application scenarios have also developed from the initial simple vibration prompt to combination with audio, games and videos, for example, in the process of playing a game, it can provide different vibration effects according to different trigger instructions (such as clicking, long pressing and sliding) input by the user, and in the process of playing audio, it can provide vibration effects with different strengths according to the playing of the audio, thereby bringing immersive sensory experience to the user.
[0003] In the related art, if vibration feedback of audio is to be performed, a corresponding vibration feedback signal needs to be generated in advance, and the vibration feedback signal will finally be input into a vibration feedback device in an electronic device, so that the vibration feedback device can vibrate in synchronization with the vibration feedback signal in the process of playing audio to achieve the expected vibration effect. However, at present, almost all audio is based on the same set of vibration feedback signals to achieve vibration feedback, and the same set of vibration feedback signals is difficult to reasonably match different types of audio (mainly embodied in different rhythms), which means that the matching rationality between audio and vibration feedback signals is poor, thereby leading to the fact that it cannot bring new sensory experience to the user for different types of audio, and also proves that the corresponding vibration effect of the vibration feedback signal is too single and not rich in richness.
[0004] Therefore, it is necessary to improve the generation method of the vibration feedback signal.
[0005] The present application aims to provide a vibration feedback signal generation method, an electronic device and a storage medium, and aims to solve the problem of poor matching rationality between audio and vibration feedback signals in the related art.
[0006] In order to solve the above technical problem, the first aspect of the embodiment of the present application provides a vibration feedback signal generation method, comprising:
[0007] generating an energy change trend curve of the audio according to audio data; wherein the horizontal axis of the energy change trend curve is the frame number and the vertical axis is the energy change value;
[0008] comparing the energy change value in the energy change trend curve with a preset energy change threshold;
[0009] The audio is divided into a plurality of audio segments according to a comparison result, wherein the comparison result indicates a rhythm change trend of each audio segment;
[0010] According to the rhythm change trend of each audio segment, a corresponding vibration feedback signal is matched for each audio segment;
[0011] All vibration feedback signals are spliced to obtain a target vibration feedback signal.
[0012] The second aspect of the embodiment of the present application provides an electronic device, comprising a memory and at least one processor, wherein the memory is used to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor executes the generation method of the vibration feedback signal described in the first aspect of the embodiment of the present application.
[0013] The third aspect of the embodiment of the present application provides a computer readable storage medium, which stores executable instructions, and the executable instructions are executed to execute the generation method of the vibration feedback signal described in the first aspect of the embodiment of the present application.
[0014] From the above description, compared with the related art, the beneficial effects of the present application are as follows:
[0015] Firstly, an energy change trend curve of the audio is generated according to the audio data, and an energy change value in the energy change trend curve is compared with a preset energy change threshold; secondly, the audio is divided into a plurality of audio segments according to the comparison result, wherein the comparison result indicates a rhythm change trend of each audio segment; finally, a corresponding vibration feedback signal is matched for each audio segment according to the rhythm change trend of each audio segment, and all vibration feedback signals are spliced to obtain a target vibration feedback signal, and the vibration feedback device in the electronic device can vibrate synchronously according to the target vibration feedback signal during audio playing to achieve a corresponding vibration effect. As can be seen, the rhythm change trend of the audio is embodied by the comparison result between the energy change value in the energy change trend curve and the preset energy change threshold, and the audio is divided into a plurality of audio segments according to the rhythm change trend of the audio, and the vibration feedback signals finally matched for the audio segments with different rhythm change trends are different, that is, the vibration feedback signals finally matched for the audio segments have different vibration effects respectively, which shows that the target vibration feedback signal obtained by splicing the vibration feedback signals finally matched for the audio segments conforms to the rhythm change trend of the whole audio, thereby effectively improving the rationality of matching between the audio and the vibration feedback signal. In addition, different types of audio have different rhythm change trends, and the target vibration feedback signals of different types of audio have different vibration effects respectively on the premise of conforming to the respective rhythm change trends, which not only improves the richness of the vibration feedback signal, but also enables different types of audio to bring users a novel sensory experience. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the related art or the embodiments of the present application, the drawings needed to be used in the description of the related art or the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and not all embodiments. Those skilled in the art can obtain other drawings according to these drawings without creating any creative labor.
[0017] Figure 1 The flowchart of the vibration feedback signal generation method provided by the embodiments of the present application is shown in the figure.
[0018] Figure 2 The energy change trend curve before correction provided by the embodiments of the present application is shown in the figure.
[0019] Figure 3 The energy accumulation curve provided by the embodiments of the present application is shown in the figure.
[0020] Figure 4 The energy curve provided by the embodiments of the present application is shown in the figure.
[0021] Figure 5 A modified energy change trend curve diagram provided by the embodiment of the present application;
[0022] Figure 6 A partition diagram of an audio clip provided by the embodiment of the present application;
[0023] Figure 7 A flowchart of the vibration feedback signal from generation to utilization provided by the embodiment of the present application;
[0024] Figure 8 A module block diagram of an electronic device provided by the embodiment of the present application;
[0025] Figure 9 A module block diagram of a computer readable storage medium provided by the embodiment of the present application.
CONCRETE EMBODIMENT
[0026] In order to make the purpose, technical solutions and advantages of the present application more obvious and easy to understand, the present application will be described clearly and completely below in combination with the embodiments of the present application and the drawings, wherein the same or similar reference signs represent the same or similar elements or elements with the same or similar functions throughout. It should be understood that the embodiments of the present application described below are only used to explain the present application and do not limit the present application, that is, based on the various embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application. In addition, the technical features involved in the various embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0027] Please refer to Figure 1 , Figure 1 A flowchart of the vibration feedback signal generation method provided by the embodiment of the present application, the vibration feedback signal generation method comprises the following steps 101 to 105.
[0028] Step 101, generating an energy change trend curve of the audio according to the audio data.
[0029] In the embodiment of the present application, if it is desired to generate a vibration feedback signal conforming to the audio rhythm change trend, it is necessary to first obtain the audio data of the audio, and generate an energy change trend curve of the audio according to the obtained audio data. The diagram of the energy change trend curve can be referred to Figure 2, the horizontal axis is the frame number, and the vertical axis is the energy change value, which establishes the corresponding relationship between the energy change value of the audio and the frame number, or in other words, it represents the dynamic change of the energy of the audio with the frame number. It should be noted that because a series of standardization operations (such as logarithm, rectification, difference, etc.) when the audio data is subjected to the Mel frequency spectrum energy analysis, the energy change trend curve directly generated by it is likely to have a certain deviation, so we need to correct the energy change trend curve, and Figure 2 The given is only the schematic diagram before the correction of the energy change trend curve, and the specific correction process will be described in detail below.
[0030] Step 102, compare the energy change value in the energy change trend curve with the preset energy change threshold.
[0031] In the embodiment of the present application, after generating the energy change trend curve of the audio, it is also necessary to compare the energy change value in the energy change trend curve with the preset energy change threshold, that is, to compare the size between the energy change value in the energy change trend curve and the preset energy change threshold, so as to subsequently divide the audio according to the comparison result.
[0032] Step 103, divide the audio into multiple audio segments according to the comparison result.
[0033] In the embodiment of the present application, after comparing the energy change value in the energy change trend curve with the preset energy change threshold, it is also necessary to divide the audio into multiple audio segments according to the comparison result, at this time, the energy change trend curve can be first divided into multiple mutually connected regions according to the comparison result, and then the audio is divided into multiple time-sequentially continuous audio segments (one-to-one correspondence between the multiple mutually connected regions and the multiple time-sequentially continuous audio segments) with reference to the multiple mutually connected regions. It should be noted that the comparison result essentially represents the rhythm change trend of each audio segment, assuming that the energy change trend curve is divided into region A and region B according to the comparison result, and the comparison result is that each energy change value in region A is greater than or equal to the preset energy change threshold, and each energy change value in region B is less than the preset energy change threshold, in this case, the audio will be divided into an audio segment a corresponding to region A and an audio segment b corresponding to region B, and the rhythm change of the audio segment a is obvious (i.e. fast rhythm change), and the rhythm change of the audio segment b is not obvious (i.e. slow rhythm change), which means that when the energy change value is greater than or equal to the preset energy change threshold, the rhythm change of the audio segment is obvious, and when the energy change value is less than the preset energy change threshold, the rhythm change of the audio segment is not obvious.
[0034] Step 104, match the corresponding vibration feedback signal for each audio segment according to the corresponding rhythm change trend of each audio segment.
[0035] In the embodiment of the present application, after the audio is divided into a plurality of time-sequentially continuous audio segments according to the comparison result, each audio segment needs to be matched with a corresponding vibration feedback signal according to the rhythm change trend of the audio segment. Still following the example given in step 103, since the rhythm change of audio segment a is obvious, a vibration feedback signal with short interval and high frequency needs to be matched for audio segment a, and since the rhythm change of audio segment b is not obvious, a vibration feedback signal with long interval and low frequency needs to be matched for audio segment b. Preferably, a signal library including a plurality of vibration feedback signals can be created in advance, each vibration feedback signal in the signal library corresponding to a different rhythm change trend, in which case each audio segment can be matched with a corresponding vibration feedback signal from the signal library according to the rhythm change trend of the audio segment, without the need to design a vibration feedback signal meeting the rhythm change trend of each audio segment for each audio segment.
[0036] Step 105, splicing all the vibration feedback signals to obtain a target vibration feedback signal.
[0037] In the embodiment of the present application, although the audio is divided into a plurality of audio segments, the audio is continuous when played, i.e., there is no breakpoint between any two adjacent audio segments, which is the reason why the plurality of audio segments are time-sequentially continuous. Therefore, after each audio segment is matched with a corresponding vibration feedback signal according to the rhythm change trend of the audio segment, all the vibration feedback signals need to be spliced to obtain a complete and continuous target vibration feedback signal, after which the target vibration feedback signal can be input to the vibration feedback device in the electronic device, so that the vibration feedback device can vibrate in synchronization with the target vibration feedback signal during the playing of the audio to achieve a corresponding vibration effect.
[0038] It can be understood that the preset energy change threshold is not limited to one. When the preset energy change threshold includes n (n is a positive integer greater than 1), the n preset energy change thresholds can constitute n+1 threshold intervals. Assuming that the preset energy change thresholds include three, x, y and z, and x < y < z, they can constitute four threshold intervals, less than x, greater than or equal to x and less than y, greater than or equal to y and less than z, and greater than or equal to z. In this case, the energy change trend curve can be divided into at least four regions connected to each other according to the threshold interval in which the energy change value in the energy change trend curve is located. The energy change values in the four divided regions are in the four threshold intervals, respectively. At this time, the audio is also divided into at least four time-sequentially continuous audio segments. The four divided audio segments have different rhythm change trends, respectively. The vibration feedback signals finally matched by them are also different from each other. This shows that the target vibration feedback signal finally spliced by the four different vibration feedback signals has at least four vibration effects combined. Therefore, the more the number of preset energy change thresholds, the more the number of divided audio segments, the more the types of vibration feedback signals finally matched by each audio segment, and the richer the vibration effect of the target vibration feedback signal finally spliced by each vibration feedback signal.
[0039] As can be seen from the above, the rhythm change trend of the audio is embodied by the comparison result between the energy change value in the energy change trend curve and the preset energy change threshold in the embodiments of the present application. Meanwhile, the audio is divided into a plurality of audio segments according to the rhythm change trend of the audio. For the audio segments with different rhythm change trends, the vibration feedback signals finally matched by them are different, that is, the vibration feedback signals finally matched by them have different vibration effects, respectively. This shows that the target vibration feedback signal obtained by splicing the vibration feedback signals finally matched by each audio segment conforms to the rhythm change trend of the whole audio, thereby effectively improving the rationality of the matching between the audio and the vibration feedback signal. In addition, different types of audio have different rhythm change trends, respectively. For different types of audio, the corresponding target vibration feedback signals of the audio have different vibration effects under the premise of conforming to the rhythm change trend of each audio, respectively. This not only improves the richness of the vibration feedback signal, but also enables different types of audio to bring a novel sensory experience to the user.
[0040] As an implementation manner, step 101 can specifically include: generating an energy accumulation curve of the audio according to the audio data; and generating an energy change trend curve of the audio according to the energy accumulation curve. The schematic diagram of the energy accumulation curve in the present embodiment can be referred to as Figure 3 The horizontal axis is the frame number, and the vertical axis is the energy accumulation value. The energy accumulation curve establishes the corresponding relationship between the energy accumulation value of the audio and the frame number, and can well reflect the rhythm change trend of the whole audio.
[0041] In one specific implementation, "generating an energy accumulation curve of the audio according to the audio data" can specifically include generating the energy accumulation curve of the audio according to the frame number, time length, beats per minute and energy curve of the audio. The diagram of the energy curve in this specific implementation can be referred to as Figure 4 , the horizontal axis of which is the frame number and the vertical axis is the energy value, which establishes the corresponding relationship between the energy value and the frame number of the audio; preferably, the energy curve can adopt a mel-frequency spectrum energy curve (the horizontal axis is the frame number and the vertical axis is the mel-frequency spectrum energy value), which is used to indicate the original spectrum energy of the audio data. It can be understood that the frame number, time length, beats per minute and energy curve all belong to a kind of audio data, of course, in addition to these listed, it can also include other audio data commonly used in the art, such as the spectrum of the audio (with the frame number as the horizontal axis or with time as the horizontal axis) and the corresponding sampling rate, etc., which will not be listed one by one in this specific implementation. In addition, during the input of the audio data, some data processing needs to be carried out for the single / dual channel of the audio, that is, when the audio is dual-channel input, the mean value of its dual-channel data needs to be read as the final input audio data.
[0042] Further, it is also mentioned in the foregoing that because of a series of standardization operations (such as logarithmization, rectification, difference, etc.) when the mel-frequency spectrum energy analysis is performed on the audio data, the energy change trend curve directly generated thereby is likely to have a certain deviation, therefore, the original spectrum energy envelope of the audio data is also acquired, and the energy change trend curve is corrected according to the energy envelope. The diagram of the corrected energy change trend curve can be referred to as Figure 5 . It can be understood that steps 102, 103 are actually based on the corrected energy change trend curve, that is, the energy change values in the corrected energy change trend curve are compared with the preset energy change threshold, and the corrected energy change trend curve is divided into a plurality of mutually connected regions according to the comparison result, and then the audio is divided into a plurality of time-sequentially continuous audio segments with reference to the plurality of mutually connected regions; wherein the partition diagram of the corrected energy change trend curve according to the comparison result can be referred to as Figure 6 , Figure 6 The energy change values in the region boxed by the rectangular frame in
[0043] Further, after the energy change trend curve is corrected according to the energy envelope, the preset energy change threshold is adjusted according to the maximum energy change value in the corrected energy change trend curve. It can be understood that the preset energy change threshold is essentially a preset energy change value, different types of audio have different preset energy change thresholds, and there can be a case where the preset energy change threshold is much smaller, much larger or approximately equal to the maximum energy change value in the energy change trend curve before / after correction, or a case where the preset energy change threshold is a reasonable threshold under the energy change trend curve before correction but not a reasonable threshold under the energy change trend curve after correction, so the preset energy change threshold needs to be adjusted according to the maximum energy change value in the corrected energy change trend curve to make it a relatively reasonable value to facilitate subsequent successful partitioning of the audio.
[0044] As an implementation, when the preset energy change threshold is only one, step 103 can specifically include: dividing the audio into at least one first audio segment and / or at least one second audio segment according to the comparison result; wherein the first audio segment indicates that the corresponding energy change value in the energy change trend curve is greater than or equal to the preset energy change threshold, the second audio segment indicates that the corresponding energy change value in the energy change trend curve is less than the preset energy change threshold, and the rhythm change trend of the first audio segment is greater than that of the second audio segment, i.e., the rhythm change of the first audio segment is obvious, and the rhythm change of the second audio segment is not obvious. It can be understood that, taking the first audio segment as an example, when the first audio segment includes multiple segments, although each first audio segment indicates that the corresponding energy change value in the energy change trend curve is greater than or equal to the preset energy change threshold, the degree to which the corresponding energy change value in the energy change trend curve indicated by different first audio segments is greater than the preset energy change threshold is not necessarily the same, so in other implementations, although they are all first audio segments, different vibration feedback signals can be matched for each first audio segment according to the degree to which the corresponding energy change value in the energy change trend curve indicated by each first audio segment is greater than the preset energy change threshold; the same applies to the second audio segment.
[0045] In addition, as mentioned above, when the preset energy change threshold includes n, the n preset energy change thresholds can constitute n+1 threshold intervals, in which case the energy change trend curve can be divided into at least n+1 regions that are connected to each other according to the threshold interval in which the energy change value in the energy change trend curve is located, and the audio can be divided into at least n+1 audio segments that are time-sequentially continuous, and the present implementation will not be repeated here.
[0046] It should be noted that the above embodiments are only preferred implementations of the embodiments of the present application, and are not the only limitation of the modification of the energy change trend curve, the reasonable adjustment of the preset energy change threshold, and the specific process of steps 101-105. Therefore, those skilled in the art can make flexible settings according to actual application scenarios on the basis of the embodiments of the present application.
[0047] In some embodiments, in order to simplify the process of matching the corresponding vibration feedback signal for each audio segment, some audio segments with short duration can be cancelled, thereby reducing the time consumed in the process of matching the vibration feedback signal and reducing the complexity of matching.
[0048] As an implementation, "canceling the audio segment with short duration" can specifically include: merging the audio segment with duration less than or equal to a preset duration threshold into the previous audio segment; or merging the audio segment with duration less than or equal to a preset duration threshold into the next audio segment.
[0049] As another implementation, "canceling the audio segment with short duration" can specifically include: dividing the audio segment with duration less than or equal to a preset duration threshold into two sub-audio segments, and merging the two sub-audio segments into the previous audio segment and the next audio segment, respectively.
[0050] It should be noted that the above embodiments are only preferred implementations of the embodiments of the present application, and are not the only limitation of the cancellation of the audio segment with short duration. Therefore, those skilled in the art can make flexible settings according to actual application scenarios on the basis of the embodiments of the present application.
[0051] In summary, the embodiments of the present application relate to the generation and utilization of the vibration feedback signal. The process of the vibration feedback signal from generation to utilization can be referred to Figure 7 , specifically:
[0052] Step 701, receiving input audio data;
[0053] Step 702, generating an energy accumulation curve of the audio according to the frame number, duration, beats per minute, and energy curve of the audio, and obtaining the energy envelope of the original spectral energy of the audio data;
[0054] Step 703, generating an energy change trend curve of the audio according to the energy accumulation curve, modifying the energy change trend curve based on the energy envelope of the original spectral energy, and adjusting the preset energy change threshold according to the maximum energy change value in the modified energy change trend curve;
[0055] In step 704, the energy change value in the corrected energy change trend curve is compared with the adjusted preset energy change threshold, and the audio is divided into a plurality of audio segments according to the comparison result; wherein the comparison result indicates the rhythm change trend of each audio segment.
[0056] In step 705, the audio segment with a time length less than or equal to the preset time length threshold is merged into the previous / next audio segment, or the audio segment with a time length less than or equal to the preset time length threshold is split into two and then merged into the previous and next audio segments, respectively.
[0057] In step 706, the vibration feedback signal corresponding to each audio segment is matched according to the rhythm change trend of each audio segment, and all vibration feedback signals are spliced to obtain a target vibration feedback signal; wherein the target vibration feedback signal is input into the vibration feedback device, so that the vibration feedback device can vibrate synchronously according to the target vibration feedback signal to achieve the corresponding vibration effect during the playing of the audio by the electronic device.
[0058] For more details of each step in steps 701-706, please refer to the description of the related part shown in the foregoing, which will not be repeated here.
[0059] Please refer to Figure 8 , Figure 8 The module block diagram of the electronic device provided by the embodiment of the present application.
[0060] As shown in Figure 8 , the embodiment of the present application further provides an electronic device 800, which includes a memory 820 and at least one processor 810; wherein the memory 820 is used to store at least one program, and when the at least one program is executed by the at least one processor 810, the at least one processor 810 executes the generation method of the vibration feedback signal provided by the embodiment of the present application.
[0061] Further, the electronic device 800 further includes a vibration feedback device 830, which is used to vibrate synchronously according to the target vibration feedback signal output by the processor 810 to achieve the corresponding vibration effect during the playing of the audio.
[0062] Please refer to Figure 9 , Figure 9 The module block diagram of the computer readable storage medium provided by the embodiment of the present application.
[0063] As shown in Figure 9 , the embodiment of the present application further provides a computer readable storage medium 900, which stores executable instructions 910, and the executable instructions 910 are executed to execute the generation method of the vibration feedback signal provided by the embodiment of the present application.
[0064] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in RAM, flash memory, ROM, electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. The storage medium can be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium can be integral to the processor. The processor and the storage medium can reside in an ASIC.
[0065] In the foregoing disclosure, numerous specific details are set forth to provide a thorough understanding of the embodiments. However, implementations can be practiced without some or all of these specific details. In other instances, well-known methods, procedures, components, and circuits have not been described in detail.
[0066] It should be noted that each of the embodiments described in this specification has at least one aspect. Accordingly, some embodiments are directed to each individual aspect met by this specification. In addition, additional aspects can be provided by a combination of individual aspects. It should also be noted that some embodiments can include, but do not require, a combination of aspects.
[0067] It is also important to note that the use of relational terms such as first and second, and the like, are used solely to distinguish one from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.
[0068] The above description of disclosed embodiments provides enabling concepts for making or using the present content. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein can be applied to other embodiments without departing from the spirit or scope of the claimed content. Thus, the present content is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the claims, the principles and the novel features disclosed herein.
Claims
1. A method of generating a vibrational feedback signal, characterized by, The method comprises: generating an energy accumulation curve of the audio according to the audio data; wherein the horizontal axis of the energy accumulation curve is frame number and the vertical axis is energy accumulation value; generating an energy change trend curve of the audio according to the energy accumulation curve; wherein the horizontal axis of the energy change trend curve is frame number and the vertical axis is energy change value; comparing the energy change value in the energy change trend curve with a preset energy change threshold value; dividing the audio into multiple audio segments according to the comparison result; wherein the comparison result indicates the rhythm change trend of each audio segment; matching a corresponding vibration feedback signal for each audio segment according to the rhythm change trend of each audio segment; splicing all the vibration feedback signals to obtain a target vibration feedback signal.
2. The method of claim 1, wherein, The method of generating an energy accumulation curve of the audio according to the audio data comprises: generating an energy accumulation curve of the audio according to the frame number, time length, beats per minute and energy curve of the audio; wherein the horizontal axis of the energy curve is frame number and the vertical axis is energy value.
3. The method of claim 2, wherein the method further comprises: The energy curve is a mel-frequency spectrum energy curve, wherein the horizontal axis of the mel-frequency spectrum energy curve is frame number and the vertical axis is mel-frequency spectrum energy value.
4. The method of claim 2, wherein the method further comprises: The method further comprises: obtaining an energy envelope of the original spectrum energy of the audio data; correcting the energy change trend curve according to the energy envelope.
5. The method of claim 4, wherein the method further comprises: After the energy change trend curve is corrected according to the energy envelope, the method further comprises: adjusting the preset energy change threshold value according to the maximum energy change value in the corrected energy change trend curve.
6. The method of claim 1, wherein, The method of dividing the audio into multiple audio segments according to the comparison result comprises: dividing the audio into at least one first audio segment or at least one second audio segment according to the comparison result; wherein the first audio segment indicates that the corresponding energy change value in the energy change trend curve is greater than or equal to the preset energy change threshold value, the second audio segment indicates that the corresponding energy change value in the energy change trend curve is less than the preset energy change threshold value, and the rhythm change trend of the first audio segment is greater than that of the second audio segment.
7. The method of claim 1, wherein, The method of matching a corresponding vibration feedback signal for each audio segment according to the rhythm change trend of each audio segment comprises: matching a corresponding vibration feedback signal for each audio segment from a preset signal library according to the rhythm change trend of each audio segment.
8. The method of claim 1, wherein, Before the method of matching a corresponding vibration feedback signal for each audio segment according to the rhythm change trend of each audio segment, the method further comprises: merging the audio segment with a time length less than or equal to a preset time length threshold into a previous audio segment or a subsequent audio segment; or dividing the audio segment with a time length less than or equal to a preset time length threshold into two sub-audio segments, and merging the two sub-audio segments into the previous audio segment and the subsequent audio segment, respectively. The device comprises a memory and at least one processor, wherein the memory is configured to store at least one program, and when the at least one program is executed by the at least one processor, the at least one processor is caused to execute the method of any one of claims 1 to 8.
9. An electronic device, comprising: 10. The electronic device of claim 9, wherein, The vibration feedback device is further included for vibrating synchronously according to a target vibration feedback signal output by the processor during audio playing.
11. A computer readable storage medium, characterized in that, The computer readable storage medium has stored executable instructions which, when executed, perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Vibration signal generation method and device, equipment and storage medium
CN111552377A
Vibration control method and system for computer equipment
CN112416116A