A method and apparatus for magneto-hydrodynamic impulse control
Patent Information
- Application Number
- CN202310609274.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-26
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-05-26
AI Technical Summary
[0003]但这种仅导通电子线圈产生磁场以控制磁流体所呈现的跳动模式单一,长时间给用户带来的视觉观赏性不佳
在本申请实施例中,通过获取目标音频数据,并生成对应于所述目标音频数据的频谱数据,确定目标时段在所述频谱数据中对应的目标频谱数据;按照不同的频率将所述目标频谱数据拆分为M个频段,并对所述频段关联频点;其中,M≥2,每一所述频点分别与占空比参考表关联;确定M个所述频段中幅度值最大的目标频段,依据所述目标频段对应的频点在所述占空比参考表中确定对应的参考占空比;依据所述目标频段对应的频率和所述参考占空比生成目标时段的目标PWM波,依据所述目标PWM波输出对应大小的用于控制磁流体律动的电流值;通过目标时段的音频频谱数据进行频段拆分,选取幅度值最大的频段,然后根据该频段的频点确定参考占空比,进而确定目标PWM波,得到该输出的电流大小,控制电磁线圈产生相应大小的磁场,从而实现根据不同的能量或节奏输出不同的电流,磁流体跳动与音乐律动更真实的贴合效果。
Smart Images

