Music playing linkage light method and system, computer equipment and storage medium
By identifying and responding to the playing device and song types in the in-vehicle ambient light system, and adjusting the lights using amplitude and frequency analysis technology, the problem of single lighting effects of the existing in-vehicle ambient lights is solved, and personalized lighting interaction synchronized with the user's playing device is realized.
Patent Information
- Application Number
- CN202411635505.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-15
- Publication Date
- 2025-02-28
AI Technical Summary
The existing in-car ambient lights cannot adjust the light in real time according to the type of the playing device and the type of the playing song, resulting in a single lighting effect and the inability to achieve personalized interaction synchronized with the user's playing device.
By detecting the playing device and receiving the user's playing signal, collecting the sound signals in the car, performing amplitude and frequency analysis of the audio signal, issuing a light change control signal based on the analysis results, and adjusting the lights to match the rhythm and melody of the music.
The lighting is dynamically adjusted according to the playing device and song type, which improves the personalization and interactivity of the user experience and provides richer and more interesting lighting effects.
Smart Images

Figure CN119545614A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vocal lighting control technology, and in particular to a method, system, computer device and storage medium for linking music playing with lighting. Background Art
[0002] The in-car ambient lights come in various forms, such as monochrome, breathing, and music rhythm. Although they enhance the driving pleasure of the smart cockpit, they are monotonous in style, inherent in the design scheme, and homogenized. It is impossible to adjust the in-car ambient lights based on real-time music to achieve real-time synchronous interactive functions, and it cannot bring users a more pleasant, personalized, and fun experience. Moreover, the vehicle side does not have an interface reserved for expanding user-created music, and it is impossible to adjust the in-car ambient lights in conjunction with the music played by the user's playing device. Even if the music played by the user's playing device is collected, the existing in-car ambient light adjustment method cannot achieve different lighting adjustments based on the type of playing device and the type of song played, and the lighting effect is monotonous. Summary of the invention
[0003] Based on this, a music playing linked lighting method, system, computer equipment and storage medium are provided to solve the technical problem that the existing in-car atmosphere lighting adjustment method cannot achieve different lighting adjustments according to the type of playing device and the type of song played, and the lighting effect is single.
[0004] On the one hand, a method for linking music playing with lighting is provided, the method comprising:
[0005] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0006] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0007] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0008] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0009] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0010] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0011] In one embodiment, the converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played, comprises:
[0012] Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands;
[0013] Analyze the sound signal and filter it to obtain an audio signal;
[0014] Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0015] An amplitude-frequency analysis is performed on the tail audio data of each audio processing cycle of the audio signal to obtain an amplitude-frequency value of each preconfigured amplitude-frequency band.
[0016] In one of the embodiments, performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0017] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0018] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0019] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0020] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0021] In response to obtaining the amplitude-frequency value of the tail tone audio data of the current audio processing cycle duration in the preconfigured amplitude-frequency band, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0022] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0023] In one embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0024] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0025] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0026] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0027] In one embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0028] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0029] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0030] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0031] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0032] In one embodiment, the step of sending a light change control signal according to the amplitude and frequency value of the audio signal comprises:
[0033] Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0034] Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second light control signal according to the real sound part and the imaginary sound part;
[0035] The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
[0036] In one embodiment, matching the playing device includes:
[0037] Determining whether the playing device is connected to the vehicle-end interface for the first time;
[0038] If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated;
[0039] In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful;
[0040] In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
[0041] In one embodiment, the sound signal also includes music played on the vehicle end; and converting the target sound signal into an audio signal includes:
[0042] Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0043] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0044] On the other hand, a music playing linked lighting system is provided, the system comprising:
[0045] A playing device connection authentication module, used for matching the playing device in response to detecting that the playing device is connected to the vehicle end through the vehicle end interface;
[0046] A playing combination acquisition module, for parsing the playing signal in response to receiving the playing signal from the user, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0047] A sound collection module, used to collect sound signals in the vehicle end and obtain a target sound signal, wherein the target sound signal at least includes a music signal played by the playing device;
[0048] An audio processor, used for converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0049] A lighting controller, used for sending a lighting change control signal according to the amplitude and frequency value of the audio signal;
[0050] The lighting module is used for adjusting the lighting according to the lighting change control signal in response to receiving the lighting change control signal.
[0051] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0052] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0053] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0054] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0055] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0056] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0057] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0058] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0059] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0060] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0061] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0062] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0063] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0064] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0065] The above-mentioned music playing and lighting linkage method, system, computer equipment and storage medium connect the playing device to the vehicle side through the vehicle side interface, so as to realize the connection between the vehicle side and the playing device, and the vehicle side can authenticate the playing device and manage the connection status, analyze the playing signal to obtain the type of the playing device and the type of the song played, and identify the amplitude and frequency values corresponding to the sound signal collected in the vehicle side based on the combination of the type of music song and the type of the playing device to adjust the color, brightness, flashing frequency and lighting range of the light array. At the same time, according to the rhythm and melody of the music, the lights can present different changing rhythms and patterns, which can enhance the personalized experience, increase interactivity and fun, and have strong applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0067] Figure 1 This is a flow chart of a method for linking music playing with lighting in one embodiment of the present application;
[0068] Figure 2 A schematic diagram of a flow chart of the steps of matching the playing device in one embodiment of the present application;
[0069] Figure 3 A flowchart of the steps of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain corresponding amplitude-frequency values according to the type of the playing device and the type of the song being played in one embodiment of the present application;
[0070] Figure 4 This is a flow chart of the steps of sending a light change control signal according to the amplitude and frequency value of the audio signal in one embodiment of the present application;
[0071] Figure 5 This is a structural block diagram of a music playing linked lighting system in one embodiment of the present application;
[0072] Figure 6 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0074] In one embodiment, Figure 1 As shown, a music playing linked lighting method is provided, comprising the following steps:
[0075] Step S1, in response to detecting that a playing device is connected to a vehicle end through a vehicle end interface, matching the playing device;
[0076] Step S2, in response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0077] Step S3, collecting the sound signal in the vehicle end to obtain a target sound signal, wherein the target sound signal at least includes a music signal played by the playing device;
[0078] Step S4, converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0079] Step S5, sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0080] Step S6, in response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0081] Among them, the playing device is connected to the vehicle end through the vehicle end interface, so that the vehicle end and the playing device can be connected, and the vehicle end can authenticate and manage the connection status of the playing device.
[0082] In addition, the sound signal collected in the vehicle end includes the music signal produced by the playing device, and the in-vehicle atmosphere light can be adjusted based on the music played by the playing device. The playing signal is analyzed to obtain the type of the playing device and the type of the song played. The amplitude-frequency value corresponding to the sound signal collected in the vehicle end is identified based on the combination of the type of music song and the type of the playing device to adjust the color, brightness, flashing frequency and lighting range of the light array. At the same time, according to the rhythm and melody of the music, the light can present different changing rhythms and patterns, which can enhance the personalized experience, increase interactivity and fun, and has strong applicability.
[0083] Specifically, this embodiment captures the audio signal of the music playing, analyzes the rhythm, melody, timbre and other characteristics of the music in real time, and controls the brightness, color, flashing frequency, etc. of the lights accordingly, to achieve a perfect fusion of music and lights, and bring an immersive audio-visual experience to users.
[0084] In this embodiment, in response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, the method includes:
[0085] Importing music songs into the playing device through the first interface;
[0086] The playing device is connected to the vehicle end via the second interface.
[0087] Preferably, the first interface is a USB interface, and the second interface is a USB interface or a TYPE-C interface. When in use, the user first inserts the favorite music songs into the USB interface of the playing device using a USB disk, and then connects the playing device to the USB interface or TYPE-C interface of the vehicle end.
[0088] like Figure 2 As shown, in this embodiment, matching the playing device includes:
[0089] Step S11, determining whether the playing device is connected to the vehicle-side interface for the first time;
[0090] Step S12, if yes, then the playing device is authenticated for the first time, if no, it is determined that the playing device has been authenticated;
[0091] Step S13, in response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating successful matching authentication; in response to the playing device not being authenticated, displaying a second image indicating unsuccessful matching authentication, and reconnecting the playing device.
[0092] The first authentication of the playing device includes: obtaining a user account password, detecting whether the user account password matches, if so, determining that the playing device is authenticated, if not, determining that the playing device is not authenticated; or reading a unique identification code of the playing device, detecting whether the unique identification code of the playing device has been saved, if so, determining that the playing device is authenticated, if not, determining that the playing device is not authenticated.
[0093] Specifically, when connecting the Playing device for the first time, the user needs to open the third-party application center on the car screen. At this time, the car screen pops up a search for the device for 3S (quantity can be marked), and the "Playing" device interface is seen. When the user clicks the "Playing" APP interface, a password matching authentication pops up automatically. When the user enters the set password, the matching authentication takes 5S (quantity can be marked). The password can be a combination of numbers or letters, or a combination of numbers, letters and special symbols.
[0094] When the playing device is matched and connected, the status bar on the vehicle screen displays the playing gesture characters. The blue icon represents a successful match, and the gray icon represents an unmatched match. That is, the first image is a blue icon and the second image is a gray icon, which is used to distinguish whether the match is successful.
[0095] When the playing device is authenticated successfully, the playing device system is in the background standby state. The performance requirements of the playing device are: static current ≤ 0.05mA, static noise ≤ 10dB; working current ≤ 0.5mA, working noise ≤ 20dB. Avoid noise interference from the playing device.
[0096] Therefore, after determining that the playing device is authenticated, the method further includes:
[0097] Obtain the static current value, static noise value, working current value and working noise value of the playing device when it is in standby state, and determine whether the playing device can play a song based on whether the static current value, static noise value, working current value and working noise value are less than or equal to preset thresholds.
[0098] When the user sees the blue playing gesture character icon displayed in the status bar of the vehicle-side large screen, he clicks "Play" in the third-party application center of the vehicle-side large screen to open the APP interface, and a pop-up interface with "Yes" and "No" buttons will appear to select the type of music song and the type of playing device to form a playing combination.
[0099] When the user clicks the "Yes" confirmation button, the car screen pops up the music playing keyboard interface, and the HMI interface sets the options: 1) In the type of music songs, the options for music songs include DJ, folk, pop, pure music, English, etc.; 2) In the type of playing device, the options for playing devices include piano, guitar, guzheng, erhu, harmonica, saxophone, and beginners can learn. These options can be released to the user to freely combine and select to form a playing combination.
[0100] For example, when the user selects a combination of pop music and piano keys and clicks the confirmation button, piano keys will appear on the large screen interface of the vehicle, and the effect of the combination will be previewed with operation guide dynamic effects to facilitate user understanding.
[0101] When the user clicks the "No" confirmation button, the playing device system is exited.
[0102] When the user sees a gray icon in the status bar of the vehicle's large screen, it means that the matching authentication is not successful and the playing device needs to be reconnected.
[0103] like Figure 3 As shown, in this embodiment, the target sound signal is converted into an audio signal, and the audio signal is analyzed for amplitude and frequency in at least one amplitude and frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude and frequency value, including:
[0104] Step S41, obtaining at least one preconfigured amplitude-frequency band according to the matching method between the type of the playing device and the type of the song being played, and obtaining the number of the preconfigured amplitude-frequency bands;
[0105] Step S42, analyzing the sound signal and filtering to obtain an audio signal;
[0106] Step S43, setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0107] Step S44, performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band.
[0108] The method of analyzing the sound signal and filtering to obtain the audio signal is: amplifying, filtering and performing analog-to-digital conversion processing on the sound signal to obtain the audio signal.
[0109] Among them, the amplitude-frequency value results of the amplitude-frequency analysis of the audio signal are set to be distributed in multiple amplitude-frequency bands; at least one preconfigured amplitude-frequency band is obtained according to the matching method of the type of the playing device and the type of the song being played, so as to obtain all matching methods of the type of the playing device and the type of the song being played, at least one amplitude-frequency band is preconfigured for each matching method, and the number of preconfigured amplitude-frequency bands for each matching method is obtained.
[0110] In this embodiment, the amplitude-frequency results are divided into eight amplitude-frequency bands according to different music-dance function characteristics. Among them, the first amplitude-frequency band: 0-100Hz amplitude-frequency range, the second amplitude-frequency band: 100-300Hz amplitude-frequency range, the third amplitude-frequency band: 300-600Hz amplitude-frequency range, the fourth amplitude-frequency band: 600-1kHz amplitude-frequency range, the fifth amplitude-frequency band: 1k-3kHz amplitude-frequency range, the sixth amplitude-frequency band: 3k-5kHz amplitude-frequency range, the seventh amplitude-frequency band: 5k-10kHz amplitude-frequency range, and the eighth amplitude-frequency band: 10k-20kHz amplitude-frequency range.
[0111] Because the frequency analysis of audio data using the FFT (Fourier Transform) function requires different FFT resolutions, for the same music-dance effect, the frequency resolution should be ≤100Hz.
[0112] In this embodiment, performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0113] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0114] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0115] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0116] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0117] In response to obtaining the amplitude-frequency value of each preconfigured amplitude-frequency band of the tail sound audio data of the current audio processing cycle duration, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0118] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0119] Preferably, the audio processing cycle duration is 40ms PiC audio, and the tail tone audio of the audio processing cycle duration is the last 10ms of audio data of the 40ms PiC audio, so that the musical pitch can be identified through the tail tone. Preferably, the first threshold is 100Hz, that is, fs / N<100Hz. The value of N is equal to the number of amplitude-frequency bands corresponding to the corresponding music type. If the selected music corresponds to the first amplitude-frequency band, the second amplitude-frequency band and the third amplitude-frequency band, then N=3. Based on the requirement of fs / N<100Hz, the sampling frequency fs<N*100Hz can be set. The sampling frequency fs can be used to perform amplitude-frequency analysis at N frequency points, and the amplitude-frequency values in N amplitude-frequency bands can be obtained accordingly.
[0120] In this embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0121] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0122] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0123] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0124] It is understandable that, based on the result of summing the timbre saturation, the smaller the amplitude-frequency value variables of multiple amplitude-frequency bands are, the better the timbre saturation is determined, and the selected amplitude-frequency band is determined based on the timbre saturation fixed point, so as to obtain the corresponding amplitude-frequency value by optimizing the amplitude-frequency band. The saturation of the timbre is usually related to the harmonic structure, dynamic range, and auditory perception of the audio signal. Therefore, it is necessary to perform comprehensive adjustments based on each pre-configured amplitude-frequency band to achieve the best timbre saturation.
[0125] In another embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0126] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0127] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0128] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0129] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0130] If the FFT (Fourier Transform) function is completed by the Android AP|_Visualizer class function. The sampling frequency fs is returned by the getSampling Rate command, and the timbre beat n is returned by the get Capture Size command, then the kth amplitude-frequency value is (k*Fs) / (n / 2). The value of k is equal to the number of amplitude-frequency bands corresponding to the corresponding music type. The amplitude-frequency value of the kth amplitude-frequency value falls within the amplitude-frequency band, and the corresponding amplitude-frequency value is obtained by performing amplitude-frequency analysis through the FFT function in the amplitude-frequency band. Obtaining the corresponding amplitude-frequency value by performing amplitude-frequency analysis through the adjusted amplitude-frequency band can optimize the effect of the timbre beat, making the lighting change control effect more significant.
[0131] like Figure 4 As shown, in this embodiment, the step of sending a light change control signal according to the amplitude and frequency value of the audio signal includes:
[0132] Step S51, obtaining the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generating a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0133] Step S52, obtaining a real sound part and a virtual sound part of the audio signal in each frequency band, and generating a second light control signal according to the real sound part and the virtual sound part;
[0134] Step S53: combining the first light control signal and the second light control signal to form a light change control signal corresponding to the current audio processing cycle duration.
[0135] Specifically, in step S51, the sound range to which the tail tone audio data of the current audio processing cycle of the audio signal belongs is determined according to the amplitude-frequency value, and a first light control signal for controlling the light color, brightness and flashing frequency is generated according to the sound range; wherein the sound range refers to the range from the lowest to the highest sound that a human voice or musical instrument can reach. The sound range can be divided into three parts: the high range, the middle range and the low range. Specifically, the high range includes three groups of small characters, four groups of small characters and five groups of small characters; the low range includes large characters, one group of large characters and two groups of large characters; the middle range includes small characters, one group of small characters and two groups of small characters.
[0136] In step S52, when the amplitude-frequency values of the audio signal in the preconfigured N amplitude-frequency bands are obtained, the real sound part and the imaginary sound part of N / 2 frequency points are synchronously obtained. A second light control signal for controlling the light brightness and flickering frequency and the lighting range of the light array is generated according to the real sound part and the imaginary sound part, wherein the light brightness and flickering frequency corresponding to the real sound part are greater than the light brightness and flickering frequency corresponding to the imaginary sound part, and the lighting range of the light array corresponding to the real sound part is greater than the lighting range of the light array corresponding to the imaginary sound part.
[0137] If the FFT (Fourier transform) function is completed by the Android AP|_Visualizer class function, the getFft command will return the amplitude-frequency value results of the FFT analysis corresponding to the eight amplitude-frequency bands, including the real sound part and the imaginary sound part of N / 2 frequency points. The real sound part and the imaginary sound part are used to affect the light brightness, flickering frequency and lighting range (i.e. expansion width).
[0138] Depending on the amplitude-frequency value of the audio signal, the corresponding light color and expansion width will also be different. For example, when the amplitude-frequency value of the audio signal is 0-15Hz, the light color is changed to 64 colors-256 colors, and the expansion width is 0-33 LED lights. When the amplitude-frequency value of the audio signal is 300-450Hz, the light color is changed to 125 colors-256 colors, and the expansion width is 20-50 LED lights. In other words, the larger the amplitude-frequency value, the larger the expansion width, and the more obvious the dynamic effect of the music atmosphere light.
[0139] This application is based on the melody of the music being played, combined with the FFT function algorithm, according to the chord type of harmony in the music, the perceived rhythm of the music, the melody of the music, the melody trend analysis, the timbre selection volume control, etc. On the basis of the music melody, the accompaniment generation algorithm design and the on-board encryption software algorithm will be used according to the rules and rhythm of the music, and the generated light change control signal will be used to control the color, brightness, flashing frequency and lighting range of the light array to achieve an accompaniment lighting effect that matches the music being played.
[0140] When in use, music songs can be imported into the playing device through a U disk, and the playing device is connected to the vehicle end through the vehicle end interface. The vehicle end can authenticate the playing device and manage the connection status.
[0141] In addition, the sound signal also includes music played on the vehicle side; and converting the target sound signal into an audio signal includes:
[0142] Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0143] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0144] The sound signal includes the music played on the vehicle side and the music signal generated by the playing device. When the music distance is less than the second threshold, the music signal generated by the playing device and the standard music audio are not processed and are regarded as two sound sources converted into audio signals, both of which can adjust the interior ambient light, thereby realizing the music linkage between the vehicle side and the playing device to adjust the interior ambient light.
[0145] It is understandable that the sound source includes not only the music played on the vehicle side, but also the music played on the mobile terminal, so the sound signal also includes the music played on the mobile terminal, and the processing method is the same as that of the sound signal including the music played on the vehicle side. At this time, converting the target sound signal into an audio signal includes:
[0146] Identify the music played by the mobile terminal in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played by the mobile terminal, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0147] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0148] The vehicle end analyzes the playing signal to obtain the type of playing device and the type of song being played, and based on the combination of the type of music song and the type of playing device, identifies the amplitude and frequency value corresponding to the sound signal collected in the vehicle end to adjust the color, brightness, flashing frequency and lighting range of the light array. At the same time, according to the rhythm and melody of the music, the lights show different changing rhythms and patterns, which can enhance the personalized experience, increase interactivity and fun, and have strong applicability.
[0149] The main advantages of this application are:
[0150] 1. Personalized experience: Users can select their favorite songs through simple operations such as touching or sliding, and the lighting system will automatically adjust the light intensity and color changes according to the rhythm and style of the music, creating a unique visual feast;
[0151] 2. Interactivity and fun: The music-playing and lighting-linked system supports simultaneous operation by multiple people, which increases the interactivity and fun of the activity;
[0152] 3. Technological innovation: Through precise sound positioning technology and intelligent recommendation functions, every corner of the car is filled with vivid music details, allowing users to immerse themselves in a perfectly balanced sound field and experience an unprecedented auditory feast;
[0153] 4. Strong applicability: Whether it is tender and gentle or passionate rock, it can adapt to the sound effect selection of various occasions. For those who are eager to show their musical talents, the easy-to-operate and powerful DJ stage allows beginners to quickly get started and create personalized music mixes.
[0154] It should be understood that although Figure 1-Figure 4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-Figure 4 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0155] In one embodiment, Figure 5 As shown, a music playing linked lighting system 10 is provided, comprising: a playing device connection authentication module 1, a playing combination acquisition module 2, a sound collection module 3, an audio processor 4, a lighting controller 5, and a lighting module 6.
[0156] The vehicle-side interface managed by the playing device connection authentication module 1 includes a USB interface or a type-c interface. The playing combination acquisition module 2 is a touch display panel of the vehicle-side large screen. The sound acquisition module 3 is responsible for capturing the audio signal of the music playing. The sound acquisition module 3 collects the sound signal generated when the music is played through an audio acquisition device such as a microphone or a pickup. The audio acquisition device can capture the sound in the environment and convert it into an analog electrical signal. The audio processor 4 decodes and extracts the collected audio signal, and also includes steps such as amplification, filtering, and analog-to-digital conversion for subsequent digital processing. The audio processor 4 includes components such as an audio amplifier, a filter, and an analog-to-digital converter (ADC). The light controller 5 sends a control signal to the light module 6 according to the processing result, and the control signal controls the change of the light. The light controller 5 is a control system based on a microprocessor (such as a single-chip microcomputer, a DSP, etc.). The light module 6 receives the control signal from the light controller and adjusts the parameters such as the color, brightness, and flashing frequency of the light accordingly. The light module 6 includes LED lights of various colors, dimming circuits, etc., and the LED lights can form an LED light array. Each device is connected via a high-speed interface or bus to ensure high-speed and stable data transmission.
[0157] It is understandable that the vehicle side realizes interaction with the user interface. The playing device connection authentication module 1 and the playing combination acquisition module 2 are integrated in the vehicle side large screen, and the playing combination acquisition module 2 displays the three-party application center and interactive information in the status bar of the vehicle side large screen, such as the APP interface, the pop-up interface of the pop-up window, and the preview of the effect operation guide dynamic effect of the playing combination mode.
[0158] The playing device connection authentication module 1 is used for authenticating the playing device in response to detecting that the playing device is connected to the vehicle end through the vehicle end interface.
[0159] The playing combination acquisition module 2 is used for analyzing the playing signal in response to receiving the playing signal from the user, and the playing signal includes the type of the playing device and the type of the playing song.
[0160] The sound collection module 3 is used to collect the sound signal in the vehicle end and obtain the target sound signal, and the target sound signal at least includes the music signal produced by the playing device.
[0161] The audio processor 4 is used to amplify, filter and perform analog-to-digital conversion on the sound signal, convert the target sound signal into an audio signal, and perform amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain corresponding amplitude-frequency values.
[0162] The light controller 5 is used to send a light change control signal according to the amplitude and frequency value of the audio signal.
[0163] The lighting module 6 is used for adjusting the lighting according to the lighting change control signal in response to receiving the lighting change control signal.
[0164] The music-playing linked lighting system is an intelligent system that integrates music recognition, analysis and lighting control. The system captures the audio signal of the music playing, analyzes the rhythm, melody and timbre of the music in real time, and controls the brightness, color, flashing frequency of the lights accordingly, achieving a perfect fusion of music and lighting, bringing an immersive audio-visual experience to users.
[0165] In this embodiment, the step of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played includes:
[0166] Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands;
[0167] Analyze the sound signal and filter it to obtain an audio signal;
[0168] Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0169] An amplitude-frequency analysis is performed on the tail audio data of each audio processing cycle of the audio signal to obtain an amplitude-frequency value of each preconfigured amplitude-frequency band.
[0170] In this embodiment, performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0171] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0172] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0173] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0174] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0175] In response to obtaining the amplitude-frequency value of each preconfigured amplitude-frequency band of the tail sound audio data of the current audio processing cycle duration, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0176] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0177] In this embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0178] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0179] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0180] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0181] In this embodiment, the optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0182] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0183] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0184] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0185] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0186] In this embodiment, the step of sending a light change control signal according to the amplitude and frequency value of the audio signal includes:
[0187] Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0188] Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second light control signal according to the real sound part and the imaginary sound part;
[0189] The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
[0190] In this embodiment, matching the playing device includes:
[0191] Determining whether the playing device is connected to the vehicle-end interface for the first time;
[0192] If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated;
[0193] In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful;
[0194] In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
[0195] In this embodiment, the sound signal also includes music played on the vehicle end; and converting the target sound signal into an audio signal includes:
[0196] Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0197] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0198] In the above-mentioned music playing and lighting linkage system, the playing device is connected to the vehicle side through the vehicle side interface, so that the vehicle side and the playing device can be connected, and the vehicle side can authenticate the playing device and manage the connection status, analyze the playing signal to obtain the type of the playing device and the type of the song played, and identify the amplitude and frequency values corresponding to the sound signal collected in the vehicle side based on the combination of the type of music song and the type of playing device to adjust the color, brightness, flashing frequency and lighting range of the light array. At the same time, according to the rhythm and melody of the music, the lights can present different changing rhythms and patterns, which can enhance the personalized experience, increase interactivity and fun, and have strong applicability.
[0199] For the specific definition of the music playing linked lighting system, please refer to the definition of the music playing linked lighting method above, which will not be repeated here. Each module in the above-mentioned music playing linked lighting system can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0200] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0201] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0202] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0203] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0204] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0205] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0206] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0207] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0208] The step of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played includes:
[0209] Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands;
[0210] Analyze the sound signal and filter it to obtain an audio signal;
[0211] Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0212] An amplitude-frequency analysis is performed on the tail audio data of each audio processing cycle of the audio signal to obtain an amplitude-frequency value of each preconfigured amplitude-frequency band.
[0213] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0214] The step of performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0215] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0216] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0217] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0218] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0219] In response to obtaining the amplitude-frequency value of each preconfigured amplitude-frequency band of the tail sound audio data of the current audio processing cycle duration, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0220] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0221] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0222] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0223] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0224] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0225] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0226] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0227] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0228] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0229] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0230] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0231] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0232] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0233] The step of sending a light change control signal according to the amplitude and frequency value of the audio signal comprises:
[0234] Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0235] Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second light control signal according to the real sound part and the imaginary sound part;
[0236] The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
[0237] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0238] The matching of the playing device comprises:
[0239] Determining whether the playing device is connected to the vehicle-end interface for the first time;
[0240] If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated;
[0241] In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful;
[0242] In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
[0243] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0244] The sound signal also includes music played on the vehicle end; and converting the target sound signal into an audio signal includes:
[0245] Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0246] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0247] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method of linking music playing with lights above, which will not be repeated here.
[0248] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store music-playing linked lighting data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a music-playing linked lighting method is implemented.
[0249] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0250] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0251] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0252] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0253] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0254] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0255] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0256] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0257] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0258] The step of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played includes:
[0259] Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands;
[0260] Analyze the sound signal and filter it to obtain an audio signal;
[0261] Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0262] An amplitude-frequency analysis is performed on the tail audio data of each audio processing cycle of the audio signal to obtain an amplitude-frequency value of each preconfigured amplitude-frequency band.
[0263] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0264] The step of performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0265] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0266] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0267] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0268] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0269] In response to obtaining the amplitude-frequency value of each preconfigured amplitude-frequency band of the tail sound audio data of the current audio processing cycle duration, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0270] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0271] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0272] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0273] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0274] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0275] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0276] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0277] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0278] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0279] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0280] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0281] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0282] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0283] The step of sending a light change control signal according to the amplitude and frequency value of the audio signal comprises:
[0284] Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0285] Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second light control signal according to the real sound part and the imaginary sound part;
[0286] The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
[0287] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0288] The matching of the playing device comprises:
[0289] Determining whether the playing device is connected to the vehicle-end interface for the first time;
[0290] If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated;
[0291] In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful;
[0292] In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
[0293] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the method of linking music playing with lights above, which will not be repeated here.
[0294] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0295] In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device;
[0296] In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song;
[0297] Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device;
[0298] Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value;
[0299] Sending a light change control signal according to the amplitude and frequency value of the audio signal;
[0300] In response to receiving the light change control signal, adjusting the light according to the light change control signal.
[0301] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0302] The step of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played includes:
[0303] Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands;
[0304] Analyze the sound signal and filter it to obtain an audio signal;
[0305] Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal;
[0306] An amplitude-frequency analysis is performed on the tail audio data of each audio processing cycle of the audio signal to obtain an amplitude-frequency value of each preconfigured amplitude-frequency band.
[0307] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0308] The step of performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes:
[0309] Acquire tail audio data of the audio signal during the current audio processing cycle;
[0310] Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands;
[0311] According to the number of times N of performing amplitude-frequency analysis, a sampling frequency fs of the tail sound audio data is set, and the sampling frequency fs satisfies that fs / N is less than a first threshold;
[0312] Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band;
[0313] In response to obtaining the amplitude-frequency value of each preconfigured amplitude-frequency band of the tail sound audio data of the current audio processing cycle duration, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value;
[0314] In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, an amplitude-frequency analysis is performed on the tail audio data of the audio signal during the next audio processing cycle.
[0315] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0316] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0317] Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation;
[0318] Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands;
[0319] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0320] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0321] The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes:
[0322] Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle;
[0323] Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands;
[0324] Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band;
[0325] Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
[0326] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0327] The step of sending a light change control signal according to the amplitude and frequency value of the audio signal comprises:
[0328] Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band;
[0329] Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second lighting control signal according to the real sound part and the imaginary sound part;
[0330] The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
[0331] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0332] The matching of the playing device comprises:
[0333] Determining whether the playing device is connected to the vehicle-end interface for the first time;
[0334] If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated;
[0335] In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful;
[0336] In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
[0337] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0338] The sound signal also includes music played on the vehicle end; and converting the target sound signal into an audio signal includes:
[0339] Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device;
[0340] The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
[0341] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the method of linking music playing with lights above, which will not be repeated here.
[0342] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0343] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0344] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A music playing and lighting linkage method, characterized in that: include: In response to detecting that the playing device is connected to the vehicle end through the vehicle end interface, matching the playing device; In response to receiving a playing signal from a user, parsing the playing signal, wherein the playing signal includes the type of the playing device and the type of the playing song; Collecting the sound signal in the vehicle end to obtain the target sound signal, wherein the target sound signal at least includes the music signal played by the playing device; Converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value; Sending a light change control signal according to the amplitude and frequency value of the audio signal; In response to receiving the light change control signal, adjusting the light according to the light change control signal.
2. The music playing and lighting linkage method according to claim 1 is characterized in that: The step of converting the target sound signal into an audio signal and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band to obtain a corresponding amplitude-frequency value according to the type of the playing device and the type of the song being played includes: Acquire at least one preconfigured amplitude-frequency band according to the matching mode between the type of the playing device and the type of the played song, and acquire the number of the preconfigured amplitude-frequency bands; Analyze the sound signal and filter it to obtain an audio signal; Setting the audio processing cycle duration and tail tone audio duration for performing amplitude-frequency analysis on the audio signal; Perform amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band.
3. The music playing and lighting linkage method according to claim 2 is characterized in that: The step of performing amplitude-frequency analysis on the tail audio data of each audio processing cycle of the audio signal to obtain the amplitude-frequency value of each preconfigured amplitude-frequency band includes: Acquire tail audio data of the audio signal during the current audio processing cycle; Setting the number of times N of performing amplitude-frequency analysis on the tail sound audio data to be equal to the number of the preconfigured amplitude-frequency bands; Setting a sampling frequency fs for the tail sound audio data according to the number of amplitude-frequency analysis N, wherein the sampling frequency fs satisfies that fs / N is less than a first threshold; Performing amplitude-frequency analysis at N frequency points on the tail sound audio data of the audio signal during the current audio processing cycle, and using a Fourier transform function to obtain the amplitude-frequency value of the tail sound audio data in each frequency band; In response to obtaining the amplitude-frequency value of the tail tone audio data of the current audio processing cycle duration in the preconfigured amplitude-frequency band, optimizing and adjusting the preconfigured amplitude-frequency band and the amplitude-frequency value; In response to optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value, amplitude-frequency analysis is performed on tail audio data of the audio signal during the next audio processing cycle.
4. The music playing and lighting linkage method according to claim 3 is characterized in that: The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes: Sum the amplitude-frequency values of each preconfigured amplitude-frequency band of the tail sound audio data of the audio signal in each audio processing cycle to obtain the timbre saturation; Acquire the amplitude-frequency value variables of the preconfigured multiple amplitude-frequency bands, increase the timbre saturation by adjusting the amplitude-frequency values of different amplitude-frequency bands, so that the amplitude-frequency value variables of the multiple amplitude-frequency bands are minimized, and acquire the adjusted amplitude-frequency bands; Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
5. The music playing and lighting linkage method according to claim 3 is characterized in that: The optimizing and adjusting the preconfigured amplitude-frequency band and amplitude-frequency value includes: Obtain the timbre beat n of the tail sound audio data of the audio signal in each audio processing cycle; Obtaining a sampling frequency fs of the tail audio data of the audio signal in each audio processing cycle, and then obtaining an amplitude-frequency value of the kth amplitude-frequency band as (k*fs) / (n / 2), wherein k is a sequence number of the amplitude-frequency band formed by ascending order of the preconfigured amplitude-frequency bands; Determine whether the kth amplitude-frequency value is within the preconfigured kth amplitude-frequency band, if so, keep the amplitude-frequency value of the preconfigured kth amplitude-frequency band unchanged, if not, adjust the preconfigured kth amplitude-frequency band to the amplitude-frequency band where the kth amplitude-frequency value is located, and obtain the adjusted amplitude-frequency band; Performing amplitude-frequency analysis on the audio signal according to the adjusted amplitude-frequency band to obtain corresponding amplitude-frequency values.
6. The music playing and lighting linkage method according to claim 4 or 5, characterized in that: The step of sending a light change control signal according to the amplitude and frequency value of the audio signal comprises: Acquire the amplitude-frequency value of the audio signal in the adjusted amplitude-frequency band, and generate a first lighting control signal according to the amplitude-frequency value of the adjusted amplitude-frequency band; Acquire the real sound part and the imaginary sound part of the audio signal in each frequency band, and generate a second light control signal according to the real sound part and the imaginary sound part; The first light control signal and the second light control signal are combined to form a light change control signal corresponding to the duration of the current audio processing cycle.
7. The music playing and lighting linkage method according to claim 1 is characterized in that: The matching of the playing device comprises: Determining whether the playing device is connected to the vehicle-end interface for the first time; If yes, the playing device is authenticated for the first time, and if no, it is determined that the playing device has been authenticated; In response to the playing device being authenticated, maintaining the matching connection state of the playing device, and displaying a first image indicating that the matching authentication is successful; In response to the playing device failing to pass the authentication, a second image is displayed to indicate that the authentication is not matched, and the playing device is reconnected.
8. The music playing and lighting linkage method according to claim 1, characterized in that: The target sound signal also includes music played on the vehicle end; and converting the target sound signal into an audio signal includes: Identify the music played on the vehicle end in the target sound signal, search for standard music audio through audio fingerprint retrieval based on the music played on the vehicle end, and exclude the standard music audio from the target sound signal to obtain the music signal played by the playing device; The strumming music melody line of the music signal generated by the strumming device and the background music melody line of the standard music audio are obtained, and the strumming music melody line is compared with the background music melody line to obtain the music distance. If the music distance is less than a second threshold, the strumming music melody line and the background music melody line are combined to form a fitting sound signal, and the fitting sound signal is converted into an audio signal.
9. A music playing linked lighting system, characterized in that: The system comprises: A playing device connection authentication module, used for matching the playing device in response to detecting that the playing device is connected to the vehicle end through the vehicle end interface; A playing combination acquisition module, for parsing the playing signal in response to receiving the playing signal from the user, wherein the playing signal includes the type of the playing device and the type of the playing song; A sound collection module, used to collect sound signals in the vehicle end and obtain a target sound signal, wherein the target sound signal at least includes a music signal played by the playing device; An audio processor, used for converting the target sound signal into an audio signal, and performing amplitude-frequency analysis on the audio signal in at least one amplitude-frequency band according to the type of the playing device and the type of the song being played to obtain a corresponding amplitude-frequency value; A lighting controller, used for sending a lighting change control signal according to the amplitude and frequency value of the audio signal; The lighting module is used for adjusting the lighting according to the lighting change control signal in response to receiving the lighting change control signal.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.