A music rhythm atmosphere lamp control method and device, vehicle and medium
By controlling the ambient light color change based on music frequency and preset relationships, the problem of overly aggressive ambient light changes in existing technologies is solved, achieving a soothing lighting effect and improving the user experience.
Patent Information
- Application Number
- CN202310231076.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2043-03-10
AI Technical Summary
Existing car ambient lighting changes too aggressively with music, resulting in a poor user experience, easily irritating the eyes, and affecting normal driving.
By controlling the color change of the ambient light based on music frequency and preset relationships, abrupt color changes are prevented. The preset frequency and color correspondence are used to determine whether the target color cannot appear continuously with the previously displayed color, and the ambient light color is controlled to switch according to the preset color.
It achieves gentle changes in ambient lighting, enhances the user experience, reduces eye strain, and does not affect normal driving.
Smart Images

Figure CN116234122B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automobile control, and particularly relates to a music rhythm atmosphere lamp control method and device, a vehicle and a medium. BACKGROUND
[0002] With the gradual development of the automobile industry, the comfort and experience of automobiles are gradually improved. Among them, the automobile atmosphere lamp becomes a necessary configuration of high-end vehicles. The automobile atmosphere lamp can move with the music, so that the passengers have a more comfortable experience.
[0003] However, the atmosphere lamp in the prior art mostly changes directly with the amplitude of the music, which leads to that if the music is more aggressive, the change of the atmosphere lamp will be larger, for example, the color is changed from white to black for many times in a short time, and the brightness changes greatly in a short time. At this time, the user experience is poor, and the frequent changes can easily irritate the eyes and affect normal driving.
[0004] Therefore, how to make the atmosphere lamp change slowly with the music is a technical problem that needs to be solved by those skilled in the art. SUMMARY
[0005] Therefore, the embodiments of the present application provide a music rhythm atmosphere lamp control method and device, which aims to make the atmosphere lamp change slowly with the music.
[0006] In a first aspect, the embodiments of the present application provide a music rhythm atmosphere lamp control method, comprising:
[0007] determining a target frequency based on currently played music;
[0008] determining a target color corresponding to the target frequency according to a first preset relationship, the first preset relationship including a preset corresponding relationship between frequency and color;
[0009] judging whether the target color and a previously displayed color of the atmosphere lamp cannot appear continuously according to a second preset relationship, the second preset relationship including a corresponding relationship between colors that cannot appear continuously by the atmosphere lamp;
[0010] if yes, controlling the color of the atmosphere lamp to switch from the previously displayed color to a preset color.
[0011] Optionally, the method further comprises:
[0012] if no, controlling the color of the atmosphere lamp to switch from the previously displayed color to the target color.
[0013] Optionally, the determining of the target frequency based on the currently played music comprises:
[0014] acquire a plurality of frequencies of the currently played music, and amplitudes corresponding to the plurality of frequencies respectively;
[0015] divide each of the amplitudes by a preset divisor corresponding to the amplitude to obtain a plurality of results, the preset divisor corresponding to each of the amplitudes being negatively correlated with a frequency corresponding to the amplitude;
[0016] determine a frequency corresponding to a maximum value of the plurality of results as a target frequency.
[0017] Optionally, the plurality of frequencies include a first frequency and a second frequency, and the acquiring of the plurality of frequencies of the currently played music includes:
[0018] acquiring the first frequency of the currently played music, the first frequency being determined according to a frequency range of a human voice;
[0019] acquiring the second frequency of the currently played music, the second frequency being determined according to a frequency range of a musical instrument.
[0020] Optionally, the method further includes:
[0021] calculating a target average value of the amplitudes corresponding to the plurality of frequencies;
[0022] determining a target brightness corresponding to the target average value according to a third preset relationship, the third preset relationship including a preset correspondence between average values and brightnesses;
[0023] controlling a brightness of the atmosphere lamp to be the target brightness.
[0024] Optionally, a difference between frequencies corresponding to the colors that cannot appear continuously is greater than a preset threshold.
[0025] In a second aspect, an embodiment of the present application provides a music rhythm atmosphere lamp control device, including:
[0026] a first determining module configured to determine a target frequency based on currently played music;
[0027] a second determining module configured to determine a target color corresponding to the target frequency according to a first preset relationship, the first preset relationship including a preset correspondence between frequencies and colors;
[0028] a judging module configured to judge whether the target color and a previously displayed color of the atmosphere lamp cannot appear continuously according to a second preset relationship, the second preset relationship including a correspondence between colors that cannot appear continuously of the atmosphere lamp;
[0029] a first control module configured to control a color of the atmosphere lamp to be switched from the previously displayed color to a preset color.
[0030] Optionally, the first determining module comprises:
[0031] A first obtaining unit is configured to obtain a plurality of frequencies of currently played music and amplitudes corresponding to the plurality of frequencies respectively;
[0032] A calculating unit is configured to divide each amplitude by a preset divisor corresponding to the amplitude to obtain a plurality of results, the preset divisor corresponding to each amplitude being negatively correlated with a frequency corresponding to the amplitude;
[0033] A first determining unit is configured to determine a frequency corresponding to a maximum value in the plurality of results as a target frequency.
[0034] In a third aspect, an embodiment of the present application provides a vehicle, the vehicle comprising a controller, the controller being configured to execute the music rhythm atmosphere lamp control method according to any one of the first aspect.
[0035] In a fourth aspect, an embodiment of the present application provides a computer storage medium, the computer storage medium storing code, when the code is executed, a device executing the code implements the music rhythm atmosphere lamp control method according to any one of the first aspect.
[0036] The music rhythm atmosphere lamp control method, device, vehicle and medium provided by the embodiments of the present application, when the method is executed, first, a target frequency is determined based on currently played music; then, a target color corresponding to the target frequency is determined according to a first preset relationship, the first preset relationship comprising a preset corresponding relationship between frequencies and colors; then, whether the target color and a color displayed by an atmosphere lamp last time cannot be continuously displayed is determined according to a second preset relationship, the second preset relationship comprising a corresponding relationship between colors which cannot be continuously displayed by the atmosphere lamp; finally, if yes, a color of the atmosphere lamp is switched from the color displayed last time to a preset color. In this way, according to characteristics of music, by using the preset corresponding relationship between frequencies and colors and the colors which cannot be continuously displayed, a jump change between a color displayed last time by the atmosphere lamp and a color corresponding to a current frequency is prevented, so that a change of the atmosphere lamp is more comfortable, and a use experience of a user is improved. BRIEF DESCRIPTION OF DRAWINGS
[0037] To make the technical solutions in the embodiments or the prior art clearer, the following will briefly introduce the drawings needed in the embodiments or the prior art description. Obviously, the drawings in the following description only show some embodiments of the present application, and for those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0038] Figure 1 A method flow chart of the music rhythm atmosphere lamp control method provided by the embodiments of the present application is shown in the following table.
[0039] Figure 2 Another method flowchart of the music rhythm atmosphere lamp control method provided by the embodiment of the present application is shown in FIG. 2.
[0040] Figure 3 A structural schematic diagram of the music rhythm atmosphere lamp control device provided by the embodiment of the present application is shown in FIG. 3. DETAILED DESCRIPTION
[0041] The atmosphere lamps in the prior art mostly change directly with the amplitude of music, which results in that if the music is more aggressive, the change of the atmosphere lamp will be larger, for example, the atmosphere lamp changes from white to black for many times in a short time, and the brightness changes greatly in a short time. At this time, the user experience is poor, and the multiple changes easily irritate the eyes and affect normal driving.
[0042] The method provided by the embodiment of the present application is executed by a vehicle controller, and is used to make the atmosphere lamp change slowly with music.
[0043] Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in 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.
[0044] Reference Figure 1 , Figure 1 A method flowchart of the music rhythm atmosphere lamp control method provided by the embodiment of the present application is shown in FIG. 2, which comprises the following steps.
[0045] Step S101: determining a target frequency based on currently played music.
[0046] The target frequency can be any frequency of the currently played music, which is used as a basis for controlling the change of the atmosphere lamp.
[0047] As a preferred, since the highlighted frequency is different in different stages of any music playing, for example, in the prelude part, the highlighted frequency is mostly the frequency corresponding to the musical instrument, so that the rhythm can be highlighted, and then the lyrics are gradually introduced; and in the chorus part, the highlighted frequency is mostly the frequency corresponding to the human voice, so that the performance of the singer to the music can be highlighted. Therefore, the currently most highlighted frequency can be determined based on the currently played music as the target frequency. In this way, the change of the atmosphere lamp is more closely related to the music.
[0048] Step S102: determining a target color corresponding to the target frequency according to a first preset relationship.
[0049] The first preset relationship includes a preset corresponding relationship between frequency and color. For example, a preset frequency of 63 Hz corresponds to a color of red, and a frequency of 160 Hz corresponds to a color of purple. The specific preset relationship can be set according to requirements, and is not limited herein.
[0050] In the case where the target frequency and the first preset relationship are known, the color corresponding to the target frequency in the preset relationship can be found as the target color.
[0051] Step S103: According to the second preset relationship, it is judged whether the target color and the color displayed by the atmosphere lamp last time cannot be continuously displayed.
[0052] The second preset relationship includes a corresponding relationship between colors that cannot be continuously displayed by the atmosphere lamp. For example, the second preset relationship can preset red and purple as colors that cannot be continuously displayed. The specific preset relationship can be set according to requirements, and is not limited herein.
[0053] After obtaining the target color, the color displayed by the atmosphere lamp last time is obtained, and is compared with the second preset relationship to judge whether the two are colors that cannot be continuously displayed in the second preset relationship.
[0054] Step S104: If yes, the color of the atmosphere lamp is controlled to switch from the color displayed last time to a preset color.
[0055] If yes, it means that the target color cannot be continuously displayed with the color of the atmosphere lamp last time. Therefore, the target color cannot be controlled to be the color displayed by the atmosphere lamp this time. The color displayed by the atmosphere lamp this time should be a preset color, which can be preset as a color that does not jump with the continuous display of each color. The preset color is not limited herein.
[0056] In summary, according to the characteristics of the music, the preset frequency-color corresponding relationship and the colors that cannot be continuously displayed are used to prevent the color displayed by the atmosphere lamp last time and the color corresponding to the current frequency from jumping, so that the change of the atmosphere lamp is more comfortable, and the use experience of the user is improved.
[0057] In the embodiments of the present application, the above Figure 1 The steps described above have various possible implementation manners, which will be introduced below. It should be noted that the implementation manners given in the following introduction are only exemplary and do not represent all implementation manners of the embodiments of the present application.
[0058] Referring to Figure 2 The figure is another method flowchart of the music rhythm atmosphere lamp control method provided by the embodiments of the present application, which includes:
[0059] Step S201: Obtain a plurality of frequencies of the currently played music, and amplitudes corresponding to the plurality of frequencies respectively.
[0060] The frequency range of the currently played music is about 20Hz-20KHz. Because the music usually includes human voice and the sound of various musical instruments, the frequency range of the sound corresponding to different sound sources is different, so when the currently played music is not the sound of a single sound source, the currently played music includes several frequencies.
[0061] The central control large screen is responsible for the playing of music and the issuance of frequency and amplitude. It will first select one or more frequencies in the frequency range of each sound source according to the characteristics of the current music; then obtain the amplitude corresponding to the selected frequency (each frequency has a corresponding amplitude); finally, issue the multiple frequencies of the currently played music and the amplitudes corresponding to each of the multiple frequencies to the vehicle controller, so that the vehicle controller controls the change of the atmosphere lamp based on the above information.
[0062] For example, the main sound source of the currently played music is human, viola and violin. The frequency range of human singing is about 300Hz-3.4KHz; the frequency range of violin sound is about 200Hz-400Hz; the frequency range of viola sound is about 150Hz-300Hz. The central control large screen can first select 2 music frequencies in the frequency range commonly used by human singing, i.e. 63Hz and 160Hz; select 1 music frequency in the frequency range commonly used by violin sound, i.e. 300Hz; select 1 music frequency in the frequency range commonly used by viola sound, i.e. 150Hz; then obtain the amplitudes corresponding to 63Hz, 160Hz, 300Hz and 150Hz respectively; finally, issue 63Hz and its corresponding amplitude, 160Hz and its corresponding amplitude, 300Hz and its corresponding amplitude, and 150Hz and its corresponding amplitude to the vehicle controller, so that the vehicle controller obtains the multiple frequencies of the currently played music and the amplitudes corresponding to each of the multiple frequencies.
[0063] Therefore, as a possible implementation, the multiple frequencies include a first frequency and a second frequency, and the obtaining of the multiple frequencies of the currently played music includes:
[0064] obtaining a first frequency of the currently played music, the first frequency being determined according to a human voice frequency range;
[0065] obtaining a second frequency of the currently played music, the second frequency being determined according to a musical instrument frequency range.
[0066] Step S202: Divide each amplitude by a corresponding preset divisor to obtain multiple results.
[0067] The greater the amplitude, the greater the loudness. When determining whether multiple frequencies are the most prominent music of the current music, the frequency with the largest amplitude is needed to find the most prominent music frequency. However, considering the characteristics of music, generally the voice is larger, and the instrument sound is smaller; the voice frequency is small, and the instrument sound frequency is large; when most of the instrument sound is highlighted, it may still not be higher than the voice.
[0068] Therefore, each amplitude can be divided by a corresponding preset divisor to obtain multiple results, and the preset divisor corresponding to each amplitude is negatively related to the frequency corresponding to each amplitude. That is, the amplitude of a higher frequency is divided by a smaller divisor. For example: 63Hz amplitude value divided by 5, 160Hz amplitude value divided by 3, 400Hz amplitude value divided by 2, 1KHz amplitude value divided by 1.5, 2.5KHz amplitude value divided by 1.3, 6.25KHz amplitude value divided by 1, and 16KHz amplitude value divided by 1. In this way, for most songs, the music frequency currently played can be relatively reasonably arranged in terms of prominence based on the size of the multiple results.
[0069] In this way, the multiple results obtained by dividing the amplitude are concentrated in a fixed area, and even if the amplitude changes greatly, the corresponding results will change less. Further, when determining the color based on the multiple results, since the results change less, the corresponding colors are also relatively close, which can prevent the color from changing too much and improve the user's experience.
[0070] Step S203: determining that the frequency corresponding to the maximum value in the multiple results is the target frequency.
[0071] Since the multiple results represent the prominence of multiple frequencies in the music, the frequency corresponding to the maximum value in the multiple results can be determined as the target frequency. The color change of the atmosphere lamp is determined based on the frequency that the music wants to highlight the most, so that the change of the atmosphere lamp is more closely related to the music.
[0072] Step S204: determining the target color corresponding to the target frequency based on a first preset relationship.
[0073] As a possible implementation, the first preset relationship can be set to change the corresponding color from left to right (or from right to left) on the spectrum when the frequency changes from small to large (or from large to small), so as to ensure that the frequency change and the corresponding color change on the spectrum are related, and further make the color of the atmosphere lamp more comfortable.
[0074] For example, 63Hz corresponds to red, 160Hz corresponds to orange, 400Hz corresponds to blue, 1KHz corresponds to green, 2.5KHz corresponds to purple, 6.25KHz corresponds to white, and 16KHz corresponds to white. Alternatively, 63Hz corresponds to white, 160Hz corresponds to white, 400Hz corresponds to purple, 1KHz corresponds to green, 2.5KHz corresponds to blue, 6.25KHz corresponds to orange, and 16KHz corresponds to red.
[0075] Step S205: According to the second preset relationship, it is judged whether the target color and the color displayed by the atmosphere lamp last time cannot appear continuously.
[0076] As a possible implementation, the difference between the frequencies corresponding to the colors that cannot appear continuously can be greater than a preset threshold. In this way, when the frequency change has a correlation with the change of the color in the spectrum, the span of the colors that cannot appear continuously in the spectrum can be prevented from being too large, causing discomfort to the eyes.
[0077] As another possible implementation, the second preset relationship further includes a preset corresponding relationship between the frequencies that cannot appear continuously.
[0078] According to the second preset relationship, it is judged whether the target color and the color displayed by the atmosphere lamp last time cannot appear continuously, including:
[0079] In response to the target frequency being a third frequency, according to the first preset relationship, the frequency corresponding to the color displayed by the atmosphere lamp last time is obtained as a fourth frequency;
[0080] The frequency range in which the third frequency cannot appear continuously is obtained.
[0081] It is judged whether the fourth frequency is located in the frequency range in which the third frequency cannot appear continuously.
[0082] If yes, it is determined that the target color and the color displayed by the atmosphere lamp last time cannot appear continuously.
[0083] If no, it is determined that the target color and the color displayed by the atmosphere lamp last time can appear continuously.
[0084] For example, when the target frequency is 63Hz, and the color corresponding to 63Hz is red, the frequency range in which 63Hz cannot appear continuously is obtained. Assuming that the frequency range in which 63Hz cannot appear continuously is the frequency not greater than 400Hz, the frequency corresponding to the color orange displayed by the atmosphere lamp last time is obtained. Only when the frequency is greater than 400Hz, the atmosphere lamp can display the color red corresponding to 63Hz.
[0085] Step S206: If yes, the color of the atmosphere lamp is controlled to switch from the color displayed last time to a preset color.
[0086] Step S207: If no, the color of the atmosphere lamp is controlled to switch from the color of the previous display to the target color.
[0087] If yes, it means that the target color can be continuous with the color of the previous atmosphere lamp, and the change is smooth, which will not cause discomfort to the eyes and can improve the experience of the passengers. Therefore, the target color can be controlled as the color of the atmosphere lamp this time.
[0088] Step S208: Calculate the target average value of the amplitudes corresponding to the plurality of frequencies.
[0089] The plurality of frequencies represent the frequencies of a plurality of sound-emitting subjects included in the currently played music, and the amplitudes corresponding thereto represent the loudness of a plurality of sound-emitting subjects included in the currently played music. The average value of the amplitudes corresponding to the plurality of frequencies can be calculated to obtain the loudness of the currently played music. Based on this, the brightness of the atmosphere lamp is adjusted, so that the change of the atmosphere lamp is more closely related to the music.
[0090] Step S209: Determine the target brightness corresponding to the target average value according to a third preset relationship.
[0091] The third preset relationship includes a preset correspondence between the average value and the brightness, for example, a preset average value of 90 corresponds to a brightness of 90%, and a preset average value of 80 corresponds to a brightness of 80%. The specific preset relationship can be set according to requirements, which is not limited herein. In the case where the target average value and the third preset relationship are known, the target brightness corresponding to the target average value can be found in the preset relationship.
[0092] As a possible implementation, the third preset relationship can set a brightness level that can change with the music, for example, the brightness of the atmosphere lamp is divided into 11 levels, which are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, and 10, respectively, corresponding to a brightness of 0, 10%, 20%, 30%, 40%, 50%, 60%, 70%, 80%, 90%, and 100%, respectively. Since the brightness above 80% is too high, it will cause discomfort to the eyes of the driver or affect normal driving. Therefore, the third preset relationship can limit the brightness level that can change with the music to only eight levels from 0 to 7. And the average value and the above eight levels are corresponded. Specifically, the average value can be divided by 100, multiplied by 7, and rounded off to obtain a value from 0 to 7, which corresponds to the brightness of the atmosphere lamp from 0 to 7, thereby establishing a correspondence between the average value and the above eight levels.
[0093] Step S210: Control the brightness of the atmosphere lamp to be the target brightness.
[0094] After the target brightness is obtained, the ambience lamp can be controlled to adjust the brightness to the target brightness, so that the brightness of the ambience lamp changes with the music.
[0095] In summary, the brightness and color of the ambience lamp are adjusted in the embodiment, so that the ambience lamp can change gently with the amplitude of the music, and will not change sharply in a short time or be incompatible with the music. In this way, the user's experience is better, the eyes are not easily stimulated, and normal driving is not affected.
[0096] The above is some specific implementation of the music rhythm ambience lamp control method provided by the embodiment of the application. Based on this, the application also provides a corresponding device. The device provided by the embodiment of the application will be introduced from the perspective of functional modularization.
[0097] Referring to Figure 3 The device includes a first determination module 301, a second determination module 302, a judgment module 303, and a first control module 304.
[0098] The first determination module 301 is configured to determine a target frequency based on currently played music.
[0099] The second determination module 302 is configured to determine a target color corresponding to the target frequency according to a first preset relationship, wherein the first preset relationship includes a preset corresponding relationship between frequencies and colors.
[0100] The judgment module 303 is configured to judge whether the target color and a previously displayed color of the ambience lamp cannot appear continuously according to a second preset relationship, wherein the second preset relationship includes a corresponding relationship between colors that cannot appear continuously.
[0101] The first control module 304 is configured to control the color of the ambience lamp to switch from the previously displayed color to a preset color.
[0102] As a possible implementation, the device further includes:
[0103] The second control module is configured to control the color of the ambience lamp to switch from the previously displayed color to the target color.
[0104] As a possible implementation, the first determination module 301 includes:
[0105] The first acquisition unit is configured to acquire a plurality of frequencies of currently played music and amplitudes corresponding to the plurality of frequencies respectively.
[0106] The computing unit is configured to divide each amplitude by a preset divisor corresponding to the respective frequency to obtain a plurality of results, wherein the preset divisor corresponding to each amplitude is negatively correlated with the frequency corresponding to the respective amplitude.
[0107] The first determining unit is configured to determine that the frequency corresponding to the maximum value in the plurality of results is the target frequency.
[0108] As a possible implementation, the plurality of frequencies includes a first frequency and a second frequency, and the first obtaining unit includes:
[0109] The first obtaining component is configured to obtain a first frequency of the currently played music, wherein the first frequency is determined according to a vocal frequency range.
[0110] The second obtaining component is configured to obtain a second frequency of the currently played music, wherein the second frequency is determined according to an instrument frequency range.
[0111] As a possible implementation, the device further includes:
[0112] The computing module is configured to calculate a target average value of the amplitudes corresponding to the plurality of frequencies.
[0113] The brightness determining module is configured to determine a target brightness corresponding to the target average value according to a third preset relationship, wherein the third preset relationship includes a preset correspondence between average values and brightnesses.
[0114] The brightness control module is configured to control the brightness of the atmosphere lamp to be the target brightness.
[0115] As a possible implementation, the difference between the frequencies corresponding to the colors that cannot appear continuously is greater than a preset threshold.
[0116] Embodiments of the present application also provide a corresponding vehicle and a computer storage medium, for implementing the scheme provided by the embodiments of the present application.
[0117] The vehicle includes a controller, and the controller is configured to execute the music rhythm atmosphere lamp control method described in any embodiment of the present application.
[0118] The vehicle further includes a central control screen, and the central control screen is responsible for playing music and issuing frequencies and amplitudes. The central control screen will first select one or more frequencies in the frequency range of each sound-emitting subject according to the characteristics of the current music, then obtain the amplitudes corresponding to the selected frequencies (each frequency has a corresponding amplitude), and finally issue the plurality of frequencies of the currently played music and the amplitudes corresponding to the plurality of frequencies to the vehicle controller, so that the vehicle controller controls the change of the atmosphere lamp based on the above information.
[0119] The computer storage medium stores code, and when the code is executed, a device executing the code implements the music rhythm atmosphere lamp control method of any of the embodiments of the present application.
[0120] The "first" and "second" in the names of the "first" and "second" mentioned in the embodiments of the present application are only used for name identification, and do not represent the first and second in order.
[0121] From the above description of the embodiments, those skilled in the art can clearly understand that all or part of the steps of the above-mentioned embodiment methods can be implemented by means of software plus a general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product. The computer software product can be stored in a storage medium, such as a read-only memory (English: read-only memory, ROM) / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in various embodiments or some parts of the embodiments.
[0122] Each of the embodiments in the specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device embodiments, since they are basically similar to the method embodiments, they are described more simply, and the relevant parts can be referred to the part of the method embodiments. According to the actual needs, some or all of the modules can be selected to achieve the purpose of the embodiment scheme. Those skilled in the art can understand and implement without creative labor.
[0123] The above is only an exemplary embodiment of the present application, and is not intended to limit the protection scope of the present application.
Claims
1. A music mood light control method, characterized in that, The method comprises: determining a target frequency based on currently played music; determining a target color corresponding to the target frequency according to a first preset relationship, the first preset relationship comprising a preset corresponding relationship between frequency and color; judging whether the target color and a previously displayed color of the atmosphere lamp cannot appear continuously according to a second preset relationship, the second preset relationship comprising a corresponding relationship between colors that cannot appear continuously by the atmosphere lamp; if yes, controlling the color of the atmosphere lamp to switch from the previously displayed color to a preset color; the determining of the target frequency based on the currently played music comprises: obtaining a plurality of frequencies of the currently played music and amplitudes corresponding to the plurality of frequencies respectively; dividing each amplitude by a preset divisor corresponding to the amplitude to obtain a plurality of results, the preset divisor corresponding to each amplitude being negatively related to the frequency corresponding to the amplitude; determining a frequency corresponding to a maximum value in the plurality of results as the target frequency.
2. The method of claim 1, wherein, The method further comprises: if no, controlling the color of the atmosphere lamp to switch from the previously displayed color to the target color.
3. The method of claim 1, wherein, The plurality of frequencies comprises a first frequency and a second frequency, and the obtaining of the plurality of frequencies of the currently played music comprises: obtaining the first frequency of the currently played music, the first frequency being determined according to a vocal frequency range; obtaining the second frequency of the currently played music, the second frequency being determined according to an instrument frequency range.
4. The method of claim 1, wherein, The method further comprises: calculating a target average value of the amplitudes corresponding to the plurality of frequencies respectively; determining a target brightness corresponding to the target average value according to a third preset relationship, the third preset relationship comprising a preset corresponding relationship between average value and brightness; controlling the brightness of the atmosphere lamp to be the target brightness.
5. The method of claim 1, wherein, The difference between the frequencies corresponding to the colors that cannot appear continuously is greater than a preset threshold.
6. A music mood light control device, characterized by, The device comprises: a first determining module configured to determine a target frequency based on currently played music; a second determining module configured to determine a target color corresponding to the target frequency according to a first preset relationship, the first preset relationship comprising a preset corresponding relationship between frequency and color; a judging module configured to judge whether the target color and a previously displayed color of the atmosphere lamp cannot appear continuously according to a second preset relationship, the second preset relationship comprising a corresponding relationship between colors that cannot appear continuously by the atmosphere lamp; a first controlling module configured to control the color of the atmosphere lamp to switch from the previously displayed color to a preset color; the first determining module comprises: a first obtaining unit configured to obtain a plurality of frequencies of the currently played music and amplitudes corresponding to the plurality of frequencies respectively; a calculating unit configured to divide each amplitude by a preset divisor corresponding to the amplitude to obtain a plurality of results, the preset divisor corresponding to each amplitude being negatively related to the frequency corresponding to the amplitude; a first determining unit configured to determine a frequency corresponding to a maximum value in the plurality of results as the target frequency.
7. A vehicle characterized by comprising: The vehicle comprises a controller configured to execute the music rhythm atmosphere lamp control method according to any one of claims 1 to 5.
8. A computer storage medium, characterized in that The computer storage medium stores codes, when the codes are run, the computer storage device running the codes implements the music rhythm atmosphere lamp control method in any one of claims 1 to 5.
Citation Information
Patent Citations
Atmosphere lamp control method and intelligent car
CN108924988A
Vehicle-mounted atmosphere lamp dynamic adjustment method based on music rhythm
CN115071559A