Figure CN116526935B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of magnetofluids, and in particular to a magnetofluid rhythm control method and apparatus. Background Technology
[0002] Magnetofluid, also known as ferrofluid, is a stable colloidal liquid composed of magnetic solid particles with diameters on the nanometer scale (below 10 nanometers), a carrier liquid, and a surfactant. It possesses both the fluidity of a liquid and the magnetic properties of a solid magnetic material. In existing technologies, a magnetic field is generated by controlling an electromagnetic coil circuit through the extraction of specific signals from an audio signal, thereby causing the magnetofluid to produce a pulsating effect through magnetic force.
[0003] However, the jumping pattern presented by this method, which only uses an electronic coil to generate a magnetic field to control the magnetofluid, is monotonous and provides poor visual enjoyment for users over a long period of time. Summary of the Invention
[0004] In view of the aforementioned problems, this application is made to provide a magnetohydrodynamic rhythmic control method and apparatus that overcomes or at least partially solves the aforementioned problems, comprising: A magnetohydrodynamic rhythm control method, comprising: Acquire target audio data and generate spectrum data corresponding to the target audio data, and determine the target spectrum data corresponding to the target time period in the spectrum data; The target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with each frequency band; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. Determine the target frequency band with the largest amplitude value among the M frequency bands, and determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; A target PWM wave for the target time period is generated based on the frequency corresponding to the target frequency band and the reference duty cycle, and a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm is output based on the target PWM wave.
[0005] Preferably, the target audio data is processed to obtain spectrum data, including: The target audio data is transformed into spectrum data using Fourier transform.
[0006] Preferably, the step of dividing the target spectrum data into M frequency bands according to different frequencies and associating frequency points with the frequency bands includes: The target spectrum data is divided into 7 frequency bands; Each frequency band is associated with a corresponding frequency point based on its frequency magnitude, wherein there are 7 frequency points.
[0007] Preferably, determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band, includes: Extract historical spectrum data corresponding to historical time periods preceding the target time period; The historical spectrum data is divided into M historical frequency bands according to different frequencies; where M ≥ 2. Identify the target historical frequency band with the largest amplitude value in each of the historical spectrum data, and determine the average amplitude value of all target historical frequency bands; If the amplitude value of the target frequency band is greater than the average amplitude value, then the corresponding reference duty cycle is determined in the duty cycle reference table based on the frequency point corresponding to the target frequency band.
[0008] Preferably, generating the target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle includes: Obtain the magnetohydrodynamic sensitivity input by the user; Determine the ratio of the amplitude value of the target frequency band to the maximum amplitude value to obtain the amplitude proportion of the target frequency band; The target duty cycle is determined based on the magnetohydrodynamic sensitivity, the amplitude ratio, and the reference duty cycle. The target PWM wave is generated based on the target duty cycle and the frequency corresponding to the target frequency band.
[0009] Preferably, the acquisition of the target audio data includes, prior to: Acquire multi-channel audio signals and convert the audio signals into audio data using a DAC (Digital-to-Analog Converter); The audio signals are output as external audio data and processed as target audio data to obtain spectrum data.
[0010] Preferably, determining the target historical frequency band with the largest amplitude value in each of the historical spectrum data, and determining the average amplitude value of all target historical frequency bands, further includes: If the amplitude value of the target frequency band is greater than the average amplitude value, then output 0.
[0011] A magnetohydrodynamic rhythm control device is also provided for implementing the steps of the magnetohydrodynamic rhythm control method as described in any embodiment of this application, the device comprising: The acquisition module is used to acquire target audio data, generate spectrum data corresponding to the target audio data, and determine the target spectrum data corresponding to the target time period in the spectrum data; The association module is used to split the target spectrum data into M frequency bands according to different frequencies, and associate frequency points with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. The determination module is used to determine the target frequency band with the largest amplitude value among the M frequency bands, and to determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; The generation module is used to generate a target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle, and output a current value of a corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
[0012] An apparatus includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of a magnetohydrodynamic rhythm control method as described above.
[0013] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a magnetohydrodynamic rhythm control method as described above.
[0014] This application has the following advantages: In this embodiment, target audio data is acquired, and spectrum data corresponding to the target audio data is generated. Target spectrum data corresponding to the target time period in the spectrum data is determined. The target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with each frequency band. Wherein, M≥2, and each frequency point is associated with a duty cycle reference table. The target frequency band with the largest amplitude value among the M frequency bands is determined, and the corresponding reference duty cycle is determined in the duty cycle reference table based on the frequency point corresponding to the target frequency band. A target PWM wave for the target time period is generated based on the frequency corresponding to the target frequency band and the reference duty cycle. A current value corresponding to the size of the target PWM wave is output to control the magnetohydrodynamic rhythm. By dividing the audio spectrum data of the target time period into frequency bands, the frequency band with the largest amplitude value is selected. Then, the reference duty cycle is determined based on the frequency point of the frequency band, thereby determining the target PWM wave and obtaining the magnitude of the output current. The electromagnetic coil is controlled to generate a magnetic field of corresponding magnitude, thereby achieving a more realistic fit between the magnetohydrodynamic pulsation and the music rhythm by outputting different currents according to different energies or rhythms. Attached Figure Description
[0015] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating the steps of a magnetohydrodynamic rhythmic control method according to an embodiment of this application; Figure 2 This is a structural block diagram of a magnetohydrodynamic rhythm control device provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0018] The inventors, through analysis of existing technologies, discovered that even when using specialized beat extraction methods to extract beat points from audio data and controlling the on / off frequency of the electromagnetic coil based on these beat points, the magnitude of the magnetic field generated each time is almost identical. This means the magnetic force acting on the magnetofluid is also almost uniform, resulting in minimal variation in the amplitude of each vibration of the magnetofluid, making it difficult to accurately capture the rhythm of music. Research revealed that different magnetic field magnitudes from the electromagnetic coil result in different vibration amplitudes in the magnetofluid, and the magnitude of the electromagnetic coil's magnetic field depends on the magnitude of the current flowing through it. Therefore, this application aims to match the high-energy or rhythmically varied portions of the music data, such as drumbeats, with corresponding current magnitudes. This allows for different current outputs based on varying energy or rhythm, thereby achieving a more realistic match between the vibration of the magnetofluid and the rhythm of the music.
[0019] Reference Figure 1 The diagram illustrates a flowchart of a magnetohydrodynamic rhythmic control method provided in an embodiment of this application. The method includes: Acquire target audio data and generate spectrum data corresponding to the target audio data, and determine the target spectrum data corresponding to the target time period in the spectrum data; The target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with each frequency band; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. Determine the target frequency band with the largest amplitude value among the M frequency bands, and determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; A target PWM wave for the target time period is generated based on the frequency corresponding to the target frequency band and the reference duty cycle, and a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm is output based on the target PWM wave.
[0020] In this embodiment, target audio data is acquired, and spectrum data corresponding to the target audio data is generated. Target spectrum data corresponding to the target time period in the spectrum data is determined. The target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with each frequency band. Wherein, M≥2, and each frequency point is associated with a duty cycle reference table. The target frequency band with the largest amplitude value among the M frequency bands is determined, and the corresponding reference duty cycle is determined in the duty cycle reference table based on the frequency point corresponding to the target frequency band. A target PWM wave for the target time period is generated based on the frequency corresponding to the target frequency band and the reference duty cycle. A current value corresponding to the size of the target PWM wave is output to control the magnetohydrodynamic rhythm. By dividing the audio spectrum data of the target time period into frequency bands, the frequency band with the largest amplitude value is selected. Then, the reference duty cycle is determined based on the frequency point of the frequency band, thereby determining the target PWM wave and obtaining the magnitude of the output current. The electromagnetic coil is controlled to generate a magnetic field of corresponding magnitude, thereby achieving a more realistic fit between the magnetohydrodynamic pulsation and the music rhythm by outputting different currents according to different energies or rhythms.
[0021] The above-described magnetohydrodynamic rhythm control method will be further illustrated below through the following embodiments.
[0022] As described in step S110, target audio data is acquired, and spectrum data corresponding to the target audio data is generated, and target spectrum data corresponding to the target time period in the spectrum data is determined.
[0023] In one embodiment of the present invention, the specific process of "processing the audio data to obtain spectrum data" in step S110 can be further described in conjunction with the following description.
[0024] The process of processing the target audio data to obtain spectrum data, as described in the following steps, includes: The target audio data is transformed into spectrum data using Fourier transform.
[0025] It should be noted that the audio signal is converted from the time domain to the frequency domain using Fourier transform to obtain spectral data, which includes frequency values and corresponding amplitude values. The amplitude value reflects the energy level of a certain frequency; for example, in a piece of music, the energy of a drum sound is relatively greater than that of other instruments. One of the objectives of this application is to make the amplitude of the magnetofluid more obvious during drum sounds, and to allow the amplitude of the magnetofluid's fluctuations to present different visual effects when there are changes in energy or rhythm during continuous drum sounds.
[0026] In this application, an 8-bit ADC is used to sample the audio data, allowing for continuous sampling of the audio data in 200ms intervals. The audio data for each interval is then subjected to a Fourier transform to obtain the spectral data for that interval.
[0027] In this embodiment, the process of acquiring the target audio data includes, prior to: Acquire multi-channel audio signals and convert the audio signals into audio data using a DAC (Digital-to-Analog Converter); The audio signals are output as external audio data and processed as target audio data to obtain spectrum data.
[0028] It should be noted that the aforementioned audio signals can be obtained through various input methods such as Bluetooth reception, microphone pickup, and external audio input.
[0029] As described in step S120, the target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table.
[0030] In one embodiment of the present invention, the specific process of step S120, "dividing the target spectrum data into M frequency bands according to different frequencies and associating frequency points with the frequency bands," can be further explained in conjunction with the following description.
[0031] As described in the following steps, splitting the target spectrum data into M frequency bands according to different frequencies and associating frequency points with the frequency bands includes: The target spectrum data is divided into 7 frequency bands; Each frequency band is associated with a corresponding frequency point based on its frequency magnitude, wherein there are 7 frequency points.
[0032] It should be noted that the target spectrum data can be divided into 7 frequency bands according to 63Hz, 160Hz, 400Hz, 1kHz, 2.5kHz, 6.25kHz, and 16kHz; then, according to the frequency size, the 63Hz frequency band is associated as frequency point 1, the 160Hz frequency band as frequency point 2, the 400Hz frequency band as frequency point 3, the 1kHz frequency band as frequency point 4, the 2.5kHz frequency band as frequency point 5, the 6.25kHz frequency band as frequency point 6, and the 16kHz frequency band as frequency point 7.
[0033] It should be noted that the frequency band of 1kHz can be defined as the mid-frequency band, the frequency band between 63Hz and 1kHz as the low-frequency band, and the frequency band between 1kHz and 16kHz as the high-frequency band. Through extensive practical experience, this application has found that PWM waves obtained by using a larger duty cycle at low frequencies and a smaller duty cycle at high frequencies produce a better representation of the magnetohydrodynamic amplitude caused by the output current. That is, by pre-setting different duty cycles for different frequencies, a corresponding reference duty cycle can be determined after identifying the target frequency band for the target time period, thereby generating the target PWM wave.
[0034] Reference values for high and low levels can be set, as shown in the table below:
[0035] In the table above, HPWM_T represents a high level and LPWM_T represents a low level; the reference duty cycle corresponding to frequency point 1 is 50%, while the reference duty cycle corresponding to frequency point 7 is 25%.
[0036] As described in step S130, the target frequency band with the largest amplitude value among the M frequency bands is determined, and the corresponding reference duty cycle is determined in the duty cycle reference table based on the frequency point corresponding to the target frequency band.
[0037] In one embodiment of the present invention, the specific process of step S130, "determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band," can be further explained in conjunction with the following description.
[0038] As described in the following steps, determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band, includes: Extract historical spectrum data corresponding to historical time periods preceding the target time period; The historical spectrum data is divided into M historical frequency bands according to different frequencies; where M ≥ 2. Identify the target historical frequency band with the largest amplitude value in each of the historical spectrum data, and determine the average amplitude value of all target historical frequency bands; If the amplitude value of the target frequency band is greater than the average amplitude value, then the corresponding reference duty cycle is determined in the duty cycle reference table based on the frequency point corresponding to the target frequency band.
[0039] It should be noted that if the amplitude value of the target frequency band is less than the average amplitude value, the amplitude value of the target frequency band is output; if the amplitude value of the target frequency band is less than the average amplitude value, 0 is output, indicating the end or no response. By judging the target frequency band before determining the reference duty cycle, it is possible to filter out the sounds of specific musical instruments, such as drum sounds.
[0040] As described in step S140, a target PWM wave for the target time period is generated based on the frequency corresponding to the target frequency band and the reference duty cycle, and a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm is output based on the target PWM wave.
[0041] In one embodiment of the present invention, the specific process of step S140, "determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band," can be further explained in conjunction with the following description.
[0042] As described in the following steps, generating the target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle includes: Obtain the magnetohydrodynamic sensitivity input by the user; Determine the ratio of the amplitude value of the target frequency band to the maximum amplitude value to obtain the amplitude proportion of the target frequency band; The target duty cycle is determined based on the magnetohydrodynamic sensitivity, the amplitude ratio, and the reference duty cycle. The target PWM wave is generated based on the target duty cycle and the frequency corresponding to the target frequency band.
[0043] It should be noted that the formula for obtaining the target PWM wave in this embodiment is as follows:
[0044] In the above formula, Indicates the target duty cycle, M and Indicates magnetohydrodynamic sensitivity. This indicates the amplitude percentage. Users can input different sensitivities to adjust the magnetofluid agitation effect.
[0045] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0046] Reference Figure 2This illustration shows a magnetohydrodynamic rhythm control device provided in an embodiment of the present application, used to implement the steps of the magnetohydrodynamic rhythm control method as described in any embodiment of the present application; The device includes: The acquisition module 110 is used to acquire target audio data, generate spectrum data corresponding to the target audio data, and determine the target spectrum data corresponding to the target time period in the spectrum data; The association module 120 is used to split the target spectrum data into M frequency bands according to different frequencies, and associate frequency points with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. The determination module 130 is used to determine the target frequency band with the largest amplitude value among the M frequency bands, and determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; The generation module 140 is used to generate a target PWM wave for a target time period based on the frequency corresponding to the target frequency band and the reference duty cycle, and output a current value of a corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
[0047] Reference Figure 3 The computer device illustrating a magnetohydrodynamic rhythm control method of the present invention may specifically include the following: The computer device 12 described above is in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0048] Bus 18 refers to one or more of several types of bus 18 architectures, including memory bus 18 or memory controller, peripheral bus 18, graphics acceleration port, processor, or local bus 18 using any of the various bus 18 architectures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus 18, Micro Channel Architecture (MAC) bus 18, Enhanced ISA bus 18, Audio / Video Electronics Standards Association (VESA) local bus 18, and Peripheral Component Interconnect (PCI) bus 18.
[0049] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0050] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Figure 3 Not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 42 configured to perform the functions of the embodiments of the present invention.
[0051] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory. Such program modules 42 include—but are not limited to—an operating system, one or more application programs, other program modules 42, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0052] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, camera, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 3 Not shown, it can be combined with computer device 12 to use other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 16, external disk drive array, RAID system, tape drive and data backup storage system 34, etc.
[0053] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a magnetohydrodynamic rhythm control method provided in the embodiments of the present invention.
[0054] That is, when the processing unit 16 executes the above program, it performs the following: acquiring target audio data and generating spectrum data corresponding to the target audio data, determining the target spectrum data corresponding to the target time period in the spectrum data; splitting the target spectrum data into M frequency bands according to different frequencies, and associating frequency points with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table; determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; generating a target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle, and outputting a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
[0055] In this embodiment of the invention, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements a magnetohydrodynamic rhythmic control method as provided in all embodiments of this application: That is, when the program is executed by the processor, it performs the following: acquiring target audio data and generating spectrum data corresponding to the target audio data; determining the target spectrum data corresponding to the target time period in the spectrum data; splitting the target spectrum data into M frequency bands according to different frequencies and associating frequency points with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table; determining the target frequency band with the largest amplitude value among the M frequency bands, and determining the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; generating a target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle, and outputting a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
[0056] Any combination of one or more computer-readable media may be used. A computer-readable medium may be a computer-to-signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that may be used by or in connection with an instruction execution system, apparatus, or device.
[0057] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0058] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.
[0059] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0060] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0061] The above provides a detailed description of the magnetohydrodynamic rhythm control method and apparatus provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A magnetohydrodynamic rhythmic control method, characterized in that, The method includes: The system acquires multi-channel audio signals, converts the audio signals into target audio data through a DAC (Digital-to-Analog Converter), outputs the target audio data as external audio data, generates spectrum data corresponding to the target audio data based on the target audio data, and determines the target spectrum data corresponding to the target time period in the spectrum data. The target spectrum data is divided into M frequency bands according to different frequencies, and frequency points are associated with each frequency band; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. Extract historical spectrum data corresponding to historical periods prior to the target period, and divide the historical spectrum data into M historical frequency bands according to different frequencies; where M≥2; determine the target historical frequency band with the largest amplitude value in each of the historical spectrum data, and determine the average amplitude value of all target historical frequency bands; Determine the target frequency band with the largest amplitude value among the M frequency bands. If the amplitude value of the target frequency band is greater than the average amplitude value, determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band. The system acquires the magnetohydrodynamic sensitivity input by the user, determines the ratio of the amplitude value of the target frequency band to the maximum amplitude value, and obtains the amplitude proportion of the target frequency band; it determines the target duty cycle based on the magnetohydrodynamic sensitivity, the amplitude proportion, and the reference duty cycle; it generates a target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the target duty cycle, and outputs a current value of corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
2. The magnetohydrodynamic rhythm control method according to claim 1, characterized in that, The target audio data is processed to obtain spectrum data, including: The target audio data is transformed into spectrum data using Fourier transform.
3. The magnetohydrodynamic rhythm control method according to claim 1, characterized in that, The step of dividing the target spectrum data into M frequency bands according to different frequencies and associating frequency points with the frequency bands includes: The target spectrum data is divided into 7 frequency bands; Each frequency band is associated with a corresponding frequency point based on its frequency magnitude, wherein there are 7 frequency points.
4. The magnetohydrodynamic rhythm control method according to claim 1, characterized in that, The step of determining the target historical frequency band with the largest amplitude value in each of the historical spectrum data, and determining the average amplitude value of all target historical frequency bands, further includes: If the amplitude value of the target frequency band is greater than the average amplitude value, then output 0.
5. A magnetohydrodynamic rhythm control device, characterized in that, For implementing the magnetohydrodynamic rhythmic control method as described in any one of claims 1-4, the apparatus comprises: The acquisition module is used to acquire target audio data, generate spectrum data corresponding to the target audio data, and determine the target spectrum data corresponding to the target time period in the spectrum data; The association module is used to split the target spectrum data into M frequency bands according to different frequencies, and associate frequency points with the frequency bands; wherein, M≥2, and each frequency point is associated with a duty cycle reference table. The determination module is used to determine the target frequency band with the largest amplitude value among the M frequency bands, and to determine the corresponding reference duty cycle in the duty cycle reference table based on the frequency point corresponding to the target frequency band; The generation module is used to generate a target PWM wave for the target time period based on the frequency corresponding to the target frequency band and the reference duty cycle, and output a current value of a corresponding magnitude for controlling the magnetohydrodynamic rhythm based on the target PWM wave.
6. A device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the magnetohydrodynamic rhythm control method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the magnetohydrodynamic rhythm control method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Proportional electromagnetic valve driving method and system based on PWM (Pulse Width Modulation)
CN104344055A
Lamp effect calibration method and device of LED lamp module, control method and device and electronic equipment
CN115066053A